@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/Baloo2-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/Baloo2-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --plum: #3B2459;
  --plum-soft: #6E5590;
  --paper: #FFFDF9;
  --rose: #FF7BB0;
  --rose-deep: #E2588F;
  --lilac: #B79BFF;
  --lilac-deep: #8A6BE0;
  --mint: #7FE0C3;
  --mint-deep: #3FBF9B;
  --gold: #FFD95A;
  --gold-deep: #F0B400;
  --coral: #FF8A80;
  --sky: #EDE4FF;
  --rim: 6px;
  --font: "Baloo 2", ui-rounded, "Arial Rounded MT Bold", "Comic Sans MS", system-ui, sans-serif;
  --script: "Chalkboard SE", "Comic Sans MS", "Baloo 2", sans-serif;
  --sticker-shadow: 0 0 0 2px rgba(59, 36, 89, .08), 6px 8px 0 var(--drop, #D9CBFF);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--font); font-weight: 600; color: var(--plum);
  background: #FBD7EC;
  user-select: none; -webkit-user-select: none;
}

button { font-family: inherit; font-weight: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 5px solid var(--lilac-deep); outline-offset: 4px; }

.scene { position: fixed; inset: 0; z-index: 0; background: #D9CBFF url('../img/bg.webp') center bottom / cover no-repeat; }

#app { height: 100%; display: flex; flex-direction: column; position: relative; }

.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px 0;
}
.topbar .title {
  flex: 1; text-align: center; font-size: 30px; font-weight: 800; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .title span {
  display: inline-block; background: var(--paper); padding: 10px 28px; border-radius: 999px;
  border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--gold);
  transform: rotate(-1.2deg);
}
.topbar .spacer { width: 60px; }

.icon-btn {
  width: 60px; height: 60px; border-radius: 50%; border: 5px solid #fff;
  background: var(--paper); box-shadow: var(--sticker-shadow); --drop: var(--lilac);
  font-size: 26px; display: grid; place-items: center;
  transition: transform .12s ease;
}
.icon-btn:hover { transform: scale(1.06) rotate(-4deg); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.subtle { opacity: .35; box-shadow: none; border-color: transparent; background: transparent; }

.stage {
  position: relative; z-index: 2;
  flex: 1; min-height: 0; padding: 12px 22px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}

.guide {
  position: relative; z-index: 3;
  display: flex; align-items: flex-end; gap: 0;
  padding: 0 22px 14px; min-height: 160px;
}
.guide .avatar { width: 170px; height: 170px; flex: 0 0 auto; cursor: pointer; margin-bottom: -10px; }
.guide .avatar img.mascot { width: 100%; height: 100%; object-fit: contain; animation: bob 3s ease-in-out infinite; }
.mascot .eyes { transform-origin: 130px 115px; animation: blink 5s infinite; }
.mascot .horn, .mascot .ear, .mascot .mane-back, .mascot .mane-front { transform-origin: 118px 130px; }
.guide .avatar:hover img.mascot { animation: wiggle .6s ease; }
.mascot .sparkle { animation: twinkle 2.4s ease-in-out infinite; transform-origin: center; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes twinkle { 0%, 100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 70% { transform: rotate(5deg); } }

.guide .bubble {
  flex: 1; max-width: 760px; background: var(--paper); border: var(--rim) solid #fff; border-radius: 30px 30px 30px 8px;
  padding: 16px 20px 16px 24px; font-size: 25px; font-weight: 700; line-height: 1.3; min-height: 72px;
  box-shadow: var(--sticker-shadow); --drop: var(--rose);
  position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 22px; margin-left: -6px;
}
.guide .bubble .text { flex: 1; }
.guide .bubble .replay {
  width: 46px; height: 46px; font-size: 20px; box-shadow: none; border: 0; background: var(--sky);
}

.progress { display: flex; gap: 10px; justify-content: center; }
.progress i {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.75); border: 3px solid #fff;
  transition: transform .2s, background .2s;
}
.progress i.ok { background: var(--mint-deep); transform: scale(1.15); }
.progress i.ko { background: var(--coral); }
.progress i.now { background: var(--gold); transform: scale(1.3); }

.grid { display: grid; gap: 22px; width: 100%; max-width: 1040px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

.sticker, .choice, .tile, .bin, .card .face, .btn {
  border: var(--rim) solid #fff;
  box-shadow: var(--sticker-shadow);
}

.tile {
  border-radius: 34px; background: var(--paper); padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 170px; font-size: 22px; font-weight: 800; text-align: center;
  transition: transform .14s ease; position: relative; transform: rotate(var(--tilt, 0deg));
}
.tile:nth-child(4n+1) { --tilt: -1.5deg; --drop: var(--rose); }
.tile:nth-child(4n+2) { --tilt: 1.2deg; --drop: var(--lilac); }
.tile:nth-child(4n+3) { --tilt: -0.8deg; --drop: var(--mint); }
.tile:nth-child(4n+4) { --tilt: 1.6deg; --drop: var(--gold); }
.tile .big { font-size: 66px; line-height: 1.1; }
.tile .label { font-size: 21px; line-height: 1.15; }
.tile .stars { font-size: 20px; color: var(--gold-deep); letter-spacing: 2px; }
.tile:hover { transform: rotate(0deg) translateY(-5px) scale(1.03); }
.tile:active { transform: scale(.96); }
.tile .count { position: absolute; top: 10px; right: 14px; font-size: 15px; color: var(--plum-soft); }

.map { position: absolute; inset: 0; }
.map svg.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; max-width: 1060px; }
.tiles .tile { width: 232px; }
.map .landmark {
  position: absolute; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  width: 150px; border: 0; background: transparent; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .14s ease;
}
.map .landmark:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.08); }
.map .landmark:active { transform: translate(-50%, -50%) scale(.95); }
.map .landmark .badge {
  width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; line-height: 1;
  border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); background: var(--fill, var(--paper));
}
.map .landmark .ribbon {
  background: var(--paper); border: 4px solid #fff; border-radius: 999px; padding: 6px 14px;
  font-size: 17px; font-weight: 800; line-height: 1.1; text-align: center; white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(59,36,89,.08), 3px 4px 0 var(--drop, #D9CBFF); margin-top: -8px;
}
.map .landmark .stars { font-size: 15px; color: var(--plum-soft); font-weight: 700; }
.map .landmark.k-attention { --fill: #FFF1C9; --drop: var(--gold); --tilt: -3deg; }
.map .landmark.k-lecture { --fill: #E9DFFF; --drop: var(--lilac); --tilt: 2deg; }
.map .landmark.k-ecriture { --fill: #D6F5EA; --drop: var(--mint); --tilt: -2deg; }
.map .landmark.k-cuisine { --fill: #FFE1E1; --drop: var(--coral); --tilt: 3deg; }
.map .landmark.k-amis { --fill: #FFDCEC; --drop: var(--rose); --tilt: -2.5deg; }
.map .landmark.k-album { --fill: #fff; --drop: var(--lilac-deep); --tilt: 2.5deg; }
.map .landmark.k-album .badge { font-size: 54px; }

.choice {
  border-radius: 30px; background: var(--paper); font-size: 92px; line-height: 1;
  min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: transform .14s ease, background .2s ease; padding: 14px; transform: rotate(var(--tilt, 0deg));
}
.choice:nth-child(4n+1) { --tilt: -1.6deg; --drop: var(--rose); }
.choice:nth-child(4n+2) { --tilt: 1.3deg; --drop: var(--lilac); }
.choice:nth-child(4n+3) { --tilt: -1deg; --drop: var(--mint); }
.choice:nth-child(4n+4) { --tilt: 1.8deg; --drop: var(--gold); }
.choice .caption { font-size: 22px; font-weight: 800; line-height: 1.1; }
.choice.text-choice { font-size: 42px; font-weight: 800; }
.choice.word { font-size: 54px; letter-spacing: 2px; font-weight: 800; }
.choice.word.script { font-family: var(--script); font-weight: 400; }
.choice:hover { transform: rotate(0deg) translateY(-5px) scale(1.03); }
.choice:active { transform: scale(.95); }
.choice.good { background: #D6F5EA; transform: rotate(0) scale(1.06); --drop: var(--mint-deep); }
.choice.bad { background: #FFE1E1; animation: shake .5s; --drop: var(--coral); }
.choice.dim { opacity: .35; pointer-events: none; }
.choice.reveal { outline: 6px solid var(--mint-deep); outline-offset: 2px; }
.choice:disabled { cursor: default; }

@keyframes shake {
  10%, 90% { transform: translateX(-3px); } 20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}
@keyframes pop {
  0% { transform: scale(.5) rotate(var(--tilt, 0deg)); opacity: 0; }
  70% { transform: scale(1.08) rotate(var(--tilt, 0deg)); opacity: 1; }
  100% { transform: scale(1) rotate(var(--tilt, 0deg)); }
}
.pop { animation: pop .38s cubic-bezier(.2, .9, .3, 1.3) both; }
.grid > .pop:nth-child(2) { animation-delay: .06s; }
.grid > .pop:nth-child(3) { animation-delay: .12s; }
.grid > .pop:nth-child(4) { animation-delay: .18s; }
.grid > .pop:nth-child(5) { animation-delay: .24s; }
.grid > .pop:nth-child(6) { animation-delay: .3s; }

.prompt { font-size: 30px; font-weight: 800; text-align: center; line-height: 1.25; }
.prompt .huge { font-size: 140px; line-height: 1.05; display: block; }
.prompt img.huge { width: 170px; height: 170px; object-fit: contain; margin: 0 auto 6px; }
img.pic { width: 1.2em; height: 1.2em; object-fit: contain; display: block; pointer-events: none; }
.food-item img.pic { width: 58px; height: 58px; }
.drag-ghost img.pic { width: 72px; height: 72px; }
.prompt .word { font-size: 64px; letter-spacing: 3px; }

.btn {
  border-radius: 999px; padding: 16px 38px; font-size: 26px; font-weight: 800; line-height: 1;
  background: var(--rose); color: #fff; --drop: var(--rose-deep);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: translate(4px, 6px); box-shadow: 0 0 0 2px rgba(59,36,89,.08), 1px 2px 0 var(--drop); }
.btn.violet { background: var(--lilac); --drop: var(--lilac-deep); }
.btn.mint { background: var(--mint); color: var(--plum); --drop: var(--mint-deep); }
.btn.ghost { background: var(--paper); color: var(--plum); --drop: #D9CBFF; }
.btn.small { padding: 11px 22px; font-size: 20px; }

.input {
  font-family: inherit; font-size: 34px; font-weight: 800; text-align: center;
  padding: 14px 24px; border-radius: 999px; border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--lilac);
  width: min(460px, 90vw); color: var(--plum); background: var(--paper); outline: 0;
}
.input:focus { --drop: var(--rose); }

.welcome { text-align: center; gap: 22px; }
.welcome h1 { font-size: 58px; margin: 0; line-height: 1.05; font-weight: 800; letter-spacing: -.5px; }
.welcome h1 small { display: block; font-size: 26px; font-weight: 700; color: var(--plum-soft); margin-top: 6px; }
.welcome .hero { width: 240px; height: 240px; }
.welcome .hero img.mascot { width: 100%; height: 100%; object-fit: contain; animation: bob 3s ease-in-out infinite; }

.card {
  width: 100%; aspect-ratio: 1; border: 0; border-radius: 22px; perspective: 800px; background: transparent;
  position: relative; box-shadow: none; transform: rotate(var(--tilt, 0deg));
}
.card:nth-child(3n+1) { --tilt: -1.5deg; } .card:nth-child(3n+2) { --tilt: 1.5deg; } .card:nth-child(5n) { --tilt: -0.6deg; }
.card .face {
  position: absolute; inset: 0; border-radius: 22px; display: grid; place-items: center;
  backface-visibility: hidden; transition: transform .45s; font-size: 54px; font-weight: 800;
}
.card .back { background: linear-gradient(145deg, var(--lilac), var(--rose)); color: #fff; font-size: 44px; --drop: var(--lilac-deep); }
.card .front { background: var(--paper); transform: rotateY(180deg); --drop: var(--gold); }
.card .front.script { font-family: var(--script); font-weight: 400; }
.card.flipped .back { transform: rotateY(180deg); }
.card.flipped .front { transform: rotateY(0); }
.card.found .front { background: #D6F5EA; --drop: var(--mint-deep); }

.vigil-stage {
  width: min(560px, 80vw); height: min(380px, 46vh); border-radius: 40px; background: var(--paper);
  border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--lilac);
  display: grid; place-items: center; cursor: pointer; position: relative;
}
.vigil-stage .item { font-size: 160px; line-height: 1; animation: pop .2s ease-out both; }
.vigil-stage .flash-good { position: absolute; inset: 0; border-radius: 34px; background: rgba(63,191,155,.35); animation: fade .4s both; }
.vigil-stage .flash-bad { position: absolute; inset: 0; border-radius: 34px; background: rgba(255,138,128,.4); animation: fade .4s both; }
@keyframes fade { from { opacity: 1; } to { opacity: 0; } }
.score-line { font-size: 24px; font-weight: 800; color: var(--plum-soft); }

.trace-wrap { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; justify-content: center; }
canvas.trace {
  background: var(--paper); border-radius: 32px; border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--mint);
  cursor: crosshair; touch-action: none; max-width: 100%; max-height: calc(100vh - 330px);
}
.trace-side { display: flex; flex-direction: column; gap: 14px; align-items: center; }

.plate-area { display: flex; gap: 30px; align-items: center; justify-content: center; width: 100%; flex-wrap: wrap; }
.plate {
  width: 330px; height: 330px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #fff 0 70%, #EDE4FF 70% 100%);
  border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--lilac);
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; padding: 40px;
  transition: transform .15s;
}
.plate.over { transform: scale(1.05); --drop: var(--mint-deep); }
.plate.full { --drop: var(--coral); }
.plate .food { font-size: 56px; line-height: 1; cursor: pointer; transition: transform .12s; }
.plate .food:hover { transform: scale(1.12) rotate(-6deg); }
.plate .food img.pic { width: 66px; height: 66px; }
.hint img.mini { width: 34px; height: 34px; display: inline-block; vertical-align: middle; margin: 0 2px; }
.pantry { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 440px; }
.food-item {
  border: 4px solid #fff; border-radius: 20px; background: var(--paper); box-shadow: var(--sticker-shadow); --drop: #D9CBFF;
  font-size: 44px; line-height: 1; padding: 6px; cursor: grab;
}
.food-item:nth-child(3n) { --drop: var(--mint); } .food-item:nth-child(3n+1) { --drop: var(--rose); } .food-item:nth-child(3n+2) { --drop: var(--gold); }
.food-item:active { cursor: grabbing; }
.drag-ghost { position: fixed; pointer-events: none; font-size: 64px; z-index: 50; transform: translate(-50%, -50%); }

.bins { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; width: 100%; max-width: 900px; }
.bin {
  border-radius: 34px; background: var(--paper); min-height: 168px; font-size: 26px; font-weight: 800;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: transform .14s; transform: rotate(var(--tilt, 0deg));
}
.bin:first-child { --tilt: -1.5deg; --drop: var(--mint); } .bin:last-child { --tilt: 1.5deg; --drop: var(--coral); }
.bin .big { font-size: 64px; }
.bin:hover { transform: rotate(0) translateY(-5px); }
.bin.good { background: #D6F5EA; }
.bin.bad { background: #FFE1E1; animation: shake .5s; }

.scene-card { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 1040px; }
.scene-card .picture { font-size: 100px; line-height: 1; letter-spacing: 10px; }
.scene-card .situation { font-size: 26px; font-weight: 800; text-align: center; line-height: 1.3; max-width: 900px; }
.scene-card .options { width: 100%; }
.scene-card .options .choice { font-size: 48px; min-height: 130px; padding: 12px 14px; }
.scene-card .options .choice .caption { font-size: 19px; }
.scene-card .options .choice img.pic { width: 74px; height: 74px; }
.scene-card .picture { line-height: 1; }

.story { font-size: 29px; font-weight: 700; text-align: center; line-height: 1.4; max-width: 880px; }
.story span.story-pic { font-size: 68px; letter-spacing: 12px; display: block; margin-bottom: 8px; }
.story img.story-pic { width: 200px; height: 200px; display: block; margin: 0 auto 8px; }
.picture img.scene-pic { width: 150px; height: 150px; display: block; }
.vigil-stage .item img.pic { width: 210px; height: 210px; }
.map .landmark .badge img.pic { width: 84px; height: 84px; }
.tile .big img.pic { width: 78px; height: 78px; }
.end-screen .sticker img.pic { width: 100px; height: 100px; }

.end-screen { text-align: center; gap: 16px; }
.end-screen .stars { font-size: 84px; letter-spacing: 8px; }
.end-screen .stars i { font-style: normal; display: inline-block; animation: pop .5s both; }
.end-screen .stars i.off { opacity: .25; filter: grayscale(1); }
.end-screen h2 { font-size: 40px; margin: 0; font-weight: 800; }
.end-screen .sticker {
  font-size: 84px; line-height: 1; width: 150px; height: 150px; border-radius: 50%; background: var(--paper);
  border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--gold); display: grid; place-items: center;
  animation: pop .6s both; --tilt: -4deg; margin: 0 auto;
}
.end-screen .actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.album {
  width: min(900px, 95vw); background: var(--paper); border-radius: 36px; border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--lilac);
  padding: 26px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px;
  background-image: radial-gradient(#EDE4FF 1.5px, transparent 1.5px); background-size: 22px 22px;
}
.album .slot { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 50px; transform: rotate(var(--tilt, 0deg)); }
.album .slot.have { background: #fff; border: 4px solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--rose); }
.album .slot:nth-child(3n) { --tilt: 4deg; --drop: var(--mint); } .album .slot:nth-child(3n+1) { --tilt: -3deg; } .album .slot:nth-child(5n) { --drop: var(--gold); }
.album .slot.empty { border: 3px dashed #D9CBFF; font-size: 22px; color: #C9B8FF; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 14px; height: 20px; border-radius: 4px; animation: confall linear both; }
@keyframes confall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: .8; } }

.parent {
  width: min(900px, 95vw); max-height: 100%; overflow: auto; background: var(--paper); border-radius: 30px;
  border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); padding: 26px; font-size: 18px; font-weight: 500; user-select: text;
}
.parent h2 { margin: 0 0 12px; font-weight: 800; }
.parent table { width: 100%; border-collapse: collapse; }
.parent th, .parent td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #EDE4FF; }
.parent td.num { text-align: center; }
.parent .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.parent input[type=text] { font: inherit; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--lilac); }
.parent select { font: inherit; padding: 6px 10px; border-radius: 10px; }
.parent label { display: inline-flex; align-items: center; gap: 6px; }
.parent .danger { background: #FFE1E1; color: #a33; --drop: var(--coral); }
.parent .muted { color: var(--plum-soft); font-size: 15px; }

.hint { font-size: 20px; color: var(--plum-soft); font-weight: 700; text-align: center; }
.hidden { display: none !important; }

@media (max-height: 720px) {
  .guide { min-height: 120px; }
  .guide .avatar { width: 130px; height: 130px; }
  .guide .bubble { font-size: 21px; padding: 12px 16px 12px 20px; min-height: 60px; margin-bottom: 14px; }
  .prompt .huge { font-size: 110px; }
  .choice { min-height: 140px; font-size: 76px; }
}
@media (max-width: 900px) {
  .map .landmark { width: 110px; }
  .map .landmark .badge { width: 86px; height: 86px; font-size: 44px; }
  .map .landmark .ribbon { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.timer { width: min(520px, 80vw); height: 18px; border-radius: 999px; background: rgba(255,255,255,.7); border: 3px solid #fff; overflow: hidden; opacity: 0; transition: opacity .3s; }
.timer.run { opacity: 1; }
.timer i { display: block; height: 100%; width: 100%; background: var(--gold); border-radius: 999px; transition: width linear; }

.curtain-box { position: relative; width: 100%; max-width: 1040px; }
.curtain { position: absolute; inset: -12px; display: flex; pointer-events: none; }
.curtain i {
  flex: 1; background: repeating-linear-gradient(90deg, var(--rose) 0 28px, var(--rose-deep) 28px 40px);
  border: var(--rim) solid #fff; border-radius: 26px; transform: scaleX(0); transition: transform .55s cubic-bezier(.6, 0, .4, 1);
}
.curtain i:first-child { transform-origin: left; }
.curtain i:last-child { transform-origin: right; }
.curtain.closed i { transform: scaleX(1); }

.simon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; width: min(440px, 62vh); }
.simon .pad {
  aspect-ratio: 1; border-radius: 40px; background: var(--paper); border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow);
  display: grid; place-items: center; opacity: .7; transition: transform .12s, opacity .12s, background .12s;
}
.simon .pad img.pic { width: 70%; height: 70%; }
.simon .pad:nth-child(1) { --drop: var(--rose); } .simon .pad:nth-child(2) { --drop: var(--lilac); }
.simon .pad:nth-child(3) { --drop: var(--gold); } .simon .pad:nth-child(4) { --drop: var(--mint); }
.simon .pad.lit { opacity: 1; transform: scale(1.1); background: #FFF1C9; }
.simon .pad.bad { background: #FFE1E1; animation: shake .5s; }
.simon.showing .pad { cursor: wait; }

canvas.maze {
  background: var(--paper); border-radius: 30px; border: var(--rim) solid #fff; box-shadow: var(--sticker-shadow); --drop: var(--lilac);
  touch-action: none; max-height: calc(100vh - 340px); max-width: 100%; cursor: grab;
}
canvas.maze.bump { animation: shake .3s; --drop: var(--coral); }

.word-model { display: flex; gap: 8px; justify-content: center; font-size: 46px; font-weight: 800; letter-spacing: 2px; transition: opacity .4s; }
.word-model.faded { opacity: 0; }
.slots { display: flex; gap: 12px; justify-content: center; }
.slots .slot {
  width: 86px; height: 96px; border-radius: 22px; border: 4px dashed #D9CBFF; background: rgba(255,255,255,.6);
  display: grid; place-items: center; font-size: 56px; font-weight: 800;
}
.slots .slot.filled { border-style: solid; border-color: #fff; background: #D6F5EA; box-shadow: var(--sticker-shadow); --drop: var(--mint-deep); animation: pop .3s both; }

.drum { border: 0; background: transparent; padding: 0; transition: transform .1s; }
.drum img.pic { width: 180px; height: 180px; }
.drum.hit { transform: scale(.9); }
.drum.good img.pic { filter: drop-shadow(0 0 16px var(--mint-deep)); }
.claps { display: flex; gap: 8px; min-height: 60px; font-size: 48px; }

.posbox { display: flex; gap: 8px; }
.posbox i { width: 38px; height: 38px; border-radius: 10px; background: #EDE4FF; border: 3px solid #fff; }
.posbox i.on { background: var(--rose); }
.choice.text-choice .caption { font-size: 24px; }
.choice.sentence { font-size: 32px; line-height: 1.2; min-height: 120px; }

.story-strip { display: flex; gap: 18px; justify-content: center; }
.story-strip .slot { width: 160px; height: 160px; border-radius: 28px; border: 4px dashed #D9CBFF; display: grid; place-items: center; font-size: 56px; font-weight: 800; color: #C9B8FF; }
.story-strip .slot .choice { width: 100%; height: 100%; min-height: 0; padding: 10px; }
.story-strip .slot img.pic, .grid .choice img.pic { width: 130px; height: 130px; }
.choice img.pic.big { width: 220px; height: 220px; }

.bins.cols-3 { grid-template-columns: repeat(3, 1fr); max-width: 1040px; }
.bin:nth-child(2):not(:last-child) { --tilt: 0.8deg; --drop: var(--gold); }
.bin .big img.pic { width: 74px; height: 74px; }

.tiles.many { max-width: 1120px; gap: 18px; }
.tiles.many .tile { width: 200px; min-height: 140px; padding: 14px 10px; gap: 4px; }
.tiles.many .tile .big img.pic { width: 62px; height: 62px; }
.tiles.many .tile .big { font-size: 52px; }
.tiles.many .tile .label { font-size: 18px; }
