:root { --pc: #3aa0ff; --gold: #e8c46a; --ink: #f3ead2; --panel: rgba(18, 14, 10, 0.88); --line: rgba(232, 196, 106, 0.35); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b120a; color: var(--ink); font-family: 'Rajdhani', 'Segoe UI', sans-serif; user-select: none; }
canvas#game { position: fixed; inset: 0; display: block; cursor: default; }
.hidden { display: none !important; }
kbd { display: inline-block; font: 600 10px/1 'Rajdhani', monospace; padding: 2px 4px; border: 1px solid rgba(255,255,255,.35); border-radius: 3px; background: rgba(0,0,0,.4); color: #ddd; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top bar ---------- */
#topbar { position: fixed; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; gap: 18px; padding: 0 12px;
  background: linear-gradient(#2a1d12, #150e08); border-bottom: 2px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.6); z-index: 10; }
.tb-faction { display: flex; align-items: center; gap: 8px; font: 800 15px 'Cinzel', serif; letter-spacing: 1px; min-width: 210px; }
#tb-emblem { font-size: 24px; }
.tb-res { display: flex; flex-direction: column; line-height: 1; min-width: 70px; }
.tb-res .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: #b9a678; }
.tb-res b { font-size: 19px; color: #fff; }
.tb-res small { font-size: 11px; color: #8fe39b; }
.tb-res.ruse b { display: flex; gap: 3px; align-items: center; height: 18px; margin-top: 2px; }
.rc-pip { display: inline-block; width: 9px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.14); border: 1px solid rgba(232,196,106,.35); }
.rc-pip.on { background: linear-gradient(#fff2b2, #e2ad42); border-color: #fff6c8; box-shadow: 0 0 6px rgba(255,215,90,.65); }
.tb-res .dim { opacity: .22; }
.cardbar { height: 3px; background: rgba(255,255,255,.12); margin-top: 3px; }
.cardbar i { display: block; height: 100%; background: var(--gold); }
.tb-obj { flex: 1; text-align: center; font: 600 14px 'Rajdhani'; color: var(--gold); letter-spacing: .5px; }
.tb-time { font: 700 18px 'Rajdhani'; color: #fff; min-width: 54px; }
#topbar button { background: #3a2a19; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; height: 28px; min-width: 34px; font-weight: 700; }
#topbar button:hover { background: #5a4026; }

/* ---------- build icon dock ---------- */
#buildbar { position: fixed; left: 10px; top: 54px; width: 62px; display: flex; flex-direction: column; gap: 5px; z-index: 9; }
.bar-title { font: 800 10px 'Cinzel'; letter-spacing: 1.5px; color: var(--gold); text-align: center; padding: 3px 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.bb-btn { position: relative; width: 62px; height: 60px; padding: 3px; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(56,42,26,.92), rgba(16,12,8,.96));
  border: 1.5px solid var(--line); color: var(--ink); border-radius: 7px; transition: transform .12s, border-color .12s, box-shadow .12s; box-shadow: 0 4px 10px rgba(0,0,0,.6); }
.bb-btn:hover { transform: translateX(4px) scale(1.04); border-color: var(--gold); box-shadow: 0 0 12px rgba(232,196,106,.45), 0 4px 12px rgba(0,0,0,.7); }
.bb-btn.on { border-color: #7dff8a; box-shadow: 0 0 14px rgba(125,255,138,.55) inset, 0 0 10px rgba(125,255,138,.45); }
.bb-btn.poor { opacity: .45; filter: saturate(.55); }
.bb-i { width: 52px; height: 50px; display: grid; place-items: center; }
.bb-c { position: absolute; left: 3px; bottom: 2px; font: 800 10px/1 'Rajdhani'; color: #ffe49c; background: rgba(10,8,5,.82); padding: 1px 4px; border-radius: 3px; border: 1px solid rgba(232,196,106,.32); pointer-events: none; }
.bb-btn kbd { position: absolute; right: 3px; top: 3px; font-size: 9px; padding: 1px 3.5px; background: rgba(12,9,6,.88); border-color: rgba(232,196,106,.45); color: #f6e7be; pointer-events: none; }

/* ---------- ruse icon dock ---------- */
#rusebar { position: fixed; right: 10px; top: 54px; display: flex; flex-direction: column; gap: 5px; z-index: 9; align-items: stretch; }
.ruse-grid { display: grid; grid-template-columns: 54px; gap: 5px; }
@media (max-height: 760px) { .ruse-grid { grid-template-columns: repeat(2, 50px); gap: 4px; } .ruse-card { width: 50px !important; height: 50px !important; } }
.ruse-card { position: relative; width: 54px; height: 54px; padding: 2px; display: grid; place-items: center; border-radius: 8px;
  background: radial-gradient(circle at 50% 40%, rgba(44,32,20,.92), rgba(14,10,7,.96)); border: 1.5px solid var(--line); box-shadow: 0 4px 10px rgba(0,0,0,.6); transition: transform .12s, border-color .12s, box-shadow .12s; }
.ruse-card:hover { transform: translateX(-4px) scale(1.06); border-color: #fff3c4; box-shadow: 0 0 12px rgba(255,215,90,.5), 0 4px 12px rgba(0,0,0,.7); }
.ruse-card.on { transform: translateX(-7px) scale(1.06); box-shadow: 0 0 16px #ffd75a; border-color: #fff; }
.ruse-card.poor { filter: grayscale(.88) brightness(.58); opacity: .65; }
.rc-i { width: 100%; height: 100%; display: grid; place-items: center; }

/* ---------- selection panel (compact horizontal RTS dock — zero scrollbar) ---------- */
#bottom { position: fixed; left: 76px; right: 262px; bottom: 6px; z-index: 9; pointer-events: none; display: flex; justify-content: center; align-items: flex-end; }
#selpanel { pointer-events: auto; width: 100%; background: rgba(16, 12, 8, 0.92); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px;
  display: flex; align-items: center; gap: 8px; overflow: hidden; box-shadow: 0 -4px 18px rgba(0,0,0,.6); min-height: 72px; }
#selpanel.slim { width: auto; min-height: 0; padding: 4px 14px; border-radius: 16px; background: rgba(16, 12, 8, 0.78); }
.sp-left { width: 192px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-right: 8px; border-right: 1px solid rgba(232,196,106,.22); }
.sp-head { display: flex; gap: 7px; align-items: center; margin: 0; min-width: 0; }
.sp-icon { width: 36px !important; height: 36px !important; border-radius: 5px; display: grid; place-items: center; font: 800 12px 'Rajdhani'; color: #fff; border: 1.5px solid rgba(0,0,0,.55); flex-shrink: 0; overflow: hidden; padding: 2px; }
.sp-info { flex: 1; min-width: 0; }
.sp-info b { font: 700 12.5px/1.1 'Cinzel'; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.sp-info small { display: block; color: #c5b284; font-size: 11px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpbar, .pbar { height: 4px; background: rgba(255,255,255,.14); margin-top: 3px; border-radius: 2px; overflow: hidden; }
.hpbar i { display: block; height: 100%; background: #5aff78; }
.pbar i { display: block; height: 100%; background: #7fd8ff; width: 0; }
.sp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.sp-grid { flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; gap: 4px; align-items: stretch; }
@media (max-width: 980px) { .sp-grid { flex-wrap: wrap; } .unit-btn { min-width: 56px !important; } }
.unit-btn { position: relative; flex: 1 1 0; min-width: 0; max-width: 94px; height: 60px; padding: 3px 2px 2px; display: flex !important; flex-direction: column; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #2b2016, #19120c); color: var(--ink); border: 1px solid rgba(255,255,255,.15); border-bottom: 3px solid rgba(232,196,106,.35); border-radius: 5px; text-align: center; transition: transform .1s, border-color .1s, background .1s; }
.unit-btn:hover { transform: translateY(-2px); border-color: var(--gold); background: linear-gradient(180deg, #3e2e1e, #241910); z-index: 2; }
.unit-btn.t2 { border-bottom-color: #d8d8d8; border-left-color: rgba(255,255,255,.15); }
.unit-btn.t3 { border-bottom-color: #ffd34d; border-left-color: rgba(232,196,106,.22); }
.unit-btn.t4 { border-bottom-color: #ff5a4a !important; border-left: 1px solid rgba(255,255,255,.15) !important; }
.unit-btn.dis { opacity: .52; }
.unit-btn.lock { opacity: .34; filter: grayscale(.35); }
.ub-g { width: 36px; height: 35px !important; display: grid; place-items: center; font: 800 10px 'Rajdhani'; color: #fff; border-radius: 4px; border: 1px solid rgba(0,0,0,.5); overflow: hidden; flex-shrink: 0; }
.ub-n { font-size: 10.5px; font-weight: 700; line-height: 1.05; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; color: #f6eedc; }
.ub-c { position: absolute; left: 2px; top: 2px; font: 800 9.5px/1 'Rajdhani'; color: #ffe49c; background: rgba(10,8,5,.86); padding: 1px 3px; border-radius: 3px; border: 1px solid rgba(232,196,106,.32); pointer-events: none; z-index: 1; }
.ub-l { position: absolute; right: 2px; top: 1px; font-size: 9px; line-height: 1; pointer-events: none; z-index: 1; }
.sp-qwrap { flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-left: 7px; border-left: 1px solid rgba(232,196,106,.22); }
.sp-qlbl { font: 700 9px/1 'Cinzel'; color: #cbb682; letter-spacing: .6px; display: flex; justify-content: space-between; }
.sp-queue { display: grid; grid-template-columns: repeat(4, 28px); gap: 2px; margin: 0; }
.q-chip { width: 28px; height: 21px; background: #1d150e; border: 1px solid var(--line); color: var(--ink); font: 700 9px/1 'Rajdhani'; border-radius: 3px; padding: 1px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.q-chip .pbar { width: 100%; height: 3px; margin-top: 2px; }
.q-chip:hover { border-color: #ff6a5a; background: #361814; }
.up-btn { margin: 0; width: 100%; padding: 3px 7px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(#2c4a66, #192b3f); color: #dff1ff; border: 1px solid #7fd8ff; border-radius: 4px; font-weight: 700; font-size: 11.5px; line-height: 1.15; box-shadow: 0 0 8px rgba(127,216,255,.22); }
.up-btn:hover:not(.dis) { filter: brightness(1.14); border-color: #fff; }
.up-btn span { color: var(--gold); margin-left: 6px; font-weight: 800; }
.up-btn.dis { opacity: .48; box-shadow: none; }
.sp-note { margin: 0; font-size: 11px; line-height: 1.15; color: #cfe8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-note.gold { color: var(--gold); }
.sp-hint { font-size: 10.5px; color: #9d8f70; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-title { font: 700 12px 'Cinzel'; color: var(--gold); margin: 0; }
.sp-desc { font-size: 12px; line-height: 1.25; color: #ddd; }
.sp-cmds { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; padding-left: 10px; border-left: 1px solid rgba(232,196,106,.22); }
.cmd-btn { background: #3a2a19; color: var(--ink); border: 1px solid var(--line); padding: 4px 10px; border-radius: 4px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.cmd-btn:hover { border-color: var(--gold); background: #523b24; }
.sp-empty { font-size: 12px; color: #cbb98c; text-align: center; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.sp-empty b { font: 700 13px 'Cinzel'; color: var(--gold); }
em.dec { font-style: normal; font-size: 9.5px; background: #ffe066; color: #000; padding: 0 4px; border-radius: 2px; vertical-align: middle; }

/* ---------- minimap ---------- */
#minimap-wrap { position: fixed; right: 8px; bottom: 8px; padding: 4px; background: var(--panel); border: 1px solid var(--line); z-index: 9; }
#minimap { display: block; width: 250px; height: 150px; cursor: crosshair; }

/* ---------- messages ---------- */
#msgs { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); width: 520px; display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 8; pointer-events: none; }
.msg { pointer-events: auto; padding: 4px 14px; background: rgba(15,10,6,.82); border-left: 3px solid #aaa; font-size: 14px; font-weight: 600; transition: opacity .8s; border-radius: 2px; }
.msg.good { border-color: #5aff78; color: #c9ffd2; }
.msg.warn { border-color: #ffb347; color: #ffe1b8; }
.msg.bad { border-color: #ff4a3a; color: #ffc9c3; }
.msg.info { border-color: var(--gold); }
.msg.jump { cursor: pointer; }
.msg.jump::after { content: ' ⌖'; opacity: .7; }
.msg.fade { opacity: 0; }

/* ---------- tooltip ---------- */
#tooltip { position: fixed; z-index: 100; max-width: 320px; background: rgba(12,9,6,.96); border: 1px solid var(--gold); padding: 8px 10px; border-radius: 4px; font-size: 13px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.7); }
.tip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.tip-h b { font: 700 15px 'Cinzel'; color: #fff; }
.tip-h span { font-size: 11px; color: #b9a678; text-transform: uppercase; letter-spacing: 1px; }
.tip-d { color: #ddd; margin-bottom: 6px; }
.tip-g { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; font-size: 12px; color: #bbb; }
.tip-g b { color: #fff; }
.tip-dps { font-size: 12px; margin-top: 4px; color: #ffcf8a; }
.tip-dps i { color: #bbb; font-style: normal; }
.tip-tags { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 3px; }
.tip-tags em { font-style: normal; font-size: 11px; background: rgba(232,196,106,.15); border: 1px solid rgba(232,196,106,.35); padding: 0 5px; border-radius: 2px; color: #f3dfa6; }
.tip-req { margin-top: 5px; font-size: 12px; color: #7fd8ff; }
.tip-why { margin-top: 4px; font-size: 12px; color: #ff8a7a; font-weight: 700; }

/* ---------- screens ---------- */
#screens { position: fixed; inset: 0; z-index: 50; background: radial-gradient(ellipse at center, rgba(20,12,6,.35), rgba(10,6,3,.85)); overflow-y: auto; }
.screen { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; }
.screen h2 { font: 800 30px 'Cinzel'; color: var(--gold); letter-spacing: 3px; margin: 0 0 18px; text-shadow: 0 3px 10px #000; }
.logo { text-align: center; margin-bottom: 18px; text-shadow: 0 6px 24px #000; }
.logo-rf { font: 800 84px/0.9 'Cinzel'; background: linear-gradient(#fff6d0, #e8c46a 50%, #8a5a1a); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 12px; }
.logo-main { font: 800 46px 'Cinzel'; color: #f3ead2; letter-spacing: 8px; }
.logo-sub { font: 600 16px 'Rajdhani'; color: var(--gold); letter-spacing: 5px; text-transform: uppercase; }
.fac-strip { display: flex; gap: 26px; font: 700 15px 'Cinzel'; margin-bottom: 26px; text-shadow: 0 2px 6px #000; }
.menu { display: flex; flex-direction: column; gap: 10px; width: 300px; }
.menu-btn { padding: 12px 18px; font: 700 18px 'Cinzel'; letter-spacing: 2px; color: var(--ink); background: linear-gradient(#3a2a19, #1f150c); border: 1px solid var(--line); border-radius: 3px; transition: .15s; box-shadow: 0 4px 12px rgba(0,0,0,.6); }
.menu-btn:hover { border-color: var(--gold); color: #fff; transform: translateY(-1px); background: linear-gradient(#5a4026, #2a1c10); }
.menu-btn.back { margin-top: 18px; width: 200px; }
.big-btn { padding: 14px 34px; font: 800 20px 'Cinzel'; letter-spacing: 3px; color: #1b1206; background: linear-gradient(#ffe9a8, #c99a3e); border: 2px solid #fff1c8; border-radius: 4px; box-shadow: 0 0 22px rgba(232,196,106,.45); margin-top: 16px; }
.big-btn:hover { filter: brightness(1.12); }
.foot { margin-top: 30px; font-size: 12px; color: #9d8f70; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 16px 22px; width: min(1100px, 96vw); box-shadow: 0 10px 40px rgba(0,0,0,.7); }
.panel.scroll { max-height: 66vh; overflow-y: auto; }
.panel h4 { font: 700 14px 'Cinzel'; color: var(--gold); letter-spacing: 2px; margin: 14px 0 6px; }
.fac-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fac-btn { padding: 8px 16px; font: 700 15px 'Rajdhani'; color: var(--ink); background: #241a10; border: 1px solid var(--line); border-radius: 3px; display: flex; gap: 6px; align-items: center; }
.fac-btn span { font-size: 18px; }
.fac-btn.sm { padding: 5px 12px; font-size: 13px; }
.fac-btn.on { border-color: var(--gold); background: #4a3520; box-shadow: 0 0 10px rgba(232,196,106,.35); color: #fff; }
.sk-blurb { font-size: 14px; color: #ccc; margin: 4px 0; }

/* campaign */
#camp-list { display: grid; grid-template-columns: repeat(3, minmax(260px, 340px)); gap: 16px; }
.camp-col { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--fc); border-radius: 5px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.camp-head { display: flex; gap: 10px; align-items: center; }
.camp-head .emb { font-size: 40px; color: var(--fc); }
.camp-head h3 { margin: 0; font: 800 17px 'Cinzel'; }
.camp-head i { color: var(--fc); font-size: 13px; }
.camp-blurb { font-size: 13px; color: #bbb; min-height: 54px; }
.mission { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px; background: #241a10; border: 1px solid rgba(255,255,255,.1); color: var(--ink); text-align: left; border-radius: 3px; }
.mission:hover:not(.locked) { border-color: var(--fc); background: #34261a; }
.mission.locked { opacity: .45; cursor: not-allowed; }
.mn { font: 800 20px 'Cinzel'; color: var(--fc); width: 22px; text-align: center; }
.mt { flex: 1; font: 700 15px 'Rajdhani'; }
.mt small { display: block; font-weight: 500; font-size: 11px; color: #a99; }
.ms { font-size: 15px; }
.mission.done .ms { color: #5aff78; }

/* briefing */
.brief-box { width: min(820px, 94vw); background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--fc); padding: 24px 30px; box-shadow: 0 10px 50px #000; }
.brief-head { display: flex; gap: 16px; align-items: center; }
#brief-emb { font-size: 58px; }
#brief-fac { color: #b9a678; letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }
.brief-head h2 { margin: 2px 0 0 !important; }
#brief-text { margin: 18px 0; font-size: 17px; line-height: 1.55; min-height: 150px; color: #e9e1c9; white-space: pre-wrap; }
#brief-obj { font: 700 15px 'Rajdhani'; color: var(--gold); letter-spacing: 1px; border-top: 1px solid var(--line); padding-top: 10px; }
.brief-btns { display: flex; justify-content: space-between; align-items: flex-end; }

/* codex */
#cx-tabs { margin-bottom: 10px; }
.cx-intro { display: flex; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cx-intro .emb { font-size: 56px; }
.cx-intro h3 { margin: 0; font: 800 22px 'Cinzel'; }
.cx-intro p { margin: 4px 0 0; color: #ccc; font-size: 14px; }
.cx-h { font: 700 16px 'Cinzel'; color: var(--gold); margin: 16px 0 8px; letter-spacing: 1px; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.cx-card { position: relative; background: #1d150e; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 10px 12px 10px 12px; font-size: 13px; }
.cx-card.t2 { border-left: 3px solid #d8d8d8; }
.cx-card.t3 { border-left: 3px solid #ffd34d; }
.cx-card.t4, .unit-btn.t4 { border-left: 3px solid #ff5a4a; }
.cx-card .tip-h { padding-right: 46px; }
.cx-glyph { position: absolute; right: 10px; top: 10px; width: 38px; height: 26px; display: grid; place-items: center; font: 800 11px 'Rajdhani'; color: #fff; border-radius: 3px; }
.cx-card.ruse { text-align: center; }
.cx-card.ruse b { font: 700 15px 'Cinzel'; }
.cx-card.ruse p { color: #ccc; }
.cx-card.ruse small { color: #b9a678; }
.cx-icon { font-size: 34px; }
.cx-note { color: #b9a678; font-style: italic; }

/* help / settings */
.help h3 { font: 700 17px 'Cinzel'; color: var(--gold); margin: 14px 0 4px; }
.help p { font-size: 15px; line-height: 1.5; color: #ddd; margin: 0; }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys td { border-bottom: 1px solid rgba(255,255,255,.08); padding: 4px 8px; }
.keys td:first-child { color: var(--gold); width: 34%; font-weight: 700; }
.settings { width: 440px; display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.settings label { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.settings input[type=range] { width: 200px; accent-color: var(--gold); }

/* end */
#end-title { font: 800 80px 'Cinzel'; margin: 0; letter-spacing: 10px; text-shadow: 0 6px 30px #000; }
#end-title.win { color: var(--gold); }
#end-title.lose { color: #ff5a4a; }
#end-sub { font-size: 18px; color: #ddd; }
#end-stats { border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); margin: 14px 0; font-size: 15px; }
#end-stats th, #end-stats td { padding: 6px 14px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: center; }
#end-stats th { color: var(--gold); font: 700 13px 'Cinzel'; }
#end-btns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.camp-done { font: 700 18px 'Cinzel'; color: var(--gold); }

@media (max-width: 1200px) { #camp-list { grid-template-columns: 1fr; } }

canvas#game3d { position: fixed; inset: 0; width: 100vw; height: 100vh; display: none; }
#btn-3d { color: #9ff4ff !important; }

#hud::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 62%, rgba(10,14,30,.38) 100%); }

.ico { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.cx-glyph { width: 64px !important; height: 64px !important; overflow: hidden; }
.cx-glyph.ruse-g { background: transparent !important; border: none !important; }
.cx-card .tip-h { padding-right: 74px !important; }

.cx-glyph { position: static !important; float: right; margin: 0 0 6px 10px; }
.cx-card .tip-h { padding-right: 0 !important; }
.cx-card::after { content: ''; display: block; clear: both; }

/* ---------- map & legion color options ---------- */
#scr-skirmish .panel.scroll { max-height: 76vh; padding: 16px 22px 20px; }
.sk-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 8px; flex-wrap: wrap; }
.sk-head-row h4 { margin: 0 !important; }
.sk-seed-bar { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #b9a678; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 8px; margin-bottom: 6px; }
.map-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #1c140d; border: 1.5px solid rgba(232,196,106,.26); border-radius: 5px; color: var(--ink); text-align: left; transition: transform .12s, border-color .12s, box-shadow .12s; }
.map-card:hover { transform: translateY(-2px); border-color: var(--gold); background: #291d12; }
.map-card.on { border-color: var(--gold); background: linear-gradient(180deg, #3a2918, #21170d); box-shadow: 0 0 14px rgba(232,196,106,.42); }
.map-thumb { width: 100%; height: 68px; border-radius: 3px; border: 1px solid rgba(255,255,255,.15); display: block; background: #14100c; }
.map-card b { font: 700 12.5px/1.15 'Cinzel'; color: #fff; }
.map-tag { font-size: 10.5px; color: #d8c28e; line-height: 1.15; }
.sk-map-desc { font-size: 13px; color: #d5ccb4; margin: 4px 0 10px; padding: 6px 10px; background: rgba(0,0,0,.28); border-left: 3px solid var(--gold); border-radius: 3px; }
.sk-team-box { background: rgba(0,0,0,.24); border: 1px solid rgba(232,196,106,.22); border-left: 4px solid var(--tc, var(--gold)); border-radius: 5px; padding: 10px 12px; margin-bottom: 8px; }
.sk-team-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sk-team-lbl { font: 700 13px 'Cinzel'; color: var(--gold); letter-spacing: 1.5px; display: flex; align-items: center; gap: 8px; }
.sk-col-tag { font: 700 12px 'Rajdhani'; padding: 1px 7px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.2); }
.sk-opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; }
.sk-bot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; align-items: end; margin-top: 6px; }
.color-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch { position: relative; width: 26px; height: 26px; border-radius: 50%; padding: 0; border: 2px solid rgba(255,255,255,.32); box-shadow: 0 2px 6px rgba(0,0,0,.65), inset 0 2px 3px rgba(255,255,255,.35); transition: transform .12s, border-color .12s, box-shadow .12s; }
.color-swatch:hover { transform: scale(1.16); border-color: #fff; }
.color-swatch.on { transform: scale(1.18); border-color: #fff; box-shadow: 0 0 0 2px #140e08, 0 0 12px var(--sw, #ffd34d), inset 0 2px 4px rgba(255,255,255,.5); }
.color-swatch.on::after { content: '✓'; color: #fff; font: 900 13px/1 'Rajdhani'; text-shadow: 0 1px 3px #000, 0 0 4px #000; }
.color-swatch.used:not(.on) { opacity: .42; }
.set-colors { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid rgba(232,196,106,.22); }
.set-col-head { display: flex; justify-content: space-between; align-items: baseline; }
.set-col-head small { color: var(--gold); font-weight: 700; font-size: 14px; }
.tb-map-badge { font: 600 11px 'Rajdhani'; color: #cbb98c; letter-spacing: .8px; margin-left: 4px; padding: 1px 6px; border: 1px solid rgba(232,196,106,.28); border-radius: 3px; background: rgba(0,0,0,.35); }

/* ---------- multiplayer lobby & live HUD ---------- */
.menu-btn.mp-highlight { background: linear-gradient(180deg, #274d3b, #142a20); border-color: #5aff9c; color: #eafff2; box-shadow: 0 0 18px rgba(90,255,156,.28), 0 4px 12px rgba(0,0,0,.6); }
.menu-btn.mp-highlight:hover { background: linear-gradient(180deg, #346850, #1b382b); border-color: #a8ffd0; color: #fff; }
#scr-mp .panel.scroll { max-height: 78vh; padding: 16px 22px 20px; }
.mp-entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 10px; }
.mp-card { background: rgba(0,0,0,.32); border: 1px solid rgba(232,196,106,.28); border-radius: 6px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.mp-card h3 { margin: 0; font: 700 18px 'Cinzel'; color: var(--gold); }
.mp-card p { margin: 0; font-size: 14px; color: #ccc; line-height: 1.4; }
.mp-in-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-input { background: #140f0a; color: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font: 700 16px 'Rajdhani'; outline: none; }
.mp-input:focus { border-color: var(--gold); box-shadow: 0 0 8px rgba(232,196,106,.35); }
.mp-input.code { width: 150px; text-transform: uppercase; letter-spacing: 3px; font: 800 18px 'Cinzel'; text-align: center; color: #ffe49c; }
.mp-room-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: linear-gradient(90deg, rgba(40,68,52,.45), rgba(20,15,10,.6)); border: 1px solid rgba(90,255,156,.38); border-radius: 6px; margin-bottom: 12px; }
.mp-room-code { font: 800 24px 'Cinzel'; color: #7dffb3; letter-spacing: 4px; padding: 2px 10px; background: rgba(0,0,0,.45); border: 1px dashed rgba(125,255,179,.5); border-radius: 4px; user-select: text; }
.mp-status-pill { font: 700 12.5px 'Rajdhani'; color: #9ff4ff; background: rgba(0,0,0,.4); padding: 3px 9px; border-radius: 12px; border: 1px solid rgba(159,244,255,.3); }
.mp-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mp-slot { background: rgba(0,0,0,.28); border: 1px solid rgba(232,196,106,.24); border-top: 4px solid var(--tc, var(--gold)); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.mp-slot.open { border-top-color: #666; opacity: .88; border-style: dashed; }
.mp-slot-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mp-slot-name { font: 700 15px 'Cinzel'; color: #fff; display: flex; align-items: center; gap: 6px; }
.mp-badge { font: 700 11px 'Rajdhani'; padding: 1px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .8px; }
.mp-badge.rdy { background: rgba(90,255,120,.2); color: #7dff96; border: 1px solid rgba(90,255,120,.45); }
.mp-badge.wait { background: rgba(255,190,80,.18); color: #ffd480; border: 1px solid rgba(255,190,80,.4); }
.mp-badge.ai { background: rgba(160,200,255,.16); color: #aad4ff; border: 1px solid rgba(160,200,255,.35); }
.mp-chat-box { background: rgba(0,0,0,.36); border: 1px solid rgba(232,196,106,.22); border-radius: 5px; padding: 8px 10px; margin-top: 10px; }
.mp-chat-log { height: 84px; overflow-y: auto; font-size: 13px; line-height: 1.35; display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; user-select: text; }
.tb-mp { font: 700 12px 'Rajdhani'; color: #7dffb3; background: rgba(14,36,24,.75); border: 1px solid rgba(90,255,156,.4); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
#mp-chatbar { position: fixed; left: 76px; bottom: 84px; width: 420px; max-width: calc(100vw - 350px); display: flex; gap: 6px; padding: 5px 7px; background: rgba(14,10,7,.94); border: 1px solid var(--gold); border-radius: 5px; z-index: 15; box-shadow: 0 4px 16px rgba(0,0,0,.7); }
#mp-chat-in { flex: 1; background: #1c140d; color: #fff; border: 1px solid rgba(232,196,106,.35); border-radius: 3px; padding: 5px 8px; font: 600 13.5px 'Rajdhani'; outline: none; }
#mp-chat-send { background: #3a2a19; color: var(--gold); border: 1px solid var(--line); border-radius: 3px; padding: 4px 12px; font-weight: 700; }
