/* 艦隊戦のページ(fleet-battle-test.html)の見た目。2026-11-11 にページの <style> から分けた(技術負債 D1 段1。
   newGame-director/2026-11-11_艦隊戦のHTML分割の計画.md)。中身・順番は前と同じ。公開用のまとめ(tools/build-site.mjs)は
   assets/game-<中身のハッシュ>.css として置き、中の url(/…) の相対のアドレスをサイトの根からのアドレスに直す。 */
/* 画面の文字の書体と大きさ(2026-09-29。ロードマップ2.5 UIの土台。オーナー決定)。
   書体: 英数字=Oxanium(HUD・数値・勝敗表示)、日本語=M PLUS 1(MENU・説明・サマリ)。どちらもSIL OFL(商用利用可)。
   書体ファイルは fonts/(`npm run fonts` で作る。新しい漢字を画面に足したら作り直す)。canvasで描く文字は ui-fonts.js。
   --font-hud: 英数字はOxanium、日本語の字だけM PLUS 1 / --font-text: 日本語が中心の文(英数字もM PLUS 1)
   大きさは次の5段階に揃える(新しい表示もこの中から選ぶ): */
@font-face { font-family: "Oxanium"; src: url("/fonts/oxanium.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "M PLUS 1"; src: url("/fonts/mplus1-subset.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --font-hud: "Oxanium", "M PLUS 1", sans-serif;
  --font-text: "M PLUS 1", sans-serif;
  --fs-hero: 104px; /* LOST!(画面いっぱいの一言) */
  --fs-display: 60px; /* 勝敗(WHITE WIN など) */
  --fs-title: 24px; /* 見出し(サマリの題・操作開始の案内・YOU WIN) */
  --fs-body: 15px; /* 本文・ボタン・上部の試合情報・MENUの項目 */
  --fs-small: 13px; /* 補足(操作の説明・リプレイの案内・見ている機体の情報)。2026-11-18 総点検 K1 で 12px → 13px(字の下限は 13px。レイドの画面の決まりと同じ) */
  --tracking-label: 0.12em; /* 英語の大文字ラベルの字間 */
}
/* overscroll-behavior: 端で引っぱったときの引っぱって更新・横のスワイプでの「戻る」を止める(2026-10-18。タッチで急に前の画面に戻る件) */
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
/* 数字は等幅にする(値が変わっても文字がガタつかない) */
body { font-family: var(--font-hud); font-variant-numeric: tabular-nums; }
/* 画面の文字は、クリックやドラッグで選択されないようにする(2026-11-08 オーナー要望。地図のミッション名が青く反転していた)。
   入力欄だけは、貼り付けや修正ができるよう選択可能に戻す */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable=""], [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
/* 操作説明(左上)。ふだんは隠し、Hキーで出し入れする(2026-09-29。開発用の表示の片付け) */
/* 画面の中央に大きく重ねて出す(2026-10-21 オーナー決定。初めての人の点検のP9。左上だと案内の枠と重なっていた)。
   出している間は、案内の枠(#mission-nav)・操作のヒントを隠す */
#hud {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 30; box-sizing: border-box;
  width: max-content; max-width: min(720px, 92vw); max-height: 86vh; overflow: hidden; color: #9fe; display: none;
  padding: 16px 22px; background: rgba(0, 20, 30, 0.92); border: 1px solid rgba(102, 255, 170, 0.6);
  font-family: var(--font-text); font-size: var(--fs-body); line-height: 1.8; pointer-events: none;
}
body.help-open #hud { display: block; }
body.help-open #mission-nav, body.help-open #control-hint { display: none; }
#hud b { color: #cfe; font-weight: 700; margin-right: 6px; }
/* A.M.R.O.・S.L.O.W.の正式名称と説明(2026-10-15 オーナー要望)。長い文なので幅を決めて折り返す */
#hud .help-ability { max-width: 640px; margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(102, 255, 170, 0.2); line-height: 1.5; }
/* 照準のカーソル(2026-10-10 オーナー要望。textures/reticle.svg「( ・ )」)。外側(#crosshair)は位置(cursorOffset)だけ、
   中の形(.reticle-shape)を画像で抜いて色を付け、状態のクラスで色・大きさ・濃さを変える。大きさ・色はconfig.hud.reticle(CSSの変数) */
#crosshair {
  position: fixed; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none;
  --reticle-size: 34px; --reticle-color: #77ff88; --reticle-target: #ff5a5a; --reticle-glow: 4px; --reticle-fire-scale: 1.18; --reticle-low: 0.35;
  /* 光(2026-11-25 案D の1本目): 前は .reticle-shape に drop-shadow を付けていたが、filter は mask より先にかかるので、抜いた形の外へ
     出る光が消えていた。外側に付けて、暗い縁(明るいビームの上でも輪郭を残す)+ 控えめな光(色を半分ほど透かしてシックに)にする */
  --reticle-halo: color-mix(in srgb, var(--reticle-color) 55%, transparent);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 var(--reticle-glow) var(--reticle-halo));
}
#crosshair.on-target { --reticle-halo: color-mix(in srgb, var(--reticle-target) 55%, transparent); }
#crosshair .reticle-shape {
  position: absolute; left: calc(var(--reticle-size) / -2); top: calc(var(--reticle-size) / -2);
  width: var(--reticle-size); height: var(--reticle-size);
  background-color: var(--reticle-color);
  -webkit-mask: url("/textures/reticle.svg") center / contain no-repeat; mask: url("/textures/reticle.svg") center / contain no-repeat;
  transition: transform 0.08s ease-out, opacity 0.15s;
}
#crosshair.on-target .reticle-shape { background-color: var(--reticle-target); }
#crosshair.firing .reticle-shape { transform: scale(var(--reticle-fire-scale)); }
#crosshair.low-energy .reticle-shape { opacity: var(--reticle-low); }
/* 当たった印(×)。照準の上に一瞬だけ出す */
#crosshair .reticle-hit {
  position: absolute; left: calc(var(--reticle-size) * -0.35); top: calc(var(--reticle-size) * -0.35);
  width: calc(var(--reticle-size) * 0.7); height: calc(var(--reticle-size) * 0.7); display: none;
}
#crosshair .reticle-hit::before, #crosshair .reticle-hit::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; background: #fff;
  box-shadow: 0 0 4px #fff;
}
#crosshair .reticle-hit::before { transform: rotate(45deg); }
#crosshair .reticle-hit::after { transform: rotate(-45deg); }
#crosshair.hit .reticle-hit { display: block; }
/* 偏差の目印(2026-10-11): 照準が敵に重なったときの色の、小さなひし形と点。大きさ・光はconfig.aimAssist.leadMarker */
#lead-marker { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; display: none; --lead-size: 12px; --lead-color: #ff5a5a; --lead-glow: 4px; }
#lead-marker.on { display: block; }
#lead-marker::before {
  content: ""; position: absolute; box-sizing: border-box; left: calc(var(--lead-size) / -2); top: calc(var(--lead-size) / -2);
  width: var(--lead-size); height: var(--lead-size); border: 1.5px solid var(--lead-color); transform: rotate(45deg);
  filter: drop-shadow(0 0 var(--lead-glow) var(--lead-color));
}
#lead-marker::after { content: ""; position: absolute; left: -1.5px; top: -1.5px; width: 3px; height: 3px; border-radius: 50%; background: var(--lead-color); }
body.menu-open #lead-marker, body.replay-mode #lead-marker, body.spectate-mode #lead-marker, body.summary-open #lead-marker, body.map-open #lead-marker { display: none; }
/* 流れの印(2026-10-22 稼働コロニー): 回る座標系の力で流される向きへ、照準の輪のそばに小さな矢印(濃さは流れの速さ。config.liveColony.driftMarker) */
#drift-marker { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; display: none; --drift-color: #8fd3ff; }
#drift-marker.on { display: block; }
#drift-marker::before { content: ""; position: absolute; left: -2px; top: -7px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 12px solid var(--drift-color); filter: drop-shadow(0 0 3px var(--drift-color)); }
body.menu-open #drift-marker, body.replay-mode #drift-marker, body.spectate-mode #drift-marker, body.summary-open #drift-marker, body.map-open #drift-marker { display: none; }
#aim-boundary {
  position: fixed; top: 50%; left: 50%; border-radius: 50%;
  border: 1px dashed rgba(150,255,180,0.14); pointer-events: none; /* 普段は薄く(P3。2026-10-21 オーナー決定)。チュートリアルで説明する間だけ濃くする(.emphasis) */
  transition: border-color 0.3s;
}
#aim-boundary.emphasis { border: 2px dashed rgba(255,227,107,0.9); }
/* 母艦から出撃している間(READYの間)は照準と円を隠し、GOと同時に少しずつ出す(2026-11-21 オーナー要望。session-readygo.js)。
   隠すときはすぐ、出すときだけ0.25秒かける */
#crosshair, #aim-boundary { transition: opacity 0.25s ease-out, border-color 0.3s; }
#crosshair.launching, #aim-boundary.launching { opacity: 0; transition: none; }
/* サーベルの使いどきの合図(2026-11-04。saber-cue.js): 間合いに敵がいてサーベルが使える間、照準の中心のそばに出す */
#saber-cue { position: fixed; left: 50%; top: 50%; transform: translateX(-50%); display: none; pointer-events: none; white-space: nowrap;
  font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.16em; color: #ffe36b; text-shadow: 0 0 8px rgba(255,227,107,0.8);
  border: 1px solid rgba(255,227,107,0.85); border-radius: 4px; padding: 1px 8px; background: rgba(20,18,4,0.45); animation: saber-cue-pulse 0.9s ease-in-out infinite alternate; }
#saber-cue.on { display: block; }
#saber-cue .cue-key { color: #fff; margin-left: 6px; letter-spacing: 0.06em; }
#saber-cue .cue-hold { color: #ffe36b; }
@keyframes saber-cue-pulse { from { opacity: 0.65; } to { opacity: 1; } }
#touch-ui #touch-slash.saber-cue { border-color: #ffe36b; color: #ffe36b; box-shadow: 0 0 14px 3px rgba(255,227,107,0.7); animation: menu-button-glow 0.8s steps(2, jump-none) infinite; }
body.menu-open #saber-cue, body.replay-mode #saber-cue, body.spectate-mode #saber-cue, body.summary-open #saber-cue, body.map-open #saber-cue, body.highlight-mode #saber-cue { display: none; }
/* 画面の型(2026-10-11 オーナー決定。仕様書「画面の型」): 「見出し / 中身(ここだけ縦にスクロールする)/ 下の帯(ボタン)」の3段。
   高さは画面の見えている高さ(100dvh)で、切り欠き(safe-area-inset)を避ける。中身が短いときは上下の中央に置き、
   長いときは上から並べてスクロールする(中央寄せで上下が切れないよう、margin: autoで寄せる)。
   タッチの端末ではbody全体のtouch-actionがnoneなので、スクロールする中身にはpan-yを付ける。新しい画面は必ずこの型で作る */
.screen {
  position: fixed; inset: 0; height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.screen.hidden { display: none; }
.screen-head { flex: 0 0 auto; padding: 12px 16px 6px; text-align: center; }
.screen-head:empty { display: none; }
.screen-body {
  flex: 1 1 auto; min-height: 0; display: flex; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  touch-action: pan-y; -webkit-overflow-scrolling: touch;
}
.screen-inner { margin: auto; padding: 8px 16px; box-sizing: border-box; width: 100%; }
.screen-bar {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; padding: 10px 16px 12px;
}
#hint {
  background: rgba(0,0,0,0.6); color: #fff; font-family: var(--font-text); font-size: var(--fs-title); cursor: pointer;
  text-align: center;
}
#hint-main { display: flex; flex-direction: column; gap: var(--title-mode-gap); align-items: center; }
/* 最初の画面のモードの枠(TUTORIAL・MISSION・FREE BATTLE・MULTI PLAY)は同じ横幅(2026-10-13 オーナー要望)。狭い画面では画面の幅に収める */
/* 枠どうしの間(FREE BATTLEとMULTI PLAYの間も同じ)。狭い・低い画面では詰める */
#hint { --title-mode-width: min(320px, calc(100vw - 32px)); --title-mode-gap: 14px; }
body.screen-compact #hint { --title-mode-gap: 8px; --title-mode-width: min(75vw, 400px); } /* 小さい画面(スマホ)のメニューの枠は画面の75%(2026-10-20 オーナー要望) */
/* 横持ちのスマホの最初の画面の並びは、下の「最初の画面のモードの入り口(案B)」で決める(2026-11-16) */
#net-status:empty { display: none; } /* 空のときは場所を取らない(FREE BATTLEとMULTI PLAYの間が広がらないように) */
#tutorial-play, .tutorial-item, #tutorial-back, #mission-play, #solo-play, #lobby { width: var(--title-mode-width); box-sizing: border-box; }
/* MULTI PLAYの見出しは、ほかのモードのボタンと同じ文字の大きさ・書体 */
#lobby-title { display: block; font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.12em; color: #eff; }
body.screen-compact #lobby-title { font-size: var(--fs-body); }
/* 小さい画面(2026-10-11): ロゴ・ボタン・間を詰めて、なるべくスクロールしないで収める */
#hint-solo-text:empty, #net-rules:empty { display: none; }
body.screen-compact #title-logo { width: calc(min(320px, 100vw - 32px) * 1.1); margin-bottom: 24px; } /* ロゴの大きさは据え置き(枠の幅とは切り離す)。下は1行分あけてTUTORIALと離す(2026-10-20 オーナー要望) */
body.screen-compact #tutorial-play, body.screen-compact .tutorial-item, body.screen-compact #tutorial-back, body.screen-compact #mission-play, body.screen-compact #solo-play { font-size: var(--fs-body); padding: 8px 28px; }
/* 2人で遊ぶ(合言葉を入力する。フェーズ3) */
#lobby {
  cursor: default; font-size: var(--fs-body); padding: 14px 22px; background: rgba(10,20,18,0.9);
  border: 1px solid rgba(102,255,170,0.8); /* ほかのモードのボタンと同じ枠線 */
}
#lobby input, #lobby button { font: var(--fs-body) var(--font-text); padding: 6px 10px; }
#lobby input { width: min(12em, calc(100% - 5.5em)); box-sizing: border-box; margin: 8px 6px 0 0; }
/* 合言葉の入力欄(2026-10-20 オーナー要望): 一段小さい字で、ほかの枠と同じ雰囲気の透過・白文字 */
#lobby input#lobby-room { font-size: var(--fs-small); background: rgba(10,20,18,0.35); color: #fff; border: 1px solid rgba(102,255,170,0.6); border-radius: 0; caret-color: #fff; }
#lobby input#lobby-room::placeholder { color: rgba(255,255,255,0.45); }
#lobby button { cursor: pointer; background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6); }
/* KEYの意味の一言と招待リンクのボタン(2026-10-21 初めての人の点検 N1・T5)。横向きの低い画面(2列の最初の画面)では、場所がないので説明も招待のボタンも出さない */
#lobby-help { margin-top: 6px; font-size: var(--fs-small); color: rgba(255,255,255,0.6); }
#lobby button#lobby-invite { margin-top: 8px; font-size: var(--fs-small); padding: 4px 10px; }
#lobby button#lobby-invite.hidden { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  #lobby-help { display: none; } /* (MULTI PLAY は自分の画面になったので、形式・人数・招待は横持ちでも出す。2026-11-16) */
}
#lobby-status, #net-status { font-size: var(--fs-small); color: #9fe; min-height: 1.4em; margin-top: 8px; }
#lobby-status.error { font-size: var(--fs-body); font-weight: 700; color: #ff5a5a; padding: 8px 10px; border: 1px solid rgba(255,90,90,0.65); background: rgba(255,90,90,0.1); } /* 失敗の文は赤い枠で(敵・危険の色。2026-11-18 総点検 N3) */
/* 人数の選択(段階C)。押しているものを明るく */
#lobby-seats, #lobby-modes { margin-top: 8px; font-size: var(--fs-small); color: rgba(255,255,255,0.75); display: flex; align-items: center; justify-content: center; gap: 6px; }
#lobby-seats.hidden, #lobby-modes.hidden, #lobby-raids.hidden, #lobby-rules.hidden { display: none; }
/* レイドの一覧(段階E2)。押したものを明るく */
#lobby-raids { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: var(--fs-small); color: rgba(255,255,255,0.75); }
#lobby #lobby-raids button { font-size: var(--fs-small); padding: 2px 12px; }
#lobby #lobby-raids button.on { background: rgba(102,255,170,0.45); color: #fff; }
#lobby #lobby-seats button, #lobby #lobby-modes button { font-size: var(--fs-small); padding: 2px 12px; }
#lobby #lobby-seats button.on, #lobby #lobby-modes button.on { background: rgba(102,255,170,0.45); color: #fff; }
#lobby #lobby-modes button.hidden { display: none; }
/* マルチのハンデ(2026-11-15。handicap-ui.js): 「ハンデ 白軍 SHIELD [−] 150% [+] 赤軍 SHIELD …」。待合・席の部屋・結果の画面で同じ形 */
.handicap { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; font-size: var(--fs-small); color: rgba(255,255,255,0.75); }
.handicap.hidden { display: none; }
.handicap .hc-head { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.08em; color: #9fe; }
.handicap .hc-row { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.handicap .hc-team.white { color: #aad4ff; }
.handicap .hc-team.red { color: #ff8a8a; }
.handicap .hc-value { min-width: 3.2em; text-align: center; font: 700 var(--fs-small) var(--font-hud); color: #dfffee; }
.handicap .hc-value.up { color: #ffe08a; }
.handicap button.hc-step { font: 700 var(--fs-small) var(--font-hud); min-width: 2.4em; padding: 2px 10px; cursor: pointer; background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6); }
.handicap button.hc-step:disabled { opacity: 0.35; cursor: default; }
#summary-handicap { flex: 0 0 100%; margin-top: 0; }
/* 部屋のルール(2026-11-15): 「次の試合のルール: 標準」と、START を押す人だけの RULES */
.room-rules { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; font-size: var(--fs-small); color: rgba(255,255,255,0.75); }
.room-rules.hidden, .room-rules .hidden { display: none; }
.room-rules .rr-name.changed { color: #ffe08a; }
.room-rules button.rr-change { font: 700 var(--fs-small) var(--font-hud); padding: 2px 12px; cursor: pointer; background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6); }
#summary-rules { flex: 0 0 100%; margin-top: 0; }
/* MULTI PLAY の枠の中は小さく(枠がスクロールなしで収まるように): 見出しを1行目、両軍を2行目に並べる */
#lobby .handicap { margin-top: 6px; gap: 2px 10px; }
#lobby .handicap .hc-row { gap: 4px; }
#lobby .handicap .hc-value { min-width: 2.8em; }
#lobby .handicap .hc-head { flex: 0 0 100%; }
#lobby .handicap button.hc-step { font-size: var(--fs-small); min-width: 2em; padding: 0 8px; line-height: 1.5; }
/* 3席以上の部屋の待合(段階C): 席の一覧と START */
#seat-room { cursor: default; margin: 10px auto 0; padding: 12px 18px; width: min(360px, 100%); box-sizing: border-box; background: rgba(10,20,18,0.9); border: 1px solid rgba(102,255,170,0.8); font: var(--fs-body) var(--font-text); color: #cfe; }
#seat-room.hidden { display: none; }
#seat-room-title { font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.1em; color: #eff; margin-bottom: 8px; }
.seat-row { display: grid; grid-template-columns: 3em 7em 1fr; align-items: center; gap: 8px; padding: 3px 0; text-align: left; }
.seat-row .seat-no { font: 700 var(--fs-small) var(--font-hud); color: #9fe; }
.seat-row .seat-team { font: var(--fs-small) var(--font-text); padding: 2px 8px; background: transparent; border: 1px solid currentColor; cursor: pointer; }
.seat-row .seat-team:disabled { cursor: default; border-color: transparent; }
.seat-row .seat-team.white { color: #aad4ff; }
.seat-row .seat-team.red { color: #ff8a8a; }
.seat-row .seat-who { font-size: var(--fs-small); color: rgba(255,255,255,0.6); }
.seat-row .seat-who.here { color: #dfffee; }
#seat-room-note { margin-top: 8px; font-size: var(--fs-small); color: #cfe; }
/* P1 の人を待っている間(2026-11-14 オーナー要望「暗すぎて見えない」): 結果の画面の待ち表示(#summary-help.waiting)と同じ点滅と「●」 */
#seat-room-ship { margin-top: 6px; font-size: var(--fs-small); color: #cfe; opacity: 0.85; } /* 自分の出る機体(C5) */
#seat-room-ship.hidden { display: none; }
#seat-room-note.waiting { animation: summary-wait-pulse 1.6s ease-in-out infinite; }
#seat-room-note.waiting::before { content: "● "; color: #66ffaa; }
@media (prefers-reduced-motion: reduce) { #seat-room-note.waiting { animation: none; } }
#seat-room-buttons { margin-top: 10px; display: flex; gap: 10px; justify-content: center; }
#seat-room-buttons button { font: var(--fs-small) var(--font-text); padding: 6px 14px; cursor: pointer; background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6); }
#seat-room-buttons button#seat-room-start { font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.12em; padding: 6px 28px; background: rgba(102,255,170,0.35); color: #fff; }
#seat-room-buttons button.hidden { display: none; }
/* 席の待合の「部屋を抜ける」(2026-11-15 マルチの導線の点検 B4)。START・招待より控えめに、下に1つ */
#seat-room button#seat-room-leave { display: block; margin: 12px auto 0; font: var(--fs-small) var(--font-text); padding: 6px 18px; cursor: pointer; background: transparent; color: #cfe; border: 1px solid rgba(207,238,238,0.45); }
/* 席の待合の間は、試合の上の帯(ラウンド・時間・射出中…)・目標の文・最初の画面の下の帯を出さない(B8 スマホで折り返して重なっていた・B4 押せてしまっていた) */
body.seat-waiting #round-info, body.seat-waiting #round-goal, body.seat-waiting #goal-popup, body.seat-waiting #goal-gauge, body.seat-waiting #title-bar { display: none !important; }
/* 2人の待合で待っている間も、最初の画面の下の帯を出さない(待っている文と「待つのをやめる」が隠れないように。B4) */
body.lobby-waiting #title-bar { display: none !important; }
/* 相手を待つ間に1人で遊ぶ(2026-10-29 オーナー要望): 待合で相手を待っている間だけ出すボタン */
#lobby button#lobby-play-wait { margin-top: 8px; font-size: var(--fs-small); padding: 4px 10px; }
#lobby button#lobby-play-wait.hidden { display: none; }
#lobby button#lobby-cancel { margin-top: 8px; font-size: var(--fs-small); padding: 4px 10px; }
#lobby button#lobby-cancel.hidden { display: none; }
/* 相手を待ちながら1人用の試合をしている間の帯(画面の上の中央)。相手が来たら「対戦へ」のボタンを出す */
#wait-banner { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 35; display: flex; gap: 10px; align-items: center;
  padding: 6px 14px; font-size: var(--fs-small); color: #dfffee; background: rgba(0,20,12,0.78); border: 1px solid rgba(102,255,170,0.6); max-width: calc(100vw - 32px); box-sizing: border-box; }
#wait-banner.hidden { display: none; }
/* 開き直して始めた直後の小さな案内「クリックかキーで照準モード」(?autostart。2026-11-03)。押す邪魔はしない。MENU・結果の画面・リプレイの上には出さない */
#lock-note { position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 35; pointer-events: none; padding: 4px 14px;
  font-size: var(--fs-small); color: #dfffee; background: rgba(0,20,12,0.6); border: 1px solid rgba(102,255,170,0.45); white-space: nowrap; max-width: calc(100vw - 32px); }
/* 通信の遅れ(2026-11-19。net-lag.js): サーバー権威の試合で、操作・状態が遅れて届いている間だけ、照準の上に小さく出す */
#net-lag { position: fixed; left: 50%; top: 120px; transform: translateX(-50%); z-index: 35; pointer-events: none; padding: 3px 12px;
  font-size: 13px; color: #ffd0c8; background: rgba(40,0,0,0.55); border: 1px solid rgba(255,120,100,0.6); white-space: nowrap; }
#net-lag.hidden, body.menu-open #net-lag, body.summary-open #net-lag, body.replay-mode #net-lag { display: none; }
#lock-note.hidden, body.menu-open #lock-note, body.summary-open #lock-note, body.replay-mode #lock-note { display: none; }
#wait-banner.arrived { border-color: rgba(255,230,120,0.9); box-shadow: 0 0 14px rgba(255,230,120,0.5); }
#wait-banner button { font: var(--fs-small) var(--font-text); padding: 4px 12px; cursor: pointer; background: rgba(102,255,170,0.2); color: #cfe; border: 1px solid rgba(102,255,170,0.7); white-space: nowrap; }
#wait-banner button.hidden { display: none; }
body.summary-open #wait-banner, body.replay-mode #wait-banner { display: none; } /* 結果の画面・リプレイの上には出さない(結果の画面の「もう一度」で読み直すと待ちは続く) */
/* 狭い画面(スマホの縦持ち): 上の中央はHUDの時計と目標の文があるので、左の空いているところに縦に並べる */
@media (max-width: 600px) { #wait-banner { left: 10px; top: 110px; transform: none; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 56vw; padding: 6px 10px; } }
#lobby.hidden, #hint-solo.hidden, #net-back.hidden, #net-retry.hidden, #solo-play.hidden, #lang-switch.hidden { display: none; }
/* 1人で遊ぶ(途中参加を受け付けない。2026-10-02) */
#solo-play {
  display: block; margin: 0 auto; font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.12em; padding: 10px 36px; cursor: pointer;
  background: rgba(102,255,170,0.15); color: #eff; border: 1px solid rgba(102,255,170,0.8);
}
#solo-play:hover { background: rgba(102,255,170,0.3); }
#mission-play {
  display: block; margin: 0 auto var(--title-mode-gap); font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.12em; padding: 10px 36px; cursor: pointer;
  background: rgba(102,255,170,0.15); color: #eff; border: 1px solid rgba(102,255,170,0.8);
}
#mission-play:hover { background: rgba(102,255,170,0.3); }
/* 初めての起動(A14): START だけを出す。ほかのモードの入り口は、スキップか BASIC の後に出す */
#first-start {
  display: none; margin: 0 auto var(--title-mode-gap); font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.2em; padding: 14px 64px; cursor: pointer;
  background: rgba(102,255,170,0.15); color: #eff; border: 1px solid rgba(102,255,170,0.8); animation: tutorial-glow 2.4s ease-in-out infinite;
}
#first-start:hover { background: rgba(102,255,170,0.3); }
body.first-run #first-start { display: block; }
body.first-run #tutorial-play, body.first-run #tutorial-menu, body.first-run #tutorial-back, body.first-run #mission-play, body.first-run #solo-play, body.first-run #lobby, body.first-run #title-archived { display: none !important; }
#tutorial-play, .tutorial-item, #tutorial-back {
  display: block; margin: 0 auto var(--title-mode-gap); font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.12em; padding: 10px 36px; cursor: pointer;
  background: rgba(102,255,170,0.15); color: #eff; border: 1px solid rgba(102,255,170,0.8);
}
#tutorial-play:hover, .tutorial-item:hover, #tutorial-back:hover { background: rgba(102,255,170,0.3); }
/* TUTORIALを押すと画面が切り替わり、BASICとTECHNIQUE 1〜5を縦に並べる。名前を押すとそのまま始まる(2026-10-20 オーナー決定)。
   TECHNIQUEはBASICを終えるまで出さない(2026-10-21 オーナー決定。初めての人の点検のU1。前は鍵付きで並べていた) */
#tutorial-menu { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--title-mode-gap); margin-bottom: var(--title-mode-gap); }
#tutorial-menu .tutorial-item { margin: 0; flex: 0 0 auto; } /* 画面が低いとき、BASICがつぶれないように(縮めない) */
body:not(.screen-compact) #tutorial-menu .tutorial-item:not(.basic) { padding-top: 6px; padding-bottom: 6px; } /* 最下段に遊覧飛行を足して8段になったので、PCの1280×800でBACKまで収まるよう上下を少し詰める(2026-11-21) */
.tutorial-item.hidden { display: none; }
/* BASICを終えて初めて一覧を開いたとき: TECHNIQUEが上から順に光って現れ、「TECHNIQUE 解放」の帯を一度だけ重ねる(U1) */
#tutorial-menu .tutorial-item.reveal { animation: technique-reveal 0.7s ease-out both; } /* .fresh の光り方より先に(終わったら外す) */
@keyframes technique-reveal {
  0% { opacity: 0; transform: translateY(-10px); box-shadow: 0 0 0 rgba(102,255,170,0); }
  60% { opacity: 1; transform: none; box-shadow: 0 0 26px rgba(102,255,170,0.9); background: rgba(102,255,170,0.45); }
  100% { opacity: 1; transform: none; box-shadow: 0 0 0 rgba(102,255,170,0); }
}
#technique-banner { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; pointer-events: none; text-align: center; padding: 18px 16px;
  background: linear-gradient(90deg, rgba(0,20,12,0) 0%, rgba(0,20,12,0.88) 18%, rgba(0,20,12,0.88) 82%, rgba(0,20,12,0) 100%);
  border-top: 1px solid rgba(102,255,170,0.7); border-bottom: 1px solid rgba(102,255,170,0.7);
  font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.2em; color: #dfffee; text-shadow: 0 0 14px rgba(102,255,170,0.9);
  animation: technique-banner var(--banner-seconds, 2.6s) ease-in-out both; }
#technique-banner.hidden { display: none; }
@keyframes technique-banner { 0% { opacity: 0; letter-spacing: 0.6em; } 15%, 75% { opacity: 1; letter-spacing: 0.2em; } 100% { opacity: 0; } }
/* 名前(BASIC・TECHNIQUE 1)と、その下の「-○○を試す-」。BASICはほかより大きく(2026-10-20 オーナー要望) */
.tutorial-item .ti-head, .tutorial-item .ti-sub { display: block; }
.tutorial-item { position: relative; }
.tutorial-item .ti-star { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 700 1.3em var(--font-hud); color: #ffe36b; text-shadow: 0 0 8px rgba(255,227,107,0.8); } /* クリア済みの☆ */
.tutorial-item .ti-sub { font: 600 var(--fs-small) var(--font-text); letter-spacing: 0.04em; color: #bfe; margin-top: 4px; }
#tutorial-menu .tutorial-item.basic { padding-top: 18px; padding-bottom: 18px; }
.tutorial-item.basic .ti-head { font-size: 1.3em; }
/* チュートリアルで強調する上の行の表示(S.L.O.W.の回復までの時間) */
/* 上の1行のS.L.O.W.の輪(2026-10-21): 発動可=黄色に光る輪、待ち=薄い輪の中に秒数、発動中=青い輪の中に秒数 */
.slow-ring {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; box-sizing: border-box;
  width: 1.6em; height: 1.6em; margin: -0.2em 0.3em 0; border-radius: 50%; border: 2px solid rgba(255,213,74,0.45);
  font-size: 1em; line-height: 1;
}
.slow-ring .slow-sec { font-size: 13px; font-weight: 700; color: #ffe9a0; font-variant-numeric: tabular-nums; }
.slow-ring.ready { border-color: #ffd54a; box-shadow: 0 0 8px rgba(255,213,74,0.75), inset 0 0 5px rgba(255,213,74,0.5); }
.slow-ring.active { border-color: #7fe0ff; box-shadow: 0 0 8px rgba(127,224,255,0.7); }
.slow-ring.active .slow-sec { color: #c8f4ff; }
.slow-ring.emphasis { outline: 2px solid rgba(255,227,107,0.85); outline-offset: 3px; background: rgba(255,227,107,0.18); }
#tutorial-menu.hidden, #tutorial-back.hidden { display: none; }
#tutorial-play.fresh, #mission-play.fresh, .tutorial-item.fresh { animation: tutorial-glow 2.4s ease-in-out infinite; } /* まだ終えていない人へ(文字は増やさない)。BASICを終えたら、まだ1つもクリアしていない人にはMISSIONを光らせる(2026-10-21 オーナー決定) */
@keyframes tutorial-glow { 0%, 100% { box-shadow: 0 0 0 rgba(102,255,170,0); } 50% { box-shadow: 0 0 14px rgba(102,255,170,0.55); } }
#mission-play.hidden, #tutorial-play.hidden, #mission-info.hidden, #mission-back.hidden { display: none; }
#mission-info { cursor: default; margin-bottom: 14px; }
#mission-title { font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.08em; }
#mission-desc { font-size: var(--fs-small); color: #9fe; max-width: 32em; margin: 6px auto 0; }
#mission-back {
  display: block; margin: 6px auto 0; font: var(--fs-small) var(--font-hud); padding: 3px 14px; cursor: pointer;
  background: rgba(102,255,170,0.1); color: #cfe; border: 1px solid rgba(102,255,170,0.4);
}
/* タイトル(2026-10-20 オーナー要望: 文字をAPNG(textures/title-logo.png)に。画面が出るたびに1回だけ動き、止まる)。
   元の絵は1280x720で余白が広いので、文字の範囲(x276〜1004・y180〜470)だけを窓から見せる */
/* お知らせウィンドウ(2026-10-21)。本文は改行を保つ。長ければ枠の中でスクロール */
/* 起動画面のデモ(2026-10-24。title-demo.js): 流している間も最初の画面(#hint。メニュー・下の帯)はそのまま出し、試合の表示(HUDなど)だけを隠す。
   流し終えた後も隠したまま(試合の途中の表示が残っているため。このページではもう試合をしない)。最初の画面から開くもの(MENUの設定・ルール、
   全体マップ、HOW TO PLAY、お知らせ、省電力の案内)は出す。背景は #hint の半透明の黒で暗くなり、流している間は少し薄くする */
body.title-demo-ran > *:not(canvas):not(#hint):not(#game-menu):not(#briefing-map):not(#howto):not(#notice):not(#team-wizard):not(#power-overlay):not(#fps-counter):not(#screen-loading):not(#title-reel) { opacity: 0 !important; pointer-events: none !important; } /* (visibility だと、子が visible にしている印が残る) */
body.title-demo-ran > #target-overlay { opacity: 0 !important; } /* 機体の印を描く2つ目のcanvas(上の :not(canvas) から外れるため) */
body.title-demo #hint { background: rgba(0,0,0,0.35); }
/* 宣伝用のムービー(2026-11-20。config.titleDemo.sequence の "reel"。session-title-demo.js): /demo-reel の枠を画面いっぱいに重ねる(メニューも隠す)。触ると終わる */
#title-reel { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1000; background: #000; animation: title-reel-in 0.8s ease-out; }
@keyframes title-reel-in { from { opacity: 0; } to { opacity: 1; } }
/* ミッションの前のイベントのムービー(2026-11-21。mission-cutscene.js): 画面いっぱいに重ね、下の画面(BRIEFINGはまだ開かない)を隠す */
#mission-cutscene { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1000; background: #000; animation: title-reel-in 0.6s ease-out; }
/* HOW TO PLAY(2026-10-28 オーナー決定。仕様書「HOW TO PLAY」): 攻略のページ(how-to-play.html?embed=1)を枠(iframe)に入れて、画面いっぱいに重ねる。
   最初の画面の HOW TO PLAY と、MENU の HOW TO PLAY から開く。閉じるのは右上の✕・Esc・パッドのB。中身はページ1つ(別ページとしても公開する) */
#howto { position: fixed; inset: 0; z-index: 61; display: flex; flex-direction: column; background: #05080c; }
#howto.hidden { display: none; }
#howto-bar { display: flex; align-items: center; justify-content: space-between; flex: none; height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid rgba(102,255,170,0.35); font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.3em; color: #9fe; padding-top: env(safe-area-inset-top); box-sizing: content-box; }
#howto-close { font: var(--fs-small) var(--font-hud); letter-spacing: 0.08em; padding: 6px 14px; cursor: pointer; background: rgba(102,255,170,0.1); color: #cfe; border: 1px solid rgba(102,255,170,0.4); }
#howto-frame { flex: 1 1 auto; width: 100%; border: 0; background: #05080c; }
/* ホーム画面に追加の案内(2026-11-01。install-guide.js)。画面いっぱいに大きく重ねる */
#install-guide { position: fixed; inset: 0; z-index: 62; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.78); font-family: var(--font-text); color: #eff; }
#install-guide.hidden { display: none; }
#install-guide-box { width: min(560px, 100%); max-height: 100%; overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; padding: 24px 24px 20px; background: rgba(8,14,20,0.97); border: 1px solid rgba(102,255,170,0.45); }
#install-guide-title { font-family: var(--font-hud); font-size: var(--fs-title); letter-spacing: var(--tracking-label); color: #9fe; }
#install-guide-body .ig-lead { margin: 0; font-size: var(--fs-body); line-height: 1.7; }
.ig-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ig-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(102,255,170,0.07); border: 1px solid rgba(102,255,170,0.3); }
.ig-no { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font: 700 var(--fs-small) var(--font-hud); color: #05070d; background: #9fe; border-radius: 50%; }
.ig-icon { flex: none; width: 32px; height: 32px; color: #9fe; }
.ig-icon svg { width: 100%; height: 100%; display: block; }
.ig-text { font-size: var(--fs-body); line-height: 1.5; }
#install-guide-body .ig-note { margin: 16px 0 0; font-size: var(--fs-small); line-height: 1.6; color: #fd9; }
#install-guide-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
#install-guide-actions button { padding: 12px 28px; font: var(--fs-body) var(--font-text); cursor: pointer; }
#install-guide-go.hidden { display: none; }
#notice { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.6); font-family: var(--font-text); color: #eff; }
#notice.hidden { display: none; }
#notice-box { width: min(480px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; background: rgba(8,14,20,0.96); border: 1px solid rgba(102,255,170,0.45); }
#notice-title { font-family: var(--font-hud); font-size: var(--fs-title); letter-spacing: var(--tracking-label); color: #9fe; }
#notice-title.hidden { display: none; }
#notice-body .operator-face { --face: calc(var(--fs-body) * 1.7 * var(--face-lines, 3)); float: left; margin: 3px 14px 6px 0; } /* ミラの顔(2026-10-25 オーナー要望。最初の画面のお知らせだけ。文字3行分) */
#notice-body { font-size: var(--fs-body); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; }
#notice-close { align-self: center; padding: 8px 28px; font: var(--fs-body) var(--font-text); cursor: pointer; }
/* 閉じるだけのボタン(招待の窓の「あとで」。スマホには Esc がないので) */
#notice-cancel { align-self: center; margin-top: -6px; padding: 6px 22px; font: var(--fs-small) var(--font-text); cursor: pointer; background: transparent; color: #cfe; border: 1px solid rgba(207,238,238,0.4); }
#notice-cancel.hidden { display: none; }
/* 初めて起動したときの自軍の色の選択(2026-10-28 オーナー要望。team-wizard.js): お知らせと同じ重ね方。ミラの笑顔と問い、白と赤のポッド(回して見せる)、小さな注記 */
#team-wizard { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.6); font-family: var(--font-text); color: #eff; }
#team-wizard.hidden { display: none; }
#team-wizard-box { width: min(560px, 100%); max-height: 100%; overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px 22px; background: rgba(8,14,20,0.96); border: 1px solid rgba(102,255,170,0.45); }
.team-wizard-talk { align-self: stretch; display: flex; align-items: center; gap: 14px; }
.team-wizard-talk .operator-face { --face: 88px; }
#team-wizard-question { font-size: calc(var(--fs-body) * 1.3); font-weight: 700; line-height: 1.6; word-break: keep-all; } /* (日本語も語の途中で折り返さない。狭いときは丸の後ろで折り返す) */
.team-wizard-dot { display: inline-block; width: 0.95em; height: 0.95em; margin: 0 0.25em; border-radius: 50%; vertical-align: -0.12em; }
.team-wizard-dot.white { background: #f2f6fa; box-shadow: 0 0 6px rgba(220,235,255,0.7); }
.team-wizard-dot.red { background: #e0393a; box-shadow: 0 0 6px rgba(255,90,80,0.7); }
.team-wizard-choices { display: flex; justify-content: center; gap: 18px; }
.team-wizard-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 8px 10px; cursor: pointer; color: #dff6ff; background: rgba(10,30,50,0.55); border: 2px solid rgba(110,200,255,0.2); border-radius: 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, opacity 0.2s, transform 0.2s; }
.team-wizard-pod.white.active, .team-wizard-pod.white.pad-focus { border-color: #cfe6ff; box-shadow: 0 0 14px rgba(200,225,255,0.55); }
.team-wizard-pod.red.active, .team-wizard-pod.red.pad-focus { border-color: #ff8a80; box-shadow: 0 0 14px rgba(255,110,100,0.55); }
.team-wizard-label { font: 700 var(--fs-body) var(--font-hud); letter-spacing: var(--tracking-label); }
.team-wizard-pod.white .team-wizard-label { color: #eef5ff; }
.team-wizard-pod.red .team-wizard-label { color: #ff9a90; }
#team-wizard.decided .team-wizard-pod:not(.chosen) { opacity: 0.3; }
.team-wizard-pod.chosen { transform: scale(1.06); }
#team-wizard-note { font-size: var(--fs-small); color: rgba(220,240,255,0.65); }
#team-wizard.thanks #team-wizard-box { cursor: pointer; } /* 選んだあとのミラのひと言: 窓のどこを押しても戻る */
#team-wizard-thanks { font-size: calc(var(--fs-body) * 1.2); font-weight: 700; line-height: 1.7; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
/* 初めての流れの「操作を選ぶ」(2026-11-27 オーナー決定。control-choice.js): 色の質問と同じ窓。大きな2つのボタン(簡単操作 / こだわり操作)を縦に並べ、
   今の端末に合う方(.suggested)を金で光らせる */
#control-choice-question { font-size: calc(var(--fs-body) * 1.3); font-weight: 700; line-height: 1.6; white-space: pre-line; word-break: keep-all; }
.control-choices { align-self: stretch; display: flex; flex-direction: column; gap: 12px; }
.control-choice { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 16px; cursor: pointer; color: #dff6ff; background: rgba(10,30,50,0.55); border: 2px solid rgba(110,200,255,0.25); border-radius: 12px; outline: none; font-family: var(--font-text); transition: border-color 0.15s, box-shadow 0.15s, opacity 0.2s, transform 0.2s; }
.control-choice-name { font-size: calc(var(--fs-body) * 1.35); font-weight: 700; letter-spacing: 0.06em; }
.control-choice-note { font-size: var(--fs-small); color: rgba(220,240,255,0.75); }
.control-choice.suggested { border-color: rgba(255,227,107,0.75); box-shadow: 0 0 12px rgba(255,227,107,0.35); }
.control-choice.suggested .control-choice-note { color: #ffe36b; }
.control-choice.active, .control-choice.pad-focus { border-color: #cfe6ff; box-shadow: 0 0 14px rgba(200,225,255,0.55); }
.control-choice.suggested.active, .control-choice.suggested.pad-focus { border-color: #ffe36b; box-shadow: 0 0 16px rgba(255,227,107,0.6); }
#team-wizard.decided .control-choice:not(.chosen) { opacity: 0.3; }
.control-choice.chosen { transform: scale(1.04); }
@media (max-width: 480px) { /* スマホ縦: 問いが1行に収まるように、顔と文字を少し小さく */
  .team-wizard-talk .operator-face { --face: 72px; }
  #team-wizard-question { font-size: calc(var(--fs-body) * 1.15); }
}
#title-logo {
  position: relative; overflow: hidden; width: min(70vw, 560px); aspect-ratio: 728 / 290; margin: 0 auto 18px;
  cursor: default; user-select: none;
}
#title-logo img { position: absolute; width: 175.824%; left: -37.912%; top: -62.069%; max-width: none; pointer-events: none; }
#title-logo.hidden { display: none; }
/* 全クリアの後(エンディングのミッションに勝った後。2026-11-03 案E): ロゴの下に小さく記録の印 */
#title-archived { margin: -8px auto 16px; text-align: center; font: 500 clamp(9px, 1.6vw, 12px) var(--font-hud); letter-spacing: 0.32em; color: rgba(143,243,214,0.75); text-shadow: 0 0 6px rgba(143,243,214,0.45); pointer-events: none; }
#title-archived.hidden, #title-logo.hidden + #title-archived { display: none; } /* ロゴを隠すとき(試合中・TUTORIALの一覧)も隠す */
#net-rules { font-size: var(--fs-small); color: #9fe; margin: 4px 0 8px; cursor: default; }
/* ゲームパッドで選んでいる項目(2026-10-06) */
.pad-focus { outline: 3px solid #ffe066 !important; outline-offset: 2px; }
body.gamepad-mode #touch-ui { display: none !important; }
/* 最初の画面の下の帯(2026-10-11。画面の型): 左に階級の帯とSETTINGS・PROFILE、右に言語の切り替え。
   横長の画面でも、中央の幅を決めた帯の左端・右端に置く(2026-10-06 オーナー要望の並びのまま) */
#title-bar-inner { width: min(680px, 100%); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px; }
#title-bar-left { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
body.game-started #title-bar { display: none; }
/* 下の帯の下の余白は、右下の版の番号(#title-version。高さ約15px)の分だけ空ける(2026-10-29。狭い画面で言語の切り替えと3pxほど重なっていた) */
#title-bar { padding-bottom: 16px; }
#lang-switch { cursor: default; font-size: var(--fs-small); color: #9fe; }
#title-corner { display: flex; flex-wrap: wrap; gap: 8px; cursor: default; }
#title-links { display: flex; gap: 8px; }
/* ページ内の切り替えを試している印(?inpage=1。2026-11-05 オーナー要望。版の番号の上に、少し目立つ色で) */
#inpage-badge { position: absolute; right: calc(6px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); font-family: var(--font-hud); font-size: 10px; letter-spacing: 0.06em; color: rgba(255, 200, 120, 0.85); pointer-events: none; user-select: none; }
#inpage-badge.hidden { display: none; }
#title-version { position: absolute; right: calc(6px + env(safe-area-inset-right)); bottom: calc(2px + env(safe-area-inset-bottom)); font-family: var(--font-hud); font-size: 10px; letter-spacing: 0.04em; color: rgba(200,230,230,0.45); pointer-events: none; user-select: none; }
#title-corner button, #title-youtube, #title-x, #title-discord {
  font: var(--fs-small) var(--font-hud); letter-spacing: 0.08em; padding: 3px 12px; cursor: pointer;
  background: rgba(102,255,170,0.1); color: #cfe; border: 1px solid rgba(102,255,170,0.4);
}
#title-youtube, #title-x, #title-discord { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; padding: 4px 9px; } /* 2026-11-02: 文字ではなくアイコン */
#title-corner button.hidden, #title-youtube.hidden, #title-x.hidden, #title-discord.hidden { display: none; }
/* スマホ縦の下の帯の整理(2026-11-02 オーナー要望): 階級の帯 → 4つの操作ボタンを1行 → SNSのリンクと言語を1行。ボタンは小さめにして言語の見出しは省く */
@media (max-width: 480px) {
  #title-bar-left { width: 100%; }
  #title-corner { flex-wrap: nowrap; gap: 6px; width: 100%; }
  #title-settings .tc-text, #title-profile .tc-text { display: none; }
  #title-settings .tc-icon, #title-profile .tc-icon { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; }
  #title-settings, #title-profile { flex: 0 0 auto !important; min-width: 44px; padding: 4px 12px !important; }
  #title-corner .tc-icon svg { width: 20px; height: 20px; }
  #title-corner button { flex: 1 1 auto; padding: 4px 4px; font-size: var(--fs-small); letter-spacing: 0.04em; white-space: nowrap; }
  #title-links { gap: 6px; }
  #lang-switch > .lang-label { display: none; }
  #lang-switch button { display: none; }
  #lang-select { display: inline-block !important; font: var(--fs-small) var(--font-text); padding: 4px 6px; color: #cfe; background: rgba(102,255,170,0.1); border: 1px solid rgba(102,255,170,0.4); }
  #lang-select option { background: #0a1a14; color: #cfe; }
  /* 部屋のルール: 見出しは省き、名前を1行にして、RULESを右に */
  #lobby-rules-label { display: none; }
  #lobby-rules-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  /* 機体の一行(C5)の分の高さ: 見出しは省き、何も出ていない待合の状態の行はたたむ(下の帯に隠れないように) */
  #lobby-ship > span:first-child { display: none; }
  #lobby-status:empty { display: none; }
}
/* FPSの表示(設定)は、最初の画面ではロゴに重ならないよう左下の1行にする */
body:not(.game-started) #fps-counter { top: auto !important; right: auto !important; left: calc(env(safe-area-inset-left, 0px) + 6px) !important; bottom: calc(env(safe-area-inset-bottom, 0px) + 1px) !important; padding: 0 4px !important; font-size: 10px !important; white-space: normal !important; background: none !important; }
/* スマホ縦(2026-11-02 オーナー要望): SETTINGSは歯車、PROFILEはスキン(顔)とメダルのアイコン。文字は出さない(名前は aria-label / title)。PCは文字のまま */
#title-corner .tc-icon { display: none; }
#title-corner button { position: relative; }
#title-profile.has-new::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #ff5a7a; box-shadow: 0 0 6px rgba(255,90,122,0.9); } /* 新着の印(profile-seen.js) */
.menu-credit { font-size: var(--fs-small); color: #9fe; text-align: left; line-height: 1.6; margin-top: 6px; opacity: 0.85; }
#lang-switch button {
  font: var(--fs-small) var(--font-text); padding: 3px 10px; cursor: pointer;
  background: rgba(102,255,170,0.1); color: #cfe; border: 1px solid rgba(102,255,170,0.4);
}
#lang-select { display: none; }
#lang-switch button.on { background: rgba(102,255,170,0.35); color: #fff; }
#net-back, #net-retry {
  font: var(--fs-body) var(--font-text); padding: 8px 18px; cursor: pointer;
  background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6);
}
#hint.hidden { display: none; }
/* 試合中のHUD(SHIELD・ENERGY・SPEEDの弧、レーダーの板)の見た目は hud-style.js、部品は hud-widgets.js(2026-10-21 HUDの作り直し) */
#target-overlay { position: fixed; inset: 0; pointer-events: none; }
/* ラウンドの終わり(2026-10-03): 時間切れの3秒前からのカウントダウン(中央上30%の位置)と、スロー中の周りのグレーの影 */
#round-countdown {
  position: fixed; left: 0; right: 0; top: 30%; transform: translateY(-50%); text-align: center; pointer-events: none; z-index: 6;
  font: 700 72px var(--font-hud); color: #fff; text-shadow: 0 0 12px rgba(0,0,0,0.8); display: none;
}
#round-end-shade {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(ellipse at center, rgba(90,90,90,0) 40%, rgba(90,90,90,0.6) 100%);
}
#round-end-shade.on { opacity: 1; }
#speed-lines { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; } /* スピード感の集中線(speed-lines.js) */
/* SLOW中の画面の縁取り(自分が発動=青、相手だけが発動=赤) */
#slow-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity 0.25s;
  box-shadow: inset 0 0 160px 40px rgba(80, 160, 255, 0.45);
}
#slow-overlay.on { opacity: 1; }
#slow-overlay.enemy { box-shadow: inset 0 0 160px 40px rgba(255, 70, 70, 0.4); }
/* 大気圏の上空で低すぎるときの橙色(2026-10-15。gravity-field.jsのburnTint。濃さはページが毎フレーム書く) */
#burn-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; }
/* 低すぎるときの知らせ(2026-10-15。高さと「LOW ALTITUDE」。焼かれている間は「BURNING」) */
#altitude-warning {
  position: fixed; left: 50%; top: 62%; transform: translateX(-50%); z-index: 12; pointer-events: none; text-align: center;
  font: 700 var(--fs-body)/1.3 var(--font-hud); letter-spacing: 0.1em; color: rgb(255, 170, 90); text-shadow: 0 0 12px rgba(255, 110, 30, 0.8);
}
#altitude-warning.burn { color: rgb(255, 110, 60); animation: altitude-blink 0.4s steps(2, start) infinite; }
#altitude-warning.hidden { display: none; }
/* MENUを出さない一時停止(Pキー。1人用)の小さな表示。画面の上の方に出し、照準・HUDには重ねない */
#key-pause {
  position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 12; pointer-events: none; text-align: center;
  font: 700 var(--fs-title)/1.2 var(--font-hud); letter-spacing: 0.3em; color: #e9fff6; text-shadow: 0 0 12px rgba(102, 255, 170, 0.6); user-select: none;
}
#key-pause small { display: block; margin-top: 4px; font: 400 var(--fs-small)/1.3 var(--font-text); letter-spacing: 0.08em; color: #9fe; }
#key-pause.hidden { display: none; }
@keyframes altitude-blink { to { visibility: hidden; } }
#round-info {
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; background: rgba(0,0,0,0.55); border-radius: 3px;
  font: 500 var(--fs-body)/1.4 var(--font-hud); letter-spacing: 0.04em; color: #eff; text-align: center; pointer-events: none;
}
/* タッチ(スマホ)は、[ AUTO PILOT … ] などの状態を時計の下の行に分けて出す(session-launch-hud.js が改行を入れる。2026-11-18 総点検 G6。
   前は1行につないでいて、縦持ちでは2〜3行に折れ「]」だけが次の行に残った)。右上の≡に重ならない幅にする */
body.touch-device.screen-narrow #round-info { white-space: pre-line; max-width: calc(100vw - 128px); width: max-content; }
/* ラウンドの始めの目標の1行(ミッション・チュートリアル以外。2026-10-21 O3) */
#round-goal {
  position: fixed; top: 44px; left: 50%; transform: translateX(-50%); max-width: 92vw;
  padding: 4px 12px; background: rgba(0,0,0,0.55); border-radius: 3px;
  font: 500 var(--fs-body)/1.4 var(--font-hud); color: #ff8080; text-align: center; pointer-events: none;
}
#round-goal.hidden { display: none; }
/* ミッションの目標(2026-11-05 オーナー決定。goal-hud.js): 出撃のあとの大きな表示と、試合中のゲージ(殲滅・防衛) */
#goal-popup {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(640px, 92vw); box-sizing: border-box;
  padding: 22px 26px; background: rgba(0,0,0,0.72); border: 1px solid #6fa; text-align: center; pointer-events: none;
  opacity: 1; transition: opacity 0.6s;
}
#goal-popup.hidden { opacity: 0; }
/* 文字の大きさは、スマホの幅でも赤い題が折り返さないように画面の幅でも抑える(2026-11-06 オーナー要望。英語の長い題「Destroy the enemy flagship」でも1行) */
#goal-popup .goal-heading { font: 700 min(var(--fs-body), 3.6vw) var(--font-hud); letter-spacing: 0.3em; color: #6fa; }
#goal-popup .goal-title { font: 700 min(calc(var(--fs-body) * 1.6), 5vw) var(--font-hud); color: #ff8080; margin: 6px 0; line-height: 1.3; }
#goal-popup .goal-sub { font: 500 min(var(--fs-body), 3.2vw) var(--font-hud); color: #9fe; margin-top: 4px; }
#goal-gauge {
  position: fixed; top: 44px; left: 50%; transform: translateX(-50%); width: min(360px, 88vw); box-sizing: border-box;
  padding: 5px 12px 7px; background: rgba(0,0,0,0.6); border-radius: 3px; pointer-events: none;
  font: 500 var(--fs-body)/1.4 var(--font-hud); color: #eff;
}
#goal-gauge.hidden { display: none; }
#goal-gauge .goal-row { display: flex; justify-content: space-between; gap: 12px; }
#goal-gauge .goal-count { font-weight: 700; font-size: calc(var(--fs-body) * 1.3); color: #ff8080; }
#goal-gauge.blue .goal-count { color: #8cf; }
#goal-gauge .goal-bar { height: 8px; margin-top: 4px; background: #333; }
#goal-gauge .goal-bar i { display: block; height: 100%; width: 0; background: #ff6b6b; box-shadow: 0 0 8px #f66; transition: width 0.3s; }
#goal-gauge.blue .goal-bar i { background: #6cf; box-shadow: 0 0 8px #6cf; }
#goal-gauge.pulse .goal-count { animation: goal-pulse 0.5s; }
@keyframes goal-pulse { 0% { transform: scale(1.5); text-shadow: 0 0 12px currentColor; } 100% { transform: scale(1); } }
body.summary-open #goal-popup, body.map-open #goal-popup, body.highlight-mode #goal-popup, body.replay-mode #goal-popup,
body.summary-open #goal-gauge, body.map-open #goal-gauge, body.highlight-mode #goal-gauge, body.replay-mode #goal-gauge { display: none; }
body.summary-open #round-goal, body.map-open #round-goal, body.highlight-mode #round-goal, body.replay-mode #round-goal { display: none; }
/* サマリ・BRIEFING2(2026-10-11 作り直し。画面の型): 見出し(題・結果)/ 中身(XP・全体レーダー・表・説明・戦績。スクロール)/
   下の帯(リプレイ・戻る と 次へ)。画面を暗くするのは中身の背景で行い、全体レーダーの所だけ丸く抜く(位置は描くたびにJSで
   --hole-x・--hole-y・--hole-r に入れる。前はレーダーの枠の大きな影で暗くしていたが、スクロールする中身では影が切れるため)。
   見出し・下の帯は自分の背景で暗くする */
#summary { z-index: 20; color: #eff; font-family: var(--font-text); }
#summary .screen-head, #summary .screen-bar { background: rgba(0,0,0,0.82); }
#summary .screen-bar { border-top: 1px solid rgba(102,255,170,0.3); }
#summary .screen-body {
  background: radial-gradient(circle at var(--hole-x, -9999px) var(--hole-y, -9999px), transparent var(--hole-r, 0px), rgba(0,0,0,0.82) calc(var(--hole-r, 0px) + 1px));
}
/* 中身の並び: 広い画面は「左: XP・勲章と白軍の戦績 | 中央: レーダー・表・説明 | 右: 赤軍の戦績」(縦に収める)、
   狭い画面は上から XP・勲章 / 中央 / (タブ)/ 戦績 */
#summary-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px 20px; align-items: center; max-width: 1100px; }
#summary-xp { grid-column: 1; grid-row: 1; justify-self: end; align-self: end; max-width: 100%; }
#summary-center { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
#stats-white { grid-column: 1; grid-row: 2; justify-self: end; align-self: start; }
#stats-red { grid-column: 3; grid-row: 1 / 3; justify-self: start; }
#summary-tabs { display: none; }
body.screen-narrow #summary-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.screen-narrow #summary-xp { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
body.screen-narrow #summary-center { grid-column: 1 / -1; grid-row: 2; }
body.screen-narrow #stats-white { grid-column: 1; grid-row: 4; align-self: start; }
body.screen-narrow #stats-red { grid-column: 2; grid-row: 4; align-self: start; }
/* 小さい画面で両軍の戦績があるときは、タブで切り替える(片方だけ出す) */
body.screen-compact.screen-narrow #summary.two-stats #summary-tabs { display: flex; grid-column: 1 / -1; grid-row: 3; justify-content: center; gap: 6px; }
body.screen-compact.screen-narrow #summary.two-stats .stats-panel { grid-column: 1 / -1; justify-self: center; }
body.screen-compact.screen-narrow #summary.two-stats:not(.tab-red) #stats-red,
body.screen-compact.screen-narrow #summary.two-stats.tab-red #stats-white { display: none; }
#summary-tabs button { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.1em; padding: 4px 16px; cursor: pointer; background: transparent; color: #9fe; border: 1px solid rgba(102,255,170,0.45); }
#summary-tabs button.on { background: rgba(102,255,170,0.3); color: #fff; }
.stats-panel {
  width: min(270px, 100%); box-sizing: border-box; padding: 12px 16px;
  background: rgba(0,20,30,0.75); border: 1px solid rgba(102,255,170,0.4); font: var(--fs-small) var(--font-hud); color: #cfe;
}
.stats-panel.hidden { display: none !important; }
.stats-more { margin-top: 6px; width: 100%; padding: 4px 8px; font: 700 var(--fs-small) var(--font-text); cursor: pointer; background: transparent; color: #9fe; border: 1px solid rgba(102,255,170,0.45); }
#stats-detail { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.72); }
#stats-detail.hidden { display: none; }
#stats-detail-card {
  display: flex; flex-direction: column; width: min(340px, 86vw); box-sizing: border-box; padding: 18px 22px; gap: 2px;
  background: rgba(4,16,20,0.96); border: 1px solid rgba(102,255,170,0.6); font: var(--fs-body) var(--font-text); color: #cfe;
}
#stats-detail-card h4 { margin: 0 0 8px; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.15em; }
#stats-detail-card h4.white { color: #aad4ff; }
#stats-detail-card h4.red { color: #ff8a8a; }
/* 自軍の色(2026-10-26。team-look.js): 見た目の白と赤を入れ替えるときは、両軍の見出しの色も入れ替える */
body.team-look-swap #stats-detail-card h4.white { color: #ff8a8a; }
body.team-look-swap #stats-detail-card h4.red { color: #aad4ff; }
#stats-detail-card .row { display: flex; justify-content: space-between; gap: 16px; line-height: 1.8; }
#stats-detail-card .row span:last-child { color: #fff; font-family: var(--font-hud); }
/* リプレイを押したときの2択(2026-10-21 オーナー決定。初めての人の点検のR7・R8): ハイライト(光らせる)と、全戦闘記録 */
#replay-choice { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); }
#replay-choice.hidden { display: none; }
#replay-choice-card {
  display: flex; flex-direction: column; gap: 14px; width: min(520px, 92vw); box-sizing: border-box; padding: 22px 24px;
  background: rgba(4,16,20,0.94); border: 1px solid rgba(102,255,170,0.6); color: #cfe; font: var(--fs-body) var(--font-text);
}
#replay-choice-card h4 { margin: 0; text-align: center; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.15em; color: #9fe; }
.replay-choice-btn {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px; padding: 12px 18px; box-sizing: border-box; text-align: left; cursor: pointer;
  font: 700 var(--fs-title) var(--font-text); color: #cfe; background: rgba(0,0,0,0.4); border: 1px solid rgba(102,255,170,0.45);
}
.replay-choice-btn svg { width: 40px; height: 40px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.replay-choice-btn small { display: block; margin-top: 2px; font: var(--fs-small) var(--font-text); opacity: 0.8; }
.replay-choice-btn:hover, .replay-choice-btn.pad-focus { background: rgba(102,255,170,0.12); }
#stats-detail-close { align-self: center; margin-top: 10px; padding: 6px 30px; font: 700 var(--fs-body) var(--font-hud); cursor: pointer; }
.stats-panel h4 { margin: 0 0 8px; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.15em; }
#stats-white h4 { color: #aad4ff; }
#stats-red h4 { color: #ff8a8a; }
body.team-look-swap #stats-white h4 { color: #ff8a8a; }
body.team-look-swap #stats-red h4 { color: #aad4ff; }
/* MISSIONのパイロット名(2026-10-24): 長い名前でも1行に収め、はみ出す分は…にする */
.stats-panel h4, #stats-detail-card h4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h4.pilot { letter-spacing: 0.06em; }
h4 .pilot-code { opacity: 0.6; font-weight: 600; font-size: max(0.9em, var(--fs-small)); }
.stats-panel .row { display: flex; justify-content: space-between; gap: 12px; line-height: 1.7; }
.stats-panel .stats-more + h4 { margin-top: 14px; } /* 3席以上の部屋: 同じ軍の席を縦に並べる(段階C) */
.stats-panel .row span:last-child { color: #fff; }
body.screen-compact .stats-panel { padding: 8px 12px; }
body.screen-compact .stats-panel .row { line-height: 1.4; }
/* サマリ表示中は、ゲーム中のHUDを隠す(透けて重なり読みにくくなるため) */
body.summary-open #hud,
body.summary-open #target-overlay,
body.summary-open #round-info,
body.summary-open #crosshair,
body.summary-open #aim-boundary,
body.map-open #hud,
body.map-open #target-overlay,
body.map-open #round-info,
body.map-open #crosshair,
body.map-open #aim-boundary,
/* リプレイの間の H は、上の行のリプレイの操作の一覧を開け閉めする(試合の操作の説明は出さない。2026-11-22 引き算の総点検 C1) */
body.replay-mode #hud { display: none; }
#summary h2 { margin: 0; font: 700 var(--fs-title) var(--font-hud); letter-spacing: var(--tracking-label); }
#summary-verdict { font-size: var(--fs-body); color: #ffd76a; margin-top: 4px; }
/* 試合の結果の見出し(2026-10-21 オーナー決定): 自分から見た勝ち(金)・負け(灰) */
#summary-title.result-win { color: #ffd24d; text-shadow: 0 0 10px rgba(255,200,60,0.6); }
#summary-title.result-lose { color: #8a8f98; }
#summary-verdict:empty { display: none; }
body.screen-compact #summary h2 { font-size: var(--fs-body); }
body.screen-compact #summary .screen-head { padding-top: 8px; }
/* 試合の後の +XP の内訳と、昇格(2026-10-10。progression.js) */
#summary-xp { text-align: center; font-family: var(--font-hud); color: #cfe; }
#summary-xp.hidden { display: none; }
#summary-xp .xp-total { font-size: var(--fs-body); color: #9fe; letter-spacing: 0.06em; }
#summary-xp .xp-items { font-size: var(--fs-small); opacity: 0.85; margin-top: 2px; }
/* XP の内訳は「詳しく」の中(2026-11-22 引き算の総点検 C7)。押す所は 44px の高さ(小さい字でも押しやすく) */
#summary-xp .xp-detail > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; cursor: pointer; list-style: none; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.14em; color: #6fa; pointer-events: auto; }
#summary-xp .xp-detail > summary::-webkit-details-marker { display: none; }
#summary-xp .xp-detail > summary::after { content: " \203A"; }
#summary-xp .xp-detail[open] > summary::after { content: " \2039"; }
#summary-xp .xp-detail[open] .xp-items { margin-top: 0; }
/* ミッションの星(2026-10-12) */
#summary-xp .xp-stars { font: 700 var(--fs-title)/1.2 sans-serif; color: #ffd24d; text-shadow: 0 0 6px rgba(255,200,60,0.5); margin-bottom: 4px; }
#summary-xp .star-new { font: 700 var(--fs-small) var(--font-hud); color: #111; background: #ffd24d; border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; }
#summary-xp .time-support { margin-left: 8px; font-size: var(--fs-small); color: #9fffe0; }
#summary-xp .ace-new { background: #e8f4ff; box-shadow: 0 0 6px rgba(200,230,255,0.7); }
/* タイムアタック(2026-10-24): クリアの時間・自己ベスト */
#summary-xp .xp-time { font: var(--fs-body)/1.4 var(--font-hud); color: #cfe; letter-spacing: 0.04em; margin-bottom: 4px; }
#summary-xp .xp-time .time-value { font-weight: 700; font-size: 1.2em; color: #fff; }
#summary-xp .time-new { font: 700 var(--fs-small) var(--font-hud); color: #111; background: #ffd24d; border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; box-shadow: 0 0 8px rgba(255,200,60,0.6); }
#summary-xp .time-best { font-size: var(--fs-small); color: #9bb; margin-left: 8px; }
/* BRIEFING2の星の取り方(2026-10-21): ★と条件の絵を並べる。取った星は金色に光らせ、まだの星は暗く */
.briefing-stars { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin-left: 12px; vertical-align: middle; font-size: var(--fs-small); }
.briefing-stars .star-cond { display: inline-flex; align-items: center; gap: 3px; color: rgba(255,210,77,0.4); cursor: default; }
.briefing-stars .star-cond.got { color: #ffd24d; text-shadow: 0 0 6px rgba(255,200,60,0.6); }
.briefing-stars .star-mark { font: 700 calc(var(--fs-small) * 1.15) sans-serif; }
.briefing-stars svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.briefing-stars .star-cond.got svg { filter: drop-shadow(0 0 3px rgba(255,200,60,0.6)); }
.briefing-stars .star-text { font-family: var(--font-hud); letter-spacing: 0.04em; }
/* ACEタイム(★3の上。2026-10-24): 白金色。自己ベスト */
.briefing-stars .star-cond[data-cond="ace"] { color: rgba(220,236,255,0.45); }
.briefing-stars .star-cond[data-cond="ace"].got { color: #eef6ff; text-shadow: 0 0 6px rgba(200,230,255,0.8); }
.briefing-stars .star-cond[data-cond="ace"] .star-mark { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.06em; }
.briefing-stars .star-best { font-family: var(--font-hud); letter-spacing: 0.04em; color: #9fe; cursor: default; }
#summary-xp .xp-band { font-size: var(--fs-small); margin-top: 4px; display: inline-flex; align-items: center; gap: 6px; }
body.screen-compact #rank-up svg { width: 48px; height: 48px; }
#rank-up { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: rank-up-pop 1.2s ease-out 1; }
#rank-up .rank-up-title { font: 600 var(--fs-body) var(--font-hud); color: #ffd27a; letter-spacing: 0.2em; }
#rank-up .rank-up-name { font-size: var(--fs-body); color: #fff; }
@keyframes rank-up-pop { 0% { transform: scale(2.2); opacity: 0; } 40% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
/* 最初の画面の左下の階級の帯(記章と「Lv.9 少尉 次のレベルまで 1,250XP」)とPROFILE(2026-10-10) */
#title-rank { display: flex; align-items: center; gap: 6px; cursor: default;
  font: var(--fs-small) var(--font-hud); color: #cfe; padding: 2px 10px 2px 4px; background: rgba(0,0,0,0.35); border-left: 2px solid rgba(102,255,170,0.5); }
#title-rank.hidden { display: none; }
/* 次のLv.までの進み具合の細い棒(階級の帯。2026-10-21 E2) */
.xp-bar { display: inline-block; width: 64px; height: 6px; margin-left: 4px; background: rgba(102,255,170,0.15); border: 1px solid rgba(102,255,170,0.45); vertical-align: middle; }
.xp-bar i { display: block; height: 100%; background: #6fa; box-shadow: 0 0 4px rgba(102,255,170,0.6); }
.profile-block { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 10px; font-family: var(--font-hud); color: #cfe; }
.profile-block .profile-lv { font-size: var(--fs-body); color: #fff; letter-spacing: 0.06em; }
.profile-block .profile-xp { font-size: var(--fs-small); opacity: 0.85; }
.profile-stats { display: grid; grid-template-columns: auto auto; gap: 2px 16px; font-size: var(--fs-small); margin-top: 6px; }
.profile-stats span:nth-child(2n) { text-align: right; color: #fff; }
/* 勲章(2026-10-10。medals.js): PROFILEの一覧と、試合の後のサマリの知らせ。段階の色は銅・銀・金 */
.profile-medals-title { margin-top: 10px; font-size: var(--fs-small); letter-spacing: 0.1em; color: #9fe; }
/* 勲章の一覧は、MENUの一覧(#game-menu-items)のスクロールだけで見る(2026-10-11: 中でさらにスクロールする二重のスクロールをやめた) */
.profile-face, .profile-team, .profile-ship { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin-top: 4px; }
.profile-face-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.profile-face-chip, .profile-team-chip { min-width: 64px; min-height: 30px; padding: 4px 10px; cursor: pointer; font: 600 var(--fs-small) var(--font-hud); color: #dff6ff; background: rgba(10,30,50,0.7); border: 1px solid rgba(110,200,255,0.6); border-radius: 15px; }
.profile-face-chip.selected, .profile-team-chip.selected { color: #fff; background: rgba(120,30,90,0.85); border-color: #ff8fd8; }
.profile-face-chip:disabled { cursor: default; opacity: 0.45; }
.profile-team-chip.selected.white { background: rgba(60,90,130,0.9); border-color: #cfe6ff; } /* 自軍の色(team-look.js) */
.profile-team-chip.selected.red { background: rgba(140,30,30,0.9); border-color: #ff8a80; }
/* PROFILEの機体のボタン(2026-11-10): 押しやすい大きさ(オーナーの好み: 大きく、文字を小さくしすぎない) */
.profile-ship-btn { min-height: 44px; padding: 8px 18px; cursor: pointer; font: 700 var(--fs-body) var(--font-text); color: #e8fff4; background: rgba(10,40,30,0.75); border: 1px solid #66ffaa; border-radius: 6px; white-space: pre; }
.profile-face .profile-xp, .profile-team .profile-xp, .profile-ship .profile-xp { text-align: center; max-width: 340px; }
.profile-medals { display: flex; flex-direction: column; gap: 2px; width: 100%; font-size: var(--fs-small); }
.medal-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.medal-pips { display: inline-flex; gap: 3px; }
.medal-pip { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(200,255,230,0.35); }
.medal-pip.tier-1, .medal-chip.tier-1 { background: #c58a4d; border-color: #c58a4d; }
.medal-pip.tier-2, .medal-chip.tier-2 { background: #c9d3dc; border-color: #c9d3dc; }
.medal-pip.tier-3, .medal-chip.tier-3 { background: #ffd24d; border-color: #ffd24d; }
.medal-next { opacity: 0.75; }
#summary-xp .xp-medals { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 4px; }
.medal-chip { color: #111; font-size: var(--fs-small); font-weight: 700; padding: 2px 8px; border-radius: 3px; }
#summary-table { border-collapse: collapse; font: var(--fs-body)/1.6 var(--font-hud); }
#summary-table th, #summary-table td { padding: 4px 18px; border: 1px solid rgba(255,255,255,0.2); }
#summary-table td { white-space: nowrap; } /* BRIEFING2の -/+ を折り返さない */
body.screen-compact #summary-table th, body.screen-compact #summary-table td { padding: 3px 10px; }
#summary-table .white-team { color: #dfefff; }
#summary-table .red-team { color: #ff8080; }
body.team-look-swap #summary-table .white-team { color: #ff8080; } /* 自軍の色(team-look.js) */
body.team-look-swap #summary-table .red-team { color: #dfefff; }
#summary-table .own-ship-badge { vertical-align: middle; margin: -6px 6px -6px -4px; } /* 自分の軍の印(自機のポッドが回る。own-ship-badge.js) */
/* 戦場全体を見るための大きい3Dレーダー。中身はWebGLで重ねて描くため、枠だけを置く */
/* 3DレーダーはWebGLのcanvas上に描かれるため、この要素自体は透明にして中身を見せ、
   代わりに巨大な影で周囲だけを暗くする(レーダーの部分だけ切り抜いた暗幕にする) */
/* 2026-10-11: 正方形のまま、画面の幅・高さに合わせた大きさ(上限は340px。縮んで潰れないようflex-shrink: 0) */
#field-radar {
  width: min(340px, calc(100vw - 48px), 44dvh); aspect-ratio: 1; height: auto; flex-shrink: 0; box-sizing: border-box; border-radius: 50%;
  border: 1px solid rgba(102,255,170,0.4);
}
/* 出撃前(BRIEFING)は表と R.W.N.D. の行が下に続くので、低い画面ではレーダーを小さくする(高さ 768px の PC で R.W.N.D. の行が下の帯に隠れていた。2026-11-18 総点検 B3) */
@media (max-height: 820px) and (min-width: 700px) { #summary.briefing #field-radar { width: min(340px, calc(100vw - 48px), 36dvh); } }
#summary-button {
  padding: 8px 28px; font: var(--fs-body) var(--font-text); cursor: pointer;
  background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6);
}
/* 機体選択画面(2026-10-29。ship-select.js)。画面の型(見出し / 中身 / 下の帯)。広い画面は左に機体・右に文章、狭い画面は上に機体・下に文章 */
#ship-select { z-index: 40; color: #cfe; font-family: var(--font-text); background: #020c09; }
#ship-select .screen-head { font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.3em; color: #9fe; }
#ship-select .screen-head h2 { margin: 0; font: inherit; }
#ship-select .screen-bar { border-top: 1px solid rgba(102,255,170,0.3); justify-content: space-between; }
/* 格納庫の部屋(2026-11-16 オーナー要望。hangar-room.js): 絵を画面いっぱいに敷き、題・文・札・帯はその上に重ねる */
#ship-select.hangar .ss-stage { position: fixed; inset: 0; z-index: 0; min-height: 0; pointer-events: auto; } /* 絵の上のドラッグ・スワイプ・タップを受ける(親の .screen-body は受けない) */
#ship-select.hangar .ss-canvas { touch-action: none; }
#ship-select.hangar .screen-head { position: relative; z-index: 1; background: linear-gradient(rgba(2,12,9,0.85), rgba(2,12,9,0)); pointer-events: none; }
#ship-select.hangar .screen-bar { position: relative; z-index: 1; background: rgba(2,12,9,0.78); }
#ship-select.hangar .screen-body { overflow: hidden; pointer-events: none; }
#ship-select.hangar .ss-nav { position: fixed; bottom: calc(132px + env(safe-area-inset-bottom)); pointer-events: auto; }
#ship-select.hangar:not([data-station="ship"]) .ss-nav { display: none; }
#ship-select.hangar .ss-info {
  position: fixed; z-index: 1; left: calc(24px + env(safe-area-inset-left)); top: 72px; flex: none; max-width: min(420px, 40vw); /* 左上(下には手前の端末・作業台が見えるので。2026-11-17) */ padding: 14px 18px; box-sizing: border-box;
  background: rgba(2,12,9,0.62); border-left: 3px solid #66ffaa;
}
/* 整備の依頼(塗装・マーキング・乗る機体): PCは右、スマホは下に重ねる。機体は見えるまま */
#ship-select .ss-service {
  position: fixed; z-index: 2; right: calc(24px + env(safe-area-inset-right)); top: 72px; bottom: calc(84px + env(safe-area-inset-bottom)); width: min(400px, 42vw); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(4,16,20,0.9); border: 1px solid rgba(102,255,170,0.6); border-left: 4px solid #66ffaa; color: #eff;
}
#ship-select .ss-service.hidden { display: none; }
#ship-select .ss-service-title { font: 700 calc(var(--fs-body) * 1.15) var(--font-text); color: #e8fff4; }
#ship-select .ss-service-h { font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.14em; color: #8fd; margin-bottom: 8px; }
#ship-select .ss-service-note { margin-top: 6px; font-size: var(--fs-small); color: #9cb; }
#ship-select .ss-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#ship-select .ss-chip {
  min-height: 40px; min-width: 72px; padding: 6px 14px; cursor: pointer; font: 700 var(--fs-body) var(--font-text); color: #dff6ff;
  background: rgba(10,30,50,0.7); border: 1px solid rgba(110,200,255,0.6); border-radius: 20px;
}
#ship-select .ss-chip.on { color: #04170e; background: #66ffaa; border-color: #66ffaa; }
#ship-select .ss-chip:disabled { cursor: default; opacity: 0.4; }
#ship-select .ss-service-close { align-self: stretch; min-height: 44px; margin-top: auto; font: 700 var(--fs-body) var(--font-text); cursor: pointer; }
#ship-select.service .ss-info, #ship-select.service .ss-stations, #ship-select.service .ss-nav, #ship-select.service .screen-bar button { visibility: hidden; }
#ship-select .ss-stations button.has-new { position: relative; }
#ship-select .ss-stations button.has-new::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #ff5a7a; box-shadow: 0 0 6px rgba(255,90,122,0.9); }
@media (max-width: 720px) {
  #ship-select .ss-service { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 56dvh; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-left-width: 1px; border-top: 3px solid #66ffaa; }
}
/* 格納庫の端末から開いた設定: 枠を「システム端末」に見せる(中身は同じ) */
#game-menu.terminal #game-menu-box { border: 14px solid #1b252a; border-radius: 26px; box-shadow: 0 0 0 2px #2c3a40, 0 24px 60px rgba(0,0,0,0.8), 0 0 40px rgba(102,255,170,0.18); }
#game-menu.terminal #game-menu-box::before { content: "STATION OS  //  SYSTEM TERMINAL"; display: block; font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.2em; color: #66ffaa; border-bottom: 1px solid rgba(102,255,170,0.4); padding-bottom: 6px; margin-bottom: 8px; text-align: left; }
@media (max-width: 720px) { #game-menu.terminal #game-menu-box { border-width: 8px; border-radius: 18px; } }
#ship-select .ss-stations { display: none; }
#ship-select.hangar .ss-stations {
  position: fixed; z-index: 1; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 8px; padding: 0 12px; pointer-events: none;
}
#ship-select .ss-stations button {
  pointer-events: auto; min-height: 40px; padding: 6px 16px; cursor: pointer; font: 700 var(--fs-body) var(--font-text); color: #bfe;
  background: rgba(2,12,9,0.7); border: 1px solid rgba(102,255,170,0.4); border-radius: 20px;
}
#ship-select .ss-stations button.on { color: #04170e; background: #66ffaa; border-color: #66ffaa; }
@media (max-width: 720px) {
  #ship-select.hangar .ss-info { left: 16px; right: 16px; top: auto; bottom: calc(186px + env(safe-area-inset-bottom)); max-width: none; }
  #ship-select.hangar[data-station="ship"] .ss-info { bottom: calc(180px + env(safe-area-inset-bottom)); }
  #ship-select.hangar .ss-nav { bottom: calc(288px + env(safe-area-inset-bottom)); }
  #ship-select .ss-stations button { padding: 6px 12px; }
}
#ship-select .ss-inner { display: flex; gap: 12px; align-items: stretch; height: 100%; max-width: 1000px; }
#ship-select .ss-stage { flex: 1 1 56%; position: relative; min-width: 0; min-height: 220px; }
#ship-select .ss-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
#ship-select .ss-nav { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; align-items: center; gap: 14px; }
#ship-select .ss-arrow { font: 700 22px var(--font-hud); color: #66ffaa; border: 1px solid rgba(102,255,170,0.45); background: transparent; width: 40px; height: 34px; cursor: pointer; border-radius: 3px; }
#ship-select .ss-dots { display: flex; gap: 10px; }
#ship-select.intro .ss-arrow { display: none; } /* 紹介は1つずつ「次へ」で進む(◀ ▶は出さない) */
#ship-select .ss-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #66ffaa; box-sizing: border-box; }
#ship-select .ss-dot.on { background: #66ffaa; box-shadow: 0 0 8px #66ffaa; }
#ship-select .ss-dot.locked { border-color: rgba(102,255,170,0.25); }
#ship-select .ss-info { flex: 1 1 44%; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 4px; }
#ship-select .ss-name { font: 700 clamp(22px, 5vw, 32px)/1.1 var(--font-text); color: #e8fff4; }
#ship-select .ss-name small { font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.25em; color: #7fd; margin-left: 10px; }
#ship-select .ss-tag { margin: 8px 0 14px; font-size: var(--fs-body); color: #bfe; }
#ship-select .ss-stat { display: flex; align-items: center; gap: 10px; margin: 5px 0; font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.12em; }
#ship-select .ss-lbl { width: 78px; color: #8fe; }
#ship-select .ss-bar { display: flex; gap: 4px; }
#ship-select .ss-cell { width: clamp(22px, 5vw, 34px); height: 14px; border: 1px solid rgba(102,255,170,0.4); box-sizing: border-box; position: relative; overflow: hidden; }
#ship-select .ss-cell i { position: absolute; inset: 0; background: #66ffaa; transform-origin: left; transform: scaleX(0); }
#ship-select .ss-diff { width: 36px; color: #fd8; }
#ship-select .ss-legend { margin-top: 6px; font-size: var(--fs-small); color: #7ba; }
#ship-select .ss-note { margin-top: 12px; font-size: var(--fs-small); line-height: 1.55; }
#ship-select .ss-key { display: inline-block; min-width: 3.2em; color: #9fe; font-weight: 700; }
#ship-select .ss-weak .ss-key { color: #f99; }
#ship-select:not(.hidden) .ss-info .ss-name:only-child { color: #9cb; }
#ship-select .ss-ok[disabled] { opacity: 0.35; cursor: default; }
#ship-select .ss-back, #ship-select .ss-ok { font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.12em; padding: 9px 22px; border-radius: 3px; cursor: pointer; }
#ship-select .ss-ok { background: rgba(102,255,170,0.85) !important; color: #04170e !important; border: 1px solid #66ffaa; }
@media (max-width: 720px) { #ship-select .ss-inner { flex-direction: column; } #ship-select .ss-stage { flex: 0 0 42%; } }
#summary-ship.hidden { display: none; }
#summary-ship { padding: 8px 20px; font: var(--fs-body) var(--font-text); cursor: pointer; background: transparent; color: #9fe; border: 1px solid rgba(102,255,170,0.45); }
#summary-help { font-size: var(--fs-small); color: #9fb; max-width: 36em; text-align: center; }
/* BRIEFING2の説明の左にミラの顔(2026-11-03 オーナー要望。TUTORIALの案内と同じ絵。operator-face.js)。説明が空のとき・BRIEFING以外では出さない */
#summary-talk { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%; }
#summary-talk .operator-face { --face: calc(var(--fs-small) * 1.6 * 3); }
/* BRIEFING2では説明(何をするか)をレーダーと表より上に出す。PCの1280×720などで下の帯に隠れていた(2026-11-04 初回プレイの点検 A12) */
#summary.briefing #summary-talk { order: -1; }
#summary:not(.briefing) #summary-talk .operator-face, #summary-talk:has(#summary-help:empty) .operator-face { display: none; }
#summary-help:empty { display: none; }
/* BRIEFING2の勝利条件の目標の文: 説明の後で改行して、赤で(2026-10-16 オーナー要望) */
#summary-help .goal-line { display: block; color: #ff6060; }
/* 説明のタイプ表示: まだ出していない文字を見えない字で置いて、最初から全文の場所を取る(行が増えてもボタンがずれない。session-briefing.js typeText) */
.tw-rest::after { content: attr(data-rest); visibility: hidden; }
#postgame {
  position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center;
  justify-content: center; pointer-events: none; font-family: var(--font-hud); color: #fff; text-shadow: 0 0 12px #000;
}
#postgame.hidden { display: none; }
#postgame-winner { font-size: var(--fs-display); font-weight: 700; letter-spacing: 0.1em; }
#postgame-you { font-size: var(--fs-title); font-weight: 600; letter-spacing: var(--tracking-label); margin-top: 8px; }
#postgame-press { font-size: var(--fs-body); letter-spacing: 0.3em; margin-top: 40px; animation: postgame-pulse 1.2s ease-in-out infinite; }
@keyframes postgame-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
#summary-replay-button { padding: 8px 18px; font: var(--fs-body) var(--font-text); cursor: pointer; background: transparent; color: #9fe; border: 1px solid rgba(102,255,170,0.45); }
#summary-replay-button.hidden, #summary-back.hidden, #summary-support.hidden { display: none; }
/* 負けたときの「支援を頼んでもう一度」は帯の中でいちばん大きく(B9)。その間の「全体マップへ」は控えめの枠 */
#summary-support { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 30px; font: 700 calc(var(--fs-body) * 1.25) var(--font-text); cursor: pointer; }
#summary-support .ss-note { font-size: max(0.7em, var(--fs-small)); font-weight: 400; opacity: 0.85; }
/* 「次の作戦へ」(2026-11-21。session-next-mission.js): ミッションに勝ったときの主のボタン。2行(行き先の題名を下に)で、ほかのボタンより大きく。
   右端(進む向き)に置き、「全体マップへ」は控えめな枠だけのボタンになる。スマホの幅では横いっぱいで上の段 */
#summary-next { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 240px; padding: 10px 30px; font: 700 calc(var(--fs-body) * 1.25) var(--font-text); cursor: pointer; }
#summary-next.hidden { display: none; }
#summary-next .sn-main::after { content: " \25B8"; }
#summary-next .sn-note { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(0.7em, var(--fs-small)); font-weight: 400; opacity: 0.85; }
#summary-next:disabled { opacity: 0.6; cursor: default; }
/* 次が2つ(分岐)のときに重ねる選ぶ札。リプレイの2択と同じ重ね方で、札はステージの絵を暗く敷いた大きなボタン */
#next-choice { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); }
#next-choice.hidden { display: none; }
#next-choice-card {
  display: flex; flex-direction: column; gap: 14px; width: min(760px, 94vw); max-height: 94dvh; overflow-y: auto; box-sizing: border-box; padding: 20px 22px;
  background: rgba(4,16,20,0.94); border: 1px solid rgba(102,255,170,0.6); color: #cfe; font: var(--fs-body) var(--font-text);
}
#next-choice-card h4 { margin: 0; text-align: center; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.15em; color: #9fe; }
#next-choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.next-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 168px; padding: 16px 18px; box-sizing: border-box; text-align: left; cursor: pointer;
  color: #cfe; border: 1px solid rgba(102,255,170,0.45);
  /* 絵が見えるよう、暗くするのは字の後ろ(下の方)だけ。上は薄く(2026-11-24 オーナー要望「元の形で明るく」) */
  background: linear-gradient(rgba(2,12,9,0.1), rgba(2,12,9,0.25) 40%, rgba(2,12,9,0.72) 100%), var(--shot, none) center / cover no-repeat, rgba(0,0,0,0.4);
}
.next-card:hover, .next-card.pad-focus { border-color: rgba(102,255,170,0.95); box-shadow: 0 0 0 1px rgba(102,255,170,0.6) inset; }
.next-card .nc-title { font: 700 var(--fs-title) var(--font-text); color: #fff; text-shadow: 0 1px 4px #000, 0 0 10px rgba(0,0,0,0.9); }
.next-card .nc-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.next-card .nc-tags:empty { display: none; }
.next-card .nc-cleared, .next-card .nc-rival { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; font: 700 var(--fs-small) var(--font-text); border: 1px solid currentColor; }
.next-card .nc-cleared { color: #ffd76a; }
.next-card .nc-rival { color: #d9a6ff; }
.next-card .nc-rows { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.next-card .nc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,0.9); }
.next-card .nc-label { display: inline-flex; align-items: center; gap: 4px; min-width: 4.5em; opacity: 0.8; }
.next-card .nc-count, .next-card .nc-time, .next-card .nc-cpu { display: inline-flex; align-items: center; gap: 3px; font: 700 var(--fs-body) var(--font-hud); color: #fff; }
.next-card .nc-cpu { font-family: var(--font-text); }
.next-card svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#next-choice-close { align-self: center; padding: 8px 36px; font: var(--fs-body) var(--font-text); cursor: pointer; background: transparent; color: #9fe; border: 1px solid rgba(102,255,170,0.45); }
#next-choice-close:hover, #next-choice-close.pad-focus { background: rgba(102,255,170,0.12); }
body.touch-device #next-choice-close { min-height: 44px; }
/* 押してほかの人を待っている間(サーバー権威。2026-11-14): ボタンはグレーで「待っています…」、ボタンと案内(印付き)はゆっくり点滅 */
#summary-button.waiting, #summary-button.btn-primary.waiting { background: rgba(150,160,160,0.18) !important; color: #8d9b98 !important; border-color: rgba(160,170,170,0.45) !important; cursor: default; font-weight: 400; }
#summary-help.waiting, #summary-button.waiting { animation: summary-wait-pulse 1.6s ease-in-out infinite; }
#summary-help.waiting { color: #cfe; }
#summary-help.waiting::before { content: "● "; color: #66ffaa; }
#summary-wait-seats { flex: 0 0 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; font: var(--fs-small) var(--font-hud); letter-spacing: 0.06em; }
#summary-wait-seats.hidden { display: none; }
#summary-wait-seats .wait-seat { padding: 2px 10px; border: 1px solid rgba(160,170,170,0.45); color: #8d9b98; border-radius: 3px; }
#summary-wait-seats .wait-seat.done { border-color: rgba(102,255,170,0.7); color: #9fffd0; background: rgba(102,255,170,0.12); }
#summary-wait-seats .wait-seat.me { font-weight: 700; }
@keyframes summary-wait-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { #summary-help.waiting, #summary-button.waiting { animation: none; } }
#summary-button.btn-secondary { padding: 8px 18px; font: var(--fs-body) var(--font-text); cursor: pointer; background: transparent; color: #9fe; border: 1px solid rgba(102,255,170,0.45); }
#summary-back { padding: 8px 18px; font: var(--fs-body) var(--font-text); cursor: pointer; }
/* BRIEFING1(全体マップ。2026-10-07。briefing-map.js): 板は3Dで描き、駒の番号・選んだミッションの説明・ボタンを重ねる */
#briefing-map { position: fixed; inset: 0; z-index: 30; font-family: var(--font-hud); color: #eff; }
#briefing-map.hidden { display: none; }
#briefing-map.dragging, #briefing-map.dragging .bmap-label { cursor: grabbing; } /* 板をドラッグしてスクロールしているあいだ(2026-10-18) */
#bmap-title { position: absolute; top: 12px; left: 0; right: 0; text-align: center; font: 700 var(--fs-title) var(--font-hud); letter-spacing: var(--tracking-label); pointer-events: none; }
#bmap-labels { position: absolute; inset: 0; pointer-events: none; }
.bmap-fade { position: absolute; left: 0; right: 0; pointer-events: none; }
#bmap-fade-top { background: linear-gradient(to bottom, #000 15%, rgba(0,0,0,0)); }
#bmap-fade-bottom { background: linear-gradient(to top, #000 15%, rgba(0,0,0,0)); }
.bmap-label {
  position: absolute; transform: translate(-50%, -130%); pointer-events: auto; cursor: pointer; white-space: nowrap;
  font: 700 var(--fs-small) var(--font-hud); padding: 2px 8px; color: #fff; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.35);
}
.bmap-label.selected { border-color: #ffe066; color: #ffe066; }
.bmap-label.archived { box-shadow: 0 0 8px rgba(143,243,214,0.7); border-color: rgba(143,243,214,0.9); } /* エンディングを見たミッション(2026-11-03 案E) */
.bmap-label.archived.selected { border-color: #ffe066; }
/* 星(クリアレベル。2026-10-12): 駒の下に金色の星を並べる。取れていない星は☆(中抜き)。遠くの駒ほど小さく(--bmap-star-scale。2026-11-20) */
#bmap-stars { position: absolute; inset: 0; pointer-events: none; }
.bmap-stars {
  position: absolute; transform: translate(-50%, 20%); white-space: nowrap; letter-spacing: 0.05em;
  font: 700 calc(var(--bmap-star-size, 26px) * var(--bmap-star-scale, 1))/1 sans-serif; color: #ffd24d; text-shadow: 0 0 2px #000, 0 2px 4px rgba(0,0,0,0.8), 0 0 8px rgba(255,200,60,0.45);
}
body.screen-compact .bmap-stars { --bmap-star-size: 18px; }
.bmap-label:disabled { opacity: 0.45; cursor: default; }
.bmap-label.locked { opacity: 0.45; } /* ロック中(選んで見られるが、入れない) */
.bmap-label.locked.selected { opacity: 0.8; }
#bmap-panel {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px 14px; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,0.85) 30%);
}
#bmap-mission-title { font: 700 var(--fs-body) var(--font-hud); color: #ffd76a; min-height: 1.4em; }
#bmap-mission-desc { font-size: var(--fs-small); color: #9fe; max-width: 36em; margin: 4px auto; min-height: 1.4em; font-family: var(--font-text); }
#bmap-mission-info { font-size: var(--fs-small); color: #cfe; min-height: 1.4em; display: flex; justify-content: center; align-items: center; gap: 1.2em; }
/* 敵の数・クリアした回数の印(2026-10-21): レーダーと同じ形(母艦=四角、ポッド=丸)を赤で、クリアは金の✓ */
#bmap-mission-info .info-item { display: inline-flex; align-items: center; gap: 0.3em; font: 700 var(--fs-body) var(--font-hud); }
#bmap-mission-info svg { width: 1.1em; height: 1.1em; }
#bmap-mission-info [data-kind="mothers"] svg, #bmap-mission-info [data-kind="fighters"] svg { fill: #e04040; }
#bmap-mission-info [data-kind="mothers"], #bmap-mission-info [data-kind="fighters"] { color: #ff9a9a; }
#bmap-mission-info [data-kind="clears"] { color: #ffd24d; }
#bmap-mission-info [data-kind="clears"] svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* 鍵付きのミッションの開く条件(鍵 → M1-1 ✓)。鍵は灰色、条件のミッションと✓は金(クリアの印と同じ色) */
#bmap-mission-info [data-kind="locked"] { color: #9aa; gap: 0.4em; }
#bmap-mission-info [data-kind="locked"] svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
#bmap-mission-info .info-need { display: inline-flex; align-items: center; gap: 0.15em; color: #ffd24d; }
#bmap-mission-info .info-need svg { stroke-width: 2.2; stroke-linecap: round; }
#bmap-soon { border: 1px solid rgba(255,215,106,0.6); background: rgba(255,215,106,0.08); padding: 8px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
#bmap-soon.hidden { display: none; }
#bmap-soon-title { font-weight: 700; letter-spacing: 0.12em; color: #ffd76a; }
#bmap-soon-body { font-size: var(--fs-small); }
#bmap-soon-link { color: #9fe; font-size: var(--fs-small); }
#bmap-notice { font-size: var(--fs-small); color: #ffd76a; min-height: 0; }
/* 全体マップでミラが迎える一言(2026-11-15。mila-greet.js): 上の題の下に、TIPS と同じ形の小さな窓。押せない。数秒で消える */
#bmap-mila {
  --face-lines: 2; --face: calc(var(--fs-small) * 1.6 * var(--face-lines));
  position: absolute; top: calc(var(--fs-title) + 28px); left: 50%; transform: translateX(-50%); z-index: 2; pointer-events: none;
  width: max-content; max-width: min(520px, 90vw); box-sizing: border-box; min-height: calc(var(--face) + 14px);
  padding: 6px 14px 7px calc(var(--face) + 24px); display: flex; align-items: center;
  font: var(--fs-small)/1.6 var(--font-text); color: #eff; background: rgba(10,30,24,0.78); border: 1px solid rgba(102,255,170,0.45);
  animation: tip-enter 0.4s ease-out;
}
#bmap-mila.hidden { display: none; }
/* ハイライトを総括するミラの一言(2026-11-15。mila-highlight-summary.js): 上の案内の下。ハイライトの間だけ */
#hl-mila {
  --face-lines: 2; --face: calc(var(--fs-small) * 1.6 * var(--face-lines));
  display: none; position: fixed; top: calc(var(--fs-body) + 44px); left: 50%; transform: translateX(-50%); z-index: 32; pointer-events: none;
  width: max-content; max-width: min(560px, 90vw); box-sizing: border-box; min-height: calc(var(--face) + 14px);
  padding: 6px 14px 7px calc(var(--face) + 24px); align-items: center;
  font: var(--fs-small)/1.6 var(--font-text); color: #eff; background: rgba(10,30,24,0.78); border: 1px solid rgba(102,255,170,0.45);
  animation: tip-enter 0.4s ease-out;
}
body.highlight-mode #hl-mila:not(.hidden) { display: flex; }
#hl-mila .operator-face { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
#bmap-mila .operator-face { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
#briefing-map.side #bmap-mila { left: calc((100% - min(42%, 360px)) / 2); }
#bmap-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
#bmap-panel { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
/* 説明の欄の背景のステージの絵(2026-11-17 オーナー要望。map-stage-shot.js)。欄の背景(黒のグラデ)の上、文字・ボタンの下。
   板に近い側(縦持ちは上、横並びは左)を透明にして板へなじませる。暗さは --bmap-shot-opacity */
#bmap-panel { isolation: isolate; }
#bmap-panel-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: center / cover no-repeat; opacity: 0; transition: opacity 0.35s ease-out;
  --bmap-shot-opacity: 0.42;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%);
}
#bmap-panel-bg.shown { opacity: var(--bmap-shot-opacity); }
#briefing-map.side #bmap-panel-bg { -webkit-mask-image: linear-gradient(to right, transparent, #000 30%); mask-image: linear-gradient(to right, transparent, #000 30%); }
/* PCの横長(舞台の右に欄が浮く)は四方をぼかす(右・上下の切れ目を見せない) */
#briefing-map.side.wide #bmap-panel-bg {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%, #000 75%, transparent), linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 30%, #000 75%, transparent), linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
/* 高さの低い横長の画面(スマホの横持ちなど。2026-10-11): 説明の欄を右に置き、板は左に縦いっぱいに描く
   (下に置くと、板を描く高さがほとんど残らず、駒の番号が重なって押せなかった)。右の欄は中だけスクロールする */
#briefing-map.side #bmap-panel {
  left: auto; top: 0; right: 0; bottom: 0; width: min(42%, 360px); box-sizing: border-box; overflow-y: auto; touch-action: pan-y;
  display: flex; flex-direction: column; justify-content: safe center; padding: 12px calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) 12px;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.88) 18%);
}
#briefing-map.side #bmap-title { right: min(42%, 360px); top: 6px; font-size: var(--fs-body); }
/* PCの横長の画面(2026-10-21 M6): 右の欄を広くし、文字・ボタンを大きく。見出しは板の上のまん中 */
/* 横に極端に広い画面(2026-11-04): 板と説明の欄を、高さに見合う幅の「舞台」にまとめて中央に置く(--bmap-off=舞台の左右の余白、--bmap-stage-w=舞台の幅。mapViewportが設定) */
#briefing-map.side.wide #bmap-panel { right: var(--bmap-off, 0px); width: min(calc(var(--bmap-stage-w, 100vw) * 0.34), 520px); padding: 24px 32px 24px 24px; gap: 6px; }
#briefing-map.side.wide #bmap-title { left: var(--bmap-off, 0px); right: calc(var(--bmap-off, 0px) + min(calc(var(--bmap-stage-w, 100vw) * 0.34), 520px)); top: 14px; font-size: var(--fs-title, 1.6em); }
#briefing-map.side.wide #bmap-mission-title { font-size: 1.5em; }
#briefing-map.side.wide #bmap-mission-desc { font-size: var(--fs-body); line-height: 1.6; margin: 10px 0; }
#briefing-map.side.wide #bmap-buttons { margin-top: 16px; }
#briefing-map.side.wide #bmap-buttons button { padding: 10px 28px; }
/* タッチの端末では、駒の番号を押しやすく */
body.touch-device .bmap-label { padding: 5px 10px; }
#bmap-buttons button { font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; padding: 6px 22px; cursor: pointer; background: rgba(102,255,170,0.12); color: #cfe; border: 1px solid rgba(102,255,170,0.6); }
#bmap-buttons button:disabled { opacity: 0.35; cursor: default; }
#bmap-buttons button.hidden { display: none; }
/* 駒の意味の対応表(2026-10-21 オーナー決定): 画面を暗くして中央に大きく重ねる。右上の？で開く */
#bmap-help {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); width: 40px; height: 40px; border-radius: 50%;
  font: 700 var(--fs-body) var(--font-hud); color: #cfe; background: rgba(0,0,0,0.55); border: 1px solid rgba(102,255,170,0.6); cursor: pointer;
}
/* ひと休み(2026-11-16 オーナー決定。screen-break.js): ボタンの段の下のまん中のボタン(丸く切ったミラの笑顔+文字)と、選ぶ・ミラの話を聞く窓。字は小さくしない(本文の大きさ) */
#bmap-break-row { display: flex; justify-content: center; margin-top: 8px; }
#briefing-map.side.wide #bmap-break-row { margin-top: 12px; }
#bmap-break {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 18px 4px 4px; border-radius: 999px;
  font: 700 var(--fs-body) var(--font-text); color: #cfe; background: rgba(0,0,0,0.55); border: 1px solid rgba(102,255,170,0.6); cursor: pointer;
}
#bmap-break img { width: calc(var(--fs-body) * 2); height: calc(var(--fs-body) * 2); min-width: 32px; min-height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(102,255,170,0.6); pointer-events: none; }
#bmap-break.glow { color: #eff; border-color: #66ffaa; animation: break-glow 1.4s ease-in-out infinite alternate; }
@keyframes break-glow { from { box-shadow: 0 0 4px rgba(102,255,170,0.4); } to { box-shadow: 0 0 16px rgba(102,255,170,0.95); } }
#break-dialog { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); }
#break-dialog.hidden { display: none; }
.break-card {
  display: flex; flex-direction: column; gap: 14px; padding: 20px 24px; width: min(520px, calc(100vw - 24px)); max-height: calc(100% - 16px); overflow-y: auto; box-sizing: border-box;
  background: rgba(4,16,20,0.94); border: 1px solid rgba(102,255,170,0.6); color: #eff;
}
.break-title { font: 700 var(--fs-title) var(--font-hud); letter-spacing: var(--tracking-label); text-align: center; }
.break-line { --face-lines: 3; --face: calc(var(--fs-body) * 1.7 * var(--face-lines)); position: relative; min-height: var(--face); padding-left: calc(var(--face) + 14px); display: flex; align-items: center; }
.break-line .operator-face { position: absolute; left: 0; top: 0; }
.break-text { font: var(--fs-body)/1.7 var(--font-text); white-space: pre-line; overflow-wrap: anywhere; }
.break-choices { display: flex; flex-direction: column; gap: 10px; }
.break-choice {
  min-height: 52px; padding: 10px 18px; cursor: pointer; font: 700 calc(var(--fs-body) * 1.15) var(--font-text); color: #e8fff4;
  background: rgba(10,40,30,0.75); border: 1px solid #66ffaa; border-radius: 6px; text-align: left;
}
.break-choice:hover { background: rgba(102,255,170,0.14); }
.break-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.break-row-below { margin-top: 10px; }
.break-row button { min-height: 44px; padding: 6px 24px; font: 700 var(--fs-body) var(--font-text); cursor: pointer; }
/* 図で見る(2026-11-16): 話に合う HOW TO PLAY のカードを開く。本の印・字・小さく HOW TO PLAY */
.break-row button.break-howto { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; color: #cfe; background: rgba(102,255,170,0.10); border: 1px solid rgba(102,255,170,0.6); }
.break-howto svg { width: 1.3em; height: 1.3em; flex: none; }
.break-howto small { font: 600 0.72em var(--font-hud); letter-spacing: 0.06em; opacity: 0.75; }
.break-praise-head { font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.1em; color: #ffd76a; margin-bottom: 4px; } /* 何の試合の話か(直近の試合を褒める一言) */
.break-count { font: 400 var(--fs-small) var(--font-hud); color: #9fe; text-align: right; }
/* 記録室(2026-11-22。screen-archive.js): 上に札、下に一覧(窓の中で縦に流れる)。押す物は 40px 以上、字は本文の大きさ */
.break-card[data-step="archive"] { width: min(640px, calc(100vw - 24px)); }
.archive-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.archive-tab {
  flex: 1 1 auto; min-height: 40px; padding: 4px 10px; cursor: pointer; font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.06em;
  color: var(--text-dim, #9fb); background: transparent; border: 1px solid rgba(102,255,170,0.4); border-radius: 4px;
}
.archive-tab[aria-selected="true"] { color: #fff; background: rgba(102,255,170,0.16); border-color: #66ffaa; }
.archive-list { display: flex; flex-direction: column; gap: 8px; }
.archive-head { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.1em; color: #ffd76a; margin-top: 6px; }
.archive-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; background: rgba(10,40,30,0.45); border: 1px solid rgba(102,255,170,0.25); border-radius: 4px; }
.archive-row.locked { opacity: 0.55; }
.archive-row-head { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; min-width: 0; }
.archive-id { font: 700 var(--fs-small) var(--font-hud); color: #9fe; }
.archive-name { font: 700 var(--fs-body) var(--font-text); overflow-wrap: anywhere; }
.archive-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.archive-chip {
  min-height: 40px; padding: 4px 12px; cursor: pointer; font: 600 var(--fs-body) var(--font-text); color: #e8fff4;
  background: rgba(10,40,30,0.75); border: 1px solid #66ffaa; border-radius: 4px; text-align: left;
}
.archive-chip:hover:not(:disabled) { background: rgba(102,255,170,0.14); }
.archive-chip:disabled { cursor: default; opacity: 0.5; border-style: dashed; }
.archive-chip.wearing { background: rgba(102,255,170,0.22); }
.archive-note { font: 400 var(--fs-small) var(--font-text); color: #9fb; flex: 1 1 100%; }
.archive-row-head .archive-note { flex: none; }
.archive-locked { font: 700 var(--fs-body) var(--font-hud); color: #7a9; letter-spacing: 0.1em; }
.archive-empty { font: var(--fs-body)/1.7 var(--font-text); color: #9fb; }
.archive-line { flex-direction: column; align-items: stretch; }
.archive-line-head { font: 600 var(--fs-small) var(--font-hud); color: #9fe; }
.archive-line-row { display: flex; align-items: flex-start; gap: 8px; }
.archive-text { font: var(--fs-body)/1.7 var(--font-text); white-space: pre-line; overflow-wrap: anywhere; }
.archive-voice { flex: none; min-width: 40px; min-height: 40px; cursor: pointer; color: #cfe; background: rgba(102,255,170,0.10); border: 1px solid rgba(102,255,170,0.6); border-radius: 50%; font: 700 var(--fs-body) var(--font-hud); }
.archive-reward { display: flex; flex-direction: column; gap: 6px; }
.archive-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.archive-faces img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid rgba(102,255,170,0.5); border-radius: 4px; pointer-events: none; }
#bmap-legend { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); }
#bmap-legend.hidden { display: none; }
#bmap-legend-card {
  display: flex; flex-direction: column; gap: 14px; padding: 22px 26px; min-width: min(280px, 80vw); box-sizing: border-box;
  background: rgba(4,16,20,0.92); border: 1px solid rgba(102,255,170,0.6); font: 700 var(--fs-body) var(--font-text);
}
.legend-row { display: flex; align-items: center; gap: 16px; }
.legend-icon { width: 44px; height: 34px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.legend-icon svg { width: 40px; height: 28px; }
/* 駒の色は自軍の色(PROFILEで選ぶ。team-look.js)に合わせる: 敵=自分と反対の色、味方(クリア)=自分の色。openMapLegend が --legend-* を入れる(2026-11-07) */
#bmap-legend { --legend-enemy: #e02020; --legend-enemy-glow: 255,60,60; --legend-enemy-dim: #431010; --legend-ally: #e8e8e8; }
#bmap-legend[data-ally="red"] { --legend-enemy: #e8e8e8; --legend-enemy-glow: 255,255,255; --legend-enemy-dim: #4a4a4a; --legend-ally: #e02020; }
.legend-row[data-kind="open"] svg { fill: var(--legend-enemy); filter: drop-shadow(0 0 6px rgba(var(--legend-enemy-glow),0.9)); animation: legend-pulse 1.25s ease-in-out infinite alternate; }
.legend-row[data-kind="locked"] svg { fill: var(--legend-enemy-dim); }
.legend-row[data-kind="locked"] { color: #9aa; }
.legend-row[data-kind="cleared"] svg { fill: var(--legend-ally); }
@keyframes legend-pulse { from { filter: drop-shadow(0 0 2px rgba(var(--legend-enemy-glow),0.5)); } to { filter: drop-shadow(0 0 9px rgba(var(--legend-enemy-glow),1)); } }
/* 続きから(2026-10-22 オーナー決定。仕様書「保存と再開の案内」): MISSIONの枠の中、文字の下に、前に遊んだミッションを小さく添える */
#mission-continue { display: block; font: 400 var(--fs-small) var(--font-hud); letter-spacing: 0.08em; color: #9fe; margin-top: 2px; }
#mission-continue.hidden { display: none; }
/* 保存できない環境の印(最初の画面の下の帯)と、保存したときの印(決着の画面の見出しの隅) */
#title-nosave { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.08em; color: #ffd27a; padding: 2px 8px; border: 1px solid rgba(255,210,122,0.7); }
#title-nosave.hidden { display: none; }
#summary-saved { position: absolute; top: 8px; right: 12px; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.1em; color: #9fe; animation: saved-fade 2.6s ease-out forwards; pointer-events: none; }
#summary-saved.hidden { display: none; }
@keyframes saved-fade { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
#bmap-save-note { max-width: 340px; font-weight: 400; font-size: var(--fs-small); line-height: 1.6; color: #cfe; white-space: pre-line; border-top: 1px solid rgba(102,255,170,0.35); padding-top: 12px; }
#bmap-legend:not(.with-save) #bmap-save-note { display: none; }
#bmap-save-note b { display: block; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 4px; }
#bmap-legend-card { max-height: calc(100% - 16px); overflow-y: auto; }
@media (max-height: 460px) { /* 横持ちのスマホ: 駒の意味は2列にして、保存の案内とOKまで収める */
  #bmap-legend-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; padding: 12px 20px; min-width: min(560px, 92vw); }
  #bmap-save-note, #bmap-legend-ok { grid-column: 1 / -1; }
  #bmap-save-note { max-width: none; padding-top: 8px; }
}
#bmap-legend-ok { align-self: center; margin-top: 4px; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; padding: 6px 30px; cursor: pointer; } /* REPLAY・HIGHLIGHT: 保存した記録がないミッションでは出さない(2026-10-21) */
/* BRIEFING2(2026-10-07): 撃墜数の列は出さない(2026-11-25 から出撃の数の -/+ とストックの行は無い) */
#summary.briefing #summary-table tr > :nth-child(4) { display: none; }
/* 表の下のR.W.N.D.の行の印と、意味を出す？(2026-10-21) */
.rwnd-line { display: flex; align-items: center; justify-content: center; gap: 8px; color: #9fe; font: var(--fs-body)/1.6 var(--font-hud); }
.rwnd-line.hidden { display: none; }
/* 支援要請(2026-10-30): 負けた後のBRIEFING2で選ぶ。色は回復ドローンの色 */
#briefing-support { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#briefing-support.hidden { display: none; }
#briefing-support .support-ask { font: var(--fs-small)/1.4 var(--font-hud); color: #bfe; text-align: left; }
#briefing-support .support-talk { display: flex; align-items: center; gap: 10px; } /* ミラの顔(2026-10-30 オーナー要望。operator-face.js)と問い */
#briefing-support .operator-face { --face: calc(var(--fs-small) * 1.4 * 2.6); flex: none; }
#briefing-support .support-choices { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; width: 100%; }
#briefing-support button { flex: 1 1 0; max-width: 18em; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 9em; padding: 6px 14px; cursor: pointer; font: var(--fs-body)/1.3 var(--font-hud); color: #9bb; background: rgba(102,255,204,0.05); border: 1px solid rgba(102,255,204,0.3); }
#briefing-support button.hidden { display: none; }
#briefing-support button.on { color: #dff; background: rgba(102,255,204,0.18); border-color: rgba(102,255,204,0.9); box-shadow: 0 0 8px rgba(102,255,204,0.35); }
#briefing-support .mode-name { font-weight: 700; letter-spacing: 0.06em; }
#briefing-support .mode-note { font-size: var(--fs-small); }
/* スマホ幅の整理(2026-11-04 オーナー決定、案B): 支援は本体に1行(「支援なし  変更 ▸」。2026-11-25 までは最初から/続きからも並べていた)だけ出し、変更を押すとポップアップで選ぶ。広い画面は今までどおり並べる */
#briefing-options { display: contents; }
#briefing-opt-summary, #briefing-opt-ok { display: none; }
@media (max-width: 600px) {
  #briefing-opt-summary:not(.hidden) { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; cursor: pointer; font: var(--fs-body)/1.3 var(--font-hud); color: #dff; border: 1px solid rgba(102,255,204,0.4); background: rgba(102,255,204,0.05); }
  #briefing-opt-summary .opt-change { color: #6fc; white-space: nowrap; }
  #briefing-options { display: none; }
  #briefing-options.open { display: flex; flex-direction: column; gap: 10px; position: fixed; left: 10px; right: 10px; top: 50%; transform: translateY(-50%); max-height: 90vh; overflow-y: auto; z-index: 60; padding: 12px; background: #07110f; border: 1px solid rgba(102,255,204,0.9); box-shadow: 0 0 0 100vmax rgba(0,0,0,0.65); }
  #briefing-options.open #briefing-opt-ok { display: block; align-self: center; padding: 6px 30px; cursor: pointer; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; color: #dff; background: rgba(102,255,204,0.18); border: 1px solid rgba(102,255,204,0.9); }
  #briefing-options.open #briefing-support button { min-width: 0; padding: 6px 4px; }
  #briefing-options.open #briefing-support .support-choices { flex-wrap: nowrap; gap: 6px; }
}
.stock-help-icon svg.help-mark { width: 24px; height: 24px; }
.stock-icon svg, .stock-help-icon svg { width: 22px; height: 22px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#stock-help { margin-left: 18px; width: 26px; height: 26px; padding: 0; border-radius: 50%; font: 700 var(--fs-small) var(--font-hud); color: #cfe; background: rgba(0,0,0,0.55); border: 1px solid rgba(102,255,170,0.6); cursor: pointer; }
#stats-detail-card .help-row { display: flex; align-items: center; gap: 14px; line-height: 1.5; margin: 4px 0; }
.stock-help-icon { width: 44px; flex: none; text-align: center; color: #9fe; font: 700 var(--fs-small) var(--font-hud); }
/* パイロット名(2026-10-24。pilot-names.js): 再出撃の射出が始まったときに、名前とコードを小さく出して消える(枠なし。説明は出さない) */
#pilot-popup {
  position: fixed; left: 16px; right: 16px; top: 30%; text-align: center; pointer-events: none; z-index: 14;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 600 var(--fs-small) var(--font-hud); letter-spacing: 0.22em; color: #cfe; text-shadow: 0 0 8px rgba(102,255,170,0.45);
}
#pilot-popup.hidden { display: none; }
#pilot-popup.show { animation: pilot-pop var(--pilot-seconds, 2.6s) ease-out 1 forwards; }
#pilot-popup .pilot-code { margin-left: 1.2em; opacity: 0.6; }
@keyframes pilot-pop { 0% { opacity: 0; transform: translateY(6px); } 10% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }
body.summary-open #pilot-popup, body.map-open #pilot-popup, body.replay-mode #pilot-popup, body.menu-open #pilot-popup { display: none; }
/* READY・GO(2026-10-12): 画面の中央の少し上に、短い英語で。GOは少し大きく出て消える */
#ready-go {
  position: fixed; left: 0; right: 0; top: 34%; transform: translateY(-50%); text-align: center; pointer-events: none; z-index: 14;
  font: 700 clamp(28px, 7vw, 64px) var(--font-hud); letter-spacing: 0.3em; color: #eff; text-shadow: 0 0 16px rgba(102,255,170,0.55);
}
#ready-go.hidden { display: none; }
#ready-go.ready { animation: ready-pulse 1.2s ease-in-out infinite; }
#ready-go.go { color: #9fffc8; animation: go-pop var(--go-seconds, 2s) ease-out 1 forwards; }
@keyframes ready-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes go-pop { 0% { transform: translateY(-50%) scale(1.5); opacity: 0; } 12% { transform: translateY(-50%) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
body.summary-open #ready-go, body.map-open #ready-go, body.replay-mode #ready-go, body.menu-open #ready-go { display: none; }
#lost-message {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 700 var(--fs-hero)/1 var(--font-hud); letter-spacing: 0.08em;
  color: rgba(255,90,90,0.45); text-shadow: 0 0 30px rgba(255,60,60,0.35);
  pointer-events: none; z-index: 15;
}
#lost-message.hidden { display: none; }
/* R.W.N.D.(巻き戻し。2026-10-19): 発動の演出(画面の青白い反転・文字)・戻したあとの待ち(3・2・1)・撃墜中のボタン・リプレイからの再開の確認 */
#rwnd-fx { position: fixed; inset: 0; z-index: 44; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#rwnd-fx.hidden { display: none; }
#rwnd-fx.flash { animation: rwnd-flash var(--rwnd-seconds, 0.9s) ease-out 1 forwards; }
@keyframes rwnd-flash {
  0% { backdrop-filter: invert(1) hue-rotate(180deg); background: rgba(180,235,255,0.55); }
  35% { backdrop-filter: invert(1) hue-rotate(180deg) saturate(0.5); background: rgba(90,170,255,0.25); }
  100% { backdrop-filter: invert(0); background: rgba(90,170,255,0); }
}
#rwnd-text {
  font: 700 var(--fs-hero)/1 var(--font-hud); letter-spacing: 0.12em; color: #dff6ff; text-shadow: 0 0 28px rgba(110,200,255,0.9);
  animation: rwnd-text var(--rwnd-seconds, 0.9s) ease-out 1 forwards;
}
@keyframes rwnd-text { 0% { opacity: 0; transform: scale(1.35); letter-spacing: 0.4em; } 20% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1); letter-spacing: 0.12em; } }
#rwnd-fx.waiting #rwnd-text { animation: none; opacity: 0.8; }
#rwnd-count { font: 700 clamp(36px, 9vw, 80px)/1.2 var(--font-hud); color: #bfe9ff; text-shadow: 0 0 18px rgba(110,200,255,0.8); min-height: 1.2em; }
#rwnd-btn {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24% + env(safe-area-inset-bottom)); z-index: 16; padding: 12px 34px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.18em; color: #dff6ff; background: rgba(10,30,50,0.72); border: 1px solid rgba(110,200,255,0.9);
  border-radius: 4px; text-shadow: 0 0 10px rgba(110,200,255,0.8); touch-action: manipulation;
}
#rwnd-btn.hidden, body.replay-mode #rwnd-btn, body.menu-open #rwnd-btn { display: none; }
#replay-rwnd {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(102px + env(safe-area-inset-bottom) + var(--rs-lift, 0px)); /* ½× ▶ 2× の上の「RW」の字にかからない高さ */ z-index: 31; padding: 8px 22px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.12em; color: #dff6ff; background: rgba(10,30,50,0.78); border: 1px solid rgba(110,200,255,0.9);
  border-radius: 4px; text-shadow: 0 0 10px rgba(110,200,255,0.8);
}
#replay-rwnd.hidden, body.highlight-mode #replay-rwnd { display: none; }
/* シークバーの出来事の印(replay-marks.js。2026-10-22): バーの上に縦線、真下に記号。位置はバーの左右の端から、つまみの半分(8px)内側 */
#replay-marks { position: fixed; left: 20vw; width: 60vw; bottom: calc(2px + var(--rs-lift, 0px)); height: 28px; z-index: 32; pointer-events: none; display: none; }
/* 今 / 全体の時間(2026-11-23 オーナー要望。上の1行の「REPLAY ▶ 再生 x1 02:47 / 03:05」の代わり): シークバーの下の右端。
   入る高さを作るため、リプレイのバー・印・½× ▶ 2×・情報枠を --rs-lift でまとめて上げる */
body.replay-mode { --rs-lift: 20px; }
#replay-time { position: fixed; right: 20vw; bottom: calc(var(--rs-lift, 0px) - 16px + env(safe-area-inset-bottom)); z-index: 32; display: none; pointer-events: none;
  font: 700 var(--fs-small)/1 var(--font-hud); color: #9fe; text-shadow: 0 0 4px #000, 0 0 8px #000; white-space: nowrap; }
body.replay-mode:not(.highlight-mode) #replay-time { display: block; }
body.replay-mode:not(.highlight-mode) #replay-marks { display: block; }
/* リプレイ中(R.W.N.D.の位置選び・全記録のリプレイとも)は、シークバーを光らせ、つまみを自機Podの色の大きな玉にする(2026-11-05 オーナー要望。2026-11-08 全記録のリプレイにも。見た目だけ。つまみの大きさに印の位置を合わせる) */
body.seek-pod { --seek-half: 14px; --seek-ball: #eaf6ff; --seek-ball-dark: #6d8fb0; --seek-pct: 0%; }
body.seek-pod #replay-seek {
  -webkit-appearance: none; appearance: none; background: transparent; height: 30px; bottom: calc(7px + var(--rs-lift, 0px)) !important; margin: 0; cursor: pointer;
  filter: drop-shadow(0 0 6px rgba(110,220,255,0.9));
}
body.seek-pod #replay-seek::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1px solid rgba(160,235,255,0.95);
  background: linear-gradient(90deg, #3fd6e0 var(--seek-pct), rgba(40,60,70,0.85) var(--seek-pct)); box-shadow: 0 0 12px rgba(110,220,255,0.8); }
body.seek-pod #replay-seek::-moz-range-track { height: 8px; border-radius: 4px; border: 1px solid rgba(160,235,255,0.95);
  background: linear-gradient(90deg, #3fd6e0 var(--seek-pct), rgba(40,60,70,0.85) var(--seek-pct)); box-shadow: 0 0 12px rgba(110,220,255,0.8); }
body.seek-pod #replay-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%; border: 2px solid #fff;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--seek-ball) 35%, var(--seek-ball-dark) 100%); box-shadow: 0 0 14px 3px rgba(110,220,255,0.9); }
body.seek-pod #replay-seek::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--seek-ball) 35%, var(--seek-ball-dark) 100%); box-shadow: 0 0 14px 3px rgba(110,220,255,0.9); }
#replay-marks .rm { position: absolute; bottom: 0; width: 0; height: 100%; }
#replay-marks .rm::before { content: ""; position: absolute; left: -1px; bottom: 12px; width: 2px; height: 16px; background: currentColor; box-shadow: 0 0 4px currentColor; }
#replay-marks .rm span { position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); font: 700 11px/12px var(--font-hud); text-shadow: 0 0 4px #000; }
.rm.enemyMothership { color: #ff7a6a; } .rm.allyMothership { color: #6ab8ff; } .rm.shotDown { color: #ffb347; } .rm.enemyAce { color: #ffe14d; }
/* リプレイの小さな操作ボタン(半速・再生/一時停止・倍速。シークバーのすぐ上。タッチでも操作できるように。2026-10-20 オーナー要望) */
#replay-ctrl { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(38px + env(safe-area-inset-bottom) + var(--rs-lift, 0px)); z-index: 31; display: none; gap: 8px; align-items: flex-end; }
body.replay-mode:not(.highlight-mode) #replay-ctrl { display: flex; }
/* 画面の表示を全部消すボタン(2026-10-24 オーナー要望。リプレイを録画・撮影するとき用)。消している間は、このボタンだけ小さく薄く右上に残る(Escでも戻る) */
#replay-clean-btn { display: none; position: fixed; right: 10px; top: 76px; z-index: 40; width: 44px; height: 28px; padding: 0; cursor: pointer;
  font: 700 var(--fs-small)/1 var(--font-hud); letter-spacing: 0.04em; color: #9fe; background: rgba(0,20,16,0.55); border: 1px solid rgba(102,255,170,0.5); border-radius: 3px; }
body.replay-mode:not(.highlight-mode) #replay-clean-btn { display: block; }
body.replay-clean #replay-clean-btn { opacity: 0.3; width: 26px; height: 20px; font-size: 9px; }
body.replay-clean > *:not(canvas):not(#replay-clean-btn):not(#replay-shot-btn):not(#replay-rec-btn):not(#shot-toast), body.replay-clean > #speed-lines, body.replay-clean > #target-overlay { display: none !important; }
/* スクリーンショットのボタン(2026-10-25 オーナー決定)。UIボタンのすぐ下。表示を消している間も小さく薄く残る */
#replay-shot-btn { display: none; position: fixed; right: 10px; top: 108px; z-index: 40; width: 44px; height: 28px; padding: 0; cursor: pointer;
  font: 700 var(--fs-small)/1 var(--font-hud); letter-spacing: 0.04em; color: #9fe; background: rgba(0,20,16,0.55); border: 1px solid rgba(102,255,170,0.5); border-radius: 3px; }
body.replay-mode:not(.highlight-mode) #replay-shot-btn { display: block; }
body.replay-clean #replay-shot-btn { opacity: 0.3; width: 26px; height: 20px; top: 100px; font-size: 9px; }
/* 動画の書き出し(2026-11-14 オーナー決定。video-clip.js)。SHOTのすぐ下。MP4を作れるブラウザだけ(video-rec-ok)。録っている間は赤く「● 秒数」。
   表示を消している間も小さく薄く残る(録っている間は消しても見えるように少し濃く) */
#replay-rec-btn { display: none; position: fixed; right: 10px; top: 140px; z-index: 40; width: 44px; height: 28px; padding: 0; cursor: pointer;
  font: 700 var(--fs-small)/1 var(--font-hud); letter-spacing: 0.02em; color: #9fe; background: rgba(0,20,16,0.55); border: 1px solid rgba(102,255,170,0.5); border-radius: 3px; }
body.replay-mode.video-rec-ok:not(.highlight-mode) #replay-rec-btn { display: block; }
#replay-rec-btn.recording { color: #fff; background: rgba(150,0,20,0.75); border-color: #ff5a6a; }
body.replay-clean #replay-rec-btn { opacity: 0.3; width: 26px; height: 20px; top: 124px; font-size: 9px; }
body.replay-clean #replay-rec-btn.recording { opacity: 0.6; }
/* 映像の素材の書き出し(2026-10-29。HOW TO PLAY の映像。tools/howto-clips.mjs): ?debug で保存した記録(前回のリプレイ)を見ているときだけ。RECのすぐ下 */
#replay-clip-btn { display: none; position: fixed; right: 10px; top: 172px; z-index: 40; width: 34px; height: 26px; padding: 0; cursor: pointer;
  font: 700 10px/1 var(--font-hud); letter-spacing: 0.02em; color: #9fe; background: rgba(0,20,16,0.55); border: 1px solid rgba(102,255,170,0.5); border-radius: 3px; }
body.replay-mode.clip-export:not(.highlight-mode):not(.replay-clean) #replay-clip-btn { display: block; }
#shot-toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; padding: 6px 14px; pointer-events: none;
  font: 700 var(--fs-small) var(--font-hud); color: #dff6ff; background: rgba(10,30,50,0.85); border: 1px solid rgba(110,200,255,0.9); border-radius: 4px; }
#shot-toast.hidden { display: none; }
/* 部屋の人の出入りの知らせ(マルチの導線の点検 B2)は、上の帯(ラウンド・時間・2人対戦の印)に重ねず、その下に出す */
#shot-toast.net-notice { top: calc(52px + env(safe-area-inset-top)); }
@media (max-width: 600px) { #shot-toast.net-notice { top: calc(64px + env(safe-area-inset-top)); width: max-content; max-width: calc(100vw - 32px); } }
/* レアのポッドを撃墜して顔を手に入れたときの知らせ(2026-10-26。rare-pods.js)。白い光の帯が1回すっと流れる(光の走査線) */
#rare-toast { position: fixed; left: 50%; top: calc(18% + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; max-width: min(90vw, 520px); padding: 8px 16px; pointer-events: none; overflow: hidden;
  text-align: center; font: 700 var(--fs-body) var(--font-hud); color: #fff; background: rgba(60,10,45,0.85); border: 1px solid #ff8fd8; border-radius: 6px; }
#rare-toast.hidden { display: none; }
#rare-toast::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent); animation: rare-sweep 1.4s ease-out 0.2s 1 both; }
@keyframes rare-sweep { from { left: -40%; } to { left: 120%; } }
#replay-ctrl button { min-width: 40px; height: 30px; padding: 0 8px; cursor: pointer; touch-action: manipulation; font: 700 var(--fs-small) var(--font-hud); color: #dff6ff; background: rgba(10,30,50,0.78); border: 1px solid rgba(110,200,255,0.9); border-radius: 4px; }
#replay-ctrl .rc-pp { position: relative; min-width: 48px; }
#replay-ctrl .rc-pp small { position: absolute; left: 0; right: 0; top: -16px; text-align: center; font: 700 var(--fs-small)/1 var(--font-hud); letter-spacing: 0.1em; color: #7fd; pointer-events: none; }
/* 今の再生速度(2026-11-15 オーナー要望)。2×の右に、押せない表示として出す。ボタンの並びの幅には入れない(½× ▶ 2× は今までどおり中央。スマホ縦で左の情報枠に寄らない) */
#replay-ctrl #rc-speed { position: absolute; left: 100%; bottom: 7px; margin-left: 8px; white-space: nowrap; text-align: left; font: 700 var(--fs-small) var(--font-hud); color: #7fd; text-shadow: 0 0 6px rgba(110,220,255,0.7); pointer-events: none; }
/* リプレイを途中で閉じるボタン(2026-11-15 オーナー要望。Escと同じ)。PCだけ、プレイ中の「三 MENU (ESC)」と同じ右下に大きめに。
   タッチは右下の✕(#touch-menu-button)が同じ役目。最後まで見たあとの「戻る」(#replay-back)はこの上に出る */
#replay-exit { display: none; }
body.replay-mode:not(.highlight-mode):not(.touch-device) #replay-exit {
  display: block; position: fixed; right: 14px; bottom: 12px; z-index: 32; padding: 9px 18px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.1em; color: #dff6ff; background: rgba(10,30,50,0.78); border: 1px solid rgba(110,200,255,0.9); border-radius: 4px;
}
#replay-exit:hover { background: rgba(40,80,120,0.85); }
/* さわらないまま config.replay.controlsHideSeconds 秒たったら、操作のボタンを薄く消す(2026-11-22 オーナー決定。引き算の総点検 C2。動画のプレイヤーと同じ)。
   マウスを動かす・画面に触れる・キー・パッドで戻る(session-highlight-clip.js の updateReplayIdle)。上の1行・レーダー・機体の数・シークバーは残す。
   消えている間は押せない(触れた最初の1回は、ボタンを出すだけ)。録画中の「録画」ボタンは消さない */
body.replay-mode #camera-ui, body.replay-mode #replay-ctrl, body.replay-mode #replay-exit, body.replay-mode #replay-clean-btn, body.replay-mode #replay-shot-btn,
body.replay-mode #replay-rec-btn, body.replay-mode #replay-clip-btn, body.replay-mode #replay-rwnd,
body.replay-mode #touch-menu-button { transition: opacity 0.4s; }
body.replay-idle:not(.replay-clean) #camera-ui, body.replay-idle:not(.replay-clean) #replay-ctrl, body.replay-idle:not(.replay-clean) #replay-exit,
body.replay-idle:not(.replay-clean) #replay-clean-btn, body.replay-idle:not(.replay-clean) #replay-shot-btn, body.replay-idle:not(.replay-clean) #replay-rec-btn:not(.recording),
body.replay-idle:not(.replay-clean) #replay-clip-btn,
body.replay-idle:not(.replay-clean) #replay-rwnd, body.replay-idle:not(.replay-clean) #touch-menu-button { opacity: 0; pointer-events: none; }
/* シークバー(時間の線と印)と、その印の説明(自機を見ている間の情報の枠)は消さない(2026-11-23 オーナー要望「シークバーは自動で消さない」) */
/* 自機を見ている間の左下の情報の枠(2026-11-22 オーナー決定。引き算の総点検 C3): 視点・SHIELD・ENERGY・速度は出さず、時間の線の印の説明だけ(消さない)。説明も無ければ枠ごと出さない */
#replay-info.own-ship.empty { display: none !important; }
/* 幅の狭いPCの画面では、シークバー(幅の20〜80%)の右端と重なるので、バーの上へ上げる。最後まで見たあとの「戻る」はさらにその上 */
@media (max-width: 1200px) {
  body.replay-mode:not(.highlight-mode):not(.touch-device) #replay-exit { bottom: calc(52px + var(--rs-lift, 0px)); }
  body.replay-mode:not(.touch-device) #replay-back { bottom: calc(108px + var(--rs-lift, 0px)); }
}
/* もっと狭い(スマホ縦ほどの幅でマウス・キーボード)の画面では、再生の速さのボタン・「ここからR.W.N.D.する」と重なるので、その上へ上げる(2026-11-22) */
@media (max-width: 600px) {
  body.replay-mode:not(.highlight-mode):not(.touch-device) #replay-exit { bottom: calc(140px + env(safe-area-inset-bottom) + var(--rs-lift, 0px)); }
  body.replay-mode:not(.touch-device) #replay-back { bottom: calc(196px + env(safe-area-inset-bottom) + var(--rs-lift, 0px)); }
}
#rwnd-confirm {
  position: fixed; inset: 0; z-index: 46; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: rgba(0,10,25,0.78); color: #dff6ff; font: 700 var(--fs-body)/1.7 var(--font-hud); text-align: center; padding: 0 6vw;
}
#rwnd-confirm.hidden { display: none; }
#rwnd-confirm-text { white-space: pre-line; } /* 回数・支援要請の案内は改行して別の行に(2026-10-30) */
#rwnd-confirm-bar { display: flex; gap: 48px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) { #rwnd-confirm-bar { gap: 14px; } } /* 支援要請のボタンを足して3つになっても、狭い画面に収める(2026-10-30) */
#rwnd-confirm-bar button { min-width: 110px; padding: 10px 24px; cursor: pointer; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.15em; color: #dff6ff; background: rgba(10,30,50,0.9); border: 1px solid rgba(110,200,255,0.9); border-radius: 4px; }
#rwnd-yes { border-color: rgba(255,120,120,0.9) !important; }
#rwnd-support { border-color: rgba(102,255,204,0.9) !important; color: #dffff4 !important; }
#rwnd-support.hidden { display: none; }
/* 補給機のHUDの一言(2026-11-13。supply-sim.js): 照準の下に小さく。つないでいる間は明るく */
#supply-status { position: fixed; left: 50%; top: calc(50% + min(120px, 16vh)); transform: translateX(-50%); z-index: 14; pointer-events: none; white-space: nowrap;
  font: 700 var(--fs-small)/1 var(--font-hud); letter-spacing: 0.12em; color: #9fffe0; opacity: 0.8; text-shadow: 0 0 8px rgba(102,255,204,0.7); }
#supply-status.linked { opacity: 1; color: #d8fff2; }
#supply-status.hidden, body.summary-open #supply-status { display: none; }
/* 支援要請の印(2026-10-30): 支援を受けている間、画面の左上に小さく出す */
#support-mark { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); z-index: 14; display: flex; align-items: center; gap: 5px; pointer-events: none;
  font: 700 var(--fs-small)/1 var(--font-hud); letter-spacing: 0.12em; color: #9fffe0; text-shadow: 0 0 8px rgba(102,255,204,0.7); }
#support-mark.hidden, body.summary-open #support-mark { display: none; }
#support-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.game-menu-item.disabled { opacity: 0.4; cursor: default; }
/* TIPS(2026-10-15。tips.js): チュートリアルのナビの枠に合わせた小さめの枠。押せない・時間は止めない・音は出さない。
   場面ごとの位置はクラスで変える(tip-hud: 再出撃待ち・帰投して回復。HUDのパネルの上の中央) */
#tip {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 11; width: max-content; max-width: min(520px, 90vw);
  padding: 6px 14px 7px; white-space: pre-line; text-align: center; pointer-events: none; box-sizing: border-box;
  font: var(--fs-small)/1.6 var(--font-text); color: #eff; background: rgba(10,30,24,0.72); border: 1px solid rgba(102,255,170,0.45);
  animation: tip-enter 0.4s ease-out;
}
#tip.hidden { display: none; }
/* ミラの顔(2026-10-25 オーナー要望)。窓の左に、文字2行分の高さで小さく(operator-face.js) */
#tip { --face-lines: 2; --face: calc(var(--fs-small) * 1.6 * var(--face-lines)); padding-left: calc(var(--face) + 24px); min-height: calc(var(--face) + 14px); display: flex; flex-direction: column; justify-content: center; }
#tip .operator-face { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
#tip.tip-lobby, #tip.tip-summary { position: relative; left: auto; } /* 顔を窓の中に置く基準(static のままだと顔が画面に対して動く)。left: 50% を外す(残すと窓が右へ半分ずれて画面の外に出る。2026-10-25 全体テストで判明) */
#tip .tip-label { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.16em; color: #6fa; }
/* サマリの「今回の見どころ」(2026-11-15。mila-recall.js): TIPS の上の1行。その試合のことなので、TIPS より少し大きく明るく */
#tip-recall { font-size: calc(var(--fs-small) * 1.12); font-weight: 700; color: #fff; }
#tip-recall:not(.hidden) + .tip-label:not(.hidden) { margin-top: 4px; }
#tip-recall.hidden, #tip .tip-label.hidden, #tip-text.hidden { display: none; }
#tip.tip-hud { bottom: calc(31dvh + env(safe-area-inset-bottom)); }
/* tip-lobby: MULTI PLAYの相手待ち。最初の画面の並びの中で、MULTI PLAYの枠のすぐ下(枠と同じ幅) */
#tip.tip-lobby { position: relative; transform: none; width: var(--menu-w); max-width: none; }
/* tip-summary: 決着の結果の画面。中身のいちばん上に、横いっぱい(最大760px)で置く(2026-11-18 総点検 段4。前は下の帯のボタンの上) */
#tip.tip-summary {
  position: relative; transform: none; left: auto; grid-column: 1 / -1; justify-self: center; width: min(760px, 100%); max-width: none; margin: 0;
  text-align: left; background: rgba(4,20,16,0.8); animation: none; --face-lines: 2.4;
}
#tip.tip-summary #tip-recall { font-size: var(--fs-body); }
@keyframes tip-enter { from { opacity: 0; } to { opacity: 1; } }
/* 「詳しく」(2026-10-29。tips.js の howto): HOW TO PLAY のそのカードを開く。サマリのTIPSと一覧の行だけ。窓は押せないので、ボタンだけ押せるようにする */
.tip-more { align-self: flex-end; margin-top: 2px; padding: 2px 0 2px 8px; pointer-events: auto; cursor: pointer; background: none; border: 0; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.14em; color: #6fa; }
.tip-more::after { content: " \203A"; }
.tip-more:hover, .tip-more:focus-visible { color: #cfe; text-decoration: underline; text-underline-offset: 3px; }
.tip-more.hidden { display: none; }
body.summary-open #tip.tip-hud, body.map-open #tip, body.replay-mode #tip, body.menu-open #tip { display: none; }
/* 試合の始めの操作の案内(P1。最初の数試合だけ。HUDのパネルの上に1行) */
#control-hint {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 11; width: max-content; max-width: min(640px, 92vw);
  bottom: calc(31dvh + env(safe-area-inset-bottom)); padding: 6px 14px 7px; box-sizing: border-box; text-align: center; pointer-events: none;
  font: var(--fs-small)/1.6 var(--font-text); color: #eff; background: rgba(10,30,24,0.72); border: 1px solid rgba(102,255,170,0.45);
  animation: tip-enter 0.4s ease-out;
}
body.touch-device #control-hint { max-width: calc(100vw - 150px); } /* 右端のレバー・ボタンに重ならない幅(折り返す) */
#control-hint.coach { white-space: pre; }
body.touch-device #control-hint.coach { white-space: normal; }
#control-hint.hidden, body.summary-open #control-hint, body.map-open #control-hint, body.replay-mode #control-hint, body.menu-open #control-hint { display: none; }
#return-button {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 12; cursor: pointer;
  padding: 6px 18px; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; color: #fff;
  background: rgba(200,60,60,0.35); border: 1px solid rgba(255,120,120,0.85);
}
#return-button.hidden { display: none; }
/* SHIELDが減ったときに母艦へ戻る手段に気づけるよう、脈打つように光らせる(P6。2026-10-21 オーナー決定) */
#return-button:not(.hidden) { animation: return-glow 1.2s ease-in-out infinite; }
@keyframes return-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,120,120,0.35); background: rgba(200,60,60,0.35); }
  50% { box-shadow: 0 0 18px 4px rgba(255,140,140,0.95); background: rgba(220,70,70,0.7); }
}
#mission-nav {
  position: fixed; top: 120px; left: 50%; transform: translateX(-50%); z-index: 11; width: max-content; max-width: min(560px, 90vw);
  padding: 10px 18px; white-space: pre-line; text-align: center; pointer-events: none;
  font: var(--fs-body)/1.6 var(--font-text); color: #eff; background: rgba(10,30,24,0.75); border: 1px solid rgba(102,255,170,0.6);
}
#mission-nav.hidden { display: none; }
/* 撃墜したときの褒め言葉: 画面の真ん中より少し上に、顔と大きな文字で弾むように */
#praise { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 12; display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px; pointer-events: none;
  background: rgba(10,30,24,0.82); border: 1px solid rgba(102,255,170,0.7); color: #fff; font: 800 calc(var(--fs-body) * 1.9)/1.2 var(--font-text); white-space: nowrap;
  animation: praise-pop 0.45s cubic-bezier(.2,1.6,.4,1) both; }
#praise .operator-face { --face: 64px; flex: none; }
body.screen-compact #praise .operator-face { --face: 48px; }
#praise.hidden, body.summary-open #praise, body.menu-open #praise, body.replay-mode #praise { display: none; }
/* 味方の母艦を撃ったときのミラの注意(2026-11-07 オーナー要望)。褒め言葉と同じ形で、枠を赤くする */
#friendly-warn { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 12; display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px; pointer-events: none;
  background: rgba(40,10,10,0.86); border: 1px solid rgba(255,110,100,0.8); color: #fff; font: 800 calc(var(--fs-body) * 1.9)/1.2 var(--font-text); white-space: nowrap;
  animation: praise-pop 0.45s cubic-bezier(.2,1.6,.4,1) both; }
#friendly-warn .operator-face { --face: 64px; flex: none; }
body.screen-compact #friendly-warn .operator-face { --face: 48px; }
#friendly-warn.hidden, body.summary-open #friendly-warn, body.menu-open #friendly-warn, body.replay-mode #friendly-warn { display: none; }
@keyframes praise-pop { from { transform: translate(-50%, -50%) scale(0.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
/* BASIC の SKIP(A14): 初めての流れで入ったときの最初の案内だけ。照準モード(マウスが隠れている)の間は押せないので出さない(MENU の QUIT でも抜けられる) */
#mission-nav .nav-buttons { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
/* OK(SKIP の横。押すと再開。中身は枠の外を押したときと同じ)。止めている間だけ出す */
#tutorial-ok {
  pointer-events: auto; cursor: pointer; padding: 4px 26px; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.16em;
  color: #04140c; background: #6fa; border: 1px solid #6fa;
}
#tutorial-ok:hover { background: #9fc; }
body:not(.tutorial-paused) #tutorial-ok { display: none; }
#tutorial-skip {
  display: block; margin: 0; pointer-events: auto; cursor: pointer; padding: 4px 20px;
  font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.16em; color: #cfe; background: rgba(10,30,24,0.6); border: 1px solid rgba(102,255,170,0.5);
}
#tutorial-skip:hover { background: rgba(102,255,170,0.25); }
#mission-nav.skip-locked #tutorial-skip { display: none; }
/* スマホ: 止めて読ませた案内は、再開したら1行に縮める。触ると広がる(2026-11-04 オーナー決定。初回プレイの点検 B15) */
#mission-nav.collapsed { pointer-events: auto; cursor: pointer; padding-top: 4px; padding-bottom: 4px; }
#mission-nav.collapsed .nav-text br { display: none; }
#mission-nav.collapsed .operator-face, #mission-nav.collapsed .nav-speaker { display: none; }
#mission-nav.collapsed .nav-head { margin-bottom: 0; }
#mission-nav.collapsed .nav-buttons { display: none; }
/* 縮めたときは顔の分の余白・最小の高さを持たず、段階の棒と文を1行に並べる(顔つきの枠・縦持ちの枠より強くする。2026-11-05 オーナー報告「スマホの案内が崩れる」) */
#mission-nav.collapsed, #mission-nav.collapsed.has-face { display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 20px); min-height: 0; padding: 4px 12px; text-align: left; }
#mission-nav.collapsed .nav-head, #mission-nav.collapsed .nav-head:not(:has(.nav-speaker)) { flex: none; justify-content: flex-start; margin: 0; }
/* 本文は省略(…)で切らず、折り返して全部出す(出す文は最初の行だけ。nav-text.js。行数の上限は tests/nav-text-layout.spec.js) */
#mission-nav.collapsed .nav-text { flex: 1 1 auto; min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; text-align: left; }
#mission-nav.collapsed .nav-progress { width: 36px; }
body.summary-open:not(.highlight-mode) #mission-nav { display: none; } /* 結果画面では出さない(名場面の間は勝った後の案内を出したまま。2026-10-21) */
/* チュートリアルの案内(2026-10-14): 段階の行(STEP 3/8)・操作の名前の枠・CLEAR・出てくる動き */
#mission-nav .nav-step { font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.12em; color: #6fa; white-space: pre; }
/* 上の行: 左に話し手(コールサインと通信の印。U4)、右に段階の行 */
/* 段階は進み具合の棒(C5)。「STEP 2/10」の文字は読み上げ用に残して隠す */
#mission-nav .nav-step { display: inline-flex; align-items: center; gap: 8px; }
#mission-nav .nav-step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#mission-nav .nav-progress { display: inline-block; width: 72px; height: 5px; border-radius: 3px; background: rgba(102,255,170,0.18); overflow: hidden; }
#mission-nav .nav-count::after { content: attr(data-count); }
#mission-nav .nav-progress-fill { display: block; height: 100%; background: #6fa; transition: width 0.4s ease-out; }
#mission-nav .nav-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 4px; }
#mission-nav .nav-head:not(:has(.nav-speaker)) { justify-content: center; }
#mission-nav .nav-speaker { display: flex; align-items: center; gap: 6px; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.14em; color: #9fe; }
#mission-nav .nav-speaker svg { width: 20px; height: 14px; fill: #6fa; }
#mission-nav .nav-speaker rect { transform-origin: 50% 50%; transform-box: fill-box; transform: scaleY(0.35); }
#mission-nav .nav-speaker.talking rect { animation: nav-talk 0.6s ease-in-out infinite alternate; }
@keyframes nav-talk { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
/* オペレーター(ミラ)の顔(2026-10-25 オーナー決定。operator-face.js): 案内の枠の左に、文字3行分の高さで小さく出す(はっきり見せない)。
   枠は45°の切り欠き・走査線・光の帯・電波の棒(HUDと同じ言葉) */
.operator-face {
  position: relative; flex: none; width: var(--face); height: var(--face); overflow: hidden; background: #031a14;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); box-shadow: inset 0 0 0 1px rgba(102,255,170,0.7);
}
.operator-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75) brightness(1.05); }
.operator-face::before { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(rgba(102,255,170,0.2), rgba(102,255,170,0.05)), repeating-linear-gradient(0deg, rgba(0,0,0,0.3) 0 1px, transparent 1px 3px); }
.operator-face::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; pointer-events: none;
  background: linear-gradient(transparent, rgba(160,255,210,0.28), transparent); animation: operator-sweep 3.2s linear infinite; }
@keyframes operator-sweep { to { top: 110%; } }
.operator-face .of-sig { position: absolute; right: 5px; bottom: 4px; display: flex; gap: 1px; align-items: flex-end; z-index: 1; }
.operator-face .of-sig i { width: 2px; background: #6fa; box-shadow: 0 0 3px #6fa; }
.operator-face .of-sig i:nth-child(1) { height: 3px; } .operator-face .of-sig i:nth-child(2) { height: 5px; } .operator-face .of-sig i:nth-child(3) { height: 7px; }
#mission-nav.has-face { box-sizing: border-box; --face: calc(var(--fs-body) * 1.6 * var(--face-lines, 3)); padding-left: calc(var(--face) + 30px); min-height: calc(var(--face) + 20px); }
#mission-nav.has-face .operator-face { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
#mission-nav .nav-key, #tip .nav-key {
  display: inline-block; padding: 0 6px; margin: 0 1px; line-height: 1.35; font-family: var(--font-hud); color: #fff;
  border: 1px solid rgba(102,255,170,0.75); border-radius: 3px; background: rgba(102,255,170,0.14);
}
/* 出撃のあとの敵陣の俯瞰(2026-11-08。launch-overview.js): 見せている間はHUDを隠し、ミラの窓・敵の母艦の印・SKIPだけを出す。画面は暗くしない */
#overview-marks { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
/* 印の要素の (0,0) が機体の位置。枠(.box)はその点を中心に置き、文字は枠の下 */
.overview-mark { position: absolute; left: 0; top: 0; width: 0; height: 0; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.08em; color: #ff8a7a; text-shadow: 0 0 6px rgba(0,0,0,0.9); }
.overview-mark .box { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); box-sizing: border-box; }
.overview-mark.mother .box { border: 2px solid #ff5a4a; border-radius: 8px; background: rgba(255,90,74,0.08); box-shadow: 0 0 14px rgba(255,90,74,0.8), inset 0 0 12px rgba(255,90,74,0.45); animation: overview-glow 1.2s ease-in-out infinite alternate; }
.overview-mark.mother .label { position: absolute; left: 0; top: 0; white-space: nowrap; }
.overview-mark.pod .box { border: 2px solid #ff7a6a; transform: translate(-50%, -50%) rotate(45deg); background: rgba(255,90,74,0.25); box-shadow: 0 0 8px rgba(255,90,74,0.9); }
@keyframes overview-glow { from { box-shadow: 0 0 8px rgba(255,90,74,0.5), inset 0 0 8px rgba(255,90,74,0.3); } to { box-shadow: 0 0 20px rgba(255,90,74,1), inset 0 0 14px rgba(255,90,74,0.55); } }
#overview-skip { display: none; position: fixed; right: 16px; top: 16px; z-index: 12; padding: 10px 26px; cursor: pointer; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.1em; color: #dff; background: rgba(0,20,16,0.7); border: 1px solid rgba(102,255,204,0.7); }
#overview-skip:hover { background: rgba(102,255,170,0.25); }
body.launch-overview #overview-skip { display: block; }
body.launch-overview #tutorial-dim { opacity: 0; }
body.launch-overview #target-overlay, body.launch-overview #speed-lines { display: none; }
body.launch-overview > *:not(canvas):not(#mission-nav):not(#tutorial-dim):not(#overview-skip):not(#overview-marks):not(#game-menu):not(#notice):not(#power-overlay):not(#fps-counter):not(#howto):not(#screen-loading):not(script):not(style) { display: none !important; }
#mission-nav .nav-clear { font: 700 calc(var(--fs-body) * 1.8) var(--font-hud); letter-spacing: 0.3em; color: #6fa; text-shadow: 0 0 12px rgba(102,255,170,0.7); }
#mission-nav.enter { animation: nav-enter 0.35s ease-out; }
/* 出し終わって、何か操作すると再開する間: 枠のすぐ下のまん中に大きな▼を点滅させる(2026-10-21 オーナー決定。前は右下の小さな▼で気づきにくかった) */
#mission-nav .nav-untyped, #mission-nav .nav-untyped .nav-key { visibility: hidden; }
/* 文にマウスの操作があるとき、窓の右に出す押す所が光るマウスの絵(2026-11-19。mouse-icon.js)。チュートリアルで止めて説明している間だけ */
#mission-nav .nav-mouse { display: none; position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); width: 64px; height: 82px; padding: 8px 6px; color: #6fa; background: rgba(10,30,24,0.75); border: 1px solid rgba(102,255,170,0.6); }
body.tutorial-paused #mission-nav .nav-mouse { display: block; }
#mission-nav .nav-mouse .mouse-icon { width: 100%; height: 100%; overflow: visible; }
.mouse-icon .mi-line { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 1.5px currentColor); }
.mouse-icon .mi-lit { fill: currentColor; filter: drop-shadow(0 0 4px currentColor) brightness(1.4); }
.mouse-icon .mi-off { fill: none; }
/* 縦長の画面(窓が横いっぱい)では、マウスの絵を窓のすぐ下のまん中に出す */
@media (orientation: portrait) { #mission-nav .nav-mouse { left: 50%; top: calc(100% + 30px); transform: translateX(-50%); } }
#mission-nav.waiting::after {
  content: "▼"; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 4px;
  font-size: calc(var(--fs-body) * 1.5); line-height: 1; color: #6fa; text-shadow: 0 0 10px rgba(102,255,170,0.8); animation: nav-wait 1s steps(2) infinite;
}
/* 案内で試合を止めている間は、画面を少し暗くする(止まっていることが分かるように。2026-10-21 オーナー決定)。案内(z-index 11)より下 */
#tutorial-dim { position: fixed; inset: 0; z-index: 10; pointer-events: none; background: rgba(0,0,0,0.4); opacity: 0; transition: opacity 0.25s; }
body.tutorial-paused #tutorial-dim { opacity: 1; }
@keyframes nav-wait { 50% { opacity: 0; } }
@keyframes nav-enter { from { opacity: 0; transform: translateX(-50%) translateY(-8px); clip-path: inset(0 50% 0 50%); } to { opacity: 1; transform: translateX(-50%); clip-path: inset(0 0 0 0); } }
/* スマホの縦持ち: 案内が大きすぎてプレイの邪魔になるので、文字を小さく・行の間を詰めて高さを半分ほどに(2026-10-09 オーナー要望)。
   幅は画面の幅まで使う(left: 50% だけだと、幅が画面の半分に縮んで行が増えていた) */
@media (orientation: portrait) {
  #mission-nav { top: 96px; padding: 6px 12px; font-size: var(--fs-small); line-height: 1.4; }
  #mission-nav.has-face { box-sizing: border-box; max-width: calc(100vw - 20px); --face: calc(var(--fs-small) * 1.4 * var(--face-lines, 3)); padding-left: calc(var(--face) + 24px); min-height: calc(var(--face) + 12px); }
}
/* スマホの縦持ちで高さが低い画面(itch.ioの埋め込みなど。2026-11-03 オーナー報告「案内とレバーが重なって読めない」): 右のレバー(下から272px・高さ約150px)と
   上のSHIELD・SPEEDの文字・弧にかかって読めなかった。試合を止めている間(読む間)は、画面の真ん中に大きな窓で出す(レバー・ボタンより手前。周りを少し暗くする)。
   止めていない間(撃墜の段階など)は、枠を左に寄せ、右のレバーの手前までの幅にする */
@keyframes nav-enter-pop { from { opacity: 0; clip-path: inset(0 50% 0 50%); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@media (orientation: portrait) and (max-height: 640px) {
  body:not(.tutorial-paused) #mission-nav { left: 8px; transform: none; max-width: calc(100vw - 92px); animation: none; }
  body:not(.tutorial-paused) #mission-nav.has-face { max-width: calc(100vw - 92px); }
  body.tutorial-paused #mission-nav { z-index: 14; top: 56%; transform: translate(-50%, -50%); width: calc(100vw - 24px); max-width: 420px; padding: 10px 14px;
    font-size: 15px; line-height: 1.55; background: rgba(6,22,18,0.95); box-shadow: 0 0 0 100vmax rgba(0,0,0,0.35); }
  body.tutorial-paused #mission-nav.enter { animation: nav-enter-pop 0.35s ease-out; }
  body.tutorial-paused #mission-nav.has-face { max-width: 420px; padding-left: calc(var(--face) + 26px); }
}
/* スマホの横持ち(高さが低い画面。2026-10-23 オーナー報告「ほぼテキストボックスで見えない」): 画面の真ん中を隠していたので、
   文字を小さく・行を詰めて、上の時計・ENERGY の下まで上げる */
@media (orientation: landscape) and (max-height: 500px) {
  #mission-nav { top: 74px; padding: 3px 10px; font-size: var(--fs-small); line-height: 1.35; max-width: min(560px, 76vw); }
  #mission-nav.has-face { --face: calc(var(--fs-small) * 1.35 * var(--face-lines, 3)); padding-left: calc(var(--face) + 24px); min-height: calc(var(--face) + 8px); }
  #mission-nav .nav-head { margin-bottom: 1px; }
  #mission-nav .nav-clear { font-size: calc(var(--fs-body) * 1.3); }
}
/* 省電力のための停止(中断・休止・離脱)の案内。どこをクリック・タップしても再開する(離脱は「最初の画面に戻る」だけ) */
#power-overlay {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; text-align: center; cursor: pointer;
  background: rgba(0,0,0,0.72); color: #eff; font-family: var(--font-text);
}
#power-overlay.hidden, #power-back.hidden { display: none; }
#power-title { font: 700 var(--fs-title) var(--font-hud); letter-spacing: var(--tracking-label); }
#power-text { font-size: var(--fs-body); color: #cfe; max-width: 32em; line-height: 1.7; }
#power-back {
  font: var(--fs-body) var(--font-text); padding: 8px 18px; cursor: pointer;
  background: rgba(102,255,170,0.15); color: #cfe; border: 1px solid rgba(102,255,170,0.6);
}
/* タッチ操作(スマホなど。2026-10-02〜03 オーナー決定。touch-input.js): 右中央にスロットルレバー、下の段に右から射撃・サーベル・SLOW、
   右下の隅にメニュー(≡)。縦持ちでは、HUDの板に重ならないよう右端に縦一列(上からレバー・射撃・サーベル・SLOW・メニュー)に並べる。
   ◀ ▶(他の機体を見る)は、自動運転中とリプレイ中だけ左端の中ほどに出す */
body.touch-device, body.touch-device canvas, body.touch-capable, body.touch-capable canvas { touch-action: none; -webkit-user-select: none; user-select: none; }
#touch-ui { display: none; }
body.touch-device.game-started #touch-ui { display: block; } /* 試合を始めてから出す */
/* サマリ・全体マップの間は隠す。上の「試合を始めたら出す」より優先されるよう、同じ条件を足して書く
   (2026-10-10: 前は優先されず、試合終了の画面にボタンが透けて重なっていた) */
body.touch-device.game-started.summary-open #touch-ui, body.summary-open #touch-ui,
body.touch-device.game-started.map-open #touch-ui, body.map-open #touch-ui { display: none; }
/* PC(タッチでない端末)のプレイ中は、右下に常にMENUの案内(2026-10-22 オーナー要望)。Escと同じMENUが開く。
   照準モード中はカーソルが隠れてクリックできないので、Escを押すことを示す表示を兼ねる(照準モードを外している間は、クリックでも開く) */
#pc-menu-button { display: none; }
/* チュートリアルでMENUを開かせる間、MENUのボタンを光らせる */
#pc-menu-button.tutorial-glow, #touch-ui #touch-menu-button.tutorial-glow { border-color: #ffe36b; color: #ffe36b; box-shadow: 0 0 14px 3px rgba(255,227,107,0.7); animation: menu-button-glow 0.8s steps(2, jump-none) infinite; }
@keyframes menu-button-glow { from { box-shadow: 0 0 4px 1px rgba(255,227,107,0.3); } to { box-shadow: 0 0 16px 4px rgba(255,227,107,0.9); } }
body.game-started:not(.touch-device):not(.summary-open):not(.map-open):not(.replay-mode):not(.highlight-mode):not(.menu-open) #pc-menu-button {
  display: block; position: fixed; right: 14px; bottom: 12px; z-index: 13; padding: 6px 12px; cursor: pointer;
  font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.12em; color: #9fe; background: rgba(0,20,16,0.55); border: 1px solid rgba(102,255,170,0.5); border-radius: 3px;
}
/* オートパイロットのレベルのボタン(2026-11-27 オーナー決定。session-semi-auto.js): ミッションの試合の間だけ。押すたびに OFF → Lv.1 → Lv.2。
   ゲージは出さず、色で状態を補う(OFF 灰・Lv.1 緑・Lv.2 金)。PC は MENU のすぐ上に MENU と同じ大きさ、タッチは右下の隅に小さく2行 */
#autopilot-button { display: none; color: #9fe; background: rgba(0,20,16,0.55); border: 1px solid rgba(102,255,170,0.5); } /* 色は下の [data-level] で替える(位置の行より前に置き、詳細度で負けないように色だけここ) */
body.autopilot-button-shown.game-started:not(.summary-open):not(.map-open):not(.replay-mode):not(.highlight-mode):not(.menu-open) #autopilot-button {
  display: block; position: fixed; z-index: 13; cursor: pointer; box-sizing: border-box;
  font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.12em; white-space: nowrap; border-radius: 3px;
  right: 14px; bottom: 52px; padding: 0 12px; min-width: 135px; height: 34px; text-align: center; /* MENU(#pc-menu-button 135×34)と同じ大きさ */
}
#autopilot-button[data-level="0"] { color: #9aa6ad; border-color: rgba(160,175,185,0.45); }
#autopilot-button[data-level="1"] { color: #6fa; border-color: rgba(102,255,170,0.8); background: rgba(0,40,24,0.6); }
#autopilot-button[data-level="2"] { color: #ffe36b; border-color: rgba(255,227,107,0.8); background: rgba(40,32,0,0.6); }
body.touch-device.autopilot-button-shown.game-started:not(.summary-open):not(.map-open):not(.replay-mode):not(.highlight-mode):not(.menu-open) #autopilot-button {
  right: calc(14px + env(safe-area-inset-right)); bottom: calc(6px + env(safe-area-inset-bottom)); width: 60px; min-width: 0; height: auto; padding: 3px 0; border-radius: 8px;
  line-height: 1.25; letter-spacing: 0.06em; text-align: center; touch-action: manipulation;
}
/* 横向きのタッチは右下の隅に ≡ があるので、その上に置く */
@media (orientation: landscape) {
  body.touch-device.autopilot-button-shown.game-started:not(.summary-open):not(.map-open):not(.replay-mode):not(.highlight-mode):not(.menu-open) #autopilot-button { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
body.replay-mode #touch-ui #touch-lever, body.replay-mode #touch-ui #touch-fire, body.replay-mode #touch-ui #touch-slash, body.replay-mode #touch-ui #touch-slow, body.replay-mode #touch-ui #touch-amro { display: none; } /* #touch-ui #touch-slow の display:flex(id2つ)に負けないよう同じ詳細度にそろえる */ /* リプレイ中は◀ ▶と閉じるボタンだけ */
#touch-ui button {
  touch-action: manipulation; padding: 4px 8px; border-radius: 10px;
  font: 700 var(--fs-small) var(--font-text); color: #cfe; background: rgba(10,20,18,0.55); border: 1px solid rgba(102,255,170,0.6);
}
#touch-ui button.on { background: rgba(102,255,170,0.35); color: #fff; }
#touch-ui button:disabled { opacity: 0.35; }
#touch-ui button.hidden { display: none; }
#touch-lever {
  position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 12; width: 64px; touch-action: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 var(--fs-small) var(--font-hud); color: #cfe;
}
#touch-lever .lever-track {
  position: relative; width: 44px; height: 150px; border-radius: 22px;
  background: rgba(10,20,18,0.55); border: 1px solid rgba(102,255,170,0.6);
}
#touch-lever .lever-zero { position: absolute; left: 6px; right: 6px; top: 50%; border-top: 1px dashed rgba(150,255,180,0.6); }
#touch-lever .lever-knob {
  position: absolute; left: 3px; right: 3px; top: 50%; height: 28px; margin-top: -14px; border-radius: 14px;
  background: rgba(102,255,170,0.45); border: 1px solid #9fe;
}
#touch-lever.tutorial-glow .lever-track { border-color: #ffe36b; box-shadow: 0 0 14px 3px rgba(255,227,107,0.7); animation: menu-button-glow 0.8s steps(2, jump-none) infinite; } /* 前進の案内の間(2026-10-24 オーナー要望) */
#touch-lever .lever-knob.back { background: rgba(255,170,90,0.45); border-color: #fc9; }
#touch-ui #touch-fire { position: fixed; right: 88px; bottom: 20px; z-index: 12; width: 92px; height: 92px; border-radius: 18px; } /* ボタンは丸ではなく角丸の矩形にそろえる(2026-10-21 オーナー決定) */
#touch-ui #touch-slash { position: fixed; right: 192px; bottom: 30px; z-index: 12; width: 72px; height: 72px; border-radius: 16px; }
/* FIRE・SLASH・A.M.R.O.・S.L.O.W.のボタンに、文字の上へマークを付ける(2026-11-07 オーナー決定 案B: 照準/サーベルの弧と残光)。色は文字と同じ(currentColor)で、光る・鍵の表示にも追従 */
#touch-ui #touch-fire, #touch-ui #touch-slash, #touch-ui #touch-amro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.1; }
#touch-ui .touch-mark { width: 30px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
#touch-ui #touch-amro { padding: 4px 2px; white-space: nowrap; line-height: 1.1; }
#touch-ui #touch-slow .touch-mark { width: 20px; height: 20px; }
#touch-ui .touch-mark .dot { fill: currentColor; stroke: none; }
/* 高速回避(A.M.R.O.)のボタン(S3。2026-10-21 オーナー決定): 左下、SLASHと同じ高さ */
#touch-ui #touch-amro { position: fixed; left: calc(16px + env(safe-area-inset-left)); bottom: 30px; z-index: 12; width: 72px; height: 72px; border-radius: 16px; }
#touch-ui #touch-slow { position: fixed; right: 270px; bottom: 34px; z-index: 12; width: 60px; height: 64px; border-radius: 14px; opacity: 0.4; }
#touch-ui #touch-slow { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
#touch-ui #touch-slow small { font-size: var(--fs-small); letter-spacing: 0; font-weight: normal; white-space: nowrap; }
#touch-ui #touch-slow.emphasis { opacity: 1; border-color: #ff6a6a; color: #ff9a9a; }
#touch-ui #touch-slow.ready { opacity: 1; border-color: #ffd36a; color: #ffd36a; }
/* チュートリアルでまだ使えない操作のボタン(2026-11-04 オーナー決定。初回プレイの点検 B12): 暗くして鍵の札。解放の瞬間に光らせて「解放」の札 */
#touch-ui .touch-locked { opacity: 0.3 !important; filter: grayscale(1); }
#touch-ui .touch-locked::after, #touch-ui .touch-unlocked::after {
  content: attr(data-lock-tag); position: absolute; left: 50%; top: -9px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.1em; padding: 1px 5px; border-radius: 3px; color: #cfe; background: rgba(10,30,24,0.9); border: 1px solid rgba(102,255,170,0.5);
}
#touch-ui .touch-unlocked { opacity: 1 !important; border-color: #ffe36b; color: #ffe36b; box-shadow: 0 0 16px 4px rgba(255,227,107,0.75); animation: menu-button-glow 0.8s steps(2, jump-none) infinite; }
#touch-ui .touch-unlocked::after { color: #221a00; background: #ffe36b; border-color: #ffe36b; }
#touch-ui #touch-menu-button { position: fixed; right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 13; width: 44px; height: 44px; font-size: 22px; }
body.me-autopilot #touch-lever, body.me-semiauto #touch-lever { display: none; }
/* オートパイロットの Lv.2(2026-11-27): 人の4つの操作は効かないので、撃つ・SLASH・S.L.O.W.・A.M.R.O. のボタンも隠す(見ている扱い) */
body.me-autopilot-lv2 #touch-ui #touch-fire, body.me-autopilot-lv2 #touch-ui #touch-slash, body.me-autopilot-lv2 #touch-ui #touch-slow, body.me-autopilot-lv2 #touch-ui #touch-amro { display: none; } /* (#touch-ui #touch-slow の display:flex〈id2つ〉に負けないよう同じ詳細度) */
/* AUTOPILOT ON で AI が飛んでいる間は、照準(・)と照準の円を出さない(動かせないので。撃墜後の自由に飛ぶ間だけ出す。2026-11-24 オーナー) */
body.me-semiauto-aimlocked #crosshair, body.me-semiauto-aimlocked #aim-boundary { opacity: 0; } /* 自動運転中は、レバーの位置と実際の速度が食い違うので隠す(2026-10-03) */
/* カメラの切り替え(2026-10-03 オーナー決定): リプレイ中・自動運転中に、画面の左上の方に縦に3つ。PC・タッチ共通 */
#camera-ui {
  position: fixed; left: 12px; top: 18%; z-index: 14; display: flex; flex-direction: column; gap: 6px;
  font: 700 var(--fs-small) var(--font-hud); color: #9fe; text-align: center;
}
#camera-ui.hidden { display: none; }
/* 自動リプレイ(ハイライト。2026-10-05): 上部の案内と[Next]。流している間はリプレイの操作の表示を隠す */
#highlight-banner, #highlight-next { display: none; }
body.highlight-mode #highlight-banner {
  display: block; position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 32; padding: 6px 18px;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.15em; color: #fff; background: rgba(0,20,30,0.7); border: 1px solid #3aa;
  /* 1行に収める(2026-11-18 総点検 H1。スマホ縦で2行に折れ、下の行がミラの枠(#hl-mila)に隠れていた) */
  white-space: nowrap; max-width: calc(100vw - 16px); box-sizing: border-box; overflow: hidden; text-overflow: ellipsis;
}
body.screen-narrow.highlight-mode #highlight-banner { font-size: var(--fs-small); letter-spacing: 0.1em; padding: 6px 12px; }
/* 右下(2026-10-11): タッチの≡/✕(#touch-menu-button)が右下の隅。リプレイの戻る・ダイジェストのNextは、その上に置く(重ならない) */
body.highlight-mode #highlight-next {
  display: block; position: fixed; right: calc(12px + env(safe-area-inset-right)); bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 32; padding: 10px 28px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.15em; color: #cfe; background: rgba(10,20,18,0.8); border: 1px solid rgba(102,255,170,0.8);
}
/* ハイライトを丸ごと動画にするボタン(2026-11-14 オーナー決定。video-clip.js)。[Next]のすぐ上。試合の後のハイライトだけ(highlight-video)・MP4を作れるブラウザだけ */
#highlight-rec-btn { display: none; }
body.highlight-mode.highlight-video.video-rec-ok #highlight-rec-btn {
  display: block; position: fixed; right: calc(12px + env(safe-area-inset-right)); bottom: calc(124px + env(safe-area-inset-bottom)); z-index: 32; padding: 10px 18px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; color: #cfe; background: rgba(10,20,18,0.8); border: 1px solid rgba(102,255,170,0.8);
}
body.highlight-mode #highlight-rec-btn.recording { color: #fff; background: rgba(150,0,20,0.8); border-color: #ff5a6a; }
body.ending-roll-mode #highlight-rec-btn, body.clear-message-open #highlight-rec-btn { display: none !important; }
/* クリアイベントの文章(2026-10-25。clear-events.js の message): 振り返りの間、画面の下の中央に出す。右下のSKIPより上に置く(重ならない)。
   名場面が無くて振り返りを流せないときは、同じ枠にOKを付けて、全体マップへ戻る前に出す */
#clear-message {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(128px + env(safe-area-inset-bottom)); z-index: 33;
  width: min(680px, calc(100% - 32px)); box-sizing: border-box; padding: 14px 20px;
  font: 500 var(--fs-body) var(--font-text); line-height: 1.7; color: #eaf6f4; white-space: pre-line;
  background: rgba(0,16,24,0.82); border: 1px solid #3aa; border-left: 4px solid #6fc; pointer-events: none;
  opacity: 0; transition: opacity 0.8s ease;
}
@media (min-width: 1000px) { #clear-message { bottom: calc(24px + env(safe-area-inset-bottom)); } } /* 広い画面: SKIPと横に並ぶので下の端へ(機体にかぶりにくい) */
#clear-message .cm-row { display: flex; gap: 14px; align-items: flex-start; }
#clear-message .operator-face { --face: calc(var(--fs-body) * 1.7 * var(--face-lines, 3)); width: calc(var(--face) * var(--face-aspect, 1)); }
#clear-message.shown { opacity: 1; }
#clear-message.hidden { display: none; }
#clear-message.standalone { top: 50%; bottom: auto; transform: translate(-50%, -50%); pointer-events: auto; z-index: 60; }
#clear-message button { display: none; }
body.clear-message-open #highlight-next { display: none !important; } /* OK待ちの間はSKIPを隠す(押し先はOKだけ) */
/* エンディング(2026-11-03 オーナー決定。ending-view.js): 画面いっぱいに重ねる。ミラの窓は大きく(試作の2倍。オーナー要望)、後ろは決着した戦場を暗く透かす。
   THANK YOU は1枚の絵を画面いっぱいに(PC: 絵を右に・文字を左に。縦長の画面: 絵を全面に・文字を下に) */
#ending { position: fixed; inset: 0; z-index: 70; color: #f2f7f7; font-family: var(--font-text); }
#ending.hidden, #ending .hidden { display: none !important; }
#ending .ending-veil { position: absolute; inset: 0; background: linear-gradient(rgba(3,6,9,0.35), rgba(3,6,9,0.78)); animation: ending-fade 1.2s ease both; }
#ending .ending-mira {
  position: absolute; left: max(24px, env(safe-area-inset-left)); bottom: calc(84px + env(safe-area-inset-bottom)); width: min(1040px, calc(100% - 48px)); box-sizing: border-box;
  display: flex; gap: 22px; align-items: flex-start; padding: 20px; background: rgba(6,19,26,0.87); border: 1px solid #2c6c64; border-left: 4px solid #6fc;
  animation: ending-rise 0.8s ease both;
}
#ending .ending-face { width: 208px; height: 208px; flex: none; object-fit: cover; object-position: 50% 30%; border: 1px solid #2c6c64; }
#ending .ending-body { flex: 1; min-width: 0; }
#ending .ending-who { font: 600 14px var(--font-hud); letter-spacing: 0.3em; color: #8ff3d6; }
#ending .ending-text { margin: 8px 0 0; font-size: 30px; line-height: 1.65; min-height: 3.3em; white-space: pre-line; }
#ending .ending-log { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(102,255,204,0.35); font: 500 17px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; line-height: 1.7; color: #8ff3d6; white-space: pre; overflow-x: auto; }
#ending .ending-log-line { display: block; min-height: 1.7em; }
#ending .ending-thanks { position: absolute; inset: 0; background: #030609; overflow: hidden; animation: ending-fade 1.6s ease both; }
#ending .ending-thanks img { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 1; max-width: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%); mask-image: linear-gradient(90deg, transparent, #000 16%); }
#ending .ending-thanks-text { position: absolute; left: 0; top: 40%; width: calc(100% - min(100vh, 100%)); box-sizing: border-box; padding: 0 16px; text-align: center; }
#ending .ending-thanks-text h1 { margin: 0; font: 300 clamp(22px, 3vw, 36px) var(--font-hud); letter-spacing: 0.3em; text-wrap: balance; text-shadow: 0 0 22px #000; }
#ending .ending-thanks-text p { margin: 12px 0 0; font: 400 12px var(--font-hud); letter-spacing: 0.4em; color: #8ff3d6; }
#ending .ending-thanks.sleep img { left: 0; width: 100%; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; }
#ending .ending-thanks.sleep .ending-thanks-text { width: 100%; top: auto; bottom: 12%; }
#ending-skip {
  position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); padding: 10px 32px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.15em; color: #f2f7f7; background: rgba(10,20,18,0.8); border: 1px solid #5fd4b0;
}
/* 記録のエンドロール(2026-11-03): 後ろの名場面は暗くしない。上下の黒帯、左上に記録の見出し、右にクレジット(下から上へ流す) */
body.ending-roll-mode #highlight-banner, body.ending-roll-mode #highlight-next { display: none !important; }
#ending .ending-veil.light { background: rgba(3,6,9,0.45); }
#ending .ending-roll { position: absolute; inset: 0; pointer-events: none; animation: ending-fade 1s ease both; }
#ending .ending-bar { position: absolute; left: 0; right: 0; height: 11%; background: #000; }
#ending .ending-bar.top { top: 0; } #ending .ending-bar.bottom { bottom: 0; }
#ending .ending-caption { position: absolute; top: 3.6%; left: max(24px, env(safe-area-inset-left)); right: 24px; display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 13px var(--font-hud); letter-spacing: 0.14em; color: #8ff3d6; }
#ending .ending-caption span:nth-child(2) { color: #f2f7f7; font-weight: 600; }
#ending .ending-caption span:nth-child(3) { color: #ffd36b; }
#ending .ending-credits { position: absolute; top: 11%; bottom: 11%; right: 0; width: min(42%, 520px); overflow: hidden; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.8) 28%);
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
#ending .ending-credits-list { position: absolute; left: 18%; right: 6%; top: 0; display: flex; flex-direction: column; gap: 30px; text-align: center; will-change: transform; }
#ending .ending-credits.still .ending-credits-list { top: 50%; transform: translateY(-50%) !important; }
#ending .ending-credit-title { font: 500 12px var(--font-hud); letter-spacing: 0.3em; color: #8ff3d6; }
#ending .ending-credit-line { margin-top: 6px; font-size: 18px; line-height: 1.5; color: #f2f7f7; }
#ending .ending-credit-you { margin-top: 6px; font: 600 24px var(--font-hud); letter-spacing: 0.16em; color: #ffd36b; }
/* パイロットの名簿(CAST — PILOT RECORD) */
#ending .ending-names { position: absolute; right: max(28px, env(safe-area-inset-right)); top: 12%; width: min(46%, 540px); box-sizing: border-box; padding: 18px 20px; background: rgba(0,0,0,0.75); border: 1px solid #2c6c64; animation: ending-fade 0.8s ease both; }
#ending .ending-names h3 { margin: 0 0 12px; font: 400 12px var(--font-hud); letter-spacing: 0.32em; color: #8ff3d6; }
#ending .ending-names-list { font: 500 14px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; line-height: 1.9; color: #8ff3d6; white-space: pre; overflow: hidden; }
#ending .ending-names-line { display: block; min-height: 1.9em; }
#ending .ending-names-line.active { color: #ffd36b; }
#ending .ending-names-sum { margin-top: 10px; font: 500 11px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #b9d4d2; letter-spacing: 0.06em; }
/* エンドロール・名簿の間のミラの一言は、窓を少し小さく(名場面・名簿を隠しすぎない) */
#ending .ending-mira.small { width: min(760px, calc(100% - 48px)); padding: 14px; gap: 16px; bottom: calc(11% + 14px); }
#ending .ending-mira.small .ending-face { width: 136px; height: 136px; }
#ending .ending-mira.small .ending-text { font-size: 24px; min-height: 0; }
#ending .ending-mira.leaving { opacity: 0; transition: opacity 0.8s ease; }
/* 開発者のあいさつ・戦歴の碑(2026-11-03) */
#ending .ending-veil.dark { background: rgba(3,6,9,0.88); }
#ending .ending-dev { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(820px, calc(100% - 48px)); box-sizing: border-box; padding: 28px 32px; background: rgba(6,19,26,0.9); border: 1px solid #2c6c64; animation: ending-fade 1s ease both; }
#ending .ending-dev-who { font: 500 13px var(--font-hud); letter-spacing: 0.3em; color: #8ff3d6; }
#ending .ending-dev-text { margin: 12px 0 0; font-size: 22px; line-height: 1.8; min-height: 5.4em; }
#ending .ending-dev-sign { margin-top: 10px; text-align: right; font: 500 15px var(--font-hud); letter-spacing: 0.2em; color: #b9d4d2; }
#ending .ending-record { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(880px, calc(100% - 32px)); max-height: calc(100% - 100px); overflow: auto; box-sizing: border-box; padding: 26px 30px; background: rgba(5,16,24,0.95); border: 1px solid #2c6c64; animation: ending-fade 1s ease both; }
#ending .ending-record-eb { font: 500 12px var(--font-hud); letter-spacing: 0.3em; color: #8ff3d6; }
#ending .ending-record-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }
#ending .ending-record-pilot { font: 600 32px var(--font-hud); letter-spacing: 0.04em; white-space: pre; }
#ending .ending-record-sub { margin-top: 4px; font-size: 15px; color: #b9d4d2; white-space: pre; }
#ending .ending-record-clsbox { text-align: right; }
#ending .ending-record-clslab { font: 500 11px var(--font-hud); letter-spacing: 0.24em; color: #8ff3d6; }
#ending .ending-record-cls { margin-top: 4px; font: 600 28px var(--font-hud); color: #ffd36b; }
#ending .ending-record-clssub { font: 400 11px var(--font-hud); letter-spacing: 0.3em; color: #b9d4d2; }
#ending .ending-record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
#ending .ending-record-grid > div { padding: 10px 12px; background: rgba(143,243,214,0.06); font-size: 13px; color: #b9d4d2; }
#ending .ending-record-grid b { display: block; margin-top: 4px; font: 600 22px var(--font-hud); color: #f2f7f7; }
#ending .ending-record-goal { margin-top: 16px; font: 500 16px var(--font-hud); color: #ffd36b; }
#ending .ending-record-red { margin-top: 10px; min-height: 3.4em; font: 500 14px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; line-height: 1.7; color: #ff8f8f; }
#ending .ending-red-line { display: block; }
#ending .ending-record-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#ending .ending-record-btns button { padding: 9px 20px; cursor: pointer; font: 600 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; color: #cfe; background: rgba(10,20,18,0.8); border: 1px solid rgba(102,255,170,0.6); }
#ending .ending-record-note { margin-top: 8px; min-height: 1.4em; font-size: 13px; color: #8ff3d6; }
@keyframes ending-fade { from { opacity: 0; } }
@keyframes ending-rise { from { opacity: 0; transform: translateY(8px); } }
@media (orientation: portrait) {
  #ending .ending-mira { left: 12px; right: 12px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); padding: 12px; gap: 12px; flex-direction: column; }
  #ending .ending-face { width: 144px; height: 144px; }
  #ending .ending-who { font-size: 11px; }
  #ending .ending-text { font-size: 21px; min-height: 0; }
  #ending .ending-log { font-size: 11px; }
  #ending .ending-thanks img { left: 0; width: 100%; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; object-position: 43% 50%; }
  #ending .ending-thanks.sleep img { object-position: 58% 50%; }
  #ending .ending-thanks.sleep .ending-thanks-text { bottom: 0; }
  #ending .ending-bar { display: none; }
  #ending .ending-caption { top: calc(12px + env(safe-area-inset-top)); left: 14px; font-size: 11px; gap: 2px 10px; text-shadow: 0 0 6px #000; }
  #ending .ending-credits { top: auto; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0; right: 0; width: auto; height: 36%; background: linear-gradient(transparent, rgba(3,6,9,0.92) 22%); }
  #ending .ending-credits-list { left: 8%; right: 8%; gap: 22px; }
  #ending .ending-credit-line { font-size: 15px; }
  #ending .ending-names { left: 12px; right: 12px; width: auto; top: calc(8% + env(safe-area-inset-top)); padding: 12px; }
  #ending .ending-names-list { font-size: 10.5px; }
  #ending .ending-mira.small { left: 12px; right: 12px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); flex-direction: row; align-items: center; padding: 10px; gap: 12px; }
  #ending .ending-mira.small .ending-face { width: 88px; height: 88px; }
  #ending .ending-mira.small .ending-text { font-size: 17px; }
  #ending .ending-dev { padding: 18px; } #ending .ending-dev-text { font-size: 17px; }
  #ending .ending-record { top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); max-height: calc(100% - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 16px; }
  #ending .ending-record-row { flex-direction: column; gap: 8px; } #ending .ending-record-clsbox { text-align: left; }
  #ending .ending-record-pilot { font-size: 24px; } #ending .ending-record-cls { font-size: 22px; }
  #ending .ending-record-grid { grid-template-columns: repeat(2, 1fr); } #ending .ending-record-grid b { font-size: 18px; }
  #ending .ending-record-red { font-size: 11px; }
  #ending[data-scene="look"] .ending-mira.small { bottom: calc(36% + 76px + env(safe-area-inset-bottom)); }
  #ending .ending-thanks-text { width: 100%; top: auto; bottom: 0; padding: 60px 16px calc(78px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,0.8) 55%); }
}
@media (orientation: landscape) and (max-height: 520px) { /* 横向きの小さな画面: 窓を小さく */
  #ending .ending-mira { bottom: calc(64px + env(safe-area-inset-bottom)); padding: 12px; gap: 14px; }
  #ending .ending-face { width: 112px; height: 112px; }
  #ending .ending-text { font-size: 18px; min-height: 0; }
  #ending .ending-log { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { #ending .ending-veil, #ending .ending-mira, #ending .ending-thanks { animation: none; } }
/* プレイ後の小窓のシステムログ(2026-11-01。ミッションの debriefLog): 文の下に、等幅の英字で1行ずつ打ち込まれるように出す(行ごとに少し遅れて左から現れる) */
#clear-message-log { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(102,255,204,0.35); font: 500 var(--fs-small) ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; line-height: 1.6; color: #8fd; letter-spacing: 0.04em; white-space: pre; overflow-x: auto; }
/* ↑ 窓の幅に入らない行があるときは、ログの欄だけ字を小さくして1行に収める(2026-11-19 オーナー決定。字の下限13pxの例外。session-highlight-clip.js の fitClearLogFont) */
#clear-message-log.hidden { display: none; }
#clear-message-log .log-head { display: block; margin-bottom: 4px; color: #6cb; opacity: 0.8; letter-spacing: 0.12em; font-family: var(--font-hud); }
#clear-message-log .log-line { display: block; clip-path: inset(0 100% 0 0); animation: clear-log-type 0.7s steps(24, end) forwards; }
@keyframes clear-log-type { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { #clear-message-log .log-line { animation: none; clip-path: none; } }
#clear-message.standalone button {
  display: block; margin: 14px auto 0; padding: 8px 40px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.15em; color: #cfe; background: rgba(10,20,18,0.8); border: 1px solid rgba(102,255,170,0.8);
}
#replay-back {
  position: fixed; right: calc(12px + env(safe-area-inset-right)); bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 32; padding: 10px 28px; cursor: pointer;
  font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.15em;
}
#replay-back.hidden, body.highlight-mode #replay-back { display: none; }
#replay-overlay:empty { display: none !important; } /* 上に出すもの(PCの[H]操作の説明・R.W.N.D.の回数など)が無ければ枠ごと出さない(2026-11-23) */
body.highlight-mode #replay-overlay, body.highlight-mode #replay-seek, body.highlight-mode #replay-marks, body.highlight-mode #replay-info,
body.highlight-mode #camera-ui, body.highlight-mode #touch-ui, body.highlight-mode #target-overlay,
body.highlight-mode #round-info, body.highlight-mode #crosshair, body.highlight-mode #aim-boundary { display: none !important; }
/* リプレイ中は、上の中央の試合情報(ラウンド・時間)がリプレイの表示と重なるので隠す(2026-10-21 全部の画面の大きさで) */
body.replay-mode #round-info { display: none; }
#camera-ui button {
  width: 84px; height: 34px; touch-action: manipulation; cursor: pointer; border-radius: 4px;
  font: 700 var(--fs-small) var(--font-hud); color: #cfe; background: rgba(10,20,18,0.6); border: 1px solid rgba(102,255,170,0.6);
}
#camera-ui button:active { background: rgba(102,255,170,0.35); }
/* スマホの横持ち(高さが低い画面。2026-10-10 オーナー報告): 縦に4つ並べると、下のボタンが見ている機体の情報に隠れていた。
   2列にして上に寄せる */
@media (orientation: landscape) and (max-height: 500px) {
  #camera-ui { top: 48px; display: grid; grid-template-columns: repeat(2, auto); gap: 4px; }
  #camera-ui span { grid-column: 1 / -1; }
  #camera-ui button { width: 66px; height: 28px; }
}
/* 幅の狭い画面のリプレイ: 字を 13px に上げた分、情報枠の長い行(印の凡例)が画面からはみ出さないよう、幅を限って折る(2026-11-18 総点検 段2。指でなくても同じ) */
body.screen-narrow.replay-mode #replay-info { max-width: calc(100vw - 24px); box-sizing: border-box; white-space: pre-wrap !important; }
/* スマホ縦のリプレイ: シークバーが画面の下すぎて(ホームバーの近く)触りにくいので、バー・印・½x/▶/2x・情報枠をまとめて一段(28px)上げる(2026-11-05 オーナー要望)。
   ✕・戻るは触らない(右下のまま。バーは幅の20〜80%なので重ならない) */
@media (orientation: portrait) and (pointer: coarse) {
  body.replay-mode { --rs-lift: 48px; } /* 28px + 下の時間の分(20px) */
  /* 見ている機体の情報は、½×・‖・2× の上へ(同じ高さにあって ½× に重なっていた。2026-11-18 総点検 Y1。位置は session-spectate.js の style なので !important) */
  body.replay-mode:not(.spectate-mode) #replay-info { bottom: calc(104px + env(safe-area-inset-bottom) + var(--rs-lift, 0px)) !important; }
  /* 背の低いスマホ(高さ700px以下)は、左の列がカメラ・レーダー・機数でいっぱいで、上げた情報枠がそれに重なる。右側(UI/SHOT/REC の下、✕・戻るの上)へ移す */
  @media (max-height: 700px) {
    body.replay-mode:not(.spectate-mode) #replay-info { left: auto !important; right: calc(12px + env(safe-area-inset-right)); bottom: calc(150px + env(safe-area-inset-bottom)) !important; max-width: calc(100vw - 172px); white-space: pre-wrap !important; box-sizing: border-box; } /* 幅は左の列(レーダー・機数)に届かない所まで。長い行(英語)は折る */
  }
  /* ✕・戻るも隅にぎりぎり置かず、ボタンの半分ほど(22px)上へ・内へずらす(2026-11-05 オーナー要望)。✕(#touch-menu-button)の上に戻るがある並びは保つ */
  body.replay-mode #touch-ui #touch-menu-button { bottom: calc(34px + env(safe-area-inset-bottom)); right: calc(24px + env(safe-area-inset-right)); }
  body.replay-mode #replay-back { bottom: calc(90px + env(safe-area-inset-bottom)); right: calc(24px + env(safe-area-inset-right)); }
}
@media (orientation: portrait) {
  #touch-lever { top: auto; transform: none; bottom: 272px; }
  #touch-ui #touch-fire { right: 8px; bottom: 192px; width: 72px; height: 72px; }
  #touch-ui #touch-slash { right: 12px; bottom: 124px; width: 64px; height: 60px; }
  #touch-ui #touch-amro { left: auto; right: 86px; bottom: 124px; width: 64px; height: 60px; } /* SLASHの左隣: 右手の親指だけで届く(2026-11-10 オーナー要望。片手操作) */
  #touch-ui #touch-slow { right: 14px; bottom: 56px; width: 60px; height: 60px; }
  /* メニュー(≡)は右上の角へ(右下は親指で押し間違えやすい。2026-11-10 オーナー要望)。リプレイの✕・戻るは今までどおり右下 */
  body:not(.replay-mode) #touch-ui #touch-menu-button { bottom: auto; top: calc(12px + env(safe-area-inset-top)); }
}
/* 2人対戦のホスト: 相手が来たときに、続けるかやり直すかを選ぶ */
#join-prompt { position: fixed; inset: 0; z-index: 26; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.45); }
#join-prompt.hidden { display: none; }
#join-prompt-box {
  display: flex; flex-direction: column; gap: 12px; padding: 20px 28px; background: rgba(10,20,18,0.92);
  border: 1px solid rgba(102,255,170,0.6); color: #cfe; font: var(--fs-body) var(--font-text); text-align: center;
}
#join-prompt-box button {
  padding: 9px 16px; font: var(--fs-body) var(--font-text); cursor: pointer;
  background: rgba(102,255,170,0.1); color: #cfe; border: 1px solid rgba(102,255,170,0.4);
}
#join-prompt-box button:hover { background: rgba(102,255,170,0.25); }
/* MENU(Mキー)。ゲーム進行は止めず、マウスを照準モードから通常カーソルへ切り替えるためのオーバーレイ。
   今後の項目追加はmenuItems配列(JS側)を増やすだけでよいよう、見た目もリストを動的に組み立てる。 */
#game-menu {
  position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72); /* 窓の後ろをしっかり暗くする(2026-11-18 総点検 K3。前は 0.45 で、後ろの「MISSION」や赤い目標の字が窓の字に重なって見えた) */
}
#game-menu.hidden { display: none; }
#game-menu.over-map { z-index: 35; background-size: cover; background-position: center; } /* 全体マップ(30)の上・機体選択(40)の下(格納庫から開いた PROFILE・設定。2026-11-16) */
body.menu-open #crosshair, body.menu-open #aim-boundary { display: none; }
/* 最初の画面(試合を始める前)は照準の輪を出さない。ボタンの後ろに重なって読み込み中の印のように見えるため(2026-10-21 オーナー決定。初めての人の点検のT8) */
body:not(.game-started) #crosshair, body:not(.game-started) #aim-boundary { display: none; }
body.replay-mode #crosshair, body.replay-mode #aim-boundary, body.replay-mode #hint { display: none; }
body.spectate-mode #crosshair, body.spectate-mode #aim-boundary { display: none; }
/* ボタンの役割の色(2026-10-10 オーナー要望。全画面で同じ役割は同じ色): 進む・決める / 戻る / 捨てる(変更がなくなる) */
:root {
  --btn-primary-bg: rgba(102,255,170,0.85); --btn-primary-fg: #04170e; --btn-primary-border: #66ffaa;
  --btn-back-bg: transparent; --btn-back-fg: #9fe; --btn-back-border: rgba(102,255,170,0.45);
  --btn-danger-bg: rgba(255,90,90,0.12); --btn-danger-fg: #ff9c9c; --btn-danger-border: rgba(255,110,110,0.65);
}
.btn-primary { background: var(--btn-primary-bg) !important; color: var(--btn-primary-fg) !important; border: 1px solid var(--btn-primary-border) !important; font-weight: 700; }
.btn-back { background: var(--btn-back-bg) !important; color: var(--btn-back-fg) !important; border: 1px solid var(--btn-back-border) !important; }
.btn-danger { background: var(--btn-danger-bg) !important; color: var(--btn-danger-fg) !important; border: 1px solid var(--btn-danger-border) !important; }
#game-menu-box {
  display: flex; flex-direction: column;
  min-width: 260px; max-width: calc(100vw - 16px); max-height: 92dvh; box-sizing: border-box; overflow: hidden; padding: 20px 28px; background: rgba(10,20,18,0.96);
  border: 1px solid rgba(102,255,170,0.6); border-radius: 4px;
  color: #cfe; font-family: var(--font-text); text-align: center;
}
#game-menu-box h3 { margin: 0 0 14px; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.3em; color: #9fe; }
/* 一覧はこの中だけスクロールし、下の帯(#game-menu-bar)は常に見える */
/* ページを開き直す・移るときの待ちの表示(nav-wait.js。2026-11-04)。押してから0.4秒たったら見せる。それまでも押し直しは止める */
#nav-wait { display: none; position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,0.72); align-items: center; justify-content: center; text-align: center; }
#nav-wait.pending { display: flex; opacity: 0; }
#nav-wait.visible { opacity: 1; transition: opacity 0.2s; }
#nav-wait .nav-wait-box { padding: 20px 24px; max-width: 80vw; color: #9fe; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; }
#nav-wait .nav-wait-retry { margin-top: 16px; padding: 10px 22px; font: inherit; color: #9fe; background: transparent; border: 1px solid rgba(102,255,170,0.6); }
#nav-wait .hidden { display: none; }
#game-menu-items { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; flex: 1 1 auto; padding: 4px; margin: -4px; touch-action: pan-y; overscroll-behavior: contain; }
#game-menu-bar { display: flex; gap: 8px; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(102,255,170,0.3); flex: 0 0 auto; }
#game-menu-bar:empty { display: none; }
#game-menu-items .game-menu-item.danger-row { color: #f99; border-color: rgba(255,120,120,0.55); background: rgba(255,80,80,0.08); text-align: center; }
#game-menu-bar .game-menu-item { flex: 1; text-align: center; white-space: nowrap; }
#game-menu-bar .game-menu-item .key { float: none; margin-left: 6px; }
#lobby-rules { margin-top: 8px; font-size: var(--fs-small); display: flex; gap: 8px; align-items: center; justify-content: center; }
#lobby-rules button { font: inherit; padding: 2px 10px; cursor: pointer; }
#lobby-rules button.hidden { display: none; } /* 後から入った人の待ちの間はルールを変えられない(C4) */
#lobby-ship { margin-top: 4px; font-size: var(--fs-small); display: flex; gap: 8px; justify-content: center; } /* 待合の「機体:」(C5) */
#lobby-ship.hidden { display: none; }
#lobby-rules button#lobby-handicap-toggle.on { background: rgba(255,224,138,0.25); color: #ffe08a; border-color: rgba(255,224,138,0.7); } /* ハンデを付けている */
#lobby-rules button#lobby-handicap-toggle.hidden { display: none; }
.game-menu-item {
  padding: 9px 16px; font: var(--fs-body) var(--font-text); cursor: pointer; text-align: left;
  background: rgba(102,255,170,0.1); color: #cfe; border: 1px solid rgba(102,255,170,0.4);
}
.game-menu-item:hover { background: rgba(102,255,170,0.25); }
.game-menu-item .key { float: right; opacity: 0.6; font-family: var(--font-hud); margin-left: 16px; } /* 名前とキーの印の間をあける(長い名前に印が重なっていた。2026-11-18 総点検 G4) */
.game-menu-item .item-note { font-size: var(--fs-small); opacity: 0.7; margin-top: 2px; white-space: pre-line; }
/* タッチ操作でキーボードを使っていない間は、ショートカットのキーの表示を出さない(2026-10-15 オーナー要望。keyboard-seen) */
body.touch-device:not(.keyboard-seen) .game-menu-item .key { display: none; }
/* タッチ操作でキーボードを使っていない間は、MENUの「キー設定」も出さない(P8。2026-10-21 オーナー決定) */
body.touch-device:not(.keyboard-seen) .game-menu-item[data-id="keys"] { display: none; }
/* 設定の画面(2026-10-06): タブを横に並べ、値の行は「名前 ◀ 値 ▶」 */
.settings-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.settings-tabs .game-menu-item { flex: 1; text-align: center; }
.settings-tabs .game-menu-item .key { float: none; margin-left: 6px; }
.settings-tab.on { background: rgba(102,255,170,0.35); color: #fff; }
/* ルールの画面(2026-10-06): 要点の1行・まとまりの見出し・標準と違う値(黄色)・表示だけの行 */
.settings-tabs { flex-wrap: wrap; }
/* 設定のタブ・ルールのプリセットは折り返さない(2026-11-18 画面の総点検 S1・R1)。前は flex の折り返しで、PC は「データ」が2行、スマホは5つ目だけ次の段、
   幅 360px では「操/作」「画/面」、ルールの「短/い/試/合」が1字ずつ縦に割れていた。同じ幅のマス目に並べ、字は折らない。
   設定のタブは1段(数が変わっても同じ幅)。ルールのプリセットは、狭い画面(screen-narrow)では3つ + 2つの2段 */
.settings-tabs:has(> [data-id^="tab-"]), .settings-tabs:has(> [data-id^="preset-"]) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.settings-tabs > [data-id^="tab-"], .settings-tabs > [data-id^="preset-"] { padding-left: 4px; padding-right: 4px; white-space: nowrap; min-width: 0; }
.settings-tabs > [data-id^="tab-"] .key, .settings-tabs > [data-id^="preset-"] .key { font-size: var(--fs-small); margin-left: 4px; }
body.screen-narrow .settings-tabs:has(> [data-id^="preset-"]) { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.screen-narrow .settings-tabs > [data-id^="tab-"] { font-size: var(--fs-small); letter-spacing: 0; padding-left: 2px; padding-right: 2px; }
/* 狭い画面のタブは、字の長さ(CREDITS)より狭くしない。余った幅は等分する */
body.screen-narrow .settings-tabs:has(> [data-id^="tab-"]) { grid-auto-columns: minmax(max-content, 1fr); }
/* 設定の窓の幅は、タブを切り替えても変わらない(S2。前は中身の幅に合わせていて、データのタブだけ約2倍に広がった) */
#game-menu-box:has(.settings-tabs > [data-id^="tab-"]) { width: min(560px, calc(100vw - 16px)); }
body.screen-narrow #game-menu-box:has(.settings-tabs > [data-id^="tab-"]) { padding-left: 16px; padding-right: 16px; }
.rules-summary { font-size: var(--fs-small); color: #fff; margin-bottom: 4px; white-space: pre-line; } /* 保存データの初期化の確認(2026-10-22)は改行を使う */
.rules-intro { font-size: var(--fs-body); color: #9fe; margin-bottom: 4px; } /* FREE BATTLEの先の一言(O1) */
.rules-heading { font: 700 var(--fs-small) var(--font-text); color: #9fe; text-align: left; margin-top: 6px; border-bottom: 1px solid rgba(102,255,170,0.3); }
.game-menu-item.changed .val { color: #ffe066; }
.game-menu-item.read-only { cursor: default; padding-top: 4px; padding-bottom: 4px; }
.game-menu-item.waiting .val { color: #ffe066; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-row.auto-big { font-size: 1.35em; padding-top: 0.35em; padding-bottom: 0.35em; }
.settings-row.auto-big .val { font-weight: bold; }
@media (max-width: 600px) { .settings-row.auto-big { font-size: 1.05em; padding-top: 0.15em; padding-bottom: 0.15em; } }
.settings-value { display: flex; align-items: center; gap: 6px; font-family: var(--font-hud); }
.settings-value .val { min-width: 4.5em; text-align: center; color: #fff; }
/* 狭い画面で、名前と値が言葉の途中で折れないようにする(幅 360px で「ステー/ジ」「コロニーの近/く」と割れていた。2026-11-18 総点検 R1)。
   行の左右の余白を詰め、まず空白の所で折る(keep-all。空白のない長い名前が収まらないときだけ、字の途中で折れる) */
.settings-label, .settings-value .val { word-break: keep-all; overflow-wrap: anywhere; }
.settings-value { flex: none; }
body.screen-narrow .settings-row { padding-left: 10px; padding-right: 8px; gap: 8px; }
.settings-value button { background: none; border: 1px solid rgba(102,255,170,0.5); color: #9fe; font: inherit; padding: 0 8px; cursor: pointer; }
/* キー設定(今の割り当ての一覧。いまは表示だけ。key-guide.js) */
.key-guide { display: grid; grid-template-columns: auto auto; gap: 4px 18px; text-align: left; font-size: var(--fs-small); margin-bottom: 6px; }
.key-guide .keys { color: #fff; font-family: var(--font-hud); }
/* データの視点(data-view.js。SOV-0 の目): 走査線と文字。見た目だけ、触れない */
#data-view-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 5; display: none; }
#data-view-overlay.on { display: block; }
#data-view-overlay .dv-scan { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(95,212,255,0.06) 0 1px, transparent 1px 3px); box-shadow: inset 0 0 18vmin rgba(0,20,40,0.85); }
#data-view-overlay .dv-label, #data-view-overlay .dv-count { position: absolute; left: max(16px, 2vw); font-family: var(--font-hud); color: #7fe9ff; letter-spacing: 0.25em; text-shadow: 0 0 6px rgba(95,212,255,0.8); white-space: nowrap; }
#data-view-overlay .dv-label { top: max(16px, 2vh); font-size: var(--fs-small); opacity: 0.9; }
#data-view-overlay .dv-count { top: calc(max(16px, 2vh) + 1.6em); font-size: var(--fs-small); opacity: 0.6; }
#data-view-overlay.glitch .dv-scan { transform: translateX(calc(var(--dv-shift, 6px))); filter: hue-rotate(40deg); }
/* 太陽のそば・太陽の表面(sun-view.js): まぶしさ・レンズの光の玉・フレアの白飛び。計器(z-index 4)より下に重ねる。見た目だけ、触れない */
#sun-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
body.summary-open #sun-overlay, body.map-open #sun-overlay { display: none !important; }
#sun-overlay .sun-glare, #sun-overlay .sun-flare-flash { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; }
#sun-overlay .sun-ghosts { position: absolute; inset: 0; mix-blend-mode: screen; }
#sun-overlay .sun-ghost { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); opacity: 0; }
#sun-overlay .sun-flare-flash { background: radial-gradient(circle, #fffaf0 0%, rgba(255,236,200,0.85) 55%, rgba(255,210,150,0.6) 100%); }
#sun-overlay .sun-flare-label { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-family: var(--font-hud); font-size: var(--fs-small); letter-spacing: 0.3em; color: #ffd28a; text-shadow: 0 0 8px rgba(255,140,40,0.9); white-space: nowrap; display: none; }
body.solar-flare.game-started #sun-overlay .sun-flare-label { display: block; animation: sun-blink 0.3s steps(2) infinite; }
/* フレアの間、計器とレーダーが乱れる(揺れ・色ずれ・ちらつき) */
body.solar-flare #cockpit-hud { animation: sun-hud-jitter 0.18s steps(3) infinite; }
body.solar-flare #cockpit-hud .hud-radar, body.solar-flare #cockpit-hud .hud-radar-big { animation: sun-radar-noise 0.12s steps(2) infinite; }
@keyframes sun-blink { 50% { opacity: 0.25; } }
/* 惑星の影の中の試合の始めの警告(2026-11-19。planet-shadow-view.js)。試合が始まったら --warn-seconds 秒だけ出し、点滅しながら消える。
   ほかの表示と重ねない(オーナー要望): 上の方は試合の情報・目標の1行・操作の案内が並ぶので、READY/GO と同じ場所(34%)に、
   READY/GO が消えてから出す(#ready-go が出ている間は動きを止めて隠し、消えたら頭から流す)。
   ミッションでは目標の大きな表示(#goal-popup)の中に1行足すので、この札は作らない(session-launch-hud.js)。レイドの呼びかけ(#raid-call)が出ている間は隠す */
#shadow-warning { position: fixed; top: 34%; left: 50%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; font-family: var(--font-hud); font-size: var(--fs-body, 1rem); letter-spacing: 0.2em; color: #ffd36a; text-shadow: 0 0 10px rgba(255,170,40,0.9); background: rgba(0,0,0,0.45); border: 1px solid rgba(255,211,106,0.55); padding: 0.45em 1.1em; white-space: nowrap; opacity: 0; }
body.game-started:has(#ready-go.hidden) #shadow-warning { animation: shadow-warn var(--warn-seconds, 4.5s) linear forwards; }
body.summary-open #shadow-warning, body.map-open #shadow-warning { display: none; }
body:has(#raid-call:not(.hidden)) #shadow-warning { visibility: hidden; }
body.touch-device.screen-narrow #shadow-warning { letter-spacing: 0.1em; }
#goal-popup .goal-warn { color: #ffd36a; text-shadow: 0 0 8px rgba(255,170,40,0.8); margin-top: 10px; }
@keyframes shadow-warn { 0% { opacity: 0; } 6% { opacity: 1; } 12% { opacity: 0.4; } 18% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { body.game-started:has(#ready-go.hidden) #shadow-warning { animation: shadow-warn-calm var(--warn-seconds, 4.5s) linear forwards; } }
@keyframes shadow-warn-calm { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sun-hud-jitter { 0% { transform: translate(0, 0); filter: none; } 33% { transform: translate(-4px, 2px); filter: hue-rotate(-30deg) saturate(1.6); } 66% { transform: translate(3px, -2px); filter: brightness(1.6) contrast(1.4); } 100% { transform: translate(-1px, 1px); filter: none; } }
@keyframes sun-radar-noise { 0% { opacity: 1; filter: none; } 50% { opacity: 0.35; filter: contrast(2.5) brightness(1.8) hue-rotate(60deg); } 100% { opacity: 0.8; filter: blur(1px); } }
@media (prefers-reduced-motion: reduce) { body.solar-flare #cockpit-hud, body.solar-flare #cockpit-hud .hud-radar, body.solar-flare #cockpit-hud .hud-radar-big, body.solar-flare.game-started #sun-overlay .sun-flare-label { animation: none; } }

/* 配信用の3分割の画面の中(2026-11-11。stream.html): 部屋の合言葉(KEY)の入力欄を伏せ字にする(映ると知らない人が入って来られる) */
.stream-embedded #lobby-room { -webkit-text-security: disc; }

/* ===== 最初の画面のモードの入り口(2026-11-16 オーナー決定 案B「ミッション主役」) =====
   MISSION を大きな枠、TUTORIAL・FREE BATTLE を横に2つ、MULTI PLAY を横長にして、どれにも暗く透過したゲームの画面を敷く(textures/menu/)。
   TUTORIAL にはミラの顔を枠なしで、ふちをぼかして控えめに重ねる(オーナー指定)。
   この並びは「最初の画面の通常の状態」(TUTORIAL と MISSION が出ていて、MULTI PLAY の画面を開いていない)だけ。
   ほかの状態(TUTORIALの一覧・ミッションの画面・試合中)は今までどおり縦1列で、写真も敷かない */
#hint { --menu-w: min(400px, calc(100vw - 32px)); --menu-gap: 12px; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) {
  display: grid; grid-template-columns: repeat(2, calc((var(--menu-w) - var(--menu-gap)) / 2)); justify-content: center; gap: var(--menu-gap); align-items: stretch;
}
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) > #hint-solo { display: contents; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) > *,
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) > #hint-solo > * { grid-column: 1 / -1; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #title-logo,
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #title-archived { order: -2; justify-self: center; }
/* ロゴは枠の列より広い(PC では 560px、枠は 400px)。左右の margin が auto のままだと、はみ出した分が右へずれる(2026-11-16 オーナー報告)。
   左右の margin を 0 にして、列の中央に合わせる */
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #title-logo { margin-left: 0; margin-right: 0; justify-self: center; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-play { order: -1; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #tutorial-play,
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #solo-play { grid-column: auto; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #lobby { width: auto; padding: 0; border: none; background: none; }
/* 写真入りの枠(.menu-banner)。::before = 写真と暗い重ね、::after = TUTORIAL のミラの顔。字はその上 */
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) .menu-banner {
  position: relative; isolation: isolate; overflow: hidden; width: auto; margin: 0; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left;
  padding: 12px 14px; min-height: 112px; background: #050a09; color: #fff; border: 1px solid rgba(102,255,170,0.75);
  font: 700 calc(var(--fs-title) * 0.8) var(--font-hud); letter-spacing: 0.1em; line-height: 1.15; cursor: pointer;
}
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) .menu-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(0deg, rgba(2,6,5,0.85) 12%, rgba(2,6,5,0.12) 100%), var(--mb-img) center / cover no-repeat;
  filter: brightness(1.25); /* 暗すぎるとの声で明るく(重ねの黒を薄く+25%。2026-11-17) */
}
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) .menu-banner:hover::before { filter: brightness(1.6); }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) .menu-banner .mb-desc { display: block; }
.mb-desc { display: none; margin-top: 5px; font: 400 var(--fs-small) var(--font-text); letter-spacing: 0.04em; color: rgba(255,255,255,0.72); }
#mission-play { --mb-img: url("/textures/menu/mission.webp"); }
#tutorial-play { --mb-img: url("/textures/menu/tutorial.webp"); }
#solo-play { --mb-img: url("/textures/menu/free.webp"); }
#multi-open { --mb-img: url("/textures/menu/multi.webp"); }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #tutorial-play::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; right: -14px; top: -8px; width: 112px; height: 112px;
  background: url("/textures/stream-mila/mila-default.webp") center / cover no-repeat; opacity: 0.42; filter: saturate(0.8);
  -webkit-mask: radial-gradient(circle at 50% 45%, #000 30%, transparent 68%); mask: radial-gradient(circle at 50% 45%, #000 30%, transparent 68%);
}
/* MISSION(主役): 大きく、続きの番号は緑の帯。続きがなければ一言 */
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-play { min-height: 168px; padding: 16px 18px; font-size: calc(var(--fs-title) * 1.2); letter-spacing: 0.14em; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-play:has(#mission-continue:not(.hidden)) .mb-desc { display: none; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-continue {
  margin-top: 10px; padding: 7px 16px; background: #5dfba5; color: #012; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.12em;
}
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-continue::before { content: "\25B6\00A0"; }
/* MISSION の枠の右下の「ひと休み」(2026-11-19 オーナー要望。session-missions.js): 全体マップのボタン(#bmap-break)と同じ丸いミラの顔+文字。
   ほかの状態(ミッションの画面など)では出さない */
#mission-break { display: none; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-break {
  position: absolute; right: 12px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 16px 4px 4px; border-radius: 999px;
  font: 700 var(--fs-body) var(--font-text); letter-spacing: 0.04em; color: #cfe; background: rgba(0,0,0,0.6); border: 1px solid rgba(102,255,170,0.6); cursor: pointer;
}
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-break:hover { color: #eff; border-color: #66ffaa; background: rgba(0,20,12,0.75); }
#mission-break img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(102,255,170,0.6); pointer-events: none; }
/* MULTI PLAY(横長): 左から暗く */
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #lobby #multi-open { width: 100%; min-height: 84px; justify-content: center; }
#hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #lobby #multi-open::before {
  background: linear-gradient(90deg, rgba(2,6,5,0.85) 25%, rgba(2,6,5,0.1) 100%), var(--mb-img) center / cover no-repeat;
}
#multi-open #lobby-title { font: inherit; letter-spacing: inherit; color: inherit; }
/* レイドの印「RAID 開催中！」(2026-11-19 オーナー要望で強調): 本文の大きさで、ゆっくり光らせる */
#multi-raid-badge {
  position: absolute; right: 10px; top: 8px; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.1em; color: #012; background: #5dfba5; padding: 4px 12px;
  box-shadow: 0 0 10px rgba(93,251,165,0.7); animation: raid-badge-glow 1.6s ease-in-out infinite alternate;
}
@keyframes raid-badge-glow { from { box-shadow: 0 0 4px rgba(93,251,165,0.45); filter: brightness(0.95); } to { box-shadow: 0 0 16px rgba(93,251,165,0.95); filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { #multi-raid-badge { animation: none; } }
#multi-raid-badge.hidden { display: none; }
#multi-raid-badge.op { background: #ffd36a; box-shadow: 0 0 10px rgba(255,211,106,0.7); animation-name: raid-badge-glow-op; }
@keyframes raid-badge-glow-op { from { box-shadow: 0 0 4px rgba(255,211,106,0.45); filter: brightness(0.95); } to { box-shadow: 0 0 16px rgba(255,211,106,0.95); filter: brightness(1.15); } } /* 作戦時間中(raid-window.js) */
/* 横持ちのスマホ(低い画面): ロゴを小さく、MISSION・TUTORIAL・FREE BATTLE を横に3つ、MULTI PLAY を下に横長 */
@media (orientation: landscape) {
  body.screen-compact #hint { --menu-w: min(640px, calc(100vw - 32px)); --menu-gap: 8px; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) { grid-template-columns: repeat(3, calc((var(--menu-w) - 2 * var(--menu-gap)) / 3)); padding-bottom: 2px; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #title-logo { width: 230px; margin: 0 auto 2px; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-play { grid-column: auto; min-height: 92px; font-size: calc(var(--fs-title) * 0.8); padding: 10px 12px; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) .menu-banner { min-height: 92px; padding: 10px 12px; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #lobby #multi-open { min-height: 60px; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-continue { margin-top: 6px; padding: 4px 10px; font-size: var(--fs-small); }
  /* ひと休み: 枠が小さいので、右上にミラの顔だけ(続きの帯と重ならない) */
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-break { top: 6px; right: 6px; bottom: auto; padding: 3px; min-height: 0; }
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-break > span { display: none; }
}

/* ===== MULTI PLAY の画面(2026-11-16 オーナー決定 マルチ案3) =====
   最初の画面では #lobby はバナーの枠(#multi-open)だけ。開く(.open)と、上に写真の見出しと BACK、KEY と NEXT。
   NEXT の後は「入る人」(#lobby-found。作った人の設定は見るだけ)か「作る人」(#lobby-create。形式・人数・ルール・ハンデ)の段 */
#lobby:not(.open) > :not(#multi-open, #raid-news) { display: none !important; }
#lobby.open > #multi-open { display: none; }
#multi-open .mb-desc { display: block; }
#hint-main:has(#lobby.open) > #hint-solo { display: none; }
#lobby.open { width: var(--menu-w); padding: 0 0 16px; text-align: left; background: rgba(5,10,9,0.94); border: 1px solid rgba(102,255,170,0.75); }
#lobby-head { position: relative; isolation: isolate; overflow: hidden; height: 112px; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 16px; box-sizing: border-box; border-bottom: 1px solid rgba(102,255,170,0.6); }
#lobby-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4,8,7,0.96) 8%, rgba(4,8,7,0.25) 100%), url("/textures/menu/multi-head.webp") center / cover no-repeat; }
#lobby #lobby-back { position: absolute; left: 10px; top: 10px; font: var(--fs-small) var(--font-hud); letter-spacing: 0.08em; padding: 5px 10px; background: rgba(0,0,0,0.5); }
#lobby-head .lh-title { font: 700 var(--fs-title) var(--font-hud); letter-spacing: 0.14em; color: #fff; }
#lobby-head #lobby-help { margin-top: 4px; }
#lobby-body { padding: 14px 16px 0; }
#lobby-keyrow { display: flex; gap: 8px; }
#lobby #lobby-keyrow input#lobby-room { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; height: 46px; font: var(--fs-body) var(--font-hud); padding: 0 12px; }
#lobby #lobby-keyrow #lobby-next { flex: 0 0 auto; height: 46px; padding: 0 18px; font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.12em; background: #3fbf80; color: #012; border-color: #6fa; }
#lobby-step1-note { margin-top: 10px; font-size: var(--fs-small); line-height: 1.6; color: rgba(255,255,255,0.65); }
#lobby-found, #lobby-create { margin-top: 14px; }
#lobby-found { border: 1px solid rgba(102,255,170,0.75); background: rgba(102,255,170,0.07); padding: 12px 14px; }
#lobby .lf-title { font: 700 var(--fs-body) var(--font-text); color: #9fe; }
#lobby .lf-note { margin-top: 4px; font-size: var(--fs-small); color: rgba(255,255,255,0.65); }
#lobby-found-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#lobby .lf-tag { font-size: var(--fs-small); padding: 3px 10px; background: rgba(255,255,255,0.09); color: #dfe; }
#lobby #lobby-join { display: block; width: 100%; height: 52px; margin-top: 16px; font: 700 calc(var(--fs-body) * 1.15) var(--font-hud); letter-spacing: 0.12em; background: #3fbf80; color: #012; border-color: #6fa; }
/* 段ごとに出すもの */
#lobby[data-step="key"] :is(#lobby-found, #lobby-create, #lobby-modes, #lobby-seats, #lobby-raids, #lobby-rules, #lobby-handicap, #lobby-ship, #lobby-join, #lobby-invite) { display: none !important; }
#lobby:not([data-step="key"]) :is(#lobby-step1-note, #lobby-next, #lobby-open-raids, #lobby-key-head) { display: none !important; }
/* レイドと合言葉の待ち合わせを別の枠に分ける(2026-11-21 オーナー要望「別ものなので混ざらないように、線か箱で分けてタイトルを」)。
   KEY を入れる段だけ、それぞれを枠で囲み、枠の上に見出し(大きめ)と一言を置く。レイドは金、待ち合わせはMULTIの緑。
   見出しの左には色の帯を付け、枠どうしの間はあける */
#lobby[data-step="key"] #lobby-key-box { border: 1px solid rgba(102,255,170,0.55); background: rgba(102,255,170,0.05); padding: 12px 14px 14px; }
#lobby-key-head, #lobby-open-raids .lor-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; padding-left: 10px; border-left: 4px solid #6fa; }
#lobby-key-head .lkh-title, #lobby-open-raids .lor-title { font: 700 calc(var(--fs-body) * 1.1) var(--font-hud); letter-spacing: 0.1em; color: #9fe; }
#lobby-key-head .lkh-sub, #lobby-open-raids .lor-sub { font-size: 13px; color: rgba(255,255,255,0.75); }
/* 公開出撃(2026-11-18 オーナー決定。raid-open.js): KEY を入れる前の段に、配信中のレイドへ KEY なしで出撃するボタン。色はレイドの金。
   KEY の枠より上に置く(2026-11-19 オーナー要望) */
#lobby-open-raids { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; padding: 12px 14px 14px; border: 1px solid rgba(255,211,106,0.6); background: rgba(255,211,106,0.05); }
#lobby-open-raids.hidden { display: none; }
#lobby-open-raids .lor-head { margin-bottom: 2px; border-left-color: #ffd36a; }
#lobby-open-raids .lor-title { color: #ffd36a; }
/* レイドがあるとき、画面の上の「友だちと同じKEY(合言葉)を使います」はレイドに当てはまらないので出さない(各枠の一言で足りる) */
#lobby[data-step="key"]:has(#lobby-open-raids:not(.hidden)) #lobby-help { display: none; }
#lobby #lobby-open-raids .lobby-open-raid { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; min-height: 56px; padding: 10px 12px; cursor: pointer; border: 1px solid #ffd36a; border-radius: 0; background: rgba(255,211,106,0.14); color: #fff3c9; font-family: var(--font-text); }
#lobby #lobby-open-raids .lobby-open-raid:hover, #lobby #lobby-open-raids .lobby-open-raid:focus-visible { background: rgba(255,211,106,0.28); }
.lobby-open-raid .lor-name { font-size: calc(var(--fs-body) * 1.1); font-weight: 800; }
.lobby-open-raid .lor-note { font-size: 13px; color: rgba(255,233,176,0.85); line-height: 1.4; }
#lobby:not([data-step="key"]) #lobby-room { opacity: 0.7; }
#lobby[data-step="found"] :is(#lobby-create, #lobby-modes, #lobby-seats, #lobby-raids, #lobby-rules, #lobby-handicap, #lobby-invite) { display: none !important; }
#lobby[data-step="create"] #lobby-found { display: none !important; }
/* 作る人の段: 形式は写真入りの3枚、人数は大きな押しボタン、ルール・ハンデ・機体は1行ずつ */
#lobby.open #lobby-modes, #lobby.open #lobby-seats { justify-content: flex-start; gap: 8px; margin-top: 14px; font-size: var(--fs-body); }
#lobby.open #lobby-modes > span, #lobby.open #lobby-seats > span { flex: 0 0 3.6em; color: rgba(255,255,255,0.75); }
#lobby.open #lobby-modes button { flex: 1 1 0; position: relative; height: 64px; display: flex; align-items: flex-end; padding: 6px 8px; font: 700 var(--fs-body) var(--font-text); color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0.3)), var(--mode-img) center / cover no-repeat; }
#lobby.open #lobby-modes button.hidden { display: none; } /* 配信中でないレイドなど(上の display: flex で出てしまわないように) */
#lobby.open #lobby-modes button[data-mode="versus"] { --mode-img: url("/textures/menu/multi.webp"); }
#lobby.open #lobby-modes button[data-mode="coop"] { --mode-img: url("/textures/menu/coop.webp"); }
#lobby.open #lobby-modes button[data-mode="raid"] { --mode-img: url("/textures/menu/raid.webp"); }
#lobby.open #lobby-modes button.on { border: 2px solid #6fa; box-shadow: 0 0 0 2px rgba(102,255,170,0.25); }
#lobby.open #lobby-modes button.on::after { content: "\2713"; position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; line-height: 18px; text-align: center; font: 700 12px var(--font-hud); color: #012; background: #6fa; }
#lobby.open #lobby-seats button { flex: 1 1 0; height: 44px; font: 700 var(--fs-body) var(--font-hud); }
#lobby.open #lobby-seats button.on, #lobby.open #lobby-raids button.on { background: #3fbf80; color: #012; }
#lobby.open #lobby-raids { justify-content: flex-start; margin-top: 12px; }
#lobby.open #lobby-raids button { font-size: var(--fs-body); padding: 8px 12px; }
#lobby.open #lobby-rules, #lobby.open #lobby-ship { justify-content: flex-start; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(102,255,170,0.2); font-size: var(--fs-body); }
#lobby.open #lobby-rules button { padding: 6px 12px; }
#lobby.open #lobby-rules #lobby-rules-change { margin-left: auto; }
#lobby.open #lobby-status:empty { display: none; }
/* 低い画面(小さいスマホの縦持ち・横持ち): 写真の枠と見出しを低くして、スクロールなしで収める */
@media (max-height: 700px) {
  body.screen-compact #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #title-logo { margin-bottom: 4px; }
  #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #mission-play { min-height: 120px; }
  #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) .menu-banner { min-height: 92px; }
  #hint-main:has(#tutorial-play:not(.hidden)):has(#mission-play:not(.hidden)):not(:has(#lobby.open)) #lobby #multi-open { min-height: 64px; }
  #lobby-head { height: 76px; }
  #lobby-head .lh-title { padding-left: 72px; font-size: calc(var(--fs-title) * 0.8); } /* 低い枠では題を BACK の右へ(重なっていた。2026-11-18 総点検 N1) */
}
/* PROFILE のコールサインと称号(2026-11-17。screen-profile.js の profileCallsignBlock) */
.profile-callsign { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.profile-callsign-name { font: 700 calc(var(--fs-body) * 1.6) var(--font-text); color: #fff; letter-spacing: 0.04em; text-align: center; }
.profile-callsign-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(360px, 100%); }
.profile-callsign-head { font-size: var(--fs-small); opacity: 0.8; margin-bottom: 3px; text-align: left; }
.profile-callsign-list { display: flex; flex-direction: column; max-height: 190px; overflow-y: auto; border: 1px solid rgba(102,255,170,0.35); background: rgba(5,15,12,0.6); }
.profile-callsign-word { flex: none; min-height: 32px; padding: 4px 10px; text-align: left; cursor: pointer; font: var(--fs-body) var(--font-text); color: #dff; background: transparent; border: none; border-bottom: 1px solid rgba(102,255,170,0.1); }
.profile-callsign-word.selected { color: #fff; background: rgba(102,255,170,0.25); outline: 1px solid #66ffaa; outline-offset: -1px; }
.profile-callsign-word:disabled { cursor: default; opacity: 0.35; }
.profile-callsign .profile-xp { text-align: center; max-width: 340px; }
/* 待合の席の行のコールサインと称号(2026-11-17。session-net-replay.js の createSeatRoom) */
.seat-row .seat-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.seat-row .seat-who .seat-you { font-size: max(0.8em, var(--fs-small)); color: #66ffaa; border: 1px solid #66ffaa; padding: 0 4px; }
.seat-row .seat-who.here .seat-callsign, .seat-row .seat-who .seat-you + .seat-callsign { color: #fff; }
.seat-row .seat-who .seat-title { font-size: max(0.85em, var(--fs-small)); color: #ffd166; }
.seat-row .seat-who .seat-title::before { content: "〔"; }
.seat-row .seat-who .seat-title::after { content: "〕"; }
/* レイドの殿堂入り(2026-11-17。raid-hall-view.js): レイドの一覧の下の1行と、一覧の窓 */
#lobby-raids .raid-hall-line { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; }
#lobby-raids .raid-hall-line:empty { display: none; }
#lobby-raids .raid-replay-line { flex-basis: 100%; display: flex; justify-content: center; }
#lobby-raids .raid-replay-line:empty { display: none; }
#lobby #lobby-raids .raid-replay-open { min-height: 32px; }
/* 自分の残影の出撃(2026-11-18。raid-hall-view.js): 淡い水色(残影の色)。増えていたらミラの一言を上に */
#lobby-raids .raid-hall-echo { flex-basis: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: #8fe3ff; }
.profile-echo { color: #8fe3ff; }
.profile-echo:empty { display: none; }
#lobby-raids .raid-hall-echo-new { font-size: var(--fs-body); font-weight: 600; color: #eff; }
#lobby-open-raids .lor-left-win { text-align: center; margin-top: 6px; font-size: var(--fs-body); font-weight: 600; color: #eff; } /* 抜けても損なし(2026-11-20。raid-hall-view.js の leftRaidWinLine) */
#lobby-open-raids .lor-left-win:empty { display: none; }
#lobby #lobby-raids .raid-hall-open { min-height: 32px; }
#raid-hall-popup { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); }
#raid-hall-popup.hidden { display: none; }
#raid-hall-box { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; box-sizing: border-box; background: rgba(10,20,18,0.96); border: 1px solid rgba(102,255,170,0.8); color: #cfe; font: var(--fs-body) var(--font-text); }
#raid-hall-heading { font: 700 var(--fs-body) var(--font-hud); letter-spacing: 0.08em; color: #eff; }
#raid-hall-list { overflow-y: auto; min-height: 0; }
.raid-hall-row { display: grid; grid-template-columns: 2.2em 1fr auto 3.6em; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(102,255,170,0.12); }
.raid-hall-row.mine { background: rgba(102,255,170,0.12); }
.raid-hall-no, .raid-hall-date { color: rgba(255,255,255,0.55); font-size: var(--fs-small); }
.raid-hall-who { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.raid-hall-title { color: #ffd166; font-size: var(--fs-small); }
.raid-hall-name { color: #fff; }
.raid-hall-id { color: rgba(255,255,255,0.5); font: var(--fs-small) var(--font-hud); }
.raid-hall-lv { font: 600 var(--fs-small) var(--font-hud); padding: 0 6px; border: 1px solid #66ffaa; color: #66ffaa; text-align: center; }
.raid-hall-lv.hard { border-color: #ffd166; color: #ffd166; }
#raid-hall-foot { font-size: var(--fs-small); color: rgba(255,255,255,0.7); }
#raid-hall-close { align-self: center; min-height: 40px; min-width: 140px; }
/* レイドに勝ったときのミラの絵と一言(2026-11-17 オーナー要望「大き目に」。raid-win-view.js): 結果の画面の上に重ね、タップで閉じる */
#raid-win { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(0,0,0,0.72); cursor: pointer; animation: raid-win-in 0.5s ease-out; }
#raid-win.hidden { display: none; }
#raid-win-box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
#raid-win-image { width: min(70vh, calc(100vw - 32px), 640px); aspect-ratio: 1; object-fit: cover; border: 2px solid #ffd166; box-shadow: 0 0 32px rgba(255,209,102,0.45); }
#raid-win-line { white-space: pre-line; text-align: center; color: #fff; font: 700 clamp(18px, 3.6vh, 30px) / 1.45 var(--font-text); text-shadow: 0 0 10px rgba(255,209,102,0.7); }
#raid-win-skin { color: #ffd166; font: 700 clamp(15px, 2.4vh, 20px) var(--font-text); padding: 4px 14px; border: 1px solid rgba(255,209,102,0.7); background: rgba(255,209,102,0.12); }
#raid-win-skin.hidden { display: none; }
#raid-win-close { color: rgba(255,255,255,0.6); font-size: var(--fs-small); }
@keyframes raid-win-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* ===== 世界の討伐ゲージ(2026-11-18 オーナー決定。raid-gauge-view.js)。レイドの一覧の下と、レイドの結果の画面。色はレイドの金 ===== */
.raid-gauge { display: flex; flex-direction: column; align-items: stretch; gap: 5px; width: min(100%, 460px); margin: 0 auto; box-sizing: border-box; font-family: var(--font-text); color: #ffe9b0; }
.raid-gauge.hidden, .raid-gauge:empty { display: none; }
.raid-gauge-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.raid-gauge-label { font: 700 13px var(--font-hud); letter-spacing: 0.14em; color: #ffd36a; }
.raid-gauge-count { font: 700 clamp(14px, 2.2vh, 17px) var(--font-hud); color: #fff3c9; }
.raid-gauge-cleared { flex-basis: 100%; text-align: right; font: 700 13px var(--font-hud); color: #ffd36a; }
.raid-gauge-bar { height: 10px; border: 1px solid #ffd36a; background: rgba(255,211,106,0.1); overflow: hidden; }
.raid-gauge-fill { height: 100%; min-width: 2px; background: linear-gradient(90deg, #b8862a, #ffd36a); box-shadow: 0 0 8px rgba(255,211,106,0.7); }
.raid-gauge-notes { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 13px; }
.raid-gauge-add { font-weight: 700; color: #fff3c9; }
.raid-gauge-mine { margin-left: auto; color: #ffe9b0; }
.raid-gauge-hint { font-size: 13px; color: rgba(255,233,176,0.8); text-align: center; }
.raid-gauge-foe { font-size: 13px; color: #ff9a9a; text-align: center; } /* 世界の仇(raid-foe.js): 敵の赤 */
.raid-gauge-reward { padding: 5px 8px; border: 1px solid #ffd36a; background: rgba(255,211,106,0.14); font: 700 var(--fs-body) var(--font-text); color: #fff3c9; text-align: center; }
#lobby-raids .raid-gauge-line { flex-basis: 100%; }
/* レイドの作戦時間の行(raid-window-view.js) */
.raid-window-line { font-size: 13px; color: #ffe9a8; }
.raid-window-line.hidden { display: none; }
.raid-window-line.active { font-weight: 700; color: #ffd36a; }
#lobby-raids .raid-window-line { flex-basis: 100%; text-align: center; }
#summary-raid-gauge { margin-top: 8px; }
/* 敬礼(2026-11-20。session-salute.js): 届いた敬礼は見出しの下に金の字で1人1行。ボタンは押した後も「敬礼した」で残す */
#summary-salutes { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 500 var(--fs-body) var(--font-text); color: #ffe9b0; }
#summary-salutes.hidden { display: none; }
#summary-salutes b { color: #ffd36a; font-weight: 700; }
#summary-salute { padding: 8px 18px; font: var(--fs-body) var(--font-text); cursor: pointer; background: transparent; color: #ffd36a; border: 1px solid rgba(255,211,106,0.7); }
#summary-salute.hidden { display: none; }
#summary-salute.done { cursor: default; background: rgba(255,211,106,0.12); opacity: 0.8; }

/* ===== 討伐の記録の札(2026-11-18 オーナー決定。raid-film.js) =====
   始め: 画面の上寄りに帯で出す(下で場面が流れている)。締め: 画面の中央に出す。入力は受けない。金=人、淡い水色の点線=残影 */
#raid-film-card { position: fixed; left: 0; right: 0; top: 14%; z-index: 33; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px 20px; box-sizing: border-box; pointer-events: none; text-align: center;
  background: linear-gradient(180deg, rgba(4,10,9,0) 0%, rgba(4,10,9,0.82) 14%, rgba(4,10,9,0.82) 86%, rgba(4,10,9,0) 100%); animation: raid-film-in 0.5s ease-out; }
#raid-film-card.hidden { display: none; }
#raid-film-card[data-kind="end"] { top: 50%; transform: translateY(-50%); padding: 32px 16px 34px; }
#raid-film-card .raid-film-label { color: #ffd36a; font: 700 clamp(13px, 2vh, 18px) var(--font-hud); letter-spacing: 0.4em; margin-right: -0.4em; }
#raid-film-card .raid-film-title { color: #fff3c9; font: 800 clamp(24px, 5.4vh, 50px) / 1.2 var(--font-text); text-shadow: 0 0 18px rgba(255,211,106,0.7), 0 2px 0 rgba(0,0,0,0.6); overflow-wrap: anywhere; max-width: 100%; }
#raid-film-card .raid-film-squad { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; max-width: min(100%, 900px); }
#raid-film-card .raid-film-name { padding: 3px 12px; border: 1px solid #ffd36a; color: #ffe9b0; font: 700 clamp(14px, 2.4vh, 20px) var(--font-text); background: rgba(255,211,106,0.1); }
#raid-film-card .raid-film-name.echo { border: 1px dashed #8fe3ff; color: #d6f5ff; background: rgba(143,227,255,0.08); }
#raid-film-card .raid-film-finisher { color: #ffd36a; font: 700 clamp(16px, 3vh, 26px) var(--font-text); }
#raid-film-card .raid-film-finisher.echo { color: #8fe3ff; }
#raid-film-card .raid-film-date { color: rgba(255,255,255,0.75); font: 600 clamp(13px, 1.9vh, 16px) var(--font-hud); letter-spacing: 0.12em; }
@keyframes raid-film-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #raid-film-card { animation: none; } }
body.highlight-mode:has(#raid-film-card[data-kind="open"]:not(.hidden)) #highlight-banner { visibility: hidden; } /* 始めの札の間は、上の見出しを重ねない */

/* ===== とどめの名乗り(2026-11-18 オーナー決定。協力・レイド。session-squad-comm.js) =====
   決着を付けた一撃の主を、画面の上寄りの中央に大きく出す。入力は受けない。金=人、淡い水色=残影(通信の枠と同じ色の役目) */
#raid-finisher { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: calc(100vw - 32px); padding: 10px 28px 12px; pointer-events: none; text-align: center;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(8,14,12,0.78) 18%, rgba(8,14,12,0.78) 82%, rgba(0,0,0,0) 100%); border-top: 2px solid #ffd36a; border-bottom: 2px solid #ffd36a; animation: raid-finisher-in 0.35s ease-out; }
#raid-finisher.hidden { display: none; }
#raid-finisher .raid-finisher-label { color: #ffd36a; font: 700 clamp(14px, 2.2vh, 20px) var(--font-hud); letter-spacing: 0.4em; margin-right: -0.4em; }
#raid-finisher .raid-finisher-name { color: #fff3c9; font: 800 clamp(26px, 6vh, 56px) / 1.15 var(--font-text); text-shadow: 0 0 18px rgba(255,211,106,0.75), 0 2px 0 rgba(0,0,0,0.6); overflow-wrap: anywhere; }
#raid-finisher.echo { border-color: #8fe3ff; border-top-style: dashed; border-bottom-style: dashed; }
#raid-finisher.echo .raid-finisher-label { color: #8fe3ff; }
#raid-finisher.echo .raid-finisher-name { color: #e2f8ff; text-shadow: 0 0 18px rgba(143,227,255,0.7), 0 2px 0 rgba(0,0,0,0.6); }
@keyframes raid-finisher-in { from { opacity: 0; transform: translateX(-50%) scale(1.25); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { #raid-finisher { animation: none; } }
#raid-win-finisher { color: #ffd36a; font: 700 clamp(16px, 2.8vh, 24px) var(--font-text); letter-spacing: 0.04em; }
#raid-win-finisher.echo { color: #8fe3ff; }
#raid-win-finisher.hidden { display: none; }
.raid-hall-fin { margin-left: 8px; padding: 1px 6px; border: 1px solid rgba(255,211,106,0.7); color: #ffd36a; font-size: var(--fs-small); white-space: nowrap; }
/* 仇討ち(世界の仇。raid-foe.js): 敵のエースを討った印は、敵の赤の線に金の字 */
.raid-hall-foe { border-color: rgba(255,110,110,0.8); }

/* ===== 通信の枠と小隊の一覧(2026-11-18 オーナー決定。協力・レイドの部屋。comm-frame.js・session-squad-comm.js) =====
   設計: newGame-director/2026-11-18_レイドの画面の仕様と設計方針.md。色の役目: 緑=ゲームとミラ / 金=レイドと人から来たもの / 淡い水色の点線=CPU(残影) / 赤=敵・SHIELDが少ない。
   置き場所は1つ(PC は左上。スマホの縦持ちは時計の下の帯)。戦いの最中は照準の輪・レーダー・右手のボタンに重ねず、入力も受けない。字は 13px 以上 */
:root { --comm-raid: #ffd36a; --comm-echo: #8fe3ff; --comm-cut: 12px; --comm-slot: 96px; }
#comm-frame {
  position: fixed; z-index: 10; left: calc(16px + env(safe-area-inset-left)); top: calc(16px + env(safe-area-inset-top)); width: min(380px, calc(100vw - 32px));
  pointer-events: none; filter: drop-shadow(0 0 6px rgba(102,255,170,0.18));
}
#comm-frame.hidden { display: none; }
#comm-frame.enter { animation: nav-enter-pop 0.35s ease-out; }
#comm-frame .comm-in {
  position: relative; padding: 8px 12px 10px 14px; background: rgba(6,22,17,0.88); border: 1px solid rgba(102,255,170,0.6);
  clip-path: polygon(0 var(--comm-cut), var(--comm-cut) 0, 100% 0, 100% calc(100% - var(--comm-cut)), calc(100% - var(--comm-cut)) 100%, 0 100%);
}
#comm-frame .comm-acc { position: absolute; z-index: 1; width: var(--comm-cut); height: var(--comm-cut); background: #66ffaa; }
#comm-frame .comm-acc.tl { left: 0; top: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
#comm-frame .comm-acc.br { right: 0; bottom: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
#comm-frame.raid { filter: drop-shadow(0 0 6px rgba(255,211,106,0.2)); }
#comm-frame.raid .comm-in { border-color: rgba(255,211,106,0.7); }
#comm-frame.raid .comm-acc { background: var(--comm-raid); }
#comm-frame .comm-tag { display: flex; align-items: center; height: 20px; margin-left: 6px; font: 700 13px var(--font-hud); letter-spacing: 0.14em; color: #9fe; }
#comm-frame .comm-tag em { display: flex; align-items: center; height: 100%; margin-right: 8px; padding: 0 12px 0 8px; font-style: normal; color: #04170e; background: #66ffaa; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
#comm-frame.raid .comm-tag { color: var(--comm-raid); }
#comm-frame.raid .comm-tag em { background: var(--comm-raid); }
/* 世界の仇(raid-foe.js): 敵のエースの知らせは赤(敵・危険の色) */
#comm-frame.foe { filter: drop-shadow(0 0 6px rgba(255,90,90,0.25)); }
#comm-frame.foe .comm-in { border-color: rgba(255,110,110,0.75); }
#comm-frame.foe .comm-acc { background: #ff6e6e; }
#comm-frame.foe .comm-tag { color: #ff8a8a; }
#comm-frame.foe .comm-tag em { color: #1a0505; background: #ff6e6e; }
#comm-frame.foe .comm-name { color: #ffb0b0; }
#comm-frame .comm-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
#comm-frame .comm-face { flex: none; width: 52px; height: 52px; background: center / cover no-repeat; border: 1px solid rgba(102,255,170,0.6); }
#comm-frame .comm-face.hidden { display: none; }
#comm-frame .comm-msg { flex: 1; min-width: 0; font: 500 var(--fs-body)/1.45 var(--font-text); color: #eff; white-space: pre-line; overflow-wrap: anywhere; text-wrap: balance; }
#comm-frame .comm-name { font-weight: 700; color: #fff; }
#comm-frame .comm-name.echo { color: var(--comm-echo); }

#squad-roster {
  position: fixed; z-index: 10; left: calc(16px + env(safe-area-inset-left)); top: calc(16px + var(--comm-slot) + 8px + env(safe-area-inset-top)); width: 280px;
  padding: 6px 10px 8px; background: rgba(6,22,17,0.6); border-left: 2px solid rgba(102,255,170,0.6); pointer-events: none;
}
#squad-roster.hidden { display: none; }
/* 支援要請の印(#support-mark。左上)が出ている間は、その下へ下げる(PC・横持ち) */
body:has(#support-mark:not(.hidden)) #comm-frame { top: calc(34px + env(safe-area-inset-top)); }
body:has(#support-mark:not(.hidden)) #squad-roster { top: calc(34px + var(--comm-slot) + 8px + env(safe-area-inset-top)); }
#squad-roster h4 { margin: 0 0 4px; font: 700 13px var(--font-hud); letter-spacing: 0.16em; color: #9fe; }
#squad-roster .squad-row { display: flex; align-items: center; gap: 9px; height: 26px; font: 600 14px var(--font-text); color: #fff; }
#squad-roster .squad-mark { flex: none; width: 11px; height: 11px; transform: rotate(45deg); background: var(--comm-raid); }
#squad-roster .squad-row.cpu .squad-mark { background: transparent; border: 1.5px dashed var(--comm-echo); }
#squad-roster .squad-row.cpu .squad-name { color: var(--comm-echo); }
#squad-roster .squad-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#squad-roster .squad-chip { flex: none; padding: 1px 6px; font: 700 13px var(--font-hud); letter-spacing: 0.1em; border: 1px solid currentColor; }
#squad-roster .squad-chip.you { color: #04170e; background: #66ffaa; border-color: #66ffaa; }
#squad-roster .squad-chip.cpu { color: var(--comm-echo); border-style: dashed; background: rgba(143,227,255,0.1); }
#squad-roster .squad-chip.van { color: #ffd36a; background: rgba(255,211,106,0.12); } /* 先陣(2026-11-20。金は誉れ) */
#squad-roster .squad-bar { flex: none; width: 54px; height: 5px; background: rgba(255,255,255,0.14); }
#squad-roster .squad-bar i { display: block; height: 100%; background: #66ffaa; }
#squad-roster .squad-bar.low i { background: #ff5a5a; }
body.summary-open #comm-frame, body.summary-open #squad-roster, body.map-open #comm-frame, body.map-open #squad-roster,
body.highlight-mode #comm-frame, body.highlight-mode #squad-roster { display: none !important; }
/* スマホ: 一覧は細い縦の列(2026-11-19 オーナー要望「名前の字を小さくしつつ縦に並べる。CPU機は特に小さく」)。人の名前は 11px、CPU 機(人のいない席・僚機・残影)は 9px。
   札(YOU・CPU・僚機)と見出しは省き、自分は名前の緑、CPU 機は点線のひし形と水色で分ける。--roster-w は列の幅。
   縦持ちは前は時計の下の横1列で、名前が「鋼…」「W…」と切れ、始めの目標の行に重なっていた。横持ちは PC と同じ大きさで A.M.R.O. のボタンと照準の輪にかかっていた */
@media (orientation: portrait) and (max-width: 600px), (orientation: landscape) and (max-height: 500px) {
  :root { --roster-w: 92px; }
  #squad-roster { box-sizing: border-box; width: var(--roster-w); padding: 4px 6px 5px; border-left-width: 2px; }
  #squad-roster h4 { display: none; }
  #squad-roster .squad-row { height: auto; display: grid; grid-template-columns: 9px minmax(0, 1fr); column-gap: 5px; row-gap: 2px; margin-bottom: 3px; font: 600 11px/1.2 var(--font-text); }
  #squad-roster .squad-row:last-child { margin-bottom: 0; }
  #squad-roster .squad-row.cpu { font-size: 9px; font-weight: 500; margin-bottom: 2px; }
  #squad-roster .squad-mark { width: 7px; height: 7px; margin-left: 1px; }
  #squad-roster .squad-row.cpu .squad-mark { width: 6px; height: 6px; border-width: 1px; }
  #squad-roster .squad-chip { display: none; }
  #squad-roster .squad-row.mine .squad-name { color: #66ffaa; }
  #squad-roster .squad-row.van:not(.mine) .squad-name { color: #ffd36a; } /* 先陣(札を出さない幅では名前を金に) */
  #squad-roster .squad-bar { grid-column: 1 / -1; width: 100%; height: 3px; }
  #squad-roster .squad-row.cpu .squad-bar { height: 2px; }
}
/* スマホの縦持ち: 一覧は時計の下の左の列。通信の枠・始めの目標の行・案内は、その右の残りの幅に出す */
@media (orientation: portrait) and (max-width: 600px) {
  #squad-roster { left: calc(6px + env(safe-area-inset-left)); top: calc(56px + env(safe-area-inset-top)); }
  body:has(#squad-roster:not(.hidden)) #round-goal { left: calc(6px + var(--roster-w) + 6px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); transform: none; max-width: none; }
  body:has(#squad-roster:not(.hidden)) #mission-nav, body:has(#squad-roster:not(.hidden)) #mission-nav.has-face {
    left: calc(6px + var(--roster-w) + 6px + env(safe-area-inset-left)); transform: none; max-width: calc(100vw - var(--roster-w) - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }
  body:has(#squad-roster:not(.hidden)) #comm-frame { left: calc(6px + var(--roster-w) + 6px + env(safe-area-inset-left)); width: calc(100vw - var(--roster-w) - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  #comm-frame { left: calc(8px + env(safe-area-inset-left)); top: calc(104px + env(safe-area-inset-top)); width: calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  body:has(#support-mark:not(.hidden)) #squad-roster { top: calc(56px + env(safe-area-inset-top)); }
  body:has(#support-mark:not(.hidden)) #comm-frame { top: calc(104px + env(safe-area-inset-top)); }
  #comm-frame .comm-tag { display: none; }
  #comm-frame .comm-row { margin-top: 0; }
  #comm-frame .comm-in { padding: 7px 10px 8px 12px; }
  #comm-frame .comm-face { width: 38px; height: 38px; }
  #comm-frame .comm-msg { font-size: 14.5px; line-height: 1.4; }
}

/* ============================================================================================================
   画面の総点検(2026-11-18)の段2: 字と押す場所の下限(K1・K2。資料は newGame-director/2026-11-18_全モードの画面の総点検と改善案.md)。
   - 字は 13px 以上(--fs-small を 13px に上げた。個別に小さかった字は、それぞれの規則で --fs-small にした)
   - タッチ(body.touch-device)の押す場所は高さ 44px 以上(レイドの画面の決まりと同じ)。PC の最初の画面の下の帯は 34px 以上
   場所を動かすと試合の画面に重なる物(リプレイのカメラのボタンなど)は、見た目を変えず、押せる範囲だけを ::before で広げる。
   見張りは tests/ui-audit-stage2.spec.js
   ============================================================================================================ */
/* MENU・設定・ルール・プロフィールの項目(41px → 44px 以上) */
body.touch-device .game-menu-item:not(.read-only) { padding-top: 11px; padding-bottom: 11px; } /* 押せない行(版の番号など)は今までの高さ */
body.touch-device .settings-tabs > .game-menu-item { padding-top: 12px; padding-bottom: 12px; }
/* 値を変える ◀ ▶(33×24px だった。S3) */
.settings-value button { min-width: 36px; min-height: 26px; } /* PC は行の高さが増えない大きさまで(一覧に見える行の数を保つ) */
body.touch-device .settings-value button { min-width: 44px; min-height: 40px; }
/* 最初の画面の下の帯(T1・T3): PC は 34px、タッチは 44px */
#title-corner button, #title-youtube, #title-x, #title-discord, #lang-switch button { min-height: 34px; box-sizing: border-box; }
body.touch-device #title-corner button, body.touch-device #title-youtube, body.touch-device #title-x, body.touch-device #title-discord, body.touch-device #lang-switch button, body.touch-device #lang-select { min-height: 44px; box-sizing: border-box; }
body.touch-device #title-youtube, body.touch-device #title-x, body.touch-device #title-discord { min-width: 44px; }
/* 高さの低い画面(スマホの横持ち。すすめていない持ち方)は、入り口がスクロールなしで収まることを優先して、下の帯は今までの高さのまま */
@media (max-height: 500px) {
  #title-corner button, #title-youtube, #title-x, #title-discord, #lang-switch button, body.touch-device #title-corner button, body.touch-device #title-youtube, body.touch-device #title-x, body.touch-device #title-discord, body.touch-device #lang-switch button, body.touch-device #lang-select { min-height: 0; }
}
/* 出撃前の出す数の「−」「+」(18×16px・9px だった。B1)と「?」 */
body.touch-device #stock-help { width: 40px; height: 40px; }
/* 出撃前のミラの説明と目標は、この画面でいちばん大事な文なので本文の大きさ(B2) */
#summary.briefing #summary-help { font-size: var(--fs-body); }
/* 全体マップ(M1): 札は見た目を変えず押せる範囲を広げる(札どうしの間隔は layout.spec.js が見張っている)。GO・BACK・OK は 46px */
body.touch-device .bmap-label::before { content: ""; position: absolute; inset: -8px -4px; }
body.touch-device #bmap-buttons button, body.touch-device #bmap-legend-ok { padding-top: 12px; padding-bottom: 12px; }
body.touch-device #bmap-help { min-width: 44px; min-height: 44px; }
/* 結果・サマリ(E3): 下の帯のボタン、勲章・戦績の「詳しく」、TIPS の「詳しく」(押せる範囲だけ広げる) */
body.touch-device #summary-button, body.touch-device #summary-replay-button, body.touch-device #summary-salute, body.touch-device #summary-back, body.touch-device #summary-support, body.touch-device #summary-next, body.touch-device #stats-detail-close, body.touch-device #tutorial-back, body.touch-device #highlight-next, body.touch-device #howto-close { min-height: 44px; box-sizing: border-box; }
body.touch-device .stats-more { min-height: 44px; box-sizing: border-box; }
.tip-more { position: relative; }
body.touch-device .tip-more::before { content: ""; position: absolute; inset: -12px -8px -12px 0; }
/* MULTI(N2): BACK・招待リンク・RULES・ハンデ・「−」「+」 */
/* BACK を 44px にした分、見出しの枠を高くして題との間をあける */
body.touch-device #lobby.open #lobby-head { height: 128px; }
body.touch-device #lobby #lobby-back, body.touch-device #lobby button#lobby-invite, body.touch-device #lobby-rules-change, body.touch-device #lobby-handicap-toggle { min-height: 44px; box-sizing: border-box; }
body.touch-device .handicap button.hc-step, body.touch-device #lobby .handicap button.hc-step { min-width: 44px; min-height: 40px; }
/* リプレイ: ½×・‖・2× は 40px。右上の UI・SHOT・REC は 44×36px にして間を詰め直す(表示を消している間の小さい形はそのまま) */
body.touch-device #replay-ctrl button { min-width: 44px; height: 40px; }
body.touch-device:not(.replay-clean) #replay-clean-btn, body.touch-device:not(.replay-clean) #replay-shot-btn, body.touch-device:not(.replay-clean) #replay-rec-btn, body.touch-device:not(.replay-clean) #replay-clip-btn { width: 48px; height: 36px; }
body.touch-device:not(.replay-clean) #replay-shot-btn { top: 118px; }
body.touch-device:not(.replay-clean) #replay-rec-btn { top: 160px; }
body.touch-device:not(.replay-clean) #replay-clip-btn { top: 202px; }
/* カメラのボタン(Next・Prev・FixPos・P-View。84×34px)は、すぐ下がレーダーなので大きさは変えず、押せる範囲を上下に広げる */
#camera-ui button { position: relative; }
body.touch-device #camera-ui button::before { content: ""; position: absolute; inset: -3px 0; }
/* 格納庫・プロフィールの小さい押す場所 */
body.touch-device .ss-arrow { min-width: 44px; min-height: 44px; }
body.touch-device .profile-face-chip, body.touch-device .profile-team-chip, body.touch-device .profile-callsign-word { min-height: 40px; }

/* ── 総点検 段4(2026-11-18 オーナー決定「試作どおり組み直す」): 決着の結果の画面(#summary.final) ──
   上にミラの一言(#tip.tip-summary)、左に「この試合で得たもの」(#summary-xp)、中央に全体の図、右に自分の戦績(.stats-panel.mine)。
   相手の軍の戦績(2人対戦・席の部屋)は左の下。両軍の数の表は、自分の戦績の「詳しく」の中(.counts-folded。一騎打ちは表が得点なので出したまま)。
   狭い画面は縦1列: ミラ → 得たもの → 戦績 → 全体の図。ラウンドの間のサマリと出撃前(BRIEFING)は今までどおり */
#summary.final #summary-main { align-items: start; gap: 14px 24px; }
#summary-xp, #summary.final .stats-panel { width: min(340px, 100%); box-sizing: border-box; }
#summary-xp { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; text-align: left; background: rgba(0,20,30,0.75); border: 1px solid rgba(102,255,170,0.4); }
#summary-xp::before, #summary.final .stats-panel[data-label]::before {
  content: attr(data-label); display: block; width: max-content; max-width: 100%; margin-bottom: 8px; padding: 1px 10px;
  font: 700 var(--fs-small)/1.5 var(--font-hud); letter-spacing: 0.16em; color: #04140e; background: #66ffaa;
}
#summary-xp #rank-up { align-self: center; }
#summary-xp .xp-medals { justify-content: flex-start; margin-bottom: 2px; }
#summary-xp .xp-total { font: 700 var(--fs-title)/1.2 var(--font-hud); color: #66ffaa; letter-spacing: 0.02em; }
#summary-xp .xp-band { order: 1; display: flex; width: 100%; margin-top: 0; }
#summary-xp .xp-band .xp-bar { flex: 1 1 auto; width: auto; }
#summary-xp .xp-items { order: 2; margin-top: 0; }
#summary.final #summary-xp { grid-column: 1; grid-row: 2; justify-self: end; align-self: start; }
#summary.final #summary-center { grid-column: 2; grid-row: 2 / 4; }
#summary.final .stats-panel { grid-column: 1; grid-row: 3; justify-self: end; align-self: start; }
#summary.final:has(#summary-xp.hidden) .stats-panel { grid-row: 2 / 4; }
#summary.final .stats-panel.mine { grid-column: 3; grid-row: 2 / 4; justify-self: start; font-size: var(--fs-body); }
#summary.final .stats-panel.mine .row span:last-child { font-weight: 700; }
#summary.final .stats-more { margin-top: 10px; padding: 8px; }
.stats-panel h4 .own-ship-badge { vertical-align: middle; margin: 0 6px 0 0; } /* 見出しは overflow: hidden なので、表のときの負の余白は付けない */
#summary.counts-folded #summary-table { display: none; } /* 両軍の数は戦績の窓の中に出す(2026-11-25 から表に残す行は無い) */
#stats-detail-card .counts-head { margin: 14px 0 8px; font: 700 var(--fs-small) var(--font-hud); letter-spacing: 0.15em; color: #9fe; }
#stats-detail-card .counts-table { width: 100%; border-collapse: collapse; font: var(--fs-body)/1.6 var(--font-hud); }
#stats-detail-card .counts-table th, #stats-detail-card .counts-table td { padding: 3px 10px; border: 1px solid rgba(255,255,255,0.2); text-align: center; white-space: nowrap; }
#stats-detail-card .counts-table .white-team { color: #dfefff; }
#stats-detail-card .counts-table .red-team { color: #ff8080; }
body.team-look-swap #stats-detail-card .counts-table .white-team { color: #ff8080; }
body.team-look-swap #stats-detail-card .counts-table .red-team { color: #dfefff; }
body.screen-narrow #summary.final #summary-main { display: flex; flex-direction: column; align-items: center; gap: 12px; }
body.screen-narrow #summary.final #summary-center { display: contents; }
body.screen-narrow #summary.final #summary-xp, body.screen-narrow #summary.final .stats-panel { align-self: center; width: min(420px, 100%); }
body.screen-narrow #summary.final #tip { order: 1; }
body.screen-narrow #summary.final #summary-xp { order: 2; }
body.screen-narrow #summary.final #summary-talk { order: 3; }
body.screen-narrow #summary.final #summary-table { order: 4; }
body.screen-narrow #summary.final #sum-rwnd-row { order: 5; }
body.screen-narrow #summary.final #summary-tabs { order: 6; }
body.screen-narrow #summary.final .stats-panel { order: 8; }
body.screen-narrow #summary.final .stats-panel.mine { order: 7; }
body.screen-narrow #summary.final #field-radar { order: 9; }
/* スマホの幅: 主のボタンを横いっぱいで上に、「戻る」「リプレイを見る」をその下に並べる */
@media (max-width: 600px) {
  #summary.final .screen-bar #summary-wait-seats, #summary.final .screen-bar #summary-handicap { order: -2; }
  #summary.final .screen-bar #summary-button, #summary.final .screen-bar #summary-support, #summary.final .screen-bar #summary-next { order: -1; flex: 1 0 100%; }
  /* ミッションに勝って「次の作戦へ」があるときは、それがいちばん上。「全体マップへ」は「リプレイを見る」と同じ段へ(2026-11-21) */
  #summary.final .screen-bar:has(#summary-next:not(.hidden)) #summary-button { order: 0; flex: 1 1 0; }
  #summary.final .screen-bar #summary-next { min-width: 0; }
  #summary.final .screen-bar #summary-back, #summary.final .screen-bar #summary-replay-button, #summary.final .screen-bar #summary-salute { flex: 1 1 0; }
  /* ミッションで負けたときは「支援を頼んでもう一度」がいちばん上。主のボタン(全体マップへ)は「リプレイを見る」と同じ段へ */
  #summary.final .screen-bar:has(#summary-support:not(.hidden)) #summary-button { order: 0; flex: 1 1 0; }
}

/* ── 総点検 段5(2026-11-18 オーナー決定「試作どおり並べ直す」): 試合中の MENU ──
   「飛ぶ / 見る・調べる / 設定」に分けて2列に並べる。下の帯の左に「試合に戻る」(主役。広め)、右に終わらせる項目(終了・撤退・試合から抜ける。赤い線)。
   キーの印は今までどおり(タッチでキーボードを使っていない間は出さない) */
#game-menu-box:has(#game-menu-items[data-view="main"]) { width: min(560px, calc(100vw - 16px)); }
#game-menu-items[data-view="main"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; }
#game-menu-items[data-view="main"] .rules-heading { grid-column: 1 / -1; border-bottom: 0; margin-top: 4px; letter-spacing: 0.1em; }
#game-menu-items[data-view="main"] .rules-heading:first-child { margin-top: 0; }
#game-menu-items[data-view="main"] ~ #game-menu-bar .btn-primary { flex: 1.6; text-align: left; }
#game-menu-items[data-view="main"] ~ #game-menu-bar .btn-danger { background: transparent !important; white-space: normal; }
/* 撤退は一言(何が戻らないか)が付くので、下の帯を縦に並べる(「試合に戻る」が一言の高さに引き伸ばされないように) */
#game-menu-items[data-view="main"] ~ #game-menu-bar:has(.item-note) { flex-direction: column; }
#game-menu-items[data-view="main"] ~ #game-menu-bar:has(.item-note) .btn-primary { text-align: center; }
#game-menu-items[data-view="main"] ~ #game-menu-bar .item-note { white-space: normal; }
body.screen-compact #game-menu-items[data-view="main"] .game-menu-item { padding-left: 10px; padding-right: 10px; }
#game-menu-items[data-view="main"] .game-menu-item { word-break: keep-all; overflow-wrap: anywhere; }
/* 低い画面(360x640 など): 撤退の一言が付くと一覧が切れるので、すき間を詰めて枠を画面いっぱいまで使う */
@media (max-height: 700px) {
  #game-menu-box:has(#game-menu-items[data-view="main"]) { max-height: calc(100dvh - 8px); padding-top: 12px; padding-bottom: 12px; }
  #game-menu-box:has(#game-menu-items[data-view="main"]) h3 { margin-bottom: 6px; }
  #game-menu-items[data-view="main"] { gap: 6px; }
  #game-menu-items[data-view="main"] .rules-heading { margin-top: 0; }
  #game-menu-items[data-view="main"] ~ #game-menu-bar { margin-top: 8px; padding-top: 8px; gap: 6px; }
  #game-menu-items[data-view="main"] ~ #game-menu-bar .item-note { line-height: 1.3; }
}

/* ===== 総点検 段6(2026-11-18): PROFILE をタブ3つに分ける(screen-profile.js の profileBlock)。
   前は1本の長い縦送り(機体・色・顔・スキン・勲章26行)で、字は 13px、勲章の条件はマウスを乗せないと出なかった。
   タブ「戦績 / 名前と見た目 / 勲章」→ 階級の1行(どのタブでも出す)→ 選んだタブの中身。戦績と勲章の本文は 15px、タブと勲章の行は 44px 以上(名前と見た目の中身は前のまま) ===== */
#game-menu-box:has(#game-menu-items[data-view="profile"]) { width: min(560px, calc(100vw - 16px)); }
body.screen-narrow #game-menu-box:has(#game-menu-items[data-view="profile"]) { padding-left: 16px; padding-right: 16px; }
.profile-block { align-items: stretch; gap: 10px; margin-top: 0; font-family: var(--font-text); }
.profile-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.profile-tab { min-width: 0; min-height: 44px; padding: 6px 4px; cursor: pointer; font: 700 var(--fs-body) var(--font-text); color: #cfe; background: rgba(10,40,30,0.5); border: 1px solid rgba(102,255,170,0.6); border-radius: 0; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; }
.profile-tab-count { white-space: nowrap; }
body.screen-compact .profile-tab { padding: 6px 2px; font-size: 14px; }
.profile-tab.selected { color: #fff; background: rgba(102,255,170,0.3); border-color: #66ffaa; }
/* 階級の1行: 記章 | Lv. と階級 / 次のLv.まで | 下に進み具合の棒 */
.profile-head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; text-align: left; }
.profile-head > svg { grid-row: span 2; }
.profile-head .profile-lv { font: 700 calc(var(--fs-body) * 1.2) var(--font-text); letter-spacing: 0.04em; }
.profile-head .xp-bar { grid-column: 1 / -1; display: block; width: auto; height: 8px; margin: 4px 0 0; }
.profile-pane { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* 戦績: 項目名は左、数は右。1行ずつ線で区切る */
.profile-stats { grid-template-columns: 1fr auto; gap: 0; width: 100%; margin-top: 0; font-size: var(--fs-body); text-align: left; }
.profile-stats span { padding: 9px 2px; border-bottom: 1px solid rgba(102,255,170,0.15); }
.profile-stats span:nth-child(2n) { font-weight: 700; font-variant-numeric: tabular-nums; }
/* 勲章: 段階の印 | 名前と条件の一言 | 残り */
.profile-medals { gap: 0; font-size: var(--fs-body); text-align: left; }
.profile-medals .medal-row { min-height: 44px; padding: 4px 2px; box-sizing: border-box; border-bottom: 1px solid rgba(102,255,170,0.15); gap: 10px; }
.medal-text { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; }
.medal-name { color: #fff; }
.medal-desc { font-size: var(--fs-small); opacity: 0.8; }
.profile-medals .medal-next { font-size: var(--fs-small); white-space: nowrap; }
.profile-medals .medal-pip { width: 11px; height: 11px; }
/* タブは、一覧を送っても上に残す */
.profile-tabs { position: sticky; top: 0; z-index: 1; padding-bottom: 4px; background: rgb(10,20,18); }

/* ===== 総点検 段7(2026-11-18 オーナー決定「試作どおり日本語に直す」): リプレイ・観戦の操作の言葉。
   カメラ: Next / Prev / FixPos / P-View → 次の機体 / 前の機体 / 固定カメラ / 機体の目線。右上: UI / SHOT / REC → 表示を消す / 写真 / 録画。
   右上の3つは言葉が入る幅(76px)にして、間を詰め直す。表示を消している間の小さい形は、前と同じ短い印(UI・SHOT・REC)のまま ===== */
body:not(.replay-clean) #replay-clean-btn, body:not(.replay-clean) #replay-shot-btn, body:not(.replay-clean) #replay-rec-btn { width: 76px; height: 32px; font-family: var(--font-text); letter-spacing: 0; white-space: nowrap; }
body:not(.replay-clean) #replay-shot-btn { top: 114px; }
body:not(.replay-clean) #replay-rec-btn { top: 152px; }
body:not(.replay-clean) #replay-clip-btn { top: 190px; width: 76px; }
body.touch-device:not(.replay-clean) #replay-clean-btn, body.touch-device:not(.replay-clean) #replay-shot-btn, body.touch-device:not(.replay-clean) #replay-rec-btn { width: 76px; height: 44px; }
body.touch-device:not(.replay-clean) #replay-shot-btn { top: 126px; }
body.touch-device:not(.replay-clean) #replay-rec-btn { top: 176px; }
body.touch-device:not(.replay-clean) #replay-clip-btn { top: 226px; }
body.replay-clean #replay-clean-btn, body.replay-clean #replay-shot-btn, body.replay-clean #replay-rec-btn:not(.recording) { font-size: 0; }
body.replay-clean #replay-clean-btn::after { content: "UI"; font-size: 9px; }
body.replay-clean #replay-shot-btn::after { content: "SHOT"; font-size: 9px; }
body.replay-clean #replay-rec-btn:not(.recording)::after { content: "REC"; font-size: 9px; }
#camera-ui button { font-family: var(--font-text); white-space: nowrap; padding: 0 2px; }
@media (orientation: landscape) and (max-height: 500px) { #camera-ui button { width: 80px; } }

/* ===== 総点検 段8(2026-11-18 オーナー決定「通信の枠の位置に移す」): 戦いの最中の案内の置き場所を、通信の枠(#comm-frame)と同じ所にそろえる。
   前は、ミッション・チュートリアルの案内(#mission-nav)が照準の輪の上の弧に、操作の案内(#control-hint)が輪の下〜レーダーの上(スマホは自機の真上)に重なっていた。
   PC(横長で高さのある画面): 案内は左上(通信の枠と同じ left / top)。幅は、手で入れた改行が語の途中で折れにくいように 520px まで(上のまん中の時計の手前まで)。
     操作の案内は左下(下のまん中のレーダーの板の手前まで)。タッチの横長(タブレット)は、左下の A.M.R.O. のボタンの上。
   スマホの縦持ち: 案内は前から時計の下。操作の案内も同じ所へ(案内が出ている間は出さない=同じ場所に順番に出す。session-tips.js)。
     協力・レイドで小隊の一覧が出ている間は、一覧と通信の枠の下の段へ。
   スマホの横持ち(高さ 500px 以下)は前のまま ===== */
@media (orientation: landscape) and (min-height: 501px) {
  #mission-nav, #mission-nav.has-face, #mission-nav.collapsed, #mission-nav.collapsed.has-face {
    left: calc(16px + env(safe-area-inset-left)); top: calc(16px + env(safe-area-inset-top)); transform: none; max-width: min(520px, calc(50vw - 110px)); text-align: left;
  }
  /* 支援要請の印(左上の角)が出ている間は、通信の枠と同じだけ下げる */
  body:has(#support-mark:not(.hidden)) #mission-nav { top: calc(34px + env(safe-area-inset-top)); }
  #mission-nav.enter { animation: nav-enter-pop 0.35s ease-out; }
  #mission-nav .nav-head, #mission-nav .nav-head:not(:has(.nav-speaker)) { justify-content: flex-start; }
  #mission-nav .nav-buttons { justify-content: flex-start; }
  #control-hint, #control-hint.coach, body.touch-device #control-hint, body.touch-device #control-hint.coach {
    left: calc(16px + env(safe-area-inset-left)); bottom: calc(16px + env(safe-area-inset-bottom)); transform: none; max-width: min(380px, calc(50vw - 200px)); text-align: left; white-space: normal;
  }
  body.touch-device #control-hint, body.touch-device #control-hint.coach { bottom: calc(112px + env(safe-area-inset-bottom)); }
}
@media (orientation: portrait) {
  #control-hint, body.touch-device #control-hint { top: calc(96px + env(safe-area-inset-top)); bottom: auto; max-width: calc(100vw - 20px); text-align: left; }
  body:has(#mission-nav:not(.hidden)) #control-hint { display: none; }
  /* ミッションの目標の大きな表示が出ている間も出さない(2026-11-19 オーナー要望。同じ高さに重なっていた) */
  body:has(#goal-popup:not(.hidden)) #control-hint { display: none; }
  body:has(#squad-roster:not(.hidden)) #control-hint, body.touch-device:has(#squad-roster:not(.hidden)) #control-hint { top: calc(192px + env(safe-area-inset-top)); }
}
@media (orientation: portrait) and (max-height: 640px) {
  /* 背の低い画面: 右のレバーの手前までの幅。すぐ下の ENERGY の字にかからない高さ(2行まで) */
  #control-hint, body.touch-device #control-hint { left: 8px; transform: none; max-width: calc(100vw - 92px); padding: 4px 10px; line-height: 1.4; }
}

/* ===== レイドの呼びかけ(2026-11-19 オーナー決定。session-raid-call.js) =====
   ほかの人がレイドに公開で出撃した知らせ。金=レイドと人から来たもの(通信の枠と同じ色の役目)。
   戦っている最中(.fighting)は画面の上の細い帯(照準の輪・レーダーに重ねない)。ほかの画面では、上のまん中に大きめのボタン付きで出す */
#raid-call { box-sizing: border-box; position: fixed; z-index: 45; left: 0; right: 0; margin: 0 auto; top: calc(72px + env(safe-area-inset-top)); width: min(560px, calc(100vw - 32px)); padding: 12px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: rgba(22,17,6,0.94); border: 1px solid var(--comm-raid); box-shadow: 0 0 18px rgba(255,211,106,0.25); color: #fff3c9; font-family: var(--font-text); animation: nav-enter-pop 0.35s ease-out; user-select: none; }
#raid-call.hidden { display: none; }
#raid-call .raid-call-tag { font: 700 13px var(--font-hud); letter-spacing: 0.18em; color: var(--comm-raid); }
#raid-call .raid-call-text { font-size: 16px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
#raid-call .raid-call-hint { font-size: 14px; font-weight: 700; color: var(--comm-raid); }
#raid-call .raid-call-hint.hidden, #raid-call .raid-call-buttons.hidden { display: none; }
#raid-call .raid-call-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#raid-call .raid-call-btn { min-height: 44px; padding: 8px 18px; cursor: pointer; border: 1px solid var(--comm-raid); border-radius: 0; background: rgba(255,211,106,0.12); color: #fff3c9; font: 700 15px var(--font-text); }
#raid-call .raid-call-btn.primary { background: var(--comm-raid); color: #1a1303; }
#raid-call .raid-call-btn:hover, #raid-call .raid-call-btn:focus-visible { filter: brightness(1.15); }
/* 戦っている最中: 細い帯。マウスが照準に使われている間(.nomouse)は、ボタンは出さずキーの案内だけ(タッチ・MENU を開いている間は小さいボタン) */
#raid-call.fighting { top: calc(78px + env(safe-area-inset-top)); width: min(520px, calc(100vw - 32px)); padding: 6px 12px 8px; gap: 3px; background: rgba(22,17,6,0.82); }
#raid-call.fighting .raid-call-tag { display: none; }
#raid-call.fighting .raid-call-text { font-size: 14px; }
#raid-call.fighting[data-mode="pending"] { width: fit-content; max-width: calc(100vw - 32px); padding: 3px 12px; border-color: rgba(255,211,106,0.5); background: rgba(22,17,6,0.6); }
#raid-call.fighting[data-mode="pending"] .raid-call-text { font-size: 13px; font-weight: 500; }
#raid-call.nomouse .raid-call-buttons { display: none; }
#raid-call.fighting .raid-call-btn { min-height: 40px; padding: 6px 12px; font-size: 14px; }
body.highlight-mode #raid-call { display: none !important; }
/* ===== ミラの戦況速報(2026-11-19 オーナー決定。session-raid-news.js) =====
   MULTI PLAY の枠のすぐ下の1行。緑はシステム・ミラ、名前だけレイドの金(通信の枠の色の決まり)。字は13px以上 */
#raid-news { box-sizing: border-box; width: 100%; margin-top: 8px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; text-align: left; background: rgba(4,14,10,0.72); border-left: 2px solid #66ffaa; font-family: var(--font-text); user-select: none; overflow: hidden; }
#raid-news.hidden { display: none; }
#raid-news .raid-news-tag { flex: none; font: 700 13px var(--font-hud); letter-spacing: 0.12em; color: #66ffaa; }
#raid-news .raid-news-text { min-width: 0; min-height: 2.8em; /* 2行ぶん: 行が替わっても下の物が動かない */ font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.88); overflow-wrap: anywhere; }
#raid-news .raid-news-text b { font-weight: 700; color: var(--comm-raid); }
#raid-news .raid-news-text.in { animation: raid-news-in 0.45s ease-out; }
@keyframes raid-news-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#lobby.open #raid-news { margin: 0 0 10px; }
@media (prefers-reduced-motion: reduce) { #raid-news .raid-news-text.in { animation: none; } }
/* 結果の画面では、見出しとミラの一言に重ねず、下のボタンの帯の上に出す */
body.summary-open #raid-call { top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (max-width: 700px) and (orientation: portrait) {
  #raid-call { top: calc(104px + env(safe-area-inset-top)); width: calc(100vw - 16px); }
  #raid-call.fighting { top: calc(104px + env(safe-area-inset-top)); width: calc(100vw - 16px); }
}
@media (prefers-reduced-motion: reduce) { #raid-call { animation: none; } }
