@font-face {
  font-family: "Y29 Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-display: swap;
}

.intro-promo { border:3px double #a12d50; padding:10px; margin:14px 0; transform:rotate(-1deg); background:#f6d769; color:#78263f; }
.intro-promo strong { display:block; font-size:24px; letter-spacing:-1px; }
.intro-promo span,.intro-promo small { display:block; }
.intro-promo small { font-size:8px; }
.time-echo { color:#926079; border-left:2px solid #aa7585; padding-left:8px; }
.workout-list { gap:5px; }
.workout-list .choice { padding:7px 8px; margin:0; font-size:11px; }
.workout-list .choice b { line-height:1.3; }
.workout-list .choice span { font-size:9px; line-height:1.3; margin-top:3px; }
.workout-list .choice[aria-pressed="false"] span { display:none; }
.food-choices .choice { padding:7px; }
.food-choices .choice:disabled { opacity:.5; cursor:not-allowed; text-decoration:line-through; }
.food-bottle::before { left:6px; top:3px; width:11px; height:17px; border:2px solid #35536b; background:#9fb78a; }
.food-bottle::after { left:10px; top:9px; width:3px; height:5px; background:#473d35; box-shadow:-2px -1px #473d35,2px 2px #473d35,-2px 4px #473d35; }
.food-burger::before { left:3px; top:5px; width:20px; height:5px; background:#dfaa52; box-shadow:0 5px #79a05b,0 8px #74443d,0 12px #f0bc59; }
.food-burger::after { left:7px; top:5px; width:2px; height:2px; background:#ffedb2; box-shadow:7px 1px #ffedb2; }
.is-locked .chat-screen>.box { display:flex; flex-direction:column; }
.is-locked .lock-wallpaper { flex:1 0 215px; min-height:215px; }
.is-locked .lock-wallpaper canvas { width:100%; height:100%; max-height:none; object-fit:fill; }
.is-locked .lock-caption h1.phone-now { font-size:64px; line-height:1.05; letter-spacing:-5px; font-weight:400; margin:12px 0 0; }
.is-locked .lock-caption p { margin-top:6px; }
.lock-notices { flex:none; margin-top:auto; }
.is-locked .chat-system { color:#edf0d7; flex:none; margin:5px 0; }
@media(max-height:650px){.is-locked .lock-wallpaper { flex-basis:165px; min-height:165px; }.is-locked .lock-caption h1.phone-now{font-size:52px}.workout-list .choice{padding:5px 7px;font-size:10px}}

/* Group chat, notification lock screen and the unlit mirror. */
.phone-music { flex:none; padding:4px 12px; font-size:9px; color:#54644c; border-bottom:1px dotted #77896a; }
.chat-nav .choice { min-width:38px; font-size:18px; }
.chat-nav .choice::before { content:none; }
.chat-line { display:flex; align-items:flex-start; gap:8px; margin:12px 0; }
.chat-line > div { max-width:85%; min-width:0; }
.chat-line small { display:block; color:#627153; font-size:9px; }
.chat-line .chat-bubble { margin:3px 0 0; padding:8px 10px; box-shadow:2px 2px 0 #a4b292; }
.chat-line.from-self { flex-direction:row-reverse; }
.chat-line.from-self small { text-align:right; }
.chat-avatar { flex:none; width:32px; height:32px; image-rendering:pixelated; background:#b2c89b; border:1px solid var(--ink); }
.chat-replies { border-top:2px solid #8a9c79; margin-top:16px; padding-top:8px; }
.chat-replies .choice { font-size:10px; }
.is-locked { background:#6c795f; }
.is-locked .chat-screen > .box { background:#6c795f; padding:0 10px 10px; }
.is-locked .speaker { display:none; }
.lock-wallpaper { position:relative; margin:0 -10px 12px; }
.lock-wallpaper canvas { display:block; width:100%; max-height:300px; object-fit:cover; image-rendering:pixelated; }
.lock-caption { position:absolute; inset:10px 0 auto; color:#f4f1cf; text-shadow:2px 2px #253324; text-align:center; }
.lock-caption h1 { margin:0; font-size:36px; }
.lock-caption p { margin:0; font-size:9px; }
.lock-notices .message-entry { background:#edf1d9e8; border:2px solid #33402d; margin-bottom:7px; }
.ad-report, .payment-card { background:#f6f0d2; border:2px solid var(--ink); padding:14px; margin:12px 0; box-shadow:3px 3px #94a37e; }
.ad-report { border:4px double #982d50; }
.ad-report h2 { color:#ae3159; font-size:26px; line-height:1.2; }
.ad-stamp { background:#e7bf59; padding:7px; transform:rotate(-2deg); }
.ad-report h3 { background:#222339; color:#f5dc71; padding:8px; }
.ad-report small, .payment-card small { font-size:9px; }
.payment-card > strong { display:block; text-align:center; font-size:24px; margin:12px 0; }
.payment-card footer { border-top:1px dashed #879773; padding-top:8px; font-size:9px; }
.screen { position:relative; }
.payment-toast { position:absolute; z-index:4; top:10px; left:12px; right:12px; background:#e5edd7; color:#243323; border:2px solid #263227; padding:8px 12px; font-size:10px; pointer-events:none; animation:payment-arrival .25s steps(3); }
@keyframes payment-arrival { from { transform:translateY(-12px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.handheld.mirror-mode { grid-template-rows:minmax(0,1fr); background:#020303; }
.mirror-mode > .topbar, .mirror-mode > .bottombar { display:none; }
.mirror-mode .game { padding:12px; background:#020303; }
.mirror-screen { height:100%; min-height:0; color:#bfc4bd; background:#020303; border:3px double #353c39; overflow:auto; }
.mirror-glass { min-height:100%; display:flex; flex-direction:column; padding:22px 18px; }
.mirror-label { color:#515a56; font-size:8px; letter-spacing:.14em; }
.mirror-thoughts { flex:1; display:flex; flex-direction:column; justify-content:center; gap:30px; padding:48px 0; }
.mirror-thoughts p { max-width:25em; font-size:13px; line-height:2; margin:0; }
.mirror-screen .choice { background:#080b0a; color:#7d8982; border:1px solid #343e38; box-shadow:none; }
.mirror-screen .dialogue-actions .choice { background:#080b0a; color:#7d8982; }
.mirror-screen .credits { color:#57645c; font-size:9px; margin:12px 0; }
@media (prefers-reduced-motion:reduce) { .payment-toast { animation:none; } }

/* Phone scenes replace the entire game viewport; other scenes stay untouched. */
.handheld.phone-mode { grid-template-rows: minmax(0,1fr); }
.phone-mode > .topbar, .phone-mode > .bottombar { display:none; }
.phone-mode .game { padding:5px; }
.pixel-handset { height:100%; min-height:0; display:flex; flex-direction:column; background:var(--screen); color:var(--ink); border:3px solid var(--ink); box-shadow:inset 0 0 0 2px #859376; }
.phone-status { display:flex; justify-content:space-between; padding:8px 13px 5px; font-size:10px; border-bottom:2px solid #202339; }
.chat-nav { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border-bottom:3px solid var(--ink); background:#b9cda6; min-height:44px; }
.chat-nav .choice { width:auto; margin:0; padding:4px 8px; font-size:10px; box-shadow:none; }
.chat-nav strong { font-size:14px; }
.chat-screen { flex:1; min-height:0; display:flex; overflow:hidden; }
.chat-screen > .box { width:100%; height:100%; border:0; box-shadow:none; background:var(--screen); padding:12px; }
.chat-screen .speaker { font-size:10px; color:#53614b; border:0; }
.chat-screen .contact-list { gap:0; background:#eff2dc; }
.chat-screen .contact { min-height:66px; border:0; border-bottom:2px solid #a5b296; padding:9px 6px; background:transparent; grid-template-columns:38px 1fr 24px; }
.chat-screen .contact[aria-pressed="true"] { background:#a5d2b4; }
.chat-screen .contact small { display:block; font-size:10px; }
.chat-bubble, .chat-screen .promo, .chat-screen .monologue p { margin:10px 20px 14px 0; padding:10px 12px; background:#f7f2d6; border:2px solid var(--ink); box-shadow:3px 3px 0 #9ead90; position:relative; }
.chat-bubble:before { content:""; position:absolute; left:-6px; top:12px; width:6px; height:6px; background:var(--ink); }
.chat-bubble.outgoing { margin-left:28px; margin-right:0; background:#a7d8b0; }
.chat-bubble p { margin:5px 0; }
.chat-system { text-align:center; color:#59604f; font-size:10px; padding:6px 0; }
.chat-screen .pixel-phone-list { display:grid; gap:9px; }
.is-locked .phone-status { background:#6c795f; border:0; color:#edf0d7; }
.is-locked .phone-bottom,.is-locked .phone-home { background:#6c795f; border:0; color:#edf0d7; }
.is-locked .lock-caption>span { display:none; }
.workout-list .choice { position:relative; padding-left:23px; }
.workout-list .choice::before { position:absolute; left:7px; top:8px; }
.chat-screen .inbox-item { box-shadow:none; }
.phone-bottom { display:flex; justify-content:space-between; gap:8px; padding:9px; font-size:9px; border-top:2px solid var(--ink); }
.phone-bottom button { border:0; background:transparent; color:var(--ink); }
.phone-home { text-align:center; padding:0 0 6px; line-height:1; }

@font-face {
  font-family: "Y29 Fusion Pixel";
  src: url("../assets/fonts/FusionPixel12px-Mono-SC.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --shell: #383553;
  --screen: #d8e9c4;
  --ink: #202339;
  --night: #181628;
  --paper: #f8f0c8;
  --pink: #e56b88;
  --cyan: #65c3bd;
  --yellow: #f3ca67;
  --green: #75a765;
  font: 12px/1.55 "Y29 Plex Mono", "Y29 Fusion Pixel", "Courier New", monospace;
}

* { box-sizing: border-box; }

html,
body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  background: radial-gradient(circle at 50% 10%, #45405f 0, #201d33 42%, #11101c 100%);
  color: var(--paper);
}

button,
input { font: inherit; }
button { color: inherit; cursor: pointer; }
button,
input { border-radius: 0; }
button:focus-visible,
input:focus-visible,
a:focus-visible,
[role="listbox"]:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.handheld {
  width: min(430px, 100%);
  height: 100dvh;
  min-height: 0;
  margin: auto;
  overflow: hidden;
  background: var(--shell);
  border-inline: 3px solid #151424;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) 38px;
  box-shadow: 0 0 0 4px #575273, 0 20px 80px #0009;
}

.topbar,
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--night);
  color: #aaa6c1;
  font-size: 9px;
  letter-spacing: .06em;
}
.topbar a { color: var(--paper); }
.topbar span:nth-child(2) { color: var(--cyan); }
.bottombar { border-top: 2px solid #171526; }
.bottombar button { border: 0; background: transparent; padding: 5px; color: #aaa6c1; font-size: 9px; }
.bottombar button:hover { color: var(--paper); }

.game {
  min-height: 0;
  height: 100%;
  padding: 7px;
  overflow: hidden;
  background:
    linear-gradient(90deg, #ffffff06 1px, transparent 1px),
    linear-gradient(#ffffff04 1px, transparent 1px);
  background-size: 8px 8px;
}

.screen {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
}

.stage-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 5px;
  overflow: hidden;
  background: #141625;
  border: 2px solid #77728e;
  box-shadow: inset 0 0 0 3px #24243b;
}

.stage {
  display: block;
  width: 100%;
  height: clamp(132px, 25dvh, 190px);
  object-fit: cover;
  object-position: 50% 54%;
  background: var(--screen);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.stage-label,
.stage-place {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 2px 5px;
  background: #1d2033cc;
  font-size: 8px;
  letter-spacing: .08em;
}
.stage-label { left: 11px; color: #e9e5c7; }
.stage-place { right: 11px; color: var(--cyan); }
.scanlines {
  pointer-events: none;
  position: absolute;
  z-index: 1;
  inset: 5px;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #24243b12 3px 4px);
  mix-blend-mode: multiply;
}

.sport-watch {
  position: absolute;
  z-index: 3;
  right: 13px;
  bottom: 19px;
  width: 82px;
  padding: 5px 4px 6px;
  overflow: visible;
  color: #d8e9c4;
  background: #111823e8;
  border: 3px solid #202339;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px #586462, 2px 2px 0 #11121c99;
  font-variant-numeric: tabular-nums;
}
.sport-watch::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 17px;
  width: 3px;
  height: 13px;
  background: #596164;
  border: 1px solid #202339;
}
.watch-strap {
  position: absolute;
  z-index: -1;
  left: 20px;
  width: 36px;
  height: 16px;
  background:
    repeating-linear-gradient(90deg, #35394a 0 5px, #424859 5px 9px),
    #35394a;
  border: 2px solid #202339;
  box-shadow: inset 0 0 0 2px #596164;
}
.watch-strap-top { top: -15px; }
.watch-strap-bottom { bottom: -15px; }
.watch-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2px;
  padding-bottom: 3px;
  border-bottom: 1px solid #65706f;
  color: var(--paper);
  font-size: 8px;
  line-height: 1;
}
.watch-date { justify-self: center; color: var(--paper); font-size: 7px; font-weight: 400; }
.watch-time { justify-self: start; color: var(--cyan); font-size: 7px; font-weight: 400; letter-spacing: 0; }
.watch-status { justify-self: end; display: flex; align-items: center; gap: 1px; }
.watch-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  width: 8px;
  height: 8px;
}
.watch-signal i { display: block; width: 2px; background: #9db3a0; }
.watch-signal i:nth-child(1) { height: 3px; }
.watch-signal i:nth-child(2) { height: 5px; }
.watch-signal i:nth-child(3) { height: 7px; }
.watch-help {
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid #95aa96;
  background: #202939;
  color: var(--paper);
  font: 7px/1 "Y29 Plex Mono", monospace;
  cursor: help;
}
.watch-help:hover,
.watch-help:focus-visible,
.watch-help[aria-expanded="true"] { color: var(--night); background: var(--cyan); }
.watch-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 3px;
  padding-top: 4px;
}
.watch-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px;
  color: #95aa96;
  font-size: 7px;
  line-height: 1.25;
}
.watch-metric strong { color: #f3ca67; font-size: 9px; font-weight: 400; }
.watch-legend {
  position: absolute;
  right: calc(100% + 7px);
  bottom: 0;
  width: 108px;
  padding: 5px;
  background: #111823f2;
  border: 2px solid #596164;
  box-shadow: 2px 2px 0 #11121c99;
  color: #c7d7ba;
  font-size: 7px;
  line-height: 1.45;
}
.watch-legend span { display: block; white-space: nowrap; }
.watch-legend small { display: block; margin-top: 3px; color: #95aa96; white-space: normal; }
.watch-legend b { color: var(--yellow); font-weight: 400; }
.sport-watch.is-updating .watch-metric strong { animation: watch-jump .72s steps(2, end) 2; }
.sport-watch.is-updating .watch-metric:nth-child(2) strong { animation-delay: .08s; }
.sport-watch.is-updating .watch-metric:nth-child(3) strong { animation-delay: .16s; }
.sport-watch.is-updating .watch-metric:nth-child(4) strong { animation-delay: .24s; color: var(--pink); }

.box {
  min-height: 0;
  align-self: stretch;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  color: var(--ink);
  border: 4px double var(--ink);
  box-shadow: 4px 4px 0 #171525;
  padding: 9px;
}
.speaker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -3px 0 6px;
  color: #8d3653;
  font-size: 10px;
}
.speaker::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--pink);
  box-shadow: 6px 0 0 var(--pink), 0 6px 0 var(--pink);
}
.box h1 { font: 400 24px/1.2 "Y29 Fusion Pixel", sans-serif; margin: 0 0 8px; }
.box p { margin: 4px 0; }
.box .lead { min-height: 1.75em; font-size: 14px; line-height: 1.65; }
.box small { display: block; color: #5d6174; font-size: 9px; }

.dialogue-actions {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}
.dialogue-actions.is-ready {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .16s ease, transform .16s ease;
}
.choices { display: grid; gap: 5px; margin-top: 7px; }
.choice {
  width: 100%;
  min-height: 35px;
  padding: 6px 8px;
  text-align: left;
  border: 2px solid var(--ink);
  background: #fff8dc;
  color: var(--ink);
  box-shadow: 2px 2px 0 #777083;
}
.choice::before { content: "▶"; margin-right: 7px; color: #9b3151; }
.choice:not(:disabled):hover,
.choice:not(:disabled):focus-visible,
.choice[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.choice[aria-pressed="true"]::before { content: "◆"; }
.choice small { margin-left: 18px; color: inherit; opacity: .72; }
.choice.compact { min-height: 32px; padding: 5px 7px; }
.choice:disabled { cursor: not-allowed; }
.confirm-choice { margin-top: 6px; text-align: center; }
.confirm-choice::before { content: "✓"; }
.confirm-choice:disabled,
.confirm-choice:disabled:hover {
  color: #77766e;
  background: #c9c3ad;
  border-color: #85847b;
  border-style: dashed;
  box-shadow: none;
  opacity: .72;
}
.confirm-choice:not(:disabled) { background: var(--ink); color: var(--paper); }
.next { margin-top: 8px; text-align: right; }
.next .choice { background: var(--ink); color: var(--paper); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.field { display: grid; gap: 2px; min-width: 0; font-size: 9px; color: #5b6073; }
.field:first-child { grid-column: 1 / -1; }
.field input { width: 100%; height: 33px; border: 2px solid var(--ink); background: #fffbed; color: var(--ink); padding: 5px 7px; }
.native-wheel-value {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.number-wheel {
  --wheel-row: 22px;
  position: relative;
  height: 66px;
  padding: 22px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  touch-action: pan-y;
  background: linear-gradient(#ded9c3 0 22px, #fffbed 22px 44px, #ded9c3 44px);
  border: 2px solid var(--ink);
  color: #777b89;
}
.number-wheel::-webkit-scrollbar { display: none; }
.number-wheel-item {
  height: var(--wheel-row);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 10px;
}
.number-wheel-item[aria-selected="true"] { color: var(--ink); font-size: 14px; }
.privacy { margin-top: 6px !important; padding-top: 5px; border-top: 1px dashed #8f8b7a; font-size: 9px; color: #555a6c; }

.points { display: grid; gap: 5px; margin-top: 8px; }
.point-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; border-bottom: 1px dashed #a09a83; padding: 4px 0; }
.point-controls { display: flex; align-items: center; gap: 4px; }
.point-controls button { width: 28px; height: 28px; border: 2px solid var(--ink); background: #fffbed; color: var(--ink); }
.point-controls output { min-width: 48px; text-align: center; }
.point-note { color: #8d3653; font-size: 9px; }

.fixed-panel { display: flex; flex-direction: column; overflow: hidden; }
.fixed-panel > .speaker,
.fixed-panel > p,
.panel-foot,
.panel-action { flex: 0 0 auto; }
.scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.panel-action { margin-top: 6px; }
.panel-foot { margin-top: 5px; }
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding-bottom: 4px; }
.look-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; border: 1px dashed #858072; padding: 4px 5px; font-size: 9px; }
.look-row button { width: 28px; height: 28px; border: 1px solid var(--ink); background: #fffbed; color: var(--ink); }
.look-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; flex: 1; }
.contact-list { display: grid; gap: 6px; padding-bottom: 5px; }
.contact { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 7px; width: 100%; padding: 5px; border: 2px solid var(--ink); background: #fffbed; color: var(--ink); text-align: left; }
.contact:hover,
.contact[aria-pressed="true"] { background: var(--cyan); }
.mini-sprite { width: 32px; height: 32px; image-rendering: pixelated; background: #b6cf9c; border: 1px solid var(--ink); }
.contact b { display: block; font-weight: 400; }
.contact small { font-size: 8px; }
.contact .tick { font-size: 16px; }
.phone-note { font-size: 9px; color: #555a6c; }
.companion-note { margin: 5px 0 !important; padding: 5px 7px; border-left: 3px solid var(--cyan); color: #555a6c; font-size: 9px; }
.custom-friend { margin-top: 8px; padding: 7px; border: 1px dashed #767263; }
.custom-friend .field:first-child { grid-column: auto; }
.custom-friend .form-grid { grid-template-columns: 1fr 1fr; }
.custom-focus { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 5px; }
.custom-focus button { min-height: 30px; border: 1px solid var(--ink); background: #fffbed; color: var(--ink); font-size: 8px; }
.custom-focus button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.workout-list .choice b { display: block; font-weight: 400; }
.workout-list .choice span { display: block; margin-left: 18px; font-size: 9px; opacity: .78; }
.watch-copy { min-height: 1.65em; font-size: 13px; line-height: 1.65; }
.day-end { border-left: 5px solid var(--pink); padding-left: 9px; }
.credits { font-size: 9px; color: #5d6174; margin-top: 8px; }
.party-line { font-size: 10px; color: #5d6174; margin-top: 6px; }
.party-line strong { color: #8d3653; font-weight: 400; }

@keyframes watch-jump {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: .2; transform: translateY(-1px); }
}

@media (max-width: 390px) {
  .game { padding: 5px; }
  .screen { gap: 5px; }
  .stage-shell { padding: 4px; }
  .stage { height: clamp(124px, 24dvh, 174px); }
  .scanlines { inset: 4px; }
  .stage-label,
  .stage-place { top: 9px; }
  .stage-label { left: 10px; }
  .stage-place { right: 10px; }
  .sport-watch { right: 10px; bottom: 18px; width: 80px; }
  .watch-strap { left: 19px; width: 35px; }
  .watch-legend { width: 104px; }
  .box { padding: 7px; }
  .box h1 { font-size: 21px; }
  .look-grid { grid-template-columns: 1fr; }
  .form-grid { gap: 5px; }
}

@media (max-height: 700px) {
  .handheld { grid-template-rows: 32px minmax(0, 1fr) 32px; }
  .topbar,
  .bottombar { height: 32px; }
  .stage { height: clamp(114px, 22dvh, 150px); }
  .box .lead { font-size: 12px; }
  .choice { min-height: 31px; padding: 5px 7px; }
  .number-wheel {
    height: 58px;
    padding: 18px 0;
    background: linear-gradient(#ded9c3 0 18px, #fffbed 18px 40px, #ded9c3 40px);
  }
  .look-row { padding: 2px 4px; }
  .look-row button { height: 25px; }
  .privacy { margin-top: 4px !important; padding-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .scanlines { display: none; }
  .dialogue-actions { opacity: 1; transform: none; transition: none; }
  .sport-watch.is-updating .watch-metric strong { animation: none; }
  .scene-phone,
  .food-mystery::before { animation: none; }
}

.store-choices .choice { min-height: 50px; }
.store-choices .choice b,
.store-choices .choice span { display: block; }
.store-choices .choice span { margin: 3px 0 0 18px; font-size: 8px; opacity: .76; }
.food-choices .choice { min-height: 54px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; }
.food-choices .choice::before { display: none; }
.food-choices .choice b,
.food-choices .choice span { display: block; }
.food-choices .food-copy small { display: block; margin-top: 3px; font-size: 8px; opacity: .78; }
.food-pixel { position: relative; width: 24px; height: 24px; border: 2px solid var(--ink); background: #fff8dc; image-rendering: pixelated; }
.food-pixel::before,
.food-pixel::after { content: ""; position: absolute; image-rendering: pixelated; }
.food-rice::before,.food-bowl::before,.food-curry::before,.food-noodle::before,.food-soup::before { left: 3px; top: 9px; width: 14px; height: 8px; background: var(--paper); border: 2px solid #8d3653; box-shadow: inset 0 3px var(--yellow); }
.food-noodle::after,.food-soup::after { left: 6px; top: 4px; width: 2px; height: 6px; background: #8d3653; box-shadow: 5px 0 #8d3653, 10px 0 #8d3653; }
.food-egg::before { left: 3px; top: 6px; width: 15px; height: 12px; background: var(--paper); box-shadow: 4px 2px 0 var(--yellow),5px 3px 0 var(--yellow),6px 3px 0 var(--yellow); }
.food-dumpling::before,.food-bagel::before { left: 4px; top: 5px; width: 13px; height: 13px; border: 3px solid var(--yellow); background: transparent; }
.food-bagel::before { border-radius: 50%; }
.food-tofu::before,.food-bento::before { left: 4px; top: 4px; width: 13px; height: 13px; background: var(--paper); border: 2px solid #8d3653; box-shadow: inset 6px 0 var(--green), inset 0 6px var(--yellow); }
.food-leg::before { left: 5px; top: 5px; width: 10px; height: 9px; background: #b96d55; box-shadow: 8px 7px 0 -2px var(--paper); }
.food-fish::before { left: 3px; top: 7px; width: 13px; height: 8px; background: var(--cyan); }
.food-fish::after { right: 2px; top: 7px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-right: 6px solid #8d3653; }
.food-sandwich::before,.food-riceball::before,.food-bread::before { left: 4px; top: 5px; width: 13px; height: 13px; background: var(--yellow); clip-path: polygon(0 100%,50% 0,100% 100%); }
.food-sandwich::after { left: 5px; top: 13px; width: 11px; height: 3px; background: var(--pink); }
.food-riceball::before { background: var(--paper); }
.food-riceball::after { left: 8px; top: 13px; width: 6px; height: 6px; background: #273b35; }
.food-bread::before { border-radius: 6px 6px 2px 2px; clip-path: none; background: var(--yellow); }
.food-drink::before,.food-coffee::before,.food-mystery::before { left: 7px; top: 4px; width: 8px; height: 15px; background: var(--cyan); border: 2px solid #35536b; }
.food-coffee::before { background: #6f493f; }
.food-mystery::before { background: var(--pink); animation: food-blink .8s steps(2,end) infinite; }
.pixel-phone-list { display: grid; gap: 6px; margin: 6px 0; }
.message-entry { display: grid; grid-template-columns: 30px 1fr auto; gap: 7px; align-items: center; width: 100%; min-height: 49px; padding: 6px; border: 2px solid var(--ink); background: #fff8dc; color: var(--ink); text-align: left; box-shadow: 2px 2px 0 #777083; }
.message-entry:hover,.message-entry:focus-visible { background: var(--cyan); }
.message-entry.is-read { opacity: .72; }
.message-entry b,.message-entry small { display: block; }
.message-entry small { margin-top: 2px; font-size: 8px; }
.message-entry i { color: #8d3653; font-size: 7px; font-style: normal; }
.message-icon { display: grid; place-items: center; width: 27px; height: 27px; background: var(--ink); color: var(--paper); font-size: 9px; }
.friend-bubble { margin: 7px 0; padding: 7px; border: 1px dashed var(--ink); background: #fff8dc; }
.friend-bubble b { color: #8d3653; font-weight: 400; }
.friend-bubble p { margin: 3px 0; }
@keyframes food-blink { 50% { background: var(--green); } }
.scene-phone { animation: phone-buzz .42s steps(2,end) 2; }
@keyframes phone-buzz { 50% { transform: translateX(2px); } }
.notification { padding: 6px; border: 1px dashed var(--ink); background: #fff8dc; }
.promo { padding-top: 7px; border-top: 1px dashed #858072; color: #8d3653; }
.money { font-size: 20px; color: #8d3653; }
.result-bars { display: grid; gap: 7px; margin: 8px 0; }
.result-row { display: grid; grid-template-columns: 56px 1fr 34px; align-items: center; gap: 6px; font-size: 9px; }
.result-row > i { display: block; height: 8px; border: 1px solid var(--ink); background: #fff; }
.result-row > i > b { display: block; height: 100%; background: var(--cyan); }
.result-row > strong { font-size: 8px; font-weight: 400; text-align: right; }
.monologue p { margin: 11px 0; padding-left: 10px; border-left: 2px solid var(--cyan); }
