:root {
    --bg: #0b0f0e; --panel: #131a18; --panel2: #1b2522; --line: #2e3d37; --line2: #47594f;
    --text: #dfe8e2; --dim: #8fa097; --brass: #d7b24c; --brass2: #f4d77a; --good: #4fe06a; --bad: #ff5a48; --info: #5fd0ff;
    --font: "Segoe UI", "Roboto Condensed", system-ui, -apple-system, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; user-select: none; -webkit-user-select: none; }
#app { position: fixed; inset: 0; }
canvas#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
canvas#game.hidden, canvas#overlay.hidden { visibility: hidden; }
canvas#overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
kbd { font-family: var(--font); font-size: 10px; font-weight: 700; background: #0008; border: 1px solid #fff3; border-radius: 3px; padding: 0 4px; color: #fff; }
button { font-family: var(--font); color: var(--text); }
h1, h2, h3, h4 { margin: 0; letter-spacing: .08em; text-transform: uppercase; }
::selection { background: #d7b24c55; }
:focus-visible { outline: 2px solid var(--brass2); outline-offset: 2px; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(7px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes pop { from { transform: scale(0); } }

/* ---------- buttons ---------- */
/* two background layers: a sheen that sweeps across on hover, over the button's own fill (--btn-bg) */
.btn { --btn-bg: linear-gradient(#27352f, #18211e); position: relative; background: linear-gradient(105deg, transparent 38%, #ffffff22 50%, transparent 62%) 130% 0 / 260% 100% no-repeat, var(--btn-bg); border: 1px solid var(--line2); color: var(--text); padding: 10px 22px; font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border-radius: 3px; box-shadow: inset 0 1px 0 #ffffff12, 0 1px 2px #0006; transition: background-position .55s var(--ease), border-color .15s, box-shadow .18s, transform .08s, color .15s, opacity .15s; }
.btn:hover:not(:disabled) { background-position: -30% 0, 0 0; border-color: var(--brass); color: #fff; box-shadow: inset 0 1px 0 #ffffff1c, 0 0 0 1px #d7b24c2e, 0 6px 18px #0007; }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 6px #0008; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { --btn-bg: linear-gradient(#e6c45e, #a8842c); border-color: #f4d77a; color: #1a1408; text-shadow: 0 1px 0 #ffffff40; }
.btn.primary:hover:not(:disabled) { color: #120d04; border-color: #fff0b8; box-shadow: 0 0 0 1px #f4d77a55, 0 0 24px #d7b24c59, 0 6px 18px #0007; }
.btn.danger { border-color: #8a3a30; color: #ff9c8f; }
.btn.danger:hover:not(:disabled) { border-color: var(--bad); color: #ffd6cf; box-shadow: 0 0 0 1px #ff5a4833, 0 0 20px #ff5a4826, 0 6px 18px #0007; }
.btn.small { padding: 5px 12px; font-size: 12px; letter-spacing: .08em; }
.btn.tiny { padding: 3px 8px; font-size: 11px; letter-spacing: 0; }
.btn.on { --btn-bg: linear-gradient(#5a6a3a, #3a4a26); border-color: var(--brass); }
.btn.pulse { animation: pulse 1.2s infinite; border-color: var(--brass2); }
@keyframes pulse { 50% { box-shadow: 0 0 14px #d7b24caa; } }
.badge { position: absolute; top: -7px; right: -7px; background: var(--brass); color: #1a1408; font-weight: 800; border-radius: 9px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; text-align: center; letter-spacing: 0; animation: pop .3s var(--ease); }
.x { background: none; border: 0; color: var(--dim); font-size: 16px; cursor: pointer; padding: 4px 9px; border-radius: 3px; transition: color .15s, background .15s; }
.x:hover { color: #fff; background: #ffffff14; }

/* ---------- form controls: drop-downs, text boxes, sliders, switches, segmented choices ---------- */
select { appearance: none; -webkit-appearance: none; background: #0c1110 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d7b24c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center; color: var(--text); border: 1px solid var(--line2); padding: 6px 26px 6px 9px; border-radius: 3px; font-family: var(--font); font-size: 13px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
select option { background: #0c1110; color: var(--text); }
input:not([type=range]) { background: #0c1110; color: var(--text); border: 1px solid var(--line2); padding: 8px 10px; border-radius: 3px; font-family: var(--font); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
select:hover, input:not([type=range]):hover { border-color: #607568; }
select:focus, input:not([type=range]):focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px #d7b24c22; }
input[type=range] { --p: 50%; -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; margin: 0; height: 22px; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #a8842c, var(--brass2)) 0 0 / var(--p) 100% no-repeat, #060908; box-shadow: inset 0 0 0 1px var(--line2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--brass2) 60%, #a8842c); border: 1px solid #1a1408; box-shadow: 0 2px 6px #000b; transition: transform .12s, box-shadow .12s; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 5px #d7b24c26, 0 2px 6px #000b; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #060908; box-shadow: inset 0 0 0 1px var(--line2); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #a8842c, var(--brass2)); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--brass2); border: 1px solid #1a1408; }
.tog { position: relative; width: 46px; height: 24px; flex: none; border-radius: 12px; border: 1px solid var(--line2); background: #060908; cursor: pointer; padding: 0; transition: background .2s, border-color .2s, box-shadow .2s; }
.tog i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #7d8c84; box-shadow: 0 1px 4px #000a; transition: transform .22s var(--ease), background .2s; }
.tog:hover { border-color: var(--brass); }
.tog.on { background: linear-gradient(#b8943a, #8a6c22); border-color: var(--brass2); box-shadow: 0 0 12px #d7b24c40; }
.tog.on i { transform: translateX(22px); background: #fff; }
.tog:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; background: #080c0b; }
.seg button { background: none; border: 0; border-right: 1px solid var(--line); padding: 6px 12px; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: var(--dim); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: #fff; background: #ffffff0c; }
.seg button.on { background: linear-gradient(#e0bd58, #a8842c); color: #1a1408; }
.field { display: flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* ---------- emblem: a globe crossed by one bright meridian ---------- */
.emblem { display: block; margin: 0 auto; overflow: visible; fill: none; stroke: #c9d6ce; stroke-width: 1.2; }
.emblem .e-dash { stroke: var(--brass); stroke-opacity: .6; stroke-dasharray: 2 7; stroke-width: 1.5; transform-origin: 60px 60px; animation: spin 50s linear infinite; }
.emblem .e-ring { stroke-opacity: .75; stroke-width: 1.6; fill: #0b0f0e99; }
.emblem .e-line { stroke-opacity: .3; }
.emblem .e-mer { stroke: var(--brass2); stroke-width: 3; filter: drop-shadow(0 0 5px #d7b24c); }
.emblem .e-tip { fill: var(--brass2); stroke: none; }

/* ---------- flags ---------- */
.flag { width: 54px; height: 34px; border: 1px solid #0009; box-shadow: 0 2px 6px #0008; flex: none; position: relative; overflow: hidden; }
.flag.sm { width: 36px; height: 23px; }
.flag-ru { background: linear-gradient(#fff 0 33.3%, #0039a6 33.3% 66.6%, #d52b1e 66.6%); }
.flag-de { background: linear-gradient(#111 0 33.3%, #d00 33.3% 66.6%, #ffce00 66.6%); }
.flag-fr { background: linear-gradient(90deg, #0055a4 0 33.3%, #fff 33.3% 66.6%, #ef4135 66.6%); }
.flag-il { background: linear-gradient(#fff 0 14%, #0038b8 14% 27%, #fff 27% 73%, #0038b8 73% 86%, #fff 86%); position: relative; }
.flag-il::after { content: "✡"; position: absolute; inset: 0; display: grid; place-items: center; color: #0038b8; font-size: .62em; line-height: 1; font-style: normal; }
.flag-us { background: linear-gradient(#3c3b6e, #3c3b6e) 0 0 / 42% 54% no-repeat, repeating-linear-gradient(#b22234 0 7.7%, #fff 7.7% 15.4%); }
.flag-cn { background: #de2910; }
.flag-cn::after { content: "★"; position: absolute; left: 12%; top: -6%; color: #ffde00; font-size: 15px; }
.flag.sm.flag-cn::after { font-size: 11px; }
.flag-uk { background:
    linear-gradient(#c8102e, #c8102e) center / 100% 16% no-repeat, linear-gradient(#c8102e, #c8102e) center / 10% 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 30% no-repeat, linear-gradient(#fff, #fff) center / 18% 100% no-repeat,
    linear-gradient(32deg, transparent 45%, #fff 45% 55%, transparent 55%), linear-gradient(-32deg, transparent 45%, #fff 45% 55%, transparent 55%), #012169; }

/* ---------- screens and the transitions between them ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: auto; animation: fadein .34s ease-out backwards; transition: opacity .16s ease-in; }
.screen > * { transition: transform .16s ease-in; }
.screen.leaving { opacity: 0; pointer-events: none; }
.screen.leaving > * { transform: translateY(8px) scale(.992); }
.screen.menu { background: radial-gradient(1200px 700px at 50% 45%, #0b0f0e99, #060908e6 75%); }
.screen.menu.solid { background: #0b0f0e; }
.loading { color: var(--dim); letter-spacing: .3em; text-transform: uppercase; animation: breathe 1.6s infinite; }
.kicker { color: var(--brass); letter-spacing: .5em; font-size: 12px; font-weight: 600; }
h1 span { color: var(--brass); }

/* splash */
.menu-bg { position: absolute; inset: 0; background:
    radial-gradient(1200px 700px at 70% 20%, #2a3a2a66, transparent 60%), radial-gradient(900px 600px at 15% 85%, #4a2a1a55, transparent 60%),
    repeating-linear-gradient(0deg, #ffffff05 0 1px, transparent 1px 48px), repeating-linear-gradient(90deg, #ffffff05 0 1px, transparent 1px 48px),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 139px, #ffffff08 139px 140px), linear-gradient(#0d1412, #070a09); animation: drift 40s linear infinite; }
@keyframes drift { to { background-position: 0 0, 0 0, 0 48px, 48px 0, 0 0, 0 0; } }
.sweep { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; background: conic-gradient(from 0deg, transparent 0 76%, #d7b24c10 94%, #d7b24c38 100%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 58%); mask-image: radial-gradient(circle, #000 0, transparent 58%); animation: spin 14s linear infinite; pointer-events: none; }
.splash { cursor: pointer; overflow: hidden; transition: opacity .3s ease-in; }
.title-block { position: relative; text-align: center; }
.title-block h1 { font-size: clamp(48px, 9vw, 120px); font-weight: 800; letter-spacing: .14em; line-height: 1.05; margin: 10px 0 6px; text-shadow: 0 6px 30px #000, 0 0 60px #000; animation: titlein 1.3s var(--ease) .25s backwards; }
@keyframes titlein { from { opacity: 0; letter-spacing: .5em; filter: blur(10px); } }
.title-block .emblem { width: 118px; height: 118px; margin-bottom: 24px; animation: rise .9s var(--ease) backwards; }
.title-block .kicker { animation: rise .8s var(--ease) .15s backwards; }
.rule { width: min(520px, 60vw); height: 1px; margin: 16px auto 0; background: linear-gradient(90deg, transparent, var(--brass), transparent); animation: rulein 1.1s var(--ease) .7s backwards; }
@keyframes rulein { from { transform: scaleX(0); opacity: 0; } }
.begin { margin-top: 40px; letter-spacing: .5em; text-transform: uppercase; color: var(--brass2); font-size: 14px; animation: rise .8s var(--ease) 1.2s backwards, breathe 2.2s ease-in-out 2s infinite; }
.splash-foot { position: absolute; left: 20px; right: 20px; bottom: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #7f9088; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; animation: rise 1s var(--ease) 1.5s backwards; }
.splash-foot img { height: 30px; display: block; }

/* main menu: a column on the left, the live battle showing through on the right */
.screen.main { align-items: flex-start; justify-content: flex-start; background: linear-gradient(90deg, #050807f7 0, #050807db 320px, #05080770 640px, transparent 940px), linear-gradient(#050807a6 0, transparent 20%, transparent 76%, #050807bf); }
.main-col { position: relative; width: min(540px, 100vw); min-height: 100%; padding: 28px clamp(24px, 4vw, 60px); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 18px; margin-top: auto; animation: rise .7s var(--ease) backwards; }
.brand .emblem { width: 78px; height: 78px; margin: 0; flex: none; }
.brand .kicker { font-size: 10px; letter-spacing: .4em; }
.brand h1 { font-size: clamp(34px, 3.6vw, 50px); font-weight: 800; letter-spacing: .12em; line-height: 1.04; margin-top: 6px; text-shadow: 0 4px 24px #000; }
.brand h1 span { display: block; }
.tagline { color: var(--dim); letter-spacing: .2em; text-transform: uppercase; font-size: 11.5px; margin-top: 18px; padding-bottom: 16px; border-bottom: 1px solid #ffffff17; animation: rise .7s var(--ease) .08s backwards; }
.mnav { display: flex; flex-direction: column; margin-top: 8px; }
.mnav button { position: relative; display: grid; grid-template-columns: 36px 1fr; align-items: baseline; text-align: left; background: none; border: 0; border-bottom: 1px solid #ffffff0d; padding: 12px 10px 12px 14px; cursor: pointer; transition: background .2s, padding-left .25s var(--ease); animation: navin .55s var(--ease) backwards; animation-delay: calc(var(--i) * 60ms + .16s); }
.mnav button::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--brass2); box-shadow: 0 0 12px var(--brass); transform: translateY(-50%); transition: height .22s var(--ease); }
.mnav button:hover, .mnav button:focus-visible { background: linear-gradient(90deg, #d7b24c26, transparent 88%); padding-left: 24px; outline: none; }
.mnav button:hover::before, .mnav button:focus-visible::before { height: 72%; }
.mnav i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #6f8077; font-variant-numeric: tabular-nums; transition: color .2s; }
.mnav b { font-size: 19px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #eef3f0; transition: color .2s; }
.mnav small { grid-column: 2; font-size: 12px; color: var(--dim); letter-spacing: .02em; margin-top: 2px; }
.mnav button:hover b, .mnav button:focus-visible b, .mnav button.hot b { color: var(--brass2); }
.mnav button:hover i, .mnav button:focus-visible i { color: var(--brass); }
@keyframes navin { from { opacity: 0; transform: translateX(-22px); } }
.flags-row { display: flex; gap: 10px; margin: 24px 0 auto; animation: rise .7s var(--ease) .6s backwards; }
.flags-row .flag { width: 42px; height: 27px; transition: transform .15s; }
.flags-row .flag:hover { transform: translateY(-2px); }
.flags-row .flag-cn::after { font-size: 12px; }
.livechip { position: absolute; right: 22px; bottom: 20px; display: flex; align-items: center; gap: 9px; padding: 7px 14px; background: #060908cc; border: 1px solid #ffffff1a; border-radius: 18px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); backdrop-filter: blur(4px); animation: rise .8s var(--ease) .9s backwards; pointer-events: none; }
.livechip b { color: #e6ece8; letter-spacing: .08em; font-weight: 600; }
.livechip .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: breathe 1.4s infinite; }

/* skirmish setup and the multiplayer screens share one panel */
.setup { position: relative; width: min(1320px, 96vw); max-height: 96vh; display: flex; flex-direction: column; background: linear-gradient(#121917f2, #0d1311f7); border: 1px solid var(--line2); border-radius: 8px; box-shadow: 0 24px 90px #000b, inset 0 1px 0 #ffffff0f; backdrop-filter: blur(6px); overflow: hidden; animation: panelin .42s var(--ease) backwards; }
@keyframes panelin { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.setup::before, .modal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brass), transparent); opacity: .7; pointer-events: none; }
.setup-head { display: flex; align-items: center; gap: 18px; padding: 15px 24px 13px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #1a2420, transparent 70%); flex: none; }
.setup-head h2 { font-size: 22px; color: #f2f5f3; letter-spacing: .14em; }
.setup-head .kicker { font-size: 10px; letter-spacing: .4em; }
.setup-grid { display: grid; grid-template-columns: 1.2fr 1.15fr .95fr; gap: 24px; padding: 18px 24px; overflow-y: auto; min-height: 0; }
.setup-foot { display: flex; align-items: center; gap: 18px; padding: 12px 24px; border-top: 1px solid var(--line); background: #0a0f0dd9; flex: none; }
.summary { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12.5px; color: #c3cfc8; }
.summary span { background: #ffffff0a; border: 1px solid var(--line); border-radius: 12px; padding: 3px 10px; white-space: nowrap; }
.summary span b { color: var(--brass2); font-weight: 600; }
.summary .warn { margin: 0; }
.setup h3 { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--brass); letter-spacing: .2em; margin: 18px 0 10px; }
.setup h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.setup h3:first-child { margin-top: 0; }
.nation-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nation, .map { position: relative; display: flex; gap: 12px; align-items: center; text-align: left; background: linear-gradient(#1b2522, #151d1a); border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .12s, background .2s; }
.nation:hover, .map:hover { border-color: var(--line2); transform: translateY(-1px); box-shadow: 0 6px 16px #0006; }
.nation.on, .map.on { border-color: var(--brass); background: linear-gradient(#2f3624, #1f2619); box-shadow: inset 0 0 0 1px var(--brass), 0 0 18px #d7b24c26; }
.nation.on::after, .map.on::after { content: "✓"; position: absolute; top: 5px; right: 8px; color: var(--brass2); font-size: 12px; font-weight: 800; animation: pop .25s var(--ease); }
.nation b, .map b { display: block; font-size: 14px; letter-spacing: .04em; }
.nation small, .map small { display: block; color: var(--dim); font-size: 11.5px; margin-top: 2px; line-height: 1.3; }
.map em { color: var(--dim); font-style: normal; font-size: 11px; }
.nat-detail { animation: fadeup .3s var(--ease); }
.trait { margin-top: 10px; padding: 9px 11px; background: #0006; border-left: 3px solid var(--brass); font-size: 12.5px; line-height: 1.45; color: #cfd8d2; }
.roster { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.roster span { font-size: 11px; background: #ffffff0d; border: 1px solid var(--line); padding: 2px 7px; border-radius: 10px; color: #b9c6be; }
.roster span.uniq { border-color: var(--brass); color: var(--brass2); }
.colors { display: flex; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 4px; border: 2px solid #0008; cursor: pointer; transition: transform .12s, box-shadow .15s, border-color .15s; }
.swatch:hover:not(:disabled) { transform: translateY(-2px) scale(1.06); }
.swatch.on { border-color: #fff; box-shadow: 0 0 12px #fff8; }
.map-hero { display: grid; grid-template-columns: 168px 1fr; gap: 14px; margin-bottom: 10px; animation: fadeup .3s var(--ease); }
.map-hero img { width: 168px; height: 168px; border-radius: 5px; border: 1px solid var(--line2); box-shadow: 0 8px 24px #0009; display: block; }
.map-hero b { display: block; font-size: 17px; letter-spacing: .06em; }
.map-hero em { font-style: normal; font-size: 11px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.map-hero p { margin: 7px 0 10px; font-size: 12.5px; line-height: 1.45; color: #cfd8d2; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11px; color: var(--dim); }
.legend li::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: -1px; background: var(--c); border: 1px solid #000a; }
.legend .l0::before { border-radius: 50%; background: #0a0e0c; border: 2px solid #f4d77a; }
.legend .l1 { --c: #7dff8a; } .legend .l2 { --c: #ffd24a; } .legend .l3 { --c: #ff9a3c; }
.map-list { display: grid; gap: 8px; }
.map-list.grid2 { grid-template-columns: 1fr 1fr; }
.map-thumb { width: 44px; height: 44px; border-radius: 3px; flex: none; border: 1px solid #0009; display: block; }
.rules { display: flex; gap: 12px 26px; align-items: center; flex-wrap: wrap; }
.opp { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 8px; padding: 7px 8px; background: #ffffff06; border: 1px solid var(--line); border-radius: 5px; animation: fadeup .25s var(--ease); }
.opp select { flex: 1; min-width: 0; }
.opp .dot.big { margin: 0; flex: none; border: 1px solid #000a; }
.warn { color: var(--bad); font-size: 12px; margin: 8px 0; }
.btn.start { padding: 14px 44px; font-size: 16px; flex: none; }

/* ---------- HUD: top ---------- */
.hud-top { position: absolute; top: 0; left: 0; right: 0; height: 42px; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; background: linear-gradient(#141c19f2, #0e1412e6); border-bottom: 1px solid var(--line2); box-shadow: 0 2px 12px #0008; z-index: 5; }
.tb { display: flex; align-items: center; gap: 14px; }
.tb.mid { gap: 6px; }
.rank b { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass2); }
.xp { width: 130px; height: 5px; background: #000a; border: 1px solid var(--line); margin-top: 2px; }
.xp i { display: block; height: 100%; background: linear-gradient(90deg, #a8842c, #f4d77a); }
.fps { color: var(--dim); font-size: 11px; margin-right: 10px; font-variant-numeric: tabular-nums; }
.clock { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; margin-right: 8px; color: #c9d6ce; }
.cash { font-size: 21px; font-weight: 700; color: #8dff7a; font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; text-shadow: 0 0 10px #4fe06a55; }
.power { font-size: 13px; color: #ffe27a; font-variant-numeric: tabular-nums; }
.power.low { color: var(--bad); animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: .45; } }
.pbar { width: 110px; height: 5px; background: #2a6a3a; border: 1px solid var(--line); margin-top: 2px; }
.pbar i { display: block; height: 100%; background: #e2b83a; }
.power.low .pbar i { background: var(--bad); }

/* ---------- HUD: messages, timers, powers ---------- */
.msgs { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 4; pointer-events: none; }
.msg { background: #0b100ecc; border-left: 3px solid var(--line2); padding: 4px 14px; font-size: 13px; letter-spacing: .03em; border-radius: 2px; animation: msgin .25s; }
.msg.link { pointer-events: auto; cursor: pointer; }
.msg.k1 { border-color: var(--good); color: #c8ffd0; }
.msg.k2 { border-color: #f0c030; color: #ffe9a0; }
.msg.k3 { border-color: var(--bad); color: #ffc2ba; font-weight: 600; }
.msg.k4 { border-color: #6ee1ff; color: #d6f6ff; max-width: 60vw; white-space: normal; overflow-wrap: anywhere; }
/* messages between players: a panel in the lobby, a pop-up bar in battle */
.chat { margin-top: 10px; border-top: 1px solid var(--line2); padding-top: 8px; }
.chat h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.chat-log { display: flex; flex-direction: column; gap: 3px; font-size: 13px; max-height: 150px; overflow-y: auto; overflow-wrap: anywhere; }
.chat-log b { color: #6ee1ff; font-weight: 600; }
.chat-log .dim { opacity: .6; }
.chat-row { display: flex; gap: 6px; margin-top: 6px; }
.chat-row input { flex: 1; min-width: 0; background: #0b100e; border: 1px solid var(--line2); color: inherit; padding: 5px 8px; border-radius: 3px; font: inherit; font-size: 13px; }
.chat-row input:focus { outline: none; border-color: #6ee1ff; }
.chatbar { position: absolute; left: 12px; bottom: 306px; z-index: 5; width: min(420px, 42vw); }
.chatbar .chat-log { background: #0b100edd; border: 1px solid var(--line2); border-radius: 3px; padding: 6px 8px; }
.chatbar .chat-log:empty { display: none; }
.chatbar kbd { font-size: 10px; opacity: .7; margin-left: 4px; }
@keyframes msgin { from { opacity: 0; transform: translateY(-6px); } }
.supers { position: absolute; top: 52px; right: 12px; display: flex; flex-direction: column; gap: 5px; z-index: 4; }
.super { background: #0b100edd; border-left: 4px solid; padding: 4px 10px; font-size: 12px; display: flex; gap: 12px; justify-content: space-between; min-width: 250px; }
.super b { font-variant-numeric: tabular-nums; color: #ffe27a; }
.super.ready b { color: var(--bad); animation: blink .6s infinite; }
.powerstrip { position: absolute; left: 10px; top: 54px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.pwr { position: relative; width: 150px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: #121917e6; border: 1px solid var(--line2); border-radius: 3px; cursor: pointer; overflow: hidden; text-align: left; }
.pwr .glyph { font-size: 20px; width: 24px; text-align: center; color: var(--dim); }
.pwr .pn { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.15; color: var(--dim); }
.pwr.ready { border-color: var(--brass); }
.pwr.ready .glyph, .pwr.ready .pn { color: var(--brass2); }
.pwr.ready:hover { filter: brightness(1.3); }
.pwr.on { box-shadow: 0 0 0 2px var(--bad); }
.pwr.super.ready { border-color: var(--bad); animation: pulse 1s infinite; }
.pwr .cd { position: absolute; left: 0; right: 0; bottom: 0; background: #000a; }
.pwr > b { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 12px; font-variant-numeric: tabular-nums; }
.modehint { position: absolute; bottom: 306px; left: 50%; transform: translateX(-50%); background: #0b100edd; border: 1px solid var(--brass); padding: 6px 16px; font-size: 13px; border-radius: 3px; z-index: 4; pointer-events: none; }
.paused { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 54px; font-weight: 800; letter-spacing: .4em; color: #fff9; text-shadow: 0 4px 30px #000; pointer-events: none; }

/* ---------- HUD: bottom ---------- */
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 252px; display: flex; gap: 10px; padding: 10px 12px; background: linear-gradient(#141c19f5, #0c1210f8); border-top: 1px solid var(--line2); box-shadow: 0 -4px 18px #0009; z-index: 5; }
.mm { display: flex; flex: none; }
.mm canvas { width: 232px; height: 232px; border: 1px solid var(--line2); background: #000; cursor: pointer; box-shadow: inset 0 0 20px #000; }
.mm-btns { display: flex; flex-direction: column; gap: 6px; }
.mm-btns button { width: 30px; height: 30px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 3px; font-size: 15px; cursor: pointer; }
.mm-btns button:hover { border-color: var(--brass); filter: brightness(1.3); }
.selpanel { flex: 1; min-width: 0; background: #0a0f0dcc; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; overflow: hidden; }
.hint { display: flex; flex-direction: column; gap: 8px; color: var(--dim); font-size: 12.5px; line-height: 1.5; max-width: 620px; }
.hint b { color: var(--text); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.single { display: flex; gap: 14px; height: 100%; }
.portrait { width: 112px; height: 112px; border: 2px solid; border-radius: 3px; image-rendering: auto; flex: none; background: #1c2623; }
.info { flex: 1; min-width: 0; }
.nm { font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.vet { font-size: 11px; color: #1a1408; background: var(--brass); padding: 1px 7px; border-radius: 9px; margin-left: 8px; vertical-align: middle; text-transform: uppercase; letter-spacing: .08em; }
.own { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 1px 0 6px; font-weight: 600; }
.hpbar { position: relative; width: min(320px, 100%); height: 16px; background: #000a; border: 1px solid var(--line2); }
.hpbar i, .mi i { display: block; height: 100%; }
.g { background: linear-gradient(#5cf06a, #2ea83c); } .y { background: linear-gradient(#ffd84a, #c89a1a); } .r { background: linear-gradient(#ff6a52, #c2301c); }
.hpbar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 15px; font-weight: 600; text-shadow: 0 1px 2px #000; }
.st { margin-top: 6px; font-size: 13px; color: #cfd8d2; }
.st.dim { color: var(--dim); font-size: 12px; line-height: 1.4; }
.queue { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; width: 200px; flex: none; }
.q { position: relative; width: 44px; height: 44px; padding: 0; background: var(--panel2); border: 1px solid var(--line2); cursor: pointer; overflow: hidden; }
.q img { width: 100%; height: 100%; display: block; }
.q .up { font-size: 22px; color: var(--brass2); }
.q i { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--info); }
button.q:hover { border-color: var(--bad); }
.mcount { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.mgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.mi { position: relative; width: 58px; height: 62px; padding: 0; background: var(--panel2); border: 1px solid var(--line2); cursor: pointer; overflow: hidden; }
.mi img { width: 56px; height: 56px; display: block; }
.mi b { position: absolute; right: 3px; top: 1px; font-size: 13px; text-shadow: 0 1px 3px #000, 0 0 4px #000; }
.mi i { position: absolute; left: 0; bottom: 0; height: 4px; }
.mi:hover { border-color: var(--brass); }
.card { flex: none; width: 520px; display: grid; grid-template-columns: repeat(7, 68px); grid-auto-rows: 72px; gap: 6px; align-content: start; }
.cb { position: relative; padding: 0; background: linear-gradient(#222d29, #161d1b); border: 1px solid var(--line2); border-radius: 3px; cursor: pointer; overflow: hidden; transition: filter .1s, border-color .1s; }
.cb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cb:hover { border-color: var(--brass2); filter: brightness(1.25); }
.cb:active { transform: translateY(1px); }
.cb.on { box-shadow: inset 0 0 0 2px var(--brass2); }
.cb.off { filter: grayscale(1) brightness(.5); cursor: not-allowed; }
.cb.poor .cost { color: var(--bad); }
.cb kbd { position: absolute; left: 3px; top: 3px; }
.cb .cost { position: absolute; left: 0; right: 0; bottom: 0; background: #000b; font-size: 11px; font-weight: 700; color: #8dff7a; padding: 1px 0; text-align: center; }
.cb .cnt { position: absolute; right: 3px; top: 2px; background: var(--info); color: #06202c; font-weight: 800; font-size: 11px; border-radius: 9px; min-width: 17px; height: 17px; line-height: 17px; }
.cb .gl { font-size: 26px; display: block; margin-top: -8px; color: var(--brass2); }
.cb .lbl { position: absolute; left: 2px; right: 2px; bottom: 3px; font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); line-height: 1.1; }
.cb .prog { position: absolute; left: 0; bottom: 0; height: 100%; background: #5fd0ff40; border-right: 2px solid var(--info); pointer-events: none; }
.tip { position: absolute; right: 12px; bottom: 258px; width: 440px; background: #0b100ef5; border: 1px solid var(--brass); border-radius: 4px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 30px #000a; pointer-events: none; }
.th { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.th b { font-size: 15px; letter-spacing: .04em; flex: 1; }
.th .cost { color: #8dff7a; font-weight: 700; }
.ts { color: var(--brass2); font-size: 11.5px; margin-bottom: 4px; }
.tl { color: #cfd8d2; }

/* ---------- dialogs: they rise in, and sink out while the "closing" class is on ---------- */
.modal-back { position: absolute; inset: 0; background: #020403b3; display: flex; align-items: center; justify-content: center; z-index: 20; backdrop-filter: blur(4px); animation: fadein .2s ease-out; transition: opacity .17s ease-in; }
.modal-back.top { z-index: 30; }
.modal-back.closing { opacity: 0; pointer-events: none; }
.modal-back.closing > .modal { transform: translateY(10px) scale(.975); }
.modal { position: relative; background: linear-gradient(#141c19, #0e1412); border: 1px solid var(--line2); border-radius: 8px; padding: 22px 26px; box-shadow: 0 24px 90px #000d, inset 0 1px 0 #ffffff0f; max-width: 94vw; max-height: 92vh; overflow: auto; animation: modalin .26s var(--ease); transition: transform .17s ease-in; }
@keyframes modalin { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal h2 { color: var(--brass); font-size: 20px; margin-bottom: 8px; }
.psub { color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.psub b { color: var(--brass2); }
.row { display: flex; gap: 10px; justify-content: center; }

/* pause menu */
.modal.pause { display: flex; flex-direction: column; gap: 9px; width: 390px; }
.pause-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pause-head h2 { margin: 0; }
.pause-head .psub { margin: 3px 0 0; font-size: 12px; }
.modal.pause > .btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 12px 16px; animation: fadeup .3s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 38ms + .06s); }
.modal.pause > .btn kbd { font-size: 10.5px; padding: 1px 6px; }
.modal.pause > .btn.primary kbd { background: #1a140833; border-color: #1a140855; color: #1a1408; }
.confirm { padding: 4px 2px 2px; animation: fadeup .22s var(--ease); }
.confirm b { display: block; font-size: 16px; letter-spacing: .03em; margin-bottom: 6px; }
.confirm p { margin: 0 0 18px; color: var(--dim); font-size: 13px; line-height: 1.5; }
.confirm .row .btn { flex: 1; padding: 11px 10px; }

/* settings */
.modal.settings { width: 660px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px 24px; }
.set-head h2 { margin: 0; }
.set-tabs { display: flex; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.set-tabs button { position: relative; background: none; border: 0; padding: 10px 14px 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); cursor: pointer; transition: color .15s; }
.set-tabs button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brass2); box-shadow: 0 0 10px var(--brass); transform: scaleX(0); transition: transform .25s var(--ease); }
.set-tabs button:hover { color: #fff; }
.set-tabs button.on { color: var(--brass2); }
.set-tabs button.on::after { transform: scaleX(1); }
.set-body { padding: 6px 24px 10px; height: 304px; overflow-y: auto; animation: fadeup .25s var(--ease); }
.set-row { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: center; padding: 13px 0; border-bottom: 1px solid #ffffff0a; }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 14px; letter-spacing: .03em; }
.set-row small { display: block; color: var(--dim); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.set-ctl { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.set-ctl input[type=range] { flex: 1; min-width: 0; }
.set-ctl output { width: 46px; text-align: right; font-size: 13px; font-weight: 600; color: var(--brass2); font-variant-numeric: tabular-nums; }
.set-foot { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-top: 1px solid var(--line); background: #0a0f0dd9; flex: none; }
.set-foot .saved { flex: 1; font-size: 11.5px; color: var(--dim); }

/* commander powers */
.pgrid { display: grid; grid-template-columns: repeat(4, 210px); gap: 10px; margin-bottom: 16px; }
.pc { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 10px 12px; background: linear-gradient(#1b2522, #151d1a); border: 1px solid var(--line); border-radius: 5px; cursor: default; min-height: 150px; transition: transform .12s, box-shadow .2s, border-color .15s; }
.pc .glyph { font-size: 26px; color: var(--dim); }
.pc b { font-size: 14px; letter-spacing: .05em; }
.pc small { color: var(--dim); font-size: 11.5px; line-height: 1.35; flex: 1; }
.pc em { font-style: normal; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pc.can { border-color: var(--brass); cursor: pointer; animation: pulse 1.4s infinite; }
.pc.can:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #0008; }
.pc.can em, .pc.can .glyph { color: var(--brass2); }
.pc.has { border-color: var(--good); background: #1a2a1e; }
.pc.has em, .pc.has .glyph { color: var(--good); }
.pc.locked { opacity: .55; }

/* victory and defeat */
.modal.over { text-align: center; min-width: min(760px, 94vw); }
.modal.over h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: .3em; margin: 4px 0; animation: verdict 1.1s var(--ease) backwards; }
@keyframes verdict { from { opacity: 0; letter-spacing: .75em; filter: blur(9px); } }
.win { color: var(--brass2); text-shadow: 0 0 40px #d7b24c88; } .lose { color: var(--bad); text-shadow: 0 0 40px #ff5a4888; }
.modal table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 13px; }
.modal th { color: var(--dim); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
.modal td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.modal td:first-child { text-align: left; font-weight: 600; }
.modal th:first-child { text-align: left; }
.modal tr.dead td { color: var(--dim); text-decoration: line-through; }
.modal.over tr { animation: fadeup .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 80ms + .4s); }
.modal.over tr.won td { background: #d7b24c12; }
.modal.over .row { animation: fadeup .4s var(--ease) .8s backwards; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }

/* how to play */
.modal.help { width: 980px; }
.help-cols { display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; margin-bottom: 16px; }
.help h4 { color: var(--brass2); font-size: 12px; margin: 12px 0 5px; }
.help p, .help li { color: #cfd8d2; font-size: 13px; line-height: 1.55; margin: 0; }
.help ul { margin: 0; padding-left: 18px; }
.help li { margin-bottom: 4px; }
.help li::marker { color: var(--brass); }

/* curtain drawn across the screen while a battle is set up or torn down */
.curtain { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: radial-gradient(900px 600px at 50% 45%, #131b18, #050807 80%); animation: fadein .3s ease-out; transition: opacity .5s ease-in; }
.curtain.out { opacity: 0; pointer-events: none; }
.curtain .emblem { width: 86px; height: 86px; margin-bottom: 12px; }
.curtain .emblem .e-dash { animation-duration: 7s; }
.curtain h2 { font-size: clamp(26px, 3.4vw, 44px); letter-spacing: .2em; color: #f2f5f3; animation: rise .5s var(--ease) .05s backwards; }
.cur-sub { color: var(--dim); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; min-height: 17px; animation: rise .5s var(--ease) .12s backwards; }
.cur-bar { position: relative; width: 260px; height: 2px; margin-top: 14px; background: #2e3d37; overflow: hidden; }
.cur-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--brass2), transparent); animation: slide 1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

#blazor-error-ui { background: #5a1a12; color: #fff; bottom: 0; display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; background: radial-gradient(900px 600px at 50% 45%, #131b18, #070a09 80%); color: #d7b24c; letter-spacing: .5em; font-weight: 700; font-size: 22px; }
.boot .emblem { width: 84px; height: 84px; margin: 0 0 6px; }
.boot small { color: #8fa097; font-size: 11px; letter-spacing: .3em; font-weight: 400; animation: breathe 1.6s infinite; }
.boot .bar { width: 260px; height: 3px; background: #2e3d37; overflow: hidden; border-radius: 2px; }
.boot .bar::after { content: ""; display: block; height: 100%; width: calc(var(--blazor-load-percentage, 0%)); background: linear-gradient(90deg, #a8842c, #f4d77a); box-shadow: 0 0 10px #d7b24c; transition: width .2s; }

@media (max-width: 1400px) {
    .card { width: 372px; grid-template-columns: repeat(7, 48px); grid-auto-rows: 52px; }
    .cb .gl { font-size: 20px; } .cb .lbl { display: none; } .cb .cost { font-size: 9.5px; }
    .setup-grid { grid-template-columns: 1fr 1fr; }
    .pgrid { grid-template-columns: repeat(3, 210px); }
}

/* ---------- intro cinematic ---------- */
.intro { position: absolute; inset: 0; z-index: 8; cursor: pointer; }
.intro::after { content: ""; position: absolute; inset: 0; background: #000; pointer-events: none; animation: blackout 1.6s ease-out forwards; }
@keyframes blackout { to { opacity: 0; } }
.intro .bar { position: absolute; left: 0; right: 0; height: 11vh; background: #000; z-index: 1; animation: barin .9s var(--ease) backwards; }
.intro .bar.top { top: 0; --from: -100%; } .intro .bar.bottom { bottom: 0; --from: 100%; }
@keyframes barin { from { transform: translateY(var(--from)); } }
.intro .cap { position: absolute; left: 0; right: 0; bottom: 17vh; text-align: center; font-size: clamp(20px, 2.6vw, 38px); font-weight: 300; letter-spacing: .14em; color: #f2f5f3; text-shadow: 0 2px 22px #000, 0 0 4px #000; line-height: 1.45; }
.intro .cap.small { font-size: clamp(13px, 1.2vw, 18px); letter-spacing: .4em; text-transform: uppercase; color: var(--brass2); }
.intro .cap.title { bottom: 38vh; font-size: clamp(48px, 9vw, 130px); font-weight: 800; letter-spacing: .14em; line-height: 1.05; }
.intro .cap.title span { color: var(--brass); }
.intro .cap.title small { display: block; font-size: 13px; letter-spacing: .5em; color: var(--brass); font-weight: 600; margin-bottom: 12px; }
.intro .skip { position: absolute; right: 26px; bottom: 3.6vh; z-index: 2; color: #9aa59f; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; animation: fadein 1s ease-out 1.2s backwards; }

/* ---------- multiplayer lobby ---------- */
.setup.multi { width: min(1120px, 96vw); }
.setup.multi > .mp-connect, .setup.multi > .lobby { padding: 18px 24px; overflow-y: auto; min-height: 0; animation: fadeup .3s var(--ease); }
.mp-connect { display: grid; gap: 14px; max-width: 620px; }
.mp-connect label { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
input.wide { flex: 1; } input.code { width: 96px; text-align: center; letter-spacing: .3em; text-transform: uppercase; font-weight: 700; }
.mp-row { display: flex; align-items: center; gap: 12px; }
.mp-connect label .roll { letter-spacing: .06em; white-space: nowrap; }
/* connecting: this computer, the server, and signals travelling between them while the link is being made */
.linking { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 14px 18px; border: 1px solid var(--line2); border-radius: 6px; background: linear-gradient(90deg, #17231f, #0f1513); animation: fadeup .25s var(--ease); --link: var(--brass2); }
.linking.rerouting { --link: var(--info); }
.linking.linked { --link: var(--good); }
.link-art { display: flex; align-items: center; gap: 10px; }
.link-art .node { position: relative; display: grid; justify-items: center; gap: 3px; color: var(--text); }
.link-art svg { width: 36px; height: 36px; display: block; }
.link-art em { font-style: normal; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.link-art .srv { color: var(--link); transition: color .3s; }
.link-art .srv::before { content: ""; position: absolute; left: 50%; top: 18px; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid var(--link); border-radius: 50%; animation: linkping 1.5s ease-out infinite; pointer-events: none; }
.linking.linked .srv::before { animation-duration: .8s; }
.link-art .wire { position: relative; width: 104px; height: 2px; margin-bottom: 15px; background: repeating-linear-gradient(90deg, #ffffff38 0 6px, transparent 6px 12px); }
.linking.linked .wire { background: var(--good); box-shadow: 0 0 8px #4fe06a80; }
.link-art .wire i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--link); box-shadow: 0 0 10px var(--link); opacity: 0; animation: linkdot 1.6s linear infinite; }
.link-art .wire i:nth-child(2) { animation-delay: .4s; }
.link-art .wire i:nth-child(3) { animation-delay: .8s; }
.link-art .wire i:nth-child(4) { animation-delay: 1.2s; }
.linking.linked .wire i { animation-duration: .7s; }
@keyframes linkdot { 0% { transform: translateX(0); opacity: 0; } 12%, 88% { opacity: 1; } 100% { transform: translateX(96px); opacity: 0; } }
@keyframes linkping { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes linkbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }
.link-text { display: grid; gap: 4px; min-width: 0; }
.link-text b { font-size: 14.5px; letter-spacing: .03em; color: #fff; }
.link-text span { font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.link-bar { height: 3px; margin-top: 5px; border-radius: 2px; background: #ffffff14; overflow: hidden; }
.link-bar i { display: block; width: 35%; height: 100%; background: linear-gradient(90deg, transparent, var(--link), transparent); animation: linkbar 1.3s ease-in-out infinite; }
@media (max-width: 620px) { .linking { grid-template-columns: 1fr; justify-items: start; } }
/* a commander name is required: the empty box carries a hint, and is pointed at when Host or Join is pressed without one */
.mp-connect label input::placeholder { color: #ffffff59; font-style: italic; letter-spacing: .02em; text-transform: none; }
.mp-connect label.need input { border-color: #ffcf5a; box-shadow: 0 0 0 3px #ffcf5a33, 0 0 18px #ffcf5a66; }
.name-hint { margin-top: -6px; }
.name-hint.nudge { color: #ffe09a; }
.name-hint b { color: #fff; font-weight: 600; white-space: nowrap; }
/* the host has called for the start: whoever is not ready gets a banner and a Ready button that flash until they press it */
@keyframes callpulse { 0%, 100% { box-shadow: 0 0 0 0 #ffcf5a00; filter: brightness(1); transform: scale(1); } 50% { box-shadow: 0 0 0 9px #ffcf5a40, 0 0 30px #ffcf5acc; filter: brightness(1.4); transform: scale(1.03); } }
@keyframes callflash { 0%, 100% { background: #ffcf5a14; border-color: #ffcf5a66; } 50% { background: #ffcf5a40; border-color: #ffcf5a; } }
.btn.called, .setup.multi .btn.start.ready-big.called, .setup.multi .btn.ready-cell.called { animation: callpulse .85s ease-in-out infinite; position: relative; z-index: 1; }
.start-call { display: grid; gap: 3px; padding: 11px 14px; border: 1px solid #ffcf5a66; border-radius: 5px; animation: callflash .85s ease-in-out infinite; }
.start-call b { color: #ffe09a; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.start-call span { color: #fff; font-size: 13px; }
.btn.start.calling { animation: callflash 1.6s ease-in-out infinite; }
.call-note .btn { margin-left: 8px; }
@media (prefers-reduced-motion: reduce) { .btn.called, .start-call, .btn.start.calling { animation-duration: 2.4s; } }
.or { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .2em; }
.note { color: var(--dim); font-size: 12.5px; line-height: 1.5; }
code { background: #0008; border: 1px solid var(--line); padding: 1px 6px; border-radius: 3px; font-size: 12px; color: var(--brass2); }
.lobby { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; overflow-x: hidden; }
.lobby-left { min-width: 0; overflow-x: auto; }
.roomcode { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.roomcode b { font-size: 30px; letter-spacing: .3em; color: var(--brass2); margin-left: 12px; user-select: text; -webkit-user-select: text; }
table.players { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13px; }
table.players th { text-align: left; color: var(--dim); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; border-bottom: 1px solid var(--line2); }
table.players td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.players tr.mine td { background: #2c332333; }
.tag { font-size: 9.5px; letter-spacing: .12em; background: var(--brass); color: #1a1408; padding: 1px 6px; border-radius: 8px; margin-left: 6px; font-weight: 700; }
.tag.ai { background: #5a6a78; color: #fff; }
.colors.mini { gap: 4px; flex-wrap: wrap; width: 96px; } .colors.mini .swatch { width: 20px; height: 20px; border-width: 1px; } .swatch.taken { opacity: .2; cursor: not-allowed; }
.dot.big { width: 18px; height: 18px; }
.rdy { color: var(--good); } .nrdy { color: var(--dim); }
.map-list.compact .map { padding: 6px 8px; } .map-list.compact .map-thumb { width: 36px; height: 36px; }
.map.static { cursor: default; margin-bottom: 10px; } .map.static:hover { transform: none; box-shadow: inset 0 0 0 1px var(--brass), 0 0 18px #d7b24c26; } .map.static::after { content: none; }
.lobby-right .rules { margin: 12px 0; } .lobby-right .btn.start { width: 100%; margin-top: 16px; }

/* ---------- HUD additions ---------- */
.adj { display: flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.adj select { padding: 3px 24px 3px 7px; font-size: 12px; }
.net { font-size: 11px; letter-spacing: .1em; color: var(--good); border: 1px solid #2c5a38; padding: 2px 8px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.net.warn { color: #ffd84a; border-color: #6a5a20; } .net.bad { color: var(--bad); border-color: #7a2a20; animation: blink .8s infinite; }
.pwr.sat { border-color: #3a6a8a; } .pwr.sat.ready .glyph, .pwr.sat.ready .pn { color: #8fdcff; }
.card { grid-auto-rows: 68px; }

/* player count and invitations */
.online { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--dim); }
.online b { color: var(--brass2); font-size: 15px; }
.online .pip { width: 9px; height: 9px; border-radius: 50%; background: #38c04a; box-shadow: 0 0 8px #38c04a; flex: none; }
.online.full .pip { background: #e8402a; box-shadow: 0 0 8px #e8402a; }
.online.wait .pip { background: #e2b83a; box-shadow: 0 0 8px #e2b83a; animation: breathe 1s infinite; }
.online.inline { display: inline-flex; margin-left: 22px; font-size: 11px; letter-spacing: .08em; vertical-align: middle; }
.splash.sting .begin { opacity: 0; transition: opacity .25s; }
.splash.sting .splash-foot { animation: stingGlow 6s ease-out both; transform-origin: 50% 100%; }
@keyframes stingGlow { 0% { transform: scale(1); filter: brightness(1); } 22% { transform: scale(1.32); filter: brightness(1.7) drop-shadow(0 0 18px #d7b24c); } 70% { transform: scale(1.26); filter: brightness(1.35) drop-shadow(0 0 10px #d7b24c88); } 100% { transform: scale(1.2); filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .splash.sting .splash-foot { animation: none; } }
.spectate { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 6; display: flex; gap: 10px; align-items: baseline; padding: 8px 14px; max-width: min(92vw, 640px); background: #1a0f0ee0; border: 1px solid #a8483a; border-radius: 6px; color: #f0e2dc; font-size: 13px; pointer-events: none; }
.spectate b { color: #ff8a70; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.qbar .tv.grp { min-width: 40px; justify-content: center; font-weight: 700; }
.qbar .tv.grp i { font-size: 13px; color: #e8efe9; }
.lobby-brief { margin: 10px 0 6px; font-size: 12px; }
.lobby-brief .trait { padding: 6px 10px; } .lobby-brief .swot { gap: 8px; margin: 6px 0; } .lobby-brief .swot h4 { margin: 0 0 3px; font-size: 10.5px; } .lobby-brief .swot li { line-height: 1.35; }
/* on a laptop the lobby is taller than the window: each column scrolls by itself, so nothing is out of reach without full screen */
@media (min-height: 561px) { .lobby { max-height: calc(100vh - 190px); } .lobby-left, .lobby-right { overflow-y: auto; padding-right: 6px; scrollbar-width: thin; } }
/* a tablet held upright, or a narrow window: the top bar drops what it can spare so that Menu stays on screen */
@media (max-width: 900px) and (min-height: 561px) {
    .hud-top .rank, .hud-top .tb.mid .btn.tiny:not(:last-of-type) { display: none; }
    .hud-top { gap: 4px; } .hud-top .tb { gap: 5px; min-width: 0; }
    .hud-top .adj { max-width: 96px; }
}
.build-tag { margin-top: 8px; font: 11px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .04em; color: #8fa097; opacity: .85; user-select: text; }
.build-tag.in-modal { margin: 0 0 10px; text-align: center; }
.build-tag.on-splash { text-align: center; margin-top: 10px; }
.invite { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.invite.mail { margin-top: -6px; } .invite.mail a.btn { text-decoration: none; white-space: nowrap; }
.invite input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; padding: 7px 10px; color: var(--ink, #e8e4d8); background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); border-radius: 3px; user-select: text; -webkit-user-select: text; }

/* ================= Field manual ================= */
.manual-link { margin-top: 10px; }
.fm-back { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 800px at 50% 0%, #1c2a24cc, #050807ee); backdrop-filter: blur(5px); animation: fmfade .18s ease-out; }
@keyframes fmfade { from { opacity: 0; } }
.fm { --nc: var(--brass); width: min(1560px, 97vw); height: min(980px, 95vh); display: flex; flex-direction: column; background: linear-gradient(#141c19, #0d1311); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 30px 120px #000d, inset 0 1px 0 #ffffff0d; overflow: hidden; animation: fmrise .22s ease-out; }
@keyframes fmrise { from { transform: translateY(14px) scale(.985); opacity: 0; } }
.fm-head { display: flex; align-items: center; gap: 18px; padding: 14px 20px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #1a2420, #121917 60%); }
.fm-title { display: flex; flex-direction: column; line-height: 1.1; }
.fm-kicker { color: var(--brass); font-size: 10.5px; letter-spacing: .42em; text-transform: uppercase; font-weight: 600; }
.fm-title h2 { font-size: 24px; letter-spacing: .16em; color: #f2f5f3; }
.fm-search { flex: 1; max-width: 520px; margin-left: auto; display: flex; align-items: center; gap: 8px; background: #080c0b; border: 1px solid var(--line2); border-radius: 20px; padding: 0 14px; height: 36px; transition: border-color .15s, box-shadow .15s; }
.fm-search:focus-within { border-color: var(--brass); box-shadow: 0 0 0 3px #d7b24c22; }
.fm-search span { color: var(--dim); font-size: 17px; }
.fm-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 13.5px; user-select: text; -webkit-user-select: text; }
.fm-search button { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 13px; }

.fm-nations { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-bottom: 1px solid var(--line); background: #0c1110; }
.fm-nat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: none; border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent; cursor: pointer; text-align: left; opacity: .62; transition: opacity .15s, background .15s; min-width: 0; }
.fm-nat:last-child { border-right: 0; }
.fm-nat:hover { opacity: .95; background: #ffffff07; }
.fm-nat.on { opacity: 1; border-bottom-color: var(--nc); background: linear-gradient(color-mix(in srgb, var(--nc) 16%, transparent), transparent); }
.fm-nat b { display: block; font-size: 13.5px; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-nat small { display: block; color: var(--dim); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-nat > div:last-child { min-width: 0; }

.fm-banner { display: flex; align-items: stretch; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, color-mix(in srgb, var(--nc) 20%, #101614), #101614 55%); }
.fm-bigflag { width: 92px; height: 58px; align-self: center; border-radius: 2px; }
.flag-cn.fm-bigflag::after { font-size: 26px; }
.fm-bn-main { flex: 1.1; min-width: 180px; align-self: center; }
.fm-bn-main h3 { font-size: 22px; letter-spacing: .12em; }
.fm-bn-main p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.45; color: #cdd7d1; }
.fm-bn-main p b { color: var(--nc); filter: brightness(1.25); }
.fm-bn-card { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; text-align: left; background: #0a0f0ecc; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; }
button.fm-bn-card { cursor: pointer; transition: border-color .15s, transform .1s; }
button.fm-bn-card:hover { border-color: var(--nc); transform: translateY(-1px); }
.fm-bn-card.ability { border-color: color-mix(in srgb, var(--nc) 60%, var(--line)); box-shadow: inset 0 0 22px color-mix(in srgb, var(--nc) 12%, transparent); }
.fm-bn-card img { width: 44px; height: 44px; border-radius: 4px; border: 1px solid var(--line2); flex: none; }
.fm-bn-card .g { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 22px; border-radius: 50%; background: color-mix(in srgb, var(--nc) 22%, #0b100e); border: 1px solid color-mix(in srgb, var(--nc) 55%, transparent); color: #fff; }
.fm-bn-card > div { min-width: 0; }
.fm-bn-card small { display: block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.fm-bn-card b { display: block; font-size: 13.5px; letter-spacing: .03em; color: #f2f5f3; }
.fm-bn-card em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: 11.5px; line-height: 1.35; color: #b9c6be; }
.fm-bn-card i { display: block; font-style: normal; font-size: 10.5px; color: var(--brass2); margin-top: 2px; }

.fm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; }
.fm-body.has-detail { grid-template-columns: 1fr minmax(340px, 400px); }
.fm-main { overflow-y: auto; padding: 14px 20px 22px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.fm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; position: sticky; top: -14px; z-index: 2; padding: 14px 0 10px; margin-top: -14px; background: linear-gradient(#111816 78%, transparent); }
.fm-tabs button { display: flex; align-items: center; gap: 7px; background: #0a0f0e; border: 1px solid var(--line); border-radius: 18px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #a9b8af; cursor: pointer; transition: all .13s; }
.fm-tabs button:hover { border-color: var(--line2); color: #fff; }
.fm-tabs button.on { background: linear-gradient(#d7b24c, #a8842c); border-color: #f4d77a; color: #1a1408; }
.fm-tabs span { font-size: 14px; }
.fm-tabs em { font-style: normal; font-size: 10.5px; background: #0005; border-radius: 9px; padding: 1px 6px; }
.fm-tabs button.on em { background: #1a140833; }
.fm-sec { font-size: 11.5px; color: var(--dim); letter-spacing: .14em; margin: 18px 0 9px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.fm-sec:first-of-type { margin-top: 2px; }
.fm-note, .fm-legend { font-size: 12px; color: var(--dim); margin: 2px 0 12px; }
.fm-legend { margin: 14px 0 0; text-align: center; }
.fm-empty { padding: 50px 20px; text-align: center; color: var(--dim); font-size: 14px; }

.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 10px; }
.fm-card { display: grid; grid-template-columns: 58px 1fr; gap: 6px 11px; align-content: start; text-align: left; background: linear-gradient(#18211e, #121a17); border: 1px solid var(--line); border-radius: 7px; padding: 11px; cursor: pointer; position: relative; transition: transform .1s, border-color .13s, box-shadow .13s; }
.fm-card:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: 0 8px 22px #0008; }
.fm-card.on { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 8px 26px #0009; }
.fm-card.uniq::before { content: "★"; position: absolute; top: 6px; right: 9px; color: var(--brass2); font-size: 13px; text-shadow: 0 0 8px #d7b24c88; }
.fm-card img { width: 58px; height: 58px; border-radius: 5px; border: 1px solid var(--line2); background: #0a0f0e; }
.fm-c-main { min-width: 0; }
.fm-c-main b { display: block; font-size: 13.5px; letter-spacing: .02em; color: #f2f5f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.fm-c-main small { display: block; font-size: 10.5px; color: var(--dim); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-c-cost { display: flex; align-items: baseline; gap: 8px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.fm-c-cost span { font-weight: 700; font-size: 13.5px; color: var(--good); }
.fm-c-cost span.free { color: #c9c9c0; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.fm-c-cost i { font-style: normal; font-size: 11px; color: var(--dim); }
.fm-c-cost i.pos, .fm-facts b.pos { color: var(--good); } .fm-c-cost i.neg, .fm-facts b.neg { color: #ffb14a; }
.fm-bars { grid-column: 1 / -1; display: grid; gap: 3px; margin-top: 2px; }
.fm-bars > div { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 7px; }
.fm-bars small { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.fm-bars span { height: 5px; background: #06090899; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px #ffffff0a; }
.fm-bars span i { display: block; height: 100%; border-radius: 3px; }
.fm-bars i.hp { background: linear-gradient(90deg, #2f9e48, #6fe085); } .fm-bars i.dps { background: linear-gradient(90deg, #b8402e, #ff8a5c); }
.fm-bars i.rng { background: linear-gradient(90deg, #2f7fb8, #7fd0ff); } .fm-bars i.spd { background: linear-gradient(90deg, #a8842c, #f4d77a); }
.fm-bars em { font-style: normal; font-size: 11px; text-align: right; color: #d5ded8; font-variant-numeric: tabular-nums; }
.fm-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.fm-chips span { flex: none; font-size: 10px; letter-spacing: .04em; padding: 2px 7px; border-radius: 9px; background: #ffffff0d; border: 1px solid var(--line); color: #c3cfc8; white-space: nowrap; }
.fm-chips .gold { border-color: #d7b24c99; color: var(--brass2); background: #d7b24c14; }
.fm-chips .good { border-color: #4fe06a66; color: #9ff0ae; } .fm-chips .bad { border-color: #ff5a4877; color: #ffb0a6; }
.fm-chips .info { border-color: #5fd0ff66; color: #a9e4ff; } .fm-chips .dark { border-color: #8a7cc866; color: #c9bff5; }

.fm-detail { position: relative; overflow-y: auto; padding: 16px 18px 22px; border-left: 1px solid var(--line); background: linear-gradient(color-mix(in srgb, var(--nc) 9%, #0f1513), #0d1311 240px); scrollbar-width: thin; scrollbar-color: var(--line2) transparent; animation: fmslide .16s ease-out; }
@keyframes fmslide { from { transform: translateX(16px); opacity: 0; } }
.fm-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--dim); font-size: 15px; cursor: pointer; }
.fm-x:hover { color: #fff; }
.fm-d-head { display: flex; gap: 14px; align-items: center; padding-right: 20px; }
.fm-d-head img { width: 86px; height: 86px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--nc) 60%, var(--line2)); box-shadow: 0 6px 22px #0009; flex: none; }
.fm-d-head small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.fm-d-head h3 { font-size: 19px; letter-spacing: .05em; text-transform: none; margin: 2px 0 6px; color: #f6f8f7; }
.fm-desc { margin: 12px 0; font-size: 13px; line-height: 1.5; color: #cdd7d1; }
.fm-voice { margin: 0 0 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #0e1513; }
.fm-voice small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8fa097; margin-bottom: 6px; }
.fm-voice div { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-voice button { font: inherit; font-size: 12.5px; padding: 6px 11px; border: 1px solid var(--line2); border-radius: 5px; background: #18211e; color: #e3ebe6; cursor: pointer; }
.fm-voice button:hover, .fm-voice button:focus-visible { border-color: var(--brass); outline: none; }
.fm-voice q { display: block; margin-top: 8px; font-size: 13.5px; font-style: italic; color: var(--brass2); }
.fm-say { position: absolute; left: 13px; top: 42px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; padding-left: 1px; box-sizing: border-box; background: #0a0f0ecc; border: 1px solid var(--line2); color: #e3ebe6; }
.fm-say:hover { border-color: var(--brass); color: var(--brass2); }
.fm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 6px; }
.fm-facts > div, .fm-wstats > div { background: #080c0bcc; border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; }
.fm-facts small, .fm-wstats small { display: block; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.fm-facts b, .fm-wstats b { font-size: 14.5px; font-variant-numeric: tabular-nums; color: #f2f5f3; }
.fm-where { margin-top: 9px; font-size: 12.5px; color: #c3cfc8; } .fm-where b { color: var(--brass2); font-weight: 600; }
.fm-weapon, .fm-abil, .fm-compare { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fm-detail h4 { font-size: 11px; letter-spacing: .14em; color: var(--brass); margin-bottom: 8px; }
.fm-weapon h4 span { color: var(--dim); letter-spacing: .06em; margin-left: 6px; text-transform: none; font-weight: 500; font-size: 12px; }
.fm-weapon p { margin: 0; font-size: 12.5px; color: #cdd7d1; }
.fm-wstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.fm-eff { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 7px; }
.fm-eff span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 5px; font-size: 9.5px; letter-spacing: .03em; color: #cfd8d2; border: 1px solid transparent; }
.fm-eff i { font-style: normal; font-size: 14px; opacity: .9; }
.fm-eff b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fm-eff .great, .fm-matrix .great { background: #4fe06a26; border-color: #4fe06a66; color: #b5f5c1; }
.fm-eff .good, .fm-matrix .good { background: #a9d94f1f; border-color: #a9d94f55; color: #dcefa8; }
.fm-eff .fair, .fm-matrix .fair { background: #d7b24c1c; border-color: #d7b24c4d; color: #f0dc9c; }
.fm-eff .poor, .fm-matrix .poor { background: #ff5a481c; border-color: #ff5a484d; color: #ffb8ae; }
.fm-eff .no, .fm-matrix .no { background: #ffffff06; border-color: var(--line); color: #5f6e66; }
.fm-abil ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.45; color: #cdd7d1; }
.fm-abil li::marker { color: var(--brass); }
.fm-compare button { width: 100%; display: grid; grid-template-columns: 36px 1fr auto auto auto; gap: 9px; align-items: center; text-align: left; background: none; border: 1px solid transparent; border-radius: 5px; padding: 4px 6px; cursor: pointer; font-size: 12px; }
.fm-compare button:hover { background: #ffffff09; border-color: var(--line); }
.fm-compare button.me { background: color-mix(in srgb, var(--nc) 14%, transparent); border-color: color-mix(in srgb, var(--nc) 50%, transparent); }
.fm-compare b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-compare span { color: #b9c6be; font-variant-numeric: tabular-nums; font-size: 11.5px; min-width: 46px; text-align: right; }

.fm-list { display: grid; gap: 7px; }
.fm-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; background: linear-gradient(#18211e, #121a17); border: 1px solid var(--line); border-radius: 7px; padding: 10px 14px; }
.fm-row .g { width: 42px; height: 42px; display: grid; place-items: center; font-size: 19px; border-radius: 50%; background: #0a0f0e; border: 1px solid var(--line2); color: var(--brass2); }
.fm-row b { font-size: 14px; color: #f2f5f3; } .fm-row small { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-left: 9px; }
.fm-row p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: #c3cfc8; }
.fm-row em { font-style: normal; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--brass2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fm-row em i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--dim); }
.fm-row.doctrine { border-color: color-mix(in srgb, var(--nc) 65%, var(--line)); box-shadow: inset 0 0 26px color-mix(in srgb, var(--nc) 10%, transparent); }
.fm-row.uniq { border-color: #d7b24c66; } .fm-row.super { border-color: #ff5a4866; } .fm-row.super .g { color: #ff8a7a; }

.fm-rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fm-rules article { background: linear-gradient(#18211e, #121a17); border: 1px solid var(--line); border-radius: 7px; padding: 13px 16px; }
.fm-rules article.wide { grid-column: 1 / -1; }
.fm-rules h4 { font-size: 12px; letter-spacing: .14em; color: var(--brass); margin-bottom: 6px; }
.fm-rules p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.55; color: #cdd7d1; }
.fm-rules table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.fm-rules th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--line2); }
.fm-rules td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.fm-rules .chev { color: var(--brass2); letter-spacing: -2px; margin-right: 4px; }
.fm-matrix td:not(:first-child), .fm-matrix th:not(:first-child) { text-align: center; }
.fm-matrix td:first-child { font-weight: 600; color: #e2e9e5; }
.fm-matrix td { border: 3px solid #121a17 !important; border-radius: 6px; }
.fm-ranks { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-ranks span { background: #080c0bcc; border: 1px solid var(--line); border-radius: 5px; padding: 6px 12px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.fm-ranks b { display: block; color: #f2f5f3; font-size: 12.5px; }

@media (max-width: 1180px) {
    .fm-banner .fm-bn-card:last-child { display: none; }
    .fm-nat small { display: none; }
    .fm-body.has-detail { grid-template-columns: 1fr minmax(320px, 360px); }
}
@media (max-width: 900px) {
    .fm-body.has-detail { grid-template-columns: 1fr; }
    .fm-body.has-detail .fm-main { display: none; }
    .fm-banner .fm-bn-card { display: none; }
    .fm-rules { grid-template-columns: 1fr; }
    .fm-nat b { font-size: 11.5px; }
}

/* ================= motion in the battle display ================= */
.hud-top { animation: hudtop .55s var(--ease) backwards; }
.hud-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, #d7b24c73, transparent); pointer-events: none; }
@keyframes hudtop { from { transform: translateY(-100%); opacity: 0; } }
.hud-bottom { animation: hudbot .6s var(--ease) .05s backwards; }
.hud-bottom::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #d7b24c73, transparent); pointer-events: none; }
@keyframes hudbot { from { transform: translateY(100%); opacity: 0; } }
.powerstrip { animation: fadein .6s ease-out .35s backwards; }
.pwr { transition: border-color .15s, filter .15s, transform .14s var(--ease), box-shadow .15s; animation: slidel .3s var(--ease) backwards; }
.pwr.ready:hover { transform: translateX(3px); }
@keyframes slidel { from { opacity: 0; transform: translateX(-14px); } }
.super { animation: slider .3s var(--ease) backwards; }
@keyframes slider { from { opacity: 0; transform: translateX(18px); } }
.tip { animation: fadeup .14s ease-out; }
.modehint { animation: hintin .22s var(--ease); }
@keyframes hintin { from { opacity: 0; transform: translate(-50%, 8px); } }
.paused { animation: pausein .35s var(--ease); }
@keyframes pausein { from { opacity: 0; letter-spacing: .8em; transform: translate(-50%, -50%) scale(1.08); } }
.mm-btns button { transition: border-color .15s, filter .15s, transform .08s; }
.mm-btns button:active { transform: translateY(1px); }
.cash { transition: color .2s; }
.chatbar .chat-log, .chatbar .chat-row { animation: fadeup .18s ease-out; }
.chat-row input:focus, .fm-search input:focus, .fm-search input:hover { box-shadow: none; }

/* ================= narrow windows ================= */
.tb, .fps, .clock, .adj, .cash { white-space: nowrap; }
@media (max-width: 1180px) {
    .hud-top { padding: 0 8px; }
    .tb { gap: 8px; }
    .xp { width: 84px; }
    .pbar { width: 72px; }
    .cash { min-width: 0; font-size: 18px; }
    .fps { margin-right: 4px; }
}
@media (max-width: 1060px) { .adj { font-size: 0; gap: 0; } }
@media (max-width: 1400px) {
    .map-hero { grid-template-columns: 132px 1fr; }
    .map-hero img { width: 132px; height: 132px; }
}
@media (max-width: 900px) {
    .setup-grid, .lobby { grid-template-columns: 1fr; }
    .screen.main { background: #050807d9; }
    .main-col { width: 100%; }
    .livechip { display: none; }
    .modal.settings { width: 94vw; }
    .set-row { grid-template-columns: 1fr; gap: 8px; }
    .set-ctl { justify-content: flex-start; }
    .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .help-cols { grid-template-columns: 1fr; }
    .setup-foot { flex-direction: column; align-items: stretch; }
}

/* people who ask their system for less motion get the same screens without the movement */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= developer credit ================= */
.devby { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 6px 8px 6px 0; background: none; border: 0; cursor: pointer; color: #7f9088; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; opacity: .85; transition: opacity .15s; animation: rise .7s var(--ease) .7s backwards; align-self: flex-start; }
.devby:hover { opacity: 1; }
.devby img { height: 26px; display: block; }
.flags-row { margin-bottom: 0; }
.main-col > .devby { margin-bottom: auto; }
.boot .devby-boot { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #7f9088; font-size: 10.5px; letter-spacing: .3em; font-weight: 400; }
.boot .devby-boot img { height: 28px; }
.boot .pct { color: #f4d77a; font-size: 12px; letter-spacing: .2em; font-weight: 600; min-height: 15px; }
.boot .pct::after { content: var(--blazor-load-percentage-text, ""); }
.boot .emblem .e-dash { animation-duration: 6s; }
.fs-corner { position: absolute; right: 22px; top: 18px; background: #060908cc; border: 1px solid #ffffff1a; border-radius: 18px; padding: 7px 14px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); cursor: pointer; backdrop-filter: blur(4px); transition: color .15s, border-color .15s; animation: rise .8s var(--ease) .9s backwards; }
.fs-corner:hover { color: #fff; border-color: var(--brass); }

/* ================= start positions on the map picture ================= */
.map-pick { position: relative; width: 168px; height: 168px; flex: none; }
.map-pick img { width: 100%; height: 100%; }
.spawn { --c: #f4d77a; position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid var(--c); background: #0a0e0ccc; color: var(--c); font-size: 11px; font-weight: 800; cursor: pointer; padding: 0; display: grid; place-items: center; transition: transform .14s var(--ease), box-shadow .15s, background .15s; }
.spawn:hover:not(:disabled) { transform: scale(1.22); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.spawn.me { background: var(--c); color: #fff; width: 34px; height: 34px; margin: -17px 0 0 -17px; font-size: 9.5px; letter-spacing: .04em; text-shadow: 0 1px 2px #000c; box-shadow: 0 0 0 3px #fff, 0 0 16px var(--c); animation: pop .3s var(--ease); }
.spawn.foe { background: var(--c); color: #fff; text-shadow: 0 1px 2px #000c; box-shadow: 0 0 0 2px #000a; }
.spawn:disabled { cursor: default; }
.spawn-note { margin-top: 9px; font-size: 11.5px; color: var(--brass2); line-height: 1.4; }
.lobby-pick { width: 100%; height: auto; aspect-ratio: 1; max-width: 230px; margin: 0 auto 10px; }
.lobby-pick img { border-radius: 5px; border: 1px solid var(--line2); box-shadow: 0 8px 24px #0009; display: block; }
.lobby-right .map-list.compact { max-height: 208px; overflow-y: auto; padding-right: 4px; }
.opp select { padding-right: 22px; }

/* ================= friends and party invitations ================= */
.mp-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; padding: 18px 24px; overflow-y: auto; min-height: 0; animation: fadeup .3s var(--ease); }
.friends { min-width: 0; }
.lobby-right .friends { margin-top: 16px; }
.fcode { display: flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 9px; min-height: 26px; }
.fcode b { font-size: 17px; letter-spacing: .16em; color: var(--brass2); user-select: text; -webkit-user-select: text; }
.fcode .dim { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.fadd { display: flex; gap: 8px; margin-bottom: 9px; }
.fadd input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; padding: 6px 10px; }
.fadd input::placeholder { text-transform: none; letter-spacing: 0; }
.friend { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin-bottom: 6px; background: #ffffff06; border: 1px solid var(--line); border-radius: 5px; opacity: .72; animation: fadeup .25s var(--ease); transition: opacity .2s, border-color .2s; }
.friend.on { opacity: 1; border-color: #2c5a38; }
.friend.req { border-color: var(--brass); background: #d7b24c12; }
.friend > div { flex: 1; min-width: 0; }
.friend b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend small { display: block; font-size: 11px; color: var(--dim); }
.friend .hint2 { flex: none; font-style: italic; }
.friend .pip { width: 9px; height: 9px; border-radius: 50%; background: #55625b; flex: none; }
.friend.on .pip { background: #38c04a; box-shadow: 0 0 8px #38c04a; }
.friend.req .pip { background: var(--brass2); box-shadow: 0 0 8px var(--brass); animation: breathe 1.2s infinite; }
.pinvs { position: absolute; right: 18px; top: 64px; z-index: 45; display: flex; flex-direction: column; gap: 8px; width: min(340px, 90vw); }
.pinv { background: linear-gradient(#182420, #101815); border: 1px solid var(--brass); border-radius: 8px; padding: 12px 14px; box-shadow: 0 14px 40px #000b, 0 0 22px #d7b24c26; font-size: 13.5px; line-height: 1.45; animation: pinvin .4s var(--ease); }
.pinv b { color: var(--brass2); }
.pinv .row { justify-content: flex-start; margin-top: 10px; }
@keyframes pinvin { from { opacity: 0; transform: translateX(30px); } }

/* ================= battle display additions ================= */
.qbar { position: absolute; left: 12px; bottom: 262px; z-index: 5; display: flex; gap: 5px; animation: hudbot .6s var(--ease) .15s backwards; }
.qbar button { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; background: linear-gradient(#222d29f2, #151c1af2); border: 1px solid var(--line2); border-radius: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #cfd8d2; cursor: pointer; box-shadow: 0 3px 10px #0007; transition: border-color .15s, color .15s, transform .08s, background .15s; }
.qbar button i { font-style: normal; font-size: 15px; color: var(--brass2); }
.qbar button kbd { opacity: .75; }
.qbar button:hover { border-color: var(--brass); color: #fff; }
.qbar button:active { transform: translateY(1px); }
.qbar button.on { background: linear-gradient(#5a6a3a, #3a4a26); border-color: var(--brass2); color: #fff; }
.wx { font-size: 11px; letter-spacing: .06em; color: var(--dim); border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px; margin-right: 8px; white-space: nowrap; transition: color .4s, border-color .4s, background .4s; }
.wx.on { color: #cfe6ff; border-color: #3a6a8a; background: #3a6a8a22; }
.btn.fsb { padding: 5px 9px; font-size: 14px; letter-spacing: 0; }
.set-text { width: 100%; }
.set-body { height: 330px; }

/* ================= loading screen ================= */
.curtain.load { gap: 0; }
.load-card { display: grid; grid-template-columns: 300px minmax(0, 420px); gap: 34px; align-items: center; text-align: left; padding: 0 24px; animation: rise .5s var(--ease) backwards; }
.load-map { position: relative; width: 300px; height: 300px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 20px 70px #000c, 0 0 0 6px #ffffff06; }
.load-map img { width: 100%; height: 100%; display: block; animation: loadzoom 9s ease-out forwards; }
@keyframes loadzoom { from { transform: scale(1.12); } }
.load-scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0, #d7b24c33 48%, #f4d77a99 50%, #d7b24c33 52%, transparent 100%); background-size: 100% 60%; background-repeat: no-repeat; animation: scan 2.2s linear infinite; mix-blend-mode: screen; pointer-events: none; }
@keyframes scan { from { background-position: 0 -80%; } to { background-position: 0 260%; } }
.load-info h2 { font-size: clamp(26px, 3.2vw, 40px); letter-spacing: .14em; color: #f2f5f3; margin: 6px 0 4px; }
.load-info .kicker { font-size: 11px; }
.load-sides { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 18px; }
.load-sides span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.load-sides .flag.sm { width: 26px; height: 17px; }
.load-sides .flag-cn::after { font-size: 8px; }
.load-bar { height: 8px; border-radius: 4px; background: #060908; box-shadow: inset 0 0 0 1px var(--line2); overflow: hidden; }
.load-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #a8842c, #f4d77a); box-shadow: 0 0 14px #d7b24c; transition: width .35s var(--ease); position: relative; }
.load-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff8c 50%, transparent 70%); background-size: 200% 100%; animation: sheen 1.1s linear infinite; }
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.load-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: #cfd8d2; }
.load-row b { color: var(--brass2); font-size: 15px; font-variant-numeric: tabular-nums; }
.load-steps { display: flex; gap: 5px; margin-top: 10px; }
.load-steps i { flex: 1; height: 3px; border-radius: 2px; background: #2e3d37; transition: background .3s, box-shadow .3s; }
.load-steps i.done { background: var(--brass2); box-shadow: 0 0 8px var(--brass); }
.load-tip { margin-top: 20px; padding: 10px 12px; border-left: 3px solid var(--brass); background: #0006; font-size: 12.5px; line-height: 1.5; color: #cfd8d2; }
.load-tip b { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--brass); margin-bottom: 3px; }
.cur-devby { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #7f9088; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; }
.cur-devby img { height: 24px; }

/* ================= credits ================= */
.credits-back { position: absolute; inset: 0; z-index: 50; background: radial-gradient(1000px 700px at 50% 40%, #131b18f7, #040605fa 80%); backdrop-filter: blur(6px); animation: fadein .4s ease-out; transition: opacity .3s ease-in; cursor: pointer; }
.credits-back.closing { opacity: 0; pointer-events: none; }
.credits { position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(transparent 0, #000 16%, #000 82%, transparent 100%); mask-image: linear-gradient(transparent 0, #000 16%, #000 82%, transparent 100%); }
.credits-roll { position: absolute; left: 0; right: 0; top: 0; padding: 0 20px 20vh; text-align: center; animation: roll 62s linear infinite; }
.credits:hover .credits-roll { animation-play-state: paused; }
@keyframes roll { from { transform: translateY(26vh); } to { transform: translateY(-100%); } }      /* the crest and title are on screen from the first moment */
.credits-roll .emblem { width: 110px; height: 110px; margin-bottom: 20px; }
.credits-roll h1 { font-size: clamp(40px, 7vw, 92px); font-weight: 800; letter-spacing: .14em; line-height: 1.05; margin-bottom: 10px; text-shadow: 0 6px 30px #000; }
.credits-roll section { margin-top: 64px; }
.credits-roll section small { display: block; font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.credits-roll .dev img { width: min(460px, 70vw); display: block; margin: 0 auto; filter: drop-shadow(0 6px 24px #000a); transition: transform .2s; }
.credits-roll .dev a:hover img { transform: scale(1.03); }
.credits-roll h4 { font-size: 12px; letter-spacing: .34em; color: var(--brass); margin-bottom: 12px; }
.credits-roll p { margin: 0 0 6px; font-size: clamp(15px, 1.5vw, 19px); font-weight: 300; letter-spacing: .06em; color: #e9eeeb; }
.credits-flags, .credits-maps { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; max-width: 760px; margin: 0 auto; }
.credits-flags span, .credits-maps span { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12.5px; letter-spacing: .06em; color: #dfe8e2; }
.credits-maps img { width: 92px; height: 92px; border-radius: 5px; border: 1px solid var(--line2); display: block; }
.credits-roll .end { margin-top: 90px; }
.credits-roll .end img { height: 46px; display: block; margin: 0 auto 14px; }
.credits-roll .end p { font-size: 13px; color: var(--dim); }
.credits-roll a { color: var(--brass2); text-decoration: none; letter-spacing: .1em; }
.credits-roll a:hover { text-decoration: underline; }
.credits-close { position: absolute; right: 20px; bottom: 20px; z-index: 2; }
.credits-back:has(.credits-close) .credits { -webkit-mask-image: linear-gradient(transparent 0, #000 16%, #000 100%); mask-image: linear-gradient(transparent 0, #000 16%, #000 100%); }

@media (max-width: 900px) {
    .mp-split { grid-template-columns: 1fr; }
    .load-card { grid-template-columns: 1fr; gap: 18px; justify-items: center; }
    .load-map { width: 180px; height: 180px; }
    .qbar button kbd { display: none; }
    .fs-corner { display: none; }
}
@media (max-width: 1100px) { .qbar button { padding: 0 8px; font-size: 11px; } .qbar button kbd { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .credits { overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
    .credits-roll { position: static; animation: none; padding-top: 10vh; }
}
.map-hero { grid-template-columns: auto 1fr; }
@media (max-width: 1400px) { .map-hero .map-pick { width: 140px; height: 140px; } }
.opp { flex-wrap: wrap; }
.opp select { min-width: 96px; }
.lobby { grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); }
table.players td, table.players th { padding-left: 4px; padding-right: 4px; }
table.players select { padding: 5px 22px 5px 7px; font-size: 12.5px; max-width: 124px; }
table.players td:first-child { width: 40px; }
.lobby-left .friends { margin: 4px 0 12px; }
.lobby-left .friends h3 { margin-top: 12px; }
.host-funds { flex-wrap: wrap; }
.lobby-right .rules .field { flex-wrap: wrap; }

/* ================= the multiplayer dialog: as large as the screen allows ================= */
.setup.multi { width: min(1760px, 95vw); height: min(1060px, 93vh); max-height: none; }
.setup.multi > .lobby, .setup.multi > .mp-split { flex: 1; align-content: start; }
.mp-connect { max-width: none; align-content: start; }
.mp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.mp-steps > div { background: linear-gradient(#18211e, #121a17); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.mp-steps i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--brass); color: var(--brass2); font-style: normal; font-weight: 800; font-size: 12px; margin-bottom: 8px; }
.mp-steps b { display: block; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.mp-steps span { display: block; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
/* the lobby is four areas: the party, the friends list, the messages and the battlefield */
.lobby { grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); grid-template-areas: "party field" "friends field" "chat field"; grid-template-rows: auto auto minmax(0, 1fr); align-content: stretch; }
.lobby-left { grid-area: party; } .lobby-friends { grid-area: friends; min-width: 0; } .lobby-chat { grid-area: chat; min-width: 0; min-height: 0; display: flex; flex-direction: column; } .lobby-right { grid-area: field; min-width: 0; }
.lobby-friends .friends h3 { margin-top: 0; }
.lobby-chat .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 0; }
.lobby-chat .chat-log { flex: 1; min-height: 60px; max-height: none; flex-direction: column-reverse; justify-content: flex-start; background: #0a0f0d99; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }

@media (min-width: 1500px) and (min-height: 760px) {
    .setup.multi .setup-head { padding: 20px 30px 16px; }
    .setup.multi .setup-head h2 { font-size: 28px; }
    .setup.multi > .lobby, .setup.multi > .mp-split { padding: 26px 30px; gap: 34px; }
    .setup.multi h3 { font-size: 12.5px; margin-bottom: 12px; }
    /* connect view: larger controls */
    .mp-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .mp-connect { gap: 20px; }
    .mp-connect label, .setup.multi .field { font-size: 13px; }
    .setup.multi input:not([type=range]) { font-size: 16px; padding: 11px 13px; }
    .setup.multi input.code { width: 120px; }
    .setup.multi .mp-row .btn { padding: 15px 30px; font-size: 16px; }
    .setup.multi .online { font-size: 15px; }
    .setup.multi .seg button { padding: 8px 16px; font-size: 14px; }
    .mp-steps { gap: 16px; margin-top: 14px; }
    .mp-steps > div { padding: 18px 20px; }
    .mp-steps b { font-size: 15px; } .mp-steps span { font-size: 14px; }
    /* lobby: three columns — party and messages, the battlefield, friends */
    .lobby { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.2fr) minmax(0, .9fr); grid-template-areas: "party field friends" "chat field friends"; grid-template-rows: auto minmax(0, 1fr); }
    .roomcode { font-size: 13px; margin-bottom: 16px; } .roomcode b { font-size: 42px; }
    .invite { margin-bottom: 20px; } .invite input { font-size: 14px; padding: 10px 12px; }
    table.players { font-size: 15px; margin-bottom: 18px; }
    table.players th { font-size: 11.5px; padding-top: 8px; padding-bottom: 8px; }
    table.players td { padding-top: 12px; padding-bottom: 12px; }
    table.players select { font-size: 14px; padding: 7px 24px 7px 9px; max-width: 150px; }
    table.players .flag.sm { width: 44px; height: 28px; }
    .setup.multi .colors.mini { width: 124px; gap: 5px; } .setup.multi .colors.mini .swatch { width: 26px; height: 26px; }
    .setup.multi .opp { padding: 10px 12px; } .setup.multi .opp select { font-size: 14px; padding-top: 8px; padding-bottom: 8px; }
    .setup.multi .btn.small { padding: 8px 15px; font-size: 13px; }
    .lobby-chat .chat-log, .setup.multi .chat-row input { font-size: 14.5px; }
    .setup.multi .chat-row input { padding: 9px 11px; }
    .lobby-pick { max-width: min(100%, 38vh); margin-bottom: 14px; }
    .lobby-pick .spawn { width: 32px; height: 32px; margin: -16px 0 0 -16px; font-size: 13px; }
    .lobby-pick .spawn.me { width: 42px; height: 42px; margin: -21px 0 0 -21px; font-size: 11px; }
    .lobby-right .map-list.compact { grid-template-columns: 1fr 1fr; max-height: none; overflow: visible; padding-right: 0; }
    .lobby-right .map-list.compact .map { padding: 8px 10px; } .lobby-right .map-list.compact .map-thumb { width: 44px; height: 44px; }
    .lobby-right .map b { font-size: 14.5px; }
    .lobby-right .rules { margin: 16px 0; }
    .lobby-right .btn.start { padding: 18px; font-size: 18px; }
    .setup.multi .friend { padding: 10px 12px; margin-bottom: 8px; } .setup.multi .friend b { font-size: 15px; } .setup.multi .friend small { font-size: 12.5px; }
    .setup.multi .fcode { font-size: 12.5px; } .setup.multi .fcode b { font-size: 21px; }
    .setup.multi .note { font-size: 14px; }
}
@media (max-width: 900px) {
    .lobby { grid-template-columns: 1fr; grid-template-areas: "party" "field" "friends" "chat"; grid-template-rows: none; }
    .mp-steps { grid-template-columns: 1fr; }
    .setup.multi { height: auto; max-height: 96vh; }
}
.lobby-right .btn.ready-big { width: 100%; margin-top: 16px; padding: 20px; font-size: 20px; letter-spacing: .16em; }
.btn.ready-big.primary { animation: pulse 1.6s infinite; }
.btn.ready-big.on { --btn-bg: linear-gradient(#2f7a3c, #1f5429); border-color: #6fe085; color: #eaffee; box-shadow: 0 0 22px #4fe06a40, inset 0 1px 0 #ffffff26; }
.btn.ready-cell { padding: 7px 14px; font-size: 12.5px; white-space: nowrap; }
.btn.ready-cell.on { --btn-bg: linear-gradient(#2f7a3c, #1f5429); border-color: #6fe085; color: #eaffee; }
.ready-note { margin-top: 10px; text-align: center; }
@media (min-width: 1500px) and (min-height: 760px) {
    .lobby-right .btn.ready-big { padding: 26px; font-size: 24px; }
    .setup.multi .btn.ready-cell { padding: 10px 18px; font-size: 14px; }
}
/* before a game is hosted or joined there is less to show: wide, but only as tall as its content */
.setup.multi:has(> .mp-split) { width: min(1400px, 95vw); height: auto; max-height: 93vh; }
@media (min-width: 1500px) and (min-height: 760px) {
    .lobby-pick { max-width: min(100%, 34vh); }
    .lobby-right .map-list.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .lobby-right .map-list.compact .map { padding: 7px 8px; gap: 8px; } .lobby-right .map-list.compact .map-thumb { width: 36px; height: 36px; }
    .lobby-right .map b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lobby-right .map > div { min-width: 0; }
}

/* ================= the status button in the top bar, and the panel behind it ================= */
.tb.mid { position: relative; }
.statbtn { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; margin-right: 6px; background: #0b100ecc; border: 1px solid var(--line2); border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #cfd8d2; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; transition: border-color .15s, color .15s, background .15s; }
.statbtn:hover, .statbtn.open { border-color: var(--brass); color: #fff; }
.statbtn .pip { width: 8px; height: 8px; border-radius: 50%; background: #7d8c84; flex: none; }
.statbtn.ok .pip { background: #38c04a; box-shadow: 0 0 8px #38c04a; }
.statbtn.warn { border-color: #6a5a20; color: #ffd84a; } .statbtn.warn .pip { background: #ffd84a; box-shadow: 0 0 8px #ffd84a; }
.statbtn.bad { border-color: #7a2a20; color: var(--bad); animation: blink .8s infinite; } .statbtn.bad .pip { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.statpop { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); z-index: 12; min-width: 270px; padding: 10px 12px; background: linear-gradient(#141c19, #0e1412); border: 1px solid var(--brass); border-radius: 6px; box-shadow: 0 14px 40px #000c; cursor: pointer; animation: statin .16s var(--ease); }
@keyframes statin { from { opacity: 0; transform: translate(-50%, -6px); } }
.statpop > div { display: flex; justify-content: space-between; gap: 18px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid #ffffff0a; }
.statpop > div:last-child { border-bottom: 0; }
.statpop span { color: var(--dim); }
.statpop b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.statpop b.warn { color: #ffd84a; } .statpop b.bad { color: var(--bad); } .statpop b.ok { color: var(--good); }

/* ================= feedback ================= */
.modal.feedback { width: min(620px, 94vw); padding: 0 24px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal.feedback .set-head { padding: 18px 0 0; }
.fb-lead { margin: 0; font-size: 13.5px; line-height: 1.55; color: #cfd8d2; }
.fb-text { width: 100%; min-height: 170px; resize: vertical; background: #0a0f0d; color: var(--text); border: 1px solid var(--line2); border-radius: 4px; padding: 11px 12px; font: inherit; font-size: 14px; line-height: 1.5; user-select: text; -webkit-user-select: text; transition: border-color .15s, box-shadow .15s; }
.fb-text:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px #d7b24c22; }
.fb-count { margin-top: -8px; text-align: right; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.fb-row { display: flex; gap: 10px; }
.fb-row .btn { flex: 1; text-align: center; text-decoration: none; }
a.btn.off { opacity: .4; pointer-events: none; }
.fb-note { font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.fb-addr { align-self: center; font-size: 16px; letter-spacing: .06em; color: var(--brass2); user-select: text; -webkit-user-select: text; padding: 6px 14px; border: 1px dashed #d7b24c66; border-radius: 4px; }

/* ================= credits: moving sky, light beams, embers, parade ================= */
.credits-sky, .credits-beams, .embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.credits-sky { background:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff9 50%, transparent 51%), radial-gradient(1.2px 1.2px at 71% 64%, #fff7 50%, transparent 51%), radial-gradient(1.6px 1.6px at 43% 81%, #f4d77a99 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 12%, #fff8 50%, transparent 51%), radial-gradient(1.2px 1.2px at 27% 53%, #9fd8ff88 50%, transparent 51%), radial-gradient(1px 1px at 58% 33%, #fff6 50%, transparent 51%);
    background-size: 420px 420px, 520px 520px, 640px 640px, 360px 360px, 560px 560px, 300px 300px; animation: skydrift 90s linear infinite; opacity: .9; }
@keyframes skydrift { to { background-position: 0 -420px, 0 -1040px, 0 -640px, 0 -1080px, 0 -560px, 0 -900px; } }
.credits-beams { background: conic-gradient(from 200deg at 18% 108%, transparent 0 8deg, #d7b24c14 14deg, transparent 22deg 360deg), conic-gradient(from 110deg at 82% 108%, transparent 0 10deg, #5fd0ff12 17deg, transparent 26deg 360deg); animation: beams 11s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes beams { from { transform: rotate(-7deg) scale(1.2); opacity: .7; } to { transform: rotate(7deg) scale(1.2); opacity: 1; } }
.embers i { position: absolute; left: var(--x); bottom: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #ffb65c; box-shadow: 0 0 8px 2px #ff8a2a99; animation: ember var(--d) linear var(--w) infinite; opacity: 0; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: .9; } 60% { opacity: .6; } 100% { transform: translate(48px, -104vh); opacity: 0; } }
.credits-crest { position: relative; width: 150px; height: 150px; margin: 0 auto 18px; display: grid; place-items: center; }
.credits-crest .emblem { width: 110px; height: 110px; margin: 0; animation: crest 9s ease-in-out infinite; }
.credits-crest .emblem .e-dash { animation-duration: 12s; }
@keyframes crest { 50% { transform: scale(1.06); filter: drop-shadow(0 0 18px #d7b24c88); } }
.credits-crest > i { position: absolute; inset: 20px; border-radius: 50%; border: 1px solid #f4d77a88; animation: ping 3.6s ease-out infinite; }
.credits-crest > i:nth-child(2) { animation-delay: 1.2s; } .credits-crest > i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }
.credits-roll h1 { background: linear-gradient(100deg, #e6ece8 0 42%, #fff 50%, #e6ece8 58%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 6px 22px #000); animation: glint 5s linear infinite; }
.credits-roll h1 span { background: linear-gradient(100deg, #d7b24c 0 42%, #fff3c4 50%, #d7b24c 58%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: glint 5s linear .4s infinite; }
@keyframes glint { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.credits-roll h4 { display: flex; align-items: center; justify-content: center; gap: 16px; }
.credits-roll h4::before, .credits-roll h4::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--brass)); animation: rulepulse 3s ease-in-out infinite; }
.credits-roll h4::after { transform: scaleX(-1); }
@keyframes rulepulse { 50% { width: 130px; opacity: .55; } }
.credits-roll .dev a { position: relative; display: inline-block; }
.credits-roll .dev img { animation: logoglow 4s ease-in-out infinite; }
@keyframes logoglow { 50% { filter: drop-shadow(0 0 26px #3aa6e099) drop-shadow(0 6px 24px #000a); } }
.credits-roll .dev a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 42%, #ffffffd9 50%, transparent 58%) 130% 0 / 260% 100% no-repeat; -webkit-mask: url(../img/assemblysoft-partners.webp) center / contain no-repeat; mask: url(../img/assemblysoft-partners.webp) center / contain no-repeat; animation: logoshine 4s ease-in-out infinite; pointer-events: none; }
@keyframes logoshine { 0%, 35% { background-position: 130% 0; } 75%, 100% { background-position: -30% 0; } }
.credits-flags span { animation: bob 3.2s ease-in-out infinite; } .credits-flags span:nth-child(2n) { animation-delay: -1.1s; } .credits-flags span:nth-child(3n) { animation-delay: -2.1s; }
.credits-flags .flag { animation: wave 2.6s ease-in-out infinite; transform-origin: 0 50%; }
@keyframes wave { 0%, 100% { transform: perspective(120px) rotateY(0deg) skewY(0deg); } 50% { transform: perspective(120px) rotateY(-16deg) skewY(3deg); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.credits-maps span { animation: bob 4s ease-in-out infinite; } .credits-maps span:nth-child(2n) { animation-delay: -1.3s; } .credits-maps span:nth-child(3n) { animation-delay: -2.6s; }
.credits-maps img { transition: transform .25s var(--ease), box-shadow .25s; box-shadow: 0 8px 24px #0009; }
.credits-maps span:hover img { transform: scale(1.5); box-shadow: 0 0 0 2px var(--brass), 0 14px 40px #000c; }
.parade { overflow: hidden; margin: 0 auto 10px; max-width: 900px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.parade > div { display: flex; gap: 10px; width: max-content; animation: parade 46s linear infinite; }
.parade.back > div { animation-direction: reverse; animation-duration: 58s; }
.parade img { width: 58px; height: 58px; border-radius: 5px; border: 1px solid var(--line2); display: block; flex: none; }
@keyframes parade { to { transform: translateX(-50%); } }
.credits-roll .mail { display: inline-block; margin-top: 6px; font-size: clamp(18px, 2vw, 26px); letter-spacing: .06em; padding: 8px 20px; border: 1px solid #d7b24c66; border-radius: 6px; animation: mailglow 3s ease-in-out infinite; }
@keyframes mailglow { 50% { box-shadow: 0 0 26px #d7b24c59; border-color: var(--brass2); } }
.credits-roll .end p { animation: breathe 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .credits-sky, .credits-beams, .embers { display: none; } }

/* ================= a larger field manual ================= */
.fm { width: min(1840px, 98vw); height: min(1140px, 97vh); }
@media (min-width: 1600px) and (min-height: 860px) {
    .fm-head { padding: 18px 26px 15px; } .fm-title h2 { font-size: 28px; }
    .fm-search { height: 42px; max-width: 600px; } .fm-search input { font-size: 15px; }
    .fm-nat { padding: 13px 18px; } .fm-nat b { font-size: 15px; } .fm-nat small { font-size: 11.5px; }
    .fm-banner { padding: 18px 26px; gap: 16px; } .fm-bigflag { width: 108px; height: 68px; }
    .fm-bn-main h3 { font-size: 26px; } .fm-bn-main p { font-size: 14px; }
    .fm-bn-card { padding: 11px 13px; } .fm-bn-card img, .fm-bn-card .g { width: 52px; height: 52px; }
    .fm-bn-card b { font-size: 15px; } .fm-bn-card em { font-size: 12.5px; } .fm-bn-card small { font-size: 10.5px; }
    .fm-main { padding: 18px 26px 26px; }
    .fm-tabs button { padding: 9px 17px; font-size: 13.5px; }
    .fm-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
    .fm-card { grid-template-columns: 70px 1fr; padding: 13px; } .fm-card img { width: 70px; height: 70px; }
    .fm-c-main b { font-size: 15.5px; } .fm-c-main small { font-size: 11.5px; } .fm-c-cost span { font-size: 15px; }
    .fm-bars > div { grid-template-columns: 72px 1fr 38px; } .fm-bars small { font-size: 10.5px; } .fm-bars span { height: 6px; } .fm-bars em { font-size: 12px; }
    .fm-chips span { font-size: 11px; padding: 3px 8px; }
    .fm-body.has-detail { grid-template-columns: 1fr minmax(400px, 480px); }
    .fm-detail { padding: 20px 22px 26px; } .fm-d-head img { width: 104px; height: 104px; } .fm-d-head h3 { font-size: 22px; }
    .fm-desc { font-size: 14.5px; } .fm-facts b, .fm-wstats b { font-size: 16px; } .fm-facts small, .fm-wstats small { font-size: 10.5px; }
    .fm-abil ul, .fm-weapon p, .fm-where { font-size: 13.5px; } .fm-compare button { font-size: 13px; }
    .fm-row { padding: 13px 18px; } .fm-row b { font-size: 15.5px; } .fm-row p { font-size: 13.5px; }
    .fm-rules p { font-size: 13.5px; } .fm-rules table { font-size: 13px; }
}

/* ================= replay controls ================= */
.gone { display: none !important; }
.replaybar { position: absolute; left: 50%; bottom: 262px; transform: translateX(-50%); z-index: 6; width: min(1100px, 96vw); padding: 8px 12px; background: linear-gradient(#141c19f5, #0e1412f5); border: 1px solid var(--brass); border-radius: 6px; box-shadow: 0 10px 34px #000b; animation: rpin .4s var(--ease) backwards; }
@keyframes rpin { from { opacity: 0; transform: translate(-50%, 16px); } }
.rp-row { display: flex; align-items: center; gap: 6px; }
.rp-row input[type=range] { flex: 1; min-width: 80px; margin: 0 6px; }
.rp-tag { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #1a1408; background: var(--brass); border-radius: 3px; padding: 3px 8px; margin-right: 4px; }
.rp-time { font-size: 12.5px; font-variant-numeric: tabular-nums; color: #dfe8e2; white-space: nowrap; min-width: 96px; text-align: right; margin-right: 6px; }
.rp-sides { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.rp-sides button { display: flex; align-items: center; gap: 7px; background: #ffffff08; border: 1px solid var(--line); border-radius: 12px; padding: 3px 11px 3px 8px; font-size: 11.5px; color: #b9c6be; cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color .15s, color .15s; }
.rp-sides button:hover { border-color: var(--brass); color: #fff; }
.rp-sides b { color: #f2f5f3; font-weight: 600; }
.rp-sides i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.rp-sides .dead { opacity: .5; text-decoration: line-through; }

/* ================= intro: cuts between scenes, and the name of each battlefield ================= */
.cine-black { position: absolute; inset: 0; background: #000; pointer-events: none; }
.cine-place { position: absolute; left: 28px; top: calc(11vh + 16px); z-index: 2; font-size: 11.5px; letter-spacing: .34em; text-transform: uppercase; color: #cfd8d2; text-shadow: 0 2px 10px #000; }
.cine-place b { color: var(--brass2); font-weight: 700; }

/* ================= how to play: an illustrated guide ================= */
.modal.howto { width: min(1560px, 96vw); height: min(960px, 94vh); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ht-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 13px 26px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #1a2420, transparent 70%); flex: none; }
.ht-head h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: .14em; color: #f2f5f3; }
.ht-head .kicker { font-size: 10px; letter-spacing: .4em; }
.ht-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.ht-nav { display: flex; flex-direction: column; padding: 12px 0; border-right: 1px solid var(--line); background: #0b100ecc; overflow-y: auto; }
.ht-nav button { display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 11px 16px 11px 15px; cursor: pointer; opacity: .7; transition: opacity .15s, background .15s, border-color .15s; }
.ht-nav button:hover { opacity: 1; background: #ffffff08; }
.ht-nav button.on { opacity: 1; border-left-color: var(--brass2); background: linear-gradient(90deg, #d7b24c26, transparent); }
.ht-nav i { font-style: normal; font-size: 19px; width: 26px; text-align: center; color: var(--brass2); flex: none; }
.ht-nav b { display: block; font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; }
.ht-nav small { display: block; font-size: 11px; color: var(--dim); margin-top: 1px; }
.ht-page { overflow-y: auto; padding: 22px 28px 26px; animation: fadeup .28s var(--ease); }
.ht-page h3 { font-size: 26px; letter-spacing: .06em; text-transform: none; color: #f6f8f7; margin-bottom: 6px; }
.ht-page h4 { font-size: 11.5px; letter-spacing: .22em; color: var(--brass); margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.ht-page h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.ht-lead { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: #cfd8d2; max-width: 900px; }
.ht-tip { margin: 16px 0 0; padding: 11px 14px; background: #0006; border-left: 3px solid var(--brass); font-size: 13.5px; line-height: 1.55; color: #cfd8d2; }
.ht-tip b { color: var(--brass2); }
.ht-loop { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.ht-loop > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 16px; background: linear-gradient(#1b2522, #141c19); border: 1px solid var(--line); border-radius: 8px; }
.ht-loop > i { align-self: center; font-style: normal; font-size: 26px; color: var(--brass); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }
.ht-loop img { width: 92px; height: 92px; border-radius: 8px; border: 1px solid var(--line2); box-shadow: 0 8px 22px #0008; }
.ht-loop i.n { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--brass); color: var(--brass2); font-style: normal; font-size: 24px; font-weight: 800; }
.ht-loop b { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.ht-loop span { font-size: 13.5px; line-height: 1.5; color: #c3cfc8; }
.ht-cards { display: grid; gap: 10px; margin-top: 10px; }
.ht-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ht-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ht-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ht-card { display: flex; gap: 12px; align-items: center; padding: 11px 13px; background: linear-gradient(#1b2522, #141c19); border: 1px solid var(--line); border-radius: 7px; transition: transform .12s, border-color .15s; }
.ht-card:hover { transform: translateY(-2px); border-color: var(--line2); }
.ht-card img { width: 58px; height: 58px; border-radius: 6px; border: 1px solid var(--line2); flex: none; }
.ht-card > div { min-width: 0; }
.ht-card b { display: block; font-size: 14.5px; color: #f2f5f3; }
.ht-card span { display: block; font-size: 12.5px; line-height: 1.45; color: #c3cfc8; margin-top: 2px; }
.ht-card em { display: block; font-style: normal; font-size: 11.5px; color: var(--brass2); margin-top: 3px; }
.ht-card .g { width: 50px; height: 50px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 24px; border-radius: 50%; background: #0a0f0e; border: 1px solid #d7b24c77; color: var(--brass2); }
.ht-meter { width: 58px; height: 14px; flex: none; background: #2a6a3a; border: 1px solid var(--line2); border-radius: 2px; overflow: hidden; }
.ht-meter i { display: block; height: 100%; background: #e2b83a; animation: meter 3s ease-in-out infinite alternate; }
@keyframes meter { from { width: 40%; } to { width: 96%; background: var(--bad); } }
.ht-chain { display: grid; gap: 10px; }
.ht-chain-row { display: flex; align-items: center; gap: 8px; }
.ht-chain-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 12px 8px; background: linear-gradient(#1b2522, #141c19); border: 1px solid var(--line); border-radius: 7px; }
.ht-chain-row > i { font-style: normal; color: var(--brass); font-size: 18px; flex: none; }
.ht-chain-row img { width: 62px; height: 62px; border-radius: 6px; border: 1px solid var(--line2); }
.ht-chain-row b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ht-chain-row span { font-size: 11.5px; color: var(--good); font-variant-numeric: tabular-nums; }
.ht-mouse-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 26px; align-items: center; }
.ht-mouse { position: relative; width: 132px; height: 200px; margin: 0 auto; border-radius: 62px 62px 70px 70px; background: linear-gradient(#27352f, #151d1a); border: 2px solid var(--line2); box-shadow: 0 14px 34px #0009; }
.ht-mouse i { position: absolute; top: 0; height: 82px; }
.ht-mouse .l { left: 0; width: 50%; border-radius: 60px 0 0 0; background: #5ae67855; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); animation: breathe 2.4s infinite; }
.ht-mouse .r { right: 0; width: 50%; border-radius: 0 60px 0 0; background: #d7b24c66; border-bottom: 1px solid var(--line2); animation: breathe 2.4s 1.2s infinite; }
.ht-mouse .w { left: 50%; top: 22px; width: 14px; height: 34px; margin-left: -7px; border-radius: 7px; background: #5fd0ff; box-shadow: 0 0 10px #5fd0ff; }
.ht-mouse-keys { display: grid; gap: 10px; }
.ht-mouse-keys > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.ht-mouse-keys b { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 3px; text-align: center; }
.ht-mouse-keys b.l { background: #5ae67833; color: #b5f5c1; } .ht-mouse-keys b.r { background: #d7b24c33; color: var(--brass2); } .ht-mouse-keys b.w { background: #5fd0ff33; color: #a9e4ff; } .ht-mouse-keys b.e { background: #ffffff14; color: #dfe8e2; }
.ht-mouse-keys span { font-size: 13.5px; line-height: 1.5; color: #cfd8d2; }
.ht-orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ht-orders > div { display: grid; grid-template-columns: 30px auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 9px 12px; background: linear-gradient(#1b2522, #141c19); border: 1px solid var(--line); border-radius: 6px; }
.ht-orders i { grid-row: 1 / 3; font-style: normal; font-size: 21px; color: var(--brass2); text-align: center; }
.ht-orders kbd { font-size: 11px; padding: 1px 6px; }
.ht-orders b { font-size: 13.5px; }
.ht-orders span { grid-column: 2 / 4; font-size: 12px; color: var(--dim); }
.ht-mini { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
.ht-mini img { width: 150px; height: 150px; border-radius: 6px; border: 1px solid var(--line2); }
.ht-mini p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: #cfd8d2; }
.ht-mini ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 12.5px; color: #c3cfc8; }
.ht-mini li i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px currentColor; animation: breathe 1.6s infinite; }
.ht-kb { display: grid; gap: 7px; padding: 16px; background: #0a0f0d; border: 1px solid var(--line); border-radius: 10px; box-shadow: inset 0 0 40px #000a; }
.ht-kb > div { display: flex; gap: 7px; }
.ht-kb kbd { --w: 1; flex: var(--w) 1 0; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; font-weight: 700; background: linear-gradient(#232d29, #161d1b); border: 1px solid var(--line2); border-radius: 6px; color: #7d8c84; box-shadow: 0 3px 0 #06090888; padding: 0 4px; white-space: nowrap; overflow: hidden; }
.ht-kb kbd:empty { visibility: hidden; }
.ht-kb kbd small { font-size: 9.5px; font-weight: 500; letter-spacing: .02em; opacity: .9; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ht-kb .cam, .ht-legend .cam { color: #a9e4ff; border-color: #3a6a8a; background: linear-gradient(#1d3442, #14222b); }
.ht-kb .ord, .ht-legend .ord { color: var(--brass2); border-color: #8a6c22; background: linear-gradient(#3a3018, #261f10); }
.ht-kb .sel, .ht-legend .sel { color: #b5f5c1; border-color: #2c6a3a; background: linear-gradient(#1c3a24, #132618); }
.ht-kb .ui, .ht-legend .ui { color: #d9c9ff; border-color: #5a4a8a; background: linear-gradient(#2a2442, #1b172b); }
.ht-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ht-legend span { font-size: 12px; padding: 4px 12px; border: 1px solid; border-radius: 12px; }
.ht-foot { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-top: 1px solid var(--line); background: #0a0f0dd9; flex: none; }
.ht-dots { flex: 1; display: flex; justify-content: center; gap: 8px; }
.ht-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: #47594f; cursor: pointer; transition: transform .15s, background .15s; }
.ht-dots button.on { background: var(--brass2); transform: scale(1.4); box-shadow: 0 0 8px var(--brass); }
@media (max-width: 1100px) {
    .ht-body { grid-template-columns: 1fr; } .ht-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; } .ht-nav small { display: none; } .ht-nav button { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; } .ht-nav button.on { border-bottom-color: var(--brass2); }
    .ht-cards.three, .ht-cards.four, .ht-orders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ht-loop { grid-template-columns: 1fr; } .ht-loop > i { transform: rotate(90deg); animation: none; }
    .ht-chain-row { flex-wrap: wrap; } .ht-chain-row > i { display: none; } .ht-chain-row > div { flex: 1 1 40%; }
    .ht-mouse-row { grid-template-columns: 1fr; } .ht-kb kbd small { display: none; } .ht-kb kbd { height: 40px; font-size: 11px; }
}

.mp-adv { border: 1px solid var(--line); border-radius: 5px; padding: 8px 12px; background: #ffffff05; }
.mp-adv summary { cursor: pointer; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.mp-adv summary:hover { color: #fff; }
.mp-adv[open] summary { margin-bottom: 10px; }
.mp-adv .note { margin-top: 8px; }

/* ================= credits: the roll starts at once, runs through once, and ends on a closing card ================= */
.credits:hover .credits-roll { animation-play-state: running; }
.credits-roll { animation: roll 58s linear forwards; }
.credits-end { position: absolute; left: 50%; top: 50%; width: min(760px, 90vw); transform: translate(-50%, -50%); text-align: center; cursor: default; opacity: 0; pointer-events: none; animation: creditsend 2.2s var(--ease) 56.5s forwards; }
@keyframes creditsend { from { opacity: 0; transform: translate(-50%, -44%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; } }
.credits-end img { width: min(480px, 74vw); display: block; margin: 0 auto 26px; animation: logoglow 4s ease-in-out infinite; }
.credits-end h3 { font-size: clamp(26px, 3.4vw, 44px); letter-spacing: .14em; color: #f6f8f7; margin-bottom: 14px; }
.credits-end p { margin: 0 auto 22px; max-width: 640px; font-size: clamp(14px, 1.4vw, 17px); font-weight: 300; line-height: 1.7; letter-spacing: .03em; color: #dfe8e2; }
.credits-end .mail { display: inline-block; font-size: clamp(18px, 2vw, 26px); letter-spacing: .06em; padding: 9px 22px; color: var(--brass2); text-decoration: none; border: 1px solid #d7b24c66; border-radius: 6px; animation: mailglow 3s ease-in-out infinite; }
.credits-end .row { margin: 26px 0 18px; }
.credits-end small { font-size: 12px; letter-spacing: .1em; color: var(--dim); }
.credits-end small a { color: var(--brass2); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .credits-end { position: static; transform: none; opacity: 1; pointer-events: auto; animation: none; margin: 10vh auto; } }

/* ---- training missions */
.setup.missions { width: min(1480px, 97vw); }
.mis-prog { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mis-prog b { color: var(--brass2); font-size: 15px; letter-spacing: .06em; }
.mis-prog span { width: 150px; height: 6px; border-radius: 3px; background: #0009; border: 1px solid var(--line); overflow: hidden; }
.mis-prog span i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--brass2)); transition: width .4s var(--ease); }
.mis-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding: 18px 24px; overflow-y: auto; min-height: 0; }
.mis-card { display: flex; flex-direction: column; text-align: left; padding: 0; background: linear-gradient(#1a2320, #121816); border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; cursor: pointer; color: var(--text); font: inherit; box-shadow: 0 8px 26px #0008; transition: transform .16s var(--ease), border-color .16s, box-shadow .16s; animation: riseup .45s var(--ease) calc(var(--i) * 70ms) backwards; }
.mis-card:hover { transform: translateY(-4px); border-color: var(--brass); box-shadow: 0 16px 38px #000b, 0 0 0 1px #d7b24c40; }
.mis-card.next { border-color: var(--brass); box-shadow: 0 8px 30px #000a, 0 0 22px #d7b24c2e; }
.mis-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #060908; flex: none; }
.mis-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9) brightness(.9); transition: transform .5s var(--ease), filter .3s; }
.mis-card:hover .mis-thumb img { transform: scale(1.07); filter: none; }
.mis-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, #121816 100%); }
.mis-num { position: absolute; left: 10px; top: 8px; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #0b0f0ee6; border: 1px solid var(--brass); color: var(--brass2); font-size: 17px; font-weight: 800; }
.mis-tick { position: absolute; right: 8px; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 3px; background: #123a1ce6; border: 1px solid #4fe06a88; color: #9ff5ad; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mis-tick.next { background: #3a2f10e6; border-color: var(--brass); color: var(--brass2); animation: pulse 1.6s ease-in-out infinite; }
.mis-info { display: flex; flex-direction: column; gap: 5px; padding: 4px 14px 13px; flex: 1; min-height: 0; }
.mis-info > b { font-size: 17px; letter-spacing: .1em; text-transform: uppercase; color: #f2f5f3; }
.mis-info > small { color: var(--brass); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.mis-info p { margin: 4px 0 2px; color: #b9c6be; font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.mis-info ul { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mis-info li { position: relative; padding-left: 14px; font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.mis-info li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 5px; height: 5px; background: var(--brass); transform: rotate(45deg); opacity: .8; }
.mis-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.mis-card.done .mis-num { border-color: #4fe06a; color: #9ff5ad; }
.mis-nat { display: flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); flex: none; }
.mis-nat button { padding: 3px; background: #0006; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; line-height: 0; opacity: .6; transition: opacity .15s, border-color .15s, transform .1s; }
.mis-nat button:hover { opacity: 1; transform: translateY(-1px); }
.mis-nat button i { display: block; width: 30px; height: 19px; }
.mis-nat button.on { opacity: 1; border-color: var(--brass); box-shadow: 0 0 10px #d7b24c55; }
.mis-nat b { color: #f2f5f3; margin-left: 4px; }
.mis-hint { margin-left: auto; color: var(--dim); font-size: 12.5px; text-align: right; }
@keyframes riseup { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 1250px) { .mis-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mis-hint { display: none; } }

/* the objectives and tips, top right of the battle */
.mission { position: absolute; top: 52px; right: 12px; width: 344px; z-index: 5; background: linear-gradient(#131b18f5, #0d1311f5); border: 1px solid var(--line2); border-radius: 6px; box-shadow: 0 10px 30px #000a; overflow: hidden auto; max-height: calc(100vh - 52px - 272px); animation: missionin .5s var(--ease) backwards; }
.mission::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
.mis-head { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 9px 12px 8px; background: linear-gradient(90deg, #1d2824, transparent); border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.mission.min .mis-head { border-bottom: 0; }
.mis-head span { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }
.mis-head b { flex: 1; font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; color: #f2f5f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mis-head i { font-style: normal; font-size: 11.5px; color: var(--dim); }
.mis-head em { font-style: normal; color: var(--dim); font-size: 11px; }
.mis-steps { margin: 0; padding: 8px 12px 6px; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mis-steps li { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.35; color: #6f7f77; }
.mis-steps li > span { flex: none; width: 13px; text-align: center; }
.mis-steps li.done { color: #7fae89; }
.mis-steps li.done > div { text-decoration: line-through; text-decoration-color: #7fae8966; }
.mis-steps li.done.sum > div { text-decoration: none; }
.mis-steps li.done > span { color: var(--good); }
.mis-steps li.now { color: #fff; font-weight: 600; font-size: 13.5px; padding: 3px 0; }
.mis-steps li.now > span { color: var(--brass2); animation: misblink 1.2s ease-in-out infinite; }
@keyframes misblink { 50% { opacity: .35; } }
.mis-steps li em { display: block; font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--brass2); letter-spacing: .04em; }
.mis-tip { margin: 2px 10px 10px; padding: 9px 11px 10px; background: #0a0f0dcc; border: 1px solid #d7b24c55; border-left: 3px solid var(--brass); border-radius: 4px; animation: tipin .45s var(--ease) backwards; }
.mis-tip > b { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }
.mis-tip p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: #d5dfd8; }
.mis-keys { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mis-keys kbd { font-size: 10.5px; padding: 2px 7px; background: #1d2824; border-color: #d7b24c66; color: var(--brass2); }
.mis-tip .btn { margin-top: 8px; }
@keyframes missionin { from { opacity: 0; transform: translateX(24px); } }
@keyframes tipin { from { opacity: 0; transform: translateY(-6px); background: #3a2f10; } }
@media (max-width: 1100px) { .mission { width: 290px; } }

/* briefing and the end of a mission */
.modal.brief { display: grid; grid-template-columns: 300px 1fr; gap: 0; width: min(860px, 94vw); padding: 0; overflow: hidden; text-align: left; }
.brief-map { position: relative; background: #060908; min-height: 100%; }
.brief-map img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) brightness(.85); }
.brief-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #111816); }
.brief-map span { position: absolute; left: 12px; bottom: 10px; z-index: 1; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 4px #000; }
.brief-body { padding: 22px 26px 20px; }
.brief-body h2 { font-size: 26px; letter-spacing: .14em; text-transform: uppercase; color: #f2f5f3; margin: 2px 0 10px; }
.brief-body p { margin: 0 0 12px; color: #c9d4cd; line-height: 1.6; font-size: 14px; }
.brief-body h3, .mis-over h3 { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); margin: 0 0 7px; }
.mis-learn { margin: 0 0 14px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 18px; text-align: left; }
.mis-learn li { position: relative; padding-left: 16px; font-size: 12.5px; color: #b9c6be; line-height: 1.4; }
.mis-learn li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 6px; height: 6px; background: var(--brass); transform: rotate(45deg); }
.brief-note { padding: 9px 12px; margin-bottom: 14px; background: #0a0f0dcc; border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 4px; font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.modal.mis-over { width: min(820px, 94vw); }
.modal.mis-over h1 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: .14em; white-space: nowrap; }
.modal.mis-over .row { flex-wrap: wrap; justify-content: center; }
.modal.mis-over .row .btn { white-space: nowrap; }
.mis-over .kicker { font-size: 10.5px; letter-spacing: .3em; }
.mis-debrief { margin: 6px auto 16px; max-width: 600px; color: #c9d4cd; line-height: 1.6; font-size: 14px; }
.mis-over .mis-learn { max-width: 600px; margin: 0 auto 14px; }
@media (max-width: 760px) { .modal.brief { grid-template-columns: 1fr; } .brief-map { display: none; } .mis-learn { grid-template-columns: 1fr; } }

/* ---- a loading screen with a sense of humour: a tank drives the progress bar, the status line keeps changing its
   story, and the credit signs off with a wave */
.boot .track { position: relative; width: 260px; height: 3px; }
.boot .track .bar { width: 100%; }
.boot .boot-tank { position: absolute; left: var(--blazor-load-percentage, 0%); bottom: 2px; width: 46px; height: 24px; margin-left: -23px; transition: left .2s; filter: drop-shadow(0 0 5px #d7b24c99); animation: rumble .26s steps(2) infinite; }
@keyframes rumble { 50% { transform: translateY(-1px) rotate(-2deg); } }
.boot small.boot-lines { position: relative; display: block; width: min(460px, 92vw); height: 14px; text-align: center; animation: none; }
.boot .boot-lines span { position: absolute; inset: 0; opacity: 0; animation: bootline 9s infinite; animation-delay: calc(var(--i) * 1.5s); }
@keyframes bootline { 0% { opacity: 0; transform: translateY(6px); } 2.5%, 14% { opacity: 1; transform: none; } 16.6%, 100% { opacity: 0; transform: translateY(-6px); } }
.boot .devby-boot, .splash-foot { flex-direction: column; gap: 8px; }
.devby-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.fun-tag { display: flex; justify-content: center; color: #f4d77a; font-size: 11px; letter-spacing: .34em; font-weight: 700; text-transform: uppercase; text-shadow: 0 0 10px #d7b24c66; }
.fun-tag i { display: inline-block; font-style: normal; animation: funhop 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .09s); }
@keyframes funhop { 0%, 28%, 100% { transform: none; color: inherit; } 10% { transform: translateY(-5px) rotate(-7deg); color: #fff6d0; } 18% { transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) { .boot .boot-tank, .fun-tag i { animation: none; } .boot .boot-lines span { animation: none; } .boot .boot-lines span:last-child { opacity: 1; } }

/* ---- who is online, and the line for a slot when every one is taken */
.online.live { margin: 10px 0 4px; font-size: 12.5px; letter-spacing: .04em; cursor: default; }
.online.live b { font-size: 14px; }
.splash-foot .online.live { justify-content: center; margin: 0 0 6px; text-transform: none; letter-spacing: .06em; font-size: 12px; }
.slot-wait, .slot-ready { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid #e2b83a66; border-left: 3px solid #e2b83a; background: #e2b83a12; border-radius: 4px; font-size: 13px; color: var(--text); }
.slot-wait span, .slot-ready span { color: var(--dim); line-height: 1.45; }
.slot-wait .btn { justify-self: start; margin-top: 2px; }
.slot-ready { border-color: #38c04a88; border-left-color: #38c04a; background: #38c04a14; animation: slotpulse 1.2s ease-in-out infinite; }
.slot-ready b { color: #7ff09a; }
@keyframes slotpulse { 50% { box-shadow: 0 0 0 5px #38c04a26; } }
.slot-toast { position: fixed; top: 56px; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: 94vw; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: linear-gradient(#141c19f7, #0e1412f7); border: 1px solid #38c04a; border-radius: 6px; box-shadow: 0 10px 34px #000b, 0 0 0 4px #38c04a1f; font-size: 13.5px; color: var(--text); animation: rise .4s var(--ease) backwards; }
.slot-toast .pip { width: 9px; height: 9px; border-radius: 50%; background: #38c04a; box-shadow: 0 0 8px #38c04a; flex: none; }
.slot-toast span { color: var(--dim); }
.slot-toast .x { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.slot-toast .x:hover { color: #fff; }

/* ---- joining a game: the invitation panel, the code box and what the connection is doing */
.invited { display: grid; gap: 7px; padding: 12px 14px; border: 1px solid var(--brass); border-left: 3px solid var(--brass2); background: #d7b24c14; border-radius: 4px; font-size: 13px; }
.invited b { font-size: 15px; color: var(--brass2); letter-spacing: .04em; }
.invited span { color: var(--dim); }
.invited .btn { justify-self: start; margin-top: 2px; }
input.code { width: 132px; }
.note.code-help, .note.invite-help { font-size: 12px; line-height: 1.5; }
.note.invite-help b { color: var(--brass2); letter-spacing: .14em; }
.note.busy { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--text); }
.note.busy span { color: var(--dim); flex-basis: 100%; }
.note.busy .spin { width: 13px; height: 13px; border: 2px solid #d7b24c44; border-top-color: var(--brass2); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }

/* ---- where a nation is strong and where it is weak */
.swot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.swot > div { padding: 9px 11px 10px; border-radius: 4px; border: 1px solid #ffffff14; background: #ffffff06; }
.swot h4 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.swot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.swot li { position: relative; padding-left: 17px; font-size: 12px; line-height: 1.4; color: var(--text); }
.swot li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.swot .strong { border-left: 3px solid #38c04a; } .swot .strong h4 { color: #7ff09a; } .swot .strong li::before { content: "+"; color: #5fe07a; }
.swot .weak { border-left: 3px solid #e8402a; } .swot .weak h4 { color: #ff8f7c; } .swot .weak li::before { content: "–"; color: #ff7a66; }
@media (max-width: 760px) { .swot { grid-template-columns: 1fr; } }

/* ================= touch screens and phones ================= */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
canvas#game, #minimap { touch-action: none; }
.rotate { display: none; }
.nofs .fsb, .nofs .fs-corner { display: none; }
.touch kbd, .touch .mis-keys { display: none; }
/* on a touch screen a button's note comes up when the button is tapped, and goes again by itself */
.touch .tip { animation: tipgo 5s forwards; }
@keyframes tipgo { 0% { opacity: 0; transform: translateY(7px); } 4% { opacity: 1; transform: none; } 86% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.touch .qbar { flex-wrap: wrap; max-width: calc(100vw - 16px); }
.touch .qbar button { height: 36px; }
.qbar .tgo { border-color: var(--good); color: #fff; background: linear-gradient(#2f6a3a, #1d4426); }
.qbar .tgo i { color: #b9ffc4; }
.qbar .tx { border-color: #a8574c; }
.qbar .tx i { color: #ffb0a4; }

/* a phone on its side: the same display in a third of the height */
@media (max-height: 560px) {
    .hud-top { height: 34px; padding: 0 max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left)); }
    .tb { gap: 6px; }
    .hud-top .flag, .hud-top .rank, .clock, .wx, .fps, .pbar, .tb.mid .btn.tiny:not(:last-of-type) { display: none; }
    .adj { font-size: 0; gap: 0; }
    .adj select { padding: 3px 20px 3px 6px; font-size: 11px; max-width: 104px; }
    .hud-top .btn.small { padding: 4px 8px; font-size: 11px; }
    .statbtn { height: 22px; padding: 0 7px; margin-right: 2px; }
    .statpop { top: 30px; }
    .cash { min-width: 0; font-size: 15px; }
    .power { font-size: 11.5px; }
    .msgs, .supers { top: 38px; }
    .msg { font-size: 11px; padding: 2px 10px; }
    .supers { right: max(6px, env(safe-area-inset-right)); }
    .super { min-width: 0; font-size: 10.5px; padding: 2px 8px; }
    .powerstrip { top: 40px; left: max(6px, env(safe-area-inset-left)); gap: 4px; flex-wrap: wrap; max-height: calc(100dvh - 34px - 118px - 56px); }
    .pwr { width: 40px; height: 34px; padding: 0; justify-content: center; }
    .pwr .pn { display: none; }
    .pwr > b { right: 1px; top: auto; bottom: 0; transform: none; font-size: 9px; }
    .mission { top: 38px; right: max(6px, env(safe-area-inset-right)); width: min(300px, 46vw); max-height: calc(100dvh - 38px - 124px); }
    .mis-steps li { font-size: 11px; } .mis-steps li.now { font-size: 12px; } .mis-tip p { font-size: 11px; line-height: 1.35; }
    .paused { font-size: 30px; }

    .hud-bottom { height: 118px; gap: 6px; padding: 5px max(6px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
    .mm canvas { width: 106px; height: 106px; }
    .selpanel { padding: 5px 7px; overflow-y: auto; }
    .hint { font-size: 10.5px; line-height: 1.3; gap: 3px; }
    .hint b { font-size: 10px; }
    .single { gap: 8px; }
    .portrait { width: 48px; height: 48px; }
    .nm { font-size: 13px; } .vet { font-size: 9px; margin-left: 4px; padding: 0 5px; }
    .own { font-size: 10px; margin: 0 0 2px; }
    .hpbar { height: 12px; } .hpbar span { font-size: 9.5px; line-height: 11px; }
    .st { margin-top: 2px; font-size: 11px; } .st.dim { display: none; }
    .queue { width: 102px; gap: 3px; } .q { width: 31px; height: 31px; }
    .mcount { display: none; } .mgrid { gap: 4px; }
    .mi { width: 40px; height: 44px; } .mi img { width: 38px; height: 38px; } .mi b { font-size: 11px; }
    .card { width: 356px; grid-template-columns: repeat(7, 46px); grid-auto-rows: 46px; gap: 4px; overflow: hidden auto; }
    .cb .gl { font-size: 18px; margin-top: -4px; } .cb .lbl { display: none; } .cb .cost { font-size: 9px; padding: 0; }
    .cb .cnt { font-size: 9.5px; min-width: 14px; height: 14px; line-height: 14px; }
    .tip { right: max(6px, env(safe-area-inset-right)); bottom: 124px; width: min(340px, 60vw); font-size: 11px; line-height: 1.35; padding: 6px 9px; }
    .th b { font-size: 12.5px; }

    .qbar { left: max(6px, env(safe-area-inset-left)); bottom: 124px; gap: 4px; }
    .qbar button, .touch .qbar button { height: 34px; padding: 0 10px; font-size: 0; gap: 0; }
    .qbar button i { font-size: 16px; }
    /* on a phone the bar is one row that slides sideways: wrapped onto two or three rows it covered the battlefield */
    .touch .qbar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-width: calc(100vw - 12px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
    .touch .qbar::-webkit-scrollbar { display: none; }
    .touch .qbar button { flex: 0 0 auto; }
    .qbar .tv.grp, .touch .qbar .tv.grp { min-width: 32px; padding: 0 7px; }
    .qbar .tv.grp i { font-size: 14px; font-weight: 700; color: #e8efe9; }
    .qbar .tq, .qbar .tx, .qbar .tgo, .touch .qbar .tq, .touch .qbar .tx, .touch .qbar .tgo { font-size: 11px; gap: 5px; }
    .modehint { bottom: 164px; max-width: 92vw; padding: 4px 10px; font-size: 11px; text-align: center; }
    .chatbar { bottom: 164px; left: max(6px, env(safe-area-inset-left)); }
    .replaybar { bottom: 124px; padding: 5px 8px; }
    .rp-sides { display: none; }

    .modal { padding: 14px 16px; max-height: 96dvh; }
    .modal h2 { font-size: 16px; margin-bottom: 4px; }
    .modal.pause { width: min(390px, 94vw); gap: 6px; }
    .modal.pause > .btn { padding: 8px 14px; }
    .setup { max-height: 98dvh; }
    .modal.howto { height: 98dvh; }
    .ht-head { padding: 6px 12px 5px 16px; } .ht-head h2 { font-size: 15px; } .ht-head .kicker { display: none; }
    .ht-body { grid-template-columns: 1fr; }
    .ht-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; flex: none; }
    .ht-nav small { display: none; } .ht-nav button { border-left: 0; padding: 6px 10px; white-space: nowrap; gap: 6px; } .ht-nav i { font-size: 14px; width: auto; } .ht-nav b { font-size: 11px; }
    .ht-page { padding: 10px 14px 14px; } .ht-page h3 { font-size: 17px; } .ht-lead { font-size: 13px; margin-bottom: 10px; }
    .ht-foot { padding: 5px 12px; }
    .setup-head { padding: 7px 14px 6px; gap: 12px; }
    .setup-head h2 { font-size: 15px; }
    .setup-head .kicker { display: none; }
    .setup-grid { padding: 10px 14px; gap: 14px; }
    .setup-foot { flex-direction: row; align-items: center; padding: 6px 14px; gap: 10px; }
    .btn.start { padding: 9px 26px; font-size: 14px; }
    /* the main menu in two columns, so that every entry is on the screen at once */
    .main-col { width: 100%; padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); }
    .mnav { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; margin-top: 2px; }
    .mnav button { padding: 6px 8px 6px 10px; }
    .mnav b { font-size: 14px; }
    .mnav small { font-size: 10.5px; margin-top: 0; }
    .title-block { margin-bottom: 70px; }
    .title-block .emblem { width: 64px; height: 64px; margin-bottom: 6px; }
    .title-block h1 { font-size: clamp(34px, 7vw, 56px); margin: 4px 0; }
    .begin { margin-top: 10px; font-size: 12px; }
    .brand { gap: 12px; margin-top: 0; }
    .brand .emblem { width: 40px; height: 40px; }
    .brand h1 { font-size: 24px; margin-top: 0; }
    .brand h1 span { display: inline; }
    .splash-foot { bottom: 8px; }
}
@media (max-height: 560px) and (max-width: 620px) {
    .card { width: 256px; grid-template-columns: repeat(5, 46px); }
    .statbtn { display: none; }
}
/* a phone held upright has no room for the battle: ask for it to be turned */
@media (orientation: portrait) and (max-width: 600px) {
    .touch .rotate { position: absolute; inset: 0; z-index: 18; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: #070a09f2; }
    .rotate i { font-style: normal; font-size: 54px; color: var(--brass2); animation: spin 3.2s linear infinite; }
    .rotate b { font-size: 17px; letter-spacing: .14em; text-transform: uppercase; }
    .rotate span { color: var(--dim); font-size: 13px; }
}

/* the bottom panel put out of the way: what stood above it comes down to the edge of the screen */
body:has(.hud-bottom.gone) .qbar, body:has(.hud-bottom.gone) .replaybar { bottom: max(8px, env(safe-area-inset-bottom)); }
body:has(.hud-bottom.gone) .modehint, body:has(.hud-bottom.gone) .chatbar { bottom: calc(max(8px, env(safe-area-inset-bottom)) + 44px); }
body:has(.hud-bottom.gone) .mission { max-height: calc(100dvh - 52px - 56px); }
.mis-tip p.mis-touch { color: var(--brass2); font-size: 11px; }
.qbar .tv.on {background: linear-gradient(#5a6a3a, #3a4a26); border-color: var(--brass2); color: #fff; }
/* the mission briefing on a short screen: it scrolls, and Begin stays in reach at the bottom */
@media (max-height: 560px) {
    .modal.brief { grid-template-columns: 1fr; overflow: hidden auto; }
    .brief-map { display: none; }
    .brief-body { padding: 10px 16px 0; }
    .brief-body h2 { font-size: 17px; margin: 0 0 4px; }
    .brief-body p { font-size: 12.5px; line-height: 1.45; margin-bottom: 8px; }
    .brief-note { font-size: 11.5px; padding: 6px 10px; margin-bottom: 8px; }
    .mis-learn { margin-bottom: 8px; }
    .brief-body .row { position: sticky; bottom: 0; margin: 0 -16px; padding: 8px 16px; background: #0e1412f7; border-top: 1px solid var(--line); }
    /* the objectives in battle: only the one in hand, so that the panel does not cover half the view */
    .mis-steps li.todo, .mis-steps li.done { display: none; }
    .mis-steps { padding: 5px 10px 3px; } .mis-head { padding: 6px 10px 5px; } .mis-tip { margin: 2px 8px 8px; padding: 6px 9px; }
    .mis-grid { padding: 10px 14px; gap: 10px; }
    .mis-info p { -webkit-line-clamp: 3; }
}
