@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url(/fonts/fredoka-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url(/fonts/fredoka-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-latin-wght-normal.woff2) format("woff2"); }

:root {
  --bg: #fdf6e8;
  --card: #ffffff;
  --ink: #24453a;
  --ink-2: #557568;
  --muted: #8a9a92;
  --line: #efe5d2;
  --accent: #ff7a59;
  --accent-d: #e2593a;
  --amber: #ffb627;
  --leaf: #7ccf8a;
  --sky: #6ec6e8;
  --pink: #ff9ec4;
  --shadow: 0 2px 0 rgba(36, 69, 58, 0.06), 0 8px 24px rgba(36, 69, 58, 0.07);
  --r: 22px;
  --tabs-h: 72px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.45 "Nunito", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, .btn, .tab-l, .kicker, .chip, .pill { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; letter-spacing: 0.1px; }
h1 { font-size: 28px; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 21px; margin: 0 0 4px; }
h3 { font-size: 17px; margin: 14px 0 8px; }
p { margin: 0 0 8px; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.col { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.label { font-weight: 800; font-size: 14px; color: var(--ink-2); margin: 14px 0 8px; }
.error { color: var(--accent-d); font-weight: 700; }
.loading { min-height: 100vh; display: grid; place-items: center; font-family: "Fredoka"; color: var(--ink-2); }

/* ---------- layout ---------- */
.app { min-height: 100vh; }
.main { max-width: 760px; margin: 0 auto; padding: 14px 16px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom)); }
.page-h { margin: 6px 2px 14px; }
.page-h p { font-size: 15px; }
.back { display: inline-block; text-decoration: none; color: var(--ink-2); font-weight: 800; margin: 2px 0 10px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); }
.tab-i { font-size: 24px; transition: transform 0.2s; filter: grayscale(0.6); }
.tab-l { font-size: 13px; }
.tab.on { color: var(--ink); }
.tab.on .tab-i { transform: translateY(-2px) scale(1.12); filter: none; }
.tab.on::after { content: ""; position: absolute; top: 6px; width: 40px; height: 4px; border-radius: 4px; background: var(--accent); opacity: 0; }
.tab .dot { position: absolute; top: 12px; left: calc(50% + 12px); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 12px 18px; font-size: 17px;
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 0 var(--accent-d);
  transition: transform 0.08s, box-shadow 0.08s;
  text-decoration: none;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-d); }
.btn.big { padding: 15px 22px; font-size: 19px; border-radius: 18px; }
.btn.huge { width: 100%; padding: 18px 22px; font-size: 22px; border-radius: 20px; }
.btn.full { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.ghost:active:not(:disabled) { box-shadow: 0 1px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.stop { background: var(--ink); box-shadow: 0 4px 0 #13281f; }
.link { background: none; border: 0; color: var(--ink-2); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 10px; }
.link.danger { color: var(--accent-d); }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; box-shadow: var(--shadow); display: inline-grid; place-items: center; font-size: 20px; text-decoration: none; position: relative; }
.badge-wrap .badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff; font: 800 12px/20px "Nunito"; font-style: normal; padding: 0 5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { border: 0; background: #fff; border-radius: 999px; padding: 9px 15px; font-size: 15px; box-shadow: inset 0 0 0 2px var(--line); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chips.days .chip { width: 48px; height: 48px; padding: 0; justify-content: center; font-size: 18px; }

.input { width: 100%; border: 0; border-radius: 14px; padding: 12px 14px; font: inherit; background: #fff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.input.big { font-size: 20px; padding: 14px 16px; text-align: center; font-family: "Fredoka"; }
.input.time { width: auto; }
.input.code, .code { letter-spacing: 2px; font-family: "Fredoka"; }

.switch { width: 56px; height: 32px; border-radius: 20px; border: 0; background: var(--line); position: relative; transition: background 0.2s; flex: none; }
.switch i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
.switch.on { background: var(--leaf); }
.switch.on i { transform: translateX(24px); }

.bar { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; border-radius: 10px; background: var(--accent); transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { position: absolute; inset: 0; }
.ring-arc { transition: stroke-dashoffset 0.25s linear; }
.ring-in { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }

.amber { display: inline-flex; align-items: center; gap: 6px; font: 600 17px "Fredoka"; background: #fff; border-radius: 999px; padding: 7px 12px 7px 8px; box-shadow: var(--shadow); }
.amber.big { font-size: 40px; padding: 12px 24px 12px 16px; }
.amber-gem { width: 18px; height: 18px; border-radius: 50% 50% 50% 8%; transform: rotate(-45deg); background: radial-gradient(circle at 35% 35%, #ffe08a, #ffb627 55%, #e08a12); box-shadow: inset -2px -2px 0 rgba(0,0,0,.08); }
.amber.big .amber-gem { width: 36px; height: 36px; }
.pill { display: inline-block; border-radius: 999px; padding: 5px 11px; font-size: 13px; background: #f5efe2; color: var(--ink-2); }
.pill.gold { background: #fff2cc; color: #9a6a00; }

.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card h3:first-child { margin-top: 0; }
.kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-d); margin-bottom: 2px; }
.group-h { margin: 20px 4px 10px; font-size: 20px; }
.group-h small { color: var(--muted); font-size: 15px; }
.empty { text-align: center; padding: 30px; color: var(--muted); }
.empty-e { font-size: 44px; }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(20, 35, 30, 0.45); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s; }
.sheet { width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up 0.28s cubic-bezier(.2,.9,.3,1.1); }
.sheet-grip { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 4px auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; position: sticky; top: -8px; background: var(--bg); padding: 6px 0; z-index: 2; }
.sheet-head h2 { margin: 0; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- toasts, confetti, floaters ---------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--ink); color: #fff; border-radius: 16px; padding: 11px 16px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: flex; gap: 8px; align-items: center; animation: toastIn 0.35s cubic-bezier(.2,.9,.3,1.3); max-width: 520px; }
@keyframes toastIn { from { transform: translateY(-20px) scale(0.9); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.floater { position: fixed; z-index: 95; font-size: 26px; pointer-events: none; animation: floatUp 1.3s ease-out forwards; }
@keyframes floatUp { to { transform: translateY(-110px) scale(1.4); opacity: 0; } }

/* ---------- dino & scenes ---------- */
.dino { overflow: visible; display: block; }
.anim-bob .dino-body { animation: bob 2.6s ease-in-out infinite; transform-origin: 100px 190px; }
.anim-wobble { animation: wobble 2.2s ease-in-out infinite; transform-origin: 50% 95%; }
.anim-shake { animation: shake 0.45s ease-in-out infinite; transform-origin: 50% 90%; }
.dino-eyes { animation: blink 4.5s infinite; transform-origin: 114px 82px; }
.dino-tail { animation: tail 2.6s ease-in-out infinite; transform-origin: 66px 140px; }
.dino-arm { animation: wave 3.2s ease-in-out infinite; transform-origin: 128px 130px; }
.dino-wings { animation: flap 1.8s ease-in-out infinite; transform-origin: 100px 130px; }
.dino-zzz { font: 600 26px "Fredoka"; animation: zzz 2.4s ease-in-out infinite; }
.dino-tear { animation: tear 2.5s ease-in infinite; }
.dino-stars path { animation: twinkle 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-none * { animation: none !important; }
@keyframes bob { 50% { transform: translateY(-5px) scaleY(1.02); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes tail { 50% { transform: rotate(6deg); } }
@keyframes wave { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-25deg); } 90% { transform: rotate(10deg); } }
@keyframes flap { 50% { transform: scaleY(0.85); } }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -20px); } }
@keyframes tear { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes twinkle { 50% { opacity: 0.3; transform: scale(0.6); } }

.scene { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 380px; border-radius: var(--r); overflow: hidden; }
.scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6%; }
.scene-cloud { animation: drift 30s linear infinite alternate; }
.scene-twinkle { animation: twinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene-snow { animation: snow 6s linear infinite; }
.scene-petal { animation: snow 8s linear infinite; }
.scene-bubble { animation: bubble 5s ease-in infinite; }
.scene-smoke { animation: smoke 4s ease-in-out infinite; }
.scene-float { animation: bobf 3s ease-in-out infinite; }
.scene-silk { animation: silk 4s ease-in-out infinite; transform-box: fill-box; transform-origin: top; }
.scene-lava { animation: lava 3s ease-in-out infinite; }
.scene-wave { animation: drift 4s ease-in-out infinite alternate; }
.scene-glow { animation: glow 3s ease-in-out infinite; }
.scene-firefly { animation: firefly 3s ease-in-out infinite; }
.scene-fish { animation: fish 5s ease-in-out infinite; }
.scene-weed { animation: silk 3s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }
.scene-disco { animation: glow 1s ease-in-out infinite; }
@keyframes drift { to { transform: translateX(30px); } }
@keyframes snow { from { transform: translateY(-20px); } to { transform: translateY(260px); } }
@keyframes bubble { from { transform: translateY(0); opacity: 0.8; } to { transform: translateY(-200px); opacity: 0; } }
@keyframes smoke { 50% { transform: translateY(-8px) scale(1.06); } }
@keyframes bobf { 50% { transform: translateY(-8px); } }
@keyframes silk { 50% { transform: skewX(2deg); } }
@keyframes lava { 50% { transform: translateY(-14px); } }
@keyframes glow { 50% { opacity: 0.6; } }
@keyframes firefly { 50% { transform: translate(8px, -10px); opacity: 0.3; } }
@keyframes fish { 50% { transform: translateX(-14px); } }

/* ---------- home ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 12px; }
.hello h1 { font-size: 26px; margin: 0; }
.hello-k { margin: 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.top-r { display: flex; align-items: center; gap: 8px; }

.stage-card { background: var(--card); border-radius: calc(var(--r) + 4px); padding: 8px; box-shadow: var(--shadow); margin-bottom: 14px; }
.stage-card .scene { border-radius: var(--r); }
.dino-btn { border: 0; background: none; padding: 0; display: grid; place-items: center; transition: transform 0.15s; }
.dino-btn:active { transform: scale(0.95); }
.bubble { position: relative; background: #fff; border-radius: 18px; padding: 9px 14px; font-weight: 800; font-size: 15px; max-width: 78%; text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.1); margin-bottom: 6px; animation: pop 0.35s cubic-bezier(.2,.9,.3,1.4); }
.bubble::after { content: ""; position: absolute; bottom: -8px; left: 50%; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff; }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
.away { background: rgba(255,255,255,.9); border-radius: 20px; padding: 14px 18px; text-align: center; margin-bottom: 30px; }
.away span { font-size: 40px; }
.away p { margin: 4px 0 0; font-weight: 800; }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 8px 4px; }
.pet-name b { font: 600 20px "Fredoka"; display: block; }
.pet-name span { color: var(--muted); font-size: 14px; font-weight: 700; }
.energy { display: flex; align-items: center; gap: 6px; width: 46%; }
.banner { width: 100%; margin-top: 8px; border: 0; border-radius: 16px; padding: 13px; font-weight: 800; background: #fff2cc; color: #7a5200; display: flex; align-items: center; justify-content: center; gap: 8px; }
.banner.soft { background: #f5efe2; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.banner.glow { background: #e3f6ff; color: #1f6a92; animation: pulse 1.6s ease-in-out infinite; }
.egg-banner { background: linear-gradient(90deg, #ffe9f2, #fff2cc); color: var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.mini-egg { display: inline-block; animation: wobble 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.02); } }

.today { position: relative; overflow: hidden; }
.today::before { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: #fff0e9; }
.today.rest::before { background: #eef4ff; }
.today.done::before { background: #eaf8ec; }
.today-h { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.today-e { font-size: 38px; line-height: 1; }
.today-h p { margin: 0; color: var(--ink-2); }
.today-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; position: relative; }
.today-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; position: relative; }
.today-btns .btn.big { flex: 1; min-width: 180px; }

.week-h { display: flex; align-items: center; justify-content: space-between; }
.week-h h3 { margin: 0; }
.streak { display: flex; gap: 10px; font: 600 16px "Fredoka"; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0 10px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; color: var(--muted); font-size: 13px; }
.wd i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #f5efe2; color: #fff; font-weight: 900; }
.wd.plan i { box-shadow: inset 0 0 0 2.5px var(--amber); background: #fff; }
.wd.done i { background: var(--leaf); }
.wd.mini i { background: var(--sky); }
.wd.missed i { background: #f5efe2; }
.wd.is-today span { color: var(--ink); }
.wd.is-today i { outline: 3px solid var(--ink); outline-offset: 2px; }
.week-bar { margin-bottom: 8px; }

.coming ul { list-style: none; margin: 0; padding: 0; }
.coming li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.coming li:first-child { border-top: 0; }
.c-e { font-size: 22px; width: 30px; text-align: center; }
.c-t { flex: 1; font-weight: 700; }
.c-w { font: 600 14px "Fredoka"; color: var(--accent-d); background: #fff0e9; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.tip { display: flex; gap: 12px; align-items: center; background: #f2fbf4; }
.tip p { margin: 2px 0 0; }

.plan-list { margin: 12px 0; background: #fff; border-radius: 16px; overflow: hidden; }
.plan-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-weight: 700; }
.plan-row:first-child { border-top: 0; }
.plan-row.role-warm, .plan-row.role-cool { color: var(--muted); font-weight: 600; }
.plan-row.role-skill .pr-n::before { content: "★ "; color: var(--amber); }
.pr-t { font-family: "Fredoka"; white-space: nowrap; }

.letters { display: flex; flex-direction: column; gap: 8px; }
.letter { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 0; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.letter.unread { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.letter-b { flex: 1; }
.letter-b b { display: block; }
.letter-b small { color: var(--muted); font-weight: 700; }
.letter-b p { margin-top: 8px; font-size: 15px; }

/* ---------- player ---------- */
.player { min-height: 100vh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); }
.pl-top { display: flex; align-items: center; gap: 12px; }
.pl-prog { flex: 1; display: flex; gap: 3px; }
.pl-prog i { flex: 1; height: 7px; border-radius: 5px; background: var(--line); }
.pl-prog i.done { background: var(--leaf); }
.pl-prog i.now { background: var(--accent); }
.pl-time { font: 600 16px "Fredoka"; color: var(--ink-2); min-width: 44px; text-align: right; }
.pl-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.pl-fig { position: relative; background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 6px; cursor: pointer; }
.figure { width: 100%; height: auto; display: block; }
.fig-glow { opacity: 0.28; animation: glowfig 1.4s ease-in-out infinite; }
@keyframes glowfig { 50% { opacity: 0.12; } }
.pl-info { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: 600 20px "Fredoka"; }
.pl-meta { text-align: center; }
.pl-block { font: 600 14px "Fredoka"; color: var(--accent-d); text-transform: uppercase; letter-spacing: 1px; margin: 4px 0 0; }
.pl-name { font-size: 30px; margin: 2px 0 6px; }
.pl-sets { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; color: var(--ink-2); }
.pl-sets i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.pl-sets i.done { background: var(--leaf); }
.pl-sets i.now { background: var(--accent); transform: scale(1.25); }
.pl-sets span { margin-left: 6px; }
.pl-act { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.target { display: flex; align-items: center; gap: 18px; }
.step { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font: 600 30px "Fredoka"; }
.target-n { text-align: center; min-width: 120px; }
.target-n b { display: block; font: 600 64px/1 "Fredoka"; }
.target-n span { color: var(--muted); font-weight: 800; }
.hold { display: flex; flex-direction: column; align-items: center; }
.hold-n { font: 600 54px/1 "Fredoka"; }
.hold-n.count { color: var(--accent); animation: pop 0.5s; }
.ring-in small { color: var(--muted); font-weight: 800; margin-top: 4px; }
.cant { font-size: 15px; text-align: center; }

.rate { align-items: center; text-align: center; justify-content: center; }
.rate-q { margin-top: 18px; }
.rate-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.rate-b { border: 0; border-radius: 20px; padding: 16px 6px; background: #fff; box-shadow: var(--shadow); font: 600 18px "Fredoka"; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rate-b span { font-size: 40px; }
.rate-b.easy { box-shadow: inset 0 -5px 0 #c9ecd0, var(--shadow); }
.rate-b.ok { box-shadow: inset 0 -5px 0 #ffe2a3, var(--shadow); }
.rate-b.hard { box-shadow: inset 0 -5px 0 #ffc9bb, var(--shadow); }
.rate-b:active { transform: scale(0.96); }

.rest { align-items: center; text-align: center; }
.cheer { font: 600 20px "Fredoka"; margin-top: 10px; }
.rest-next { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 20px; padding: 8px 14px 8px 8px; box-shadow: var(--shadow); width: 100%; text-align: left; }
.rest-next b { display: block; font: 600 18px "Fredoka"; }
.rest-fig { width: 140px; flex: none; }
.rest-btns { display: flex; gap: 10px; margin-top: auto; width: 100%; }
.rest-btns .btn { flex: 1; }

/* info */
.ex-info h3 { margin-top: 18px; }
.ex-desc { font-size: 17px; }
.steps { padding-left: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 15px/28px "Fredoka"; text-align: center; }
.tips { padding-left: 20px; }
.tips li { margin: 4px 0; }
.muscles { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 18px; padding: 10px; }
.bodymap { width: 54%; max-width: 260px; flex: none; }
.bm-on { animation: glow 2s ease-in-out infinite; }
.mus-list { list-style: none; margin: 0; padding: 0; }
.mus-list li { padding: 4px 0; font-weight: 700; color: var(--ink-2); }
.mus-list li::before { content: "● "; color: #ffb39e; }
.mus-list li.main::before { color: var(--accent); }
.aerial { display: flex; gap: 10px; align-items: flex-start; background: #fff0f6; border-radius: 16px; padding: 12px; margin-top: 12px; }
.aerial span { font-size: 26px; }
.aerial p { margin: 0; }

/* ---------- overlays (celebration, eggs) ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: radial-gradient(circle at 50% 30%, #fff8e6, #ffe9d6 60%, #ffd9c7); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: calc(20px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; overflow: auto; }
.overlay .btn.huge { max-width: 460px; }
.cel-dots { display: flex; gap: 6px; }
.cel-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(36,69,58,.15); }
.cel-dots i.on { background: var(--accent); }
.cel-card { width: 100%; max-width: 520px; animation: pop 0.45s cubic-bezier(.2,.9,.3,1.3); }
.cel { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cel h1 { font-size: 32px; }
.cel p { font-size: 17px; max-width: 440px; }
.cel-fig { width: 100%; max-width: 380px; background: #fff; border-radius: 24px; padding: 6px; box-shadow: var(--shadow); }
.big-e { font-size: 80px; line-height: 1; animation: pop 0.6s cubic-bezier(.2,.9,.3,1.5); }
.trophy { font-size: 110px; line-height: 1; animation: pop 0.6s cubic-bezier(.2,.9,.3,1.5), bobf 2s 0.6s ease-in-out infinite; }
.gains { display: flex; gap: 10px; }
.gain { font: 600 22px "Fredoka"; background: #fff; border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow); }
.gain .amber { box-shadow: none; padding: 0; font-size: 22px; }
.lvl { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-weight: 800; }
.cel-list { list-style: none; padding: 0; margin: 8px 0; width: 100%; max-width: 420px; text-align: left; }
.cel-list li { display: flex; justify-content: space-between; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 14px; margin: 6px 0; }
.story-b { background: #fffdf6; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); text-align: left; font-size: 17px; line-height: 1.55; }
.pop { animation: pop 0.7s cubic-bezier(.2,.9,.3,1.6); }

.egg-tap { border: 0; background: none; padding: 0; }
.egg-tap:active { transform: scale(0.94); }
.prize { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 460px; animation: pop 0.6s cubic-bezier(.2,.9,.3,1.5); }
.prize-art { position: relative; display: grid; place-items: center; min-height: 200px; }
.prize-art::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 35%, transparent) 0 10deg, transparent 10deg 20deg); animation: spin 14s linear infinite; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.rar { font: 600 15px "Fredoka"; text-transform: uppercase; letter-spacing: 2px; color: #fff; background: var(--rar); border-radius: 999px; padding: 5px 14px; margin: 0; }
.fact { background: #fff; border-radius: 14px; padding: 10px 14px; font-size: 15px; }
.sticker-big { font-size: 120px; line-height: 1; }
.scene-thumb { border-radius: 14px; display: block; }

/* ---------- catalogue ---------- */
.path { --pc: var(--accent); }
.path.locked { opacity: 0.65; }
.path-h { display: flex; gap: 12px; align-items: center; }
.path-h > div { flex: 1; }
.path-h h2 { margin: 0; }
.path-h p { margin: 0; }
.path-e { width: 48px; height: 48px; border-radius: 16px; background: color-mix(in srgb, var(--pc) 15%, #fff); display: grid; place-items: center; font-size: 26px; }
.path-lv { font: 600 15px "Fredoka"; color: var(--pc); }
.nodes { display: flex; gap: 6px; overflow-x: auto; padding: 14px 2px 8px; scrollbar-width: none; }
.nodes::-webkit-scrollbar { display: none; }
.node { flex: 0 0 86px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; text-align: center; position: relative; }
.node:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: calc(50% + 24px); width: calc(100% - 42px); height: 4px; border-radius: 4px; background: var(--line); }
.node.done:not(:last-child)::after { background: var(--pc); }
.node-c { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 600 18px "Fredoka"; background: #f5efe2; color: var(--muted); }
.node.done .node-c { background: var(--pc); color: #fff; }
.node.now .node-c { background: #fff; color: var(--pc); box-shadow: inset 0 0 0 4px var(--pc); animation: pulse 1.8s infinite; }
.node.lock .node-c { font-size: 16px; }
.node-l { font-size: 12px; font-weight: 800; line-height: 1.2; color: var(--ink-2); }
.node.lock .node-l { color: var(--muted); }
.path-now { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }

.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ex-tile { position: relative; background: #fff; border-radius: 18px; padding: 6px 6px 10px; box-shadow: var(--shadow); text-decoration: none; text-align: center; font-size: 14px; }
.ex-tile b { display: block; padding: 0 4px; font-family: "Fredoka"; font-weight: 500; }
.ex-tile.locked { opacity: 0.6; }
.ex-tile .lock { position: absolute; top: 8px; right: 10px; }
.ex-page .ex-hero { background: #fff; border-radius: 26px; padding: 6px; box-shadow: var(--shadow); margin-bottom: 12px; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lockcard { background: #f5efe2; }
.ex-now p { margin-bottom: 10px; }

/* ---------- goals ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.stats div { background: #fff; border-radius: 18px; padding: 12px 6px; text-align: center; box-shadow: var(--shadow); }
.stats b { display: block; font: 600 22px "Fredoka"; }
.stats span { font-size: 12px; color: var(--muted); font-weight: 800; }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.goal { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.goal-e { font-size: 30px; width: 40px; text-align: center; }
.goal-b { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.goal-b small { color: var(--muted); font-weight: 700; }
.goal.done { background: linear-gradient(120deg, #fff8dc, #fff); box-shadow: inset 0 0 0 2px #ffe08a, var(--shadow); }
.cal-h { display: flex; align-items: center; justify-content: space-between; text-transform: capitalize; font-family: "Fredoka"; font-size: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 10px 0; text-align: center; }
.cal-wd { font-weight: 800; font-size: 12px; color: var(--muted); }
.cal-d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; font-weight: 800; background: #faf5ea; font-size: 14px; }
.cal-d.full { background: var(--leaf); color: #fff; }
.cal-d.mini { background: var(--sky); color: #fff; }
.cal-d.practice, .cal-d.partial { background: #ffe2a3; }
.cal-d.is-today { outline: 2.5px solid var(--ink); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin: 0 2px 0 8px; }
.lg.full { background: var(--leaf); } .lg.mini { background: var(--sky); } .lg.practice { background: #ffe2a3; }
.weeks-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; height: 110px; align-items: end; position: relative; border-top: 2px dashed #ffd27a; padding-top: 0; }
.wb { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.wb i { width: 100%; border-radius: 8px 8px 4px 4px; background: #ffe2a3; min-height: 4px; }
.wb.ok i { background: var(--amber); }
.wb span { font-size: 12px; font-weight: 800; color: var(--muted); }
.records { list-style: none; padding: 0; margin: 0; }
.records li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px dashed var(--line); }
.records li:first-child { border-top: 0; }
.records a { text-decoration: none; font-weight: 700; }
.records b { font-family: "Fredoka"; }

/* ---------- dino page ---------- */
.casa .scene { max-height: 420px; }
.deco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.deco { border: 0; background: #fff; border-radius: 18px; padding: 12px 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 15px "Fredoka"; }
.deco span { font-size: 28px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pick-grid.wide { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pick { border: 0; background: #fff; border-radius: 16px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: inset 0 0 0 2px var(--line); font-size: 13px; font-weight: 700; }
.pick.on { box-shadow: inset 0 0 0 3px var(--accent); background: #fff6f2; }
.pick .none { font-size: 34px; color: var(--muted); height: 64px; display: grid; place-items: center; }
.neighbors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.nb { border: 0; background: #fff; border-radius: 20px; padding: 12px 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.nb b { font: 600 18px "Fredoka"; }
.nb small { color: var(--muted); font-weight: 700; font-size: 13px; }
.nb.unknown { background: #f5efe2; box-shadow: none; }
.q { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: rgba(36,69,58,.07); font: 600 36px "Fredoka"; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.say { background: #fff; border-radius: 18px 18px 18px 4px; padding: 10px 14px; margin: 0; box-shadow: var(--shadow); }
.album-count { text-align: center; font-size: 18px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { position: relative; aspect-ratio: 0.85; border-radius: 16px; background: #f5efe2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 6px; overflow: hidden; }
.slot .q { width: 54px; height: 54px; font-size: 26px; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--rar) 50%, transparent); }
.slot.got { background: #fff; color: var(--ink-2); box-shadow: inset 0 -4px 0 var(--rar), var(--shadow); }
.slot.new::after { content: "¡NUEVO!"; position: absolute; top: 6px; right: -22px; transform: rotate(35deg); background: var(--accent); color: #fff; font-size: 10px; padding: 2px 24px; }
.slot .scene-thumb { width: 100%; height: auto; }
.sticker { font-size: 46px; line-height: 1.1; }
.album-sec { margin-bottom: 8px; }
.diary { display: flex; flex-direction: column; }
.chapter p:last-child { margin: 0; font-size: 16px; line-height: 1.55; }
.chapter.locked { background: #f5efe2; box-shadow: none; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-i { border: 0; background: #fff; border-radius: 20px; padding: 14px 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.shop-i .amber { box-shadow: inset 0 0 0 2px var(--line); }
.shop-i small { color: var(--muted); font-weight: 700; }
.shop-e { font-size: 44px; }
.shop-i.special { background: linear-gradient(140deg, #fff6d6, #ffe9f2); }

/* ---------- settings ---------- */
.settings h3 { margin-top: 6px; }
.place { padding: 10px 0; border-top: 1px dashed var(--line); }
.place:first-of-type { border-top: 0; }
.place .chips { margin-bottom: 0; }
.place .chip { font-size: 13px; padding: 7px 12px; }

/* ---------- onboarding ---------- */
.onboarding { min-height: 100vh; max-width: 560px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 20px 30px; position: relative; background: radial-gradient(circle at 50% 20%, #fff7e3, transparent 60%); }
.ob-back { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 14px; }
.ob-center, .ob-form, .ob-quiz { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 20px; }
.ob-form { align-items: stretch; text-align: left; }
.ob-form .ob-q { margin-top: 10px; }
.ob-title { font-size: 34px; }
.ob-text { font-size: 18px; color: var(--ink-2); }
.ob-q { font-size: 23px; margin: 8px 0 4px; }
.ob-kicker { color: var(--accent-d); font: 600 14px "Fredoka"; text-transform: uppercase; letter-spacing: 1px; margin: 0; }
.ob-foot { color: var(--muted); font-size: 14px; }
.ob-progress { display: flex; gap: 6px; width: 100%; }
.ob-progress i { flex: 1; height: 7px; border-radius: 5px; background: var(--line); }
.ob-progress i.on { background: var(--accent); }
.ob-list { text-align: left; padding: 0; list-style: none; font-size: 16px; }
.ob-list li { background: #fff; border-radius: 14px; padding: 10px 14px; margin: 6px 0; box-shadow: var(--shadow); }
.answers { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.answer { border: 0; background: #fff; border-radius: 18px; padding: 16px; font: 600 18px "Fredoka"; box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.answer:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line), inset 0 0 0 2px var(--accent); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.swatch.on { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.1); }
.sw-verde { background: #7ccf8a; } .sw-naranja { background: #ffa65c; } .sw-azul { background: #6ec6e8; } .sw-rosa { background: #ff9ec4; } .sw-lila { background: #b9a2f0; } .sw-amarillo { background: #ffd85c; }

/* ---------- tablet ---------- */
@media (min-width: 820px) {
  .main { max-width: 980px; }
  .home { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 18px; align-items: start; }
  .home .top { grid-column: 1 / -1; }
  .home .stage-card { grid-row: span 3; position: sticky; top: 14px; }
  .player { max-width: 1000px; }
  .pl-body:not(.rate):not(.rest) { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto 1fr auto; gap: 14px 24px; align-items: center; }
  .pl-body:not(.rate):not(.rest) .pl-fig { grid-row: 1 / span 3; }
  .pl-body:not(.rate):not(.rest) .pl-act { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.ex-page .ex-hero .figure, .cel-fig .figure { max-height: 46vh; width: auto; max-width: 100%; margin: 0 auto; }
.pl-fig .figure { max-height: 52vh; width: auto; max-width: 100%; margin: 0 auto; }
