/* Roomscape Adventures · parent app, "Designer's desk" look (2026-10-02).
 * Calm and warm: cream page, white cards, thin tan outlines, one orange action colour.
 * See Roomscape_build_brief.md §7. Replaces next-tokens.css + next-app.css on index.html. */

/* Self-hosted fonts (CSP is font-src 'self'). Latin only; Baloo 2 and Nunito are variable. */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/baloo2-wXKrE3kTposypRyd51jcAM4olXc.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/nunito-XRXV3I6Li01BKofINeaBTMnFcQ.woff2) format('woff2'); }

:root {
  --bg: #FFFAF0; --ink: #3B2417; --line: #DDCDAA; --input-line: #B9A47C;
  --panel: #FFFFFF; --panel2: #FFF3DC; --accent: #FF8A1F;
  --blue: #EAF4FB; --green: #E9F3DD; --yellow: #FFE9A8; --pink: #FFE1EA; --peach: #FFE3B8;
  --sk: #F1E3C4; --disabled: #E4D5B5; --disabled-ink: #5E4A3A; --muted: #6B5240;
  --danger: #9A2B12; --ok: #2F5A1B;
  --head: 'Baloo 2', system-ui, sans-serif; --body: 'Nunito', system-ui, sans-serif;
  --rs: 13px; --bw: 2px;
  /* Names the payments sheet (billing.js) reads, so it matches without its own theme. */
  --tint: #FFFAF0; --paper: #FFFFFF; --on-accent: #3B2417; --accent-tint: #FFF3DC;
  --sage: #4F6B3A; --sage-tint: #E9F3DD; --font-ui: 'Nunito', system-ui, sans-serif;
  --font-display: 'Baloo 2', system-ui, sans-serif; --font-mono: ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 3px solid #1F6FBF; outline-offset: 2px; }
.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; }
[hidden] { display: none !important; }

/* ── Page ────────────────────────────────────────────────────────────────────────────────── */
.app { min-height: 100vh; }
.page { width: 100%; max-width: 440px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 18px calc(150px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.page.short { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; gap: 8px; }
.topbar .app-version { margin-left: auto; align-self: center; font-size: 10px; font-weight: 500; letter-spacing: .03em; color: var(--muted, #8C8271); opacity: .75; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--head); font-weight: 700; font-size: 17px; border: 0; background: none; padding: 0; text-align: left; margin-right: auto; }
.desk-label { font-family: var(--head); font-weight: 700; font-size: 13px; background: var(--yellow); border: var(--bw) solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; flex-shrink: 0; }
.fb-btn { width: 44px; height: 44px; flex-shrink: 0; border: var(--bw) solid var(--line); border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; }

.h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 30px; line-height: 1.1; }
.h2 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 19px; line-height: 1.15; }
.lbl { font-family: var(--head); font-weight: 700; font-size: 16px; }
.txt { margin: 0; font-size: 14.5px; line-height: 1.4; font-weight: 600; }
.small { margin: 0; font-size: 13px; line-height: 1.35; font-weight: 700; }
.fine { margin: 0; font-size: 12.5px; line-height: 1.45; font-weight: 600; color: var(--muted); }
.fine a { text-decoration: underline; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex-grow: 1; min-width: 0; }

.panel { background: var(--panel); border: var(--bw) solid var(--line); border-radius: 20px; }
.pad { padding: 16px; }
.well { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: var(--panel2); }
.note { display: flex; gap: 10px; align-items: flex-start; border: 2.5px dashed var(--line); border-radius: 16px; padding: 12px 14px; background: var(--blue); font-size: 14px; line-height: 1.45; font-weight: 700; }
.notice { display: flex; gap: 10px; align-items: flex-start; border: var(--bw) solid var(--line); border-radius: var(--rs); padding: 12px 14px; background: var(--panel); font-size: 14px; line-height: 1.4; font-weight: 600; }
.notice--warn { background: var(--yellow); border-color: #E5C66B; }
.notice--ok { background: var(--green); border-color: #C9DDB2; }
.notice b { font-weight: 800; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; width: 100%; padding: 0 20px; border: var(--bw) solid var(--line); border-radius: 16px; font-family: var(--head); font-weight: 700; font-size: 18px; background: var(--panel); color: var(--ink); text-decoration: none; text-align: center; line-height: 1.15; }
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn-or { background: var(--accent); font-size: 20px; }
.btn-gr { background: var(--green); }
.btn-dash { border-style: dashed; background: var(--panel2); }
.btn-sm { min-height: 44px; width: auto; padding: 0 14px; font-size: 15px; }
.btn-xl { min-height: 60px; font-size: 21px; }
.btn:disabled { background: var(--disabled); color: var(--disabled-ink); }
.link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; font-family: var(--head); font-size: 15px; font-weight: 600; text-decoration: underline; padding: 0 6px; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: var(--bw) solid var(--line); border-radius: 999px; font-family: var(--head); font-size: 15px; font-weight: 700; background: var(--panel); }
.chip[aria-pressed="true"] { background: var(--accent); }
.chip.sq { border-radius: 12px; }

.inp { height: 50px; width: 100%; border: var(--bw) solid var(--input-line); border-radius: var(--rs); padding: 0 14px; font-size: 17px; font-weight: 700; background: #FFFFFF; }
textarea.inp { height: auto; padding: 12px 14px; font-size: 16px; line-height: 1.4; resize: vertical; min-height: 96px; }
.inp::placeholder { color: #8A7660; opacity: 1; }
.error { margin: 0; font-size: 14px; font-weight: 800; color: var(--danger); }
.ok { margin: 0; font-size: 14px; font-weight: 800; color: var(--ok); }

.badge { align-self: flex-start; font-family: var(--head); font-weight: 700; font-size: 12px; background: var(--yellow); border: var(--bw) solid var(--ink); border-radius: 999px; padding: 1px 9px; }
.badge.ready { background: var(--accent); }

.circle { width: 40px; height: 40px; border-radius: 50%; border: var(--bw) solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 17px; flex-shrink: 0; background: var(--panel); }
.circle.sm { width: 36px; height: 36px; }
.circle.done { background: var(--green); }
.circle.now { background: var(--accent); }

/* Progress strip */
.strip { position: relative; display: flex; justify-content: space-between; padding: 0 4px; margin: 0; list-style: none; }
.strip::before { content: ""; position: absolute; left: 36px; right: 36px; top: 19px; border-top: 3px dashed var(--ink); opacity: 0.35; }
.strip li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; }
.strip li > span:last-child { font-family: var(--head); font-size: 13px; font-weight: 500; }
.strip li[aria-current="step"] > span:last-child { font-weight: 700; }
.strip li.later { opacity: 0.45; }

/* Setup sections */
.sections { display: flex; flex-direction: column; gap: 16px; }
.sec { overflow: hidden; }
.sec-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; text-align: left; padding: 12px 16px; border: 0; background: var(--panel); }
.sec-head .meta { flex-grow: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sec-head .sum { font-size: 13.5px; font-weight: 700; }
.sec-head .act { font-family: var(--head); font-size: 14px; font-weight: 700; text-decoration: underline; }
.sec-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; border-top: var(--bw) solid var(--line); }
.more { text-align: center; font-family: var(--head); font-weight: 700; font-size: 15px; padding: 6px; margin: 0; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo { position: relative; height: 104px; padding: 0; overflow: hidden; border: var(--bw) solid var(--line); border-radius: var(--rs); background: var(--panel) center / cover no-repeat; }
.photo.add { border-style: dashed; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: var(--head); font-weight: 700; font-size: 14px; }
.photo.empty { border-style: dashed; opacity: .45; }
.photo .x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.photo .x span { width: 26px; height: 26px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.photo .dark { position: absolute; left: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; min-height: 96px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: #FFFFFF; }
.item .circle { width: 44px; height: 44px; font-size: 20px; }
.item .name { font-size: 13px; font-weight: 800; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.item[aria-pressed="false"] { opacity: 0.6; }
.item[aria-pressed="false"] .name { text-decoration: line-through; text-decoration-thickness: 2px; }

.world { position: relative; text-align: left; padding: 0; overflow: hidden; background: var(--panel); border: var(--bw) solid var(--line); border-radius: var(--rs); display: flex; flex-direction: column; box-shadow: 0 3px 0 var(--line); }
.world[aria-pressed="true"] { box-shadow: 0 5px 0 var(--line); transform: translateY(-2px); border-color: var(--ink); }
.world .art { position: relative; display: block; height: 64px; border-bottom: var(--bw) solid var(--line); }
.world .art i { position: absolute; bottom: 9px; width: 22px; height: 26px; border: 2px solid var(--line); }
.world .art i:first-child { left: 10px; }
.world .art i:last-child { left: 38px; }
.world .picked { position: absolute; right: 7px; top: 7px; background: var(--accent); border: 2px solid var(--line); border-radius: 999px; padding: 1px 9px; font-family: var(--head); font-weight: 700; font-size: 13px; }
.world .info { padding: 8px 11px 11px; display: flex; flex-direction: column; gap: 2px; }
.world .info b { font-family: var(--head); font-weight: 700; font-size: 17px; }
.world .info span { font-size: 12.5px; line-height: 1.3; font-weight: 700; }
.collapsed { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 14px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: var(--panel2); font-family: var(--head); font-weight: 700; font-size: 17px; text-align: left; width: 100%; }
.or { font-family: var(--head); font-weight: 700; font-size: 15px; text-align: center; margin: 0; }

.preview { display: flex; align-items: center; gap: 12px; border: var(--bw) solid #0E1013; border-radius: 12px; padding: 10px 12px; position: relative; overflow: hidden; color: #FFFFFF; }
.preview::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.16) 0 5px, rgba(0,0,0,0.2) 5px 6.5px, transparent 7px); background-size: 30px 30px; pointer-events: none; }
.preview > * { position: relative; }
.preview .tiles { display: flex; gap: 5px; }
.preview .tiles span { width: 28px; height: 28px; border-radius: 6px; border: 2px solid #0E1013; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; font-size: 14px; }
.preview .words { display: flex; flex-direction: column; gap: 1px; background: #24272C; border: 2px solid #0E1013; border-radius: 8px; padding: 5px 9px; min-width: 0; }
.preview .words b { font-family: var(--head); font-size: 15px; line-height: 1.2; }
.preview .words span { font-size: 12px; font-weight: 700; opacity: 0.9; overflow-wrap: anywhere; }

.glimpse { padding: 10px 12px; border: var(--bw) dashed var(--line); border-radius: var(--rs); background: #FFFFFF; }

.switch { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: var(--panel2); text-align: left; width: 100%; }
.switch .track { position: relative; width: 52px; height: 30px; flex-shrink: 0; border-radius: 999px; border: var(--bw) solid var(--ink); background: #FFFFFF; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; border: var(--bw) solid var(--ink); transition: left .15s; }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .track::after { left: 24px; }

.amount { text-align: left; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: var(--panel); width: 100%; }
.amount[aria-pressed="true"] { background: var(--panel2); border-color: var(--ink); }
.amount b { font-family: var(--head); font-weight: 700; font-size: 17px; display: block; }
.amount .sub { font-size: 13px; font-weight: 700; }
.amount .stars { display: flex; gap: 3px; margin-left: auto; }

.mine { display: flex; gap: 10px; padding: 10px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: #FFFFFF; }
.mine .num { width: 36px; height: 36px; border-radius: 11px; border: var(--bw) solid var(--line); background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; flex-shrink: 0; }
.mine .body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.mine .body b { font-family: var(--head); font-weight: 700; font-size: 17px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.tally { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: var(--bw) dashed var(--line); border-radius: var(--rs); background: var(--blue); }
.stepper { display: flex; align-items: center; background: #FFFFFF; border: var(--bw) solid var(--line); border-radius: 12px; flex-shrink: 0; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.stepper button:disabled { opacity: 0.35; }
.stepper output { min-width: 30px; text-align: center; font-family: var(--head); font-weight: 700; font-size: 17px; }
.stepper.age { background: var(--panel2); }
.stepper.age output { min-width: 50px; font-size: 15px; }
.opts { border: var(--bw) solid var(--line); border-radius: var(--rs); background: #FFFFFF; }
.opts > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; font-family: var(--head); font-weight: 700; font-size: 16px; cursor: pointer; }
.opts > summary::-webkit-details-marker { display: none; }
.opts > div { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 14px; }

.kid-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: var(--bw) solid var(--line); border-radius: var(--rs); padding: 8px; background: #FFFFFF; }
.kid-row .stepper { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
.kid-row .circle { width: 38px; height: 38px; }
.kid-row input { min-width: 0; height: 44px; border: 0; border-bottom: 2px solid var(--input-line); background: transparent; font-family: var(--head); font-size: 19px; font-weight: 700; padding: 0 4px; }

/* Skeleton shimmer */
@keyframes sk { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.sk { background-color: var(--sk); background-image: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.75) 50%, transparent 70%); background-size: 220% 100%; animation: sk 1.6s linear infinite; border-radius: 7px; }

/* Your games */
.game { padding: 14px; display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; }
.game .thumb { width: 64px; height: 64px; border-radius: 14px; border: var(--bw) solid var(--line); flex-shrink: 0; background: center / cover no-repeat; }
.game .info { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.game .info b { font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }

/* Forge */
.stage { display: flex; align-items: center; gap: 12px; min-height: 36px; font-family: var(--head); font-size: 17px; }
.stage .mark { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.stage .tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--accent); display: flex; align-items: center; justify-content: center; }
.stage .later { width: 24px; height: 24px; border-radius: 50%; border: 2.5px dashed var(--ink); opacity: 0.4; }
.stage.is-later { opacity: 0.6; }
.stage.is-now { font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1.1s linear infinite; }
.bar { height: 10px; border-radius: 999px; background: var(--sk); overflow: hidden; border: var(--bw) solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .4s linear; }
.slot { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: var(--bw) solid var(--line); border-radius: 18px; background: #FFFFFF; }
.slot.yours { background: var(--peach); }
.slot.empty { border: 2.5px dashed var(--line); background: transparent; }
.slot .num { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; border: 2px solid var(--line); background: #DDF1FC; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 17px; }
.slot.yours .num { background: var(--accent); }
.slot.empty .num { border-style: dashed; background: transparent; }
.slot .body { flex-grow: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.slot .body b { font-family: var(--head); font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.sticker { font-family: var(--head); font-weight: 700; font-size: 13px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 3px 10px; white-space: nowrap; transform: rotate(-3deg); }
.kit { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 14px; background: #FFFFFF; text-align: left; width: 100%; font-size: 16px; font-weight: 700; }
.kit .box { width: 26px; height: 26px; flex-shrink: 0; border: 2px solid var(--input-line); border-radius: 8px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.kit[aria-pressed="true"] .box { background: var(--accent); }
.kit[aria-pressed="true"] .lab { text-decoration: line-through; }
.kit .qty { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.kit .lab small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* Review */
.story { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
.flow { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.flow li { display: flex; gap: 12px; padding: 12px; border: var(--bw) solid var(--line); border-radius: 16px; background: #FFFFFF; }
.flow .num { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; border: 2px solid var(--line); background: #DDF1FC; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; }
.flow b { font-family: var(--head); font-size: 17px; display: block; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; border: 2px solid var(--line); border-radius: 999px; padding: 2px 9px; background: var(--panel2); }

/* Hide: route + stops */
.route { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.route .spot { position: relative; flex: 0 0 auto; width: 96px; height: 76px; border-radius: 14px; border: var(--bw) solid var(--line); background: var(--panel2) center / cover no-repeat; display: flex; align-items: flex-end; justify-content: center; }
.route .spot .pin { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 16px; }
.route .spot.done .pin { background: var(--ink); color: #FFFFFF; }
.route .spot.later { opacity: .45; }
.stop { border: 2px solid var(--line); border-radius: 18px; overflow: hidden; background: #FFFFFF; }
.stop .top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid var(--line); }
.stop .top .circle { width: 36px; height: 36px; background: #FFFFFF; }
.stop .top b { font-family: var(--head); font-weight: 700; font-size: 19px; line-height: 1.1; display: block; overflow-wrap: anywhere; }
.stop .inner { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.stop.is-done { opacity: 0.85; }
.rt-row { display: flex; align-items: stretch; gap: 8px; border: 2.5px dashed var(--line); border-radius: 12px; background: #FFFFFF; }
.rt-row--open { border-style: solid; border-color: var(--ink); }
.rt-row--done { background: var(--green); }
.rt-row--free { border-style: solid; background: var(--panel2); }
.rt-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; text-align: left; }
.rt-pic { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; border: 2px solid var(--line); background: var(--panel2) center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.rt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-title { font-family: var(--head); font-weight: 700; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.rt-where { font-size: 13.5px; line-height: 1.35; font-weight: 600; }
.rt-spot { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); }
.rt-tick { width: 52px; flex-shrink: 0; border: 0; border-left: 2px dashed var(--line); background: transparent; display: flex; align-items: center; justify-content: center; }
.tickbox { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--input-line); background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.is-on .tickbox, .tickbox.is-on { background: var(--accent); border-color: var(--ink); }
.rt-open { border: 2px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel2); display: flex; flex-direction: column; gap: 10px; }
.rt-big { height: 150px; border-radius: 12px; border: 2px solid var(--line); background: center / cover no-repeat; position: relative; }
.rt-big__tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; gap: 4px; align-items: center; background: #FFFFFF; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; font-weight: 800; }
.write { border: 2px solid var(--line); border-radius: 12px; background: #FFFFFF; overflow: hidden; }
.write .wh { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--yellow); border-bottom: 2px solid var(--line); font-size: 12.5px; font-weight: 800; }
.write .wh button { margin-left: auto; min-height: 32px; border: 0; background: none; font-weight: 800; text-decoration: underline; font-size: 13px; }
.write p { margin: 0; padding: 12px; font: 600 16px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.write .wf { padding: 0 12px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.line-ico { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; font-weight: 600; }
.line-ico svg { margin-top: 2px; }

/* Hand over */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--accent); border: 2px solid var(--line); border-radius: 24px; padding: 26px 18px 22px; text-align: center; }
.hero .stamp { position: absolute; right: -6px; top: -14px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 4px 12px; font-family: var(--head); font-weight: 700; font-size: 15px; transform: rotate(3deg); }
.code { height: 62px; border: 2px solid var(--line); border-radius: 14px; background: var(--peach); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 26px; letter-spacing: 0.1em; }
.pin { display: flex; gap: 10px; justify-content: center; }
.pin__cell { width: 52px; height: 58px; border: 2px solid var(--input-line); border-radius: 12px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; font-size: 28px; }
.pin__cell--next { border-color: var(--ink); border-width: 3px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 0 auto; }
.keys button { min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel2); font-family: var(--head); font-weight: 700; font-size: 22px; }

/* ── Sheets (consent, feedback, install) ─────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(59,36,23,.35); z-index: 30; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; z-index: 31; background: var(--bg); border: var(--bw) solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet ul { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.5; font-weight: 600; }
.rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rate button { min-height: 48px; border: 2px solid var(--line); border-radius: 12px; background: #FFFFFF; font-family: var(--head); font-weight: 700; font-size: 18px; }
.rate button[aria-pressed="true"] { background: var(--accent); border-color: var(--ink); }

/* ── Gigi ────────────────────────────────────────────────────────────────────────────────── */
.gigi { position: fixed; right: max(12px, calc(50% - 220px + 12px)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.gigi .bubble { position: relative; padding: 12px 14px; max-width: 215px; margin-bottom: 26px; background: var(--panel); border: var(--bw) solid var(--line); border-radius: 18px; transform-origin: right center; opacity: 0; visibility: hidden; font-size: 14.5px; line-height: 1.4; font-weight: 700; }
.gigi .bubble::before { content: ""; position: absolute; right: -9px; top: 24px; width: 14px; height: 14px; background: var(--panel); border-right: var(--bw) solid var(--line); border-top: var(--bw) solid var(--line); transform: rotate(45deg); }
.gigi .bubble.show { animation: tip 4.5s ease forwards; }
/* Small or sideways screens (folding phones, iPhone SE, phones in landscape): the guide shrinks so
   she doesn't cover the text she's helping with. 2026-11-25. */
@media (max-width: 360px), (max-height: 480px) {
  .gigi { transform: scale(.68); transform-origin: bottom right; }
}
.gigi.hop { animation: hop .8s ease-out both; }
@keyframes hop { 0% { transform: translateY(-90px); } 55% { transform: translateY(0); } 72% { transform: translateY(-12px); } 100% { transform: translateY(0); } }
@keyframes tip { 0% { opacity: 0; visibility: visible; transform: translateY(8px) scale(.85); } 10% { opacity: 1; transform: none; } 82% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; transform: translateY(-4px) scale(.95); } }
@keyframes tipfade { 0% { opacity: 0; visibility: visible; } 8% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
/* Gigi herself is a button (tap for help); the rest of the corner lets taps through. */
.gigi-btn { position: relative; pointer-events: auto; border: 0; background: transparent; padding: 0; width: 64px; height: 84px; display: flex; align-items: flex-end; justify-content: center; }
.gigi-btn:focus-visible { outline: 3px solid #1F6FBF; outline-offset: 2px; border-radius: 12px; }
.gigi-q { position: absolute; top: -2px; right: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; font-size: 14px; line-height: 1; }
.gigi-btn[aria-expanded="true"] .gigi-q { background: var(--panel); }
/* The help panel, above her. Rendered inside #app (next.js gigiPanel). */
.gigi-help .faq { border-top: 1px solid var(--line); padding-top: 8px; }
.gigi-help .faq > summary { cursor: pointer; font-weight: 800; list-style-position: outside; }
.gigi-help .faq > .txt { margin: 6px 0 4px; }
.gigi-help { position: fixed; z-index: 21; right: max(12px, calc(50% - 220px + 12px)); bottom: calc(108px + env(safe-area-inset-bottom)); width: min(320px, calc(100vw - 24px)); max-height: min(62vh, 520px); overflow: auto; background: var(--panel); border: var(--bw) solid var(--ink); border-radius: 18px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 0 var(--line); }
/* A sheet is open: Gigi steps aside. */
body:has(.sheet) .gigi { display: none; }

/* ── Reduced motion: no hops, shimmer or spinning; Gigi's bubble only fades ──────────────── */
@media (prefers-reduced-motion: reduce) {
  .sk, .spin, .gigi.hop { animation: none !important; }
  .gigi .bubble.show { animation: tipfade 4.5s linear forwards; }
  .btn:active, .world[aria-pressed="true"] { transform: none; }
  .switch .track, .switch .track::after, .bar i { transition: none; }
}

/* ── Puzzles: where it hides, on-hand supplies, the photo and voice ───────────────────────── */
.pick { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pick legend { padding: 0; margin-bottom: 8px; }
.spot-card { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; border: var(--bw) solid var(--line); border-radius: var(--rs); background: #FFFFFF; text-align: left; width: 100%; }
.spot-card b { display: block; font-family: var(--head); font-weight: 700; font-size: 14.5px; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; }
.spot-card .sub { display: block; font-size: 12px; font-weight: 700; }
.spot-card[aria-pressed="true"] { border-color: var(--ink); background: var(--panel2); box-shadow: 0 3px 0 var(--line); }
.spot-card.wide { grid-column: 1 / -1; }
.spot-card { gap: 8px; padding: 8px; }
.spot-card .circle { flex-shrink: 0; width: 30px; height: 30px; font-size: 14px; }
.spot-card.wide .circle { width: 36px; height: 36px; }
.sgroup { border-top: var(--bw) solid var(--line); padding-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.sgroup:first-child { border-top: 0; padding-top: 0; }
.sgroup-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; border: 0; background: none; text-align: left; padding: 0; }
.sgroup-head b { display: block; font-family: var(--head); font-weight: 700; font-size: 16px; }
.sgroup-head .sub { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.grid2 .kit { min-height: 52px; font-size: 14px; }
.pz-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; border: var(--bw) solid var(--line); background: center / cover no-repeat; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #9A2B12; animation: recpulse 1.1s ease-in-out infinite; }
@keyframes recpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }

/* ── First-run tips (TipKit style, Education branch 1 only — see TIPS in next.js) ──────────── */
#tip-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 30; }
.tk-ring { position: absolute; border: 3px solid var(--accent); border-radius: 18px; pointer-events: none; box-shadow: 0 0 0 5px rgba(255, 138, 31, .18); }
.tk { position: absolute; display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 14px; background: var(--panel); color: var(--ink); border-radius: 16px; box-shadow: 0 10px 30px rgba(59, 36, 23, .22), 0 0 0 1px rgba(59, 36, 23, .08); animation: tk-in .25s ease-out both; }
.tk-arrow { position: absolute; width: 18px; height: 18px; background: var(--panel); transform: rotate(45deg); }
.tk.up .tk-arrow { top: -8px; box-shadow: -1px -1px 0 rgba(59, 36, 23, .08); }
.tk.down .tk-arrow { bottom: -8px; box-shadow: 1px 1px 0 rgba(59, 36, 23, .08); }
.tk-ico { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--yellow); display: flex; align-items: center; justify-content: center; }
.tk-body { min-width: 0; }
.tk-title { display: block; font-family: var(--head); font-size: 17px; line-height: 1.15; margin: 1px 0 3px; }
.tk-msg { margin: 0; font-size: 14.5px; line-height: 1.35; font-weight: 600; color: var(--muted); }
.tk-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.tk-more { margin-top: 6px; padding: 0; font-size: 14px; }
.tk-x:hover { background: var(--panel2); }
@keyframes tk-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tk { animation: none; } }
