.site-header{position:sticky;top:0;z-index:20;padding-inline:max(1rem,calc((100% - 100rem)/2));border-bottom:1px solid var(--line);background:#07100ff2;backdrop-filter:blur(12px)}.site-header nav{position:relative;flex-wrap:wrap;gap:.55rem 1.25rem}.resources{top:112px}.toast-region{position:fixed;z-index:40;top:118px;right:1rem;display:grid;gap:.5rem;width:min(24rem,calc(100vw - 2rem));pointer-events:none}.toast{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.75rem;padding:.8rem 1rem;border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:.35rem;background:var(--surface);box-shadow:0 .5rem 2rem #0008;pointer-events:auto;animation:toast-in .18s ease-out}.toast.error{border-left-color:var(--red)}.toast.success{border-left-color:var(--green)}.toast-close{min-width:44px;padding:.25rem;border:0;background:transparent;color:var(--text);font-size:1.4rem}.toast.is-leaving{opacity:0}.back-to-top{position:fixed;z-index:15;right:1rem;bottom:1rem;width:48px;height:48px;padding:0;border-radius:50%;opacity:0;visibility:hidden;transition:opacity .18s}.back-to-top.is-visible{opacity:1;visibility:visible}@keyframes toast-in{from{opacity:0;transform:translateY(-.5rem)}}
@media(prefers-color-scheme:light){:root{--bg:#f5f2e9;--surface:#fffefa;--surface2:#eef2e8;--text:#17352d;--muted:#5e716a;--line:#cbd6c8;--gold:#865a0c;--red:#a83f38;--green:#28744e;color-scheme:light}html{background:#f5f2e9}body{background:#f5f2e9;color:var(--text)}.site-header{background:#fffefaf5;border-bottom-color:#c4d0c2;box-shadow:0 2px 12px rgba(39,68,56,.08)}main{background:transparent}.panel,.economy-card,.research-card,.operation-card,.market-card,.doctrine-card,.campaign-card,.report-list article,.stat-card,.admin-stats article,.finance-vitals,.system-vitals{background:#fffefa!important;border-color:#cbd6c8;box-shadow:0 2px 10px rgba(39,68,56,.055)}.resources{background:#fffefaf2!important;border-color:#cbd6c8;box-shadow:0 3px 12px rgba(39,68,56,.07)}.resources span,.stats span,.muted,small,dt{color:#5e716a}.nav-links a,.brand,.link,a{color:#865a0c}.nav-links a:hover,.brand:hover{color:#624006}.toast{background:#fffefa;border-color:#cbd6c8;border-left-color:var(--gold);box-shadow:0 .5rem 2rem rgba(39,68,56,.16)}.toast.success{border-left-color:var(--green)}.toast.error{border-left-color:var(--red)}input,select,textarea{background:#fff;color:#17352d;border-color:#b9c8b7}input::placeholder,textarea::placeholder{color:#71837c}table{background:#fffefa}th{background:#e9efe5;color:#29483f}th,td{border-color:#d3ddd0}.table-wrap{border-color:#cbd6c8;box-shadow:0 2px 8px rgba(39,68,56,.04)}.alert,.market-notice,.confirmation-summary,.doctrine-cooldown,.prerequisites,.bounded-effect,.system-warning,.danger-zone{background:#f4f1e6}.economy-warning{background:#fff8e8}.economy-card,.research-card,.operation-card,.market-card{background-image:none!important}.economy-vitals,.admin-stats{border-color:#cbd6c8;background:#fffefa}.economy-vitals article,.finance-vitals article,.system-vitals article,.admin-stats article{border-color:#d3ddd0}.income-panel dl div,.economy-columns dl div,.intel-list div,.report-details li{border-color:#d3ddd0}.compact div,.research-card dl div,.operation-card dl div,.market-card dl div,.combat-columns section,.order-preview,.account-detail dl div{background:#eef2e8}.quantity-presets span,.composition-options span{background:#fffefa;border-color:#b9c8b7}.quantity-presets input:checked+span{background:#865a0c;color:#fff}.badge,.owned,.level,.status-count{border-color:#b9c8b7}.game-asset-fallback{background:linear-gradient(135deg,#eef2e8,#e9efe5);border-color:#cbd6c8}.back-to-top{box-shadow:0 .35rem 1.25rem rgba(39,68,56,.22)}footer{color:#5e716a}}
@media(max-width:760px){.site-header{padding-block:.65rem}.site-header nav{flex-wrap:nowrap}.resources{top:65px}.toast-region{top:71px}.back-to-top{bottom:calc(1rem + env(safe-area-inset-bottom))}}@media(prefers-reduced-motion:reduce){.toast{animation:none}}
@media(prefers-color-scheme:light) and (max-width:1180px){.nav-links{background-color:#fffefa}}
.resources{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:600px){.resources{grid-template-columns:repeat(2,minmax(0,1fr))}}
.brand{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}.brand>span[aria-hidden="true"]{display:inline;color:var(--gold)}
.nav-links[hidden]{display:none!important}.theme-toggle{flex:0 0 auto;gap:.4rem;min-height:40px;margin-left:auto;padding:.35rem .65rem;border-color:var(--line);color:var(--text)}.theme-toggle:hover{border-color:var(--gold);color:var(--gold)}.theme-icon{width:1.15em;font-size:1.1rem;line-height:1}.nav-links{order:3;width:100%;margin-left:0;justify-content:center;column-gap:1.15rem;row-gap:.25rem;flex-wrap:wrap}.nav-links a,.nav-links .link{white-space:nowrap}.nav-links .link{padding-inline:.25rem}@media(max-width:1180px){.site-header{z-index:30;backdrop-filter:none}.site-header nav{flex-wrap:nowrap;gap:.5rem}.shell-identity{display:none}.nav-toggle{display:inline-flex;margin-left:0}.theme-toggle{min-width:44px}.nav-links{position:fixed;z-index:100;inset:auto .5rem .5rem;top:4.75rem;width:auto;max-width:calc(100vw - 1rem);max-height:calc(100dvh - 5.25rem);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start;align-content:flex-start;flex-direction:column;flex-wrap:nowrap;gap:.25rem;padding:.75rem;padding-bottom:calc(.75rem + env(safe-area-inset-bottom));border:1px solid var(--line);box-shadow:0 .75rem 2rem #0006}.site-header.is-compact .nav-links{top:4rem}.nav-links a,.nav-links .link{width:100%;max-width:100%;padding:.55rem .65rem;text-align:left;white-space:normal;overflow-wrap:anywhere}.theme-toggle [data-theme-label]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}html.navigation-open{overflow:hidden}html.navigation-open .resources{visibility:hidden;pointer-events:none}html[data-theme="dark"] .nav-links{background-color:var(--surface)}html[data-theme="light"] .nav-links{background-color:#fffefa}}@media(min-width:1181px){.site-header nav{display:grid;grid-template-columns:1fr auto 1fr;column-gap:1.25rem}.brand{justify-self:start}.nav-links{order:initial;width:auto;min-width:0;margin-left:0}.theme-toggle{justify-self:end}}

.battle-report-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}.battle-report-actions .button{min-width:10rem}.active-phase-actions{gap:1.25rem}.active-phase-actions button{margin-left:.5rem}@media(max-width:520px){.battle-report-actions{display:grid}.battle-report-actions .button{width:100%}.active-phase-actions{align-items:stretch;flex-direction:column}.active-phase-actions button{width:100%;margin-left:0}}
html[data-theme="dark"]{color-scheme:dark;--bg:#07100f;--surface:#12201e;--surface2:#192b28;--text:#edf5f1;--muted:#9bb0a9;--line:#30443f;--gold:#e2b65b;--red:#dc6b63;--green:#69c892;--focus:#fff}html[data-theme="dark"],html[data-theme="dark"] body{background:#07100f;color:var(--text)}html[data-theme="dark"] body{background:radial-gradient(circle at 80% 0,#19302b 0,transparent 35%),var(--bg)}html[data-theme="dark"] .site-header{background:#07100ff2;border-bottom-color:var(--line);box-shadow:none}html[data-theme="dark"] .panel,html[data-theme="dark"] .economy-card,html[data-theme="dark"] .research-card,html[data-theme="dark"] .operation-card,html[data-theme="dark"] .market-card{background:linear-gradient(145deg,var(--surface),#0c1715)!important}html[data-theme="dark"] .doctrine-card,html[data-theme="dark"] .campaign-card,html[data-theme="dark"] .report-list article,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .admin-stats article,html[data-theme="dark"] .finance-vitals,html[data-theme="dark"] .system-vitals,html[data-theme="dark"] table{background:var(--surface)!important;border-color:var(--line);box-shadow:none}html[data-theme="dark"] .resources{background:#0b1715ef!important;border-color:var(--line);box-shadow:none}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--bg);color:var(--text);border-color:var(--line)}html[data-theme="dark"] th{background:var(--surface2);color:var(--text)}
html[data-theme="light"]{color-scheme:light;--bg:#f5f2e9;--surface:#fffefa;--surface2:#eef2e8;--text:#17352d;--muted:#5e716a;--line:#cbd6c8;--gold:#865a0c;--red:#a83f38;--green:#28744e;--focus:#17352d}html[data-theme="light"],html[data-theme="light"] body{background:#f5f2e9;color:var(--text)}html[data-theme="light"] .site-header{background:#fffefaf5;border-bottom-color:#c4d0c2;box-shadow:0 2px 12px rgba(39,68,56,.08)}html[data-theme="light"] .panel,html[data-theme="light"] .economy-card,html[data-theme="light"] .research-card,html[data-theme="light"] .operation-card,html[data-theme="light"] .market-card,html[data-theme="light"] .doctrine-card,html[data-theme="light"] .campaign-card,html[data-theme="light"] .report-list article,html[data-theme="light"] .stat-card,html[data-theme="light"] .admin-stats article,html[data-theme="light"] .finance-vitals,html[data-theme="light"] .system-vitals{background:#fffefa!important;border-color:#cbd6c8;box-shadow:0 2px 10px rgba(39,68,56,.055)}html[data-theme="light"] .resources{background:#fffefaf2!important;border-color:#cbd6c8}html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#fff;color:#17352d;border-color:#b9c8b7}html[data-theme="light"] table{background:#fffefa}html[data-theme="light"] th{background:#e9efe5;color:#29483f}html[data-theme="light"] .alert,html[data-theme="light"] .market-notice,html[data-theme="light"] .confirmation-summary,html[data-theme="light"] .doctrine-cooldown,html[data-theme="light"] .prerequisites,html[data-theme="light"] .bounded-effect,html[data-theme="light"] .system-warning,html[data-theme="light"] .danger-zone{background:#f4f1e6}
