@font-face {
  font-family: 'Andika';
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/andika-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Andika';
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/andika-700.woff2') format('woff2');
}

/* Night treehouse theme. Reading surfaces (tiles, cards) stay cream with
   dark ink so text is always high-contrast. */
:root {
  --night-1: #140c22;
  --night-2: #221338;
  --night-3: #2f1a4d;
  --lilac: #c9a7ff;
  --purple: #8b5cf6;
  --purple-deep: #6d3fd8;
  --gold: #ffd580;
  --pink: #f4a6c1;
  --leaf: #7ed49a;
  --cream: #fff6ea;
  --card: #fff6ea;
  --ink: #2a1f3d;
  --ink-2: #5a5068;
  --line: #e6dccd;
  --vowel: #ffe7a8;
  --vowel-edge: #d8b35a;
  --accent: #6d3fd8;
  --accent-soft: #ece3ff;
  --good-soft: #e2f4e7;
  --warn-soft: #fff1cf;
  --bad-soft: #fde7e4;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.15), 0 8px 22px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, var(--night-3) 0%, var(--night-2) 45%, var(--night-1) 100%) fixed;
  background-color: var(--night-1);
  color: var(--cream);
  font-family: 'Andika', 'Trebuchet MS', system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
input, select, textarea { user-select: text; -webkit-user-select: text; }

#sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#sky svg { width: 100%; height: 100%; display: block; }
#sky .tw { animation: twinkle 3.5s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 0.15; } to { opacity: 0.95; } }

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
[tabindex="-1"]:focus { outline: none; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 21px; }
p { margin: 0 0 12px; }
.title { color: var(--gold); text-shadow: 0 0 18px rgba(255, 213, 128, 0.4); }
.muted { color: rgba(255, 246, 234, 0.72); }
.card .muted { color: var(--ink-2); }
.small { font-size: 16px; }
.center { text-align: center; }
.spacer { flex: 1; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

button {
  font: inherit;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 22px;
  min-height: 56px;
  cursor: pointer;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  touch-action: manipulation;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: var(--accent); color: #fff; font-weight: 700; }
button.big { font-size: 30px; padding: 24px 40px; min-height: 96px; border-radius: 28px; }
button.link { background: none; box-shadow: none; color: var(--lilac); padding: 8px 12px; min-height: 44px; }
.card button.link { color: var(--accent); }
button.quiet { background: transparent; box-shadow: none; color: var(--cream); opacity: 0.85; }
.card button.quiet { color: var(--ink-2); }

.btn-play, .btn-soft { display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.btn-play span, .btn-soft span { display: inline-flex; }
.btn-play {
  font-size: 34px; font-weight: 700; padding: 20px 56px; border-radius: 28px; color: #fff;
  background: linear-gradient(180deg, #a57bff, var(--purple-deep));
  box-shadow: 0 6px 0 #4b2a9a, 0 0 30px rgba(165, 123, 255, 0.55);
}
.btn-soft {
  font-size: 24px; font-weight: 700; padding: 14px 28px; color: var(--cream);
  background: rgba(255, 255, 255, 0.12); border: 2px solid rgba(255, 255, 255, 0.24); box-shadow: none;
}
.btn-soft.small { font-size: 18px; padding: 8px 18px; min-height: 48px; }

/* Cards: cream surfaces with dark ink (parent screens, setup) */
.card {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 18px; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.field { margin-bottom: 16px; }
.hint { font-size: 15px; color: var(--ink-2); margin-top: 4px; font-weight: 400; }
.hint-light { color: rgba(255, 246, 234, 0.75); font-size: 18px; }

.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.topbar h2 { margin: 0; flex: 1; color: var(--cream); }

/* Leaves counter */
.leaves-pill {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px; padding: 6px 16px 6px 10px;
  font-size: 26px; font-weight: 700; color: var(--cream);
}
.leaves-pill span { display: inline-flex; }
.leaves-pill.pop { animation: pop 0.45s ease-out; }

/* Speech bubble */
.bubble {
  position: relative; background: var(--cream); color: var(--ink); font-size: 22px;
  padding: 14px 20px; border-radius: 22px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Home */
.canopy { position: fixed; left: 0; right: 0; top: 0; height: 130px; z-index: 0; pointer-events: none; }
.canopy svg { width: 100%; height: 100%; display: block; }
.home { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding-top: 90px; padding-bottom: 40px; }
.home .title { font-size: 52px; margin: 0; }
.home-slothy { position: relative; display: flex; align-items: center; justify-content: center; background: none; box-shadow: none; padding: 0; min-height: 0; color: inherit; }
.slothy-hang svg { display: block; width: 100%; height: auto; }
.home-slothy .slothy-hang { width: min(290px, 60vw, 30vh); }
.home-slothy .bubble { position: absolute; left: 100%; top: 28%; margin-left: -20px; width: max-content; max-width: min(320px, calc(50vw - 170px)); text-align: left; }
.home-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 8px; }
.grownups { position: absolute; left: 12px; top: 18px; z-index: 3; font-size: 16px; min-height: 44px; padding: 8px 14px;
  background: rgba(20, 12, 34, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; box-shadow: none; color: rgba(255, 246, 234, 0.8); }

/* Game */
.game { flex: 1; display: flex; flex-direction: column; gap: 16px; position: relative; }
.game-top { display: flex; align-items: center; gap: 12px; min-height: 80px; }
.game-top .leaves-pill { position: static; }
.vine-wrap { flex: 1; display: flex; justify-content: center; }
.vine-wrap svg { width: min(560px, 100%); height: auto; }
.hear { width: 76px; height: 76px; min-height: 76px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14); border: 2px solid rgba(255, 255, 255, 0.25); box-shadow: none; }
.stop { font-size: 18px; min-height: 52px; padding: 8px 16px; background: none; box-shadow: none; color: rgba(255, 246, 234, 0.6); }
.vine-wrap svg { min-width: 160px; }

.slots { display: flex; justify-content: center; gap: 16px; margin-top: clamp(8px, 6vh, 90px); }
.slot, .tile {
  font-size: clamp(64px, 6.5vw, 88px); font-weight: 700; min-width: clamp(110px, 11vw, 150px); height: clamp(128px, 13vw, 168px); line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 14px;
  border-radius: 22px; background: var(--cream); color: var(--ink); border: 3px solid transparent;
  box-shadow: 0 6px 0 #c9b9a3, 0 10px 24px rgba(0, 0, 0, 0.35);
}
.slot.vowel, .tile.vowel { background: var(--vowel); box-shadow: 0 6px 0 var(--vowel-edge), 0 10px 24px rgba(0, 0, 0, 0.35); }
.slot.armed { border: 4px dashed var(--lilac); }
.slot.picked { outline: 5px solid var(--purple); }
.slot, .tile { position: relative; }
.slot.glow, .tile.glow { outline: 6px solid #fff; box-shadow: 0 0 0 14px rgba(139, 92, 246, 0.7); animation: glow 1s ease-in-out infinite alternate; }
.slot.glow::after { content: ''; position: absolute; left: 50%; top: -46px; margin-left: -16px; border: 16px solid transparent; border-top: 22px solid #fff; animation: bounce 0.8s ease-in-out infinite alternate; }
.slot.sweep { outline: 6px solid var(--lilac); transform: translateY(-8px); transition: transform 0.2s; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(8px); } }
.slot.changed { animation: pop 0.45s ease-out; outline: 5px solid var(--leaf); }
.slot.nudge, .nudge { animation: nudge 0.35s ease-in-out; }
.tile.selected { outline: 5px solid var(--purple); transform: translateY(-12px); }
.tile.used { visibility: hidden; }
.bank { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: auto; padding-bottom: 16px; }
.bank .tile { min-width: 108px; height: 124px; font-size: 64px; }

/* Tricky words: heart-word card, Find cards, Spell boxes */
.tricky-card { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--cream); color: var(--ink);
  border-radius: 26px; padding: 14px 28px 20px; box-shadow: 0 6px 0 #c9b9a3, 0 10px 24px rgba(0, 0, 0, 0.35); min-width: min(360px, 86vw); }
.tricky-tag { font-size: 18px; font-weight: 700; color: var(--ink-2); }
.heart-word { display: flex; gap: 2px; font-size: 56px; font-weight: 700; line-height: 1; padding-top: 30px; }
.heart-word.big { font-size: clamp(64px, 9vw, 104px); padding-top: 38px; }
.heart-word span { position: relative; }
.heart-word .hl { color: #b8246b; }
.heart-word .hl::before { content: '\2665'; position: absolute; left: 50%; top: -0.42em; transform: translateX(-50%); font-size: 0.34em; color: #e0457b; }
.tricky-ok { font-size: 30px; }
.find-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: min(560px, 100%); }
.find-card { font-size: clamp(40px, 6vw, 60px); font-weight: 700; min-height: 104px; padding: 8px 12px; border-radius: 22px;
  background: var(--cream); color: var(--ink); border: 3px solid transparent; box-shadow: 0 6px 0 #c9b9a3, 0 10px 24px rgba(0, 0, 0, 0.35); }
.find-card.dim { opacity: 0.45; }
.find-card.right { outline: 6px solid var(--leaf); animation: pop 0.45s ease-out; }
.find-card.glow { outline: 6px solid #fff; animation: glow 1s ease-in-out infinite alternate; }
.spell-boxes { display: flex; gap: 10px; }
.spell-box { width: clamp(56px, 7vw, 80px); height: clamp(72px, 9vw, 100px); border-radius: 14px; border: 4px dashed var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: clamp(44px, 6vw, 64px); font-weight: 700; }
.spell-box.filled { border: 4px solid var(--leaf); background: #fff; animation: pop 0.3s ease-out; }
.tricky-card .peek { margin-top: 4px; background: var(--accent-soft); color: var(--accent); border: 2px solid var(--lilac); box-shadow: none; }
/* b or d */
.bd-word { display: flex; align-items: center; gap: 4px; font-size: clamp(64px, 9vw, 104px); font-weight: 700; line-height: 1; }
.bd-gap { width: clamp(64px, 8vw, 92px); height: clamp(84px, 11vw, 120px); font-size: inherit; }
.find-cards.two { width: min(480px, 100%); }
.bd-tile { min-width: 132px; }
.bed-help { display: flex; align-items: flex-end; font-size: 48px; font-weight: 700; line-height: 1; padding: 4px 10px 8px;
  border-bottom: 8px solid var(--pink); border-radius: 4px; animation: pop 0.4s ease-out; }
.bed-help .bed-b, .bed-help .bed-d { color: var(--purple-deep); font-size: 60px; }

.buddy { display: flex; align-items: flex-end; gap: 8px; min-height: 150px; }
.buddy .slothy-hang { width: 150px; flex: none; }
.game-bubble { max-width: 420px; margin-bottom: 70px; visibility: hidden; }
.game-bubble.show { visibility: visible; animation: pop 0.3s ease-out; }
.next-btn { margin-left: auto; align-self: center; animation: pop 0.3s ease-out; }
.next-btn[hidden] { display: none; }
/* Reading items: the question under the word she made, and the ear check */
.decode-ask { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.decode-q { font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.25; text-align: center; max-width: 820px; padding: 10px 22px;
  background: var(--cream); color: var(--ink); border-radius: 22px; box-shadow: 0 6px 0 #c9b9a3, 0 10px 24px rgba(0, 0, 0, 0.35); text-wrap: balance; }
.decode-hear { animation: pop 0.3s ease-out; }

@keyframes glow { from { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.35); } to { box-shadow: 0 0 0 16px rgba(139, 92, 246, 0.8); } }
@keyframes pop { 0% { transform: scale(0.85); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-6px); } 70% { transform: translateX(6px); } }

/* Done */
.done-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.done-screen .title { font-size: 46px; }
.munch { width: min(300px, 60vw); animation: pop 0.6s ease-out; }
.munch svg { width: 100%; height: auto; display: block; }
.earned { font-size: 28px; margin: 0; }
.earned b { color: var(--leaf); }
.done-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* Treehouse */
.th-top { display: flex; align-items: center; gap: 16px; }
.th-top .title { flex: 1; margin: 0; }
.th-top .leaves-pill { position: static; }
.th-layout { flex: 1; display: flex; gap: 16px; align-items: flex-start; margin-top: 8px; }
.th-scene { flex: 1; min-width: 0; }
.th-scene svg { width: 100%; height: auto; display: block; max-height: calc(100vh - 110px); }
.th-scene .room { cursor: pointer; }
.th-scene .room-target { stroke: var(--gold); stroke-width: 4; stroke-dasharray: 10 8; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
/* Things in the treehouse play when she taps them (art.js ITEM_PLAY). */
.th-item .th-anim, .th-item .fish, .th-item .th-steam { transform-box: fill-box; transform-origin: 50% 100%; }
.th-item .th-glow, .th-item .th-burst, .th-item .th-steam { opacity: 0; pointer-events: none; }
.th-item.play .th-burst { animation: th-burst 1.2s ease-out; }
.th-item.play-wiggle .th-anim { animation: th-wiggle 0.9s ease-in-out; }
.th-item.play-hop .th-anim { animation: th-hop 0.9s ease-out; }
.th-item.play-squish .th-anim { animation: th-squish 0.7s ease-in-out; }
.th-item.play-rock .th-anim { animation: th-rock 2s ease-in-out; }
.th-item.play-sway .th-anim { animation: th-sway 1.4s ease-in-out; }
.th-item.play-twinkle .th-anim { animation: th-twinkle 0.4s ease-in-out 4 alternate; }
.th-item.play-glow .th-glow { animation: th-glow 1.6s ease-in-out; }
.th-item.play-steam .th-steam { animation: th-steam 1.6s ease-out; }
.th-item.play-swim .fish { animation: th-swim 2s ease-in-out; }
.th-item.play-swim .fish-2 { animation-direction: reverse; }
@keyframes th-burst { 0% { opacity: 0; transform: translateY(10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes th-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-8deg); } 45% { transform: rotate(7deg); } 70% { transform: rotate(-4deg); } }
@keyframes th-hop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-16px); } 55% { transform: translateY(0); } 75% { transform: translateY(-6px); } }
@keyframes th-squish { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(1.18, 0.78); } 70% { transform: scale(0.94, 1.08); } }
@keyframes th-rock { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 45% { transform: rotate(6deg); } 70% { transform: rotate(-4deg); } 88% { transform: rotate(2deg); } }
@keyframes th-sway { 0%, 100% { transform: skewX(0); } 30% { transform: skewX(-6deg); } 65% { transform: skewX(5deg); } }
@keyframes th-twinkle { from { opacity: 1; } to { opacity: 0.35; } }
@keyframes th-glow { 0%, 100% { opacity: 0; } 40% { opacity: 0.45; } }
@keyframes th-steam { 0% { opacity: 0; transform: translateY(6px); } 35% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes th-swim { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-12px) scaleX(-1); } 65% { transform: translateX(10px); } }
/* A room with a theme: gold edge and a star badge she can tap. */
.th-scene .room-themed { stroke: var(--gold); stroke-width: 4; }
.th-scene .th-badge { cursor: pointer; }
.theme-pop .theme-name { font-size: 26px; }
.theme-items { display: flex; gap: 8px; }
.theme-items svg { width: 56px; height: 56px; }
.themes-guide { display: flex; flex-direction: column; gap: 8px; }
.theme-card { display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 6px 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; color: inherit; text-align: left; }
.theme-card.done { border-color: var(--gold); }
.theme-card .theme-icon { opacity: 0.35; display: inline-flex; }
.theme-card .theme-icon.have { opacity: 1; }
.theme-card .theme-check { margin-left: auto; color: var(--gold); font-size: 22px; }
/* Notes from the sloths: a button over the treehouse and the note on paper. */
.note-pin { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 18px 6px 10px; margin-bottom: 8px; border-radius: 20px; background: var(--cream); color: var(--ink); font-size: 20px; font-weight: 700; border: 3px solid var(--gold); }
.note-pin.new { animation: glow 1.2s ease-in-out infinite alternate; }
.note-pin .note-icon svg { width: 44px; height: 33px; display: block; }
.note-pin .note-from svg { width: 40px; height: 40px; display: block; }
.note-card { max-width: min(620px, calc(100vw - 32px)); }
.note-paper { background: var(--cream); color: var(--ink); border-radius: 18px; padding: 22px 26px 14px; transform: rotate(-1deg); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.note-text { font-size: 34px; line-height: 1.6; margin: 0 0 10px; word-spacing: 0.12em; }
.note-pic { display: inline-block; vertical-align: middle; width: 56px; height: 56px; margin: 0 4px; }
.note-pic svg { width: 56px; height: 56px; display: block; }
.note-sign { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 22px; font-style: italic; }
.note-sign-art svg { width: 48px; height: 48px; display: block; }
.note-card .done-actions { margin-top: 16px; }
.note-thanks .care-big svg { width: 110px; height: 110px; }
.th-pins { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.visit-friend { display: flex; justify-content: center; }
.visit-gift { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.give-btn { display: inline-flex; align-items: center; gap: 8px; position: relative; }
.give-btn .price { display: inline-flex; align-items: center; gap: 2px; }
.give-btn.saving { opacity: 0.7; }
.give-icon svg { display: block; }
.th-scene .th-visitor { cursor: pointer; }
.treasures { width: 100%; margin-top: 8px; }
.treasures h3 { margin: 4px 0; }
.treasure-row { display: flex; flex-wrap: wrap; gap: 8px; }
.treasure { min-width: 60px; min-height: 60px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); display: inline-flex; align-items: center; justify-content: center; }
.note-dot { display: inline-flex; margin-left: 8px; }
.note-dot svg { width: 34px; height: 26px; }
.tray { width: 270px; flex: none; background: #1b1030; border: 2px solid rgba(255, 255, 255, 0.14); border-radius: 22px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 110px); overflow-y: auto; }
.tray h3 { color: var(--gold); margin: 2px 4px 4px; }
.tray-hint { color: var(--gold); font-size: 17px; margin: 0 4px 4px; }
.item { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 56px; padding: 6px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.08); color: var(--cream); box-shadow: none; font-size: 18px; }
.item .item-icon { display: inline-flex; flex: none; }
.item .item-name { flex: 1; }
.item .price { display: inline-flex; align-items: center; gap: 4px; color: var(--leaf); font-weight: 700; }
.item.owned .price { color: var(--lilac); font-weight: 400; font-size: 16px; }
.item.moving { outline: 3px solid var(--gold); }
.tray .build-head { margin-top: 10px; }
.item.build:not(.owned) .item-name { font-weight: 700; }
.item.build.owned { opacity: 0.6; }

/* PIN pad */
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 12px 0 20px; }
.pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--cream); }
.pin-dots span.on { background: var(--cream); }
.pad { display: grid; grid-template-columns: repeat(3, 88px); gap: 12px; justify-content: center; }
.pad button { font-size: 30px; min-height: 76px; }

/* Parent */
.menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.menu button { text-align: left; padding: 20px; min-height: 110px; }
.menu button strong { display: block; font-size: 22px; margin-bottom: 4px; }
.menu button span { font-size: 16px; color: var(--ink-2); }

.timer { font-size: 88px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.errbtn { width: 100%; font-size: 36px; min-height: 160px; background: #fde7e4; color: #8a1f14; font-weight: 700; }
.bigword { font-size: 110px; font-weight: 700; text-align: center; padding: 40px 0; letter-spacing: 2px; }
.score3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.score3 button { min-height: 96px; font-size: 22px; font-weight: 700; }
.score3 .q { background: var(--good-soft); color: #1d5e33; }
.score3 .s { background: var(--warn-soft); color: #6b4a00; }
.score3 .m { background: var(--bad-soft); color: #8a1f14; }

.stat { font-size: 56px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 16px; color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.status.solid { background: var(--good-soft); color: #1d5e33; }
.status.slow { background: var(--warn-soft); color: #6b4a00; }
.status.notYet { background: var(--bad-soft); color: #8a1f14; }
.status.unchecked { background: #eeeeee; color: #545a66; }

table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-2); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.week { display: flex; gap: 8px; }
.week div { flex: 1; text-align: center; font-size: 14px; color: var(--ink-2); }
.week i { display: block; height: 28px; border-radius: 8px; background: var(--line); margin-bottom: 4px; }
.week i.on { background: #2f8f4e; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 16px; }
.bar .track { height: 18px; background: #efe6d8; border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; }

.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .gridline { stroke: #efe6d8; stroke-width: 1; }
.chart .series { stroke: #2a78d6; stroke-width: 2; fill: none; }
.chart .pt { fill: #2a78d6; stroke: #fff; stroke-width: 2; }
.chart text { fill: var(--ink-2); font-size: 13px; font-family: inherit; }
.chart .lbl { fill: var(--ink); font-weight: 700; }

.banner { padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); color: #6b4a00; font-size: 16px; }
.banner.bad { background: var(--bad-soft); color: #8a1f14; }
.banner.ok { background: var(--good-soft); color: #1d5e33; }

/* Today's stars */
.day-stars { display: flex; gap: 18px; justify-content: center; }
.day-star { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 110px; text-align: center; color: rgba(255, 246, 234, 0.6);
  background: none; box-shadow: none; padding: 4px; min-height: 64px; font: inherit; border-radius: 14px; }
.day-star:active { background: rgba(255, 255, 255, 0.08); }
.day-star span { display: inline-flex; }
.day-star small { font-size: 14px; line-height: 1.2; }
.day-star.on { color: var(--gold); }
.day-star.on span { animation: pop 0.5s ease-out; }
.munch.small { width: 160px; }

/* Stop confirm */
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(10, 5, 20, 0.75); display: flex; align-items: center; justify-content: center; }
.overlay-card { background: var(--night-2); border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 28px; padding: 24px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font-size: 26px; }
.overlay-card .slothy-hang.small { width: 130px; }

/* Shop items she is saving up for */
.item .item-name { display: flex; flex-direction: column; gap: 4px; }
.item.saving { opacity: 0.72; }
.save-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.save-bar span { display: block; height: 100%; background: var(--leaf); }

/* Word check on her tablet: no red, no X */
.score3.neutral button { background: var(--card); color: var(--ink); }

/* Fluency timer: thumb-friendly on a phone */
.timer-screen { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 110px); }
.timer-screen .timer { font-size: 48px; }
.timer-screen .finish { width: 100%; font-size: 26px; min-height: 72px; }
.err-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.err-row .errbtn { min-height: 36vh; }
.err-row .undo { min-width: 110px; }

/* Progress headline */
.headline { display: flex; flex-direction: column; gap: 6px; font-size: 19px; font-weight: 700; }

/* Portrait tablet and phones */
@media (max-width: 900px) {
  .th-layout { flex-direction: column; align-items: stretch; }
  .tray { width: auto; max-height: none; }
  .home-slothy .bubble { position: static; margin: 8px 0 0; white-space: normal; width: auto; max-width: min(90vw, 480px); text-align: center; }
  .home-slothy { flex-direction: column; }
}
@media (max-width: 600px) {
  .slot, .tile { font-size: 48px; min-width: 76px; height: 100px; }
  .bank .tile { min-width: 70px; height: 92px; font-size: 44px; }
  .home .title { font-size: 36px; }
  .bigword { font-size: 72px; }
  .timer { font-size: 64px; }
  .pad { grid-template-columns: repeat(3, 76px); }
  .card { padding: 14px; }
  th, td { padding: 8px 4px; }
  .status { font-size: 14px; }
  .buddy .slothy-hang { width: 100px; }
  .game-bubble { font-size: 18px; margin-bottom: 40px; }
}
@media (max-width: 600px), (max-height: 760px) {
  .home { gap: 10px; padding-top: 84px; padding-bottom: 16px; justify-content: flex-start; }
  /* Center when there's room, stay top-aligned (not clipped) when there isn't. */
  .home > :first-child { margin-top: auto; }
  .home > :last-child { margin-bottom: auto; }
  .home .title { font-size: 30px; }
  .home-slothy .slothy-hang { width: min(220px, 50vw, 24vh); }
  .home-slothy .bubble { font-size: 19px; padding: 10px 16px; }
  .home-actions { gap: 10px; margin-top: 4px; }
  .home-actions .btn-play { font-size: 26px; padding: 14px 36px; }
  .home-actions .btn-soft { font-size: 19px; padding: 10px 22px; }
  .day-star { width: 96px; }
  .day-star span svg { width: 34px; height: 34px; }
  .day-star small { font-size: 13px; }
}
@media (orientation: portrait) {
  .slots { margin-top: 12vh; }
  .bank { margin-top: 36px; }
}
/* Slothy moves. Slow on purpose: sloths never rush. Transforms on SVG
   groups use view-box units, so origins are points in Slothy's drawing. */
.slothy .s-swing { transform-origin: 110px 31px; animation: s-sway 7s ease-in-out infinite; }
.slothy.sleepy .s-swing { animation-duration: 10s; }
.slothy .s-head { transform-origin: 110px 150px; animation: s-nod 9s ease-in-out infinite; }
.slothy .s-eyes { transform-origin: 110px 114px; animation: s-blink 5.5s infinite; }
.slothy .s-feet { transform-origin: 110px 215px; animation: s-feet 7s ease-in-out infinite; }
.slothy .s-mouth { transform-origin: 110px 138px; transform: scaleY(0); }
.slothy-talking .slothy .s-mouth { animation: s-talk 0.32s ease-in-out infinite alternate; }
.slothy-talking .slothy .s-smile { opacity: 0; }
.slothy-hang.cheer .s-cheer { transform-origin: 110px 31px; animation: s-cheer 0.9s ease-in-out; }
.slothy .s-zzz text { animation: s-zzz 3.5s ease-in-out infinite; }
.slothy .s-zzz text + text { animation-delay: 1.2s; }
.slothy .s-chew { transform-origin: 120px 120px; animation: s-chew 0.5s ease-in-out infinite alternate; }
.slothy .s-sushi { animation: s-bob 1s ease-in-out infinite alternate; }
@keyframes s-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes s-nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(3deg); } 70% { transform: rotate(-2deg); } }
@keyframes s-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
@keyframes s-feet { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg); } }
@keyframes s-talk { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes s-cheer { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-10px) rotate(-5deg); } 55% { transform: translateY(-4px) rotate(5deg); } 80% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes s-zzz { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes s-chew { from { transform: scaleY(0.55); } to { transform: scaleY(1); } }
@keyframes s-bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .slothy-talking .slothy .s-smile { opacity: 1; }
}

/* Slothy's words (parent voice check) */
.voice-list { display: flex; flex-direction: column; margin-top: 10px; }
.voice-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.voice-row .voice-text { flex: 1; font-size: 20px; }
.play-clip { min-width: 52px; min-height: 48px; font-size: 20px; }
.voice-row .mark { font-size: 15px; white-space: nowrap; }
.voice-row .mark.on { color: #8a1f14; font-weight: 700; }

/* Reading with a grown-up: her story list and story (cream page, big type) */
.stories { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stories .slothy-hang.small { width: 130px; }
.story-pick { width: min(560px, 100%); font-size: 26px; font-weight: 700; min-height: 80px; padding: 12px 20px; border-radius: 22px;
  background: var(--cream); color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.story-pick small, .next-tag { font-size: 16px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
/* inline-block so the pill never splits across a line break */
.next-tag { display: inline-block; }
.story-pick.next { outline: 4px solid var(--lilac); }
.story-card { background: var(--cream); color: var(--ink); border-radius: 26px; padding: clamp(18px, 3vw, 36px); max-width: 900px; margin: 0 auto; box-shadow: var(--shadow); }
.story-title { font-size: clamp(22px, min(3vw, 3.6vh), 34px); margin: 0 0 8px; color: var(--accent); }
.story-text { font-size: clamp(22px, min(3.6vw, 4.5vh), 40px); line-height: 1.65; margin: 0; word-spacing: 0.12em; }
.story-end { display: flex; justify-content: center; margin: 18px 0; }

/* Grown-up follow-along: tap a word she misses */
.story-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; }
.story-row.next { outline: 3px solid var(--lilac); }
.read-words { display: flex; flex-wrap: wrap; gap: 4px 2px; margin: 12px 0 0; }
.rw { font-size: 21px; line-height: 1.3; min-height: 44px; padding: 4px 6px; background: none; box-shadow: none; border-radius: 8px; color: var(--ink); font-weight: 400; }
.rw.err { background: var(--bad-soft); color: #8a1f14; text-decoration: line-through; font-weight: 700; }
.read-bar { position: sticky; top: 0; z-index: 2; padding: 4px 0 12px; display: flex; justify-content: center; }
.read-go { min-width: 220px; }
.rec-state.on { color: #a3261a; font-weight: 700; }
/* After a read: replay and a note per missed word */
.rec-player { display: flex; flex-direction: column; gap: 6px; }
.rec-seek { padding: 0; border: 0; background: none; min-height: 36px; }
.miss-rows { display: flex; flex-direction: column; gap: 12px; }
.miss-row { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.miss-word { font-size: 20px; }
.miss-story summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; min-height: 44px; }
label.check input { width: 26px; height: 26px; flex: none; }

/* Treehouse: dressed-up Slothy, toy box, outfits */
.th-left { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.th-left .th-scene { width: 100%; }
.th-dressed { width: 150px; margin-top: 4px; }
.tray .item.wearing { outline: 3px solid var(--gold); }
.tray .to-box { width: 100%; margin-bottom: 6px; }
.th-balloon { animation: s-bob 3s ease-in-out infinite alternate; }

/* Sticker book */
.home-row { display: flex; align-items: center; gap: 12px; }
.sticker-btn { position: relative; width: 64px; height: 64px; min-height: 64px; padding: 0; border-radius: 50%; background: none; box-shadow: none; flex: none; }
.sticker-btn svg { width: 64px; height: 64px; display: block; }
.sticker-new { position: absolute; top: -4px; right: -4px; min-width: 26px; height: 26px; border-radius: 13px; background: var(--pink); color: var(--ink); font-size: 16px; line-height: 26px; }
.sticker-book { display: flex; flex-direction: column; gap: 14px; }
.sticker-page { background: #1b1030; border: 2px solid rgba(255, 255, 255, 0.12); border-radius: 22px; padding: 12px 14px; }
.sticker-page h3 { color: var(--gold); margin: 0 0 8px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.sticker-art svg { width: 80px; height: 80px; display: block; }
.sticker small { font-size: 14px; line-height: 1.2; color: var(--cream); }
.sticker.locked small { color: rgba(255, 246, 234, 0.45); }
.sticker.fresh .sticker-art { animation: pop 0.6s ease-out; }
.sticker.fresh .sticker-art svg { filter: drop-shadow(0 0 10px rgba(255, 213, 128, 0.8)); }
.new-stickers { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.new-stickers b { color: var(--gold); font-size: 22px; }
.new-stickers .sticker-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.new-stickers .sticker-art svg { width: 64px; height: 64px; }
.done-screen.with-stickers { gap: 8px; }
.done-screen.with-stickers .munch { width: min(190px, 40vw, 24vh); }

/* Caring for the sloths */
.care-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; width: 100%; }
.care-btn { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 6px 14px 6px 8px; border-radius: 18px; background: #2f1a4d; color: var(--cream); box-shadow: none; border: 2px solid rgba(255, 255, 255, 0.16); font-size: 18px; text-align: left; }
.care-btn > span:last-child { display: flex; flex-direction: column; }
.care-btn small { font-size: 14px; color: var(--pink); }
.care-btn.done { opacity: 0.6; }
.care-icon svg { width: 44px; height: 44px; display: block; }
.hearts-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.hearts-pill svg { width: 26px; height: 26px; }
.care-pop { background: var(--cream); color: var(--ink); border-radius: 26px; padding: 18px 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop 0.4s ease-out; }
.care-pop p { margin: 0; font-size: 22px; font-weight: 700; }
.care-big svg { width: 120px; height: 120px; display: block; }
.care-hearts { display: flex; gap: 6px; }
.care-hearts svg { width: 30px; height: 30px; animation: s-zzz 1.6s ease-in-out infinite; }
.care-hearts svg:nth-child(2) { animation-delay: 0.3s; }
.care-hearts svg:nth-child(3) { animation-delay: 0.6s; }

/* What's new cards on her home screen */
.news .overlay-card { max-width: min(560px, calc(100vw - 32px)); }
.news-tag { font-size: 18px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.news-hear { background: none; border: none; padding: 0; cursor: pointer; }
.news-art { width: 160px; height: 160px; display: flex; align-items: center; justify-content: center; }
.news-art svg { width: 100%; height: 100%; }
.news-title { margin: 0; font-size: 32px; }
.news-body { margin: 0; font-size: 26px; line-height: 1.4; }

/* Hard or soft c and g */
.cg-word .hl { color: var(--purple-deep); text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 10px; }
.cg-word.show-next .cg-next { color: #b8246b; animation: pop 0.4s ease-out; }
.cg-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.cg-card small { font-size: 22px; font-weight: 400; color: var(--ink-2); }

/* Letter order: on a miss, the first letters light up */
.order-card.first-letter .fl { color: #b8246b; }

/* Tricky word in a sentence */
.sentence { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: min(760px, 100%); }
.sent-word { font-size: clamp(32px, 5vw, 48px); font-weight: 700; min-height: 72px; min-width: 56px; padding: 4px 14px; border-radius: 16px;
  background: var(--cream); color: var(--ink); border: 3px solid transparent; box-shadow: 0 4px 0 #c9b9a3; }
.sent-word.dim { opacity: 0.45; }
.sent-word.right { outline: 6px solid var(--leaf); animation: pop 0.45s ease-out; }
.sent-word.glow { outline: 6px solid #fff; animation: glow 1s ease-in-out infinite alternate; }

/* Weekly summary for her tutor */
.summary-text { width: 100%; font: inherit; font-size: 15px; line-height: 1.45; padding: 10px; border-radius: 10px; resize: vertical; }

/* Silly yes or no */
.yesno-q { font-size: clamp(36px, 6vw, 60px); font-weight: 700; line-height: 1.25; text-align: center; max-width: 820px; padding: 8px 4px; }
.yesno-btn.dim { opacity: 0.45; }

/* Sorting baskets */
.sort { display: flex; flex-direction: column; align-items: center; gap: 18px; width: min(860px, 100%); }
.sort-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 76px; }
.sort-word { font-size: clamp(30px, 5vw, 44px); font-weight: 700; min-height: 72px; min-width: 96px; padding: 4px 16px; border-radius: 16px;
  background: var(--cream); color: var(--ink); border: 3px solid transparent; box-shadow: 0 4px 0 #c9b9a3; }
.sort-word.selected { outline: 6px solid #fff; transform: translateY(-4px); }
.sort-word.placed { min-height: 52px; min-width: 0; font-size: clamp(22px, 3.4vw, 30px); box-shadow: none; outline: none; transform: none; pointer-events: none; }
.sort-bins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; }
.sort-bin { min-height: 200px; border-radius: 24px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: rgba(255, 248, 236, 0.16); border: 4px dashed var(--cream); color: var(--cream); }
.sort-bin.glow { outline: 6px solid #fff; animation: glow 1s ease-in-out infinite alternate; }
.sort-label { font-size: clamp(24px, 4vw, 34px); font-weight: 700; display: flex; flex-direction: column; align-items: center; }
.sort-label small { font-size: 18px; font-weight: 400; opacity: 0.85; }
.sort-inside { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* Rooms in 2.5D (2026-10-13, from Doggie's Treehouse): a room opened up big,
   things dragged anywhere. */
.th-tap { margin-top: 8px; text-wrap: pretty; }
.rv-wrap { margin-top: 12px; }
.rv-wrap svg { width: 100%; height: auto; display: block; max-height: calc(100vh - 230px); border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none; }
.rv-item { cursor: grab; }
.rv-item.rv-dragging { cursor: grabbing; opacity: 0.85; }
.rv-count { font-size: 20px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); white-space: nowrap; }
.rv-hint { margin-top: 10px; text-wrap: pretty; }
.rv-box h3 { margin: 14px 4px 8px; text-wrap: balance; }
.rv-box-row { display: flex; flex-wrap: wrap; gap: 10px; }
.rv-box-item { width: 84px; height: 84px; padding: 6px; display: flex; align-items: center; justify-content: center; }
.rv-box-item[aria-disabled="true"] { opacity: 0.5; }

/* Care games (2026-10-13, from Doggie's Treehouse): hands-on, nothing to fail. */
.care-intro { display: block; margin: 0 auto 10px; max-width: 640px; font-size: 22px; line-height: 1.35; text-align: center; color: var(--cream); text-wrap: pretty;
  background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.14); border-radius: 18px; padding: 10px 16px; box-shadow: none; cursor: pointer; }
.care-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; touch-action: none; user-select: none; -webkit-user-select: none; }
.care-svg { width: min(720px, 100%); height: auto; max-height: calc(100vh - 210px); display: block; touch-action: none; }
.care-brush .care-svg { cursor: grab; max-width: 600px; }
.care-hug .care-svg { max-width: 560px; }
.care-water .care-svg { max-width: 560px; }
.care-snack { touch-action: manipulation; }
.care-snack .care-svg { touch-action: manipulation; }
.feed-layout { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 40px; }
.feed-left, .feed-right { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.feed-thought { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 10px 18px; background: var(--cream); border-radius: 30px; }
.feed-want { display: inline-flex; }
.feed-words { margin: 0; font-size: 26px; font-weight: 700; color: var(--cream); text-wrap: balance; }
.feed-sloth { width: min(220px, 55vw); }
.feed-sloth.munching { animation: pop 0.6s ease-out; }
.feed-plate { width: min(320px, 80vw); }
.feed-plate .on-plate { cursor: pointer; }
.feed-row { display: flex; gap: 14px; }
.feed-row button { display: inline-flex; align-items: center; gap: 8px; min-height: 64px; font-size: 22px; }

/* Trips (2026-10-14, from Doggie's Treehouse): the passport, the walk and the postcard. */
.passport { margin-top: 14px; }
.passport h3 { color: var(--gold); margin: 0 4px 6px; text-wrap: balance; }
.stamps { display: flex; flex-wrap: wrap; gap: 10px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 130px; padding: 10px; border-radius: 18px; }
.stamp .stamp-art svg { width: 96px; height: 96px; }
.stamp .save-bar { width: 100%; }
.stamp.ready { box-shadow: 0 0 0 4px var(--gold); animation: glow 1.4s ease-in-out infinite alternate; }
.stamp.mystery { justify-content: center; font-size: 44px; font-weight: 700; color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.06);
  border: 3px dashed rgba(255, 255, 255, 0.2); min-height: 130px; }
.trip-stage { margin-top: 10px; }
.trip-svg { width: 100%; height: auto; display: block; max-height: calc(100vh - 140px); border-radius: 18px; touch-action: none; user-select: none; -webkit-user-select: none; }
.trip-svg .tp-stone.next-stone .tp-ring { animation: twinkle 0.8s ease-in-out infinite alternate; }
.trip-again { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.postcard { background: var(--cream); color: var(--ink); border-radius: 16px; padding: 14px 20px; transform: rotate(-1.5deg); }
.postcard-row { display: flex; align-items: center; justify-content: center; gap: 18px; }
.postcard .stamp-art svg { width: 120px; height: 120px; }
.postcard .stamp-art.fresh svg { animation: pop 0.5s ease-out; }
