:root{color-scheme:dark;--night:#171819;--night-2:#202120;--wood:#352e28;--panel:#242521;--panel-high:#34372e;--ink:#f1e8d3;--muted:#b9baaa;--faint:#919585;--gold:#efbd7d;--gold-dark:#a3754b;--jade:#a3c59d;--red:#e99d89;--electric:#a9d5d0;--heat:#efae77;--line:#4c4d40;--shadow:0 14px 42px #00000038;--radius:16px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif;line-height:1.55;font-synthesis:none;font-size:15px}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 48% 0%,#31524580,transparent 58%),var(--night);color:var(--ink);min-height:100svh}button,input,select{font:inherit}button{color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:4px}button{touch-action:manipulation}a{color:var(--jade)}svg{display:block;max-width:100%}.grain{position:fixed;inset:0;pointer-events:none;z-index:10;opacity:.04;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.5' filter='url(%23n)'/%3E%3C/svg%3E")}.topbar{max-width:1216px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px 32px 18px;border-bottom:1px solid #354a3c88}.brand{display:flex;align-items:center;gap:12px;text-align:left;background:transparent;border:0;padding:0}.brand-mark{width:48px;height:48px;flex-shrink:0}.brand-type strong{font-size:18px;letter-spacing:-.6px;display:block;color:var(--gold)}.brand-type small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted);margin-top:2px}.top-actions{display:flex;gap:8px}.icon-button{width:40px;height:40px;display:grid;place-items:center;background:transparent;border:1px solid transparent;border-radius:10px;color:var(--muted);transition:background .15s,color .15s}.icon-button:hover{background:var(--panel-high);color:var(--gold)}.icon-button svg{width:21px;height:21px}.app-shell{max-width:1216px;margin:auto;padding:30px 32px 24px}.site-footer{max-width:1216px;margin:8px auto 0;padding:18px 32px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--faint);font-size:12px}.site-footer button{border:0;background:transparent;color:var(--faint);padding:8px}.eyebrow{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;letter-spacing:2.5px;color:var(--gold);text-transform:uppercase}.eyebrow:before{content:"";width:24px;height:1px;background:var(--gold-dark)}h1,h2,h3,p{margin:0}h1{font-size:clamp(34px,4.2vw,57px);line-height:1.25;letter-spacing:-2px;font-weight:800}h2{font-size:25px;letter-spacing:-.8px;line-height:1.35}h3{font-size:16px;letter-spacing:-.3px}.muted{color:var(--muted)}.text-small{font-size:12px}.gold{color:var(--gold)}.jade{color:var(--jade)}.mono{font-variant-numeric:tabular-nums}.home-hero{display:grid;grid-template-columns:1.03fr 1fr;gap:24px;align-items:center;margin-bottom:28px;min-height:260px}.hero-copy{max-width:500px}.hero-copy h1{margin:14px 0 17px}.hero-copy h1 em{font-style:normal;color:var(--gold)}.hero-copy>p{color:var(--muted);line-height:1.8;max-width:420px}.hero-art{position:relative;min-width:0;display:grid;place-items:center;min-height:290px}.hero-art:before{content:"";position:absolute;inset:10% 15%;border-radius:50%;background:radial-gradient(ellipse,#ddb2631c,transparent 72%)}.hero-art>svg{width:100%;max-width:480px;filter:drop-shadow(0 14px 30px #07130d60)}.hero-caption{position:absolute;bottom:0;font-size:11px;letter-spacing:1px;color:var(--faint)}.profile-strip{display:flex;gap:22px;flex-wrap:wrap;margin-top:24px}.profile-stat{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}.profile-stat svg{width:19px;height:19px;color:var(--gold)}.profile-stat strong{color:var(--ink);font-size:16px}.home-bottom{display:grid;grid-template-columns:1.7fr 1fr;gap:22px;align-items:start}.panel{background:linear-gradient(145deg,#37362c99,#22262099);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.start-panel{padding:24px}.section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.section-header>span{font-size:11px;letter-spacing:1.4px;color:var(--faint);text-transform:uppercase}.loadout-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.loadout-card{position:relative;text-align:left;padding:14px 12px;border:1px solid var(--line);border-radius:12px;background:#1c201c8c;min-width:0;transition:background .15s,border-color .15s,transform .15s}.loadout-card:hover{transform:translateY(-2px);background:#294233}.loadout-card[aria-pressed=true]{border-color:var(--gold);background:#38523d88;box-shadow:inset 0 0 0 1px #c6a76b30}.loadout-card .loadout-art{height:78px;display:grid;place-items:center;margin-bottom:7px}.loadout-art svg{height:82px;width:90px}.loadout-card strong{display:block;font-size:14px}.loadout-card .loadout-description{font-size:11px;color:var(--muted);margin-top:4px;min-height:34px}.loadout-items{display:flex;gap:3px;margin-top:9px}.loadout-items svg{height:26px;width:26px}.selection-dot{position:absolute;top:10px;right:10px;width:13px;height:13px;border:1px solid var(--faint);border-radius:50%}.loadout-card[aria-pressed=true] .selection-dot{border-color:var(--gold);background:var(--gold);box-shadow:inset 0 0 0 3px var(--panel)}.difficulty-row{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:20px 0 18px}.difficulty-row label{font-size:12px;color:var(--muted)}.segmented{display:flex;padding:3px;background:#1a201c;border:1px solid var(--line);border-radius:9px;gap:2px}.segmented button{border:0;background:transparent;color:var(--muted);padding:6px 13px;border-radius:6px;font-size:12px;min-height:34px}.segmented button[aria-pressed=true]{color:var(--gold);background:var(--panel-high)}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 18px;min-height:46px;border:1px solid var(--line);border-radius:10px;background:var(--panel-high);color:var(--ink);font-weight:650;font-size:14px;transition:transform .12s,background .12s}.button svg{width:18px;height:18px}.button:hover:not(:disabled){background:#3b5540;transform:translateY(-1px)}.button.primary{background:var(--gold);color:#273325;border-color:#efc788;box-shadow:0 3px 0 var(--gold-dark)}.button.primary:hover:not(:disabled){background:#edc88b}.button.danger{color:var(--red)}.button.subtle{background:transparent;border-color:transparent;color:var(--muted)}.button.small{font-size:12px;padding:8px 12px;min-height:36px}.button.full{width:100%}.start-actions{display:grid;gap:10px}.button.resume{border-color:var(--jade);color:var(--jade);background:#243e32}.start-note{font-size:11px;color:var(--faint);text-align:center;margin-top:14px}.side-stack{display:grid;gap:14px}.mode-card{padding:21px;text-align:left;width:100%;color:inherit;position:relative}.mode-card .eyebrow{font-size:9px;letter-spacing:2px;margin-bottom:9px}.mode-card h3{margin-bottom:8px}.mode-card p{font-size:12px;color:var(--muted);max-width:260px}.mode-card .mode-symbol{position:absolute;right:18px;top:22px;color:var(--gold);opacity:.6}.mode-symbol svg{width:27px;height:27px}.mode-card:hover{border-color:var(--gold-dark)}.intro-lines{display:grid;gap:10px;padding:2px 4px;margin-top:2px}.intro-line{display:flex;gap:9px;font-size:12px;color:var(--muted)}.intro-line span:first-child{color:var(--gold);font-variant-numeric:tabular-nums}.run-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:24px;align-items:start;max-width:1040px;margin:auto}.run-heading{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:-5px}.run-heading-left{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.run-title{font-size:19px;letter-spacing:-.5px}.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border:1px solid var(--line);border-radius:20px;font-size:10px;color:var(--muted);background:#25292380;white-space:nowrap}.run-resources{display:flex;align-items:center;gap:18px}.resource{display:flex;align-items:center;gap:6px;font-size:18px;font-weight:750;font-variant-numeric:tabular-nums}.resource svg{height:19px;width:19px}.resource.hp{color:var(--red)}.resource.coins{color:var(--gold)}.round-track{display:flex;align-items:center;gap:5px;margin-bottom:16px}.round-step{height:5px;flex:1;background:#2b4539;border-radius:5px}.round-step.done{background:var(--jade)}.round-step.current{background:var(--gold)}.round-step.boss{height:8px}.game-stage{position:relative;isolation:isolate}.battle-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:7}.enemy-panel{position:relative;display:grid;grid-template-columns:1fr 160px;gap:10px;align-items:center;min-height:175px;padding:20px 22px;margin-bottom:18px;overflow:hidden;background:radial-gradient(ellipse at 82% 80%,#77967e1f,transparent 60%),linear-gradient(120deg,#1b302a,#142720)}.enemy-panel:after{content:"";position:absolute;bottom:0;left:0;right:0;height:28px;background:linear-gradient(transparent,#0c211955);pointer-events:none}.enemy-copy{position:relative;z-index:2}.enemy-copy .eyebrow{font-size:9px;letter-spacing:2px;margin-bottom:8px}.enemy-name{font-size:21px;font-weight:750;letter-spacing:-.5px;margin-bottom:8px}.enemy-description{color:var(--muted);font-size:12px;line-height:1.6;margin:9px 0 0;max-width:310px}.enemy-art{display:grid;place-items:center;position:relative;z-index:2;min-width:0;transform-origin:50% 80%;transition:filter .12s}.enemy-art svg{height:140px;width:170px}.enemy-art.hit{animation:enemy-hit .17s}.enemy-art.defeated{opacity:.55;filter:grayscale(.3);transform:rotate(7deg)}@keyframes enemy-hit{25%{transform:translateX(4px) rotate(2deg);filter:brightness(1.6)}75%{transform:translateX(-3px) rotate(-1deg)}}.health-bar{height:7px;background:#1c1f1c;border-radius:5px;overflow:hidden;margin-top:10px;position:relative}.health-fill{height:100%;background:var(--red);width:100%;border-radius:5px;transition:width .12s}.enemy-hp{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin-top:6px}.enemy-flags{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.enemy-flags .pill{font-size:10px;padding:2px 7px}.battle-clock{color:var(--gold);font-weight:700}.enraged{border-color:#9d604d}.enraged .enemy-copy .eyebrow{color:var(--red)}.workbench{position:relative;padding:17px 20px 20px;background:linear-gradient(145deg,#37513c,#23392d);border:1px solid #597052;border-radius:18px;box-shadow:inset 0 0 0 4px #172b2299,0 12px 30px #06130e66}.bench-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;color:#c6d2b9}.bench-label{font-size:12px;font-weight:700;display:flex;align-items:center;gap:7px}.bench-label svg{height:18px;width:18px;color:var(--gold)}.bench-caption{font-size:10px;color:#a4b797}.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;max-width:440px;margin:auto;touch-action:none}.board-cell{position:relative;min-width:0;aspect-ratio:1/1.08;border:1px solid #576148;border-radius:10px;background:linear-gradient(145deg,#344333,#27382a);box-shadow:inset 0 2px 4px #1424197a,0 2px 0 #162819;padding:3px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;transition:background .14s,border-color .14s,transform .12s;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.board-cell:before,.board-cell:after{content:"";position:absolute;width:4px;height:4px;background:#89947166;border-radius:50%;top:5px;left:5px;box-shadow:0 1px 1px #091a13}.board-cell:after{top:auto;left:auto;bottom:5px;right:5px}.board-cell.empty{border-style:dashed;border-color:#62765355;background:#20322566;box-shadow:inset 0 1px 6px #12241844}.cell-plus{color:#89a67955;font-size:22px;font-weight:300;line-height:1}.board-cell:hover{background:#3e533a}.board-cell.selected{border-color:var(--gold);background:#53603a;box-shadow:inset 0 0 0 2px #e0b77155,0 0 18px #e0b77122}.board-cell.neighbor{border-color:var(--electric);background:#3a4f4380}.board-cell.merge-target{border-color:var(--jade);box-shadow:inset 0 0 0 2px #91c5a233}.cell-art{display:flex;align-items:center;justify-content:center;width:78%;flex:1;min-height:0}.cell-art svg{width:100%;height:100%;max-height:75px;filter:drop-shadow(0 3px 2px #071b1660)}.cell-name{font-size:10px;line-height:1.25;color:#ced7be;margin-bottom:5px;max-width:94%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2}.cell-level{position:absolute;top:5px;right:6px;background:#8d7440;color:#fff0bd;font-size:9px;font-weight:800;border-radius:3px;padding:1px 4px;line-height:1.35}.cooldown-bar{position:absolute;left:7px;right:7px;bottom:2px;height:3px;background:#10251ccc;border-radius:2px;overflow:hidden;display:none}.in-battle .cooldown-bar{display:block}.cooldown-fill{height:100%;width:0;background:var(--jade);transition:width .05s linear}.board-cell.fired{animation:module-fire .2s}.board-cell.fired .cell-art{filter:brightness(1.4)}@keyframes module-fire{35%{transform:translateY(-3px) scale(1.025)}100%{transform:none}}.bench-status{display:flex;justify-content:space-between;gap:8px;margin-top:13px;font-size:11px;color:#b5c5a6}.bench-status strong{color:var(--jade);font-weight:650}.coach-line{color:var(--muted);font-size:12px;min-height:30px;margin:13px 4px 5px;text-align:center;line-height:1.6}.combat-controls{display:flex;gap:9px;align-items:center;margin-top:14px}.combat-controls>.primary{flex:1}.speed-button{min-width:60px}.battle-paused{border:1px solid var(--gold-dark);border-radius:10px;background:#28372b;padding:9px 12px;color:var(--gold);font-size:12px;text-align:center;margin-top:12px}.stage-side{display:grid;gap:15px}.shop-panel{padding:19px}.shop-panel .section-header{margin-bottom:13px}.shop-title{font-size:15px}.shop-offers{display:grid;gap:9px}.shop-card{display:grid;grid-template-columns:59px minmax(0,1fr) auto;gap:9px;align-items:center;position:relative;padding:11px 9px;background:#1b201c9e;border:1px solid #4c4d40;border-radius:11px;text-align:left;min-width:0;transition:background .15s,border-color .15s}.shop-card:not(:disabled):hover{background:#2a4332;border-color:var(--gold-dark)}.shop-card.sold{opacity:.32}.shop-icon svg{width:58px;height:58px}.shop-info{min-width:0}.shop-info strong{display:block;font-size:13px;margin-bottom:3px}.shop-info p{font-size:10px;color:var(--muted);line-height:1.5}.shop-price{font-size:14px;font-weight:700;display:flex;align-items:center;gap:3px;color:var(--gold);white-space:nowrap}.shop-price svg{height:14px;width:14px}.shop-footer{display:flex;justify-content:space-between;gap:6px;align-items:center;margin-top:13px}.shop-footer .button{font-size:11px;min-height:34px;padding:7px 9px}.shop-footer>span{font-size:10px;color:var(--faint)}.detail-panel{padding:18px;min-height:178px}.detail-empty{text-align:center;padding:14px 0;color:var(--faint);font-size:12px}.detail-empty svg{width:28px;height:28px;margin:0 auto 9px;color:var(--muted)}.detail-top{display:flex;align-items:center;gap:12px;margin-bottom:12px}.detail-art svg{width:58px;height:58px}.detail-top h3{font-size:16px}.family-label{font-size:10px;color:var(--muted);margin-top:4px}.detail-description{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:10px}.detail-stats{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.stat-chip{background:#1b211d80;border:1px solid #4c4d40;border-radius:6px;padding:4px 7px;font-size:10px;display:flex;gap:4px;align-items:center;color:var(--muted)}.stat-chip strong{color:var(--ink);font-variant-numeric:tabular-nums}.bonus-line{font-size:11px;color:var(--jade);margin-top:4px}.detail-actions{display:flex;gap:6px;margin-top:13px;flex-wrap:wrap}.detail-actions .button{flex:1;font-size:11px;padding:7px 8px;min-height:35px}.hint-panel{padding:16px 18px;font-size:11px;color:var(--muted);line-height:1.7}.hint-panel strong{color:var(--gold);display:block;font-size:12px;margin-bottom:5px}.reward-panel{padding:23px;text-align:center;border-color:var(--gold-dark)}.reward-panel .reward-symbol{height:49px;display:grid;place-items:center;margin-bottom:10px;color:var(--gold)}.reward-symbol svg{height:42px;width:42px}.reward-panel h3{font-size:19px;margin-bottom:8px}.reward-panel p{font-size:12px;color:var(--muted);margin-bottom:18px}.reward-stats{display:flex;justify-content:center;gap:18px;margin:14px 0 20px;font-size:14px;color:var(--gold)}.perk-list{display:grid;gap:10px}.perk-card{padding:15px;text-align:left;border:1px solid var(--line);border-radius:10px;background:#1c241d}.perk-card:hover{border-color:var(--gold)}.perk-card strong{display:block;font-size:14px;color:var(--gold);margin-bottom:5px}.perk-card p{font-size:12px;color:var(--muted)}.results{max-width:850px;margin:auto}.results-hero{text-align:center;padding:18px 12px 25px}.results-art{height:150px;display:grid;place-items:center;margin-bottom:10px}.results-art svg{height:160px;width:200px}.results-hero .eyebrow{justify-content:center}.results-hero h1{font-size:38px;margin:12px 0}.results-hero p{color:var(--muted);font-size:14px;max-width:510px;margin:auto}.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.result-panel{padding:22px}.result-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.result-number{text-align:center}.result-number strong{display:block;font-size:25px;font-weight:750;color:var(--gold);font-variant-numeric:tabular-nums}.result-number span{display:block;font-size:10px;color:var(--muted);margin-top:4px}.mini-board{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;max-width:250px;margin:auto}.mini-cell{aspect-ratio:1;border:1px solid #455840;border-radius:6px;background:#30332a;display:grid;place-items:center;position:relative}.mini-cell svg{width:75%;height:75%}.mini-cell.empty{opacity:.35;border-style:dashed}.damage-list{display:grid;gap:11px;margin-top:16px}.damage-row{display:grid;grid-template-columns:32px 1fr 35px;align-items:center;gap:9px;font-size:11px}.damage-row svg{width:30px;height:30px}.damage-label{display:flex;justify-content:space-between;gap:5px;margin-bottom:4px}.damage-track{height:4px;background:#1a1e1b;border-radius:5px;overflow:hidden}.damage-track span{display:block;height:100%;background:var(--gold);border-radius:5px}.result-actions{display:flex;justify-content:center;gap:10px;margin:24px 0;flex-wrap:wrap}.result-note{font-size:11px;color:var(--faint);text-align:center}.modal{width:min(600px,calc(100% - 28px));max-height:calc(100svh - 40px);border:1px solid #657357;border-radius:20px;padding:0;background:linear-gradient(140deg,#34362d,#222620);color:var(--ink);box-shadow:0 28px 100px #0009;overflow:auto}.modal::backdrop{background:#121411c9;backdrop-filter:blur(7px)}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 24px 15px;border-bottom:1px solid #484d3e}.modal-header h2{font-size:21px}.modal-body{padding:22px 24px 24px}.modal-close{border:0;background:transparent;color:var(--muted);padding:6px;border-radius:8px}.modal-close svg{width:23px;height:23px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:22px;flex-wrap:wrap}.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:19px}.help-step{display:flex;gap:10px;align-items:flex-start}.help-number{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;border:1px solid var(--gold-dark);border-radius:50%;color:var(--gold);font-size:11px}.help-step h3{font-size:14px;margin-bottom:5px}.help-step p{font-size:12px;color:var(--muted);line-height:1.75}.help-example{display:flex;align-items:center;justify-content:center;gap:14px;padding:17px 0;margin:15px 0;color:var(--gold)}.help-example svg{width:57px;height:57px}.help-note{font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:16px;margin-top:18px;line-height:1.8}.settings-group{display:grid;gap:18px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px}.setting-row label{font-size:14px}.setting-row p{font-size:11px;color:var(--muted);margin-top:3px}.setting-row input[type=checkbox]{width:20px;height:20px;accent-color:var(--gold)}.setting-row input[type=range]{width:130px;accent-color:var(--gold)}.setting-row select{background:#162b20;border:1px solid var(--line);padding:8px 10px;border-radius:8px;color:var(--ink)}.settings-divider{height:1px;background:var(--line);margin:4px 0}.settings-actions{display:flex;gap:8px;flex-wrap:wrap}.settings-actions .button{font-size:12px;flex:1}.settings-note{color:var(--muted);font-size:11px;line-height:1.8}.codex-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px}.filter-button{border:1px solid var(--line);background:#1c241d;color:var(--muted);padding:6px 11px;border-radius:8px;font-size:11px}.filter-button.active{border-color:var(--gold);color:var(--gold)}.codex-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.codex-item{position:relative;background:#142d2180;border:1px solid var(--line);border-radius:10px;padding:12px 10px;text-align:center;min-width:0}.codex-item svg{height:55px;width:55px;margin:0 auto 8px}.codex-item strong{display:block;font-size:12px}.codex-item p{font-size:10px;color:var(--muted);line-height:1.65;margin-top:7px}.codex-cost{position:absolute;right:7px;top:6px;color:var(--gold);font-size:10px}.discovered-dot{position:absolute;left:8px;top:9px;width:5px;height:5px;border-radius:50%;background:var(--jade)}.challenge-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.challenge-card{border:1px solid var(--line);background:#132a2080;border-radius:12px;padding:17px;text-align:left}.challenge-card:hover{border-color:var(--gold)}.challenge-card strong{display:block;font-size:14px;color:var(--gold);margin-bottom:6px}.challenge-card p{font-size:11px;color:var(--muted);line-height:1.7}.challenge-card .challenge-number{font-size:10px;color:var(--faint);margin-bottom:8px;display:block}.toast-region{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:100;pointer-events:none;max-width:calc(100% - 32px);width:max-content}.toast{background:#dfbd82;color:#283526;border:1px solid #eacc9a;border-radius:10px;padding:11px 17px;box-shadow:0 6px 25px #0006;font-size:13px;animation:toast-in .18s;max-width:100%;text-align:center}.toast.error{background:#dba493;border-color:#e6b7a6;color:#422c24}@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.drag-ghost{position:fixed;z-index:99;width:70px;height:70px;pointer-events:none;opacity:.9;filter:drop-shadow(0 7px 12px #0008)}.dragging-source{opacity:.4}.about-copy p{font-size:13px;color:var(--muted);line-height:1.85;margin-bottom:15px}.about-goblin{display:flex;justify-content:center;margin-bottom:15px}.about-goblin svg{width:100px;height:100px}.offline-notice{font-size:11px;color:var(--jade);text-align:center;margin-top:10px}.noscript-message{padding:30px;text-align:center}.mode-banner{display:flex;justify-content:space-between;align-items:center;gap:9px;border:1px solid var(--gold-dark);border-radius:10px;padding:10px 12px;margin-bottom:14px;font-size:12px;color:var(--gold)}.mode-banner button{background:transparent;border:0;padding:3px;color:var(--muted);font-size:11px}.pause-shade{display:grid;place-items:center;position:absolute;inset:0;border-radius:18px;background:#10271b33;pointer-events:none;z-index:4}.pause-shade span{background:#26382beb;border:1px solid var(--gold-dark);border-radius:10px;padding:10px 20px;color:var(--gold);font-size:13px;box-shadow:var(--shadow)}.feedback-flash{animation:feedback-flash .35s}@keyframes feedback-flash{50%{filter:brightness(1.25)}}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1400px){.app-shell{padding-top:42px}.home-hero{min-height:315px;margin-bottom:32px}.hero-art{min-height:320px}}
@media(max-width:900px){.home-bottom{grid-template-columns:1.5fr 1fr}.app-shell{padding:24px}.topbar{padding:20px 24px 16px}.site-footer{padding:18px 24px}.run-layout{grid-template-columns:minmax(0,1fr) 280px;gap:18px}.enemy-panel{grid-template-columns:1fr 130px;padding:17px}.enemy-art svg{height:125px;width:140px}.workbench{padding:15px}.board{gap:7px}.cell-name{font-size:9px}.shop-panel{padding:15px}.shop-card{grid-template-columns:45px minmax(0,1fr) auto;gap:6px}.shop-icon svg{width:45px;height:45px}}
@media(max-width:720px){.home-hero{grid-template-columns:1fr 1fr;gap:10px;min-height:210px;margin-bottom:23px}.hero-copy h1{font-size:34px;letter-spacing:-1.5px}.hero-copy>p{font-size:12px}.hero-art{min-height:210px}.home-bottom{grid-template-columns:1fr}.side-stack{grid-template-columns:1fr 1fr}.intro-lines{grid-column:1/-1;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}.intro-line{font-size:10px}.run-layout{grid-template-columns:1fr;max-width:510px;gap:17px}.stage-side{grid-template-columns:1fr 1fr;gap:12px}.shop-panel{grid-column:1/-1}.shop-offers{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.shop-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 7px;text-align:center;min-height:166px}.shop-info strong{font-size:12px}.shop-info p{font-size:10px;min-height:45px;line-height:1.5}.shop-price{margin-top:auto;font-size:13px}.shop-icon svg{width:53px;height:53px}.detail-panel{grid-column:1/-1;min-height:0}.hint-panel{grid-column:1/-1}.reward-panel{grid-column:1/-1}.enemy-panel{grid-template-columns:1fr 150px;min-height:158px}.enemy-art svg{width:150px;height:130px}.workbench{padding:16px 18px 18px}.board{gap:8px;max-width:410px}.cell-name{font-size:10px}.run-heading{gap:10px}.run-title{font-size:16px}.run-resources{gap:12px}.resource{font-size:17px}.profile-strip{gap:14px}.hero-caption{font-size:9px}.result-grid{gap:14px}.result-panel{padding:18px}}
@media(max-width:480px){.topbar{padding:16px 16px 13px}.brand{gap:8px}.brand-mark{width:36px;height:36px}.brand-type strong{font-size:15px}.brand-type small{font-size:7px;letter-spacing:1.4px}.top-actions{gap:1px}.icon-button{width:33px;height:36px}.icon-button svg{width:18px;height:18px}.app-shell{padding:20px 16px 16px}.site-footer{padding:12px 16px 20px;font-size:10px}.home-hero{display:block;position:relative;min-height:220px;overflow:hidden;margin-bottom:15px;padding-bottom:7px}.hero-copy{max-width:62%;position:relative;z-index:2}.hero-copy h1{font-size:32px;margin:10px 0 13px;letter-spacing:-1.4px}.hero-copy>p{font-size:11px;line-height:1.8}.eyebrow{font-size:8px;letter-spacing:1.8px}.hero-art{position:absolute;right:-68px;top:4px;width:265px;height:235px;min-height:0;opacity:.85;pointer-events:none}.hero-caption{display:none}.profile-strip{margin-top:18px;gap:11px;max-width:calc(100vw - 45px);width:calc(100vw - 45px)}.profile-stat{font-size:10px;gap:5px}.profile-stat strong{font-size:14px}.profile-stat svg{width:16px;height:16px}.start-panel{padding:18px}.loadout-list{gap:7px}.loadout-card{padding:10px 8px}.loadout-card .loadout-art{height:65px}.loadout-art svg{height:69px;width:74px}.loadout-card strong{font-size:12px}.loadout-card .loadout-description{font-size:9px;line-height:1.6;min-height:30px}.loadout-items svg{width:22px;height:22px}.difficulty-row{margin:16px 0}.segmented button{padding:6px 9px;font-size:11px}.section-header{margin-bottom:13px}.section-header h3{font-size:15px}.section-header>span{font-size:9px;letter-spacing:.7px}.mode-card{padding:16px}.mode-card h3{font-size:14px}.mode-card p{font-size:10px}.mode-card .mode-symbol{top:15px;right:12px;opacity:.4}.mode-symbol svg{height:22px;width:22px}.mode-card .eyebrow{font-size:7px;letter-spacing:1px}.side-stack{gap:11px}.intro-lines{grid-template-columns:1fr;gap:7px;padding:4px}.intro-line{font-size:11px}.run-heading-left{gap:6px}.run-heading .pill{font-size:9px;padding:2px 7px}.run-title{font-size:15px}.resource{font-size:15px;gap:4px}.resource svg{height:16px;width:16px}.run-resources{gap:10px}.enemy-panel{grid-template-columns:1fr 112px;padding:15px 16px;min-height:149px;margin-bottom:14px}.enemy-name{font-size:18px}.enemy-description{font-size:10px;line-height:1.65}.enemy-art svg{width:122px;height:120px}.enemy-copy .eyebrow{font-size:8px}.enemy-flags{gap:4px;margin-top:8px}.enemy-flags .pill{font-size:8px}.workbench{padding:13px 13px 15px;border-radius:15px}.bench-header{margin-bottom:11px}.bench-label{font-size:11px}.bench-caption{font-size:9px}.board{gap:6px}.board-cell{border-radius:8px}.cell-art{width:82%}.cell-name{font-size:9px;margin-bottom:5px}.bench-status{font-size:9px;margin-top:11px}.coach-line{font-size:11px;margin-top:11px}.combat-controls{gap:7px}.combat-controls .button{font-size:12px;padding:11px 12px}.speed-button{min-width:48px}.shop-panel{padding:16px}.shop-info p{font-size:9px}.shop-card{min-height:160px;padding:9px 5px}.shop-icon svg{width:48px;height:48px}.shop-info strong{font-size:11px}.shop-price{font-size:12px}.modal-header{padding:18px 18px 13px}.modal-body{padding:18px}.help-grid{grid-template-columns:1fr;gap:16px}.codex-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.codex-item{padding:11px 5px}.codex-item strong{font-size:10px}.codex-item p{font-size:9px}.codex-item svg{height:46px;width:46px}.challenge-grid{gap:8px}.challenge-card{padding:13px}.challenge-card strong{font-size:12px}.challenge-card p{font-size:10px}.result-grid{grid-template-columns:1fr}.results-hero h1{font-size:31px}.results-hero p{font-size:12px}.result-actions .button{font-size:12px}.settings-actions{flex-direction:column}.setting-row label{font-size:12px}.setting-row input[type=range]{width:105px}}
@media(max-width:350px){.topbar{padding-left:12px;padding-right:12px}.brand-type small{display:none}.brand-type strong{font-size:13px}.app-shell{padding-left:12px;padding-right:12px}.hero-copy h1{font-size:29px}.hero-art{right:-83px}.hero-copy{max-width:64%}.start-panel{padding:14px}.loadout-card strong{font-size:10px}.loadout-card .loadout-description{font-size:8px}.difficulty-row label{font-size:11px}.segmented button{padding:5px 7px}.enemy-panel{grid-template-columns:1fr 97px;padding:13px}.enemy-art svg{width:105px}.shop-info p{font-size:9px}.board-cell{aspect-ratio:1/1.13}.run-resources{gap:7px}.resource{font-size:13px}.run-title{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.button:hover:not(:disabled),.loadout-card:hover{transform:none}}

/* Clear status indicators and readable controls on small screens. */
.health-fill,.cooldown-fill{display:block}
.round-track{gap:5px;margin-bottom:16px}.round-step,.round-step.boss{height:23px;display:flex;align-items:center;justify-content:center;font-size:10px;color:var(--muted)}.round-step.current,.round-step.done{color:var(--night)}
.enemy-panel{border:1px solid var(--line);border-radius:15px}.enemy-hp{justify-content:flex-start}.enemy-hp #enemy-state{margin-left:auto;font-size:10px}.enemy-trait{font-size:11px;color:var(--muted);line-height:1.6;margin-top:5px}.enemy-description{color:var(--gold)}
.shop-title{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:14px}.shop-title p{font-size:10px;color:var(--muted);margin-top:3px}.shop-title>svg{color:var(--gold)}
.bench-status>span,.coach-line,.bonus-line{display:flex;align-items:center;gap:5px}.coach-line{justify-content:center}.hint-panel h3{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--gold);margin-bottom:6px}.hint-panel p{font-size:12px}
.damage-row{grid-template-columns:32px minmax(0,1fr)}.damage-label strong{font-variant-numeric:tabular-nums}.selection-dot{display:grid;place-items:center}.selection-dot>svg{display:none}.loadout-card[aria-pressed=true] .selection-dot>svg{display:block;color:var(--night)}
.resource.hp.low{color:#f5aa96}.toast-action{pointer-events:auto;border:0;border-radius:5px;background:#293b29;color:#eed6a7;padding:6px 9px;font:inherit;cursor:pointer}
body.reduced-motion *,body.reduced-motion *:before,body.reduced-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-width:480px){.loadout-card .loadout-description{font-size:11px}.loadout-card strong{font-size:12px}.shop-info p{font-size:11px}.shop-card{min-height:178px}.codex-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.codex-item strong{font-size:12px}.codex-item p{font-size:11px}.challenge-card p,.mode-card p{font-size:11px}.enemy-trait{font-size:10px}.site-footer{font-size:11px}.icon-button{width:36px;height:42px}.top-actions{gap:0}.brand-type strong{font-size:14px}.brand-mark{width:32px}.hero-copy>p{font-size:12px}.hero-copy{max-width:66%}.hero-art{opacity:.55}.start-note,.settings-note{font-size:12px}.bench-status{font-size:10px}.modal-close{padding:10px}.filter-button{min-height:40px}}
@media(max-width:350px){.brand-type small{display:none}.brand-type strong{font-size:12px}.topbar{gap:6px}.brand{gap:5px}.icon-button{width:34px}.hero-copy{max-width:76%}.hero-copy h1{font-size:27px}.hero-art{opacity:.4}.profile-strip{gap:9px}.section-header>span{max-width:65px;text-align:right}}
@media(pointer:coarse){.button.small,.segmented button,.filter-button{min-height:44px}.setting-row input[type=checkbox]{width:24px;height:24px}.site-footer button{min-height:44px}}

.modal-header{position:sticky;top:0;z-index:2;background:#2d3028}.result-numbers{flex-wrap:wrap}.enemy-portrait{pointer-events:none}

@media(min-width:721px){.board{max-width:360px}.app-shell:has(.run-layout){padding-top:24px}.enemy-panel{min-height:155px}.run-heading{margin-bottom:12px}}
/* Action combat: a readable arena and one movement control. */
.control-teaser{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--jade);margin:13px 5px 0;line-height:1.7}.control-teaser svg{flex-shrink:0;margin-top:3px}
.arena-layout{display:grid;grid-template-columns:minmax(0,510px) 300px;gap:24px;max-width:900px;margin:0 auto;align-items:start}.arena-main{min-width:0}.arena-layout .run-heading{margin-bottom:12px}.arena-layout .run-title{font-size:18px}.arena-layout .run-resources{gap:13px}.arena-layout .resource{font-size:17px}.arena-layout .resource small{font-size:10px}
.arena-card{border:1px solid #5b6c4c;border-radius:18px;background:linear-gradient(135deg,#2b4134,#1b302a);overflow:hidden;box-shadow:var(--shadow)}.arena-hud{padding:14px 17px 11px;background:#14292066}.arena-enemy-title{display:flex;align-items:center;gap:8px}.arena-enemy-title h2{font-size:16px;letter-spacing:-.3px}.arena-enemy-title .pill{font-size:9px}.arena-enemy-title #battle-clock{margin-left:auto;color:var(--gold);font-size:11px;font-variant-numeric:tabular-nums}.arena-hud .health-bar{margin-top:9px;height:6px}.arena-status-row{display:flex;gap:8px;align-items:center;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:6px;min-height:16px}.arena-status-row #shield-value{display:flex;align-items:center;gap:3px;color:var(--jade)}.arena-status-row #enemy-state{flex:1;font-size:9px;text-align:center}
.arena-screen{position:relative;width:100%;max-width:360px;margin:0 auto;aspect-ratio:9/11;background:#203329;isolation:isolate}.arena-screen canvas{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.arena-screen canvas:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.arena-side{display:grid;gap:15px;padding-top:2px}.action-tip{padding:18px}.action-tip .eyebrow{font-size:9px;letter-spacing:1.8px;margin-bottom:8px}.action-tip h3{font-size:16px;color:var(--gold);margin-bottom:8px}.action-tip p{font-size:12px;color:var(--muted);line-height:1.8}.action-enemy-tip{border-top:1px solid var(--line);padding-top:12px;margin-top:12px}.hazard-legend{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}.hazard-legend>span{display:flex;gap:5px;align-items:center;font-size:10px;color:#ddae8f}.hazard-sample{width:14px;height:14px;display:inline-block;border:1px solid #e9a084;background:#da8c6840}.hazard-sample.circle{border-radius:50%}.hazard-sample.line{height:6px;transform:rotate(-30deg)}.hazard-sample.fan{clip-path:polygon(50% 100%,0 0,100% 0)}
.live-loadout{padding:17px}.live-loadout .section-header{margin-bottom:12px}.live-loadout h3{font-size:14px}.live-loadout .section-header>span{font-size:10px;color:var(--muted)}.live-devices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.live-device{display:grid;place-items:center;position:relative;border:1px solid #5a665040;border-radius:9px;padding:5px;background:#21251f;min-width:0;aspect-ratio:1}.live-device svg{width:85%;height:85%;max-width:52px}.live-device.empty{border-style:dashed;opacity:.4}.live-device.selected{border-color:var(--gold);background:#3e5136}.live-device.out-of-range{opacity:.45}.live-loadout>p{font-size:11px;color:var(--muted);line-height:1.6;margin-top:10px}.live-cooldown{position:absolute;left:5px;right:5px;height:3px;bottom:3px;background:#14271d;overflow:hidden;border-radius:2px}.live-cooldown span{display:block;height:100%;background:var(--jade);width:0;transition:width .05s}.live-level{position:absolute;right:4px;top:2px;font-size:9px;color:var(--gold)}
.drive-deck{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#22261ed9;border-top:1px solid #4b5e47}.drive-pad{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:76px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;border:1px solid #446049;border-radius:12px;background:linear-gradient(140deg,#353b2e,#262e24);padding:7px 10px}.drive-pad.driving{border-color:var(--jade);background:#3d4b34}.control-stick{position:relative;display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#171d19;border:1px solid #63876855;flex-shrink:0;box-shadow:inset 0 0 15px #0004}.control-stick-thumb{position:absolute;width:30px;height:30px;border-radius:50%;background:linear-gradient(140deg,#dfbc79,#a57b41);border:1px solid #edcf98;z-index:2;box-shadow:0 2px 5px #0004}.control-stick-arrows{font-size:10px;color:#8ea38b;letter-spacing:7px;padding-left:7px}.drive-copy{display:flex;flex-direction:column;gap:3px;pointer-events:none}.drive-copy strong{font-size:12px;color:var(--gold)}.drive-copy span{font-size:10px;color:var(--muted)}.drive-pause{padding:9px 11px;min-width:81px;min-height:60px;flex-direction:column;gap:5px;font-size:11px;line-height:1.2;background:#34392d;border-color:#56694b;box-shadow:none}.drive-pause svg{height:20px;width:20px}.arena-bottom{display:flex;justify-content:space-between;gap:7px;padding:8px 14px;font-size:10px;color:var(--muted)}.arena-bottom>span:first-child{display:flex;gap:5px;align-items:center}.arena-bottom strong{color:var(--jade)}#power-state.active{color:var(--gold)}.arena-cleared{display:flex;gap:7px;align-items:center;justify-content:center;padding:20px;color:var(--gold);background:#232b21}
.arena-shade{position:absolute;inset:0;display:grid;place-items:center;background:#121810a8;z-index:3;pointer-events:none;padding:18px}.arena-shade>span{display:flex;align-items:center;gap:7px;color:var(--gold);background:#35392eeb;padding:12px 15px;border:1px solid var(--gold-dark);border-radius:10px;font-size:13px}.arena-shade.arena-briefing{pointer-events:auto;background:#151811bc;backdrop-filter:blur(3px)}.briefing-card{width:100%;max-width:295px;padding:22px 20px;background:linear-gradient(135deg,#3d4333,#282f24);border:1px solid #c8a86d88;border-radius:18px;box-shadow:0 14px 40px #0006;text-align:center}.briefing-art{display:flex;justify-content:center;height:77px;margin-bottom:5px}.briefing-art svg{width:100px;height:90px}.briefing-card h2{font-size:20px;color:var(--gold);margin:8px 0 10px}.briefing-card>p{font-size:12px;color:var(--muted);line-height:1.75}.briefing-key{padding:9px;background:#142c2080;border-radius:8px;border:1px solid var(--line);font-size:12px;letter-spacing:2px;color:var(--ink);margin:12px 0 9px}.briefing-key span{color:var(--faint);letter-spacing:0}.briefing-card .briefing-note{font-size:11px}.briefing-card .button{margin-top:17px;font-size:13px}
.joystick-feedback{position:fixed;z-index:50;width:88px;height:88px;display:grid;place-items:center;border:1px solid #b5d2a6aa;border-radius:50%;background:#232720bb;box-shadow:0 0 16px #00140e40;pointer-events:none}.joystick-thumb{width:37px;height:37px;border-radius:50%;background:#dbb875cc;border:1px solid #ffdf99;box-shadow:0 0 10px #edd18325}
@media(max-width:900px){.arena-layout{grid-template-columns:minmax(0,1fr) 270px;gap:18px}.arena-layout .resource{font-size:15px}.arena-layout .run-title{font-size:16px}.drive-copy span{font-size:9px}.drive-pad{gap:8px;padding-left:8px}.drive-pause{min-width:68px;padding:8px}}
@media(max-width:720px){.arena-layout{display:block;max-width:420px}.arena-side{margin-top:16px;grid-template-columns:1fr 1fr;gap:12px}.arena-side .reward-panel,.arena-side .detail-panel{grid-column:1/-1}.arena-side .action-tip{display:none}.live-loadout{grid-column:1/-1}.live-devices{grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}.live-device{padding:3px;border-radius:6px}.live-level{font-size:8px}.live-device svg{width:90%;height:90%}.arena-layout .run-heading{margin-bottom:10px}.arena-layout .round-track{margin-bottom:12px}.app-shell:has(.arena-layout){padding-top:16px}.arena-layout .run-title{font-size:15px}.arena-hud{padding:11px 14px 9px}.arena-enemy-title h2{font-size:14px}.arena-enemy-title #battle-clock{font-size:10px}.arena-layout .resource{font-size:15px}.drive-copy span{font-size:10px}.drive-pad{min-height:73px}.drive-pause{min-width:78px}.toast-region:has(.toast){bottom:108px}}
@media(max-width:350px){.arena-layout .run-title{font-size:13px}.arena-layout .resource{font-size:13px}.arena-layout .run-heading-left{gap:5px}.arena-layout .run-resources{gap:7px}.arena-layout .run-heading .pill{font-size:8px;padding:2px 5px}.arena-card{border-radius:13px}.drive-deck{padding:8px;gap:7px}.drive-copy strong{font-size:11px}.drive-copy span{font-size:9px}.control-stick{width:49px;height:49px}.control-stick-thumb{width:27px;height:27px}.drive-pad{padding:7px;gap:8px}.drive-pause{min-width:65px;max-width:72px;font-size:10px}.arena-bottom{padding:8px 10px;font-size:9px}.briefing-card{padding:14px}.briefing-card h2{font-size:17px}.briefing-card>p{font-size:11px}.briefing-card .briefing-note{font-size:10px}.briefing-key{font-size:11px}.briefing-card .button{margin-top:12px}.briefing-art{height:61px}.briefing-art svg{height:70px}.control-teaser{font-size:11px}}

@media(max-width:720px){.live-devices{grid-template-columns:repeat(4,minmax(0,1fr))}.live-device{min-height:44px;aspect-ratio:1.25}.live-device svg{max-width:40px;max-height:40px}.live-loadout{padding:14px}}

/* Two run lengths share the same workshop and direct controls. */
.play-mode-section{margin-bottom:22px;padding-bottom:19px;border-bottom:1px solid var(--line)}
.play-mode-section>h3{font-size:13px;color:var(--muted);margin-bottom:11px}
.play-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.play-mode{display:grid;grid-template-columns:32px minmax(0,1fr);gap:7px 10px;align-items:center;text-align:left;min-width:0;padding:14px;border:1px solid var(--line);border-radius:12px;background:#1c201c8c}
.play-mode>span:last-child{display:contents}.play-mode-symbol{color:var(--faint);font-size:29px;line-height:1;font-weight:750}
.play-mode strong{font-size:14px;line-height:1.4}.play-mode small{grid-column:1/-1;font-size:11px;line-height:1.65;color:var(--muted)}
.play-mode:hover{border-color:var(--gold-dark)}.play-mode[aria-pressed=true]{border-color:var(--gold);background:#38523d88;box-shadow:inset 0 0 0 1px #c6a76b30}.play-mode[aria-pressed=true] .play-mode-symbol{color:var(--gold)}
.endless-best-home{display:flex;align-items:center;gap:7px;color:var(--jade);font-size:12px;margin:-4px 0 14px}
.endless-forge{padding:18px;border-color:#8d734a;grid-column:1/-1}.endless-forge .section-header{margin-bottom:10px}.endless-forge h3{display:flex;align-items:center;gap:7px;color:var(--gold)}
.endless-forge p{font-size:12px;color:var(--muted);line-height:1.7}.forge-next{display:flex;align-items:flex-start;gap:6px;font-size:11px;color:var(--jade);margin:10px 0 13px}.forge-next svg{flex-shrink:0;margin-top:2px}.endless-forge small{display:block;color:var(--faint);font-size:11px;line-height:1.7;margin-top:11px}.endless-forge .button{font-size:13px}
.endless-track .round-step{min-width:0;gap:3px;overflow:hidden;text-overflow:ellipsis}.round-infinity{color:var(--gold);font-size:20px;padding:0 2px;line-height:23px}
.endless-pressure{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin:-5px 0 14px;color:var(--muted);font-size:11px}.endless-pressure .pill{color:var(--gold);border-color:var(--gold-dark)}.endless-pressure small{width:100%;font-size:10px;color:var(--faint)}
.retire-controls{text-align:center;margin:12px 0 0}.retire-controls .button{font-size:11px;color:var(--faint)}
.endless-result-summary{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 18px;margin:19px auto 0;max-width:570px;font-size:13px;color:var(--muted)}.endless-result-summary strong{color:var(--gold)}.endless-new-best{display:flex;align-items:center;gap:6px;color:var(--jade);width:100%;justify-content:center}
@media(max-width:480px){.play-mode-section{margin-bottom:17px;padding-bottom:16px}.play-modes{gap:7px}.play-mode{padding:11px;gap:7px;grid-template-columns:25px minmax(0,1fr)}.play-mode-symbol{font-size:24px}.play-mode strong{font-size:12px}.play-mode small{font-size:11px}.run-heading-left{min-width:0;max-width:65%}.arena-layout .run-title{font-size:15px}.arena-layout .run-heading-left{gap:4px}.arena-layout .run-resources{gap:7px}.arena-layout .resource{font-size:14px}.run-heading .run-mode{font-size:8px}.endless-pressure{font-size:10px;gap:5px 9px}.endless-track .round-step{font-size:9px}.endless-forge{padding:16px}.endless-result-summary{font-size:12px}}
.endless-loss-reason{margin:10px auto 0;max-width:580px;font-size:12px!important;opacity:.8}

/* Workbench grids retain the same device scale at each size. */
.board,.mini-board,.live-devices{grid-template-columns:repeat(var(--board-columns,4),minmax(0,1fr))}
.board[data-columns="5"]{max-width:420px;gap:7px}.board[data-columns="6"]{max-width:440px;gap:6px}
.board[data-columns="5"] .board-cell,.board[data-columns="6"] .board-cell{aspect-ratio:1/1.12}
.board[data-columns="6"] .cell-name{font-size:9px}.board[data-columns="6"] .cell-art{width:86%}
.mini-board[data-columns="5"],.mini-board[data-columns="6"]{max-width:300px}
.live-devices[data-columns="5"],.live-devices[data-columns="6"]{gap:4px}
.live-devices[data-columns="6"] .live-device{padding:3px;border-radius:6px}
.live-devices[data-columns="6"] .live-device svg{width:92%;height:92%}
.bench-caption{text-align:right}.bench-status{flex-wrap:wrap}
.endless-expansion{grid-column:1/-1;padding:18px;border-color:#648369;background:linear-gradient(140deg,#3c4534,#29362b)}
.endless-expansion .section-header{margin-bottom:13px}.endless-expansion h3{display:flex;align-items:center;gap:7px;color:var(--jade)}
.expansion-plan{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0}.expansion-plan>div:first-child{min-width:0}
.expansion-current{font-size:11px;line-height:1.7;color:var(--muted);margin-bottom:4px}.expansion-plan strong{display:block;font-size:13px;line-height:1.65;color:var(--ink)}
.expansion-preview{display:grid;grid-template-columns:repeat(var(--preview-columns),1fr);gap:3px;width:69px;flex-shrink:0;padding:4px;border:1px solid #73836166;border-radius:6px;background:#181d1a}
.expansion-preview i{aspect-ratio:1;background:#526349;border:1px solid #8c9c7760;border-radius:1px}.expansion-preview .new-slot{background:#b1d09a;border-color:#d7efbc;box-shadow:0 0 5px #b7db9940}
.expansion-gate{display:flex;align-items:flex-start;gap:6px;color:var(--muted);font-size:11px;line-height:1.7;margin:12px 0}.expansion-gate svg{flex-shrink:0;margin-top:3px}.expansion-gate.unlocked{color:var(--jade)}
.endless-expansion .button{font-size:13px}.endless-expansion small{display:block;font-size:11px;line-height:1.75;color:var(--faint);margin-top:11px}.expansion-shortfall{font-size:11px;line-height:1.7;color:var(--gold);margin-top:8px}
@media(max-width:480px){.endless-expansion{padding:16px}.board[data-columns="5"]{gap:5px}.board[data-columns="6"]{gap:4px}.board[data-columns="5"] .cell-name,.board[data-columns="6"] .cell-name{font-size:8px;margin-bottom:4px}.board[data-columns="6"] .board-cell{border-radius:6px;padding:2px}.board[data-columns="6"] .cell-level{font-size:9px;right:3px;top:2px}.bench-caption{max-width:60%;line-height:1.6}.expansion-plan{gap:10px}.expansion-preview{width:63px}.expansion-plan strong{font-size:12px}.live-devices[data-columns="6"] .live-cooldown{left:3px;right:3px}}
@media(max-width:380px){.board[data-columns="6"]{gap:3px}.board[data-columns="6"] .cell-name{display:none}.board[data-columns="6"] .cell-art{width:92%}.board[data-columns="6"] .board-cell:before,.board[data-columns="6"] .board-cell:after{width:3px;height:3px}.live-devices[data-columns="6"]{gap:3px}.live-devices[data-columns="6"] .live-device{padding:2px}.expansion-preview{width:59px}}

.expansion-advice{font-size:11px;line-height:1.7;color:var(--jade);padding-top:10px;margin-top:10px;border-top:1px solid #71876740}

/* The larger workbench opens one chosen cell at a time. */
.board-cell.locked{background:repeating-linear-gradient(135deg,#14271f,#14271f 7px,#182c23 7px,#182c23 14px);border:1px dashed #58705b70;box-shadow:inset 0 0 12px #0003;color:#637863;cursor:help}
.board-cell.locked:before,.board-cell.locked:after{opacity:.25}.board-cell.locked .cell-lock{display:grid;place-items:center;width:100%;flex:1;opacity:.48}.board-cell.locked .cell-name{color:#829480;margin:0 0 5px;font-size:9px}.board-cell.unlock-eligible{border-color:#8bab7580;color:#8faf7e;background:#29372a}.board-cell.unlock-eligible .cell-lock{opacity:.7}.board-cell.unlock-ready{border:1.5px solid var(--jade);background:linear-gradient(140deg,#4d603e80,#304330);box-shadow:inset 0 0 10px #b2de9420,0 0 8px #a2d28818;cursor:pointer}.board-cell.unlock-ready:hover{background:#45623d;border-color:#d7f3ad}.board-cell.unlock-ready .cell-lock{color:var(--jade);opacity:1}.board-cell.unlock-ready .cell-name{color:var(--jade)}.cell-unlock-plus{position:absolute;right:5px;top:0;color:var(--jade);font-weight:750;font-size:18px}.opened-slot-count{color:var(--jade)}
.expansion-preview .locked-slot{background:#182c22;border:1px dashed #58705b70}.expansion-preview .open-slot{background:#6b875a;border-color:#a5bd8570}.expansion-preview .new-slot{background:#9ac98280;border:1px solid #b6dd92;box-shadow:none}
.endless-expansion .expansion-plan{margin-bottom:14px}.endless-expansion .section-header>span{font-size:11px;color:var(--gold);white-space:nowrap}.mini-cell.locked,.live-device.locked{background:repeating-linear-gradient(135deg,#15291f,#15291f 5px,#1c3025 5px,#1c3025 10px);border:1px dashed #5a70554d;color:#69815f;opacity:.6}.live-device.locked{display:grid;place-items:center}
.arena-map-note{display:flex;justify-content:center;align-items:center;gap:5px;color:var(--muted);font-size:10px;line-height:1.5;padding:8px 8px 0;margin:0;background:#232720}.arena-map-note svg{flex-shrink:0}.arena-screen{background:#34392d}
@media(max-width:480px){.board-cell.locked .cell-name{font-size:8px}.board-cell.locked .cell-lock svg{width:18px;height:18px}.cell-unlock-plus{font-size:15px;right:3px}.arena-map-note{font-size:9px;gap:4px}.endless-expansion h3{font-size:13px}}

/* Spawn warnings describe incoming actors; damaging attacks keep orange. */
.arena-swarm-hud{display:flex;align-items:center;justify-content:space-between;gap:7px;padding-top:7px;margin-top:5px;border-top:1px solid #78936730;font-size:10px;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums;min-width:0}.swarm-counts{display:flex;flex-wrap:wrap;gap:5px 10px;min-width:0}.swarm-counts>span{white-space:nowrap}.swarm-counts strong{color:#e4ba95;font-weight:700}.arena-swarm-hud #summon-clock{color:#bfcfa5;white-space:nowrap;flex-shrink:0}.arena-swarm-hud #summon-clock.summoning{color:#ddc5f0}.hazard-sample.summon{border:1.5px dashed #cfb6ed;border-radius:50%;background:#b399dc20;flex-shrink:0}.hazard-legend .summon-legend{color:#d6bce9}.action-swarm-tip{margin-top:12px;font-size:11px!important}.arena-summon-note{display:flex;justify-content:center;align-items:center;gap:5px;color:#c8b3d7;background:#232720;font-size:10px;line-height:1.5;padding:5px 10px 0;margin:0}.arena-summon-note .hazard-sample{width:11px;height:11px}.arena-enemy-title{flex-wrap:wrap}.arena-enemy-title h2{min-width:0}.arena-enemy-title #battle-clock{white-space:nowrap}
@media(max-width:350px){.arena-swarm-hud{font-size:9px}.swarm-counts{gap:4px 7px}.arena-summon-note{font-size:9px}.arena-enemy-title{gap:5px}.arena-hud{padding-left:11px;padding-right:11px}}

.pattern-badge{display:inline-flex;align-items:center;max-width:100%;padding:3px 6px;border:1px solid #a4bc7859;border-radius:6px;background:#52643824;color:#d6dfa8;font-size:10px;font-weight:650;line-height:1.4;white-space:normal}.pattern-badge[data-pattern=chain],.pattern-badge[data-pattern=blast]{border-color:#88cbb778;color:#b3e3d1;background:#40736524}.pattern-badge[data-pattern=single]{color:var(--muted);border-color:var(--line);background:#1b302650}.shop-info .pattern-badge{margin-top:6px;margin-bottom:1px;align-self:center;font-size:9px;padding:2px 5px}.device-pattern{padding:11px 12px;margin:13px 0 0;border:1px solid #8d9e6559;border-radius:9px;background:#162c214d}.device-pattern>div{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.device-pattern>div>span:last-child{font-size:10px;color:var(--muted)}.device-pattern>p{font-size:11px;color:var(--muted);line-height:1.6;margin-top:7px}.device-pattern .pattern-falloff{color:var(--jade)}.device-pattern>small{display:block;font-size:10px;color:var(--faint);line-height:1.65;margin-top:8px}.live-pattern{position:absolute;top:1px;left:3px;color:#dbe6a8;font-size:13px;line-height:1;text-shadow:0 1px 3px #091a11;background:#20261eb3;border-radius:3px;padding:1px 2px;pointer-events:none}.live-pattern[data-pattern=single]{display:none}.live-pattern[data-pattern=chain],.live-pattern[data-pattern=blast]{color:#a5e7d8}
@media(max-width:380px){.shop-info .pattern-badge{font-size:8px;padding:2px 3px}.device-pattern{padding:10px}.device-pattern>div>span:last-child{font-size:9px}.live-pattern{font-size:11px;left:2px}}


/* One CC0 pixel-art vocabulary across the home, workbench and combat. */
body{background:radial-gradient(ellipse at 72% -10%,#6f52372b,transparent 50%),radial-gradient(ellipse at 0 60%,#48533b16,transparent 55%),var(--night)}
.grain{opacity:.022}.topbar{border-bottom-color:#4a4d3a66}.brand-type strong{color:var(--ink)}.brand-type small{color:var(--gold);letter-spacing:1.7px}.brand-mark{background:#343c2d;border:1px solid #66745266;border-radius:12px;overflow:hidden}
.panel{background:linear-gradient(145deg,#32342ad9,#22251fe8);border-color:var(--line)}.button.primary{background:linear-gradient(#f0c589,#e4b172);border-color:#f1ce99;color:#2a291f;box-shadow:0 3px 0 #936744}.button.primary:hover:not(:disabled){background:#f4d299}.button:hover:not(:disabled){background:#444b37}.button.resume{background:#313c2c}.button.resume:hover{background:#3d4b34}.icon-button{border-color:#4f534335;background:#24282155}.icon-button:hover{background:#353d2e}
.asset-art{display:block;position:relative;flex-shrink:0;max-width:100%;height:auto;isolation:isolate;pointer-events:none}.pixel-sprite{display:block;position:absolute;background-repeat:no-repeat;image-rendering:pixelated;image-rendering:crisp-edges;filter:drop-shadow(0 2px 0 #10120d4d)}.pixel-animated{animation:pixel-idle .8s steps(1,end) infinite}@keyframes pixel-idle{0%,100%{background-position:var(--pixel-frame-0)}25%{background-position:var(--pixel-frame-1)}50%{background-position:var(--pixel-frame-2)}75%{background-position:var(--pixel-frame-3)}}
.module-art{--family-color:#b6c09a;--family-dark:#30392b;overflow:visible}.module-art[data-family=electric]{--family-color:#9dcfc8;--family-dark:#273c36}.module-art[data-family=heat]{--family-color:#ecb178;--family-dark:#44342a}.module-art[data-family=utility]{--family-color:#d0c8a1;--family-dark:#3b3a2d}.module-plinth{position:absolute;inset:8% 11% 9%;background:linear-gradient(145deg,var(--family-dark),#252820);border:1px solid #8c967459;box-shadow:inset 0 1px 0 #d2dac221,inset 0 -3px 0 #13171266,0 3px 0 #10140f66;clip-path:polygon(8% 0,92% 0,100% 8%,100% 92%,92% 100%,8% 100%,0 92%,0 8%)}.module-plinth:before{content:"";position:absolute;inset:13%;border:1px solid #e0ddba16}.module-plinth:after{content:"";position:absolute;left:26%;right:26%;bottom:8%;height:2px;background:var(--family-color);opacity:.55}.module-rivet{position:absolute;width:4%;height:4%;background:#b1b68b;box-shadow:1px 1px #10130d80}.rivet-one{left:18%;top:15%}.rivet-two{right:18%;bottom:16%}.module-upgrade{position:absolute;right:7%;top:0;color:#ffdc91;font-size:25%;text-shadow:0 1px #4f351d}
.portrait-halo{position:absolute;inset:13% 4% 7%;border-radius:50%;background:radial-gradient(ellipse,#83965a38,transparent 68%)}.goblin-art[data-family=electric] .portrait-halo{background:radial-gradient(ellipse,#66ab993d,transparent 68%)}.goblin-art[data-family=heat] .portrait-halo{background:radial-gradient(ellipse,#e2935538,transparent 68%)}.portrait-shadow{position:absolute;left:23%;right:23%;bottom:6%;height:8%;border-radius:50%;background:#080e0780;filter:blur(2px)}.portrait-tool{filter:drop-shadow(1px 1px #171c13)}.portrait-star{position:absolute;top:10%;right:7%;color:var(--gold);font-size:22px}.goblin-art[data-pose=defeat]{filter:saturate(.65)}.enemy-portrait-halo{position:absolute;inset:10%;background:radial-gradient(ellipse,#8d755632,transparent 68%);border-radius:50%}
.home-hero{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:36px;margin-bottom:30px;min-height:300px}.hero-copy h1{font-size:clamp(33px,4vw,52px);line-height:1.3;letter-spacing:-1.8px}.hero-copy h1 em{color:#f0bf81}.hero-copy>p{color:#babdaf;font-size:14px;line-height:1.85}.hero-art{position:relative;min-height:0;padding:10px 10px 27px;border:1px solid #66674a5c;border-radius:18px;background:linear-gradient(140deg,#34372b80,#22241d80);box-shadow:inset 0 1px 0 #dfd0a414,0 18px 50px #0003}.hero-art:before{inset:4% 10%;background:radial-gradient(ellipse,#bd8c5b20,transparent 70%)}.hero-art>.asset-art{width:100%!important;max-width:520px;filter:drop-shadow(0 12px 12px #05080660)}.hero-caption{bottom:9px;display:block;color:#a4aa90;font-size:10px;letter-spacing:1.4px}.workshop-room{position:absolute;inset:0;background:#1b1c19;clip-path:polygon(5% 3%,95% 3%,100% 12%,100% 89%,94% 98%,6% 98%,0 89%,0 12%)}.workshop-room>.pixel-sprite{filter:none}.diorama-vignette{position:absolute;inset:0;background:linear-gradient(0deg,#0b0e0a4d,transparent 30%),radial-gradient(ellipse at 50% 65%,transparent 38%,#14170f66 100%);pointer-events:none}.cart-shadow{position:absolute;border-radius:50%;background:#090d0870;filter:blur(2px)}.cart-deck{position:absolute;background:repeating-linear-gradient(90deg,#3e4c37 0,#3e4c37 11%,#4b5e3e 11%,#4b5e3e 13%);border:2px solid #a89c65;box-shadow:inset 0 2px #d0bd7a55,inset 0 -4px #19241a}.cart-wheel{position:absolute;background:repeating-linear-gradient(0deg,#22291e 0,#22291e 12%,#626957 12%,#626957 20%);border:2px solid #11170e;box-shadow:0 2px #0007}.cart-copper{position:absolute;background:#b27b48;border-bottom:2px solid #644b2c;box-shadow:inset 0 1px #e8b77a}.cart-engine{position:absolute;background:#98c995;border:3px solid #796b43;box-shadow:inset 0 0 0 2px #314b36,0 0 10px #a5dc8828}.cart-pilot{filter:drop-shadow(0 2px #172018)}.cart-mounted{filter:drop-shadow(0 1px #142015)}.diorama-table{position:absolute;left:21%;top:61%;width:11%;height:12%;background:#6c5034;border:2px solid #c29c65;box-shadow:0 4px #2b2920}.diorama-table-edge{position:absolute;left:20%;top:60%;width:13%;height:3%;background:#a97c45}.diorama-table-leg{position:absolute;top:72%;width:2%;height:9%;background:#4b3a28;border-left:1px solid #94714a}.leg-left{left:21%}.leg-right{left:30%}.pixel-torch{position:absolute;top:25%;width:3%;height:16%;background:linear-gradient(90deg,#574127 25%,#997043 25%,#997043 65%,#574127 65%);box-shadow:0 2px 0 #191a12}.torch-left{left:15.5%}.torch-right{right:15.5%}.pixel-torch i{position:absolute;left:-40%;right:-40%;top:-30%;height:64%;background:#e59b4d;clip-path:polygon(50% 0,75% 35%,75% 15%,100% 75%,80% 100%,20% 100%,0 70%,25% 20%,30% 45%);box-shadow:0 0 20px #eeab65}.pixel-torch i:after{content:"";position:absolute;left:25%;right:25%;bottom:4%;height:60%;background:#ffe0a0;clip-path:polygon(50% 0,100% 100%,0 100%)}.diorama-lamplight{position:absolute;top:4%;width:38%;height:68%;background:radial-gradient(ellipse,#efb56a28,transparent 70%);pointer-events:none;mix-blend-mode:screen}.light-left{left:0}.light-right{right:0}
.loadout-card,.play-mode{background:linear-gradient(145deg,#242b21,#20251f);border-color:#555c46}.loadout-card:hover{background:#333d2c}.loadout-card[aria-pressed=true],.play-mode[aria-pressed=true]{border-color:#c7a46a;background:linear-gradient(145deg,#3b4930,#2d3828);box-shadow:inset 0 0 0 1px #d8b87f24}.loadout-card .loadout-art{height:95px}.loadout-art .asset-art{width:88px!important;height:92px}.loadout-items .asset-art{width:28px!important;height:28px}.selection-dot{z-index:2}.mode-card{background:linear-gradient(145deg,#30342a,#22271f)}.section-header>span{color:#a2aa90}
.enemy-panel{border:1px solid #514f3e;border-radius:14px;background:radial-gradient(ellipse at 85% 65%,#95784e24,transparent 70%),linear-gradient(120deg,#292d23,#20241e)}.enemy-art>.asset-art{width:140px!important;height:140px}.workbench{background:linear-gradient(145deg,#413e2f,#30362a);border-color:#777452;box-shadow:inset 0 0 0 4px #272a2099,0 12px 30px #090b0866}.board-cell{background:linear-gradient(145deg,#363f2e,#292f23);border-color:#66684b;box-shadow:inset 0 2px 4px #171b117a,0 2px 0 #11160e}.board-cell:hover{background:#485337}.board-cell.selected{background:#4b5938}.board-cell.empty{background:#1e281966;border-color:#7b895355}.board-cell .cell-art{width:82%}.cell-art>.asset-art{width:100%!important;height:auto;max-height:none}.cell-name{color:#e1e3c9}.board-cell[data-family=electric]{border-color:#63827c}.board-cell[data-family=heat]{border-color:#8b7053}.board-cell[data-family=utility]{border-color:#73755b}.board-cell.selected{border-color:var(--gold)}.board-cell.neighbor{border-color:var(--electric)}.board-cell.merge-target{border-color:var(--jade)}.shop-card{background:#23291fd9;border-color:#555d48}.shop-card:not(:disabled):hover{background:#36422d}.shop-icon>.asset-art{width:58px!important;height:58px}.detail-art>.asset-art{width:58px!important;height:58px}.shop-info p{color:#b9c0ad}.detail-panel{background:linear-gradient(145deg,#2f3829,#242b21)}.codex-item{background:#252d22}.codex-item>.asset-art{width:64px!important;height:64px;margin:auto}.mini-cell>.asset-art{width:80%!important;height:80%}.damage-row>.asset-art{width:32px!important;height:32px}.results-art>.asset-art{width:145px!important;height:150px}.drag-ghost .asset-art{width:70px!important;height:70px}.live-device>.asset-art{width:86%!important;height:86%;max-width:52px;max-height:52px}.briefing-art>.asset-art{width:78px!important;height:78px}.brand-mark .goblin-art{width:42px!important;height:44px;transform:translateY(2px)}.brand-mark .portrait-tool{display:none}
.arena-card{border-color:#777653;background:linear-gradient(135deg,#353c2d,#23291f)}.arena-hud{background:#262d21}.arena-screen{background:#292d26}.arena-screen canvas{image-rendering:pixelated}.drive-deck{border-top-color:#59604a}.control-stick{border-color:#707b55}.arena-shade.arena-briefing{background:#151811bb}.briefing-card{background:linear-gradient(140deg,#3e4833,#2a3226)}.arena-map-note,.arena-summon-note{background:#242c22}.pattern-badge{border-color:#a4bc7859}.device-pattern{background:#222c1d80}.modal{border-color:#71765b;background:linear-gradient(140deg,#343a2c,#252c22)}.modal-header{background:#2d3527;border-bottom-color:#535d46}.modal::backdrop{background:#111710c9}
@media(max-width:900px){.home-hero{gap:22px}.hero-copy h1{font-size:36px}.hero-copy>p{font-size:13px}.shop-icon>.asset-art{width:45px!important;height:45px}}
@media(max-width:720px){.home-hero{grid-template-columns:1fr;gap:20px;max-width:560px;margin:0 auto 24px}.hero-copy{max-width:100%}.hero-copy h1{font-size:36px;line-height:1.3}.hero-art{width:100%;max-width:480px;justify-self:center}.hero-copy>p{max-width:470px;font-size:13px}.profile-strip{margin-top:18px;width:auto;max-width:none}.enemy-art>.asset-art{width:130px!important;height:130px}.shop-icon>.asset-art{width:53px!important;height:53px}.live-device>.asset-art{max-width:44px;max-height:44px}.home-bottom{max-width:560px;margin:auto}}
@media(max-width:480px){.home-hero{display:grid;position:static;min-height:0;overflow:visible;padding-bottom:0;gap:18px;margin-bottom:22px}.hero-copy{max-width:100%;position:static}.hero-copy h1{font-size:34px;letter-spacing:-1.3px;margin:10px 0 13px}.hero-copy>p{font-size:13px;line-height:1.8}.hero-art{position:relative;left:auto;right:auto;top:auto;bottom:auto;width:100%;height:auto;min-height:0;opacity:1;padding:7px 7px 25px;pointer-events:none;border-radius:14px}.hero-caption{display:block;font-size:9px;bottom:8px;letter-spacing:.7px}.profile-strip{width:auto;max-width:none;gap:9px 14px;margin-top:16px}.profile-stat{font-size:11px}.loadout-card .loadout-art{height:79px;margin-bottom:8px}.loadout-art .asset-art{width:73px!important;height:76px}.loadout-items .asset-art{width:23px!important;height:23px}.loadout-list{gap:6px}.loadout-card{padding:10px 7px}.loadout-card .loadout-description{font-size:11px;min-height:51px;line-height:1.6}.enemy-art>.asset-art{width:115px!important;height:115px}.board[data-columns="6"] .cell-art{width:94%}.board[data-columns="6"] .module-plinth{inset:8% 6% 9%}.brand-mark .goblin-art{width:32px!important;height:34px}.live-device>.asset-art{max-width:40px;max-height:40px}.briefing-art>.asset-art{width:68px!important;height:68px}}
@media(max-width:350px){.hero-copy{max-width:100%}.hero-copy h1{font-size:31px}.hero-art{right:auto;opacity:1}.hero-copy>p{font-size:12px}.loadout-art .asset-art{width:63px!important;height:66px}.loadout-card .loadout-art{height:68px}.loadout-card .loadout-description{min-height:55px}.loadout-card strong{font-size:11px}.loadout-items{gap:1px}.loadout-items .asset-art{width:21px!important;height:21px}.enemy-art>.asset-art{width:93px!important;height:100px}.brand-type strong{font-size:13px}.briefing-art>.asset-art{width:61px!important;height:61px}}

/* Workshop interface: hard pixel edges and the same ink / brass / sage as
   the sprites. Keep Korean text readable and every action a real button. */
:root {
  --night:#1b1e19; --night-2:#252821; --panel:#2b2e25;
  --panel-high:#3b4131; --wood:#413b2b; --ink:#f1e6cc;
  --muted:#c0bdab; --faint:#a4a28f; --gold:#e0b779;
  --gold-dark:#987149; --jade:#b0ca95; --line:#665d45;
  --radius:0; --shadow:0 4px 0 #10140e;
  --frame-light:#978362; --frame-dark:#151b14;
}
/* Dense-board and mobile variants keep this geometry too. These invariants
   belong to UI surfaces; sprite halos and actual hazard circles retain theirs. */
:is(.panel,.button,.icon-button,.modal,.modal-close,.filter-button,.segmented,.segmented button,
    .play-mode,.loadout-card,.selection-dot,.mode-card,.mode-banner,.mode-banner button,
    .workbench,.enemy-panel,.board-cell,.mini-cell,.live-device,.shop-card,.stat-chip,.pill,
    .pattern-badge,.device-pattern,.live-pattern,.round-step,.cell-level,.cooldown-bar,
    .health-bar,.health-fill,.damage-track,.damage-track span,.arena-card,.drive-pad,
    .control-stick,.control-stick-thumb,.briefing-card,.briefing-key,.arena-shade>span,
    .codex-item,.codex-cost,.discovered-dot,.challenge-card,.perk-card,.help-number,
    .toast,.toast-action,.setting-row select,.expansion-preview i,.site-footer button) {
  border-radius:0!important;
}
body {
  background-color:var(--night);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='32' viewBox='0 0 48 32'%3E%3Cpath fill='%2323261f' d='M0 0h48v1H0zM0 16h48v1H0zM23 0h1v16h-1zM0 16h1v16H0z'%2F%3E%3Cpath fill='%23171915' d='M0 31h48v1H0zM24 1h1v15h-1zM1 17h1v14H1z'%2F%3E%3C/svg%3E");
}
.grain { display:none; }
.topbar { padding:18px 32px; border-bottom:2px solid #4d4937; gap:16px; }
.brand { min-height:44px; min-width:0; }
.brand-mark { border:2px solid #777452; border-radius:0; background:#343c2a; box-shadow:2px 2px 0 #0c110c; }
.brand-type strong { font-size:16px; letter-spacing:0; }
.brand-type small { font-family:var(--game-font); font-size:9px; letter-spacing:1px; color:#b8aa86; }
.top-actions { gap:6px; }
.app-shell { padding-top:24px; }
.eyebrow { font-size:10px; letter-spacing:1px; }
.eyebrow::before { width:6px; height:6px; background:#bb925e; box-shadow:2px 2px 0 #171d14; }
h2,h3 { letter-spacing:0; }
.ui-icon { flex-shrink:0; image-rendering:pixelated; }
.panel,.workbench,.enemy-panel,.arena-card,.modal,.hero-art,.briefing-card {
  border-radius:0; background:var(--panel); border:2px solid #736346;
  box-shadow:inset 0 2px 0 #b0a17a26,inset 2px 0 0 #b0a17a1f,inset -2px -2px 0 #151c1480,0 4px 0 #10140e;
}
.panel:not(button)::before,.workbench::after {
  content:""; pointer-events:none; position:absolute; left:5px; top:5px;
  width:3px; height:3px; background:#a0895a; box-shadow:1px 1px 0 #11180e;
}
.panel:not(button) { position:relative; }
.panel:not(button)::after {
  content:""; pointer-events:none; position:absolute; right:5px; bottom:5px;
  width:3px; height:3px; background:#75623f; box-shadow:1px 1px 0 #11180e;
}
.button,.icon-button,.modal-close,.filter-button,.segmented button,.mode-banner button,.site-footer button,.toast-action {
  border-radius:0; border:2px solid #716849; background:#3b4132; color:var(--ink);
  box-shadow:inset 0 2px 0 #b3b39126,inset 0 -2px 0 #1f281c,0 3px 0 #10170e;
  min-height:44px; transition:none;
}
.button { font-size:13px; font-weight:700; letter-spacing:.2px; padding:10px 16px; }
.button.small,.shop-footer .button,.detail-actions .button { min-height:44px; padding:8px 10px; }
.button.subtle { background:#2a3026; border-color:#5d6348; color:#cdc6ae; }
.button.primary { background:#bf915a; border-color:#e4bd83; color:#201f17; box-shadow:inset 0 2px 0 #f0d69c,inset 0 -3px 0 #a87948,0 4px 0 #4d3827; }
.button.resume,.button.resume.primary { background:#617748; color:#f0efd1; border-color:#a1b779; box-shadow:inset 0 2px 0 #9aa970,inset 0 -3px 0 #445b33,0 4px 0 #1a2615; }
.button.danger { background:#49362b; border-color:#9b6e50; color:#f1bea1; }
.button:hover:not(:disabled),.icon-button:hover,.modal-close:hover,.filter-button:hover,.mode-banner button:hover,.site-footer button:hover,.toast-action:hover { background:#4a5139; transform:none; border-color:#a6a177; }
.button.primary:hover:not(:disabled) { background:#d0a068; border-color:#f0d299; }
.button.resume:hover:not(:disabled) { background:#728951; border-color:#bfd293; }
.button:active:not(:disabled),.icon-button:active,.modal-close:active,.filter-button:active,.segmented button:active,.site-footer button:active,.toast-action:active {
  transform:translateY(2px); box-shadow:inset 0 2px 0 #20271b,0 1px 0 #11170d;
}
.button[aria-pressed=true],.filter-button.active,.segmented button[aria-pressed=true] {
  background:#455638; color:#eff0cf; border-color:#b3c48a;
  box-shadow:inset 0 2px 0 #25331e,inset 0 -2px 0 #6d7e4f,0 2px 0 #11180d;
}
button:disabled { opacity:1; background:#282d23; border-color:#4a503c; color:#898e77; box-shadow:inset 0 1px 0 #1c2419,0 2px 0 #10170d; }
button:disabled .ui-icon { opacity:.55; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #f0d29a; outline-offset:3px;
}
.icon-button,.modal-close { width:44px; height:44px; padding:9px; }
.icon-button svg { width:24px; height:24px; }
.modal-close svg { width:20px; height:20px; }

/* A game title and a working menu, with starting controls visible early. */
.home-menu { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr); gap:22px 26px; max-width:1080px; margin:auto; align-items:start; }
.home-menu .home-hero { display:grid; grid-template-columns:1fr; gap:18px; min-height:0; padding:0; margin:0; position:static; overflow:visible; }
.home-menu .hero-copy { width:100%; max-width:none; position:static; padding:10px 3px 2px; }
.home-menu .hero-copy h1 { font-size:clamp(29px,3.6vw,43px); font-weight:800; letter-spacing:.2px; line-height:1.3; margin:11px 0 12px; color:#f2d7a2; text-shadow:2px 2px 0 #705238,4px 4px 0 #121b12; }
.home-menu .hero-copy>p { max-width:none; font-size:13px; line-height:1.65; color:#c1bfaa; }
.home-menu .hero-art { position:relative; inset:auto; width:100%; height:auto; min-height:0; opacity:1; padding:8px 8px 26px; background:#272a21; border-color:#665b43; overflow:hidden; }
.home-menu .hero-art::before { content:none; }
.home-menu .hero-art>.asset-art { width:100%!important; max-width:none; filter:none; }
.home-menu .hero-caption { display:block; font-family:var(--game-font); font-size:10px; letter-spacing:2px; color:#a9a183; bottom:8px; }
.home-menu .profile-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:0; max-width:none; width:100%; background:#252b22; border-top:2px solid #4f533c; border-bottom:2px solid #171f16; padding:12px 4px; }
.home-menu .profile-stat { display:grid; grid-template-columns:18px minmax(0,1fr); gap:3px 8px; padding:0 12px; font-size:10px; border-right:1px solid #4c503a; }
.home-menu .profile-stat:last-child { border:0; }
.home-menu .profile-stat .ui-icon { width:18px; height:18px; grid-row:1/3; align-self:center; }
.home-menu .profile-stat strong { font-family:var(--game-font); font-size:17px; color:#e2cfab; }
.home-menu .profile-stat>span { color:#babaa2; }
.home-menu .start-panel { padding:20px; min-width:0; }
.home-menu .start-actions { gap:10px; }
.home-menu .start-actions .primary { min-height:54px; font-size:16px; }
.home-menu .start-actions .button:not(.primary) { min-height:44px; font-size:12px; }
.home-menu .start-note { margin:11px 0 20px; font-size:11px; line-height:1.65; color:#b9b79f; }
.home-menu .play-mode-section { margin:0 0 18px; padding:0 0 18px; border-bottom:2px solid #484e37; }
.home-menu .play-mode-section>h3 { font-size:12px; color:#d8d3b8; margin-bottom:10px; }
.play-modes { gap:8px; }
.play-mode,.loadout-card { border-radius:0; border:2px solid #585e45; background:#242c22; box-shadow:inset 0 -2px 0 #151e13,0 2px 0 #141b10; transition:none; }
.play-mode { position:relative; grid-template-columns:24px minmax(0,1fr); padding:11px 12px; gap:8px; min-height:84px; }
.play-mode>span:last-child { display:block; min-width:0; }
.play-mode strong { display:block; font-size:13px; line-height:1.5; }
.play-mode small { display:block; grid-column:auto; font-size:11px; line-height:1.55; color:#b6bda1; margin-top:3px; }
.play-mode-symbol { display:grid; place-items:center; font-size:24px; }
.play-mode:hover,.loadout-card:hover { background:#353e2c; transform:none; border-color:#879064; }
.play-mode[aria-pressed=true],.loadout-card[aria-pressed=true] { background:#3b4b2e; border-color:#a6b779; box-shadow:inset 0 2px 0 #697a49,inset 0 -2px 0 #23331c,0 2px 0 #10180c; }
.play-mode[aria-pressed=true]::after { content:""; position:absolute; right:5px; top:5px; width:3px; height:8px; background:#c2d598; }
.section-header { margin-bottom:12px; }
.section-header>span { letter-spacing:.5px; color:#b5b79c; }
.loadout-list { gap:8px; }
.loadout-card { padding:12px 8px 10px; }
.loadout-card .loadout-art { height:78px; margin-bottom:5px; }
.loadout-art .asset-art { width:75px!important; height:79px; }
.loadout-card strong { font-size:12px; color:#e6dfc1; }
.loadout-card .loadout-description { min-height:34px; font-size:11px; line-height:1.5; color:#c0c3a8; }
.loadout-items { gap:2px; margin-top:8px; }
.loadout-items .asset-art { width:24px!important; height:24px; }
.selection-dot { width:16px; height:16px; top:6px; right:6px; border-radius:0; border:1px solid #727b56; background:#1c2719; box-shadow:1px 1px 0 #0f170b; display:grid; place-items:center; }
.selection-dot svg { visibility:hidden; width:12px; height:12px; }
.loadout-card[aria-pressed=true] .selection-dot { background:#627746; border-color:#c3d099; box-shadow:1px 1px 0 #17230d; }
.loadout-card[aria-pressed=true] .selection-dot svg { visibility:visible; }
.difficulty-row { margin:18px 0 2px; }
.difficulty-row label { color:#d4d0b8; font-size:12px; }
.segmented { border-radius:0; border:1px solid #51583e; padding:3px; background:#182315; gap:3px; }
.segmented button { padding:6px 12px; font-size:12px; min-width:56px; }
.home-jobs { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.home-jobs .mode-card { display:grid; grid-template-columns:30px minmax(0,1fr) auto 16px; gap:12px; align-items:center; padding:16px 18px; background:#2a3024; }
.home-jobs .mode-symbol { position:static; opacity:1; display:grid; place-items:center; }
.home-jobs .mode-card h3 { margin:0 0 3px; font-size:14px; }
.home-jobs .mode-card p { font-size:11px; max-width:none; line-height:1.6; }
.home-jobs .mode-card small { font-size:10px; color:#c3b18c; font-family:var(--game-font); }
.home-jobs .mode-card:hover { background:#39432d; border-color:#9aa16e; }
.endless-best-home { margin-top:12px; color:#c3cbaa; }

/* Inventory and battle windows share the same mechanical frame. */
.enemy-panel { background:#292e24; }
.enemy-panel::after { display:none; }
.workbench { background:#383b2b; border-color:#91845d; }
.board-cell,.mini-cell,.live-device,.shop-card,.codex-item,.perk-card,.challenge-card { border-radius:0; background:#293122; border-color:#596144; box-shadow:inset 0 -2px 0 #141d12,0 2px 0 #12190d; transition:none; }
.board-cell { background:#343d29; }
.board-cell::before,.board-cell::after { border-radius:0; background:#858969; box-shadow:1px 1px 0 #1b2515; width:3px; height:3px; }
.board-cell:hover { background:#455032; }
.board-cell.selected { background:#485837; border-color:#e2bd81; box-shadow:inset 0 0 0 2px #ac9e63,0 2px 0 #141b0e; }
.board-cell.neighbor { background:#34463a; border-color:#84b0a0; }
.board-cell.merge-target { border-color:#bccd8e; box-shadow:inset 0 0 0 2px #6f8751,0 2px 0 #141b0e; }
.board-cell.empty { background:#20291b; border:1px dashed #68734b; box-shadow:inset 0 2px 0 #151f12; }
.board-cell.locked { background:#20271b; border-color:#495238; }
.board-cell.unlock-ready { background:#3a4b2b; border-color:#b3c485; box-shadow:inset 0 -2px 0 #24321b,0 2px 0 #10180b; }
.cell-level,.cooldown-bar,.cooldown-fill,.live-cooldown,.live-cooldown span { border-radius:0; }
.cell-name { color:#ede9cf; }
.cell-plus { color:#6f8054; }
.shop-panel,.detail-panel,.hint-panel,.endless-forge,.endless-expansion { background:#2a3024; }
.shop-title { padding-bottom:12px; border-bottom:2px solid #434b34; }
.shop-title>div>p { color:#b3b59c; letter-spacing:0; }
.shop-card:not(:disabled):hover { background:#3a472d; border-color:#a5ae7b; }
.shop-card:disabled,.shop-card.sold { opacity:1; background:#232c20; border-color:#424e35; }
.shop-card:disabled .shop-icon { opacity:.6; }
.shop-card:disabled .shop-info { opacity:.78; }
.shop-card:disabled .shop-price { color:#a9b296; }
.shop-info p,.detail-description,.settings-note,.codex-item p,.help-step p { color:#c2c5ac; }
.shop-price { font-family:var(--game-font); }
.stat-chip,.pill,.pattern-badge,.device-pattern,.mode-banner,.live-pattern,.briefing-key,.battle-paused,.pause-shade,.pause-shade span,.arena-shade>span {
  border-radius:0; background:#232d20; border-color:#646c48; box-shadow:none;
}
.stat-chip,.pill,.pattern-badge { padding:3px 7px; }
.pattern-badge[data-pattern=chain],.pattern-badge[data-pattern=blast] { background:#22392d; border-color:#67917c; }
.device-pattern { background:#242e1f; }
.health-bar { height:9px; border:1px solid #151e12; border-radius:0; background:#1b2218; box-shadow:0 0 0 1px #786c49; }
.health-fill { border-radius:0; background:#bf7758; box-shadow:inset 0 1px 0 #e8b589; }
.damage-track,.damage-track span,.round-step,.round-step.boss,.codex-cost,.discovered-dot { border-radius:0; }
.damage-track { background:#1a2416; height:6px; }
.damage-track span { background:#b89c65; box-shadow:inset 0 1px 0 #e8d0a0; }
.round-step { background:#33412b; border:1px solid #455539; box-shadow:inset 0 -2px 0 #182415; }
.round-step.done { background:#749363; border-color:#9daf78; }
.round-step.current { background:#c19861; border-color:#e5c28b; box-shadow:inset 0 2px 0 #e6c890,inset 0 -2px 0 #977443; color:#242817; }
.resource,.result-number strong,.round-step { font-family:var(--game-font); }
.arena-hud { background:#293124; border-bottom:2px solid #515b3b; }
.arena-card { background:#2a3124; }
.drive-deck,.arena-map-note,.arena-summon-note,.arena-cleared { background:#283121; }
.drive-deck { border-top:2px solid #536341; }
.drive-pad { border-radius:0; border:2px solid #5b7047; background:#313e27; box-shadow:inset 0 2px 0 #172613; }
.control-stick { border-radius:0; background:#1e2b19; border:2px solid #718250; box-shadow:inset 0 0 0 3px #29381f; }
.control-stick-thumb { border-radius:0; background:#b99b61; border:2px solid #dfc591; box-shadow:inset 0 -3px 0 #886e42,2px 2px 0 #172412; width:26px; height:26px; }
.control-stick-arrows { font-family:var(--game-font); color:#a1ad7e; }
.arena-shade.arena-briefing { backdrop-filter:none; }
.briefing-card { background:#333e28; }
.briefing-card h2 { color:#e5d0a0; }
.arena-shade>span,.pause-shade span { border:2px solid #988257; background:#343d2bea; box-shadow:0 3px 0 #171e12; }
.briefing-key { background:#24301c; border:1px solid #748256; font-family:var(--game-font); }
.drive-pause { background:#495638; border-color:#90a068; min-height:60px; }
.action-tip,.live-loadout { background:#2a3123; }
.hazard-sample { box-shadow:none; }

/* Dialogue controls are inventory controls, including native form inputs. */
.modal { border:3px solid #8e7954; background:#2c3326; box-shadow:0 6px 0 #11190d,0 0 0 2px #172012; }
.modal::backdrop { background:#10160ed6; backdrop-filter:none; }
.modal-header { position:sticky; top:0; z-index:3; padding:16px 20px; background:#38432c; border-bottom:2px solid #899064; }
.modal-header h2 { font-size:20px; color:#ebd8b0; }
.modal-body { padding:20px; }
.modal-actions { padding-top:8px; }
.help-number { border-radius:0; border:2px solid #9d8758; background:#3d482c; width:28px; height:28px; font-family:var(--game-font); box-shadow:2px 2px 0 #141e0d; }
.help-note { background:#27311f; border-color:#606e43; border-radius:0; }
.setting-row { min-height:52px; }
.setting-row label { display:inline-flex; align-items:center; min-height:44px; }
.setting-row input[type=checkbox] {
  appearance:none; width:44px; height:44px; margin:0; flex-shrink:0; cursor:pointer;
  border:2px solid #788152; border-radius:0; background:#202c19; box-shadow:inset 0 2px 0 #121e0b;
}
.setting-row input[type=checkbox]:checked {
  background-color:#607641; border-color:#b2c386;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23e1e9b8' d='M11 3h3v3h-2v2h-2v2H8v2H5v-2H3V8H1V5h3v2h2v2h1V7h2V5h2z'%2F%3E%3C/svg%3E");
  background-size:24px 24px; background-repeat:no-repeat; background-position:center;
}
.setting-row input[type=range] { appearance:none; height:44px; background:transparent; cursor:pointer; }
.setting-row input[type=range]::-webkit-slider-runnable-track { height:8px; background:#202d19; border:2px solid #6a7b47; }
.setting-row input[type=range]::-webkit-slider-thumb { appearance:none; width:22px; height:24px; margin-top:-10px; border:2px solid #e3c68f; background:#b69b63; border-radius:0; box-shadow:2px 2px 0 #172410; }
.setting-row input[type=range]::-moz-range-track { height:6px; background:#202d19; border:2px solid #6a7b47; }
.setting-row input[type=range]::-moz-range-thumb { width:20px; height:22px; border:2px solid #e3c68f; background:#b69b63; border-radius:0; }
.setting-row select { border-radius:0; border:2px solid #788152; background:#24301d; color:#e5e4c5; min-height:44px; padding:8px 12px; }
.settings-divider { border-top:2px solid #596640; }
.filter-button { min-width:44px; font-size:12px; }
.codex-item { background:#25321f; border:1px solid #54663b; }
.codex-item strong { color:#e8e2c8; }
.codex-cost { font-family:var(--game-font); color:#dabe83; background:#1c2716; border:1px solid #4b5b32; padding:1px 4px; }
.discovered-dot { width:6px; height:6px; background:#bfd093; box-shadow:1px 1px 0 #17210e; }
.challenge-card,.perk-card { background:#2c3922; }
.challenge-card:hover,.perk-card:hover { background:#3c4b2b; border-color:#a4b97a; }
.challenge-card strong,.perk-card strong { color:#e5d1a3; }
.results-hero h1 { font-size:32px; letter-spacing:0; color:#ebd1a0; text-shadow:2px 2px 0 #57432b; }
.result-number { padding:10px 2px; background:#242e1d; border-top:2px solid #5c6b40; border-bottom:2px solid #151f0e; }
.result-actions .button { min-height:48px; }
.toast { border-radius:0; background:#c6ac77; color:#232a19; border:2px solid #eddbac; box-shadow:0 4px 0 #493d25; animation:none; }
.toast.error { background:#b78366; color:#221b12; border-color:#e2b495; }
.toast-action { background:#47572e; color:#f0e8c5; border-color:#aab97a; padding:6px 10px; margin:8px 0 0; pointer-events:auto; }
.site-footer { border-top:1px solid #495037; font-size:11px; }
.site-footer button { font-size:11px; padding:6px 10px; }

@media(max-width:900px) {
  .topbar { padding:14px 22px; }
  .home-menu { gap:18px; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .home-menu .start-panel { padding:16px; }
  .home-menu .profile-stat { padding:0 8px; gap:3px 5px; }
  .play-mode { padding:10px 8px; gap:6px; }
  .loadout-card { padding:10px 6px; }
  .loadout-card .loadout-art { height:68px; }
  .loadout-art .asset-art { width:64px!important; height:68px; }
  .loadout-items .asset-art { width:21px!important; height:21px; }
  .segmented button { padding:6px 9px; min-width:48px; }
  .home-jobs .mode-card { gap:8px; padding:14px; }
}
@media(max-width:720px) {
  .home-menu { display:grid; grid-template-columns:1fr; gap:16px; max-width:520px; }
  .home-menu .home-hero { gap:12px; max-width:none; }
  .home-menu .hero-copy { padding:0 2px; }
  .home-menu .hero-copy h1 { font-size:32px; margin:8px 0 8px; }
  .home-menu .hero-art { width:100%; max-width:none; padding:0 0 23px; }
  .home-menu .hero-art>.asset-art { width:min(100%,320px)!important; max-width:320px; }
  .home-menu .hero-caption { bottom:6px; font-size:9px; }
  .home-menu .profile-strip { padding:9px 4px; }
  .home-menu .home-jobs { grid-template-columns:1fr; gap:10px; }
  .home-menu .start-panel { padding:16px; }
  .loadout-card .loadout-art { height:75px; }
  .loadout-art .asset-art { width:72px!important; height:75px; }
  .loadout-items .asset-art { width:25px!important; height:25px; }
  .play-mode { min-height:76px; }
  .shop-card { min-height:178px; }
  .modal-header { padding:12px 16px; }
}
@media(max-width:480px) {
  .topbar { padding:12px; gap:8px; }
  .top-actions { gap:4px; }
  .brand { gap:8px; }
  .brand-type strong { font-size:13px; }
  .brand-type small { display:none; }
  .brand-mark { width:34px; height:36px; }
  .app-shell { padding:18px 12px; }
  .home-menu .hero-copy h1 { font-size:29px; }
  .home-menu .hero-copy>p { font-size:12px; }
  .home-menu .hero-art>.asset-art { width:280px!important; max-width:100%; }
  .home-menu .profile-stat { padding:0 7px; gap:2px 4px; font-size:9px; }
  .home-menu .profile-stat strong { font-size:15px; }
  .home-menu .profile-stat .ui-icon { width:16px; height:16px; }
  .home-menu .start-panel { padding:14px; }
  .home-menu .start-note { margin-bottom:15px; font-size:11px; }
  .play-mode { padding:9px; grid-template-columns:20px minmax(0,1fr); gap:6px; }
  .play-mode-symbol .ui-icon { width:20px; height:20px; }
  .play-mode strong { font-size:12px; }
  .play-mode small { font-size:10px; line-height:1.6; }
  .loadout-card .loadout-art { height:63px; }
  .loadout-art .asset-art { width:60px!important; height:63px; }
  .loadout-card .loadout-description { min-height:34px; font-size:11px; line-height:1.4; }
  .loadout-card strong { font-size:11px; }
  .loadout-items .asset-art { width:22px!important; height:22px; }
  .difficulty-row { margin-top:15px; gap:8px; }
  .segmented button { min-width:47px; font-size:11px; padding:6px 8px; }
  .home-jobs .mode-card { padding:13px 12px; gap:9px; }
  .home-jobs .mode-card p { font-size:11px; }
  .home-jobs .mode-card small { max-width:68px; font-size:9px; }
  .workbench { padding:13px 11px 14px; }
  .board-cell,.arena-card,.drive-pad { border-radius:0; }
  .shop-panel { padding:14px 10px; }
  .shop-footer .button { font-size:11px; padding:7px 9px; }
  .modal { width:calc(100% - 24px); }
  .modal-header { padding:11px 12px; }
  .modal-header h2 { font-size:18px; }
  .modal-body { padding:16px 12px; }
  .setting-row { gap:12px; }
  .filter-button { padding:6px 9px; }
  .briefing-card { padding:16px; }
  .site-footer { margin-top:4px; padding:12px; }
}
@media(max-width:380px) {
  .brand-type { display:none; }
  .home-menu .hero-copy h1 { font-size:27px; }
  .home-menu .hero-art>.asset-art { width:260px!important; }
  .home-menu .start-panel { padding:12px 10px; }
  .home-menu .loadout-list { gap:5px; }
  .loadout-card { padding:10px 5px 8px; }
  .loadout-card .loadout-art { height:59px; }
  .loadout-art .asset-art { width:56px!important; height:59px; }
  .loadout-items { gap:1px; }
  .loadout-items .asset-art { width:20px!important; height:20px; }
  .home-menu .profile-stat { font-size:9px; }
  .home-jobs .mode-card { grid-template-columns:24px minmax(0,1fr) 16px; }
  .home-jobs .mode-card small { grid-column:2; max-width:none; }
  .home-jobs .mode-card>.ui-icon { grid-column:3; grid-row:1/3; }
}

/* Real Korean / Latin pixel type. Both original weights ship locally with
   their OFL notice; short labels use the font's native twelve-pixel grid. */
@font-face {
  font-family:'Galmuri11'; font-style:normal; font-weight:400;
  font-display:swap; src:url('./assets/galmuri11.woff2') format('woff2');
}
@font-face {
  font-family:'Galmuri11'; font-style:normal; font-weight:700;
  font-display:swap; src:url('./assets/galmuri11-bold.woff2') format('woff2');
}
/* The real Bold omits these direction and mathematical glyphs. Use their
   original Regular pixels within the same family instead of an OS font. */
@font-face {
  font-family:'Galmuri11'; font-style:normal; font-weight:700;
  font-display:swap; src:url('./assets/galmuri11.woff2') format('woff2');
  unicode-range:U+2194-2195,U+219D,U+2212,U+221E;
}
:root {
  --game-font:'Galmuri11',monospace; font-family:var(--game-font);
  font-size:15px; line-height:1.6; font-synthesis:none; font-kerning:none;
}
body { font-family:var(--game-font); word-break:keep-all; overflow-wrap:break-word; }
button,input,select,textarea { font-family:var(--game-font); }
h1,h2,h3,strong,b { font-weight:700; letter-spacing:0; }
p,.settings-note,.help-note,.loadout-description { word-break:keep-all; overflow-wrap:break-word; }
.button,.icon-button,.filter-button,.segmented button { font-weight:700; letter-spacing:0; }
.button { font-size:14px; line-height:22px; }
.button.small,.shop-footer .button,.detail-actions .button { font-size:12px; line-height:20px; }
.brand-type strong { font-size:14px; font-weight:700; line-height:20px; }
.brand-type small { font-size:12px; line-height:16px; letter-spacing:0; }
.eyebrow { font-size:12px; line-height:20px; font-weight:400; letter-spacing:0; }
.home-menu .hero-copy h1 { font-size:36px; line-height:48px; font-weight:700; letter-spacing:0; text-shadow:2px 2px 0 #60482d; }
.home-menu .hero-copy>p { font-size:14px; line-height:24px; }
.home-menu .hero-caption { font-size:12px; line-height:16px; letter-spacing:0; bottom:6px; }
.home-menu .profile-stat { font-size:12px; line-height:16px; }
.home-menu .profile-stat strong { font-size:16px; line-height:22px; font-weight:700; }
.home-menu .start-actions .primary { font-size:18px; line-height:26px; font-weight:700; }
.home-menu .start-actions .button:not(.primary) { font-size:14px; }
.home-menu .start-note { font-size:12px; line-height:20px; }
.home-menu .play-mode-section>h3 { font-size:14px; line-height:22px; }
.play-mode strong { font-size:14px; line-height:22px; font-weight:700; }
.play-mode small { font-size:12px; line-height:20px; }
.section-header h3 { font-size:16px; line-height:24px; }
.section-header>span { font-size:12px; line-height:18px; letter-spacing:0; }
.loadout-card strong { font-size:12px; line-height:20px; font-weight:700; }
.loadout-card .loadout-description { font-size:12px; line-height:20px; min-height:40px; }
.difficulty-row label,.segmented button { font-size:12px; line-height:20px; }
.home-jobs .mode-card h3 { font-size:16px; line-height:24px; }
.home-jobs .mode-card p { font-size:12px; line-height:20px; }
.home-jobs .mode-card small { font-size:12px; line-height:18px; }
.endless-best-home,.endless-pressure,.endless-pressure small,.endless-result-summary { font-size:12px; line-height:20px; }
.run-title,.arena-layout .run-title { font-size:18px; line-height:26px; letter-spacing:0; }
.run-heading { margin-bottom:12px; }
.run-resources,.resource,.arena-layout .resource { font-size:16px; font-weight:700; }
.resource small,.arena-layout .resource small { font-size:12px; }
.run-heading-left { max-width:none; min-width:0; }
.pill,.run-heading .pill,.enemy-flags .pill,.stat-chip,.pattern-badge { font-size:12px; line-height:18px; }
.round-step,.endless-track .round-step { font-size:12px; line-height:18px; }
.round-infinity,.run-mode,.live-pattern,.control-stick-arrows { font-weight:400; }
.enemy-name,.arena-enemy-title h2 { font-size:24px; line-height:32px; font-weight:700; letter-spacing:0; }
.enemy-copy .eyebrow { font-size:12px; line-height:18px; letter-spacing:0; }
.enemy-description,.enemy-trait,.enemy-hp,.bench-label,.bench-caption,.bench-status,.coach-line,.control-teaser { font-size:12px; line-height:20px; }
.cell-name { font-size:12px; line-height:16px; margin-bottom:4px; }
.board[data-columns="6"] .cell-name { font-size:10px; line-height:14px; }
.cell-level { font-size:12px; line-height:16px; }
.shop-title h3,.detail-top h3 { font-size:18px; line-height:26px; }
.shop-title>div>p,.shop-footer>span,.family-label { font-size:12px; line-height:20px; letter-spacing:0; }
.shop-info strong { font-size:12px; line-height:20px; font-weight:700; }
.shop-info p { font-size:12px; line-height:20px; }
.shop-info .pattern-badge { font-size:12px; line-height:18px; }
.shop-price { font-size:14px; line-height:22px; font-weight:700; }
.detail-description,.settings-note,.help-step p,.help-note,.about-copy p,
.briefing-card>p,.action-tip p,.hint-panel p,.perk-card p,.challenge-card p { font-size:14px; line-height:24px; }
.detail-stats,.bonus-line,.device-pattern p,.device-pattern small,.device-pattern>div>span:last-child,
.forge-next,.endless-forge p,.endless-forge small,.endless-expansion p,.endless-expansion small { font-size:12px; line-height:20px; }
.arena-status-row,.arena-swarm-hud,.arena-map-note,.arena-summon-note,.arena-bottom { font-size:12px; line-height:20px; }
.arena-enemy-title #battle-clock { font-size:12px; line-height:20px; }
.drive-copy strong,.drive-copy span,.drive-pause { font-size:12px; line-height:20px; }
.briefing-card h2 { font-size:24px; line-height:32px; }
.briefing-key { font-size:12px; line-height:20px; }
.briefing-card .briefing-note { font-size:12px; line-height:20px; }
.modal-header h2 { font-size:24px; line-height:32px; }
.modal-header h2 { min-width:0; overflow-wrap:break-word; }
.modal-close { flex-shrink:0; }
.help-step h3,.settings-group h3,.challenge-card strong,.perk-card strong { font-size:16px; line-height:24px; }
.help-number { font-size:12px; line-height:20px; }
.setting-row label { font-size:14px; line-height:22px; }
.setting-row p { font-size:12px; line-height:20px; }
.setting-row select { font-size:14px; line-height:22px; }
.filter-button { font-size:12px; line-height:20px; }
.codex-item strong { font-size:12px; line-height:20px; }
.codex-item p,.codex-cost { font-size:12px; line-height:20px; }
.challenge-number { font-size:12px; line-height:20px; }
.results-hero h1 { font-size:24px; line-height:32px; font-weight:700; }
.results-hero p,.result-note { font-size:14px; line-height:24px; }
.result-number strong { font-size:24px; line-height:32px; font-weight:700; }
.result-number span,.damage-row { font-size:12px; line-height:20px; }
.toast,.site-footer,.site-footer button,.offline-notice { font-size:12px; line-height:20px; }
.module-upgrade,.portrait-star { font-family:var(--game-font); font-weight:400; }
@media(max-width:480px) {
  .brand-type strong { font-size:12px; }
  .home-menu .hero-copy h1 { font-size:36px; line-height:48px; }
  .home-menu .hero-copy>p { font-size:12px; line-height:20px; }
  .home-menu .profile-stat { font-size:12px; grid-template-columns:16px minmax(0,1fr); gap:3px; padding:0 5px; }
  .home-menu .profile-stat strong { font-size:14px; line-height:20px; }
  .home-menu .profile-stat>span { grid-column:1/-1; white-space:nowrap; }
  .play-mode { grid-template-columns:20px minmax(0,1fr); padding:8px 7px; }
  .play-mode strong { font-size:12px; }
  .play-mode small { font-size:12px; line-height:20px; }
  .section-header { gap:8px; flex-wrap:wrap; }
  .section-header h3 { font-size:14px; }
  .run-heading { align-items:flex-start; gap:8px; }
  .run-heading-left { gap:4px; }
  .run-title,.arena-layout .run-title { font-size:16px; line-height:24px; }
  .run-resources,.resource,.arena-layout .resource { font-size:14px; }
  .run-heading .pill,.arena-layout .run-heading .pill { font-size:12px; }
  .enemy-name,.arena-enemy-title h2 { font-size:18px; line-height:26px; }
  .bench-header,.bench-status { flex-wrap:wrap; gap:4px 10px; }
  .shop-info .pattern-badge { font-size:12px; }
  .shop-price { font-size:12px; }
  .shop-footer { flex-wrap:wrap; gap:8px; }
  .modal-header h2 { font-size:24px; line-height:32px; }
  .home-jobs .mode-card { grid-template-columns:26px minmax(0,1fr) 16px; }
  .home-jobs .mode-card small { grid-column:2; max-width:none; }
  .home-jobs .mode-card>.ui-icon { grid-column:3; grid-row:1/3; }
  .arena-swarm-hud { align-items:flex-start; flex-wrap:wrap; }
  .drive-copy strong,.drive-copy span,.drive-pause { font-size:12px; line-height:18px; }
}
@media(max-width:350px) {
  .home-menu .hero-copy h1 { font-size:36px; line-height:48px; }
  .resource,.arena-layout .resource { font-size:12px; }
  .run-title,.arena-layout .run-title { font-size:14px; }
  .drive-deck { gap:6px; padding:8px; }
  .drive-pad { gap:7px; padding:7px; }
  .drive-copy span { font-size:12px; }
  .drive-pause { min-width:68px; max-width:none; }
}

/* Chemical vessels and the drive train use the same atlas and workshop frame. */
.module-art[data-family=chemical] { --family-color:#b9d58b; --family-dark:#35402b; }
.module-art[data-family=mobility] { --family-color:#a7c5d8; --family-dark:#2c3a3e; }
.module-art[data-family=chemical] .module-plinth { border-color:#8b9e67; }
.module-art[data-family=mobility] .module-plinth { border-color:#7b98a5; }
.module-family-mark { position:absolute; right:8%; bottom:7%; width:23%; height:23%; display:grid; place-items:center; background:#20291f; border:1px solid var(--family-color); box-shadow:1px 1px 0 #111910; }
.module-family-mark .ui-icon { width:90%; height:90%; }
.goblin-art[data-family=chemical] .portrait-halo { background:radial-gradient(ellipse,#9dbe6538,transparent 68%); }
.goblin-art[data-family=mobility] .portrait-halo { background:radial-gradient(ellipse,#7cabbc38,transparent 68%); }
.board-cell[data-family=chemical],.live-device[data-family=chemical],.shop-card[data-family=chemical],.codex-item[data-family=chemical] { border-color:#87945c; }
.board-cell[data-family=mobility],.live-device[data-family=mobility],.shop-card[data-family=mobility],.codex-item[data-family=mobility] { border-color:#7893a0; }
.family-label[data-family=chemical] { color:#b9d58b; }
.family-label[data-family=mobility] { color:#a7c5d8; }
.board-cell.selected,.live-device.selected { border-color:var(--gold); }
.board-cell.neighbor { border-color:var(--electric); }
.live-device.waiting-momentum .live-cooldown span { background:#8294a0; }
.live-device.waiting-momentum::after { content:""; position:absolute; left:5px; top:5px; width:4px; height:4px; background:#758a96; box-shadow:0 5px 0 #758a96; pointer-events:none; }
.loadout-list { grid-template-columns:repeat(6,minmax(0,1fr)); }
.loadout-card { grid-column:span 2; min-width:0; }
.loadout-card:nth-last-child(-n+2) { grid-column:span 3; }
.loadout-card[data-family=chemical] { border-color:#7e8f5d; }
.loadout-card[data-family=mobility] { border-color:#748e9b; }
.loadout-card[aria-pressed=true] { border-color:#c3d099; }
.device-interaction { margin-top:12px; padding:10px; background:#222d1d; border-left:3px solid #8caa61; }
.device-interaction[data-family=mobility] { border-left-color:#8caebe; background:#222d2a; }
.device-interaction h4 { display:flex; align-items:center; gap:6px; color:#dce2bb; font-size:12px; line-height:20px; margin-bottom:5px; }
.device-interaction p { font-size:12px; line-height:20px; color:#c3c9b0; }
.device-interaction .interaction-limit { margin-top:6px; color:#c4d8dd; }
.interaction-handbook { margin:12px 0 18px; border:1px solid #607449; background:#23321e; }
.interaction-handbook summary { display:flex; align-items:center; gap:8px; min-height:44px; padding:10px 12px; color:#d8ddb4; cursor:pointer; font-size:12px; line-height:20px; list-style:none; }
.interaction-handbook summary::-webkit-details-marker { display:none; }
.interaction-handbook summary::after { content:"+"; margin-left:auto; color:#b9ca8d; font-weight:700; }
.interaction-handbook[open] summary::after { content:"−"; }
.interaction-handbook[open] summary { border-bottom:1px solid #607449; }
.interaction-handbook summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.interaction-recipes { display:grid; gap:12px; padding:12px; }
.interaction-recipe h3 { display:flex; align-items:flex-start; gap:6px; font-size:12px; line-height:20px; color:#d2ddaf; margin-bottom:5px; }
.interaction-recipe h3 .ui-icon { margin-top:2px; }
.interaction-recipe p,.interaction-note { font-size:12px; line-height:20px; color:#c1c8aa; }
.interaction-note { padding:10px 12px 12px; border-top:1px solid #475b33; }
.interaction-recipe[data-recipe=momentum] h3 { color:#b6d0da; }
.arena-status-row { flex-wrap:wrap; gap:3px 10px; }
#enemy-state { min-width:0; }
#enemy-state.corroded { color:#c0d99b; }
.arena-momentum-hud { margin-top:10px; padding-top:10px; border-top:1px solid #53664d; font-size:12px; line-height:20px; }
.momentum-label { display:flex; align-items:center; flex-wrap:wrap; gap:4px 7px; color:#c2d7dc; }
.momentum-label #movement-speed { margin-left:auto; color:#aabdc0; }
.momentum-track { position:relative; height:8px; background:#17241c; border:1px solid #647d80; margin:6px 0; }
.momentum-track>span { display:block; height:100%; background:#758f9e; }
.momentum-track.ready>span { background:#b1cad7; }
.momentum-track>i { position:absolute; left:35%; top:-2px; width:2px; height:10px; background:#d1d5af; }
.momentum-caption { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:3px 8px; color:#b4c2b1; }
.momentum-caption small { font-size:12px; line-height:20px; color:#9ea994; }
#momentum-state.ready { color:#d3e5e9; }
@media(max-width:900px) {
 .loadout-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .loadout-card,.loadout-card:nth-last-child(-n+2) { grid-column:auto; }
 .loadout-card:last-child { grid-column:1/-1; }
}
@media(max-width:480px) {
 .loadout-card .loadout-description { min-height:40px; }
 .loadout-card:last-child .loadout-description { min-height:0; }
 .momentum-label #movement-speed { margin-left:0; }
 .interaction-handbook summary { padding:9px; }
 .interaction-recipes { padding:10px; }
}
