/* „Devynios žolės" — iPad-Safari-first. One stage, letterboxed, never scrolls.
   Everything inside #frame is laid out in 1600×1000 scene units; #frame is
   scaled to fit the viewport, so no CSS below needs media queries.

   The palette is the sister games' night brought indoors: mill-wood browns,
   moon-cool blues outside the window, and the one colour only living fire is
   allowed to carry — Žarijukas's ember amber. Paper and ink stay warm so every
   sentence the child has to READ keeps the daylight contrast a beginner
   needs. */

@font-face {
  font-family: 'Andika';
  src: url('/fonts/Andika-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Andika';
  src: url('/fonts/Andika-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #101A22;
  --moon: #C8D8C0;
  --mist: #9FB8AC;
  --amber: #F5C86E;
  --paper: #F6EBD7;
  --paper-2: #E4D3B6;
  --ink: #3A2A1C;
  --bark: #4A3626;
  --bark-dark: #32241A;
  --moss: #7A8C5A;
  --dawn: #E9A6A0;
  /* the mill's own: and the two colours of a live coal, the ember light and
     its pale heart. Nothing that is not alive may wear the ember pair. (The
     old --wisp names are kept so the shared panel styles carry over; the
     VALUES are Žarijukas's.) */
  --wisp: #FFB05A;
  --wisp-warm: #FFE3B0;
  --herb: #7A8C5A;
  --font: 'Andika', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  overscroll-behavior: none;
  background: #0B1114;
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#app { width: 100%; height: 100%; }

/* The letterbox is darker than any scene, so the stage reads as a window cut
   into the night rather than as a picture pasted on a background. */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 45%, #16232B00 0%, #070C0F 100%),
    #0B1114;
}

#frame {
  position: relative;
  width: 1600px;
  height: 1000px;
  flex: 0 0 auto;
  transform-origin: 50% 50%;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.8);
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: var(--font);
  color: var(--ink);
}

button {
  font-family: var(--font);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
}

/* ---------- hotspots ---------- */

.hs { cursor: pointer; }
.hitrect { fill: transparent; }

#scene.pulsing .hs { animation: hspulse 1.05s ease-in-out 2; }
@keyframes hspulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.shaking {
  transform-box: fill-box;
  transform-origin: center;
  animation: shake 0.6s ease-in-out;
}
@keyframes shake {
  10%, 90% { transform: translateX(-7px); }
  30%, 70% { transform: translateX(9px); }
  50% { transform: translateX(-9px); }
}

/* delight-only idle reactions */
.twitch { transform-box: fill-box; transform-origin: 50% 100%; animation: twitch 1.4s ease-in-out; }
@keyframes twitch { 20% { transform: rotate(-2.5deg); } 45% { transform: rotate(2deg); } 70% { transform: rotate(-1deg); } }

/* A tapped plant pivots where it is rooted: the base stays planted and the
   crown leans over. Anything that HANGS wants .sway-hang instead. */
.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 1.5s ease-in-out; }
@keyframes sway { 25% { transform: rotate(3deg); } 60% { transform: rotate(-2.4deg); } 85% { transform: rotate(1deg); } }

/* Hung from a rail, a cord or a branch: the tie is the pivot. */
.sway-hang { transform-box: fill-box; transform-origin: 50% 0%; animation: sway 1.5s ease-in-out; }

.shine { animation: shine 1.5s ease-in-out; }
@keyframes shine { 40% { filter: brightness(1.35); } }

.glow { animation: glow 4.2s ease-in-out; }
@keyframes glow { 10%, 90% { filter: brightness(1.25); } }

/* Žarijukas does not float — he is a coal in a lantern. The breath is his
   only whole-body idle; the glow-pulse and sparks are the art module's own.
   The visitors' talking mouths reuse the same class hooks inside their scene
   art. */
.guide .g-body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: breathe 4.6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scaleY(1.025) scaleX(0.99); } }

.guide .g-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 6.2s ease-in-out infinite; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97.5% { transform: scaleY(0.08); } }

/* Unscoped to .guide on purpose: the dwellers are scene art (the Gurgis/Ūkė
   pattern) whose own groups take `.talking` while they speak. */
.talking .g-mouth { transform-box: fill-box; transform-origin: 50% 50%; animation: talk 0.34s ease-in-out infinite; }
@keyframes talk { 50% { transform: scaleY(2.1) scaleX(0.85); } }

/* The warm moment (a brew, a serve): the game puts `.flaring` on #guide for
   ~1.2 s and the hidden `zb-flare` ring inside the art module blooms once.
   The module only draws the ring; this file owns when and how it shows. */
.guide.ember .zb-flare { opacity: 0; }
.guide.ember.flaring .zb-flare {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: wispflare 1.2s ease-out 1;
}
@keyframes wispflare {
  0% { opacity: 0; transform: scale(0.4); }
  22% { opacity: 0.95; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.1); }
}

/* ---------- speech bubbles ---------- */

/* Explicit stacking, so DOM insertion order never decides who gets a tap:
   hud 5 < game layers 10 < sheets 60 < tap catcher 65 < bubble 66 < title 70.
   The catcher and the bubble ride ABOVE the sheets on purpose: the kettle
   speaks while its panel is open (murk, the silly pots), and the line must be
   readable and dismissable without burying the pot. */
.tapcatch {
  position: absolute;
  inset: 0;
  z-index: 65;
  pointer-events: auto;
}

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 66;
  /* Narrow on purpose: short lines suit a reader who is still sounding words
     out, and a wide bubble lands on whatever just opened. */
  max-width: 640px;
  padding: 26px 36px;
  background: var(--paper);
  color: var(--ink);
  font-size: 38px;
  line-height: 1.34;
  border-radius: 30px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
/* The resting state is VISIBLE and the entrance animates away from hidden, so
   a browser that suppresses animations (reduced motion) still shows the text. */
.bubble.in { animation: bubblein 0.22s ease-out; }
@keyframes bubblein { from { opacity: 0; transform: translateY(10px); } }

.bubble::after {
  content: '';
  position: absolute;
  left: var(--tail-x, 50%);
  margin-left: -18px;
  border: 18px solid transparent;
}
.bubble.tail-down::after { top: 100%; border-top-color: var(--paper); border-bottom: 0; }
.bubble.tail-up::after { bottom: 100%; border-bottom-color: var(--paper); border-top: 0; }

/* Žarijukas — the voice the child hears most: warm paper rimmed in his own
   ember light, lit from just inside the edge. The inner glow is an inset
   shadow rather than a filter — no SVG or CSS filters anywhere near a text
   box. */
.bubble-wisp {
  background: var(--paper);
  border: 5px solid var(--wisp);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.55),
    inset 0 0 22px rgba(255, 176, 90, 0.55),
    inset 0 0 6px rgba(255, 176, 90, 0.35);
}
.bubble-wisp.tail-down::after { border-top-color: var(--wisp); }
.bubble-wisp.tail-up::after { border-bottom-color: var(--wisp); }

/* the dwellers: Alksnė, Baublys, Gūbrys. Darker paper inside a bark border —
   heavier than Žiburėlis, so who is speaking is legible before a word of it
   is read. */
.bubble-stone {
  background: var(--paper-2);
  border: 5px solid var(--bark);
  color: #3B2A19;
  font-weight: 700;
}
.bubble-stone.tail-down::after { border-top-color: var(--paper-2); }
.bubble-stone.tail-up::after { border-bottom-color: var(--paper-2); }

/* the closing lines. Nobody's mouth moves and nothing is answered here, so
   the bubble steps back a little. */
.bubble-quiet {
  background: rgba(246, 235, 215, 0.92);
  font-style: italic;
}
.bubble-quiet.tail-down::after { border-top-color: rgba(246, 235, 215, 0.92); }
.bubble-quiet.tail-up::after { border-bottom-color: rgba(246, 235, 215, 0.92); }

/* ---------- paper overlays & panels ---------- */

.sheetwrap {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(6, 12, 14, 0.7);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paper, .panel {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.paper.in, .panel.in { animation: sheetin 0.2s ease-out; }
@keyframes sheetin { from { opacity: 0; transform: scale(0.96); } }

.paper {
  width: 900px;
  max-width: 90%;
  max-height: 88%;
  padding: 64px 74px 46px;
  overflow-y: auto;
  background-image: linear-gradient(rgba(140, 110, 70, 0.06) 1px, transparent 1px);
  background-size: 100% 56px;
}
.paper.wide { width: 1180px; }

/* A kept sentence handed back at the gate: the same paper, but carried by a
   wisp — a faint cool edge glow instead of ruled lines. */
.paper.word-card {
  border: 5px solid var(--wisp);
  background-image: none;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 44px rgba(255, 176, 90, 0.4),
    inset 0 0 26px rgba(255, 176, 90, 0.35);
}

.paper-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 50%;
  background: var(--bark);
  color: var(--paper);
  font-size: 34px;
  line-height: 1;
}
.paper-close:active { background: var(--bark-dark); }

.paper-body p { font-size: 35px; line-height: 1.45; margin: 0 0 24px; }
.paper-body h2 { font-size: 46px; margin: 0 0 30px; text-align: center; letter-spacing: 1px; }
.paper-body .sign { text-align: right; font-style: italic; margin-bottom: 0; }

/* Writing kept by the bog: carved in the signpost and the stone, woven into
   the juosta. UPPERCASE, big, tracked out a little, and given the room a
   sentence a child is sounding out needs. It is the one text the whole
   encounter depends on, so nothing shares its sheet. */
.paper-body .mark {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 2px;
  text-align: center;
  margin: 0;
}

.panel {
  padding: 56px 64px 48px;
  text-align: center;
  max-width: 94%;
}
.panel-note { font-size: 32px; margin: 0 0 18px; }
.panel-task { font-size: 38px; font-weight: 700; line-height: 1.4; margin: 0 0 24px; }

.panel-body { display: block; }
.panel-actions { display: flex; align-items: center; justify-content: center; gap: 26px; }

.bigbutton {
  border: none;
  border-radius: 22px;
  background: var(--moss);
  color: var(--paper);
  font-size: 46px;
  font-weight: 700;
  padding: 22px 60px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.28);
}
.bigbutton:active { transform: translateY(4px); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28); }
.bigbutton.ghost { background: var(--bark); }

/* ---------- the encounters ---------- */

/* The core verb of this game: a dweller's lines, and whole sentences the
   child can say. As wide as the widest paper because a sentence must never
   wrap in the middle — a beginner reading over two lines is reading two
   things. */
.encounter {
  width: 1180px;
  max-width: 94%;
  padding: 48px 64px 44px;
  text-align: left;
}
/* the dweller's own voice: two lines at most, and never a demand */
.encounter .enc-mood {
  font-size: 36px;
  line-height: 1.4;
  font-style: italic;
  color: #4A3626;
  margin: 0 auto 34px;
  max-width: 900px;
  text-align: center;
}
.encounter .enc-choices {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
/* Big sentences. 44px of text inside a 108px-tall target: the tap area is
   generous because a child reading aloud points at the words with the same
   finger they answer with. */
.encounter .enc-say {
  display: block;
  width: 100%;
  min-height: 108px;
  border: 4px solid var(--bark);
  border-radius: 20px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 44px;
  line-height: 1.3;
  font-weight: 700;
  text-align: left;
  padding: 22px 34px;
}
.encounter .enc-say:active { background: var(--bark); color: var(--paper); }
/* finality: after a kept sentence is picked, the buttons die where they stand */
.encounter .enc-say[disabled] { opacity: 0.55; }

/* The panel sits low and dims lightly, so the dweller it is being said TO
   stays visible over its top edge while the child reads. */
.encounter-wrap {
  align-items: flex-end;
  padding-bottom: 26px;
  background: rgba(6, 12, 14, 0.45);
}

/* The kept tier wears its one UI-ism: a caption row — a small round wisp
   light and „Kas išgerta — išgerta." — so the sentences that count are told apart
   from small talk before a word of them is read. game.js builds the row as
   `<div class="enc-caption">` holding an `.enc-wisp` icon and the text. */
.encounter.kept { border: 5px solid var(--wisp); }
.encounter.kept .enc-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 30px;
  font-style: italic;
  color: #4E5A50;
  margin: -8px 0 26px;
}
.encounter.kept .enc-wisp {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 6px rgba(255, 176, 90, 0.8));
}
.encounter.kept .enc-wisp svg { width: 100%; height: 100%; display: block; }
.encounter.kept .enc-wisp .w-halo { fill: rgba(255, 176, 90, 0.35); }
.encounter.kept .enc-wisp .w-core { fill: var(--wisp-warm); }

/* ---------- HUD ---------- */

.hud {
  position: absolute;
  z-index: 5;
  left: 28px;
  top: 22px;
  display: flex;
  align-items: center;
  gap: 24px;
  pointer-events: none;
  padding: 10px 20px 10px 14px;
  border-radius: 20px;
  background: rgba(8, 16, 20, 0.42);
}
.hud[hidden] { display: none; }
/* steps aside while anyone is speaking — see Engine.say() */
.hud { transition: opacity 0.18s ease; }
.hud.dimmed { opacity: 0; }

/* The three wisp-lights. Unlit: a dim cool ring with the night inside it.
   Lit: the ring bright, a warm core kindled in it. It is a COUNT — three
   round lights and nothing else — so it can never be read as a word, a
   letter or a name. Which dweller kept which word is the child's to
   remember. */
.hud-lights { display: flex; gap: 12px; }
.hud-wisp svg { width: 56px; height: 56px; display: block; }
/* Unlit: an empty cup, cold. Lit: the cup warm, the steam curl risen. */
.hud-wisp .c-cup { fill: rgba(120, 100, 78, 0.45); }
.hud-wisp .c-glow { stroke: transparent; }
.hud-wisp .c-steam { stroke: transparent; }
.hud-wisp.lit .c-cup { fill: #C89A5E; }
.hud-wisp.lit .c-glow { stroke: var(--wisp-warm); }
.hud-wisp.lit .c-steam {
  stroke: rgba(255, 227, 176, 0.95);
  filter: drop-shadow(0 0 6px rgba(255, 176, 90, 0.9));
}

/* ---------- title & ending ---------- */

.gamelayer { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.gamelayer > * { pointer-events: auto; }

.titlescreen {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(9, 20, 24, 0.82);
}
.title-h1 {
  margin: 0;
  font-size: 124px;
  font-weight: 700;
  color: var(--wisp);
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.7);
  text-align: center;
}
.title-sub { margin: 0 0 26px; font-size: 46px; color: var(--moon); text-align: center; }
.title-buttons { display: flex; gap: 36px; }

.endingui {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 34px;
  padding-bottom: 64px;
}
/* The closing line lands on the busiest part of the picture — the grey-rose
   sky, the parted pines, whoever came. It carries its own light: a halo that
   hugs the letters, so the line is legible over every colour under it while
   the picture stays whole. A scrim panel would read as a caption bar and
   wipe out the art it sits on. */
.ending-quiet {
  margin: 0;
  font-size: 44px;
  color: var(--ink);
  text-align: center;
  text-shadow:
    0 0 10px rgba(233, 166, 160, 0.98),
    0 0 20px rgba(255, 217, 160, 0.95),
    0 0 34px rgba(255, 176, 90, 0.7),
    0 0 54px rgba(255, 176, 90, 0.5);
}

/* Reduced motion: floats, blooms and pulses become static states. Every
   reveal in the game is a display change (`st-*`), so nothing a child needs
   depends on an animation having run. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .guide.wisp .zb-flare { opacity: 0; }
  .guide.wisp.flaring .zb-flare { animation: none; opacity: 0.9; }
}

/* ---------- Devynė's hand ---------- */

/* Her margin notes: lowercase, slanted, a different ink — a person, not a
   heading. Everywhere writing of hers appears under the big carved words. */
.margin-note {
  font-size: 32px;
  font-style: italic;
  color: #6B4F86;
  text-align: center;
  margin: 26px 0 0;
}

/* ---------- the book ---------- */

.paper.book {
  width: 1280px;
  padding-top: 46px;
}

.book-ribbon {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 40px 30px 0;
}
.book-tab {
  border: 3px solid var(--bark);
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  padding: 10px 20px;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-tab:active { background: var(--bark); color: var(--paper); }
.book-tab-last { min-width: 76px; }

.book-title-row { text-align: center; }
.book-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  margin: 0 0 26px;
}

.book-pages {
  display: flex;
  gap: 36px;
  align-items: stretch;
}
.book-page {
  flex: 1 1 0;
  border: 3px solid rgba(74, 54, 38, 0.35);
  border-radius: 10px;
  padding: 26px 30px 22px;
  background: rgba(255, 250, 238, 0.5);
}
.book-page.book-last { max-width: 860px; margin: 0 auto; }

.recipe-name {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  margin: 0 0 14px;
}
.recipe-meaning {
  font-size: 27px;
  line-height: 1.4;
  text-align: center;
  color: #5A4632;
  margin: 0 0 20px;
  min-height: 76px;
}
.recipe-ings {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.recipe-ings li {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 1px;
  padding: 6px 0;
  border-bottom: 2px dotted rgba(74, 54, 38, 0.3);
}
.recipe-stir {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
}
.book-last .mark { font-size: 40px; margin-bottom: 16px; }

/* ---------- ingredients, satchel, cup ---------- */

.ing-chip, .pot-ing {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 3px solid var(--bark);
  border-radius: 16px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 27px;
  font-weight: 700;
  padding: 10px 18px;
}
.ing-chip:active, .pot-ing:active { background: var(--bark); color: var(--paper); }
.ing-chip[disabled] { opacity: 1; }
.ing-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}
.ing-n { color: #6B5334; }

.ing-ajerai .ing-dot { background: #7A9E4E; }
.ing-menta .ing-dot { background: #58B58F; }
.ing-rasa .ing-dot { background: #A9D8E8; }
.ing-ramune .ing-dot { background: #F2F0DC; }
.ing-ciobrelis .ing-dot { background: #B07AC8; }
.ing-jonazole .ing-dot { background: #E8C84E; }
.ing-virziai .ing-dot { background: #C878A8; }
.ing-kadagys .ing-dot { background: #7A88B0; }
.ing-sakai .ing-dot { background: #E8A03C; }

.satchel { width: 1000px; max-width: 94%; padding: 44px 54px 40px; }
.satchel .enc-caption, .brew .enc-caption {
  font-size: 30px;
  font-style: italic;
  color: #4E5A50;
  text-align: center;
  margin: -6px 0 22px;
}
.satchel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.satchel-empty { font-size: 30px; font-style: italic; text-align: center; margin: 10px 0 0; }

.cup-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px auto 0;
  padding: 12px 24px;
  width: fit-content;
  border: 4px solid var(--wisp);
  border-radius: 18px;
  background: rgba(255, 227, 176, 0.4);
  font-size: 30px;
  font-weight: 700;
}
.cup-dot { width: 30px; height: 30px; border-radius: 50% 50% 42% 42%; background: #B5763A; border: 2px solid rgba(0,0,0,0.3); }

/* the fresh cup, and the ending's recap: one made thing per sheet */
.paper.cup-card {
  border: 5px solid var(--wisp);
  background-image: none;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 44px rgba(255, 176, 90, 0.4),
    inset 0 0 26px rgba(255, 176, 90, 0.35);
}
.cup-card-name {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  margin: 0;
}

/* ---------- the kettle ---------- */

.brew { width: 1240px; max-width: 96%; padding: 40px 54px 40px; text-align: center; }
.brew-wrap { align-items: flex-end; padding-bottom: 20px; }

.kettle { width: 300px; margin: 0 auto 8px; }
.kettle svg { width: 100%; display: block; }

#kettle svg.stirring { animation: kettlestir 0.5s ease-in-out; transform-origin: 50% 80%; }
@keyframes kettlestir { 30% { transform: rotate(-1.6deg); } 70% { transform: rotate(1.4deg); } }

#kettle svg.brew-good #kettle-brew { animation: brewgood 1.3s ease-out; }
@keyframes brewgood { 30% { fill: #E8C84E; } 60% { fill: #FFE3B0; } }
#kettle svg.brew-murk #kettle-brew { animation: brewmurk 1.3s ease-out; }
@keyframes brewmurk { 40% { fill: #4A4238; } 70% { fill: #5A5248; } }
#kettle svg.brew-special #kettle-brew { animation: brewspecial 1.3s ease-out; }
@keyframes brewspecial { 25% { fill: #B07AC8; } 55% { fill: #58B58F; } 80% { fill: #E8A03C; } }

.pot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  min-height: 66px;
  margin: 0 0 18px;
}
.pot-ing { font-size: 24px; padding: 8px 14px; }

.brew-buttons { display: flex; gap: 26px; justify-content: center; margin: 0 0 22px; }
.brew-sep { height: 3px; background: rgba(74, 54, 38, 0.25); border-radius: 2px; margin: 0 0 20px; }
.brew-satchel .satchel-row { justify-content: center; }

/* ---------- serving & the dawn question ---------- */

.serve, .dawnq { width: 900px; max-width: 92%; padding: 44px 54px 44px; text-align: center; }
.serve .enc-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-style: italic;
  color: #4E5A50;
  margin: -4px 0 20px;
}
.serve { border: 5px solid var(--wisp); }
.serve-name { font-size: 44px; font-weight: 700; letter-spacing: 1.5px; margin: 0 0 30px; }

/* ---------- HUD: the satchel button ---------- */

.hud-satchel {
  pointer-events: auto;
  border: none;
  border-radius: 18px;
  background: rgba(8, 16, 20, 0.0);
  padding: 4px;
  width: 72px;
  height: 72px;
}
.hud-satchel svg { width: 100%; height: 100%; display: block; }
.hud-satchel .sb-body { fill: #A8834E; }
.hud-satchel .sb-flap { stroke: #C8A46B; }
.hud-satchel .sb-weave { stroke: rgba(50, 36, 26, 0.55); }
.hud-satchel:active .sb-body { fill: #C8A46B; }
