/* Slice Dash: the 3D board fills the window; warm wooden glass panels,
   candy buttons and a juicy HUD sit over it. Colours are tokens at the top. */

.sd {
  --ink: #1E120A; --line: rgba(255, 236, 210, .18); --glass-hi: rgba(255, 240, 220, .08);
  --gold: #FFC93C; --gold-hi: #FFE87A; --gold-lo: #FF9F1A; --gold-edge: #B05A00;
  --melon: #FF4D5A; --leaf: #3DDC97; --ice: #7FD8FF; --storm: #FF7A2A; --cream: #FFF6E8; --muted: #D9C2A4;
  --panel-a: rgba(74, 44, 26, .96); --panel-b: rgba(32, 18, 10, .96);
  background: #1A0F08;
}
.sd::before, .sd::after { display: none; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.sd-stage {
  position: relative; height: calc(100dvh - 52px); min-height: 300px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(120% 80% at 50% 10%, #5A3520, #1A0F08 70%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--cream);
}
.view, .view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sd-stage svg { width: 1em; height: 1em; flex: none; }

/* --------------------------------------------------------------- pieces */
.logo { margin: 0; font: 900 clamp(2.6rem, 11vw, 4.4rem)/.9 system-ui, sans-serif; letter-spacing: .02em; text-align: center; color: #FFF; transform: rotate(-4deg);
  text-shadow: 0 1px 0 #FFE6E8, 0 2px 0 #FFB8BE, 0 3px 0 #F0707C, 0 4px 0 #C8404E, 0 5px 0 #9A2232, 0 12px 18px rgba(0, 0, 0, .5); }
.logo span { display: block; color: var(--leaf); font-size: 1.1em; letter-spacing: .06em;
  text-shadow: 0 1px 0 #B8F5D8, 0 2px 0 #6EDBA6, 0 3px 0 #2FB878, 0 4px 0 #1B8C54, 0 5px 0 #0E6038, 0 12px 18px rgba(0, 0, 0, .5); }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px 4px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(60, 34, 20, .88), rgba(26, 14, 8, .88)); color: #FFF; font: 900 .98rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 12px rgba(0, 0, 0, .3); }
button.chip { cursor: pointer; }
.chip .ic { width: 1.35em; height: 1.35em; }
.chip .plus { font-style: normal; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--leaf); color: #053A24; font: 900 .8rem/1 system-ui; margin-left: 2px; }
.rbtn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; color: #FFF; font-size: 1.3rem;
  background: linear-gradient(180deg, rgba(92, 56, 34, .9), rgba(34, 20, 12, .9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 14px rgba(0, 0, 0, .35); }
.rbtn.big { width: 54px; height: 54px; font-size: 1.5rem; }
.rbtn:active { transform: scale(.94); }
.cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 32px; border: 0; border-radius: 22px; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 52%, var(--gold-lo)); color: #3A1D00; font: 900 1.45rem/1 system-ui, sans-serif; letter-spacing: .05em;
  box-shadow: 0 7px 0 var(--gold-edge), 0 16px 28px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .75); }
.cta svg { font-size: 1.25em; }
.cta::after { content: ""; position: absolute; top: -30%; bottom: -30%; width: 30%; left: -40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); transform: skewX(-20deg); animation: sd-shine 3.2s ease-in-out infinite; }
.cta:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--gold-edge), 0 8px 16px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .75); }
.cta.small { min-height: 54px; padding: 0 22px; font-size: 1.15rem; border-radius: 18px; }
.cta:disabled { filter: none; background: rgba(61, 220, 151, .14); color: var(--leaf); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .45); cursor: default; }
.cta:disabled::after { display: none; }
@keyframes sd-shine { 0%, 55% { left: -40%; } 100% { left: 140%; } }
@keyframes sd-breathe { 50% { transform: scale(1.04); } }
@keyframes sd-pop { from { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } to { transform: none; } }
@keyframes sd-rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sd-bump { 40% { transform: scale(1.22); } }
.dot { position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%; background: var(--melon); border: 2px solid #FFF; animation: sd-breathe .9s ease-in-out infinite; }
.badge { position: absolute; top: -9px; right: -9px; padding: 3px 7px; border-radius: 10px; background: linear-gradient(180deg, #8CF0B8, var(--leaf)); color: #053A24; font: 900 .72rem/1 system-ui; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.panel { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 10px; padding: 14px; overflow-y: auto; }

/* --------------------------------------------------------------- loader */
.loader { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px;
  background: radial-gradient(120% 80% at 50% 15%, #6A3E24, #1A0F08 72%); transition: opacity .5s ease; }
.loader.gone { opacity: 0; pointer-events: none; }
.lbar { width: min(78%, 360px); height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .14); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4); }
.lbar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--leaf), var(--melon)); transition: width .25s ease; }
.lstep { margin: 0; font: 800 1rem system-ui; color: #FFE8D0; }
.ltip { margin: 0; max-width: 420px; text-align: center; font: 700 .85rem/1.4 system-ui; color: var(--muted); }
.loader.err .lstep { color: #FFD1D1; max-width: 420px; text-align: center; }

/* ------------------------------------------------------------------ HUD */
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hud-tl { position: absolute; left: max(14px, env(safe-area-inset-left)); top: 8px; display: grid; justify-items: start; gap: 2px; }
.score { font: 900 clamp(2.3rem, 9vw, 3.2rem)/1 system-ui, sans-serif; color: #FFE27A; font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 0 #9A5A00, 0 5px 0 rgba(40, 18, 0, .55), 0 0 18px rgba(0, 0, 0, .35); }
.score.bump { animation: sd-bump .22s ease; }
.score.gold { color: #FFF3B0; text-shadow: 0 3px 0 #B88600, 0 0 22px rgba(255, 210, 60, .9); }
.best { font: 800 .85rem system-ui; color: rgba(255, 246, 232, .85); text-shadow: 0 1px 3px #000; }
.best.beat { color: var(--gold); animation: sd-pop .5s ease; }
.hud-tr { position: absolute; right: max(12px, env(safe-area-inset-right)); top: 10px; display: flex; align-items: center; gap: 10px; }
.hud-tr .rbtn { pointer-events: auto; }
.strikes { display: flex; gap: 4px; font-size: 1.9rem; }
.strikes svg { color: rgba(255, 255, 255, .42); filter: drop-shadow(0 0 1.5px rgba(30, 12, 0, .85)) drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); transition: color .2s, transform .2s; }
.strikes svg.on { color: #FF3B3B; transform: scale(1.12); animation: sd-pop .35s ease; }
.time { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(26, 14, 8, .7); border: 1px solid var(--line); font: 900 1.45rem/1 system-ui; font-variant-numeric: tabular-nums; }
.time .ic { color: var(--gold); }
.time.low { color: #FF6B6B; animation: sd-breathe .5s ease-in-out infinite; }
.powers { position: absolute; left: max(14px, env(safe-area-inset-left)); top: 96px; display: grid; gap: 6px; }
.pw { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border-radius: 999px; font: 900 .85rem/1 system-ui; color: #FFF; animation: sd-pop .3s ease; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.pw i { width: 54px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.pw i b { display: block; height: 100%; background: #FFF; }
.pw.ice { background: linear-gradient(90deg, #2E9BD8, #7FD8FF); }
.pw.storm { background: linear-gradient(90deg, #D8461A, #FF9A3C); }
.pw.gold { background: linear-gradient(90deg, #C88A00, #FFD54A); color: #3A1D00; }
.pw.gold i b { background: #3A1D00; }
.pops { position: absolute; inset: 0; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font: 900 1.25rem/1 system-ui; color: #FFF; white-space: nowrap; text-align: center;
  -webkit-text-stroke: 1px rgba(40, 16, 0, .6); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(40, 16, 0, .55), 0 0 12px rgba(0, 0, 0, .4); animation: sd-float 1.1s ease-out forwards; }
.pop.combo { font-size: 1.7rem; color: #FFE27A; }
.pop.combo small { display: block; font-size: .7em; color: #FFF; }
.pop.crit { font-size: 1.6rem; color: #FF5A5A; }
.pop.jack { font-size: 2rem; color: #FFE27A; }
.pop.best { font-size: 2.2rem; color: #FFE27A; letter-spacing: .04em; animation-duration: 1.6s; }
.pop.minus { color: #FF6B6B; font-size: 1.6rem; }
.pop.life { color: var(--leaf); font-size: 1.4rem; }
.pop.miss { color: #FF3B3B; font-size: 2.6rem; animation: sd-miss .9s ease-out forwards; }
.pop.power { font-size: 1.9rem; }
.jackn { position: absolute; transform: translate(-50%, -50%); font: 900 2.6rem/1 system-ui; color: #FFE27A; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none;
  -webkit-text-stroke: 2px rgba(80, 30, 0, .7); paint-order: stroke fill; text-shadow: 0 4px 0 #9A5A00, 0 0 22px rgba(255, 190, 40, .55); }
.jackn small { margin-left: 6px; font-size: .5em; color: #FFF; vertical-align: .6em; }
.pop.power.ice { color: var(--ice); } .pop.power.storm { color: var(--storm); } .pop.power.gold { color: var(--gold); }
@keyframes sd-float { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 30% { transform: translate(-50%, -55%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -140%) scale(.95); } }
@keyframes sd-miss { 0% { opacity: 0; transform: translate(-50%, 0) scale(.4); } 20% { opacity: 1; transform: translate(-50%, -40%) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1); } }
.tip { position: absolute; left: 0; right: 0; top: 110px; width: fit-content; max-width: 86%; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px;
  background: rgba(255, 248, 238, .95); color: var(--ink); font: 900 1rem/1.25 system-ui; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); animation: sd-pop .3s ease; }
.tip svg { font-size: 1.4rem; color: var(--melon); }
.countdown { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font: 900 clamp(5rem, 22vw, 8rem)/1 system-ui; color: #FFF;
  text-shadow: 0 6px 0 #C8404E, 0 14px 28px rgba(0, 0, 0, .5); animation: sd-count .8s ease-out both; pointer-events: none; }
@keyframes sd-count { from { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-50%, -50%) scale(1); opacity: .9; } }
.flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: #FFF; opacity: 0; }
.flash.go { animation: sd-flash .7s ease-out; }
.flash.red { background: radial-gradient(circle, rgba(255, 220, 160, .9), rgba(255, 80, 40, .6)); }
.flash.soft.go { animation: sd-flash-soft .35s ease-out; }
@keyframes sd-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes sd-flash-soft { 0% { opacity: .28; } 100% { opacity: 0; } }
.frost { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  box-shadow: inset 0 0 90px 30px rgba(140, 215, 255, .55); background: radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(170, 225, 255, .35)); }
.frost.on { opacity: 1; }
.frost.storm { box-shadow: inset 0 0 90px 24px rgba(255, 120, 40, .5); background: none; }

/* ----------------------------------------------------------------- menu */
.menu { justify-content: flex-start; gap: 4px; background: linear-gradient(180deg, rgba(20, 10, 4, .55), rgba(20, 10, 4, 0) 24%, rgba(20, 10, 4, 0) 60%, rgba(20, 10, 4, .7)); pointer-events: none; }
.menu > * { pointer-events: auto; animation: sd-rise .5s ease both; }
.menu .logo { margin-top: 4px; pointer-events: none; }
.m-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.m-top .rbtn { margin-left: auto; }
.lvl { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(60, 34, 20, .88), rgba(26, 14, 8, .88)); cursor: pointer; color: #FFF; }
.lvl b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #8CF0B8, var(--leaf)); color: #053A24; font: 900 .95rem/1 system-ui; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.xp { width: 70px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.xp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--leaf), #B8F5D8); border-radius: 4px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.modes { position: absolute; inset: 0; pointer-events: none; animation: none; }
.mode { position: absolute; transform: translate(-50%, 0); pointer-events: auto; display: grid; justify-items: center; gap: 2px; padding: 6px 14px 7px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer;
  background: linear-gradient(180deg, rgba(60, 34, 20, .9), rgba(26, 14, 8, .9)); color: #FFF; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); animation: sd-pop .45s ease both; }
.mode b { font: 900 1rem/1 system-ui; letter-spacing: .06em; }
.mode small { font: 800 .7rem/1 system-ui; color: var(--muted); }
.mode.classic b { color: #FF8A92; } .mode.rush b { color: #FFD54A; } .mode.relax b { color: var(--leaf); }
.mode.cut { opacity: 0; transition: opacity .2s; }
.m-bottom { margin-top: auto; display: grid; justify-items: center; gap: 10px; width: 100%; }
.daily-card { display: flex; align-items: center; gap: 10px; width: min(100%, 460px); padding: 9px 12px; border-radius: 16px; border: 1px solid rgba(255, 201, 60, .45); cursor: pointer; text-align: left; color: #FFF;
  background: linear-gradient(135deg, rgba(255, 140, 40, .3), rgba(60, 34, 20, .92)); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.daily-card > svg { font-size: 1.8rem; color: var(--gold); }
.daily-card span { display: grid; gap: 3px; margin-right: auto; }
.daily-card b { font: 900 .95rem/1.1 system-ui; }
.daily-card small { font: 700 .76rem/1.2 system-ui; color: #FFE8D0; }
.daily-card em { font-style: normal; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); color: #3A1D00; font: 900 .8rem/1 system-ui; }
.daily-card.done em { background: rgba(61, 220, 151, .2); color: var(--leaf); }
.m-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(100%, 460px); }
.tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 18px; border: 1px solid var(--line); cursor: pointer; color: #FFF;
  background: linear-gradient(180deg, rgba(100, 60, 36, .94), rgba(40, 22, 12, .94)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 0 rgba(16, 8, 2, .9), 0 10px 18px rgba(0, 0, 0, .3); }
.tile svg { font-size: 1.7rem; color: var(--gold); }
.tile small { font: 900 .74rem/1 system-ui; letter-spacing: .03em; }
.tile:active { transform: translateY(4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 2px 0 rgba(16, 8, 2, .9); }
.m-help { margin: 0; font: 800 .8rem/1.3 system-ui; color: #FFF; text-align: center; text-shadow: 0 1px 3px #000; }

/* --------------------------------------------------------------- sheets */
.sheetp { z-index: 8; background: rgba(10, 5, 2, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); justify-content: center; }
.sheet { width: min(96%, 560px); max-height: 100%; overflow-y: auto; display: grid; gap: 12px; align-content: start; padding: 14px 16px 18px; border-radius: 26px;
  background: linear-gradient(180deg, var(--panel-a), var(--panel-b)); border: 1px solid rgba(255, 236, 210, .14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); animation: sd-pop .28s ease; color: #FFF; }
.sheet.wide { width: min(98%, 820px); }
.sh-head { display: flex; align-items: center; gap: 10px; }
.sh-head .hico { font-size: 1.6rem; color: var(--gold); }
.sh-head h2 { margin: 0 auto 0 0; font: 900 1.45rem/1 system-ui; }
.x { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; color: #FFF; font-size: 1.1rem; background: rgba(255, 255, 255, .1); }
.sh-sub, .sh-note { margin: 0; font: 700 .85rem/1.4 system-ui; color: var(--muted); }
.sh-sub b { color: var(--gold); }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.mlist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 6px 12px; align-items: center; padding: 11px 12px; border-radius: 16px; background: var(--glass-hi); border: 1px solid rgba(255, 255, 255, .08); }
.mlist .ck { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); font: 900 .95rem system-ui; color: #FFF; }
.mlist li.done .ck { background: var(--leaf); color: #063A24; }
.mlist .mt { font: 800 .95rem/1.25 system-ui; }
.mlist .mt em { font-style: normal; color: var(--muted); white-space: nowrap; }
.mlist .reward { grid-column: 2; display: inline-flex; align-items: center; gap: 4px; font: 800 .76rem system-ui; color: var(--gold); }
.mlist .skip { grid-column: 3; grid-row: 1 / 3; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .1); color: #FFF; font: 900 .78rem/1 system-ui; cursor: pointer; }
.mlist .skip:disabled { opacity: .4; cursor: default; }
.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--leaf), var(--gold)); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.mlist .bar { grid-column: 2; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 900 .9rem/1 system-ui; cursor: pointer; }
.tab svg { font-size: 1.15rem; }
.tab.on { background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); color: #3A1D00; box-shadow: 0 3px 0 var(--gold-edge); }
.shop-body { display: grid; gap: 12px; }
.hero { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 20px; background: radial-gradient(120% 120% at 20% 20%, rgba(255, 160, 80, .28), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .1); }
.hero canvas, .hero img { width: 150px; height: 110px; border-radius: 14px; object-fit: cover; }
.hero h3 { margin: 0; font: 900 1.45rem/1.1 system-ui; }
.hero p { margin: 4px 0 10px; font: 700 .86rem/1.35 system-ui; color: #FFE8D0; }
.hero p.need { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
.card { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 6px 9px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; color: #FFF; font: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)); }
.card canvas, .card img { width: 84px; height: 56px; border-radius: 10px; object-fit: cover; }
.card b { font: 900 .82rem/1.1 system-ui; }
.card small { display: inline-flex; align-items: center; gap: 4px; font: 900 .72rem/1 system-ui; color: var(--gold); }
.card.locked canvas, .card.locked img { filter: brightness(.5) saturate(.5); }
.card .lock { position: absolute; top: 24px; font-size: 1.3rem; color: #FFF; }
.card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset, 0 0 18px rgba(255, 201, 60, .35); }
.card.sel { background: linear-gradient(180deg, rgba(255, 140, 60, .3), rgba(255, 255, 255, .04)); border-color: #FF9A4A; }
.buy { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #8CF0B8, var(--leaf) 55%, #1FB673); color: #04361F; font: 900 .95rem/1 system-ui; box-shadow: 0 4px 0 #0E7A48, inset 0 1px 0 rgba(255, 255, 255, .6); }
.buy svg { font-size: 1.2rem; }
.buy:active { transform: translateY(3px); box-shadow: 0 1px 0 #0E7A48; }
.buy:disabled { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .55); box-shadow: none; cursor: default; }
.buy.used { background: rgba(61, 220, 151, .18); color: var(--leaf); box-shadow: none; }
.challenge { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 140, 40, .28), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 201, 60, .4); }
.challenge > svg { grid-row: 1 / 4; font-size: 2.4rem; color: var(--gold); }
.challenge h3 { margin: 0; font: 900 1.1rem/1.1 system-ui; }
.challenge p { margin: 0; font: 700 .86rem/1.35 system-ui; color: #FFE8D0; }
.challenge .cta { grid-column: 1 / -1; margin-top: 6px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days div { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; background: var(--glass-hi); border: 1px solid rgba(255, 255, 255, .08); font: 900 .7rem/1.1 system-ui; text-align: center; color: #FFE8D0; }
.days div svg { font-size: 1.45rem; color: var(--gold); }
.days div svg.tick { color: var(--leaf); }
.days div.got { background: rgba(61, 220, 151, .14); border-color: rgba(61, 220, 151, .4); }
.days div.today { background: linear-gradient(180deg, rgba(255, 201, 60, .4), rgba(255, 159, 26, .2)); border-color: var(--gold); animation: sd-breathe 1.2s ease-in-out infinite; }
.days div.big { border-color: var(--melon); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.tiles div { display: grid; grid-template-columns: 36px 1fr; gap: 0 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--glass-hi); border: 1px solid rgba(255, 255, 255, .08); }
.tiles svg { grid-row: 1 / 3; font-size: 1.7rem; color: var(--gold); }
.tiles b { font: 900 1.15rem/1.1 system-ui; font-variant-numeric: tabular-nums; }
.tiles span { font: 700 .74rem/1.2 system-ui; color: var(--muted); }
.set { display: grid; gap: 8px; }
.set label { display: flex; align-items: center; gap: 8px; font: 900 .95rem system-ui; }
.set label svg { font-size: 1.2rem; color: var(--gold); }
.set label small { font: 700 .78rem system-ui; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .28); }
.seg button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 900 .84rem system-ui; cursor: pointer; }
.seg button.on { background: linear-gradient(180deg, #8CF0B8, #1FB673); color: #04361F; box-shadow: 0 3px 0 #0E7A48; }
.toggles { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tog { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: var(--glass-hi); color: #FFF; font: 900 .82rem system-ui; cursor: pointer; }
.tog svg { font-size: 1.6rem; color: var(--muted); }
.tog i { width: 40px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .2); position: relative; transition: background .2s; }
.tog i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #FFF; transition: transform .2s; }
.tog.on svg { color: var(--leaf); } .tog.on i { background: var(--leaf); } .tog.on i::after { transform: translateX(18px); }
.how p { margin: 0; font: 700 .84rem/1.45 system-ui; color: #FFE8D0; }
.how .ice { color: var(--ice); } .how .storm { color: var(--storm); } .how .gold { color: var(--gold); }

/* -------------------------------------------------------------- results */
.result { background: linear-gradient(180deg, rgba(14, 7, 2, .45), rgba(14, 7, 2, .85)); }
.r-card, .p-card { width: min(96%, 520px); display: grid; gap: 12px; padding: 18px 16px; border-radius: 28px; animation: sd-rise .45s ease both;
  background: linear-gradient(180deg, var(--panel-a), var(--panel-b)); border: 1px solid rgba(255, 236, 210, .14); box-shadow: 0 26px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); }
.r-head { display: grid; justify-items: center; gap: 4px; }
.r-head h2, .p-card h2 { margin: 0; font: 900 clamp(1.7rem, 6vw, 2.3rem)/1 system-ui; text-align: center; color: #FFF; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.r-ribbon { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: linear-gradient(90deg, var(--melon), #FF9A3C); color: #FFF; font: 900 .9rem/1 system-ui; letter-spacing: .08em; box-shadow: 0 6px 16px rgba(255, 77, 90, .45); animation: sd-pop .5s ease .2s both; }
.r-score { margin: 0; font: 900 clamp(3rem, 13vw, 4.2rem)/1 system-ui; font-variant-numeric: tabular-nums; color: #FFE27A; text-shadow: 0 5px 0 #9A5A00, 0 0 26px rgba(255, 201, 60, .35); }
.r-best { margin: 0; font: 800 .95rem system-ui; color: var(--muted); }
.r-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.r-stats div { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; background: var(--glass-hi); border: 1px solid rgba(255, 255, 255, .08); animation: sd-rise .4s ease both; }
.r-stats svg { font-size: 1.5rem; color: var(--gold); }
.r-stats b { font: 900 1.2rem/1.1 system-ui; font-variant-numeric: tabular-nums; }
.r-stats span { font: 800 .68rem/1 system-ui; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.r-gain { display: flex; align-items: center; gap: 12px; justify-content: center; }
.r-level { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; }
.r-level b { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #8CF0B8, var(--leaf)); color: #053A24; font: 900 1rem/1 system-ui; }
.r-level .xp { width: 120px; }
.r-level small { font: 800 .72rem system-ui; color: var(--muted); }
.r-side { display: grid; gap: 8px; }
.r-side h3 { margin: 0; font: 900 .95rem system-ui; color: #FFE8D0; }
.r-missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.r-missions li { display: grid; grid-template-columns: 26px 1fr auto; gap: 5px 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--glass-hi); border: 1px solid transparent; font: 800 .84rem/1.25 system-ui; }
.r-missions li .ck { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: .9rem; }
.r-missions li.done .ck { background: var(--leaf); color: #063A24; }
.r-missions li em { font-style: normal; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.r-missions li .bar { grid-column: 2 / 4; height: 6px; }
.r-missions li.new { animation: sd-pop .5s ease both; border-color: var(--leaf); }
.r-extra { margin: 0; font: 800 .88rem/1.45 system-ui; text-align: center; color: var(--gold); }
.r-extra svg { vertical-align: -.2em; margin-right: 3px; }
.r-buttons { display: flex; gap: 10px; justify-content: center; align-items: center; }
.r-buttons .cta.small { flex: 1 1 auto; max-width: 280px; padding: 0 14px; gap: 9px; font-size: 1.08rem; letter-spacing: .03em; white-space: nowrap; }
.r-buttons .rbtn.big { flex: none; }
.paused { background: rgba(14, 7, 2, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.sd-info { max-width: 760px; }
.sd-h { margin: 6px 0 0; text-align: center; color: #FFF; font: 900 1.1rem/1.2 system-ui; }
.sd-info .small { color: #E8D6C2; }
.sd .more-games h2 { color: #FFF; }

@media (max-height: 520px) {
  .panel { gap: 6px; padding: 8px 12px; }
  .logo { font-size: 2rem; }
  .cta { min-height: 48px; font-size: 1.15rem; }
  .tile { padding: 6px 4px 5px; } .tile svg { font-size: 1.3rem; }
  .m-help { display: none; }
  .sheet { padding: 10px 12px; gap: 8px; }
  .r-card, .p-card { gap: 8px; padding: 12px; }
  .r-score { font-size: 2.5rem; }
  .score { font-size: 2rem; }
  .tip { top: 70px; }
  .powers { top: 76px; }
}
@media (min-aspect-ratio: 13/10) and (max-height: 700px) {
  .menu .logo { font-size: 2.4rem; }
  .menu .logo span { display: inline; margin-left: .3em; }
}
@media (min-width: 760px) and (max-height: 820px) {
  .r-card { width: min(98%, 860px); grid-template-columns: 1fr 1fr; align-items: center; column-gap: 18px; }
  .r-card .r-head, .r-card .r-stats, .r-card .r-gain { grid-column: 1; } .r-card .r-side { grid-column: 2; grid-row: 1 / 4; } .r-card .r-buttons { grid-column: 1 / -1; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .menu .logo { position: absolute; left: 0; right: 0; top: 10px; width: fit-content; margin: 0 auto; font-size: 1.6rem; }
  .menu .logo span { display: inline; margin-left: .3em; }
  .menu .m-bottom { width: auto; align-self: stretch; grid-template-columns: 1fr auto; align-items: end; }
  .menu .m-nav { width: 340px; }
  .menu .daily-card { width: 300px; }
  .r-card { width: min(98%, 820px); grid-template-columns: 1fr 1fr; align-items: center; }
  .r-card .r-head, .r-card .r-stats, .r-card .r-gain { grid-column: 1; } .r-card .r-side { grid-column: 2; grid-row: 1 / 4; } .r-card .r-buttons { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cta::after, .menu > *, .days div.today, .dot { animation: none; }
}
/* Sharing is how friends find the game: the share button stands out. */
#share { background: linear-gradient(180deg, #4BE38A, #1FA85A); color: #04361F; animation: sd-breathe 1.6s ease-in-out infinite; }
