/* Nestlight local demo slice — night indigo + lamp gold */
:root {
  --bg: #0c1424;
  --bg-mid: #141a30;
  --panel: #111b30;
  --panel-2: #162038;
  --ink: #f2e8d5;
  --ink-soft: #c8bba6;
  --muted: #a39682;
  --gold: #FF8B16;
  --ding: #FF8B16;
  --gold-deep: #c66a10;
  --gold-dim: rgba(255, 139, 22, 0.16);
  --line: #2c3454;
  --line-gold: rgba(255, 139, 22, 0.42);
  --good: #8ec8b0;
  --danger-soft: #e8c4a8;
  --shadow: 0 18px 50px rgba(4, 6, 16, 0.45);
  --radius: 16px;
  --font-ui: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-story: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  background-color: #0a1628;
  background-image:
    radial-gradient(900px 420px at 8% -10%, rgba(42, 36, 88, 0.28) 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(58, 42, 24, 0.22) 0%, transparent 48%),
    radial-gradient(500px 300px at 70% 100%, rgba(26, 40, 72, 0.25) 0%, transparent 50%);
  line-height: 1.5;
}

/* Soft approved book backdrop — still first; opacity keeps white story text readable */
.nestlight-book-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* no navy fill here — opacity only softens the book, not a dark plate */
  background-image: url("/assets/nestlight-bg-still.jpg");
  background-size: 135% auto; /* enlarge book vs full cover-crop */
  background-position: center 56%;
  background-repeat: no-repeat;
  opacity: 0.22;
  filter: saturate(0.7);
}

@media (max-width: 720px) {
  .nestlight-book-bg {
    background-image: url("/assets/nestlight-bg-still-phone.jpg");
    background-size: 155% auto;
    background-position: center 58%;
    opacity: 0.18;
  }
}

body > * {
  position: relative;
  z-index: 1;
}
.nestlight-book-bg,
.toy-orbit {
  z-index: 0 !important;
}

.banner {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(230, 182, 92, 0.08);
  border-bottom: 1px solid var(--line-gold);
  padding: 0.55rem 1rem;
}

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0 3.2rem;
}

header.top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0.15rem 0 0.7rem;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #f6d58a 0%, #e6b65c 28%, transparent 29%),
    radial-gradient(circle at 50% 70%, rgba(230,182,92,0.35) 0%, transparent 62%),
    #1b2040;
  border: 1px solid var(--line-gold);
  box-shadow: 0 0 24px rgba(230, 182, 92, 0.22);
  flex: 0 0 auto;
}

.brand h1 {
  font-family: var(--font-story);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.85rem;
  margin: 0;
  color: var(--ink);
}

.brand p {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.pack {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  gap: 2px;
  max-width: 100%;
}

.pack button {
  appearance: none;
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
}

.pack button[aria-pressed="true"] {
  background: var(--gold-dim);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--line-gold);
}

.lede {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
}

.lede strong { color: var(--gold); font-weight: 600; }

section.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

section.card.first-card {
  padding: 0.8rem 0.95rem 0.85rem;
  margin-bottom: 0.65rem;
  box-shadow: none;
}

section.card.first-card h2 {
  font-size: 1.08rem;
}

section.card h2 {
  font-family: var(--font-story);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.85rem;
}

.first-card .hint {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}

.kids {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .kids { grid-template-columns: 1fr; }
}

.kid {
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.kid:hover { border-color: var(--line-gold); }
.kid[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.kid .who {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.kid h3 { margin: 0; font-size: 1.1rem; font-family: var(--font-story); }
.kid .age { color: var(--gold); font-size: 0.8rem; }
.kid .meta { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.kid .tone { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.8rem; }

label.field {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.4rem 0 0.4rem;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  line-height: 1.45;
}

textarea:focus, button:focus-visible, .kid:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.chip {
  appearance: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  cursor: pointer;
}

.chip:hover { border-color: var(--line-gold); color: var(--ink); }
.chip[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.chip .tag {
  color: var(--gold);
  font-weight: 650;
  margin-right: 0.3rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0.2rem 0 1rem;
}

button.primary {
  appearance: none;
  font: inherit;
  font-weight: 650;
  color: #2a1c08;
  background: linear-gradient(180deg, #f0c56f, var(--gold));
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(230, 182, 92, 0.22);
}

button.primary:hover { filter: brightness(1.04); }

button.ghost {
  appearance: none;
  font: inherit;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 1rem;
  cursor: pointer;
}

button.ghost:hover { border-color: var(--line-gold); }

#faith-card[hidden] { display: none; }

#story-card { display: none; }
#story-card.show { display: block; }

.kicker {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

#story-title {
  font-family: var(--font-story);
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 0 0 0.85rem;
}

.story-body {
  font-family: var(--font-story);
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.story-body p { margin: 0 0 0.95rem; }
.story-body p:last-child { margin-bottom: 0; }

.tts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.2rem 0 1rem;
}

.practiced { margin-top: 1.1rem; }
.practiced h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.45rem;
}

.practiced .chips { margin-top: 0; }
.practiced .chip { cursor: default; max-width: 100%; white-space: normal; line-height: 1.35; border-radius: 12px; }
.practiced .chip.faith {
  border-color: var(--line-gold);
  color: var(--gold);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

footer.fine {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
  max-width: 70ch;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.kids {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.kid.add-slot {
  border-style: dashed;
  color: var(--ink-soft);
}
.kid.add-slot[aria-pressed="true"] {
  border-style: solid;
}

.world-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.85rem;
}
.world-grid .span-2 { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .world-grid { grid-template-columns: 1fr; }
  .world-grid .span-2 { grid-column: auto; }
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
button:focus-visible,
.kid:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pronouns { margin-top: 0.15rem; }

.world-actions { margin: 1rem 0 0.4rem; }
.save-echo {
  color: var(--good);
  font-size: 0.85rem;
}

.subh {
  font-family: var(--font-story);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.2rem 0 0.2rem;
}

.note-add {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 0.45rem 0.65rem;
  align-items: end;
}
.note-add .field { margin-bottom: 0; }
@media (max-width: 640px) {
  .note-add { grid-template-columns: 1fr; }
}

.notes {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0;
}
.notes li {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.notes .kind {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}
.notes .when {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.notes .empty {
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 0;
  display: block;
  padding: 0.2rem 0 0;
}

.from-world { margin: 0 0 0.9rem; }
.from-world h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.45rem;
}
.from-world .chips { margin-top: 0; }
.from-world .chip { cursor: default; }
.from-world .chip .tag { text-transform: lowercase; }

.pack {
  flex-wrap: wrap;
  justify-content: center;
}

.sport-row {
  margin: 0 0 0.85rem;
}
.sport-row .field { margin-top: 0; }
.sport-row .pack { margin-top: 0.15rem; }
#sport-switch,
#sport-switch[hidden] { display: none !important; }

.sport-graphic {
  margin: 0 0 1rem;
  padding: 0.8rem 0.75rem 0.7rem;
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sport-graphic[hidden] { display: none; }
.sport-graphic svg,
.sport-graphic img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}
.sport-graphic .caption {
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
  margin: 0.55rem 0 0;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

body[data-pack="sports"] #homework { min-height: 76px; }
.sport-graphic img { border-radius: 10px; }

body[data-pack="homewords"] #homework,
body[data-pack="sentence"] #homework { min-height: 76px; }

.pack button {
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
}


.tutor-tonight {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.tutor-tonight #tutor-toggle {
  appearance: none;
  font: inherit;
  font-size: 0.88rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}
.tutor-tonight #tutor-toggle[aria-pressed="true"] {
  color: var(--gold);
  border-color: var(--line-gold);
  background: var(--gold-dim);
}
.tutor-tonight .hint {
  margin: 0.4rem 0 0;
}
body[data-pack="sports"] .tutor-tonight,
body[data-pack="sentence"] .tutor-tonight {
  display: none;
}

.tutor-walk {
  margin-top: 1.1rem;
  padding: 0.85rem 0.95rem;
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tutor-walk[hidden] { display: none; }
.tutor-walk h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.55rem;
}
.tutor-walk p {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}
.tutor-walk p:last-child { margin-bottom: 0; }
.tutor-walk .tutor-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.12rem;
}


/* First-screen tightness + quiet disclosures */
.first-card #homework {
  min-height: 88px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.kids {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kid {
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
}

.kid .who {
  gap: 0.4rem;
}

.kid h3 { font-size: 0.95rem; }
.kid .age { font-size: 0.74rem; }
.kid .meta,
.kid .tone { display: none; }

.kid.add-slot {
  padding: 0.38rem 0.72rem;
}

.actions-generate {
  position: sticky;
  bottom: 0.55rem;
  z-index: 4;
  margin: 0.05rem 0 0.4rem;
  padding: 0.45rem 0 0.2rem;
  background: linear-gradient(180deg, transparent, rgba(12, 16, 32, 0.92) 28%);
}

.actions-generate .primary {
  width: 100%;
  padding: 0.82rem 1.25rem;
  font-size: 1.02rem;
}

details.fold {
  margin: 0.05rem 0 0.45rem;
  background: transparent;
  border: 0;
}

details.fold > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 0.22rem 0;
  width: fit-content;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.18em;
}

details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: "";
}

details.fold > summary:hover,
details.fold[open] > summary {
  color: var(--gold);
  text-decoration-color: var(--line-gold);
}

details.fold > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

details.fold .fold-card {
  margin-top: 0.45rem;
  margin-bottom: 0.55rem;
}

.first-packs {
  display: flex;
  width: 100%;
  justify-content: stretch;
  margin: 0.1rem 0 0.55rem;
  padding: 5px;
}

.first-packs button {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.62rem 0.85rem;
  font-size: 0.96rem;
  font-weight: 650;
  text-align: center;
}

.more-tonight {
  margin-top: 0.15rem;
}

.more-tonight .pack {
  margin-bottom: 0.7rem;
  justify-content: flex-start;
}

.more-tonight .tutor-tonight {
  margin-top: 0.15rem;
  padding: 0.75rem 0.95rem 0.85rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  .wrap { padding: 0.65rem 0 2.6rem; }
  .actions-generate { bottom: 0.35rem; }
  .actions-generate .primary { width: 100%; }
  .first-card #homework { min-height: 76px; }
  .first-packs button { font-size: 0.92rem; padding: 0.6rem 0.7rem; }
}

@media (max-width: 420px) {
  .wrap { width: min(920px, calc(100% - 1.2rem)); }
  section.card.first-card { padding: 0.7rem 0.8rem 0.75rem; }
  .first-packs { margin: 0.05rem 0 0.5rem; }
  .listen-voice-head h2 { font-size: 1.02rem; }
  .photo-row { gap: 0.35rem 0.5rem; }
}


/* Photo-to-text — on the homework card, above Generate */
.photo-ctl {
  margin-top: 0.65rem;
}

.photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.photo-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.photo-tags {
  padding: 3px;
}

.photo-tags button {
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
}

#photo-add:disabled {
  opacity: 0.6;
  cursor: wait;
}

#photo-status {
  margin: 0.4rem 0 0;
  max-height: 4.6rem;
  overflow: auto;
  white-space: pre-wrap;
}

#photo-status.photo-error {
  color: var(--danger-soft);
}

#photo-faith-wrap {
  margin-top: 0.45rem;
}

#photo-faith-wrap[hidden] {
  display: none;
}

#photo-faith {
  min-height: 64px;
}

.first-card #photo-faith {
  min-height: 64px;
}


/* Voice sits with the listener — compact, not a new wall */
.listen-voice-head {
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.2rem;
}
.listen-voice-head h2 {
  margin: 0;
}
.listen-voice-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.85rem;
  align-items: start;
}
@media (max-width: 640px) {
  .listen-voice-body { grid-template-columns: 1fr; }
  .listen-voice-head { flex-direction: column; gap: 0.2rem; }
}

.voices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.voice-panel {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}
.voice-panel[hidden],
#voice-pn-wrap[hidden],
#voice-progress[hidden],
#voice-timer[hidden],
#voice-preview[hidden],
#voice-delete[hidden],
#voice-invite-echo[hidden],
#voice-invite-link[hidden],
#voice-invite-label[hidden],
#voice-live-note[hidden] {
  display: none;
}

.voice-script {
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-story);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-height: 9.5rem;
  overflow: auto;
  white-space: pre-wrap;
}

.voice-rels {
  margin: 0.15rem 0 0.45rem;
  justify-content: flex-start;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.7rem 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
}
.consent input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.voice-rec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.65rem 0 0.4rem;
}

.voice-progress {
  height: 8px;
  background: #12182c;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.25rem 0 0.15rem;
}
.voice-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
}

.voice-preview {
  display: block;
  width: 100%;
  margin: 0.45rem 0 0.2rem;
}

.voice-save-row { margin: 0.55rem 0 0.2rem; }

.voice-live-note {
  margin: 0.15rem 0 0;
  flex-basis: 100%;
}

.tts { align-items: center; }

.invite-page .invite-card h1 {
  font-family: var(--font-story);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.invite-page .banner { display: none; }

.req { color: var(--muted, #5c564c); font-weight: 400; font-size: 0.9em; }
.field-error { color: #8b3a32; margin: 0.35rem 0 0; }
input[aria-invalid="true"] { outline: 2px solid #8b3a32; outline-offset: 1px; }

#grade-standards-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}
.parent-practice {
  margin: 0.85rem 0 0;
  padding-top: 0.35rem;
}
.parent-practice h3 {
  font-family: var(--font-story);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.parent-practice[hidden] { display: none; }
.coverage-fold { margin: 0.35rem 0 1rem; }
.coverage-remaining {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.coverage-remaining li { margin: 0.15rem 0; }


/* Coverage map (parent ledger) — light cards need dark ink (not --ink cream) */
.coverage-map {
  color: #2a241c;
}
.coverage-map .who-line { margin: 0 0 0.35rem; color: #3d342a; font-size: 0.95rem; }
.coverage-map #coverage-claim,
.coverage-map #coverage-summary,
.coverage-map .hint { color: #4a4036 !important; }
.coverage-overall { margin: 0.5rem 0 0.25rem; }
.coverage-overall-num { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.02em; color: #1f1a14; }
.coverage-bar {
  height: 8px; background: #ebe3d6; border-radius: 999px; overflow: hidden; margin: 0.4rem 0 0.85rem;
}
.coverage-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #2f6f5e, #5a9a7a); border-radius: 999px; }
.coverage-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 0.55rem; }
.coverage-tab {
  appearance: none; border: 1px solid #e6ddd0; background: #faf6ef; color: #3d342a;
  border-radius: 12px; padding: 0.55rem 0.35rem; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
}
.coverage-tab[aria-selected="true"] { color: #2a241c; background: #fffdf8; border-color: #d2c4b0; box-shadow: 0 4px 14px rgba(42,36,28,0.06); }
.coverage-tab .n { display: block; font-size: 0.68rem; font-weight: 500; color: #4a4036; margin-top: 2px; }
.coverage-filters { display: flex; gap: 6px; margin-bottom: 0.45rem; flex-wrap: wrap; }
.coverage-filter {
  border: 1px solid #e6ddd0; background: transparent; border-radius: 999px; padding: 0.35rem 0.7rem;
  font-size: 0.72rem; color: #3d342a; cursor: pointer; font-family: system-ui, -apple-system, sans-serif;
}
.coverage-filter[aria-pressed="true"] { background: #2a241c; color: #fff; border-color: #2a241c; }
.coverage-legend { display: flex; gap: 14px; font-size: 0.72rem; color: #3d342a; margin-bottom: 0.45rem; font-family: system-ui, -apple-system, sans-serif; }
.coverage-legend span::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.coverage-legend .done::before { background: #2f6f5e; }
.coverage-legend .open::before { background: transparent; border: 2px solid #c9b29a; }
.coverage-list { display: flex; flex-direction: column; gap: 8px; max-height: 22rem; overflow: auto; }
.cov-item {
  background: #fffdf8; border: 1px solid #e6ddd0; border-radius: 14px; padding: 0.65rem 0.7rem;
  display: grid; grid-template-columns: 14px 1fr auto; gap: 0.55rem; align-items: start;
}
.cov-item.practiced { border-left: 3px solid #2f6f5e; }
.cov-item.open { border-left: 3px solid #d9c7b2; }
.cov-item .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 0.3rem; }
.cov-item.practiced .dot { background: #2f6f5e; }
.cov-item.open .dot { background: transparent; border: 2px solid #c9b29a; }
.cov-item .label { margin: 0 0 2px; font-size: 0.95rem; line-height: 1.35; color: #1f1a14; font-weight: 600; }
.cov-item.open .label,
.cov-item.practiced .label { color: #1f1a14; }
.cov-item .meta { margin: 0; font-size: 0.72rem; color: #4a4036; font-family: system-ui, -apple-system, sans-serif; }
.cov-item .status {
  font-family: system-ui, -apple-system, sans-serif; font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 0.25rem 0.45rem; border-radius: 8px; white-space: nowrap;
}
.cov-item .status.practiced { background: #e4f2ed; color: #2f6f5e; }
.cov-item .status.open { background: #f3ebe1; color: #8a6a4a; }


/* Faith opt-in (same pattern as Tutor tonight) */
.faith-tonight { margin: 0.35rem 0 0.75rem; }
#faith-fields { margin-top: 0.65rem; }

.speak-charge {
  margin: 0.6rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #fff6e8;
  border: 1px solid #e8d4b8;
}
.speak-charge .hint { margin: 0 0 0.55rem; }
.speak-charge .voice-rec-row { gap: 0.5rem; flex-wrap: wrap; }

/* Parked spend UI — never show unless JS explicitly enables charge */
body:not([data-voice-charge="on"]) #speak-charge-row { display: none !important; }


/* ---- Dingcad-inspired story prop stage (bedtime warmth, not a CAD IDE) ---- */
:root {
  --ding: #FF8B16;
  --ding-soft: rgba(255, 139, 22, 0.18);
  --ding-line: rgba(255, 139, 22, 0.42);
}

.prop-stage {
  margin: 0.85rem 0 1.1rem;
  padding: 0.75rem 0.85rem 0.95rem;
  border-radius: 14px;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(255,139,22,0.14), transparent 60%),
    #0c1424;
  border: 1px solid var(--ding-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 28px rgba(0,0,0,0.28);
}

.prop-stage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.prop-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ding);
}

.prop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
}

.prop-controls .ghost {
  border-color: var(--ding-line);
  color: #f6e7d0;
}

.prop-controls .ghost:hover,
.prop-controls .ghost:focus-visible {
  border-color: var(--ding);
  background: var(--ding-soft);
  color: #fff;
}

.prop-explode-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.prop-explode-label input[type="range"] {
  width: 110px;
  accent-color: var(--ding);
}

.prop-viewport {
  position: relative;
  min-height: 210px;
  border-radius: 12px;
  background:
    radial-gradient(240px 120px at 50% 70%, rgba(255,139,22,0.1), transparent 70%),
    linear-gradient(180deg, #101828 0%, #0a1220 100%);
  border: 1px solid rgba(255,139,22,0.2);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.prop-svg {
  width: min(280px, 92%);
  height: auto;
  display: block;
}

.prop-part {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: translate(0, 14px) scale(0.92);
  transition-property: transform, opacity;
  transition-duration: 420ms, 320ms;
  transition-timing-function: ease-out, ease-out;
  transition-delay: 0s;
}

.prop-stage.is-built .prop-part {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.prop-stage.is-built .prop-part[data-part="floor"] { transition-delay: 0.05s; }
.prop-stage.is-built .prop-part[data-part="base"] { transition-delay: 0.18s; }
.prop-stage.is-built .prop-part[data-part="stem"] { transition-delay: 0.32s; }
.prop-stage.is-built .prop-part[data-part="shade"] { transition-delay: 0.46s; }
.prop-stage.is-built .prop-part[data-part="glow"] { transition-delay: 0.6s; }

.prop-stage.is-building .prop-part {
  opacity: 0;
  transform: translate(0, 14px) scale(0.9);
}

.prop-hint {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.45rem;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(212, 203, 182, 0.7);
}

@media (max-width: 560px) {
  .prop-explode-label input[type="range"] { width: 88px; }
}


/* ==== toy-orbit skin (2026-09-07) — night toybox, not CAD ==== */
body {
  background-color: #0c1424;
  background-image:
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(255,139,22,0.12), transparent 55%),
    radial-gradient(circle at 20% 18%, rgba(107,140,174,0.15), transparent 35%),
    linear-gradient(180deg, #0a1020 0%, #0c1424 50%, #101828 100%);
  font-family: var(--font-ui);
}

.banner {
  background: rgba(255, 139, 22, 0.08);
  border-bottom-color: rgba(255,139,22,0.28);
  color: #FF8B16;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
}

.toy-orbit {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.toy-stars span {
  position: absolute;
  width: 3px; height: 3px;
  background: #f2e8d5;
  border-radius: 50%;
  opacity: 0.45;
}
.toy-stars span:nth-child(1) { left: 12%; top: 14%; }
.toy-stars span:nth-child(2) { left: 28%; top: 8%; width: 2px; height: 2px; }
.toy-stars span:nth-child(3) { left: 72%; top: 12%; background: #FF8B16; opacity: 0.7; }
.toy-stars span:nth-child(4) { left: 88%; top: 22%; width: 2px; height: 2px; }
.toy-stars span:nth-child(5) { left: 55%; top: 6%; }
.toy-stars span:nth-child(6) { left: 40%; top: 18%; width: 2px; height: 2px; opacity: 0.3; }

.toy-orbit-stage {
  position: absolute;
  width: min(560px, 88vw);
  height: min(560px, 88vw);
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
}
.toy-orbit-ring {
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(242,232,213,0.1);
  border-radius: 50%;
}
.toy-orbit-ring.inner {
  inset: 24%;
  border-color: rgba(255,139,22,0.14);
}

.toy-float {
  position: absolute;
  left: 50%; top: 50%;
  animation: toy-spin 28s linear infinite;
}
.toy-float.t1 { --r: 210px; }
.toy-float.t2 { --r: 160px; animation-duration: 36s; animation-direction: reverse; animation-delay: -8s; }
.toy-float.t3 { --r: 230px; animation-duration: 22s; animation-delay: -14s; }
.toy-float.t4 { --r: 140px; animation-duration: 40s; animation-direction: reverse; animation-delay: -3s; }
.toy-float.t5 { --r: 190px; animation-duration: 30s; animation-delay: -20s; }
.toy-float .toy-blob { margin-left: var(--r); animation: toy-unspin 28s linear infinite; }
.toy-float.t2 .toy-blob { animation-duration: 36s; animation-direction: reverse; animation-delay: -8s; }
.toy-float.t3 .toy-blob { animation-duration: 22s; animation-delay: -14s; }
.toy-float.t4 .toy-blob { animation-duration: 40s; animation-direction: reverse; animation-delay: -3s; }
.toy-float.t5 .toy-blob { animation-duration: 30s; animation-delay: -20s; }

@keyframes toy-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes toy-unspin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.toy-blob {
  width: 48px; height: 48px;
  border-radius: 16px;
  box-shadow: 4px 6px 0 rgba(0,0,0,0.25);
}
.toy-blob.box { background: #6b8cae; border-radius: 14px; }
.toy-blob.ball {
  background: radial-gradient(circle at 32% 28%, #ffc070, #FF8B16);
  border-radius: 50%;
  width: 40px; height: 40px;
}
.toy-blob.block {
  background: #7a9e8a;
  width: 36px; height: 44px;
  border-radius: 10px;
}
.toy-blob.book {
  background: #c48a7a;
  width: 52px; height: 16px;
  border-radius: 3px;
  transform: rotate(-12deg);
}
.toy-blob.wedge {
  width: 0; height: 0;
  border-left: 24px solid transparent;
  border-right: 24px solid transparent;
  border-bottom: 40px solid #5a6e88;
  background: none;
  box-shadow: none;
  border-radius: 0;
}

@media (max-width: 720px) {
  .toy-orbit-stage { top: 28%; width: min(420px, 96vw); height: min(420px, 96vw); opacity: 0.85; }
  .toy-float.t1 { --r: 150px; }
  .toy-float.t2 { --r: 110px; }
  .toy-float.t3 { --r: 165px; }
  .toy-float.t4 { --r: 95px; }
  .toy-float.t5 { --r: 130px; }
  .toy-blob { transform: scale(0.82); }
}

.brand-toy { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.brand-toy .wordmark {
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #f2e8d5;
  text-shadow: 4px 4px 0 #FF8B16;
  transform: rotate(-2deg);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}
.brand-toy .wordmark span {
  color: #FF8B16;
  text-shadow: 4px 4px 0 #5a2e05;
}
.brand-sub {
  margin: 0.35rem 0 0 !important;
  font-size: 0.82rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #a39682 !important;
}

.lede {
  font-size: 1.12rem;
  line-height: 1.5;
  color: #f2e8d5;
  max-width: 36rem;
}
.lede strong { color: #FF8B16; font-weight: 800; }

section.card {
  background: rgba(17, 27, 48, 0.92);
  border-color: #243048;
  box-shadow: 0 14px 36px rgba(0,0,0,0.28);
}
section.card.first-card {
  border-radius: 18px;
}

.kids {
  gap: 0.65rem;
}
.kid {
  border-radius: 14px !important;
  border: 2px solid transparent !important;
  background: #111b30 !important;
  padding: 0.55rem 0.45rem 0.5rem !important;
  text-align: center;
  min-height: 0;
}
.kid[aria-pressed="true"],
.kid.on {
  border-color: #FF8B16 !important;
  background: #162038 !important;
  box-shadow: none !important;
}
.kid .face {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  background: #d4a574;
  position: relative;
}
.kid .face::before,
.kid .face::after {
  content: "";
  position: absolute;
  width: 5px; height: 5px;
  background: #3a2a1a;
  border-radius: 50%;
  top: 13px;
}
.kid .face::before { left: 9px; }
.kid .face::after { right: 9px; }
.kid .face.add-face {
  background: #243048;
}
.kid .face.add-face::before,
.kid .face.add-face::after { display: none; }
.kid .who { justify-content: center; text-align: center; }
.kid h3 {
  font-family: var(--font-ui) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}
.kid .age { color: #FF8B16 !important; font-size: 0.68rem !important; }

.first-packs {
  background: #111b30 !important;
  border: 1px solid #1a2438 !important;
  border-radius: 999px !important;
  padding: 4px !important;
}
.first-packs button {
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  font-weight: 700;
  color: #a39682;
}
.first-packs button[aria-pressed="true"] {
  border-color: #FF8B16 !important;
  color: #FF8B16 !important;
  background: transparent !important;
}

button.primary {
  background: #FF8B16 !important;
  color: #1a0e02 !important;
  font-weight: 800 !important;
  box-shadow: 0 5px 0 #c66a10 !important;
  border-radius: 999px !important;
}
button.primary:hover { filter: none; filter: brightness(1.03); }
button.primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #c66a10 !important;
}
button.ghost {
  border-color: #243048;
  color: #c8bba6;
}
button.ghost:hover {
  border-color: #FF8B16;
  background: rgba(255,139,22,0.1);
  color: #f2e8d5;
}

/* Prop stage — warmer toybox, keep explode/build-in */
.prop-stage {
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(255,139,22,0.16), transparent 60%),
    #111b30 !important;
  border: 2px solid rgba(255,139,22,0.35) !important;
  border-radius: 18px !important;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.22) !important;
}
.prop-kicker { color: #FF8B16 !important; font-weight: 800; }
.prop-viewport {
  background:
    radial-gradient(240px 120px at 50% 70%, rgba(255,139,22,0.14), transparent 70%),
    linear-gradient(180deg, #162038 0%, #0c1424 100%) !important;
  border: 1px dashed rgba(242,232,213,0.12) !important;
  border-radius: 16px !important;
}
.prop-controls .ghost {
  border-color: rgba(255,139,22,0.35) !important;
  font-weight: 700;
}
.prop-explode-label { color: #c8bba6; font-weight: 700; }
.prop-hint { color: rgba(242,232,213,0.65) !important; }

.mark { display: none; } /* old lamp-dot logo unused in toy brand */

@media (prefers-reduced-motion: reduce) {
  .toy-float, .toy-float .toy-blob { animation: none !important; }
}


/* Prop rotator */
.prop-rotator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.prop-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c8bba6;
}
.prop-pick-label select {
  appearance: none;
  font: inherit;
  font-weight: 700;
  color: #f2e8d5;
  background: #0c1424;
  border: 2px solid rgba(255,139,22,0.4);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  max-width: 11rem;
}
.prop-rotator .ghost {
  min-width: 2.2rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.prop-stage-bar {
  flex-direction: column;
  align-items: stretch;
}
.prop-stage-bar .prop-controls {
  justify-content: flex-start;
}
/* Stagger build-in by part order (works for any prop) */
.prop-stage.is-built .prop-part:nth-child(1) { transition-delay: 0.05s; }
.prop-stage.is-built .prop-part:nth-child(2) { transition-delay: 0.14s; }
.prop-stage.is-built .prop-part:nth-child(3) { transition-delay: 0.23s; }
.prop-stage.is-built .prop-part:nth-child(4) { transition-delay: 0.32s; }
.prop-stage.is-built .prop-part:nth-child(5) { transition-delay: 0.41s; }
.prop-stage.is-built .prop-part:nth-child(6) { transition-delay: 0.5s; }
.prop-stage.is-built .prop-part:nth-child(7) { transition-delay: 0.59s; }
.prop-stage.is-built .prop-part:nth-child(8) { transition-delay: 0.68s; }
.prop-stage.is-built .prop-part:nth-child(n+9) { transition-delay: 0.77s; }


/* ==== motion: animations.dev easing (look unchanged) ==== */
.kid {
  transition-property: transform, border-color, background-color, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.kid:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .kid:hover {
    border-color: rgba(255, 139, 22, 0.45);
    opacity: 0.96;
    transition-timing-function: ease;
  }
  button.primary:hover {
    filter: brightness(1.03);
    transition-timing-function: ease;
  }
}

button.primary {
  transition-property: transform, box-shadow, filter, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
button.primary:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 0 #c66a10 !important;
}

.prop-pick-label select,
.prop-rotator .ghost {
  transition-property: transform, border-color, background-color, color, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.prop-rotator .ghost:active {
  transform: scale(0.97);
}

/* Parts already on screen: explode / pull uses ease-in-out, no stagger */
.prop-stage.is-settled .prop-part {
  transition-property: transform, opacity;
  transition-duration: 240ms;
  transition-timing-function: ease-in-out;
  transition-delay: 0s;
}


/* Dingcad cast icons (picker) — not blank face dots */
.kid .face.cast {
  width: 56px;
  height: 64px;
  margin: 0 auto 0.2rem;
  border-radius: 0;
  background: transparent;
}
.kid .face.cast::before,
.kid .face.cast::after { display: none; }
.kid .cast-icon {
  width: 56px;
  height: 64px;
  display: block;
}


/* Bedtime lamp stage — three.js, no practice chrome */
#lamp-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
body[data-lamp-bg="on"] {
  background-color: #080b12;
}
body[data-lamp-bg="on"] .nestlight-book-bg,
body[data-lamp-bg="on"] .toy-orbit {
  display: none;
}
body[data-lamp-bg="on"] section.card,
body[data-lamp-bg="on"] .banner {
  background-color: rgba(8, 11, 18, 0.78);
}
body[data-lamp-bg="on"] section.card {
  background: rgba(12, 16, 28, 0.86);
}
body[data-lamp-bg="on"] .lede,
body[data-lamp-bg="on"] .brand-sub {
  text-shadow: 0 1px 12px rgba(8, 11, 18, 0.9);
}
@media (prefers-reduced-motion: reduce) {
  #lamp-bg { display: block; }
}




/* Tonight's check — 3–5 question queue; feeds NestlightDelight.markCorrect per correct */
.story-quiz {
  margin-top: 1.1rem;
  padding: 0.85rem 0.95rem;
  background: #16122a;
  border: 1px solid rgba(255, 139, 22, 0.28);
  border-radius: 12px;
}
.story-quiz[hidden] { display: none; }
.story-quiz h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.45rem;
}

.story-quiz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.story-quiz-head h3 { margin: 0; }
.story-quiz-progress {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.story-quiz-hear {
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.story-quiz-prompt {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.4;
  font-weight: 600;
}
.story-quiz-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.story-quiz-choices button {
  appearance: none;
  border: 1px solid var(--line);
  background: #1c2438;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.story-quiz-choices button:hover {
  border-color: rgba(255, 139, 22, 0.55);
}
.story-quiz-choices button.is-correct {
  background: linear-gradient(160deg, #ffc48a, #FF8B16);
  color: #1a1208;
  border-color: transparent;
}
.story-quiz-choices button.is-wrong {
  opacity: 0.55;
  border-color: #6a3a3a;
}
.story-quiz-choices button:disabled {
  cursor: default;
}
.story-quiz-feedback {
  margin: 0.65rem 0 0;
}
.story-quiz-feedback.is-ok { color: #ffc48a; }
.story-quiz-feedback.is-miss { color: #c9a090; }


/* Soft physics challenge — after Tonight's check; kid path only */
.story-challenge {
  margin-top: 0.85rem;
  padding: 0.9rem 0.95rem;
  background: #12192c;
  border: 1px solid rgba(120, 180, 255, 0.22);
  border-radius: 12px;
}
.story-challenge[hidden] { display: none; }
.story-challenge h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.story-challenge-prompt {
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 650;
}
.story-challenge #story-challenge-hint {
  margin: 0 0 0.75rem;
}
.story-challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.story-challenge-actions .primary {
  min-width: 10rem;
}
.story-challenge-feedback {
  margin: 0.65rem 0 0;
}
.story-challenge-feedback.is-ok { color: #ffc48a; }
.reward-pond.is-challenge-glow {
  box-shadow: 0 0 0 2px rgba(255, 139, 22, 0.45), 0 12px 28px rgba(255, 139, 22, 0.18);
  border-color: rgba(255, 139, 22, 0.5);
  transition: box-shadow 280ms ease, border-color 280ms ease;
}
.reward-pond .pond-nest.is-challenge-target {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
}


.challenge-cork {
  position: absolute;
  z-index: 5;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 200, 120, 0.85);
  background:
    radial-gradient(circle at 32% 28%, #ffd7a0, #FF8B16 55%, #c45a10);
  color: #1a1208;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  box-shadow: 0 10px 22px rgba(255, 139, 22, 0.35);
  cursor: grab;
  touch-action: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.challenge-cork.is-drag {
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 14px 28px rgba(255, 139, 22, 0.45);
}
.reward-pond.is-cork-play .pond-nest.is-challenge-target {
  outline: 2px dashed rgba(255, 139, 22, 0.55);
  outline-offset: 6px;
}
.reward-pond .pond-nest.is-drop-ok {
  outline-color: #ffc48a;
  outline-style: solid;
  transform: translate(-50%, -50%) scale(1.08);
}
.banner.is-challenge-target,
.toy-orbit.is-challenge-target {
  cursor: pointer;
  outline: 2px dashed rgba(255, 139, 22, 0.55);
  outline-offset: 4px;
  animation: nestlight-challenge-pulse 1.2s ease-in-out infinite;
}
@keyframes nestlight-challenge-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

/* ==== Delight post-enter physics (from nestlight-delight-sketch; keep toss gate) ==== */
:root {
  --nestlight-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --nestlight-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.banner {
  transform-origin: top center;
  animation: nestlight-banner-wind 5.5s ease-in-out infinite;
}
@keyframes nestlight-banner-wind {
  0%, 100% { transform: rotate(-0.6deg) translateX(0); }
  50% { transform: rotate(0.9deg) translateX(2px); }
}

.kid.is-wobble,
.chip.is-wobble {
  animation: nestlight-spring-wobble 420ms var(--nestlight-spring) both;
}
@keyframes nestlight-spring-wobble {
  0% { transform: scale(1); }
  28% { transform: scale(0.94) rotate(-2.4deg); }
  55% { transform: scale(1.05) rotate(1.8deg); }
  78% { transform: scale(0.99) rotate(-0.6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.reward-pond {
  position: relative;
  margin: 0.85rem 0 0;
  min-height: 96px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 139, 22, 0.22);
  background:
    linear-gradient(180deg, rgba(20, 36, 58, 0.35), rgba(8, 14, 24, 0.55)),
    radial-gradient(120% 80% at 50% 120%, rgba(255, 139, 22, 0.08), transparent 55%);
  overflow: hidden;
}
.reward-pond .pond-label {
  position: absolute;
  left: 12px;
  top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a39682;
  pointer-events: none;
}
.cork-reward {
  position: absolute;
  left: 50%;
  bottom: 14px;
  min-width: 72px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffc48a, #FF8B16);
  color: #1a1208;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: 0 10px 22px rgba(255, 139, 22, 0.28);
  transform: translate(-50%, 40px) scale(0.7);
  opacity: 0;
  pointer-events: none;
  animation: nestlight-cork-float 2.8s var(--nestlight-ease-out) forwards;
  z-index: 1;
}
@keyframes nestlight-cork-float {
  0% { transform: translate(-50%, 42px) scale(0.72); opacity: 0; }
  18% { transform: translate(-50%, -8px) scale(1.06); opacity: 1; }
  38% { transform: translate(calc(-50% + var(--drift, 0px)), -22px) scale(1); }
  62% { transform: translate(calc(-50% + var(--drift, 0px)), -12px) scale(1.02); }
  100% { transform: translate(calc(-50% + var(--drift, 0px)), -4px) scale(1); opacity: 1; }
}

/* Pond nest — target for cork splash / spring stamp / mini toss / lantern */
.reward-pond .pond-nest {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 88px;
  height: 62px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.92;
}
.reward-pond .pond-nest .nest-glow {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 139, 22, 0.38) 0%, rgba(255, 139, 22, 0.08) 45%, transparent 70%);
  animation: nestlight-nest-breathe 2.4s ease-in-out infinite;
}
.reward-pond .pond-nest .nest-ring {
  position: absolute;
  inset: 8% 4% 18%;
  border: 4px solid #FF8B16;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 139, 22, 0.18),
    0 0 18px rgba(255, 139, 22, 0.35),
    inset 0 0 12px rgba(255, 139, 22, 0.16);
  transform-origin: 50% 60%;
}
.reward-pond .pond-nest .nest-bowl {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 40%;
  border-radius: 0 0 50% 50% / 0 0 80% 80%;
  background: linear-gradient(180deg, rgba(255, 139, 22, 0.12), rgba(255, 139, 22, 0.34));
  border: 2px solid rgba(255, 139, 22, 0.65);
  border-top: none;
}

/* 1 · Cork splash */
.reward-pond .pond-nest.is-cork-splash .nest-glow {
  animation: nestlight-nest-pop 520ms var(--nestlight-spring) both;
}
.cork-reward.is-splash {
  animation-name: nestlight-cork-splash;
  animation-duration: 2.6s;
}
@keyframes nestlight-cork-splash {
  0% { transform: translate(-50%, 36px) scale(0.55); opacity: 0; }
  14% { transform: translate(-50%, -18px) scale(1.12); opacity: 1; }
  32% { transform: translate(calc(-50% + var(--drift, 0px)), -34px) scale(1.02); }
  55% { transform: translate(calc(-50% + var(--drift, 0px)), -16px) scale(1.04); }
  78% { transform: translate(calc(-50% + var(--drift, 0px)), -8px) scale(1); }
  100% { transform: translate(calc(-50% + var(--drift, 0px)), -2px) scale(1); opacity: 1; }
}
.cork-reward.is-chain { font-size: 0.78rem; min-width: 58px; opacity: 0.95; }
.cork-reward.is-echo { background: linear-gradient(160deg, #ffe0b5, #FF8B16); }

/* 2 · Spring stamp — squash-stretch on nest rim */
.reward-pond .pond-nest.is-spring-stamp {
  animation: nestlight-spring-stamp 580ms var(--nestlight-spring) both;
}
.reward-pond .pond-nest .nest-ring.is-stamp-rim {
  animation: nestlight-rim-squash 580ms var(--nestlight-spring) both;
}
@keyframes nestlight-spring-stamp {
  0% { transform: translate(-50%, -50%) scale(1, 1); }
  28% { transform: translate(-50%, -46%) scale(1.12, 0.82); }
  55% { transform: translate(-50%, -54%) scale(0.92, 1.14); }
  78% { transform: translate(-50%, -50%) scale(1.04, 0.96); }
  100% { transform: translate(-50%, -50%) scale(1, 1); }
}
@keyframes nestlight-rim-squash {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.16, 0.78); }
  58% { transform: scale(0.9, 1.12); }
  100% { transform: scale(1, 1); }
}

/* 3 · Banner gust — short wind flick + soft solids */
.banner.is-banner-gust {
  animation: nestlight-banner-gust 720ms var(--nestlight-spring) both !important;
}
@keyframes nestlight-banner-gust {
  0% { transform: rotate(-0.4deg) translateX(0); }
  22% { transform: rotate(2.8deg) translateX(7px); }
  48% { transform: rotate(-2.2deg) translateX(-5px); }
  72% { transform: rotate(1.1deg) translateX(3px); }
  100% { transform: rotate(-0.6deg) translateX(0); }
}
.toy-blob.is-soft-gust,
.kid.is-soft-gust,
.chip.is-soft-gust {
  animation: nestlight-soft-gust 640ms var(--nestlight-spring) both;
}
@keyframes nestlight-soft-gust {
  0% { filter: brightness(1); transform: translateY(0) scale(1); }
  35% { filter: brightness(1.12); transform: translateY(-3px) scale(1.04); }
  100% { filter: brightness(1); transform: translateY(0) scale(1); }
}

/* 4 · Mini nest toss — tiny cork arcs into nest */
.mini-toss-chip {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 6px;
  background: linear-gradient(145deg, #ffd2a0, #FF8B16 55%, #c66a10);
  box-shadow: 0 6px 14px rgba(255, 139, 22, 0.35);
  pointer-events: none;
  z-index: 2;
  animation: nestlight-mini-toss 900ms var(--nestlight-spring) both;
}
@keyframes nestlight-mini-toss {
  0% { transform: translate(var(--toss-x, -24px), 28px) rotate(0deg) scale(0.7); opacity: 0; }
  18% { opacity: 1; }
  55% { transform: translate(calc(var(--toss-x, -24px) * 0.35), -42px) rotate(var(--toss-spin, -30deg)) scale(1); }
  100% { transform: translate(0, -8px) rotate(0deg) scale(0.85); opacity: 0.35; }
}
.reward-pond .pond-nest.is-catch .nest-glow {
  animation: nestlight-nest-pop 520ms var(--nestlight-spring) both;
}

/* 5 · Orbit kick — one orbit pulse on kid-picker toys */
.toy-orbit.is-orbit-kick .toy-orbit-stage {
  animation: nestlight-orbit-kick 880ms var(--nestlight-spring) both;
}
.toy-float.is-orbit-pulse .toy-blob {
  animation: nestlight-orbit-blob-pulse 680ms var(--nestlight-spring) both;
}
@keyframes nestlight-orbit-kick {
  0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
  40% { transform: scale(1.045) rotate(8deg); filter: brightness(1.15); }
  70% { transform: scale(0.99) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}
@keyframes nestlight-orbit-blob-pulse {
  0% { transform: scale(1); box-shadow: none; }
  45% { transform: scale(1.18); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

/* 6 · Lantern blink — warm #FF8B16 on nest halo */
.reward-pond .pond-nest.is-lantern-blink .nest-glow,
.reward-pond .pond-nest .nest-glow.is-lantern {
  animation: nestlight-lantern-blink 860ms ease-in-out both !important;
}
@keyframes nestlight-lantern-blink {
  0% { opacity: 0.7; transform: scale(1); background: radial-gradient(circle, rgba(255, 139, 22, 0.35) 0%, transparent 70%); }
  18% { opacity: 1; transform: scale(1.35); background: radial-gradient(circle, rgba(255, 139, 22, 0.85) 0%, rgba(255, 139, 22, 0.25) 45%, transparent 72%); }
  36% { opacity: 0.45; transform: scale(1.05); }
  54% { opacity: 1; transform: scale(1.4); background: radial-gradient(circle, rgba(255, 139, 22, 0.9) 0%, rgba(255, 139, 22, 0.28) 48%, transparent 74%); }
  100% { opacity: 0.85; transform: scale(1.08); background: radial-gradient(circle, rgba(255, 139, 22, 0.42) 0%, rgba(255, 139, 22, 0.08) 45%, transparent 70%); }
}

/* Reward test harness (?rewardTest=1) */
.reward-test {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 139, 22, 0.4);
  background: rgba(12, 18, 32, 0.55);
}
.reward-test[hidden] { display: none !important; }
.reward-test-meta {
  flex: 1 1 100%;
  margin: 0;
  font: 600 0.72rem/1.35 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FF8B16;
}
.reward-test-btn {
  appearance: none;
  border: 1px solid rgba(255, 139, 22, 0.55);
  background: linear-gradient(160deg, #ffc48a, #FF8B16);
  color: #1a1208;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: 800 0.82rem/1 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 139, 22, 0.22);
  transition: transform 160ms var(--nestlight-ease-out);
}
.reward-test-btn:active { transform: scale(0.96); }
.reward-test-btn.ghost {
  background: transparent;
  color: #a39682;
  border-color: rgba(163, 150, 130, 0.45);
  box-shadow: none;
  font-weight: 700;
}
.reward-test-hint { flex: 1 1 100%; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .reward-pond .pond-nest .nest-glow,
  .reward-pond .pond-nest.is-spring-stamp,
  .reward-pond .pond-nest .nest-ring.is-stamp-rim,
  .banner.is-banner-gust,
  .toy-blob.is-soft-gust,
  .kid.is-soft-gust,
  .chip.is-soft-gust,
  .mini-toss-chip,
  .toy-orbit.is-orbit-kick .toy-orbit-stage,
  .toy-float.is-orbit-pulse .toy-blob,
  .reward-pond .pond-nest.is-lantern-blink .nest-glow,
  .cork-reward.is-splash {
    animation: none !important;
  }
  .mini-toss-chip { opacity: 1; transform: translate(0, -8px); }
}

/* Floating demo control at top — Reset toss door (delight sketch) */
.reset-door {
  appearance: none;
  position: fixed;
  top: 0.55rem;
  right: 0.7rem;
  z-index: 35;
  border: 1px solid rgba(255, 139, 22, 0.35);
  background: rgba(12, 16, 28, 0.82);
  color: #a39682;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: 600 0.72rem/1 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: color 160ms var(--nestlight-ease-out), border-color 160ms var(--nestlight-ease-out), transform 160ms var(--nestlight-ease-out);
}
.reset-door:hover { color: #FF8B16; border-color: #FF8B16; }
.reset-door:active { transform: scale(0.96); }
body:not(.entered) .reset-door,
body.enter-gate-active .reset-door {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .banner,
  .kid.is-wobble,
  .chip.is-wobble,
  .cork-reward {
    animation: none !important;
  }
  .cork-reward {
    opacity: 1;
    transform: translate(-50%, -4px);
  }
}

/* ==== Enter gate — soft toss door ==== */
.enter-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem 1.25rem;
  pointer-events: auto;
  background:
    radial-gradient(720px 420px at 50% 28%, rgba(255, 139, 22, 0.1) 0%, transparent 55%),
    radial-gradient(900px 520px at 50% 100%, rgba(28, 24, 64, 0.45) 0%, transparent 60%),
    transparent;
  transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1), visibility 480ms;
}
.enter-gate[hidden] { display: none !important; }
.enter-gate.is-exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gate-stage {
  position: relative;
  width: min(420px, calc(100vw - 2rem));
  height: min(560px, calc(100dvh - 3rem));
  max-height: 640px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.enter-gate .enter-eyebrow {
  position: absolute;
  left: 0;
  right: 0;
  top: 1.5%;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a39682;
  pointer-events: none;
}
.gate-prompt {
  position: absolute;
  left: 0;
  right: 0;
  top: 8%;
  text-align: center;
  font-weight: 800;
  font-size: clamp(1.55rem, 6vw, 2.1rem);
  letter-spacing: -0.03em;
  color: #f2e8d5;
  pointer-events: none;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  animation: nestlight-prompt-pulse 1.6s ease-in-out infinite;
}
.gate-prompt span { color: #FF8B16; }
@keyframes nestlight-prompt-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.045); opacity: 1; }
}
.enter-gate .nest {
  position: absolute;
  left: 50%;
  top: 30%;
  width: min(220px, 58vw);
  height: min(150px, 40vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.enter-gate .nest-glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 139, 22, 0.42) 0%, rgba(255, 139, 22, 0.08) 45%, transparent 70%);
  animation: nestlight-nest-breathe 2.4s ease-in-out infinite;
}
.enter-gate .nest-ring {
  position: absolute;
  inset: 8% 4% 18%;
  border: 5px solid #FF8B16;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px rgba(255, 139, 22, 0.2),
    0 0 28px rgba(255, 139, 22, 0.45),
    inset 0 0 18px rgba(255, 139, 22, 0.18);
}
.enter-gate .nest-bowl {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 42%;
  border-radius: 0 0 50% 50% / 0 0 80% 80%;
  background: linear-gradient(180deg, rgba(255, 139, 22, 0.15), rgba(255, 139, 22, 0.38));
  border: 3px solid rgba(255, 139, 22, 0.7);
  border-top: none;
  box-shadow: 0 12px 28px rgba(255, 139, 22, 0.22);
}
.enter-gate .nest.is-catch .nest-glow {
  animation: nestlight-nest-pop 520ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
@keyframes nestlight-nest-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes nestlight-nest-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(1.1); }
}
.toss-chip {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffd2a0, #ff8b16 55%, #c66a10);
  box-shadow:
    0 10px 24px rgba(255, 139, 22, 0.35),
    inset 0 -5px 0 rgba(0, 0, 0, 0.1);
  cursor: grab;
  z-index: 2;
  touch-action: none;
  will-change: transform;
}
.toss-chip::after {
  content: "";
  position: absolute;
  inset: 14% 18%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.toss-chip.is-drag { cursor: grabbing; transform: scale(1.08); }
.toss-chip.is-fly { pointer-events: none; }
.toss-chip.is-landed {
  pointer-events: none;
  transition: transform 420ms cubic-bezier(0.34, 1.45, 0.64, 1), opacity 420ms;
}
.gate-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.toss-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  min-width: 148px;
  background: linear-gradient(160deg, #ffc48a, #FF8B16);
  color: #1a1208;
  font: 800 1.05rem/1 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(255, 139, 22, 0.32);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.toss-btn:active { transform: scale(0.96); }
.gate-skip {
  appearance: none;
  border: none;
  background: transparent;
  color: #a39682;
  font: 600 0.82rem/1 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
  padding: 0.4rem 0.6rem;
}
.gate-skip.is-on {
  opacity: 0.75;
  pointer-events: auto;
}
.gate-skip:hover { color: #f2e8d5; opacity: 1; }
.enter-gate .confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.enter-gate .confetti i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #FF8B16;
  opacity: 0;
  animation: nestlight-confetti-float 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes nestlight-confetti-float {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) scale(1) rotate(160deg); opacity: 0; }
}

body.enter-gate-active {
  overflow: hidden;
}
body.enter-gate-active .banner,
body.enter-gate-active .wrap {
  visibility: hidden;
  pointer-events: none;
}
body.enter-gate-active #lamp-bg {
  display: none !important;
}
body.enter-gate-active .nestlight-book-bg {
  display: none !important;
}
body.enter-gate-active .toy-orbit {
  display: block !important;
  opacity: 0.55;
  z-index: 1;
}
body.enter-gate-active .toy-orbit-stage {
  top: 46%;
  width: min(620px, 92vw);
  height: min(620px, 92vw);
  opacity: 1;
}
body.enter-gate-active .toy-blob {
  transform: scale(1.08);
}

body.entered .enter-gate {
  display: none !important;
}

/* Pre-JS: prefer gate until body class is set */
body:not(.entered):not(.enter-gate-active) .banner,
body:not(.entered):not(.enter-gate-active) .wrap {
  visibility: hidden;
}
body:not(.entered) .enter-gate:not([hidden]) {
  display: grid;
}

@media (prefers-reduced-motion: reduce) {
  .gate-prompt,
  .enter-gate .nest-glow,
  .enter-gate .confetti i,
  .banner {
    animation: none !important;
  }
  .enter-gate,
  .toss-chip {
    transition: none !important;
  }
  .toss-btn { display: none; }
  .gate-skip {
    opacity: 0.85 !important;
    pointer-events: auto !important;
  }
}
