:root {
  --bg: #071329; --surface: #0e1d38; --raised: #172947; --ink: #f6f7fc; --muted: #a7b6cf;
  --line: #2b4161; --amber: #ffd36a; --gold: #c99a48; --red: #ff8484; --green: #9ddbc5;
  --font: 'Avenir Next', 'Nunito Sans', 'Helvetica Neue', sans-serif;
  --col: 540px; --side: 400px; --ease: cubic-bezier(.23, 1, .32, 1);
}
[data-world="bunker"] { --bg: #0b192d; --surface: #15263e; --raised: #243b56; --gold: #8fb4d8; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 400 15px/1.5 var(--font); background: var(--bg); }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
button { transition: background 140ms ease, border-color 140ms ease, transform 140ms var(--ease); }
button:active, a.btn:active { transform: scale(.98); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
button:disabled { opacity: .4; cursor: default; }
#defs { position: absolute; }
#stage { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: min(100vw, var(--col)); height: 100svh; overflow: hidden; background: #08142e; }
#scene { position: absolute; inset: 0; }
#scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#06102a77, transparent 35%, #06102a44); }
#hero-art, #rain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#rain { pointer-events: none; opacity: .65; }
#app { position: relative; max-width: var(--col); margin: 0 auto; }
#hero { min-height: 100svh; display: flex; flex-direction: column; align-items: stretch; padding: max(22px, env(safe-area-inset-top)) 22px 22px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wordmark { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ffe3a0; }
.follow-chip { font-size: 12px; font-weight: 600; text-decoration: none; padding: 8px 11px; border: 1px solid #7e91af66; border-radius: 6px; background: #08142e88; }
h1 { margin-top: 36px; font-size: clamp(36px, 10.7vw, 54px); font-weight: 900; line-height: 1.02; letter-spacing: -.035em; text-shadow: 0 2px 0 #000, 2px 0 #000, -2px 0 #000, 0 0 20px #0005; }
h1 em { color: var(--amber); font-style: normal; }
.hero-story { margin-top: 14px; max-width: 280px; font-size: 14px; font-weight: 600; color: #e2e8f5; text-shadow: 0 2px 8px #000; }
.pill { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 11px; color: #e2e8f5; font-variant-numeric: tabular-nums; }
.pill::before { content: ''; width: 6px; height: 6px; margin-right: 2px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 10px #ffd36a88; }
.pill-label { order: 2; }
.pill-value { font-weight: 800; }
.spacer { flex: 1; min-height: 100px; }
.card { background: #09162bef; padding: 22px; border: 1px solid #b18c4a; border-radius: 10px; box-shadow: inset 0 2px #ffe3a022, 0 14px 40px #0005; }
.card h2 { font-size: 24px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.card .sub { margin-top: 8px; font-size: 13px; color: #b7c3d9; }
.invite-note { font-size: 13px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--amber); }
form { margin: 0; }
.field { position: relative; margin-top: 18px; }
.field-label { display: block; margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--ink); }
.field-label + .field { margin-top: 8px; }
.field input, .field textarea { width: 100%; height: 48px; padding: 12px; color: var(--ink); border: 1px solid #415573; border-radius: 6px; background: #061025; font-size: 16px; appearance: none; }
.field textarea { height: 100px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #99abc7; }
.field.at input { padding-left: 32px; }
.field.at::before { content: '@'; position: absolute; top: 12px; left: 12px; color: var(--muted); }
.hint { min-height: 19px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.hint button, .link { border: 0; background: none; padding: 0; color: var(--amber); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.hint.ok { color: var(--green); }
.hint.bad, .error { color: var(--red); }
.btn { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 46px; padding: 12px 16px; border-radius: 6px; border: 1px solid transparent; font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.3; }
.btn.primary { margin-top: 16px; background: linear-gradient(#ffdf87, #f2c35b); border-color: #f3cc77; color: #32220c; box-shadow: inset 0 1px #fff4ca88, 0 2px 0 #93651f; }
.btn.ghost { background: #162743; color: var(--ink); border-color: #364c6d; }
.btn.small { min-height: 44px; font-size: 12px; padding: 10px; }
.fine { margin-top: 14px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.fine .link { font-size: 11px; }
.row { display: flex; gap: 10px; margin-top: 10px; }
.row > * { flex: 1; min-width: 0; }
.below { padding: 32px 22px 44px; background: var(--bg); }
.eyebrow { color: var(--amber); font-size: 10px; font-weight: 800; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; }
.below h2, #desk h2 { margin-top: 6px; font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.025em; }
.lede { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.goalbar { height: 6px; margin-top: 18px; background: #243652; border-radius: 4px; overflow: hidden; }
.goalbar i { display: block; height: 100%; background: var(--amber); border-radius: 4px; }
.quick-links { display: grid; gap: 10px; margin-top: 28px; }
.quick-links button { text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 15px 16px; background: var(--surface); }
.quick-links span { display: block; font-size: 12px; color: var(--muted); }
.quick-links b { display: block; margin-top: 4px; font-size: 14px; }
.products { margin-top: 22px; }
.product { position: relative; padding: 22px 0; border-top: 1px solid var(--line); }
.product .head { display: flex; gap: 20px; justify-content: space-between; align-items: baseline; }
.product h3 { font-size: 16px; font-weight: 600; }
.price { flex-shrink: 0; font-size: 16px; font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }
.price small { font-size: 11px; font-weight: 400; }
.product p { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.6; }
.upgrade-preview { display: flex; justify-content: center; align-items: center; gap: 30px; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #0a162d; }
.upgrade-preview > div { text-align: center; }
.upgrade-preview svg { display: block; width: 70px; height: 165px; margin: 0 auto; }
.upgrade-preview span { display: block; margin-top: 10px; color: #d2dced; font-size: 11px; }
.upgrade-preview i { font-style: normal; color: #c99a48; font-size: 22px; }
.product .stock { margin-top: 8px; color: #d4bd89; font-size: 12px; }
.product .btn { margin-top: 14px; }
.badge { display: inline-block; margin-bottom: 8px; color: var(--amber); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.shop-notice { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #152744; color: #e4ebfa; font-size: 12px; font-weight: 800; }
.shop-notice span { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; }
.top-card { margin-top: 10px; padding: 0 18px 20px; border: 1px solid #c99a4877; border-radius: 8px; background: #0a142c; overflow: hidden; }
.top-illustration { height: 184px; margin: 0 -18px 20px; display: flex; align-items: center; background: #2c2a3e; border-bottom: 1px solid #c99a4855; overflow: hidden; }
.top-illustration svg { height: 220px; width: 145px; flex-shrink: 0; margin-top: 30px; }
.top-illustration > span { padding-right: 20px; color: #ffe3a0; font-weight: 900; font-size: 22px; line-height: 1.06; letter-spacing: -.02em; text-shadow: 0 2px #0a1023; }
.top-illustration small { display: block; margin-top: 10px; color: #c2bbba; font-weight: 600; font-size: 10px; line-height: 1.5; letter-spacing: .04em; }
.top-card h2 { color: #ffe3a0; }
.top-card .stock { margin-top: 16px; color: #e0be78; font-size: 12px; line-height: 1.7; }
.toplist { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.toplist span { font-size: 11px; color: #c4cde0; }
.top-card .row { margin-top: 16px; }
footer { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
footer p { margin-top: 16px; }
footer .btn.primary { margin-top: 0; background: transparent; border-color: var(--line); color: var(--ink); box-shadow: none; }
#sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: #020713b8; animation: fade 160ms ease; }
.sheet-panel { position: relative; width: min(100vw, var(--col)); max-height: 90svh; overflow-y: auto; overscroll-behavior: contain; padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; border: 1px solid #41516b; border-bottom: 0; background: var(--surface); box-shadow: 0 -12px 50px #0005; animation: rise 200ms var(--ease); }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 6px; background: transparent; border: 0; font-size: 27px; color: var(--muted); }
.sheet-panel h2 { font-size: 28px; font-weight: 800; line-height: 1.1; padding-right: 30px; margin-top: 8px; letter-spacing: -.025em; }
.sheet-panel .sub { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 12px; }
.sheet-price { margin-top: 14px; color: var(--amber); font-size: 26px; font-weight: 800; }
.sheet-price small { font-size: 13px; font-weight: 400; }
.check { display: flex; gap: 10px; margin-top: 20px; font-size: 12px; }
.check input { accent-color: var(--amber); }
.error:not(:empty) { margin-top: 12px; font-size: 12px; }
.picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 20px; max-height: 210px; overflow-y: auto; }
.picker button { min-height: 44px; border: 1px solid var(--line); background: #09172e; border-radius: 6px; font-size: 13px; font-weight: 800; }
.picker button.on { border-color: var(--amber); color: var(--amber); background: #ffd36a16; }
.picker button.near { border-color: #ff848455; }
.inline-form { display: flex; gap: 8px; margin-top: 20px; }
.inline-form input { flex: 1; min-width: 0; height: 48px; padding: 12px; background: #071329; border: 1px solid #415573; border-radius: 6px; font-size: 16px; color: var(--ink); }
.inline-form button { width: 48px; border: 1px solid #586684; border-radius: 6px; background: #1a2d4a; color: var(--amber); font-size: 13px; font-weight: 800; }
.lift { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.lift-btn { padding: 14px; min-height: 76px; border: 1px solid #3b506d; border-radius: 7px; background: linear-gradient(#1a2c48, #12213b); text-align: left; box-shadow: inset 0 1px #ffffff0a; }
.lift-btn b { font-size: 15px; font-weight: 600; display: block; }
.lift-btn span { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.lift-btn.luxe { grid-column: 1 / -1; padding: 18px; border-color: #c99a48; background: linear-gradient(120deg, #332b2b, #1c2138); }
.lift-btn.luxe b { font-size: 22px; color: #ffe3a0; }
.lift-btn.luxe::after { content: '↑'; float: right; margin-top: -46px; font-size: 30px; color: var(--amber); }
.lift-btn.mine b { color: var(--amber); }
.lift-btn.red b { color: var(--red); }
.share-preview { display: block; max-width: 230px; width: 65%; margin: 20px auto; -webkit-touch-callout: default; user-select: auto; }
#toast { position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 10px); z-index: 30; width: max-content; max-width: 90vw; padding: 12px 18px; color: #f5f7ff; background: #203455; border: 1px solid #526788; border-radius: 8px; box-shadow: 0 8px 30px #0004; font-size: 12px; text-align: center; pointer-events: none; opacity: 0; transition: opacity 180ms ease, transform 180ms var(--ease); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
.cloud-a, .cloud-b { animation: drift 90s linear infinite; }
.cloud-b { animation-duration: 130s; }
@keyframes drift { from { transform: translateX(-520px); } to { transform: translateX(1200px); } }
.pulse-red { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.door-spin { animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { opacity: 0.85; } 12% { opacity: 0.1; } 20% { opacity: 0.7; } 100% { opacity: 0; } }
.strike { animation: strike 0.5s steps(1); }
@keyframes strike { 0% { opacity: 1; } 22% { opacity: 0.2; } 34% { opacity: 1; } 60%, 100% { opacity: 0; } }

#hall { position: absolute; inset: 0; overflow: hidden; background: #050a16; touch-action: none; user-select: none; -webkit-user-select: none; }
#hall-stage { position: absolute; inset: 0; cursor: grab; }
#hall-stage:active { cursor: grabbing; }
.hall-view { position: absolute; inset: 0; perspective-origin: 50% 46%; overflow: hidden; }
.hall-world { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.bay { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.bay > div, .hall-end { position: absolute; left: 0; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.wall { width: 300px; height: 450px; margin: -225px 0 0 -150px; background:
  linear-gradient(180deg, transparent 0 68.4%, var(--trim) 68.4% 69.2%, rgba(0, 0, 0, 0.22) 69.2% 100%),
  linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1.2%, transparent 1.2% 98.8%, rgba(0, 0, 0, 0.25) 98.8%),
  var(--wall); }
.bay.lit .wall { background:
  radial-gradient(90% 55% at 50% 0%, rgba(216, 244, 255, 0.22), transparent 70%),
  linear-gradient(180deg, transparent 0 68.4%, var(--trim) 68.4% 69.2%, rgba(0, 0, 0, 0.22) 69.2% 100%),
  linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1.2%, transparent 1.2% 98.8%, rgba(0, 0, 0, 0.25) 98.8%),
  var(--wall); }
.bay.dark .wall { background:
  linear-gradient(180deg, transparent 0 68.4%, rgba(201, 154, 72, 0.25) 68.4% 69.2%, rgba(0, 0, 0, 0.3) 69.2% 100%),
  var(--wall-dark); }
.bay.red .wall { background:
  radial-gradient(90% 60% at 50% 0%, rgba(255, 60, 60, 0.3), transparent 70%),
  linear-gradient(180deg, transparent 0 68.4%, var(--trim) 68.4% 69.2%, rgba(0, 0, 0, 0.22) 69.2% 100%),
  var(--wall); }
.wall .door { position: absolute; left: calc((300px - var(--door-w)) / 2); top: var(--door-top); width: var(--door-w); height: var(--door-h); cursor: pointer; }
.wall .door svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wall .door.mine::after { content: ""; position: absolute; inset: -10px; border-radius: 10px; border: 3px solid var(--amber); box-shadow: 0 0 26px 6px rgba(255, 190, 60, 0.6); animation: pulse 2.2s ease-in-out infinite; }
.floor, .ceil { width: 400px; height: 300px; margin: -150px 0 0 -200px; }
.floor { background:
  linear-gradient(180deg, transparent 0 14%, var(--trim) 14% 36%, transparent 36% 64%, var(--trim) 64% 86%, transparent 86%) 50% 0 / 14px 100% no-repeat,
  linear-gradient(90deg, var(--floor) 0 22.5%, var(--trim) 22.5% 23.4%, var(--carpet) 23.4% 76.6%, var(--trim) 76.6% 77.5%, var(--floor) 77.5%); }
.bay.dark .floor { filter: brightness(0.55); }
.ceil { background: var(--ceil); }
.lamp { position: absolute; left: 50%; top: 50%; width: 128px; height: 70px; margin: -35px 0 0 -64px; border-radius: 8px; background: var(--lamp); box-shadow: 0 0 46px 16px var(--lamp-glow); }
.bay.dark .lamp { background: #2a3550; box-shadow: none; }
.bay.red .lamp { background: #ff4a4a; box-shadow: 0 0 50px 18px #ff2020; animation: flicker 3.1s steps(1) infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 41% { opacity: 1; } 42% { opacity: 0.25; } 44% { opacity: 1; } 77% { opacity: 0.4; } 78% { opacity: 1; } }
.hall-end { width: 400px; height: 450px; margin: -225px 0 0 -200px; background: var(--end); display: grid; place-items: center; }
.hall-window { width: 150px; height: 250px; border-radius: 75px 75px 6px 6px; border: 8px solid var(--trim); background: linear-gradient(180deg, #0d2150, #132c63); box-shadow: inset 0 0 60px rgba(159, 199, 255, 0.25); animation: storm 7s steps(1) infinite; }
@keyframes storm { 0%, 100% { filter: none; } 61% { filter: brightness(3.2); } 62% { filter: none; } 63.5% { filter: brightness(2.2); } 65% { filter: none; } }
.hall-fog { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(circle at 50% 46%, rgba(4, 8, 18, 1) 0, rgba(4, 8, 18, 0.9) 3.5%, rgba(4, 8, 18, 0) 26%),
  radial-gradient(120% 90% at 50% 46%, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }
#hall.red .hall-fog { background:
  radial-gradient(circle at 50% 46%, rgba(20, 2, 4, 1) 0, rgba(40, 4, 8, 0.85) 4%, rgba(60, 6, 10, 0) 30%),
  radial-gradient(120% 90% at 50% 46%, transparent 50%, rgba(0, 0, 0, 0.6) 100%); }

#door-close { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.16s ease; }
#door-close.on { opacity: 1; }
#door-close svg { display: block; width: 100%; height: 100%; }

/* The controls use the same blue panels and brass plates as the reel. */
.hud { position: absolute; left: 0; right: 0; display: flex; z-index: 3; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { top: 0; align-items: center; justify-content: space-between; gap: 16px; padding: max(22px, env(safe-area-inset-top)) 20px 30px; background: linear-gradient(#060f24ee, transparent); }
.hud-brand { display: block; font-size: 10px; font-weight: 800; color: #e5c581; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.hud-floor b { display: block; color: #fff; font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; text-shadow: 0 2px 10px #000; }
.hud-floor #hud-range { display: block; font-size: 11px; color: #b7c6de; margin-top: 6px; }
.hud-btn { border: 1px solid #c99a48; background: #0a1834e8; padding: 12px 14px; border-radius: 6px; color: #ffe3a0; font-size: 13px; font-weight: 600; min-height: 46px; box-shadow: inset 0 1px #ffe3a018, 0 2px 12px #0003; }
.hud-btn::after { content: ' ↕'; padding-left: 6px; }
.hud-bottom { bottom: 0; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); justify-content: center; background: linear-gradient(transparent, #040b1bc9); }
.tabs { width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px; gap: 3px; border: 1px solid #465b7a; border-radius: 10px; background: #0b1933; box-shadow: inset 0 1px #ffffff0a, 0 8px 30px #0005; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 54px; padding: 6px 1px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #c5d2e7; font-size: 11px; font-weight: 600; }
.tab svg { width: 21px; height: 21px; }
.tab.on { background: #ffd36a18; color: var(--amber); border-color: #ffd36a55; }
.tab:focus-visible { outline-offset: -2px; }
.hud-chips { bottom: calc(94px + env(safe-area-inset-bottom)); padding: 0 20px; gap: 20px; justify-content: space-between; }
.door-chip { padding: 10px 12px; background: #0a1733dd; border: 1px solid #475673; border-radius: 6px; max-width: 44%; min-width: 106px; min-height: 56px; text-align: left; box-shadow: 0 4px 20px #0003; }
.door-chip:last-child { text-align: right; }
.door-chip b { display: block; font-size: 14px; font-weight: 800; color: #ffe3a0; line-height: 1.15; }
.door-chip span { display: block; max-width: 100%; margin-top: 4px; font-size: 11px; color: #b7c6de; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.door-chip.mine { border-color: var(--amber); }
.door-chip.red { border-color: #ad4a51; }
.door-chip.red b { color: #ff8484; }
.hud-walk { left: auto; right: 20px; top: 47%; flex-direction: column; border: 1px solid #566b8a; border-radius: 8px; background: #0b1a36ed; box-shadow: 0 6px 20px #0004; overflow: hidden; }
.walk { width: 56px; min-height: 60px; padding: 8px 2px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 0; background: transparent; }
.walk + .walk { border-top: 1px solid #354b6d; }
.walk svg { width: 22px; height: 22px; }
.walk span { font-size: 10px; font-weight: 600; color: #c8d6eb; }
.coach { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(174px + env(safe-area-inset-bottom)); text-align: center; pointer-events: none; text-shadow: 0 2px 8px #000; }
.coach b { display: block; color: #fff; font-size: 15px; font-weight: 800; }
.coach span { display: block; margin-top: 4px; font-size: 11px; color: #c8d6eb; }
#hall.facing .hud-chips, #hall.facing .hud-walk, #hall.facing .coach, #hall.menu-open .hud-chips, #hall.menu-open .hud-walk, #hall.menu-open .coach, #hall.menu-open #door-panel { display: none; }
#door-panel { position: absolute; left: 12px; right: 12px; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 4; max-height: 45%; overflow-y: auto; padding: 14px 18px 20px; border: 1px solid #61708a; border-top-color: #c99a48; border-radius: 9px; background: #0c1a34f5; box-shadow: 0 6px 30px #0005; animation: rise 180ms var(--ease); touch-action: pan-y; }
.panel-close { display: block; padding: 6px 0 12px; margin-bottom: 6px; min-height: 38px; border: 0; background: transparent; color: #c0cee3; font-size: 12px; font-weight: 600; }
#door-panel h2 { font-size: 22px; font-weight: 800; line-height: 1.2; margin-top: 5px; overflow-wrap: anywhere; letter-spacing: -.02em; }
#door-panel .sub { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.room-owner { margin-top: 5px; color: #c5d2e7; font-size: 13px; overflow-wrap: anywhere; }
#door-panel .btn.primary { margin-top: 16px; }
.goal { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.goal b { font-size: 12px; font-weight: 600; color: #e6cf9d; }
.goal span { font-size: 10px; color: var(--muted); }
.dots { display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border: 1px solid var(--amber); border-radius: 50%; }
.dots i.on { background: var(--amber); }
.vote { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.vote summary { font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 30px; }
.vote .question { margin-top: 0; border-top: 0; padding-top: 10px; }
.question { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.question p { font-size: 14px; font-weight: 600; }
.question small { display: block; color: var(--muted); font-size: 11px; margin-top: 10px; }
.question .btn.on { border-color: var(--amber); color: var(--amber); }
#door-close.knock { animation: knock 350ms ease; }
@keyframes knock { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
html[data-view="hall"] { overflow: hidden; }
html[data-view="hall"] #stage { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--col); height: 100svh; margin: 0 auto; z-index: 2; }
html[data-view="hall"] #scene, html[data-view="hall"] #app { display: none; }
[data-world="hotel"] #hall.luxe { background: #0e1429; }
[data-world="hotel"] #hall.luxe .wall { background: linear-gradient(180deg, transparent 0 68.4%, #ffe3a0aa 68.4% 69.2%, #3a2f2a 69.2%), repeating-linear-gradient(90deg, transparent 0 48px, #ffffff09 48px 49px), var(--wall); }
[data-world="hotel"] #hall.luxe .lamp { background: #ffe3a0; box-shadow: 0 0 46px 14px #ffc46355; }
[data-world="hotel"] #hall.luxe .hall-window { width: 300px; height: 300px; border: 6px solid #e2b763; border-radius: 150px 150px 4px 4px; animation: none; background: radial-gradient(circle at 22% 30%, #fff 0 1px, transparent 2px), radial-gradient(circle at 70% 20%, #ffe3a0 0 1px, transparent 2px), radial-gradient(circle at 65% 45%, #fff 0 1px, transparent 2px), radial-gradient(ellipse at 30% 110%, #99b8de 0 26%, transparent 27%), radial-gradient(ellipse at 90% 105%, #6685b4 0 35%, transparent 36%), linear-gradient(#06102a, #132c63); box-shadow: 0 0 80px #6f9fef33; }
[data-world="hotel"] #hall.luxe .hall-fog { background: radial-gradient(100% 90% at 50% 46%, transparent 45%, #02081977); }
[data-world="hotel"] #hall.luxe .hud-floor b { color: #ffe3a0; }
[data-world="bunker"] .hall-window { width: 210px; height: 210px; border-radius: 50%; border: 10px solid #8fb4d8; background: radial-gradient(circle, #41566f 0 22%, #2c3b52 23% 60%, #5f7894 61% 100%); animation: none; }

/* Map and shop share one panel; the game navigation stays in place. */
#menu { position: fixed; z-index: 6; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100vw, var(--col)); background: var(--bg); display: flex; flex-direction: column; }
html[data-view="hall"] #menu { bottom: calc(86px + env(safe-area-inset-bottom)); }
.menu-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; min-height: 62px; padding: max(8px, env(safe-area-inset-top)) 16px 8px 20px; background: #0b1933; border-bottom: 1px solid var(--line); }
.menu-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
#menu-close { width: 44px; height: 44px; border: 1px solid #354966; border-radius: 6px; background: #142541; color: #c5d2e7; font-size: 25px; }
#menu-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; }
.map-search { display: flex; gap: 8px; }
.map-search input { flex: 1; min-width: 0; border: 1px solid #415573; border-radius: 6px; height: 46px; padding: 0 12px; font-size: 16px; background: #0d1d38; color: var(--ink); }
.map-search input::placeholder { color: #a5b5cf; }
.map-search .btn { width: 66px; margin: 0; }
.map-shortcuts { display: flex; gap: 6px; margin-top: 12px; }
.map-shortcuts button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 6px; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #12223f; font-size: 11px; font-weight: 600; white-space: nowrap; }
.map-shortcuts svg { width: 16px; height: 16px; }
.map-shortcuts .gold { border-color: #c99a4877; color: #ffe3a0; }
.map-shortcuts .red { border-color: #ad4a5155; color: #ff9a9a; }
.map-floor { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.map-floor > div { text-align: center; }
.map-floor h3 { font-size: 17px; font-weight: 800; }
.map-floor p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.icon-btn { min-width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #142642; font-size: 25px; line-height: 1; }
.map-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.map-room { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; height: 50px; padding: 4px 1px; border: 1px solid #3a506f; border-radius: 6px; background: #142641; color: #d8e4f7; }
.map-room b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.map-room span { display: block; margin-top: 1px; font-size: 9px; color: #aebfda; }
.map-room.taken { background: #3c3028; border-color: #96753e; color: #ffdc8a; }
.map-room.taken span { color: #d9be8c; }
.map-room.premium { border-color: #96753e; }
.map-room.premium span { color: #e0bf7f; }
.map-room.red { background: #381d2d; border-color: #9d4855; color: #ffa6a6; }
.map-room.red span { color: #eba5b0; }
.map-room.mine { background: #ffd36a; border-color: #ffe9b0; color: #32220c; }
.map-room.mine span { color: #59401b; }
.map-room.selected { outline: 2px solid #f6f7fc; outline-offset: 2px; }
.map-pages { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.map-pages > span { font-size: 12px; text-align: center; color: #c7d4e8; }
.map-pages small { display: block; color: var(--muted); font-size: 10px; }
.map-selection { position: sticky; bottom: -24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; margin-top: 14px; background: var(--bg); border-top: 1px solid var(--line); }
.map-selection > div { min-width: 0; }
.map-selection b { font-size: 15px; font-weight: 800; }
.map-selection p { color: var(--muted); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.map-selection .btn { width: 86px; flex-shrink: 0; margin: 0; }
.map-help { color: #aebfda; font-size: 11px; text-align: center; }
.map-message { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }

@media (min-width: 960px) {
  #stage, html[data-view="hall"] #stage { position: fixed; top: 0; left: 0; transform: none; width: calc(100vw - var(--side)); height: 100vh; max-width: none; z-index: 0; }
  #app, html[data-view="hall"] #app { display: block; margin: 0 0 0 auto; width: var(--side); max-width: var(--side); height: 100vh; overflow-y: auto; border-left: 1px solid var(--line); background: var(--bg); }
  #hero, html[data-view="hall"] #hero { display: flex; min-height: 0; padding: 24px 26px 0; }
  #hero h1 { margin-top: 36px; font-size: 42px; }
  #hero .spacer { flex: 0; min-height: 28px; }
  #hero .hero-story { color: var(--muted); }
  #hero .card { padding: 20px; }
  html[data-view="hall"] #hero h1, html[data-view="hall"] #hero .hero-story, html[data-view="hall"] #hero #counter { display: none; }
  html[data-view="hall"] #hero .spacer { min-height: 24px; }
  .below { padding: 28px 26px 40px; }
  .hud-top { padding: 28px 32px 40px; }
  .hud-floor b { font-size: 32px; }
  .hud-walk { right: 32px; }
  .hud-bottom { padding: 0 28px 24px; }
  .hud-chips { bottom: 108px; padding: 0 32px; }
  .coach { bottom: 110px; }
  #door-panel { left: auto; right: 32px; bottom: 112px; width: min(340px, 43%); max-height: calc(100% - 250px); padding: 16px 22px 22px; animation: fade 160ms ease; }
  #sheet { left: auto; width: var(--side); }
  .sheet-panel { width: 100%; padding: 28px 26px; border-radius: 12px 12px 0 0; }
  #menu, html[data-view="hall"] #menu { width: var(--side); top: 0; right: 0; bottom: 0; left: auto; transform: none; border-left: 1px solid var(--line); }
  #menu-body { padding: 20px 24px 28px; }
  .menu-header { min-height: 76px; padding: 16px 20px 16px 24px; }
  #toast { left: auto; right: 24px; transform: translateY(10px); max-width: calc(var(--side) - 48px); bottom: 24px; }
  #toast.on { transform: translateY(0); }
}
@media (max-height: 700px) and (max-width: 959px) {
  #hero { padding: 16px 18px; }
  #hero h1 { font-size: 36px; margin-top: 24px; }
  .hero-story { margin-top: 10px; }
  .spacer { min-height: 60px; }
  .card { padding: 18px; }
  .hud-top { padding-top: 16px; }
  .hud-brand { margin-bottom: 5px; }
  #menu-body { padding: 14px 16px 24px; }
  .map-room { height: 46px; }
}
@media (hover: hover) and (pointer: fine) {
  .btn.ghost:hover, .lift-btn:hover, .walk:hover, .hud-btn:hover, .map-shortcuts button:hover, .icon-btn:hover, .quick-links button:hover { background: #233c60; border-color: #b99759; }
  .tab:hover { background: #243958; }
  .btn.primary:hover { filter: brightness(1.06); }
  .door-chip:hover, .map-room:hover { border-color: #ffe3a0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: 0ms !important; }
}
