/* 톡톡숲 — 인스타 프로필처럼: 민트 바탕, 노란 모자, 크림 간판에 짙은 초록 글자.
   한 화면 앱: 책장(아이) · 읽기 무대 · 어른 확인 · 어른 설정. */
:root {
  --paper: #e3f6ef;        /* 책장 바탕(연한 민트) */
  --mint: #91e1d1;         /* 프로필 배경 민트 */
  --paper-deep: #fff4dc;   /* 크림 간판색: 카드·칸 */
  --ink: #3e2a1d;          /* 코코아 글자 */
  --ink-soft: #6b5a4b;
  --teal: #13643c;         /* 간판 글자의 짙은 초록: 주요 버튼 */
  --teal-ink: #ffffff;
  --brand-green: #0b5a2e;
  --sun: #f5c043;          /* 하루의 노란 모자 */
  --coral: #e9805f;
  --line: #bfe3d6;
  --stage: #0f3b35;        /* 읽기 무대(짙은 숲색) */
  --stage-ink: #fff4dc;
  --veil: rgba(9, 38, 33, 0.72);
  --shadow: 0 6px 18px rgba(19, 80, 60, 0.18);
  --font-display: "Jua", "Gowun Dodum", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-body: "Gowun Dodum", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f2a26; --mint: #1f5a50; --paper-deep: #1b3d37; --ink: #fdf3df; --ink-soft: #c5d8cf;
    --teal: #5fc79a; --teal-ink: #08231c; --brand-green: #8fe0b8; --sun: #f2c94c; --coral: #f09a7c; --line: #2c574f;
    --stage: #081c19; --stage-ink: #fdf3df; --veil: rgba(4, 16, 14, 0.8);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f2a26; --mint: #1f5a50; --paper-deep: #1b3d37; --ink: #fdf3df; --ink-soft: #c5d8cf;
  --teal: #5fc79a; --teal-ink: #08231c; --brand-green: #8fe0b8; --sun: #f2c94c; --coral: #f09a7c; --line: #2c574f;
  --stage: #081c19; --stage-ink: #fdf3df; --veil: rgba(4, 16, 14, 0.8);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
* { box-sizing: border-box; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.app { height: 100%; position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.icon { width: 1em; height: 1em; display: block; }

/* ---------- 책장 ---------- */
.shelf { overflow-y: auto; background: linear-gradient(180deg, var(--mint) 0, var(--paper) 320px); }
.shelf-inner {
  width: 100%; max-width: 980px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 14px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.brand-mark { width: 40px; height: 40px; }
.grown-up {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); background: transparent; border-radius: 999px;
  padding: 8px 14px; font-size: 0.9rem; color: var(--ink-soft);
}
.grown-up .icon { font-size: 1rem; }

.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.door {
  position: relative; border: 0; border-radius: 22px; background: var(--paper-deep);
  min-height: 108px; padding: 14px 8px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.15rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.door .icon { font-size: 2.6rem; color: var(--ink-soft); }
.door[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); box-shadow: var(--shadow); }
.door[aria-pressed="true"] .icon { color: var(--teal-ink); }
.door:active { transform: scale(0.96); }
.soon {
  position: absolute; top: 8px; right: 8px; font-family: var(--font-body); font-size: 0.72rem;
  background: var(--sun); color: #4a2e1f; border-radius: 999px; padding: 2px 8px;
}

.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 720px) { .books { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.book {
  border: 0; padding: 0; background: transparent; text-align: left;
  display: flex; flex-direction: column; gap: 8px;
}
.book img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px;
  box-shadow: var(--shadow); background: var(--paper-deep); max-width: 100%;
  transition: transform 0.15s ease;
}
.book:active img { transform: scale(0.97) rotate(-1deg); }
.book-title { word-break: keep-all; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3; text-wrap: balance; }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 40px 16px; border-radius: 22px; background: var(--paper-deep);
}
.empty .icon { font-size: 4rem; color: var(--ink-soft); }
.empty-title { font-family: var(--font-display); font-size: 1.4rem; }
.empty p { margin: 0; color: var(--ink-soft); max-width: 32ch; }

/* ---------- 읽기 무대 ---------- */
.reader { background: var(--stage); color: var(--stage-ink); touch-action: pan-y; user-select: none; }
.stage {
  flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center;
  padding: calc(64px) max(80px, calc(env(safe-area-inset-right, 0px) + 80px)) calc(56px) max(80px, calc(env(safe-area-inset-left, 0px) + 80px));
}
@media (max-width: 640px) {
  .stage { padding: calc(60px) max(8px, env(safe-area-inset-right, 0px)) calc(96px) max(8px, env(safe-area-inset-left, 0px)); }
}
.spread { height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.page {
  position: relative; flex: none; height: 100%; max-height: 100%; max-width: 100%; aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
}
.spread.two .page { max-width: none; }
.page img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); pointer-events: none; }
.spread.two .page:first-child img { border-radius: 6px 0 0 6px; }
.spread.two .page:last-child img { border-radius: 0 6px 6px 0; }
.spread.enter { animation: pageIn 0.16s ease-out both; }
@keyframes pageIn { from { opacity: 0.4; transform: translateX(var(--from, 24px)); } to { opacity: 1; transform: none; } }
.hotspot { position: absolute; border: 0; background: transparent; border-radius: 50%; }

.r-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  z-index: 3;
}
.round {
  width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 246, 232, 0.14); color: var(--stage-ink); font-size: 1.6rem;
}
.round:active { transform: scale(0.94); }
.voice-note { font-size: 0.82rem; opacity: 0.8; background: rgba(255, 246, 232, 0.12); border-radius: 999px; padding: 6px 12px; }
.nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 246, 232, 0.92); color: #4a2e1f; font-size: 2rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.nav.prev { left: max(10px, calc(env(safe-area-inset-left, 0px) + 10px)); }
.nav.next { right: max(10px, calc(env(safe-area-inset-right, 0px) + 10px)); }
.nav[disabled] { opacity: 0.25; }
@media (max-width: 640px) {
  .nav { top: auto; transform: none; bottom: calc(16px); }
}
.r-bottom {
  position: absolute; left: 0; right: 0; bottom: calc(18px);
  display: flex; align-items: center; justify-content: center; gap: 16px; z-index: 2; pointer-events: none;
}
.r-bottom > * { pointer-events: auto; }
@media (max-width: 640px) { .r-bottom { bottom: calc(30px); } }
.dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; max-width: 60vw; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 246, 232, 0.3); }
.dot.on { background: var(--sun); transform: scale(1.3); }
/* 책 아래 동그라미: 누르기 쉽게 버튼 영역을 넓히고 동그라미는 안쪽 <i>로 그린다 */
.dots { gap: 0; }
.dots .dot { width: auto; height: auto; padding: 7px 5px; border: 0; margin: 0; background: none; cursor: pointer; transform: none; -webkit-tap-highlight-color: transparent; }
.dots .dot i { display: block; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 246, 232, 0.35); transition: transform .15s; }
.dots .dot.on i { background: var(--sun); transform: scale(1.3); }
.dots .dot:active i { transform: scale(1.6); }
.dot-tip { position: absolute; left: 50%; bottom: 64px; transform: translate(-50%, 8px); z-index: 6; pointer-events: none;
  background: var(--sun); color: #4a2e1f; font-weight: 800; font-size: 1.1rem; padding: 6px 16px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); opacity: 0; transition: opacity .18s, transform .18s; }
.dot-tip.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) { .dot-tip { bottom: 78px; } }
.play { background: var(--sun); color: #4a2e1f; }
.timer { position: absolute; top: 0; left: 0; height: 4px; background: var(--sun); width: 0; z-index: 4; }

.spark { position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 5; color: var(--sun); animation: spark 0.7s ease-out forwards; }
@keyframes spark {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(90deg); opacity: 0; }
}

/* 다 읽었어요 · 오늘은 여기까지 */
.overlay {
  position: absolute; inset: 0; z-index: 6; background: var(--veil);
  display: grid; place-items: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px;
}
.card {
  width: min(380px, 100%); background: var(--paper); color: var(--ink); border-radius: 28px; padding: 28px 22px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; box-shadow: var(--shadow);
}
.card h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.card p { margin: 0; color: var(--ink-soft); }
.sticker { width: 96px; height: 96px; color: var(--sun); animation: pop 0.5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(0.2) rotate(-30deg); } to { transform: none; } }
.choices { display: flex; gap: 12px; width: 100%; }
.big {
  flex: 1; min-height: 64px; border: 0; border-radius: 20px; font-family: var(--font-display); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.big.primary { background: var(--teal); color: var(--teal-ink); }
.big.quiet { background: var(--paper-deep); }
.big .icon { font-size: 1.5rem; }

/* ---------- 어른 확인 ---------- */
.gate .card { gap: 16px; }
.gate-q { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.answers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.answers button { min-height: 56px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--paper-deep); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.text-btn { border: 0; background: transparent; color: var(--ink-soft); text-decoration: underline; padding: 6px; }

/* ---------- 어른 설정 ---------- */
.parent { overflow-y: auto; }
.parent-inner {
  width: 100%; max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 14px 40px; display: flex; flex-direction: column; gap: 22px;
}
.parent h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.parent h2 { margin: 0 0 10px; font-size: 1.05rem; }
.parent section { display: flex; flex-direction: column; gap: 6px; }
.hint { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent;
}
.seg button[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.seg button[disabled] { opacity: 0.45; cursor: not-allowed; }
.table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { white-space: nowrap; font-weight: 400; color: var(--ink-soft); font-size: 0.82rem; }
tr:last-child td { border-bottom: 0; }
td img { width: 42px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; display: block; }
.num { font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 0.75rem; border-radius: 999px; padding: 3px 8px; white-space: nowrap; border: 1px solid var(--line); }
.chip.ok { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.chip.part { background: var(--sun); color: #4a2e1f; border-color: var(--sun); }
.chip.none { color: var(--ink-soft); border-style: dashed; }
.todo { margin: 0; padding-left: 1.2em; color: var(--ink-soft); display: flex; flex-direction: column; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 같이 읽기: 누르는 곳과 효과 ---------- */
.hotspot { z-index: 1; cursor: pointer; border-radius: 22%; }
.hotspot:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.hinting .hotspot { animation: hint 1.6s ease-in-out 3; box-shadow: 0 0 0 3px rgba(255, 224, 140, 0.0); }
@keyframes hint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 224, 140, 0); background: transparent; }
  50% { box-shadow: 0 0 0 4px rgba(255, 224, 140, 0.75), 0 0 22px 6px rgba(255, 224, 140, 0.45); background: rgba(255, 240, 190, 0.12); }
}
.fx { position: absolute; z-index: 2; pointer-events: none; }
.lift {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto !important; border-radius: 18%;
  background-repeat: no-repeat; animation: lift 0.9s cubic-bezier(.3, 1.5, .5, 1) both;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35)) saturate(1.15) brightness(1.06);
}
@keyframes lift {
  0% { transform: scale(1); }
  30% { transform: scale(1.16) translateY(-6%); }
  55% { transform: scale(0.97) translateY(0); }
  75% { transform: scale(1.06) translateY(-2%); }
  100% { transform: scale(1); opacity: 0; }
}
.halo {
  position: absolute; inset: -18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 244, 196, 0.95), rgba(255, 214, 120, 0.55) 45%, rgba(255, 214, 120, 0) 72%);
  mix-blend-mode: screen; animation: halo 1.6s ease-in-out both;
}
@keyframes halo { 0% { opacity: 0; transform: scale(0.7); } 25% { opacity: 1; transform: scale(1); } 60% { opacity: 0.6; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
.flame { position: absolute; top: -14%; width: 14%; max-width: 34px; aspect-ratio: 1 / 1.3; transform: translateX(-50%); animation: flame 2.4s ease-in-out both; }
.flame .icon { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(255, 190, 70, 0.95)); }
@keyframes flame {
  0% { opacity: 0; transform: translateX(-50%) scale(0.2); }
  15% { opacity: 1; transform: translateX(-50%) scale(1.1); }
  30%, 50%, 70% { transform: translateX(-50%) scale(0.92) rotate(-4deg); }
  40%, 60%, 80% { transform: translateX(-50%) scale(1.05) rotate(4deg); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.9); }
}
.particle { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; animation: float 1.3s ease-out both; }
.particle .icon { width: 100%; height: 100%; }
.p-spark { color: var(--sun); width: 18px; height: 18px; margin: -9px 0 0 -9px; animation-duration: 0.8s; }
.p-heart { color: #ef6f8e; }
.p-note { color: #6b5bd6; }
.p-bubble { color: #7fd3f2; }
@keyframes float {
  0% { transform: translate(0, 0) scale(0.3); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; }
}
.say {
  position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -110%);
  background: #fff6e8; color: #4a2e1f; border-radius: 999px; padding: 6px 16px;
  font-family: var(--font-display); font-size: clamp(1rem, 3.4vw, 1.5rem); white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); animation: say 1.8s ease both;
}
.say.below { transform: translate(-50%, 10%); }
@keyframes say { 0% { opacity: 0; scale: 0.6; } 12% { opacity: 1; scale: 1.08; } 20% { scale: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 책 끝 퀴즈 ---------- */
.quiz {
  position: absolute; inset: 0; z-index: 7; background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column; overflow-y: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 10px 24px;
}
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.round.soft { background: var(--paper-deep); color: var(--ink); }
.q-space { width: 56px; }
.q-dots { display: flex; gap: 8px; }
.q-dots .dot { width: 12px; height: 12px; background: var(--line); }
.q-dots .dot.on { background: var(--teal); transform: scale(1.25); }
.q-dots .dot.done { background: var(--sun); }
.quiz-body {
  flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding-top: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
.q-ask { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.3rem); line-height: 1.25; text-wrap: balance; word-break: keep-all; }
.q-hint { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.q-figure {
  position: relative; border: 0; padding: 0; border-radius: 28px; background-repeat: no-repeat; background-color: var(--paper-deep);
  width: min(68vw, 380px); max-height: 46vh; max-width: 100%; box-shadow: var(--shadow); cursor: pointer;
}
.q-figure.wide { width: min(92vw, 640px); cursor: default; }
.q-figure.shown { cursor: default; animation: pop 0.5s cubic-bezier(.2, 1.6, .4, 1); }
.q-answer { font-family: var(--font-display); font-size: clamp(2rem, 9vw, 3.2rem); color: var(--teal); animation: pop 0.5s cubic-bezier(.2, 1.6, .4, 1) both; }
.q-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.q-pick {
  position: relative; border: 4px solid transparent; padding: 0; border-radius: 22px; background-repeat: no-repeat; background-color: var(--paper-deep);
  width: 100%; max-height: 34vh; box-shadow: var(--shadow); cursor: pointer; transition: opacity 0.2s, transform 0.15s;
}
.q-pick:active { transform: scale(0.96); }
.q-pick.right { border-color: var(--teal); transform: scale(1.04); }
.q-pick.dim { opacity: 0.35; }
.q-nums { display: flex; gap: 14px; justify-content: center; width: 100%; }
.q-num {
  min-width: 88px; min-height: 88px; border-radius: 26px; border: 3px solid var(--line); background: var(--paper-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.q-num .n { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.q-num .w { font-size: 0.95rem; color: var(--ink-soft); }
.q-num.right { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.q-num.right .w { color: var(--teal-ink); }
.q-next { flex: 0 0 auto; min-width: 180px; }
.q-next .icon { font-size: 1.3rem; }
.star-row { display: flex; gap: 8px; }
.star-big { width: 52px; height: 52px; color: var(--line); }
.star-big.got { color: var(--sun); animation: pop 0.5s cubic-bezier(.2, 1.6, .4, 1) both; }
.star-big.got:nth-child(2) { animation-delay: 0.12s; }
.star-big.got:nth-child(3) { animation-delay: 0.24s; }
.star-big.got:nth-child(4) { animation-delay: 0.36s; }

/* 책장의 언어 고르기: 한국어 책 / 영어 책 */
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 999px; background: var(--paper-deep); }
.lang {
  min-height: 52px; border: 0; border-radius: 999px; background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-soft);
}
.lang-mark {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); font-size: 1.05rem; line-height: 1;
}
.lang[aria-pressed="true"] { background: var(--sun); color: #4a2e1f; box-shadow: var(--shadow); }
.lang[aria-pressed="true"] .lang-mark { background: #fff6e8; color: #4a2e1f; }


/* ---------- 브랜드: 하루 + 크림 간판 ---------- */
.brand { gap: 0; }
.brand-avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none;
  border: 3px solid var(--paper-deep); box-shadow: var(--shadow); background: var(--mint); position: relative; z-index: 1;
}
.brand-sign {
  margin-left: -14px; padding: 8px 18px 8px 24px; border-radius: 999px; background: var(--paper-deep);
  color: var(--brand-green); font-family: var(--font-display); font-size: 1.7rem; line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(11, 90, 46, 0.12), var(--shadow); letter-spacing: 0.02em;
}
.greet { margin: -4px 0 0; font-family: var(--font-display); font-size: 1.25rem; color: var(--brand-green); }
.grown-up { background: var(--paper-deep); border-color: transparent; }
.lang-mark { background: var(--paper); }
.door { background: var(--paper-deep); }
.door[aria-pressed="true"] .icon { color: var(--teal-ink); }
.book { position: relative; }
.read-badge {
  position: absolute; top: 8px; right: 8px; z-index: 1; display: flex; align-items: center; gap: 3px;
  background: var(--sun); color: #4a2e1f; border-radius: 999px; padding: 3px 9px 3px 6px;
  font-size: 0.8rem; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); font-variant-numeric: tabular-nums;
}
.read-badge .icon { width: 15px; height: 15px; }

/* ---------- 첫 화면 ---------- */
.splash {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #91e1d1;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.splash img { width: min(62vw, 340px); height: auto; aspect-ratio: 1; border-radius: 28%; box-shadow: 0 18px 40px rgba(11, 90, 46, 0.25); animation: splashPop 0.8s cubic-bezier(.2, 1.4, .4, 1) both; }
.splash.done { opacity: 0; visibility: hidden; }
@keyframes splashPop { from { transform: scale(0.6) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 사물마다 다른 움직임 ---------- */
.lift.m-wag { animation: m-wag 1.1s ease-in-out both; transform-origin: 50% 80%; }
@keyframes m-wag { 0%,100% { transform: none; } 15% { transform: rotate(-9deg) scale(1.08); } 30% { transform: rotate(9deg) scale(1.08); } 45% { transform: rotate(-7deg) scale(1.06); } 60% { transform: rotate(7deg) scale(1.06); } 80% { transform: rotate(0) scale(1.03); opacity: 1; } 100% { opacity: 0; } }
.lift.m-hop { animation: m-hop 1.1s ease-out both; }
@keyframes m-hop { 0% { transform: none; } 20% { transform: translateY(-22%) scaleY(1.05); } 35% { transform: translateY(0) scaleY(0.92); } 55% { transform: translateY(-14%); } 70% { transform: translateY(0) scaleY(0.96); } 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.lift.m-waddle { animation: m-waddle 1.1s ease-in-out both; transform-origin: 50% 100%; }
@keyframes m-waddle { 0%,100% { transform: none; } 20% { transform: rotate(-8deg) translateX(-3%); } 40% { transform: rotate(8deg) translateX(3%); } 60% { transform: rotate(-6deg) translateX(-2%); } 80% { transform: rotate(0); opacity: 1; } 100% { opacity: 0; } }
.lift.m-swim { animation: m-swim 1.3s ease-in-out both; }
@keyframes m-swim { 0% { transform: none; } 25% { transform: translate(6%, -6%) rotate(-5deg); } 50% { transform: translate(-4%, 3%) rotate(4deg); } 75% { transform: translate(3%, -3%); opacity: 1; } 100% { transform: none; opacity: 0; } }
.lift.m-float { animation: m-float 1.5s ease-in-out both; }
@keyframes m-float { 0% { transform: none; } 30% { transform: translateY(-12%) scale(1.06, 0.95); } 55% { transform: translateY(-4%) scale(0.96, 1.05); } 80% { transform: translateY(-10%); opacity: 1; } 100% { transform: none; opacity: 0; } }
.lift.m-side { animation: m-side 1.1s ease-in-out both; }
@keyframes m-side { 0%,100% { transform: none; } 25% { transform: translateX(-10%); } 50% { transform: translateX(10%); } 75% { transform: translateX(-5%); opacity: 1; } 100% { opacity: 0; } }
.lift.m-spin { animation: m-spin 1.1s ease-out both; }
@keyframes m-spin { 0% { transform: none; } 70% { transform: rotate(360deg) scale(1.12); opacity: 1; } 100% { transform: rotate(360deg); opacity: 0; } }
.lift.m-roll { animation: m-roll 1.2s ease-in-out both; }
@keyframes m-roll { 0% { transform: none; } 30% { transform: translateX(12%) rotate(40deg); } 60% { transform: translateX(-8%) rotate(-25deg); } 80% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.lift.m-chug { animation: m-chug 1.1s linear both; }
@keyframes m-chug { 0%,100% { transform: none; } 10%,30%,50%,70% { transform: translate(-2%, -2%); } 20%,40%,60% { transform: translate(2%, 1%); } 85% { opacity: 1; } 100% { opacity: 0; } }
.lift.m-flap { animation: m-flap 1.2s ease-in-out both; }
@keyframes m-flap { 0% { transform: none; } 20% { transform: translateY(-14%) scaleX(1.08); } 40% { transform: translateY(-6%) scaleX(0.95); } 60% { transform: translateY(-16%) scaleX(1.08); } 80% { transform: translateY(-4%); opacity: 1; } 100% { transform: none; opacity: 0; } }
.lift.m-sway { animation: m-sway 1.3s ease-in-out both; transform-origin: 50% 90%; }
@keyframes m-sway { 0%,100% { transform: none; } 25% { transform: rotate(-6deg) scale(1.06); } 55% { transform: rotate(6deg) scale(1.06); } 80% { transform: rotate(-2deg); opacity: 1; } 100% { opacity: 0; } }
.lift.m-nod { animation: m-nod 1s ease-in-out both; transform-origin: 50% 100%; }
@keyframes m-nod { 0%,100% { transform: none; } 25% { transform: scale(1.06) translateY(-4%); } 50% { transform: scale(0.98); } 70% { transform: scale(1.04) translateY(-2%); opacity: 1; } 100% { opacity: 0; } }
.lift.m-peek { animation: m-peek 1.3s ease-in-out both; transform-origin: 30% 60%; }
@keyframes m-peek { 0% { transform: none; } 30% { transform: translateX(-6%) scale(0.94); } 60% { transform: translateX(6%) scale(1.08); } 80% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.drop { position: absolute; width: 16px; height: 22px; margin-left: -8px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #8fd8f5; box-shadow: inset -3px -3px 0 rgba(255,255,255,.6); animation: drop 1.1s ease-out both; }
@keyframes drop { 0% { transform: translate(0, 0) scale(0.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }
.name-row { display: flex; gap: 8px; align-items: center; }
.name-row input { min-height: 44px; flex: 1; max-width: 260px; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 12px; font: inherit; background: var(--paper-deep); color: var(--ink); }

/* ---------- 글자 없는 그림 위의 문장·숫자 ---------- */
.page { --pw: 360px; --ph: 480px; }
.page .caption {
  position: absolute; z-index: 4; display: flex; align-items: center; justify-content: center; text-align: center;
  left: 0; top: 80%; width: 100%; height: 20%;
  padding: calc(var(--pw) * 0.015) calc(var(--pw) * 0.04);
  background: #fff1d5; border-radius: 0 0 6px 6px;
  pointer-events: auto;
}
.page .caption p {
  margin: 0; font-family: var(--font-display); color: #3e2a1d; font-size: calc(var(--pw) * 0.047); line-height: 1.3;
  word-break: keep-all; text-wrap: balance;
}
.page .caption .w { pointer-events: auto; cursor: pointer; border-radius: 0.3em; padding: 0 0.06em; transition: background 0.2s, color 0.2s; }
.page .caption .w.on { background: #f5c043; color: #3e2a1d; }
.page .caption .w.said { color: #6b5a4b; }
.page .caption .w.tap { animation: wordtap 0.6s ease; }
@keyframes wordtap { 0% { background: #f5c043; transform: scale(1); } 40% { transform: scale(1.15); } 100% { background: transparent; transform: none; } }
.page .big-num {
  position: absolute; z-index: 2; transform: translate(-50%, -50%); pointer-events: none;
  font-family: var(--font-display); color: #3e2a1d; line-height: 1; font-variant-numeric: tabular-nums;
}
.page .slot-label {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: calc(var(--pw) * 0.016); pointer-events: none;
  font-family: var(--font-display); color: #3e2a1d; font-size: calc(var(--pw) * 0.036); white-space: nowrap; padding-left: calc(var(--pw) * 0.01);
}
.page .slot-label b { font-weight: 400; font-size: calc(var(--pw) * 0.052); line-height: 1; flex: none; }
.page .slot-label span { white-space: normal; line-height: 1.05; }
/* 칸 반짝임: 칸 전체를 빛 테두리로 */
.page .cell-glow { position: absolute; z-index: 3; pointer-events: none; border-radius: calc(var(--pw) * 0.03);
  animation: cell-glow 1.4s ease-in-out both; }
@keyframes cell-glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 200, 70, 0); background: rgba(255, 240, 180, 0); }
  25%, 70% { box-shadow: 0 0 0 calc(var(--pw) * 0.007) rgba(255, 190, 60, .95), 0 0 calc(var(--pw) * 0.03) rgba(255, 200, 80, .7); background: rgba(255, 246, 200, .22); }
  100% { box-shadow: 0 0 0 0 rgba(255, 200, 70, 0); background: rgba(255, 240, 180, 0); }
}

/* 영상 조각: 쪽 그림을 그대로 덮는다 */
.page .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.25s; }
.page .clip.on { opacity: 1; transition: none; }

/* 숫자 누르면 세기 */
.page .tap-num { border: 0; background: transparent; padding: 0.05em 0.25em; border-radius: 0.3em; cursor: pointer; pointer-events: auto; z-index: 3; }
.page .tap-num.pulse { animation: numpulse 0.5s ease; }
@keyframes numpulse { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.3); } 100% { transform: translate(-50%, -50%) scale(1); } }
.hinting .tap-num { animation: hint 1.6s ease-in-out 3; }
.count-tag {
  position: absolute; transform: translate(-50%, -60%); z-index: 4; pointer-events: none;
  min-width: calc(var(--pw) * 0.07); height: calc(var(--pw) * 0.07); border-radius: 999px; padding: 0 0.3em;
  display: grid; place-items: center; background: #f5c043; color: #3e2a1d; box-shadow: 0 3px 8px rgba(0,0,0,.25);
  font-family: var(--font-display); font-size: calc(var(--pw) * 0.045); line-height: 1; animation: pop 0.35s cubic-bezier(.2,1.6,.4,1) both;
}
.count-fx .lift { animation-iteration-count: 1; }
.count-fx .lift.m-hop { animation: m-hop-stay 0.7s ease-out both; }
@keyframes m-hop-stay { 0% { transform: none; } 30% { transform: translateY(-22%) scaleY(1.05); } 55% { transform: none; } 75% { transform: translateY(-8%); } 100% { transform: none; } }

/* 효과 캔버스와 부드러운 가장자리 */
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.quiz .fx-canvas { border-radius: inherit; }
.lift {
  -webkit-mask-image: radial-gradient(ellipse 52% 54% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 52% 54% at 50% 50%, #000 62%, transparent 100%);
}
.lift.m-boing { animation: m-boing 0.9s cubic-bezier(.28,1.4,.4,1) both; transform-origin: 50% 90%; }
@keyframes m-boing {
  0% { transform: none; }
  18% { transform: scale(1.12, 0.86); }
  38% { transform: scale(0.92, 1.12) translateY(-10%); }
  58% { transform: scale(1.04, 0.96); }
  75% { transform: scale(1, 1); opacity: 1; }
  100% { opacity: 0; }
}

/* 본문 그림 80% / 자막 20% 배치에서 기존 쪽 영상도 같은 그림 영역만 표시 */
.page .clip-frame { position: absolute; inset: 0; overflow: hidden; border-radius: 6px 6px 0 0; z-index: 1; pointer-events: none; }

/* 물뿌리개: 화분 쪽으로 기울였다가 돌아오기 */
.lift.m-pour { animation: m-pour 1.6s ease-in-out both; transform-origin: 60% 75%; }
@keyframes m-pour { 0% { transform: rotate(0) } 18%, 72% { transform: rotate(var(--tilt, -26deg)) translateY(-4%) } 100% { transform: rotate(0) } }

/* Flat pages have no separate background plate. Keep their cutout reaction close
   to the original pose so it cannot leave a second figure behind. Native Kling
   video motion uses its own tracked matte and is unaffected by this fallback. */
.lift.silhouette-lift { animation: cutout-react 0.85s ease-in-out both; filter: brightness(1.025); }
@keyframes cutout-react {
  0%,100% { transform: scale(1); }
  45% { transform: scale(1.04); }
  75% { transform: scale(1.015); }
}
/* 게: 옆걸음(사각사각). 끝까지 보이게 두어 덮개가 사라질 때 깜빡이지 않게 */
.lift.silhouette-lift.m-side { animation: crab-side 1.1s ease-in-out both; transform-origin: 50% 90%; }
@keyframes crab-side {
  0%,100% { transform: none; }
  15% { transform: translateX(-3%) rotate(-2deg); }
  30% { transform: translateX(-5%) translateY(-2%); }
  45% { transform: translateX(-2%) rotate(2deg); }
  60% { transform: translateX(2%) rotate(-2deg); }
  75% { transform: translateX(5%) translateY(-2%); }
  90% { transform: translateX(2%) rotate(1deg); }
}

/* 스프라이트 장면: 고정 배경 + 누른 친구만 움직임. 끝나면 원래 그림으로 */
.page .sprite-stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; border-radius: 6px; }
.page .sprite-stage.out { opacity: 0; transition: opacity 0.25s ease; }
.page .sprite-anim { position: absolute; z-index: 1; pointer-events: none; max-width: none; box-shadow: none; border-radius: 0; object-fit: fill; display: block; }
.page .sprite-anim.out { opacity: 0; transition: opacity 0.25s ease; }

/* 책장 아래 톡톡숲 친구들 */
.friends { margin-top: 28px; }
.friends-title { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 12px; }
.friends-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.friend { flex: 0 0 112px; scroll-snap-align: start; display: grid; gap: 6px; justify-items: center; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.friend-pic { width: 112px; height: 150px; border-radius: 26px; overflow: hidden; background: #fff4df; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); display: block; }
.friend-pic video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.friend-name { font-family: var(--font-display); font-size: 0.95rem; word-break: keep-all; text-align: center; }
.friend.hop .friend-pic { animation: friend-hop 0.35s ease-out; }
@keyframes friend-hop { 0% { transform: scale(1) } 40% { transform: scale(0.92) } 100% { transform: scale(1) } }

/* 너공이 아저씨: 통통통 세 번 들썩이고 크게 뛰어오르기 */
.lift.m-drum { animation: m-drum 1.3s ease-in-out both; transform-origin: 50% 100%; }
@keyframes m-drum { 0% { transform: none; } 8% { transform: translateY(-5%) rotate(-3deg); } 18% { transform: translateY(1%) rotate(1deg) scaleY(0.96); }
  28% { transform: translateY(-5%) rotate(3deg); } 38% { transform: translateY(1%) rotate(-1deg) scaleY(0.96); } 50% { transform: translateY(-6%) rotate(-3deg); }
  62% { transform: translateY(1%) scaleY(0.95); } 75% { transform: translateY(-9%) rotate(2deg) scale(1.04); } 88% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.lift.m-pat { animation: m-pat 1.3s ease-in-out both; transform-origin: 50% 100%; }
@keyframes m-pat { 0% { transform: none; } 10% { transform: scale(1.06, 0.94); } 20% { transform: scale(0.97, 1.04) translateY(-4%); } 30% { transform: scale(1.06, 0.94); } 40% { transform: scale(0.97, 1.04) translateY(-4%); } 50% { transform: scale(1.06, 0.94); } 65% { transform: translateY(-16%) rotate(-4deg) scale(1.05); } 80% { transform: translateY(0) scale(1.03, 0.97); } 90% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.page .sprite-stage.quick-out { opacity: 0; transition: opacity 0.12s linear; }
.page .overlay-clip { position: absolute; z-index: 1; pointer-events: none; object-fit: fill; opacity: 0; display: block; }
.page .overlay-clip.on { opacity: 1; }

/* 가로 화면: 한 쪽 그림을 크게, 문장은 오른쪽 크림 칸에 크게 */
.spread.land { align-items: flex-start; }
.spread.land .page { max-height: none; max-width: none; aspect-ratio: auto; }
.spread.land .page.side-cap > img,
.spread.land .page.side-cap > .clip,
.spread.land .page.side-cap > .clip-frame,
.spread.land .page.side-cap > .sprite-stage,
.spread.land .page.side-cap > .overlay-clip,
.spread.land .page.side-cap > canvas { clip-path: inset(0 0 var(--cut, 0px) 0 round 6px); }
.spread.land .page.side-cap .caption {
  left: calc(100% + var(--gap, 28px)) !important; top: 0 !important; width: var(--sidew) !important; height: var(--arth) !important;
  border-radius: 18px; padding: 24px 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.spread.land .page.side-cap .caption p { font-size: clamp(20px, calc(var(--sidew) * 0.095), 42px) !important; line-height: 1.45; }


/* 휴대폰 가로(낮은 화면): 위아래 여백을 줄이고 버튼을 작게 해 그림·문장을 크게 */
@media (orientation: landscape) and (max-height: 520px) {
  .stage { padding: 8px max(64px, calc(env(safe-area-inset-right, 0px) + 60px)) 20px max(64px, calc(env(safe-area-inset-left, 0px) + 60px)); }
  .r-top { padding-top: 6px; }
  .round { width: 44px; height: 44px; font-size: 1.3rem; }
  .nav { width: 48px; height: 48px; font-size: 1.5rem; }
  .r-bottom { bottom: 4px; }
  .dots .dot { padding: 5px 4px; }
  .dots .dot i { width: 7px; height: 7px; }
  .dot-tip { bottom: 40px; }
  .spread.land .page.side-cap .caption { padding: 12px 14px; border-radius: 14px; }
  .spread.land .page.side-cap .caption p { font-size: clamp(16px, calc(var(--sidew) * 0.1), 30px) !important; line-height: 1.4; }
}

/* 새 책 움직이기(배경 조각 + 움짤) */
.anim-stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .18s ease; }
.anim-stage.on { opacity: 1; }

/* 잠자리 자장가: 책장 맨 아래 문과 밤 화면 */
.lullaby-door {
  margin: 20px 0 8px; width: 100%; min-height: 72px; border: 0; border-radius: 24px; padding: 12px 18px;
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  background: #2d3f63; color: #fff4dc; font-family: var(--font-display); font-size: 1.25rem; box-shadow: var(--shadow);
}
.lullaby-door .icon { font-size: 2rem; color: var(--sun); flex: none; }
.lullaby-door span { display: grid; gap: 2px; }
.lullaby-door small { font-family: var(--font-body); font-size: 0.9rem; opacity: 0.8; }
.view.lullaby { background: radial-gradient(circle at 50% 30%, #3b4f7a, #1c2540 70%); }
.view.lullaby .overlay { background: transparent; }
.view.lullaby .card { background: #24304f; color: #fff4dc; }
.view.lullaby .card p { color: #d9dff0; word-break: keep-all; }
.view.lullaby .big.quiet { background: #34446b; color: #fff4dc; }
/* 읽기 화면(기차 이야기 홍보 페이지와 같게): 넘기기 화살표는 그림 양옆 가운데, 아래에 쪽 번호와 '읽어 주기' */
.r-bottom { flex-direction: column; gap: 6px; }
.page-no { color: rgba(255, 246, 232, 0.85); font-size: 0.9rem; letter-spacing: 0.02em; }
.read-aloud { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 18px 9px 12px;
  background: #A6DED2; color: #1F4D3D; font: inherit; font-size: 1rem; cursor: pointer; }
.read-aloud svg { width: 20px; height: 20px; }
.read-aloud.on { background: #F5C54B; color: #4A3428; }
.reader[data-mode="read"] .stage { padding-bottom: calc(132px); }
@media (max-width: 640px) {
  .nav { top: 50%; bottom: auto; transform: translateY(-50%); width: 40px; height: 40px; font-size: 1.2rem; background: rgba(255, 251, 242, 0.92); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
  .nav.prev { left: 4px; } .nav.next { right: 4px; }
  .nav svg { width: 20px; height: 20px; }
  .reader[data-mode="read"] .stage { padding-bottom: calc(132px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .r-bottom { flex-direction: row; gap: 12px; }
  .reader[data-mode="read"] .stage { padding-bottom: 44px; }
}
.lullaby-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.lullaby-pick {
  display: grid; gap: 6px; justify-items: center; padding: 8px; border: 0; border-radius: 20px; cursor: pointer;
  background: #34446b; color: #fff4dc; font-family: var(--font-display); font-size: 1.05rem; word-break: keep-all;
}
.lullaby-pick img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; object-fit: cover; display: block; }
.lullaby-pick:disabled { opacity: 0.5; cursor: default; }
.lullaby-now { width: min(200px, 60vw); height: auto; aspect-ratio: 1; border-radius: 24px; object-fit: cover; }
/* 자장가 절 그림: 노래에 맞춰 천천히 겹쳐 바뀐다 */
.view.lullaby.has-scenes .card { width: min(560px, 100%); }
.lullaby-bg { position: absolute; inset: 0; overflow: hidden; }
.lullaby-bg .bg-layer { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(22px) brightness(0.5); opacity: 0; transition: opacity 2s ease; }
.lullaby-scene { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #1c2540; }
.lullaby-scene .scene-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2s ease; }
.lullaby-bg .on, .lullaby-scene .on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lullaby-bg .bg-layer, .lullaby-scene .scene-layer { transition: none; } }
