/* Field manual and command console: one restrained metal, ink and brass system. */
:root{--dossier-gold:#d9bd83;--dossier-ink:#101c26}
.faction-crest{object-fit:contain;width:62px;height:68px;flex-shrink:0;filter:drop-shadow(0 3px 4px #0008)}
.faction-card .faction-crest{margin:0 15px 0 3px}.panel-label .faction-crest{width:28px;height:31px;margin:-8px 4px -8px -4px}
.ability-art{display:block;background-image:url('/assets/ability-atlas-v1.jpg');background-size:400% 400%;width:88px;height:88px;border:1px solid #a0a39a;box-shadow:0 4px 9px #0007,inset 0 0 0 2px #101c26;border-radius:4px;flex-shrink:0}
#hud #cards .power-card{padding:10px;background:radial-gradient(ellipse at 50% 15%,#40506288,transparent 60%),linear-gradient(#152632,#0a151f);border-top:2px solid var(--power-color);gap:5px}
#hud #cards .power-card .ability-art{width:90px;height:90px;min-height:90px}#hud #cards .power-card small{font-size:10px;line-height:1.4}
#hud #cards .power-card{justify-content:center;padding:8px 10px 10px;gap:5px}#hud #cards .power-card .power-rank{position:absolute;right:8px;top:6px;font-size:9px;line-height:10px;letter-spacing:1px}#hud #cards .power-card .ability-art{width:70px;height:70px;min-height:70px}#hud #cards .power-card strong{min-height:16px;max-height:30px;margin:1px 0}#hud #cards .power-card small{max-width:100%;line-height:13px;min-height:13px;margin:0;white-space:normal}
#hud #orders button{background:linear-gradient(115deg,#31414b,#142430);border-color:#647781;border-bottom:3px solid #09131b;justify-content:flex-start;gap:7px;font-weight:600;letter-spacing:.15px}
#hud #orders .ability-art{width:34px;height:34px;border:0;border-radius:2px;box-shadow:0 1px 5px #0008}
.role-badge{display:inline-flex;align-items:center;gap:5px;color:#e8d5b0;font-size:10px;line-height:1.2}.role-badge svg{width:23px;height:23px;padding:3px;background:#172631;border:1px solid #8d9b9f;border-radius:3px;fill:#657f85;stroke:#ede4cf;stroke-width:1.8;stroke-linejoin:round;flex-shrink:0}
#hud #cards .role-badge{position:absolute;top:9px;left:8px;max-width:calc(100% - 30px);pointer-events:none}#hud #cards .role-badge>span{display:none}
#hud #cards .hero-card .count{position:absolute;top:5px;left:5px;right:5px;bottom:auto;min-height:24px;padding:6px 4px;font-size:9px;line-height:1.25;border:1px solid #c5b07980;color:#f2dfac;background:#101d27e8;white-space:normal;box-shadow:0 2px 4px #0007}
#hud #cards .hero-card[data-status=training]::after,#hud #cards .hero-card[data-status=queued]::after{content:'';position:absolute;bottom:0;left:0;width:var(--training-progress);height:5px;background:linear-gradient(90deg,#a1783f,#f4db91);box-shadow:0 0 8px #e8c48166}
#hud #cards .hero-card[data-status=ready]{border-color:#809a83}#hud #cards .hero-card[data-status=ready] .count{color:#b4e1b5;border-color:#83b98c}
#guardianRoster{position:absolute;top:106px;right:18px;display:flex;gap:7px;max-width:490px;overflow:auto;padding:4px;pointer-events:auto}
#guardianRoster:empty{display:none}#guardianRoster button{position:relative;flex:0 0 60px;width:60px;height:74px;border:1px solid #ad986f;background:#132330;padding:0;overflow:hidden}
#guardianRoster .portrait{display:block;float:none;width:100%;height:100%;margin:0;background:none;border:0}#guardianRoster .portrait svg{width:100%;height:100%}#guardianRoster small{position:absolute;bottom:0;left:0;right:0;padding:4px 0;font-size:9px;background:#08121de0;color:#f0dbad}#guardianRoster button.active{border-color:#f8e0a7;box-shadow:0 0 0 2px #877349}
#commander{background:linear-gradient(130deg,#3c4850,#142430 55%,#0c1922);border:1px solid #687780;border-left:4px solid #c8ac73;border-radius:0;box-shadow:0 5px 18px #0006,inset 0 1px #a9b5b540;padding:14px 18px;min-width:205px}
#commander .general-stars{filter:drop-shadow(0 2px 1px #000);color:#e8c685;letter-spacing:5px}#commander .general-rank{letter-spacing:2px;font-size:10px}#commander .general-rank b{font:600 12px Bahnschrift,'Segoe UI',sans-serif;color:#ead5a7}
#hud #selection .selected-facts{display:flex;gap:7px;flex-wrap:wrap;font-size:10px;line-height:1.4;border-top:1px solid #596b724f;padding-top:8px;clear:both}#hud #selection .selected-facts>b{color:#e0c38a}.selected-facts>span:not(.role-badge){padding:4px 7px;background:#0d1a24;border-left:2px solid #657983}.selected-facts b{color:#f1dfb9}
#hud #selection .enemy-portrait{width:100%;height:145px;object-fit:contain;float:none;background:radial-gradient(ellipse,#3c5665,transparent 68%)}
#hud #selection .selection-description{font-size:11px;line-height:1.4;color:#b5c4cc}#hud #selection .selected-model{object-fit:contain;filter:drop-shadow(0 7px 4px #0006)}
dialog{border:1px solid #849093;border-top:3px solid #d1b67c;border-radius:3px;background:radial-gradient(ellipse at 85% 0,#344c5b66,transparent 65%),linear-gradient(140deg,#182936,#0b1722);box-shadow:0 24px 100px #000b,inset 0 0 0 5px #07111c,inset 0 0 0 6px #a2adad28;color:#dce5e8;scrollbar-width:thin;scrollbar-color:#8f9a98 #0a1620}
dialog::backdrop{background:#030c17bd;backdrop-filter:blur(8px)}dialog h2{font:600 32px Bahnschrift,'Segoe UI',sans-serif;letter-spacing:.5px;color:#f0dfba}dialog p{color:#bdcbd1}dialog .close-dialog{border:1px solid #7e8d93;background:#243440;border-radius:2px;color:#f0d6a3;right:20px;top:20px;width:34px;height:34px;z-index:5}dialog button{border-radius:2px}dialog .dialog-wordmark{opacity:.45}
dialog .close-dialog{display:grid;place-items:center;line-height:1;font-size:24px;padding:0}
#codexDialog{width:min(1470px,calc(100vw - 40px));max-width:none;height:min(940px,94vh);max-height:94vh;overflow:hidden;padding:22px 26px;box-sizing:border-box}
#codexDialog h2{margin:6px 0 12px;font-size:30px}#codexDialog .eyebrow{font-size:9px;letter-spacing:2.4px;color:#9fb6c3}#codexDialog .dialog-wordmark{max-width:195px;margin-right:50px}
#codexFactions{display:flex;flex-wrap:nowrap;gap:8px}#codexFactions button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;padding:7px 14px;flex:1;font:500 13px Bahnschrift,'Segoe UI',sans-serif;letter-spacing:.3px;border:1px solid #576b78;background:linear-gradient(#273b49,#132430);color:#bfcdd5}#codexFactions .faction-crest{width:32px;height:36px}#codexFactions button.active{border-color:#d6bc85;color:#ffe4ab;background:linear-gradient(#384743,#1c2b31)}
#codexDoctrine{margin:10px 0;font-size:12px;line-height:1.5;color:#afc2cc;min-height:36px;max-width:1060px}
#codexDialog .codex-tabs{margin:9px 0 12px;display:flex;border-bottom:1px solid #5e7380;gap:3px;padding-bottom:7px}#codexDialog .codex-tabs button{border:0;border-bottom:2px solid transparent;padding:8px 17px;background:transparent;color:#a0b3bf;font-size:10px;letter-spacing:1.2px}#codexDialog .codex-tabs button.active{border-bottom-color:#e2c690;color:#f0d6a3;background:#35485266}#codexDialog .codex-tabs button:disabled{opacity:.3}
#codexDialog .codex-body{display:grid;grid-template-columns:minmax(260px,34%) minmax(0,1fr);height:calc(100% - 225px);gap:22px;min-height:0;overflow:hidden}
#codexDialog #codexGrid{order:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;overflow:auto;align-content:start;padding:0 10px 15px 0;scrollbar-width:thin;scrollbar-color:#88969b #0b1924}
#codexDialog .codex-card{position:relative;display:flex;flex-direction:column;align-items:center;padding:0 8px 11px;min-height:197px;border:1px solid #415866;border-bottom:3px solid #152630;background:radial-gradient(ellipse at 50% 30%,#43607370,transparent 70%),linear-gradient(135deg,#1c303f,#0c1b27);box-shadow:inset 0 1px #c4d7df19}
#codexDialog .codex-card:hover{border-color:#93a7ad}#codexDialog .codex-card.active{border-color:#d2b981;box-shadow:inset 0 0 0 1px #d2b98155,0 3px 13px #0005;background:radial-gradient(ellipse at 50% 30%,#736f4d70,transparent 70%),#162a37}
#codexDialog .codex-card .model-thumb,#codexDialog .codex-card .portrait{height:145px;width:100%;object-fit:contain;margin:0;border:0;background:transparent;display:block;flex:none}#codexDialog .codex-card .infantry-thumb{object-fit:cover;object-position:top;mask-image:linear-gradient(black 70%,transparent)}#codexDialog .codex-card .portrait svg{height:100%;width:100%}
#codexDialog .codex-card strong{font:600 13px Bahnschrift,'Segoe UI',sans-serif;letter-spacing:.2px;line-height:1.3;color:#e4d5b6;text-align:center}#codexDialog .codex-card>span:last-child{font-size:10px;color:#9eb7c5;padding-top:4px;line-height:1.35;text-align:center}
#codexDialog .codex-body aside{order:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,39%);grid-template-rows:1fr;gap:20px;align-self:stretch;min-width:0;min-height:0;padding:0;background:none;border:0;overflow:hidden}
.dossier-stage{min-width:0;position:relative;background:radial-gradient(ellipse at 50% 35%,#435b6d,#142735 65%,#0b1925);border:1px solid #506572;display:flex;flex-direction:column;justify-content:center;overflow:hidden;box-shadow:inset 0 0 60px #06111b80}.dossier-stage:before,.dossier-stage:after{content:'';position:absolute;width:35px;height:35px;border:1px solid #ccaf71;pointer-events:none}.dossier-stage:before{top:12px;left:12px;border-right:0;border-bottom:0}.dossier-stage:after{bottom:12px;right:12px;border-left:0;border-top:0}.dossier-stage-label{position:absolute;top:22px;left:24px;font-size:9px;letter-spacing:2px;color:#aebdc4;pointer-events:none}.dossier-stage small{display:block;position:absolute;bottom:23px;left:24px;color:#afbdc5;font-size:10px;pointer-events:none}
#codexDialog #modelPreview{width:100%;height:100%;min-height:250px;display:block;cursor:grab;touch-action:none}#codexDialog #modelPreview:active{cursor:grabbing}
.dossier-details{overflow:auto;min-height:0;padding:0 8px 20px 0;scrollbar-width:thin;scrollbar-color:#85959f #0e1c27}#profileName{font:600 26px Bahnschrift,'Segoe UI',sans-serif;line-height:1.12;color:#f4dfb3;margin:3px 0 15px}#profileInfo{font-size:12px;line-height:1.65;color:#b8ccd7}
#profileStats{display:flex;flex-wrap:wrap;gap:10px;background:none;border:0;margin:18px 0}#profileStats>div{flex:1 1 80px;background:none;border-bottom:1px solid #6a818a40;padding:2px 0 10px}#profileStats dt{font-size:9px;text-transform:uppercase;letter-spacing:.7px;color:#8da8ba}#profileStats dd{font:600 19px Bahnschrift,'Segoe UI',sans-serif;color:#e4ddc8;margin:5px 0 0}
#profileTradeoffs{margin-top:20px;padding:14px 0;border-top:1px solid #69808d55;font-size:11px;line-height:1.65}#profileTradeoffs b{color:#d8bf8b;letter-spacing:.7px}#profileTradeoffs .comparison{position:relative;margin:13px 0 0;padding:7px 0;display:grid;grid-template-columns:1fr auto;gap:5px;font-size:10px}.comparison>i{grid-column:1/-1;background:#263f4d;height:4px;display:block}.comparison em{height:100%;display:block;background:linear-gradient(90deg,#657f85,#d6bc87)}.comparison strong{color:#ede0c6}
.dossier-details>small{font-size:9px;color:#809baa;line-height:1.5}#helpDialog{max-width:1000px;width:calc(100vw - 60px);max-height:88vh;padding:35px 40px;overflow:auto}#helpDialog .help-grid>div{border-top:2px solid #9f8c65;padding-top:18px;background:none}#helpDialog .help-tip{padding:15px 18px;border-left:2px solid #8a7d5d;background:#0d1b26}#resultStats>div{background:#203440;border:1px solid #586f78;box-shadow:inset 0 2px #bda56d33}.lobby-shell{border-top:3px solid #bd9d64;background:radial-gradient(ellipse at top right,#31495a88,transparent),#0d1c28}
@media(max-width:1200px){#codexDialog .codex-body{grid-template-columns:30% 1fr;gap:14px}#codexDialog .codex-body aside{grid-template-columns:minmax(0,1fr) 205px;gap:14px}#codexDialog #codexGrid{gap:7px}#codexDialog .codex-card{min-height:165px}#codexDialog .codex-card .model-thumb,#codexDialog .codex-card .portrait{height:118px}#codexFactions button{font-size:11px;gap:5px;padding:6px}#hud #orders .ability-art{width:28px;height:28px}}
@media(max-height:800px){#codexDialog{padding:18px 22px}#codexDialog .codex-body{height:calc(100% - 211px)}#codexDialog h2{font-size:25px}#codexDoctrine{font-size:11px;margin:6px 0}#codexDialog .codex-card{min-height:174px}#codexDialog .codex-card .model-thumb,#codexDialog .codex-card .portrait{height:122px}#hud #cards .power-card .ability-art{width:68px;height:68px;min-height:68px}#guardianRoster{top:101px}}
@media(max-width:850px){#codexDialog{overflow:auto;height:94vh}#codexDialog .codex-body{height:auto;display:flex;flex-direction:column}#codexDialog #codexGrid{order:2;grid-template-columns:repeat(3,1fr);max-height:380px}#codexDialog .codex-body aside{display:grid;grid-template-columns:1fr 1fr;height:450px}#codexFactions{flex-wrap:wrap}#codexFactions button{min-width:110px}#codexDoctrine{min-height:0}.dossier-details{overflow:auto}#guardianRoster{max-width:240px}}

.seat-faction{position:relative;padding-left:45px}.seat-faction:before{display:none}.seat-faction>.faction-crest{position:absolute;left:0;top:7px;width:34px;height:38px}#lobbyDoctrine>.faction-crest{float:right;width:56px;height:62px}
