/* Refined charcoal UI: smooth typography and restrained amber, never pixel UI. */
:root {
  --ink:oklch(.19 .007 250); --panel:oklch(.235 .008 250 / .97);
  --text:oklch(.94 .006 90); --muted:oklch(.73 .009 250);
  --accent:oklch(.79 .12 77); --rust:var(--accent);
  --paper:oklch(.265 .008 250); --paper-ink:var(--text);
  --line:oklch(.36 .009 250); --health:oklch(.57 .09 155);
  --ease:cubic-bezier(.22,1,.36,1);
  font-family:"Segoe UI Variable","Segoe UI",system-ui,sans-serif;
  font-weight:400; color-scheme:dark; -webkit-font-smoothing:antialiased;
}
button { -webkit-tap-highlight-color:transparent; font-family:inherit; font-weight:600; transition:background 160ms var(--ease),color 160ms var(--ease),transform 160ms var(--ease),border-color 160ms var(--ease); }
button:focus-visible { outline:3px solid var(--accent);outline-offset:3px; }
button:disabled { cursor:not-allowed; }
button:active:not(:disabled) { transform:translateY(1px); }
.hud-top { inset:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) auto max(14px,env(safe-area-inset-left));grid-template-columns:154px minmax(160px,370px) 116px;gap:14px;align-items:start;text-shadow:none; }
.phase-block { padding:10px 14px;background:var(--panel);border:0;border-radius:14px;box-shadow:0 4px 16px oklch(.15 .01 260 / .12); }
.phase-block span { font-size:10px;font-weight:600;letter-spacing:0;color:var(--muted); }
.phase-block strong { font-size:19px;letter-spacing:-.025em;line-height:1.35;font-weight:700; }
.objective { padding:11px 16px 12px;background:var(--panel);border:0;border-radius:14px;box-shadow:0 4px 16px oklch(.15 .01 260 / .12); }
.objective span { font-size:10px;font-weight:650;letter-spacing:0;color:var(--text); }
.objective-track { height:4px;border:0;border-radius:5px;margin-top:9px;background:oklch(.89 .009 260); }
.objective-track i { background:var(--accent);border-radius:5px; }
.status-block { gap:7px; }
.money { font-family:inherit;font-size:18px;font-weight:700;color:var(--text);background:var(--panel);padding:6px 12px;border:0;border-radius:20px;font-variant-numeric:tabular-nums; }
.health { display:block;line-height:0;width:108px;height:18px;border:0;border-radius:10px;background:oklch(.30 .008 250);text-align:right; }
.health i { border-radius:10px; }
.health::before { content:'+';position:absolute;left:7px;top:0;z-index:1;color:var(--text);font-weight:800;line-height:18px; }
.health b { display:block;font-family:inherit;font-size:11px;font-weight:700;line-height:18px;padding-right:7px;color:var(--text); }
#ammo { top:82px;right:16px;gap:8px;padding:8px 12px;background:var(--panel);border:0;border-radius:12px;text-shadow:none;font-family:inherit; }
#ammo b { font-size:26px;font-weight:750;line-height:1; }
#ammo span { font-size:11px;font-weight:500;color:var(--muted); }
#toast { top:25%;z-index:25;max-width:calc(100% - 32px);width:max-content;min-height:40px;display:flex;align-items:center;text-align:center;background:var(--paper);color:var(--text);border:0;border-radius:24px;box-shadow:0 8px 28px oklch(.15 .01 260 / .18);font-size:12px;font-weight:600;letter-spacing:0;padding:10px 18px; }
#hotbar { gap:5px;padding:6px;background:var(--panel);border:0;border-radius:19px;box-shadow:0 5px 20px oklch(.15 .01 260 / .2); }
#hotbar button { clip-path:none;border:1px solid transparent;border-radius:13px;width:70px;height:66px;background:oklch(.285 .008 250);padding:5px;color:var(--text); }
#hotbar button.selected { background:oklch(.30 .025 77);border-color:var(--accent);box-shadow:none;color:var(--accent); }
#hotbar button.selected small,#hotbar button.selected .slot-key { color:var(--accent); }
#hotbar button.unavailable { opacity:.65;border:1px dashed oklch(.39 .009 250);background:transparent; }
#hotbar small { bottom:5px;font-size:9px;letter-spacing:0;font-weight:600;white-space:nowrap;color:var(--muted); }
#hotbar b { font-family:inherit;font-weight:700;font-size:12px;top:5px;right:7px; }
.slot-key { font-family:inherit;font-size:10px;top:5px;left:7px;color:var(--muted); }
.icon { width:35px;height:23px;top:49%; }
.stick-ring { border:1px solid oklch(.98 .005 260 / .45);background:oklch(.97 .005 260 / .12);box-shadow:none; }
.stick-ring i { border:1px solid oklch(.98 .005 260 / .5);background:oklch(.98 .005 260 / .35);box-shadow:0 2px 8px oklch(.15 .01 260 / .08); }
#aim-hint { font-size:10px;font-weight:500;letter-spacing:0;color:oklch(.96 .005 260 / .8);max-width:150px;bottom:98px; }
#defense-picker { bottom:96px;border:0;border-radius:16px;padding:8px;background:var(--panel);box-shadow:0 5px 20px oklch(.15 .01 260 / .18); }
#defense-picker button { border:0;border-radius:10px;background:oklch(.285 .008 250);color:var(--text);font-size:12px;min-height:44px; }
#start-screen { padding:32px;overflow:auto;touch-action:pan-y;background:oklch(.19 .007 250 / .99);color:var(--text); }
.start-layout { width:min(1040px,100%);display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:64px;align-items:center; }
.start-copy { width:auto;min-width:0; }
.start-copy>span { display:inline-block;padding:7px 12px;background:transparent;color:var(--text);border-radius:20px;font-size:11px;font-weight:600;letter-spacing:0; }
.start-copy h1 { font-family:inherit;font-size:76px;font-weight:750;letter-spacing:-.065em;line-height:1.05;margin:20px 0; }
.start-copy p { max-width:38ch;font-size:20px;line-height:1.5;margin:0 0 28px;color:var(--muted); }
#start-button,#finish-shop,.detail-buy .buy { clip-path:none;border:0;border-radius:12px;background:var(--accent);color:var(--paper);box-shadow:none;font-size:13px;font-weight:650;letter-spacing:0;min-height:48px; }
#start-button { padding:15px 24px; }
.start-copy small { font-size:12px;line-height:1.6;margin-top:20px;color:var(--muted);max-width:48ch; }
.chapter-ticket { background:var(--paper);color:var(--text);padding:28px;border-radius:24px;box-shadow:0 12px 40px oklch(.2 .015 260 / .07);border:1px solid var(--line); }
.ticket-head { display:flex;flex-direction:column;gap:5px;padding-bottom:16px;border-bottom:1px solid var(--line); }
.ticket-head>span { font-size:10px;letter-spacing:.02em;color:var(--muted);font-weight:500; }
.ticket-head>b { font-family:inherit;font-weight:700;font-size:17px;letter-spacing:-.02em; }
.ticket-place { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:20px 0; }
.gas-brand { display:flex;flex-direction:column;align-items:flex-start;justify-content:center;background:none;color:var(--accent);border:0;outline:none;padding:0;font-weight:750;font-size:23px;letter-spacing:-.055em;line-height:1;white-space:nowrap; }
.gas-brand span { margin-top:5px;font-family:inherit;font-weight:600;font-size:10px;letter-spacing:0;color:var(--muted); }
.ticket-place>span { font-size:10px;line-height:1.6;font-weight:500;color:var(--muted); }
.chapter-route { list-style:none;margin:0;padding:0; }
.chapter-route li { display:flex;align-items:center;gap:14px;padding:13px 0;border:0; }
.chapter-route li>b { display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:50%;background:oklch(.285 .008 250);font-family:inherit;font-weight:600;font-size:11px;color:var(--muted); }
.chapter-route strong { display:block;font-size:15px;font-weight:650; }
.chapter-route li span { display:block;font-size:12px;margin-top:3px;color:var(--muted); }
.ticket-foot { display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:14px;border-top:1px solid var(--line);font-family:inherit;font-weight:600;font-size:10px;letter-spacing:0;color:var(--muted); }
.ticket-foot b { font-size:22px;line-height:1;color:var(--accent); }
#shop { padding:22px max(18px,calc((100vw - 1080px)/2)) 28px;background:var(--ink);color:var(--text); }
.shop-head { padding:0 0 18px;align-items:center;border-bottom:1px solid var(--line);margin-bottom:18px; }
.shop-identity { display:flex;align-items:center;gap:22px; }
.shop-head h1 { margin:3px 0 0;font-size:30px;letter-spacing:-.045em;font-weight:700; }
.shop-head span { font-size:10px;font-weight:500;letter-spacing:0; }
.shop-wallet { color:var(--muted);font-size:10px;font-weight:500;letter-spacing:0; }
.shop-wallet b { margin-top:3px;font-family:inherit;font-weight:700;font-size:28px;color:var(--text);letter-spacing:-.03em; }
.shop-wallet b span { font:inherit;color:inherit;letter-spacing:0; }
.shop-scene { min-width:0; }
.gas-room-wrap { border:0;border-radius:16px;box-shadow:none;background:oklch(.22 .012 260); }
.rack-tabs { position:static;width:auto;height:auto;display:flex;gap:4px;align-items:stretch;background:transparent;padding:4px;border-radius:12px;margin-bottom:12px; }
.rack-tab { flex:1;position:relative;height:auto;min-height:44px;padding:7px 4px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-family:inherit;font-weight:600;font-size:10px;letter-spacing:0;box-shadow:none; }
.rack-tab::after { display:none; }
.rack-tab.selected { background:var(--paper);color:var(--text);box-shadow:0 1px 4px oklch(.2 .01 260 / .08); }
.hook { height:44px; }
.hook b,.ware b { font-family:inherit;font-size:7px;font-weight:650;line-height:10px; }
.hook.selected,.ware.selected { outline:2px solid var(--accent);border-radius:6px;background:oklch(.61 .2 29 / .1); }
.shop-note { display:flex;align-items:center;gap:18px;margin:0;padding:16px 2px 18px;font-size:12px;font-weight:400;letter-spacing:0;line-height:1.5;color:var(--muted); }
.shop-note>b { flex:0 0 auto;font-size:12px;font-weight:650;letter-spacing:0;color:var(--text); }
.shop-note>b span { display:block;font-size:10px;letter-spacing:0;font-weight:400;color:var(--muted); }
.shop-detail { background:var(--paper);color:var(--text);border:1px solid var(--line);border-radius:18px;padding:22px;min-height:88px;box-shadow:0 6px 24px oklch(.2 .015 260 / .04);gap:16px 24px; }
.detail-hint { color:var(--muted);font-size:14px;line-height:1.6; }
.detail-copy small { color:var(--accent);font-size:11px;font-weight:600;letter-spacing:0; }
.detail-copy strong { font-size:26px;letter-spacing:-.045em;font-weight:700; }
.detail-copy p { color:var(--muted);font-size:13px;line-height:1.5; }
.weapon-stats { gap:6px;margin-top:14px; }
.weapon-stats i { background:transparent;border:0;border-radius:6px;padding:5px 8px;color:var(--muted);font-family:inherit;font-size:11px;font-weight:550; }
.weapon-stats i.penetration { color:var(--accent);border:0; }
.detail-buy { min-width:230px;gap:10px; }
.slot-pick { gap:6px; }
.slot-pick button { background:transparent;border:1px solid var(--line);color:var(--muted);font-size:10px;font-weight:600;min-height:44px;border-radius:9px; }
.slot-pick button.selected { background:oklch(.30 .025 77);color:var(--text);border-color:var(--line); }
.detail-buy .buy { min-height:48px;background:var(--accent);color:var(--paper);border:0;box-shadow:none;padding:12px 16px; }
.detail-buy .buy b { font-family:inherit;font-weight:700;font-size:15px; }
#upgrades { max-width:none;border:0;padding:26px 0 8px; }
#upgrades h2 { font-size:18px;font-weight:650;margin:0 0 12px;letter-spacing:-.025em; }
#upgrades p { color:var(--muted);font-size:12px; }
.upgrade-slots { margin-bottom:12px;gap:6px; }
.upgrade-slots button { background:var(--line);color:var(--muted);border:1px solid transparent;font-size:12px;font-weight:600;border-radius:10px; }
.upgrade-slots button.selected { background:var(--paper);color:var(--text);border-color:var(--line); }
.upgrade-list { gap:10px; }
.upgrade { flex-basis:250px;min-height:110px;padding:14px;border:1px solid var(--line);background:var(--paper);color:var(--text);grid-template-columns:48px 1fr;gap:6px 12px;border-radius:14px; }
.upgrade strong { font-size:13px;font-weight:650; }.upgrade small { color:var(--muted);font-size:11px;line-height:1.4; }.upgrade b { font-family:inherit;font-weight:650;font-size:12px;color:var(--accent); }
#finish-shop { float:none;display:block;margin:18px 0 0 auto;padding:13px 24px;text-align:left; }
#finish-shop span { margin-top:5px;font-size:10px;font-weight:500;letter-spacing:0;opacity:.9; }
#night-offer { max-width:none;margin:22px 0 0;background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:24px; }
#night-offer::before { content:'Turno nocturno · Pago extra';font-size:13px;letter-spacing:0;color:var(--accent);font-weight:650; }
#night-offer p { font-size:15px;line-height:1.6;color:var(--text); }
#night-offer button { font-size:12px;border:1px solid var(--line);border-radius:10px;min-height:48px;background:oklch(.285 .008 250);color:var(--text); }
#night-offer #accept-night { background:var(--accent);color:var(--paper);border-color:var(--accent); }
@media(hover:hover) {
  #hotbar button:hover:not(.selected),.rack-tab:hover:not(.selected) { background:oklch(.32 .008 250); }
  #start-button:hover,#finish-shop:hover,.detail-buy .buy:hover:not(:disabled) { background:oklch(.85 .105 77); }
  .upgrade:hover:not(:disabled) { border-color:var(--line);background:oklch(.29 .008 250); }
  .upgrade-slots button:hover:not(.selected) { background:oklch(.32 .008 250); }
}
@media(min-width:820px) {
  .shop-floor { display:grid;grid-template-columns:minmax(488px,1.7fr) minmax(260px,1fr);gap:22px;align-items:start; }
  .shop-detail { min-height:268px;align-items:stretch;flex-direction:column;gap:20px; }
  .detail-copy { flex:0 1 auto; }.detail-buy { min-width:0; }.detail-hint { margin:0;line-height:1.6; }
  .shop-note { padding-bottom:0; }.shop-head { margin-bottom:16px; }
}
@media(max-width:1000px) {
  .start-layout { gap:32px;grid-template-columns:minmax(0,1.4fr) minmax(250px,1fr); }
  .start-copy h1 { font-size:59px; }.start-copy p { font-size:17px; }.chapter-ticket { padding:22px; }
}
@media(max-width:760px) {
  .hud-top { grid-template-columns:112px minmax(0,1fr) 96px;gap:7px; }
  .phase-block { padding:8px 10px;border-radius:11px; }.phase-block span { font-size:8px; }.phase-block strong { font-size:16px; }
  .objective { padding:9px 10px;border-radius:11px; }.objective span { font-size:9px;letter-spacing:0; }.money { font-size:15px;padding:5px 9px; }.health { width:96px;height:17px; }.health b,.health::before { line-height:17px; }
  #ammo { top:73px;padding:7px 10px; }#ammo b { font-size:22px; }#ammo span { font-size:10px; }
  #hotbar { width:auto;gap:4px;padding:5px;bottom:max(8px,env(safe-area-inset-bottom));border-radius:16px; }
  #hotbar button { width:49px;min-width:44px;height:58px;flex:none;border-radius:11px; }#hotbar small { font-size:8px; }.icon { scale:.84; }
  #shop { padding:16px 12px 24px; }.shop-head { padding-bottom:14px;margin-bottom:14px; }.shop-identity { gap:16px; }.shop-head h1 { font-size:24px; }.shop-head span { font-size:9px; }.gas-brand { font-size:21px; }.shop-wallet b { font-size:24px; }
  .shop-note { font-size:12px;gap:12px;padding:14px 2px; }.shop-detail { padding:18px; }.detail-copy strong { font-size:24px; }.detail-buy { min-width:100%; }
  #start-screen { padding:26px 20px; }.start-layout { grid-template-columns:1fr;gap:28px;max-width:460px; }.start-copy h1 { font-size:58px; }.start-copy p { font-size:18px;margin-bottom:22px; }.chapter-ticket { padding:22px; }.start-copy small { margin-top:16px; }
}
@media(max-height:520px) and (min-width:650px) {
  #start-screen { padding:16px 32px; }.start-layout { grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr);gap:36px; }
  .start-copy h1 { font-size:56px;margin:16px 0; }.start-copy>span { font-size:10px; }.start-copy p { font-size:16px;margin-bottom:18px; }.start-copy small { font-size:11px;margin-top:14px; }
  .chapter-ticket { padding:16px 20px; }.ticket-head { padding-bottom:10px; }.ticket-head>b { font-size:15px; }.ticket-place { padding:13px 0; }.chapter-route li { padding:8px 0; }.chapter-route strong { font-size:14px; }.chapter-route li span { font-size:11px; }.ticket-foot { margin-top:8px;padding-top:10px; }
  .hud-top { grid-template-columns:135px minmax(160px,320px) 108px;gap:12px; }.phase-block { padding:7px 11px;border-radius:12px; }.phase-block strong { font-size:17px; }.objective { padding:9px 12px;border-radius:12px; }.money { font-size:16px; }.health { width:102px;height:17px; }.health b,.health::before { line-height:17px; }
  #ammo { top:77px;padding:7px 10px; }#ammo b { font-size:23px; }#ammo span { font-size:10px; }
  #hotbar button { width:56px;height:55px; }#hotbar small { font-size:8px; }.icon { scale:.8; }
  #aim-hint { bottom:86px; }.stick-zone { bottom:68px; }
  #shop { padding-top:14px; }.shop-head { padding-bottom:14px;margin-bottom:14px; }.shop-head h1 { font-size:25px; }
  .shop-detail { padding:16px;gap:14px;min-height:260px; }.detail-copy strong { font-size:24px; }.detail-copy p { font-size:12px;line-height:1.4; }.weapon-stats { margin-top:10px;gap:5px; }.weapon-stats i { padding:4px 7px;font-size:10px; }
}
@media(max-width:649px) { .start-copy h1 { font-size:46px; }.start-copy p { font-size:17px; } }
@media(max-width:380px) { #hotbar button { width:44px; }.hud-top { grid-template-columns:98px minmax(0,1fr) 80px;gap:5px; }.health { width:80px; }.start-copy h1 { font-size:42px; }.objective span { font-size:8px; }.shop-identity .gas-brand { font-size:18px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important;scroll-behavior:auto!important; } }
/* Fewer containers: one quiet HUD strip and one continuous equipment rail. */
.hud-top { background:var(--panel);border-radius:8px;padding:10px 14px;align-items:center; }
.phase-block,.objective { background:none;border:0;border-radius:0;padding:0;box-shadow:none; }
.money { background:none;border:0;border-radius:0;padding:0;font-weight:650; }
.objective-track { background:oklch(.37 .009 250);height:3px; }
.objective-track i { background:oklch(.74 .008 90); }
.status-block { gap:5px; }
.health { height:15px;border-radius:4px; }
.health i { border-radius:4px; }
.health b,.health::before { line-height:15px;font-size:10px; }
#ammo { border-radius:8px;box-shadow:none; }
#hotbar { border-radius:10px;box-shadow:0 4px 14px oklch(.12 .007 250 / .16);gap:2px;padding:5px; }
#hotbar button { background:transparent;border:0;border-radius:6px; }
#hotbar button.selected { background:oklch(.30 .009 250);border:0;color:var(--text);box-shadow:inset 0 -2px 0 var(--accent); }
#hotbar button.selected small { color:var(--text); }
#hotbar button.selected .slot-key { color:var(--muted); }
#hotbar button.unavailable { border:0;opacity:.5; }
#hotbar b { font-weight:600; }
#toast,#defense-picker { border-radius:8px;box-shadow:none; }
#defense-picker button { border-radius:6px; }
#start-screen { background:oklch(.19 .007 250 / .99); }
.start-copy>span { padding:0;background:none;color:var(--muted);border-radius:0;font-size:11px;letter-spacing:.06em;font-weight:500; }
.start-copy h1 { font-weight:650;letter-spacing:-.065em; }
#start-button,#finish-shop,.detail-buy .buy,#night-offer #accept-night { background:var(--accent);color:var(--ink);border-radius:7px;box-shadow:none; }
.chapter-ticket { background:none;border:0;border-left:1px solid var(--line);border-radius:0;box-shadow:none;padding:0 0 0 28px; }
.ticket-head { border-bottom:0; }
.ticket-head>b { font-weight:600; }
.gas-brand { color:var(--text);font-weight:650; }
.chapter-route li>b { background:none;border-radius:0;color:var(--muted);flex-basis:24px; }
.chapter-route strong { font-weight:550; }
.ticket-foot b { color:var(--muted); }
.shop-head { border-color:var(--line); }
.shop-wallet b { font-weight:600; }
.gas-room-wrap { border-radius:8px; }
.rack-tabs { padding:0;gap:8px;border-radius:0;border-bottom:1px solid var(--line); }
.rack-tab { border-radius:0;font-weight:500;font-size:11px; }
.rack-tab.selected { background:none;color:var(--text);box-shadow:inset 0 -2px 0 var(--accent); }
.rack-tab:hover:not(.selected) { background:none;color:var(--text); }
.hook.selected,.ware.selected { outline:1px solid var(--accent);border-radius:3px;background:oklch(.79 .12 77 / .08); }
.shop-detail { background:none;border:0;border-radius:0;box-shadow:none; }
.detail-copy small { color:var(--muted);font-weight:500; }
.detail-copy strong { font-weight:600; }
.weapon-stats { gap:0; }
.weapon-stats i { background:none;border-radius:0;padding:2px 10px;border-right:1px solid var(--line); }
.weapon-stats i:first-child { padding-left:0; }
.weapon-stats i:last-child { border:0; }
.slot-pick button { border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;font-weight:500; }
.slot-pick button.selected { background:none;border-bottom-color:var(--accent);color:var(--text); }
.upgrade-slots button { border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;font-weight:500; }
.upgrade-slots button.selected { background:none;border-bottom-color:var(--accent);color:var(--text); }
.upgrade { background:oklch(.245 .008 250);border:0;border-radius:8px; }
.upgrade strong { font-weight:550; }
.upgrade b { color:var(--text); }
#night-offer { background:oklch(.245 .008 250);border:0;border-radius:8px; }
#night-offer::before { color:var(--text);font-weight:600; }
#night-offer button { border-radius:6px; }
@media(max-width:760px) { .hud-top { padding:9px 10px; }.phase-block,.objective { padding:0; }.chapter-ticket { border-left:0;border-top:1px solid var(--line);padding:24px 0 0; } }
@media(max-height:520px) and (min-width:650px) { .hud-top { padding:8px 12px; }.phase-block,.objective { padding:0; }.chapter-ticket { border-top:0;border-left:1px solid var(--line);padding:0 0 0 24px; } }
#game-shell:has(#start-screen:not([hidden])) :is(.hud-top,#hotbar,#ammo,#controls,#toast) { visibility:hidden; }
@media(hover:hover) { #start-button:hover:not(:disabled),#finish-shop:hover:not(:disabled),.detail-buy .buy:hover:not(:disabled),#night-offer #accept-night:hover { background:oklch(.85 .105 77); } }

/* The counter is the whole scene, not a thumbnail inside a shopping page. */
.home-window,.home-bookcase { display:none; }
.icon.barrier { background:url('assets/environment/defenses/wood-barricade-v1.png') center/contain no-repeat;image-rendering:pixelated; }
.icon.barrier::before,.icon.barrier::after { display:none; }
#shop[data-location="neighborhood"] .room-wall { background-image:repeating-linear-gradient(90deg,transparent 0 23px,#b8b4a233 23px 24px);background-color:#cbc6b1;box-shadow:inset 0 -34px #7b7c6b,inset 0 -38px #4d554c; }
#shop[data-location="neighborhood"] .room-counter { background:repeating-linear-gradient(0deg,#685746 0 18px,#554738 18px 20px);border-top:10px solid #a18c69;box-shadow:0 -3px #292f2c,inset 0 3px #c1ad87,inset 0 7px #453e33; }
#shop[data-location="neighborhood"] .home-window { display:block;position:absolute;right:22px;top:34px;width:86px;height:57px;background:linear-gradient(90deg,transparent 47%,#394443 47% 53%,transparent 53%),linear-gradient(0deg,#445a58 0 47%,#394443 47% 53%,#63726b 53%);border:4px solid #555c50;box-shadow:0 2px #ddd6ba,0 4px #7b7d69,inset 0 0 0 2px #292f2d; }
#shop[data-location="neighborhood"] .home-bookcase { display:block;position:absolute;left:71%;top:32px;width:47px;height:80px;object-fit:contain; }
#shop[data-location="neighborhood"] .rack { background:repeating-linear-gradient(0deg,transparent 0 37px,#5a4b3b 37px 40px,#ab9370 40px 42px);height:92px; }
#shop[data-location="neighborhood"] .hook::before { display:none; }
#shop[data-location="neighborhood"] .keeper { filter:drop-shadow(2px 3px 0 #10141455) saturate(.85); }
#shop { padding:0;overflow:hidden;isolation:isolate; }
.shop-floor,.shop-scene,.gas-room-wrap { position:absolute;inset:0;display:block;width:100%;height:100%;border:0;border-radius:0; }
.gas-room { transform-origin:top left; }
.room-wall { height:64%;background-size:480px 100%; }
.room-counter { top:64%;bottom:0;height:auto;background-size:480px 100%; }
.keeper { left:51%;top:calc(64% - 75px); }
.rack { top:30px;width:204px;z-index:2; }
.hook { width:64px;height:42px; }.hook img { max-width:60px;max-height:30px; }
.counter-items { top:calc(64% - 28px); }
.shop-head { position:absolute;inset:max(12px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) auto max(18px,env(safe-area-inset-left));z-index:5;padding:0;margin:0;border:0;align-items:start;pointer-events:none; }
.shop-identity { gap:16px; }.shop-identity>div:last-child { display:none; }
.shop-head .gas-brand,.shop-wallet { padding:8px 12px;background:var(--panel);border-radius:7px; }
.shop-head .gas-brand { font-size:20px; }.shop-wallet b { font-size:23px; }
.rack-tabs { position:absolute;left:18px;top:12px;right:160px;z-index:6;width:auto;max-width:510px;margin:0 0 0 130px;background:var(--panel);border:0;border-radius:7px;gap:0;padding:0 6px; }
.rack-tab { min-height:44px;font-size:11px;padding:6px; }
.shop-note { position:absolute;left:max(18px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));z-index:4;width:min(52%,600px);padding:10px 14px;margin:0;background:var(--panel);border-radius:7px;gap:14px;font-size:12px; }
.shop-note>b { font-size:12px; }.shop-note>b span { font-size:9px; }
.shop-detail { position:absolute;right:max(18px,env(safe-area-inset-right));top:86px;z-index:7;width:280px;max-height:calc(100% - 176px);min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:14px;padding:18px;background:var(--panel);border:0;border-radius:8px;box-shadow:none; }
.detail-copy { flex:0 0 auto; }.detail-copy small { padding-right:24px;font-size:10px; }.detail-copy strong { font-size:24px; }.detail-copy p { font-size:12px;line-height:1.45; }
.detail-buy { min-width:0; }.detail-buy .buy { min-height:44px;padding:10px 12px; }
.weapon-stats { margin-top:10px;row-gap:5px; }.weapon-stats i { font-size:10px;padding:2px 7px; }
.close-detail { position:absolute;right:4px;top:0;width:44px;height:44px;background:none;border:0;color:var(--muted);font-size:24px; }
#finish-shop { position:absolute;right:max(18px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:6;margin:0;padding:12px 18px;min-height:48px; }
#toggle-upgrades { position:absolute;left:max(18px,env(safe-area-inset-left));bottom:88px;z-index:9;min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--text);font-size:12px; }
#toggle-upgrades[aria-expanded="true"] { color:var(--accent); }
#upgrades { position:absolute;left:18px;right:18px;bottom:140px;z-index:8;margin:0;max-height:calc(100% - 210px);overflow:auto;padding:18px;background:var(--panel);border-radius:8px; }
#upgrades h2 { font-size:17px; }.upgrade { min-height:100px;flex-basis:250px; }
#night-offer { position:absolute;z-index:10;right:18px;bottom:80px;width:min(460px,calc(100% - 36px));max-height:calc(100% - 100px);overflow:auto;margin:0;padding:20px;background:var(--panel); }
#game-shell:has(#shop:not([hidden])) :is(.hud-top,#hotbar,#ammo,#controls,#defense-picker) { visibility:hidden; }
@media(max-height:520px) and (min-width:650px) {
  .shop-detail { top:70px;width:258px;max-height:calc(100% - 145px);padding:14px;gap:10px; }
  .shop-note { font-size:11px;max-width:53%;padding:8px 12px; }
  .shop-note>b span { display:none; }.detail-copy strong { font-size:22px; }
  .rack-tabs { right:130px;margin-left:150px; }.rack-tab { font-size:10px;padding:6px 4px; }
  #toggle-upgrades { bottom:76px; }#upgrades { bottom:126px;max-height:calc(100% - 190px);padding:14px; }
}
@media(max-width:649px) {
  .shop-head { left:12px;right:12px; }.shop-head .gas-brand { font-size:17px; }.shop-wallet b { font-size:21px; }
  .rack-tabs { left:12px;right:12px;top:78px;margin:0;max-width:none; }.rack-tab { font-size:10px;padding:6px 2px; }
  .room-wall { background-size:480px 180px;background-position:left bottom;background-color:#c6c0a7; }
  .room-counter { background-size:480px 150px;background-color:#682c30; }
  .rack { top:calc(64% - 156px);--rack-row:56px; }.hook { height:56px; }.keeper { left:78%;top:calc(64% - 95px);width:96px;height:129px; }
  .counter-items { top:calc(64% - 12px);--supply-spread:10px; }.ware { width:54px;height:54px; }
  .shop-detail { top:auto;bottom:146px;right:12px;width:calc(100% - 24px);max-height:42%;padding:16px; }
  .shop-note { left:12px;bottom:12px;width:calc(100% - 24px);max-width:none;font-size:11px;min-height:52px; }
  #finish-shop { bottom:78px;right:12px;font-size:11px;padding:10px 12px; }#finish-shop span { font-size:9px; }
  #toggle-upgrades { bottom:78px;left:12px;font-size:11px;padding:10px;max-width:40%; }
  #upgrades { left:12px;right:12px;bottom:144px;max-height:55%;padding:16px; }
  #night-offer { bottom:144px;right:12px;width:calc(100% - 24px); }
}

