:root {
  --ink: #10241f;
  --muted: #5a7269;
  --teal: #0f766e;
  --teal-2: #14b8a6;
  --coral: #ff6b4a;
  --coral-2: #ff8f75;
  --amber: #f5b942;
  --foam: rgba(255,255,255,.78);
  --line: rgba(16,36,31,.1);
  --ok: #0f9f6e;
  --danger: #e11d48;
  --shadow: 0 24px 60px rgba(16,36,31,.14);
  --radius: 28px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Syne", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #e8f4f1;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-layer {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(165deg, #d9f3ee 0%, #eef7f4 38%, #fff4ea 72%, #e8f0ff 100%);
}
.bg-layer .orb {
  position: absolute; border-radius: 50%; filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a { width: 420px; height: 420px; left: -80px; top: -60px; background: rgba(20,184,166,.35); }
.orb-b { width: 380px; height: 380px; right: -60px; top: 20%; background: rgba(255,107,74,.22); animation-delay: -6s; }
.orb-c { width: 460px; height: 460px; left: 30%; bottom: -120px; background: rgba(245,185,66,.2); animation-delay: -11s; }

.fx-canvas {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
}
.toast-root {
  position: fixed; top: 76px; right: 16px; z-index: 90;
  display: grid; gap: 8px; width: min(320px, calc(100vw - 32px));
}
.toast {
  padding: 12px 14px; border-radius: 16px; font-weight: 700;
  background: rgba(16,36,31,.92); color: #fff;
  box-shadow: var(--shadow);
  animation: toast-in .35s ease;
}
.toast.ok { background: linear-gradient(135deg, #0f766e, #0f9f6e); }
.toast.bad { background: linear-gradient(135deg, #be123c, #e11d48); }

a { color: var(--teal); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(255,255,255,.55);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.2rem;
  letter-spacing: -.03em;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--coral), var(--amber));
  color: #fff; font-size: .78rem; font-weight: 800;
  box-shadow: 0 10px 24px rgba(255,107,74,.35);
  transform: rotate(-6deg);
}
.brand-mark span { transform: rotate(6deg); display: block; }
.hud { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hud-stat, .hud-avatar {
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: .86rem;
  backdrop-filter: blur(8px);
}
.hud-boost { background: linear-gradient(135deg, #ffedd5, #fde68a); border-color: rgba(245,185,66,.4); }
.hud-avatar { text-decoration: none; font-size: 1.2rem; transition: transform .2s ease; }
.hud-avatar:hover { transform: scale(1.08) rotate(-4deg); }
.hud-xp {
  position: relative; min-width: 120px; height: 32px;
  border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.65); border: 1px solid var(--line);
}
.hud-xp-fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.hud-xp span {
  position: relative; z-index: 1;
  display: grid; place-items: center; height: 100%;
  font-size: .76rem; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.main { max-width: 1120px; margin: 0 auto; padding: 28px 18px 120px; }
.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: center;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.nav-dock {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  pointer-events: auto;
  position: relative;
  display: flex; gap: 2px; align-items: stretch;
  padding: 6px;
  border-radius: 28px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow:
    0 18px 50px rgba(16,36,31,.18),
    0 2px 0 rgba(255,255,255,.65) inset,
    0 -1px 0 rgba(16,36,31,.06) inset;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  transform: perspective(800px) rotateY(var(--tilt-x)) rotateX(var(--tilt-y));
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.dock-pill {
  position: absolute; left: 0; top: 0;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(15,118,110,.95), rgba(20,184,166,.88));
  box-shadow:
    0 10px 24px rgba(15,118,110,.35),
    0 1px 0 rgba(255,255,255,.35) inset;
  transition: transform .45s cubic-bezier(.34,1.45,.64,1), width .45s cubic-bezier(.34,1.45,.64,1), height .45s cubic-bezier(.34,1.45,.64,1);
  z-index: 0;
  pointer-events: none;
}
.dock-item {
  position: relative; z-index: 1;
  color: rgba(16,36,31,.55);
  text-decoration: none;
  padding: 10px 12px 8px;
  border-radius: 20px;
  font-weight: 800; font-size: .68rem;
  display: grid; place-items: center; gap: 3px;
  min-width: 58px;
  transition: color .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.dock-item .dock-ico {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.dock-item .lm-ico { width: 22px; height: 22px; }
.dock-item .dock-label {
  letter-spacing: -.01em;
  transition: opacity .2s ease, transform .25s ease;
}
.dock-item.is-active { color: #fff; }
.dock-item.is-active .dock-ico {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
}
.dock-item.is-press {
  transform: scale(.88);
}
.dock-item.is-press .dock-ico { transform: scale(.92); }
.dock-item.dock-bounce .dock-ico {
  animation: dock-icon-bounce .55s cubic-bezier(.34,1.56,.64,1);
}
.dock-item:not(.is-active):hover {
  color: rgba(16,36,31,.88);
}
.dock-item:not(.is-active):hover .dock-ico {
  transform: translateY(-1px) scale(1.05);
}

.lm-ico { display: block; flex-shrink: 0; }
.hud-ico { opacity: .9; }
.ico-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800;
}
.ico-inline .lm-ico { color: var(--teal); }
.stat-pill .lm-ico { color: var(--teal); }
.hud-stat {
  display: inline-flex; align-items: center; gap: 5px;
}

@keyframes dock-icon-bounce {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-7px) scale(1.18); }
  60% { transform: translateY(-2px) scale(.96); }
  100% { transform: translateY(-2px) scale(1.08); }
}

.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.04em;
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; font-weight: 800; color: var(--coral); margin: 0 0 8px;
}
.lead { margin: 0 0 18px; color: var(--muted); max-width: 42ch; font-size: 1.05rem; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; }

.quest-brief {
  align-items: stretch;
  padding: 18px 20px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c, var(--teal)) 14%, #fff), rgba(255,255,255,.82));
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 28%, var(--line));
  box-shadow: 0 18px 40px rgba(16,36,31,.08);
}
.quest-brief .display { margin-bottom: 12px; }
.quest-brief-main { min-width: 0; flex: 1; }

.reward-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .86rem;
  line-height: 1;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(16,36,31,.05);
}
.reward-chip .lm-ico { flex: 0 0 auto; }
.chip-energy {
  background: linear-gradient(135deg, #ecfeff, #e0f2fe);
  border-color: rgba(14,165,233,.25);
  color: #0369a1;
}
.chip-energy .lm-ico { color: #0284c7; }
.chip-xp {
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  border-color: rgba(15,118,110,.22);
  color: #0f766e;
}
.chip-xp .lm-ico { color: #0f766e; }
.chip-coin {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: rgba(245,185,66,.35);
  color: #b45309;
}
.chip-coin .lm-ico { color: #d97706; }
.chip-note {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-color: rgba(255,107,74,.22);
  color: #c2410c;
  font-size: .8rem;
}
.chip-score {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: rgba(15,159,110,.25);
  color: #047857;
}
.chip-score .lm-ico { color: #059669; }
.reward-strip.is-daily .chip-note {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border-color: rgba(225,29,72,.22);
  color: #be123c;
}
.reward-strip.is-compact {
  gap: 6px;
  margin-top: 4px;
}
.reward-strip.is-compact .reward-chip {
  padding: 5px 9px;
  font-size: .74rem;
  box-shadow: none;
}
.quest-node .reward-strip { position: relative; z-index: 1; }
.daily-card .reward-strip { margin: 4px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 13px 20px;
  font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff; box-shadow: 0 14px 28px rgba(15,118,110,.28);
}
.btn-accent {
  background: linear-gradient(135deg, var(--coral), var(--coral-2));
  color: #fff; box-shadow: 0 14px 28px rgba(255,107,74,.3);
}
.btn-ghost {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.glass, .hero-panel, .auth-form, .quest-panel, .realm, .chat-shell, .leader-list,
.hero-banner, .daily-card, .shop-item, .mode-toggle {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; padding: 0;
  overflow: hidden; min-height: min(72vh, 640px);
  position: relative;
}
.hero-copy {
  padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1;
}
.hero-copy .display {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  background: linear-gradient(120deg, var(--ink) 20%, var(--teal) 70%, var(--coral));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.auth-visual {
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(160deg, #0f766e 0%, #134e4a 45%, #ff6b4a 120%);
  display: grid; place-items: center;
  overflow: hidden;
}
.auth-visual::before {
  content: "";
  position: absolute; inset: -20%;
  background: repeating-linear-gradient(-18deg, transparent, transparent 18px, rgba(255,255,255,.05) 18px, rgba(255,255,255,.05) 19px);
  animation: slide 20s linear infinite;
}
.auth-mascot {
  font-size: clamp(5rem, 14vw, 8rem);
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.25));
  animation: floaty 3.4s ease-in-out infinite;
  position: relative; z-index: 1;
}
.auth-form { margin: 28px; padding: 26px; align-self: center; }
.auth-form.wide { max-width: 680px; margin: 0; }
.auth-form h2 { margin-top: 0; font-family: var(--display); letter-spacing: -.03em; }
.auth-form label, .chat-side label { display: block; font-weight: 800; margin: 12px 0 6px; font-size: .88rem; }
.auth-form input, .auth-form select, .chat-side select, .chat-form textarea {
  width: 100%; padding: 13px 14px; border-radius: 14px;
  border: 1.5px solid rgba(15,118,110,.18); background: rgba(255,255,255,.9);
  font: inherit; transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-form input:focus, .auth-form select:focus, .chat-form textarea:focus, .chat-side select:focus {
  outline: none; border-color: var(--teal-2);
  box-shadow: 0 0 0 4px rgba(20,184,166,.15);
}
.auth-form button { width: 100%; margin-top: 16px; }

.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.avatar-pick { cursor: pointer; }
.avatar-pick input { display: none; }
.avatar-pick span {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border-radius: 16px; border: 2px solid transparent;
  background: rgba(255,255,255,.7); font-size: 1.45rem;
  transition: transform .15s ease, border-color .15s ease;
}
.avatar-pick small { font-size: .62rem; font-weight: 700; color: var(--muted); text-align: center; }
.avatar-pick input:checked + span {
  border-color: var(--teal);
  background: #e6fffa;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15,118,110,.12);
}

.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; font-weight: 700; }
.alert-error { background: #ffe4e6; color: var(--danger); }
.alert-ok { background: #d1fae5; color: var(--ok); }

.hero-banner {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
  padding: 28px; margin-bottom: 18px; overflow: hidden; position: relative;
}
.hero-banner::after {
  content: "";
  position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,107,74,.22), transparent 70%);
}
.hero-banner-avatar {
  width: 108px; height: 108px; border-radius: 32px;
  display: grid; place-items: center; font-size: 3.3rem;
  background: linear-gradient(145deg, #fff, #ccfbf1);
  border: 1px solid var(--line);
  flex-shrink: 0; position: relative; z-index: 1;
}
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  font-weight: 800;
}
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
.two-col h2, .profile h2, .shop-page h2 { font-family: var(--display); margin: 0 0 14px; letter-spacing: -.03em; }

.daily-card {
  padding: 22px; margin-bottom: 22px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background:
    linear-gradient(120deg, rgba(255,107,74,.14), rgba(15,118,110,.1) 55%, transparent),
    rgba(255,255,255,.75);
  border: 1px solid rgba(255,107,74,.22);
}
.daily-card .boss-emoji { font-size: 3.2rem; animation: floaty 2.8s ease-in-out infinite; }
.daily-card.done { opacity: .85; border-color: rgba(15,118,110,.25); }

.subject-rail { display: grid; gap: 10px; }
.subject-chip {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center;
  padding: 14px 16px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,.78); border: 1px solid var(--line);
  border-left: 5px solid var(--c, var(--teal));
  transition: transform .18s ease, box-shadow .18s ease;
}
.subject-chip:hover { transform: translateX(6px); box-shadow: 0 12px 28px rgba(16,36,31,.08); }
.chip-icon { font-size: 1.55rem; grid-row: span 2; }
.subject-chip strong { display: block; }
.subject-chip small { color: var(--muted); font-weight: 700; }
.chip-bar {
  grid-column: 2; height: 8px; border-radius: 999px; background: rgba(0,0,0,.06); overflow: hidden;
}
.chip-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--c, var(--teal)), var(--amber));
  border-radius: inherit;
}

.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-clean li {
  padding: 12px 14px; border-radius: 16px;
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
}
.list-clean .muted { display: block; font-size: .85rem; }
.ach-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ach-badge {
  padding: 8px 12px; border-radius: 999px; font-weight: 800; font-size: .88rem;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid rgba(245,185,66,.35);
}
.ach-badge.is-locked { opacity: .4; filter: grayscale(.7); background: #eee; border-color: #ddd; }

.world-map { display: grid; gap: 18px; }
.realm { padding: 20px; animation: rise .5s ease both; animation-delay: var(--delay, 0s); }
.realm-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.realm-icon {
  width: 58px; height: 58px; border-radius: 18px;
  display: grid; place-items: center; font-size: 1.7rem;
  background: color-mix(in srgb, var(--c) 16%, white);
  border: 1px solid color-mix(in srgb, var(--c) 30%, white);
}
.realm-head h2 { margin: 0; font-family: var(--display); font-size: 1.3rem; letter-spacing: -.02em; }
.realm-head p { margin: 2px 0 0; color: var(--muted); font-weight: 700; font-size: .9rem; }
.realm-ring { margin-left: auto; width: 46px; height: 46px; color: var(--c); }
.quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  max-height: min(52vh, 560px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.quest-node {
  display: flex; flex-direction: column; gap: 4px;
  padding: 15px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,.82);
  border: 1px solid color-mix(in srgb, var(--c) 28%, #ddd);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative; overflow: hidden;
}
.quest-node::before {
  content: ""; position: absolute; inset: auto -20% -40% auto; width: 80px; height: 80px;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 25%, transparent), transparent 70%);
}
.quest-node:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 16px 30px rgba(16,36,31,.1); }
.quest-node.is-done {
  background: color-mix(in srgb, var(--c) 10%, white);
  border-color: color-mix(in srgb, var(--c) 45%, white);
}
.qn-diff { color: var(--c); font-size: .72rem; letter-spacing: 1px; }
.quest-node strong { font-size: .98rem; position: relative; }
.quest-node small { color: var(--muted); font-weight: 700; position: relative; }

.mode-toggle {
  display: inline-flex; padding: 6px; gap: 4px; margin-bottom: 16px;
}
.mode-toggle button {
  border: 0; background: transparent; padding: 10px 14px; border-radius: 14px;
  font: inherit; font-weight: 800; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.shop-item .shop-ico { color: var(--teal); width: 32px; height: 32px; }
.shop-item .icon { display: grid; place-items: start; }
.btn .lm-ico { flex-shrink: 0; }
.mode-toggle button.is-on {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  color: #fff;
}
.mode-toggle button.is-on .lm-ico { color: #fff; }

.quest-arena .quest-panel { padding: 28px; max-width: 760px; margin: 0 auto; text-align: center; }
.boss-art { font-size: 4.2rem; margin-bottom: 8px; }
.battle-hud {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; text-align: left;
}
.meter-label { font-size: .78rem; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.meter {
  height: 12px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden;
}
.meter > i { display: block; height: 100%; border-radius: inherit; transition: width .35s ease; }
.meter-boss > i { background: linear-gradient(90deg, var(--coral), #fb7185); width: 100%; }
.meter-combo > i { background: linear-gradient(90deg, var(--amber), #f97316); width: 0%; }
.timer-ring {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 12px;
  font-weight: 800; border: 3px solid var(--teal-2);
  transition: border-color .2s ease, color .2s ease;
}
.timer-ring.is-low { border-color: var(--coral); color: var(--coral); animation: pulse .6s ease infinite; }
.q-progress { height: 10px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; margin-bottom: 16px; }
#q-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--c, var(--teal)), var(--amber)); transition: width .35s ease; }
#q-text { text-align: left; font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; }
.options { display: grid; gap: 10px; margin: 18px 0; text-align: left; }
.opt-btn {
  width: 100%; text-align: left; padding: 15px 16px; border-radius: 16px;
  border: 2px solid var(--line); background: rgba(255,255,255,.92);
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.opt-btn:hover:not(:disabled) { border-color: var(--teal); transform: translateX(4px); }
.opt-btn.is-correct { border-color: var(--ok); background: #d1fae5; }
.opt-btn.is-wrong { border-color: var(--danger); background: #ffe4e6; }
.opt-btn.is-dim { opacity: .35; pointer-events: none; }
.q-feedback {
  text-align: left; padding: 14px; border-radius: 16px;
  background: #ecfdf5; margin-bottom: 12px; font-weight: 700;
}
.combo-pop {
  position: absolute; left: 50%; top: 30%;
  transform: translate(-50%, -50%) scale(.6);
  font-family: var(--display); font-size: 2rem; font-weight: 800;
  color: var(--coral); opacity: 0; pointer-events: none;
}
.combo-pop.show { animation: combo-pop .7s ease forwards; }

.chat-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 560px; overflow: hidden; }
.chat-side { padding: 18px; border-right: 1px solid var(--line); background: rgba(255,255,255,.4); }
.tips { display: grid; gap: 8px; margin-top: 16px; }
.tip {
  border: 1px dashed var(--line); background: #fff; border-radius: 14px;
  padding: 11px; text-align: left; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.tip:hover { transform: translateY(-1px); border-color: var(--teal); }
.chat-main { display: flex; flex-direction: column; min-height: 560px; }
.chat-log { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: min(92%, 560px); padding: 12px 14px; border-radius: 18px; font-weight: 650;
  white-space: pre-wrap; word-break: break-word;
  animation: rise .25s ease;
}
.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff; border-bottom-right-radius: 6px;
}
.bubble.assistant {
  align-self: flex-start; background: #fff; border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble.typing { opacity: .7; font-style: italic; }
.chat-form {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px;
  border-top: 1px solid var(--line); background: rgba(255,255,255,.55);
}

/* —— Мастер Знаний: святилище —— */
.master-sanctum {
  display: grid;
  gap: 14px;
  margin-top: -6px;
}
.master-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 12% 40%, rgba(20,184,166,.28), transparent 42%),
    radial-gradient(ellipse at 88% 20%, rgba(255,107,74,.18), transparent 40%),
    linear-gradient(135deg, rgba(16,36,31,.92), rgba(15,118,110,.88));
  color: #f3fffc;
  box-shadow: 0 28px 60px rgba(16,36,31,.22);
}
.master-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.06) 50%, transparent 60%);
  animation: master-sheen 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes master-sheen {
  0%, 100% { transform: translateX(-30%); opacity: .35; }
  50% { transform: translateX(30%); opacity: .7; }
}
.master-orb {
  position: relative;
  width: 72px; height: 72px;
  display: grid; place-items: center;
}
.orb-core {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #5eead4 40%, #0f766e 78%);
  box-shadow: 0 0 28px rgba(94,234,212,.75), 0 0 8px #fff inset;
  animation: orb-breathe 2.8s ease-in-out infinite;
  z-index: 2;
}
.orb-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(94,234,212,.35);
  animation: orb-spin 10s linear infinite;
}
.orb-ring.r2 {
  inset: 8px; border-color: rgba(255,143,117,.4);
  animation-direction: reverse; animation-duration: 7s;
}
.orb-spark {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px #5eead4;
  animation: orb-spark 2.4s ease-in-out infinite;
}
.orb-spark.s1 { top: 4px; left: 50%; }
.orb-spark.s2 { bottom: 10px; right: 8px; animation-delay: .4s; background: #ff8f75; }
.orb-spark.s3 { bottom: 12px; left: 10px; animation-delay: .9s; background: #f5b942; }
@keyframes orb-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-spark {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
#master-stage[data-state="thinking"] .orb-core {
  animation: orb-breathe .7s ease-in-out infinite;
  box-shadow: 0 0 36px rgba(245,185,66,.85), 0 0 8px #fff inset;
}
#master-stage[data-state="speaking"] .orb-core {
  box-shadow: 0 0 40px rgba(255,107,74,.8), 0 0 8px #fff inset;
}
#master-stage[data-state="error"] .orb-core {
  background: radial-gradient(circle at 35% 30%, #fff, #fb7185 45%, #be123c 80%);
}
.master-hero-copy { position: relative; z-index: 1; min-width: 0; }
.master-hero .eyebrow { color: rgba(243,255,252,.7); margin: 0 0 2px; }
.master-hero .display {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  color: #fff;
  letter-spacing: -.03em;
}
.master-status-line {
  margin: 6px 0 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-weight: 700; font-size: .9rem; color: rgba(243,255,252,.82);
}
.master-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 0 rgba(94,234,212,.6);
  animation: pulse-dot 1.8s ease-out infinite;
}
#master-stage[data-state="thinking"] .master-pulse { background: #f5b942; }
#master-stage[data-state="speaking"] .master-pulse { background: #ff8f75; }
#master-stage[data-state="error"] .master-pulse { background: #fb7185; animation: none; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(94,234,212,.55); }
  70% { box-shadow: 0 0 0 10px rgba(94,234,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,234,212,0); }
}
.dot-sep { opacity: .45; }
.master-topic-pill {
  padding: 2px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  font-size: .78rem;
}
.master-clear {
  position: relative; z-index: 1;
  color: #fff !important;
  border-color: rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.08) !important;
  white-space: nowrap;
}
.master-clear:hover { background: rgba(255,255,255,.16) !important; }

.master-modes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.mode-pill {
  display: grid; gap: 2px; text-align: left;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  font: inherit; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mode-pill strong {
  font-family: var(--display); font-size: .95rem; letter-spacing: -.02em;
}
.mode-pill small { color: var(--muted); font-weight: 650; font-size: .75rem; }
.mode-pill:hover { transform: translateY(-2px); border-color: rgba(15,118,110,.35); }
.mode-pill.is-on {
  background: linear-gradient(160deg, rgba(15,118,110,.12), rgba(255,255,255,.9));
  border-color: var(--teal);
  box-shadow: 0 12px 28px rgba(15,118,110,.16);
  outline: 2px solid rgba(20,184,166,.25);
}

.master-shell {
  grid-template-columns: 260px 1fr;
  min-height: min(68vh, 720px);
  border-radius: 28px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.master-side {
  background:
    linear-gradient(180deg, rgba(232,244,241,.9), rgba(255,255,255,.55));
}
.master-side label { margin-top: 4px; }
.spell-block { margin-top: 18px; }
.spell-title {
  margin: 0 0 8px;
  font-weight: 800; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.spell-row { display: grid; gap: 8px; }
.spell-chip {
  border: 1px solid rgba(15,118,110,.16);
  background: #fff;
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
  font: inherit; font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.spell-chip:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
  background: #f0fdfa;
}
.master-lore {
  margin-top: 18px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15,118,110,.08);
  border: 1px dashed rgba(15,118,110,.25);
  font-size: .82rem;
  color: var(--muted);
  font-weight: 650;
}
.master-lore strong { color: var(--teal); }

.master-main { min-height: min(68vh, 720px); }
.master-main .chat-log {
  gap: 12px;
  background:
    radial-gradient(ellipse at top, rgba(20,184,166,.06), transparent 45%),
    transparent;
}
.chat-empty {
  display: grid; place-items: center;
  min-height: 280px; padding: 12px;
}
.chat-empty.is-hidden { display: none; }
.welcome-card {
  max-width: 420px; text-align: center;
  padding: 28px 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(16,36,31,.08);
}
.welcome-card h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -.03em;
}
.welcome-card p { margin: 8px 0 16px; color: var(--muted); font-weight: 650; }
.welcome-actions { display: grid; gap: 8px; }
.welcome-chip {
  border: 1px solid rgba(15,118,110,.18);
  background: linear-gradient(135deg, #f0fdfa, #fff);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit; font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.welcome-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15,118,110,.12);
}

.bubble-row {
  display: flex; gap: 10px; align-items: flex-end;
  max-width: min(94%, 640px);
  animation: rise .28s ease;
}
.bubble-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.bubble-row.assistant { align-self: flex-start; }
.bubble-avatar {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15,118,110,.28);
}
.bubble-row .bubble {
  white-space: normal;
  max-width: 100%;
}
.bubble-row .bubble.user,
.bubble-row .bubble.assistant {
  align-self: auto;
}
.bubble.assistant {
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(16,36,31,.06);
}
.bubble.assistant .md-list { margin: 8px 0; padding-left: 1.2em; }
.bubble.assistant .md-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(15,118,110,.1);
}
.bubble.assistant .md-pre {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #10241f;
  color: #e7fffa;
  overflow: auto;
  font-size: .84rem;
}
.bubble.typing {
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
}

.followup-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-self: flex-start;
  padding-left: 44px;
  animation: rise .3s ease;
}
.followup-chip {
  border: 1px solid rgba(255,107,74,.28);
  background: linear-gradient(135deg, #fff7ed, #fff);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit; font-weight: 750; font-size: .84rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.followup-chip:hover {
  transform: translateY(-1px);
  background: #ffedd5;
}

.master-form {
  display: block;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.72));
}
.composer {
  display: grid; gap: 8px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(15,118,110,.18);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(16,36,31,.06);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer:focus-within {
  border-color: var(--teal-2);
  box-shadow: 0 0 0 4px rgba(20,184,166,.14);
}
.composer textarea {
  width: 100%;
  border: 0; outline: none; resize: none;
  background: transparent;
  font: inherit; font-weight: 650;
  min-height: 52px; max-height: 140px;
  padding: 4px 2px;
}
.composer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.chat-count {
  font-size: .75rem; font-weight: 750; color: var(--muted);
}
.chat-count.is-hot { color: var(--coral); }
#chat-send.is-busy { opacity: .7; pointer-events: none; }

@media (max-width: 860px) {
  .master-modes { grid-template-columns: repeat(3, 1fr); }
  .master-hero { grid-template-columns: auto 1fr; }
  .master-clear { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 700px) {
  .master-modes { grid-template-columns: repeat(2, 1fr); }
  .master-shell { grid-template-columns: 1fr; min-height: auto; }
  .master-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .master-main { min-height: 52vh; }
  .followup-row { padding-left: 0; }
}

.leader-list { list-style: none; padding: 10px; margin: 0; }
.leader-list li {
  display: grid; grid-template-columns: 48px 1fr auto auto; gap: 10px; align-items: center;
  padding: 13px 14px; border-radius: 16px;
  transition: background .15s ease;
}
.leader-list li:nth-child(odd) { background: rgba(255,255,255,.55); }
.leader-list .is-me { outline: 2px solid var(--amber); background: #fffbeb; }
.leader-list li:nth-child(1) { background: linear-gradient(90deg, rgba(245,185,66,.25), transparent); }
.leader-list li:nth-child(2) { background: linear-gradient(90deg, rgba(148,163,184,.2), transparent); }
.leader-list li:nth-child(3) { background: linear-gradient(90deg, rgba(255,107,74,.15), transparent); }
.rank { font-weight: 800; color: var(--muted); }
.who { font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.lb-avatar {
  width: 36px; height: 36px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 4px 10px rgba(16,36,31,.12);
}
.lb-avatar.is-emoji { display: inline-grid; place-items: center; font-size: 1.2rem; background: #fff; }
.meta { color: var(--muted); font-weight: 700; font-size: .9rem; }
.xp { font-weight: 800; color: var(--teal); }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.shop-item {
  padding: 20px; display: grid; gap: 8px;
  transition: transform .18s ease;
}
.shop-item:hover { transform: translateY(-4px); }
.shop-item .icon { font-size: 2.2rem; }
.shop-item h3 { margin: 0; font-family: var(--display); letter-spacing: -.02em; }
.shop-item p { margin: 0; color: var(--muted); font-weight: 600; font-size: .92rem; }
.shop-item .price { font-weight: 800; color: var(--coral); }

.float-y { animation: floaty 3.2s ease-in-out infinite; }
.animate-in { animation: rise .45s ease both; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(40px); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes combo-pop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.5); }
  30% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(.9); }
}
@keyframes pulse {
  50% { transform: scale(1.06); }
}

@media (max-width: 900px) {
  .hero-panel, .two-col, .chat-shell, .daily-card, .battle-hud { grid-template-columns: 1fr; }
  .auth-visual { min-height: 180px; }
  .chat-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .leader-list li { grid-template-columns: 40px 1fr; }
  .leader-list .meta, .leader-list .xp { grid-column: 2; }
  .nav-dock .dock-item { min-width: 52px; padding: 10px 8px 8px; }
  .dock-label { font-size: .62rem; }
  .hud-xp, .hud-stat:first-child { display: none; }
  .hero-banner { grid-template-columns: 1fr; text-align: center; }
  .hero-banner-avatar { margin: 0 auto; }
  .cta-row { justify-content: center; }
}

/* —— Landing (no scroll, one viewport) —— */
body.is-landing {
  height: 100dvh;
  overflow: hidden;
}
body.is-landing .bg-layer .orb-a { width: 55vmax; height: 55vmax; }
body.is-landing .main-landing {
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100dvh;
}
.landing {
  height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vh, 20px) clamp(12px, 3vw, 28px);
  overflow: hidden;
}
.landing-stage {
  width: min(1200px, 100%);
  height: min(100%, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1.35fr) auto;
  gap: clamp(4px, 1vh, 12px);
  align-items: center;
}
.landing-brand { text-align: center; z-index: 2; }
.brand-lockup {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.brand-mark-lg {
  width: clamp(42px, 6vh, 58px); height: clamp(42px, 6vh, 58px);
  font-size: clamp(.82rem, 1.4vh, 1rem);
  border-radius: 16px;
}
.landing-title {
  margin: 0;
  font-size: clamp(1.85rem, 5.5vh, 3.4rem);
  background: linear-gradient(120deg, var(--ink) 10%, var(--teal) 55%, var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-tag {
  margin: 8px auto 0;
  max-width: 36ch;
  color: var(--muted);
  font-weight: 700;
  font-size: clamp(.88rem, 1.8vh, 1.05rem);
  line-height: 1.35;
}

.landing-manifesto {
  margin: clamp(4px, 1vh, 10px) auto 0;
  max-width: min(720px, 94vw);
  text-align: center;
  animation: rise .55s ease both;
}
.manifesto-kicker {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(.95rem, 2vh, 1.2rem);
  letter-spacing: -.02em;
  color: var(--teal);
}
.manifesto-lead {
  margin: 4px auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-weight: 650;
  font-size: clamp(.8rem, 1.45vh, .95rem);
  line-height: 1.35;
}
.landing-infographic {
  margin-top: clamp(6px, 1.2vh, 12px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(15,118,110,.1), rgba(255,107,74,.08) 55%, rgba(245,185,66,.1));
  border: 1px solid rgba(15,118,110,.14);
  box-shadow: 0 16px 40px rgba(16,36,31,.08);
}
.landing-infographic::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 30%, rgba(20,184,166,.18), transparent 42%),
    radial-gradient(circle at 88% 70%, rgba(255,107,74,.14), transparent 40%);
  pointer-events: none;
}
.info-cell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  padding: clamp(10px, 1.8vh, 16px) clamp(8px, 1.2vw, 14px);
  animation: rise .6s ease both;
}
.info-cell:nth-child(2) { animation-delay: .08s; }
.info-cell:nth-child(3) { animation-delay: .16s; }
.info-cell + .info-cell {
  border-left: 1px solid rgba(15,118,110,.14);
}
.info-metric {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.55rem, 4vh, 2.15rem);
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(120deg, var(--teal), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.info-metric-text {
  font-size: clamp(1.05rem, 2.6vh, 1.35rem);
  letter-spacing: -.03em;
  padding-top: .15em;
}
.info-label {
  font-weight: 700;
  font-size: clamp(.72rem, 1.45vh, .86rem);
  color: var(--ink);
  line-height: 1.3;
  max-width: 22ch;
}
.info-note {
  font-size: clamp(.64rem, 1.2vh, .74rem);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-3d {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 8px;
}
.hero-3d-floor {
  position: absolute;
  left: 50%; bottom: 18%;
  width: min(560px, 72%);
  height: 48px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(15,118,110,.28), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.hero-3d-ring {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: clamp(220px, 32vh, 380px);
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
}
.hero-card3d {
  position: absolute;
  left: 50%;
  top: 46%;
  width: clamp(160px, 26vh, 240px);
  max-width: min(64vw, 240px);
  min-width: 140px;
  aspect-ratio: 3 / 4;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
  will-change: transform, opacity;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}
.hero-card3d[hidden] {
  display: none !important;
}
.hero-card3d img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  border-radius: clamp(22px, 3vh, 32px);
  display: block;
  box-shadow:
    0 28px 56px rgba(16,36,31,.3),
    0 0 0 1px rgba(255,255,255,.45) inset;
  background: linear-gradient(160deg, #e7fffa, #fff4ea);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.hero-card3d.is-active {
  z-index: 20;
}
.hero-card3d.is-active img {
  box-shadow:
    0 34px 70px color-mix(in srgb, var(--rc, var(--coral)) 32%, rgba(16,36,31,.22)),
    0 0 0 3px rgba(255,255,255,.85);
}
.hero-card3d.is-broken img {
  object-fit: contain;
  padding: 18%;
  box-sizing: border-box;
  background: linear-gradient(160deg, #ccfbf1, #fff7ed);
}
.hero-card3d-ph {
  position: absolute; inset: 0;
  display: none;
  place-items: center;
  font-size: 3rem;
  border-radius: clamp(22px, 3vh, 32px);
  background: linear-gradient(160deg, #ccfbf1, #fff7ed);
  pointer-events: none;
}
.hero-card3d.is-broken .hero-card3d-ph { display: grid; }
.hero-card3d.is-broken img { opacity: 0; }
.hero-card3d-glow {
  position: absolute; inset: 8% 6% auto;
  height: 70%;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(255,107,74,.35), transparent 70%);
  filter: blur(18px);
  opacity: 0;
  transition: opacity .35s ease;
  z-index: -1;
  pointer-events: none;
}
.hero-card3d.is-active .hero-card3d-glow { opacity: 1; }
.hero-card3d.is-active img {
  box-shadow:
    0 30px 60px rgba(255,107,74,.28),
    0 18px 40px rgba(16,36,31,.22),
    0 0 0 3px rgba(255,255,255,.7);
}
.hero-card3d-name { display: none; }
.hero-3d-nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 300px) 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 30;
  min-height: 64px;
  height: auto;
  flex: none;
  margin-top: 4px;
  padding: 4px 0 2px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.55) 28%);
}
.hero-nav-btn {
  width: 44px; height: 44px; padding: 0; border-radius: 14px; font-size: 1.4rem;
  position: relative; z-index: 1;
}
.hero-plaque {
  position: relative;
  z-index: 1;
  min-height: 58px;
  height: auto;
  min-width: 0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  border: 1px solid rgba(15,118,110,.16);
  box-shadow:
    0 10px 28px rgba(16,36,31,.1),
    inset 0 1px 0 rgba(255,255,255,.7);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.hero-plaque-inner {
  min-height: 58px;
  height: auto;
  padding: 8px 14px;
  display: grid;
  align-content: center;
  gap: 3px;
  transition: opacity .22s ease, transform .22s ease;
}
.hero-plaque-inner.is-swap {
  opacity: 0;
  transform: translateY(6px);
}
.hero-active-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.hero-active-bonus {
  margin: 0;
  display: block;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.25;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 12%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.landing-auth {
  width: min(520px, 100%);
  margin: 0 auto;
  z-index: 3;
}
.landing-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.landing-fields input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(15,118,110,.18);
  background: rgba(255,255,255,.88);
  font: inherit;
  font-weight: 650;
  backdrop-filter: blur(8px);
}
.landing-fields input:focus {
  outline: none;
  border-color: var(--teal-2);
  box-shadow: 0 0 0 4px rgba(20,184,166,.14);
}
.landing-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.landing-cta .btn { width: 100%; padding: 12px 14px; }
.landing-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 650;
}
.landing-hint code {
  background: rgba(255,255,255,.7);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 800;
}
.landing-auth .alert { margin-bottom: 8px; padding: 8px 12px; font-size: .9rem; }

.hud-avatar { padding: 3px; overflow: hidden; }
.hud-avatar-img, .avatar-face {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; display: block;
}
.avatar-face.is-emoji { display: grid; place-items: center; font-size: 1.2rem; }
.hero-banner-avatar {
  overflow: hidden; padding: 0;
}
.hero-banner-avatar .avatar-face {
  width: 100%; height: 100%; border-radius: 32px;
}
.avatar-pick span.has-img {
  padding: 6px;
}
.avatar-pick span.has-img img {
  width: 64px; height: 80px; object-fit: cover; border-radius: 12px;
}

@media (max-width: 700px) {
  body.is-landing {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.is-landing .main-landing,
  .landing {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .landing {
    padding:
      max(12px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    align-content: start;
    place-items: stretch center;
  }
  .landing-stage {
    height: auto;
    gap: 10px;
    grid-template-rows: auto auto auto;
  }
  .landing-fields, .landing-cta { grid-template-columns: 1fr; }
  .hero-card3d { width: clamp(140px, 42vw, 200px); max-width: 70vw; }
  .hero-3d-nav {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }
  .hero-plaque { width: 100%; }
  .hero-plaque-inner { padding: 10px 12px; }
  .brand-lockup { gap: 10px; }
  .landing-infographic { grid-template-columns: 1fr; }
  .info-cell + .info-cell {
    border-left: 0;
    border-top: 1px solid rgba(15,118,110,.14);
  }
  .manifesto-lead { max-width: 34ch; }
  .landing-auth { width: 100%; max-width: 400px; margin-inline: auto; }
}
@media (max-height: 780px) {
  .manifesto-lead { display: none; }
  .info-note { display: none; }
  .info-cell { padding: 8px 10px; gap: 2px; }
}
@media (max-height: 700px) {
  .landing-infographic { display: none; }
  .hero-card3d { width: clamp(130px, 28vw, 180px); }
  .hero-3d-ring { min-height: 200px; }
  .landing-hint { display: none; }
}
@media (max-height: 560px) {
  .landing-manifesto { display: none; }
  .hero-3d-nav { min-height: 52px; height: auto; }
  .hero-plaque { min-height: 48px; height: auto; border-radius: 14px; }
  .hero-active-name { font-size: .85rem; }
  .landing-fields input, .landing-cta .btn { padding: 10px 12px; }
}

.hero-rarity-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800;
  background: color-mix(in srgb, var(--rc, #888) 85%, #000); color: #fff;
}
.hero-card3d { --rc: #64748b; }
.hero-card3d.is-active img {
  box-shadow:
    0 30px 60px color-mix(in srgb, var(--rc) 35%, transparent),
    0 18px 40px rgba(16,36,31,.22),
    0 0 0 3px rgba(255,255,255,.75);
}
.hero-card3d-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent), transparent 70%) !important;
}
.hero-fx {
  position: absolute; left: 50%; top: 42%;
  width: 1px; height: 1px; pointer-events: none; z-index: 1;
}
/* Частицы только внутри #hero-fx — не вешать класс fx-particle на карточки героев */
.hero-fx .fx-particle {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--rc, #14b8a6);
  transform: rotate(var(--a)) translateX(var(--x));
  animation: fx-orbit var(--d) ease-in-out infinite;
  opacity: .85;
}
.hero-fx[data-effect="nucleus"] .fx-particle {
  background: #22d3ee; box-shadow: 0 0 8px #22d3ee;
}
.hero-fx[data-rarity="legendary"] .fx-particle {
  background: linear-gradient(135deg, #f59e0b, #ff6b4a);
  box-shadow: 0 0 10px #f59e0b;
}
.hero-fx[data-rarity="epic"] .fx-particle { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.hero-fx[data-effect="phoenix"] .fx-particle { background: #ff6b4a; }
.hero-fx[data-effect="aurora"] .fx-particle { background: #22d3ee; }
.hero-fx[data-effect="crystal"] .fx-particle { background: #67e8f9; }
.hero-fx[data-effect="flame"] .fx-particle { background: #fb923c; }
@keyframes fx-orbit {
  0%, 100% { opacity: .2; transform: rotate(var(--a)) translateX(calc(var(--x) * .6)) scale(.6); }
  50% { opacity: 1; transform: rotate(calc(var(--a) + 40deg)) translateX(var(--x)) scale(1.1); }
}
.stage-legendary .hero-3d-floor {
  background: radial-gradient(ellipse, rgba(245,158,11,.45), transparent 70%);
}
.stage-phoenix .hero-3d-floor {
  background: radial-gradient(ellipse, rgba(255,107,74,.4), transparent 70%);
}

.hero-collection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.hero-tile {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  display: grid; gap: 6px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease;
}
.hero-tile:hover { transform: translateY(-3px); }
.hero-tile.is-locked { filter: grayscale(.35); opacity: .82; }
.hero-tile.is-equipped { outline: 2px solid var(--rc, var(--teal)); }
.hero-tile-art {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}
.hero-tile-art.img-missing::after {
  content: attr(data-emoji);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 3rem;
  background: linear-gradient(160deg, #e7fffa, #fff4ea);
  border-radius: 16px;
}
.hero-tile-art img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px;
  display: block; background: #e7fffa;
}
.hero-tile.is-senior {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--rc) 12%, transparent), transparent 55%),
    var(--panel, #fff);
}
.rarity-pill, .eq-pill, .senior-pill {
  position: absolute; top: 8px; padding: 4px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; color: #fff;
}
.rarity-pill { left: 8px; background: color-mix(in srgb, var(--rc) 90%, #000); }
.eq-pill { right: 8px; background: var(--teal); }
.senior-pill {
  left: 8px; top: auto; bottom: 8px;
  background: linear-gradient(120deg, #0f766e, #134e4a);
  letter-spacing: .04em;
}
.muted-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 650;
  font-size: .9rem;
  max-width: 42rem;
}
.hero-tile h3 { margin: 4px 0 0; font-family: var(--display); font-size: 1.05rem; letter-spacing: -.02em; }
.hero-tile .role { margin: 0; font-weight: 800; color: var(--rc, var(--teal)); font-size: .82rem; }
.hero-tile .blurb, .hero-tile .bonus { margin: 0; color: var(--muted); font-weight: 650; font-size: .84rem; }
.hero-tile .bonus { color: var(--ink); }
.boss-emoji { display: grid; place-items: center; color: var(--coral); }
.boss-emoji .lm-ico { width: 48px; height: 48px; }
.daily-card.done .boss-emoji { color: var(--amber); }

.quest-node small .lm-ico {
  display: inline-block; vertical-align: -2px; margin: 0 1px;
  color: var(--c, var(--teal));
}
.eyebrow .ico-inline { color: inherit; }
.eyebrow .ico-inline .lm-ico { color: var(--coral); }
@media (max-width: 700px) {
  .dock-item { min-width: 48px; padding: 10px 6px 8px; }
  .dock-label { font-size: .58rem; }
}

/* —— Animated notices / loader —— */
body.lm-loading { overflow: hidden; }
.lm-loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(16,36,31,.42);
  backdrop-filter: blur(10px) saturate(1.1);
  animation: loader-fade .25s ease;
}
.lm-loader.hidden { display: none; }
.lm-loader.is-leaving { animation: loader-fade-out .28s ease forwards; }
.lm-loader-orbits.hidden { display: none; }
.lm-loader-card {
  width: min(440px, 100%);
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 30px 80px rgba(16,36,31,.28);
  text-align: center;
  transform: translateY(8px) scale(.96);
  animation: loader-card-in .35s cubic-bezier(.2,.8,.2,1) forwards;
  overflow: hidden;
}

/* —— Ахиллес и черепаха (парадокс Зенона) —— */
.zeno-race {
  position: relative;
  margin: 0 auto 16px;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #c7f0ea 0%, #e8f7f3 42%, #d6ebe4 42%, #c5ddd4 100%);
  border: 1px solid rgba(15,118,110,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  min-height: 148px;
}
.zeno-race.hidden { display: none; }
.zeno-sky {
  position: absolute; inset: 0 0 58% 0;
  background:
    radial-gradient(circle at 78% 30%, rgba(255,255,255,.85), transparent 28%),
    linear-gradient(180deg, #9fd9d0, transparent);
  pointer-events: none;
}
.zeno-track {
  position: relative;
  z-index: 1;
  padding: 18px 14px 10px;
}
.zeno-lane {
  position: relative;
  height: 86px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(15,118,110,.08) 0 12px,
      rgba(15,118,110,.02) 12px 24px
    ),
    linear-gradient(180deg, #f3fffc, #dff3ed);
  border: 1px dashed rgba(15,118,110,.28);
  overflow: hidden;
}
.zeno-mark {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(15,118,110,.22);
}
.zeno-mark.m1 { left: 28%; }
.zeno-mark.m2 { left: 48%; }
.zeno-mark.m3 { left: 66%; }
.zeno-finish {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  filter: drop-shadow(0 4px 8px rgba(16,36,31,.2));
  animation: zeno-flag 1.2s ease-in-out infinite;
}
.zeno-runner {
  position: absolute;
  bottom: 10px;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 64px;
  margin-left: -32px;
  will-change: left;
}
.zeno-emoji {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(16,36,31,.18));
}
.zeno-name {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border: 1px solid rgba(15,118,110,.16);
}
.zeno-achilles { left: 8%; z-index: 2; }
.zeno-tortoise { left: 34%; z-index: 3; }
.zeno-race.is-racing .zeno-achilles {
  animation: zeno-achilles 3.6s cubic-bezier(.15,.7,.2,1) infinite;
}
.zeno-race.is-racing .zeno-tortoise {
  animation: zeno-tortoise 3.6s cubic-bezier(.2,.65,.25,1) infinite;
}
.zeno-race.is-racing .zeno-achilles .zeno-emoji {
  animation: zeno-run-bob .28s ease-in-out infinite;
}
.zeno-race.is-racing .zeno-tortoise .zeno-emoji {
  animation: zeno-turtle-bob .7s ease-in-out infinite;
}
.zeno-caption {
  position: relative;
  z-index: 1;
  margin: 8px 12px 10px;
  font-size: .78rem;
  font-weight: 750;
  color: var(--muted);
  line-height: 1.35;
}
.lm-zeno .lm-loader-card {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(20,184,166,.12), transparent 55%),
    rgba(255,255,255,.94);
}
.lm-boss.lm-zeno .zeno-race {
  background:
    linear-gradient(180deg, #ffd7c8 0%, #fff1e8 42%, #f0ddd0 42%, #e8cfc0 100%);
}
.lm-boss.lm-zeno .zeno-lane {
  border-color: rgba(255,107,74,.3);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255,107,74,.1) 0 12px,
      rgba(255,107,74,.03) 12px 24px
    ),
    linear-gradient(180deg, #fffaf5, #ffe8d8);
}

@keyframes zeno-achilles {
  0%   { left: 10%; }
  22%  { left: 30%; }
  42%  { left: 46%; }
  62%  { left: 58%; }
  82%  { left: 68%; }
  100% { left: 74%; }
}
@keyframes zeno-tortoise {
  0%   { left: 36%; }
  22%  { left: 46%; }
  42%  { left: 56%; }
  62%  { left: 64%; }
  82%  { left: 71%; }
  100% { left: 78%; }
}
@keyframes zeno-run-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}
@keyframes zeno-turtle-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}
@keyframes zeno-flag {
  0%, 100% { transform: translateY(-50%) rotate(-6deg); }
  50% { transform: translateY(-58%) rotate(6deg); }
}
.lm-loader-orbits {
  position: relative;
  width: 110px; height: 110px;
  margin: 0 auto 16px;
}
.lm-loader-orbits span {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--teal);
  border-right-color: rgba(20,184,166,.35);
  animation: spin 1.1s linear infinite;
}
.lm-loader-orbits span:nth-child(2) {
  inset: 10px;
  border-top-color: var(--coral);
  animation-duration: 1.6s;
  animation-direction: reverse;
}
.lm-loader-orbits span:nth-child(3) {
  inset: 22px;
  border-top-color: var(--amber);
  animation-duration: 2.1s;
}
.lm-loader-core {
  position: absolute; inset: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #ccfbf1);
  font-style: normal; font-size: 1.8rem;
  box-shadow: 0 10px 24px rgba(15,118,110,.2);
  animation: floaty 2.2s ease-in-out infinite;
}
.lm-boss .lm-loader-core {
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
  box-shadow: 0 10px 24px rgba(255,107,74,.25);
}
.lm-boss .lm-loader-orbits span { border-top-color: var(--coral); }
.lm-magic .lm-loader-core { background: linear-gradient(145deg, #f5f3ff, #e9d5ff); }
.lm-shop .lm-loader-core { background: linear-gradient(145deg, #ecfeff, #cffafe); }
.lm-hero .lm-loader-core { background: linear-gradient(145deg, #fff, #fef3c7); }
.lm-loader-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -.03em;
}
.lm-loader-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 700;
  font-size: .92rem;
}
.lm-loader-steps {
  display: grid; gap: 8px;
  text-align: left;
  margin-bottom: 16px;
}
.lm-step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15,118,110,.04);
  color: var(--muted);
  font-weight: 700;
  font-size: .88rem;
  opacity: .55;
  transition: .25s ease;
}
.lm-step.is-on {
  opacity: 1;
  color: var(--ink);
  background: rgba(20,184,166,.12);
  transform: translateX(4px);
}
.lm-step.is-done {
  opacity: .85;
  color: var(--ok);
}
.lm-step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #cbd5e1; flex-shrink: 0;
}
.lm-step.is-on .lm-step-dot {
  background: var(--teal-2);
  box-shadow: 0 0 0 4px rgba(20,184,166,.2);
  animation: pulse-dot .9s ease infinite;
}
.lm-step.is-done .lm-step-dot { background: var(--ok); }
.lm-loader-bar {
  height: 8px; border-radius: 999px;
  background: rgba(0,0,0,.06); overflow: hidden;
}
.lm-loader-bar i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral), var(--amber));
  background-size: 200% 100%;
  animation: bar-shine 1.4s linear infinite;
  transition: width .25s ease;
}

.toast-root { gap: 10px; }
.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  overflow: hidden;
  padding: 12px 14px 14px;
  border-radius: 16px;
  font-weight: 700;
  background: rgba(16,36,31,.94);
  color: #fff;
  box-shadow: var(--shadow);
}
.toast-in { animation: toast-in .35s ease; }
.toast-out { animation: toast-out .28s ease forwards; }
.toast-ok { background: linear-gradient(135deg, #0f766e, #0f9f6e); }
.toast-bad { background: linear-gradient(135deg, #be123c, #e11d48); }
.toast-info { background: linear-gradient(135deg, #0e7490, #0284c7); }
.toast-magic { background: linear-gradient(135deg, #6d28d9, #0f766e); }
.toast-ico { font-size: 1.2rem; line-height: 1; margin-top: 1px; }
.toast-title { display: block; font-size: .72rem; opacity: .85; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
.toast-msg { display: block; font-size: .92rem; line-height: 1.3; }
.toast-life {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.35);
  transform-origin: left center;
  animation: toast-life var(--life, 2600ms) linear forwards;
}

.float-text {
  position: fixed; z-index: 95;
  transform: translate(-50%, -50%);
  font-family: var(--display); font-weight: 800; font-size: 1.2rem;
  pointer-events: none;
  animation: float-up .9s ease forwards;
  text-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.float-ok { color: var(--ok); }
.float-bad { color: var(--danger); }

.panel-enter { animation: rise .35s ease; }
.q-enter { animation: q-in .35s ease; }
.opt-enter { animation: opt-in .35s ease both; }
.q-feedback.is-good { background: #d1fae5; color: #065f46; }
.q-feedback.is-bad { background: #ffe4e6; color: #9f1239; }
.hint-fade { animation: hint-out .45s ease forwards; }
.status-error { color: var(--danger); font-weight: 800; }

.typing-dots {
  display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle;
}
.typing-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  animation: typing 1s ease infinite;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
.typing-label { font-style: italic; opacity: .8; }
.bubble.typing {
  display: inline-flex; align-items: center;
  background: #f0fdfa; border-style: dashed;
}
.bubble-in { animation: rise .3s ease; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px; margin: -9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}

.lm-shake { animation: shake .45s ease; }
.lm-pulse { animation: pulse-hit .35s ease; }

@keyframes loader-fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes loader-fade-out {
  to { opacity: 0; }
}
@keyframes loader-card-in {
  to { transform: none; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-dot {
  50% { transform: scale(1.25); }
}
@keyframes bar-shine {
  to { background-position: 200% 0; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(18px); }
}
@keyframes toast-life {
  from { transform: scaleX(1); } to { transform: scaleX(0); }
}
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(1.05); }
}
@keyframes q-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes opt-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes hint-out {
  to { opacity: .2; transform: scale(.96); filter: grayscale(1); }
}
@keyframes typing {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-4px); opacity: 1; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes pulse-hit {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* —— Lesson Play (v2 interactive) —— */
.lesson-play { max-width: 920px; margin: 0 auto; padding-bottom: 40px; }
.lp-hero {
  display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 20px;
  align-items: center; margin-bottom: 18px;
}
.lp-hero-art {
  position: relative; border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 48px rgba(16,36,31,.22);
  aspect-ratio: 3/4; background: linear-gradient(160deg, #e7fffa, #fff4ea);
}
.lp-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-hero-glow {
  position: absolute; inset: auto 10% -20%; height: 40%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--teal)) 55%, transparent), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.lp-headline {
  margin: 6px 0 8px; font-weight: 800; font-size: 1.05rem; line-height: 1.35;
  color: color-mix(in srgb, var(--c, var(--teal)) 70%, var(--ink));
}
.lp-badge {
  display: inline-flex; margin-top: 8px; padding: 5px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: color-mix(in srgb, var(--c, var(--teal)) 18%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 35%, transparent);
  color: var(--c, var(--teal));
}
.lp-xp-note {
  margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.lp-rail {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px;
  scrollbar-width: thin;
}
.lp-rail-item {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(15,118,110,.14);
  background: rgba(255,255,255,.75); font: inherit; font-weight: 750; font-size: .78rem;
  cursor: pointer; color: var(--muted);
}
.lp-rail-item.is-on {
  color: #fff; background: var(--c, var(--teal)); border-color: transparent;
}
.lp-rail-item.is-done:not(.is-on) {
  color: var(--c, var(--teal)); border-color: color-mix(in srgb, var(--c, var(--teal)) 40%, transparent);
}
.lp-rail-num {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: .7rem; background: rgba(0,0,0,.08);
}
.lp-rail-item.is-on .lp-rail-num { background: rgba(255,255,255,.25); }
.lp-progress {
  height: 6px; border-radius: 999px; background: rgba(15,118,110,.12);
  overflow: hidden; margin-bottom: 18px;
}
.lp-progress i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--c, var(--teal)), var(--coral));
  transition: width .35s ease;
}
.lp-stage { display: none; animation: rise .35s ease; }
.lp-stage.is-active { display: block; }
.lp-stage h2 {
  margin: 0 0 12px; font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em;
}
.lp-why { font-weight: 650; line-height: 1.55; margin: 0 0 16px; }
.lp-map {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.lp-map-card {
  padding: 14px; border-radius: 16px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(15,118,110,.12);
}
.lp-map-card.is-now {
  background: color-mix(in srgb, var(--c, var(--teal)) 14%, #fff);
  border-color: color-mix(in srgb, var(--c, var(--teal)) 40%, transparent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c, var(--teal)) 18%, transparent);
}
.lp-map-card p { margin: 6px 0 0; font-weight: 700; font-size: .88rem; line-height: 1.35; }
.lp-skill { font-weight: 700; margin: 0 0 14px; }
.lp-story { padding: 18px 20px; line-height: 1.55; font-weight: 650; }
.lp-challenge {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--coral) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--coral) 30%, transparent);
}
.lp-theory-stack { display: grid; gap: 10px; margin-bottom: 16px; }
.lesson-theory-card.lp-theory-card {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px 12px;
  align-items: start;
  padding: 16px 18px;
}
.lp-theory-idx {
  position: static;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: .85rem; color: #fff;
  background: var(--c, var(--teal));
  flex-shrink: 0;
  grid-row: 1 / span 20;
}
.lesson-theory-card.lp-theory-card h3 {
  margin: 0;
  padding-top: 4px;
  min-width: 0;
  line-height: 1.3;
}
.lesson-theory-card.lp-theory-card > p,
.lesson-theory-card.lp-theory-card .lp-tip {
  grid-column: 2;
  min-width: 0;
}
.lp-tip {
  margin: 10px 0 0; padding: 8px 12px; border-radius: 12px;
  background: #fff7ed; font-size: .88rem; font-weight: 700;
}
.lp-subh { margin: 18px 0 10px; font-size: 1.05rem; }
.lp-life { padding: 16px 18px; margin-top: 12px; }
.lp-flash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr));
  gap: 12px;
  margin: 12px 0;
  perspective: 900px;
}
.lp-flash {
  display: block;
  width: 100%;
  min-width: 0;
  height: 140px;
  min-height: 140px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
.lp-flash-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .45s ease;
}
.lp-flash.is-flipped .lp-flash-inner { transform: rotateY(180deg); }
.lp-flash-face {
  position: absolute; inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 18px; padding: 12px;
  display: grid; place-items: center; text-align: center;
  font-weight: 750; font-size: .82rem; line-height: 1.25;
  box-shadow: 0 12px 28px rgba(16,36,31,.12);
  overflow: hidden;
}
.lp-flash-front {
  background: linear-gradient(160deg, color-mix(in srgb, var(--c, var(--teal)) 22%, #fff), #fff);
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 30%, transparent);
}
.lp-flash-back {
  background: linear-gradient(160deg, #1f2937, #0f766e);
  color: #fff; transform: rotateY(180deg);
}
.lp-flash-back small { display: block; margin-top: 8px; opacity: .8; font-size: .72rem; }
.lp-stage-status { font-weight: 750; color: var(--muted); margin: 8px 0 12px; }
.lp-quiz { display: grid; gap: 12px; margin: 12px 0; }
.lp-quiz-item {
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,118,110,.12);
}
.lp-quiz-item h3 { margin: 0 0 10px; font-size: .98rem; }
.lp-quiz-opts { display: grid; gap: 6px; }
.lp-quiz-opt {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(15,118,110,.04); font-weight: 650;
}
.lp-quiz-opt:hover { background: color-mix(in srgb, var(--c, var(--teal)) 10%, #fff); }
.lp-quiz-item.is-ok { border-color: #10b981; background: #ecfdf5; }
.lp-quiz-item.is-bad { border-color: #f43f5e; background: #fff1f2; }
.lp-quiz-explain { margin: 10px 0 0; font-size: .86rem; font-weight: 700; color: var(--muted); }
.lp-match {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 10px;
  margin: 12px 0;
}
.lp-match-card {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  border-radius: 16px;
  border: 1.5px solid rgba(15,118,110,.16);
  background: rgba(255,255,255,.9);
  font: inherit; font-weight: 750; font-size: .85rem; line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  transition: transform .15s ease, border-color .15s ease;
}
.lp-match-card:hover { transform: translateY(-2px); }
.lp-match-card.is-selected {
  border-color: var(--c, var(--teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--teal)) 25%, transparent);
}
.lp-match-card.is-matched {
  background: #ecfdf5; border-color: #10b981; color: #065f46; cursor: default;
}
.lp-match-card.is-wrong { border-color: #f43f5e; animation: shake .4s ease; }
.lp-cheer { margin-top: 10px; font-weight: 800; color: var(--c, var(--teal)); }
.lp-nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 12px; border-top: 1px solid rgba(15,118,110,.1);
}
.program-card-art {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 14px;
  margin-bottom: 4px;
}
.program-vision {
  display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center;
  padding: 16px; margin-bottom: 20px; border-radius: 22px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c, var(--teal)) 16%, #fff), rgba(255,255,255,.9));
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 28%, transparent);
}
.program-vision img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px;
  box-shadow: 0 16px 32px rgba(16,36,31,.15);
}
.program-vision-copy h2 { margin: 0 0 6px; font-family: var(--display); font-size: 1.2rem; }
.program-vision-copy p { margin: 0; font-weight: 650; color: var(--muted); line-height: 1.4; }
.program-roadmap {
  display: flex; gap: 8px; overflow-x: auto; margin: 12px 0 20px; padding-bottom: 4px;
}
.program-roadmap span {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,.8); border: 1px solid rgba(15,118,110,.12);
  font-size: .75rem; font-weight: 750; max-width: 140px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.program-roadmap span.is-now {
  background: color-mix(in srgb, var(--c, var(--teal)) 18%, #fff);
  border-color: color-mix(in srgb, var(--c, var(--teal)) 40%, transparent);
  color: var(--c, var(--teal));
}

@media (max-width: 700px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-hero-art { max-width: 200px; margin: 0 auto; }
  .lp-map { grid-template-columns: 1fr; }
  .program-vision { grid-template-columns: 1fr; }
  .program-vision img { max-width: 160px; margin: 0 auto; }
  .lp-rail-label { display: none; }
  .lp-flash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .lp-flash { height: 120px; min-height: 120px; }
  .lp-flash-face { font-size: .78rem; padding: 10px; border-radius: 14px; }
  .lp-match { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-match-card { min-height: 76px; font-size: .8rem; }
  .lp-nav-bar { flex-wrap: wrap; gap: 10px; }
  .lp-nav-bar .btn { flex: 1 1 auto; min-width: 0; }
  .lesson-play { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .main { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.program-grid-compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.program-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px;
  border-radius: 22px;
  text-decoration: none; color: inherit;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c, var(--teal)) 12%, #fff), rgba(255,255,255,.9));
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 28%, transparent);
  box-shadow: 0 14px 32px rgba(16,36,31,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.program-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16,36,31,.12); }
.program-card h2 {
  margin: 0; font-family: var(--display); font-size: 1.05rem; letter-spacing: -.02em;
}
.program-card p {
  margin: 0; color: var(--muted); font-size: .82rem; font-weight: 650; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.program-card-top { display: flex; justify-content: space-between; align-items: center; }
.program-ico { font-size: 1.6rem; }
.program-pct {
  font-family: var(--display); font-weight: 800; font-size: .95rem;
  color: var(--c, var(--teal));
}
.program-meter {
  height: 6px; border-radius: 999px; background: rgba(15,118,110,.12); overflow: hidden;
}
.program-meter i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--c, var(--teal)), var(--coral));
}
.program-meta {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  font-size: .72rem; font-weight: 750; color: var(--muted);
}
.program-goals {
  margin: 12px 0 0; padding: 0; list-style: none;
  display: grid; gap: 6px;
}
.program-goals li {
  position: relative; padding-left: 18px;
  font-size: .88rem; font-weight: 650; color: var(--ink);
}
.program-goals li::before {
  content: "▸"; position: absolute; left: 0; color: var(--c, var(--teal)); font-weight: 800;
}
.program-stat-pill {
  display: grid; place-items: center; gap: 2px;
  min-width: 96px; padding: 14px 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--c, var(--teal)) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 30%, transparent);
  text-align: center;
}
.program-stat-pill strong {
  font-family: var(--display); font-size: 1.6rem; letter-spacing: -.03em; color: var(--c, var(--teal));
}
.program-stat-pill span { font-size: .72rem; font-weight: 750; color: var(--muted); }

.edu-module {
  margin-bottom: 22px; padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,118,110,.12);
  box-shadow: 0 12px 28px rgba(16,36,31,.06);
}
.edu-module-head h2 {
  margin: 0 0 4px; font-family: var(--display); font-size: 1.15rem;
}
.edu-module-head p { margin: 0 0 12px; }
.edu-lesson-list { display: grid; gap: 8px; }
.edu-lesson-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center;
  padding: 12px 14px; border-radius: 16px;
  text-decoration: none; color: inherit;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(15,118,110,.1);
  transition: border-color .15s ease, transform .15s ease;
}
.edu-lesson-row:hover:not(.is-locked) {
  border-color: color-mix(in srgb, var(--c, var(--teal)) 45%, transparent);
  transform: translateX(2px);
}
.edu-lesson-row.is-locked { opacity: .55; cursor: not-allowed; }
.edu-lesson-status {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 12px;
  font-weight: 800; color: #fff;
  background: var(--c, var(--teal));
}
.edu-lesson-row.status-locked .edu-lesson-status { background: #94a3b8; }
.edu-lesson-row.status-studied .edu-lesson-status { background: #f59e0b; }
.edu-lesson-row.status-mastered .edu-lesson-status { background: #10b981; }
.edu-lesson-body { display: grid; gap: 2px; min-width: 0; }
.edu-lesson-body strong {
  font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.edu-lesson-body small { color: var(--muted); font-weight: 650; }
.edu-lesson-badge {
  font-size: .68rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  color: var(--c, var(--teal));
}

.lesson-warmup { padding: 18px 20px; margin-bottom: 16px; }
.lesson-goals {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.lesson-goal-chip {
  padding: 6px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 750;
  background: color-mix(in srgb, var(--c, var(--teal)) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 28%, transparent);
  color: var(--ink);
}
.lesson-section { margin-bottom: 22px; }
.lesson-section h2 {
  margin: 0 0 12px; font-family: var(--display); font-size: 1.2rem; letter-spacing: -.02em;
}
.lesson-theory-card {
  padding: 16px 18px; margin-bottom: 10px; border-radius: 18px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(15,118,110,.1);
}
.lesson-theory-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--c, var(--teal)); }
.lesson-theory-card p { margin: 0; line-height: 1.55; font-weight: 650; }
.lesson-terms {
  display: grid; gap: 10px; margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.lesson-terms > div {
  padding: 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--c, var(--teal)) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 18%, transparent);
}
.lesson-terms dt { font-weight: 800; margin-bottom: 4px; }
.lesson-terms dd { margin: 0; color: var(--muted); font-size: .88rem; font-weight: 650; line-height: 1.4; }
.lesson-example {
  padding: 16px 18px; margin-bottom: 10px; border-radius: 18px;
  background: rgba(255,255,255,.85);
  border: 1px dashed color-mix(in srgb, var(--c, var(--teal)) 35%, transparent);
}
.lesson-example h3 { margin: 0 0 8px; font-size: .98rem; }
.lesson-example ol { margin: 0 0 10px; padding-left: 1.2em; font-weight: 650; line-height: 1.45; }
.lesson-answer {
  margin: 0; padding: 8px 12px; border-radius: 12px;
  background: color-mix(in srgb, #10b981 12%, #fff);
  font-weight: 700;
}
.lesson-mistakes ul { margin: 0; padding-left: 1.2em; font-weight: 650; line-height: 1.5; }
.lesson-practice { display: grid; gap: 8px; }
.practice-item {
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(15,118,110,.12);
}
.practice-item summary {
  cursor: pointer; font-weight: 750; list-style: none;
}
.practice-item summary::-webkit-details-marker { display: none; }
.practice-item[open] summary { margin-bottom: 8px; color: var(--c, var(--teal)); }
.lesson-summary, .lesson-cta { padding: 20px; margin-bottom: 16px; }
.lesson-cta h2 { margin: 4px 0 8px; font-family: var(--display); font-size: 1.25rem; }
.btn.is-soft { opacity: .72; }
.lesson-nav-mini { display: flex; gap: 6px; }
.qn-lesson-tag {
  display: inline-block; margin-top: 6px;
  font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--c, var(--teal));
}
.dash-programs { margin: 8px 0 22px; }

@media (max-width: 700px) {
  .edu-lesson-row { grid-template-columns: 32px 1fr; }
  .edu-lesson-badge { display: none; }
  .program-stat-pill { min-width: 80px; }
}

