:root {
    color-scheme: dark;
    --ink: #07111d;
    --ink-soft: #0b1927;
    --panel: rgba(13, 27, 42, 0.94);
    --panel-light: #112237;
    --line: rgba(158, 190, 218, 0.15);
    --line-bright: rgba(242, 202, 117, 0.3);
    --text: #edf5fb;
    --muted: #8fa6b9;
    --gold: #f4c66a;
    --gold-bright: #ffe29a;
    --cyan: #83d9ed;
    --mint: #80dfbd;
    --rose: #fa7786;
    --purple: #be9bff;
    --shadow: 0 22px 60px rgba(0, 0, 0, .32);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); scroll-behavior: smooth; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(ellipse at 76% -18%, rgba(64, 133, 153, .20), transparent 48%),
        radial-gradient(ellipse at 3% 20%, rgba(170, 123, 56, .09), transparent 33%),
        linear-gradient(155deg, #07111d 0%, #091725 46%, #07121e 100%);
}
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.app-shell { width: min(1520px, calc(100% - 48px)); margin: 0 auto; }
.topbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-emblem {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px;
    color: #17130b; font-size: 23px; background: linear-gradient(145deg, #ffe7a2, #d59c42);
    box-shadow: 0 0 28px rgba(244, 198, 106, .22);
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 13px; letter-spacing: .16em; }
.brand-copy small { color: var(--muted); font: 9px 'DM Mono', monospace; letter-spacing: .12em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button {
    min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(255,255,255,.025); color: #c6d5e1; text-decoration: none;
    font-size: 12px; cursor: pointer; transition: .18s ease;
}
.icon-button:hover { border-color: var(--line-bright); color: var(--gold-bright); background: rgba(255,255,255,.055); }
.icon-button > span { font-size: 11px; }

.intro-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 32px 0 26px; }
.eyebrow { margin: 0 0 7px; color: var(--gold); font: 500 10px 'DM Mono', monospace; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.055em; font-weight: 800; }
h1 span { color: var(--gold-bright); text-shadow: 0 0 36px rgba(244,198,106,.2); }
.intro-copy { margin: 11px 0 0; color: #a8bac8; font-size: 14px; }
.campaign-badge { display: flex; align-items: center; gap: 11px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.badge-star { color: var(--gold); font-size: 21px; }
.campaign-badge div { display: flex; flex-direction: column; gap: 2px; }
.campaign-badge strong { font-size: 16px; line-height: 1; }
.campaign-badge small { color: var(--muted); font: 9px 'DM Mono', monospace; letter-spacing: .1em; }

.map-section { margin-bottom: 16px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.section-heading h2, .panel h2, .board-header h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.section-heading .eyebrow { margin-bottom: 3px; }
.unlock-hint { margin: 0 0 2px; color: var(--muted); font-size: 11px; }
.map-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.map-card {
    position: relative; min-height: 76px; overflow: hidden; display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; text-align: left; border: 1px solid var(--line); border-radius: 13px;
    background: linear-gradient(115deg, rgba(18,35,53,.92), rgba(12,26,40,.92)); cursor: pointer; transition: .2s ease;
}
.map-card::after { content: ''; position: absolute; width: 92px; height: 92px; right: -25px; top: -43px; border-radius: 50%; background: var(--map-glow, rgba(244,198,106,.13)); filter: blur(8px); pointer-events: none; }
.map-card:hover:not(:disabled) { border-color: rgba(244,198,106,.44); transform: translateY(-1px); }
.map-card.active { border-color: rgba(244,198,106,.72); box-shadow: inset 0 0 0 1px rgba(244,198,106,.12), 0 8px 24px rgba(0,0,0,.18); }
.map-card:disabled { cursor: not-allowed; opacity: .55; filter: saturate(.7); }
.map-card[data-biome="meadow"] { --map-glow: rgba(119,203,153,.18); }
.map-card[data-biome="ember"] { --map-glow: rgba(239,126,91,.2); }
.map-card[data-biome="moonlit"] { --map-glow: rgba(124,148,255,.2); }
.map-art { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.055); color: var(--map-accent, var(--gold)); font-size: 18px; }
.map-card[data-biome="meadow"] .map-art { --map-accent: #9ce3ae; }
.map-card[data-biome="ember"] .map-art { --map-accent: #ff9a72; }
.map-card[data-biome="moonlit"] .map-art { --map-accent: #a9b6ff; }
.map-card-copy { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.map-card-copy strong { font-size: 12px; }
.map-card-copy small { color: var(--muted); font-size: 10px; }
.map-card-status { position: relative; z-index: 1; margin-left: auto; color: var(--gold); font: 9px 'DM Mono', monospace; text-align: right; text-transform: uppercase; white-space: nowrap; }
.map-card-status.complete { color: var(--mint); }

.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.stat-card { min-height: 67px; display: flex; align-items: center; gap: 11px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(11, 25, 39, .72); }
.stat-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 10px; background: rgba(244,198,106,.1); color: var(--gold); font-size: 17px; }
.stat-card div { min-width: 0; display: grid; gap: 2px; }
.stat-card small { color: var(--muted); font: 9px 'DM Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.stat-card strong { font-size: 16px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gold-stat .stat-icon { color: var(--gold); }
.core-stat .stat-icon { color: var(--rose); background: rgba(250,119,134,.1); }
.core-stat strong { color: #ffc5cb; }
.wave-icon { color: var(--cyan); background: rgba(131,217,237,.09); }
.score-icon { color: var(--purple); background: rgba(190,155,255,.1); }
.kill-icon { color: var(--mint); background: rgba(128,223,189,.1); }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 326px; align-items: start; gap: 14px; }
.battle-column, .side-column { display: grid; gap: 12px; min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); }
.board-card { overflow: hidden; }
.board-header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; }
.board-header .eyebrow { margin-bottom: 3px; }
.board-header h2 { font-size: 16px; }
.map-description { max-width: 590px; margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.wave-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; color: #bacbd8; font: 9px 'DM Mono', monospace; letter-spacing: .07em; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(128,223,189,.7); }
.wave-status[data-phase="wave"] .status-dot { background: var(--rose); box-shadow: 0 0 10px rgba(250,119,134,.8); animation: pulse-dot 1s infinite alternate; }
.wave-status[data-phase="paused"] .status-dot { background: var(--gold); box-shadow: 0 0 10px rgba(244,198,106,.6); }
.wave-status[data-phase="defeat"] .status-dot { background: var(--rose); }
.wave-status[data-phase="victory"] .status-dot { background: var(--mint); }
@keyframes pulse-dot { from { opacity: .6; } to { opacity: 1; } }
.canvas-frame { position: relative; overflow: hidden; margin: 0 9px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: #0b1b24; }
#gameCanvas { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; touch-action: none; cursor: crosshair; }
.canvas-frame.is-placement #gameCanvas { cursor: copy; }
.canvas-frame.is-ability #gameCanvas { cursor: cell; }
.board-toast { position: absolute; z-index: 2; top: 14px; left: 50%; max-width: calc(100% - 30px); padding: 9px 14px; border: 1px solid rgba(244,198,106,.27); border-radius: 9px; background: rgba(6,15,24,.91); box-shadow: 0 9px 28px rgba(0,0,0,.35); color: #f6e1b0; font-size: 11px; text-align: center; opacity: 0; transform: translate(-50%, -6px); pointer-events: none; transition: .2s ease; }
.board-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.board-hint { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 6px 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(5,13,21,.78); color: #c4d3dc; font-size: 9px; pointer-events: none; backdrop-filter: blur(5px); }
.hint-key { color: var(--gold); font: 9px 'DM Mono', monospace; letter-spacing: .08em; }
.wave-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px 12px; }
.wave-progress-row > div:first-child { display: grid; gap: 2px; }
.wave-progress-row span { color: var(--muted); font: 9px 'DM Mono', monospace; letter-spacing: .09em; }
.wave-progress-row strong { color: #d6e3eb; font-size: 10px; font-weight: 600; }
.progress-track { width: min(45%, 230px); height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #80dfbd, #f4c66a); transition: width .25s ease; }

.control-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; }
.control-copy { min-width: 0; display: grid; gap: 3px; }
.control-copy .eyebrow { margin: 0; }
.control-copy strong { font-size: 13px; }
.control-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.control-actions { display: flex; align-items: center; gap: 7px; }
.button { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 700; cursor: pointer; transition: .17s ease; white-space: nowrap; }
.button:disabled { opacity: .42; cursor: not-allowed; filter: saturate(.65); }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { border-color: rgba(255,226,154,.65); background: linear-gradient(135deg, #f4cf7e, #dca84e); color: #201a0d; box-shadow: 0 6px 20px rgba(202,151,68,.14); }
.button-primary:not(:disabled):hover { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(202,151,68,.23); }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.035); color: #cedbe4; }
.button-secondary:not(:disabled):hover { border-color: rgba(131,217,237,.37); color: var(--cyan); }
.button-secondary.is-active { border-color: rgba(244,198,106,.48); background: rgba(244,198,106,.09); color: var(--gold-bright); }
.button-quiet { border-color: var(--line); background: rgba(255,255,255,.025); color: #c1ced8; }
.button-quiet:not(:disabled):hover { border-color: rgba(250,119,134,.4); color: #ffabb4; }
.button-small { min-height: 34px; padding: 0 10px; font-size: 10px; }
.button-ability { width: 100%; border-color: rgba(190,155,255,.35); background: rgba(190,155,255,.09); color: #decaff; }
.button-ability:not(:disabled):hover { border-color: var(--purple); background: rgba(190,155,255,.16); }
.button-ability.armed { border-color: rgba(222,202,255,.8); background: rgba(190,155,255,.2); box-shadow: 0 0 22px rgba(190,155,255,.16); }
#canvasFrame:fullscreen { width: 100vw; height: 100vh; margin: 0; border: 0; border-radius: 0; display: grid; place-items: center; background: #050b12; }
#canvasFrame:fullscreen #gameCanvas { width: min(100vw, 160vh); max-height: 100vh; object-fit: contain; }
kbd { min-width: 18px; padding: 2px 4px; border: 1px solid rgba(222,202,255,.28); border-radius: 4px; color: #eadfff; font: 9px 'DM Mono', monospace; }

.side-column .panel { padding: 15px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-title-row .eyebrow { margin-bottom: 4px; }
.panel-title-row h2 { font-size: 14px; }
.tower-count-chip { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: #b8c9d5; font: 9px 'DM Mono', monospace; }
.panel-subtitle { margin: 8px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.tower-shop { display: grid; gap: 7px; }
.tower-choice {
    width: 100%; min-height: 57px; display: grid; grid-template-columns: 37px minmax(0,1fr) auto; align-items: center; gap: 9px;
    padding: 7px 9px; border: 1px solid rgba(158,190,218,.12); border-radius: 10px; background: rgba(255,255,255,.023); text-align: left; cursor: pointer; transition: .16s ease;
}
.tower-choice:hover { border-color: rgba(244,198,106,.38); background: rgba(255,255,255,.045); }
.tower-choice.active { border-color: rgba(244,198,106,.75); background: linear-gradient(100deg, rgba(244,198,106,.12), rgba(255,255,255,.025)); box-shadow: inset 0 0 0 1px rgba(244,198,106,.1); }
.tower-choice.unaffordable .tower-price { color: #91a0ac; }
.tower-glyph { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--tower-color), transparent 70%); border-radius: 11px; background: color-mix(in srgb, var(--tower-color), transparent 91%); color: var(--tower-color); font-size: 18px; }
.tower-choice-copy { min-width: 0; display: grid; gap: 3px; }
.tower-choice-copy strong { overflow: hidden; color: #e7eff4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tower-choice-copy small { color: var(--muted); font-size: 9px; }
.tower-price { color: var(--gold-bright); font: 500 10px 'DM Mono', monospace; white-space: nowrap; }
.tower-choice:disabled { opacity: .42; cursor: not-allowed; }

.detail-panel { min-height: 139px; }
.detail-rank { padding: 5px 7px; border-radius: 7px; background: rgba(244,198,106,.1); color: var(--gold); font: 9px 'DM Mono', monospace; white-space: nowrap; }
.detail-copy { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 11px; }
.detail-stat { padding: 8px 7px; border-radius: 8px; background: rgba(255,255,255,.035); text-align: center; }
.detail-stat strong { display: block; color: #e9f2f7; font: 500 12px 'DM Mono', monospace; }
.detail-stat small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.priority-control { display: grid; gap: 7px; margin-top: 11px; }
.priority-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.priority-heading span { color: #d9e5ed; font-size: 9px; font-weight: 700; }
.priority-heading small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.priority-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.priority-choice { min-height: 30px; padding: 0 5px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); color: #aebfcb; font-size: 9px; cursor: pointer; transition: .15s ease; }
.priority-choice:hover { border-color: rgba(244,198,106,.4); color: var(--gold-bright); }
.priority-choice[aria-pressed="true"] { border-color: rgba(244,198,106,.56); background: rgba(244,198,106,.1); color: var(--gold-bright); box-shadow: inset 0 0 0 1px rgba(244,198,106,.08); }
.detail-actions { display: flex; gap: 7px; margin-top: 10px; }
.detail-actions .button:first-child { flex: 1; }
.hidden { display: none !important; }

.ability-panel { display: grid; grid-template-columns: 38px minmax(0,1fr); column-gap: 10px; row-gap: 11px; align-items: start; }
.ability-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(190,155,255,.22); border-radius: 12px; background: rgba(190,155,255,.08); color: #d9c4ff; font-size: 21px; }
.ability-copy .eyebrow { margin-bottom: 3px; }
.ability-copy h2 { font-size: 13px; }
.ability-copy p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.ability-panel .button-ability { grid-column: 1 / -1; }
.field-guide .guide-icon { color: var(--cyan); font-size: 20px; }
.field-guide ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.field-guide li { display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 8px; align-items: start; }
.field-guide li > span { padding-top: 1px; color: var(--gold); font: 9px 'DM Mono', monospace; }
.field-guide li p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.field-guide li strong { color: #dce8ef; font-size: 9px; }
.hotkey-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.hotkey-note kbd { min-width: 0; padding: 2px 4px; }
.save-panel { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.save-panel .eyebrow { margin-bottom: 4px; }
.save-panel strong { color: #bdcbd5; font-size: 9px; font-weight: 500; }
.save-actions { display: flex; align-items: center; gap: 8px; }
.text-button { padding: 4px 0; border: 0; background: none; color: var(--cyan); font-size: 9px; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: #c8f6ff; text-decoration: underline; }
.danger-text { color: #e48b97; }
.danger-text:hover { color: #ffb0bb; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 2px 26px; color: #718698; font: 9px 'DM Mono', monospace; letter-spacing: .04em; }
.page-footer i { color: var(--gold); font-style: normal; }

.modal-overlay { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(2,8,14,.78); backdrop-filter: blur(9px); }
.result-card { width: min(410px, 100%); padding: 28px; border: 1px solid rgba(244,198,106,.38); border-radius: 20px; background: linear-gradient(145deg, #102237, #091522); box-shadow: 0 28px 100px rgba(0,0,0,.55), 0 0 60px rgba(244,198,106,.08); text-align: center; animation: arrive .25s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.result-emblem { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 14px; border: 1px solid rgba(244,198,106,.4); border-radius: 17px; background: rgba(244,198,106,.1); color: var(--gold-bright); font-size: 28px; }
.result-card .eyebrow { margin-bottom: 6px; }
.result-card h2 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.result-stars { margin: 12px 0 4px; color: #6d8291; font-size: 19px; letter-spacing: .14em; }
.result-stars[data-stars="1"] { color: #f4c66a; }
.result-stars[data-stars="2"] { color: #f4c66a; }
.result-stars[data-stars="3"] { color: #ffe29a; text-shadow: 0 0 18px rgba(244,198,106,.25); }
.result-copy { max-width: 320px; margin: 9px auto 17px; color: #a7b9c7; font-size: 12px; line-height: 1.6; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 19px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.result-stats span { display: grid; gap: 4px; color: var(--muted); font: 8px 'DM Mono', monospace; letter-spacing: .1em; }
.result-stats span + span { border-left: 1px solid var(--line); }
.result-stats strong { color: #f4f7f9; font: 600 17px 'Manrope', sans-serif; }
.result-actions { display: grid; gap: 8px; }
.result-actions .button { min-height: 41px; }

@media (max-width: 1120px) {
    .game-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .app-shell { width: min(100% - 34px, 1520px); }
    .control-panel { align-items: flex-start; flex-direction: column; }
    .control-actions { width: 100%; }
}
@media (max-width: 850px) {
    .game-layout { grid-template-columns: minmax(0, 1fr); }
    .side-column { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
    .tower-panel { grid-row: span 2; }
    .field-guide { grid-column: 1; }
    .save-panel { grid-column: 2; }
    .stat-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .stat-card:nth-child(n+4) { min-height: 58px; }
    .control-panel { align-items: center; flex-direction: row; }
    .control-actions { width: auto; }
}
@media (max-width: 600px) {
    .app-shell { width: calc(100% - 22px); }
    .topbar { min-height: 62px; }
    .brand-emblem { width: 35px; height: 35px; }
    .brand-copy strong { font-size: 11px; }
    .brand-copy small { font-size: 8px; }
    .topbar-actions { gap: 5px; }
    .icon-button { min-width: 36px; min-height: 35px; padding: 0 8px; font-size: 13px; }
    .icon-button > span { display: none; }
    .intro-row { align-items: center; padding: 24px 0 20px; }
    h1 { font-size: 32px; }
    .intro-copy { max-width: 250px; font-size: 11px; line-height: 1.5; }
    .campaign-badge { gap: 7px; padding: 8px 9px; }
    .campaign-badge strong { font-size: 14px; }
    .campaign-badge small { max-width: 65px; font-size: 7px; line-height: 1.4; }
    .badge-star { font-size: 17px; }
    .section-heading { align-items: start; }
    .unlock-hint { max-width: 145px; text-align: right; font-size: 9px; line-height: 1.45; }
    .map-selector { gap: 6px; }
    .map-card { min-height: 72px; gap: 7px; padding: 8px 6px; border-radius: 10px; }
    .map-art { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; font-size: 14px; }
    .map-card-copy strong { font-size: 9px; line-height: 1.25; }
    .map-card-copy small { display: none; }
    .map-card-status { display: none; }
    .stat-strip { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
    .stat-card { min-height: 56px; gap: 7px; padding: 8px; border-radius: 10px; }
    .stat-icon { width: 26px; height: 26px; flex-basis: 26px; border-radius: 8px; font-size: 14px; }
    .stat-card small { font-size: 7px; letter-spacing: .04em; }
    .stat-card strong { font-size: 12px; }
    .stat-card:nth-child(n+4) { min-height: 50px; }
    .game-layout { gap: 9px; }
    .battle-column, .side-column { gap: 9px; }
    .board-header { min-height: 65px; padding: 10px 11px; }
    .board-header h2 { font-size: 14px; }
    .board-header .eyebrow { max-width: 220px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
    .map-description { max-width: 255px; font-size: 9px; }
    .wave-status { gap: 5px; padding: 6px 7px; font-size: 7px; }
    .status-dot { width: 6px; height: 6px; }
    .canvas-frame { margin: 0 5px; border-radius: 8px; }
    .board-hint { left: 6px; bottom: 6px; gap: 5px; padding: 4px 6px; font-size: 7px; }
    .hint-key { font-size: 7px; }
    .board-toast { top: 8px; padding: 7px 10px; font-size: 9px; }
    .wave-progress-row { padding: 8px 10px 10px; }
    .wave-progress-row span { font-size: 7px; }
    .wave-progress-row strong { font-size: 9px; }
    .progress-track { width: 36%; }
    .control-panel { align-items: stretch; flex-direction: column; gap: 9px; padding: 11px; }
    .control-copy strong { font-size: 12px; }
    .control-copy small { font-size: 9px; }
    .control-actions { display: grid; grid-template-columns: 1.35fr .8fr .8fr .85fr; gap: 5px; }
    .button { min-height: 35px; gap: 4px; padding: 0 7px; font-size: 9px; }
    .side-column { grid-template-columns: minmax(0,1fr); }
    .side-column .panel { padding: 12px; }
    .tower-panel, .field-guide, .save-panel { grid-row: auto; grid-column: auto; }
    .tower-shop { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
    .tower-choice { min-height: 56px; grid-template-columns: 29px minmax(0,1fr); gap: 6px; padding: 6px; }
    .tower-glyph { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
    .tower-choice-copy strong { font-size: 9px; }
    .tower-choice-copy small { font-size: 8px; }
    .tower-price { grid-column: 2; justify-self: start; margin-top: -2px; font-size: 8px; }
    .panel-title-row h2 { font-size: 13px; }
    .panel-subtitle { font-size: 9px; }
    .detail-copy { font-size: 9px; }
    .page-footer { align-items: start; flex-direction: column; gap: 6px; padding: 18px 2px 22px; font-size: 8px; }
    .result-card { padding: 23px 19px; }
    .result-card h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
