: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 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; }
.sheet-price .was, .sale-line s, .bundle-price s { color: var(--muted); font-weight: 400; font-size: .7em; }
.sale-line { color: #ffd36a; }
.sale-line b[data-sale-ends] { font-variant-numeric: tabular-nums; }
.bundles { display: grid; gap: 8px; margin: 4px 0 16px; }
.bundle { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #0c1930; }
.bundle.best { border-color: var(--amber); background: linear-gradient(180deg, #ffd36a1c, #0c1930); box-shadow: 0 0 18px #ffb34722; }
.bundle-art { height: 104px; overflow: hidden; border-radius: 4px; background: #081329; }
.bundle-art svg { width: 100%; height: 100%; }
[data-world="bunker"] .bundle { grid-template-columns: 96px 1fr; }
[data-world="bunker"] .bundle-art { height: 84px; }
.bundle-info b { display: block; font-size: 15px; line-height: 1.2; }
.bundle-info .eyebrow { margin: 0 0 2px; }
.bundle-info p { color: var(--muted); font-size: 10px; line-height: 1.35; margin: 3px 0 5px; }
.bundle-price strong { color: var(--amber); font-size: 17px; }
.bundle-price .off { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: #ff4d5e; color: #fff; font-size: 11px; font-weight: 800; vertical-align: 2px; }
.bundle-info small.worth { color: #7fe0a0; }
.launch-sale { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 9px 12px; border-radius: 8px; background: linear-gradient(90deg, #ff4d5e, #ff8a3d); color: #fff; font-size: 13px; }
.launch-sale span { font-size: 12px; white-space: nowrap; }
.launch-sale b[data-sale-ends], .sale-note b { font-variant-numeric: tabular-nums; }
.finish-info .was, .look-addon .was { font-size: 11px; }
.renews b { color: #f3e3c0; }
.btn.upgrade { width: 100%; margin-top: 10px; border: 0; color: #fff; font-weight: 800; background: linear-gradient(90deg, #ff4d5e, #ff8a3d); box-shadow: 0 4px 18px #ff6a4a44; }
.btn.upgrade .tag { margin-left: 6px; padding: 1px 7px; border-radius: 4px; background: #fff; color: #e5384a; font-size: 12px; }
.sale-note { display: block; color: #ffb37a; font-size: 12px; margin-top: 2px; }
.bundle-info small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.bundle-info .btn { margin-top: 7px; }
.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; }
}

/* Looks share the same drawings in the corridor, shop and key. */
.cosmetic-glow { animation: look-glow 5s ease-in-out infinite; }
@keyframes look-glow { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
/* Storm light flashes on the same 7 s beat as the lightning in the hall window. */
.storm-flash { animation: storm-flash 7s steps(1) infinite; }
@keyframes storm-flash { 0%, 100% { opacity: 0; } 61% { opacity: 1; } 62% { opacity: 0; } 63.5% { opacity: .75; } 65% { opacity: 0; } }
.amber-pulse { animation: amber-pulse 2.6s ease-in-out infinite; }
@keyframes amber-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.finish-shine { animation: finish-shine 6s ease-in-out infinite; }
@keyframes finish-shine { 0%, 62% { transform: translateX(0); } 100% { transform: translateX(820px); } }
.hanger-swing { transform-box: fill-box; transform-origin: 50% 4%; animation: hanger-swing 3.8s ease-in-out infinite; }
@keyframes hanger-swing { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.name-glow { animation: name-glow 3.2s ease-in-out infinite; }
@keyframes name-glow { 0%,100% { opacity: .9; } 50% { opacity: 1; filter: brightness(1.18); } }
.tally-line, .wake-line { margin: 8px 0; color: #e7d2b0; font-size: 12px; }
.looks-line { margin-top: 8px; color: var(--muted); font-size: 11px; }
.shop-intro { font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.look-studio { display: grid; grid-template-columns: 105px 1fr; gap: 18px; align-items: center; border-top: 1px solid #c99a4877; padding-top: 10px; }
.look-studio .upgrade-preview { margin: 0; padding: 0; border: 0; height: 170px; background: #081329; overflow: hidden; }
.look-studio .upgrade-preview svg { width: 86px; height: 170px; }
[data-world="bunker"] .look-studio .upgrade-preview svg { width: 105px; height: 120px; }
.finish-info b { font-size: 16px; line-height: 1.2; display: block; }
.finish-info p { color: var(--muted); font-size: 11px; margin: 7px 0; }
.finish-info > span { color: var(--amber); font-size: 13px; }
.finish-info .btn { margin-top: 8px; }
.finish-swatches { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin: 10px 0 15px; }
.swatch { min-height: 78px; border: 1px solid var(--line); border-radius: 6px; background: #101e35; padding: 7px 3px; }
.swatch i { display: block; margin: 0 auto 5px; width: 26px; height: 27px; border: 2px solid #997044; background: linear-gradient(100deg,#422b1c,#24170e); border-radius: 2px; }
.swatch.gold i { background: linear-gradient(100deg,#ffeab0,#bb8424); border-color: #f3d086; }
[data-world="bunker"] .swatch.standard i { background: #30425e; border-color: #6b88ad; }
[data-world="bunker"] .swatch.gold i { background: linear-gradient(100deg,#f4faff,#7f9dbd); border-color: #d9e8f5; }
.swatch.obsidian i { background: #10141e; border-color: #acbbc9; }
.swatch.ivory i { background: #e8e2cf; border-color: #d0ad60; }
.swatch b, .swatch small { display: block; font-size: 11px; }
.swatch small { font-size: 9px; color: var(--muted); }
.swatch[aria-pressed="true"] { border-color: var(--amber); background: #ffd36a12; }
.look-addons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.look-addon { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: #0c1930; }
.addon-art { height: 52px; overflow: hidden; margin-bottom: 6px; }
.addon-art svg { width: 100%; height: 100%; }
.look-addon b { display: block; font-size: 10px; line-height: 1.2; min-height: 24px; }
.look-addon p { font-size: 9px; color: var(--muted); min-height: 25px; line-height: 1.3; margin: 4px 0; }
.look-addon .btn { font-size: 11px; padding: 6px; min-height: 36px; }
#desk .top-card { display: grid; grid-template-columns: 1fr auto; gap: 2px; margin-top: 14px; padding: 12px; border-radius: 6px; }
#desk .top-card h3 { font-size: 15px; line-height: 1.2; margin: 0; }
#desk .top-card p:not(.eyebrow) { font-size: 10px; color: var(--muted); line-height: 1.4; }
#desk .top-card .stock { align-self: center; font-size: 11px; line-height: 1.4; margin: 0; }
#desk .top-card .eyebrow, #desk .top-card .top-description { grid-column: 1 / -1; }
#desk .top-card .row { grid-column: 1 / -1; margin: 0; }
#desk .top-card .btn { margin: 0; min-height: 38px; }
.map-room[data-finish="obsidian"] { background: #10141e; border-color: #a2b1c2; color: #e4eaf2; }
.map-room[data-finish="ivory"] { background: #e8e2cf; border-color: #c7a65e; color: #302c21; }
.map-room[data-finish="gold"] { border-color: #f6d179; }
#hall[data-knocks] .door-handle { transform-box: fill-box; transform-origin: 90% 50%; }
#hall[data-knocks="2"] .peephole, #hall[data-knocks="3"] .peephole, #hall[data-knocks="4"] .peephole, #hall[data-knocks="5"] .peephole { fill: #000; }
#hall[data-knocks="3"] .door-red-line, #hall[data-knocks="4"] .door-red-line, #hall[data-knocks="5"] .door-red-line { filter: drop-shadow(0 0 14px #ff1818); }
#knock-line { margin-top: 12px; min-height: 20px; color: #f4c4c4; font-size: 14px; }
#hall.knock-flicker #hall-stage { animation: reply-flicker 1.35s steps(1); }
@keyframes reply-flicker { 10%,45%,78% { opacity: .08; } 20%,60%,90% { opacity: 1; } }
#hall[data-knocks="5"] #hall-stage { filter: brightness(.02); }
#hall[data-knocks="5"] #door-close > svg > *:not(.door-red-line) { filter: brightness(.025); }
#hall[data-knocks="5"] .hud { opacity: .04; pointer-events: none; }
#hall[data-knocks="5"] #door-panel { background: transparent; border-color: transparent; box-shadow: none; }
#hall[data-knocks="5"] #door-panel > *:not(#knock):not(#knock-line) { opacity: .025; }
#hall[data-knocks="5"] #knock { opacity: .3; }
#hall[data-knocks="5"] #knock-line { font-size: 24px; color: #f4d4d4; }
#blackout-curtain { position: fixed; inset: 0; z-index: 99999; background: #000; opacity: 1; transition: opacity 900ms ease; }
#blackout-curtain.reveal { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .cosmetic-glow, .amber-pulse { animation: none; opacity: .85; }
  .name-glow { animation: none; }
  #door-close, #blackout-curtain { transition: opacity 900ms ease !important; }
}
#desk .look-studio { grid-template-columns: 88px 1fr; gap: 14px; }
#desk .look-studio .upgrade-preview, #desk .look-studio .upgrade-preview svg { height: 132px; }
#desk .look-studio .upgrade-preview svg { width: 68px; }
#desk .finish-swatches { margin: 8px 0 10px; }
#desk .swatch { min-height: 70px; padding: 5px 3px; }
#desk .addon-art { height: 38px; }
#desk .look-addon b { min-height: 20px; }
#desk .look-addon p { min-height: 20px; margin: 3px 0; }
#desk .top-card { margin-top: 10px; padding: 9px; }
#desk .top-card .btn { min-height: 36px; padding: 7px; }
#hall.knock-busy .hud, #hall.knock-busy .panel-close { pointer-events: none; }
#desk .look-studio .upgrade-preview, #desk .look-studio .upgrade-preview svg { height: 118px; }
#hall[data-knocks="5"] #knock { background: transparent; border-color: transparent; color: transparent; opacity: .1; }

/* The top floor has its own architecture, shared by every view. */
.suite-dust { animation: suite-drift 24s ease-in-out infinite alternate; }
@keyframes suite-drift { to { transform: translate(12px, -26px); opacity: .35; } }
#desk .top-card { grid-template-columns: 64px 1fr auto; column-gap: 10px; }
#desk .top-card .top-illustration { grid-column: 1; grid-row: 1 / 6; width: 64px; height: 96px; margin: 0; border: 0; border-radius: 4px; background: #071329; }
#desk .top-illustration svg { width: 100%; height: 100%; margin: 0; }
#desk .top-card .eyebrow, #desk .top-card h3, #desk .top-card .stock, #desk .top-card .top-description, #desk .top-card .row { grid-column: 2 / -1; }
#desk .top-card .eyebrow { font-size: 9px; letter-spacing: .05em; }
#desk .top-card .btn { font-size: 11px; }
.top-sheet { padding: 20px 18px calc(16px + env(safe-area-inset-bottom)); max-height: 96svh; }
.top-sheet .buy-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 24px; }
.top-sheet h2 { font-size: 22px; margin: 0; padding: 0; }
.top-sheet .sheet-price { margin: 0; font-size: 22px; white-space: nowrap; }
.top-sheet .eyebrow { margin-top: 4px; }
.top-sheet .sub { margin-top: 4px; font-size: 12px; line-height: 1.4; }
.suite-preview { height: clamp(160px, 28svh, 232px); margin-top: 8px; overflow: hidden; border: 1px solid #c99a4866; border-radius: 8px; background: radial-gradient(ellipse at 50% 25%, #26324c, #071329 75%); }
.suite-preview svg { display: block; width: 100%; height: 100%; animation: suite-reveal 180ms ease-out; }
@keyframes suite-reveal { from { opacity: .6; transform: translateY(3px); } }
[data-world="bunker"] .suite-preview { border-color: #bdd8ec66; background: #070d1a; }
.top-sheet .picker { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 8px; max-height: 76px; padding: 2px; scroll-padding: 2px; }
.top-sheet .picker button { min-height: 34px; font-size: 11px; }
.top-sheet .field { margin-top: 8px; }
.top-sheet .field input { height: 40px; padding-top: 8px; padding-bottom: 8px; }
.top-sheet .field.at::before { top: 8px; }
.top-sheet .check { margin-top: 8px; min-height: 30px; align-items: center; font-size: 11px; }
.top-sheet .check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.top-sheet .fine { margin-top: 6px; font-size: 10px; line-height: 1.4; }
.top-sheet .btn.primary { margin-top: 8px; min-height: 44px; }
@media (max-height: 700px) {
  .top-sheet { padding-top: 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .top-sheet .suite-preview { height: 160px; }
  .top-sheet .assignment { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .suite-dust, .suite-preview svg { animation: none; }
}

/* The Last Post Office: dark wood, warm brass, cream paper. */
[data-world="post"] { --bg: #120d0a; --surface: #1d1612; --raised: #2a2019; --gold: #b8925a; --amber: #ffb547; --line: #4a3a2a; --muted: #c4b49a; }
[data-world="post"] #stage { background: #0b0805; }
[data-world="post"] #scene::after { background: linear-gradient(#0b0805cc, transparent 38%, #0b080566); }
[data-world="post"] .wordmark { color: #e6c98a; }
[data-world="post"] .follow-chip { background: #120c08aa; border-color: #b8925a66; }
[data-world="post"] .card { background: #140e0aef; border-color: #b8925a; }
[data-world="post"] .field input, [data-world="post"] .field textarea { background: #0e0906; border-color: #5a4526; }
[data-world="post"] .btn.ghost { background: #241a12; border-color: #5a4526; }
[data-world="post"] .btn.primary { background: linear-gradient(#ffd58a, #f0b04a); border-color: #ffd58a; color: #2a1606; box-shadow: inset 0 1px #fff4ca88, 0 2px 0 #8a5a1a; }
[data-world="post"] #door-panel { background: #150f0bf5; border-color: #5a4526; border-top-color: #e6c98a; }
[data-world="post"] .tabs, [data-world="post"] .menu-header { background: #150f0b; border-color: #5a4526; }
[data-world="post"] .tab { color: #e2d3b8; }
[data-world="post"] .hud-top { background: linear-gradient(#0b0805ee, transparent); }
[data-world="post"] .hud-bottom { background: linear-gradient(transparent, #0b0805c9); }
[data-world="post"] .hud-btn, [data-world="post"] .door-chip, [data-world="post"] .hud-walk { background: #150f0be8; border-color: #8a6a3a; }
[data-world="post"] .door-chip span, [data-world="post"] .hud-floor #hud-range, [data-world="post"] .walk span { color: #d6c6a8; }
[data-world="post"] .lift-btn, [data-world="post"] .map-room, [data-world="post"] .map-shortcuts button, [data-world="post"] .icon-btn, [data-world="post"] .swatch, [data-world="post"] .look-addon, [data-world="post"] .quick-links button, [data-world="post"] .picker button { background: #1d1510; border-color: #4a3a2a; color: #efe3cc; }
[data-world="post"] .map-room span { color: #c4b49a; }
[data-world="post"] .map-room.taken { background: #4a3519; border-color: #b8925a; color: #ffe2a0; }
[data-world="post"] .map-room.mine { background: #ffb547; color: #2a1606; }
[data-world="post"] .map-room.mine span { color: #4a2c08; }
[data-world="post"] .map-room.red { background: #3a1210; border-color: #c0262d; color: #ff8a80; }
[data-world="post"] .map-search input, [data-world="post"] .inline-form input { background: #0e0906; border-color: #5a4526; }
[data-world="post"] .sheet-panel { background: #1a130e; border-color: #5a4526; }
[data-world="post"] #toast { background: #2a1f15; border-color: #8a6a3a; }
[data-world="post"] .look-studio .upgrade-preview, [data-world="post"] .suite-preview, [data-world="post"] #desk .top-card .top-illustration { background: #120c08; }
[data-world="post"] .look-studio .upgrade-preview svg { width: 92px; height: 120px; }
[data-world="post"] .swatch.standard i { background: linear-gradient(100deg,#c9a46a,#7a5d33); border-color: #e6c98a; }
[data-world="post"] .swatch.ivory i { background: #f3ecd9; border-color: #d0ad60; }
/* The aisle: a whole wall of boxes, a checkerboard floor and one lamp per aisle. */
[data-world="post"] .wall { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='195' viewBox='0 0 150 195'%3E%3Crect x='3' y='3' width='144' height='189' rx='6' fill='%23826339' stroke='%23b8925a' stroke-width='2'/%3E%3Crect x='24' y='19' width='102' height='60' rx='7' fill='%2307090d' stroke='%23a8844e' stroke-width='2'/%3E%3Cpath d='M25 96H125M25 132H125' stroke='%23b8925a' stroke-opacity='.45'/%3E%3Ccircle cx='75' cy='170' r='9' fill='%23b8925a'/%3E%3Ccircle cx='75' cy='168' r='2.6' fill='%230b0805'/%3E%3C/svg%3E") 75px 120px / 150px 195px, linear-gradient(#2a1a10, #1d120b); }
[data-world="post"] .bay.lit .wall { background: radial-gradient(90% 55% at 50% 0%, rgba(255, 190, 100, 0.22), transparent 70%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='195' viewBox='0 0 150 195'%3E%3Crect x='3' y='3' width='144' height='189' rx='6' fill='%23826339' stroke='%23b8925a' stroke-width='2'/%3E%3Crect x='24' y='19' width='102' height='60' rx='7' fill='%2307090d' stroke='%23a8844e' stroke-width='2'/%3E%3Cpath d='M25 96H125M25 132H125' stroke='%23b8925a' stroke-opacity='.45'/%3E%3Ccircle cx='75' cy='170' r='9' fill='%23b8925a'/%3E%3Ccircle cx='75' cy='168' r='2.6' fill='%230b0805'/%3E%3C/svg%3E") 75px 120px / 150px 195px, linear-gradient(#2a1a10, #1d120b); }
[data-world="post"] .bay.dark .wall { background: linear-gradient(#0b0805b0, #0b0805b0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='195' viewBox='0 0 150 195'%3E%3Crect x='3' y='3' width='144' height='189' rx='6' fill='%23826339' stroke='%23b8925a' stroke-width='2'/%3E%3Crect x='24' y='19' width='102' height='60' rx='7' fill='%2307090d' stroke='%23a8844e' stroke-width='2'/%3E%3Cpath d='M25 96H125M25 132H125' stroke='%23b8925a' stroke-opacity='.45'/%3E%3Ccircle cx='75' cy='170' r='9' fill='%23b8925a'/%3E%3Ccircle cx='75' cy='168' r='2.6' fill='%230b0805'/%3E%3C/svg%3E") 75px 120px / 150px 195px, #160d07; }
[data-world="post"] .bay.red .wall { background: radial-gradient(90% 60% at 50% 0%, rgba(255, 50, 40, 0.32), transparent 70%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='195' viewBox='0 0 150 195'%3E%3Crect x='3' y='3' width='144' height='189' rx='6' fill='%23826339' stroke='%23b8925a' stroke-width='2'/%3E%3Crect x='24' y='19' width='102' height='60' rx='7' fill='%2307090d' stroke='%23a8844e' stroke-width='2'/%3E%3Cpath d='M25 96H125M25 132H125' stroke='%23b8925a' stroke-opacity='.45'/%3E%3Ccircle cx='75' cy='170' r='9' fill='%23b8925a'/%3E%3Ccircle cx='75' cy='168' r='2.6' fill='%230b0805'/%3E%3C/svg%3E") 75px 120px / 150px 195px, #2a0f0c; }
[data-world="post"] .floor { background: conic-gradient(#e9dfc8 25%, #17110c 0 50%, #e9dfc8 0 75%, #17110c 0) 0 0 / 100px 100px; filter: brightness(.55); }
[data-world="post"] #hall.red .floor { filter: brightness(.3) sepia(1) hue-rotate(-30deg); }
[data-world="post"] .lamp { width: 70px; height: 40px; margin: -20px 0 0 -35px; border-radius: 50%; }
[data-world="post"] .hall-window { width: 170px; height: 250px; border-radius: 85px 85px 4px 4px; border: 8px solid #b8925a; background: radial-gradient(ellipse at 50% 85%, #ffb547 0 18%, #6a3a12 40%, #120a04 75%); box-shadow: 0 0 60px #ffb54733; animation: none; }
/* Mail on your own box, the paper letter and the ledger. */
.mail-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 10px; border: 1px solid #e6c98a; border-radius: 8px; background: linear-gradient(120deg, #2a1d12, #1a120c); text-align: left; box-shadow: 0 0 22px #ffb54733; }
.mail-art { flex: 0 0 104px; }
.mail-art svg { display: block; width: 104px; height: auto; }
.mail-copy b { display: block; font-size: 16px; color: #ffe2a0; }
.mail-copy small { display: block; margin-top: 3px; font-size: 11px; color: #c4b49a; }
.letter-paper { position: relative; margin-top: 8px; padding: 18px 18px 22px; color: #1f2b47; border-radius: 3px; background:
  repeating-linear-gradient(180deg, transparent 0 27px, #8aa3c41f 27px 28px) 0 64px / 100% calc(100% - 64px) no-repeat,
  linear-gradient(170deg, #f6eedb, #e6d7b5); box-shadow: 0 10px 30px #0008, inset 0 0 40px #b0915a33; }
.letter-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-height: 64px; }
.letter-postmark svg { width: 132px; height: 72px; display: block; }
.letter-to { text-align: right; font-family: 'American Typewriter', 'Courier New', monospace; font-size: 11px; color: #4a3a2a; }
.letter-to span { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.letter-to b { display: block; font-family: 'Snell Roundhand', 'Segoe Script', 'Bradley Hand', 'Brush Script MT', cursive; font-size: 22px; color: #1f2b47; overflow-wrap: anywhere; }
.letter-body p { margin-top: 10px; font-family: 'Bradley Hand', 'Segoe Print', 'Snell Roundhand', 'Brush Script MT', cursive; font-size: 17px; line-height: 1.6; color: #1f2b47; }
.letter-sign { margin-top: 14px; text-align: right; font-family: 'Snell Roundhand', 'Segoe Script', cursive; font-size: 19px; }
.letter-sealed { position: relative; margin-top: 16px; padding: 6px 0 4px; }
.letter-sealed i { display: block; height: 11px; margin: 15px 0; border-radius: 6px; background: #1f2b4755; filter: blur(4px); }
.letter-wax { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; transform: translate(-50%, -50%) rotate(-8deg); filter: drop-shadow(0 4px 6px #0007); }
.letter-wax svg, .letter-broken svg { width: 100%; height: 100%; display: block; }
.letter-broken { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: #7a2a22; }
.letter-broken svg { width: 34px; height: 34px; }
.letter-card { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid #e6c98a77; border-radius: 6px; background: #241a12; }
.letter-card > div { flex: 1; }
.letter-card b { font-size: 13px; color: #ffe2a0; }
.letter-card p { font-size: 10px; color: var(--muted); margin-top: 2px; }
.letter-card .btn { width: auto; min-width: 72px; }
.ledger { list-style: none; margin: 16px 0 0; padding: 14px 16px; border-radius: 3px; background: linear-gradient(170deg, #efe3c4, #d9c79c); color: #3a2a16; font-family: 'American Typewriter', 'Courier New', monospace; }
.ledger li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid #8a6a3a55; font-size: 13px; line-height: 1.45; }
.ledger li:last-child { border-bottom: 0; color: #7a1a1e; }
.ledger time { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .mail-btn { box-shadow: none; } }
[data-world="post"] #desk .top-card { background: #1d140c; border-color: #e6c98a77; }
.ledger time { font-size: 11px; }
.ledger li { grid-template-columns: 92px 1fr; }
.voice-1313 .letter-body p { font-family: 'American Typewriter', 'Courier New', Courier, monospace; font-size: 14px; line-height: 1.7; color: #22232a; }
.voice-reader .letter-body p, .voice-reader .letter-sign { color: #4a2e1a; }
.letter-paper + .row .btn:disabled, .letter-paper ~ .row .btn:disabled { opacity: .55; }
/* Second letter. */
#sheet:not([hidden]) ~ #toast { top: max(14px, env(safe-area-inset-top)); bottom: auto; }
.mail-small .mail-btn { padding: 6px 8px; margin-top: 8px; box-shadow: none; border-color: #5a4526; }
.mail-small .mail-art { flex-basis: 64px; }
.mail-small .mail-art svg { width: 64px; }
.mail-small .mail-copy b { font-size: 13px; color: #e2d3b8; }
.mail-next { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 12px; border: 1px solid #ffd58a; border-radius: 8px; background: linear-gradient(120deg, #3a2614, #1a120c); text-align: left; box-shadow: 0 0 26px #ffb54755; animation: mail-arrive 600ms var(--ease); }
.mail-next .mail-art { flex: 0 0 96px; }
.mail-next .mail-art svg { width: 96px; display: block; }
.mail-next b { display: block; color: #ffe2a0; font-size: 15px; }
.mail-next small { display: block; margin-top: 3px; color: #c4b49a; font-size: 11px; }
@keyframes mail-arrive { from { opacity: 0; transform: translateY(12px) rotate(-2deg); } }
.about-label { display: block; margin-top: 14px; font-size: 14px; font-weight: 700; color: #ffe2a0; }
.about-count { margin-top: 4px; text-align: right; font-size: 11px; color: var(--muted); }
.writing { padding: 24px 0 12px; text-align: center; }
.writing-pen { width: 80px; height: 80px; margin: 0 auto 16px; animation: pulse 1.6s ease-in-out infinite; }
.seal-line { text-align: center; }
.invite-unlock { margin-top: 14px; padding: 12px; border: 1px dashed #8a6a3a; border-radius: 8px; }
.invite-unlock p { font-size: 12px; color: #e2d3b8; }
.invite-unlock small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.invite-unlock .btn { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .mail-next, .writing-pen { animation: none; } }
.over-seal { margin-top: -6px; text-align: center; font-family: 'Snell Roundhand', 'Segoe Script', cursive; font-size: 16px; color: #7a2a22; }
.seal-title { margin-top: 16px; font-size: 18px; font-weight: 800; text-align: center; }
.fine.center { text-align: center; margin-top: 6px; }
#second-free { margin-top: 12px; }
.after-read { text-align: center; }
.friend-status { margin-top: 14px; padding: 10px; border: 1px dashed #8a6a3a; border-radius: 8px; font-size: 13px; color: #ffe2a0; text-align: center; }
.story-preview { margin: 12px auto 0; width: min(62%, 240px); aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px #0008; }
.story-preview svg { display: block; width: 100%; height: 100%; }
.letter-footer { margin-top: 14px; font-size: 10px; opacity: .8; }
