/* ============================================================
   Habitar — Design System "Entardecer"
   Casa acolhedora + elegância editorial.
   Regras: sombras sempre marrom-quentes (nunca cinzas), nada de
   branco puro em áreas grandes, cor do cômodo sempre derivada
   via color-mix (nunca crua em texto).
   ============================================================ */

:root {
  color-scheme: light;

  /* fundos (do mais profundo ao mais elevado) */
  --bg-deep:        #EFE8D9;
  --bg:             #F6F1E7;
  --surface:        #FBF7EE;
  --surface-raised: #FDFBF5;
  --surface-sunken: #F1EADB;

  /* tintas */
  --ink:        #33302A;
  --ink-body:   #3E3A34;
  --ink-soft:   #615A4E;
  --ink-faint:  #978E81; /* só decorativo, nunca texto corrido */

  /* acento madeira */
  --accent:      #A98467;
  --accent-deep: #7C5F45;

  /* linhas */
  --line:        #E6DCC9;
  --line-strong: #D6C9B2;
  --line-faint:  #EFE8D8;

  /* entardecer (uso ritual) */
  --sunset-rose:  #E8B9A4;
  --sunset-amber: #EFCB9E;
  --sunset-gold:  #F3DDB4;
  --sunset-glow:  #F7C873;

  /* traço das ilustrações */
  --stroke-ink: #4A3F35;

  /* sombras — pigmento único marrom-madeira */
  --shadow-ink: 87 62 39;
  --shadow-1:
    0 1px 2px  rgb(var(--shadow-ink) / 0.05),
    0 3px 8px -2px rgb(var(--shadow-ink) / 0.07);
  --shadow-2:
    0 1px 2px  rgb(var(--shadow-ink) / 0.05),
    0 8px 18px -6px  rgb(var(--shadow-ink) / 0.12),
    0 20px 38px -18px rgb(var(--shadow-ink) / 0.18);
  --shadow-3:
    0 2px 4px  rgb(var(--shadow-ink) / 0.05),
    0 12px 26px -8px  rgb(var(--shadow-ink) / 0.14),
    0 34px 70px -24px rgb(var(--shadow-ink) / 0.26);
  --edge-light: inset 0 1px 0 rgb(255 253 246 / 0.7);

  --radius-s: 14px;
  --radius:   20px;
  --radius-l: 28px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, "Segoe UI", sans-serif;

  /* escala tipográfica */
  --text-display: clamp(2.75rem, 6vw + 1.6rem, 4.5rem);
  --text-h1:      clamp(1.9rem,  4vw + 1rem,   2.75rem);
  --text-h2:      clamp(1.5rem,  2.6vw + 0.9rem, 2rem);
  --text-h3:      clamp(1.17rem, 1vw + 0.9rem, 1.35rem);
  --text-lead:    clamp(1.1rem,  1.2vw + 0.95rem, 1.3rem);
  --text-quote:   clamp(1.3rem,  2.4vw + 0.9rem, 1.6rem);
  --text-body:    clamp(1rem,    0.4vw + 0.92rem, 1.0625rem);
  --text-reading: clamp(1.06rem, 0.5vw + 0.98rem, 1.14rem);
  --text-small:   0.9rem;
  --text-micro:   0.75rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
  --glow: #F7C873;
  --dur-in: 0.55s;
  --dur-out: 0.18s;
}

/* derivados da cor do cômodo — resolvidos no html, onde --room é definida */
html {
  --room: #D8C8B4;
  --room-tint: color-mix(in srgb, var(--room) 12%, var(--surface));
  --room-tint-strong: color-mix(in srgb, var(--room) 30%, var(--surface));
  --room-line: color-mix(in srgb, var(--room) 38%, var(--line));
  --room-deep: color-mix(in srgb, var(--room) 42%, var(--ink));
  --room-shadow: 0 16px 32px -14px
    color-mix(in srgb, var(--room) 45%, rgb(var(--shadow-ink) / 0.9));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-body);
  line-height: 1.65;
  font-size: var(--text-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  min-height: 100dvh;
  position: relative;
  overscroll-behavior-y: none;
}

/* grain de papel — rasterizado uma vez, zero repaint no scroll */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}
@media (prefers-reduced-transparency: reduce) {
  body::before { display: none; }
}

#app { position: relative; z-index: 2; min-height: 100dvh; display: flex; flex-direction: column; }

::selection { background: color-mix(in srgb, var(--sunset-glow) 45%, transparent); color: var(--ink); }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- telas ---------- */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 20px calc(48px + env(safe-area-inset-bottom));
  animation: screenIn 0.55s var(--ease-out) both;
  position: relative; /* ancora o canvas de atmosfera */
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* saída de tela (sem flicker na troca de innerHTML) */
.screen.is-leaving {
  animation: screenOut var(--dur-out) ease both;
  pointer-events: none;
}
@keyframes screenOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* modo etapa (experiência de leitura): topbar/progresso estáticos,
   só o miolo vira página */
.screen.step-mode { animation: none; }
.screen.step-mode .step-anim { animation: stepIn 0.45s var(--ease-settle) both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}
.screen.is-leaving.step-mode { animation: none; }
.screen.is-leaving.step-mode .step-anim { animation: stepOut 0.15s ease both; }
@keyframes stepOut {
  to { opacity: 0; transform: translateX(-14px); }
}

/* entradas staggered: JS grava --i em cada filho de [data-stagger] */
[data-stagger] > * {
  --i: 0;
  animation: riseIn 0.55s var(--ease-settle) both;
  animation-delay: min(calc(90ms + var(--i) * 55ms), 620ms);
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* toque e foco */
html { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}
:where(a, button):focus:not(:focus-visible) { outline: none; }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }

.type-lead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 360;
  font-size: var(--text-lead);
  line-height: 1.45;
  letter-spacing: 0.002em;
  color: var(--accent-deep);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

/* ---------- loading: a casa se desenha, a janela acende ---------- */
.loading {
  min-height: 100dvh;
  display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.loading::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(233, 189, 176, 0.30), transparent 55%),
    radial-gradient(ellipse at 18% 82%, rgba(234, 211, 162, 0.22), transparent 60%),
    radial-gradient(ellipse at 82% 76%, rgba(183, 199, 215, 0.20), transparent 60%);
  filter: blur(6px);
  pointer-events: none;
}
.loading > * { position: relative; }
.loading-house { width: 84px; height: auto; margin-bottom: 10px; }
.lh-outline {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: lhDraw 1.3s ease-out forwards;
}
@keyframes lhDraw { to { stroke-dashoffset: 0; } }
.lh-window {
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation:
    lhWindowIn 0.5s ease 0.95s forwards,
    lhBreathe 2.2s ease-in-out 1.5s infinite;
}
@keyframes lhWindowIn { to { opacity: 1; } }
@keyframes lhBreathe {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(247, 200, 115, 0.5)); }
  50%      { filter: drop-shadow(0 0 12px rgba(247, 200, 115, 0.95)); }
}
.loading-mark {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 450; color: var(--ink);
  animation: loadFade 0.8s ease 0.35s both;
}
.loading-hint {
  font-family: var(--font-display); font-style: italic;
  font-size: 13.5px; color: var(--ink-faint);
  animation: loadFade 0.8s ease 0.65s both;
}
@keyframes loadFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 15px 30px;
  border-radius: 999px;
  border: none; cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn:focus-visible,
.option:focus-visible,
.room-card:focus-visible,
.object-card:focus-visible,
.btn-quiet:focus-visible,
.back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background:
    linear-gradient(180deg, rgb(255 250 240 / 0.14), transparent 45%),
    #332E27;
  color: #FBF7EE;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover {
  background:
    linear-gradient(180deg, rgb(255 250 240 / 0.18), transparent 45%),
    #453E33;
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0) scale(0.985); box-shadow: var(--shadow-1); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.btn-ghost:active { transform: scale(0.985); }

.btn-quiet {
  background: none; border: none; cursor: pointer;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 8px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.btn-quiet:hover  { color: var(--accent-deep); text-decoration-color: var(--accent); }
.btn-quiet:active { color: var(--ink); }

.btn-block { width: 100%; }
.btn-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

/* ---------- barra superior ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; }
.topbar .back {
  background: var(--surface); border: 1px solid var(--line);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; color: var(--ink-soft);
  box-shadow: var(--edge-light), var(--shadow-1);
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s var(--ease-out);
  flex-shrink: 0;
}
.topbar .back:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateX(-2px); }
.topbar .topbar-title {
  font-family: var(--font-display); font-size: 17px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; gap: 8px;
}
.topbar .topbar-title .obj-icon { width: 22px; height: 22px; }

/* ícones SVG dos objetos */
.obj-icon { display: block; width: 100%; height: 100%; }

/* ============================================================
   LANDING — chegada ao entardecer
   ============================================================ */
.landing {
  max-width: none;
  padding: 0;
  justify-content: center; align-items: center; text-align: center;
  position: relative;
  /* o céu da chegada muda com a hora do dia (classes ceu-* no <html>) */
  background:
    radial-gradient(120% 85% at 78% -10%,
      var(--ceu-alto, color-mix(in srgb, var(--sunset-rose) 55%, transparent)), transparent 62%),
    radial-gradient(110% 75% at 12% 8%,
      var(--ceu-lado, color-mix(in srgb, var(--sunset-gold) 45%, transparent)), transparent 58%),
    linear-gradient(178deg,
      var(--ceu-topo, color-mix(in srgb, var(--sunset-amber) 22%, var(--bg))) 0%,
      var(--ceu-meio, var(--bg)) 46%,
      var(--ceu-baixo, var(--bg-deep)) 100%);
  transition: background-color 1.2s ease;
}
.landing-inner {
  width: 100%; max-width: 660px;
  margin: 0 auto;
  padding: 48px 22px calc(40px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
}
.landing-art {
  width: min(420px, 82vw);
  margin-bottom: 6px;
  filter: drop-shadow(0 24px 40px rgb(var(--shadow-ink) / 0.18));
}
.landing-art svg { width: 100%; height: auto; display: block; }
.landing h1 {
  font-size: var(--text-display);
  font-weight: 420;
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 144;
  margin-top: 10px;
}
.landing .tagline {
  font-family: var(--font-display); font-style: italic; font-weight: 360;
  font-size: var(--text-lead); color: var(--accent-deep);
  margin-top: 8px;
}
.landing .intro {
  max-width: 430px; color: var(--ink-soft); margin-top: 20px;
}
.landing .btn-primary {
  margin-top: 34px; padding: 17px 44px; font-size: 1.05rem;
  box-shadow: 0 0 0 1px rgb(255 253 246 / 0.35), var(--shadow-2);
}
.landing .credit {
  margin-top: 48px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6;
}
.landing .credit a { color: inherit; text-underline-offset: 3px; }

/* ============================================================
   CHECK-IN
   ============================================================ */
.checkin-progress { display: flex; gap: 8px; justify-content: center; padding: 6px 0 8px; }
.checkin-progress i {
  width: 34px; height: 4px; border-radius: 4px;
  background: var(--surface-sunken);
  box-shadow: inset 0 1px 2px rgb(var(--shadow-ink) / 0.06);
  transition: background 0.3s ease;
}
.checkin-progress i.on {
  background: linear-gradient(90deg, var(--accent), var(--sunset-glow));
  box-shadow: none;
}

.checkin .eyebrow { text-align: center; display: block; margin: 14px 0 10px; }
.checkin h2 {
  font-size: var(--text-h2);
  font-weight: 460;
  line-height: 1.22;
  text-align: center;
  max-width: 480px; margin: 0 auto 28px;
}

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15.5px; font-weight: 500; color: var(--ink-body);
  cursor: pointer; text-align: left;
  box-shadow: var(--edge-light), var(--shadow-1);
  transition: border-color 0.15s ease, background 0.15s ease,
    transform 0.15s var(--ease-out), box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.option:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--edge-light), var(--shadow-2);
}
.option.selected {
  border-color: var(--accent);
  background: linear-gradient(165deg,
    color-mix(in srgb, var(--sunset-gold) 40%, var(--surface)),
    var(--surface) 75%);
  transform: scale(0.99);
}
.option .icon { font-size: 20px; flex-shrink: 0; }
@media (max-width: 460px) { .options { grid-template-columns: 1fr; } }
.options.long { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; width: 100%; }

/* ============================================================
   RESULTADO — a casa acende uma janela
   ============================================================ */
.result { text-align: center; justify-content: center; align-items: center; }
.result .intro-line {
  font-family: var(--font-display); font-style: italic; font-weight: 350;
  font-size: var(--text-quote); line-height: 1.42;
  color: var(--ink);
  max-width: 440px;
  text-wrap: balance;
  animation: screenIn 0.9s ease both;
}
.house-figure {
  margin: 30px auto 26px;
  width: min(340px, 76vw);
  filter: drop-shadow(0 20px 34px rgb(var(--shadow-ink) / 0.2));
}
.house-figure svg { width: 100%; height: auto; display: block; }

.house-window { transition: fill 0.6s ease; }
.house-window.lit {
  fill: var(--glow) !important;
  animation: windowGlow 2.8s ease-in-out 0.6s infinite;
}
@keyframes windowGlow {
  0%, 100% { filter: drop-shadow(0 0 3px rgb(247 200 115 / 0.45)); }
  50%      { filter: drop-shadow(0 0 16px rgb(247 200 115 / 0.95)); }
}

/* a fumaça sobe além do viewBox — os SVGs da casa não podem cortar */
.dollhouse svg,
.house-figure svg,
.landing-art svg,
.final-card .final-house svg { overflow: visible; }

/* fumaça da chaminé (grupo #smoke nos SVGs ilustrados) */
#smoke > * {
  animation: smokeRise 4.2s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
  opacity: 0;
  will-change: transform, opacity;
}
#smoke > *:nth-child(2) { animation-delay: 1.4s; }
#smoke > *:nth-child(3) { animation-delay: 2.8s; }
@keyframes smokeRise {
  0%   { transform: translate(0, 0) scale(0.7);        opacity: 0; }
  12%  {                                               opacity: 0.5; }
  60%  { transform: translate(4px, -26px) scale(1.25); opacity: 0.32; }
  100% { transform: translate(8px, -44px) scale(1.65); opacity: 0; }
}

/* estrelas piscando (fallback e ilustrações com .star) */
.star {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.2;
  animation: twinkle 3.6s ease-in-out infinite;
}
.star:nth-child(2) { animation-delay: 0.7s;  animation-duration: 4.1s; }
.star:nth-child(3) { animation-delay: 1.9s; }
.star:nth-child(4) { animation-delay: 1.1s;  animation-duration: 4.6s; }
.star:nth-child(5) { animation-delay: 2.6s; }
.star:nth-child(6) { animation-delay: 0.4s;  animation-duration: 5.2s; }
.star:nth-child(7) { animation-delay: 3.1s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50%      { opacity: 0.75; transform: scale(1); }
}

.result .reveal {
  color: var(--ink-soft); max-width: 440px; margin: 0 auto;
  animation: screenIn 0.9s ease 0.5s both;
}
.result .room-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--room-tint-strong);
  border: 1px solid var(--room-line);
  color: var(--room-deep);
  border-radius: 999px; padding: 8px 18px;
  font-weight: 700; font-size: 15.5px;
  margin: 20px 0 6px;
  animation: screenIn 0.9s ease 0.8s both;
}
.result .room-message {
  background:
    radial-gradient(140% 100% at 50% -20%,
      color-mix(in srgb, var(--sunset-rose) 38%, transparent), transparent 55%),
    linear-gradient(165deg,
      color-mix(in srgb, var(--sunset-gold) 30%, var(--surface)),
      var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--sunset-amber) 45%, var(--line));
  border-radius: var(--radius-l);
  box-shadow: var(--edge-light), var(--shadow-2);
  padding: 24px 26px;
  color: var(--ink-body); max-width: 480px; margin: 18px auto 0;
  text-align: left;
  animation: screenIn 0.9s ease 1s both;
}
.result .confirm-q {
  font-family: var(--font-display); font-size: 19px; margin-top: 28px;
  animation: screenIn 0.9s ease 1.2s both;
}
.result .btn-stack { animation: screenIn 0.9s ease 1.35s both; width: 100%; max-width: 420px; }

/* ============================================================
   CASA — corte transversal (dollhouse) + lista
   ============================================================ */
.house-screen { max-width: 800px; }
.house-header { text-align: center; padding: 6px 0 20px; }
.house-header h1 { font-size: var(--text-h1); font-weight: 440; letter-spacing: -0.015em; }
.house-header p { color: var(--ink-soft); margin-top: 6px; }

.dollhouse {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 26px 44px rgb(var(--shadow-ink) / 0.16));
}
.dollhouse svg { width: 100%; height: auto; display: block; }
.dollhouse .house-room { cursor: pointer; transition: filter 0.25s ease; }
/* hover: o cômodo esquenta e ganha corpo (filter não mexe na geometria;
   transform CSS aqui sobrescreveria o translate() do SVG — nunca usar) */
.dollhouse .house-room:hover {
  filter: brightness(1.07) drop-shadow(0 3px 7px rgb(87 62 39 / 0.3));
}
.house-room .room-light { transition: opacity 0.6s ease; }
.dollhouse .house-room:hover .room-light,
.dollhouse .house-room:focus-visible .room-light { opacity: 0.55; }
.house-room.suggested .room-light {
  opacity: 0.55;
  animation: roomGlow 2.8s ease-in-out 0.8s infinite;
}
@keyframes roomGlow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.7; }
}
.dollhouse .house-room:focus-visible { outline: none; }

.dollhouse-caption {
  text-align: center; color: var(--ink-soft); font-size: var(--text-small);
  margin-bottom: 26px; min-height: 1.6em;
}
.dollhouse-caption strong { font-family: var(--font-display); font-weight: 500; color: var(--ink); }

/* lista dos cômodos (acessível, complementa a ilustração) */
.rooms-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .rooms-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .rooms-grid { grid-template-columns: 1fr; } }

.room-card {
  position: relative;
  background: linear-gradient(180deg, var(--card-tint, var(--surface)), var(--surface) 62%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  cursor: pointer; text-align: left;
  font-family: var(--font-body);
  box-shadow: var(--edge-light), var(--shadow-1);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.room-card { --room: var(--card-accent, #D8C8B4); } /* ponte p/ tokens da vignette */
.room-card .room-mini {
  display: block;
  height: 88px;
  margin: -16px -16px 12px;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--card-accent, var(--room)) 30%, var(--line));
}
.room-card .room-mini .vignette { --vg-glow: .3; }        /* meia-luz por padrão */
.room-card.aceso .room-mini .vignette { --vg-glow: 1; }    /* cômodo recomendado */
.room-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--card-accent, var(--room)) 38%, var(--line));
  box-shadow: var(--edge-light),
    0 16px 32px -14px color-mix(in srgb, var(--card-accent, var(--room)) 45%, rgb(var(--shadow-ink) / 0.9));
}
.room-card h3 { font-size: 17px; font-weight: 500; margin: 6px 0 2px; }
.room-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.room-card .room-progress {
  margin-top: 10px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--card-accent, var(--room)) 42%, var(--ink));
}

/* ============================================================
   CÔMODO — cena com papel de parede e objetos em prateleiras
   ============================================================ */
.room-screen { max-width: 820px; }

/* ---------- vignette de interior: 1 template, 9 atmosferas ---------- */
.vignette {
  display: block;
  width: 100%;
  height: 100%;
  color: color-mix(in srgb, var(--room) 45%, #57493B);
  --vg-wall:  color-mix(in srgb, var(--room) 30%, #FBF6EC);
  --vg-base:  color-mix(in srgb, var(--room) 48%, #EFE3D0);
  --vg-floor: color-mix(in srgb, var(--room) 22%, #EBDAC1);
  --vg-rug:   color-mix(in srgb, var(--room) 54%, #F7EFDF);
  --vg-frame: color-mix(in srgb, var(--room) 38%, #8A6A50);
  --vg-mat:   color-mix(in srgb, var(--room) 10%, #FDFAF2);
  --vg-art:   color-mix(in srgb, var(--room) 58%, #FFFFFF);
  --vg-leaf:  color-mix(in srgb, var(--room) 32%, #7E8D6E);
  --vg-pot:   color-mix(in srgb, var(--room) 42%, #B98F6E);
  --vg-glow: .6;
}

/* cena do hero do cômodo */
.room-scene {
  position: relative;
  height: clamp(180px, 48vw, 250px);
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--room-line);
  background: color-mix(in srgb, var(--room) 25%, #FBF6EC);
  box-shadow: var(--edge-light), var(--shadow-1);
}

/* a luz do entardecer na janela do cômodo respira devagar */
@property --vg-glow {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.6;
}
.room-scene .vignette { animation: vgRespira 7s ease-in-out infinite; }
@keyframes vgRespira {
  0%, 100% { --vg-glow: 0.42; }
  50%      { --vg-glow: 0.75; }
}

/* placa de título flutuando sobre o piso da cena */
.room-title {
  position: relative;
  margin: -34px 18px 8px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 18px;
  text-align: center;
  box-shadow: var(--edge-light), var(--shadow-2);
}
.room-title h1 { font-size: clamp(25px, 6.6vw, 32px); font-weight: 440; }
.room-title p {
  font-family: var(--font-display); font-style: italic; font-weight: 360;
  color: color-mix(in srgb, var(--room-deep) 80%, var(--ink-soft));
  margin-top: 4px; font-size: 1rem;
}

.room-hint {
  text-align: center; color: var(--ink-soft); font-size: var(--text-small);
  margin: 16px 0 8px;
}

/* a parede do cômodo: papel de parede tingido + rodapé wainscot */
.room-wall {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--room-line);
  padding: 30px 22px 34px;
  background:
    repeating-linear-gradient(90deg,
      color-mix(in srgb, var(--room) 7%, transparent) 0 2px,
      transparent 2px 56px),
    linear-gradient(180deg,
      var(--room-tint) 0%,
      color-mix(in srgb, var(--room) 6%, var(--bg)) 100%);
  box-shadow: var(--edge-light), var(--shadow-1);
  overflow: hidden;
}
.room-wall::after { /* rodapé de madeira */
  content: "";
  position: absolute; inset: auto 0 0;
  height: 14px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 45%, var(--bg-deep)),
    color-mix(in srgb, var(--accent-deep) 55%, var(--bg-deep)));
  border-top: 1px solid rgb(255 253 246 / 0.4);
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 26px 10px;
  position: relative;
}

/* objeto pousado na sua prateleirinha */
.object-card {
  position: relative;
  background: none; border: none;
  padding: 8px 6px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--radius-s);
  transition: transform 0.25s var(--ease-out);
}
.object-card .obj-frame {
  position: relative;
  width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease-out);
}
.object-card .obj-frame::before { /* halo de luz quente atrás do objeto */
  content: "";
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%,
    color-mix(in srgb, var(--sunset-glow) 34%, transparent),
    transparent 72%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.object-card .obj-frame .obj-icon { position: relative; width: 78px; height: 78px; }
.object-card .obj-shelf { /* a prateleira individual */
  width: 86px; height: 7px;
  border-radius: 3px;
  margin-top: 2px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 55%, var(--bg-deep)),
    color-mix(in srgb, var(--accent-deep) 62%, var(--bg-deep)));
  box-shadow: 0 6px 10px -4px rgb(var(--shadow-ink) / 0.35);
}
.object-card .obj-name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 500; font-size: 15px; line-height: 1.25;
  text-align: center; color: var(--ink);
  max-width: 140px;
}
.object-card:hover .obj-frame { transform: translateY(-5px); }
.object-card:hover .obj-frame::before { opacity: 1; }
.object-card:active .obj-frame { transform: translateY(-2px); }
/* o objeto inclina de leve, como pego da prateleira */
.object-card .obj-frame .obj-icon { transition: transform 0.3s var(--ease-out); }
.object-card:hover .obj-frame .obj-icon { transform: rotate(-3deg) scale(1.05); }
.object-card:hover .visited-seal { transform: scale(1.18) rotate(10deg); }

/* selo de visitado: lacre de latão, não check verde */
.object-card .visited-seal {
  position: absolute; top: 0; right: calc(50% - 56px);
  width: 25px; height: 25px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  color: #6E5226;
  background: radial-gradient(circle at 32% 28%, #F6E2B0, #E0BC7C 55%, #C89B57);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--room) 22%, #FCF8EF),
    0 2px 4px rgb(var(--shadow-ink) / 0.22),
    inset 0 0 0 1px rgb(255 255 255 / 0.5);
  animation: sealIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  transition: transform 0.25s var(--ease-out);
}
@keyframes sealIn {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

/* fallback quando não há ícone SVG (emoji) */
.obj-emoji-fallback {
  font-size: 44px; line-height: 1;
  filter: sepia(0.25) saturate(0.85);
}

/* ============================================================
   EXPERIÊNCIA — página de livro
   ============================================================ */
.exp-screen { max-width: 660px; }
.exp-steps { display: flex; gap: 6px; padding-bottom: 24px; }
.exp-steps i {
  flex: 1; height: 4px; border-radius: 4px;
  background: var(--surface-sunken);
  box-shadow: inset 0 1px 2px rgb(var(--shadow-ink) / 0.06);
  transition: background 0.3s ease;
}
.exp-steps i.on { background: var(--room-deep); box-shadow: none; }

.step-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--text-micro);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 700;
  margin-bottom: 16px;
}
.step-label::before { content: ""; width: 22px; height: 2px; background: var(--room-deep); }

.exp-title { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.exp-title .obj-badge {
  width: 58px; height: 58px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--room-tint-strong);
  box-shadow: inset 0 0 0 1px var(--room-line), var(--shadow-1);
  flex-shrink: 0;
  padding: 7px;
}
.exp-title .obj-badge .obj-emoji-fallback { font-size: 30px; }
.exp-title h1 { font-size: var(--text-h1); font-weight: 440; }

/* leitura em serifa — a voz do livro */
.prose { max-width: 60ch; }

/* os parágrafos chegam em cascata, como quem entra na página */
.step-anim .prose > * { animation: proseIn 0.5s var(--ease-settle) both; }
.step-anim .prose > *:nth-child(1) { animation-delay: 70ms; }
.step-anim .prose > *:nth-child(2) { animation-delay: 130ms; }
.step-anim .prose > *:nth-child(3) { animation-delay: 190ms; }
.step-anim .prose > *:nth-child(4) { animation-delay: 250ms; }
.step-anim .prose > *:nth-child(5) { animation-delay: 310ms; }
.step-anim .prose > *:nth-child(6) { animation-delay: 370ms; }
.step-anim .prose > *:nth-child(7) { animation-delay: 430ms; }
.step-anim .prose > *:nth-child(n+8) { animation-delay: 480ms; }
@keyframes proseIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.prose p {
  font-family: var(--font-display);
  font-weight: 385;
  font-size: var(--text-reading);
  line-height: 1.78;
  color: var(--ink-body);
  margin-bottom: 1.05em;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums;
}
.prose p:last-child { margin-bottom: 0; }
.prose.prose-cap > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 460;
  font-size: 3.1em;
  line-height: 0.82;
  float: left;
  padding: 0.07em 0.12em 0 0;
  color: var(--room-deep);
  font-variation-settings: "opsz" 144;
}
.prose p.dialogue {
  padding-left: 16px;
  border-left: 2px solid var(--room-deep);
  color: var(--ink-soft);
  font-style: italic;
}
.prose h4 {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 500;
  margin: 1.4em 0 0.55em; color: var(--ink);
}
.prose ul { list-style: none; margin: 0 0 1.05em; }
.prose ul li {
  position: relative; padding-left: 24px; margin-bottom: 7px;
  font-family: var(--font-display); font-weight: 385;
  font-size: var(--text-reading); line-height: 1.6;
  color: var(--ink-body);
}
.prose ul li::before {
  content: ""; position: absolute; left: 5px; top: 0.66em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--room-deep);
}

.exp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--edge-light), var(--shadow-1);
  padding: 28px 26px;
}

/* diário — página pautada */
.diary-note { font-size: var(--text-small); color: var(--ink-soft); margin-bottom: 22px; }
.diary-q { margin-bottom: 24px; }
.diary-q label {
  display: block;
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.14rem; line-height: 1.45;
  color: var(--ink);
  margin-bottom: 10px;
}
.diary-q textarea, .visit-textarea {
  width: 100%; min-height: 104px; resize: vertical;
  background:
    repeating-linear-gradient(180deg,
      transparent 0 calc(1.7em - 1px),
      color-mix(in srgb, var(--line) 70%, transparent) calc(1.7em - 1px) 1.7em),
    var(--surface-raised);
  background-attachment: local;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.55em 16px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.05rem; color: var(--ink-body); line-height: 1.7;
  box-shadow: inset 0 2px 4px rgb(var(--shadow-ink) / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.diary-q textarea:focus, .visit-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 2px 4px rgb(var(--shadow-ink) / 0.04),
    0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.diary-q textarea::placeholder, .visit-textarea::placeholder {
  color: var(--ink-faint); font-style: italic;
}

/* instante de cuidado — à luz de vela */
.care-card {
  position: relative;
  background:
    radial-gradient(90% 70% at 50% 0%,
      color-mix(in srgb, var(--sunset-glow) 22%, transparent), transparent 70%),
    linear-gradient(170deg, var(--room-tint), var(--surface) 80%);
  border: 1px solid var(--room-line);
  border-radius: var(--radius-l);
  box-shadow: var(--edge-light), var(--shadow-1);
  padding: 34px 28px;
  text-align: center;
}
/* anel de respiração guiada: 8s por ciclo, um convite silencioso */
.care-card::before {
  content: "";
  position: absolute;
  left: 50%; top: 22px;
  width: 64px; height: 64px;
  margin-left: -32px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgb(247 200 115 / 0.30),
    rgb(247 200 115 / 0.10) 55%,
    transparent 72%);
  animation: respiraGuia 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes respiraGuia {
  0%, 100% { transform: scale(0.65); opacity: 0.45; }
  45%, 55% { transform: scale(1.4);  opacity: 0.95; }
}

.care-card .care-flame {
  position: relative;
  width: 14px; height: 20px;
  margin: 0 auto 16px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #FBE3AE, var(--sunset-glow) 55%, #E8A24E);
  box-shadow: 0 0 18px 4px rgb(247 200 115 / 0.55);
  animation: flicker 2.8s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1.2deg); box-shadow: 0 0 18px 4px rgb(247 200 115 / 0.5); }
  30%      { transform: scale(1.06) rotate(1deg); box-shadow: 0 0 22px 6px rgb(247 200 115 / 0.65); }
  60%      { transform: scale(0.97) rotate(-0.6deg); }
}
.care-card h3 { font-size: 1.35rem; font-weight: 460; margin-bottom: 16px; }
.care-card .prose { margin: 0 auto; }
.care-card .prose p { margin-bottom: 0.7em; }
.care-card .prose p:last-child { margin-bottom: 0; }
.care-card .prose ul { text-align: left; display: inline-block; }

/* ecos da casa */
.echo-card { text-align: center; padding: 48px 28px; }
.echo-card .echo-mark {
  font-family: var(--font-display);
  font-size: 34px; line-height: 1;
  color: var(--room-deep);
  margin-bottom: 12px;
  animation: ecoRespira 5s ease-in-out infinite;
}
@keyframes ecoRespira {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
.echo-card blockquote {
  font-family: var(--font-display); font-style: italic; font-weight: 340;
  font-size: var(--text-quote); line-height: 1.42;
  color: var(--ink);
  font-variation-settings: "opsz" 60;
  text-wrap: balance;
  max-width: 460px; margin: 0 auto;
}
.echo-card .echo-source {
  margin-top: 18px;
  font-size: var(--text-micro); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 700;
}

/* registro de visita */
.visit-note { color: var(--ink-soft); margin-bottom: 18px; max-width: 56ch; }
.visit-saved {
  background: color-mix(in srgb, #B5C9A8 22%, var(--surface));
  border: 1px solid color-mix(in srgb, #B5C9A8 55%, var(--line));
  border-radius: var(--radius-s);
  padding: 14px 18px; font-size: 15px; color: #55663F; margin-top: 14px;
}

/* mensagem final */
.final-card {
  text-align: center; padding: 44px 30px;
  background:
    radial-gradient(140% 100% at 50% -20%,
      color-mix(in srgb, var(--sunset-rose) 38%, transparent), transparent 55%),
    linear-gradient(165deg,
      color-mix(in srgb, var(--sunset-gold) 30%, var(--surface)),
      var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--sunset-amber) 45%, var(--line));
  border-radius: var(--radius-l);
  box-shadow: var(--edge-light), var(--shadow-2);
}
.final-card .final-house { width: 76px; margin: 0 auto 16px; }
.final-card .final-house svg { width: 100%; height: auto; }
.final-card h2 { font-size: 1.6rem; font-weight: 460; margin-bottom: 14px; }
.final-card p {
  font-family: var(--font-display); font-weight: 385;
  font-size: 1.05rem; line-height: 1.7;
  color: var(--ink-body); max-width: 46ch; margin: 0 auto;
}

.exp-nav { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }

/* rodapé */
.site-footer {
  text-align: center; padding: 26px 20px calc(26px + env(safe-area-inset-bottom));
  font-size: 13px; color: var(--ink-soft); line-height: 1.6;
}
.site-footer a { color: inherit; }

/* ============================================================
   ACESSO — login, cadastro, assinatura, conta
   ============================================================ */
.auth-inner { max-width: 460px; }
.auth-art { width: min(220px, 52vw); margin-bottom: 2px; }
.auth-title {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 440;
  text-align: center;
}
.auth-sub {
  color: var(--ink-soft);
  text-align: center;
  margin-top: 6px;
  max-width: 40ch;
}
.auth-card {
  width: 100%;
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--edge-light), var(--shadow-2);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span {
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.auth-field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface-raised);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.auth-erro {
  display: none;
  background: color-mix(in srgb, var(--sunset-rose) 30%, var(--surface));
  border: 1px solid color-mix(in srgb, #C1121F 30%, var(--line));
  color: #8E1B26;
  border-radius: var(--radius-s);
  padding: 10px 14px;
  font-size: 14.5px;
}
.auth-card .btn-quiet.btn-block { width: 100%; text-align: center; }
.auth-aceite {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
  cursor: pointer;
}
.auth-aceite input { margin-top: 3px; accent-color: var(--accent); }
.auth-aceite a { color: var(--accent-deep); }
.auth-espera {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-deep);
  text-align: center;
  padding: 8px 0 4px;
}

/* plano de assinatura */
.plano {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  border-radius: var(--radius-l);
  padding: 30px 30px 22px;
  text-align: left;
  box-shadow: var(--edge-light), var(--shadow-2);
}
.plano-nome {
  font-size: var(--text-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-deep);
}
.plano-preco {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 440;
  color: var(--ink);
  margin: 8px 0 18px;
  letter-spacing: -0.01em;
}
.plano-preco span { font-size: 17px; color: var(--ink-soft); font-weight: 400; }
.plano-lista { list-style: none; text-align: left; margin: 0; }
.plano-lista li {
  padding: 11px 2px;
  border-top: 1px solid var(--line-faint);
  font-size: 14.5px;
  color: var(--ink-body);
  line-height: 1.5;
}

/* minha conta */
.conta-linha {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line-faint);
  font-size: 15px;
}
.conta-linha span { color: var(--ink-soft); }
.conta-linha strong { color: var(--ink); text-align: right; word-break: break-all; }

/* ============================================================
   A CASA VIVA — o app respira no tempo real
   ============================================================ */

/* ---------- céu por hora do dia (classe no <html>) ---------- */
html.ceu-manha {
  --ceu-topo: #FAF4E0;
  --ceu-meio: var(--bg);
  --ceu-baixo: #EDEADB;
  --ceu-alto: color-mix(in srgb, var(--sunset-gold) 42%, transparent);
  --ceu-lado: color-mix(in srgb, #BFD3C9 34%, transparent);
}
html.ceu-tarde {
  --ceu-topo: #F5F0E1;
  --ceu-meio: var(--bg);
  --ceu-baixo: var(--bg-deep);
  --ceu-alto: color-mix(in srgb, #B7C7D7 34%, transparent);
  --ceu-lado: color-mix(in srgb, var(--sunset-gold) 30%, transparent);
}
/* entardecer = paleta padrão (assinatura da casa) */

html.ceu-noite {
  /* noite azul estrelada — a mesma da página de vendas */
  --ceu-topo: #0A1730;
  --ceu-meio: #10264A;
  --ceu-baixo: #1C3B68;
  --ceu-alto: color-mix(in srgb, #9CB6EB 16%, transparent);
  --ceu-lado: color-mix(in srgb, #345C96 35%, transparent);
}

/* noite: a chegada fica sob as estrelas, sem perder o aconchego */
.ceu-noite .landing h1 { color: #F4EBDA; }
.ceu-noite .landing .tagline { color: #E8C9A0; }
.ceu-noite .landing .intro,
.ceu-noite .landing .credit { color: #C9BDAB; }
.ceu-noite .landing .credit a { color: inherit; }
.ceu-noite .landing .btn-ghost {
  border-color: rgb(244 235 218 / 0.35); color: #E8DFCE;
}
.ceu-noite .landing .btn-ghost:hover {
  border-color: var(--sunset-glow);
  color: #F4EBDA;
  background: rgb(247 200 115 / 0.08);
}
.ceu-noite .landing .btn-quiet { color: #C9BDAB; }
.ceu-noite .landing .btn-primary {
  box-shadow: 0 0 0 1px rgb(247 200 115 / 0.35), var(--shadow-2);
}
.ceu-noite .landing .auth-title,
.ceu-noite .landing .auth-sub { color: #F4EBDA; }
.ceu-noite .landing .auth-sub { color: #C9BDAB; }

/* estrelas — só à noite, só na chegada */
.ceu-noite .landing::after {
  content: "";
  position: absolute; top: 4%; left: 6%;
  width: 2px; height: 2px; border-radius: 50%;
  background: #EFDDB6;
  pointer-events: none;
  box-shadow:
    14vw  3vh  0 0    #EFDDB6,
    28vw  8vh  0 -0.4px #D9C9A8,
    41vw  2vh  0 0.3px  #F6E7C4,
    55vw  6vh  0 -0.5px #D9C9A8,
    68vw  1vh  0 0      #EFDDB6,
    79vw  9vh  0 -0.3px #E5D4AE,
    88vw  4vh  0 0.4px  #F6E7C4,
    7vw   12vh 0 -0.5px #D9C9A8,
    22vw  16vh 0 0      #E5D4AE,
    49vw  13vh 0 -0.4px #EFDDB6,
    63vw  17vh 0 0.2px  #D9C9A8,
    84vw  15vh 0 -0.3px #EFDDB6,
    35vw  20vh 0 0      #D9C9A8,
    74vw  23vh 0 -0.5px #E5D4AE;
  animation: twinkle 4.4s ease-in-out infinite;
}

/* céu 3D (three.js): o canvas fica atrás do conteúdo e assume as estrelas */
.ceu-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
/* atmosfera de ambiente: partículas flutuam POR CIMA do conteúdo,
   bem sutis (alfa baixo no shader) e sem bloquear toques */
.ceu-canvas--sobre { z-index: 3; }

.landing-inner { position: relative; z-index: 1; }
html.ceu-3d.ceu-noite .landing::after { display: none; }

/* fachada à noite: céu do arco escurece, lua e janelas ganham força
   (vale para o app .landing-art e para o hero de vendas .v-hero-casa) */
.ceu-noite :is(.landing-art, .v-hero-casa) #frame-bg { fill: #3E3A54; }
.ceu-noite :is(.landing-art, .v-hero-casa) #lawn { fill: #98A48E; }
.ceu-noite :is(.landing-art, .v-hero-casa) #tree ellipse { fill: #86A492; }
.ceu-noite :is(.landing-art, .v-hero-casa) #moon { fill: #F6E3AE; stroke: #D9B98A; }
.ceu-noite :is(.landing-art, .v-hero-casa) #sky-details circle,
.ceu-noite :is(.landing-art, .v-hero-casa) #sparkle { opacity: 0.9; fill: #EFDDB6; }
.ceu-noite :is(.landing-art, .v-hero-casa) .house-window { fill: #DCCFAF; }

/* janelas da fachada acendem uma a uma (brilho estático, sem loop) */
:is(.landing-art, .v-hero-casa) .house-window { transition: fill 0.7s ease, filter 0.7s ease; }
:is(.landing-art, .v-hero-casa) .house-window.lit {
  fill: var(--glow);
  filter: drop-shadow(0 0 5px rgb(247 200 115 / 0.55));
  animation: none;
}
.v-hero-casa svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- fachada viva: a casinha da chegada respira e reage ---------- */
.casa-viva {
  animation: flutuaCasa 6s ease-in-out infinite;
  will-change: transform;
}
.casa-viva svg { transition: filter 0.3s ease; }
.casa-viva #tree, .casa-viva #bushes circle, .casa-viva #moon,
.casa-viva #sparkle, .casa-viva #sky-details circle,
.casa-viva #smoke, .casa-viva #smoke-dot,
.casa-viva .house-window, .casa-viva #door {
  transform-box: fill-box;
  transform-origin: center;
}

/* fumaça subindo em ciclo contínuo */
.casa-viva #smoke { animation: fumacinha 3.4s ease-out infinite; }
.casa-viva #smoke-dot { animation: fumacinha 3.4s ease-out infinite 1.7s; }
@keyframes fumacinha {
  0%   { transform: translateY(0) scale(0.9);   opacity: 0; }
  18%  { opacity: 0.65; }
  100% { transform: translateY(-13px) scale(1.18); opacity: 0; }
}

/* árvore balança; chacoalha quando alguém mexe nela */
.casa-viva #tree {
  transform-origin: 50% 100%;
  animation: balancaArvore 5.5s ease-in-out infinite;
}
.casa-viva #tree:hover { animation: chacoalha 0.55s ease-in-out; cursor: pointer; }
@keyframes balancaArvore {
  0%, 100% { transform: rotate(-1.4deg); }
  50%      { transform: rotate(1.8deg); }
}
@keyframes chacoalha {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(3.2deg); }
  55% { transform: rotate(-2.6deg); }
  80% { transform: rotate(1.4deg); }
}

/* arbustos respiram, cada um no seu tempo */
.casa-viva #bushes circle { animation: respiraMoita 4.2s ease-in-out infinite; }
.casa-viva #bushes circle:nth-of-type(2) { animation-delay: 1.3s; }
.casa-viva #bushes circle:nth-of-type(3) { animation-delay: 2.4s; }
@keyframes respiraMoita {
  0%, 100% { transform: scale(0.97); }
  50%      { transform: scale(1.04); }
}

/* lua e brilhos do céu pulsam devagar */
.casa-viva #moon { animation: luaRespira 7s ease-in-out infinite; }
@keyframes luaRespira {
  0%, 100% { filter: drop-shadow(0 0 2px rgb(234 211 162 / 0.35)); }
  50%      { filter: drop-shadow(0 0 10px rgb(234 211 162 / 0.9)); }
}
.casa-viva #sparkle { animation: cintila 3.8s ease-in-out infinite; }
.casa-viva #sky-details circle { animation: cintila 4.6s ease-in-out infinite; }
.casa-viva #sky-details circle:nth-of-type(1) { animation-delay: 0.9s; }
.casa-viva #sky-details circle:nth-of-type(2) { animation-delay: 2s; }
.casa-viva #sky-details circle:nth-of-type(3) { animation-delay: 3.1s; }
@keyframes cintila {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%      { opacity: 0.95; transform: scale(1.12); }
}

/* janelas: convite ao toque — acendem/apagam com clique */
.casa-viva .house-window {
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), filter 0.25s ease, fill 0.5s ease;
}
.casa-viva .house-window:hover {
  transform: scale(1.16);
  filter: drop-shadow(0 0 9px rgb(247 200 115 / 0.8));
}

/* a porta é o convite: brilha e cresce um tiquinho */
.casa-viva #door {
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: filter 0.25s ease, transform 0.25s var(--ease-out);
}
.casa-viva #door:hover {
  filter: brightness(1.12) drop-shadow(0 0 10px rgb(247 200 115 / 0.65));
  transform: scale(1.05);
}

@keyframes flutuaCasa {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* nuvens suaves derivando na chegada, de manhã e à tarde */
.ceu-manha .landing::after,
.ceu-tarde .landing::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(240px 64px at 15% 11%, rgb(255 255 255 / 0.5), transparent 70%),
    radial-gradient(320px 76px at 68% 7%, rgb(255 255 255 / 0.4), transparent 70%),
    radial-gradient(190px 54px at 42% 17%, rgb(255 255 255 / 0.34), transparent 70%),
    radial-gradient(260px 60px at 88% 15%, rgb(255 255 255 / 0.3), transparent 70%);
  filter: blur(7px);
  animation: nuvensDerivam 70s ease-in-out infinite alternate;
}
@keyframes nuvensDerivam {
  from { transform: translateX(-2.5%); }
  to   { transform: translateX(2.5%); }
}

/* pilha de ações da chegada: ritmo consistente entre os botões */
.landing-acoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  width: 100%;
}
.landing-acoes .btn-primary { margin-top: 0; } /* anula o recuo legado */
.landing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  margin-top: 4px;
}

/* ---------- casa em corte: memória e vida ---------- */
/* cômodos já visitados ficam com a luz de vigília acesa */
.house-room.visited-lit .room-light { opacity: 0.22; }
.dollhouse .house-room.visited-lit:hover .room-light { opacity: 0.55; }

/* o gato da casa — dorme em um cômodo diferente a cada dia */
.house-cat { pointer-events: none; }
.house-cat .cat-body {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: catBreath 3.6s ease-in-out infinite;
}
@keyframes catBreath {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(1.045); }
}

/* ---------- entrar no cômodo: a luz acende ---------- */
.room-scene::after {
  content: "";
  position: absolute; inset: 0;
  background: rgb(51 48 42 / 0.30);
  opacity: 1;
  pointer-events: none;
  animation: luzAcende 1s ease 0.12s forwards;
}
@keyframes luzAcende { to { opacity: 0; } }

/* ---------- sons da casa ---------- */
.som-toggle {
  position: fixed;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  color: var(--ink-soft);
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--edge-light), var(--shadow-1);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.som-toggle:hover { color: var(--accent-deep); border-color: var(--accent); box-shadow: var(--edge-light), var(--shadow-2); }
.som-toggle .som-onda {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.som-toggle.tocando .som-onda {
  background: radial-gradient(circle at 40% 35%, #FBE3AE, var(--sunset-glow) 60%, #E8A24E);
  box-shadow: 0 0 10px 2px rgb(247 200 115 / 0.5);
  animation: flicker 2.8s ease-in-out infinite;
}

/* ---------- caderno da casa ---------- */
.caderno-screen { max-width: 640px; }
.caderno-abre {
  text-align: center; margin-bottom: 26px;
}
.caderno-abre h1 { font-size: var(--text-h1); font-weight: 440; }
.caderno-abre p { color: var(--ink-soft); margin-top: 8px; max-width: 46ch; margin-inline: auto; }
.caderno-priv {
  font-size: 12.5px; color: var(--ink-faint);
  margin-top: 10px; font-style: italic;
}
.cad-entrada {
  background:
    repeating-linear-gradient(180deg,
      transparent 0 calc(1.9em - 1px),
      color-mix(in srgb, var(--line) 55%, transparent) calc(1.9em - 1px) 1.9em),
    var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--edge-light), var(--shadow-1);
  padding: 20px 22px 18px;
  margin-bottom: 16px;
}
.cad-topo {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line-strong);
  background: var(--surface-raised);
}
.cad-topo .obj-icon { width: 40px; height: 40px; flex-shrink: 0; }
.cad-topo .obj-emoji-fallback { font-size: 28px; }
.cad-nome { flex: 1; min-width: 0; }
.cad-nome strong { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--ink); display: block; }
.cad-nome span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-soft);
}
.cad-nome span::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cad-cor, var(--line-strong));
  border: 1px solid rgb(74 63 53 / 0.3);
}
.cad-data {
  font-size: 11.5px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cad-q { margin-bottom: 12px; }
.cad-q .pergunta {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.02rem; color: var(--accent-deep); line-height: 1.5;
}
.cad-q .resposta {
  font-family: var(--font-display); font-weight: 395;
  font-size: 1.02rem; color: var(--ink-body); line-height: 1.9;
  white-space: pre-wrap;
}
.cad-revisitar { margin-top: 4px; }
.cad-vazio {
  text-align: center;
  padding: 40px 24px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  color: var(--ink-soft);
}
.cad-vazio .type-lead { margin-bottom: 10px; }
.cad-secao {
  font-size: var(--text-micro); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 700;
  margin: 30px 0 14px; display: flex; align-items: center; gap: 10px;
}
.cad-secao::before { content: ""; width: 24px; height: 2px; background: var(--accent-deep); opacity: 0.55; }
.cad-msg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 14px 18px; margin-bottom: 10px;
  font-family: var(--font-display); font-style: italic; font-weight: 380;
  color: var(--ink-body); line-height: 1.6;
}
.cad-msg small {
  display: block; margin-top: 6px;
  font-family: var(--font-body); font-style: normal;
  font-size: 11.5px; color: var(--ink-faint);
}

/* ============================================================
   MOVIMENTO REDUZIDO — tudo vira estado final, nada em loop
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important; /* mata TODOS os loops */
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  #smoke { display: none; }
  .star { animation: none !important; opacity: 0.4; }
  .house-window.lit,
  .lh-window {
    animation: none !important;
    filter: drop-shadow(0 0 6px rgb(247 200 115 / 0.6));
  }
  .care-card .care-flame { animation: none !important; }
}

/* ============================================================
   DIORAMA 3D NAS TELAS DE CHEGADA (js/casa3d.js)
   O host guarda a fachada ilustrada como fallback; o canvas do
   diorama cobre o host e assume com fade quando o modelo carrega.
   ============================================================ */
.landing-3d {
  position: relative;
  width: min(560px, 94vw);
  aspect-ratio: 0.98;
  margin: -18px auto -6px;
  filter: none;
}
.landing-3d svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.landing-3d svg :is(#frame-bg, #frame-line, #lawn, #tree, #bushes, #sky-details) { display: none; }
.landing-3d .v-casa3d { position: absolute; inset: 0; opacity: 0; transition: opacity 0.55s ease-out; }
.landing-3d .v-casa3d canvas { width: 100% !important; height: 100% !important; display: block; }
.landing-3d.em3d .v-casa3d { opacity: 1; }
.landing-3d.em3d svg { opacity: 0; transition: opacity 0.9s ease; }
.landing-3d.auth-art { width: min(340px, 80vw); margin: -10px auto 0; }

/* ---------- cenas fotográficas dos cômodos (assets/salas/*.webp) ---------- */
.room-foto {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  animation: cenaRespira 16s ease-in-out infinite alternate;
}
@keyframes cenaRespira { from { transform: scale(1); } to { transform: scale(1.05); } }
.room-mini { position: relative; overflow: hidden; }
.room-mini-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* resultado do check-in: o cômodo revelado acende em foto */
.house-figure.com-foto { width: min(560px, 92vw); filter: none; }
.house-figure.com-foto svg { display: none; }
.result-foto {
  display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22), 0 24px 48px rgb(0 0 0 / 0.28),
    0 0 70px color-mix(in srgb, var(--room) 45%, transparent);
  filter: brightness(0.45) saturate(0.8);
  transition: filter 1.4s ease;
}
.result-foto.lit { filter: none; }
@media (prefers-reduced-motion: reduce) { .room-foto { animation: none; } }

/* ---------- maquete 3D da casa em corte (host .casa-corte) ---------- */
.casa-corte { position: relative; }
.casa-corte .v-casa3d { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.casa-corte .v-casa3d canvas { width: 100% !important; height: 100% !important; display: block; }
.casa-corte.em3d .v-casa3d { opacity: 1; }
.casa-corte.em3d svg { opacity: 0; pointer-events: none; transition: opacity 0.9s ease; }

/* ---------- sala 3D (host .room-scene.room-3d) ---------- */
.room-scene.room-3d { height: auto; aspect-ratio: 16 / 9; }
.room-3d .v-casa3d { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.room-3d .v-casa3d canvas { width: 100% !important; height: 100% !important; display: block; }
.room-3d.em3d .v-casa3d { opacity: 1; }
.room-3d.em3d .room-foto, .room-3d.em3d .vignette { opacity: 0; transition: opacity 0.9s ease; }
.room-3d .room-foto { animation: none; } /* estática: casa com o canvas */
.sala3d-rotulo {
  position: absolute; z-index: 2;
  transform: translate(-50%, -100%);
  padding: 6px 12px; border-radius: 999px;
  background: rgb(30 26 22 / 0.84); color: #FBF3E4;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.25);
}
.sala3d-rotulo::after {
  content: ""; position: absolute; left: 50%; bottom: -4px;
  width: 8px; height: 8px; background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.object-card.realce {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--room) 70%, #fff), var(--shadow-1);
}

/* sala 3D: o cartão de título não cobre o piso do cômodo */
.room-3d + .room-title { margin-top: -16px; }

/* entrada no cômodo: o canvas escurece um fio antes de dar lugar à sala */
.room-3d .v-casa3d { transition: opacity 0.9s ease, filter 0.9s ease; }
.room-3d .v-casa3d.entrando { filter: brightness(0.72) saturate(0.9); }
/* acabamento cinematográfico da cena do cômodo */
.room-scene.room-3d::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%, transparent 62%, rgb(20 16 12 / 0.18) 100%);
}

/* ============================================================
   TRANSIÇÃO PARA O 3D — sem piscar a ilustração antiga
   .oculta-antigo: as reservas ilustradas só aparecem se o 3D falhar
   .aguarda3d: espaço em repouso enquanto o modelo carrega
   ============================================================ */
.oculta-antigo > svg,
.oculta-antigo .vignette {
  opacity: 0 !important;
}
.aguarda3d > img,
.aguarda3d .room-foto,
.aguarda3d .room-mini-foto {
  opacity: 0 !important;
}
/* a transição existe só na volta das reservas (quando o 3D não vem):
   se estivesse na regra acima, o primeiro quadro animaria de 1 a 0 */
.volta-antigo > svg,
.volta-antigo .vignette,
.volta-antigo > img,
.volta-antigo .room-foto { transition: opacity 0.5s ease; }
.aguarda3d {
  border-radius: var(--radius-l);
  animation: espera3d 1.9s ease-in-out infinite;
}
@keyframes espera3d {
  0%, 100% { background-color: rgb(122 108 92 / 0.04); }
  50%      { background-color: rgb(122 108 92 / 0.08); }
}
@media (prefers-reduced-motion: reduce) { .aguarda3d { animation: none; } }

/* miniaturas dos cards: a foto é a única capa; a vignette é reserva */
.room-card .room-mini .vignette { opacity: 0; transition: opacity 0.4s ease; }
.room-card .room-mini.sem-foto .vignette { opacity: 1; }

/* a luz da chegada cobre a troca de cena (maquete -> cômodo): sem
   crossfade entre imagens de enquadramentos diferentes */
.cortina3d {
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(120% 100% at 50% 46%,
    color-mix(in srgb, var(--room, #E9DCC6) 22%, #FFF7E9),
    color-mix(in srgb, var(--room, #E9DCC6) 34%, #F3E6D2));
  opacity: 0;
  transition: opacity 0.46s ease;
}
.cortina3d.acesa { opacity: 1; transition-duration: 0.4s; }

/* ============================================================
   CHEGADA: a casa fica parada, só o texto rola
   A tela ocupa a altura da janela e não rola como um todo; o
   conteúdo textual tem a própria área de rolagem embaixo.
   ============================================================ */
.landing.chegada {
  /* a menor das duas medidas: dvh acompanha a barra do navegador no
     celular, vh não se perde com zoom de página no desktop */
  height: 100vh;
  height: min(100vh, 100dvh);
  /* .screen é um item flexível que cresce: sem isto ele estica com o
     conteúdo e a altura definida acima é ignorada */
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  justify-content: flex-start;
}
.landing.chegada .landing-inner {
  height: 100%;
  padding: 1.6vh 22px 0;
  justify-content: flex-start;
  gap: 0;
}
.landing.chegada .landing-3d {
  flex: 0 0 auto;
  width: min(520px, 88vw);
  max-height: min(46vh, 46dvh);
  margin: 0 auto -0.6vh;
}
.landing.chegada .landing-texto {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: calc(26px + env(safe-area-inset-bottom));
  /* sem barra à vista: as bordas que se dissolvem já contam que há
     mais texto abaixo */
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20px, #000 calc(100% - 30px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 20px, #000 calc(100% - 30px), transparent 100%);
}
/* o canvas da chegada não mora no quadro da casa: cobre a tela inteira,
   por baixo do texto. O enquadramento continua no quadro (o módulo 3D
   ancora a projeção nele), e a aproximação passa a ter a tela toda para
   crescer, em vez de terminar num corte reto. */
.landing.chegada .landing-3d .v-casa3d { position: fixed; inset: 0; z-index: 0; }
.landing.chegada .landing-texto { position: relative; z-index: 1; }
/* ao tocar na casa o texto sai de cena e deixa a casa passar */
.landing.chegada .landing-texto { transition: opacity 0.5s ease; }
.landing.chegada.aproximando .landing-texto { opacity: 0; pointer-events: none; }
.landing.chegada .landing-texto::-webkit-scrollbar { width: 0; height: 0; display: none; }
.landing.chegada .landing-texto > h1 { margin-top: 4px; }
.landing.chegada .landing .btn-primary { margin-top: 22px; }
@media (max-height: 620px) {
  .landing.chegada .landing-3d { max-height: min(38vh, 38dvh); }
}

/* ---------- casa em corte: o voltar fica no canto de baixo ----------
   A tela usa `animation: screenIn ... both`, e o transform que fica
   retido cria contexto de contenção: dentro dele, `position: fixed`
   se ancora na tela (que é longa) em vez da janela. Com fill-mode
   `backwards` o transform some ao terminar a entrada, e o botão volta
   a se ancorar na janela. */
.house-screen { animation-fill-mode: backwards; }
.topbar.topbar-canto {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  padding: 0;
  gap: 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding-right: 16px;
}
.topbar.topbar-canto .topbar-title { font-size: 15.5px; }
/* entra depois da tela, quando o ponto de ancoragem já é a janela */
.topbar.topbar-canto { animation: screenIn 0.4s ease 0.55s backwards; }
.house-screen { padding-top: 0; }
/* a maquete não mora num quadro: ocupa a janela inteira, de ponta a
   ponta, para a casa flutuar no papel e a aproximação ter para onde
   crescer sem esbarrar numa borda */
.house-screen .dollhouse {
  /* folga embaixo: os cards não encostam na terra da ilha */
  margin: 0 calc(50% - 50vw) 44px;
  width: 100vw;
  max-width: none;
  height: min(100vh, 100dvh);
  position: relative;
}
/* sem sombra de caixa quando o 3D assume (e sem um passe de filtro
   sobre um canvas do tamanho da janela a cada quadro) */
.house-screen .dollhouse.em3d { filter: none; }
.house-screen .dollhouse > svg {
  width: auto; max-width: min(720px, 100%);
  height: 100%; max-height: 100%;
  margin: 0 auto;
}
/* o chão corre para fora da tela: no fim ele se dissolve no papel, o
   que dá ar para a legenda e evita qualquer linha reta de corte */
.house-screen .dollhouse::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 168px; z-index: 1; pointer-events: none;
  /* três paradas, não duas: um degradê reto de céu para creme em poucos
     pixels vira uma faixa clara com cara de linha do mar */
  background: linear-gradient(to top,
    var(--bg) 0%,
    rgb(246 241 231 / 0.82) 30%,
    rgb(246 241 231 / 0.38) 62%,
    rgb(246 241 231 / 0) 100%);
}
/* a legenda descansa sobre a cena, no rodapé dela */
.house-screen .dollhouse-caption {
  position: absolute; left: 0; right: 0; bottom: 14px;
  margin: 0; padding: 0 16px;
  pointer-events: none; z-index: 2;
}
@media (max-width: 560px) {
  .topbar.topbar-canto .topbar-title { display: none; }
  .topbar.topbar-canto { padding-right: 0; background: none; backdrop-filter: none; }
}

/* a luz que cobre a troca de tela ao entrar num cômodo: vive no body,
   fora do #app, para não morrer junto com a tela que sai */
.luz-entrada {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%,
    color-mix(in srgb, var(--room, #E9DCC6) 18%, #FFF7EA),
    color-mix(in srgb, var(--room, #E9DCC6) 30%, #F2E5D1));
  opacity: 0;
  transition: opacity 0.42s ease;
}
.luz-entrada.acesa { opacity: 1; transition-duration: 0.36s; }
@media (prefers-reduced-motion: reduce) { .luz-entrada { transition: none; } }
