/* ==========================================================================
   Paletas e Variáveis dos Pets
   ========================================================================== */

:root,
html[data-pet='nimbo'] {
  --paper: #f8f4fb;
  --ink: #453052;
  --muted: #705e79;
  --line: #ddd0e7;
  --accent: #9464ac;
  --accent-text: #7d4895;
  --mint: #eee4f4;
  --stage: #eadeef;
  --surface: #f0e8f4;
  --ground: #d6c3e2;
  --warm: #e6ceec;
  --note: #f9f1e9;
  --hover: #62416f;
}

html[data-pet='duna'] {
  --paper: #fcf5e9;
  --ink: #5b3828;
  --muted: #7c5d48;
  --line: #e6d0b7;
  --accent: #b5723e;
  --accent-text: #9b5427;
  --mint: #f4e6d2;
  --stage: #efdfc6;
  --surface: #f6ecd9;
  --ground: #dec4a0;
  --warm: #f0cf9c;
  --note: #fff5dc;
  --hover: #805033;
}

html[data-pet='broto'] {
  --paper: #f3f7ef;
  --ink: #2d4738;
  --muted: #596c54;
  --line: #cedbc5;
  --accent: #668657;
  --accent-text: #486b3d;
  --mint: #e1ecda;
  --stage: #e1e9d4;
  --surface: #edf2e5;
  --ground: #c1d4b1;
  --warm: #dce5bb;
  --note: #fbf7df;
  --hover: #42664c;
}

/* ==========================================================================
   Modo Escuro (Dark Mode) Personalizado por Personagem
   ========================================================================== */

html[data-theme='dark'],
html[data-theme='dark'][data-pet='nimbo'] {
  --paper: #130f1c;
  --surface: #1d1629;
  --stage: #261c36;
  --ground: #37264f;
  --line: #332448;
  --ink: #f5effe;
  --muted: #b9a6d0;
  --accent: #bf8cff;
  --accent-text: var(--accent);
  --mint: #231835;
  --warm: #392455;
  --note: #1c1328;
  --hover: #d7b0ff;
}

html[data-theme='dark'][data-pet='duna'] {
  --paper: #18110b;
  --surface: #231810;
  --stage: #2f2015;
  --ground: #442d1e;
  --line: #3e281b;
  --ink: #fff5e8;
  --muted: #cca78e;
  --accent: #f59e42;
  --mint: #291a11;
  --warm: #4a2f1c;
  --note: #1f130c;
  --hover: #ffb769;
}

html[data-theme='dark'][data-pet='broto'] {
  --paper: #0c1610;
  --surface: #132118;
  --stage: #192a20;
  --ground: #264132;
  --line: #22372a;
  --ink: #eaf8ef;
  --muted: #9dc2aa;
  --accent: #5cd287;
  --mint: #17271e;
  --warm: #233e2f;
  --note: #101c15;
  --hover: #81e3a4;
}

/* Transições suaves ao alternar o tema do personagem e modo escuro */
body,
.hero-art,
.demo,
.demo-top,
.ribbon,
.daily,
.release,
.mini-scene,
.desktop-line,
.button,
.pet-picker button,
.paper-stamp,
.demo-controls button,
.site-header,
footer,
.desk-note,
.theme-toggle,
.pixel-spark,
.orbit {
  transition: 
    background-color 0.65s ease,
    color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    filter 0.45s ease;
}

/* ==========================================================================
   Brilho Luminescente das Partículas e Elementos no Modo Escuro
   ========================================================================== */

html[data-theme='dark'] .pixel-spark {
  color: var(--accent);
  opacity: 0.95;
  filter: drop-shadow(0 0 7px var(--accent)) drop-shadow(0 0 16px var(--accent));
  transition: color 0.65s ease, filter 0.65s ease;
}

html[data-theme='dark'] .orbit {
  background: var(--accent);
  opacity: 0.95;
  box-shadow: 0 0 8px var(--accent), 0 0 18px var(--accent);
  transition: background 0.65s ease, box-shadow 0.65s ease;
}

html[data-theme='dark'] .spark-one {
  filter: drop-shadow(0 0 9px var(--accent)) drop-shadow(0 0 22px var(--accent));
}

html[data-theme='dark'] .spark-two {
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 14px var(--accent));
}

html[data-theme='dark'] .spark-three {
  filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 12px var(--accent));
}

html[data-theme='dark'] .spark-four {
  filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 10px var(--accent));
}

html[data-theme='dark'] .spark-five {
  filter: drop-shadow(0 0 7px var(--accent)) drop-shadow(0 0 18px var(--accent));
}

html[data-theme='dark'] .paper-stamp {
  box-shadow: 0 0 16px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme='dark'] .brand-dot {
  text-shadow: 0 0 12px var(--accent);
}

html[data-theme='dark'] .status-dot {
  box-shadow: 0 0 10px var(--accent);
}

html[data-theme='dark'] .ribbon span[aria-hidden] {
  text-shadow: 0 0 10px var(--accent);
}

html[data-theme='dark'] .button:not(.button-ghost) {
  background: var(--accent);
  color: #110e19;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

html[data-theme='dark'] .button:not(.button-ghost):hover {
  background: var(--hover);
  color: #110e19;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
}

html[data-theme='dark'][data-pet='duna'] .button:not(.button-ghost) {
  color: #160f0a;
}

html[data-theme='dark'][data-pet='broto'] .button:not(.button-ghost) {
  color: #0b140f;
}

html[data-theme='dark'] .pet-picker button[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #110e19;
  font-weight: 700;
  box-shadow: 0 0 12px var(--accent);
}

html[data-theme='dark'][data-pet='duna'] .pet-picker button[aria-pressed='true'] {
  color: #160f0a;
}

html[data-theme='dark'][data-pet='broto'] .pet-picker button[aria-pressed='true'] {
  color: #0b140f;
}

html[data-theme='dark'] .demo-controls button[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #110e19;
  font-weight: 700;
  box-shadow: 0 0 10px var(--accent);
}

html[data-theme='dark'][data-pet='duna'] .demo-controls button[aria-pressed='true'] {
  color: #160f0a;
}

html[data-theme='dark'][data-pet='broto'] .demo-controls button[aria-pressed='true'] {
  color: #0b140f;
}

html[data-theme='dark'] .hero-art {
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35), 0 0 40px rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] .art-ground {
  opacity: 0.6;
}

html[data-theme='dark'] .shader-bg {
  opacity: 0.16;
}

html[data-theme='dark'] .hero-copy h1,
html[data-theme='dark'] .hero-copy .intro,
html[data-theme='dark'] .hero-copy .small-note,
html[data-theme='dark'] .hero-picker > span,
html[data-theme='dark'] .theme-status,
html[data-theme='dark'] .eyebrow {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

html[data-theme='dark'] .skip {
  background: var(--accent);
  color: #110e19;
}

/* ==========================================================================
   Suporte Automático à Preferência de Cor do Navegador (Dark Mode por Padrão)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']),
  html:not([data-theme='light'])[data-pet='nimbo'] {
    --paper: #130f1c;
    --surface: #1d1629;
    --stage: #261c36;
    --ground: #37264f;
    --line: #332448;
    --ink: #f5effe;
    --muted: #b9a6d0;
    --accent: #bf8cff;
    --accent-text: var(--accent);
    --mint: #231835;
    --warm: #392455;
    --note: #1c1328;
    --hover: #d7b0ff;
  }

  html:not([data-theme='light'])[data-pet='duna'] {
    --paper: #18110b;
    --surface: #231810;
    --stage: #2f2015;
    --ground: #442d1e;
    --line: #3e281b;
    --ink: #fff5e8;
    --muted: #cca78e;
    --accent: #f59e42;
    --mint: #291a11;
    --warm: #4a2f1c;
    --note: #1f130c;
    --hover: #ffb769;
  }

  html:not([data-theme='light'])[data-pet='broto'] {
    --paper: #0c1610;
    --surface: #132118;
    --stage: #192a20;
    --ground: #264132;
    --line: #22372a;
    --ink: #eaf8ef;
    --muted: #9dc2aa;
    --accent: #5cd287;
    --mint: #17271e;
    --warm: #233e2f;
    --note: #101c15;
    --hover: #81e3a4;
  }

  html:not([data-theme='light']) .shader-bg {
    opacity: 0.16;
  }

  html:not([data-theme='light']) .hero-copy h1,
  html:not([data-theme='light']) .hero-copy .intro,
  html:not([data-theme='light']) .hero-copy .small-note,
  html:not([data-theme='light']) .hero-picker > span,
  html:not([data-theme='light']) .theme-status,
  html:not([data-theme='light']) .eyebrow {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  }

  html:not([data-theme='light']) .pixel-spark {
    color: var(--accent);
    opacity: 0.95;
    filter: drop-shadow(0 0 7px var(--accent)) drop-shadow(0 0 16px var(--accent));
  }

  html:not([data-theme='light']) .orbit {
    background: var(--accent);
    opacity: 0.95;
    box-shadow: 0 0 8px var(--accent), 0 0 18px var(--accent);
  }

  html:not([data-theme='light']) .spark-one {
    filter: drop-shadow(0 0 9px var(--accent)) drop-shadow(0 0 22px var(--accent));
  }

  html:not([data-theme='light']) .spark-two {
    filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 14px var(--accent));
  }

  html:not([data-theme='light']) .spark-three {
    filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 12px var(--accent));
  }

  html:not([data-theme='light']) .spark-four {
    filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 10px var(--accent));
  }

  html:not([data-theme='light']) .spark-five {
    filter: drop-shadow(0 0 7px var(--accent)) drop-shadow(0 0 18px var(--accent));
  }

  html:not([data-theme='light']) .paper-stamp {
    box-shadow: 0 0 16px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.6);
  }

  html:not([data-theme='light']) .brand-dot {
    text-shadow: 0 0 12px var(--accent);
  }

  html:not([data-theme='light']) .status-dot {
    box-shadow: 0 0 10px var(--accent);
  }

  html:not([data-theme='light']) .ribbon span[aria-hidden] {
    text-shadow: 0 0 10px var(--accent);
  }

  html:not([data-theme='light']) .button:not(.button-ghost) {
    background: var(--accent);
    color: #110e19;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  }

  html:not([data-theme='light']) .button:not(.button-ghost):hover {
    background: var(--hover);
    color: #110e19;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
  }

  html:not([data-theme='light'])[data-pet='duna'] .button:not(.button-ghost) {
    color: #160f0a;
  }

  html:not([data-theme='light'])[data-pet='broto'] .button:not(.button-ghost) {
    color: #0b140f;
  }

  html:not([data-theme='light']) .pet-picker button[aria-pressed='true'] {
    background: var(--accent);
    border-color: var(--accent);
    color: #110e19;
    font-weight: 700;
    box-shadow: 0 0 12px var(--accent);
  }

  html:not([data-theme='light'])[data-pet='duna'] .pet-picker button[aria-pressed='true'] {
    color: #160f0a;
  }

  html:not([data-theme='light'])[data-pet='broto'] .pet-picker button[aria-pressed='true'] {
    color: #0b140f;
  }

  html:not([data-theme='light']) .demo-controls button[aria-pressed='true'] {
    background: var(--accent);
    border-color: var(--accent);
    color: #110e19;
    font-weight: 700;
    box-shadow: 0 0 10px var(--accent);
  }

  html:not([data-theme='light'])[data-pet='duna'] .demo-controls button[aria-pressed='true'] {
    color: #160f0a;
  }

  html:not([data-theme='light'])[data-pet='broto'] .demo-controls button[aria-pressed='true'] {
    color: #0b140f;
  }

  html:not([data-theme='light']) .theme-toggle .icon-sun {
    display: block;
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent));
  }

  html:not([data-theme='light']) .theme-toggle .icon-moon {
    display: none;
  }

  html:not([data-theme='light']) .hero-art {
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35), 0 0 40px rgba(0, 0, 0, 0.4);
  }

  html:not([data-theme='light']) .art-ground {
    opacity: 0.6;
  }
}

/* ==========================================================================
   Hero: Seletores e Animações dos Personagens
   ========================================================================== */

.hero-picker {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-picker > span {
  font-size: 11px;
  color: var(--muted);
}

.hero-picker .pet-picker {
  margin: 0;
  gap: 6px;
}

.hero-picker button {
  padding: 6px 13px;
  font-size: 11px;
}

.theme-status {
  font: italic 14px var(--serif);
  color: var(--accent-text);
  margin: 12px 0 0;
  min-height: 18px;
}

.art-note {
  white-space: pre-line;
}

.hero-pet {
  animation: float-pet 4s ease-in-out infinite;
  transition: filter 0.6s ease, opacity 0.6s ease;
}

.hero-broto {
  animation-delay: -1.2s;
}

.hero-duna {
  animation-delay: -2.5s;
}

.hero-nimbo {
  animation-delay: -0.5s;
}

.hero-art .hero-pet {
  opacity: 0.65;
  filter: saturate(0.75);
}

html[data-pet='nimbo'] .hero-nimbo,
html[data-pet='duna'] .hero-duna,
html[data-pet='broto'] .hero-broto {
  opacity: 1;
  filter: saturate(1.12);
  z-index: 4;
}

.pixel-spark {
  animation: spark-spin-right 5.6s ease-in-out infinite;
  will-change: transform, opacity;
  z-index: 5;
}

.spark-one {
  animation: spark-spin-right 5.2s ease-in-out infinite;
  animation-delay: -0.8s;
}

.spark-two {
  animation: spark-spin-left 6.0s ease-in-out infinite;
  animation-delay: -3.2s;
}

.spark-three {
  animation: spark-twirl 5.6s ease-in-out infinite;
  animation-delay: -1.9s;
}

.spark-four {
  animation: spark-pulse-turn 4.8s ease-in-out infinite;
  animation-delay: -2.4s;
}

.spark-five {
  animation: spark-spin-left 5.8s ease-in-out infinite;
  animation-delay: -4.1s;
}

.orbit {
  position: absolute;
  background: var(--accent);
  opacity: 0.4;
  animation: orbit-spin-cw 5.8s ease-in-out infinite;
  will-change: transform, opacity;
  z-index: 5;
}

.orbit-one {
  animation: orbit-spin-cw 5.4s ease-in-out infinite;
  animation-delay: -1.2s;
}

.orbit-two {
  animation: orbit-spin-ccw 6.2s ease-in-out infinite;
  animation-delay: -3.8s;
}

.orbit-three {
  animation: orbit-slow-tilt 5.0s ease-in-out infinite;
  animation-delay: -2.0s;
}

.orbit-four {
  animation: orbit-spin-cw 4.6s ease-in-out infinite;
  animation-delay: -0.5s;
}

.orbit-five {
  animation: orbit-spin-ccw 5.9s ease-in-out infinite;
  animation-delay: -4.5s;
}

.paper-stamp {
  animation: stamp-rock 6s ease-in-out infinite;
}

.button {
  transition: translate 0.2s, background 0.3s, box-shadow 0.2s;
}

.button:not(.button-ghost):hover {
  translate: 0 -3px;
  box-shadow: 0 6px 0 var(--ground);
}

.pet-picker button:hover {
  border-color: var(--accent);
}

.pet-picker button[aria-pressed='true'] {
  box-shadow: 0 3px 0 var(--ground);
}

/* ==========================================================================
   Demonstração Interativa & Efeitos
   ========================================================================== */

.demo {
  --pet-scale: 1;
  --walk-distance: clamp(50px, 12vw, 170px);
}

.demo-pet img {
  scale: var(--pet-scale);
  transition: scale 0.25s ease;
  transform-origin: bottom center;
}

.demo[data-mode='normal'] .demo-pet img {
  animation: breathe 3.5s ease-in-out infinite;
}

.demo[data-mode='sleep'] .demo-pet img {
  animation: breathe 5s ease-in-out infinite;
  opacity: 0.82;
}

.demo[data-mode='sleep'] {
  background: var(--ground);
}

.demo[data-mode='walk'] .demo-pet {
  animation: walk-pet 6s ease-in-out infinite;
}

.demo[data-mode='water'] .demo-pet {
  animation: water-hop 2.8s ease-in-out infinite;
}

.demo .demo-pet.hop {
  animation: hop 0.45s ease-out;
}

.scene-particles span {
  position: absolute;
  right: 18%;
  bottom: 100px;
  opacity: 0;
  color: var(--accent);
  font-size: 26px;
  pointer-events: none;
}

.demo[data-mode='music'] .scene-particles span {
  animation: music-notes 2.4s ease-out infinite;
}

.scene-particles span:nth-child(2) {
  right: 35%;
  animation-delay: 0.8s !important;
}

.scene-particles span:nth-child(3) {
  right: 12%;
  animation-delay: 1.5s !important;
}

/* Efeito de soneca (zzz) centralizado sobre o pet */
.demo-message {
  margin: 0;
}

.demo .sleep-letters {
  display: none;
  position: absolute;
  right: 85px;
  bottom: 185px;
  width: 50px;
  height: 65px;
  font-family: var(--serif);
  font-style: normal;
  letter-spacing: 0;
  color: var(--accent);
  pointer-events: none;
  z-index: 4;
}

.demo[data-mode='sleep'] .sleep-letters {
  display: block;
  animation: sleep-z 3s ease-in-out infinite;
}

.sleep-letters span {
  position: absolute;
  line-height: 1;
}

.sleep-letters span:nth-child(1) {
  left: 0;
  bottom: 0;
  font-size: 16px;
}

.sleep-letters span:nth-child(2) {
  left: 14px;
  bottom: 22px;
  font-size: 21px;
}

.sleep-letters span:nth-child(3) {
  left: 28px;
  bottom: 46px;
  font-size: 26px;
}

.demo-controls button {
  transition: background 0.25s, translate 0.2s;
}

.demo-controls button:hover {
  translate: 0 -2px;
  border-color: var(--accent);
}

.demo-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  flex-wrap: wrap;
  font-size: 11px;
}

.demo-settings label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.demo-settings input {
  width: 110px;
  accent-color: var(--accent);
  cursor: pointer;
}

.demo-settings output {
  min-width: 35px;
}

.demo-settings button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 4px;
  font-size: 11px;
  color: var(--muted);
}

.demo-caption {
  line-height: 1.7;
}

/* ==========================================================================
   Grade 'Como Funciona' & Mini Cenas
   ========================================================================== */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.how-grid h3 {
  font: 400 25px var(--serif);
  margin: 15px 0 12px;
}

.how-grid p {
  font-size: 14px;
  color: var(--muted);
}

.mini-scene {
  height: 210px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 5px;
  border: 1px solid var(--line);
}

.mini-scene img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  position: absolute;
  bottom: 10px;
  right: 20px;
  image-rendering: pixelated;
}

.companion-choices {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 12px;
}

.companion-choices button {
  flex: 1;
  min-width: 0;
  padding: 10px 2px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.3s, border-color 0.3s, translate 0.3s;
}

.companion-choices button:hover {
  translate: 0 -4px;
}

.companion-choices button[aria-pressed='true'] {
  background: var(--paper);
  border-color: var(--accent);
}

.companion-choices img {
  position: static;
  display: block;
  width: 100%;
  height: 95px;
  object-fit: contain;
  animation: none;
}

.companion-choices span,
.companion-choices small {
  display: block;
  text-align: center;
}

.companion-choices span {
  font-size: 13px;
}

.companion-choices small {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}

.companion-choices button[aria-pressed='true'] small {
  font-size: 0;
}

.companion-choices button[aria-pressed='true'] small:after {
  content: 'Selecionado';
  font-size: 9px;
}

.area-outline {
  position: absolute;
  inset: 30px 20px 20px;
  border: 1px dashed var(--accent);
  border-radius: 4px;
}

.scene-space img {
  animation: mini-stroll 6s ease-in-out infinite;
}

.scene-rest img {
  animation: breathe 4s ease-in-out infinite;
}

.tiny-bubble {
  position: absolute;
  left: 25px;
  top: 30px;
  font: italic 18px var(--serif);
  background: var(--note);
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 8px;
  animation: gentle-bubble 4s ease-in-out infinite;
}

.arrived {
  animation: arrive 0.7s ease-out both;
}

.feature-list article {
  transition: translate 0.2s;
}

.feature-list article:hover {
  translate: 4px 0;
}

.feature-list article:hover .feature-mark {
  color: var(--ink);
}

.pet-description {
  border-left: 2px solid var(--accent);
  padding-left: 22px;
}

/* ==========================================================================
   Modo Discreto
   ========================================================================== */

.quiet-section {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.quiet-section > div > p:not(.eyebrow):not(.small-note):not(.quiet-status) {
  color: var(--muted);
  font-size: 15px;
  max-width: 440px;
}

.quiet-toggle {
  border: 0;
  margin-top: 16px;
}

.quiet-preview {
  position: relative;
  height: 330px;
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
}

.quiet-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  padding: 12px 15px;
  font-size: 10px;
  color: var(--muted);
}

.quiet-bar > span:first-child {
  letter-spacing: 3px;
  color: var(--accent);
}

.quiet-document {
  position: absolute;
  inset: 65px 70px 45px 30px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.quiet-document > span {
  font: italic 21px var(--serif);
}

.quiet-document i {
  display: block;
  height: 2px;
  background: var(--line);
  margin-top: 23px;
  width: 85%;
}

.quiet-document i:last-child {
  width: 55%;
}

.quiet-pet {
  position: absolute;
  right: 15px;
  bottom: 18px;
  width: 200px;
  height: 200px;
  object-fit: contain;
  image-rendering: pixelated;
  z-index: 2;
  transform-origin: bottom right;
  transition: transform 0.8s ease;
}

.quiet-preview[data-discrete='true'] .quiet-pet {
  transform: scale(0.35);
}

.quiet-floor {
  position: absolute;
  inset: auto 0 0;
  height: 20px;
  background: var(--ground);
  border-top: 1px solid var(--line);
}

.quiet-status {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}

/* ==========================================================================
   Retratos dos Personagens
   ========================================================================== */

.release-faces {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 0 1 360px;
  min-width: 0;
}

.release-faces figure {
  margin: 0;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.release-faces figure:nth-child(2) {
  translate: 0 -12px;
}

.release-face {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.release .release-face img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.release-faces figcaption {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink);
  margin-top: 12px;
}

/* ==========================================================================
   Keyframes das Animações
   ========================================================================== */

@keyframes float-pet {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes spark-spin-right {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-7px) rotate(25deg);
    opacity: 0.9;
  }
}

@keyframes spark-spin-left {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-6px) rotate(-22deg);
    opacity: 0.85;
  }
}

@keyframes spark-twirl {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-8px) rotate(45deg);
    opacity: 0.95;
  }
}

@keyframes spark-pulse-turn {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-5px) rotate(15deg);
    opacity: 0.8;
  }
}

@keyframes orbit-spin-cw {
  0%, 100% {
    transform: translateY(0) rotate(45deg);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-7px) rotate(135deg);
    opacity: 0.85;
  }
}

@keyframes orbit-spin-ccw {
  0%, 100% {
    transform: translateY(0) rotate(45deg);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-6px) rotate(-45deg);
    opacity: 0.8;
  }
}

@keyframes orbit-slow-tilt {
  0%, 100% {
    transform: translateY(0) rotate(45deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-5px) rotate(90deg);
    opacity: 0.75;
  }
}

@keyframes stamp-rock {
  0%, 100% { rotate: -2deg; }
  50% { rotate: 3deg; }
}

@keyframes breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.96); }
}

@keyframes walk-pet {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25% { translate: calc(-1 * var(--walk-distance)) -5px; rotate: -4deg; }
  50% { translate: calc(-1 * var(--walk-distance)) 0; rotate: 0deg; }
  75% { translate: 0 -5px; rotate: 4deg; }
}

@keyframes music-notes {
  0% { opacity: 0; transform: translateY(0) rotate(-10deg); }
  30% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-110px) rotate(15deg); }
}

@keyframes sleep-z {
  0%, 100% { opacity: 0.3; translate: 0 0; }
  50% { opacity: 0.8; translate: 8px -12px; }
}

@keyframes water-hop {
  0%, 30%, 100% { translate: 0 0; }
  15% { translate: 0 -15px; }
}

@keyframes mini-stroll {
  0%, 100% { translate: 0 0; }
  50% { translate: -70px 0; }
}

@keyframes gentle-bubble {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@keyframes arrive {
  from { opacity: 0.4; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}

/* Pausa de animações quando fora da tela ou solicitado pelo usuário */
[data-offscreen='true'],
[data-offscreen='true'] *,
html[data-hidden='true'] *,
html[data-motion='paused'] * {
  animation-play-state: paused !important;
}

html[data-motion='paused'] .arrived {
  animation: none;
}

html[data-motion='paused'] * {
  transition: none !important;
}

/* ==========================================================================
   Breakpoints & Responsividade de Temas
   ========================================================================== */

@media (max-width: 950px) {
  .how-grid {
    gap: 18px;
  }

  .how-grid h3 {
    font-size: 22px;
  }

  .mini-scene img {
    width: 120px;
    height: 120px;
    right: 10px;
  }

  .hero-picker {
    margin-top: 22px;
  }

  .release {
    flex-wrap: wrap;
  }

  .release-faces {
    flex-basis: 320px;
    max-width: 360px;
    width: 100%;
    margin: 10px auto 22px;
  }
}

@media (max-width: 800px) {
  .quiet-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .quiet-section > div > p:not(.eyebrow) {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .hero-art {
    height: 340px;
  }

  .hero-picker {
    gap: 6px;
  }

  .hero {
    gap: 35px;
  }

  .demo {
    --walk-distance: 65px;
  }

  .demo-controls button {
    padding: 9px 4px;
    min-height: 38px;
  }

  .demo-settings {
    gap: 8px;
    justify-content: space-between;
  }

  .demo-settings label {
    font-size: 11px;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mini-scene {
    height: 180px;
  }

  .mini-scene img {
    width: 120px;
    height: 120px;
    right: 15px;
  }

  .how-grid h3 {
    font-size: 22px;
  }

  .demo .sleep-letters {
    right: 50px;
    bottom: 155px;
  }

  .howto .section-heading h2 {
    font-size: 30px;
  }

  .companion-choices img {
    height: 75px;
  }

  .quiet-preview {
    height: 270px;
  }

  .quiet-document {
    inset: 45px 30px 35px 18px;
    padding: 16px;
  }

  .quiet-document > span {
    font-size: 17px;
  }

  .quiet-pet {
    width: 140px;
    height: 140px;
    right: 10px;
    bottom: 14px;
  }

  .release-faces {
    flex: none;
    width: 100%;
    margin: 8px auto 0;
    gap: 8px;
  }

  .release-faces figcaption {
    font-size: 10px;
  }
}
