/* woolroom — the wool room.
   Color budget (visual redesign build note): four undyed wools
   + flax thread; the cat's wool is the only color. The hour arrives as light, never as
   a re-dye. Page chrome lives in the day wools; night belongs to the scene. */

:root {
  --oatmeal: #ded2bd;
  --greige: #b3a58e;
  --walnut: #9a8a72;
  --fleece-dark: #6e5a48;
  --flax: #e8dcc4;
  --thread: #f4ecdc;
  --pet: #d98f52;

  --bg: #efe8d8;
  --panel: #f7f1e3;
  --ink: #4a3c2c;
  --muted: #6e6152; /* 4.9:1 on --bg — keep AA when retuning */
  --line: rgba(110, 90, 72, 0.16);
  --hair: rgba(110, 90, 72, 0.10);
  --accent: #5a4636;
  --glow: #f4b96a;
  --shadow: 0 18px 44px rgba(74, 60, 44, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262019;
    --panel: #2f2820;
    --ink: #e8ddc8;
    --muted: #a3937a;
    --line: rgba(232, 220, 196, 0.14);
    --hair: rgba(232, 220, 196, 0.08);
    --accent: #e8dcc4;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--serif);
  -webkit-font-smoothing: antialiased;
}

[x-cloak] { display: none !important; }

/* Boot splash — covers the pre-Alpine blank and the view-resolution wait.
   Plain CSS (Alpine never manages it); init() adds .leaving once the view is
   known, the 12s animation is the escape hatch if JS never boots. */
#boot-splash {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 24px;
  opacity: 1; transition: opacity .3s ease;
  animation: bs-failsafe 12s ease 1 forwards;
}
#boot-splash .bs-logo {
  font: 600 clamp(44px, 8vw, 64px)/1.1 var(--serif);
  letter-spacing: -2px; margin: 0;
  animation: bs-breathe 2.6s ease-in-out infinite;
}
#boot-splash .bs-line { margin: 0; color: var(--muted); font-size: 14px; }
#boot-splash.leaving { opacity: 0; pointer-events: none; animation: none; }
@keyframes bs-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes bs-failsafe { 0%, 92% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #boot-splash .bs-logo { animation: none; }
  #boot-splash {
    transition: none;
    animation: bs-failsafe-static 12s steps(1, end) 1 forwards;
  }
}
@keyframes bs-failsafe-static {
  0%, 99% { visibility: visible; }
  100% { visibility: hidden; }
}

.root {
  max-width: 940px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  min-height: 100%;
}

.center { max-width: 460px; margin: 0 auto; text-align: center; padding-top: 4vh; }
.logo { font-size: clamp(52px, 9vw, 76px); margin: 18px 0 8px; letter-spacing: -3px; font-weight: 600; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; margin: 14px 0; }

.input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 15px;
  border-radius: 14px;
  font: inherit;
  outline: none;
}
.input:focus { border-color: var(--walnut); box-shadow: 0 0 0 3px rgba(154, 138, 114, 0.16); }

button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, color 140ms ease;
}
button:hover { border-color: var(--walnut); transform: translateY(-1px); }
button:disabled { opacity: 0.4; cursor: default; transform: none; }
.primary {
  background: var(--pet);
  color: #3a2c1e;
  border-color: #cb8f5a;
  font-weight: 600;
}
.primary:hover { filter: brightness(1.04); }
.ghost { color: var(--muted); border-color: var(--hair); background: rgba(127, 110, 88, 0.05); }
.ghost:hover { color: var(--ink); }

.quiet-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

/* ---------- landing ---------- */
.landing-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  align-items: center;
}
.landing-scene, .landing-entry { padding: 24px; }
.landing-logo { margin: 0 0 8px; line-height: 0.95; }
.landing-line { margin: 0 0 18px; font-size: 18px; max-width: 26ch; }
.landing-room {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 16px;
  --wall: var(--oatmeal);
  --floor: var(--greige);
  --rug: var(--walnut);
  border: 1px solid var(--line);
}
.landing-room svg { display: block; width: 100%; height: auto; }
.landing-preview { margin: 0; max-width: 40ch; }
.landing-entry h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -1px; line-height: 1.05; }
.landing-copy { margin: 0 0 18px; max-width: 36ch; }
.landing-row { margin-bottom: 12px; }
.landing-submit { min-width: 132px; }
.landing-notes { margin-top: 18px; display: grid; gap: 8px; }
.landing-notes p { margin: 0; }
.scene-kicker { margin: 0 0 10px; letter-spacing: 2px; text-transform: uppercase; }

/* ---------- adopt ---------- */
.adopt-shell { display: flex; flex-direction: column; gap: 20px; }
.adopt-copy { max-width: 620px; margin: 0 auto; }
.adopt-copy h2 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 42px); letter-spacing: -1px; line-height: 1.05; }
.adopt-copy p { margin: 0; }
.adopt-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}
.adopt-preview, .adopt-form { min-width: 0; padding: 22px; }
.adopt-preview { position: sticky; top: 20px; }
.adopt-preview-name { margin: 4px 0 12px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -1px; }
.adopt-mini-scene {
  position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 16px;
  --wall: var(--oatmeal); --floor: var(--greige); --rug: var(--walnut);
  border: 1px solid var(--line);
}
.adopt-mini-scene svg { display: block; width: 100%; height: auto; }
.mini-dog {
  transform-origin: 200px 200px;
  transition: transform 260ms ease;
}
.mini-shadow {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 260ms ease, opacity 260ms ease;
}
.mini-eye {
  transform-origin: center;
  transition: transform 220ms ease, opacity 180ms ease;
}
/* The adopt preview's figure is figures.js art now: its deidentified eyes
   group takes the old .mini-eye transitions, and the audition selectors
   below land on the rig classes (.pet-eyes-visitor / .tailg / the figure's
   own one-eye-eyes set) instead of the deleted mini-art hooks. */
.adopt-mini-scene .pet-eyes-visitor {
  transform-origin: center;
  transition: transform 220ms ease, opacity 180ms ease;
}
.mini-tail,
.mini-stash {
  transform-box: fill-box;
  transform-origin: center;
}
.mini-mote,
.mini-stash,
.mini-eye-closed { opacity: 0; }
.mini-mote,
.mini-stash { transition: opacity 180ms ease; }
.adopt-mini-scene.audition-hides-small-things .mini-dog {
  animation: mini-stash-run 2.1s ease both;
}
.adopt-mini-scene.audition-hides-small-things .mini-stash {
  animation: mini-stash-show 2.1s ease both;
}
.adopt-mini-scene.audition-fixated-watcher .mini-mote {
  opacity: .9;
  animation: mini-mote-drift 2.1s ease-in-out both;
}
.adopt-mini-scene.audition-fixated-watcher .pet-eyes-visitor {
  transform: translate(3px, -2px);
}
.adopt-mini-scene.audition-threshold-refuser .mini-dog {
  transform: translate(-9px, 5px) rotate(-5deg) scale(1.07, .92);
}
.adopt-mini-scene.audition-content-sigher .mini-dog {
  transform: translateY(8px) scale(1.08, .88);
}
.adopt-mini-scene.audition-content-sigher .mini-shadow {
  transform: scale(1.18, 1.08);
  opacity: .28;
}
.adopt-mini-scene.audition-one-eye-napper .mini-dog {
  transform: translateY(6px) scale(1.05, .92);
}
.adopt-mini-scene.audition-one-eye-napper .pet-eyes-visitor .eyes-open { opacity: 0; }
.adopt-mini-scene.audition-one-eye-napper .pet-eyes-visitor .one-eye-eyes { opacity: 1; }
.adopt-mini-scene.audition-lean-in-greeter .mini-dog {
  transform: translate(8px, 1px) rotate(7deg);
}
.adopt-mini-scene.audition-zoomie-initiator .mini-dog {
  animation: mini-zoomie 1.8s cubic-bezier(.3,.8,.35,1) both;
}
.adopt-mini-scene.audition-side-eye-judge .pet-eyes-visitor {
  transform: translate(-4px, 0);
}
.adopt-mini-scene.audition-side-eye-judge .tailg {
  animation: none;
  transform: rotate(-8deg);
}
@keyframes mini-stash-run {
  0%, 100% { transform: translate(0, 0); }
  38% { transform: translate(54px, -4px) rotate(5deg); }
  70% { transform: translate(42px, 0) rotate(-4deg); }
}
@keyframes mini-stash-show {
  0%, 52% { opacity: 0; transform: scale(.7); }
  70%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes mini-mote-drift {
  0% { transform: translate(-8px, 6px); }
  50% { transform: translate(4px, -5px); }
  100% { transform: translate(8px, 2px); }
}
@keyframes mini-zoomie {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  28% { transform: translate(-72px, 12px) rotate(-6deg) scale(.96, 1.04); }
  58% { transform: translate(68px, -4px) rotate(7deg) scale(1.04, .96); }
  78% { transform: translate(16px, 8px) rotate(-3deg); }
}
.quirk-audition-status { min-height: 3em; margin: -4px 0 8px; line-height: 1.4; }
.adopt-preview-line { margin: 0 0 14px; }
.adopt-preview-list { margin: 0; padding-left: 18px; color: var(--muted); }
.adopt-preview-list li + li { margin-top: 8px; }
.adopt-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; }
.adopt-section-head { margin-top: 18px; display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.adopt-section-head h3 { margin: 0 0 4px; font-size: 21px; }
.selection-badge { padding: 6px 10px; border-radius: 999px; background: rgba(154, 138, 114, 0.16); color: var(--muted); white-space: nowrap; }
.quirks { list-style: none; padding: 0; margin: 12px 0 20px; text-align: left; }
.quirk-grid { min-width: 0; max-width: 100%; margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quirk-grid li { margin: 0; }
.quirk-card {
  position: relative;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.quirk-card.picked { border-color: var(--pet); background: rgba(226, 167, 111, 0.12); }
.quirk-card.at-limit:not(.picked) { border-style: dashed; }
.quirk-order {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 2px;
}
.q-label { font-weight: 600; grid-column: 2 / 4; }
.q-preview { grid-column: 2 / 4; font-size: 13.5px; line-height: 1.38; }
.q-desc {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.quirk-mood { grid-column: 2 / 4; }
.quirk-mood { grid-column: 3 / 4; align-self: end; justify-self: end; padding: 4px 8px; border-radius: 999px; background: rgba(154, 138, 114, 0.12); }
.q-watch { grid-column: 2 / 3; align-self: end; }
.adopt-submit { margin-top: 6px; padding-inline: 22px; }

/* ---------- scene shell ---------- */
.scene { display: flex; flex-direction: column; gap: 14px; }
.scene-header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.identity-block { min-width: 0; }
.name { font-size: clamp(28px, 5vw, 40px); letter-spacing: -1.2px; }
.household-line { margin: 2px 0 0; max-width: 44ch; font-size: 13px; }
.header-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.menu-button { padding: 6px 12px; font-size: 13px; }
.realtime-pill {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  background: rgba(154, 138, 114, 0.12); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-style: italic;
}
.realtime-pill.realtime-warn { border-color: #c98d5e; color: #a86f3f; }
.guest-badge { font-style: italic; max-width: 30ch; text-align: right; }

.scene-stage {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  gap: 16px;
  align-items: start;
  justify-content: center;
}
.scene-stage.has-sidecar {
  grid-template-columns: minmax(0, 500px) minmax(220px, 300px);
}
.room-col { width: 100%; min-width: 0; justify-self: center; }

@media (min-width: 1200px) {
  .scene-stage.has-sidecar {
    position: relative;
    grid-template-columns: minmax(0, 520px);
  }
  .scene-stage.has-sidecar .scene-sidecar {
    position: absolute;
    top: 0;
    left: calc(50% + 276px);
    width: 300px;
  }
}

/* ---------- the wool room ---------- */
#wool-scene {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
#wool-scene > svg { display: block; width: 100%; height: auto; }
#wool-scene .hotspot { cursor: pointer; }
#dogzone { cursor: pointer; touch-action: none; outline: none; }
#dogzone:focus-visible { outline: 2px dashed rgba(244, 236, 220, 0.7); outline-offset: 6px; }
.hotspot:focus-visible,
.lamp:focus-visible,
.sunbtn:focus-visible,
.moonbtn:focus-visible { outline: 2px dashed rgba(244, 236, 220, 0.7); outline-offset: 4px; }

/* light, not dye: three moments of the same wool */
.lightlayer { opacity: 0; transition: opacity 2.4s ease; pointer-events: none; }
.window-wash { opacity: .34; transition: opacity 2.4s ease; }
#wool-scene[data-time="dusk"] .window-wash { opacity: .14; }
#wool-scene[data-time="night"] .window-wash { opacity: 0; }
#wool-scene[data-time="dusk"] .light-dusk { opacity: 1; }
#wool-scene[data-time="night"] .light-night { opacity: 1; }
.sunbtn, .moonbtn { transition: opacity 2.4s ease; }
.moonbtn { opacity: 0; }
#wool-scene[data-time="night"] .sunbtn { opacity: 0; }
#wool-scene[data-time="night"] .moonbtn { opacity: 1; }
.night-partner-pool { opacity: .05; transition: opacity 1.2s ease; }
.night-partner-pool[data-state="afterglow"] { opacity: .18; }
.night-partner-pool[data-state="lit"] { opacity: .42; }
.seam { filter: drop-shadow(0 2px 1px rgba(74, 60, 44, .12)); }
.shelfg,
.bowlg,
.ballg { filter: url(#object-depth); }
.lamp > rect,
.lamp > path,
.lamp > text { filter: url(#object-depth); }

/* the cat rig */
/* coats: identity without dress-up — one silhouette, three undyed wools.
   --dog-body / --dog-belly / --dog-point recolor the SAME shapes; the vars
   live on the scene (or the adopt preview / a swatch) via data-coat. (The
   var names are historical — the rig contract predates the species swap.) */
#wool-scene, .adopt-mini-scene, .coat-swatch {
  --dog-body: #d98f52;   /* marmalade — the default the art is drawn in */
  --dog-belly: #f6ecda;
  --dog-point: #c07a40;
}
#wool-scene[data-coat="tuxedo"], .adopt-mini-scene[data-coat="tuxedo"], .coat-swatch[data-coat="tuxedo"] {
  --dog-body: #3f3833;
  --dog-belly: #f4ead6;
  --dog-point: #2e2824;
}
#wool-scene[data-coat="marmalade"], .adopt-mini-scene[data-coat="marmalade"], .coat-swatch[data-coat="marmalade"] {
  --dog-body: #d98f52;
  --dog-belly: #f6ecda;
  --dog-point: #c07a40;
}
#wool-scene[data-coat="ash"], .adopt-mini-scene[data-coat="ash"], .coat-swatch[data-coat="ash"] {
  --dog-body: #8f8a82;
  --dog-belly: #e6e0d2;
  --dog-point: #6e675e;
}
#wool-scene .coat, .adopt-mini-scene .coat { fill: var(--dog-body); }
#wool-scene .cream, .adopt-mini-scene .cream { fill: var(--dog-belly); }
#wool-scene .point, .adopt-mini-scene .point { fill: var(--dog-point); }

/* coat choice: quiet swatches, the pick shown as the coat itself */
.coat-row { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; }
.coat-swatch {
  width: 26px; height: 26px; border-radius: 50%; padding: 0;
  background: var(--dog-body);
  border: 2px solid var(--dog-point);
}
.coat-swatch:hover { transform: none; border-color: var(--walnut); }
.coat-swatch.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--walnut); }

.breath {
  transform-origin: 200px 452px;
  animation: breathe var(--dog-breath-period, 4.6s) ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.014); } }
/* .dogsleep = down for the night (23:00–05:00); room light (data-time) goes
   dark two hours earlier but the cat stays rousable until then. */
#wool-scene.dogsleep .breath, #wool-scene.sleeping .breath { animation-duration: 6.8s; }
/* pose_detail + age arrive as CSS vars from pet_state (--dog-lean,
   --dog-head-y). The individual rotate/translate properties compose with
   every JS-written transform instead of fighting it. */
.squishg {
  transform-origin: 200px 452px;
  rotate: var(--dog-lean, 0deg);
  transition: rotate 0.6s ease, translate .6s ease, scale .6s ease;
}
.dog-body {
  transform-origin: 200px 441px;
  scale: var(--dog-body-x, 1) var(--dog-body-y, 1);
  transition: scale .8s ease;
}
.dog-chest {
  transform-origin: 200px 438px;
  scale: var(--dog-chest-scale, 1);
  transition: scale .8s ease;
}
.headg {
  transform-origin: 200px 360px;
  translate: 0 var(--dog-head-y, 0);
  scale: var(--dog-head-scale, 1);
  transition: translate .6s ease, scale .8s ease;
}
#wool-scene.pose-earsback .earg { rotate: -12deg; }
#wool-scene.pose-stilltail .tailg { animation: none; }
#wool-scene.pose-wagfast .tailg { animation: wagfast 0.45s ease-in-out infinite; }
#wool-scene.headtilt .headg { animation: headtilt 2.2s ease-in-out 1; }
@keyframes headtilt {
  0%, 100% { transform: rotate(0); }
  30%, 70% { transform: rotate(9deg); }
}
#wool-scene.squished .squishg { animation: squish 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 1; }
@keyframes squish {
  0% { transform: scale(1, 1); }
  28% { transform: scale(1.055, 0.92); }
  58% { transform: scale(0.975, 1.035); }
  80% { transform: scale(1.012, 0.99); }
  100% { transform: scale(1, 1); }
}
#wool-scene.shakeoff .squishg { animation: shake 0.6s ease-in-out 1; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); }
  60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); }
}
#wool-scene.eating .squishg { animation: eatbob 1.4s ease-in-out 2; }
@keyframes eatbob {
  0%, 100% { transform: rotate(0) translateY(0); }
  35% { transform: rotate(-6deg) translateY(5px) scale(1.02, 0.97); }
  55% { transform: rotate(-4deg) translateY(3px); }
  75% { transform: rotate(-7deg) translateY(6px) scale(1.03, 0.96); }
}
.earg {
  transform-origin: 200px 320px;
  /* keep the ear bases glued to the skull. .headg scales about 200px 360px and
     .dog-body squashes about 200px 441px; both pry the ear base off the skull
     edge as stage proportions grow. The constants below are measured against
     the four life stages in app/engine/aging.py (hit-tested 2026-07-31): they
     cancel the stage-induced separation plus a small constant embed so the ear
     base always sits ~3px inside the coat. Re-measure if the figure art moves. */
  translate: 0 calc(var(--dog-ear-y, 0px) + 3.5px
    + (var(--dog-head-scale, 1) - 1) * 90px
    + (1 - var(--dog-body-y, 1)) * 171px);
  transition: transform .18s ease-out, rotate .45s ease, translate .6s ease;
}
#wool-scene.earflick .earg { animation: earflick 0.5s ease 1; }
@keyframes earflick { 0%, 100% { transform: rotate(0); } 45% { transform: rotate(-7deg); } }
#wool-scene.alert .earg { animation: earup 0.5s ease 1 forwards; }
@keyframes earup { to { transform: translateY(-5px); } }
.tailg {
  transform-origin: 252px 406px;
  scale: var(--dog-tail-scale, 1);
  animation: wagidle var(--dog-tail-period, 9s) ease-in-out infinite;
}
@keyframes wagidle {
  0%, 88%, 100% { transform: rotate(0); }
  92% { transform: rotate(5deg); } 96% { transform: rotate(-3deg); }
}
#wool-scene.stroking .tailg, #wool-scene.happy .tailg { animation: wagfast 0.45s ease-in-out infinite; }
@keyframes wagfast { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(-7deg); } }

#wool-scene.state-sitting .squishg { translate: 0 2px; }
#wool-scene.state-alert .headg { translate: 0 calc(var(--dog-head-y, 0px) - 4px); }
#wool-scene.state-alert .earg { rotate: 3deg; }
#wool-scene.state-playful .tailg { rotate: 5deg; }
#wool-scene.state-sleeping .squishg { translate: 0 5px; scale: 1.04 .94; }

.eyes-open, .eyes-happy, .eyes-side, .nap-eyes, .one-eye-eyes { transition: opacity 0.3s ease; }
.eyes-happy, .eyes-side, .nap-eyes, .one-eye-eyes { opacity: 0; }
#wool-scene.stroking .eyes-happy, #wool-scene.squished .eyes-happy, #wool-scene.happy .eyes-happy { opacity: 1; }
#wool-scene.stroking .eyes-open, #wool-scene.squished .eyes-open, #wool-scene.happy .eyes-open { opacity: 0; }
#wool-scene.sideeye .eyes-side { opacity: 1; }
#wool-scene.sideeye .eyes-open { opacity: 0; }
/* pose_detail eye_style: the judge's resting face, not a flash */
#wool-scene.pose-sideeye:not(.sleeping):not(.dogsleep) .eyes-side { opacity: 1; }
#wool-scene.pose-sideeye:not(.sleeping):not(.dogsleep) .eyes-open { opacity: 0; }
#wool-scene.dogsleep .eyes-open, #wool-scene.sleeping .eyes-open,
#wool-scene.melted .eyes-open { opacity: 0; }
#wool-scene.dogsleep .nap-eyes, #wool-scene.sleeping .nap-eyes,
#wool-scene.melted .nap-eyes { opacity: 1; }
#wool-scene.pose-oneeye.sleeping .nap-eyes,
#wool-scene.pose-oneeye.dogsleep .nap-eyes { opacity: 0; }
#wool-scene.pose-oneeye.sleeping .one-eye-eyes,
#wool-scene.pose-oneeye.dogsleep .one-eye-eyes { opacity: 1; }
#wool-scene.dogsleep .eyes-happy, #wool-scene.sleeping .eyes-happy { opacity: 0 !important; }
/* idle blink: a fast hard beat, not an animation — hides whichever eye
   group is showing for ~150ms (skips nap-eyes; sleep has its own rhythm) */
#wool-scene.blink .eyes-open, #wool-scene.blink .eyes-happy, #wool-scene.blink .eyes-side {
  transition: opacity 0.06s ease;
  opacity: 0 !important;
}
.paw-dream { opacity: 0; }
#wool-scene.dogsleep .paw-dream, #wool-scene.sleeping .paw-dream {
  opacity: 1; animation: paddle 2.6s ease-in-out infinite; transform-origin: 172px 446px;
}
@keyframes paddle {
  0%, 60%, 100% { transform: rotate(0); }
  70% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } 90% { transform: rotate(6deg); }
}

.focusmote { opacity: 0; transform-origin: 132px 166px; }
#wool-scene.pose-focusmote .focusmote {
  opacity: .65;
  animation: focusmote 5.6s ease-in-out infinite;
}
#wool-scene.pose-focusmote #dog-eyes { transform: translate(-3px, -2px); }
@keyframes focusmote {
  0%, 100% { transform: translate(-3px, 2px); }
  50% { transform: translate(5px, -4px); }
}

/* objects + traces (tenet 5: evidence in the room) */
.ballg { transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.3, 1); }
.kibbleg circle { transition: opacity 0.4s ease; }
#wool-scene.trace-kibble .kibbleg circle { opacity: var(--trace-kibble-opacity, .6); }
/* the bowl calls when it's been a while: a soft glow + fill-me kibble hints */
.bowlglow { opacity: 0; transition: opacity 1.2s ease; }
#wool-scene.hungry .bowlglow { opacity: .9; }
.kibble-hint { opacity: 0; transition: opacity 1.2s ease; }
#wool-scene.hungry .kibble-hint { opacity: .55; }
/* bowl-gaze: a hungry cat's eyes keep drifting to the bowl */
#wool-scene.bowlgaze #dog-eyes { transform: translate(-4px, 3px); transition: transform .5s ease; }
.rugwarm { opacity: 0; transition: opacity 2s ease; }
#wool-scene.trace-rug .rugwarm { opacity: var(--trace-rug-opacity, .55); }
.leashg {
  transform-origin: 386px 246px;
  opacity: .72;
  transition: opacity .8s ease, filter .8s ease, rotate .8s ease;
}
#wool-scene.leashswing .leashg { animation: swing 1.6s ease 1; }
#wool-scene.trace-leash .leashg {
  opacity: max(.78, var(--trace-leash-opacity, .3));
  rotate: 6deg;
  filter: drop-shadow(0 2px 2px rgba(74,60,44,.22));
}
@keyframes swing { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(12deg); } 65% { transform: rotate(-7deg); } }
/* walk: the pet steps out the door edge; only the swinging leash says where */
#dogmove { transition: opacity 0.5s ease; }
#wool-scene.out-walking #dogmove { opacity: 0; }

/* brushed nap: grooming lines a stroke leaves in the coat, ~1h */
.brushstreak path {
  stroke: #f2cb97; stroke-width: 4.5; stroke-linecap: round; fill: none;
}
.brushstreak { opacity: 0; transition: opacity 1.6s ease; }
#wool-scene.trace-brushed .brushstreak { opacity: 0.45; }

.phone-trace {
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(244,185,106,.5));
  transition: opacity 1.2s ease;
}
#wool-scene.trace-phone-shelf .phone-shelf {
  opacity: var(--trace-phone-shelf-opacity, .5);
}
#wool-scene.trace-phone-floor .phone-floor {
  opacity: var(--trace-phone-floor-opacity, .5);
}

/* the stash lump: invisible AND untouchable until zoomies leave it
   (opacity:0 alone keeps hit-testing) */
.ruglump { opacity: 0; pointer-events: none; transition: opacity 1.2s ease; }
.ruglump.show,
#wool-scene.trace-stash .ruglump { opacity: 1; pointer-events: auto; }

.dustp { opacity: 0; }
.dustp.puff { animation: dustpuff 0.45s ease-out 1; }
@keyframes dustpuff {
  0% { opacity: 0.55; transform: translate(0, 0) scale(0.6); }
  100% { opacity: 0; transform: translate(-12px, 3px) scale(1.4); }
}

.dog-contact {
  transform-box: fill-box;
  transform-origin: center;
}
.touchfibers {
  opacity: 0;
  fill: none;
  stroke: var(--dog-belly);
  stroke-width: 2.2;
  stroke-linecap: round;
  transform-origin: 200px 376px;
}
#wool-scene.fiber-touch .dog-contact {
  animation: fiber-contact 420ms ease-out;
}
#wool-scene.fiber-touch .touchfibers {
  animation: fiber-burst 420ms ease-out;
}
@keyframes fiber-contact {
  0% { opacity: .28; transform: scale(1); }
  42% { opacity: .42; transform: scale(1.12); }
  100% { opacity: .28; transform: scale(1); }
}
@keyframes fiber-burst {
  0% { opacity: 0; transform: scale(.88); }
  32% { opacity: .72; }
  100% { opacity: 0; transform: scale(1.08); }
}
#wool-scene.lamp-touch .lamp-partner .glowpool {
  animation: lamp-touch 520ms ease-out;
}
@keyframes lamp-touch {
  0% { opacity: .35; }
  45% { opacity: .8; }
  100% { opacity: .35; }
}
#wool-scene.partner-arrived .rugstitch,
#wool-scene.return-wake .rugstitch {
  animation: wool-wake 1.4s ease-out 1;
}
#wool-scene.return-wake .lamp-partner .glowpool {
  animation: return-lamp 1.8s ease-out 1;
}
@keyframes wool-wake {
  0% { stroke-dashoffset: 0; opacity: .55; }
  45% { opacity: 1; }
  100% { stroke-dashoffset: -26; opacity: .7; }
}
@keyframes return-lamp {
  0% { opacity: .12; }
  38% { opacity: .66; }
  100% { opacity: .3; }
}

/* andon lamps: ember → afterglow → lit; arrival flares */
.lamp { cursor: pointer; }
.lamp .glowpool, .lamp .gloworb { transition: opacity 1.2s ease; }
.lamp .gloworb { filter: blur(6px); }
.lamp-self .glowpool { opacity: 0.55; }
.lamp-self .gloworb { opacity: 0.95; }
.lamp-partner[data-state="ember"] .glowpool { opacity: 0.12; }
.lamp-partner[data-state="ember"] .gloworb { opacity: 0.22; }
.lamp-partner[data-state="afterglow"] .glowpool { opacity: 0.3; }
.lamp-partner[data-state="afterglow"] .gloworb { opacity: 0.5; }
.lamp-partner[data-state="lit"] .glowpool { opacity: 0.55; }
.lamp-partner[data-state="lit"] .gloworb { opacity: 0.95; }
.flareg { opacity: 0; }
#wool-scene.partner-arrived .lamp-partner .flareg {
  animation: flare 1.6s ease-out 2; transform-origin: 349px 318px;
}
@keyframes flare { 0% { opacity: 0.7; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.5); } }
.heartg { opacity: 0; transition: opacity 0.5s ease; transform-origin: 349px 315px; }
.heartg.show { opacity: 1; animation: heartpulse 1.2s ease-in-out 2; }
@keyframes heartpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
/* a ♥ waiting on YOUR lamp: quietly alive until you touch it */
.heartg.heartwait { opacity: 1; transform-origin: 53px 310px; animation: heartpulse 3.2s ease-in-out infinite; }
.lampname {
  font-family: var(--sans); font-size: 9px; letter-spacing: 1.4px;
  text-transform: uppercase; fill: #55493a;
}

/* speech as breath + the rhythm line + the whisper */
.utter {
  position: absolute;
  left: 0; right: 0; top: 34%;
  text-align: center;
  font-size: 14.5px;
  font-style: italic;
  color: #4a3826;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  pointer-events: none;
  padding: 0 44px;
  margin: 0;
  z-index: 5;
  text-shadow: 0 1px 8px rgba(222, 210, 189, 0.8);
}
#wool-scene[data-time="dusk"] .utter, #wool-scene[data-time="night"] .utter {
  color: #f0e4cc; text-shadow: 0 1px 8px rgba(20, 16, 12, 0.6);
}
.utter.show { opacity: 0.95; transform: translateY(0); }
/* ambient narration: a caption under the framed room, never inside it */
.room-caption {
  margin: 8px 4px 0;
  text-align: center;
  font-size: 12px;
  font-style: italic;
  color: var(--accent);
  line-height: 1.35;
}
.whisper {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-top: 1px solid rgba(128, 118, 100, 0.28);
  border-radius: 0;
  background: none;
  width: 100%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: #5f5342;
  cursor: text;
}
.whisper:hover { transform: none; border-color: rgba(128, 118, 100, 0.28); color: #453b2d; }
#wool-scene[data-time="dusk"] .whisper, #wool-scene[data-time="night"] .whisper { color: #c9bda2; }
.composer {
  position: absolute;
  left: 8px; right: 8px; bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 6;
}
.composer .input { background: rgba(247, 241, 227, 0.96); }
.send-quiet { border-color: rgba(154, 138, 114, 0.4); background: rgba(247, 241, 227, 0.9); }
.composer-close { padding: 8px 12px; background: rgba(247, 241, 227, 0.9); }

/* ---------- exception lane ---------- */
.scene-sidecar { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.invite-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.invite-title { margin: 0; font-size: 17px; line-height: 1.3; }
.invite-link {
  display: block; padding: 10px 12px; border-radius: 12px;
  background: rgba(154, 138, 114, 0.1); color: var(--accent);
  font-size: 12px; word-break: break-all;
}
.invite-copy { align-self: flex-start; padding-inline: 14px; }
.invite-copy.is-copied { color: #7a5c34; border-color: var(--pet); }
.recovery-card { position: relative; }
.recovery-card.collapsed { padding: 0; border: none; background: none; box-shadow: none; }
.recovery-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 999px; background: rgba(226, 167, 111, 0.14);
  border: 1px solid rgba(203, 143, 90, 0.4); color: #8a6a42; font-size: 13px;
  cursor: pointer; align-self: flex-start;
}
.recovery-collapse {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  border: none; border-radius: 50%; background: rgba(127, 110, 88, 0.08);
  color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.verb-row { display: flex; flex-wrap: wrap; gap: 6px; }
.room-verbs {
  justify-content: center;
  margin-top: 9px;
}
.verb {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--ink); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--hair); background: none;
}
.verb:hover { color: var(--ink); border-color: var(--line); }

.milestone {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  width: min(92vw, 380px);
  padding: 14px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(203, 143, 90, 0.5);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.milestone-kicker { margin: 0; letter-spacing: 1.6px; text-transform: uppercase; color: #a87b4a; }
.milestone-fragment { font-style: italic; line-height: 1.4; }
.milestone-dismiss {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  border: none; border-radius: 50%; background: rgba(127, 110, 88, 0.08);
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- drawers ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(46, 36, 26, 0.4);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 9;
}
.drawer {
  position: fixed;
  right: 16px; top: 16px; bottom: 16px;
  width: min(92vw, 360px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
  box-shadow: var(--shadow);
}
.drawer-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px;
  border: none; border-radius: 50%; background: rgba(127, 110, 88, 0.08);
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer hr { border: 0; border-top: 1px solid var(--hair); margin: 10px 0; }
.drawer .wrap { word-break: break-all; color: var(--accent); font-size: 12px; }
.memory-group { margin-top: 14px; }
.memory-group-label { letter-spacing: 1.6px; text-transform: uppercase; margin: 0 0 6px; }
.room-notes-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink); }
.room-notes-list li + li { margin-top: 8px; }
.note-keep { margin-left: 6px; padding: 0 8px; }

.danger-hold { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.danger-hold::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(190, 110, 96, 0.3); width: 0; pointer-events: none;
  transition: width 0s linear;
}
.danger-hold.is-holding { border-color: rgba(190, 110, 96, 0.6); }
.danger-hold.is-holding::before { width: 100%; transition: width 1.5s linear; }
.danger-hold > span { position: relative; z-index: 1; }

/* ---------- global pills + onboarding ---------- */
.fresh-version-pill {
  position: fixed;
  bottom: max(70px, calc(env(safe-area-inset-bottom) + 70px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 13;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid rgba(203, 143, 90, 0.5);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.fresh-version-pill button { background: transparent; border: none; color: inherit; font-size: 13px; cursor: pointer; padding: 6px 8px; }
.fresh-version-pill .dismiss {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(127, 110, 88, 0.08); color: var(--muted);
  font-size: 14px; line-height: 1; padding: 0;
}

.onboarding-overlay {
  position: fixed; inset: 0; z-index: 11;
  background: rgba(38, 30, 22, 0.6);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; cursor: pointer; padding: 24px;
}
.onboarding-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(240, 228, 204, 0.25); background: rgba(0,0,0,0.2);
  color: #f0e4cc; font-size: 20px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.onboarding-line {
  margin: 0; text-align: center;
  font-size: clamp(22px, 5vw, 32px);
  letter-spacing: -0.4px; color: #f0e4cc; line-height: 1.35;
  max-width: 22ch;
  animation: onboard-in 600ms ease;
}
.onboarding-hint { margin: 0; letter-spacing: 1.4px; text-transform: uppercase; color: #b3a68c; }
.onboarding-progress { margin: 0; color: #b3a68c; letter-spacing: 0.6px; }
@keyframes onboard-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.status { margin-top: 20px; text-align: center; min-height: 16px; }

/* ---------- access gate ---------- */
.access-body { background: var(--bg); }
.access-root { display: grid; place-items: center; max-width: 680px; }
.access-card { width: 100%; padding: 22px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.access-scene {
  position: relative; height: 200px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, var(--oatmeal) 0%, var(--oatmeal) 64%, var(--greige) 64.4%, var(--greige) 100%);
  border: 1px solid var(--line); margin-bottom: 18px;
}
.access-moon {
  position: absolute; top: 28px; left: 44px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--flax); border: 2px solid #c4b493;
}
.access-floor { display: none; }
.access-pet { position: absolute; right: 90px; bottom: 30px; width: 120px; height: 92px; }
.access-pet span { position: absolute; display: block; background: var(--pet); }
.access-tail { left: 8px; top: 26px; width: 30px; height: 30px; border-radius: 50%; background: #c07a40; }
.access-body-shape { left: 22px; top: 12px; width: 76px; height: 66px; border-radius: 46% 46% 42% 42%; }
.access-head { display: none; }
.access-copy { text-align: center; margin-bottom: 18px; }
.access-kicker { letter-spacing: 2px; text-transform: uppercase; }
.access-logo { margin: 0 0 8px; }
.access-note { margin: 0 0 8px; }
.access-note-quiet { max-width: 34ch; margin: 0 auto 8px; }
.access-form { max-width: 420px; margin: 0 auto; }
.access-label { display: block; text-align: left; margin-bottom: 6px; }
.access-row { margin: 0; }
.access-status { min-height: 18px; margin: 10px 2px 0; }
.access-footnote { margin: 12px auto 0; max-width: 34ch; text-align: center; }
.access-form.is-error .input { border-color: #be6e60; }
.access-guest { margin: 18px auto 0; max-width: 420px; text-align: center; }
.access-guest-button { font-size: 13px; padding: 6px 14px; }
.access-guest-status { min-height: 16px; margin: 8px 2px 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .landing-shell { min-height: auto; grid-template-columns: 1fr; align-items: stretch; }
  .adopt-layout { grid-template-columns: 1fr; }
  .adopt-preview { position: static; }
  .scene-stage,
  .scene-stage.has-sidecar { grid-template-columns: minmax(0, 1fr); }
  .room-col,
  .scene-sidecar { width: 100%; max-width: 500px; justify-self: center; }
}

@media (min-width: 861px) and (max-height: 650px) {
  .adopt-preview { position: static; }
}

@media (max-width: 640px) {
  .root { padding: 12px 10px 10px; }
  .landing-scene, .landing-entry, .adopt-preview, .adopt-form { padding: 18px; }
  .quirk-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(82vw, 310px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    padding-bottom: 8px;
  }
  .quirk-grid li { scroll-snap-align: center; }
  .quirk-card { height: 100%; }

  .scene-header { gap: 8px; }
  .name { font-size: 26px; letter-spacing: -1px; }
  .household-line { font-size: 12px; }
  .menu-button { padding: 5px 10px; font-size: 12px; }
  .scene-stage { gap: 10px; }
  .composer, .row { flex-wrap: wrap; }
  .verb-row { justify-content: center; }
  /* keep the milestone card clear of the header on small screens */
  .milestone { top: 76px; }
}

/* Short-viewport rescue (iPhone SE class): cap the scene so the whisper line
   and the cat both stay on screen without scrolling. The svg is width-driven
   (aspect 400:520), so cap via max-width on the scene itself. */
@media (max-width: 860px) and (max-height: 700px) {
  #wool-scene { max-width: 320px; margin: 0 auto; }
}

@media (min-width: 560px) and (max-width: 860px) and (max-height: 500px) and (orientation: landscape) {
  .root { padding: 10px 20px; }
  .scene { gap: 8px; }
  .scene-header { align-items: flex-start; }
  .name { font-size: 28px; }
  .room-col {
    display: grid;
    grid-template-columns: minmax(168px, min(27vw, 200px)) minmax(220px, 300px);
    grid-template-areas:
      "room caption"
      "room verbs";
    gap: 10px 16px;
    align-items: center;
    max-width: 540px;
  }
  #wool-scene { grid-area: room; max-width: none; margin: 0; }
  .room-caption {
    grid-area: caption;
    align-self: end;
    margin: 0;
  }
  .room-verbs {
    grid-area: verbs;
    align-self: start;
    justify-content: flex-start;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heartg.heartwait,
  .breath, .tailg, .earg,
  #wool-scene.squished .squishg,
  #wool-scene.shakeoff .squishg,
  #wool-scene.eating .squishg,
  #wool-scene.stroking .tailg,
  #wool-scene.pose-wagfast .tailg,
  #wool-scene.headtilt .headg,
  #wool-scene.leashswing .leashg,
  #wool-scene.partner-arrived .flareg,
  #wool-scene.dogsleep .paw-dream,
  #wool-scene.sleeping .paw-dream,
  #wool-scene.fiber-touch .dog-contact,
  #wool-scene.fiber-touch .touchfibers,
  #wool-scene.lamp-touch .lamp-partner .glowpool,
  #wool-scene.partner-arrived .rugstitch,
  #wool-scene.return-wake .rugstitch,
  #wool-scene.return-wake .lamp-partner .glowpool,
  #wool-scene.pose-focusmote .focusmote,
  .heartg.show,
  .dustp.puff,
  .onboarding-line,
  .adopt-mini-scene .mini-dog,
  .adopt-mini-scene .mini-mote,
  .adopt-mini-scene .mini-stash { animation: none !important; }
  .lightlayer, .lamp .glowpool, .lamp .gloworb,
  .window-wash, .night-partner-pool, .room-verbs,
  .squishg, .headg, .dog-body, .dog-chest, .earg, #dog-eyes,
  .eyes-open, .eyes-happy, .eyes-side, .nap-eyes, .one-eye-eyes,
  .ballg, .kibbleg circle, .rugwarm, .leashg, #dogmove,
  .brushstreak, .ruglump, .phone-trace, .heartg, .utter,
  .sunbtn, .moonbtn, .mini-dog, .mini-shadow, .mini-eye,
  .mini-mote, .mini-stash { transition: none !important; }
  button,
  [x-transition] {
    animation: none !important;
    transition: none !important;
  }
  button:hover { transform: none; }
  #wool-scene.headtilt .headg { rotate: 8deg; }
  #wool-scene.earflick .earg { rotate: -7deg; }
  #wool-scene.leashswing .leashg { rotate: 8deg; }
  #wool-scene.partner-arrived .flareg { opacity: .42; }
  #wool-scene.fiber-touch .dog-contact { opacity: .4; }
  #wool-scene.fiber-touch .touchfibers { opacity: .7; }
  #wool-scene.lamp-touch .lamp-partner .glowpool { opacity: .7; }
  #wool-scene.partner-arrived .rugstitch,
  #wool-scene.return-wake .rugstitch { opacity: 1; }
  .adopt-mini-scene.audition-hides-small-things .mini-dog {
    transform: translate(42px, 0) rotate(-4deg);
  }
  .adopt-mini-scene.audition-hides-small-things .mini-stash { opacity: 1; }
  .adopt-mini-scene.audition-zoomie-initiator .mini-dog {
    transform: translate(36px, 4px) rotate(6deg);
  }
}

/* the pet is next door visiting: the room keeps its place, empty. */
#dogmove { transition: opacity .6s ease; }
#dogmove.away { opacity: 0; }

/* ─────────────────────── the door next door ─────────────────────── */
.doorg { cursor: pointer; outline: none; }
.doorg:focus-visible .doorleaf { stroke: var(--accent, #9a6a2c); stroke-width:2; }
.doorname {
  font-family: var(--sans); font-size: 9px; letter-spacing: 1.4px;
  text-transform: uppercase; fill: #55493a;
}
.doorglow { opacity: .34; transition: opacity .8s ease; }
.doorg[data-state="asleep"] .doorglow { opacity: .1; }
.doorg[data-state="asleep"] .doorleaf { fill: #a7937a; }
.doorz {
  font-family: var(--sans); font-size: 10px; font-style: italic;
  fill: #6f604a; opacity: 0;
  animation: zfloat 3.4s ease-in-out infinite;
}
.doorz.z2 { font-size: 8px; animation-delay: 1.5s; }
@keyframes zfloat {
  0%, 100% { transform: translateY(0); opacity: 0; }
  30% { opacity: .85; }
  60% { transform: translateY(-3px); opacity: .4; }
}
.doorpresence { fill: #f4b96a; }
/* first-days discovery: until anyone has crossed once, the door breathes. */
.doorpulse .doorglow { animation: doorpulse 2.8s ease-in-out infinite; }
@keyframes doorpulse { 0%, 100% { opacity: .18; } 50% { opacity: .72; } }

/* ─────────────────────── the playdate guest ─────────────────────── */
#visitormove { transition: opacity .5s ease; }
/* the guest settles a touch apart from the room's own gravity */
#visitormove .breath { animation-duration: 5.4s; }

/* ─────────────────────── ceremony + second-adopt ─────────────────────── */
.ceremony-card { border-left: 3px solid #c07a40; }
.ceremony-drawer .ceremony-preview { max-width: 220px; margin: 4px auto 10px; }
.ceremony-quirks { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.ceremony-quirks .quirk-card { width: 100%; }
.ceremony-quirks .quirk-card:disabled { opacity: .55; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .doorz, .doorpulse .doorglow { animation: none !important; }
  .doorpulse .doorglow { opacity: .5; }
  #dogmove, #visitormove, .doorglow { transition: none !important; }
}

/* detail line-work follows the point wool. (Kept as a generic hook: pack
   figures may paint with .pointstroke the same way.) */
.pointstroke { stroke: var(--dog-point); }
