:root {
  color-scheme: dark;
  --ink: #f8f1de;
  --muted: rgba(248, 241, 222, 0.74);
  --night: #12172a;
  --violet: #4e3b6d;
  --teal: #2f8f8a;
  --mint: #9be7b1;
  --amber: #ffc56d;
  --rose: #e7828d;
  --paper: rgba(255, 248, 226, 0.1);
  --line: rgba(255, 248, 226, 0.22);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 197, 109, 0.28), transparent 27%),
    radial-gradient(circle at 84% 76%, rgba(155, 231, 177, 0.22), transparent 30%),
    linear-gradient(135deg, #261b35 0%, #132a2d 45%, #2b2031 100%);
  color: var(--ink);
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

.phone-shell {
  position: relative;
  width: min(100vw, 460px);
  height: min(100svh, 920px);
  min-height: 640px;
  overflow: hidden;
  background: var(--night);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  isolation: isolate;
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  padding: max(62px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(1.02);
  transition: opacity 520ms ease, transform 520ms ease;
}

.panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  z-index: -1;
  background: linear-gradient(to top, rgba(18, 23, 42, 0.88), transparent);
}

.hud {
  position: absolute;
  z-index: 20;
  top: max(16px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: 20px 1fr 32px auto;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.brand-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--mint), var(--amber), var(--rose), var(--mint));
  box-shadow: 0 0 22px rgba(255, 197, 109, 0.7);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 226, 0.22);
  border-radius: 999px;
  background: rgba(255, 248, 226, 0.1);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--amber), var(--rose));
  transition: width 380ms ease;
}

#scoreText {
  font-size: 12px;
  color: var(--muted);
}

.sound-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 248, 226, 0.2);
  border-radius: 8px;
  background: rgba(14, 18, 34, 0.48);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.sound-toggle span {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  background: var(--amber);
  box-shadow: 8px -4px 0 -2px rgba(255, 197, 109, 0.72), 11px -7px 0 -4px rgba(255, 197, 109, 0.54);
}

.sound-toggle span::before,
.sound-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 1px;
  width: 7px;
  height: 10px;
  border: 2px solid var(--amber);
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

.sound-toggle span::after {
  left: 16px;
  top: -3px;
  width: 10px;
  height: 18px;
  opacity: 0.55;
}

.sound-toggle.muted span::before,
.sound-toggle.muted span::after {
  display: none;
}

.sound-toggle.muted::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 15px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--rose);
  transform: rotate(-42deg);
}

.cover {
  display: block;
  padding: 0;
}

.cover-art {
  position: absolute;
  inset: 0;
  background: url("./assets/escape-night-hero.png") center/cover no-repeat;
  transform: scale(1.02);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(9, 12, 26, 0.34) 0%, rgba(9, 12, 26, 0.1) 34%, rgba(9, 12, 26, 0.88) 100%),
    radial-gradient(circle at 50% 72%, transparent 0 30%, rgba(9, 12, 26, 0.38) 72%);
}

.cover-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: max(82px, env(safe-area-inset-bottom));
}

.kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 56px;
  line-height: 0.98;
  font-weight: 900;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

h2 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 850;
}

.subtitle,
.scene-copy p {
  max-width: 26em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.scene-copy {
  align-self: start;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff2bd, #ffc56d 45%, #e7828d);
  color: #2c1c22;
  font-weight: 850;
  box-shadow: 0 18px 34px rgba(255, 197, 109, 0.32);
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.primary-action:active {
  transform: translateY(2px) scale(0.99);
}

.primary-action.locked {
  opacity: 0.45;
  filter: saturate(0.55);
  cursor: not-allowed;
}

.action-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.play-icon::before {
  content: "";
  position: absolute;
  inset: 2px 3px;
  clip-path: polygon(16% 0, 100% 50%, 16% 100%);
  background: #2c1c22;
}

.arrow-icon::before,
.replay-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-top: 3px solid #2c1c22;
  border-right: 3px solid #2c1c22;
  transform: rotate(45deg);
}

.replay-icon::before {
  inset: 2px;
  border: 3px solid #2c1c22;
  border-left-color: transparent;
  border-radius: 50%;
  transform: none;
}

.replay-icon::after {
  content: "";
  position: absolute;
  right: 0;
  top: 3px;
  border: 5px solid transparent;
  border-left-color: #2c1c22;
  transform: rotate(-20deg);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: grid;
  gap: 3px;
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 11px;
  height: 11px;
  border-right: 2px solid rgba(255, 248, 226, 0.78);
  border-bottom: 2px solid rgba(255, 248, 226, 0.78);
  transform: rotate(45deg);
  animation: cue 1.5s infinite ease-in-out;
}

.scroll-cue span + span {
  animation-delay: 160ms;
}

.quake::before {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 197, 109, 0.2), transparent 26%),
    linear-gradient(160deg, #292033 0%, #18343c 58%, #433044 100%);
}

.room-stage {
  position: relative;
  align-self: center;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(18, 23, 42, 0.06), rgba(18, 23, 42, 0.42)),
    url("./assets/safe-room-v2.png") center 56% / cover no-repeat;
  box-shadow: inset 0 -88px 110px rgba(0, 0, 0, 0.36), 0 18px 46px rgba(0, 0, 0, 0.24);
  animation: roomShake 3.2s infinite ease-in-out;
}

.room-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 49% 66%, transparent 0 32%, rgba(18, 23, 42, 0.22) 62%, rgba(18, 23, 42, 0.44) 100%),
    linear-gradient(to top, rgba(18, 23, 42, 0.36), transparent 46%);
  pointer-events: none;
}

.room-stage::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(to top, rgba(10, 13, 24, 0.58), transparent);
  pointer-events: none;
}

.moon-window {
  display: none;
  position: absolute;
  top: 40px;
  left: 24px;
  width: 92px;
  height: 112px;
  border: 4px solid rgba(255, 248, 226, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 66% 30%, #fff2bd 0 14px, transparent 15px),
    linear-gradient(145deg, #193052, #12172a);
}

.table {
  display: none;
  position: absolute;
  left: 110px;
  bottom: 68px;
  width: 156px;
  height: 70px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(#ae795d, #7d4d42);
  box-shadow: inset 0 14px rgba(255, 248, 226, 0.12);
}

.table::before,
.table::after {
  content: "";
  position: absolute;
  bottom: -66px;
  width: 20px;
  height: 70px;
  border-radius: 4px;
  background: #6b433a;
}

.table::before {
  left: 20px;
}

.table::after {
  right: 20px;
}

.shelf {
  display: none;
  position: absolute;
  right: 18px;
  bottom: 64px;
  width: 86px;
  height: 190px;
  border-radius: 6px;
  background: linear-gradient(90deg, #68465a, #8f6558);
  transform: rotate(-4deg);
  box-shadow: -14px 18px 28px rgba(0, 0, 0, 0.22);
}

.shelf::before {
  content: "";
  position: absolute;
  inset: 22px 12px;
  background: repeating-linear-gradient(to bottom, rgba(255, 248, 226, 0.3) 0 4px, transparent 4px 34px);
}

.safe-target {
  position: absolute;
  z-index: 4;
  min-width: 68px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 248, 226, 0.28);
  border-radius: 999px;
  background: rgba(255, 248, 226, 0.12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.safe-target.correct {
  border-color: rgba(155, 231, 177, 0.9);
  background: rgba(155, 231, 177, 0.22);
  box-shadow: 0 0 24px rgba(155, 231, 177, 0.34);
}

.safe-target.wrong {
  border-color: rgba(231, 130, 141, 0.9);
  background: rgba(231, 130, 141, 0.22);
}

.window-target {
  top: 118px;
  left: 20px;
}

.table-target {
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
}

.shelf-target {
  right: 18px;
  top: 118px;
}

.child {
  display: none;
  position: absolute;
  left: 168px;
  bottom: 78px;
  width: 74px;
  height: 96px;
  z-index: 2;
}

.child .head {
  position: absolute;
  top: 4px;
  left: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1b986;
}

.child .head::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 4px;
  width: 30px;
  height: 18px;
  border-radius: 50% 50% 20% 20%;
  background: #493044;
}

.child .body {
  position: absolute;
  top: 34px;
  left: 18px;
  width: 42px;
  height: 52px;
  border-radius: 20px 20px 14px 14px;
  background: linear-gradient(#ffc56d, #e7828d);
}

.child .bag {
  position: absolute;
  top: 46px;
  left: 4px;
  width: 26px;
  height: 30px;
  border-radius: 6px;
  background: #2f8f8a;
}

.quake-lines {
  position: absolute;
  inset: 18px;
  z-index: 2;
  background:
    linear-gradient(110deg, transparent 0 47%, rgba(255, 248, 226, 0.35) 48% 49%, transparent 50%) 60% 18% / 120px 80px no-repeat,
    linear-gradient(70deg, transparent 0 47%, rgba(255, 248, 226, 0.2) 48% 49%, transparent 50%) 10% 70% / 90px 80px no-repeat;
  opacity: 0.8;
}

.feedback {
  min-height: 48px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 226, 0.1);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.kit::before {
  background:
    radial-gradient(circle at 23% 24%, rgba(155, 231, 177, 0.24), transparent 28%),
    linear-gradient(150deg, #472739 0%, #193b3d 50%, #504137 100%);
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-self: center;
}

.kit-item {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 226, 0.11);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.kit-item:active,
.route-choice:active {
  transform: scale(0.97);
}

.safe-target:active {
  transform: scale(0.97);
}

.table-target:active {
  transform: translateX(-50%) scale(0.97);
}

.kit-item.collected {
  border-color: rgba(155, 231, 177, 0.88);
  background: rgba(155, 231, 177, 0.18);
}

.kit-item.rejected {
  border-color: rgba(231, 130, 141, 0.88);
  background: rgba(231, 130, 141, 0.18);
}

.item-icon {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
}

.flashlight::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 24px;
  height: 12px;
  border-radius: 4px;
  background: var(--amber);
  transform: rotate(-22deg);
}

.flashlight::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 7px;
  width: 18px;
  height: 20px;
  clip-path: polygon(0 24%, 100% 0, 100% 100%, 0 76%);
  background: rgba(255, 242, 189, 0.7);
}

.water::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 4px;
  width: 24px;
  height: 36px;
  border-radius: 9px 9px 6px 6px;
  background: linear-gradient(#dff7ff 0 32%, #59b8d7 32% 100%);
}

.whistle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 15px;
  width: 34px;
  height: 20px;
  border-radius: 12px 8px 8px 12px;
  background: var(--mint);
}

.whistle::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #193b3d;
}

.medkit::before {
  content: "";
  position: absolute;
  inset: 8px 5px 5px;
  border-radius: 7px;
  background: #fff2bd;
}

.medkit::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 15px;
  width: 7px;
  height: 20px;
  background: var(--rose);
  box-shadow: -7px 7px 0 -1px var(--rose), 7px 7px 0 -1px var(--rose);
}

.toy::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: conic-gradient(var(--rose), var(--amber), var(--teal), var(--rose));
}

.vase::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  width: 26px;
  height: 34px;
  border-radius: 8px 8px 15px 15px;
  background: linear-gradient(#bfa1ff, #68465a);
}

.bag-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bag-meter span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 248, 226, 0.14);
}

.bag-meter span.filled {
  background: linear-gradient(90deg, var(--mint), var(--amber));
  box-shadow: 0 0 16px rgba(155, 231, 177, 0.45);
}

.route::before {
  background:
    linear-gradient(rgba(18, 23, 42, 0.55), rgba(18, 23, 42, 0.38)),
    url("./assets/escape-night-hero.png") center/cover no-repeat;
}

.route-stage {
  display: grid;
  gap: 12px;
  align-self: center;
}

.route-choice {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 18, 34, 0.62);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.route-choice strong {
  font-size: 21px;
}

.route-choice small {
  color: var(--muted);
  font-size: 13px;
}

.route-choice .route-icon {
  grid-row: 1 / 3;
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255, 248, 226, 0.12);
}

.stairs .route-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  width: 32px;
  height: 28px;
  background: linear-gradient(to bottom, transparent 0 20%, var(--mint) 20% 30%, transparent 30% 45%, var(--mint) 45% 55%, transparent 55% 70%, var(--mint) 70% 80%, transparent 80%);
  transform: skewY(-18deg);
}

.elevator .route-icon::before {
  content: "";
  position: absolute;
  inset: 10px 14px;
  border: 2px solid var(--rose);
  border-radius: 3px;
}

.back .route-icon::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 17px;
  width: 24px;
  height: 24px;
  border-top: 4px solid var(--amber);
  border-left: 4px solid var(--amber);
  transform: rotate(-45deg);
}

.route-choice.correct {
  border-color: rgba(155, 231, 177, 0.9);
  background: rgba(155, 231, 177, 0.18);
}

.route-choice.wrong {
  border-color: rgba(231, 130, 141, 0.9);
  background: rgba(231, 130, 141, 0.2);
}

.flashlight-panel::before {
  background: linear-gradient(160deg, #22172e, #0f2229 54%, #30283d);
}

.flash-zone {
  --x: 50%;
  --y: 50%;
  position: relative;
  align-self: center;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle 92px at var(--x) var(--y), rgba(255, 242, 189, 0.88), rgba(255, 197, 109, 0.24) 36%, rgba(18, 23, 42, 0.96) 72%),
    linear-gradient(180deg, #17232d, #101422);
  cursor: crosshair;
  touch-action: none;
}

.night-hall {
  position: absolute;
  inset: 0;
}

.rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 210px;
  height: 6px;
  background: rgba(255, 248, 226, 0.22);
}

.door {
  position: absolute;
  bottom: 0;
  width: 82px;
  height: 205px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(#2c243a, #161a29);
  border: 1px solid rgba(255, 248, 226, 0.13);
}

.door-a {
  left: 28px;
}

.door-b {
  right: 28px;
}

.safe-sign {
  position: absolute;
  z-index: 2;
  top: 86px;
  right: 52px;
  width: 82px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 248, 226, 0.1);
  background: #050607;
  color: transparent;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.74);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.flash-zone.illuminated .safe-sign,
.flash-zone.found .safe-sign {
  border-color: rgba(255, 248, 226, 0.22);
  background: #43c978;
  color: #050607;
  box-shadow: 0 0 28px rgba(67, 201, 120, 0.46), inset 0 2px rgba(255, 248, 226, 0.22);
}

.light-orb {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff2bd;
  opacity: 0.72;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(255, 242, 189, 0.8);
}

.flash-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  color: rgba(255, 248, 226, 0.68);
  font-size: 13px;
}

.finale::before {
  background:
    linear-gradient(to bottom, rgba(18, 23, 42, 0.24), rgba(18, 23, 42, 0.78)),
    url("./assets/family-reunion-v2.png") center/cover no-repeat;
}

.final-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.star {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff2bd;
  box-shadow: 0 0 20px #fff2bd;
  animation: twinkle 2s infinite ease-in-out alternate;
}

.s1 {
  left: 18%;
  top: 18%;
}

.s2 {
  right: 24%;
  top: 13%;
  animation-delay: 400ms;
}

.s3 {
  right: 12%;
  top: 34%;
  animation-delay: 800ms;
}

.sprout-stage {
  position: relative;
  align-self: center;
  min-height: 310px;
  border: 1px solid rgba(255, 248, 226, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(18, 23, 42, 0.14), rgba(18, 23, 42, 0.36)),
    url("./assets/family-reunion-v2.png") center 66% / cover no-repeat;
  box-shadow: inset 0 -74px 90px rgba(0, 0, 0, 0.24), 0 18px 48px rgba(0, 0, 0, 0.22);
}

.sprout-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 72%, transparent 0 34%, rgba(18, 23, 42, 0.28) 78%);
  pointer-events: none;
}

.ground {
  display: none;
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 52px;
  height: 88px;
  border-radius: 50%;
  background:
    linear-gradient(100deg, transparent 0 45%, rgba(255, 248, 226, 0.2) 46% 48%, transparent 49%),
    radial-gradient(ellipse, #6a5140, #332438 72%);
}

.sprout {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 98px;
  width: 112px;
  height: 170px;
  transform: translateX(-50%);
}

.stem {
  position: absolute;
  left: 53px;
  bottom: 0;
  width: 8px;
  height: 116px;
  border-radius: 999px;
  background: linear-gradient(#9be7b1, #43c978);
  box-shadow: 0 0 22px rgba(155, 231, 177, 0.45);
}

.leaf {
  position: absolute;
  width: 56px;
  height: 34px;
  border-radius: 50% 8px 50% 8px;
  background: linear-gradient(135deg, #d8ffd8, #5ad183);
  box-shadow: 0 0 24px rgba(155, 231, 177, 0.4);
}

.leaf.left {
  left: 4px;
  top: 52px;
  transform: rotate(-28deg);
}

.leaf.right {
  right: 3px;
  top: 28px;
  transform: scaleX(-1) rotate(-22deg);
}

.glow {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 190px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(155, 231, 177, 0.42), transparent 72%);
  transform: translateX(-50%);
}

.family {
  position: absolute;
  left: 50%;
  bottom: 82px;
  display: none;
  gap: 14px;
  transform: translateX(-50%);
}

.family span {
  display: block;
  width: 28px;
  height: 64px;
  border-radius: 16px 16px 7px 7px;
  background: linear-gradient(var(--amber), var(--rose));
}

.family span::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: -18px auto 0;
  border-radius: 50%;
  background: #f1b986;
}

.family span:nth-child(2) {
  height: 50px;
  margin-top: 14px;
  background: linear-gradient(var(--mint), var(--teal));
}

.ending-card {
  padding: 16px;
  border: 1px solid rgba(255, 248, 226, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 226, 0.11);
}

.ending-card p {
  margin-bottom: 6px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
}

.ending-card strong {
  display: block;
  line-height: 1.65;
}

.dots {
  position: absolute;
  z-index: 18;
  right: 13px;
  top: 50%;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 248, 226, 0.28);
  transition: height 220ms ease, background 220ms ease;
}

.dots span.active {
  height: 22px;
  background: var(--amber);
}

@keyframes cue {
  0%,
  100% {
    opacity: 0.24;
    transform: translateY(-3px) rotate(45deg);
  }
  50% {
    opacity: 0.9;
    transform: translateY(3px) rotate(45deg);
  }
}

@keyframes roomShake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-2px);
  }
  70% {
    transform: translateX(2px);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.35;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1.16);
  }
}

@media (max-height: 720px) {
  .phone-shell {
    min-height: 100svh;
  }

  .panel {
    gap: 10px;
    padding: 54px 20px 16px;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 27px;
  }

  .room-stage,
  .flash-zone {
    min-height: 285px;
  }

  .kit-item {
    min-height: 88px;
  }

  .sprout-stage {
    min-height: 240px;
  }
}

@media (min-width: 720px) {
  .phone-shell {
    border-radius: 28px;
    border: 1px solid rgba(255, 248, 226, 0.18);
  }
}

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