/* =============================================================
   ギャラクシー2150 — 画面の見た目
   配色は galaxy に合わせる（暗い紺・半透明の窓・青の差し色）。
   左上＝Lv10メニュー、左下＝mp3プレーヤーの予約。HUD は右と上中央に置く。
   ============================================================= */
:root{
    --bg:#05070b; --panel:rgba(14,19,30,.86); --panel2:rgba(22,28,42,.92);
    --line:rgba(122,160,214,.28); --line2:rgba(122,160,214,.5);
    --text:#e8ecf4; --sub:#9aa4b8; --accent:#4da3ff; --danger:#ff5c6e; --ok:#46d18a; --warn:#ffd166; --purple:#b48cff;
    --ui倍:1;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; width:100%; height:100%; background:var(--bg); color:var(--text);
    font-family:"Yu Gothic UI","Segoe UI","Noto Sans JP",sans-serif; overflow:hidden; overscroll-behavior:none; user-select:none; }
#app{ position:fixed; inset:0; overflow:hidden; }
#game-canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; }

.btn{ appearance:none; border:1px solid var(--line2); background:rgba(24,32,48,.88); color:var(--text);
    padding:7px 14px; border-radius:6px; font:inherit; font-size:14px; cursor:pointer; transition:background .12s, border-color .12s, transform .08s; }
.btn:hover:not(:disabled){ background:rgba(46,62,92,.95); border-color:#7fb8ff; }
.btn:active:not(:disabled){ transform:translateY(1px); }
.btn:disabled, .btn.買えない{ opacity:.38; cursor:default; }
.btn:focus-visible, .btn.lv10-フォーカス, .btn:focus{ outline:2px solid #ffd166; outline-offset:1px; }
.btn-main{ background:linear-gradient(180deg,#2f7fe0,#1f5cb0); border-color:#6fb0ff; font-weight:bold; }
.btn-main:hover:not(:disabled){ background:linear-gradient(180deg,#3b8ff5,#2569c4); }
.btn.is-on{ background:rgba(77,163,255,.32); border-color:#9fd0ff; box-shadow:inset 0 0 0 1px #4da3ff; }
.btn.小{ padding:4px 9px; font-size:12px; }

/* ---------------- タイトル ---------------- */
#題{ position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:28px;
    background:radial-gradient(ellipse at 50% 60%, rgba(5,7,11,0) 30%, rgba(5,7,11,.7) 100%); }
#題[hidden]{ display:none; }
.題-文字{ text-align:center; text-shadow:0 0 24px rgba(77,163,255,.6), 0 2px 4px #000; animation:題光 4s ease-in-out infinite; }
.題-年{ letter-spacing:.6em; color:#9fd0ff; font-size:15px; margin-bottom:6px; }
.題-名{ margin:0; font-size:clamp(34px,6.5vw,76px); letter-spacing:.08em; font-weight:900;
    background:linear-gradient(180deg,#ffffff 20%,#9fd0ff 60%,#4da3ff); -webkit-background-clip:text; background-clip:text; color:transparent; }
.題-名 span{ display:block; font-size:.42em; letter-spacing:.55em; margin-top:4px; }
@keyframes 題光{ 50%{ filter:brightness(1.18); } }
.題-釦{ display:flex; flex-direction:column; gap:10px; min-width:260px; }
.題-釦 .btn{ font-size:17px; padding:11px 18px; }
.題-釦 small{ display:block; font-size:11px; font-weight:normal; opacity:.8; margin-top:2px; }
.題-版{ position:absolute; right:14px; bottom:10px; color:var(--sub); font-size:12px; }

/* ---------------- HUD ---------------- */
#hud{ position:absolute; inset:0; pointer-events:none; z-index:3; font-size:calc(13px * var(--ui倍)); }
#hud[hidden]{ display:none; }
#hud > *{ pointer-events:auto; }
#hud-上{ position:absolute; top:10px; left:50%; transform:translateX(-50%); text-align:center; white-space:nowrap;
    padding:6px 16px; background:linear-gradient(180deg,rgba(8,12,20,.8),rgba(8,12,20,.4)); border:1px solid var(--line); border-radius:8px; pointer-events:none; }
.hud-名{ font-size:1.45em; font-weight:bold; margin-right:10px; letter-spacing:.04em; }
.hud-印{ display:inline-block; margin:0 3px; padding:1px 8px; border-radius:10px; font-size:.92em; border:1px solid var(--色,#9aa4b8); color:var(--色,#c8d0e0); background:rgba(0,0,0,.35); }
.hud-印.赤{ color:#ff8a8a; }
.hud-航行{ margin-top:4px; color:#ffd166; font-size:.95em; }
.hud-航行.緑{ color:#7fffd4; } .hud-航行.紫{ color:#c8a8ff; }
#hud-標的{ position:absolute; top:126px; left:50%; transform:translateX(-50%); min-width:260px; text-align:center; }
#hud-標的:empty{ display:none; }
#hud-標的{ padding:8px 14px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.標-名{ font-weight:bold; font-size:1.1em; }
.標-副{ color:var(--sub); font-size:.9em; margin:2px 0 5px; }
.標-釦{ margin-top:6px; }
#hud-右{ position:absolute; top:10px; right:10px; width:calc(214px * var(--ui倍)); display:flex; flex-direction:column; gap:8px; align-items:stretch; }
.hud-釦列{ display:flex; flex-wrap:wrap; gap:4px; justify-content:flex-end; }
#hud-資{ padding:9px 12px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.hud-艦長{ font-size:1.05em; } .hud-艦長 b{ color:#ffd166; }
.hud-金{ font-size:1.5em; font-weight:bold; color:#ffe27a; margin-top:5px; } .hud-金 small{ font-size:.55em; color:var(--sub); }
.hud-行{ color:#c8d0e0; margin-top:2px; }
#hud-資 .hud-印{ margin:5px 3px 0 0; }
#hud-レーダー{ width:calc(200px * var(--ui倍)); height:calc(200px * var(--ui倍)); align-self:flex-end; }
#hud-艦隊{ position:absolute; right:10px; bottom:10px; display:flex; gap:6px; flex-wrap:wrap-reverse; justify-content:flex-end; max-width:calc(100vw - 340px); }
.hud-艦{ width:calc(118px * var(--ui倍)); padding:5px 7px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.hud-艦.旗{ border-color:#7fb8ff; box-shadow:0 0 12px rgba(77,163,255,.35); }
.hud-艦.大破{ opacity:.55; }
.hud-艦 img{ width:100%; height:calc(38px * var(--ui倍)); object-fit:contain; display:block; }
.hud-艦名{ font-size:.85em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#hud-艦隊.多{ gap:4px; }
#hud-艦隊.多 .hud-艦{ width:calc(84px * var(--ui倍)); padding:3px 5px; }
#hud-艦隊.多 .hud-艦 img{ height:calc(26px * var(--ui倍)); }
#hud-艦隊.多 .hud-艦名{ font-size:.75em; } #hud-艦隊.多 .hud-特{ font-size:.7em; }
.hud-特{ font-size:.8em; color:var(--sub); margin-top:2px; } .hud-特.可{ color:#ffd166; }
.棒{ height:5px; background:rgba(255,255,255,.1); border-radius:3px; overflow:hidden; margin-top:3px; }
.棒 > i{ display:block; height:100%; background:#46d18a; transition:width .15s; }
.棒.盾 > i{ background:#5ec8ff; }
/* HUD の棒は 80_画面.js が scaleX で動かす（幅を変えるとレイアウトが毎回走る）。0.1秒ごとに書くのでアニメは付けない */
#hud-艦隊 .棒 > i, #hud-標的 .棒 > i{ transition:none; transform-origin:left center; }
#hud-資, #hud-標的{ contain:layout paint; } .hud-艦{ contain:layout; }
#hud-右, #hud-艦隊, #hud-上, #hud-標的{ will-change:transform; }   /* 毎フレーム動く canvas の上に重なるので、各枠を自分の層に分けて描き直しを枠の中に閉じる */
.棒.経験 > i{ background:#ffd166; }
#入星{ position:absolute; top:34%; left:0; right:0; text-align:center; pointer-events:none; opacity:0; text-shadow:0 0 16px rgba(77,163,255,.7), 0 2px 3px #000; }
#入星.is-on{ animation:入星 3.2s ease-out forwards; }
.入星-名{ font-size:clamp(28px,4.5vw,52px); font-weight:900; letter-spacing:.12em; }
.入星-副{ font-size:16px; color:#c8dcff; margin-top:6px; letter-spacing:.2em; }
@keyframes 入星{ 0%{ opacity:0; transform:scale(1.15); letter-spacing:.4em; } 15%{ opacity:1; transform:scale(1); } 75%{ opacity:1; } 100%{ opacity:0; } }

/* ---------------- 星図 ---------------- */
#星図{ position:absolute; inset:0; z-index:20; background:#05070b; }
#星図[hidden]{ display:none; }
#星図-canvas{ width:100%; height:100%; display:block; cursor:grab; }
#星図-札{ position:absolute; right:12px; top:56px; width:280px; padding:12px 14px; background:var(--panel); border:1px solid var(--line); border-radius:10px; }
.札-名{ font-size:20px; font-weight:bold; margin-bottom:6px; }
.札-首都{ font-size:12px; padding:1px 7px; border:1px solid #ffd166; color:#ffd166; border-radius:9px; vertical-align:middle; }
.札-行{ margin:4px 0; color:#d4dae6; }
.札-印{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.札-淡{ color:var(--sub); } .札-赤{ color:#ff8a8a; } .札-紫{ color:#c8a8ff; } .札-港{ color:#e8ecf4; }
.札-釦{ display:flex; gap:8px; margin-top:12px; } .札-釦 .btn{ flex:1; }
#星図-札{ max-height:calc(100vh - 80px); overflow-y:auto; width:320px; }
.札-依頼{ color:#ffd166; } .札-掲{ font-size:.9em; }
.札-額{ white-space:nowrap; }   /* v1.8.2: 報酬の「Cr」だけが次の行へ折れないように */
.折らない{ white-space:nowrap; }   /* v1.8.7: 造船所の条件（艦長Lv・評判）は条件の切れ目でだけ折る */
.札-小見出し{ margin-top:10px; padding-top:6px; border-top:1px solid var(--line); color:#7fd4ff; font-size:.88em; }

/* ---------------- 窓 ---------------- */
#窓層{ position:absolute; inset:0; z-index:40; pointer-events:none; display:flex; align-items:center; justify-content:center; }
.窓{ position:absolute; pointer-events:auto; width:min(860px,96vw); max-height:min(88vh, calc(100vh - 150px)); display:flex; flex-direction:column;
    background:linear-gradient(180deg,rgba(18,24,38,.95),rgba(10,14,22,.95)); border:1px solid var(--line2); border-radius:10px;
    box-shadow:0 18px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter:blur(6px); animation:窓出 .16s ease-out;
    font-size:calc(14px * var(--ui倍)); }
@keyframes 窓出{ from{ opacity:0; transform:translateY(10px) scale(.98); } }
.窓::before,.窓::after{ content:''; position:absolute; width:16px; height:16px; border:2px solid #4da3ff; pointer-events:none; }
.窓::before{ left:-1px; top:-1px; border-right:none; border-bottom:none; border-radius:10px 0 0 0; }
.窓::after{ right:-1px; bottom:-1px; border-left:none; border-top:none; border-radius:0 0 10px 0; }
.窓-頭{ display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--line); }
.窓-題{ font-size:1.15em; font-weight:bold; flex:1; letter-spacing:.03em; }
/* 艦の塗装（v1.4.0）: 見本の絵＋色の釦。釦の左の丸に、その色を掛けた金属色の見本 */
.塗装行{ display:flex; align-items:center; gap:14px; padding:6px 4px; }
.塗装行 .塗装見本{ width:220px; height:96px; object-fit:contain; flex:none; filter:drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.塗装列{ display:flex; flex-wrap:wrap; gap:6px; }
.塗装釦{ display:inline-flex; align-items:center; gap:6px; padding:4px 10px; }
.塗装釦::before{ content:''; width:14px; height:14px; border-radius:50%; background:linear-gradient(135deg, #e6e9ef, #8c96a8 55%, #4a5262); filter:var(--塗); }
/* 副官（v1.5.0）: 顔の釦の並び＋選んだ副官の紹介。持っていない副官は顔を暗く */
.副官列{ display:flex; flex-wrap:wrap; gap:6px; padding:4px 2px; }
.副官釦{ display:flex; flex-direction:column; align-items:center; gap:2px; width:84px; padding:5px 4px; position:relative; }
.副官釦 img{ width:54px; height:54px; border-radius:50%; object-fit:cover; object-position:50% 18%; border:1px solid var(--line2); }
.副官釦.is-on img{ border-color:#7fd4ff; box-shadow:0 0 10px rgba(127,212,255,.6); }
.副官釦.鍵 img{ filter:grayscale(.85) brightness(.55); }
.副官釦 small{ font-size:.72em; color:var(--sub); max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.副官釦 small.印.DLC{ position:absolute; top:3px; right:3px; padding:0 4px; }
.副官詳{ display:flex; gap:12px; align-items:flex-start; margin:6px 2px; padding:8px 10px; border:1px solid rgba(127,212,255,.25); border-radius:8px; background:rgba(127,212,255,.04); }
.副官詳 > img{ width:86px; height:86px; border-radius:8px; object-fit:cover; object-position:50% 15%; flex:none; }
.副官名{ font-weight:bold; color:#fff; } .副官効果{ color:#7fd4ff; font-size:.9em; margin-top:2px; }
.副官紹介{ color:#d4dae6; font-size:.9em; margin-top:4px; } .副官台詞{ color:#e2f6ff; font-size:.9em; margin-top:4px; font-style:italic; }
.副官話列{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; font-size:.88em; } .副官話列 .btn{ padding:3px 12px; }
.副官詳.話{ border:none; background:none; } .副官詳.話 > img{ width:120px; height:120px; }
.DLC顔列{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:3px; margin-bottom:4px; }
.DLC顔列 img{ width:100%; height:auto; aspect-ratio:1; border-radius:50%; object-fit:cover; object-position:50% 18%; border:1px solid rgba(255,209,102,.35); }
.hud-艦{ position:relative; }
#hud-艦隊 .hud-艦 img.hud-官{ position:absolute; right:4px; top:4px; width:calc(22px * var(--ui倍)); height:calc(22px * var(--ui倍)); border-radius:50%; object-fit:cover; object-position:50% 18%; border:1px solid #7fd4ff; }
.依頼顔{ width:30px; height:30px; margin:-3px 0; border-radius:50%; object-fit:cover; object-position:50% 18%; border:1px solid var(--line2); flex:none; }
.窓-顔{ width:44px; height:44px; margin:-6px 0; border-radius:50%; object-fit:cover; object-position:50% 18%; border:1px solid rgba(255,209,102,.45); box-shadow:0 0 10px rgba(0,0,0,.6); }
.窓-右{ display:flex; gap:10px; color:#d4dae6; font-size:.92em; }
.窓-右 .資 small{ color:var(--sub); }
.窓-閉{ appearance:none; background:none; border:none; color:var(--sub); font-size:20px; cursor:pointer; padding:0 4px; }
.窓-閉:hover{ color:#fff; }
.窓-札列{ display:flex; gap:3px; padding:6px 10px 0; border-bottom:1px solid var(--line); }
.窓-札{ appearance:none; padding:6px 16px; background:rgba(24,30,42,.7); border:1px solid var(--line); border-bottom:none; border-radius:7px 7px 0 0;
    color:var(--sub); font:inherit; cursor:pointer; }
.窓-札.is-on{ background:rgba(46,58,80,.95); color:#fff; box-shadow:inset 0 2px 0 #4da3ff; }
.窓-札:focus{ outline:2px solid #ffd166; }
.窓-身{ padding:12px 14px; overflow:auto; flex:1; }
/* 港の背景（v1.3.2）: 広間の絵を上から暗く重ねて敷く（一覧の文字を読める薄さ） */
.窓.港窓 .窓-身{ background:linear-gradient(180deg, rgba(8,11,18,.80), rgba(8,11,18,.93) 60%), var(--港背景) center 35% / cover no-repeat; }
.窓.札あり{ height:min(88vh, calc(100vh - 150px)); }   /* 札のある窓（港・艦隊メニュー）は一番長い高さで固定。中身が短くても枠は動かない */
.窓-足{ display:flex; justify-content:flex-end; gap:8px; padding:10px 14px; border-top:1px solid var(--line); }
.窓-足[hidden]{ display:none; }
.出港{ min-width:140px; }

.一覧{ display:flex; flex-direction:column; gap:4px; }
.行{ display:flex; align-items:center; gap:10px; padding:6px 8px; background:rgba(255,255,255,.03); border:1px solid rgba(122,160,214,.12); border-radius:6px; min-height:40px; }
.行.見出し{ background:none; border:none; color:var(--sub); font-size:.88em; min-height:0; padding:0 8px; }
.行.右寄せ{ justify-content:flex-end; background:none; border:none; }
.行.淡{ color:var(--sub); }
/* 艦隊の並べ替え（v0.2.22）: つかんだ行は薄く、差し込む所に光る線 */
.行.並べ{ cursor:grab; transition:opacity .12s, background .12s; }
.行.並べ:hover{ background:rgba(122,160,214,.08); }
.行.つかみ{ opacity:.4; cursor:grabbing; }
.行.差し上{ box-shadow:0 -3px 0 0 #7fd4ff, 0 -3px 10px 0 rgba(127,212,255,.6); }
.行.差し下{ box-shadow:0 3px 0 0 #7fd4ff, 0 3px 10px 0 rgba(127,212,255,.6); }
/* 予備艦（v1.1.0）: 配備の下に境の見出し。見出しへ落とすと予備の先頭へ */
.小見出し.予備見出し{ margin:10px 0 2px; padding-top:6px; border-top:1px dashed #ffd166; color:#ffd166; }
.予備見出し.差し下{ box-shadow:0 3px 0 0 #ffd166, 0 3px 10px 0 rgba(255,209,102,.5); }
.行.予備{ background:rgba(255,209,102,.03); }
.行.予備 .艦絵{ opacity:.75; }
/* DLC（v1.1.0） */
.印.DLC{ border-color:#ffd166; color:#ffd166; background:rgba(255,209,102,.12); }
.DLC格{ grid-template-columns:repeat(3,1fr); }
.DLC格 .DLC札:first-child{ grid-column:1 / -1; display:grid; grid-template-columns:repeat(4,1fr); gap:4px 14px; }
.DLC格 .DLC札:first-child > :not(.造船値){ grid-column:1 / -1; }
.DLC絵列{ display:flex; gap:8px; }
.DLC絵列 .艦絵{ flex:1; min-width:0; height:64px; }
.DLC艦名{ grid-column:1 / -1; color:#fff; font-weight:bold; margin-top:2px; }
.DLC札{ border-color:rgba(255,209,102,.35); background:linear-gradient(180deg, rgba(255,209,102,.07), rgba(255,255,255,.02)); }
/* v1.2.0: T5 が4種になったので4列。買い切りは全部入りを横いっぱいに */
.DLC格{ grid-template-columns:repeat(4,1fr); }
.DLC格.買い切り .DLC札:first-child{ display:flex; flex-direction:column; border-color:#ffd166; box-shadow:0 0 14px rgba(255,209,102,.18) inset; }
.DLC格.買い切り .造船値{ display:flex; flex-direction:column; gap:2px; }
.DLC札 > .btn + .btn{ margin-top:4px; }
.造船札 > .造船価{ margin-top:auto; }   /* v1.8.1: 説明・条件の行数が違っても値段と購入の釦を札の下にそろえる（造船所・DLC） */
/* 遊びの途中の導線（1行の案内＋購入。押し売りの窓は出さない） */
.DLC誘い{ display:flex; align-items:center; gap:8px; margin:8px 0 2px; padding:6px 10px; border:1px dashed rgba(255,209,102,.45); border-radius:8px;
    color:#e8dcb8; font-size:.92em; background:rgba(255,209,102,.05); }
.DLC誘い .btn{ margin-left:auto; padding:3px 12px; flex:none; white-space:nowrap; }
/* 手配書（v1.2.0） */
.手配表{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.手配札{ position:relative; border:1px solid var(--line2); border-radius:8px; padding:8px 10px; background:rgba(255,255,255,.03); overflow:hidden; }
.手配札 .艦絵{ width:100%; height:62px; object-fit:contain; }
.手配札.鍵 .艦絵{ filter:brightness(0) invert(.22) drop-shadow(0 0 3px rgba(255,209,102,.75)); }
.手配札.済{ border-color:rgba(127,240,168,.4); }
.手配札.済::after{ content:'済'; position:absolute; right:8px; top:4px; font-size:28px; font-weight:bold; color:rgba(127,240,168,.55); transform:rotate(12deg); }
.手配札.無料{ border-color:rgba(127,212,255,.5); }
.手配名{ font-weight:bold; color:#fff; }
.手配副{ font-size:.85em; color:var(--sub); }
.手配金{ color:#ffd98a; font-variant-numeric:tabular-nums; }
.小見出し.手配集2{ margin-top:14px; padding-top:8px; border-top:1px dashed rgba(180,140,255,.5); color:#d4b8ff; }   /* v1.6.0 第2集 */
.手配札 .btn{ margin-top:4px; padding:3px 10px; font-size:.88em; }
.行-名{ flex:1; min-width:120px; }
.行-数{ min-width:84px; text-align:right; font-variant-numeric:tabular-nums; }
.行-釦{ display:flex; gap:4px; min-width:250px; justify-content:flex-end; }
.行 .btn{ padding:4px 10px; font-size:.9em; }
.行 .棒{ width:120px; height:7px; margin:0; }
.緑{ color:#7ff0a8; } .赤{ color:#ff8a8a; } .黄{ color:#ffd98a; } .紫{ color:#c8a8ff; }
.印{ display:inline-block; font-size:.78em; padding:0 6px; border:1px solid var(--line2); border-radius:8px; color:#c8d0e0; vertical-align:middle; }
.印.旗{ border-color:#ffd166; color:#ffd166; }
.印.赤{ border-color:#ff8a8a; }
.印.種迎撃{ border-color:#ffb070; color:#ffc890; } .印.種戦闘{ border-color:#ff8a8a; color:#ffaaaa; } .印.種探査{ border-color:#7fd4ff; color:#a8e4ff; } .印.種採掘{ border-color:#c9a86a; color:#e0c890; }
.品印{ display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:7px; vertical-align:middle; }
.小見出し{ color:#9fd0ff; margin:6px 2px; font-weight:bold; }
.艦絵{ width:120px; height:56px; object-fit:contain; display:block; filter:drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.艦絵.小{ width:72px; height:32px; }
.段{ display:flex; gap:2px; } .段 i{ width:9px; height:12px; background:rgba(255,255,255,.1); border-radius:2px; } .段 i.on{ background:#4da3ff; box-shadow:0 0 6px #4da3ff; }
.造船格{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.造船札{ padding:6px 8px; background:rgba(255,255,255,.03); border:1px solid rgba(122,160,214,.18); border-radius:8px; display:flex; flex-direction:column; gap:4px; }
.造船札 .艦絵{ width:100%; height:52px; }
.造船札.不可{ opacity:.55; }
.造船名{ font-weight:bold; }
.造船値{ display:grid; grid-template-columns:1fr 1fr; gap:0 8px; color:#c8d0e0; font-size:.85em; }
.造船価{ color:#ffe27a; font-weight:bold; }
.艦選び{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.艦選び .btn{ display:flex; align-items:center; gap:6px; padding:4px 10px; }
.選択列{ display:flex; gap:8px; flex-wrap:wrap; }
.入力{ background:rgba(0,0,0,.4); color:#fff; border:1px solid var(--line2); border-radius:6px; padding:7px 10px; font:inherit; font-size:16px; width:240px; user-select:text; }
.勢力格{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:10px; }
.勢力札{ display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px; border-color:var(--色); background:rgba(0,0,0,.35); }
.勢力札.is-on{ background:color-mix(in srgb, var(--色) 22%, transparent); box-shadow:0 0 18px color-mix(in srgb, var(--色) 50%, transparent); border-width:2px; }
.勢力顔{ width:130px; height:130px; object-fit:cover; border-radius:8px; border:1px solid var(--色); }
.勢力名{ font-size:18px; font-weight:bold; color:var(--色); }
.勢力首{ color:var(--sub); font-size:13px; }
.事象{ display:flex; flex-direction:column; gap:12px; }
.事象-絵 img{ width:100%; max-height:300px; object-fit:cover; border-radius:8px; border:1px solid var(--line); display:block; }
.事象-文{ line-height:1.8; font-size:1.05em; }
.事象-選{ display:flex; flex-direction:column; gap:6px; }
.事象-選 .btn{ text-align:left; padding:10px 14px; }
.事象-得{ display:flex; flex-wrap:wrap; gap:8px; } .事象-得 span{ padding:4px 10px; border:1px solid #ffd166; color:#ffe27a; border-radius:12px; }
.撃沈文{ text-align:center; line-height:2; font-size:1.1em; padding:16px; }

/* ---------------- 通知・確認 ---------------- */
#ui-notify-area{ position:fixed; left:50%; top:130px; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:6px; align-items:center; pointer-events:none; }
.ui-toast{ padding:7px 18px; background:rgba(14,20,32,.92); border:1px solid var(--line2); border-radius:18px; font-size:14px; animation:toast .2s ease-out; }
.ui-toast.ok{ border-color:#46d18a; color:#bff5d4; } .ui-toast.warn{ border-color:#ffd166; color:#ffe9a8; } .ui-toast.error{ border-color:#ff5c6e; color:#ffc0c8; }
.ui-toast.is-out{ opacity:0; transition:opacity .25s; }
@keyframes toast{ from{ opacity:0; transform:translateY(-6px); } }
#ui-modal-back{ position:fixed; inset:0; z-index:300; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; }
#ui-modal-back[hidden]{ display:none; }
#ui-modal{ min-width:340px; max-width:90vw; padding:18px 20px; background:var(--panel2); border:1px solid var(--line2); border-radius:10px; }
#ui-modal h2{ margin:0 0 8px; font-size:18px; } #ui-modal p{ margin:0 0 16px; color:#d4dae6; }
.ui-modal-btns{ display:flex; justify-content:flex-end; gap:8px; }

/* ---------------- v0.2.0 宙域・物語・軍 ---------------- */
.hud-宙{ display:block; font-size:.82em; letter-spacing:.2em; color:var(--色); opacity:.85; margin-bottom:1px; }
.物語-絵{ margin:-4px -4px 10px; border-radius:8px; overflow:hidden; max-height:300px; }
.物語-絵 img{ display:block; width:100%; height:300px; object-fit:cover; }
.物語-文{ margin:6px 4px; line-height:1.8; font-size:1.05em; color:#dfe6f2; }
/* 賞金首を倒した窓（v1.2.0）: 艦の絵は切らずに収める */
.物語-絵.艦{ background:radial-gradient(ellipse at center, rgba(255,209,102,.12), rgba(5,7,11,.9) 70%); max-height:220px; }
.物語-絵.艦 img{ height:220px; object-fit:contain; padding:10px 40px; box-sizing:border-box; }
#題-DLC{ border-color:rgba(255,209,102,.55); }
.軍-文{ margin:4px 4px 10px; line-height:1.7; color:#c8d0e0; }
.棒.戦線{ width:160px; height:7px; margin:0; } .棒.戦線 > i{ background:#ffd166; }
#終幕{ position:fixed; inset:0; z-index:40; background:radial-gradient(ellipse at 50% 60%, rgba(10,16,30,.92), rgba(2,3,8,.98)); overflow:hidden; pointer-events:auto; cursor:pointer; }
#終幕[hidden]{ display:none; }
.終幕-流れ{ position:absolute; left:0; right:0; top:100%; text-align:center; animation:終幕流れ 46s linear forwards; }
.終幕-流れ.早送り{ animation-duration:6s; }
@keyframes 終幕流れ{ from{ transform:translateY(0); } to{ transform:translateY(calc(-100% - 50vh)); } }
.終幕-行{ font-size:20px; line-height:2.2; color:#cfd8ea; }
.終幕-大{ font-size:28px; line-height:2.4; color:#fff; font-weight:bold; letter-spacing:.06em; }
.終幕-小{ font-size:17px; line-height:2; color:#9fb0cc; }
.終幕-題{ font-size:42px; font-weight:bold; letter-spacing:.12em; color:#ffe9a8; margin:20px 0 6px; text-shadow:0 0 24px rgba(255,210,120,.45); }
.終幕-空{ height:16vh; }
.終幕-釦{ position:absolute; left:50%; bottom:12vh; transform:translateX(-50%); font-size:18px; padding:10px 28px; }
.終幕-釦:not([hidden]){ display:flex; gap:14px; padding:0; }
.終幕-釦 .btn{ font-size:18px; padding:10px 28px; }
.終幕-手配{ border-color:rgba(255,209,102,.6); color:#ffd98a; }
.終幕-釦:not([hidden]){ flex-wrap:wrap; justify-content:center; width:max-content; max-width:92vw; }   /* v1.8.4: 釦が3つになったので狭い画面では折り返す */
.終幕-釦:not([hidden]){ background:rgba(2,3,8,.9); box-shadow:0 0 0 14px rgba(2,3,8,.9), 0 0 40px 24px rgba(2,3,8,.8); border-radius:10px; }   /* v1.8.5: 早送りの間、流れる字幕が釦の下に透けて読みにくかった */
.札-宙{ font-size:12px; letter-spacing:.2em; margin-bottom:2px; }
.hud-戦線{ margin-top:4px; display:flex; align-items:center; justify-content:center; gap:8px; font-size:.95em; }
.hud-戦線 .棒.戦線{ width:150px; height:8px; margin:0; } .hud-戦線 b{ color:#ffe9a8; }
.戦線-足{ color:#ffd166; font-weight:bold; animation:戦線足 2.5s ease-out forwards; }
@keyframes 戦線足{ 0%{ opacity:0; transform:translateY(6px); } 12%{ opacity:1; transform:translateY(0); } 70%{ opacity:1; } 100%{ opacity:0; } }
.淡{ color:var(--sub); }
.行.全種{ background:none; border:none; padding:0 0 6px; min-height:0; } .行.全種 .btn{ padding:6px 18px; margin-left:calc(62px * var(--ui倍, 1)); }   /* 「交易」の札の真下に置く（パッドの↑で交易の札へ戻る） */
