:root {
  color-scheme: light;
  --sky: #f0c9ad;
  --earth: #9a754d;
  --road: #393d40;
  --walk: #d2c9b3;
  --owned: #8da65e;
  --locked: #586674;
  --danger: #b33a2b;
  --ink: #252927;
  --paper: #f3ecdc;
  --ui: "Avenir Next", Avenir, system-ui, sans-serif;
  font-family: var(--ui);
  color: var(--ink);
  background: var(--earth);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button { color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, [role="button"]:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
[hidden] { display: none !important; }
.game { position: relative; width: 100%; height: 100dvh; min-height: 540px; overflow: hidden; background: var(--sky); }
.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; z-index: 5; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); display: grid; grid-template-columns: minmax(100px, 1fr) minmax(145px, auto); grid-template-areas: "cash pay" "brand brand"; align-items: start; gap: 7px; pointer-events: none; }
.cash-sign { grid-area: cash; width: max-content; min-width: 116px; display: grid; grid-template-columns: 24px auto; align-items: center; padding: 6px 10px 7px 7px; color: var(--paper); background: var(--ink); border: 3px solid #181b1a; box-shadow: 0 4px #181b1a; font-variant-numeric: tabular-nums; }
.cash-sign > span { grid-row: span 2; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: var(--ink); background: var(--owned); font-size: 13px; font-weight: 900; }
#cash { font-size: 24px; line-height: 1; letter-spacing: -.04em; }
#cash.debt { color: #ff9b8a; }
#rate { margin-top: 4px; color: #c6d0b3; font-size: 10px; line-height: 1; font-weight: 800; }
.brand-sign { grid-area: brand; justify-self: center; display: flex; gap: 6px; align-items: center; padding: 3px 8px; color: var(--paper); background: #333638; border: 2px solid #202323; box-shadow: 0 3px #202323; }
.brand-sign small { font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.brand-sign b { font: 700 12px/1 Georgia, serif; letter-spacing: .04em; }
.brand-sign .clock { display: grid; margin-left: 4px; padding-left: 8px; border-left: 2px solid #4a4f50; text-align: left; font-variant-numeric: tabular-nums; }
.brand-sign .clock b { font: 900 14px/1 var(--ui); letter-spacing: .02em; color: #f2dc2f; }
.brand-sign .clock small { margin-top: 2px; font-size: 7px; color: #c6d0b3; }
.payday { grid-area: pay; justify-self: end; min-width: 112px; padding: 6px 9px; color: var(--paper); background: var(--ink); border: 3px solid #181b1a; box-shadow: 0 4px #181b1a; text-align: right; }
.payday b, .payday span { display: block; }
.payday b { font-size: 11px; line-height: 1.05; letter-spacing: .06em; }
.payday span { margin-top: 3px; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }
.payday.cooldown { color: #d0d0c9; }
.action:active { transform: scale(.96); }
.terminal { position: absolute; z-index: 9; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); max-height: min(56dvh, 520px); display: flex; flex-direction: column; padding: 12px; color: var(--paper); background: #292e30; border: 3px solid #181b1c; box-shadow: 0 6px #181b1c; }
.terminal-head { display: flex; justify-content: space-between; align-items: flex-start; }
.terminal-head small { color: #b5c98d; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.terminal-head h2 { margin: 2px 0 0; font: 700 21px/1 Georgia, serif; }
.terminal-head > button { width: 40px; height: 40px; border: 2px solid #141718; background: #454c4d; color: var(--paper); font-size: 25px; line-height: 1; }
.company-summary { display: flex; gap: 7px; flex-wrap: wrap; margin: 9px 0; font-size: 11px; font-weight: 800; }
.company-summary span { padding: 4px 7px; color: var(--ink); background: #c0c6b1; }
.company-summary .review-note { flex: 1 0 100%; color: var(--paper); background: transparent; padding: 2px 0 0; font-weight: 600; }
.terminal-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.terminal-tabs button { min-height: 36px; padding: 4px; border: 0; color: #ddd8ca; background: #414749; font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.terminal-tabs button.active { color: #1d2419; background: #a6be7d; }
.terminal-content { min-height: 0; overflow: auto; padding: 8px 1px 2px; overscroll-behavior: contain; }
.action-group { margin: 0 0 10px; }
.action-group h3 { margin: 0 0 5px; color: #c2ceab; font-size: 10px; letter-spacing: .11em; }
.action-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.action { min-height: 48px; padding: 7px 8px; border: 2px solid #151819; color: var(--ink); background: #d2c9b3; text-align: left; font-size: 11px; line-height: 1.15; font-weight: 850; }
.action strong, .action small { display: block; }
.action small { margin-top: 4px; font-size: 10px; font-weight: 700; opacity: .75; }
.action.ready { color: #172013; background: #a6be7d; }
.action:disabled { color: #b7b9b5; background: #505859; border-color: #424849; cursor: default; opacity: .72; }
.action:disabled:active { transform: none; }
.product-card { padding: 7px; border-left: 4px solid var(--owned); background: #353b3d; font-size: 11px; }
.product-card b { display: block; margin-bottom: 3px; }
.product-card p { margin: 0; line-height: 1.4; }
.world-hint { position: absolute; z-index: 6; left: 50%; top: 22%; width: max-content; max-width: 90vw; transform: translateX(-50%); padding: 6px 10px; color: var(--paper); background: var(--ink); border: 2px solid #171a19; box-shadow: 0 3px #171a19; font-size: 12px; font-weight: 900; pointer-events: none; opacity: 0; transition: opacity .18s; }
.world-hint.on { opacity: 1; }
.review-float { position: absolute; z-index: 7; left: 50%; top: 15%; width: max-content; max-width: min(92vw, 520px); transform: translateX(-50%); padding: 6px 10px; color: var(--ink); background: #f0e7cd; border: 2px solid #36332c; border-left-width: 6px; font-size: 12px; font-weight: 800; line-height: 1.3; pointer-events: none; opacity: 0; }
.review-float.good { border-left-color: #6f9a3e; }
.review-float.bad { background: #f6d4cc; border-left-color: var(--danger); }
.review-float.on { animation: feedback 2.8s ease both; }
#money-float-layer { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.money-float.spend { color: #ffb4a6; }
.money-float { position: absolute; color: var(--paper); font-size: 20px; font-weight: 950; font-variant-numeric: tabular-nums; text-shadow: 0 2px #202321; animation: money-flight .78s cubic-bezier(.2,.7,.35,1) forwards; }

/* World: flat-shaded dimetric blocks, no outlines (Claim Avenue look). */
.plot-target { cursor: pointer; }
.plot-target.rival-static { cursor: default; }
.plot-target.rival-static.rogue .land { animation: rival-flash 1.1s ease-in-out infinite; }
.plot-target .action-ring { fill: none; stroke: #fff6c8; stroke-width: 3; stroke-dasharray: 9 6; opacity: 0; }
.plot-target.ready .action-ring { opacity: 1; animation: ring-pulse 1.25s ease-in-out infinite; }
.plot-target:hover .action-ring, .plot-target:focus-visible .action-ring { opacity: .8; }
.plot-target .plot-art, .walker .walker-art, .payday-target { transform-box: fill-box; transform-origin: center bottom; transition: transform .12s ease; }
.plot-target:active .plot-art, .walker [role="button"]:active .walker-art, .payday-target:active { transform: scale(.97); }
.roof-trim { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.4; }
.sign-text { font: 900 10px var(--ui); text-anchor: middle; letter-spacing: .05em; }
.sign-text.big { font-size: 15px; letter-spacing: .02em; }
.beacon { fill: #e5392f; animation: beacon 1.6s ease-in-out infinite; }
.hit { fill: transparent; pointer-events: all; }
.mover { pointer-events: none; animation: drive linear infinite; will-change: transform; }
.walker [role="button"] { pointer-events: auto; cursor: pointer; }
.walker .walker-tag { fill: var(--paper); font: 900 9px var(--ui); text-anchor: middle; paint-order: stroke; stroke: #252927; stroke-width: 3px; }
.walker .walker-tag.coin { fill: #f2dc2f; font-size: 11px; }
/* Walking: two leg frames and a 1px bounce; .face turns the sprite toward where it is going. */
.stride-a { animation: stride-a .5s step-end infinite; }
.stride-b { opacity: 0; animation: stride-b .5s step-end infinite; }
.stride-body { animation: stride-bob .5s step-end infinite; }
.stand { opacity: 0; }
.face { transform-box: fill-box; transform-origin: center; transform: scaleX(var(--f0, 1)); }
.turns .face { animation: face-turn var(--d) step-end var(--delay) infinite; }
.mover.route { animation: route var(--d) linear var(--delay) infinite; }
.route.look .strides { animation: hold-walk var(--d) step-end var(--delay) infinite; }
.route.look .stand { animation: hold-stand var(--d) step-end var(--delay) infinite; }
@keyframes stride-a { 50% { opacity: 0; } }
@keyframes stride-b { 50% { opacity: 1; } }
@keyframes stride-bob { 50% { transform: translateY(-1px); } }
@keyframes face-turn { 50% { transform: scaleX(calc(-1 * var(--f0, 1))); } }
@keyframes hold-walk { 32% { opacity: 0; } 68% { opacity: 1; } }
@keyframes hold-stand { 32% { opacity: 1; } 68% { opacity: 0; } }
@keyframes route {
  0% { transform: translate(var(--xa), var(--ya)); opacity: 0; }
  2% { transform: translate(var(--x0), var(--y0)); opacity: 1; }
  32% { transform: translate(var(--x1), var(--y1)); opacity: 1; }
  35%, 65% { transform: translate(var(--xb), var(--yb)); opacity: var(--hide); }
  68% { transform: translate(var(--x1), var(--y1)); opacity: 1; }
  98% { transform: translate(var(--x0), var(--y0)); opacity: 1; }
  100% { transform: translate(var(--xa), var(--ya)); opacity: 0; }
}
.walker.candidate.ready .walker-art { animation: talent-pulse 1.7s ease-in-out infinite; }
.payday-target { cursor: pointer; }
.payday-target.ready .die { animation: die-glow 1.1s ease-in-out infinite; }
.payday-target .chip-mark { fill: #1f2a2d; font: 900 26px var(--ui); text-anchor: middle; dominant-baseline: middle; }

@keyframes drive { from { transform: translate(var(--x0), var(--y0)); } to { transform: translate(var(--x1), var(--y1)); } }
@keyframes ring-pulse { 50% { opacity: .3; } }
@keyframes rival-flash { 50% { fill: #d98bb0; } }
@keyframes beacon { 50% { opacity: .35; } }
@keyframes die-glow { 50% { opacity: .55; } }
@keyframes talent-pulse { 50% { transform: scale(1.08); } }
@keyframes feedback { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -18px); } }
@keyframes money-flight { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.55); } }
@media (min-width: 760px) {
  .hud { grid-template-columns: 1fr auto 1fr; grid-template-areas: "cash brand pay"; align-items: start; }
  .brand-sign { justify-self: center; padding: 7px 12px; }
  .brand-sign small { font-size: 10px; }
  .brand-sign b { font-size: 15px; }
  .payday { min-width: 112px; }
  .terminal { left: auto; right: max(16px, env(safe-area-inset-right)); top: 88px; bottom: max(16px, env(safe-area-inset-bottom)); width: min(440px, 40vw); max-height: none; }
  .terminal-content { flex: 1; }
  .action { min-height: 54px; font-size: 12px; }
}
@media (max-width: 759px) { .terminal { bottom: max(16px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (prefers-reduced-motion: reduce) { .mover { animation-duration: 30s !important; animation-iteration-count: infinite !important; animation-play-state: paused !important; } }

/* Expanded lab menu */
.company-summary .bad { background: #e3a293; }
.action-group h3 span { float: right; color: #8f9a86; font-weight: 700; letter-spacing: .02em; }
.action.current { background: #c0c6b1; border-style: dashed; }
.action.tiny { min-height: 0; padding: 4px 10px; }
.action.tiny small { display: none; }
.role-row { display: grid; grid-template-columns: 1fr auto; gap: 5px; margin-bottom: 5px; }
.meter { position: relative; height: 20px; margin: 0 0 6px; background: #1f2425; border: 2px solid #151819; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: #6d7a5c; transition: width var(--duration-normal, .3s) ease; }
.meter.good i { background: #7fa14e; }
.meter.bad i { background: #b55a45; }
.meter.rival i { background: #5d6b78; }
.meter span { position: relative; z-index: 1; display: block; padding: 2px 6px; font-size: 10px; font-weight: 900; letter-spacing: .03em; }
.model-card { margin-bottom: 8px; padding: 8px; background: #353b3d; border-left: 4px solid #7fa14e; }
.model-card.new { border-left-color: #f2c94c; }
.model-card.locked { opacity: .55; border-left-color: #5d6468; }
.model-card header { margin-bottom: 6px; }
.model-card header b { display: block; font-size: 13px; }
.model-card header small { color: #b9c2a8; font-size: 10px; font-weight: 700; }
.model-card .action { width: 100%; }
.product-card.live { border-left-color: #9fe05a; }
.product-card.good { border-left-color: #f2c94c; }
.product-card p { margin: 4px 0 0; }
.action-group > p { margin: 0 0 6px; color: #c2c9b6; font-size: 11px; line-height: 1.35; }
.review { margin-bottom: 4px; padding: 5px 7px; background: #353b3d; border-left: 3px solid #6d7a5c; font-size: 11px; line-height: 1.35; }
.review b { color: #f2c94c; letter-spacing: .05em; }
.review small { color: #9aa38f; }
.review.good { border-left-color: #7fa14e; }
.review.bad { border-left-color: var(--danger); }
.rival-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #3c4345; font-size: 11px; }
.rival-row small { color: #b9c2a8; text-align: right; }
.ledger { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin-bottom: 8px; padding: 8px; background: #1f2425; font-size: 12px; font-variant-numeric: tabular-nums; }
.ledger span { color: #b9c2a8; }
.ledger .good { color: #a6d36b; }
.ledger .bad { color: #ff9b8a; }
.inbox { position: absolute; z-index: 10; left: 50%; top: 50%; width: min(92vw, 420px); transform: translate(-50%, -50%); padding: 16px; color: var(--ink); background: #f3ecdc; border: 3px solid #181b1a; box-shadow: 0 8px 0 #181b1a, 0 20px 50px rgba(0, 0, 0, .35); animation: inbox-in var(--duration-normal, .3s) cubic-bezier(.16, 1, .3, 1); }
.inbox > small { color: var(--danger); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.inbox h2 { margin: 4px 0 6px; font: 700 22px/1.1 Georgia, serif; }
.inbox p { margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.inbox-options { display: grid; gap: 6px; }
.inbox .action { min-height: 44px; }
@keyframes inbox-in { from { opacity: 0; transform: translate(-50%, -44%); } }
@media (min-width: 760px) { .terminal-tabs { grid-template-columns: repeat(6, 1fr); } .terminal-tabs button { font-size: 9px; } }

/* Guided tutorial: a spotlight ring that dims everything else, plus a coach card. Clicks pass through. */
.coach { position: absolute; inset: 0; z-index: 11; pointer-events: none; }
.coach.center { background: rgba(10, 14, 20, .5); }
.coach-ring { position: absolute; left: 0; top: 0; border: 3px solid #f2dc2f; border-radius: 10px; box-shadow: 0 0 0 200vmax rgba(10, 14, 20, .45); transition: transform var(--duration-normal, .3s) cubic-bezier(.16, 1, .3, 1), width var(--duration-normal, .3s), height var(--duration-normal, .3s); animation: coach-pulse 1.4s ease-in-out infinite; }
.coach.center .coach-ring { display: none; }
.coach-card { position: absolute; left: 0; top: 0; width: min(88vw, 330px); padding: 12px 14px; color: var(--paper); background: #1f2425; border: 3px solid #f2dc2f; box-shadow: 0 6px 0 #0d1011; pointer-events: auto; transition: transform var(--duration-normal, .3s) cubic-bezier(.16, 1, .3, 1); }
.coach.center .coach-card { left: 50%; top: 50%; transform: translate(-50%, -50%) !important; }
.coach-card small { color: #f2dc2f; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.coach-card p { margin: 6px 0 10px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.coach-actions { display: flex; gap: 8px; align-items: center; }
.coach-next { min-height: 40px; padding: 6px 14px; border: 2px solid #0d1011; color: #172013; background: #a6be7d; font-weight: 900; }
.coach-skip { margin-left: auto; padding: 6px 4px; border: 0; color: #9aa38f; background: none; font-size: 11px; font-weight: 800; text-decoration: underline; }
@keyframes coach-pulse { 50% { border-color: #fff6c8; } }
/* Emails and reports win over the tutorial: its card would sit on top of their buttons. */
.inbox:not([hidden]) ~ .coach { display: none; }

/* First-session hook: next-action button, goal card, rival ticker */
.cta { position: absolute; z-index: 6; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); transform: translateX(-50%); min-width: min(88vw, 300px); max-width: 92vw;
  display: grid; gap: 2px; padding: 10px 22px 11px; color: #161a1b; background: #f2dc2f; border: 3px solid #161a1b; box-shadow: 0 6px 0 #161a1b; text-align: center;
  transition: transform var(--duration-fast, .15s) ease, box-shadow var(--duration-fast, .15s) ease; }
.cta strong { font: 900 18px/1.1 var(--ui); letter-spacing: -.01em; }
.cta small { font-size: 11px; font-weight: 800; opacity: .75; }
.cta.hot { animation: cta-glow 1.6s ease-in-out infinite; }
.cta.calm { color: var(--paper); background: #2b3133; }
.cta:hover:not(:disabled) { transform: translateX(-50%) translateY(-2px); box-shadow: 0 8px 0 #161a1b; }
.cta:active:not(:disabled) { transform: translateX(-50%) translateY(3px); box-shadow: 0 3px 0 #161a1b; }
.cta:disabled { cursor: default; opacity: .85; }
.goal-card { position: absolute; z-index: 5; left: max(10px, env(safe-area-inset-left)); top: calc(env(safe-area-inset-top) + 112px); max-width: min(78vw, 320px);
  display: grid; gap: 2px; padding: 7px 11px 8px; color: var(--paper); background: rgba(31, 36, 37, .94); border: 2px solid #161a1b; border-left: 5px solid #f2dc2f; box-shadow: 0 4px 0 #161a1b; pointer-events: none; }
.goal-card small { color: #f2dc2f; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.goal-card b { font-size: 14px; line-height: 1.2; }
.goal-card span { color: #c6d0b3; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ticker { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: calc(28px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; color: #f3ecdc; background: #121516; border-top: 2px solid #2b3133; font-size: 12px; font-weight: 700; pointer-events: none; }
.ticker-tag { flex: none; align-self: stretch; display: grid; place-items: center; padding: 0 10px; color: #fff; background: var(--danger); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.ticker-window { flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-block; padding-left: 16px; animation: ticker 40s linear infinite; }
.away-list { margin: 4px 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.away-list li { padding: 7px 10px; background: #fff; border-left: 4px solid #6d7a5c; font-size: 13px; font-weight: 700; line-height: 1.35; }
.away-list li.good { border-left-color: #6f9a3e; }
.away-list li.bad { border-left-color: var(--danger); background: #fbe3dd; }
.backup textarea { width: 100%; margin: 0 0 10px; padding: 8px; border: 2px solid #161a1b; font: 12px/1.35 ui-monospace, Menlo, monospace; resize: vertical; word-break: break-all; }
@keyframes cta-glow { 50% { box-shadow: 0 6px 0 #161a1b, 0 0 0 6px rgba(242, 220, 47, .35); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (min-width: 760px) { .goal-card { top: 92px; left: 16px; } .cta { bottom: 44px; } }
@media (max-width: 759px) { body.menu-open .cta, body.menu-open .ticker { display: none; } .review-float { top: 30%; } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Pixel-art pass: self-hosted OFL fonts, crisp shapes, stepped UI ---------- */
@font-face { font-family: 'Silkscreen'; src: url(../fonts/silkscreen-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Silkscreen'; src: url(../fonts/silkscreen-700.woff2) format('woff2'); font-weight: 700 900; font-display: swap; }
/* Pixel type only where it is part of the world: building signs, money, salary and the big button.
   Menus, the lab computer and the tutorial keep a plain, readable UI font. */
:root { --display: 'Silkscreen', "Avenir Next", system-ui, monospace; }
.world { shape-rendering: crispEdges; }
#cash, .payday b, .payday span, .cta strong { font-family: var(--display); letter-spacing: 0; }
#cash { font-size: 20px; letter-spacing: -.02em; }
.sign-text { font-family: var(--display); font-weight: 700; letter-spacing: 0; }
.sign-text.big { font-size: 14px; }
.walker .walker-tag, .walker-tag { font-family: var(--display); font-size: 8px; }
.action, .cta, .coach-next, .menu-btn, .dice { border-radius: 0; }
.cash-sign, .payday, .brand-sign, .goal-card, .terminal, .inbox, .coach-card { box-shadow: 4px 4px 0 #0d1011; }

/* ---------- Main menu and onboarding ---------- */
.menu { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(10, 13, 18, .55); backdrop-filter: blur(3px); }
.menu-card { width: min(92vw, 400px); display: grid; gap: 10px; padding: 22px; color: var(--paper); background: #1f2425; border: 4px solid #0d1011; box-shadow: 6px 6px 0 #0d1011, inset 0 0 0 2px #2f3638; }
.menu-kicker { color: #f2dc2f; font: 900 10px var(--ui); letter-spacing: .18em; }
.menu h1 { margin: 0; color: #f3ecdc; font: 700 36px/1.02 Georgia, serif; text-shadow: 3px 3px 0 #0d1011; }
.menu h2 { margin: 0; font: 700 24px/1.1 Georgia, serif; }
.menu-tagline { margin: 0 0 6px; color: #c6d0b3; font-size: 14px; }
.menu-btn { display: grid; gap: 2px; padding: 12px 14px; color: #161a1b; background: #d2c9b3; border: 3px solid #0d1011; box-shadow: 4px 4px 0 #0d1011; text-align: left;
  transition: transform var(--duration-fast, .15s) ease, box-shadow var(--duration-fast, .15s) ease; }
.menu-btn strong { font: 800 16px var(--ui); letter-spacing: .02em; }
.menu-btn small { font-size: 12px; font-weight: 600; opacity: .75; }
.menu-btn.primary { background: #f2dc2f; }
.menu-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #0d1011; }
.menu-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #0d1011; }
.menu-link { justify-self: start; padding: 4px 0; border: 0; color: #9fe05a; background: none; font-size: 13px; font-weight: 700; text-decoration: underline; }
.menu-card label, .menu-colors legend { color: #c6d0b3; font-size: 12px; font-weight: 700; }
.menu-field { display: grid; grid-template-columns: 1fr 48px; gap: 6px; }
.menu-field input { min-height: 46px; padding: 8px 10px; color: #161a1b; background: #f3ecdc; border: 3px solid #0d1011; border-radius: 0; font: 600 16px var(--ui); }
.menu-field input[aria-invalid="true"] { border-color: #e2503c; }
.dice { background: #d2c9b3; border: 3px solid #0d1011; box-shadow: 3px 3px 0 #0d1011; font-size: 20px; }
.dice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #0d1011; }
.menu-colors { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; padding: 0; border: 0; }
.menu-colors legend { margin-bottom: 6px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 38px; height: 38px; border: 3px solid #0d1011; box-shadow: 3px 3px 0 #0d1011; }
.swatch input:checked + span { outline: 3px solid #f2dc2f; outline-offset: 2px; }
.swatch input:focus-visible + span { outline: 3px dashed #fff; outline-offset: 2px; }
.menu-error { min-height: 1em; margin: 0; color: #ff8f7a; font-size: 13px; font-weight: 700; }
.menu-warning { margin: 0; padding: 8px 10px; background: #3a2a22; border-left: 4px solid #e8792f; font-size: 12px; line-height: 1.4; }
.menu-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.backup { z-index: 25; }
body.in-menu .cta, body.in-menu .goal-card { display: none; }

/* ---------- Place cards: act on the avenue itself ---------- */
.place-card { position: absolute; z-index: 9; left: 0; top: 0; width: min(92vw, 340px); max-height: calc(100% - 120px); overflow: auto; display: grid; gap: 8px; padding: 12px;
  color: var(--paper); background: #1f2425; border: 3px solid #0d1011; box-shadow: 4px 4px 0 #0d1011; overscroll-behavior: contain; }
.place-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.place-card h2 { margin: 0; font: 700 18px/1.15 Georgia, serif; }
.place-card header small { display: block; margin-top: 3px; color: #c6d0b3; font-size: 11px; font-weight: 700; }
#place-close { flex: none; width: 38px; height: 38px; border: 2px solid #0d1011; color: var(--paper); background: #454c4d; font-size: 22px; line-height: 1; }
.place-actions { display: grid; gap: 6px; }
.place-actions:empty, .place-body:empty, .place-footer:empty { display: none; }
.card-note { margin: 0; color: #c2c9b6; font-size: 13px; line-height: 1.4; }
.card-note.warn { color: #f7c9a0; }
.card-quote { margin: 8px 0 0; padding-left: 8px; border-left: 3px solid #e25f55; color: #e8e2d2; font-size: 12px; font-style: italic; line-height: 1.4; }
.card-more { justify-self: start; padding: 6px 0; border: 0; color: #9fe05a; background: none; font-size: 13px; font-weight: 800; text-decoration: underline; }
.candidate { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #343b3d; }
.candidate b { display: block; font-size: 14px; }
.candidate small { display: block; margin-top: 2px; color: #b9c2a8; font-size: 11px; font-weight: 700; line-height: 1.3; }
.candidate em { display: block; margin-top: 3px; color: #f2dc2f; font-size: 11px; }
.candidate .action { min-height: 44px; min-width: 104px; }
.versus { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.versus th { color: #b9c2a8; font-size: 10px; letter-spacing: .08em; text-align: left; }
.versus td, .versus th { padding: 5px 4px; border-bottom: 1px solid #343b3d; }
.versus td + td, .versus th + th { text-align: right; }
.versus .good { color: #a6d36b; font-weight: 800; }
.versus .bad { color: #ff9b8a; font-weight: 800; }
.plot-target.rival-static[role="button"], .place-target { cursor: pointer; }
.plot-target.rival-static[role="button"]:hover .land, .plot-target.rival-static[role="button"]:focus-visible .land { fill: #e8e2d2; }
.hiring-sign { animation: hiring 1.4s ease-in-out infinite; }
.hiring-sign text { fill: #161a1b; font: 700 10px var(--display); text-anchor: middle; }
@keyframes hiring { 50% { transform: translateY(-3px); } }
@media (max-width: 759px) {
  .place-card { left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 62dvh; transform: none !important; }
}
body.in-menu .place-card { display: none; }

@media (max-width: 759px) { .world { touch-action: none; } }

/* Dark choices and the closet: a sick bruise-red, so danger reads before you read the words. */
:root { --skeleton: #c2475a; --skeleton-deep: #3a1f25; }
.action.dark { color: #fbe9ec; background: #7e2a38; border-color: #2a0f15; }
.action.dark small { margin-top: 4px; color: #ffd9df; font-size: 11px; font-weight: 700; letter-spacing: 0; opacity: 1; }
.action.dark:not(:disabled):hover { background: #962f41; }
.closet { margin-top: 12px; padding-top: 8px; border-top: 2px dashed #4a3a3e; }
.closet h3 { margin: 0 0 4px; color: #e8a3ae; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.skeleton { display: grid; gap: 6px; padding: 8px 0 8px 10px; border-left: 3px solid #5a3e44; border-bottom: 1px solid #343b3d; }
.skeleton b { display: block; font-size: 13px; }
.skeleton > div > small { display: block; margin-top: 2px; color: #d7b4ba; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.skeleton.hot { border-left-color: var(--skeleton); background: linear-gradient(90deg, rgba(194, 71, 90, .18), transparent 70%); }
.skeleton.hot > div > small { color: #ffb3bf; }
.skeleton.hot b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; background: var(--skeleton); animation: beacon 1s steps(2) infinite; }
.skeleton-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 5px; }
.skeleton-actions .action { min-height: 44px; }

/* ---------- Settings ---------- */
/* Portals ask that long-presses and drags never select text or pop the iOS callout; form fields still can. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
.gear { pointer-events: auto; display: grid; place-items: center; width: 32px; height: 32px; margin: -2px -4px -2px 4px; padding: 0; color: var(--paper); background: #454c4d; border: 2px solid #202323; font-size: 18px; line-height: 1; }
.gear:hover { background: #5a6264; }
.gear:active { transform: translate(1px, 1px); }
.settings { z-index: 25; }
.settings .slider { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 800; }
.settings output { font-variant-numeric: tabular-nums; color: #5d6552; }
.settings input[type="range"] { width: 100%; height: 32px; margin: 0 0 6px; accent-color: #6f9a3e; }
.settings .inbox-options { margin-top: 10px; }
.settings > small { color: #5d6552; }
.menu-links { display: flex; justify-content: space-between; gap: 12px; }
@media (max-width: 420px) { .brand-sign > small { display: none; } }
