:root{color-scheme:dark;--ink:#eceddc;--muted:#a9b6a3;--gold:#e1c58c;--panel:rgba(22,35,29,.93);font-family:"Malgun Gothic","Segoe UI",sans-serif;color:var(--ink);background:#21372e;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;overflow:hidden}
button,input,select{font:inherit}
button{cursor:pointer;background:#2e4335;border:1px solid #73806755;color:var(--ink);border-radius:5px;padding:12px 16px;transition:background .15s,transform .15s}
button:hover{background:#405743}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #edce88;outline-offset:3px}
button:disabled{cursor:default}
button.primary{background:var(--gold);color:#253329;border-color:var(--gold);font-weight:700}
button.primary:hover{background:#f0dbad}
button.primary:disabled{opacity:.5}
.text-button{background:none;border:none;padding:5px;color:var(--muted);font-size:12px}
input,select{background:#1a2c24;color:#fff;border:1px solid #788c6d55;border-radius:4px;padding:14px;max-width:100%}
label{display:block;font-size:12px;color:#c6cdbb;margin:18px 0 9px}
#world{position:fixed;inset:0;width:100vw;height:100dvh;display:block;touch-action:none}
#app{position:relative;z-index:2;pointer-events:none}
button,input,select,a,dialog{pointer-events:auto}
.entry{height:100dvh;background:linear-gradient(90deg,rgba(13,30,24,.97),rgba(17,34,26,.87) 38%,rgba(17,34,26,.2) 80%);padding:34px 6vw;display:flex;flex-direction:column;overflow:auto;pointer-events:auto}
.entry-brand{font-size:16px;letter-spacing:2px;font-weight:700}
.entry-brand>span{color:var(--gold)}
.entry-brand small{display:block;font-weight:400;font-size:9px;letter-spacing:3px;color:#a2ae91;margin-top:12px}
.entry-content{margin:auto 0;width:470px;max-width:100%;padding:36px 0}
.community-footer{display:flex;justify-content:flex-end;flex-shrink:0}
.discord-community{letter-spacing:normal;display:flex;align-items:center;gap:16px;max-width:calc(100vw - 48px);padding:20px 24px;border:1px solid #a5aaff;border-radius:12px;background:#454bc4;color:#fff;text-decoration:none;box-shadow:0 10px 40px #080e2055;transition:background .15s,transform .15s}
.discord-community:hover{background:#5865f2;transform:translateY(-2px)}
.discord-community:focus-visible{outline:3px solid #f4dca3;outline-offset:5px}
.discord-community svg{width:36px;height:30px;flex-shrink:0;fill:currentColor}
.discord-community strong{display:block;font-size:23px;line-height:1.3}
.discord-community small{display:block;margin-top:5px;font-size:11px;color:#e3e5ff;line-height:1.5}
.discord-community .community-arrow{font-size:25px;margin-left:8px}
@media(max-width:900px){.community-footer{justify-content:flex-start}.discord-community{margin:0 0 22px;max-width:100%;padding:17px 20px}.discord-community strong{font-size:21px}}
.eyebrow{color:var(--gold);font-size:10px;font-weight:700;letter-spacing:2px}
h1{font-size:clamp(38px,4.5vw,68px);font-weight:400;line-height:1.18;letter-spacing:-3px;margin:20px 0 24px}
h1 em{font-style:normal;color:#e7d0a2}
.intro{color:#c1c8b7;line-height:1.9;font-size:14px;margin-bottom:30px}
.input-row{display:flex;gap:8px}
.input-row input{min-width:0;flex:1}
.input-row button{white-space:nowrap}
.form-hint{font-size:12px;line-height:1.9;color:#95a78e;margin-top:18px}
#name,#invite-link{width:100%}
#invite-link{font-size:12px}
#copy{margin-top:10px;width:100%}
.mode-grid{display:flex;gap:10px;margin-top:17px}
.mode-grid button{position:relative;flex:1;text-align:left;font-size:15px;padding:19px 15px}
.mode-grid small{display:block;font-size:8px;letter-spacing:1.4px;opacity:.7;margin-bottom:9px}
.lobby-options{display:flex;align-items:center;gap:12px;margin-top:16px}
.lobby-options label{margin:0}
.lobby-options select{padding:7px;font-size:12px}
.lobby-options .text-button{margin-left:auto}
footer{font-size:10px;letter-spacing:1px;color:#9da990}
footer span{margin-left:22px;color:#6f856e}
.initial-loading{padding:40px}
.drill-link{display:inline-block;padding:12px 18px;border:1px solid #f3cb76;border-radius:6px;background:#f4d280;color:#14251e;font-weight:750;text-decoration:none}
.drill-link:hover,.drill-link:focus-visible{background:#ffe2a1}
.hud{position:fixed;inset:0;pointer-events:none}
.topbar{height:66px;display:flex;align-items:center;gap:35px;padding:0 22px;background:linear-gradient(#16271eef,#16271edb);border-bottom:1px solid #bdc4a92b;box-shadow:0 8px 40px #0a1b2422}
.game-brand{display:flex;gap:12px;align-items:center;font-family:Georgia,serif;font-size:37px;color:var(--gold)}
.game-brand>span{font-family:inherit;font-size:13px;letter-spacing:2px;color:#dcdcc8}
.game-brand small{display:block;font:9px "Malgun Gothic",sans-serif;color:#97a28b;letter-spacing:1px;margin-top:4px}
#resources{display:flex;gap:34px}
#resources>div{min-width:110px}
#resources small{display:block;font-size:9px;color:#9cac93;margin-bottom:5px}
#resources strong{font-size:15px;font-weight:600}
#resources em{font-style:normal;font-size:10px;color:#9baa90;margin-left:7px}
.gold{color:#e5c98f}
.top-actions{margin-left:auto;display:flex;gap:6px}
.top-actions button{width:34px;height:34px;padding:0;font-size:21px;background:#ffffff08;border-color:#ffffff15}
.top-actions button[hidden]{display:none}
#scoreboard{position:absolute;top:84px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:22px}
.capital{width:220px;position:relative;background:#12271ee0;padding:11px 13px 15px;display:flex;align-items:center;justify-content:space-between;border:1px solid #a5c6b326;box-shadow:0 5px 20px #0002}
.capital span{font-size:12px}
.capital small{font-size:9px;color:#a6b5a2;font-weight:400}
.capital span small{display:block;margin-top:4px}
.capital b{font:18px Georgia,serif}
.capital i{position:absolute;bottom:0;left:0;width:var(--hp);height:3px;background:#6dcaeb;transition:width .3s}
.capital.red i{background:#e28b70}
.versus{font-size:9px;letter-spacing:2px;color:#eee7cc;text-shadow:0 1px 4px #000;white-space:nowrap}







.map-panel{width:200px;flex-shrink:0;padding:10px;background:var(--panel);border:1px solid #afb79c44;border-radius:5px}
.mini-heading{font-size:10px;color:#b7c3a9;margin-bottom:8px;display:flex;justify-content:space-between}
.mini-heading span{font-variant-numeric:tabular-nums;color:var(--gold)}
#minimap{width:100%;height:auto;display:block;border:1px solid #74826555}
.camera-hint{font-size:9px;line-height:1.9;color:#909d84;margin-top:7px}
kbd{font:8px sans-serif;padding:1px 4px;background:#72816133;margin-right:4px;border:1px solid #78836a44;border-radius:2px}
.command-panel{flex:1;max-width:790px;margin:0 auto;min-width:0;pointer-events:auto}
.command-heading{display:flex;align-items:center;justify-content:space-between;background:var(--panel);padding:10px 14px;border:1px solid #c7caae35;border-radius:6px 6px 0 0}
.command-heading strong{font-size:11px;letter-spacing:.3px}
.command-heading small{font-size:10px;color:#b2bea4;margin-left:14px}
.live-dot{display:inline-block;width:5px;height:5px;background:#dbbc79;border-radius:50%;margin-right:8px}
#draw-progress{height:2px;background:#1e2d20}
#draw-progress i{height:100%;background:#d7bd84;display:block;transition:width .5s linear}
.hand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;background:#14251de8;padding:8px;border-radius:0 0 6px 6px}
.card{padding:0;overflow:hidden;text-align:left;border:1px solid #9a9f7866;border-radius:4px;background:#dddcc8;color:#273b30;box-shadow:0 6px 15px #0004;position:relative}
.card:hover:enabled{transform:translateY(-8px);background:#f1ebd5;border-color:#ffdd95;box-shadow:0 10px 26px #0007}
.card-top{display:flex;justify-content:space-between;padding:6px 9px;background:#283c30;color:#d7e0c5;font-size:9px;border-bottom:1px solid #647b56}
.card-top b{color:#efd39b}
.card-art{height:65px;overflow:hidden;background:#c4ccb2}
.card-art svg{width:100%;height:100%;object-fit:cover}
.card-copy{padding:8px 10px;min-height:88px}
.card-copy small{font-size:8px;color:#6c7b62}
.card h3{font-size:13px;margin:5px 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card p{font-size:10px;line-height:1.6;margin:0}
.card-bottom{padding:7px 9px;border-top:1px solid #9d9f8555;font-size:9px;background:#c5ceb44a;color:#566646}
.card:disabled{opacity:.6;filter:saturate(.55)}
.card.chosen{opacity:1;outline:2px solid #e4c482;filter:none}
.card.chosen .card-bottom{background:#42573d;color:#f0ddae}
.folded .hand{display:none}
.event-panel{width:175px;padding:13px;background:var(--panel);border:1px solid #a9b29433;border-radius:5px}
.event-panel .eyebrow{font-size:9px}
.event-panel p{font-size:10px;line-height:1.65;color:#c0c7ad;border-bottom:1px solid #b9c2a51c;padding-bottom:9px;margin:10px 0 0}
.event-panel p:last-child{border:0}
#connection{position:absolute;top:138px;left:50%;transform:translateX(-50%);background:#683d2cec;padding:10px 18px;font-size:12px;border-radius:4px;display:none}
#connection.visible{display:block}
#toast{position:fixed;z-index:20;top:150px;left:50%;transform:translate(-50%,-8px);background:#15271ff2;border:1px solid #c7b37a88;color:#efdfbc;font-size:12px;border-radius:5px;padding:13px 22px;opacity:0;transition:.2s;pointer-events:none;max-width:90vw}
#toast.visible{opacity:1;transform:translate(-50%,0)}
dialog{color:var(--ink);background:#1e3227;border:1px solid #a0b38866;border-radius:8px;width:380px;max-width:90vw;padding:30px}
dialog::backdrop{background:#06160bb0}
dialog h2{font-weight:400}
dialog p{color:var(--muted);font-size:13px;line-height:1.9}
dialog button{display:block;width:100%;margin-top:10px}
.danger{color:#eda68e}
.result-box{position:absolute;top:22%;left:50%;transform:translateX(-50%);padding:30px 40px;background:#172d23f5;border:1px solid #d6c18b77;pointer-events:auto;box-shadow:0 20px 70px #0006;text-align:center;width:520px;max-width:90vw}
.result-box h1{font-size:36px;letter-spacing:-1px}
.result-box p{color:var(--muted);font-size:13px}
@media(min-width:1700px){.command-panel{max-width:920px}
.card-art{height:90px}
.card-copy{min-height:95px}
.map-panel{width:240px}
.event-panel{width:210px}
.card h3{font-size:15px}
.card p{font-size:11px}}
.card.economy{--type:#3f9762;--deep:#244d35;--paper:#e1edce;--light:#b4e2a7}
.card.military{--type:#ce705c;--deep:#733d36;--paper:#f1d9cf;--light:#ffd0b5}
.card.research{--type:#5b9fce;--deep:#284d72;--paper:#d6e6ef;--light:#b9dfff}
.card.tactic{--type:#a07acb;--deep:#594078;--paper:#e9ddf3;--light:#e2c5ff}
.card.elite{--type:#f1c448;--deep:#78501c;--paper:#f9e3a1;--light:#ffe79c;border:2px solid #f6ce5b;box-shadow:0 0 15px #edc44144,0 6px 15px #0004}
.card{border-top:4px solid var(--type);background:var(--paper);border-color:var(--type)}
.card .card-top{background:var(--deep);color:var(--light);border-color:var(--type);font-weight:700}
.card .card-art{border-bottom:3px solid var(--type)}
.card .card-bottom{background:var(--deep);color:var(--light);border-color:var(--type)}
.card:hover:enabled{background:var(--paper);border-color:var(--light)}
.card:disabled{filter:none;opacity:.66}
.card.chosen{opacity:1;outline-color:var(--light)}
.card.elite .card-copy{background:linear-gradient(120deg,#f6d888,#fff0ba 55%,#eec971)}
.card.elite .card-top{background:linear-gradient(100deg,#654217,#b78930,#70501e);color:#fff3be}
.card.elite h3{color:#6c4614}
.card-legend{display:flex;justify-content:center;gap:15px;background:#14251de8;padding:7px 5px;font-size:9px;border-radius:0 0 5px 5px}
.card-legend .economy{color:#a9db9c}
.card-legend .military{color:#f5a990}
.card-legend .research{color:#9dceef}
.card-legend .tactic{color:#d2b0f6}
.card-legend .elite{color:#ffdb74}
.folded .card-legend{display:none}
.unit-info{position:absolute;top:84px;right:22px;width:252px;padding:16px;background:#172b23f5;border:1px solid #9cb6a772;border-top:3px solid #83c3cc;box-shadow:0 8px 35px #0005;border-radius:5px;pointer-events:auto}
.unit-info[hidden]{display:none}
.unit-info.elite{border-color:#dbb657;background:linear-gradient(140deg,#3e3621f5,#1f3027fa)}
.unit-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#b4c9b3}
.unit-heading button{font-size:23px;width:27px;height:27px;padding:0;line-height:1;background:transparent;border:0;color:#e5e8d5}
.unit-info h2{font-size:18px;margin:9px 0 5px;letter-spacing:-.5px}
.unit-info.elite h2{color:#ffdf87}
.unit-era{font-size:10px;color:#a1b49d;margin:0 0 18px}
.unit-health{display:flex;justify-content:space-between;font-size:10px;color:#c4d7bb}
.unit-health b{color:#e6f2dd;font-variant-numeric:tabular-nums}
.unit-health-bar{height:5px;background:#425044;margin:7px 0 14px}
.unit-health-bar i{height:100%;display:block;background:#98cb78;transition:width .3s}
.unit-info dl{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}
.unit-info dl>div{display:flex;justify-content:space-between;gap:10px}
.unit-info dt{font-size:10px;color:#a9b99f}
.unit-info dd{margin:0;font-size:12px;color:#ebeddb;font-variant-numeric:tabular-nums}
.unit-state{margin:15px 0 10px;padding-top:12px;border-top:1px solid #adba9833;font-size:11px;color:#dcdfbe}
.unit-info>small{font-size:9px;color:#92a18a}
@media(max-width:1100px){.unit-info{top:158px}}
@media(max-width:760px){.unit-info{top:120px;right:10px;width:205px;padding:12px}
.unit-info h2{font-size:15px}
.card-legend{gap:8px;font-size:8px}}
@media(max-width:1100px){.event-panel{display:none}
.topbar{gap:22px}
#resources{gap:18px}
.map-panel{width:165px}

.capital{width:180px}
.command-heading small{font-size:9px}
.card-copy{padding:7px;min-height:88px}
.card h3{font-size:12px}}
@media(max-width:760px){.topbar{height:52px;padding:0 10px;gap:12px}
.game-brand{font-size:29px}
.game-brand>span{display:none}
#resources{gap:12px}
#resources>div{min-width:0}
#resources strong{font-size:11px}
#resources em{display:none}
#resources small{font-size:8px}
.top-actions{gap:3px}
.top-actions button{width:28px;height:29px;font-size:17px}
#scoreboard{top:65px;gap:10px}
.capital{width:145px;padding:8px 10px 12px}
.capital span{font-size:10px}
.capital b{font-size:14px}
.versus{font-size:8px}





.map-panel{display:none}
.command-heading{padding:8px}
.command-heading small{margin-left:8px}
.hand{gap:4px;padding:5px}
.card-art{height:45px}
.card-copy{padding:6px;min-height:90px}
.card h3{font-size:10px}
.card p{font-size:9px}
.card-copy small{font-size:7px}
.card-top{font-size:8px;padding:5px}
.card-bottom{font-size:8px;padding:5px}
.entry{padding:24px}
.entry-content{padding:25px 0}
.entry-brand{font-size:13px}
footer span{margin-left:8px}}
@media(max-height:650px){.card-art{height:40px}
.card-copy{min-height:72px}
.card-copy p{font-size:9px}
.map-panel{width:155px}

.event-panel{display:none}
.entry-content{padding:20px 0}
h1{font-size:42px;margin:12px 0}
.intro{margin-bottom:16px}}
.remember-option{display:flex;align-items:center;gap:9px;font-size:11px;color:var(--muted);line-height:1.7;cursor:pointer}
.remember-option input{accent-color:var(--gold);width:16px;height:16px;margin:0;padding:0}
.account-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 25px;padding-bottom:15px;border-bottom:1px solid #b4c29c33}
.account-bar>div{display:flex;gap:10px}
.role-badge{display:inline-flex;font-size:11px;color:#c0d1bb;background:#38573e66;border:1px solid #79966b66;padding:7px 10px;border-radius:4px}
.role-badge.admin{background:#6d522244;border-color:#d4ad5a88;color:#f0d493}
.admin-title{font-size:17px;font-weight:500}
.admin-title small{font-size:12px;color:var(--gold);margin-left:7px}
.invite-list{margin-top:22px}
.invite-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 0;border-bottom:1px solid #9aa78033}
.invite-row strong{display:block;font-size:13px;overflow-wrap:anywhere}
.invite-row small{display:block;margin-top:7px;font-size:11px;color:var(--muted)}
.invite-row button{flex-shrink:0}
.admin-empty{font-size:13px;color:var(--muted);line-height:1.9;background:#253e2d66;padding:22px;border:1px dashed #83977766;border-radius:5px}
.topbar{gap:22px}
.game-brand{flex-shrink:0}
#resources{gap:20px}
#resources>div{min-width:85px}
.top-actions{flex-shrink:0}
.folded #draw-progress{display:none}
.map-panel{order:0;width:190px}
.event-panel{order:2;width:180px}
.history-entry{width:100%;margin-top:24px;display:flex;justify-content:space-between;font-size:12px;background:#2e493333;border-color:#b2c3a13d}
.history-entry span{color:var(--gold)}
.report-dialog{width:920px;max-width:94vw;max-height:90dvh;padding:27px 32px;overscroll-behavior:contain}
.report-header{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #839f7255;padding-bottom:15px}
.report-header h2{font-size:21px;margin:0}
.report-header button{width:32px;margin:0;padding:0;font-size:27px;border:none;background:none}
.report-intro p{font-size:12px}
.report-list{display:grid;gap:8px;margin-top:23px}
.report-list>button{display:flex;align-items:center;gap:18px;width:100%;margin:0;padding:17px;text-align:left;background:#294335}
.report-list strong{display:block;font-size:13px}
.report-list small{display:block;font-size:10px;color:#a9bda1;margin-top:7px}
.report-list strong small{display:inline;margin-left:8px}
.report-list-score{margin-left:auto;text-align:right}
.report-list-score>b{font-size:21px;color:#e5d39d}
.result-pill{font-size:11px;padding:6px 9px;background:#684c3b;color:#e7c4ab;border-radius:4px}
.result-pill.win{background:#48613d;color:#c4e3b0}
.report-summary{margin-top:25px}
.report-summary p{font-size:11px;margin-top:10px}
.report-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}
.report-metrics>div{padding:17px 12px;background:#2c4735;border:1px solid #a6b68c33;border-radius:5px}
.report-metrics small,.report-metrics strong,.report-metrics span{display:block}
.report-metrics small{font-size:10px;color:#a6bb9b}
.report-metrics strong{font-size:27px;font-weight:500;color:#eed9a8;margin:10px 0}
.report-metrics span{font-size:9px;color:#9eb493}
.replaying #app{visibility:hidden;pointer-events:none}
.replaying #world{inset:0!important;width:100vw!important;height:100vh!important}
#replay-controls{position:fixed;inset:0;z-index:70;pointer-events:none;color:#e8eddb}
#replay-controls header,#replay-controls footer{pointer-events:auto;position:absolute;left:0;right:0;background:#10271feb;padding:16px 24px;display:flex;align-items:center;gap:16px}
#replay-controls header{top:0;justify-content:space-between;border-bottom:1px solid #9eb88a55}
#replay-controls header strong,#replay-controls header small{display:block}#replay-controls header small{font-size:11px;color:#b5c9a7;margin-bottom:5px}
#replay-controls header span{color:#bba875;font-size:12px;margin:0 12px}
#replay-controls button{margin:0;width:auto;padding:10px 18px}
#replay-controls footer{bottom:0;flex-wrap:wrap;border-top:1px solid #9eb88a55}
#replay-controls label{font-size:11px;margin:0;display:flex;gap:8px;align-items:center}
#replay-speed{width:75px;margin:0;padding:8px}#replay-clock{font:600 17px monospace;color:#f1d692;min-width:145px}
#replay-seek{flex:1;min-width:180px;margin:0;accent-color:#e2c37c}#replay-info{width:100%;font-size:11px;color:#b3c5a9}
#replay-score{position:absolute;top:92px;left:50%;transform:translateX(-50%);display:flex;gap:24px}
#replay-score>div{min-width:200px;padding:12px 18px;background:#10271fdd;border-top:3px solid #4cb3db}#replay-score>div:last-child{border-color:#e76f56}
#replay-score strong,#replay-score b{display:block}#replay-score b{margin-top:8px}#replay-score small{font-size:10px;color:#a5b69a}
@media(max-width:640px){#replay-controls header,#replay-controls footer{padding:12px}#replay-score{gap:8px;top:90px}#replay-score>div{min-width:130px;padding:10px}#replay-clock{min-width:auto;font-size:14px}}
.report-history{margin-top:28px;border-top:1px solid #839f7255;padding-top:8px}
.history-players,.history-sides{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.history-players{margin:18px 0;padding:14px;background:#10271f;border-radius:6px}
.history-players small,.history-card small,.history-milestone small{display:block;font-size:11px;color:#b7c4af;margin-top:7px;line-height:1.5}
.history-players>div:first-child,.history-sides>section:first-child{border-left:3px solid #4cb3db;padding-left:12px}
.history-players>div:last-child,.history-sides>section:last-child{border-left:3px solid #e76f56;padding-left:12px}
.report-round{margin:12px 0;border:1px solid #78907366;border-radius:6px;background:#163025}
.report-round>summary{padding:16px;cursor:pointer;color:#eed9a8;font-weight:600}
.report-round>summary span{font-size:11px;font-weight:400;color:#b5c5ab;margin-left:12px}
.history-sides{padding:0 16px 16px}.history-sides h4{margin:10px 0;font-size:13px}
.history-sides ol{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.history-sides li{padding:12px;background:#253f31;border-radius:4px}
.history-sides time{font-variant-numeric:tabular-nums;font-size:11px;color:#ccd2c2}
.history-card>div{display:flex;gap:10px;align-items:center;margin-bottom:8px;font-size:10px;color:#b8c8b1}
.history-card b{margin-left:auto;color:#ecd08e}.history-card strong,.history-milestone strong{font-size:13px}
.history-milestone strong{display:block;margin-top:7px;color:#eed9a8}
.history-card .history-active{color:#b2d999}.history-card .history-pending{color:#d4aa7d}
.history-empty,.report-history-notice{font-size:12px;color:#aebfa6;line-height:1.6}.report-history-notice{padding:12px;background:#3a3b27;border-radius:5px}
@media(max-width:640px){.history-players,.history-sides{grid-template-columns:1fr}.report-round>summary span{display:block;margin:8px 0 0}.history-sides{padding:0 10px 10px}}
.report-dialog h3{font-size:17px;font-weight:500;margin:28px 0 15px}
.report-dialog h3 span{font-size:12px;color:#9db292;margin-left:10px}
.result-box{z-index:4}
.result-box button{margin:7px 5px;font-size:12px}
@media(min-width:1700px){.map-panel{width:220px}
.event-panel{width:190px}}
@media(max-width:1250px){.game-brand>span{display:none}
.topbar{gap:16px}
#resources{gap:12px}
#resources>div{min-width:75px}
.map-panel{width:155px}
.event-panel{display:none}}
@media(max-width:850px){.map-panel{display:none}
.report-dialog{padding:20px}
.report-metrics{grid-template-columns:1fr 1fr}
.report-list>button{gap:9px;padding:12px}
.report-list-score small{max-width:110px}
.report-header h2{font-size:18px}}
.card.unaffordable{filter:grayscale(.85) brightness(.63)}
.card.unaffordable .card-bottom{font-weight:bold}
.hud{--left-width:clamp(145px,13vw,220px);--dock-gap:12px}
@media(max-width:719px){.hud{}}
.hud-drag{cursor:grab;touch-action:none;user-select:none}
.hud-drag:active{cursor:grabbing}
.card.status{--type:#a78bdb;--deep:#503c71;--paper:#eadff7;--light:#e6d0ff}
.card-legend .status{color:#d1b0ff}
.hand{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:719px){.hand{grid-template-columns:repeat(5,minmax(150px,1fr));overflow:auto}}
.capital{gap:7px;padding-top:7px;padding-bottom:8px}
.capital-identity{min-width:0;flex:1}
.capital .capital-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.capital .owner-label{font-style:normal}
.capital.mine .owner-label{color:#f2d59a;font-weight:700}
.capital b{white-space:nowrap;font-size:16px;flex-shrink:0}
.capital b small{font-size:8px}
.capital-identity small{white-space:nowrap;font-size:8px}
.capital-identity small{margin-top:2px}
.capital.blue{border-top:2px solid #6dcaeb}
.capital.red{border-top:2px solid #e28b70}
@media(min-width:761px){#scoreboard{top:76px}
.capital{width:260px}}
#pause-panel{position:fixed;inset:60px 0 0;z-index:30;background:#08160ff5;display:grid;place-items:center;pointer-events:auto}
#pause-panel[hidden]{display:none}
.pause-box{text-align:center;width:min(440px,90vw);padding:32px;background:#1d3025;border:1px solid #64755a;border-radius:12px;box-shadow:0 16px 70px #0008}
.pause-box h2{font-size:28px;margin:12px 0}
.pause-box p{color:#bfccb9;line-height:1.7;font-size:14px}
.pause-box button{width:100%;margin-top:14px}
.resume-status{display:grid;gap:10px;margin:22px 0;color:#e5ce94;font-size:14px}
.counter-guide{font-size:11px;color:#d8ceab;margin-top:12px}
.counter-guide summary{cursor:pointer}
.counter-guide p{line-height:1.7}
.top-actions #pause{min-width:38px}
.top-actions #pause:disabled{opacity:.55}
#hq-controls{position:fixed;inset:0;pointer-events:none;z-index:3}
#hq-controls[hidden]{display:none}
.hq-progress{position:absolute;transform:translate(-50%,-100%);min-width:126px;padding:7px;background:#101711e8;border:1px solid #817e5b;border-radius:6px;text-align:center;box-shadow:0 3px 12px #0006}
.hq-progress small{font-size:10px;color:#d1d2b9}
.hq-progress.own{border-color:#e3c775}
.hq-slots{display:flex;gap:4px;margin-top:5px}
.hq-slots i{height:9px;flex:1;background:#030504;border:1px solid #454b37;border-radius:2px}
.hq-slots i.filled{background:#f0ca42;border-color:#ffe983;box-shadow:0 0 5px #ecca5888}
.hq-progress button{pointer-events:auto;margin-top:7px;background:#d3ad4a;color:#172417;min-height:42px;padding:5px 10px;font-weight:700;font-size:11px;cursor:pointer}
.hq-progress button span{font-size:26px;display:block}
.enemy-evolution{font-size:10px;display:block;margin-top:4px;color:#e4d296}
.entry [hidden]{ display: none; }
.dispatch-lanes{ display: grid; gap: .55rem; margin: 1rem 0; }
.dispatch-lanes button{ display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; margin: 0; }
.dispatch-lanes small{ color: #d0c9b6; }
.dispatch-lanes button:is(:hover,:focus-visible){ border-color: #efc773; }
.hq-progress.own .militia-siren{position:absolute;top:100%;left:calc(100% + 3px);transform:translateY(-25%);display:grid;justify-items:center;gap:1px;padding:4px 7px;margin-top:4px;background:#7f2224;border:1px solid #ff8474;border-radius:7px;color:white;box-shadow:0 2px 7px #32100d99;line-height:1}
.militia-siren b{font-size:18px}
.hq-progress .militia-siren small{color:inherit;white-space:nowrap;font-size:10px}
.hq-progress.own .militia-siren:disabled{filter:grayscale(1);opacity:.65;cursor:default}
.cast-layer{pointer-events:none;position:fixed;inset:0;overflow:hidden;z-index:4}
.cast-flash{--tint:#bed7ff;position:absolute;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:5px;transform:translate(-50%,-100%);color:#fff;padding:5px 9px;background:#17261ff0;border-bottom:2px solid var(--tint);border-radius:5px;white-space:nowrap;animation:cast-lift 2.2s both;font-size:12px}
.cast-flash[hidden],#match-chat[hidden]{display:none}
.cast-flash i{grid-row:span 2;font:700 21px/1 Georgia;color:var(--tint)}
.cast-flash small{font-size:9px;color:var(--tint)}
.cast-flash::after{content:'';position:absolute;top:100%;left:50%;width:46px;height:16px;border:2px solid var(--tint);border-radius:50%;animation:cast-wave 1.15s ease-out 2}
.cast-military{--tint:#ff8e6f}
.cast-economy{--tint:#a5dc85}
.cast-status{--tint:#d4a6ff}
.cast-tactic{--tint:#ffda6b}
.cast-military::after{border-style:dashed}
.cast-status::after{border-style:dotted}
.cast-tactic::after{border-style:double;border-width:4px}
@keyframes cast-wave{from{transform:translateX(-50%) scale(.3);opacity:1}to{transform:translateX(-50%) scale(2);opacity:0}}
@keyframes cast-lift{0%{opacity:0;translate:0 8px}12%,78%{opacity:1}100%{opacity:0;translate:0 -14px}}
@media(prefers-reduced-motion:reduce){.cast-flash,.cast-flash::after{animation:none}
.cast-flash::after{display:none}}
.top-actions .chat-toggle{width:auto;min-width:38px;padding:0 5px;font:600 11px/1.1 system-ui}
#match-chat{position:fixed;right:12px;top:66px;width:min(300px,calc(100vw - 24px));background:#15281ff5;border:1px solid #728673;border-radius:8px;color:#f2ebd5;pointer-events:auto;z-index:40;box-shadow:0 5px 20px #0007}
#match-chat header,#match-chat form{display:flex;align-items:center;gap:6px;padding:7px 9px}
#match-chat header{justify-content:space-between;border-bottom:1px solid #496254}
#match-chat button{min-height:30px;padding:2px 9px}
.chat-messages{overflow:auto;height:min(175px,25vh);padding:0 9px;scrollbar-width:thin}
.chat-messages p{overflow-wrap:anywhere;margin:.45em 0;font:13px/1.4 system-ui}
.chat-messages b{margin-right:6px;color:#92cfea}
.chat-messages .chat-opponent b{color:#ffa990}
#match-chat input{min-width:0;flex:1;background:#243e31;color:white;padding:6px;border:1px solid #668570}
.chat-error:not(:empty){display:block;padding:0 8px 6px;color:#ffbd9e}
.militia-siren{position:absolute;transform:translate(-50%,-50%);display:grid;justify-items:center;gap:4px;min-width:76px;min-height:60px;padding:8px;background:#852a2c;border:1px solid #ff9b82;border-radius:9px;color:#fff;box-shadow:0 4px 15px #35171388;pointer-events:auto}
.militia-siren:hover{background:#a33535}
.militia-siren b{font-size:24px}
.militia-siren small{font-size:10px;white-space:nowrap}
.militia-siren:disabled{filter:grayscale(1);opacity:.65}


#resources .gold-resource{display:flex;align-items:center;gap:12px;min-width:225px;padding:7px 15px;background:linear-gradient(110deg,#5d4925b0,#283526);border:1px solid #c6a55b80;border-radius:8px;box-shadow:inset 0 1px #f6dfa322}
#resources .gold-coin{font-size:28px;color:#f2cf76}
#resources .gold-resource small{font-size:9px;margin-bottom:2px;color:#d9cba1}
#resources .gold-resource strong.gold{font-size:29px;line-height:1;font-weight:800;letter-spacing:.3px;font-variant-numeric:tabular-nums;color:#ffe5a1;text-shadow:0 1px 5px #0007}
#resources .gold-resource strong.gold span{font-size:12px;font-weight:500;color:#cfb77e}
#resources .gold-income{padding-left:11px;border-left:1px solid #b79d5a66;min-width:95px}
#resources .gold-income b{font-size:12px;color:#e8d49f;white-space:nowrap}
#resources .gold-income small{font-size:10px;margin:5px 0 0;color:#b7c3a3}
@media(max-width:1100px){#resources .gold-resource{min-width:200px;gap:8px;padding:6px 10px}
#resources .gold-resource strong.gold{font-size:26px}}
@media(max-width:760px){#resources{gap:7px}
#resources .gold-resource{min-width:0;gap:5px;padding:4px 7px}
#resources .gold-coin{font-size:18px}
#resources .gold-resource strong.gold{font-size:22px}
#resources .gold-income{min-width:0;padding-left:6px}
#resources .gold-income b{font-size:9px}
#resources .gold-income small{font-size:8px;margin-top:3px}
.militia-siren{min-width:64px;min-height:50px;padding:6px}
.militia-siren b{font-size:20px}}
/* Combat HUD: map and news flank the card supply. */
.bottom-hud{position:absolute;bottom:12px;left:12px;right:12px;display:grid;grid-template-columns:220px minmax(0,1fr) 190px;gap:14px;align-items:end;pointer-events:none}
.bottom-hud>section,.bottom-hud>aside{pointer-events:auto}
.bottom-hud .command-panel{width:100%;max-width:1040px;justify-self:center;min-width:0}
.bottom-hud .map-panel,.bottom-hud .event-panel{width:100%}
.command-panel[hidden]{display:none}
.bottom-hud .card-art{height:60px}
/* Research left, both clocks centered, treasury right. */
.topbar{display:grid;grid-template-columns:160px minmax(0,1fr) 230px minmax(0,1fr) 160px;gap:18px;height:76px}
#resources{display:contents}
#resources>div{min-width:0}
#resources .research-group{display:flex;gap:24px;align-items:center}
#resources .civilization-resource{flex-shrink:0}
#resources .research-resource{display:flex;gap:16px;align-items:center;padding:8px 16px;border:1px solid #d9c58b66;border-radius:8px;background:#344335;min-width:205px}
#resources .research-resource strong{font-size:29px;line-height:1.1;font-weight:800;color:#f5df9c;font-variant-numeric:tabular-nums;white-space:nowrap}
#resources .research-resource strong span{font-size:15px;color:#c8d1ba}
#resources .research-resource small{font-size:10px;margin-bottom:4px}
.research-meter{flex:1;min-width:95px}
.research-slots{display:flex;gap:4px;height:10px;margin-bottom:6px}
.research-slots i{flex:1;background:#111d16;border:1px solid #83927655;border-radius:2px}
.research-slots .filled{background:#efd15d;border-color:#ffe887}
.research-slots .pending{background:repeating-linear-gradient(135deg,#bba251 0 3px,#344335 3px 6px);border-color:#dfc475}
#resources .research-meter small{font-size:9px;white-space:nowrap;margin:0;color:#bac8b0}
#resources .time-resource{display:flex;align-items:center;justify-content:center;gap:22px;text-align:center}
#resources .time-resource strong{display:block;font-size:27px;line-height:1.1;font-weight:750;letter-spacing:1px;font-variant-numeric:tabular-nums}
#resources .time-resource small{white-space:nowrap;color:#b9c9ac}
#resources .round-clock{padding-left:20px;border-left:1px solid #8c9e7355}
#resources .round-clock strong{color:#f7dc91}
#resources .round-clock.urgent strong{color:#ffad81}
#resources .gold-resource{justify-self:center}
.top-actions{margin:0;justify-self:end}
#scoreboard{top:88px}
.activation-queue{position:absolute;top:150px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 440px);padding:7px 10px;background:#14261ee8;border:1px solid #bdc58b44;border-radius:5px}
.activation-queue[hidden]{display:none}
.activation-queue>small{display:block;text-align:center;font-size:9px;color:#ddcf9e;margin-bottom:5px}
.activation-queue ol{display:flex;gap:6px;margin:0;padding:0;list-style:none}
.activation-queue li{padding:5px 8px;border-left:3px solid #b6c48b;background:#ffffff09;white-space:nowrap}
.activation-queue li.research{border-color:#83bfe2}.activation-queue li.military{border-color:#e08a6f}.activation-queue li.tactic{border-color:#f4cf68}.activation-queue li.economy{border-color:#8fc78a}.activation-queue li.status{border-color:#b392d8}
.activation-queue b{font-size:10px;font-weight:500}.activation-queue li span{font-size:9px;color:#a9b99e;margin-left:8px}
.entry:has(.ready-stage){align-items:center;background:radial-gradient(ellipse at center,#19382ce8,#0d2118df)}
.entry-content:has(.ready-stage){width:680px;max-width:100%;text-align:center;margin:auto;padding:20px 0}
.ready-stage h1{font-size:48px;letter-spacing:-2px;margin:14px 0 28px}
.ready-stage p{font-size:16px;color:#bdcbb7;line-height:1.6}
.ready-players{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:26px}
.ready-players>div{display:grid;gap:12px;padding:25px 16px;border:1px solid #91a78d66;border-radius:10px;background:#1d3329}
.ready-players small{color:#9caf97}.ready-players strong{font-size:23px;overflow-wrap:anywhere}.ready-players span{color:#a3b39b}
.ready-players .is-ready{border-color:#c9d398;background:#354b32}.ready-players .is-ready span{color:#d9e7a7}
.ready-stage #ready{width:100%;padding:23px 16px;font-size:25px;border-radius:10px;font-weight:800}
.ready-stage #ready:disabled{opacity:1;background:#43573d;color:#d3dfbd;border-color:#9ba77e}
.ready-rules{display:block;color:#93a78d;font-size:12px;margin-top:25px}
.start-countdown{font-size:clamp(120px,22vw,210px);font-weight:800;line-height:1.1;color:#f5da91;text-shadow:0 8px 50px #edd38944;animation:count-in .8s ease-out}
@keyframes count-in{from{transform:scale(1.18);opacity:.4}to{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.start-countdown{animation:none}}
@media(max-width:1400px){.topbar{grid-template-columns:36px minmax(0,1fr) 205px minmax(0,1fr) 154px;gap:12px;padding:0 14px}.game-brand>span{display:none}#resources .research-group{gap:12px}#resources .research-resource{min-width:180px;padding:8px 10px;gap:10px}#resources .research-resource strong{font-size:26px}}
@media(max-width:1150px){#resources .civilization-resource{display:none}.activation-queue{max-width:calc(100vw - 300px);overflow-x:auto}.activation-queue ol{width:max-content}}
@media(max-width:900px){.topbar{grid-template-columns:1fr 180px 1fr;height:114px;grid-template-rows:70px 36px;gap:0 8px}.game-brand{grid-column:1;grid-row:2;font-size:25px}.game-brand>span{display:block;font-size:10px}.game-brand small{display:none}#resources .research-group{grid-column:1;grid-row:1}#resources .time-resource{grid-column:2;grid-row:1;gap:12px}#resources .round-clock{padding-left:12px}#resources .time-resource strong{font-size:23px}#resources .gold-resource{grid-column:3;grid-row:1;justify-self:end}#resources .research-resource{min-width:0;width:100%}.research-meter{display:none}.top-actions{grid-column:2/4;grid-row:2}#scoreboard{top:124px}.activation-queue{top:182px;max-width:calc(100vw - 32px)}}
@media(max-width:540px){.topbar{padding:0 8px;grid-template-columns:1fr 145px 1fr}#resources .time-resource{gap:8px}#resources .round-clock{padding-left:8px}#resources .time-resource strong{font-size:19px}#resources .time-resource small{font-size:8px}#resources .research-resource{padding:8px}#resources .research-resource strong{font-size:23px}#resources .research-resource strong span{font-size:11px}#resources .gold-resource{padding:6px;gap:0}#resources .gold-coin{display:none}#resources .gold-income{display:none}.ready-stage h1{font-size:36px}.ready-players{gap:10px}.ready-players strong{font-size:18px}.ready-stage #ready{font-size:20px}}
@media(max-width:1200px){.bottom-hud{grid-template-columns:165px minmax(0,1fr)}.bottom-hud .event-panel{display:none}.bottom-hud .card-art{height:45px}}
@media(max-width:760px){.bottom-hud{display:block;left:8px;right:8px;bottom:8px}.bottom-hud .map-panel{display:none}.bottom-hud .card-art{height:36px}.bottom-hud .command-panel{max-height:38vh;overflow:auto}}

/* Government banners sit beside the civilization brand. */
.game-brand{gap:9px}.game-brand>span{font-size:11px;letter-spacing:1px}
.regime-banner{display:flex;align-items:center;gap:9px;background:transparent;border-color:#dccb8d55;padding:4px 7px;max-width:230px}
.regime-flag{width:66px;height:44px;flex-shrink:0;filter:drop-shadow(0 2px 3px #0006)}
.regime-banner>span{font-family:"Malgun Gothic",sans-serif;font-size:11px;color:#f0dfaf;white-space:nowrap}
.regime-banner small{font-size:9px;letter-spacing:0;color:#b2c5a7}
.regime-banner.needs-choice{border-color:#e5c883;background:#c9a95720}
.topbar{grid-template-columns:300px minmax(0,1fr) 230px minmax(0,1fr) 160px}
.government-dialog{max-width:850px;width:calc(100vw - 36px);padding:28px}
.government-dialog>p{line-height:1.7;color:#b7c8aa;font-size:13px}
.government-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}
.government-option{padding:22px 16px;text-align:left;border-color:#bfb87866;background:#20382b}
.government-option .regime-flag{width:105px;height:70px}
.government-option h3{font-size:18px;margin:18px 0}.government-option p{font-size:12px;line-height:1.6;min-height:40px}
.regime-benefit{color:#bbdda4}.regime-cost{color:#e2ac8f}.government-option strong{font-size:12px;color:#ebd48f}
.government-option:disabled{opacity:1;cursor:default}
@media(min-width:1401px){.game-brand:has(.regime-banner)>span{display:none}.time-resource{position:absolute;left:50%;transform:translateX(-50%);top:13px}.topbar{position:relative}#resources .gold-resource{grid-column:4}}
@media(max-width:1400px){.topbar{grid-template-columns:180px minmax(0,1fr) 205px minmax(0,1fr) 154px}.regime-banner .regime-flag{width:52px;height:35px}.regime-banner>span{font-size:10px}#resources .civilization-resource{display:none}}
@media(max-width:1050px){.regime-banner>span{display:none}.topbar{grid-template-columns:100px minmax(0,1fr) 180px minmax(0,1fr) 154px}}
@media(max-width:900px){.topbar{grid-template-columns:1fr 180px 1fr}.game-brand>span{display:none}.regime-banner{padding:1px 5px}.regime-banner .regime-flag{width:40px;height:27px}.regime-banner>span{display:block;font-size:9px}.regime-banner small{display:none}.government-options{grid-template-columns:1fr}.government-option p{min-height:0}.government-option .regime-flag{width:75px;height:50px}.government-dialog{max-height:90dvh;overflow:auto}}
@media(max-width:540px){.topbar{grid-template-columns:1fr 145px 1fr}.regime-banner>span{display:none}}
@media(min-width:901px){.top-actions{grid-column:5}}


/* Cached illustrated atlases retain crisp weapons at card size without per-card downloads. */
.card-illustration{display:block;position:relative;width:100%;height:100%;background-repeat:no-repeat}
.dispatch-art{display:block;height:116px;width:100%;margin-bottom:12px;border-radius:5px;overflow:hidden}.cast-bounty{color:#fff0a6;background:#66500ee8;border-color:#ffe18a}
.art-civilization{background-image:url('./assets/civilization-cards-v28.webp');background-size:400% 500%}
.art-unit{background-image:url('./assets/unit-cards-v28.webp');background-size:400% 400%}
.art-effects{background-image:url('./assets/effects-cards-v28.webp');background-size:400% 600%}
.art-armor{background-image:url('./assets/armor-cards-v28.webp');background-size:200% 200%}
.illustration-badge{position:absolute;bottom:6px;right:6px;display:grid;place-items:center;width:29px;height:29px;border:1px solid #f7e3a5b0;border-radius:50%;background:#102e36e8;color:#fff0b2;box-shadow:0 2px 6px #0006}
.card-art .illustration-badge svg{width:18px;height:18px}
.bottom-hud .card-art{height:106px}
.card.unaffordable .card-illustration{filter:saturate(.35) brightness(.65)}
@media(max-width:1200px){.bottom-hud .card-art{height:86px}}
@media(max-width:760px),(max-height:650px){.bottom-hud .card-art{height:64px}}

/* Pending decisions remain visible until acknowledged. Gentle pulse, no strobe. */
@keyframes decision-pulse{0%,100%{box-shadow:0 0 0 1px #e9c96b55;background-color:#d5b05215}50%{box-shadow:0 0 18px 3px #f1d47a77;background-color:#d5b05240}}
.command-panel.needs-attention .command-heading,.regime-banner.needs-choice{animation:decision-pulse 1.6s ease-in-out infinite;border-color:#f2d77e}
.command-panel.needs-attention #draw-label::after{content:' · New cards';color:#ffe8a0}
@media(prefers-reduced-motion:reduce){.command-panel.needs-attention .command-heading,.regime-banner.needs-choice{animation:none;box-shadow:0 0 0 2px #efd178;background:#b9943540}}

#government-banner{display:flex;gap:8px;align-items:center}.religion-symbol{font-size:30px;line-height:1.2;min-width:32px;text-align:center;color:#e7d0a2}.religion-banner{min-width:130px}@media(max-width:700px){#government-banner{gap:3px}.religion-banner{min-width:0}.religion-banner .religion-symbol{font-size:22px}}

/* Keep both permanent-build selectors inside the existing HUD column. */
.game-brand:has(.religion-banner){font-size:0;gap:0}
.game-brand:has(.religion-banner)>span{display:none}
#government-banner .regime-banner{width:72px;min-width:0;max-width:72px;height:62px;flex-direction:column;justify-content:center;gap:2px;padding:3px}
#government-banner .regime-flag{width:38px;height:25px}
#government-banner .religion-symbol{font-size:25px;line-height:25px}
#government-banner .regime-banner>span{display:block;max-width:66px;font-size:9px;white-space:normal;text-align:center;line-height:11px}
#government-banner .regime-banner small{display:none}
@media(max-width:1050px) and (min-width:901px){#government-banner .regime-banner{width:44px}#government-banner .regime-banner>span{font-size:8px}}
@media(max-width:900px){#government-banner .regime-banner{height:33px;width:auto;flex-direction:row}#government-banner .regime-banner>span{font-size:8px}#government-banner .regime-flag{width:28px;height:20px}}



.hand{grid-template-columns:repeat(var(--hand-count,5),minmax(0,1fr))}@media(max-width:719px){.hand{grid-template-columns:repeat(var(--hand-count,5),minmax(150px,1fr));overflow:auto}}
.frontier-nav{display:flex;flex-wrap:wrap;gap:clamp(16px,3vw,40px);padding:8px 0 18px;border-bottom:1px solid #a6b59b55}.frontier-nav a{color:#efeddb;font-size:14px;text-underline-offset:5px}.frontier-grid{display:grid;align-items:center;grid-template-columns:minmax(0,1.05fr) minmax(290px,.85fr);gap:5vw;margin:auto 0;padding:24px 0}.frontier-grid .entry-content{margin:0}.match-board{background:#152b24f0;border:1px solid #82948280;padding:clamp(18px,2.4vw,34px);border-radius:8px;color:#efeddb}.match-board h2{font:normal 26px Georgia,serif;margin:6px 0 10px}.match-board ol{list-style:none;margin:0 0 18px;padding:0}.match-board li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid #85958140;font-size:14px}.match-board small{display:block;color:#b8c6b5;font-size:12px}.match-board button{width:auto;padding:6px 10px;font-size:12px}@media(max-width:800px){.frontier-grid{display:block}.match-board{margin-bottom:20px}.entry:has(.frontier-grid){display:block}.frontier-nav{gap:18px}}
.profile-shop{margin:12px 0;color:#cfdbc9}.profile-shop summary{cursor:pointer}.profile-shop button{margin:8px 4px;padding:6px 12px}.frame-aurora{box-shadow:0 0 0 2px #76cfc4,inset 0 0 10px #337168}.frame-copper{box-shadow:0 0 0 2px #c08a62,inset 0 0 10px #64432f}

.sound-settings { position:relative; color:#f0eddf; font:600 13px/1.4 system-ui,sans-serif; pointer-events:auto; }
.sound-settings summary { cursor:pointer; padding:6px 9px; border:1px solid #a6b59b66; border-radius:5px; }
.sound-settings summary:focus-visible { outline:2px solid #e3c887; }
.sound-settings[open] { z-index:12; }
.sound-settings > div { position:absolute; top:calc(100% + 6px); right:0; width:174px; padding:12px; background:#172b23; border:1px solid #a6b59b88; border-radius:7px; box-shadow:0 6px 18px #0006; }
.sound-settings label { display:flex; align-items:center; gap:8px; margin:0 0 6px; color:inherit; font:inherit; }
.sound-settings input[type=checkbox] { width:auto; margin:0; }
.sound-settings input[type=range] { width:85px; min-width:0; padding:0; margin:0; accent-color:#e3c887; }
.sound-settings output { display:block; text-align:right; font-variant-numeric:tabular-nums; }
.sound-settings > div > button { width:100%; height:auto; margin-top:6px; padding:6px 8px; font:inherit; }
.sound-settings [role=status]:not(:empty) { display:block; margin-top:6px; font-weight:400; }
.frontier-nav .sound-settings { margin-left:auto; }
.battle-overview {
  display:grid; grid-template-columns:1fr auto 1fr; align-items:start; gap:12px;
  padding:6px clamp(8px,1.5vw,22px) 0;
}
.battle-overview #scoreboard { position:static; transform:none; grid-column:2; }
.front-switcher {
  display:inline-flex; justify-self:start; padding:2px; gap:2px;
  background:#162920ed; border:1px solid #66745d; border-radius:6px;
}
.front-switcher button { padding:4px 8px; border:1px solid transparent; background:transparent; text-align:left; line-height:1.15; }
.front-switcher button:hover { background:#304735; }
.front-switcher button[aria-pressed=true] { background:#37452d; border-color:#d4bb80; }
.front-switcher strong,.front-switcher small { display:block; white-space:nowrap; }
.front-switcher strong { color:#f3eacb; font-size:12px; }
.front-switcher small { margin-top:2px; color:#becab2; font-size:10px; }
.battle-overview + .activation-queue { position:relative; inset:auto; transform:none; width:max-content; max-width:calc(100% - 16px); margin:5px auto 0; }
#modal .counter-guide { margin:12px 0; }
@media(max-width:1399px) {
  .battle-overview { display:flex; justify-content:space-between; gap:6px; }
  .battle-overview .capital { width:clamp(125px,21vw,250px); }
}
@media(max-width:719px) {
  .battle-overview { flex-direction:column; align-items:center; gap:4px; padding-top:4px; }
  .battle-overview #scoreboard { order:-1; max-width:100%; gap:5px; }
  .battle-overview .capital { min-width:0; width:min(38vw,180px); }
  .front-switcher button { padding:3px 7px; }
}
#replay-controls header .sound-settings { margin-left:auto; order:0; }
#replay-close { order:1; }

/* Lobby lighting frames the live battlefield and keeps the action in the foreground. */
.commander-portrait { display:inline-block; width:34px; height:34px; flex:none; border:1px solid #dfc78a; border-radius:50%; background-image:url('assets/unit-cards-v28.webp'); background-size:400% 400%; }
.portrait-sentinel { background-position:0 0; }
.portrait-rider { background-position:33.333% 33.333%; }
.portrait-captain { background-position:66.667% 0; }
.portrait-marshal { background-position:100% 0; }
.portrait-picker { display:flex; flex-wrap:wrap; gap:12px; border:0; margin:12px 0; padding:0; }
.portrait-picker label { position:relative; cursor:pointer; display:grid; justify-items:center; gap:3px; margin:5px 0; }
.portrait-picker input { position:absolute; opacity:0; }
.portrait-picker input:checked+i,.portrait-picker input:focus-visible+i { outline:3px solid #ffd684; outline-offset:2px; }
.battle-menu-tools { display:flex; flex-wrap:wrap; gap:6px; }
#modal .battle-menu-tools button { width:auto; margin:0; }
.hud-toggle { display:flex; gap:10px; align-items:center; }
.hud-toggle input { width:auto; }
.hud.minimal-hud :is(.game-brand,#resources,#scoreboard,#activation-queue,#hq-controls,.map-panel,.event-panel,.unit-info,.cast-layer) { display:none; }
.hud.minimal-hud .topbar { background:none; border:none; box-shadow:none; }
.hud.minimal-hud .bottom-hud { display:flex; justify-content:center; }
.hud.minimal-hud .command-panel { width:min(100%,1080px); }
.hud .top-actions { pointer-events:auto; }
.hud .capital { gap:6px; }
.capital-identity { flex:1; min-width:0; }
.capital-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(min-width:1051px) {
  .hud .battle-overview { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
  .hud .battle-overview #scoreboard { grid-column:2; justify-self:center; }
}
@media(max-width:1050px) {
  .hud .battle-overview { display:flex; flex-direction:column; align-items:center; }
  .hud .battle-overview #scoreboard { order:-1; }
}
@media(max-width:540px) { .capital .commander-portrait { width:22px; height:22px; } }
.cast-flash.cast-bounty { color:#ffe49c; background:#3d2d0cdd; border-color:#eebf59; animation:gold-rise 1.65s ease-out forwards; }
@keyframes gold-rise { from { opacity:0; translate:0 9px; } 14%,65% { opacity:1; } to { opacity:0; translate:0 -32px; } }
@media(prefers-reduced-motion:reduce){.cast-flash.cast-bounty { animation:none; }}
.entry:has(.frontier-grid) {
  --night: #0b1b2b;
  --aqua: #76e9dd;
  --amber: #ffd684;
  color: #f4f6fb;
  padding: clamp(18px,3vh,36px) clamp(20px,6vw,112px);
  background:
    radial-gradient(ellipse at 83% 20%,#328ca23b,transparent 52%),
    linear-gradient(90deg,#07121ff7 5%,#0b1d2be8 36%,#0d202a72 68%,#071423bd),
    linear-gradient(0deg,#07121ff0,transparent 62%);
  font-family: "Segoe UI",system-ui,sans-serif;
}
.frontier-nav { align-items:center; gap:clamp(15px,2.4vw,36px); border-color:#b3ddeb38; }
.frontier-nav a { color:#e1eff4; font-weight:600; text-decoration:none; }
.frontier-nav a:hover { color:#8af7e2; text-decoration:underline; }
.frontier-grid { width:100%; max-width:1440px; align-self:center; grid-template-columns:minmax(0,1.14fr) minmax(290px,.86fr); }
.frontier-grid .entry-content { width:min(100%,560px); padding:clamp(16px,3vh,42px) 0; }
.frontier-grid .eyebrow { display:flex; align-items:center; gap:10px; color:var(--aqua); letter-spacing:.17em; }
.frontier-grid .eyebrow::before { content:""; width:28px; height:2px; background:currentColor; }
.frontier-grid h1 { margin:14px 0 18px; font:700 clamp(3.55rem,6.8vw,7.5rem)/.91 Georgia,serif; letter-spacing:-.065em; }
.frontier-grid h1 em { color:var(--amber); font-style:italic; text-shadow:0 4px 24px #e897371f; }
.frontier-grid .intro { line-height:1.65; margin:0 0 22px; color:#d9e4eb; font-size:clamp(15px,1.15vw,18px); }
.frontier-grid .form-hint,.frontier-grid .profile-shop { color:#b9ccd6; }
.commander-settings { border-bottom:1px solid #a9c7d139; padding:0 0 10px; color:#d4e3ed; }
.commander-settings > summary { width:fit-content; cursor:pointer; font-weight:600; font-size:14px; }
.commander-settings #name-policy { display:block; margin-top:4px; }
.commander-settings summary:focus-visible,.frontier-nav a:focus-visible { outline:2px solid var(--amber,#ffd684); outline-offset:3px; }
.frontier-grid .mode-grid { flex-wrap:wrap; }
.frontier-grid .mode-grid button { min-width:135px; background:#12283e; border:1px solid #58778e; color:#e9f3ff; }
.frontier-grid .mode-grid .primary {
  background:linear-gradient(140deg,#ffe7a5,#ffc25f 67%,#f4ad49); border-color:#ffe3a0;
  color:#241a10; box-shadow:inset 0 1px 0 #fff9,0 5px 22px #f8af512c;
}
.frontier-grid .mode-grid .primary:hover { background:#ffe1a0; }
.frontier-grid .mode-grid small { opacity:1; }
.frontier-grid #google-signin { width:fit-content; max-width:100%; min-height:40px; border-radius:5px; box-shadow:0 0 0 2px #ffd684,0 5px 24px #ffc05b2c; }
.frontier-grid #google-signin:empty { box-shadow:none; }
.frontier-rail { min-width:0; display:grid; gap:12px; }
.field-guide { position:relative; display:block; isolation:isolate; overflow:hidden; height:clamp(122px,20vh,210px); border-radius:10px; border:1px solid #e5bd7699; background:#152b3c; text-decoration:none; }
.guide-units { position:absolute; inset:0 -4%; display:grid; grid-template-columns:repeat(3,1fr); transform:skewX(-8deg); overflow:hidden; }
.guide-units i { position:relative; overflow:hidden; border-right:2px solid #ffde8a; }
.guide-units i::before { content:""; position:absolute; inset:0 -12%; transform:skewX(8deg); background-image:url('assets/unit-cards-v28.webp'); background-size:400% 400%; }
.guide-infantry::before { background-position:0 0; }
.guide-cavalry::before { background-position:33.3333% 33.3333%; }
.guide-armor::before { background-position:100% 33.3333%; }
.guide-caption { position:absolute; inset:0; display:flex; align-items:end; justify-content:space-between; padding:15px 20px; background:linear-gradient(0deg,#071321f7,transparent 68%); color:#fff4da; font:700 23px Georgia,serif; }
.guide-caption b { font:700 20px system-ui,sans-serif; color:var(--amber); }
.field-guide:hover,.field-guide:focus-visible { border-color:var(--amber); }
.frontier-rail .match-board {
  margin:0; padding:clamp(16px,2vw,26px); background:linear-gradient(125deg,#10283aef,#101c30f7);
  border:1px solid #70c5d46b; border-top:2px solid var(--aqua); border-radius:10px; color:#f3f7fa;
}
.match-board h2 { display:flex; gap:10px; align-items:center; margin:0 0 8px; font:650 clamp(18px,1.5vw,24px)/1.2 "Segoe UI",system-ui,sans-serif; }
.match-board h2::before { content:""; width:4px; height:.85em; border-radius:2px; background:var(--aqua); }
.match-board ol+h2::before { background:var(--amber); }
.match-board ol:last-child { margin-bottom:0; }
.match-board small { color:#bad0dc; }
.match-board li { border-color:#9cbec72e; }
.match-board button { border:1px solid #52958f; background:#153839; color:#baf8ef; flex-shrink:0; }
.community-footer .discord-community { background:linear-gradient(110deg,#4347ab,#4856cf); border-color:#a7adff; }
.discord-community span { margin-left:0; color:inherit; }
.front-switcher { background:#0d2031f5; border-color:#698297; }
.front-switcher button { --lane:#70e5ef; border-bottom:2px solid transparent; }
.front-switcher [data-lane="1"] { --lane:#ffd278; }
.front-switcher [data-lane="2"] { --lane:#c5a4ff; }
.front-switcher button[aria-pressed=true] { box-shadow:inset 0 -2px var(--lane); border-color:var(--lane); background:#223b4c; }
.front-switcher button[aria-pressed=true] strong { color:var(--lane); }
.front-switcher small { color:#d0dce4; }
.hand .card:enabled { border-color:var(--type); box-shadow:0 3px 10px #06101b9c; }
.hand .card:enabled .card-bottom { border-top:2px solid var(--type); color:white; font-weight:700; }
.hand .card:enabled:is(:hover,:focus-visible) { outline:2px solid #ffe5a3; outline-offset:-2px; }
.hand .card:disabled { cursor:default; }
@media (max-width:800px) {
  .frontier-grid { display:grid; grid-template-columns:1fr; gap:12px; padding:12px 0 20px; }
  .frontier-rail { width:100%; }
  .field-guide { height:135px; }
  .frontier-grid h1 { font-size:clamp(3.3rem,12vw,5rem); }
  .entry:has(.frontier-grid) { padding-inline:clamp(14px,4.5vw,32px); }
}
@media (max-width:380px) {
  .frontier-nav { gap:10px; }
  .frontier-nav a { font-size:12px; }
}
@media (prefers-reduced-motion:reduce) {
  .frontier-grid button,.hand .card,.discord-community { transition:none; }
  .hand .card:hover:enabled,.discord-community:hover { transform:none; }
}

.faith-dialog{max-width:630px;padding:clamp(14px,3vw,24px)}
.faith-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:14px 0 8px;padding:0;border:0}
.faith-strip label{min-width:0;margin:0;cursor:pointer;position:relative}
.faith-strip input,.faith-strip legend{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
.faith-strip label span{display:grid;justify-items:center;gap:4px;height:100%;align-content:center;padding:7px 2px;min-height:44px;border:1px solid #607466;border-radius:5px;background:#1d312a;color:#dbe9df;font-size:clamp(10px,2.4vw,13px);overflow-wrap:anywhere;text-align:center}
.faith-strip b{color:#f3d48c;font-size:18px}.faith-strip input:checked+span{border-color:#ffcf65;background:#524728;color:#fff1c5}.faith-strip input:focus-visible+span{outline:2px solid white;outline-offset:2px}
.faith-detail{min-height:4.2em;font-size:13px;line-height:1.5;margin:12px 0}.faith-dialog footer{display:flex;gap:8px;justify-content:flex-end}.faith-dialog footer button{width:auto;min-width:68px;margin:0}
#resources .ready-age{flex-direction:column;align-items:flex-start;justify-content:center;gap:0;color:#ffedb7;border-color:#e8bd67;background:#413923;cursor:pointer;text-align:left}#resources .ready-age b{font-size:clamp(12px,1.2vw,17px);line-height:1.1;white-space:normal}#resources .ready-age:hover{background:#53472b}
