@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Andika"; src: url("../fonts/andika-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("../fonts/andika-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #2a1740;
  --ink-soft: #5b4475;
  --muted: #8f79a6;
  --cream: #fff7eb;
  --card: #fffaf3;
  --pink: #ff70a6;
  --blue: #66b8ff;
  --purple: #b993ff;
  --gold: #ffd166;
  --green: #7bd88f;
  --orange: #ffb86b;
  --red: #ff6b6b;
  --kid: #ff70a6;
  --night1: #2a1740;
  --night2: #4b2a78;
  --night3: #8a4fb8;
  --radius: 28px;
  --shadow: 0 10px 0 rgba(42, 23, 64, .18), 0 18px 40px rgba(42, 23, 64, .28);
  --shadow-sm: 0 5px 0 rgba(42, 23, 64, .16), 0 10px 22px rgba(42, 23, 64, .2);
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --read: "Andika", "Fredoka", "Trebuchet MS", sans-serif;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--display); font-weight: 500; color: var(--ink);
  background: radial-gradient(120% 90% at 50% 0%, var(--night3) 0%, var(--night2) 45%, var(--night1) 100%);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 15%, #ffe9a8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 60%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 85%, #ffd1ea 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 90%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35 } to { opacity: .75 } }

#app { position: fixed; inset: 0; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:focus-visible, [tabindex]:focus-visible { outline: 5px solid var(--gold); outline-offset: 4px; }
.emoji { font-family: var(--emoji); line-height: 1; }

/* ------------------------------------------------ boot */
.boot { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: var(--cream); gap: 18px; font-size: 22px; }
.boot-door { width: 90px; height: 130px; border-radius: 45px 45px 10px 10px; background: linear-gradient(180deg, #ffd1ea, #b993ff); box-shadow: 0 0 60px #ffd1ea; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); box-shadow: 0 0 90px #ffe9a8; } }

/* ------------------------------------------------ screens */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; animation: screenIn .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.screen.out { animation: screenOut .25s ease-in both; }
@keyframes screenIn { from { opacity: 0; transform: scale(.96) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes screenOut { to { opacity: 0; transform: scale(1.03); } }

.topbar { display: flex; align-items: center; gap: 14px; padding: max(14px, env(safe-area-inset-top)) 18px 10px; z-index: 5; }
.topbar .title { flex: 1; color: var(--cream); font-weight: 700; font-size: clamp(20px, 3vw, 30px); text-shadow: 0 3px 0 rgba(0,0,0,.18); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-btn { width: 64px; height: 64px; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow-sm); display: grid; place-items: center; font-size: 30px; transition: transform .12s; flex: none; }
.round-btn:active { transform: translateY(4px) scale(.96); box-shadow: 0 1px 0 rgba(42,23,64,.2); }
.pill { display: flex; align-items: center; gap: 8px; background: rgba(255, 247, 235, .95); border-radius: 999px; padding: 8px 18px 8px 10px; box-shadow: var(--shadow-sm); font-weight: 700; font-size: 24px; flex: none; }
.pill .emoji { font-size: 30px; }
.pill.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.25) rotate(-4deg); } }

/* ------------------------------------------------ home */
.home { background: #2a1740; }
.home-bg .rb-fill, .home-bg .rb-fit { background-image: url("../img/home.jpg"); }
.home-bg .rb-fit { background-position: center; }
.home-bg::after { display: none; }
.home::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,23,64,.15), rgba(42,23,64,.55) 70%, rgba(42,23,64,.8)); pointer-events: none; }
.home .who { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 0 16px max(26px, env(safe-area-inset-bottom)); }
.home h1 { margin: 0; background: rgba(42,23,64,.35); backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 28px; color: var(--cream); font-size: clamp(28px, 5vw, 54px); font-weight: 700; text-shadow: 0 4px 0 rgba(42,23,64,.5), 0 0 30px rgba(255,209,234,.6); text-align: center; }
.kid-doors { display: flex; gap: clamp(16px, 4vw, 48px); justify-content: center; flex-wrap: wrap; }
.kid-door { width: clamp(170px, 24vw, 250px); background: var(--card); border-radius: 130px 130px 30px 30px; padding: 14px 14px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .2s; border: 6px solid var(--kidc, var(--pink)); }
.kid-door:hover { transform: translateY(-6px) rotate(-1deg); }
.kid-door:active { transform: scale(.96); }
.kid-door img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 120px 120px 20px 20px; }
.kid-door .doll { width: 100%; }
.kid-door .doll svg { width: 100%; height: auto; display: block; }
.kid-door .nm { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; color: var(--kidc, var(--pink)); }
.kid-door .badge { position: absolute; }
.lock { position: absolute; right: 16px; top: max(16px, env(safe-area-inset-top)); z-index: 3; min-height: 52px; border-radius: 999px; background: rgba(255,247,235,.94); color: var(--ink); padding: 8px 18px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); }
.parent-link { flex: none; border-radius: 999px; padding: 8px 13px; background: rgba(255,247,235,.94); color: var(--ink); font-size: 15px; font-weight: 700; white-space: nowrap; }
.badge-dot { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; border-radius: 999px; font-size: 14px; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; }

/* ------------------------------------------------ room */
.room-bg { position: absolute; inset: 0; overflow: hidden; background: #2a1740; }
.room-bg .rb-fill { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) saturate(1.2) brightness(.85); }
.room-bg .rb-fit { position: absolute; inset: 0; background-size: contain; background-position: center top; background-repeat: no-repeat; filter: saturate(1.1); }
.room-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,23,64,.35), rgba(42,23,64,.1) 35%, rgba(42,23,64,.55)); }
.room .topbar .avatar { width: 64px; height: 64px; border-radius: 50%; border: 5px solid var(--kid); box-shadow: var(--shadow-sm); object-fit: cover; }
.room-body { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.stickers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sticker { position: absolute; transform: translate(-50%, -50%) scale(var(--s, 1)); font-size: 64px; touch-action: none; cursor: grab; pointer-events: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); transition: filter .2s; }
.sticker.drag { cursor: grabbing; filter: drop-shadow(0 16px 12px rgba(0,0,0,.35)); z-index: 3; }
.sticker img { width: 96px; height: 96px; object-fit: cover; border-radius: 22px; border: 5px solid #fff; display: block; pointer-events: none; }
.sticker.cut img { width: 150px; height: 150px; object-fit: contain; border: 0; border-radius: 0; }
.sticker.new { animation: pop .8s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(0) rotate(-30deg); } }

.game-doors { position: relative; z-index: 2; margin-top: auto; display: flex; flex-wrap: wrap; gap: clamp(12px, 2vw, 24px); padding: 12px 84px max(18px, env(safe-area-inset-bottom)); justify-content: center; }
.game-door { scroll-snap-align: center; flex: none; width: clamp(150px, 20vw, 220px); background: var(--card); border-radius: 26px; padding: 10px; box-shadow: var(--shadow); text-align: center; transition: transform .18s; }
.game-door:hover { transform: translateY(-6px); }
.game-door:active { transform: scale(.95); }
.game-door .pic { position: relative; height: clamp(100px, 14vw, 150px); border-radius: 18px; background-size: cover; background-position: center; overflow: hidden; }
.game-door .pic .emoji { position: absolute; right: 8px; bottom: 6px; font-size: 44px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.game-door .lv { position: absolute; left: 8px; top: 8px; background: rgba(255,247,235,.92); border-radius: 999px; padding: 2px 10px; font-size: 15px; font-weight: 700; }
.game-door .gt { margin-top: 8px; font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; }
/* five doors on one wall: a little smaller so they still fit in one row */
.game-doors.many .game-door { width: clamp(130px, 15vw, 190px); }
.game-doors.many .game-door .pic { height: clamp(90px, 11vw, 130px); }
@media (max-width: 760px) { .game-doors { padding-inline: 12px; gap: 10px; } .game-door { width: calc(50% - 10px); max-width: 200px; } }

.room-actions { position: relative; z-index: 2; display: flex; gap: 12px; justify-content: center; padding: 6px 12px; }
.big-btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 14px 26px; font-size: clamp(20px, 2.5vw, 26px); font-weight: 700; background: var(--gold); box-shadow: var(--shadow-sm); transition: transform .12s; }
.big-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(42,23,64,.2); }
.big-btn.pink { background: var(--pink); color: #fff; }
.big-btn.blue { background: var(--blue); color: #fff; }
.big-btn.green { background: var(--green); }
.big-btn.cream { background: var(--cream); }
.big-btn .emoji { font-size: 1.3em; }
.egg { position: absolute; z-index: 3; right: 6%; top: 18%; font-size: 84px; animation: wobble 1.4s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } }
.waiting-gifts { position: absolute; z-index: 2; left: 18px; top: 8px; display: flex; gap: 8px; align-items: center; color: var(--cream); font-size: 18px; background: rgba(42,23,64,.45); border-radius: 999px; padding: 6px 14px; }

/* ------------------------------------------------ game host */
.game { background: radial-gradient(130% 100% at 50% 0%, #fff3fa 0%, #f5e8ff 55%, #e6dcff 100%); }
.game .topbar .title { color: var(--ink); text-shadow: none; }
.game-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 18px 22px; gap: clamp(12px, 2.4vh, 26px); position: relative; }
.progress-dots { display: flex; gap: 10px; }
.progress-dots i { width: 18px; height: 18px; border-radius: 50%; background: #e4d6f5; transition: background .3s, transform .3s; }
.progress-dots i.on { background: var(--kid); transform: scale(1.15); }
.prompt { font-size: clamp(24px, 3.6vw, 40px); font-weight: 700; text-align: center; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.say-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--kid); color: #fff; font-size: 26px; display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none; }
.say-btn[hidden] { display: none; }

/* choice tiles */
.choices { display: flex; gap: clamp(14px, 2.5vw, 30px); flex-wrap: wrap; justify-content: center; }
.tile { min-width: clamp(110px, 16vw, 180px); min-height: clamp(110px, 16vw, 180px); padding: 12px 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; place-items: center; font-size: clamp(56px, 9vw, 104px); transition: transform .15s, background .2s; }
.tile.word { font-family: var(--read); font-weight: 700; font-size: clamp(30px, 4.6vw, 52px); min-height: 0; min-width: clamp(130px, 18vw, 200px); padding: 20px 24px; }
.tile:active { transform: scale(.94); }
.tile.right { background: #e3ffe8; animation: yay .6s; }
.tile.wrong { animation: shake .45s; background: #fff0f3; }
.tile.hint { animation: glow 1s ease-in-out infinite; }
.tile.dim { opacity: .35; pointer-events: none; }
@keyframes yay { 40% { transform: scale(1.15) rotate(3deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-12px) rotate(-3deg); } 40%, 80% { transform: translateX(12px) rotate(3deg); } }
@keyframes glow { 50% { box-shadow: 0 0 0 10px rgba(255, 209, 102, .8), var(--shadow); } }

/* reading text */
.sentence { font-family: var(--read); font-weight: 700; font-size: clamp(34px, 5.4vw, 64px); text-align: center; line-height: 1.35; background: #fff; border-radius: var(--radius); padding: 22px 34px; box-shadow: var(--shadow); max-width: 1100px; display: flex; flex-wrap: wrap; justify-content: center; column-gap: .32em; }
.sentence .w { border-radius: 12px; padding: 0 4px; transition: background .2s; cursor: pointer; }
.sentence .w.lit { background: #ffe9a8; }
.sentence .blank { display: inline-block; min-width: 3.2em; border-bottom: 6px solid var(--kid); }
.sentence .blank.filled { border-bottom-color: var(--green); color: #2e9a4b; }
.silly-row .tile { font-size: clamp(30px, 4vw, 44px); gap: 6px; min-width: clamp(170px, 24vw, 260px); }
.silly-row .tile .emoji { font-size: 1.8em; }

/* build tiles */
.slots { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: 96px; }
.slot { min-width: 84px; height: 96px; border-radius: 20px; border: 4px dashed #cdb7ea; display: grid; place-items: center; font-family: var(--read); font-weight: 700; font-size: clamp(36px, 5vw, 58px); padding: 0 12px; background: rgba(255,255,255,.6); transition: all .2s; }
.slot.filled { border: 4px solid var(--green); background: #fff; animation: yay .4s; }
.slot.next { border-color: var(--kid); }
.tray { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; max-width: 1000px; }
.ltile { min-width: 84px; height: 92px; padding: 0 16px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); font-family: var(--read); font-weight: 700; font-size: clamp(36px, 5vw, 56px); display: grid; place-items: center; transition: transform .15s, opacity .2s; }
.ltile:active { transform: scale(.92); }
.ltile.used { opacity: 0; pointer-events: none; transform: scale(.6); }
.ltile.wrong { animation: shake .45s; background: #fff0f3; }
.ltile.hint { animation: glow 1s ease-in-out infinite; }
.bigpic { font-size: clamp(90px, 15vw, 170px); filter: drop-shadow(0 10px 10px rgba(42,23,64,.2)); }
.bigpic.has-img img { width: clamp(140px, 22vw, 240px); height: clamp(140px, 22vw, 240px); object-fit: cover; border-radius: 24px; background: #fff; display: block; }
.tile .pic-img { width: clamp(90px, 13vw, 150px); height: clamp(90px, 13vw, 150px); object-fit: cover; border-radius: 16px; display: block; pointer-events: none; }
.bigpic.bounce, .kh-letter.bounce { animation: yay .7s; }
.flashword { font-family: var(--read); font-weight: 700; font-size: clamp(50px, 8vw, 96px); color: var(--ink); letter-spacing: .04em; }
.flashword.fade { animation: fadeAway 1s 2.2s forwards; }
@keyframes fadeAway { to { opacity: 0; filter: blur(8px); } }
.typing-hint { color: var(--muted); font-size: 18px; }

/* numbers */
.math { font-size: clamp(54px, 9vw, 110px); font-weight: 700; display: flex; align-items: center; gap: .3em; }
.math .q { color: var(--kid); }
.groups { display: flex; gap: clamp(20px, 4vw, 60px); align-items: center; flex-wrap: wrap; justify-content: center; }
.group { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-sm); }
.group .c { width: clamp(34px, 4.6vw, 54px); height: clamp(34px, 4.6vw, 54px); display: grid; place-items: center; font-size: clamp(26px, 3.6vw, 42px); border-radius: 12px; background: #f6efff; transition: opacity .3s, transform .3s; }
.group .c.empty { background: #f6efff; opacity: .5; }
.group .c.gone { opacity: .25; transform: scale(.7); position: relative; }
.group .c.gone::after { content: "✕"; position: absolute; color: var(--red); font-size: 1.1em; font-weight: 700; }
.group .c.counted { background: #ffe9a8; }
.op { font-size: clamp(44px, 6vw, 72px); font-weight: 700; color: var(--ink-soft); }
.scatter { position: relative; width: min(90vw, 720px); height: clamp(180px, 30vh, 300px); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.scatter .c { position: absolute; font-size: clamp(40px, 6vw, 64px); transform: translate(-50%, -50%); cursor: pointer; transition: transform .2s; }
.scatter .c.counted { transform: translate(-50%, -50%) scale(1.2); }
.scatter .c.counted::after { content: attr(data-n); position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-family: var(--display); font-size: 22px; font-weight: 700; color: #fff; background: var(--kid); border-radius: 999px; padding: 0 8px; }
.numtile { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 7vw, 84px); }

/* memory */
.mem-themes { display: flex; gap: 10px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding: 6px 8px 8px; justify-content: safe center; }
.mem-theme { flex: none; width: 62px; height: 62px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); font-size: 32px; display: grid; place-items: center; overflow: hidden; }
.mem-theme.on { outline: 5px solid var(--kid); }
.mem-theme img { width: 100%; height: 100%; object-fit: cover; }
.mem-grid { display: grid; gap: clamp(10px, 1.6vw, 18px); perspective: 1200px; }
.mcard { position: relative; width: var(--cw); height: var(--cw); transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.mcard.up { transform: rotateY(180deg); }
.mcard .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 22px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.mcard .back { background: linear-gradient(145deg, var(--kid), var(--purple)); border: 5px solid #fff; }
.mcard .back::before { content: ""; width: 38%; height: 54%; border-radius: 999px 999px 8px 8px; background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 4px rgba(255,255,255,.6); }
.mcard .back::after { content: "✦"; position: absolute; top: 12%; right: 14%; color: #fff; font-size: calc(var(--cw) * .14); opacity: .9; }
.mcard .front { background: #fff; transform: rotateY(180deg); font-size: calc(var(--cw) * .56); overflow: hidden; }
.mcard .front img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.mcard.matched .front { box-shadow: 0 0 0 6px var(--gold), var(--shadow-sm); animation: yay .6s; }
.mcard.matched { pointer-events: none; }

/* letter friends */
.lf { display: flex; gap: clamp(30px, 8vw, 120px); align-items: center; }
.lf-col { display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); }
.lf .tile { min-width: clamp(100px, 13vw, 150px); min-height: clamp(84px, 13vh, 130px); }
.lf .tile.letter { font-family: var(--read); font-weight: 700; font-size: clamp(50px, 7vw, 84px); color: var(--ink); }
.lf .tile.sel { outline: 6px solid var(--kid); transform: scale(1.06); }
.lf .tile.done { background: #e3ffe8; pointer-events: none; opacity: .75; }

/* key hunt */
.kh-target { display: flex; align-items: center; gap: 30px; }
.kh-letter { font-family: var(--read); font-weight: 700; font-size: clamp(110px, 18vw, 200px); line-height: 1; color: var(--kid); text-shadow: 0 8px 0 rgba(42,23,64,.12); }
.keyboard { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.keyboard .row { display: flex; gap: 8px; }
.key { width: clamp(44px, 7vw, 74px); height: clamp(50px, 8vh, 74px); border-radius: 14px; background: #fff; box-shadow: 0 5px 0 #d8c8ee; font-family: var(--read); font-weight: 700; font-size: clamp(22px, 3.4vw, 34px); display: grid; place-items: center; }
.key:active, .key.press { transform: translateY(4px); box-shadow: 0 1px 0 #d8c8ee; }
.key.hint { animation: glow 1s ease-in-out infinite; }
.key.good { background: #e3ffe8; }

/* ------------------------------------------------ overlays */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(42, 23, 64, .55); backdrop-filter: blur(6px); animation: fadeIn .3s both; padding: 16px; }
@keyframes fadeIn { from { opacity: 0; } }
.panel { background: var(--card); border-radius: 36px; padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); max-width: min(720px, 94vw); width: 100%; text-align: center; animation: screenIn .5s cubic-bezier(.2, .9, .3, 1.3) both; max-height: 92vh; overflow: auto; }
.panel h2 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 48px); }
.panel p { font-size: 22px; color: var(--ink-soft); margin: 8px 0 18px; }
.panel .row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stars-earned { font-size: clamp(54px, 9vw, 86px); letter-spacing: 8px; margin: 6px 0 12px; }
.stars-earned .emoji { display: inline-block; animation: starIn .6s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes starIn { from { transform: scale(0) rotate(-120deg); opacity: 0; } }
.mascot { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 6px solid #fff; box-shadow: var(--shadow-sm); background: #fff; animation: wobble 2.4s ease-in-out infinite; }

/* ------------------------------------------------ make wizard */
.make { background: radial-gradient(120% 90% at 50% 0%, #ffe1f0 0%, #efe0ff 60%, #dccfff 100%); }
.make .topbar .title { color: var(--ink); text-shadow: none; }
.wiz { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 10px 18px 26px; min-height: 0; }
.wiz h2 { margin: 0; font-size: clamp(30px, 5vw, 50px); text-align: center; display: flex; gap: 12px; align-items: center; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 200px)); gap: 18px; }
@media (max-width: 600px) { .pick-grid { grid-template-columns: repeat(2, minmax(120px, 200px)); } }
.pick { background: #fff; border-radius: 26px; padding: 16px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 22px; font-weight: 700; transition: transform .15s; }
.pick .emoji { font-size: 64px; }
.pick:active { transform: scale(.94); }
.swatches { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; max-width: 760px; }
.swatch { width: clamp(80px, 12vw, 120px); height: clamp(80px, 12vw, 120px); border-radius: 50%; box-shadow: var(--shadow-sm); border: 6px solid #fff; position: relative; }
.swatch span { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); font-size: 18px; font-weight: 700; white-space: nowrap; }
.mic { width: 140px; height: 140px; border-radius: 50%; background: var(--kid); color: #fff; font-size: 64px; box-shadow: var(--shadow); display: grid; place-items: center; }
.mic.on { animation: listen 1s ease-in-out infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 20px rgba(255, 112, 166, .35), var(--shadow); } }
.heard { font-family: var(--read); font-size: 28px; min-height: 40px; color: var(--ink); text-align: center; max-width: 800px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 900px; }
.chip { background: #fff; border-radius: 999px; padding: 10px 18px; font-size: 20px; font-weight: 700; box-shadow: var(--shadow-sm); display: flex; gap: 6px; align-items: center; }
.chip.on { background: var(--kid); color: #fff; }
.type-in { font-family: var(--read); font-size: 24px; padding: 12px 18px; border-radius: 18px; border: 3px solid #d8c8ee; width: min(600px, 90vw); }
.draft-card { background: #fff; border-radius: 32px; padding: 26px 34px; box-shadow: var(--shadow); max-width: 760px; text-align: center; animation: screenIn .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.draft-card .k { font-size: 90px; }
.draft-card .n { font-size: clamp(34px, 5vw, 52px); font-weight: 700; color: var(--kid); }
.draft-card .s { font-family: var(--read); font-size: clamp(24px, 3.2vw, 34px); margin-top: 8px; }
.wand { font-size: 110px; animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 50% { transform: rotate(-24deg) translateY(-10px); } }

/* ------------------------------------------------ parent corner */
.parent { background: #f7f2fb; color: var(--ink); overflow: auto; }
.parent .topbar { background: #fff; box-shadow: 0 2px 10px rgba(42,23,64,.08); position: sticky; top: 0; }
.parent .topbar .title { color: var(--ink); text-shadow: none; }
.tabs { display: flex; gap: 8px; }
.tab { padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 17px; background: #efe6f8; }
.tab.on { background: var(--ink); color: #fff; }
.pbody { padding: 18px; max-width: 1200px; margin: 0 auto; width: 100%; font-family: system-ui, "Segoe UI", sans-serif; }
.pbody h3 { font-family: var(--display); font-size: 24px; margin: 18px 0 10px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.qcard { background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 4px 16px rgba(42,23,64,.1); display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.qcard .img { aspect-ratio: 1; border-radius: 12px; background: #f1eaf8; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 15px; text-align: center; }
.qcard .img img { width: 100%; height: 100%; object-fit: cover; }
.qcard input { font: inherit; font-weight: 700; font-size: 17px; border: 2px solid #e1d4f0; border-radius: 10px; padding: 6px 8px; }
.qcard .meta { color: var(--muted); font-size: 13px; }
.qcard .flag { color: #b3261e; font-weight: 700; }
.qcard .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pbtn { padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 15px; background: #efe6f8; }
.pbtn.ok { background: #2e9a4b; color: #fff; }
.pbtn.no { background: #f3d6d6; color: #8a1c1c; }
.pbtn.main { background: var(--ink); color: #fff; }
.stat-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; font-size: 15px; }
.stat-table th, .stat-table td { padding: 8px 10px; border-bottom: 1px solid #eee4f6; text-align: left; }
.stat-table th { background: #f3ecfa; }
.lvl-ctl { display: inline-flex; gap: 4px; align-items: center; }
.lvl-ctl button { width: 26px; height: 26px; border-radius: 8px; background: #efe6f8; font-weight: 700; }
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 16px; border-bottom: 1px solid #eee4f6; }
.setting select, .setting input { font: inherit; padding: 4px 8px; border-radius: 8px; border: 2px solid #e1d4f0; }
.note { color: var(--muted); font-size: 14px; }
.gate .keypad { display: grid; grid-template-columns: repeat(5, 64px); gap: 10px; justify-content: center; margin-top: 12px; }
.gate .keypad button { height: 64px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); font-size: 26px; font-weight: 700; }
.gate .ans { font-size: 40px; font-weight: 700; min-height: 50px; letter-spacing: 4px; }

.sleepy .moon { font-size: 120px; animation: breathe 3s ease-in-out infinite; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 60; font-size: 18px; animation: fadeIn .3s; }

/* ---------------- Balloon Pop */
.bmath .bnum { display: inline-block; }
.bmath .popn { color: #8a7a9a; text-decoration: line-through dotted; text-decoration-thickness: 4px; }
.sky { --bw: 80px; display: flex; gap: 36px; justify-content: center; align-items: flex-end; padding: 14px 20px 6px; border-radius: var(--radius);
  background: linear-gradient(#e7f5ff, #fff7fd); box-shadow: var(--shadow); max-width: calc(100vw - 24px); }
.sky.stacked { flex-direction: column; align-items: center; gap: 14px; }
.bunch { display: grid; gap: 4px 8px; justify-content: center; padding: 4px 8px; border-radius: 22px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 2px rgba(201, 188, 216, .35); }
.slot { width: var(--bw); height: calc(var(--bw) * 1.45); position: relative; padding: 0; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
.slot .bln { width: 100%; height: 100%; transform-origin: 50% 70%; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.slot .bln svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 6px 6px rgba(42, 23, 64, .18)); animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 70%; }
.slot.empty .bln, .slot.popped .bln { transform: scale(0); }
.slot.empty::before, .slot.popped::before { content: ''; position: absolute; left: 10%; top: 3%; width: 80%; height: 66%; border-radius: 50% 50% 48% 48%; border: 3px dashed #cfc2e0; }
.slot.popped::before { border-color: #e2a9c0; }
.slot.popped::after { content: '✦'; position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); color: #f1b6cc; font-size: calc(var(--bw) * .3); }
.slot.popping .bln { transform: scale(1.35); opacity: 0; transition: transform .18s ease-out, opacity .18s; }
.slot.grouped .bln svg { filter: drop-shadow(0 0 6px rgba(255, 209, 102, .9)); }
.slot .badge { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700; font-size: calc(var(--bw) * .34);
  color: #fff; text-shadow: 0 2px 3px rgba(0, 0, 0, .35); pointer-events: none; }
.slot.popped .badge { color: #c42f68; text-shadow: none; }
.slot.wobble .bln { animation: wobble .5s; }
.slot.bump .bln { animation: bump .3s; }
.slot.flyaway .bln { animation: flyaway 1s ease-in forwards; animation-delay: inherit; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes flyaway { to { transform: translateY(-110vh) rotate(8deg); } }
.bcontrols { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 120px; }
.bcontrols .choices { margin: 0; }
.bcontrols .numtile { min-width: clamp(84px, 11vw, 130px); min-height: clamp(84px, 11vw, 130px); font-size: clamp(44px, 6vw, 70px); }
.prompt.small { font-size: clamp(20px, 3vw, 32px); }
.pump { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4vw, 40px); color: #fff;
  background: var(--pc); border: 0; border-radius: 999px; padding: 14px 34px; box-shadow: 0 8px 0 rgba(0, 0, 0, .15), var(--shadow); cursor: pointer; touch-action: manipulation; }
.pump .emoji { font-size: 1.3em; }
.pump.press { transform: translateY(4px) scale(.96); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.pips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pips i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--pc); background: #fff; transition: background .2s, transform .2s; }
.pips i.on { background: var(--pc); transform: scale(1.15); }
.target { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4vw, 40px); background: #fff; border-radius: 999px; padding: 6px 22px; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ------------------------------------------------ live painting reveal */
.paint-wait { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.paint-wait .canvas-glow { position: absolute; inset: 20px; border-radius: 36px; background: conic-gradient(from 0deg, #ff70a6, #ffd166, #7bd88f, #66b8ff, #b993ff, #ff70a6); filter: blur(18px); opacity: .7; animation: spin 3s linear infinite; }
.paint-wait .brush { position: absolute; font-size: 90px; animation: paint 1.1s ease-in-out infinite; }
.paint-wait .palette { position: absolute; right: -10px; bottom: 0; font-size: 70px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes paint { 0%, 100% { transform: translate(-30px, -10px) rotate(-20deg); } 50% { transform: translate(30px, 10px) rotate(15deg); } }
.paint-sub { font-size: 26px; font-weight: 700; color: var(--kid); margin: 0; }
.reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.reveal-img { width: min(52vh, 78vw); aspect-ratio: 1; object-fit: cover; border-radius: 36px; border: 10px solid #fff; box-shadow: var(--shadow); animation: revealIn 1.1s cubic-bezier(.2, 1.2, .3, 1) both; background: #fff; }
@keyframes revealIn { from { opacity: 0; transform: scale(.6) rotate(-6deg); filter: blur(24px) saturate(2); } to { opacity: 1; transform: none; filter: none; } }
.reveal .n { font-size: clamp(30px, 4.6vw, 48px); font-weight: 700; color: var(--kid); }
.reveal .s { font-family: var(--read); font-size: clamp(22px, 3vw, 30px); max-width: 760px; }

/* ------------------------------------------------ word sets (parent) */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ws-card { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 16px rgba(42,23,64,.08); display: flex; flex-direction: column; gap: 8px; border: 3px solid transparent; }
.ws-card.on { border-color: var(--purple); }
.ws-head { display: flex; align-items: center; gap: 8px; font-size: 18px; font-family: var(--display); }
.ws-icon { font-size: 28px; }
.ws-lv { display: flex; gap: 6px; }
.ws-lv .lv { min-width: 42px; height: 36px; border-radius: 10px; background: #efe6f8; font-weight: 700; font-size: 15px; }
.ws-lv .lv.on { background: var(--ink); color: #fff; }
.wchips { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { background: #f6efff; border-radius: 999px; padding: 3px 10px; font-size: 14px; }
.wchip.nopic { background: #fff; border: 1px dashed #d8c8ee; }
.ws-edit-row { display: flex; gap: 8px; flex-wrap: wrap; }
.panel.editor { text-align: left; max-width: min(900px, 96vw); font-family: system-ui, "Segoe UI", sans-serif; }
.panel.editor h2 { font-family: var(--display); }
.editor .ed-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.editor input { font: inherit; font-size: 17px; padding: 6px 10px; border-radius: 10px; border: 2px solid #e1d4f0; }
.editor .icon-in { width: 70px; text-align: center; }
.editor .ed-lv { display: block; margin: 10px 0; }
.editor textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 2px solid #e1d4f0; resize: vertical; }

/* ------------------------------------------------ scene studio */
.studio { background: radial-gradient(120% 90% at 50% 0%, #fff0f7 0%, #ece3ff 60%, #ddd2ff 100%); }
.studio .topbar .title { color: var(--ink); text-shadow: none; }
.studio-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 6px 16px 18px; overflow: auto; }
.st-h { margin: 0; font-size: clamp(26px, 4vw, 42px); text-align: center; }
.st-h3 { margin: 6px 0 0; font-size: 22px; }
.st-sub { margin: 0; font-size: 20px; color: var(--ink-soft); }
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; width: min(1100px, 100%); }
.scene-card { background: #fff; border-radius: 22px; padding: 8px; box-shadow: var(--shadow-sm); text-align: center; font-weight: 700; font-size: 18px; }
.scene-card .thumb { aspect-ratio: 26/15; border-radius: 16px; background: #f3ecfb center/cover; display: grid; place-items: center; font-size: 54px; }
.scene-card .nm { margin-top: 6px; }
.scene-card.new .thumb { background: linear-gradient(135deg, #ffd1ea, #d9c8ff); }
.scene-card.pending { opacity: .7; }
.stage-wrap { width: min(1100px, 100%, calc((100vh - 370px) * 26 / 15)); width: min(1100px, 100%, calc((100dvh - 370px) * 26 / 15)); }
.stage { position: relative; width: 100%; aspect-ratio: 26/15; border-radius: 24px; background: #eee center/cover; box-shadow: var(--shadow); overflow: hidden; touch-action: none; }
.placed { position: absolute; display: grid; place-items: center; line-height: 1; cursor: grab; touch-action: none; user-select: none; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.placed img { width: 100%; display: block; pointer-events: none; border-radius: 12px; }
.placed .emoji { pointer-events: none; }
.placed.sel { outline: 4px dashed var(--kid); outline-offset: 6px; border-radius: 16px; }
.sticker-tools { display: flex; gap: 10px; justify-content: center; margin-top: 10px; min-height: 58px; align-items: center; }
.sticker-tools button { width: 58px; height: 58px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); font-size: 26px; }
.sticker-tools .hint { color: var(--ink-soft); font-size: 18px; }
.st-bottom { width: min(1100px, 100%); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.st-tabs { display: grid; grid-template-rows: repeat(2, max-content); grid-auto-flow: column; grid-auto-columns: max-content; gap: 8px; width: 100%; max-width: 100%; overflow-x: auto; justify-content: start; padding: 3px 4px 9px; scroll-snap-type: x proximity; }
.st-tab { display: flex; gap: 6px; align-items: center; white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); font-weight: 700; font-size: 17px; scroll-snap-align: start; }
.st-tab.on { background: var(--kid); color: #fff; }
.st-tray { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; padding: 6px 4px 10px; }
.st-item { flex: none; width: 76px; height: 76px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); font-size: 46px; display: grid; place-items: center; overflow: hidden; }
.st-item img { width: 100%; height: 100%; object-fit: contain; }
.studio .row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.before-after { --p: 50%; position: relative; width: min(1000px, 100%, calc((100vh - 300px) * 26 / 15)); width: min(1000px, 100%, calc((100dvh - 300px) * 26 / 15)); aspect-ratio: 26/15; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); touch-action: none; cursor: ew-resize; }
.before-after img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-clip { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--p); width: 6px; margin-left: -3px; background: #fff; box-shadow: 0 0 12px rgba(0,0,0,.3); }
.ba-handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 26px; box-shadow: var(--shadow-sm); }
.motion-list { display: flex; flex-direction: column; gap: 10px; width: min(1000px, 100%); }
.motion-row { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.7); border-radius: 20px; padding: 8px 12px; width: min(1000px, 100%); }
.motion-who { flex: none; width: 70px; height: 70px; display: grid; place-items: center; font-size: 46px; }
.motion-who img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.motion-row .chips { justify-content: flex-start; }
.clapper { font-size: 110px; animation: wobble 1s ease-in-out infinite; }
video.movie, img.movie { width: min(1000px, 100%, calc((100vh - 280px) * 26 / 15)); width: min(1000px, 100%, calc((100dvh - 280px) * 26 / 15)); aspect-ratio: 26/15; border-radius: 24px; box-shadow: var(--shadow); background: #000; object-fit: contain; }
.movie-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.movie-chip { position: relative; width: 150px; aspect-ratio: 26/15; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; }
.movie-chip img { width: 100%; height: 100%; object-fit: cover; }
.movie-chip .badge { position: absolute; right: 4px; bottom: 2px; font-size: 24px; }
.panel.wide { max-width: min(1100px, 96vw); }
.mm-player { display: grid; place-items: center; margin-bottom: 12px; }
.qcard .img video { width: 100%; height: 100%; object-fit: cover; }

/* memory: bigger decks */
.mcard .front img { pointer-events: none; -webkit-user-drag: none; }
.mcard.bonus .back { background: linear-gradient(145deg, #ffd166, #ff70a6); }
.mcard.bonus .back::after { content: "★"; }
.mcard.bonus .front { background: radial-gradient(circle, #fff7d1, #ffe08a); }
/* parent: card decks */
.deck-list { display: flex; flex-direction: column; gap: 8px; }
.deck-row { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 8px 12px; box-shadow: 0 2px 10px rgba(42,23,64,.06); }
.deck-head { flex: 1; display: flex; gap: 10px; align-items: center; text-align: left; font-family: var(--display); font-size: 17px; }
.deck-bar { flex: 1; max-width: 260px; height: 10px; border-radius: 999px; background: #efe6f8; overflow: hidden; }
.deck-bar i { display: block; height: 100%; background: var(--green); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; padding: 10px 4px 16px; }
.pcard { background: #fff; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 13px; }
.pcard img, .pcard .pc-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #f3ecfb; display: grid; place-items: center; font-size: 40px; }
.pcard.hidden { opacity: .35; }
.pcard .btns { display: flex; gap: 4px; }
.pcard .pbtn { padding: 4px 8px; }

.panel.worlds { max-height: 88vh; overflow-y: auto; }
.panel.worlds h3 { margin: 18px 0 8px; }

/* ================= bedroom walls, bookshelf, character creator ================= */

/* --- turning between the four walls --- */
.wall-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:6;
  width:62px; height:98px; border-radius:20px; border:none; cursor:pointer;
  background:rgba(255,255,255,.82); box-shadow:0 5px 0 rgba(0,0,0,.18);
  font-size:30px; display:grid; place-items:center;
}
.wall-arrow:active{ transform:translateY(calc(-50% + 4px)); box-shadow:0 2px 0 rgba(0,0,0,.18) }
.wall-arrow.left{ left:10px } .wall-arrow.right{ right:10px }
.wall-dots{
  display:flex; gap:10px; justify-content:center; margin:14px auto 10px; z-index:6;
}
.wall-dot{
  width:50px; height:50px; border-radius:16px; border:none; cursor:pointer;
  background:rgba(255,255,255,.4); display:grid; place-items:center; font-size:23px;
}
.wall-dot.on{ background:#fff; box-shadow:0 4px 0 rgba(0,0,0,.18) }
/* every wall has game doors now, so stickers stay above them on all walls */
.wall-dot{ position:relative }
.dot-egg{ position:absolute; top:-10px; right:-10px; font-size:22px; animation: eggwiggle 1.2s ease-in-out infinite; }
.egg-hint{ position:relative; z-index:4; align-self:center; margin:10px auto 0; display:inline-flex; gap:10px; align-items:center;
  border:none; border-radius:999px; padding:10px 18px; font-size:clamp(16px,2vw,20px); font-weight:700; cursor:pointer;
  background:rgba(255,247,235,.92); box-shadow:0 4px 0 rgba(0,0,0,.18); }
@keyframes eggwiggle{ 0%,100%{ transform:rotate(-12deg) } 50%{ transform:rotate(12deg) } }
@media (prefers-reduced-motion: reduce){ .dot-egg{ animation:none } }
.pick.chosen{ outline:4px solid var(--kid, #ff70a6); outline-offset:3px }

/* --- books wall --- */
.bookshelf{
  display:flex; gap:16px; flex-wrap:wrap; justify-content:center;
  padding:12px 16px; margin:0 auto; max-width:900px;
}
.book{
  width:150px; border:none; cursor:pointer; background:rgba(255,255,255,.92);
  border-radius:18px; padding:10px; box-shadow:0 6px 0 rgba(0,0,0,.2);
}
.book:active{ transform:translateY(4px); box-shadow:0 2px 0 rgba(0,0,0,.2) }
.book .cover{ width:100%; height:120px; border-radius:12px; background:#ddd center/cover }
.book .bt{ margin-top:8px; font-weight:700; font-size:15px; line-height:1.25 }
.shelf-empty{ text-align:center; color:#fff; font-size:18px; padding:30px; text-shadow:0 2px 6px rgba(0,0,0,.5) }

/* --- storybook reader --- */
.panel.reader{ max-width:760px }
.panel.reader .page-img{
  width:100%; aspect-ratio:4/3; border-radius:18px; background:#eee center/contain no-repeat;
  margin-top:10px;
}
.panel.reader .page-cap{ font-size:19px; font-weight:700; margin-top:10px; text-align:center }
.panel.reader .page-n{ font-size:14px; opacity:.6; text-align:center; margin-top:4px }
.reader-row{ margin-top:14px }

/* --- the character --- */
.doll{ display:grid; place-items:center; line-height:0 }
.doll svg{ max-width:100%; height:auto }
.doll-portrait{ display:block; width:200px; max-width:100%; height:300px; object-fit:cover; object-position:center; border-radius:18px; box-shadow:0 7px 20px rgba(45,22,56,.18) }
.kid-door .home-portrait{ width:150px; height:228px; margin:auto; border-radius:22px }
.kid-slot{ display:flex; flex-direction:column; align-items:center; gap:10px }
.dress-chip{
  border:none; cursor:pointer; background:#fff; border-radius:999px; padding:10px 18px;
  font-size:16px; font-weight:700; box-shadow:0 4px 0 rgba(0,0,0,.18);
  display:inline-flex; align-items:center; gap:7px;
}
.dress-chip:active{ transform:translateY(3px); box-shadow:0 1px 0 rgba(0,0,0,.18) }

/* --- dress-up panel --- */
.panel.dressup{ max-width:720px }
/* she stays on screen while you pick, because watching her change is the point */
.doll-stage{
  display:grid; place-items:center; padding:10px; margin:0 0 14px;
  background:linear-gradient(#fff6fb,#ffeef6); border-radius:22px; min-height:200px;
  position:sticky; top:0; z-index:3; box-shadow:0 6px 14px -8px rgba(0,0,0,.35);
}
.panel.dressup .look-groups{ padding-bottom:4px }
.paint-row{ display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; margin:0 0 14px }
.paint-row .big-btn:disabled{ opacity:.6; cursor:wait }
.paint-status{ font-size:14px; color:#654976; max-width:280px; line-height:1.3 }
.saved-looks{ display:flex; gap:10px; overflow-x:auto; padding:6px; max-width:100%; margin:8px 0 }
.saved-look{ flex:none; width:95px; background:#fff; border-radius:14px; padding:6px; box-shadow:var(--shadow-sm); font-size:13px; font-weight:700 }
.saved-look img{ display:block; width:100%; height:100px; object-fit:cover; border-radius:10px }
.picture-panel img{ display:block; max-width:100%; max-height:65vh; object-fit:contain; margin:12px auto }
.look-groups{ display:flex; flex-direction:column; gap:14px; text-align:left }
.look-group h3{ margin:0 0 7px; font-size:17px }
.look-row{ display:flex; gap:9px; flex-wrap:wrap }
.look-chip{
  border:3px solid #e7dcf0; background:#fff; border-radius:14px; padding:10px 15px;
  font-size:16px; font-weight:700; cursor:pointer;
}
.look-chip.on{ border-color:var(--kid, #ff70a6); background:#fff0f7 }
.swatch{
  width:46px; height:46px; border-radius:50%; border:4px solid #fff; cursor:pointer;
  box-shadow:0 0 0 2px #e7dcf0;
}
.swatch.on{ box-shadow:0 0 0 4px var(--kid, #ff70a6) }

@media (max-width:560px){
  .wall-arrow{ width:50px; height:82px; font-size:25px }
  .wall-dot{ width:44px; height:44px; font-size:20px }
  .book{ width:132px }
}

/* ================= Word Search ================= */
.ws-clues{
  display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-bottom:12px;
}
.ws-clue{
  display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.92);
  border-radius:14px; padding:7px 13px; font-weight:700; font-size:18px;
  box-shadow:0 3px 0 rgba(0,0,0,.14);
}
.ws-clue .emoji, .ws-clue .pic-img{ font-size:26px; width:30px; height:30px; object-fit:contain }
.ws-clue.got{ opacity:.5 }
.ws-clue.got .cw{ text-decoration:line-through }
.ws-grid{
  display:grid; grid-template-columns:repeat(var(--n), 1fr);
  gap:5px; width:min(92vw, 60vh, 540px); margin:0 auto; touch-action:none;
}
.ws-cell{
  aspect-ratio:1; border:none; border-radius:10px; background:#fffdf7; cursor:pointer;
  font-size:clamp(15px, 3.6vw, 26px); font-weight:700; color:#2b1a3d; font-family:inherit;
  display:grid; place-items:center; box-shadow:0 2px 0 rgba(0,0,0,.12);
}
.ws-cell.sel{ background:var(--gold, #ffd166); transform:scale(.95) }
.ws-cell.found{ background:var(--leaf, #5fc77a); color:#fff; box-shadow:none }
.ws-cell.bad{ background:#ff8c8c; color:#fff }
.ws-cell.hintcell{ animation:wsHint .5s ease-in-out 3 }
@keyframes wsHint{ 50%{ background:var(--gold,#ffd166); transform:scale(1.12) } }
.ws-hint{ max-width:280px; margin:16px auto 0 }

/* ================= I Spy ================= */
.ispy-bar{
  display:flex; align-items:center; gap:12px; justify-content:center;
  background:rgba(255,255,255,.93); border-radius:18px; padding:9px 16px; margin:0 auto 10px;
  width:fit-content; max-width:94vw; box-shadow:0 4px 0 rgba(0,0,0,.14);
}
.ispy-pic .emoji, .ispy-pic .pic-img{ font-size:40px; width:46px; height:46px; object-fit:contain; display:block }
.ispy-word{ font-size:clamp(18px, 4vw, 26px); font-weight:700 }
.ispy-scene{
  position:relative; width:min(96vw, 940px); margin:0 auto;
  aspect-ratio:4/3; border-radius:22px; overflow:hidden;
  background:#2a1740 center/cover; box-shadow:0 8px 0 rgba(0,0,0,.2);
}
.ispy-thing{
  position:absolute; transform:translate(-50%,-50%) rotate(var(--spin,0deg));
  width:var(--px,80px); height:var(--px,80px); border:none; background:none; cursor:pointer;
  display:grid; place-items:center; padding:0;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.45));
}
.ispy-thing .emoji{ font-size:calc(var(--px,80px) * .9); line-height:1 }
.ispy-thing .pic-img{ width:100%; height:100%; object-fit:contain; border-radius:12px }
.ispy-thing:active{ transform:translate(-50%,-50%) rotate(var(--spin,0deg)) scale(.9) }
.ispy-thing.got{ animation:ispyGot .5s forwards }
@keyframes ispyGot{ to{ transform:translate(-50%,-50%) scale(1.5); opacity:0 } }
.ispy-thing.bad{ animation:ispyBad .4s }
@keyframes ispyBad{ 25%{ transform:translate(-50%,-50%) rotate(-14deg) } 75%{ transform:translate(-50%,-50%) rotate(14deg) } }
.ispy-thing.wiggle{ animation:ispyWig 1s ease-in-out infinite }
@keyframes ispyWig{ 0%,100%{ transform:translate(-50%,-50%) rotate(var(--spin,0deg)) scale(1) } 50%{ transform:translate(-50%,-50%) rotate(var(--spin,0deg)) scale(1.14) } }

@media (prefers-reduced-motion: reduce){
  .ws-cell.hintcell, .ispy-thing.wiggle, .ispy-thing.bad{ animation:none }
  .ispy-thing.wiggle{ outline:4px solid var(--gold,#ffd166); border-radius:50% }
}

/* ================= Sound Match (picture / word / sound) ================= */
.trio-bar{
  display:flex; align-items:center; gap:14px; justify-content:center; flex-wrap:wrap;
  background:rgba(255,255,255,.93); border-radius:18px; padding:9px 18px; margin:0 auto 14px;
  width:fit-content; max-width:94vw; box-shadow:0 4px 0 rgba(0,0,0,.14);
}
.trio-goal{ font-size:clamp(16px, 3.4vw, 22px); font-weight:700 }
.trio-board{
  display:grid; grid-template-columns:repeat(var(--cols,3), 1fr);
  gap:clamp(8px, 2vw, 16px); width:min(94vw, 720px); margin:0 auto;
}
.trio-card{
  aspect-ratio:1; border:5px solid #fff; border-radius:22px; background:#fffdf7; cursor:pointer;
  box-shadow:0 5px 0 rgba(0,0,0,.16); display:grid; place-items:center; padding:8px;
  font-family:inherit; color:#2b1a3d; transition:transform .12s;
}
.trio-card:active{ transform:translateY(3px) }
.trio-card.on{ border-color:var(--gold,#ffd166); transform:translateY(-4px) scale(1.03) }
.trio-card.matched{ background:var(--leaf,#5fc77a); border-color:var(--leaf,#5fc77a); opacity:.65 }
.trio-card.bad{ animation:trioBad .45s }
@keyframes trioBad{ 25%{ transform:translateX(-9px) } 75%{ transform:translateX(9px) } }
.trio-card.wiggle{ animation:trioWig .6s ease-in-out 3 }
@keyframes trioWig{ 50%{ transform:scale(1.09); border-color:var(--gold,#ffd166) } }
.trio-face{ display:grid; place-items:center; width:100%; height:100% }
.trio-face.pic .emoji{ font-size:clamp(38px, 11vw, 74px); line-height:1 }
.trio-face.pic .pic-img{ width:100%; height:100%; object-fit:contain }
.trio-face.word{ font-size:clamp(20px, 5.4vw, 40px); font-weight:700; word-break:break-word; text-align:center }
.trio-face.sound .emoji{ font-size:clamp(34px, 9vw, 60px); line-height:1 }
.trio-face.sound .hint{ display:block; font-size:13px; opacity:.6; margin-top:4px; font-weight:700 }
.trio-card.f-sound{ background:linear-gradient(#eef6ff,#dfeaff) }
.trio-card.f-word{ background:linear-gradient(#fff6e8,#ffeccf) }
@media (prefers-reduced-motion: reduce){
  .trio-card.bad, .trio-card.wiggle{ animation:none }
  .trio-card.wiggle{ outline:5px solid var(--gold,#ffd166) }
}

/* ---- layout v2 (2026-10-13): all game doors on the Doors wall, in four big group tabs ---- */
.door-panel { position: relative; z-index: 4; /* above stickers: a door is always tappable */ margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.door-panel .game-doors { margin-top: 0; padding-top: 4px; min-height: clamp(150px, 20vw, 210px); align-items: flex-start; }
.door-groups { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 84px; }
.door-group-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 20px 8px 14px; border-radius: 999px;
  font-size: clamp(18px, 2.1vw, 23px); font-weight: 700; color: #2a1740; background: rgba(255,247,235,.82); box-shadow: 0 5px 0 rgba(42,23,64,.2); transition: transform .12s; }
.door-group-tab .emoji { font-size: 1.45em; }
.door-group-tab .gc { min-width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-size: 15px; background: rgba(42,23,64,.12); }
.door-group-tab:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(42,23,64,.2); }
.door-group-tab.on { color: #fff; transform: translateY(-3px) scale(1.04); box-shadow: 0 6px 0 rgba(42,23,64,.28), 0 0 0 4px #fff; }
.door-group-tab.on .gc { background: rgba(255,255,255,.3); }
.door-group-tab.g-games.on { background: #f29e1f; }
.door-group-tab.g-words.on { background: #ff5c9a; }
.door-group-tab.g-make.on { background: #9a6bff; }
.door-group-tab.g-science.on { background: #22a05a; }
.door-panel .game-doors.many { gap: 14px; padding-inline: 70px; }
.door-panel .game-doors.many .game-door { width: clamp(120px, 12.6vw, 176px); padding: 8px; }
.door-panel .game-doors.many .game-door .pic { height: clamp(84px, 9.4vw, 124px); }
.door-panel .game-doors.many .game-door .gt { font-size: clamp(16px, 1.8vw, 21px); }
.game-door.maker .pic .emoji { right: auto; left: 50%; bottom: 50%; transform: translate(-50%, 50%); font-size: 64px; }
@media (max-width: 760px) {
  .door-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; width: 100%; }
  .door-group-tab { min-height: 54px; padding: 6px 10px; font-size: 16px; justify-content: center; }
  .door-group-tab .gc { display: none; }
  .door-panel .game-doors, .door-panel .game-doors.many { padding-inline: 10px; gap: 8px; }
  .door-panel .game-door, .door-panel .game-doors.many .game-door { width: calc(33.3% - 6px); max-width: 160px; padding: 6px; border-radius: 20px; }
  .door-panel .game-door .pic, .door-panel .game-doors.many .game-door .pic { height: 78px; border-radius: 14px; }
  .door-panel .game-door .pic .emoji { font-size: 30px; }
  .door-panel .game-door .gt, .door-panel .game-doors.many .game-door .gt { font-size: 15px; }
  .door-panel .game-door .lv { font-size: 12px; padding: 1px 7px; }
  .room .wall-arrow { display: none; } /* the wall dots do the turning on a phone, so the arrows don't sit on the doors */
}

/* ---------------------------------------------------------------- HUD shell wiring (WO-2026-10-14-CCOPUS-MAGIC-DOOR-HUD-SHELL-WIRING-001)
   Two walls (Doors, My Gallery), one turn-around button, the Gallery panel, icon-only Parent lock and door-group
   tabs, and the home poster without the overlaid banner. The HUD itself is styled by css/hud.css. */
.home h1.sr-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lock.icon-only { width: 64px; height: 64px; min-height: 64px; padding: 0; justify-content: center; }
.lock.icon-only .badge-dot { position: absolute; top: -4px; right: -4px; }
/* turn around: lives in the room body's right-edge band (stickers.js CONTROLS 'arrow-right' keeps stickers out) */
.room-body > .turn-around { width: 88px; height: auto; min-height: 104px; padding: 8px 4px; gap: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; right: 10px; }
.turn-around .ta-label { font-size: 15px; font-weight: 700; line-height: 1.1; color: var(--ink); text-align: center; }
.room-body > .turn-around .dot-egg { top: -12px; right: -8px; font-size: 26px; }
/* My Gallery: framed pictures (newest first, paged) beside the storybook shelf, below the sticker line like the doors */
.gallery-panel { position: relative; z-index: 4; margin-top: auto; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 12px 26px; padding: 0 104px max(14px, env(safe-area-inset-bottom)); }
.gallery-frames { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.6vw, 20px); flex-wrap: wrap; }
.frame { --fw: clamp(96px, min(13vw, 20vh), 180px); width: var(--fw); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px; border-radius: 12px; background: #fff7eb; border: 6px solid #d9a441; box-shadow: 0 6px 0 rgba(42,23,64,.25), inset 0 0 0 2px #f6dc9b; }
.frame img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }
.frame .fn { max-width: 100%; font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame.empty { border-style: dashed; background: rgba(255,247,235,.75); }
.frame.empty .emoji { display: grid; place-items: center; width: 100%; aspect-ratio: 1; font-size: 44px; }
.frame:active { transform: translateY(3px); }
.frame-page { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,247,235,.94); box-shadow: var(--shadow-sm); font-size: 28px; flex: none; }
.frame-n { flex-basis: 100%; text-align: center; color: var(--cream); font-weight: 700; font-size: 16px; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.gallery-panel .bookshelf { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin: 0; padding: 6px 4px 10px; gap: 12px; }
.gallery-panel .book { width: 124px; flex: none; padding: 8px; }
.gallery-panel .book .cover { height: 84px; }
.mascot-art { display: grid; margin: 0 auto; animation: wobble 2.4s ease-in-out infinite; }
/* tablet and smaller: door-group tabs go icon-only with the count as a badge, so they never wrap */
@media (max-width: 1100px) {
  .door-groups { flex-wrap: nowrap; }
  .door-group-tab { min-width: 76px; min-height: 64px; padding: 8px 18px; justify-content: center; }
  .door-group-tab .gn { display: none; }
  .door-group-tab .gc { display: grid; position: absolute; top: -8px; right: -8px; background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(42,23,64,.25); }
}
@media (max-width: 760px) {
  .door-groups { display: flex; grid-template-columns: none; justify-content: center; }
  .door-group-tab { flex: 1 1 0; min-width: 64px; max-width: 96px; }
  .room .room-body > .turn-around { display: flex; top: 30%; width: 72px; min-height: 88px; right: 6px; }
  .turn-around .ta-label { font-size: 13px; }
  .gallery-panel { padding-inline: 12px; gap: 8px; }
  .frame { --fw: clamp(88px, 27vw, 120px); padding: 5px; border-width: 5px; }
  .frame .fn { font-size: 14px; }
}
/* the room's own buttons always sit above the stickers, so a sticker can never cover one */
.room-body > .room-actions, .room-body > .waiting-gifts, .room-body > .egg { z-index: 5; }
/* the HUD's fold tab hangs 30px below the strip: keep the room's top buttons clear of it */
.room-body > .room-actions { padding-top: 34px; }
/* the HUD sits above anything a game layers inside its stage (game modals use z 6-7) */
.screen > .md-hud { z-index: 20; }
/* in a game, the folded HUD is a slim band with the star pill at its right, so the pill never covers the game's own
   corner buttons (Ant Colony's stats, Nest Defense's wave chip ...); in the room it floats as before */
.screen.game > .md-hud.collapsed { height: 76px; }
.screen.game > .md-hud.collapsed .md-hud-pill { position: absolute; top: 6px; right: 14px; }
.screen.game > .md-hud.collapsed .md-hud-home { position: absolute; top: 6px; left: 14px; }
/* art icons are sized here too, so a painted icon can never render at its full file size before hud.css loads */
.md-art-icon { display: inline-grid; place-items: center; width: var(--art-size, 40px); height: var(--art-size, 40px); flex: none; }
.md-art-icon .md-art-img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* a game taller than its stage starts under the HUD and scrolls, instead of centring up underneath the bar */
.screen.game > .game-stage { justify-content: safe center; overflow-y: auto; }
/* phone: the HUD compass turns the room (as the wall dots did), so the turn-around button only shows when the bar is
   folded; the room's action buttons shrink so three fit; frame arrows and the page count sit under the frames */
@media (max-width: 760px) {
  .room .room-body > .turn-around { display: none; }
  .room > .md-hud.collapsed ~ .room-body > .turn-around { display: flex; }
  .room-body > .room-actions { gap: 8px; padding-inline: 8px; }
  .room-body > .room-actions .big-btn { font-size: 17px; padding: 8px 12px; min-height: 64px; gap: 6px; line-height: 1.1; }
  .room-body > .room-actions .big-btn .emoji { font-size: 22px; }
  .gallery-frames { width: 100%; gap: 8px; }
  .gallery-frames > .frame { --fw: calc((100% - 16px) / 3); }
  .gallery-frames > .frame-page { order: 2; }
  .gallery-frames > .frame-n { order: 3; flex-basis: auto; padding: 0 12px; }
  .gallery-frames > button.frame-page:last-of-type { order: 4; }
}

/* ---- Home: four big cards (her room, her room, Team Arcade, Story Board) + Play modes extras
   (WO-2026-10-14-CCOPUS-MAGIC-DOOR-MODES-SHELL-001). Row 1 holds the cards (equal height), row 2 the chips. */
.home-cards { display: grid; grid-template-columns: repeat(4, auto); column-gap: clamp(14px, 3vw, 40px); row-gap: 10px; justify-content: center; align-items: stretch; }
.home-cards > .kid-slot { display: grid; grid-row: span 2; grid-template-rows: subgrid; justify-items: center; gap: 10px; }
.home-cards .kid-door { width: clamp(150px, 19vw, 240px); }
.home-cards .md-mode-card { width: clamp(150px, 19vw, 240px); height: 100%; aspect-ratio: auto; min-height: 0; border-radius: 130px 130px 30px 30px; }
.home-cards .md-mode-card.has-art { background-position: center 30%; }
.home-cards .md-mode-card .md-mode-t { font-size: clamp(24px, 3vw, 34px); line-height: 1.05; text-align: center; }
.home-cards .md-mode-card .md-mode-s { font-size: clamp(15px, 1.6vw, 18px); text-align: center; }
.home-cards .md-mode-card:hover { transform: translateY(-6px) rotate(1deg); }
.home-cards .md-mode-card:active { transform: scale(.96); }
.home-cards .md-mode-card { transition: transform .2s; }
.home-cards .md-mode-card { position: relative; overflow: hidden; }
.home-cards .md-mode-card.has-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(42,23,64,.72)); pointer-events: none; }
.home-cards .md-mode-card > span { position: relative; }
.resume-chip { background: #7bd88f; color: #17361f; }
@media (max-width: 640px) {
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 8px; width: 100%; }
  .home-cards .kid-door, .home-cards .md-mode-card { width: 100%; }
  .home-cards .kid-door { padding: 10px 10px 12px; }
  .home-cards .kid-door .home-portrait { width: 104px; height: 158px; }
  .home-cards .kid-door .doll svg { max-height: 158px; }
  .home-cards .mode-slot .md-mode-card { height: 190px; border-radius: 26px; padding: 10px; }
  .home .who { gap: 8px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* Scene Studio honest labels (MOVIES-REAL amendment): being filmed is status, not an error */
.qcard .flag.good { color: #1f6b3a; }
.movie-chip .badge.filming { animation: mdFilm 1.4s ease-in-out infinite alternate; }
@keyframes mdFilm { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .movie-chip .badge.filming { animation: none; } }
