/* Calendario de Adviento Pop */
:root {
  --night: #0f1640;
  --night2: #1f2a6e;
  --red: #e3263a;
  --red2: #a5122a;
  --green: #1d8a3c;
  --green2: #0d5a28;
  --gold: #ffc93c;
  --gold2: #c07a10;
  --cream: #fff6e5;
  --ink: #2a1a40;
  --blue: #2f6fe0;
  --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%; background: var(--night); color: #fff; font-family: "Fredoka", system-ui, sans-serif; overscroll-behavior: none; }
body { overflow: hidden; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
[hidden] { display: none !important; }

#app { position: fixed; inset: 0; }
#snowbg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
#scr-menu { overflow-y: auto; -webkit-overflow-scrolling: touch; background: radial-gradient(120% 70% at 50% 0%, #34449a 0%, var(--night) 60%); }
#scr-menu > * { position: relative; width: 100%; flex: none; }

/* ── Top bars ── */
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 12px 8px; }
.spacer { flex: 1; }
.iconbtn { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 20px; flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.iconbtn:active { transform: translateY(2px); }
.snd::before { content: "🔊"; }
.snd.off::before { content: "🔇"; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 600; font-size: 15px; white-space: nowrap; }
.chip.streak { background: linear-gradient(180deg, #ff9a3c, #e3501a); box-shadow: 0 3px 0 #a3360d; }
.chip.streak.cold { background: rgba(255,255,255,.14); box-shadow: none; }

/* ── Menu ── */
.brand { text-align: center; padding: 2px 16px 0; }
.title { font-family: "Lilita One", "Fredoka", sans-serif; font-weight: 400; margin: 0; font-size: clamp(30px, 8.6vw, 54px); line-height: 1; letter-spacing: .5px; text-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 24px rgba(255,201,60,.35); }
.title .t1 { display: block; font-size: .55em; color: var(--cream); }
.title .t2 { color: var(--gold); }
.title .t3 { color: #ff5a6a; }
.tag { margin: 8px auto 0; max-width: 520px; color: #dfe6ff; font-size: 15px; }

.hero { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 12px auto 4px; padding: 0 14px; }
.mini-tree { width: 40%; max-width: 230px; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; flex: none; box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 3px rgba(255,255,255,.15); position: relative; }
.mini-tree canvas { width: 100%; height: 100%; display: block; }
.mini-tree .lbl { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.hero-info { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.today-msg { margin: 0; font-size: 17px; line-height: 1.3; }
.today-msg b { color: var(--gold); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 18px; font-weight: 700; font-size: 18px; background: #fff; color: var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,.25); transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn.gold { background: linear-gradient(180deg, #ffe07a, var(--gold)); color: #5a2e00; box-shadow: 0 5px 0 var(--gold2); }
.btn.red { background: linear-gradient(180deg, #ff5a6a, var(--red)); color: #fff; box-shadow: 0 5px 0 var(--red2); }
.btn.green { background: linear-gradient(180deg, #3fcf6a, var(--green)); color: #fff; box-shadow: 0 5px 0 var(--green2); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.btn.small { padding: 9px 14px; font-size: 15px; border-radius: 14px; }
.btn.big { font-size: 21px; padding: 15px 22px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }

/* Calendar */
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; max-width: 760px; margin: 16px auto 8px; padding: 0 16px; }
.cal-head h2 { margin: 0; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 24px; }
.cal-head small { color: #cfd8ff; font-size: 14px; }
.calendar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 760px; margin: 0 auto; padding: 0 14px; perspective: 900px; }
@media (min-width: 640px) { .calendar { grid-template-columns: repeat(6, 1fr); } }
.door { position: relative; aspect-ratio: 1; border-radius: 16px; padding: 0; overflow: visible; }
.door .inside { position: absolute; inset: 0; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #3a2a6a, #120a2a); box-shadow: inset 0 4px 12px rgba(0,0,0,.6); display: grid; place-items: center; overflow: hidden; }
.door .inside canvas { width: 78%; height: 78%; }
.door .inside .st { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: -1px; }
.door .leaf { position: absolute; inset: 0; border-radius: 16px; transform-origin: 0 50%; transition: transform .7s cubic-bezier(.3,1.4,.5,1); backface-visibility: hidden; display: grid; place-items: center; background: var(--c, var(--red)); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), 0 4px 10px rgba(0,0,0,.3); overflow: hidden; }
.door .leaf::before { content: ""; position: absolute; inset: 0; background: var(--p); opacity: .5; }
.door .leaf::after { content: ""; position: absolute; right: 9%; top: 46%; width: 7%; height: 12%; border-radius: 4px; background: var(--gold); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.door .num { position: relative; z-index: 1; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; font-family: "Lilita One", sans-serif; font-size: clamp(20px, 6.4vw, 34px); box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.door.s-locked .leaf { filter: saturate(.45) brightness(.62); }
.door.s-locked .leaf::before { opacity: .25; }
.door.s-locked .num { background: #dfe6f5; color: #5a6488; }
.door.s-locked .num::after { content: "🔒"; position: absolute; right: -8px; bottom: -6px; font-size: 14px; }
.door.s-open .leaf { animation: wiggle 2.8s ease-in-out infinite; }
.door.s-today { z-index: 2; }
.door.s-today .leaf { animation: today 1.2s ease-in-out infinite; box-shadow: 0 0 0 3px var(--gold), 0 0 22px 4px rgba(255,201,60,.8); }
.door.s-today::after { content: "HOY"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #5a2e00; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 99px; z-index: 3; box-shadow: 0 2px 0 var(--gold2); }
.door.s-done .leaf { transform: rotateY(-108deg); }
.door.s-done::after { content: none; }
.door.opening .leaf { transform: rotateY(-108deg); }
.door.d24 .leaf { background: linear-gradient(135deg, #ffe07a, #e0a020); }
.door.d24 .num { background: var(--red); color: #fff; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-2deg); } 96% { transform: rotate(2deg); } }
@keyframes today { 50% { transform: scale(1.06) rotate(-1deg); } }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 760px; margin: 18px auto 0; padding: 0 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { background: rgba(255,255,255,.1); border-radius: 18px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); }
.card:active { transform: scale(.97); }
.card i { font-style: normal; font-size: 30px; }
.card b { font-size: 16px; }
.card span { font-size: 13px; color: #cfd8ff; }
.card.reto { background: linear-gradient(160deg, #e3263a, #8a0f2a); }
.foot { text-align: center; color: #aab4e0; font-size: 13px; padding: 18px 16px calc(24px + var(--safe-b)); }

/* ── Play ── */
#scr-play { background: linear-gradient(180deg, #1f2a6e, #0f1640); }
.hud .lvl { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.hud .lvl b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 19px; color: var(--gold); }
.hud .lvl span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #dfe6ff; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 40%; justify-content: flex-end; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.22); }
.dots i.ok { background: #4bdc7a; box-shadow: 0 0 6px #4bdc7a; }
.dots i.meh { background: var(--gold); }
.hearts { font-size: 18px; letter-spacing: 1px; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 4px 12px calc(12px + var(--safe-b)); overflow: hidden; }
.clock { font-weight: 700; font-size: 15px; color: #dfe6ff; }

/* Intro */
.intro { margin: auto; max-width: 440px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: pop .45s cubic-bezier(.3,1.5,.5,1); }
.intro .subj { background: rgba(255,255,255,.16); padding: 5px 12px; border-radius: 99px; font-weight: 600; font-size: 14px; }
.intro h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 30px; margin: 0; color: var(--gold); text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.intro p { margin: 0; font-size: 18px; color: #eef2ff; }
.intro canvas { width: 120px; height: 120px; animation: bob 2s ease-in-out infinite; }
.intro .prize { font-size: 14px; color: #cfd8ff; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(3deg); } }

/* Question card */
.qcard { position: relative; background: var(--cream); color: var(--ink); border-radius: 22px; padding: 14px 52px 14px 16px; box-shadow: 0 6px 0 rgba(0,0,0,.25); text-align: center; animation: pop .35s cubic-bezier(.3,1.5,.5,1); flex: none; }
.qcard .qt { font-size: clamp(18px, 4.8vw, 24px); font-weight: 600; line-height: 1.2; margin: 0; }
.qcard .say { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 12px; background: #ffe7b0; font-size: 18px; }
.qpic { display: flex; justify-content: center; align-items: center; margin-bottom: 6px; min-height: 0; }
.qpic .emo { font-size: clamp(54px, 15vw, 84px); line-height: 1; animation: bob 2.2s ease-in-out infinite; }
.qpic .big { font-family: "Lilita One", sans-serif; font-size: clamp(30px, 9vw, 50px); color: var(--red); letter-spacing: 1px; line-height: 1.1; }
.qpic .big.long { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: clamp(20px, 5.4vw, 28px); color: var(--ink); }
.qpic .row { display: flex; gap: 4px; font-size: clamp(30px, 8.5vw, 46px); flex-wrap: wrap; justify-content: center; }
.qpic .row span.n { font-family: "Lilita One", sans-serif; color: var(--blue); background: #e6eeff; border-radius: 12px; padding: 0 8px; font-size: .8em; }
.qpic .row span.q { color: var(--red); font-family: "Lilita One", sans-serif; animation: pulse 1s infinite; }
.qpic canvas { display: block; }
.qtip { margin: 8px 0 0; font-size: 15px; color: #6a3a00; background: #fff0c4; border-radius: 12px; padding: 6px 10px; }

/* Gifts (regalos) */
.gifts { flex: 1; display: grid; gap: 14px; align-content: center; padding: 18px 2px 8px; grid-template-columns: repeat(2, 1fr); }
.gifts.n3 { grid-template-columns: repeat(3, 1fr); }
.gifts.long { grid-template-columns: 1fr; gap: 10px; }
.gifts.long .gift { aspect-ratio: auto; min-height: 64px; }
.gifts.long .gift .lid { height: 30%; }
.gift { position: relative; aspect-ratio: 1 / .86; border-radius: 16px; animation: giftIn .5s cubic-bezier(.3,1.5,.5,1) backwards; }
.gift .box { position: absolute; inset: 22% 4% 0; border-radius: 12px; background: var(--g); box-shadow: inset 0 -6px 0 rgba(0,0,0,.2), 0 6px 14px rgba(0,0,0,.35); }
.gift .box::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; transform: translateX(-50%); background: var(--r); }
.gift .lid { position: absolute; left: 0; right: 0; top: 10%; height: 20%; border-radius: 10px; background: var(--g); filter: brightness(1.15); box-shadow: 0 3px 0 rgba(0,0,0,.2); transition: transform .5s cubic-bezier(.3,1.4,.5,1), opacity .5s; z-index: 2; }
.gift .lid::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; transform: translateX(-50%); background: var(--r); }
.gift .lid::after { content: ""; position: absolute; left: 50%; top: -55%; width: 44%; height: 70%; transform: translateX(-50%); background: radial-gradient(ellipse 40% 50% at 25% 60%, var(--r) 60%, transparent 62%), radial-gradient(ellipse 40% 50% at 75% 60%, var(--r) 60%, transparent 62%); }
.gift .lbl { position: absolute; left: 50%; top: 61%; transform: translate(-50%, -50%); z-index: 3; background: #fff; color: var(--ink); border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: clamp(17px, 5vw, 26px); line-height: 1.1; min-width: 46%; max-width: 92%; text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,.18); overflow-wrap: normal; word-break: keep-all; }
.gifts.n3 .gift .lbl:not(.emo) { font-size: clamp(14px, 4.2vw, 22px); padding: 5px 6px; max-width: 98%; }
.gift .lbl.emo { font-size: clamp(34px, 11vw, 54px); background: rgba(255,255,255,.92); padding: 2px 8px; }
.gift .lbl.sm { font-size: clamp(14px, 4vw, 18px); font-weight: 600; }
.gifts.long .gift .box { inset: 0; }
.gifts.long .gift .lid { display: none; }
.gifts.long .gift .lbl { top: 50%; width: 82%; max-width: 82%; font-size: clamp(15px, 4.2vw, 19px); font-weight: 600; }
.gift:nth-child(2) { animation-delay: .06s; }
.gift:nth-child(3) { animation-delay: .12s; }
.gift:nth-child(4) { animation-delay: .18s; }
.gift.idle { animation: giftIn .5s cubic-bezier(.3,1.5,.5,1) backwards, giftBob 2.4s ease-in-out .6s infinite; }
.gift.right .lid { transform: translateY(-120%) rotate(-24deg); opacity: 0; }
.gift.right .box { box-shadow: 0 0 0 4px #4bdc7a, 0 0 26px #4bdc7a; }
.gift.right .lbl { background: #4bdc7a; color: #fff; transform: translate(-50%, -50%) scale(1.12); transition: transform .3s; }
.gift.wrong { animation: shake .45s; filter: grayscale(.85) brightness(.75); }
.gift.wrong .lbl { text-decoration: line-through; text-decoration-color: var(--red); }
.gift.hint .box { box-shadow: 0 0 0 4px var(--gold), 0 0 20px var(--gold); }
.gift.out { animation: giftOut .35s ease-in forwards; }
@keyframes giftIn { from { transform: translateY(40px) scale(.6); opacity: 0; } }
@keyframes giftOut { to { transform: translateY(30px) scale(.7); opacity: 0; } }
@keyframes giftBob { 50% { transform: translateY(-5px) rotate(-1deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px) rotate(-3deg); } 40%, 80% { transform: translateX(8px) rotate(3deg); } }

/* Sleigh (trineo) */
.sky { position: relative; flex: 1; min-height: 0; margin: 10px -12px calc(-12px - var(--safe-b)); touch-action: none; }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky .qcard { position: absolute; left: 12px; right: 12px; top: 0; z-index: 2; padding-top: 10px; padding-bottom: 10px; }
.sky .qpic .emo { font-size: 48px; }
.sky .qpic .big { font-size: 32px; }
.sky .hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-weight: 600; color: var(--ink); opacity: .7; z-index: 2; pointer-events: none; }

/* Memory */
.memo { flex: 1; display: grid; gap: 8px; align-content: center; justify-content: center; padding: 10px 0; perspective: 800px; }
.mcard { position: relative; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3,1.3,.5,1); border-radius: 14px; animation: giftIn .45s backwards; }
.mcard .f, .mcard .b { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mcard .b { background: repeating-linear-gradient(45deg, var(--red) 0 10px, #c81d30 10px 20px); box-shadow: inset 0 0 0 4px var(--gold), 0 4px 0 rgba(0,0,0,.25); font-size: 26px; }
.mcard .f { transform: rotateY(180deg); background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 rgba(0,0,0,.25); font-weight: 700; text-align: center; padding: 4px; line-height: 1.1; overflow-wrap: anywhere; }
.mcard .f canvas { width: 86%; height: 86%; }
.mcard.up { transform: rotateY(180deg); }
.mcard.done .f { background: #d9ffe6; box-shadow: 0 0 0 3px #4bdc7a, 0 0 16px #4bdc7a; }
.mcard.done { animation: matched .5s; transform: rotateY(180deg); }
@keyframes matched { 50% { transform: rotateY(180deg) scale(1.12); } }

/* Cookies (galletas) */
.tray-line { position: relative; flex: none; height: 74px; margin: 14px 0 4px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.tray-line::before { content: ""; position: absolute; left: 4%; right: 4%; top: 6px; height: 30px; border-top: 3px solid rgba(255,214,90,.8); border-radius: 50%; }
.slot { width: 58px; height: 58px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.3); flex: none; display: grid; place-items: center; }
.cookies { flex: 1; position: relative; }
.cookie { position: absolute; width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e8a868, #b8743a 70%); box-shadow: inset 0 0 0 5px #fff6, inset 0 0 0 9px #c88446, 0 6px 0 rgba(0,0,0,.25); display: grid; place-items: center; font-family: "Lilita One", sans-serif; font-size: 25px; color: #fff; text-shadow: 0 2px 0 #7a4416, 0 0 4px #7a4416; animation: cookieIn .5s cubic-bezier(.3,1.5,.5,1) backwards, giftBob 2.6s ease-in-out infinite; transition: left .45s cubic-bezier(.3,1.2,.5,1), top .45s cubic-bezier(.3,1.2,.5,1), transform .45s; padding: 6px; line-height: 1; text-align: center; overflow-wrap: anywhere; }
.cookie.word { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 17px; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 30%; }
.cookie.emo { font-size: 44px; text-shadow: none; }
.cookie.wrong { animation: shake .45s; }
.cookie.placed { animation: none; transform: scale(.66); z-index: 2; }
@keyframes cookieIn { from { transform: scale(0) rotate(-40deg); } }

/* ── Tree screen ── */
#scr-tree { background: #1a1240; }
.treewrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; touch-action: none; }
.treewrap canvas { display: block; touch-action: none; border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.tree-hint { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.55); padding: 6px 12px; border-radius: 99px; font-size: 14px; white-space: nowrap; pointer-events: none; max-width: 94%; overflow: hidden; text-overflow: ellipsis; }
.tray { flex: none; display: flex; gap: 10px; overflow-x: auto; padding: 10px 14px calc(12px + var(--safe-b)); align-items: center; min-height: 86px; }
.tray .note { font-size: 14px; color: #cfd8ff; }
.tray .tor { flex: none; width: 66px; height: 66px; border-radius: 18px; background: rgba(255,255,255,.14); display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2); touch-action: none; animation: pulse 1.4s infinite; }
.tray .tor canvas { width: 54px; height: 54px; pointer-events: none; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5,8,30,.72); display: grid; place-items: center; padding: 16px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: linear-gradient(180deg, #fffaf0, #ffeccc); color: var(--ink); width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; border-radius: 26px; padding: 22px 18px 18px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: pop .4s cubic-bezier(.3,1.5,.5,1); }
.sheet h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 28px; margin: 0 0 6px; color: var(--red); }
.sheet p { margin: 6px 0; font-size: 16px; line-height: 1.35; }
.sheet .row { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sheet ul { text-align: left; padding-left: 20px; margin: 8px 0; font-size: 15px; line-height: 1.4; }
.sheet .bigorn { width: 170px; height: 170px; margin: -4px auto 0; display: block; animation: bob 2s ease-in-out infinite; }
.sheet .bigstars { font-size: 40px; letter-spacing: 4px; margin: 2px 0; }
.sheet .bigstars i { font-style: normal; display: inline-block; animation: starIn .5s cubic-bezier(.3,1.8,.5,1) backwards; }
.sheet .bigstars i.off { filter: grayscale(1) opacity(.35); }
@keyframes starIn { from { transform: scale(0) rotate(-180deg); } }
.fact { background: #e6f3ff; border-radius: 16px; padding: 10px 12px; text-align: left; font-size: 15px; margin-top: 10px; }
.fact b { color: var(--blue); }
.ages { display: grid; gap: 10px; margin-top: 12px; }
.ages button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.15), inset 0 0 0 2px #f0d9a8; text-align: left; }
.ages button.on { box-shadow: 0 4px 0 var(--gold2), inset 0 0 0 3px var(--gold); background: #fff6d6; }
.ages i { font-style: normal; font-size: 34px; }
.ages b { display: block; font-size: 18px; }
.ages span { font-size: 14px; color: #6a5a7a; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: rgba(10,14,40,.92); color: #fff; padding: 10px 16px; border-radius: 16px; font-size: 15px; z-index: 70; max-width: 90vw; text-align: center; animation: toast 2.6s forwards; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.share-img { width: 100%; border-radius: 16px; margin: 6px 0; box-shadow: 0 4px 16px rgba(0,0,0,.25); }

@media (min-width: 900px) {
  .stage { max-width: 760px; width: 100%; margin: 0 auto; }
  .hud { max-width: 900px; width: 100%; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ── Painted art (html.arte, set by dibujo.js unless ?arte=0) ── */
.arte .door .leaf { background: url(arte/puerta-a.webp?v=2) center / 100% 100% no-repeat; box-shadow: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); overflow: visible; }
.arte .door[data-w="1"] .leaf { background-image: url(arte/puerta-c.webp?v=2); }
.arte .door[data-w="2"] .leaf, .arte .door[data-w="5"] .leaf { background-image: url(arte/puerta-b.webp?v=2); }
.arte .door[data-w="3"] .leaf { background-image: url(arte/puerta-d.webp?v=2); }
.arte .door.d24 .leaf { background: url(arte/puerta-24.webp?v=2) center / 100% 100% no-repeat; }
.arte .door .leaf::before, .arte .door .leaf::after { display: none; }
.arte .door .num { width: 56%; background: transparent; box-shadow: none; margin-top: 6%; }
.arte .door.s-locked .leaf { filter: saturate(.55) brightness(.7) drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.arte .door.s-locked .num { background: transparent; }
.arte .door.s-locked .num::after { content: none; }
.arte .door.s-locked .leaf::after { display: block; content: ""; left: auto; top: auto; right: 4%; bottom: 5%; width: 27%; height: 27%; border-radius: 0; background: url(arte/candado.webp?v=1) center / contain no-repeat; box-shadow: none; }
.arte .door.d24 .num { background: transparent; color: var(--red); }
.arte .door.s-today .leaf { box-shadow: none; filter: drop-shadow(0 0 4px var(--gold)) drop-shadow(0 0 14px rgba(255,201,60,.9)); }

.arte .gifts:not(.long) .gift { background: url(arte/caja-1.webp?v=1) center / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.arte .gifts:not(.long) .gift[data-c="1"] { background-image: url(arte/caja-2.webp?v=1); }
.arte .gifts:not(.long) .gift[data-c="2"] { background-image: url(arte/caja-3.webp?v=1); }
.arte .gifts:not(.long) .gift[data-c="3"], .arte .gifts:not(.long) .gift[data-c="5"] { background-image: url(arte/caja-4.webp?v=1); }
.arte .gifts:not(.long) .gift .box, .arte .gifts:not(.long) .gift .lid { display: none; }
.arte .gifts:not(.long) .gift .lbl { top: 64%; box-shadow: none; background: transparent; }
.arte .gifts:not(.long) .gift .lbl.emo { background: transparent; }
.arte .gifts:not(.long) .gift.right { filter: drop-shadow(0 0 6px #4bdc7a) drop-shadow(0 0 16px #4bdc7a); }
.arte .gifts:not(.long) .gift.right .lbl { background: #4bdc7a; }
.arte .gifts:not(.long) .gift.hint { filter: drop-shadow(0 0 6px var(--gold)) drop-shadow(0 0 14px var(--gold)); }
.arte .gifts:not(.long) .gift.wrong { filter: grayscale(.85) brightness(.75); }

.arte .mcard .b { background: url(arte/carta-dorso.webp?v=1) center / 100% 100% no-repeat; box-shadow: 0 4px 0 rgba(0,0,0,.2); font-size: 0; }
.arte .cookie { background: url(arte/galleta.webp?v=1) center / 100% 100% no-repeat; box-shadow: 0 5px 6px rgba(0,0,0,.25); }
