/* Strawberry Springs — bold, soft, rounded. Built for iPad (touch, both orientations). */
@font-face { font-family: 'Andika'; src: url('../fonts/Andika-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Andika'; src: url('../fonts/Andika-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --pink: #FF8FAB; --pink-l: #FFD6E0; --pink-xl: #FFF0F4; --red: #FF4D6D; --berry: #E63956;
  --mint: #B8F2E6; --mint-d: #3DDC97; --sky: #A0E7FF; --lilac: #CDB4DB; --lilac-d: #7B5CD6;
  --sun: #FFD166; --cream: #FFF8EE; --ink: #4A2E3A; --leaf: #6BCB77; --brown: #B9825A;
  --r: 26px; --shadow: 0 6px 0 rgba(74, 46, 58, .14); --tap: 96px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--pink-xl); color: var(--ink);
  font-family: 'Andika', 'Avenir Next Rounded', 'Arial Rounded MT Bold', system-ui, sans-serif; font-weight: 700;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; overscroll-behavior: none; }
html.booting #app { opacity: 0; }
#app { position: fixed; inset: 0; transition: opacity .4s; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .4; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(10px + var(--safe-t)) 14px calc(10px + var(--safe-b)); overflow: hidden; }
.screen-loading { align-items: center; justify-content: center; font-size: 80px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 72px; flex: none; }
.title { display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 3.2vw, 34px); color: var(--berry); }
.t-icon { font-size: 44px; }
.btn-round { width: 68px; height: 68px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 34px; display: grid; place-items: center; flex: none; }
.btn-round.small { width: 52px; height: 52px; font-size: 26px; }
.btn-round:active, .choice:active, .place:active, .tool:active, .btn-big:active { transform: translateY(3px) scale(.97); box-shadow: 0 2px 0 rgba(74, 46, 58, .14); }
.wallet { display: flex; gap: 8px; background: #fff; border-radius: 40px; padding: 8px 16px; box-shadow: var(--shadow); font-size: 26px; white-space: nowrap; }
.wallet b { color: var(--berry); margin-right: 6px; }
.btn-big { min-width: 120px; min-height: 96px; padding: 10px 28px; border-radius: 40px; background: var(--red); color: #fff; font-size: 48px; box-shadow: 0 8px 0 var(--berry); }
.gear { width: 60px; height: 60px; border-radius: 50%; font-size: 30px; opacity: .55; position: relative; background: rgba(255,255,255,.6); }
.gear.holding { opacity: 1; background: conic-gradient(var(--lilac-d) calc(var(--hold, 0) * 360deg), #fff 0); }

/* ---------- start ---------- */
.start { align-items: center; justify-content: center; gap: 2vh; background: linear-gradient(#BDE0FE, #FFD6E0 60%, #FFC8DD); }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .95; text-shadow: 0 5px 0 #fff, 0 9px 0 rgba(230, 57, 86, .25); }
.logo-1 { font-size: clamp(54px, 10vw, 110px); color: var(--red); }
.logo-2 { font-size: clamp(44px, 8vw, 88px); color: var(--lilac-d); }
.start-art { display: flex; align-items: flex-end; gap: 10px; }
.start-art .mochi { animation: float 3s ease-in-out infinite; }
.start-art .momo { animation: float 3s ease-in-out infinite .6s; }
.start-btn { font-size: 64px; min-width: 200px; animation: pulse 1.6s ease-in-out infinite; }

/* ---------- home ---------- */
.home { background: linear-gradient(#BDE0FE 0%, #DFF6FF 38%, #B8F2C4 38%, #8EDB9E 100%); }
.home-title { font-size: clamp(22px, 3vw, 34px); background: rgba(255,255,255,.7); padding: 6px 18px; border-radius: 30px; }
.scenery { position: absolute; inset: 0; pointer-events: none; font-size: 60px; }
.scenery span { position: absolute; }
.cloud { opacity: .9; animation: drift 14s ease-in-out infinite alternate; } .c1 { left: 18%; top: 14%; font-size: 90px; } .c2 { right: 22%; top: 22%; font-size: 70px; animation-delay: -5s; }
.sun { right: 6%; top: 11%; font-size: 80px; }
.bush { font-size: 44px; } .b1 { left: 5%; top: 44%; } .b2 { left: 12%; top: 64%; } .b3 { right: 9%; top: 48%; } .b4 { right: 4%; top: 66%; } .b5 { left: 46%; top: 72%; }
@keyframes drift { to { transform: translateX(60px); } }
.topbar, .home-main, .places { position: relative; z-index: 1; }
.home-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4vw; min-height: 0; flex-wrap: wrap; }
.hero { position: relative; }
.hero-mochi .mochi { width: clamp(170px, 26vw, 260px); height: auto; filter: drop-shadow(0 8px 0 rgba(0,0,0,.08)); }
.bubble { position: absolute; top: 0; right: -20px; background: #fff; border-radius: 50%; width: 76px; height: 76px; display: grid; place-items: center; font-size: 42px; box-shadow: var(--shadow); animation: float 2s ease-in-out infinite; }
.learn-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: clamp(220px, 30vw, 320px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE08A, var(--sun) 40%, #FFB703); box-shadow: 0 12px 0 #E09A00, 0 0 0 10px rgba(255,255,255,.6); animation: pulse 2s ease-in-out infinite; }
.lb-star { font-size: clamp(70px, 9vw, 110px); line-height: 1; }
.lb-text { font-size: clamp(30px, 4vw, 44px); color: #7A3E00; }
.lb-sub { font-size: 28px; }
.places { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; flex: none; padding-top: 10px; }
.place { position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; min-height: 120px; justify-content: center; }
.p-icon { font-size: clamp(46px, 6vw, 64px); line-height: 1.1; }
.p-label { font-size: clamp(18px, 2.4vw, 24px); }
.place-cottage { background: #FFE5EC; } .place-garden { background: #E3F9E5; } .place-shop { background: #FFF3C4; } .place-spring { background: #DDF4FF; } .place-friends { background: #EFE3FF; }
.badge { position: absolute; top: -8px; right: -6px; background: var(--red); color: #fff; min-width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; font-size: 22px; padding: 0 8px; box-shadow: var(--shadow); }
@media (orientation: portrait) {
  .places { grid-template-columns: repeat(3, 1fr); }
  .home-main { flex-direction: column; gap: 3vh; }
}

/* ---------- lesson ---------- */
.lesson { background: linear-gradient(#FFF0F4, #FFE5EC); }
.l-progress { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--pink-l); }
.dot.now { box-shadow: inset 0 0 0 4px var(--pink); transform: scale(1.2); }
.dot.gold::after, .dot.done::after { content: '🍓'; font-size: 20px; display: grid; place-items: center; height: 100%; }
.dot.tried { background: var(--pink-l); }
.q-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; }
.q-head { display: flex; align-items: center; gap: 14px; }
.q-label { font-size: clamp(30px, 4.4vw, 48px); color: var(--lilac-d); text-align: center; }
.q-label:empty { display: none; }
.q-visual, .q-hintvis { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.q-hintvis { display: none; } .q-hintvis.show { display: flex; animation: pop .35s; }
.q-text { font-size: clamp(56px, 9vw, 104px); letter-spacing: 2px; color: var(--ink); background: #fff; border-radius: var(--r); padding: 2px 34px; box-shadow: var(--shadow); white-space: nowrap; }
.q-text .qbox { display: inline-block; min-width: 1em; border: 5px dashed var(--pink); border-radius: 18px; color: var(--pink); line-height: 1.05; }
.d-t { color: #3A86FF; } .d-o { color: var(--red); }
.choices { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; flex: none; padding: 10px 0; }
.choice { min-width: 130px; min-height: 120px; padding: 10px 18px; border-radius: var(--r); background: #fff; box-shadow: 0 8px 0 var(--pink-l); font-size: clamp(54px, 7vw, 76px); display: grid; place-items: center; transition: transform .15s; }
.kind-pic .choice { min-width: 160px; min-height: 160px; padding: 12px; }
.kind-pic .choice svg { width: clamp(130px, 16vw, 190px); height: auto; }
.kind-wide .choice { min-width: min(46%, 440px); min-height: 150px; padding: 14px; }
.kind-sign .choice { min-width: 140px; font-size: 84px; }
.kind-yesno .choice { min-width: 200px; font-size: 64px; display: flex; flex-direction: column; }
.kind-yesno small { font-size: 28px; }
.kind-emoji .choice { font-size: 80px; }
.choice.right { background: #D8F8E1; box-shadow: 0 8px 0 var(--mint-d); animation: bounce .6s; }
.choice.wrong { opacity: .45; animation: shake .45s; }
.choice.glow { box-shadow: 0 0 0 8px var(--sun), 0 8px 0 #E09A00; animation: pulse 1.2s ease-in-out infinite; }
.l-foot { display: flex; align-items: flex-end; justify-content: space-between; flex: none; height: 96px; }
.btn-round.hint { background: #FFF6CC; }
.l-mochi { width: 110px; margin-bottom: -10px; }
.story-nums { display: flex; gap: 40px; font-size: clamp(48px, 7vw, 80px); }
.story-nums span { background: #fff; border-radius: var(--r); padding: 6px 26px; box-shadow: var(--shadow); }

/* pictures */
.item { display: inline-grid; place-items: center; transition: transform .2s, filter .2s; }
.item.lit { transform: scale(1.35); filter: drop-shadow(0 0 6px #FFD166) drop-shadow(0 0 2px #fff); }
.item.gone { opacity: .25; filter: grayscale(1); position: relative; }
.item.gone::after { content: ''; position: absolute; inset: -6%; border: 3px dashed var(--ink); border-radius: 50%; opacity: .6; }
.frames { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.tenframe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; background: var(--lilac-d); padding: 8px; border-radius: 16px; }
.cell { width: clamp(50px, 6.4vw, 70px); aspect-ratio: 1; background: #fff; border-radius: 10px; display: grid; place-items: center; font-size: clamp(34px, 4.4vw, 48px); }
.cell .alt { filter: hue-rotate(200deg) saturate(1.4); }
.scatter { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 22px; max-width: 560px; font-size: clamp(48px, 6vw, 66px); }
.groups { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.group { display: grid; grid-template-columns: repeat(5, auto); gap: 6px; background: #fff; border-radius: var(--r); padding: 12px 16px; font-size: clamp(40px, 5vw, 56px); box-shadow: var(--shadow); }
.group.wide { grid-template-columns: repeat(5, auto); }
.kind-wide .group { box-shadow: none; padding: 0; font-size: 42px; }
.sign { font-size: clamp(56px, 7vw, 80px); color: var(--lilac-d); }
.strip { display: flex; gap: 10px; }
.strip .box { min-width: clamp(90px, 12vw, 130px); height: clamp(90px, 12vw, 130px); border-radius: 22px; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; font-size: clamp(44px, 6vw, 64px); padding: 0 10px; }
.strip .box.blank { border: 6px dashed var(--pink); color: var(--pink); background: var(--pink-xl); }
.baskets { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; justify-content: center; max-width: 92vw; }
.basket { position: relative; display: inline-flex; flex-direction: column; align-items: center; background: #F6D7A7; border: 4px solid #C98B4F; border-radius: 12px 12px 26px 26px; padding: 6px 6px 4px; }
.bk { display: none; }
.bk-berries { font-size: clamp(14px, 1.8vw, 20px); line-height: 1.05; text-align: center; letter-spacing: -2px; }
.basket b { position: absolute; top: -16px; right: -14px; background: var(--lilac-d); color: #fff; border-radius: 20px; padding: 0 8px; font-size: 20px; }
.loose { display: grid; grid-template-columns: repeat(5, auto); gap: 2px 6px; font-size: clamp(30px, 3.6vw, 40px); }
.baskets.ghost { opacity: .35; filter: grayscale(.5); }
.tenmore { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.clock { filter: drop-shadow(0 6px 0 rgba(74,46,58,.12)); }
.cnum { font-size: 20px; font-weight: 700; fill: var(--ink); }
.coins { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 640px; }
.shape .edge { stroke: transparent; stroke-width: 7; stroke-linecap: round; }
.shape .edge.lit { stroke: #FFD166; }
.shape .corner { fill: transparent; }
.shape .corner.lit { fill: #FFD166; stroke: #fff; stroke-width: 2; }
.shape .item.lit, .coin.item.lit { transform: none; }
.coin.item.lit { filter: drop-shadow(0 0 10px #FFD166); }
.ribbon-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ribbon { height: 34px; border-radius: 8px; position: relative; box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.ribbon .bow { position: absolute; right: -24px; top: -16px; font-size: 44px; }
.units { display: flex; } .units .unit { width: var(--u); font-size: calc(var(--u) * .85); }
.graph { display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: var(--r); padding: 14px 20px; box-shadow: var(--shadow); }
.g-row { display: flex; align-items: center; gap: 6px; font-size: clamp(34px, 4.4vw, 46px); min-height: 56px; }
.glabel { width: 70px; height: 56px; border-right: 4px solid var(--lilac); margin-right: 10px; display: grid; place-items: center; }
.build-tray { min-height: 150px; display: flex; align-items: center; justify-content: center; }
.build-tray .basket, .build-tray .loose .item { cursor: pointer; }
.build-tally { display: flex; gap: 30px; font-size: 40px; margin-top: 8px; }
.build-tally b { color: var(--berry); }
.build-guide { display: none; } .build-guide.show { display: flex; margin-bottom: 8px; }
.kind-build .choice { min-width: 150px; display: flex; flex-direction: column; font-size: 60px; }
.kind-build small { font-size: 26px; }
.build-done { background: #D8F8E1 !important; box-shadow: 0 8px 0 var(--mint-d) !important; }
.v-hide { visibility: hidden; }

/* finish */
.finish-screen { background: radial-gradient(circle at 50% 30%, #FFF7D6, #FFD6E0 70%); }
.finish { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.finish-title { font-size: 70px; }
.finish-num { font-size: clamp(36px, 5vw, 56px); color: var(--berry); }
.finish-mochi .mochi { animation: jump 1s ease-in-out infinite alternate; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; background: rgba(74, 46, 58, .38); display: grid; place-items: center; z-index: 50; animation: fade .25s; padding: 20px; }
.overlay.leaving { opacity: 0; transition: opacity .25s; }
.ov-card { background: #fff; border-radius: 36px; padding: 28px 34px; display: flex; flex-direction: column; align-items: center; gap: 18px; box-shadow: 0 14px 0 rgba(74,46,58,.18); max-width: 94vw; max-height: 94vh; overflow: auto; animation: pop .35s; }
.ov-title { font-size: 44px; color: var(--berry); }
.friend-pop { animation: bounce 1s ease-in-out infinite alternate; }
.gift { font-size: 160px; animation: wiggle 1s ease-in-out infinite; }
.gift.open { animation: pop .5s; }
.prize { font-size: 130px; }
.feed-card .want { font-size: 90px; color: var(--berry); }
.plate { width: 320px; min-height: 120px; border-radius: 50%; background: radial-gradient(#fff 55%, #F3E0E6 56%, #fff 70%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; padding: 20px 30px; font-size: 40px; box-shadow: var(--shadow); }
.plate-berry { animation: pop .3s; }
.give-berry { font-size: 70px; background: var(--pink-l); color: var(--ink); box-shadow: 0 8px 0 var(--pink); }
.harvest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; max-width: 520px; font-size: 56px; }
.h-choices { display: flex; gap: 16px; }
.pay-card .pay-item { font-size: 110px; line-height: 1; }
.pay-price { font-size: 64px; color: var(--berry); }
.pay-tray { min-height: 90px; }
.pay-count { font-size: 34px; color: var(--lilac-d); }
.pay-btns { display: flex; gap: 20px; }
.pay-btns .btn-big { display: flex; flex-direction: column; align-items: center; font-size: 60px; background: #FFF3C4; color: var(--ink); box-shadow: 0 8px 0 #E8C35A; }
.pay-btns small { font-size: 28px; }

/* ---------- play scenes ---------- */
.play { background: var(--cream); }
.stage-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage { position: relative; width: 100%; height: 100%; flex: none; border-radius: 30px; overflow: hidden; box-shadow: 0 10px 0 rgba(74,46,58,.12); --u: 8px; }
.toolbar { display: flex; gap: 12px; justify-content: center; flex: none; padding-top: 10px; flex-wrap: wrap; }
.tool { width: var(--tap); height: var(--tap); border-radius: 28px; background: #fff; box-shadow: var(--shadow); font-size: 48px; display: grid; place-items: center; position: relative; }
.tool small { position: absolute; bottom: 4px; right: 8px; font-size: 22px; }

/* cottage */
.c-wall { position: absolute; inset: 0 0 38% 0; }
.c-floor { position: absolute; inset: 62% 0 0 0; }
.wall-pink { background: repeating-linear-gradient(90deg, #FFD6E0 0 calc(var(--u) * 4), #FFE5EC calc(var(--u) * 4) calc(var(--u) * 8)); }
.wall-mint { background: radial-gradient(circle, #8EE3C8 calc(var(--u) * .9), transparent calc(var(--u) * 1)) 0 0 / calc(var(--u) * 6) calc(var(--u) * 6), #D9FFF3; }
.wall-hearts { background: radial-gradient(circle at 30% 40%, #CDB4DB calc(var(--u) * 1), transparent calc(var(--u) * 1.1)) 0 0 / calc(var(--u) * 7) calc(var(--u) * 7), #F3E8FF; }
.wall-stars { background: radial-gradient(circle, #FFD166 calc(var(--u) * .7), transparent calc(var(--u) * .8)) 0 0 / calc(var(--u) * 5) calc(var(--u) * 5), #FFF6D6; }
.wall-berry { background: radial-gradient(ellipse at 50% 60%, #FF4D6D calc(var(--u) * 1.1), transparent calc(var(--u) * 1.2)) 0 0 / calc(var(--u) * 7) calc(var(--u) * 7), radial-gradient(ellipse at 50% 35%, #6BCB77 calc(var(--u) * .6), transparent calc(var(--u) * .7)) 0 0 / calc(var(--u) * 7) calc(var(--u) * 7), #FFF0F4; }
.wall-rainbow { background: linear-gradient(#FFADAD, #FFD6A5, #FDFFB6, #CAFFBF, #9BF6FF, #BDB2FF, #FFC6FF); }
.floor-wood { background: repeating-linear-gradient(90deg, #E8B98A 0 calc(var(--u) * 10), #DDA977 calc(var(--u) * 10) calc(var(--u) * 10.4)); }
.floor-pink { background: #FFB3C6; } .floor-mint { background: #9FE6CF; }
.floor-check { background: conic-gradient(#fff 25%, #FFC8DD 0 50%, #fff 0 75%, #FFC8DD 0) 0 0 / calc(var(--u) * 8) calc(var(--u) * 8); }
.c-window { position: absolute; left: 7%; top: 9%; width: 22%; height: 30%; border: calc(var(--u) * 1.2) solid #fff; border-radius: calc(var(--u) * 2); overflow: hidden; box-shadow: 0 calc(var(--u) * .6) 0 rgba(0,0,0,.08); }
.c-sky { position: absolute; inset: 0; background: linear-gradient(#7FD1FF, #CFF0FF); }
.c-sky::after { content: '☀️'; position: absolute; right: 12%; top: 10%; font-size: calc(var(--u) * 6); }
.night .c-sky { background: linear-gradient(#1B1A4A, #3B2F7A); }
.night .c-sky::after { content: '🌙'; }
.c-dark { position: absolute; inset: 0; background: rgba(20, 16, 60, .45); opacity: 0; pointer-events: none; transition: opacity .8s; }
.night .c-dark { opacity: 1; }
.c-item { position: absolute; font-size: calc(var(--u) * 10); line-height: 1; }
.c-art { left: 42%; top: 8%; font-size: calc(var(--u) * 11); }
.c-light { right: 8%; top: 6%; }
.c-plant { left: 3%; top: 46%; font-size: calc(var(--u) * 14); }
.c-bed { right: 3%; top: 48%; font-size: calc(var(--u) * 18); }
.c-toy { left: 20%; top: 72%; font-size: calc(var(--u) * 9); }
.c-basket { position: absolute; right: 5%; top: 66%; width: 22%; height: 16%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #FFC8DD 45%, #C98B4F 46%, #A8733F 70%); }
.c-rug { position: absolute; left: 24%; top: 74%; width: 52%; height: 20%; border-radius: 50%; }
.rug-pink { background: radial-gradient(#FF8FAB 40%, #FFB3C6 41% 60%, #FF8FAB 61%); }
.rug-rainbow { background: radial-gradient(#FFADAD 20%, #FDFFB6 21% 40%, #CAFFBF 41% 60%, #9BF6FF 61% 80%, #BDB2FF 81%); }
.rug-berry { background: radial-gradient(ellipse at 50% 60%, #FF4D6D 55%, #E63956 56%); }
.c-mochi { position: absolute; left: 32%; top: 26%; width: 36%; }
.c-mochi .mochi { width: 100%; height: auto; }
.meters { position: absolute; left: 34%; top: 2%; display: flex; gap: calc(var(--u) * 1.2); background: rgba(255,255,255,.85); padding: calc(var(--u) * .8) calc(var(--u) * 1.4); border-radius: 30px; }
.meter { display: flex; align-items: center; gap: 4px; font-size: calc(var(--u) * 2.8); }
.meter .bar { width: calc(var(--u) * 5); height: calc(var(--u) * 1.4); background: #EEE; border-radius: 10px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--mint-d); border-radius: 10px; transition: width .5s; }
.meter .bar i.low { background: var(--red); }
.ball { position: absolute; font-size: calc(var(--u) * 9); transition: left .5s, top .5s, transform .5s; z-index: 5; }
.ball.fly { left: 48% !important; top: 40% !important; transform: rotate(360deg) scale(.7); }

/* sheets (bottom panels) */
.sheet { position: absolute; left: 10px; right: 10px; bottom: calc(var(--tap) + 26px + var(--safe-b)); background: #fff; border-radius: 30px 30px 26px 26px; box-shadow: 0 -6px 30px rgba(74,46,58,.2); padding: 12px 16px 16px; z-index: 20; animation: rise .3s; max-height: 60%; overflow: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: 36px; }
.tabs { display: flex; gap: 10px; justify-content: center; margin: 4px 0 10px; }
.tabs.wrap { flex-wrap: wrap; }
.tab { width: 76px; height: 64px; border-radius: 20px; background: var(--pink-xl); font-size: 36px; }
.tab.on { background: var(--pink); box-shadow: 0 4px 0 var(--berry); }
.item-grid, .food-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.item-btn, .food { position: relative; width: 96px; height: 96px; border-radius: 24px; background: var(--cream); box-shadow: var(--shadow); font-size: 52px; display: grid; place-items: center; }
.item-btn.on { background: #D8F8E1; box-shadow: 0 0 0 5px var(--mint-d); }
.item-btn.locked { filter: grayscale(.6); opacity: .7; }
.item-btn .price { position: absolute; bottom: 2px; font-size: 17px; background: #fff; border-radius: 10px; padding: 0 6px; }
.food small { position: absolute; bottom: 2px; font-size: 16px; }
.cnt { position: absolute; top: -6px; right: -6px; background: var(--lilac-d); color: #fff; border-radius: 14px; min-width: 30px; height: 30px; font-size: 18px; display: grid; place-items: center; }
.tint-blue { filter: hue-rotate(180deg); } .tint-purple { filter: hue-rotate(260deg); } .tint-dots { filter: saturate(1.6); }

/* garden */
.garden-screen { background: linear-gradient(#BDE0FE 0 18%, #A8E6A3 18%); }
.garden-field { flex: 1; display: grid; place-items: center; min-height: 0; }
.plots { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 3vw, 34px); }
.plot { position: relative; width: clamp(140px, 22vw, 210px); aspect-ratio: 1.15; border-radius: 40px; background: radial-gradient(ellipse at 50% 55%, #A0673F 55%, #8A5534 56%); box-shadow: 0 10px 0 #6E4026; display: grid; place-items: center; }
.plot .plus { font-size: 60px; color: rgba(255,255,255,.55); }
.plant { font-size: clamp(60px, 9vw, 96px); transition: transform .3s; }
.plant.s0 { font-size: 40px; }
.plot.ripe .plant { font-size: clamp(40px, 5vw, 56px); animation: wiggle 1.4s ease-in-out infinite; }
.need { position: absolute; top: -18px; right: -6px; font-size: 44px; background: #fff; border-radius: 50%; width: 64px; height: 64px; display: grid; place-items: center; box-shadow: var(--shadow); animation: float 1.6s ease-in-out infinite; }
.grow { position: absolute; bottom: 12px; left: 20%; right: 20%; height: 12px; border-radius: 8px; background: rgba(255,255,255,.4); overflow: hidden; }
.grow::after { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%); background: var(--sun); }

/* shop */
.shop-screen { background: linear-gradient(#FFF3C4, #FFE5EC); }
.shop-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 6px 4px 20px; align-content: start; -webkit-overflow-scrolling: touch; }
.shop-card { position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shop-card.owned { background: #F0FFF4; }
.shop-card.focus { box-shadow: 0 0 0 6px var(--sun), var(--shadow); }
.s-icon { font-size: 70px; line-height: 1.1; }
.s-price { font-size: 26px; color: var(--berry); }
.s-owned { font-size: 26px; }

/* spring */
.spring-screen { background: linear-gradient(#D8F3FF, #FFF0F4); }
.spring-stage { background: linear-gradient(#BDE0FE 0 30%, #9ED8A5 30%); }
.pool { position: absolute; left: 6%; right: 6%; top: 40%; bottom: 6%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #9BF6FF, #4CC9F0 70%); box-shadow: 0 0 0 calc(var(--u) * 1.6) #C9B8A6, 0 0 0 calc(var(--u) * 2.6) #A8957F; }
.pool-front { position: absolute; left: 6%; right: 6%; top: 62%; bottom: 6%; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: linear-gradient(rgba(155, 246, 255, .2), rgba(76, 201, 240, .85) 40%); pointer-events: none; }
.s-mochi { position: absolute; left: 34%; top: 31%; width: 32%; }
.s-mochi .mochi { width: 100%; height: auto; }
.s-friend { position: absolute; width: calc(var(--u) * 11); transform: translate(-50%, -50%); }
.s-friend .femoji { font-size: calc(var(--u) * 8) !important; }
.s-friend svg { width: 100%; height: auto; }
.steam { position: absolute; left: 30%; top: 28%; width: 40%; height: 20%; display: flex; justify-content: space-around; pointer-events: none; }
.steam span { width: calc(var(--u) * 3); height: 100%; border-radius: 50%; background: rgba(255,255,255,.7); filter: blur(calc(var(--u) * .8)); animation: steam 3s ease-in-out infinite; }
.steam span:nth-child(2) { animation-delay: 1s; } .steam span:nth-child(3) { animation-delay: 2s; }
.bubble-layer { position: absolute; inset: 0; z-index: 10; }
.bubble { position: absolute; width: calc(var(--u) * 15); height: calc(var(--u) * 15); border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, rgba(205, 180, 219, .6) 40%, rgba(160, 231, 255, .5)); border: 3px solid rgba(255,255,255,.9); font-size: calc(var(--u) * 5.2); color: var(--lilac-d); animation: float 2.4s ease-in-out infinite; }
.bubble.popped { transform: scale(1.6); opacity: 0; transition: all .3s; }

/* friend book */
.friends-screen { background: linear-gradient(#EFE3FF, #FFE5EC); }
.friend-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; padding: 6px 4px 20px; align-content: start; }
.friend-card { aspect-ratio: 1; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; }
.friend-card.locked { background: #E9E1EF; }
.friend-card .q { font-size: 56px; color: #B7A8C4; }
.twins { display: flex; align-items: flex-end; }
.femoji { line-height: 1; }

/* break */
.break { align-items: center; background: linear-gradient(#2D2A6E, #6C4AB6); color: #fff; }
.break-art { flex: 1; display: grid; place-items: center; }
.break-text { font-size: 80px; padding-bottom: 6vh; }

/* ---------- grown-ups ---------- */
.parent { background: #F7F4F8; font-weight: 400; overflow: auto; -webkit-user-select: text; user-select: text; padding: calc(10px + var(--safe-t)) 18px 30px; display: block; font-family: -apple-system, system-ui, sans-serif; }
.parent h2, .parent h3, .parent h4 { margin: 6px 0 10px; color: #3F2A47; }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; background: #F7F4F8; padding: 8px 0; z-index: 2; }
.p-saved { color: #2E9E5B; font-weight: 700; }
.p-body { display: grid; gap: 16px; max-width: 980px; margin: 0 auto; }
.p-card { background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.p-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 18px; }
.p-stats b { font-size: 26px; color: var(--berry); }
.p-help, .p-field small { color: #6B5B73; font-size: 15px; line-height: 1.4; }
.p-field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.p-label { font-weight: 700; }
.p-field input, .p-field select, .p-paste, .gate-input { font: inherit; font-size: 18px; padding: 10px 12px; border-radius: 12px; border: 2px solid #E2D6E8; background: #fff; max-width: 420px; -webkit-user-select: text; user-select: text; }
.p-paste { width: 100%; max-width: none; margin-top: 8px; }
.p-checks { display: grid; gap: 8px; }
.p-check { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 6px 0; }
.p-check input { width: 24px; height: 24px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.p-btn { padding: 12px 18px; border-radius: 14px; background: #7B5CD6; color: #fff; font-weight: 700; font-size: 16px; }
.p-btn.ghost { background: #EEE7F6; color: #4B3566; }
.p-btn.on { background: #2E9E5B; }
.p-btn.danger { background: #D7263D; }
.p-progress table { width: 100%; border-collapse: collapse; font-size: 15px; }
.p-progress td { padding: 6px 4px; border-bottom: 1px solid #F0EAF3; }
.p-progress td.num { color: #6B5B73; white-space: nowrap; text-align: right; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 13px; white-space: nowrap; background: #EEE; }
.chip-mastered { background: #D8F8E1; color: #1E7A45; } .chip-learning, .chip-new { background: #FFF3C4; color: #8A6100; } .chip-known { background: #E3F0FF; color: #2459A8; } .chip-locked { color: #999; }
.p-rounds { margin: 0; padding-left: 18px; line-height: 1.7; }
.p-tips { line-height: 1.6; padding-left: 20px; }
.gate { display: grid; place-items: center; }
.gate-card { background: #fff; padding: 28px; border-radius: 20px; text-align: center; display: grid; gap: 12px; justify-items: center; font-size: 20px; }
.gate-msg { color: #D7263D; min-height: 1em; }

/* ---------- effects ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.spark { position: absolute; font-size: 34px; transform: translate(-50%, -50%); animation: spark 1.1s ease-out forwards; }
.flyer { position: absolute; font-size: 46px; transform: translate(-50%, -50%); transition: transform .6s cubic-bezier(.5, -.3, .6, 1), opacity .6s; z-index: 101; margin: -23px 0 0 -23px; }
.bounce { animation: bounce .6s; } .jump { animation: jump .6s; } .shake { animation: shake .45s; } .wiggle { animation: wiggle .5s; }
.zzz { animation: float 2s ease-in-out infinite; }
@keyframes spark { from { opacity: 1; } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.6); } }
@keyframes bounce { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } 60% { transform: scale(.95); } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-24px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes steam { 0% { transform: translateY(20%) scaleY(.6); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-60%) scaleY(1.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- question pictures scale with the screen (portrait has room to spare) ---------- */
.q-visual .clock, .q-hintvis .clock { width: clamp(220px, 40vmin, 340px); height: auto; }
.q-visual > .shape { width: clamp(180px, 34vmin, 300px); height: auto; }
.q-visual > .coin { width: clamp(150px, 26vmin, 230px); height: auto; }
.coins .coin { width: clamp(70px, 11vmin, 112px); height: auto; }
.cell { width: clamp(54px, 8.6vmin, 92px); font-size: clamp(36px, 6vmin, 62px); }
.group { font-size: clamp(40px, 6.4vmin, 70px); }
.scatter { font-size: clamp(48px, 8vmin, 84px); max-width: 680px; }
.strip .box { min-width: clamp(90px, 15vmin, 150px); height: clamp(90px, 15vmin, 150px); font-size: clamp(44px, 7.5vmin, 76px); }
.bk-berries { font-size: clamp(14px, 2.4vmin, 24px); }
.loose { font-size: clamp(30px, 5vmin, 50px); }
.g-row { font-size: clamp(34px, 6vmin, 60px); }
.kind-wide { flex-direction: column; align-items: center; }
.kind-wide .choice { width: min(92vw, 760px); min-height: 120px; }
@media (orientation: landscape) { .kind-wide .choice { min-height: 100px; } }
