@font-face { font-family: "Pixelify Sans"; src: url(fonts/pixelify-sans-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "DotGothic16"; src: url(fonts/dotgothic16-latin.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Valley Letter"; src: url(fonts/cormorant-garamond-italic-latin.woff2) format("woff2"); font-style: italic; font-display: swap; }

:root {
  --ink: #3a2833; --ink-soft: #6b5560;
  --cream: #fff4dc; --cream-2: #f6e7c4; --cream-3: #e2c795;
  --wood: #b67a42; --wood-d: #8a5530;
  --pink: #ffb2cb; --pink-d: #ef88aa; --red: #e2574c;
  --green: #86ca58; --green-d: #5fa845; --green-l: #b5e68a;
  --blue: #5b8fe0; --gold: #ffd35a;
  /* One art pixel of the UI frames. */
  --u: 3px;
  --safe-top: max(10px, env(safe-area-inset-top));
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
  --safe-left: max(10px, env(safe-area-inset-left));
  --safe-right: max(10px, env(safe-area-inset-right));
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  /* Body text: the clearest pixel face for dates, times and names. */
  --read: "DotGothic16", "Pixelify Sans", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #2b3a2a; color: var(--ink); overflow: hidden; overscroll-behavior: none; }
body { font: 400 16px/1.45 var(--read); -webkit-font-smoothing: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; image-rendering: pixelated; cursor: pointer; }

/* The wooden frame of every box: a 12-unit nine-slice, scaled by whole pixels. */
.frame {
  border: calc(var(--u) * 4) solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%233a2833' d='M2 0h8v1H2zM2 11h8v1H2zM0 2h1v8H0zM11 2h1v8h-1zM1 1h1v1H1zM10 1h1v1h-1zM1 10h1v1H1zM10 10h1v1h-1z'/%3E%3Cpath fill='%23b67a42' d='M2 1h8v1H2zM2 10h8v1H2zM1 2h1v8H1zM10 2h1v8h-1z'/%3E%3Cpath fill='%23e2c795' d='M2 9h8v1H2zM9 2h1v8H9z'/%3E%3Cpath fill='%23fffaf0' d='M2 2h8v1H2zM2 2h1v8H2z'/%3E%3Crect x='3' y='3' width='6' height='6' fill='%23fff4dc'/%3E%3C/svg%3E") 4 fill / calc(var(--u) * 4) stretch;
  background: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  font: 600 17px/1 var(--pixel); color: var(--ink); text-decoration: none; cursor: pointer; background: var(--cream);
  border: var(--u) solid var(--ink); border-radius: 0;
  box-shadow: inset calc(var(--u) * -1) calc(var(--u) * -1) 0 var(--cream-3), inset var(--u) var(--u) 0 #fffaf0, 0 var(--u) 0 var(--ink);
  transition: transform .06s;
}
.btn:active { transform: translateY(var(--u)); box-shadow: inset calc(var(--u) * -1) calc(var(--u) * -1) 0 var(--cream-3), inset var(--u) var(--u) 0 #fffaf0; }
.btn:focus-visible, .icon-btn:focus-visible, .link-btn:focus-visible, .choice:focus-visible { outline: var(--u) solid var(--blue); outline-offset: 3px; }
.btn.primary { background: var(--green); color: #1f3a1a; box-shadow: inset calc(var(--u) * -1) calc(var(--u) * -1) 0 var(--green-d), inset var(--u) var(--u) 0 var(--green-l), 0 var(--u) 0 var(--ink); }
.btn.primary:active { box-shadow: inset calc(var(--u) * -1) calc(var(--u) * -1) 0 var(--green-d), inset var(--u) var(--u) 0 var(--green-l); }
.btn.pink { background: var(--pink); box-shadow: inset calc(var(--u) * -1) calc(var(--u) * -1) 0 var(--pink-d), inset var(--u) var(--u) 0 #ffe3ec, 0 var(--u) 0 var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.tri { display: inline-block; width: 11px; height: 14px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; font: 700 20px/1 var(--pixel); cursor: pointer; background: var(--cream); border: var(--u) solid var(--ink); box-shadow: inset calc(var(--u) * -1) calc(var(--u) * -1) 0 var(--cream-3), 0 var(--u) 0 var(--ink); }
.icon-btn[aria-pressed="true"] { background: var(--cream-3); color: var(--ink-soft); }
.link-btn { background: none; border: 0; padding: 12px; min-height: 44px; font: 600 15px/1.2 var(--pixel); color: var(--cream); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* HUD */
.hud { position: fixed; z-index: 20; top: var(--safe-top); left: var(--safe-left); right: var(--safe-right); display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-date { --u: 2px; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; padding: 2px 6px; font-size: 15px; line-height: 1.2; }
.hud-sun { grid-row: span 2; width: 18px; height: 18px; background: var(--gold); box-shadow: 0 0 0 2px #e0a53a, 3px 3px 0 2px var(--ink); clip-path: polygon(30% 0, 70% 0, 70% 30%, 100% 30%, 100% 70%, 70% 70%, 70% 100%, 30% 100%, 30% 70%, 0 70%, 0 30%, 30% 30%); }
.evening .hud-sun { background: #ffe9a8; box-shadow: none; clip-path: circle(45%); }
.hud-day { font-weight: 600; }
.hud-count { color: var(--red); font-weight: 700; }
.hud-hearts { grid-column: 1 / -1; display: flex; gap: 3px; margin-top: 3px; }
.hud-hearts i { width: 11px; height: 10px; background: #d9c4b0; clip-path: polygon(0 20%, 20% 0, 40% 0, 50% 20%, 60% 0, 80% 0, 100% 20%, 100% 50%, 50% 100%, 0 50%); }
.hud-hearts i.on { background: var(--red); }
.hud-hearts i.pop { animation: heart-pop .5s steps(4); }
@keyframes heart-pop { 50% { transform: scale(1.6); } }
.hud-buttons { display: flex; gap: 8px; }
/* The gallery's "← Collection" pill sits top-left; the HUD steps below it. */
.collection-return:not([hidden]) ~ #valley .hud-date { margin-top: 56px; }

.area-name { position: fixed; z-index: 15; top: calc(var(--safe-top) + 64px); left: 50%; transform: translate(-50%, -12px); margin: 0; padding: 6px 16px; font: 700 18px/1.2 var(--pixel); color: var(--cream); background: var(--wood-d); border: var(--u) solid var(--ink); box-shadow: 0 var(--u) 0 var(--ink); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s steps(3), transform .3s steps(3); }
.area-name.show { opacity: 1; transform: translate(-50%, 0); }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--safe-bottom) + 150px); transform: translate(-50%, 12px); margin: 0; max-width: calc(100% - 32px); padding: 8px 14px; font: 400 15px/1.3 var(--read); text-align: center; color: var(--ink); background: var(--gold); border: var(--u) solid var(--ink); box-shadow: 0 var(--u) 0 var(--ink); opacity: 0; pointer-events: none; transition: opacity .25s steps(3), transform .25s steps(3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Touch controls */
.controls { position: fixed; z-index: 20; left: var(--safe-left); right: var(--safe-right); bottom: var(--safe-bottom); display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.dpad { position: relative; width: 138px; height: 138px; pointer-events: auto; touch-action: none; opacity: .92; }
.dpad span, .dpad i { position: absolute; width: 46px; height: 46px; background: #4a3a44; border: var(--u) solid var(--ink); }
.dpad i { left: 46px; top: 46px; border: 0; background: #4a3a44; }
.dpad-up { left: 46px; top: 0; border-bottom: 0 !important; }
.dpad-down { left: 46px; bottom: 0; border-top: 0 !important; }
.dpad-left { left: 0; top: 46px; border-right: 0 !important; }
.dpad-right { right: 0; top: 46px; border-left: 0 !important; }
.dpad span::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border: 7px solid transparent; }
.dpad-up::after { border-bottom-color: #d8c8d0 !important; top: -6px !important; }
.dpad-down::after { border-top-color: #d8c8d0 !important; bottom: -6px !important; }
.dpad-left::after { border-right-color: #d8c8d0 !important; left: -6px !important; }
.dpad-right::after { border-left-color: #d8c8d0 !important; right: -6px !important; }
.dpad span.on { background: #6a5664; }
.a-btn { position: relative; width: 76px; height: 76px; margin: 0 6px 16px 0; border-radius: 50%; pointer-events: auto; touch-action: manipulation; cursor: pointer; background: var(--red); border: var(--u) solid var(--ink); box-shadow: inset -5px -6px 0 #b8403d, inset 4px 4px 0 #f28a74, 0 4px 0 var(--ink); }
.a-btn b { font: 700 26px/1 var(--pixel); color: var(--cream); }
.a-btn:active { transform: translateY(3px); box-shadow: inset -5px -6px 0 #b8403d, inset 4px 4px 0 #f28a74; }
.a-label { position: absolute; bottom: calc(100% + 8px); right: 0; padding: 4px 8px; font: 600 14px/1.1 var(--pixel); white-space: nowrap; color: var(--ink); background: var(--cream); border: var(--u) solid var(--ink); }
.a-label:empty { display: none; }
.a-btn.ready { animation: a-pulse 1.2s steps(2) infinite; }
@keyframes a-pulse { 50% { box-shadow: inset -5px -6px 0 #b8403d, inset 4px 4px 0 #f28a74, 0 4px 0 var(--ink), 0 0 0 5px rgba(255, 211, 90, .75); } }
.key-hint { position: fixed; z-index: 10; left: 50%; bottom: var(--safe-bottom); transform: translateX(-50%); margin: 0; padding: 6px 12px; font-size: 14px; color: var(--cream); background: rgba(40, 30, 38, .72); white-space: nowrap; pointer-events: none; }

/* Dialogue */
.dialogue { --u: 3px; position: fixed; z-index: 40; left: 50%; bottom: var(--safe-bottom); transform: translateX(-50%); width: min(640px, calc(100% - var(--safe-left) - var(--safe-right))); min-height: 132px; padding: 6px 10px 12px 96px; cursor: pointer; touch-action: manipulation; }
.dialogue.no-face { padding-left: 10px; }
.dialogue-face { position: absolute; left: 4px; top: 6px; width: 80px; height: 80px; image-rendering: pixelated; background: var(--cream-2); outline: var(--u) solid var(--ink); }
.dialogue.no-face .dialogue-face { display: none; }
.dialogue-name { position: absolute; top: -34px; left: -4px; margin: 0; padding: 4px 12px; font: 700 16px/1.1 var(--pixel); color: var(--cream); background: var(--wood-d); border: var(--u) solid var(--ink); }
.dialogue-name:empty { display: none; }
.dialogue-text { margin: 0; min-height: 3.9em; font-size: 18px; line-height: 1.35; white-space: pre-line; }
.dialogue-next { position: absolute; right: 4px; bottom: -2px; width: 14px; height: 9px; background: var(--red); clip-path: polygon(0 0, 100% 0, 50% 100%); animation: bob .7s steps(2) infinite; }
.dialogue.typing .dialogue-next, .dialogue.choosing .dialogue-next { visibility: hidden; }
@keyframes bob { 50% { transform: translateY(3px); } }
.dialogue-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dialogue-choices:empty { display: none; }
.choice { flex: 1 1 auto; min-height: 44px; padding: 8px 12px; font: 600 16px/1.1 var(--pixel); text-align: left; cursor: pointer; background: var(--cream-2); border: var(--u) solid var(--ink); }
.choice::before { content: ""; display: inline-block; width: 8px; height: 12px; margin-right: 8px; background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%); visibility: hidden; }
.choice:hover::before, .choice:focus-visible::before { visibility: visible; }

/* Title and character select */
.title-screen { position: fixed; z-index: 50; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(var(--safe-top) + 40px) 16px var(--safe-bottom); text-align: center; background: linear-gradient(180deg, rgba(255, 196, 150, .55), rgba(255, 230, 190, .12) 45%, rgba(43, 58, 42, .55)); }
.title-kicker { margin: 0; padding: 2px 10px; font: 600 14px/1.2 var(--pixel); color: var(--ink); letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 244, 220, .82); }
.title-couple { margin: 0; font: 700 clamp(40px, 13vw, 92px)/1 var(--pixel); color: var(--cream); letter-spacing: .02em;
  text-shadow: 4px 0 var(--ink), -4px 0 var(--ink), 0 4px var(--ink), 0 -4px var(--ink), 4px 4px var(--ink), -4px 4px var(--ink), 4px -4px var(--ink), -4px -4px var(--ink), 0 9px 0 var(--red), 4px 9px 0 var(--ink), -4px 9px 0 var(--ink), 0 12px 0 var(--ink); }
.title-ribbon { margin: 6px 0 0; }
.title-ribbon span { display: inline-block; padding: 6px 18px; font: 700 18px/1.2 var(--pixel); color: var(--ink); background: var(--pink); border: var(--u) solid var(--ink); box-shadow: 0 var(--u) 0 var(--ink); }
.title-guest { --u: 2px; display: flex; flex-direction: column; gap: 2px; margin: 18px 0 4px; padding: 2px 16px; min-width: 220px; }
.title-guest small { font-size: 13px; color: var(--ink-soft); }
.title-guest strong { font-size: 20px; }
.title-guest.empty { display: none; }
.title-start { min-width: 200px; font-size: 22px; animation: blink 1.1s steps(1) infinite; }
.title-start:focus, .title-start:hover { animation: none; }
@keyframes blink { 60% { color: #3f6a2c; } }
.title-skip { color: var(--cream); text-shadow: 2px 2px 0 var(--ink); }
.title-screen.leaving { opacity: 0; transition: opacity .5s steps(5); pointer-events: none; }

.choose { position: fixed; z-index: 50; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 24px)); padding: 6px 10px 14px; text-align: center; }
.choose h2 { margin: 4px 0 10px; font-size: 22px; }
.choose-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.look { position: relative; display: grid; place-items: center; padding: 8px 0 6px; min-height: 104px; cursor: pointer; background: var(--cream-2); border: var(--u) solid var(--ink); }
.look canvas { width: 60px; height: 72px; image-rendering: pixelated; }
.look[aria-checked="true"] { background: #fff; box-shadow: 0 0 0 var(--u) var(--gold), 0 0 0 calc(var(--u) * 2) var(--ink); }
.look[aria-checked="true"]::before { content: ""; position: absolute; left: 6px; top: calc(50% - 7px); width: 10px; height: 14px; background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%); animation: nudge .6s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.choose-name { margin: 12px 0; font-size: 15px; color: var(--ink-soft); }
.choose-name strong { color: var(--ink); }
.choose-go { width: 100%; }

.fade { position: fixed; z-index: 45; inset: 0; background: #1d1620; opacity: 0; pointer-events: none; transition: opacity .45s steps(6); }
.fade.on { opacity: 1; pointer-events: auto; }

/* Panels */
.panel { width: min(480px, calc(100% - 20px)); max-height: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; background: none; overflow: visible; color: var(--ink); }
.panel::backdrop { background: rgba(29, 22, 32, .6); }
.panel-card { --u: 3px; display: flex; flex-direction: column; max-height: calc(100dvh - 24px); margin: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0 8px; border-bottom: var(--u) dashed var(--cream-3); }
.panel-head h2 { margin: 0; font: 700 22px/1.15 var(--pixel); }
.panel-close { flex: none; width: 44px; height: 44px; font-size: 18px; }
.panel-body { overflow-y: auto; overscroll-behavior: contain; padding: 12px 2px 4px; -webkit-overflow-scrolling: touch; }
.panel-body > :first-child { margin-top: 0; }
.panel-body h3 { margin: 14px 0 6px; font: 700 18px/1.2 var(--pixel); }
.event-card h3, .person h3 { font-family: var(--pixel); font-weight: 700; }
.panel-body p { margin: 0 0 10px; }
.lead { font-size: 16px; color: var(--ink-soft); }
.muted { font-size: 14px; color: var(--ink-soft); }
.sample { display: inline-block; margin-top: 6px; padding: 2px 8px; font-size: 13px; color: var(--ink); background: var(--cream-2); border: 2px dashed var(--cream-3); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.actions .btn { flex: 1 1 140px; }
.event-card { margin: 0 0 12px; padding: 10px 12px; background: var(--cream-2); border: var(--u) solid var(--ink); }
.event-card h3 { margin: 0 0 4px; font-size: 20px; }
.event-card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 16px; }
.event-card dt { color: var(--ink-soft); }
.event-card dd { margin: 0; font-weight: 600; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
.countdown span { padding: 6px 0; background: var(--ink); color: var(--cream); }
.countdown strong { display: block; font-size: 24px; line-height: 1.1; color: var(--gold); }
.countdown small { font-size: 12px; }

/* The couple's letter: real stationery inside the game. */
.letter { position: relative; padding: 18px 16px 16px; text-align: center; background: #fffaf0 repeating-linear-gradient(0deg, transparent 0 27px, #f1e3c6 27px 28px); border: var(--u) solid var(--ink); box-shadow: 6px 6px 0 rgba(58, 40, 51, .25); }
.letter-to { font-size: 15px; color: var(--ink-soft); }
.letter-to strong { display: block; font-size: 20px; color: var(--ink); }
.letter-names { margin: 10px 0; font: italic 600 38px/1.05 "Valley Letter", Georgia, serif; color: #7a3a4a; }
.letter-names span { display: block; font-size: 22px; color: var(--ink-soft); }
.letter-date { font-size: 18px; font-weight: 700; }
.letter-sign { margin-top: 12px; font: italic 26px/1 "Valley Letter", Georgia, serif; color: #7a3a4a; }
.stamp { position: absolute; right: 10px; top: 10px; width: 54px; height: 60px; image-rendering: pixelated; background: #dfeefe; outline: 3px dashed #8fb8f5; outline-offset: -3px; }

.people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.person { padding: 10px 8px; text-align: center; background: var(--cream-2); border: var(--u) solid var(--ink); }
.person canvas { width: 80px; height: 80px; image-rendering: pixelated; background: #fff; outline: var(--u) solid var(--ink); }
.person h3 { margin: 8px 0 2px; font-size: 18px; line-height: 1.15; }
.person p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.story { margin: 14px 0 0; padding: 0; list-style: none; }
.story li { position: relative; margin: 0 0 10px; padding-left: 22px; }
.story li::before { content: ""; position: absolute; left: 0; top: 5px; width: 13px; height: 12px; background: var(--red); clip-path: polygon(0 20%, 20% 0, 40% 0, 50% 20%, 60% 0, 80% 0, 100% 20%, 100% 50%, 50% 100%, 0 50%); }

/* RSVP */
.rsvp fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.rsvp legend { margin-bottom: 6px; font-weight: 700; font-size: 17px; }
.toggle { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.toggle.stepper { grid-template-columns: 56px 1fr 56px; }
.toggle button { min-height: 46px; padding: 8px; font: 600 16px/1.1 var(--pixel); cursor: pointer; background: var(--cream); border: var(--u) solid var(--ink); box-shadow: 0 var(--u) 0 var(--ink); }
.toggle button[aria-pressed="true"] { background: var(--green); box-shadow: inset 0 0 0 var(--u) var(--green-d); }
.toggle button.no[aria-pressed="true"] { background: #e7d7de; box-shadow: inset 0 0 0 var(--u) #c9b3bd; }
.field { display: block; margin: 0 0 12px; }
.field span { display: block; margin-bottom: 6px; font-weight: 700; }
.field textarea, .field input[type="text"] { width: 100%; padding: 10px; font: 400 17px/1.35 var(--read); color: var(--ink); background: #fffaf0; border: var(--u) solid var(--ink); border-radius: 0; resize: vertical; }
.field textarea:focus, .field input:focus { outline: var(--u) solid var(--blue); outline-offset: 0; }
.check { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--green-d); }
.status { padding: 8px 10px; margin: 0 0 12px; background: var(--cream-2); border-left: 6px solid var(--gold); }
.status.sent { border-color: var(--green-d); }
.status.failed { border-color: var(--red); }

.wishes { margin: 0; padding: 0; list-style: none; }
.wishes li { margin: 0 0 10px; padding: 10px 12px; background: #fffaf0; border: var(--u) solid var(--ink); }
.wishes blockquote { margin: 0 0 6px; font-size: 16px; }
.wishes cite { font-style: normal; font-weight: 700; color: var(--ink-soft); }

.account { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 10px 12px; background: var(--cream-2); border: var(--u) solid var(--ink); }
.account strong { display: block; font-size: 19px; letter-spacing: .03em; }
.account small { color: var(--ink-soft); }
.account .btn { min-height: 44px; padding: 8px 12px; font-size: 15px; }

.ticket { margin: 0 auto 10px; max-width: 320px; padding: 12px; text-align: center; background: #fffaf0; border: var(--u) solid var(--ink); box-shadow: 0 0 0 var(--u) var(--gold), 0 0 0 calc(var(--u) * 2) var(--ink); }
.ticket canvas { width: 100%; max-width: 240px; height: auto; image-rendering: pixelated; background: #fff; }

.quests { margin: 0 0 12px; padding: 0; list-style: none; }
.quests li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; border-bottom: 2px dashed var(--cream-3); }
.quests li::before { content: ""; flex: none; width: 18px; height: 18px; background: #fff; border: var(--u) solid var(--ink); }
.quests li.done::before { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Cpath fill='%233a2833' d='M1 3h1v1H1zM2 4h1v1H2zM3 3h1v1H3zM4 2h1v1H4zM5 1h1v1H5z'/%3E%3C/svg%3E") center / 12px no-repeat; }
.quests li.done span { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 2px; }
.quests li button { margin-left: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-grid .btn { justify-content: flex-start; font-size: 15px; }
.credits { margin-top: 14px; font-size: 12px; color: var(--ink-soft); }
.credits a { color: inherit; }

.noscript { position: fixed; inset: auto 16px 40%; padding: 16px; background: var(--cream); font: 16px/1.4 system-ui, sans-serif; }

@media (min-width: 720px) {
  .dialogue { bottom: calc(var(--safe-bottom) + 12px); }
  .toast { bottom: calc(var(--safe-bottom) + 170px); }
}
@media (max-width: 360px) {
  :root { --u: 2px; }
  .choose-grid { grid-template-columns: repeat(2, 1fr); }
  .dialogue-text { font-size: 16px; }
  .title-guest { min-width: 0; }
}
@media (max-height: 520px) {
  .title-screen { gap: 8px; padding-top: calc(var(--safe-top) + 8px); }
  .title-guest { margin-top: 4px; }
  .dpad { transform: scale(.85); transform-origin: bottom left; }
}
@media (prefers-reduced-motion: reduce) {
  .title-start, .dialogue-next, .a-btn.ready, .look[aria-checked="true"]::before { animation: none; }
}
.talking .controls, .talking .key-hint { visibility: hidden; }
