/* ==========================================================================
   TargetPlusSolutions — app shell design system
   Mobile first. Bottom tab bar on phones, sidebar-free wide layout on desktop.
   ========================================================================== */

/* ----------------------------------------------------------- design tokens */
:root {
  --brand: #6d5efc;
  --brand-ink: #4b3fd6;
  --brand-soft: #efedff;
  --accent: #ff9f1c;
  --accent-soft: #fff3e0;
  --ok: #16a34a;
  --ok-soft: #e7f8ee;
  --warn: #f59e0b;
  --danger: #ef4444;
  --danger-soft: #fdecec;
  --info: #0ea5e9;

  --bg: #f5f6fb;
  --card: #ffffff;
  --card-2: #fbfbff;
  --ink: #191c34;
  --ink-2: #474c6b;
  --muted: #7c81a1;
  --line: #e7e8f2;
  --line-2: #f1f2f8;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(25, 28, 52, .05), 0 4px 14px rgba(25, 28, 52, .05);
  --shadow-2: 0 10px 34px rgba(25, 28, 52, .10);
  --shadow-brand: 0 10px 26px rgba(109, 94, 252, .30);

  --tab-h: 66px;
  --top-h: 58px;
  --max: 1180px;
  --ease: cubic-bezier(.22, .68, 0, 1);
}

[data-theme="dark"] {
  --brand: #8b7dff;
  --brand-ink: #a99dff;
  --brand-soft: #24224a;
  --accent: #ffb143;
  --accent-soft: #3a2c15;
  --ok-soft: #14301f;
  --danger-soft: #3a1d1d;

  --bg: #0f1020;
  --card: #181a30;
  --card-2: #1e2039;
  --ink: #eef0ff;
  --ink-2: #c3c7e4;
  --muted: #8c92b8;
  --line: #272a47;
  --line-2: #21233c;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  --shadow-2: 0 14px 40px rgba(0, 0, 0, .45);
}

/* ----------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; font-synthesis: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 "Nunito", "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overscroll-behavior-y: none;
  overflow-x: clip;
  min-width: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

body.has-tabbar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 22px); }
body.no-scroll { overflow: hidden; }
body.is-player .site-foot { display: none; }

img, video, iframe { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; }
.ic { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 {
  margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em;
  font-family: "Fredoka", "Nunito", sans-serif; font-synthesis: none;
}
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 .85em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }

/* ------------------------------------------------------------- utilities */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 720px; }
.stack { display: grid; gap: 14px; }
.stack-sm { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.semi { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.hide { display: none !important; }
.only-desktop { display: none; }
.only-mobile { display: initial; }
.brand-text { color: var(--brand); }
.accent-text { color: var(--accent); }
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }

/* ------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 8px;
  flex: 0 1 auto; min-width: 0;
  font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; color: var(--ink);
}
.brand-name {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0; line-height: 1.15;
}
.brand-title {
  display: block; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-logo { display: block; flex: 0 0 auto; line-height: 0; }
.brand-logo .pup { margin: 0; width: 42px; height: 42px; max-width: 42px; max-height: 42px; }
.brand-logo .pup-lg { width: 132px; height: 132px; max-width: 132px; max-height: 132px; }
.brand-name small {
  display: none;
  font-size: 10px; font-weight: 500; color: var(--muted);
  letter-spacing: .02em; white-space: nowrap;
}

.top-nav { display: none; gap: 2px; margin-left: 10px; }
.top-nav a {
  padding: 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.top-nav a:hover { background: var(--line-2); color: var(--ink); }
.top-nav a.active { background: var(--brand-soft); color: var(--brand-ink); }

.icon-btn {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink-2); cursor: pointer;
  transition: .18s var(--ease);
  position: relative;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn .dot {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 14px; text-align: center;
  border: 2px solid var(--card);
  display: grid; place-items: center;
}
.notif-btn { width: 42px; height: 42px; border-radius: 14px; }
.top-search {
  display: none; align-items: center; gap: 6px;
  height: 42px; padding: 0 6px 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card-2); min-width: 0; flex: 1 1 240px; max-width: 360px;
}
.top-search .search-ico { position: static; transform: none; flex: 0 0 auto; }
.top-search input {
  border: 0; background: transparent; box-shadow: none;
  height: 38px; min-height: 0; padding: 0 4px; flex: 1; min-width: 0;
  font-size: 14px; font-weight: 650;
}
.top-search input:focus { box-shadow: none; }
.top-search button {
  height: 30px; min-height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px;
}
.theme-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.theme-switch button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border-radius: 14px; border: 1.6px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 800; cursor: pointer;
}
.sfx-mini { max-width: 220px; margin-top: 6px; }
.sfx-mini button { min-height: 36px; font-size: 12px; border-radius: 12px; }
.theme-switch button.on, .theme-switch button:has([data-on]) {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.coin-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px 0 9px; border-radius: 999px;
  background: var(--accent-soft); color: #9a5b00;
  font-weight: 800; font-size: 13.5px; white-space: nowrap;
}
[data-theme="dark"] .coin-chip { color: var(--accent); }
.coin-chip svg { width: 17px; height: 17px; }

.streak-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 11px; border-radius: 999px;
  background: var(--danger-soft); color: #d1442f; font-weight: 800; font-size: 13.5px;
}
[data-theme="dark"] .streak-chip { color: #ff8f76; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; object-fit: cover;
  background: linear-gradient(135deg, var(--brand), #a855f7);
  color: #fff; font-weight: 800; font-size: 13px; overflow: hidden;
}
.avatar.lg { width: 68px; height: 68px; font-size: 24px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

.btn-signin { flex: 0 0 auto; gap: 6px; }
.btn-signin-label { white-space: nowrap; }

/* ------------------------------------------------------------- floating tab bar */
.tabbar-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.tabbar {
  pointer-events: auto;
  height: var(--tab-h);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 36px rgba(25, 28, 52, .16);
}
[data-theme="dark"] .tabbar { box-shadow: 0 10px 36px rgba(0, 0, 0, .45); }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .01em;
  position: relative; -webkit-tap-highlight-color: transparent;
  min-width: 0; padding: 0 2px;
}
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar a svg { width: 22px; height: 22px; transition: transform .2s var(--ease); }
.tabbar a.active { color: var(--brand); }
.tabbar a.active svg { transform: translateY(-1px) scale(1.06); }
.tabbar a.active::before {
  content: ""; position: absolute; top: 6px; width: 16px; height: 3px;
  border-radius: 99px; background: var(--brand);
}

/* ------------------------------------------------------------- cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--shadow-1);
}
.card-flat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card-tight { padding: 12px; }
.card-plain { background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; }
.card-link { display: block; color: inherit; transition: .2s var(--ease); }
.card-link:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-2); }

.section { margin: 26px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; min-width: 0; }
.section-head h2 { margin: 0; font-size: 18px; min-width: 0; }
.section-head .link { font-size: 13px; font-weight: 700; }
.section-sub { color: var(--muted); font-size: 13.5px; margin: -6px 0 12px; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px;
  border: 1px solid transparent; background: var(--line-2); color: var(--ink);
  font-weight: 700; font-size: 14.5px; cursor: pointer; text-align: center;
  transition: .18s var(--ease); -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--ink); filter: brightness(.97); }
.btn:active { transform: scale(.985); }
.btn svg { width: 19px; height: 19px; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #8b5cf6); color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-accent { background: linear-gradient(135deg, var(--accent), #f97316); color: #fff; box-shadow: 0 10px 24px rgba(255,159,28,.3); }
.btn-accent:hover { color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { color: #fff; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--line-2); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-google {
  background: #fff; border-color: #dadce0; color: #1f1f1f;
  font-weight: 800;
}
.btn-google:hover { background: #f8f9fb; color: #1f1f1f; border-color: #c6c8cc; }
.btn-google svg { width: 18px; height: 18px; }
.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 14px; color: var(--muted);
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.btn-round { width: 46px; padding: 0; border-radius: 50%; }

/* ------------------------------------------------------------- chips, badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  flex-shrink: 0; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }
.chip.is-active { background: var(--brand); color: #fff; }
.chip-brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip-accent { background: var(--accent-soft); color: #9a5b00; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: var(--line-2); color: var(--ink-2);
}
.badge-new { background: var(--brand); color: #fff; }
.badge-free { background: var(--ok-soft); color: var(--ok); }
.badge-hot { background: var(--danger-soft); color: var(--danger); }
.badge-pending { background: var(--accent-soft); color: #9a5b00; }
.badge-paid { background: var(--ok-soft); color: var(--ok); }

.tag-scroller {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px;
  scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.tag-scroller::-webkit-scrollbar { display: none; }
.tag-scroller > * { scroll-snap-align: start; flex-shrink: 0; }

.search-bar { display: flex; align-items: stretch; gap: 8px; }
.search-bar .grow { min-width: 0; }
.search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.search-go { flex: 0 0 auto; padding: 0 16px; }

/* ------------------------------------------------------------- progress */
.progress { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #a855f7);
  transition: width .5s var(--ease);
}
.progress.thin { height: 5px; }
.progress.accent > span { background: linear-gradient(90deg, var(--accent), #f97316); }
.progress.ok > span { background: linear-gradient(90deg, #22c55e, #16a34a); }

.ring { --p: 0; width: 62px; height: 62px; position: relative; flex: 0 0 auto; }
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line-2) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
.ring span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
}
.ring.lg { width: 96px; height: 96px; }
.ring.lg span { font-size: 20px; }

/* ------------------------------------------------------------- hero banners */
.hero { margin: 14px 0 10px; }
.hero-track {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: center;
  min-height: 198px; border-radius: 28px; padding: 18px 14px 16px 20px;
  display: flex; align-items: stretch; justify-content: space-between; gap: 4px;
  color: #fff; overflow: hidden; box-shadow: 0 18px 40px rgba(32, 18, 86, .22);
  text-decoration: none; isolation: isolate;
}
a.hero-slide:hover, a.hero-slide:focus { color: #fff; transform: none; }
.hero-mesh, .hero-shine {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.hero-mesh {
  background:
    radial-gradient(90% 80% at 100% 0, rgba(255,255,255,.3), transparent 52%),
    radial-gradient(70% 70% at 0 100%, rgba(0,0,0,.18), transparent 48%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 10px, transparent 10px 20px);
}
.hero-shine {
  width: 70%; height: 140%; left: auto; right: -18%; top: -20%;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.22), transparent 62%);
}
.hero-slide img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; z-index: 0;
}
.hero-copy {
  position: relative; z-index: 2; flex: 1 1 auto; min-width: 0; max-width: calc(100% - 150px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.hero-slide .badge {
  background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(8px);
  align-self: flex-start; margin-bottom: 10px; border: 1px solid rgba(255,255,255,.28);
}
.hero-slide h2 {
  font-family: "Fredoka", "Nunito", sans-serif; font-synthesis: none;
  font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,.22);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-slide p {
  font-size: 13.5px; opacity: .92; margin: 0 0 14px; max-width: 32ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-slide .btn, .hero-cta {
  background: #fff; color: #201f3d; align-self: flex-start;
  box-shadow: 0 8px 20px rgba(0,0,0,.18); pointer-events: none;
}
.hero-dots { display: flex; gap: 6px; justify-content: center; margin-top: 2px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: .25s; }
.hero-dots i.on { width: 20px; background: var(--brand); }

.hero-actor {
  position: absolute; right: 12px; bottom: -8px; z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.22));
}
.hero-actor .pup { width: 132px; height: 132px; max-width: 132px; max-height: 132px; margin: 0; }

.subkit {
  position: relative; z-index: 2; flex: 0 0 158px; width: 158px; height: 154px;
  pointer-events: none; align-self: center;
}
.hero-slide > .subkit {
  position: absolute; right: 8px; top: 10px; flex: none; align-self: auto;
}
.tool-chip {
  position: absolute; width: 58px; height: 58px; border-radius: 18px;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(10px); display: grid; place-items: center;
  box-shadow: 0 12px 24px rgba(0,0,0,.18);
  animation: kitFloat 4.4s ease-in-out infinite;
}
.tool-chip svg { width: 40px; height: 40px; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.16)); }
.tool-chip.t1 { left: 2px; top: 6px; --tilt: -8deg; }
.tool-chip.t2 { right: 2px; top: 22px; animation-delay: -.9s; --tilt: 7deg; }
.tool-chip.t3 { left: 18px; bottom: 8px; animation-delay: -1.7s; --tilt: -5deg; }
.tool-chip.t4 { right: 10px; bottom: 18px; width: 48px; height: 48px; animation-delay: -2.4s; --tilt: 10deg; }
@keyframes kitFloat {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, -6deg)); }
  50% { transform: translateY(-8px) rotate(calc(var(--tilt, -6deg) * -1)); }
}

/* Phones: drop expensive blur/float so tab swaps and hero kits stay snappy */
@media (hover: none), (max-width: 720px) {
  .tabbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--card);
  }
  .tool-chip {
    animation: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: rotate(var(--tilt, -6deg));
  }
  .hero-slide .badge { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hero-copy { max-width: calc(100% - 124px); }
  .hero-actor .pup { width: 110px; height: 110px; max-width: 110px; max-height: 110px; }
  .subkit { flex-basis: 132px; width: 132px; height: 138px; }
  .tool-chip { width: 50px; height: 50px; border-radius: 16px; }
  .tool-chip svg { width: 34px; height: 34px; }
  .tool-chip.t4 { width: 42px; height: 42px; }
}


.strip-banner {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--r-lg); padding: 14px 16px; color: #fff;
  box-shadow: var(--shadow-1);
}
.strip-banner h3 { margin: 0; font-size: 15px; }
.strip-banner p { margin: 2px 0 0; font-size: 12.5px; opacity: .9; }

.announce {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: #8a5000;
  border-radius: var(--r); padding: 10px 13px; font-size: 13px; font-weight: 600;
}
[data-theme="dark"] .announce { color: var(--accent); }
.announce svg { width: 17px; height: 17px; }

/* ------------------------------------------------------------- category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-tile {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px; color: inherit;
  transition: .2s var(--ease);
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: inherit; }
.cat-ico {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 15px;
  display: grid; place-items: center; place-content: center;
  color: #fff; font-weight: 800; font-size: 15px; line-height: 1;
  letter-spacing: -.03em; text-align: center;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.cat-ico svg { display: block; color: #fff; }
.cat-tile .cat-ico {
  color: #fff; font-size: 15px; overflow: hidden; white-space: nowrap;
}
.cat-tile b { display: block; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile .grow > span { font-size: 11.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------- course cards */
.course-scroller {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 12px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.course-scroller::-webkit-scrollbar { display: none; }
.course-scroller > .course-card { flex: 0 0 255px; scroll-snap-align: start; }

.course-grid { display: grid; gap: 13px; grid-template-columns: 1fr; }

.course-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; color: inherit;
  display: flex; flex-direction: column; transition: .2s var(--ease);
  min-width: 0;
}
.course-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow-2); }
.course-thumb {
  position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand), #a855f7);
  display: block; color: #fff; overflow: hidden;
  min-height: 160px;
}
.course-thumb > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.course-thumb > .cover-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.course-thumb .ph { font-size: 13px; font-weight: 800; opacity: .9; text-align: center; padding: 0 14px; }
.course-thumb .float { position: absolute; top: 9px; left: 9px; z-index: 2; }
.course-thumb .float-r { position: absolute; top: 9px; right: 9px; z-index: 2; }

.cover-art {
  position: absolute; inset: 0; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 90% at 12% 10%, color-mix(in srgb, #fff 22%, transparent), transparent 42%),
    linear-gradient(125deg, var(--c1), var(--c2) 58%, color-mix(in srgb, var(--c3) 70%, var(--c2)));
}
.cover-art .cover-mesh {
  position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--c3) 55%, transparent), transparent 36%),
    radial-gradient(circle at 20% 90%, color-mix(in srgb, #fff 16%, transparent), transparent 32%);
  transform: rotate(var(--shift, 0deg));
  pointer-events: none;
}
.cover-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: color-mix(in srgb, #fff 18%, transparent);
  filter: blur(1px);
}
.cover-orb.a { width: 42%; aspect-ratio: 1; right: -8%; top: -18%; }
.cover-orb.b { width: 28%; aspect-ratio: 1; left: -6%; bottom: -14%; background: color-mix(in srgb, var(--c3) 40%, transparent); }
.cover-star {
  position: absolute; top: 12%; right: 38%; width: 10px; height: 10px;
  background: #fff; opacity: .75;
  clip-path: polygon(50% 0, 61% 35%, 100% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 0 35%, 39% 35%);
}
.cover-art .subkit {
  position: absolute; inset: 0; width: auto; height: auto; flex: none; z-index: 1;
}
.cover-art .tool-chip {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255,255,255,.2);
}
.cover-art .tool-chip svg { width: 30px; height: 30px; }
.cover-art .tool-chip.t1 { left: auto; right: 22%; top: 8%; }
.cover-art .tool-chip.t2 { right: 5%; top: 26%; }
.cover-art .tool-chip.t3 { left: auto; right: 28%; bottom: 14%; }
.cover-art .tool-chip.t4 { right: 6%; bottom: 8%; width: 36px; height: 36px; }
.cover-art-hero .tool-chip { width: 56px; height: 56px; border-radius: 18px; }
.cover-art-hero .tool-chip svg { width: 38px; height: 38px; }
.cover-art-hero .tool-chip.t4 { width: 46px; height: 46px; }
.cover-art-tile .tool-chip, .cover-art-strip .tool-chip {
  width: 26px; height: 26px; border-radius: 9px; animation: none;
}
.cover-art-tile .tool-chip svg, .cover-art-strip .tool-chip svg { width: 18px; height: 18px; }
.cover-art-tile .tool-chip.t3, .cover-art-tile .tool-chip.t4,
.cover-art-strip .tool-chip.t3, .cover-art-strip .tool-chip.t4 { display: none; }
.cover-copy {
  position: absolute; left: 12px; right: 38%; top: 50%; transform: translateY(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
}
.cover-kicker {
  display: inline-flex; height: 20px; align-items: center; padding: 0 8px;
  border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; background: color-mix(in srgb, #fff 22%, transparent);
  border: 1px solid color-mix(in srgb, #fff 35%, transparent); backdrop-filter: blur(6px);
}
.cover-title {
  font-family: "Fredoka", "Nunito", sans-serif; font-synthesis: none;
  font-size: 17px; line-height: 1.15; letter-spacing: -.01em;
  text-shadow: 0 2px 12px color-mix(in srgb, #000 28%, transparent);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cover-line {
  font-size: 11px; font-weight: 700; opacity: .88; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cover-actor {
  position: absolute; right: -4px; bottom: -8px; z-index: 2;
  filter: drop-shadow(0 8px 14px color-mix(in srgb, #000 28%, transparent));
}
.cover-art-card .cover-actor .pup { width: 132px; height: 132px; max-width: 132px; max-height: 132px; }
.cover-art-hero { min-height: 180px; }
.cover-art-hero .cover-copy { left: 18px; right: 36%; }
.cover-art-hero .cover-kicker { height: 24px; font-size: 11px; }
.cover-art-hero .cover-title { font-size: 26px; }
.cover-art-hero .cover-line { font-size: 13px; }
.cover-art-hero .cover-actor { right: 8px; bottom: -4px; }
.cover-art-hero .cover-actor .pup { width: 148px; height: 148px; max-width: 148px; max-height: 148px; }
.cover-art-tile, .cover-art-strip { position: absolute; inset: 0; }
.cover-art-tile .cover-actor, .cover-art-strip .cover-actor {
  inset: 0; display: grid; place-items: center; place-content: center;
  right: auto; bottom: auto; filter: none;
}
.cover-art-tile .cover-actor .pup { width: 78px; height: 78px; max-width: 78px; max-height: 78px; }
.cover-art-strip .cover-actor .pup { width: 36px; height: 36px; max-width: 36px; max-height: 36px; }
.cover-art-strip .cover-star, .cover-art-tile .cover-star { right: 14%; top: 16%; transform: scale(.7); }

.learn-card .thumb { position: relative; }
.learn-card .thumb .cover-art { border-radius: inherit; }
.course-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.course-body h3 { margin: 0; font-size: 14.5px; line-height: 1.35; }
.course-meta { display: flex; flex-wrap: wrap; gap: 9px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.course-meta span { display: inline-flex; align-items: center; gap: 4px; }
.course-meta svg { width: 14px; height: 14px; }
.course-price { display: flex; align-items: baseline; gap: 7px; margin-top: auto; padding-top: 4px; }
.course-price b { font-size: 17px; font-weight: 800; }
.course-price s { color: var(--muted); font-size: 12.5px; }
.course-price .off { color: var(--ok); font-size: 12px; font-weight: 800; }

/* enrolled card variant */
.learn-card { display: flex; gap: 12px; align-items: center; padding: 12px; min-width: 0; }
.learn-card > :not(.thumb) { min-width: 0; }
.learn-card .thumb {
  width: 96px; height: 96px; flex: 0 0 auto; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), #a855f7); display: grid; place-items: center; color: #fff;
}
.learn-card .thumb > img { width: 100%; height: 100%; object-fit: cover; }
.learn-card b { font-size: 14px; display: block; }

/* ------------------------------------------------------------- stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-grid.four { grid-template-columns: repeat(2, 1fr); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px; display: flex; flex-direction: column; gap: 3px;
}
.stat .k { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.stat .sub { font-size: 11.5px; color: var(--muted); }
.stat-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 4px; }

/* ------------------------------------------------------------- syllabus */
.acc { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.acc + .acc { margin-top: 10px; }
.acc-head {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 13px 14px; background: none; border: 0; cursor: pointer; text-align: left;
}
.acc-head:hover { background: var(--line-2); }
.acc-head .sq {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px;
}
.acc-head b { font-size: 14px; display: block; line-height: 1.3; }
.acc-head .meta { font-size: 11.5px; color: var(--muted); }
.acc-head .caret { transition: transform .25s var(--ease); color: var(--muted); }
.acc.open .acc-head .caret { transform: rotate(180deg); }
.acc-body { display: none; border-top: 1px solid var(--line-2); }
.acc.open > .acc-body { display: block; }

.unit-head {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 11px 14px; background: var(--card-2); border: 0; border-top: 1px solid var(--line-2);
  cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; color: var(--ink);
}
.unit-head .meta { font-size: 11px; color: var(--muted); font-weight: 600; }

.lesson-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px 11px 16px; border-top: 1px solid var(--line-2);
  color: inherit; background: var(--card); min-width: 0;
}
.lesson-row:hover { background: var(--line-2); color: inherit; }
.lesson-row.is-locked { opacity: .6; }
.lesson-row.is-current { background: var(--brand-soft); }
.lesson-ico {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px;
  display: grid; place-items: center; background: var(--line-2); color: var(--ink-2);
}
.lesson-ico svg { width: 17px; height: 17px; }
.lesson-ico.t-video { background: #e8f1ff; color: #1668d8; }
.lesson-ico.t-note { background: #eef7ec; color: #2e7d32; }
.lesson-ico.t-quiz { background: #fff1e6; color: #d97706; }
.lesson-ico.done { background: var(--ok); color: #fff; }
[data-theme="dark"] .lesson-ico.t-video { background: #1b2b46; color: #7db3ff; }
[data-theme="dark"] .lesson-ico.t-note { background: #1b3324; color: #7fd193; }
[data-theme="dark"] .lesson-ico.t-quiz { background: #3a2a13; color: #ffc165; }
.lesson-row b { font-size: 13.5px; font-weight: 600; display: block; line-height: 1.35; min-width: 0; }
.lesson-row .meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; margin-top: 1px; }

/* -------------------------------------------------------- free preview */
.free-prev { padding: 16px 16px 12px; scroll-margin-top: 96px; }
.free-prev-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.free-prev-list { display: flex; flex-direction: column; }
.free-prev-unit-label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: var(--card-2);
}
.free-prev-unit-label .grow { font-size: 13.5px; font-weight: 700; }
.free-prev-num {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  display: inline-grid; place-items: center;
  color: #fff;
}
.free-prev-items {
  border: 1px solid var(--line); border-radius: 0 0 14px 14px;
  background: var(--card); overflow: hidden;
}
.free-prev-unit-label + .free-prev-items { border-top: 0; }
.free-prev-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--line-2);
  color: inherit; text-decoration: none;
}
.free-prev-row:first-child { border-top: 0; }
.free-prev-row:hover { background: var(--brand-soft); color: inherit; }
.free-prev-row .grow b {
  display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.free-prev-row .chip { flex: 0 0 auto; }


/* ------------------------------------------------------------- player */
.player-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: var(--card); border-bottom: 1px solid var(--line);
  min-width: 0;
}
.player-bar b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #06060f; border-radius: var(--r); overflow: hidden;
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-missing { display: grid; place-items: center; height: 100%; color: #8d92b8; font-size: 13px; text-align: center; padding: 20px; }

.note-body {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; font-size: 15px; line-height: 1.75; color: var(--ink-2);
}
.note-body h1, .note-body h2, .note-body h3 { color: var(--ink); margin-top: 1.2em; }
.note-body h3 { font-size: 16px; }
.note-body ul, .note-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.note-body li { margin-bottom: .4em; }
.note-body table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: 14px; }
.note-body th, .note-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.note-body th { background: var(--line-2); }
.note-body img { border-radius: var(--r-sm); margin: 10px 0; }
.note-body code { background: var(--line-2); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.note-body blockquote { margin: 0 0 1em; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.note-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--line-2); font-size: 13px; line-height: 1.45; color: var(--ink-2);
}
.tag-pyq, .tag-vip, .tag-ask {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  text-transform: uppercase; white-space: nowrap;
}
.tag-pyq { background: #f59e0b; color: #1b1203; }
.tag-vip { background: #fb7185; color: #3f0d18; }
.tag-ask { background: #14b8a6; color: #042f2e; }
.note-points { list-style: none; padding: 0 !important; margin: 0; }
.note-points li {
  position: relative; margin: 0 0 8px; padding: 10px 12px 10px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
.note-points li.is-pyq {
  border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 12%, var(--card));
  box-shadow: inset 3px 0 0 #f59e0b;
}
.note-points li.is-vip {
  border-color: #fb7185; background: color-mix(in srgb, #fb7185 12%, var(--card));
  box-shadow: inset 3px 0 0 #fb7185;
}
.note-points li.is-ask {
  border-color: #14b8a6; background: color-mix(in srgb, #14b8a6 12%, var(--card));
  box-shadow: inset 3px 0 0 #14b8a6;
}
.note-points .tag-pyq, .note-points .tag-vip, .note-points .tag-ask { margin-right: 6px; vertical-align: middle; }
.note-cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin: 0 0 16px;
}
.note-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 13px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
}
.note-card.is-pyq { border-color: #f59e0b; box-shadow: inset 3px 0 0 #f59e0b; }
.note-card.is-vip { border-color: #fb7185; box-shadow: inset 3px 0 0 #fb7185; }
.note-card.is-ask { border-color: #14b8a6; box-shadow: inset 3px 0 0 #14b8a6; }
.note-card-w { font-size: 16px; letter-spacing: -.02em; color: var(--ink); }
.note-card-m { font-size: 13px; font-weight: 800; color: var(--brand); }
.note-card-ex { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.note-card-ex b { color: var(--ink); margin-right: 4px; }

/* Maths Formula Lab — chalkboard figures + formula drill cards */
.mf-figs {
  display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 16px;
}
@media (min-width: 700px) {
  .mf-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mf-fig {
  margin: 0; border-radius: 20px; overflow: hidden;
  background: #0b1220; border: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .28);
}
.mf-fig .mf-svg { display: block; width: 100%; height: auto; }
.mf-fig figcaption {
  padding: 10px 14px 12px; font-size: 12.5px; line-height: 1.45; font-weight: 700;
  color: #cbd5e1; background: #0f172a; border-top: 1px solid rgba(148,163,184,.12);
}
.mf-formula {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25;
}
.note-card .mf-formula { color: var(--ink); }
.mf-steps {
  margin: 4px 0 0; padding: 0 0 0 18px;
  display: flex; flex-direction: column; gap: 5px;
}
.mf-steps li {
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2); font-weight: 600;
}
.note-card.is-pyq .mf-formula { color: #b45309; }
.note-card.is-vip .mf-formula { color: #be123c; }
.note-card.is-ask .mf-formula { color: #0f766e; }
[data-theme="dark"] .mf-fig figcaption { background: #020617; color: #94a3b8; }
[data-theme="dark"] .note-card.is-pyq .mf-formula { color: #fbbf24; }
[data-theme="dark"] .note-card.is-vip .mf-formula { color: #fb7185; }
[data-theme="dark"] .note-card.is-ask .mf-formula { color: #2dd4bf; }

@media (max-width: 640px) {
  .note-cards { grid-template-columns: 1fr; }
}

.player-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.player-nav .btn { flex: 1 1 140px; min-width: 0; }

/* ------------------------------------------------------------- quiz */
.quiz-shell { max-width: 720px; margin: 0 auto; padding: 0 14px 120px; }
.quiz-top {
  position: sticky; top: 0; z-index: 60; background: var(--card);
  border-bottom: 1px solid var(--line); margin: 0 -14px 14px; padding: 10px 14px;
}
.timer {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink);
  font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
}
.timer.warn { background: var(--danger-soft); color: var(--danger); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.q-passage {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 14px;
  background: #f4f6ff; border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.6; color: var(--ink);
}
[data-theme="dark"] .q-passage { background: #1c2038; }
.q-num { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.q-text { font-size: 16px; font-weight: 600; line-height: 1.5; margin: 6px 0 14px; }
.q-text img { border-radius: var(--r-sm); margin-top: 8px; }

.opt {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border: 1.6px solid var(--line); border-radius: 14px;
  background: var(--card); cursor: pointer; transition: .15s var(--ease);
}
.opt + .opt { margin-top: 9px; }
.opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mark {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; color: var(--muted); background: var(--card);
}
.opt.multi .mark { border-radius: 7px; }
.opt .txt { font-size: 14.5px; line-height: 1.45; padding-top: 2px; }
.opt.is-picked { border-color: var(--brand); background: var(--brand-soft); }
.opt.is-picked .mark { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-right .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.opt.is-wrong .mark { background: var(--danger); border-color: var(--danger); color: #fff; }

.numeric-input {
  width: 100%; height: 52px; padding: 0 14px; border-radius: 14px;
  border: 1.6px solid var(--line); background: var(--card);
  font-size: 17px; font-weight: 700; text-align: center; letter-spacing: .04em;
}

.palette { display: flex; flex-wrap: wrap; gap: 7px; }
.palette button {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink-2); font-weight: 800; font-size: 13px; cursor: pointer;
}
.palette button.answered { background: var(--brand); border-color: var(--brand); color: #fff; }
.palette button.current { outline: 2.5px solid var(--accent); outline-offset: 1px; }

.quiz-actions {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.quiz-actions .btn { flex: 1; }

.score-hero {
  border-radius: var(--r-xl); padding: 26px 20px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), #8b5cf6); box-shadow: var(--shadow-2);
}
.enroll-top {
  position: sticky; top: var(--top-h, 58px); z-index: 55;
  background: color-mix(in srgb, var(--brand-soft) 88%, #fff);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.enroll-top-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; min-height: 52px;
}
.enroll-top b { display: block; font-size: 13.5px; line-height: 1.25; }
.enroll-top .btn { flex: 0 0 auto; white-space: nowrap; }
.score-hero.fail { background: linear-gradient(135deg, #f97362, #ef4444); }
.score-hero .big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.score-hero .lbl { font-size: 13px; opacity: .9; margin-top: 6px; }
.score-hero .emoji { font-size: 42px; line-height: 1; margin-bottom: 8px; }
.score-hero .pup { overflow: visible; margin-bottom: 4px; }
.score-hero .pup svg { overflow: visible; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 11px; text-align: center; }
.mini-stats b { display: block; font-size: 19px; font-weight: 800; }
.mini-stats span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }

.explain {
  margin-top: 11px; padding: 11px 13px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; line-height: 1.55;
}

/* ------------------------------------------------------------- achievements */
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 12px; text-align: center; position: relative; overflow: hidden;
}
.badge-card.locked { opacity: .62; }
.badge-card .em { font-size: 30px; line-height: 1; display: block; margin-bottom: 7px; filter: saturate(1.1); }
.badge-card.locked .em { filter: grayscale(1); }
.badge-card b { font-size: 13px; display: block; line-height: 1.3; }
.badge-card p { font-size: 11.5px; color: var(--muted); margin: 3px 0 9px; line-height: 1.4; }
.badge-card .tier {
  position: absolute; top: 8px; right: 8px; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px;
}
.tier-bronze { background: #f7e6d3; color: #9a5b21; }
.tier-silver { background: #eceef4; color: #5c6479; }
.tier-gold { background: #fdf0cc; color: #a07800; }
.tier-platinum { background: #e6f0ff; color: #2563eb; }

.sprint-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px;
  min-width: 0;
}
.sprint-card.done { border-color: var(--ok); background: var(--ok-soft); }
.ssc-hub {
  display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr);
}
.ssc-hub.compact { margin-top: 4px; }
.ssc-game,
a.ssc-game {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px; color: inherit; box-shadow: none;
  transition: .2s var(--ease);
}
.ssc-game:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ssc-game b { display: block; font-size: 13.5px; line-height: 1.3; }
.ssc-game p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.ssc-game-ico {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 15px;
  display: grid; place-items: center; color: #fff;
  background: var(--tone, var(--brand));
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.ssc-stages { display: flex; flex-wrap: wrap; gap: 8px; }
.ssc-stages.sm { gap: 6px; }
.ssc-stage {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink-2); box-shadow: 0 1px 0 var(--line-2);
}
.ssc-stage.open { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.ssc-stage.done { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.ssc-stage.locked { opacity: .4; }
a.ssc-stage { color: inherit; text-decoration: none; }
.ssc-q-img {
  width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px;
  margin-top: 10px; background: var(--line-2);
}
#ssc-play { scroll-margin-top: calc(var(--top-h) + 14px); }
html[lang="hi"] body { font-family: "Noto Sans Devanagari", "Nunito", sans-serif; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] .ssc-hero h1 {
  font-family: "Noto Sans Devanagari", "Fredoka", sans-serif;
}

.seg-tog { display: inline-flex; margin: 0; vertical-align: middle; }
.seg-track {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  position: relative; min-width: 92px; height: 34px; padding: 3px;
  border-radius: 999px; background: var(--line-2); border: 1.5px solid var(--line);
}
.seg-track button {
  position: relative; z-index: 1;
  height: 26px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-weight: 800; font-size: 11.5px; letter-spacing: .02em;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.seg-track button svg { width: 15px; height: 15px; }
.seg-track button.on {
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 12px rgba(109, 94, 252, .32);
}
.seg-tog:not(.is-mini) { display: block; margin-top: 4px; }
.seg-tog:not(.is-mini) .seg-track { min-width: 180px; height: 42px; padding: 4px; }
.seg-tog:not(.is-mini) .seg-track button { height: 32px; font-size: 13px; padding: 0 14px; }
.topbar .seg-tog { flex: 0 0 auto; }
.ssc-audio-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 12px;
}
.ssc-audio-row .seg-tog { margin: 0; }
.ssc-audio-row .seg-track { min-width: 78px; }
.listen-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 12px;
}
.listen-btn { min-height: 40px; }
.listen-btn.is-on {
  background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand);
}
.note-body .is-reading,
.q-card.is-reading .q-text {
  border-radius: 12px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);
  background: color-mix(in srgb, var(--brand-soft) 70%, transparent);
  transition: box-shadow .2s var(--ease), background .2s var(--ease);
}

.mind-map {
  margin: 0 0 16px; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, #f59e0b 12%, var(--card)));
  border: 1px solid var(--line);
}
.mind-hub {
  display: inline-flex; margin-bottom: 10px; padding: 6px 12px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 13px;
}
.mind-nodes {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: flex-start; margin: 0;
}
.mind-nodes > span,
.note-body .mind-nodes span {
  display: inline-block; padding: 6px 10px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  margin: 0; white-space: normal; line-height: 1.35;
}
.avatar-crop {
  position: fixed; inset: 0; z-index: 80; background: rgba(15,16,32,.72);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.avatar-crop.hide { display: none; }
.avatar-crop-panel {
  width: min(420px, 100%); background: var(--card); border-radius: 20px;
  padding: 16px; box-shadow: var(--shadow-lg, 0 18px 40px rgba(15,16,32,.28));
}
.avatar-crop-panel h3 { margin: 0 0 4px; font-size: 18px; }
.avatar-crop-stage {
  height: min(52vh, 360px); border-radius: 16px; overflow: hidden;
  background: #181a30; margin: 12px 0; touch-action: none;
}
.avatar-crop-stage canvas { display: block; width: 100%; height: 100%; }
.avatar-crop-bar { display: flex; gap: 8px; }
.avatar-crop-bar .btn { flex: 1; }
.mind-tree {
  margin: 0 0 16px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(180deg, var(--brand-soft), var(--card));
  border: 1px solid var(--line);
}
.mind-tree .tree-hub {
  display: inline-flex; margin-bottom: 10px; padding: 6px 12px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 13px;
}
.mind-tree ul { list-style: none; margin: 0; padding-left: 16px; border-left: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.mind-tree .tree-root { padding-left: 0; border-left: 0; }
.mind-tree li { margin: 5px 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.mind-tree li span { display: inline-block; padding: 2px 0; }
.mind-tree li li { font-weight: 600; color: var(--ink-2); }
.note-info {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  margin: 0 0 14px;
}
.note-info div {
  padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; line-height: 1.45;
}
.note-info b { display: block; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--brand); margin-bottom: 2px; }
.note-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.note-fig { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.note-fig img { width: 100%; height: 168px; object-fit: cover; display: block; background: var(--line-2); }
.note-fig figcaption { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.4; }
.note-table-wrap { overflow-x: auto; margin: 0 0 16px; border-radius: 14px; border: 1px solid var(--line); }
.note-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.note-table caption { text-align: left; font-weight: 800; padding: 10px 12px 6px; }
.note-table th, .note-table td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.note-table th { background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.note-table tr:nth-child(even) td { background: color-mix(in srgb, var(--brand-soft) 35%, var(--card)); }
@media (max-width: 640px) {
  .note-figs, .note-info { grid-template-columns: 1fr; }
}
.note-intro { font-size: 15px; line-height: 1.65; }
.note-topic { margin: 16px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.note-topic h3 { margin: 0 0 8px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.note-topic h3 i {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
}
.note-topic.is-adv { border-color: #fb7185; }
.note-topic.is-adv h3 i { background: #ffe4e6; color: #9f1239; }
.note-ex, .note-trick {
  margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
}
.note-ex { background: var(--ok-soft, #ecfdf5); }
.note-trick { background: #fff7ed; }
.ssc-hero {
  --tone: var(--brand);
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  margin: 8px 0 14px; padding: 18px 16px 16px;
  border-radius: 22px; color: var(--ink);
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--tone) 28%, transparent), transparent 56%),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--tone) 8%, var(--card)));
  border: 1.5px solid color-mix(in srgb, var(--tone) 28%, var(--line));
  box-shadow: var(--shadow);
}
.ssc-hero h1 { margin: 0 0 2px; font-size: 28px; letter-spacing: -.03em; }
.ssc-kicker {
  margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--tone);
}
.ssc-hero-tag { margin: 0 0 8px; font-weight: 800; color: var(--ink-2); font-size: 13px; }
.ssc-hero-sub { margin: 0 0 10px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.ssc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ssc-pills span {
  height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 800; background: var(--card); border: 1px solid var(--line);
}
.ssc-hero-side { text-align: center; min-width: 96px; }
.ssc-hero-side .pup { margin: 0 auto 6px; width: 88px; height: 88px; max-width: 88px; max-height: 88px; }
.ssc-ring-wrap { position: relative; width: 76px; height: 76px; margin: 0 auto 6px; }
.ssc-ring {
  --p: 0; position: relative;
  width: 76px; height: 76px; border-radius: 50%;
  background: conic-gradient(var(--tone) calc(var(--p) * 1%), var(--line-2) 0);
}
.ssc-ring::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card);
}
.ssc-ring-num {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 1;
}
.ssc-ring-num b { font-size: 18px; line-height: 1; }
.ssc-ring-num small { font-size: 10px; color: var(--ink-2); font-weight: 800; }
.ssc-ch-card { border-left: 4px solid color-mix(in srgb, var(--tone, var(--brand)) 70%, var(--line)); }

.ssc-celebrate { position: relative; overflow: hidden; }
.ssc-coin-burst {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 7px 14px; border-radius: 999px; font-weight: 800;
  background: rgba(255,255,255,.22); color: #fff;
  animation: sscCoinPop .6s ease;
}
.ssc-confetti {
  pointer-events: none; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, #fbbf24 0 3px, transparent 4px),
    radial-gradient(circle at 78% 18%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 30% 70%, #f472b6 0 3px, transparent 4px),
    radial-gradient(circle at 88% 64%, #34d399 0 3px, transparent 4px),
    radial-gradient(circle at 50% 30%, #93c5fd 0 3px, transparent 4px);
  animation: sscConfetti 1.8s ease-out both;
}
@keyframes sscCoinPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sscConfetti { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.ssc-switch {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 12px;
  margin: 0 -2px 4px; scrollbar-width: none;
}
.ssc-switch::-webkit-scrollbar { display: none; }
.ssc-switch a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 13px; font-weight: 800; white-space: nowrap;
}
.ssc-switch a.on {
  border-color: var(--tone, var(--brand));
  background: color-mix(in srgb, var(--tone, var(--brand)) 16%, var(--card));
  color: var(--ink);
}
.ssc-switch a:hover { color: var(--ink); }
.ssc-rules {
  position: fixed; inset: 0; z-index: 220;
  display: grid; place-items: end center;
  background: color-mix(in srgb, var(--ink) 46%, transparent);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.ssc-rules.hide { display: none !important; }
.ssc-rules-card {
  width: min(520px, 100%);
  background: var(--card); border-radius: var(--r-xl) var(--r-xl) 18px 18px;
  padding: 18px 16px 16px; box-shadow: var(--shadow-2); max-height: 86vh; overflow: auto;
}
.ssc-rules-card h1, .ssc-rules-card h2 { margin: 2px 0 10px; font-size: 20px; }
.ssc-rules-list { margin: 0 0 16px; padding-left: 18px; }
.ssc-rules-list li { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.ssc-rules-page { max-width: 520px; margin: 18px auto 40px; }
button.ssc-stage { font-family: inherit; cursor: pointer; }

.logic-game { scroll-margin-top: calc(var(--top-h) + 14px); }
.logic-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  position: relative;
}
.logic-card::before {
  content: "";
  position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--brand), #a855f7 55%, var(--accent));
}
.logic-track {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px;
  margin: 4px -2px 8px; scrollbar-width: none;
}
.logic-track::-webkit-scrollbar { display: none; }
.logic-step {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card-2); color: var(--ink-2);
  font-weight: 800; font-size: 14px; display: grid; place-items: center;
  cursor: pointer; padding: 0; font-family: inherit; transition: .18s var(--ease);
}
.logic-step.open {
  border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.logic-step.done { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.logic-step.locked { opacity: .42; cursor: not-allowed; }
.logic-step.is-view { transform: translateY(-2px); }
.logic-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.logic-meta b { font-size: 15px; flex: 1 1 auto; min-width: 0; }
.logic-prompt { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); font-weight: 700; line-height: 1.45; }
.logic-board { margin-bottom: 12px; }
.logic-seq, .logic-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.logic-grid { flex-direction: column; align-items: center; gap: 6px; }
.logic-grid > div { display: flex; gap: 6px; }
.logic-seq span, .logic-grid span {
  min-width: 42px; height: 42px; padding: 0 10px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  background: var(--card-2); border: 1px solid var(--line);
}
.logic-seq span.is-q, .logic-grid span.is-q {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink);
}
.logic-opts { display: grid; gap: 8px; }
.logic-opt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  width: 100%; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 10px 12px; cursor: pointer;
  font: inherit; color: inherit; font-weight: 700; transition: .16s var(--ease);
}
.logic-opt i {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; background: var(--line-2); font-style: normal;
  font-size: 12px; font-weight: 800; color: var(--ink-2);
}
.logic-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.logic-opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.logic-opt.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.logic-opt:disabled { cursor: default; }
.logic-hint, .logic-why {
  margin: 10px 0 0; font-size: 13px; line-height: 1.45; padding: 9px 11px; border-radius: 12px;
}
.logic-hint { background: var(--accent-soft); color: var(--ink-2); }
.logic-why { background: var(--ok-soft); color: var(--ink-2); }
.logic-guest { margin: 12px 0 0; }
.logic-win { text-align: center; padding: 10px 6px 4px; }
.logic-win h3 { margin: 8px 0 4px; font-size: 20px; font-family: "Fredoka", sans-serif; }
.logic-play [data-logic-next] { margin-top: 12px; }

.sprint-goals { display: flex; gap: 8px; align-items: stretch; }
.sprint-goals > div { flex: 1; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 10px; }
.sprint-goals b { font-size: 15px; }
.sprint-goals span { font-size: 11px; color: var(--muted); display: block; }
.sprint-goals .sprint-ring {
  flex: 0 0 auto; display: grid; place-items: center;
  background: transparent; border: 0; padding: 0;
}

.lb-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center;
  background: var(--line-2); color: var(--ink-2); font-weight: 800; font-size: 13px;
}
.lb-rank.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.lb-rank.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.lb-rank.r3 { background: linear-gradient(135deg, #d8a26a, #b87333); color: #fff; }
.lb-row.me { background: var(--brand-soft); margin: 0 -10px; padding: 11px 10px; border-radius: 12px; border: 0; }

/* ------------------------------------------------------------- certificate */
.cert-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #312e81, #6d28d9 55%, #a855f7);
  padding: 18px; box-shadow: var(--shadow-2);
}
.cert-card::after {
  content: ""; position: absolute; right: -34px; top: -34px; width: 140px; height: 140px;
  border-radius: 50%; background: rgba(255,255,255,.10);
}
.cert-card > * { position: relative; z-index: 2; }
.cert-card .no { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.cert-card h3 { font-size: 16px; margin: 5px 0 3px; }
.cert-card .who { font-size: 12.5px; opacity: .9; }
.cert-card .grade {
  position: absolute; right: 16px; bottom: 16px;
  width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: grid; place-items: center; font-weight: 800; font-size: 17px; backdrop-filter: blur(3px);
}

.cert-viewport {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.cert-sheet {
  --cert-w: 1123px;
  --cert-h: 794px;
  width: var(--cert-w);
  height: var(--cert-h);
  flex: 0 0 auto;
  box-sizing: border-box;
  transform-origin: top center;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 213, 74, .18), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(109, 94, 252, .12), transparent 32%),
    linear-gradient(180deg, #fffdf6 0%, #fff 42%, #f7f4ff 100%);
  color: #1a1a2e;
  border-radius: 8px;
  padding: 12px;
  position: relative;
  box-shadow: 0 18px 50px rgba(49, 46, 129, .16);
}
.cert-frame {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid #c9a227;
  outline: 7px solid #4c1d95;
  outline-offset: -14px;
  padding: 26px 56px 20px;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cert-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 8px;
}
.cert-logo .pup { width: 92px; height: 92px; max-width: 92px; max-height: 92px; margin: 0; }
.cert-logo .pup-cape, .cert-logo .pup-spark { display: none; }
.cert-logo span {
  font-size: 17px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #6d5efc;
  font-weight: 800;
}
.cert-frame::before {
  content: "";
  position: absolute; inset: 18px;
  border: 1px solid rgba(201, 162, 39, .45);
  pointer-events: none;
}
.cert-corner {
  position: absolute; width: 28px; height: 28px; border: 2px solid #c9a227; z-index: 2;
}
.cert-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.cert-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.cert-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.cert-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.cert-ribbon {
  display: inline-flex; margin: 2px auto 10px; padding: 6px 20px;
  background: linear-gradient(135deg, #6d28d9, #6d5efc);
  color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase;
}
.cert-seal {
  width: 92px; height: 92px; margin: 4px auto 8px;
  display: grid; place-items: center;
  background: radial-gradient(circle, #fff 40%, #fff3c4 72%, #c9a227);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px #c9a227;
}
.cert-seal img { width: 72px; height: 72px; display: block; }
.cert-brand {
  margin: 0; font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: #6d5efc; font-weight: 800;
}
.cert-kicker {
  margin: 8px 0 0; font-size: 16px; color: #5b5678;
  font-family: "Cormorant Garamond", "Times New Roman", serif; font-style: italic;
}
.cert-sheet h1,
.cert-title {
  display: block;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 42px; margin: 6px 0 0; letter-spacing: .05em;
  color: #2e1065; font-weight: 700; line-height: 1.15;
}
.cert-sheet h1 .pup,
.cert-title .pup { display: none !important; }
.cert-rule {
  width: 220px; height: 2px; margin: 14px auto 6px;
  background: linear-gradient(90deg, transparent, #c9a227, transparent);
}
.cert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 8px 0 4px;
}
.cert-lead, .cert-mid { margin: 0; font-size: 16px; color: #5b5678; }
.cert-name {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 54px; font-weight: 700; font-style: italic;
  margin: 10px 0 8px; color: #4c1d95; line-height: 1.1;
}
.cert-course {
  font-size: 22px; font-weight: 800; margin: 10px 0 8px; color: #1a1a2e;
}
.cert-score { margin: 0; font-size: 15px; color: #3f3a5a; }
.cert-authority {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px;
  align-items: end; margin-top: 8px; padding-top: 10px; text-align: center;
}
.cert-sign-block { text-align: left; }
.cert-sign-script {
  display: block; font-family: "Great Vibes", cursive;
  font-size: 42px; color: #4c1d95; line-height: 1; margin-bottom: 4px;
}
.cert-sign-line {
  display: block; width: 190px; height: 1px; background: #c9a227; margin: 0 0 8px;
}
.cert-sign-block b { display: block; font-size: 15px; color: #1a1a2e; }
.cert-sign-block em, .cert-sign-block small {
  display: block; font-style: normal; font-size: 12.5px; color: #6b6584;
}
.cert-medal {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(180deg, #ffe082, #c9a227);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 4px #fff8, 0 0 0 3px #c9a227;
}
.cert-medal .pup { width: 78px; height: 78px; max-width: 78px; max-height: 78px; margin: 0; }
.cert-medal .pup-cape, .cert-medal .pup-hearts, .cert-medal .pup-spark { display: none; }
.cert-medal img { width: 56px; height: 56px; display: block; }
.cert-sheet .pup * { animation: none !important; }
.cert-sheet svg { overflow: visible; max-width: none; }
.cert-meta-block { text-align: right; font-size: 12.5px; color: #6b6584; }
.cert-meta-block b { display: block; font-size: 14px; color: #1a1a2e; margin-top: 8px; }
.cert-meta-block b:first-child { margin-top: 0; }
.cert-meta-block span, .cert-meta-block small { display: block; }
.cert-verify {
  margin: 14px 0 0; font-size: 12px; color: #7a7494; letter-spacing: .01em;
  word-break: break-all;
}
.cert-onpage { margin: 14px 0 4px; overflow: hidden; }
@media print {
  html, body {
    width: 297mm !important;
    height: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.is-printing-cert * { visibility: hidden; }
  body.is-printing-cert .is-print-target,
  body.is-printing-cert .is-print-target * { visibility: visible; }
  body.is-printing-cert .is-print-target {
    position: fixed; inset: 0; margin: 0; width: 297mm; height: 210mm;
    overflow: hidden;
  }
  body.is-printing-cert .no-print { display: none !important; visibility: hidden !important; }
  body.is-printing-cert .cert-viewport,
  .print-stage .cert-viewport {
    width: 297mm !important;
    height: 210mm !important;
    overflow: hidden !important;
  }
  body.is-printing-cert .cert-sheet,
  .print-stage .cert-sheet {
    width: 297mm !important;
    height: 210mm !important;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
}

/* ------------------------------------------------------------- forms */
.field { display: block; margin-bottom: 14px; }
.field > label, .field > span:first-child, .lbl {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  margin-bottom: 6px; letter-spacing: .01em;
}
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--card); color: var(--ink); font-size: 15px;
  transition: .15s var(--ease); appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); outline: 0;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c81a1' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.field-error { color: var(--danger); font-size: 12px; font-weight: 600; margin-top: 5px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
.field-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }

.otp-row { display: flex; gap: 6px; justify-content: center; }
.otp-row input {
  width: min(44px, 12vw); height: 52px; text-align: center; font-size: 20px; font-weight: 800;
  border: 1.8px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink);
  min-width: 0; padding: 0;
}
.otp-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); outline: 0; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: 0 0 auto; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: .2s var(--ease); flex: 0 0 auto;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }

.seg { display: inline-flex; background: var(--line-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg a, .seg button {
  padding: 7px 14px; border-radius: 10px; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.seg a.on, .seg button.on { background: var(--card); color: var(--brand-ink); box-shadow: var(--shadow-1); }

/* ------------------------------------------------------------- feedback */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; font-weight: 600; line-height: 1.5;
}
.alert svg { width: 18px; height: 18px; margin-top: 1px; }
.alert-success { background: var(--ok-soft); color: #14663a; }
.alert-error { background: var(--danger-soft); color: #b3261e; }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); }
.alert-warn { background: var(--accent-soft); color: #8a5000; }
[data-theme="dark"] .alert-success { color: #6ee7a0; }
[data-theme="dark"] .alert-error { color: #ff9b91; }
[data-theme="dark"] .alert-warn { color: var(--accent); }

#toasts {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + 18px); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; width: calc(100% - 28px); max-width: 420px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #1c1f36; color: #fff; padding: 12px 15px; border-radius: 14px;
  box-shadow: var(--shadow-2); font-size: 13.5px; font-weight: 600;
  animation: toastIn .32s var(--ease);
}
.toast.ok { background: #16704a; }
.toast.err { background: #9f2a24; }
.toast.coin { background: linear-gradient(135deg, #f59e0b, #ef4444); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty .em { font-size: 40px; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 13.5px; margin: 0 auto 16px; max-width: 34ch; }

.skeleton { background: linear-gradient(90deg, var(--line-2), var(--line), var(--line-2)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* reward burst */
.reward-pop {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: rgba(12, 12, 28, .55); backdrop-filter: blur(5px);
  animation: fadeIn .2s ease;
}
.reward-pop .box {
  background: var(--card); border-radius: var(--r-xl); padding: 28px 24px; text-align: center;
  max-width: 320px; box-shadow: var(--shadow-2); animation: popIn .42s var(--ease);
}
.reward-pop .em { font-size: 52px; line-height: 1; margin-bottom: 10px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.82) translateY(14px); } }

/* ------------------------------------------------------------- sheets */
.sheet-bg {
  position: fixed; inset: 0; z-index: 150; background: rgba(12, 12, 28, .5);
  backdrop-filter: blur(3px); animation: fadeIn .2s ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 160;
  background: var(--card); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-2);
  animation: sheetUp .34s var(--ease);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet .grab { width: 42px; height: 4px; border-radius: 999px; background: var(--line); margin: 6px auto 14px; }
.sheet-list a, .sheet-list button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 4px; border: 0; background: none; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: var(--ink); text-align: left;
  border-bottom: 1px solid var(--line-2);
}
.sheet-list a:last-child, .sheet-list button:last-child { border-bottom: 0; }
.sheet-list svg { color: var(--muted); }

/* ------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.tbl th, table.tbl td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl th {
  background: var(--card-2); font-size: 11.5px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; position: sticky; top: 0;
}
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--line-2); }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px;
  display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 700;
}
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------------------------------------- footer */
.two-col { display: grid; gap: 18px; min-width: 0; }
.two-col > * { min-width: 0; }

/* ------------------------------------------------------------- auth */
.auth-body {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(820px 380px at 8% -8%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 58%),
    radial-gradient(640px 340px at 108% 6%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 52%),
    radial-gradient(520px 260px at 50% 108%, color-mix(in srgb, #22c55e 12%, transparent), transparent 50%),
    var(--bg);
}
.auth-body #toasts { bottom: 24px; }
.auth-wrap {
  flex: 1; display: grid; place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px 16px;
  width: 100%;
}
.auth-shell { width: 100%; max-width: 440px; }
.auth-card {
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px 22px 20px;
  box-shadow: var(--shadow-2);
}
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head .brand-logo { margin: 0 auto 4px; width: fit-content; }
.auth-kicker {
  margin: 0 0 6px; font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
}
.auth-head h1 { font-size: 24px; margin: 0 0 8px; }
.auth-head p { margin: 0 auto; max-width: 34ch; color: var(--ink-2); font-size: 14px; }

.auth-promises {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px;
}
.auth-promises li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.auth-promises li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat;
}

.auth-steps {
  list-style: none; display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 6px; margin: 0 0 18px; padding: 0;
}
.auth-steps li {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; border-radius: 999px; background: var(--line-2);
  font-size: 11.5px; font-weight: 700; color: var(--muted);
}
.auth-steps li span {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); font-size: 10px; font-weight: 800;
}
.auth-steps li.on { background: var(--brand-soft); color: var(--brand-ink); }
.auth-steps li.on span { background: var(--brand); color: #fff; }
.auth-steps li.done { color: var(--ok); }

.auth-more, .auth-alt {
  border: 1px dashed var(--line); border-radius: 16px;
  padding: 4px 12px; margin: 4px 0 16px; background: var(--card-2);
}
.auth-more summary, .auth-alt summary {
  cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 700;
  color: var(--ink-2); padding: 10px 0; display: flex; align-items: center; gap: 8px;
}
.auth-more summary::-webkit-details-marker,
.auth-alt summary::-webkit-details-marker { display: none; }
.auth-more summary::before, .auth-alt summary::before {
  content: "+"; width: 22px; height: 22px; border-radius: 8px;
  display: grid; place-items: center; background: var(--card);
  border: 1px solid var(--line); color: var(--brand); font-weight: 800; flex: 0 0 auto;
}
.auth-more[open] summary::before, .auth-alt[open] summary::before { content: "–"; }
.auth-more-body { padding: 4px 0 10px; }
.auth-alt { margin-top: 16px; }

.auth-pass-panel,
.auth-otp-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: var(--card-2);
  margin: 0 0 4px;
}
.auth-otp-panel {
  background: transparent;
  border-style: dashed;
}
.auth-panel-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.auth-panel-hint {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.auth-pass-panel .btn-primary { margin-top: 4px; }
.auth-otp-panel .btn-outline { margin-top: 4px; }

.perk-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2);
}
.perk-row > div {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-2);
  background: var(--line-2); border-radius: 14px; padding: 10px 4px;
}
.perk-row .em { display: block; font-size: 18px; margin-bottom: 4px; }

.auth-foot {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  font-size: 13px; font-weight: 600;
}
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--brand); }

/* ------------------------------------------------------------- error pages */
.error-page {
  display: grid; place-items: center; padding: 48px 16px 28px;
}
body:not(.has-tabbar) .error-page { min-height: 100dvh; padding: 28px 16px; }
.error-card {
  width: 100%; max-width: 440px; text-align: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 28px; padding: 32px 22px; box-shadow: var(--shadow-1);
}
.error-card .em { font-size: 44px; margin-bottom: 10px; }
.error-card h1 { font-size: 24px; margin: 0 0 8px; }
.error-card p { color: var(--ink-2); margin: 0 auto 18px; max-width: 36ch; }

.site-foot { margin-top: 34px; padding: 26px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-foot h4 { font-size: 13px; color: var(--ink); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.site-foot a { color: var(--muted); display: block; padding: 4px 0; }
.site-foot a:hover { color: var(--brand); }
.foot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.foot-social { display: flex; gap: 8px; }
.foot-social a { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); display: grid; place-items: center; }

/* ------------------------------------------------------------- responsive */
@media (min-width: 600px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.four { grid-template-columns: repeat(4, 1fr); }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .field-2 { grid-template-columns: 1fr 1fr; }
  .hero-slide { flex: 0 0 calc(70% - 6px); }
  .foot-grid { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 28px; }
}

@media (min-width: 900px) {
  :root { --top-h: 72px; }
  body.has-tabbar { padding-bottom: 0; }
  .tabbar-dock, .tabbar { display: none; }
  .topbar .wrap { gap: 12px; max-width: 1320px; }
  .top-nav { display: flex; flex: 1 1 auto; justify-content: center; min-width: 0; flex-wrap: nowrap; }
  .top-nav a { padding: 7px 11px; white-space: nowrap; }
  .only-desktop { display: revert; }
  .top-search { display: flex; flex: 0 1 240px; max-width: 280px; }
  .top-search-icon { display: none !important; }
  .only-mobile { display: none !important; }
  .topbar .grow { display: none; }
  .brand { flex: 0 0 auto; min-width: max-content; max-width: none; }
  .brand-name, .brand-title { max-width: none; overflow: visible; text-overflow: unset; white-space: nowrap; }
  .brand-name small { display: block; }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .badge-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-slide { flex: 0 0 calc(50% - 6px); min-height: 210px; }
  .hero-slide h2 { font-size: 24px; }
  #toasts { bottom: 24px; }
  .two-col { grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
  .two-col.wide-right { grid-template-columns: 340px minmax(0, 1fr); }
  .sticky-side { position: sticky; top: calc(var(--top-h) + 18px); }
  .section { margin: 32px 0; }
  .ssc-switch { justify-content: flex-start; overflow: visible; flex-wrap: wrap; }
  .ssc-hub { grid-template-columns: repeat(5, 1fr); }
  .ssc-hub.compact { grid-template-columns: repeat(5, 1fr); }
  .logic-opts { grid-template-columns: 1fr 1fr; }
  .logic-track { justify-content: space-between; overflow: visible; }
  .logic-step { flex: 1 1 0; max-width: 52px; }
  .auth-card { padding: 32px 28px 24px; }
  .auth-head h1 { font-size: 28px; }
}

@media (min-width: 1100px) {
  .course-grid { grid-template-columns: repeat(4, 1fr); }
  .top-nav a { padding: 8px 13px; }
  .top-search { flex-basis: 280px; max-width: 320px; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 12px; }
  .brand-title { max-width: min(42vw, 132px); }
  .btn-signin { width: 38px; min-height: 38px; padding: 0; border-radius: 12px; }
  .btn-signin-label { display: none; }
  .coin-chip span { max-width: 4.5ch; overflow: hidden; text-overflow: ellipsis; }
  .search-go { width: 48px; min-width: 48px; padding: 0; }
  .search-go span { display: none; }
  .auth-card { padding: 22px 16px 16px; border-radius: 22px; }
  .auth-head h1 { font-size: 22px; }
  .auth-steps li { font-size: 10.5px; gap: 4px; }
  .perk-row > div { font-size: 10px; padding: 8px 2px; }
  .tabbar a { font-size: 9px; }
  .hero-slide { min-height: 176px; padding: 14px 8px 14px 14px; }
  .hero-slide h2 { font-size: 17px; }
  .hero-slide p { font-size: 12.5px; margin-bottom: 10px; }
  .hero-copy { max-width: calc(100% - 100px); }
  .hero-actor .pup { width: 96px; height: 96px; max-width: 96px; max-height: 96px; }
  .subkit { flex: 0 0 112px; width: 112px; height: 118px; }
  .tool-chip { width: 44px; height: 44px; border-radius: 14px; }
  .tool-chip svg { width: 30px; height: 30px; }
  .tool-chip.t4 { width: 38px; height: 38px; }
  .learn-card .ring { display: none; }
  .learn-card .thumb { width: 84px; height: 84px; }
}

@media print {
  .topbar, .tabbar, .tabbar-dock, .no-print, #toasts { display: none !important; }
  body { background: #fff; padding: 0; }
}

/* ------------------------------------------------------------- motion + puppy */
.btn, .card-link, .course-card, .cat-tile, .chip, .icon-btn, .coin-chip {
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), filter .22s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.coin-chip { animation: coinIdle 2.8s ease-in-out infinite; }
.coin-chip:hover { transform: translateY(-2px) scale(1.04); }
@keyframes coinIdle {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 159, 28, .0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 159, 28, .12); }
}
.top-nav a svg { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }

.pup {
  margin: 0 auto 8px; text-align: center;
  display: inline-block; line-height: 0; flex: 0 0 auto;
  width: 132px; height: 132px; max-width: 132px; max-height: 132px;
  aspect-ratio: 1 / 1; overflow: hidden; vertical-align: middle;
  box-sizing: border-box;
}
.pup svg { width: 100%; height: auto; display: block; overflow: visible; }
.pup-stage {
  position: relative; display: block;
  width: 100%; height: 100%;
  aspect-ratio: 1 / 1;
  transform-origin: 50% 88%;
}
.pup-art,
img.pup-art {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center bottom;
  display: block !important;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  user-select: none;
}
.pup-blob {
  position: absolute; left: 22%; right: 22%; bottom: 2%;
  height: 7%; border-radius: 999px;
  background: rgba(25, 28, 52, .16);
  opacity: .16;
}
.pup-glint {
  position: absolute; width: 11px; height: 11px; pointer-events: none;
  background: #ffd54a; opacity: 0;
  clip-path: polygon(50% 0, 61% 35%, 100% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 0 35%, 39% 35%);
}
.pup-glint.a { top: 8%; left: 8%; }
.pup-glint.b { top: 2%; right: 14%; width: 8px; height: 8px; background: #ffe082; }
.pup-glint.c { top: 28%; right: 2%; width: 7px; height: 7px; background: #ffb703; }
.pup-xs .pup-glint, .pup-xs .pup-blob,
.pup-sm .pup-glint { display: none; }

/* Still by default — move only on hover / focus / loader */
.pup-stage { animation: none; }
.pup-blob, .pup-glint { animation: none; }
[data-pup="load"] .pup-stage { animation: pupHop 1.5s cubic-bezier(.22,.8,.28,1) infinite; }
[data-pup="load"] .pup-blob { animation: pupBlob 1.5s ease-in-out infinite; }
[data-pup="load"] .pup-glint { opacity: .9; animation: pupTwinkle 1.2s ease-in-out infinite; }

.course-card:hover .pup-stage,
.course-card:focus-within .pup-stage,
.learn-card:hover .pup-stage,
a.card-link:hover .pup-stage,
.pup-banner:hover .pup-stage,
.spark-pup:hover .pup-stage,
.sprint-card:hover .pup-stage,
.hero-slide:hover .pup-stage,
.cover-art:hover .pup-stage {
  animation: pupBob 1.1s ease-in-out infinite;
}
.course-card:hover [data-pup="wave"] .pup-stage,
.course-card:hover [data-pup="yay"] .pup-stage,
.course-card:hover [data-pup="wow"] .pup-stage,
.pup-banner:hover [data-pup="wave"] .pup-stage,
.hero-slide:hover [data-pup="wave"] .pup-stage,
.hero-slide:hover [data-pup="yay"] .pup-stage {
  animation: pupLeap 1.05s ease-in-out infinite;
}
.spark-pup:hover [data-pup="think"] .pup-stage,
.course-card:hover [data-pup="think"] .pup-stage {
  animation: pupThink 1.2s ease-in-out infinite;
}
.course-card:hover .pup-glint,
.learn-card:hover .pup-glint,
.pup-banner:hover .pup-glint,
.spark-pup:hover .pup-glint,
.hero-slide:hover .pup-glint,
.cover-art:hover .pup-glint {
  opacity: .95; animation: pupTwinkle 1.1s ease-in-out infinite;
}
.course-card:hover .pup-blob,
.learn-card:hover .pup-blob,
.pup-banner:hover .pup-blob {
  animation: pupBlob 1.1s ease-in-out infinite;
}

@keyframes pupBob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-6px) rotate(1.8deg); }
}
@keyframes pupLeap {
  0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
  42% { transform: translateY(-12px) rotate(4deg) scale(1.04); }
}
@keyframes pupThink {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}
@keyframes pupHop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  38% { transform: translateY(-22px) scale(1.04, .97); }
  52% { transform: translateY(2px) scale(1.06, .9); }
}
@keyframes pupSad {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(3px) rotate(6deg); }
}
@keyframes pupTwinkle {
  0%, 100% { transform: scale(.55) rotate(12deg); opacity: .25; }
  50% { transform: scale(1.15) rotate(-8deg); opacity: 1; }
}
@keyframes pupBlob {
  0%, 100% { transform: scaleX(1); opacity: .18; }
  50% { transform: scaleX(.72); opacity: .1; }
}
.pup-xs { width: 36px; height: 36px; max-width: 36px; max-height: 36px; }
.pup-sm { width: 88px; height: 88px; max-width: 88px; max-height: 88px; }
.pup-md { width: 132px; height: 132px; max-width: 132px; max-height: 132px; }
.pup-lg { width: 168px; height: 168px; max-width: 168px; max-height: 168px; }
.pup-cap { display: none; }
[data-pup-cap="1"] .pup-cap { display: block; }
.pup-cape, .pup-wave-arm, .pup-binocs, .pup-compass,
.pup-hearts, .pup-question, .pup-zzz { opacity: 0; pointer-events: none; }
.pup-mouth-happy, .pup-mouth-sad, .pup-eye-happy { display: none; }
.pup-brows { opacity: 0; }
.pup-blush { opacity: .9; }
.pup-wave-arm { transform-box: fill-box; transform-origin: 90% 90%; }

.brand .brand-logo .pup { width: 42px; height: 42px; max-width: 42px; max-height: 42px; }

.pup-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 28px; padding: 18px 18px 10px 20px; margin: 14px 0 18px;
  overflow: hidden; position: relative;
}
.pup-banner-copy { min-width: 0; flex: 1; padding-bottom: 8px; }
.pup-banner-copy h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.03em; }
.pup-banner-copy p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); max-width: 32ch; }
.pup-banner .pup {
  flex: 0 0 120px; width: 120px !important; height: 120px !important;
  max-width: 120px; max-height: 120px; margin: 0 -6px -8px 0; overflow: hidden;
}
.pup-banner .pup-stage,
.pup-banner .pup-art {
  width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important;
}
.pup-banner-sky { background: linear-gradient(180deg, #e8f1ff 0%, #d6e8ff 100%); }
.pup-banner-mint { background: linear-gradient(180deg, #e7f8ee 0%, #d4f0df 100%); }
.pup-banner-sun { background: linear-gradient(180deg, #fff3e0 0%, #ffe4b8 100%); }
.pup-banner-brand { background: linear-gradient(180deg, #efedff 0%, #ddd6fe 100%); }
[data-theme="dark"] .pup-banner-sky { background: linear-gradient(180deg, #1a2744, #152033); }
[data-theme="dark"] .pup-banner-mint { background: linear-gradient(180deg, #14301f, #102418); }
[data-theme="dark"] .pup-banner-sun { background: linear-gradient(180deg, #3a2c15, #2a2010); }
[data-theme="dark"] .pup-banner-brand { background: linear-gradient(180deg, #24224a, #1b1840); }

.section-head h2,
main h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-head h2 .pup,
main h1 .pup { width: 36px; height: 36px; margin: 0; flex: 0 0 auto; }
.sprint-card { position: relative; }
.sprint-card .pup-float,
.card > .pup-float { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; margin: 0; pointer-events: none; }

.pup-quiz-coach {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 10px;
  padding: 0; border: 0; background: transparent; width: 100%; text-align: left;
  font-size: 13px; font-weight: 700; color: var(--brand-ink);
  font-family: "Fredoka", sans-serif; font-synthesis: none; cursor: pointer;
}
.pup-quiz-coach .pup { width: 48px; height: 48px; margin: 0; }
.pup figcaption { margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.pup-eye { fill: #2a1c14; }
.pup-shadow { fill: rgba(25, 28, 52, .12); transform-box: fill-box; transform-origin: center; }
.pup-tear, .pup-spark { opacity: 0; }
.pup-rig {
  transform-box: fill-box;
  transform-origin: 50% 92%;
}
.pup-head, .pup-body, .pup-tail, .pup-paw, .pup-hearts,
.pup-question, .pup-zzz, .pup-compass, .pup-binocs, .pup-cape, .pup-spark,
.pup-gaze, .pup-blush {
  transform-box: fill-box; transform-origin: center;
}
.pup-paw.l { transform-origin: 50% 0%; }
.pup-paw.r { transform-origin: 50% 0%; }
.pup-ear { transform-box: fill-box; transform-origin: 70% 20%; }
.pup-ear.l { transform-origin: 80% 20%; }
.pup-ear.r { transform-origin: 20% 20%; }

/* Old SVG limb animations — keep inert; PNG puppies use hover/load motion only */
[data-pup] .pup-rig,
[data-pup] .pup-body,
[data-pup] .pup-head,
[data-pup] .pup-tail,
[data-pup] .pup-paw,
[data-pup] .pup-ear,
[data-pup] .pup-gaze,
[data-pup] .pup-blush,
[data-pup] .pup-shadow,
[data-pup] .pup-wave-arm,
[data-pup] .pup-spark,
[data-pup] .pup-hearts,
[data-pup] .pup-question,
[data-pup] .pup-binocs,
[data-pup] .pup-compass,
[data-pup] .pup-eye {
  animation: none !important;
}
[data-pup="idle"] .pup-body { animation: pupTorso 2.6s ease-in-out infinite; }
[data-pup="idle"] .pup-head { animation: pupBreath 2.6s ease-in-out infinite; }
[data-pup="idle"] .pup-tail { animation: pupWag 1.4s ease-in-out infinite; }
[data-pup="idle"] .pup-paw.l { animation: pupStepL 1.2s ease-in-out infinite; }
[data-pup="idle"] .pup-paw.r { animation: pupStepR 1.2s ease-in-out infinite; }
[data-pup="idle"] .pup-ear.l { animation: pupEarFlop 2.6s ease-in-out infinite; }
[data-pup="idle"] .pup-ear.r { animation: pupEarFlop 2.6s ease-in-out infinite .18s; }
[data-pup="idle"] .pup-eye { animation: pupBlink 4.2s step-end infinite; }
[data-pup="idle"] .pup-gaze { animation: pupGaze 4.8s ease-in-out infinite; }
[data-pup="idle"] .pup-blush { animation: pupCheek 2.4s ease-in-out infinite; }
[data-pup="idle"] .pup-shadow { animation: pupShadowIdle 2.6s ease-in-out infinite; }

/* load — full-body hop / run while something is saving */
[data-pup="load"] .pup-rig { animation: pupRun .55s ease-in-out infinite; }
[data-pup="load"] .pup-body { animation: pupTorsoSquash .55s ease-in-out infinite; }
[data-pup="load"] .pup-head { animation: pupHeadBob .55s ease-in-out infinite; }
[data-pup="load"] .pup-paw.l { animation: pupRunPaw .28s ease-in-out infinite; }
[data-pup="load"] .pup-paw.r { animation: pupRunPaw .28s ease-in-out infinite reverse; }
[data-pup="load"] .pup-ear { animation: pupEarFlop .35s ease-in-out infinite alternate; }
[data-pup="load"] .pup-tail { animation: pupWag .32s ease-in-out infinite; }
[data-pup="load"] .pup-shadow { animation: pupShadowHop .55s ease-in-out infinite; }

/* yay / happy — leap, smile, cape, sparkles, landing squash */
[data-pup="yay"] .pup-cape { opacity: 1; }
[data-pup="yay"] .pup-wave-arm { opacity: 1; animation: pupHi .55s ease-in-out infinite alternate; }
[data-pup="yay"] .pup-rig { animation: pupLeap .7s ease-in-out infinite; }
[data-pup="yay"] .pup-body { animation: pupTorsoSquash .7s ease-in-out infinite; }
[data-pup="yay"] .pup-paw.l, [data-pup="yay"] .pup-paw.r { animation: pupPawTuck .7s ease-in-out infinite; }
[data-pup="yay"] .pup-ear { animation: pupEarFlop .35s ease-in-out infinite alternate; }
[data-pup="yay"] .pup-tail { animation: pupWag .28s ease-in-out infinite; }
[data-pup="yay"] .pup-spark { opacity: 1; animation: pupSpark .7s ease-in-out infinite; }
[data-pup="yay"] .pup-mouth-idle { display: none; }
[data-pup="yay"] .pup-mouth-happy { display: block; }
[data-pup="yay"] .pup-gaze { display: none; }
[data-pup="yay"] .pup-eye-happy { display: block; }
[data-pup="yay"] .pup-blush { opacity: 1; animation: pupCheek .9s ease-in-out infinite; }
[data-pup="yay"] .pup-shadow { animation: pupShadowHop .7s ease-in-out infinite; }

/* wow / very happy — whole body bounce, hearts */
[data-pup="wow"] .pup-cape { opacity: 1; }
[data-pup="wow"] .pup-hearts { opacity: 1; animation: pupFloat 1.4s ease-in-out infinite; }
[data-pup="wow"] .pup-spark { opacity: 1; animation: pupSpark .8s ease-in-out infinite; }
[data-pup="wow"] .pup-rig { animation: pupLeap .85s ease-in-out infinite; }
[data-pup="wow"] .pup-body { animation: pupTorsoSquash .85s ease-in-out infinite; }
[data-pup="wow"] .pup-paw.l { animation: pupStepL .6s ease-in-out infinite; }
[data-pup="wow"] .pup-paw.r { animation: pupStepR .6s ease-in-out infinite; }
[data-pup="wow"] .pup-ear { animation: pupEarFlop .45s ease-in-out infinite alternate; }
[data-pup="wow"] .pup-tail { animation: pupWag .32s ease-in-out infinite; }
[data-pup="wow"] .pup-mouth-idle { display: none; }
[data-pup="wow"] .pup-mouth-happy { display: block; }
[data-pup="wow"] .pup-gaze { display: none; }
[data-pup="wow"] .pup-eye-happy { display: block; }
[data-pup="wow"] .pup-blush { opacity: 1; animation: pupCheek .8s ease-in-out infinite; }
[data-pup="wow"] .pup-shadow { animation: pupShadowHop .85s ease-in-out infinite; }

/* sad — whole body slumps */
[data-pup="sad"] .pup-rig { animation: pupSlump 2s ease-in-out infinite; }
[data-pup="sad"] .pup-head { animation: pupDroop 2s ease-in-out infinite; }
[data-pup="sad"] .pup-ear { animation: pupEarDown 2s ease-in-out infinite; }
[data-pup="sad"] .pup-tear { opacity: 1; animation: pupTear 1.6s ease-in infinite; }
[data-pup="sad"] .pup-mouth-idle { display: none; }
[data-pup="sad"] .pup-mouth-sad { display: block; }
[data-pup="sad"] .pup-brows { opacity: 1; }
[data-pup="sad"] .pup-brow { transform: translateY(3px) rotate(12deg); }
[data-pup="sad"] .pup-tail { animation: none; transform: rotate(28deg) translateY(4px); }
[data-pup="sad"] .pup-paw { transform: translateY(2px); }
[data-pup="sad"] .pup-blush { opacity: .25; }

/* think — lean the whole body, paw lifts */
[data-pup="think"] .pup-question { opacity: 1; animation: pupBob 1.6s ease-in-out infinite; }
[data-pup="think"] .pup-rig { animation: pupThinkLean 2.2s ease-in-out infinite; }
[data-pup="think"] .pup-head { animation: pupTilt 2.2s ease-in-out infinite; }
[data-pup="think"] .pup-paw.l { animation: pupPawThink 2.2s ease-in-out infinite; }
[data-pup="think"] .pup-ear.l { animation: pupEarFlop 2.2s ease-in-out infinite; }
[data-pup="think"] .pup-eye { animation: pupBlink 3s step-end infinite; }
[data-pup="think"] .pup-gaze { animation: pupGaze 3.6s ease-in-out infinite; }
[data-pup="think"] .pup-brows { opacity: 1; }
[data-pup="think"] .pup-tail { animation: pupWag 2s ease-in-out infinite; }

/* wave — body sways, arm waves, tail, ears */
[data-pup="wave"] .pup-cape { opacity: 1; }
[data-pup="wave"] .pup-wave-arm { opacity: 1; animation: pupHi .5s ease-in-out infinite alternate; }
[data-pup="wave"] .pup-rig { animation: pupSway 1.4s ease-in-out infinite; }
[data-pup="wave"] .pup-head { animation: pupBreath 2.4s ease-in-out infinite; }
[data-pup="wave"] .pup-paw.l { animation: pupStepL 1.4s ease-in-out infinite; }
[data-pup="wave"] .pup-paw.r { animation: pupStepR 1.4s ease-in-out infinite; }
[data-pup="wave"] .pup-ear { animation: pupEarFlop .7s ease-in-out infinite alternate; }
[data-pup="wave"] .pup-tail { animation: pupWag .7s ease-in-out infinite; }
[data-pup="wave"] .pup-mouth-idle { display: none; }
[data-pup="wave"] .pup-mouth-happy { display: block; }
[data-pup="wave"] .pup-gaze { animation: pupGaze 3.2s ease-in-out infinite; }
[data-pup="wave"] .pup-blush { opacity: 1; animation: pupCheek 1.4s ease-in-out infinite; }

/* explore — walk in place, look around */
[data-pup="explore"] .pup-binocs { opacity: 1; animation: pupBob 1.8s ease-in-out infinite; }
[data-pup="explore"] .pup-compass { opacity: 1; animation: pupSpin 3.2s linear infinite; }
[data-pup="explore"] .pup-rig { animation: pupWalk 1.1s ease-in-out infinite; }
[data-pup="explore"] .pup-head { animation: pupLook 2.4s ease-in-out infinite; }
[data-pup="explore"] .pup-paw.l { animation: pupRunPaw .55s ease-in-out infinite; }
[data-pup="explore"] .pup-paw.r { animation: pupRunPaw .55s ease-in-out infinite reverse; }
[data-pup="explore"] .pup-ear { animation: pupEarFlop .9s ease-in-out infinite alternate; }
[data-pup="explore"] .pup-tail { animation: pupWag 1s ease-in-out infinite; }
[data-pup="explore"] .pup-eye { animation: pupBlink 5s step-end infinite; }
[data-pup="explore"] .pup-gaze { animation: pupGaze 2.2s ease-in-out infinite; }
[data-pup="explore"] .pup-shadow { animation: pupShadowIdle 1.1s ease-in-out infinite; }

@keyframes pupBreath { 50% { transform: translateY(-2px); } }
@keyframes pupIdleBob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-4px) rotate(1.8deg); }
}
@keyframes pupTorso {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.03, .97) translateY(1px); }
}
@keyframes pupTorsoSquash {
  0%, 100% { transform: scale(1, 1); }
  40% { transform: scale(.94, 1.08); }
  70% { transform: scale(1.08, .92); }
}
@keyframes pupWag { 50% { transform: rotate(26deg); } }
@keyframes pupBlink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.12); } }
@keyframes pupBounce { 50% { transform: translateY(-10px); } }
@keyframes pupJump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px) scale(1.04); } }
@keyframes pupTap { to { transform: translateY(-4px); } }
@keyframes pupStepL {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(-3px, -5px) rotate(8deg); }
}
@keyframes pupStepR {
  0%, 100% { transform: translate(2px, -5px) rotate(8deg); }
  50% { transform: translate(0, 0) rotate(-4deg); }
}
@keyframes pupRun {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  25% { transform: translateY(-15px) rotate(4deg); }
  50% { transform: translateY(-3px) rotate(-3deg); }
  75% { transform: translateY(-16px) rotate(5deg); }
}
@keyframes pupRunPaw {
  0% { transform: translate(0, 0) rotate(-18deg); }
  50% { transform: translate(0, -10px) rotate(22deg); }
  100% { transform: translate(0, 0) rotate(-18deg); }
}
@keyframes pupHeadBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-3px) rotate(4deg); }
}
@keyframes pupLeap {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(-2deg); }
  35% { transform: translateY(-18px) scale(.96, 1.06) rotate(3deg); }
  55% { transform: translateY(-6px) scale(1.06, .94) rotate(-1deg); }
}
@keyframes pupPawTuck {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px) rotate(-12deg); }
}
@keyframes pupWalk {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}
@keyframes pupSway {
  0%, 100% { transform: rotate(-7deg) translateX(-3px); }
  50% { transform: rotate(8deg) translateX(4px); }
}
@keyframes pupSlump {
  0%, 100% { transform: translateY(2px) rotate(3deg) scale(1.02, .96); }
  50% { transform: translateY(4px) rotate(5deg) scale(1.03, .94); }
}
@keyframes pupThinkLean {
  0%, 100% { transform: rotate(-6deg) translateX(-2px); }
  50% { transform: rotate(-10deg) translateX(-4px) translateY(-2px); }
}
@keyframes pupPawThink {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2px, -7px) rotate(-16deg); }
}
@keyframes pupEarFlop {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}
@keyframes pupShadowIdle {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(.88); opacity: .45; }
}
@keyframes pupShadowHop {
  0%, 100% { transform: scale(1); opacity: .7; }
  40% { transform: scale(.55); opacity: .28; }
}
@keyframes pupTilt { 50% { transform: rotate(-8deg); } }
@keyframes pupDroop { 50% { transform: translateY(3px) rotate(4deg); } }
@keyframes pupEarDown { 50% { transform: rotate(12deg) translateY(3px); } }
@keyframes pupTear { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes pupSpark { 50% { transform: scale(1.15) rotate(8deg); opacity: .7; } }
@keyframes pupPop { 50% { transform: scale(1.18); } }
@keyframes pupHi { to { transform: rotate(-28deg) translateY(-8px); } }
@keyframes pupFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pupBob { 50% { transform: translateY(-5px); } }
@keyframes pupLook { 0%, 100% { transform: rotate(-7deg) translateX(-3px); } 50% { transform: rotate(8deg) translateX(4px); } }
@keyframes pupSpin { to { transform: rotate(360deg); } }
@keyframes pupGaze {
  0%, 18% { transform: translate(0, 0); }
  32% { transform: translate(-3px, 1px); }
  52% { transform: translate(3.5px, 0); }
  70% { transform: translate(0, 2px); }
  100% { transform: translate(0, 0); }
}
@keyframes pupCheek { 50% { transform: scale(1.18); opacity: 1; } }

.pup-load {
  position: fixed; inset: 0; z-index: 240;
  display: none; place-items: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
}
.pup-load.is-on { display: grid; }
.pup-load .pup { width: 196px; height: 196px; max-width: 196px; max-height: 196px; margin: 0 auto; }
.pup-load p { margin: 8px 0 0; font-weight: 700; color: var(--ink-2); font-family: "Fredoka", sans-serif; font-synthesis: none; }

/* Instant tap + soft-nav progress */
.btn.is-press,
a.btn.is-press,
.tabbar a.is-press,
.chip.is-press,
a.is-press {
  transform: scale(.97);
  opacity: .88;
  transition: transform .08s var(--ease), opacity .08s var(--ease);
}
.nav-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  pointer-events: none; opacity: 0; transition: opacity .15s var(--ease);
  background: transparent;
}
.nav-progress.is-on { opacity: 1; }
.nav-progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), #a855f7);
  border-radius: 0 2px 2px 0;
  transition: width .35s var(--ease);
}
.nav-progress.is-on > i { width: 78%; }
.nav-progress.is-done > i { width: 100%; transition-duration: .12s; }
main#main.is-soft-swap { animation: softSwap .22s var(--ease); }
@keyframes softSwap {
  from { opacity: .55; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  main#main.is-soft-swap { animation: none; }
  .btn.is-press, a.btn.is-press, .tabbar a.is-press { transform: none; }
}

.reward-pop .box .pup { margin-bottom: 6px; }
.empty .pup { margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Tutor Sprint Android WebView — native header + tab bar stay in the app */
html.in-android-app .topbar,
html.in-android-app .tabbar-dock,
html.in-android-app .tabbar,
html.in-android-app .site-foot,
html.in-android-app .legal-strip,
html.in-android-app [data-install-app],
body.in-android-app [data-install-app],
body.in-android-app .topbar,
body.in-android-app .tabbar-dock,
body.in-android-app .tabbar,
body.in-android-app .site-foot,
body.in-android-app .legal-strip { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }
html.in-android-app,
body.in-android-app,
body.in-android-app.has-tabbar {
  padding-top: 0 !important;
  padding-bottom: calc(var(--app-tab-h, 12px) + env(safe-area-inset-bottom, 0px));
}
body.in-android-app.auth-body { padding-top: 0; }
html.in-android-pay,
body.in-android-pay { padding-bottom: 12px !important; }
html.in-android-app .brand-logo,
html.in-android-app .brand-logo .pup,
html.in-android-app .brand-logo img.pup-art,
body.in-android-app .brand-logo,
body.in-android-app .brand-logo .pup,
body.in-android-app .brand-logo img.pup-art {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: contain !important;
}

body.is-pdf { background: #12121c; padding: 0; }
body.is-pdf .wrap { max-width: none; padding: 0; margin: 0; }
body.is-pdf .legal-strip, body.is-pdf .site-footer { display: none !important; }
.pdf-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pdf-bar {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 8px 10px;
  padding-top: calc(8px + var(--app-status-h, 0px));
  background: #1b1538; color: #fff;
}
.pdf-bar b { font-size: 14px; }
.pdf-bar .icon-btn { color: #fff; background: transparent; }
.pdf-stage { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.pdf-page { width: 100%; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.legal-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding: 14px 16px 18px;
  font-size: 12.5px;
}
.legal-strip a { color: var(--muted); }
.legal-strip a:hover { color: var(--brand); }
.legal-doc h1 { font-size: 26px; margin: 0 0 8px; }
.legal-doc h2 { font-size: 17px; margin: 22px 0 8px; }
.legal-doc p, .legal-doc li { line-height: 1.55; }
.legal-doc ul { padding-left: 1.2em; margin: 8px 0 12px; }
.legal-doc code { font-size: .92em; word-break: break-all; }

/* ------------------------------------------------------------- pricing */
.pricing-page { margin-top: 12px; padding-bottom: 28px; }
.pricing-hero {
  text-align: center;
  padding: 18px 8px 28px;
  max-width: 640px;
  margin: 0 auto;
}
.pricing-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
}
.pricing-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.pricing-lead {
  margin: 0 auto;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 48ch;
}
.pricing-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 18px 0 0;
  padding: 0;
}
.pricing-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.pricing-trust li::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 0 0 22px;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 20px 18px;
  box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
.pricing-card.is-featured {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 85%, var(--card)) 0%, var(--card) 42%);
  box-shadow: var(--shadow-2);
  z-index: 1;
}
.pricing-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--brand-soft);
  padding: 4px 9px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.pricing-card-top h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -.01em;
}
.pricing-blurb {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 13.5px;
  min-height: 2.6em;
}
.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pricing-now {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
}
.pricing-now .rs {
  font-size: .62em;
  font-weight: 800;
  margin-right: 1px;
}
.pricing-was {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}
.pricing-was s { text-decoration-thickness: 2px; }
.pricing-per {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ok);
}
.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.pricing-features li {
  position: relative;
  padding-left: 28px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 600;
}
.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat;
}
.pricing-features li.is-extra { color: var(--ink); }
.pricing-features li.is-extra::before { background-color: var(--brand); }
.pricing-fine {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.pricing-card .btn { margin-top: 2px; }

.pricing-compare {
  padding: 22px 20px;
  border-radius: 22px;
}
.pricing-compare h2 {
  margin: 0 0 14px;
  font-size: 18px;
  text-align: center;
}
.pricing-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.pricing-compare-grid h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--brand-ink);
}
.pricing-compare-grid p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
.pricing-legal h2:first-child { margin-top: 0; }

@media (min-width: 860px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 8px 0 4px;
  }
  .pricing-card.is-featured {
    transform: scale(1.04);
  }
  .pricing-card.is-featured:hover {
    transform: scale(1.04) translateY(-3px);
  }
  .pricing-compare-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-card,
  .pricing-card.is-featured { transition: none; }
  .pricing-card:hover,
  .pricing-card.is-featured:hover { transform: none; }
}

/* ------------------------------------------------------------- syllabus cards */
.subject-grid,
.unit-grid,
.syl-grid,
.syl-units {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.subject-card,
.unit-card,
.syl-card,
.syl-unit {
  display: flex !important;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(40, 36, 70, 0.06);
  text-decoration: none !important;
  color: var(--ink) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.subject-card:hover,
.unit-card:hover,
.syl-card:hover,
.syl-unit:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 12px 28px rgba(109, 94, 252, 0.14);
}
.subject-card-num,
.syl-card-num {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 auto;
}
.subject-card-body,
.syl-card-body,
.syl-unit-body {
  flex: 1;
  min-width: 0;
}
.subject-card-body b,
.syl-card-body b,
.syl-unit-body b {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--ink);
}
.subject-card-go,
.syl-card-go,
.syl-unit-go {
  color: var(--muted);
  flex-shrink: 0;
}
.syl-card-bar,
.syl-unit-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
  margin-top: 10px;
  overflow: hidden;
}
.syl-card-bar > i,
.syl-unit-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.syl-card-pct {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-ink);
}
.unit-card-ico,
.syl-unit-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.unit-card.is-locked,
.syl-unit.is-locked { opacity: 0.6; }
.syl-unit-chip {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink-2);
}
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lesson-list .lesson-row {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.wa-doubt,
.wa-join,
.wa-soft {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none !important;
  color: inherit !important;
  background: var(--card);
  border: 1px solid rgba(37, 211, 102, 0.35);
  box-shadow: 0 6px 18px rgba(18, 140, 126, 0.08);
}
.wa-soft-ico,
.wa-join-ico,
.wa-doubt-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #e8faf0;
  color: #128c7e;
  flex: 0 0 auto;
}
.wa-soft-btn,
.wa-join-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #25d366;
  color: #fff !important;
}
.learn-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.learn-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(40, 36, 70, 0.06);
}
.switch-sm .track { transform: scale(0.85); transform-origin: left center; }

/* ------------------------------------------------------------- lesson tabs */
.lesson-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.lesson-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lesson-tab small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 800;
}
.lesson-tab.is-on {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.lesson-tab.is-off {
  opacity: 0.45;
  pointer-events: none;
}
.lesson-tab.is-soon:not(.is-on) { opacity: 0.85; }
.live-soon { border-style: dashed; }
