:root {
  color-scheme: dark;
  --ink: #101624;
  --ink-2: #151d2d;
  --panel: #1a2334;
  --panel-2: #202b3e;
  --line: rgba(207, 220, 243, .11);
  --line-bright: rgba(225, 232, 250, .2);
  --cream: #f3ead4;
  --muted: #929db0;
  --amber: #f5c86c;
  --orange: #e4865e;
  --mint: #8bd1bb;
  --blue: #91c7db;
  --font: 'Manrope', 'Trebuchet MS', sans-serif;
  --mono: 'DM Mono', Consolas, monospace;
  --serif: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -25%, rgba(84, 87, 142, .25), transparent 55%),
    linear-gradient(150deg, #101624, #101624 45%, #141b29);
  font-family: var(--font);
}
button { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.hidden { display: none !important; }
.scanlines {
  pointer-events: none;
  position: fixed;
  z-index: 5;
  inset: 0;
  opacity: .1;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .17) 4px 5px);
  mix-blend-mode: multiply;
}
.app-shell { max-width: 1480px; margin: 0 auto; padding: env(safe-area-inset-top) 42px 26px; }
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: inherit; display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid rgba(245, 200, 108, .48); color: var(--amber);
  font: 600 20px var(--serif); transform: rotate(-3deg);
  background: linear-gradient(145deg, rgba(245, 200, 108, .15), transparent);
}
.brand-copy { display: grid; line-height: 1; gap: 4px; letter-spacing: .14em; }
.brand-copy strong { font-size: 12px; letter-spacing: .22em; }
.brand-copy small { font: 9px var(--mono); color: var(--muted); letter-spacing: .11em; }
.topbar-status { display: flex; align-items: center; gap: 10px; }
.location-weather { color: var(--muted); font: 9px var(--mono); letter-spacing: .11em; margin-right: 14px; }
.sun-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 11px #f5c86c88; margin-right: 6px; }
.hud-chip {
  min-width: 77px; height: 30px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, .025);
  color: #e1dfd9; font: 11px var(--mono);
}
.coin { color: var(--mint); }
.calendar-mark { color: var(--amber); }
.icon-button {
  background: none; border: 1px solid var(--line); color: #c2c8d3; width: 34px; height: 34px;
  border-radius: 5px; cursor: pointer; font-size: 15px;
}
.icon-button:hover { border-color: var(--amber); color: var(--amber); }

.start-screen {
  min-height: min(690px, calc(100vh - 100px));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  align-items: center;
  gap: clamp(36px, 7vw, 108px);
  padding: 45px 3.5% 55px;
}
.start-art {
  height: clamp(360px, 42vw, 520px); max-height: 64vh; min-height: 300px;
  position: relative; overflow: hidden; border: 1px solid rgba(245, 200, 108, .2);
  border-radius: 4px; background: linear-gradient(180deg, #29274d 0%, #a34f59 48%, #ed9c5d 78%, #f4c978 100%);
  box-shadow: 0 25px 80px #0006, 0 0 45px rgba(225, 126, 93, .08);
}
.sunset { position: absolute; left: 21%; bottom: 24%; width: 45%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(180deg, #ffd57b, #ef8769); filter: drop-shadow(0 0 36px #ffc87866); opacity: .88; }
.moon { position: absolute; top: 13%; right: 15%; width: 4px; height: 4px; border-radius: 50%; background: #f5e6b1; box-shadow: 40px 24px 0 #f5e6b1, -74px 52px 0 #e6d9b0, -42px -20px 0 #e6d9b0, 89px 85px 0 #e6d9b0, -110px 112px 0 #e6d9b0; }
.skyline { position: absolute; z-index: 1; bottom: 25%; height: 27%; left: 0; right: 0; display: flex; align-items: end; justify-content: space-around; }
.skyline i { display: block; width: 11%; height: 74%; background: #303249; opacity: .8; position: relative; }
.skyline i:nth-child(2) { height: 100%; width: 16%; background: #35324a; }
.skyline i:nth-child(3) { height: 63%; background: #302e44; }
.skyline i:nth-child(4) { height: 86%; width: 14%; background: #3c3448; }
.skyline i:nth-child(5) { height: 54%; background: #303047; }
.skyline i:before { content: ''; position: absolute; inset: 12px 8px; background: repeating-linear-gradient(90deg, #f6c36b88 0 4px, transparent 4px 14px), repeating-linear-gradient(0deg, transparent 0 15px, #f6c36b55 15px 18px); }
.storefront {
  position: absolute; z-index: 2; left: 18%; bottom: 16%; width: 64%; height: 57%;
  border: 4px solid #303448; background: #b75c54; box-shadow: 10px 12px #462f42;
}
.storefront:before { content: ''; position: absolute; left: -5%; right: -5%; top: -12px; height: 12px; background: #e4b56d; border: 3px solid #333449; }
.store-awning { position: absolute; top: 11%; left: 5%; right: 5%; height: 23%; background: repeating-linear-gradient(90deg, #e9cc91 0 17%, #d96f59 17% 34%); border: 3px solid #373348; display: flex; justify-content: space-around; align-items: center; color: #453843; font: 9px var(--mono); letter-spacing: .05em; }
.store-window { position: absolute; top: 42%; bottom: 7%; left: 7%; width: 58%; background: linear-gradient(135deg, #22394b, #264555); border: 5px solid #353247; display: flex; align-items: center; justify-content: space-evenly; }
.store-window span { font: 10px var(--mono); color: #f6d68c; border: 1px solid #f6d68c66; padding: 4px; transform: rotate(-5deg); }
.store-door { position: absolute; right: 8%; bottom: 7%; width: 24%; height: 50%; background: #7f4e4a; border: 4px solid #343447; }
.store-door:after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; right: 7px; top: 50%; background: #efc67c; }
.neon-sign { position: absolute; right: 3%; top: 40%; transform: translateX(55%); writing-mode: vertical-rl; color: #ffd17d; border: 1px solid #ffd17d88; padding: 7px 3px; font: 11px var(--mono); letter-spacing: .12em; text-shadow: 0 0 12px #fa9d6c; background: #2c2d45; }
.road { position: absolute; bottom: 0; height: 16%; left: 0; right: 0; background: #333346; border-top: 3px solid #f5ce8144; }
.road span { display: inline-block; position: relative; top: 50%; margin: 0 9%; width: 12%; height: 2px; background: #f3d48f77; }
.start-art-caption { position: absolute; z-index: 3; bottom: 12px; left: 15px; font: 9px var(--mono); letter-spacing: .13em; color: #f6d9a7; text-shadow: 0 1px 4px #000; }
.start-copy { max-width: 490px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--amber); font: 9px var(--mono); letter-spacing: .16em; }
.eyebrow-line { width: 28px; height: 1px; background: var(--amber); display: inline-block; opacity: .8; }
.start-copy h1 { font: 500 clamp(48px, 6vw, 78px)/.99 var(--serif); letter-spacing: -.045em; margin: 24px 0 21px; color: #f2e9d7; }
.start-copy h1 em { color: var(--amber); font-weight: 500; }
.start-copy p { color: #a9b1bd; font-size: 14px; line-height: 1.9; max-width: 410px; margin-bottom: 31px; }
.start-actions { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.primary-button {
  height: 48px; padding: 0 19px; border: 1px solid #f5c86c; border-radius: 4px;
  background: linear-gradient(100deg, #f0bd5f, #e69a5d); color: #241f26; font-weight: 800; font-size: 12px;
  letter-spacing: .025em; cursor: pointer; box-shadow: 0 7px 20px #e69a5d26; transition: transform .15s, box-shadow .15s;
}
.primary-button span { margin-left: 20px; font-size: 17px; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px #e69a5d4a; }
.quiet-button { border: 0; background: none; color: #b4bbc6; font-size: 11px; cursor: pointer; padding: 12px; }
.quiet-button:hover { color: var(--amber); }
.start-footnote { color: #788396; font: 9px var(--mono); letter-spacing: .04em; margin-top: 35px; }
.start-footnote span { color: var(--amber); margin-right: 6px; }
.start-footnote a { color: #e8c979; text-decoration: none; margin-left: 8px; }
.start-footnote a:hover { color: #fff0b5; }

.game-screen { padding: 33px 0 0; }
.game-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 1px 22px; }
.game-heading h1 { margin: 8px 0 0; font: 500 36px/1.1 var(--serif); letter-spacing: -.025em; }
.goal-pill { border: 1px solid var(--line); border-radius: 4px; padding: 9px 13px; display: grid; grid-template-columns: 18px auto; align-items: center; min-width: 205px; column-gap: 4px; background: #ffffff04; }
.goal-spark { grid-row: span 2; color: var(--amber); font-size: 14px; }
.goal-pill span:nth-child(2) { color: var(--muted); font: 8px var(--mono); letter-spacing: .11em; }
.goal-pill b { font-size: 10px; font-weight: 700; margin-top: 3px; }
.location-nav { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.location-tab { border: 0; border-bottom: 2px solid transparent; background: none; padding: 12px 16px 13px; color: #8e9aac; font-size: 10px; font-weight: 700; cursor: pointer; transition: .15s; }
.location-tab span { color: #8791a6; font-size: 14px; margin-right: 8px; vertical-align: -1px; }
.location-tab:hover { color: var(--cream); }
.location-tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.location-tab.active span { color: var(--amber); }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 19px; align-items: start; }
.world-frame { border: 1px solid var(--line-bright); background: #111827; border-radius: 5px; overflow: hidden; box-shadow: 0 10px 35px #0002; }
.world-topline { height: 37px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; color: #929cb0; font: 8px var(--mono); letter-spacing: .1em; border-bottom: 1px solid var(--line); }
.world-topline b { color: #d5d7d5; font-weight: 500; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: #96d2a7; border-radius: 50%; box-shadow: 0 0 8px #90d2a9; animation: live-pulse 2.2s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { opacity: .55; box-shadow: 0 0 3px #90d2a9; } 50% { opacity: 1; box-shadow: 0 0 10px #90d2a9; } }
.world-stage { width: 100%; aspect-ratio: 16/9; position: relative; overflow: hidden; background: #282d42; }
.world-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 48%, #0a0f1b66 100%); box-shadow: inset 0 0 45px #080d1966; }
#world-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.hotspot-layer { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  pointer-events: auto; position: absolute; transform: translate(-50%, -50%); border: 1px solid #f4d88c88;
  min-height: 28px; border-radius: 3px; color: #f8e4ae; background: rgba(19, 28, 42, .86); padding: 5px 7px;
  font: 8px var(--mono); letter-spacing: .03em; white-space: nowrap; cursor: pointer;
  box-shadow: 0 0 14px rgba(245, 200, 108, .2); transition: .15s;
}
.hotspot:before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); margin-right: 5px; box-shadow: 0 0 8px var(--amber); vertical-align: 1px; }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.06); background: #243247; border-color: var(--amber); }
.stage-caption {
  position: absolute; bottom: 12px; left: 12px; right: 12px; min-height: 33px; padding: 8px 11px;
  background: linear-gradient(90deg, rgba(14, 21, 33, .88), rgba(14, 21, 33, .5));
  border-left: 2px solid var(--amber); color: #e4dbc8; font: 9px var(--mono); display: flex; gap: 8px; align-items: center;
  text-shadow: 0 1px 3px #000;
}
.caption-icon { color: var(--amber); }
.pixel-weather { pointer-events: none; position: absolute; top: 0; left: 0; right: 0; height: 22px; overflow: hidden; }
.pixel-weather i { position: absolute; top: 5px; left: 17%; width: 3px; height: 2px; background: #fff6; animation: drift 5s linear infinite; }
.pixel-weather i:nth-child(2) { left: 38%; top: 11px; animation-delay: -2s; }
.pixel-weather i:nth-child(3) { left: 66%; top: 3px; animation-delay: -3.5s; }
.pixel-weather i:nth-child(4) { left: 82%; top: 15px; animation-delay: -1.5s; }
.pixel-weather i:nth-child(5) { left: 50%; top: 7px; animation-delay: -4s; }
@keyframes drift { from { transform: translateX(-12px); opacity: 0; } 20% { opacity: .7; } to { transform: translateX(35px); opacity: 0; } }
.world-footer { height: 34px; display: flex; align-items: center; gap: 15px; padding: 0 12px; color: #7f8a9e; font: 8px var(--mono); letter-spacing: .02em; }
.key-hint { border: 1px solid #64718777; border-radius: 2px; padding: 2px 4px; font: 7px var(--mono); color: #c9d1d9; font-style: normal; }
.save-button { border: 0; background: none; color: #8491a5; padding: 0; margin-left: auto; cursor: pointer; font: inherit; }
.save-button i { display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: #94cfaa; }
.save-button:hover { color: var(--mint); }
.interaction-panel {
  min-height: 114px; margin-top: 12px; padding: 14px 16px; background: rgba(27, 37, 55, .76);
  border: 1px solid var(--line); border-radius: 5px; position: relative;
}
.interaction-top { display: flex; align-items: center; gap: 11px; }
.mini-label { font: 8px var(--mono); letter-spacing: .14em; color: #8a97ab; }
.interaction-location { font: 8px var(--mono); letter-spacing: .12em; color: var(--amber); }
#story-line { margin: 9px 0 0; color: #d3d4d3; font: 11px/1.65 var(--serif); }
.interaction-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.action-chip { min-height: 32px; border: 1px solid #e7c57555; background: #f5c86c0d; color: #f3d891; border-radius: 3px; padding: 7px 9px; font-size: 9px; font-weight: 700; cursor: pointer; }
.action-chip:hover { background: #f5c86c22; border-color: #e7c575; }

.side-column { display: grid; gap: 12px; }
.management-card, .people-card, .mystery-card, .quick-actions-card { border: 1px solid var(--line); border-radius: 5px; background: linear-gradient(135deg, rgba(31, 43, 63, .9), rgba(24, 33, 49, .95)); padding: 14px; }
.card-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.panel-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--amber); border: 1px solid #f5c86c44; border-radius: 4px; background: #f5c86c0d; font-size: 15px; }
.card-heading h2, .section-title h2, .mystery-heading h2 { font-size: 11px; margin: 0; font-weight: 800; letter-spacing: .02em; }
.card-heading small { color: #92a0b2; font: 7px var(--mono); letter-spacing: .11em; display: block; margin-top: 4px; }
.more-button { background: none; border: 0; color: #7e8ba0; cursor: pointer; margin-left: auto; letter-spacing: .2em; }
.stat-row { display: flex; justify-content: space-between; align-items: center; color: #a3adbb; font-size: 9px; padding: 5px 0; }
.stat-row b { color: #e5e3dd; font: 10px var(--mono); font-weight: 500; }
.stars { color: #e8bf69; font-size: 8px; letter-spacing: .05em; }
.card-divider { height: 1px; background: var(--line); margin: 10px 0; }
.store-controls { display: grid; gap: 7px; }
.wide-button { min-height: 36px; width: 100%; padding: 0 10px; text-align: left; display: flex; justify-content: space-between; align-items: center; border: 1px solid #8bcaaf55; border-radius: 3px; color: #a8dec3; background: #8bd1bb0d; font-size: 9px; font-weight: 800; cursor: pointer; }
.wide-button span { font: 8px var(--mono); color: #8fa89e; font-weight: 400; }
.wide-button:hover { background: #8bd1bb18; border-color: #8bd1bb; }
.wide-button.close-day { border-color: #e7b67655; background: #e7b6760b; color: #f1c77e; }
.wide-button.close-day:hover { background: #e7b6761c; border-color: #e7b676; }
.queue-mini { color: #a8b5c3; font: 8px var(--mono); padding-top: 3px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-title span { color: #8592a6; font: 8px var(--mono); }
.people-list { display: grid; gap: 6px; }
.person-row { display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 5px 7px; border-radius: 3px; background: #ffffff04; border: 1px solid #ffffff08; }
.avatar { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 3px; color: #18202c; font: 700 10px var(--mono); }
.person-row div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.person-row b { font-size: 8px; font-weight: 700; }
.person-row small { color: #8793a4; font-size: 7px; }
.person-state { margin-left: auto; color: #8090a5; font: 7px var(--mono); }
.person-state.waiting { color: var(--mint); }
.person-state.served { color: #778394; }
.mystery-card { background: linear-gradient(120deg, #202539, #1d2335); border-color: #c4867450; }
.mystery-heading { display: flex; align-items: center; gap: 8px; }
.mystery-heading > span:first-child { color: #e58d73; font-size: 18px; }
.mystery-heading small { color: #d1967f; display: block; font: 7px var(--mono); letter-spacing: .12em; margin-bottom: 3px; }
.mystery-heading h2 { font: 500 13px var(--serif); }
.mystery-count { margin-left: auto; color: #d6a38e; font: 8px var(--mono); border: 1px solid #cf8d7755; border-radius: 10px; padding: 4px 6px; }
.mystery-card p { color: #a4a8b5; font-size: 8px; line-height: 1.7; margin: 10px 0; }
.clue-track { display: flex; gap: 4px; }
.clue-track i { flex: 1; height: 3px; background: #4c4555; border-radius: 5px; }
.clue-track i.found { background: #e4947b; box-shadow: 0 0 7px #e4947b66; }
.text-button { border: 0; background: none; color: #e2a58e; padding: 9px 0 0; font: 8px var(--mono); cursor: pointer; }
.text-button span { margin-left: 6px; }
.quick-actions-card { padding: 12px 14px; }
.quick-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.desk-button { min-height: 34px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff3; border-radius: 3px; color: #aeb8c6; font-size: 8px; cursor: pointer; text-align: left; padding: 0 8px; }
.desk-button span { color: #e2bd70; font-size: 13px; }
.desk-button:hover { border-color: #d9b96e88; color: var(--cream); background: #f3cf7310; }
.game-footer { display: flex; justify-content: space-between; gap: 15px; align-items: center; color: #647084; padding: 22px 2px 0; font: 7px var(--mono); letter-spacing: .07em; }
.game-footer i { color: #c99264; font-style: normal; margin: 0 4px; }
.game-footer b { color: var(--amber); }
.game-footer button { border: 0; background: none; color: #718096; font: inherit; cursor: pointer; }
.game-footer button:hover { color: #db9077; }
.game-footer a { color: #718096; text-decoration: none; }
.game-footer a:hover { color: var(--amber); }
.mobile-nav { display: none; }
.policy-page { max-width: 750px; margin: 56px auto; padding: 0 12px 70px; }
.policy-page h1 { margin: 14px 0 8px; font: 500 clamp(36px, 6vw, 56px)/1.05 var(--serif); color: var(--cream); }
.policy-date { margin: 0 0 35px; color: #8c98aa; font: 9px var(--mono); }
.policy-page section { padding: 18px 0; border-top: 1px solid var(--line); }
.policy-page section h2 { margin: 0 0 7px; color: #eac77a; font-size: 13px; }
.policy-page section p { margin: 0; color: #aab2bf; font-size: 11px; line-height: 1.85; }

#modal-root:empty { display: none; }
#modal-root { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(6, 10, 17, .77); backdrop-filter: blur(5px); }
.modal { width: min(590px, 100%); max-height: min(84vh, 800px); overflow: auto; border: 1px solid #d0a76c66; border-radius: 5px; background: #192234; box-shadow: 0 22px 80px #0009; animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.modal.wide { width: min(780px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 20px 15px; border-bottom: 1px solid var(--line); }
.modal-kicker { color: var(--amber); font: 8px var(--mono); letter-spacing: .13em; margin-bottom: 6px; }
.modal-header h2 { margin: 0; font: 500 22px var(--serif); }
.modal-close { background: none; border: 1px solid var(--line); width: 27px; height: 27px; border-radius: 4px; color: #96a0b1; cursor: pointer; }
.modal-close:hover { color: var(--amber); border-color: var(--amber); }
.modal-body { padding: 18px 20px 20px; }
.modal-body p { color: #b7bec9; font-size: 11px; line-height: 1.75; margin: 0 0 14px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-button { border: 1px solid #e5be6d77; background: #e5be6d12; color: #f0ce83; border-radius: 3px; padding: 9px 12px; font-size: 9px; font-weight: 800; cursor: pointer; }
.modal-button:hover { background: #e5be6d23; }
.modal-button:disabled { opacity: .52; cursor: not-allowed; }
.modal-button.primary { color: #27232a; background: var(--amber); border-color: var(--amber); }
.modal-button.muted { color: #a6b0c0; border-color: var(--line); background: #ffffff04; }
.movie-list, .upgrade-list, .case-list { display: grid; gap: 7px; }
.movie-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: #fff2; }
.movie-cover { width: 36px; height: 47px; padding: 4px; display: flex; align-items: end; color: #ffedc3; font: 6px/1.15 var(--mono); border: 2px solid #f1d5a666; box-shadow: inset 0 0 0 2px #0002; }
.movie-row h3 { margin: 0 0 4px; font-size: 9px; }
.movie-row small { color: #92a1b6; font: 7px var(--mono); }
.stock-count { color: #abb6c5; font: 8px var(--mono); text-align: right; }
.genre-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.genre-pills button { flex: 1 1 100px; min-height: 45px; text-align: left; border: 1px solid var(--line); border-radius: 4px; background: #ffffff04; color: #eee1c9; padding: 9px 10px; font-size: 9px; cursor: pointer; }
.genre-pills button small { display: block; color: #8492a6; margin-top: 4px; font: 7px var(--mono); }
.genre-pills button:hover { border-color: #e4be6a; background: #e4be6a0c; }
.order-group { margin: 12px 0 16px; }
.order-group h3 { margin: 0 0 7px; color: #e4c47f; font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.upgrade-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff2; }
.upgrade-icon { display: grid; place-items: center; color: var(--amber); width: 30px; height: 30px; border: 1px solid #f1c36f33; border-radius: 3px; font-size: 13px; }
.upgrade-row h3 { margin: 0 0 4px; font-size: 9px; }
.upgrade-row p { margin: 0; font-size: 8px; color: #909caf; }
.upgrade-requirement { display: block; margin-top: 6px; color: #e5b76a; font: 7px var(--mono); }
.upgrade-row .modal-button { white-space: nowrap; }
.case-clue { border-left: 2px solid #d58b74; padding: 2px 0 2px 10px; margin: 11px 0; }
.case-clue h3 { font: 500 13px var(--serif); margin: 0 0 5px; color: #ecc6ad; }
.case-clue p { margin: 0; color: #aab1bd; font-size: 9px; }
.case-clue.locked { border-color: #566071; opacity: .65; }
.code-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; }
.code-form input { min-width: 0; width: 100px; text-align: center; font: 18px var(--mono); letter-spacing: .25em; color: var(--amber); border: 1px solid #8d7957; background: #101624; border-radius: 3px; padding: 8px; }
.price-adjust { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 17px 0; }
.price-tag { display: grid; gap: 6px; text-align: center; min-width: 110px; }
.price-tag small { color: #94a0b3; font: 8px var(--mono); letter-spacing: .12em; }
.price-tag b { font: 28px var(--serif); color: var(--amber); }
.notice { border: 1px solid #a47d5277; border-radius: 4px; padding: 11px; color: #c4b69f; background: #e8bb5710; font-size: 9px; line-height: 1.7; }
.ending-art { height: 105px; margin: -2px 0 15px; position: relative; overflow: hidden; background: linear-gradient(#22284b, #ba765f 75%, #e6b477); border-radius: 3px; }
.ending-art:before { content: ''; position: absolute; width: 150px; height: 150px; left: 25%; top: 30px; border-radius: 50%; background: #ffe4a0; box-shadow: 0 0 50px #ffe4a055; }
.ending-art:after { content: '✦   ✦     ✦        ✦'; position: absolute; inset: 15px 0 0 45%; color: #fbdea0; font: 9px var(--mono); }
.arcade-wrap { display: grid; grid-template-columns: 1fr 170px; gap: 12px; align-items: start; }
#arcade-canvas { width: 100%; image-rendering: pixelated; border: 1px solid #414566; border-radius: 3px; background: #13172b; display: block; }
.arcade-stats { display: grid; gap: 8px; }
.arcade-readout { padding: 8px 9px; border: 1px solid var(--line); border-radius: 3px; }
.arcade-readout small { display: block; font: 7px var(--mono); color: #8190a5; letter-spacing: .1em; }
.arcade-readout b { display: block; margin-top: 4px; font: 16px var(--mono); color: var(--amber); }
.dpad { margin: 8px auto 0; display: grid; grid-template-columns: repeat(3, 38px); grid-template-rows: repeat(2, 36px); justify-content: center; gap: 4px; }
.dpad button { border: 1px solid #616789; border-radius: 4px; background: #252d49; color: #e7d595; cursor: pointer; touch-action: none; }
.dpad button[data-dir="up"] { grid-column: 2; }
.dpad button[data-dir="left"] { grid-column: 1; grid-row: 2; }
.dpad button[data-dir="down"] { grid-column: 2; grid-row: 2; }
.dpad button[data-dir="right"] { grid-column: 3; grid-row: 2; }
.dpad button:active { background: #6d628c; }
.game-result { border: 1px solid #8bd1bb66; background: #8bd1bb0c; border-radius: 4px; padding: 12px; color: #b1dcc8; margin-top: 12px; font-size: 10px; }
.sort-stage { text-align: center; padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(135deg, #253049, #1c2337); }
.sort-counter { display: flex; justify-content: space-between; color: #8d9aaf; font: 8px var(--mono); }
.sort-cover { width: 112px; height: 142px; display: grid; align-content: end; margin: 18px auto; text-align: left; border: 4px solid #f0d18c77; padding: 8px; color: #ffefca; box-shadow: 0 7px 20px #0005; }
.sort-cover b { font: 10px var(--mono); }
.sort-cover small { margin-top: 5px; font: 7px var(--mono); opacity: .8; }
.sort-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sort-choices button { min-height: 36px; border: 1px solid var(--line); border-radius: 3px; background: #ffffff05; color: #d7d9dd; font-size: 8px; cursor: pointer; }
.sort-choices button:hover { border-color: var(--amber); color: var(--amber); }
.rush-customer { display: flex; align-items: center; gap: 11px; text-align: left; margin: 18px 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: #151c2d; }
.rush-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 4px; background: #d9a471; color: #272537; font: 700 15px var(--mono); }
.rush-request { display: grid; gap: 4px; }
.rush-request b { color: #eadfc9; font-size: 9px; }
.rush-request span { color: #9ca9bb; font: 9px var(--serif); }
.rush-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.rush-choices button { display: grid; justify-items: center; gap: 5px; padding: 8px 5px; border: 1px solid var(--line); border-radius: 4px; background: #ffffff04; cursor: pointer; }
.rush-choices button:hover { border-color: var(--amber); background: #f5c86c0d; }
.rush-choices button b { font-size: 7px; text-align: center; }
.rush-choices button small { color: #8c99ac; font: 7px var(--mono); }
.rush-cover { width: 47px; height: 61px; display: grid; align-content: end; padding: 4px; color: #f6e7c8; font: 6px var(--mono); line-height: 1.15; border: 2px solid #f1d5a666; text-align: left; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 27px; transform: translate(-50%, 12px); background: #28344a; color: #e9e1ce; border: 1px solid #d7bd7666; border-radius: 4px; padding: 10px 15px; box-shadow: 0 9px 34px #0006; font: 9px var(--mono); opacity: 0; transition: .2s; pointer-events: none; max-width: min(90vw, 500px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 1500px) { .app-shell { padding-inline: 55px; } .game-grid { grid-template-columns: minmax(0, 1fr) 310px; } }
@media (max-width: 1100px) {
  .app-shell { padding-inline: 24px; }
  .game-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
  .location-tab { padding-inline: 11px; }
  .side-column { gap: 9px; }
  .management-card, .people-card, .mystery-card, .quick-actions-card { padding: 11px; }
}
@media (max-width: 820px) {
  .app-shell { padding-inline: 18px; padding-bottom: 80px; }
  .start-screen { grid-template-columns: 1fr; gap: 29px; padding: 34px 1% 45px; }
  .start-art { height: min(48vw, 420px); min-height: 260px; max-height: none; }
  .start-copy { max-width: 620px; }
  .start-copy h1 { font-size: clamp(48px, 8vw, 66px); }
  .game-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-card { grid-row: span 2; }
  .quick-actions-card { grid-column: 1 / -1; }
  .game-heading h1 { font-size: 31px; }
}
@media (max-width: 560px) {
  .app-shell { padding: env(safe-area-inset-top) 11px calc(78px + env(safe-area-inset-bottom)); }
  .topbar { height: 62px; gap: 8px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small { font-size: 7px; }
  .location-weather { display: none; }
  .topbar-status { margin-left: auto; gap: 5px; }
  .hud-chip { min-width: 57px; height: 28px; padding-inline: 6px; font-size: 9px; }
  .icon-button { width: 30px; height: 30px; }
  .start-screen { padding: 22px 1% 34px; }
  .start-art { min-height: 235px; height: 63vw; }
  .storefront { width: 70%; left: 15%; }
  .start-copy h1 { font-size: 48px; margin: 17px 0; }
  .start-copy p { font-size: 12px; line-height: 1.75; margin-bottom: 22px; }
  .start-footnote { line-height: 1.7; margin-top: 24px; }
  .game-screen { padding-top: 22px; }
  .game-heading { align-items: start; padding-bottom: 15px; }
  .game-heading h1 { font-size: 28px; }
  .goal-pill { min-width: auto; padding: 7px 9px; }
  .goal-pill b { font-size: 8px; }
  .goal-pill span:nth-child(2) { font-size: 6px; }
  .location-nav { display: none; }
  .world-topline { height: 31px; font-size: 7px; padding-inline: 8px; }
  .hotspot { min-height: 32px; padding: 5px 6px; font-size: 7px; }
  .stage-caption { bottom: 6px; left: 6px; right: 6px; padding: 6px 7px; font-size: 7px; min-height: 26px; }
  .world-footer { height: 30px; padding-inline: 7px; gap: 8px; font-size: 6px; }
  .interaction-panel { padding: 12px; min-height: 105px; }
  #story-line { font-size: 10px; }
  .side-column { grid-template-columns: 1fr 1fr; gap: 7px; }
  .management-card { grid-column: 1 / -1; grid-row: auto; }
  .people-card, .mystery-card { min-height: 150px; }
  .quick-actions-card { grid-column: 1 / -1; }
  .game-footer { flex-wrap: wrap; font-size: 6px; padding-bottom: 8px; }
  .game-footer > span:last-child { display: none; }
  .mobile-nav {
    position: fixed; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    left: 0; right: 0; bottom: 0; padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(16, 22, 36, .96); border-top: 1px solid var(--line-bright); backdrop-filter: blur(12px);
  }
  .mobile-nav button { border: 0; background: none; color: #8792a6; display: grid; gap: 3px; justify-items: center; cursor: pointer; padding: 2px; }
  .mobile-nav button span { font-size: 14px; }
  .mobile-nav button small { font: 7px var(--mono); }
  .mobile-nav button.active { color: var(--amber); }
  .arcade-wrap { grid-template-columns: 1fr; }
  .arcade-stats { grid-template-columns: repeat(3, 1fr); }
  .dpad { grid-column: 1 / -1; }
  .sort-choices { grid-template-columns: repeat(2, 1fr); }
  .rush-choices { grid-template-columns: repeat(3, 1fr); }
  .rush-choices button { padding-inline: 2px; }
  .modal-header { padding: 15px 15px 12px; }
  .modal-body { padding: 14px 15px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
