/* ===== 配色 ===== */
:root {
  --white:  #eaeaea;   /* 文字・明るい面 */
  --gold:   #c1a64d;   /* アクセント */
  --black:  #3f3f3f;   /* 地色・暗い面 */
  --gray1:  #818181;
  --gray2:  #606060;

  --veil:      rgba(20, 20, 20, 0.62);     /* 文章・リンク面の下地。濃さはここ1箇所 */
  --veil-line: rgba(234, 234, 234, 0.09);

  /* 背景動画の色味。#bg-video の filter に流し込む */
  --bg-blur:       3px;
  --bg-brightness: 0.75;   /* 明るさ。下げるほど暗い 0.75既定 */
  --bg-contrast:   1.1;
  --bg-saturate:   0.95;   /* 彩度。0で白黒 */
  --bg-hue:        0deg;   /* 色相回転 */
  --bg-shade:      rgba(25, 25, 25, 0.72);  /* 動画の上に重ねる膜 25,25,25,0.22 */
  --bg-noise:      0.25;   /* ザラつき 0.05〜0.25 既定0.14*/
}

/* ===== 土台 ===== */
* { box-sizing: border-box; }

body, html {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--white);
  overflow: hidden;              /* 1画面完結 */
}
/* 地色は html だけ。body にも置くと負z-index層（背景動画・膜・ノイズ）を塗り潰す */
html { background: var(--black); }
body {                           /* ヘッダー/中央/下メニューを縦積み */
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* 背景：動画(-3) / 暗い膜(-2) / ノイズ(-1) の3層、上に本文。色味は :root の --bg-* */
#bg-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness))
          contrast(var(--bg-contrast)) saturate(var(--bg-saturate))
          hue-rotate(var(--bg-hue));
  animation: slowZoom 24s ease-in-out infinite alternate;
  z-index: -3;
}
@keyframes slowZoom {
  from { transform: scale(1.6); }
  to   { transform: scale(1.85); }
}

#bg-shade {
  position: fixed; inset: 0;
  background: var(--bg-shade);
  z-index: -2;
}

#bg-noise {
  position: fixed; inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--bg-noise);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: grain 0.5s steps(3) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-4%, 3%); }
  66%  { transform: translate(3%, -4%); }
  100% { transform: translate(-2%, -2%); }
}


/* ===== スクロールバー（全ページ共通・配色をサイトに合わせる） ===== */
* { scrollbar-width: thin; scrollbar-color: var(--gray2) transparent; } /* Firefox */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(20, 20, 20, 0.35); }
::-webkit-scrollbar-thumb {
  background: var(--gray2); border-radius: 6px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }


/* ===== ヘッダー ===== */
.site-header {
  flex: 0 0 auto;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(25, 25, 25, 0.55);
  border-bottom: 1px solid var(--gray1);
  z-index: 10; position: relative;
}
.logo img {
  height: 36px; display: block;
}

/* DLボタン：3状態スプライト(560x180)。object-positionで通常/hover/押下を出し分け */
.dl-btn-img {
  display: block;
  aspect-ratio: 560 / 180;
  overflow: hidden;
  border-radius: 6px;
}
.dl-btn-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  display: block;
}
.dl-btn-img:hover  img { object-position: 50% 50%; }
.dl-btn-img:active img { object-position: 50% 100%; }

.header-dl   { width: 150px; }
.overview-dl { width: 300px; }
.page-dl     { width: 280px; }


/* ===== メイン（パネル切替。.activeだけ表示） ===== */
.stage {
  flex: 1 1 auto;
  min-height: 0;                 /* 中身が縮めるように必須 */
  position: relative;
  overflow: hidden;
}
.panel {
  display: none;
  height: 100%;
  padding: 24px;
  overflow: auto;                /* 収まらないパネルだけ内部スクロール */
  align-items: center; justify-content: center;
}
.panel.active {
  display: flex;
}
#gallery.panel.active { align-items: stretch; }

.lead {
  font-size: 20px; line-height: 1.9;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* 日本語の折り返し。文末数文字だけが次行へ落ちるのを防ぐ。文章を足す時はここに追加 */
.lead,
.intro-body,
.contest-note,
.movie-desc,
.dl-note,
.sp-dl-note,
.dl-meta-item,
.dl-changelog li,
.manga-status,
.contact-col > p {
  word-break: auto-phrase;
  text-wrap: pretty;
  line-break: strict;
}

/* 文章・リンク面の下地。padding だけ各面で個別指定する */
.intro,
.contest-area,
.contact-split,
.dl-meta,
.sp-dl-note {
  background: var(--veil);
  border: 1px solid var(--veil-line);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}


/* ----- 概要 ----- */
.overview-box {
  display: flex; flex-direction: column;
  align-items: center; gap: 40px;
}
.intro {
  display: flex; flex-direction: column; gap: 26px;
  max-width: 680px;              /* 狭めるとあらすじの文末が次行に落ちる */
  padding: 26px 32px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.intro-head {
  margin: 0 0 8px;
  font-size: 15px; font-weight: bold;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.intro-body {
  margin: 0;
  font-size: 17px; line-height: 1.9;
  color: var(--white);
}
/* プレイ時間・操作は横2列。縦に積むとTOPの「1画面完結」が崩れるため */
.intro-meta {
  display: flex; justify-content: center; gap: 28px;
}
.intro-meta .meta-item {
  flex: 1 1 0; min-width: 0;     /* 長い値でも列幅を割らずに折り返す */
}

/* スマホ専用の注釈（760px以下で表示に切替） */
.sp-dl-note { display: none; }

/* お願い文＋バナーを1枚の面にまとめる */
.contest-area {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  max-width: 380px;
  padding: 14px 18px;
}
.contest-note {
  margin: 0;
  font-size: 12.5px; line-height: 1.7;
  text-align: center; color: var(--white);
}

/* コンテストバナー(468x60) */
.contest-banner {
  display: block;
  width: 100%; max-width: 320px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.9;
  transition: transform 0.2s, opacity 0.2s;
}
.contest-banner img {
  width: 100%; height: auto; display: block;
}
.contest-banner:hover {
  opacity: 1;
  transform: scale(1.03);
}


/* ----- 戦闘システム ----- */
.battle-layout {
  display: flex; gap: 24px;
  width: 100%; height: 100%; max-width: 1100px;
  align-items: center;
}
.video-frame {
  flex: 1 1 auto; min-width: 0; min-height: 0;
  height: 100%;
  border: 2px solid var(--gray1);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.video-frame video {
  width: 100%; height: 100%;
  object-fit: contain;           /* 比率保持、余白は黒帯 */
  background: #000;
  display: block;
}
.battle-side {
  flex: 0 0 240px;
  height: 100%;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
.choice-list {
  list-style: none; margin: 0; padding: 0;
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.movie-desc {                    /* メニュー下、長い時だけスクロール */
  flex: 1 1 auto; min-height: 0;
  overflow: auto;
  border: 1px solid var(--gray1);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(25, 25, 25, 0.5);
  font-size: 14px; line-height: 1.7;
  color: var(--white);
}
.choice {
  cursor: pointer;
  list-style: none;
}
.choice img {
  display: block;
  width: 100%;
  filter: brightness(0.68) saturate(0.9);
  transition: transform 0.15s, filter 0.15s;
}
.choice:hover img {
  transform: translateX(6px);
  filter: brightness(0.9);
}
.choice.active img {
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(193, 166, 77, 0.6));
}


/* ----- ギャラリー（6枚1画面） ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  width: 100%; height: 100%;
  max-width: 1000px;
}
.gallery-grid img {
  width: 100%; height: 100%;
  min-height: 0;                 /* 縦にはみ出さない保険 */
  object-fit: cover;
  border: 1px solid var(--gray1);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.gallery-grid img:hover {
  transform: scale(1.04);
  border-color: var(--gold);
}


/* ----- 連絡先 ----- */
.follow-box {
  display: flex; flex-direction: column;
  align-items: center; gap: 32px;
}
.sns-cards { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.sns-card {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
  border: 1px solid var(--white);
  border-radius: 8px;
  padding: 12px 24px;
  background: rgba(25, 25, 25, 0.6);
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.sns-card:hover {
  transform: scale(1.05);
  background: var(--white); color: var(--black);
}
.x-icon { width: 20px; height: 20px; fill: currentColor; }
.mail-icon { width: 20px; height: 20px; fill: currentColor; }

/* 左=@kuzu_musisan ／ 縦罫線 ／ 右=@act_pike と mail */
.contact-split {
  display: flex;
  align-items: flex-start;      /* 上そろえ */
  justify-content: center;
  gap: 28px;
  padding: 24px 30px;
}
.contact-rule {
  flex: 0 0 1px;
  align-self: stretch;          /* 罫線を高さいっぱいに */
  background: var(--gray1);
}
.contact-col {
  display: flex; flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
}
.contact-col > p {              /* 名前 */
  margin: 0;
  font-weight: bold;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.contact-col .sns-card { justify-content: center; }


/* ----- ダウンロードページ ----- */
.dl-layout {
  display: flex; gap: 40px;
  width: 100%; height: 100%; max-width: 980px;
  align-items: center; justify-content: center;   /* 右のDLボタンは縦中央のまま */
}
/* 操作ガイド画像 */
.dl-guides {
  flex: 0 1 auto; height: 100%; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;   /* 右のDLボタンと縦位置を合わせる */
  gap: 14px;
}
/* 枠は吹き出し(.dl-note)と同じ */
.dl-guide {
  margin: 0; min-height: 0;
  display: flex;
  padding: 8px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--gray1);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.dl-guide:hover { border-color: var(--gold); }
.dl-guide img {
  display: block;
  max-width: 240px; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}
.dl-guide img:hover { transform: scale(1.03); }
.dl-info {
  flex: 0 1 380px;
  display: flex; flex-direction: column; gap: 26px;
  align-items: flex-start;
}
/* 警告画像を指す吹き出し */
.dl-note {
  position: relative;
  margin: 0;
  font-size: 15px; line-height: 1.9;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--gray1);
  border-radius: 10px;
  padding: 16px 20px;
}
.dl-note::before, .dl-note::after {
  content: ""; position: absolute; top: 30px;
  width: 0; height: 0; border-style: solid;
}
.dl-note::before {
  left: -11px;
  border-width: 9px 11px 9px 0;
  border-color: transparent var(--gray1) transparent transparent;
}
.dl-note::after {
  left: -9px;
  border-width: 8px 10px 8px 0;
  border-color: transparent rgba(20, 20, 20, 0.9) transparent transparent;
}
.dl-meta { display: flex; gap: 24px; font-size: 15px; padding: 12px 18px; }
.dl-meta-item { color: var(--gray1); }
.dl-meta-item b { color: var(--white); font-size: 17px; }

/* DLページ左のタブ（起動 / 更新履歴）。幅は固定＝切替で右側を動かさない */
.dl-tabs {
  flex: 0 0 300px; width: 300px; height: 100%; min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.dl-tabbar { display: flex; gap: 8px; justify-content: center; flex: 0 0 auto; }
.dl-tab {
  padding: 6px 18px;
  font-size: 15px; color: var(--gray1);
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.dl-tab:hover { color: var(--white); }
.dl-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* 中身の高さは枠いっぱい＝起動タブや右のDLボタンと縦位置を揃える */
.dl-pane { display: none; min-height: 0; }
.dl-pane.active { display: flex; flex: 1 1 auto; }

/* 更新履歴の中身。上端寄せ＝タブ見出し・右のDLボタンと縦位置を揃える */
.dl-changelog {
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 4px 12px;
}
.cl-entry { margin-bottom: 18px; }
.cl-entry:last-child { margin-bottom: 0; }
.cl-ver {
  color: var(--gold); font-size: 14px; letter-spacing: .04em;
  margin-bottom: 6px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(193, 166, 77, .35);
}
.dl-changelog ul { list-style: none; margin: 0; padding: 0; }
.dl-changelog li {
  position: relative; padding-left: 16px;
  color: var(--white); font-size: 13px; line-height: 1.75; margin-bottom: 3px;
}
.dl-changelog li::before {
  content: "\00bb"; position: absolute; left: 2px; color: var(--gold);
}
/* タブでインデントした行＝補足/メモ表現（» を付けず控えめに） */
.dl-changelog li.cl-note {
  padding-left: 28px; color: var(--gray1);
  font-size: 12px; line-height: 1.7;
}
.dl-changelog li.cl-note::before {
  content: "\2514"; left: 14px; color: var(--gray2);   /* └ */
}
.dl-changelog::-webkit-scrollbar { width: 8px; }
.dl-changelog::-webkit-scrollbar-thumb { background: var(--gray2); border-radius: 4px; }

/* 更新履歴タブ表示中は右の吹き出しを隠す（位置は動かさない） */
.dl-layout.cl-open .dl-note { visibility: hidden; }


/* ===== 画面下メニュー ===== */
.bottom-nav {
  flex: 0 0 auto;
  display: flex; gap: 18px;
  padding: 12px 24px;
  align-items: center;
  justify-content: center;
  background: rgba(25, 25, 25, 0.65);
  border-top: 1px solid var(--gray1);
  z-index: 10; position: relative;
  /* 固定フッターに戻すなら height:116px を足す */
}
.copyright {                     /* 右下角に小さく重ねる */
  position: absolute;
  right: 12px; bottom: 6px;
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
  color: var(--gray1);
  letter-spacing: 0.05em;
  pointer-events: none;
}
/* ボタン=3状態スプライト（dl-btn-imgと同機構） */
.nav-btn {
  flex: 1 1 260px;
  max-width: 280px;
  aspect-ratio: 560 / 180;
  padding: 0; border: none; background: none;
  overflow: hidden;
  cursor: pointer;
}
.nav-btn img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  display: block;
}
.nav-btn:hover img  { object-position: 50% 50%; }
.nav-btn.active img,
.nav-btn:active img { object-position: 50% 100%; }


/* ===== ライトボックス（画像拡大） ===== */
#lightbox {
  position: fixed; inset: 0;
  display: none;                 /* JSで開く */
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90%; max-height: 90%;
  border: 2px solid var(--gold);
  border-radius: 6px;
}




/* ===== ギャラリー：サブタブ（スクショ / まんが） ===== */
.gallery-wrap {
  width: 100%; max-width: 1100px; height: 100%;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;                 /* 中身がスクロールできるように */
}
.gallery-tabbar {
  flex: 0 0 auto;
  display: flex; gap: 8px; justify-content: center;
}
/* DLページのタブ（.dl-tab）と同じ下線表記＝サイト共通フォーマット */
.gal-tab {
  padding: 6px 18px;
  font-size: 15px; color: var(--gray1);
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.gal-tab:hover { color: var(--white); }
.gal-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* 各面。スクショ面は従来どおり、マンガ面はフレーム内スクロール＋ジャンプ固定 */
.gal-pane { display: none; flex: 1 1 auto; min-height: 0; }
.gal-pane.active { display: block; }
/* マンガ面はフレーム。中の .manga-scroll だけがスクロールする */
.gal-manga { position: relative; }
.gal-manga.active { display: flex; flex-direction: column; }
.manga-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* まんがフィード：PC3列 / 左→右 / 上=第1話・下=最新 */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px; align-items: start;
  padding: 4px 4px 48px;
}
.manga-status {
  text-align: center; font-size: 12px;
  color: var(--gray1); padding: 4px 0 8px;
}
.manga-card { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mc-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; }
.mc-no { font-size: 12px; font-weight: bold; letter-spacing: 0.1em; color: var(--gold); }
.mc-title {
  font-size: 12.5px; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-embed { min-height: 60px; }
.mc-embed .twitter-tweet { margin: 0 !important; }
.mc-ph {
  display: flex; align-items: center; justify-content: center;
  height: 200px; border: 1px dashed var(--gray2); border-radius: 10px;
  color: var(--gray1); font-size: 12px; background: rgba(20, 20, 20, 0.4);
}

/* 先頭/最新ジャンプ（マンガのフレーム内・右下に固定。.show で表示） */
.manga-jump {
  position: absolute; right: 14px; bottom: 14px; z-index: 5;
  display: none; flex-direction: column; gap: 8px;
}
.manga-jump.show { display: flex; }
.mj-btn {
  cursor: pointer; font-family: inherit;
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--white); background: rgba(20, 20, 20, 0.85);
  border: 1px solid var(--gold); border-radius: 20px;
  padding: 8px 14px; transition: 0.15s;
}
.mj-btn:hover { background: var(--gold); color: #171717; }


/* ===== パスワード認証ゲート（auth.jsが生成） =====
   公開時は index.html の auth.js 読込行を消す */
#auth-gate {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #202020;
}
#auth-gate .auth-box {
  display: flex; flex-direction: column; gap: 14px;
  align-items: stretch;
  width: 280px; max-width: 82vw;
  padding: 28px 26px;
  background: rgba(25, 25, 25, 0.9);
  border: 1px solid var(--gray1);
  border-radius: 10px;
  text-align: center;
}
#auth-gate .auth-title { margin: 0; font-size: 15px; color: var(--white); }
#auth-gate input {
  font-size: 16px; padding: 10px 12px;
  color: var(--white); background: var(--black);
  border: 1px solid var(--gray1); border-radius: 6px;
  text-align: center;
}
#auth-gate button {
  font-size: 15px; font-weight: bold; letter-spacing: 2px;
  padding: 10px; cursor: pointer;
  color: var(--black); background: var(--gold);
  border: none; border-radius: 6px;
  transition: transform 0.15s;
}
#auth-gate button:hover { transform: scale(1.03); }
#auth-gate .auth-err { margin: 0; min-height: 1em; font-size: 12px; color: #e06b6b; }


/* ===== 縦が狭い画面（900px以下）=====
   下地(--veil)の余白ぶんTOPが伸びるので、段間と余白を詰めて「1画面完結」を保つ。
   760pxの指定に負けるよう、必ずその上に置く */
@media (max-height: 900px) {
  .overview-box { gap: 16px; }
  .intro { gap: 12px; padding: 12px 28px; }
  .intro-head { margin-bottom: 5px; }
  .intro-body { line-height: 1.75; }
  .contest-area { gap: 8px; padding: 10px 16px; max-width: 340px; }
  .contest-banner { max-width: 280px; }
}

/* ===== 狭い画面（760px以下）※必ずファイル末尾に置く。上に移すと後続の指定に負ける ===== */
@media (max-width: 760px) {
  .site-header { padding: 0 14px; }
  .lead { font-size: 16px; }
  .panel { padding: 14px; }

  /* Windows専用のため、スマホにDLの導線は出さない（TOPは注釈に差し替え） */
  .header-dl   { display: none; }
  .overview-dl { display: none; }
  .sp-dl-note {
    display: block; margin: 0;
    padding: 10px 16px;
    font-size: 12.5px; line-height: 1.6;
    text-align: center; color: var(--gold);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  }

  /* TOP：全文を1画面に収める。中央寄せだと溢れた時に上端が掴めなくなる */
  #overview.panel.active { align-items: flex-start; }
  .overview-box { gap: 14px; }
  .intro { gap: 12px; padding: 14px 16px; }   /* 下地の余白も詰めて1画面を維持 */
  .contact-split { padding: 16px 18px; }
  .intro-head { margin-bottom: 3px; font-size: 12px; letter-spacing: 0.1em; }
  /* 3列ぶんの幅しか無いので、値だけ一段小さくして行数を抑える */
  .intro-meta { gap: 12px; }
  .intro-meta .intro-body { font-size: 12px; }
  .intro-body { font-size: 13px; line-height: 1.65; }
  .intro-body br { display: none; }   /* 折返しと二重になって行数が増えるため */
  .contest-area { gap: 8px; padding: 10px 14px; max-width: 300px; }
  .contest-note { font-size: 11.5px; }
  .contest-banner { max-width: 240px; }

  /* DLページ：左右→縦積み、尻尾を上向きに */
  .dl-layout { flex-direction: column; gap: 16px; align-items: center; }
  .dl-guides { flex: 0 0 auto; height: auto; }
  .dl-tabs { flex: 0 0 auto; height: auto; width: 100%; max-width: 320px; }
  .dl-pane.active { flex: 0 0 auto; }
  .dl-changelog { max-height: 40vh; justify-content: flex-start; }
  .dl-info { flex: 0 0 auto; align-items: center; text-align: center; gap: 20px; }
  .dl-meta { padding: 8px 14px; }   /* 下地の余白ぶんを詰める */
  .dl-note { font-size: 14px; }
  .dl-note::before {
    top: -11px; left: 50%; margin-left: -10px;
    border-width: 0 10px 11px 10px;
    border-color: transparent transparent var(--gray1) transparent;
  }
  .dl-note::after {
    top: -9px; left: 50%; margin-left: -9px;
    border-width: 0 9px 10px 9px;
    border-color: transparent transparent rgba(20, 20, 20, 0.9) transparent;
  }

  /* 戦闘：左右→縦積み（動画が上） */
  .battle-layout { flex-direction: column; gap: 12px; }
  .video-frame { width: 100%; height: auto; flex: 1 1 auto; min-height: 0; }
  .battle-side { flex: 0 0 auto; width: 100%; height: auto; }
  .choice-list {
    flex: 0 0 auto; width: 100%;
    flex-direction: row; flex-wrap: wrap; gap: 8px;
  }
  .choice { flex: 1 1 30%; }
  .movie-desc { flex: 0 0 auto; max-height: 84px; }

  /* ギャラリー：2×3 */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

  /* まんが：1列。幅指定の本体は script.js の data-width で、以下はその保険 */
  .manga-grid { grid-template-columns: 1fr; padding: 4px 0 48px; }
  .manga-scroll { overflow-x: hidden; }
  .mc-embed .twitter-tweet,
  .mc-embed iframe {
    width: 100% !important;
    min-width: 0 !important;       /* Xが付ける最小220pxを解除 */
    max-width: 100% !important;
  }
  .manga-jump { right: 12px; bottom: 12px; }

  /* 連絡先：スマホでも左右に並べる */
  .follow-box { gap: 18px; width: 100%; }
  .contact-split { flex-direction: row; align-items: flex-start; gap: 10px; }
  .contact-rule { flex: 0 0 1px; align-self: stretch; width: 1px; height: auto; }
  .contact-col { flex: 1 1 0; min-width: 0; gap: 10px; }
  .contact-col > p { font-size: 13px; }
  .contact-col .sns-card {
    width: 100%; box-sizing: border-box;
    gap: 5px; padding: 8px 6px;
    border-radius: 6px; font-size: 10.5px;
    text-align: center;
  }
  .contact-col .sns-card span { min-width: 0; overflow-wrap: anywhere; }
  .contact-col .x-icon,
  .contact-col .mail-icon { flex: 0 0 auto; width: 14px; height: 14px; }
}
