/* ============================================================
   Muse English — warm, calm, editorial
   Colors: ink navy #17212B | warm paper #F7F2E8 | mist blue #DCE8EA
           tomato #C84B31 | herb green #39745A
   Type: Georgia for headings; Avenir Next / Trebuchet MS / system-ui body
   Mobile-first. Sidebar navigation on wide screens.
   ============================================================ */
:root {
  --ink: #17212B;
  --paper: #F7F2E8;
  --card: #FFFDF6;
  --mist: #DCE8EA;
  --tomato: #C84B31;
  --tomato-dark: #A83B26;
  --herb: #39745A;
  --herb-dark: #2B5945;
  --muted: #6B7280;
  --line: #E7DECB;
  --red: #C0392B;
  --shadow: 0 2px 10px rgba(23, 33, 43, 0.08);
  --radius: 14px;
  --content-w: 680px;
  --landing-w: 1060px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% -5%, rgba(200, 75, 49, 0.05), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(57, 116, 90, 0.06), transparent 50%);
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
/* Bottom clearance only when the fixed tab bar is actually shown (logged in). */
body.logged-in { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

h1, h2, h3, h4, .serif {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.25;
}

h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 0.75em; }

.hidden { display: none !important; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 10px;
  text-decoration: none; font-weight: 600; transition: top 0.15s ease;
}
.skip-link:focus { top: 0.6rem; }
:focus-visible {
  outline: 3px solid var(--tomato);
  outline-offset: 2px;
  border-radius: 6px;
}
#app-header :focus-visible, .tabbar :focus-visible { outline-color: #fff; }

/* ---------- Headers ---------- */
#app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
}
.header-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; }
.brand-mark { font-size: 1.3rem; }
.brand-name { font-family: Georgia, serif; font-size: 1.1rem; letter-spacing: 0.02em; }
.header-right { display: flex; align-items: center; gap: 0.5rem; }

/* Profile menu (compact account control) */
.profile-menu { position: relative; }
.profile-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(247, 242, 232, 0.4);
  background: var(--tomato); color: #fff;
  font-size: 1.1rem; font-weight: 700; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.profile-btn:hover { border-color: #fff; }
.profile-dropdown {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(23, 33, 43, 0.22);
  min-width: 230px; padding: 0.5rem; z-index: 100;
}
.profile-email {
  font-weight: 700; font-size: 0.9rem; padding: 0.6rem 0.8rem 0.1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-level { font-size: 0.8rem; color: var(--muted); padding: 0 0.8rem 0.5rem; }
.profile-item {
  display: block; width: 100%; text-align: left;
  padding: 0.65rem 0.8rem; border: none; background: none;
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
  border-radius: 10px; cursor: pointer; text-decoration: none;
}
.profile-item:hover { background: var(--paper); }

/* ---------- Layout ---------- */
#view { max-width: var(--content-w); margin: 0 auto; padding: 1rem 1rem 0.5rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tomato);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.card.plain { border-left-color: var(--line); }
.card.mist { border-left-color: var(--mist); background: #FDFBF4; }



.btn:active { transform: scale(0.97); }
.btn:hover { background: var(--tomato-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-green { background: var(--herb); }
.btn-green:hover { background: var(--herb-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(23, 33, 43, 0.05); }
#app-header .btn-ghost { color: var(--paper); border-color: rgba(247, 242, 232, 0.35); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; min-height: 38px; }
.btn-block { display: block; width: 100%; margin-top: 0.75rem; }
.btn-row { display: flex; gap: 0.6rem; margin-top: 0.9rem; }
.btn-row .btn { flex: 1; }

/* ---------- Forms ---------- */
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--tomato); border-color: var(--ink); }
/* Password visibility toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.75rem; }
.pw-toggle {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 1.15rem; line-height: 1;
  padding: 0.25rem; opacity: 0.65; min-height: 44px; min-width: 44px;
}
.pw-toggle:hover { opacity: 1; }
.form-error { color: var(--red); font-size: 0.9rem; margin: 0.5rem 0; min-height: 1.2em; }
.form-note { color: var(--herb-dark); font-size: 0.9rem; margin: 0.5rem 0; min-height: 1.2em; }
.auth-switch { text-align: center; margin-top: 1rem; font-size: 0.92rem; }

.link { color: var(--tomato); cursor: pointer; font-weight: 600; text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ============================================================
   LANDING PAGE (logged out)
   ============================================================ */
.landing-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 232, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.landing-header-inner {
  max-width: var(--landing-w); margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.landing-header .brand { color: var(--ink); }
.landing-nav { display: none; gap: 1.4rem; }
.landing-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.landing-nav a:hover { color: var(--tomato-dark); }
.landing-actions { display: flex; gap: 0.5rem; align-items: center; }
@media (min-width: 720px) { .landing-nav { display: flex; } }

.landing { max-width: var(--landing-w); margin: 0 auto; padding: 0 1rem 3rem; }

/* Hero */
.hero {
  display: grid; gap: 1.6rem;
  padding: 2.6rem 0 2rem;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 2.5rem; padding: 4rem 0 3rem; }
}
.hero-eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--tomato-dark);
  background: rgba(200, 75, 49, 0.1); border-radius: 999px; padding: 0.3rem 0.85rem;
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2.1rem; line-height: 1.18; margin-bottom: 0.7rem; }
@media (min-width: 900px) { .hero h1 { font-size: 2.9rem; } }
.hero-desc { font-size: 1.08rem; color: #3A4754; max-width: 34rem; }
.hero-signals { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.hero-signals li { font-size: 0.92rem; font-weight: 600; color: var(--herb-dark); }
.hero-signals li::before { content: "✓ "; color: var(--herb); }

/* Hero product preview card (resembles the real app) */
.hero-preview { position: relative; }
.preview-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 18px 50px rgba(23, 33, 43, 0.16);
  overflow: hidden; max-width: 420px; margin: 0 auto;
}
.preview-head {
  background: var(--ink); color: var(--paper);
  padding: 0.9rem 1.1rem; display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; flex-wrap: wrap;
}
.preview-head .brand-name { font-size: 1rem; }
.preview-head .badge-level { white-space: nowrap; }
.preview-body { padding: 1.1rem; }
.preview-date { font-size: 0.78rem; color: var(--muted); }
.preview-theme { font-family: Georgia, serif; font-size: 1.45rem; margin: 0.15rem 0 0.5rem; text-transform: capitalize; }
.preview-checks { list-style: none; margin: 0.8rem 0 1rem; padding: 0; }
.preview-checks li {
  display: flex; gap: 0.6rem; align-items: center;
  padding: 0.55rem 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem;
}
.preview-checks li:last-child { border-bottom: none; }
.preview-checks .ck {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--mist); display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.preview-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0.3rem 0 0.4rem; }
.preview-bar > div { height: 100%; width: 34%; background: var(--herb); border-radius: 999px; }
.preview-progress-label { font-size: 0.8rem; color: var(--muted); }

/* Landing sections */
.landing-section { padding: 2.4rem 0; border-top: 1px solid var(--line); }
.landing-section h2 { font-size: 1.7rem; margin-bottom: 0.4rem; }
.landing-section .section-sub { color: var(--muted); max-width: 36rem; margin-bottom: 1.4rem; }

/* Interactive lesson preview tabs */
.preview-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.preview-tab {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 0.55rem 1.2rem; min-height: 44px; font-family: inherit; font-weight: 600;
  font-size: 0.92rem; cursor: pointer; color: var(--ink);
}
.preview-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.preview-words { display: grid; gap: 0.7rem; }
@media (min-width: 720px) { .preview-words { grid-template-columns: 1fr 1fr; } }
.preview-word {
  display: flex; gap: 0.8rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem; box-shadow: var(--shadow);
}
.preview-word img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--mist); }
.preview-word .pw-word { font-family: Georgia, serif; font-size: 1.15rem; font-weight: 700; }
.preview-word .pw-meaning { font-size: 0.88rem; color: var(--muted); }
.preview-quiz-teaser {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow); text-align: center;
}

/* Steps: Learn → Listen → Speak → Review */
.steps { display: grid; gap: 0.8rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1rem; box-shadow: var(--shadow); position: relative;
}
.step-num {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--tomato); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.7rem;
}
.step h3 { margin-bottom: 0.3rem; }
.step p { font-size: 0.92rem; color: #3A4754; margin: 0; }

/* Levels */
.level-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
@media (min-width: 720px) { .level-grid { grid-template-columns: repeat(3, 1fr); } }
.level-cell {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow);
}
.level-cell .lvl { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; }
.level-cell .lbl { font-size: 0.88rem; color: var(--muted); }
.level-cell .desc { font-size: 0.85rem; color: #3A4754; margin-top: 0.35rem; }

/* Mistakes-become-practice */
.mistake-band {
  background: var(--ink); color: var(--paper); border-radius: 20px;
  padding: 1.8rem 1.4rem; display: grid; gap: 1.2rem;
}
@media (min-width: 900px) { .mistake-band { grid-template-columns: 1fr 1fr; align-items: center; padding: 2.4rem 2rem; } }
.mistake-band h2 { color: #fff; }
.mistake-band p { color: rgba(247, 242, 232, 0.85); }
.mistake-demo {
  background: var(--card); color: var(--ink); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow);
}
.mistake-demo .md-q { font-weight: 700; margin-bottom: 0.5rem; }
.mistake-demo .md-wrong { color: var(--red); font-size: 0.92rem; }
.mistake-demo .md-arrow { text-align: center; font-size: 1.3rem; margin: 0.4rem 0; }
.mistake-demo .md-review { color: var(--herb-dark); font-weight: 600; font-size: 0.92rem; }

/* Final CTA */
.final-cta {
  text-align: center; padding: 3rem 1rem;
  background: linear-gradient(135deg, #fdf6ec, #fbeed9);
  border: 1px solid var(--line); border-radius: 22px; margin-top: 2.4rem;
  box-shadow: var(--shadow);
}
.final-cta h2 { font-size: 1.9rem; }
.final-cta .btn { margin: 0.4rem 0.3rem; }
.landing-footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2rem 0 1rem; }

/* ---------- Home dashboard ---------- */
.today-card {
  border-left-color: var(--tomato);
  background: linear-gradient(180deg, #FFFDF6 0%, #FDF8EC 100%);
}
.today-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.7rem; flex-wrap: wrap; }
.today-theme { font-family: Georgia, serif; font-size: 1.6rem; margin: 0.2rem 0 0.3rem; text-transform: capitalize; }
.today-steps { list-style: none; margin: 0.9rem 0; padding: 0; display: grid; gap: 0.5rem; }
.today-steps li { margin: 0; padding: 0; }
.today-step-btn {
  width: 100%; display: flex; align-items: center; gap: 0.65rem;
  background: #fff; border: 1px solid var(--line); border-radius: 0.8rem;
  padding: 0.6rem 0.75rem; font-size: 0.95rem; font-family: inherit; color: var(--ink);
  cursor: pointer; text-align: left;
}
.today-step-btn:active { transform: scale(0.99); }
.today-steps .st-ck {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700;
  border: 2px solid var(--line); background: #fff; color: var(--muted);
}
.today-steps li.done .st-ck { background: var(--herb); border-color: var(--herb); color: #fff; }
.today-steps li.done .st-name { color: var(--muted); }
.today-steps li.next .today-step-btn { border: 2px solid var(--tomato); background: #FFF6F1; padding: calc(0.6rem - 1px) calc(0.75rem - 1px); }
.today-steps li.next .st-ck { border-color: var(--tomato); color: var(--tomato); }
.today-steps li.next .st-name { font-weight: 700; color: var(--ink); }
.st-pill {
  margin-left: auto; background: var(--tomato); color: #fff; font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.06em; border-radius: 999px; padding: 0.2rem 0.55rem; font-family: Arial, sans-serif;
}
.st-go { color: var(--muted); font-size: 1.25rem; line-height: 1; }
.today-steps li.next .st-go { color: var(--tomato); }
.today-progress { margin: 0.6rem 0 0.9rem; }
.today-progress .tp-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.3rem; }
.today-progress .progress { height: 10px; }
.today-progress .progress > div { background: var(--herb); }

/* Older lessons strip */
/* Previous lessons strip (Home) */




/* ---------- Past lessons archive — dark navy / flame identity ----------
   Reuses the approved v2 lesson-card component (.prev-card.v2 markup:
   pcv-photo + pcv-date badge + pcv-body + pcv-theme + pcv-row/bar/ico)
   with a dark theme override scoped to .archive-page. */
.archive-page{
  margin:-1rem -1rem -7rem;
  padding:1.4rem 1rem 9rem;
  min-height:75vh;
  background:radial-gradient(120% 60% at 50% 0%, #23234a 0%, #14142e 55%, #101024 100%);
  color:#fff;
}
.archive-head{margin:0 0 1.1rem;}
.archive-head h1{
  font-family:Georgia,serif;font-size:1.7rem;color:#fff;
  margin:0 0 .25rem;letter-spacing:-0.01em;
}
.archive-head p{margin:0;font-size:.85rem;font-weight:600;color:rgba(255,255,255,.6);}
.archive-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:.85rem;
}
@media (min-width:640px){
  .archive-grid{grid-template-columns:repeat(3,1fr);}
}
@media (min-width:1024px){
  .archive-grid{grid-template-columns:repeat(4,1fr);}
}
/* v2 card in grid context: fluid width instead of strip sizing */
.archive-grid .prev-card.v2{flex:none;width:100%;}
/* dark theme overrides for the v2 card */
.archive-page .prev-card.v2{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 16px 40px rgba(0,0,0,.4);
}
.archive-page .prev-card.v2:active{transform:scale(.98);}
.archive-page .pcv-photo{background:#1a1a30;}
.archive-page .pcv-photo .prev-ph{
  display:flex;align-items:center;justify-content:center;
  height:112px;font-size:2.2rem;
}
.archive-page .pcv-date{
  background:linear-gradient(180deg,#ffa726,#ff8a00);
  color:#3a2200;
}
.archive-page .pcv-theme{color:#fff;}
.archive-page .arc-meta{
  display:block;font-size:.72rem;font-weight:600;color:rgba(255,255,255,.55);
  margin:-.3rem 0 .55rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.archive-page .pcv-bar{background:rgba(255,255,255,.14);}
.archive-page .pcv-ico{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:none;
}
.empty-dark{color:rgba(255,255,255,.6);}

/* Review / progress compact cards */


.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-card .cat-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23,33,43,0.85) 0%, rgba(23,33,43,0.25) 55%, transparent 100%);
}
.cat-card .cat-body { position: relative; padding: 0.7rem 0.8rem; width: 100%; }
.cat-card .cat-theme { font-family: Georgia, serif; font-size: 1.05rem; text-transform: capitalize; }
.cat-card .cat-date { font-size: 0.75rem; opacity: 0.85; }
.today-badge {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: var(--tomato); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem; border-radius: 999px; z-index: 2;
}
.cat-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--mist), #B9CFC9);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
}

/* ---------- Word cards ---------- */
.word-card { overflow: hidden; }
.word-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 0.8rem; background: var(--mist); }
.word-photo-fallback {
  width: 100%; height: 130px; border-radius: 10px; margin-bottom: 0.8rem;
  background: linear-gradient(135deg, var(--mist), #B9CFC9);
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
}
.word-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.word-title { font-family: Georgia, serif; font-size: 1.5rem; margin: 0; }
.word-pos { font-size: 0.75rem; font-weight: 700; color: var(--herb); text-transform: uppercase; letter-spacing: 0.05em; }
.word-pron { color: var(--muted); font-size: 0.95rem; margin: 0.15rem 0 0.5rem; }
.word-meaning { font-weight: 600; }
.word-example { font-style: italic; color: #3A4754; border-left: 3px solid var(--mist); padding-left: 0.7rem; margin: 0.5rem 0; }
.word-fa { color: var(--muted); }
.speaker-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  font-size: 1.1rem; padding: 0.35rem 0.7rem; cursor: pointer; line-height: 1;
  min-width: 44px; min-height: 44px;
}
.speaker-btn:hover { background: var(--mist); }
.speaker-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Audio cards ---------- */
.audio-card { border-left-color: var(--ink); }
.audio-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem; }
.play-btn {
  flex: 0 0 auto;
  width: 52px; height: 52px; border-radius: 50%;
  border: none; background: var(--tomato); color: #fff;
  font-size: 1.2rem; cursor: pointer; line-height: 1;
  box-shadow: var(--shadow);
}
.play-btn:hover { background: var(--tomato-dark); }
.play-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.audio-meta { flex: 1; min-width: 0; }
.audio-title { font-weight: 700; font-size: 1rem; line-height: 1.35; margin: 0 0 0.15rem; }
.audio-meta .muted { font-size: 0.85rem; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; width: 0%; background: var(--tomato); border-radius: 999px; transition: width 0.2s linear; }
.audio-times { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; min-height: 1em; }
.audio-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; align-items: center; flex-wrap: wrap; }
.audio-actions .btn-sm { min-height: 40px; padding: 0.45rem 0.85rem; font-size: 0.82rem; border-radius: 999px; }
.speed-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.skip-row { display: flex; gap: 0.4rem; }
/* Seekable audio progress bar (click / drag to scrub) */
.audio-card .progress.seekable { cursor: pointer; touch-action: pan-y; height: 14px; }
.speed-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 0.45rem 0.75rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: inherit;
  min-height: 40px;
}
.speed-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.coming-soon {
  margin-top: 0.7rem; padding: 0.6rem 0.8rem; border-radius: 10px;
  background: var(--mist); color: var(--ink); font-size: 0.9rem;
}
.podcast-cover { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: var(--mist); }
.transcript-panel {
  margin-top: 0.7rem; padding: 0.9rem 1rem; border-radius: 12px;
  background: var(--mist); font-size: 0.95rem; line-height: 1.75;
  max-height: 320px; overflow-y: auto; white-space: normal;
}
.transcript-panel p { margin: 0 0 0.7rem; }
.transcript-panel p:last-child { margin-bottom: 0; }

/* ---------- Persistent mini-player ---------- */
.mini-player {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 22px;
  background: linear-gradient(180deg, #23233f 0%, #191930 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 24px rgba(8, 6, 24, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.mp-cover {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.mp-info { flex: 1; min-width: 0; }
.mp-title {
  font-size: 0.82rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.mp-time {
  font-size: 0.7rem; color: rgba(255,255,255,0.65); flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.mp-slider { position: relative; flex: 1; height: 16px; cursor: pointer; touch-action: none; }
.mp-strack {
  position: absolute; left: 0; right: 0; top: 50%; height: 5px; transform: translateY(-50%);
  background: rgba(255,255,255,0.18); border-radius: 999px;
}
.mp-sfill {
  position: absolute; left: 0; top: 50%; height: 5px; width: 0%; transform: translateY(-50%);
  background: #ff9500; border-radius: 999px;
}
.mp-btn {
  flex: 0 0 auto; width: 48px; height: 48px; border: none; background: none;
  padding: 0; cursor: pointer; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}
.mp-btn img { width: 100%; height: 100%; display: block; }
.mp-btn:active { transform: scale(0.92); }
.mp-x {
  flex: 0 0 auto; width: 28px; height: 28px; border: none; background: none;
  padding: 0; cursor: pointer; opacity: 0.9;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.45));
}
.mp-x img { width: 100%; height: 100%; display: block; }
.mp-x:active { transform: scale(0.88); }

/* ---------- Tab bar / sidebar navigation ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(23, 33, 43, 0.07);
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0.55rem 0 0.5rem; color: var(--muted); font-family: inherit;
  min-height: 64px; justify-content: center;
}
.tab-icon {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s ease, transform 0.15s ease;
}
.tab-icon svg { width: 24px; height: 24px; display: block; }
.tab.active .tab-icon { background: rgba(200, 75, 49, 0.12); }
.tab:active .tab-icon { transform: scale(0.92); }
.tab-label { font-size: 0.62rem; font-weight: 600; }
.tab.active { color: var(--tomato); }
.tab[aria-current="page"] { color: var(--tomato); }

/* Desktop: compact sidebar instead of a stretched bottom bar (logged in only) */
@media (min-width: 1024px) {
  body.logged-in { padding-bottom: 90px; }
  body.logged-in .tabbar {
    top: 0; bottom: 0; left: 0; right: auto;
    width: 210px; flex-direction: column; justify-content: flex-start;
    border-top: none; border-right: 1px solid var(--line);
    padding: 5.5rem 0.7rem 1rem;
  }
  body.logged-in .tab {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 0.8rem;
    padding: 0.8rem 1rem; border-radius: 12px; min-height: 52px;
  }
  .tab.active, .tab[aria-current="page"] { background: rgba(200, 75, 49, 0.1); }
  .tab-label { font-size: 0.95rem; }
  body.logged-in #view { margin-left: 210px; }
  body.logged-in #app-header .header-inner { max-width: none; margin-left: 210px; }
  body.logged-in .mini-player { left: 222px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .landing-header-inner { max-width: var(--landing-w); }
}

/* Landing (logged out) gets the wide container */
body:not(.logged-in) #view { max-width: var(--landing-w); }

/* ---------- Lesson tabs ---------- */
.lesson-tabs {
  display: flex; gap: 0.45rem; overflow-x: auto; margin-bottom: 1rem;
  padding: 0.1rem 0.1rem 0.35rem;
  scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;
}
.lesson-tabs::-webkit-scrollbar { display: none; }
.lesson-tab {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 0.5rem 0.9rem; min-height: 44px; font-family: inherit; font-weight: 600;
  font-size: 0.85rem; cursor: pointer; color: var(--ink); white-space: nowrap;
}
.lesson-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Quiz ---------- */
.quiz-progress { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.quiz-q { font-family: Georgia, serif; font-size: 1.2rem; margin-bottom: 0.9rem; }
.opt-btn {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 0.8rem 0.9rem; margin-bottom: 0.6rem; font-size: 1rem; font-family: inherit;
  cursor: pointer; color: var(--ink); min-height: 48px;
}
.opt-btn:hover:not(:disabled) { border-color: var(--ink); }
.opt-btn:disabled { cursor: default; opacity: 0.9; }
.opt-btn.correct { background: #E3F0E8; border-color: var(--herb); color: var(--herb-dark); font-weight: 700; }
.opt-btn.wrong { background: #F9E4DF; border-color: var(--red); color: var(--red); font-weight: 700; }
.opt-btn.dim { opacity: 0.55; }
.quiz-feedback { font-weight: 700; margin: 0.6rem 0; }
.quiz-feedback.good { color: var(--herb); }
.quiz-feedback.bad { color: var(--red); }
.score-hero { text-align: center; padding: 1.5rem 0 0.5rem; }
.score-big { font-family: Georgia, serif; font-size: 3rem; color: var(--ink); }
.score-sub { color: var(--muted); }

/* ---------- Scores / mistakes ---------- */

.ref-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  background: #E2F0E4; color: #2E7D32; border-radius: 999px; padding: 0.15rem 0.55rem;
  margin-left: 0.4rem; vertical-align: middle;
}
.level-select {
  font-family: inherit; font-size: 0.9rem; padding: 0.45rem 0.6rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}

/* ---------- Misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.badge-level {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--mist); color: var(--ink); border-radius: 999px; padding: 0.2rem 0.65rem;
}
.hero-date { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.2rem; }
.kbd-note { font-size: 0.82rem; color: var(--muted); }
details.practice {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: 0.7rem; background: #fff;
  box-shadow: var(--shadow);
}
details.practice summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; }
details.practice p { margin: 0.7rem 0 0; color: var(--herb-dark); font-weight: 500; }
.example-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.6rem 0.85rem; margin-bottom: 0.55rem; font-style: italic;
}
.grammar-body p { margin-bottom: 0.7rem; }
.grammar-body strong, .grammar-body b { color: var(--tomato-dark); }

/* ---------- Grammar page ---------- */
.grammar-hero {
  background: linear-gradient(135deg, var(--ink) 0%, #2b3a2e 60%, var(--herb-dark) 100%);
  color: var(--paper);
  border-radius: 20px;
  padding: 1.8rem 1.4rem 1.5rem;
  margin-bottom: 1.6rem;
  box-shadow: 0 6px 24px rgba(23, 33, 43, 0.22);
  position: relative;
  overflow: hidden;
}
.grammar-hero::after {
  content: "✎";
  position: absolute;
  right: 1rem;
  top: 0.4rem;
  font-size: 4.5rem;
  opacity: 0.12;
  transform: rotate(-12deg);
}
.hero-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}
.hero-title {
  font-family: Georgia, "Times New Roman", serif;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 0 0 0.9rem;
  max-width: 85%;
}
.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--tomato);
  color: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
}
.section-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tomato-dark);
  margin: 1.7rem 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.rule-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 1.15rem 3.6rem;
  margin-bottom: 0.8rem;
  position: relative;
  line-height: 1.7;
  font-size: 1.02rem;
}
.rule-card p { margin: 0; }
.rule-num {
  position: absolute;
  left: 1.1rem;
  top: 1.05rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--tomato);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(200, 75, 49, 0.35);
}
.hl {
  color: var(--tomato-dark);
  background: rgba(200, 75, 49, 0.1);
  padding: 0.05rem 0.3rem;
  border-radius: 5px;
  white-space: nowrap;
}
.grammar-hero + .section-kicker { margin-top: 0.4rem; }
.grammar-page .example-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--herb);
  border-radius: 12px;
  padding: 1.05rem 1.15rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  font-style: normal;
  position: relative;
}
.ex-quote {
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--herb);
  opacity: 0.5;
  display: block;
  margin-bottom: -0.4rem;
}
.ex-text {
  font-family: Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.55;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.ex-em { color: var(--herb-dark); }
.ex-note {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
}
.quiz-cta {
  margin-top: 1.8rem;
  background: linear-gradient(135deg, #fdf6ec, #fbeed9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.quiz-cta-text {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.9rem;
  color: var(--ink);
}
/* Grammar quiz banner (bottom of the grammar tab): the artwork IS the button. */
.grammar-quiz-banner{display:block;width:100%;max-width:560px;margin:1.6rem auto .5rem;padding:0;background:none;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.grammar-quiz-banner img{display:block;width:100%;height:auto;border-radius:22px;box-shadow:0 12px 32px rgba(190,130,70,.18)}
.grammar-quiz-banner:active img{transform:scale(.985)}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

@media (min-width: 560px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

/* Level picker (signup + waiting): 3 selectable cards */
.level-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 0.4rem; }
.level-opt { cursor: pointer; }
.level-opt input { position: absolute; opacity: 0; pointer-events: none; }
.level-card { display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.8rem 0.4rem; border: 2px solid var(--border, #e8e0d4); border-radius: 14px;
  background: #fff; text-align: center; transition: border-color 0.15s, box-shadow 0.15s; height: 100%; }
.level-ico { font-size: 1.6rem; }
.level-name { font-weight: 700; font-size: 0.92rem; }
.level-desc { font-size: 0.72rem; color: var(--muted, #8a7f70); line-height: 1.25; }
.level-opt input:checked + .level-card { border-color: var(--tomato, #e4572e);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.15); }
.level-opt input:focus-visible + .level-card { outline: 2px solid var(--tomato, #e4572e); outline-offset: 2px; }

/* ---------------- support chat ---------------- */
.support-card { padding: 0.9rem; }
.support-msgs { display: flex; flex-direction: column; gap: 0.5rem;
  max-height: 46vh; min-height: 220px; overflow-y: auto; padding: 0.2rem 0.1rem 0.6rem; }
.support-msg { max-width: 85%; padding: 0.55rem 0.8rem; border-radius: 14px;
  font-size: 0.92rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.support-msg.from-ai { align-self: flex-start; background: #F1EAD9; color: var(--ink); border-bottom-left-radius: 4px; }
.support-msg.from-user { align-self: flex-end; background: var(--tomato); color: #fff; border-bottom-right-radius: 4px; }
.support-msg.typing { opacity: 0.55; }
.support-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.7rem; }
.chip { background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.8rem; font-size: 0.8rem; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--tomato); color: var(--tomato-dark); }
.support-input-row { display: flex; gap: 0.5rem; }
.support-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.6rem 0.8rem; font-size: 0.95rem; background: #fff; color: var(--ink); }
.support-input:focus { outline: 2px solid var(--tomato); outline-offset: -1px; border-color: var(--tomato); }
#support-send { min-width: 48px; flex-shrink: 0; }
.support-tg { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.support-tg .btn { flex-shrink: 0; }

/* ---------------- modal (popup) ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(24, 18, 12, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  animation: modal-fade 0.18s ease-out;
}
.modal-card {
  background: #fffdf7; color: var(--ink);
  border-radius: 18px; max-width: 400px; width: 100%;
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  text-align: center;
  animation: modal-pop 0.22s ease-out;
}
.modal-card h2 { margin: 0.2rem 0 0.7rem; font-size: 1.35rem; }
.modal-card p { margin: 0.55rem 0; line-height: 1.65; }
.modal-card .btn { margin-top: 1rem; }
.modal-ico { font-size: 2.6rem; line-height: 1; }
.modal-card [dir="rtl"] { text-align: center; }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-pop { from { transform: scale(0.94) translateY(8px); opacity: 0; } }

/* ---------- challenge: game-style leaderboard (dark) ---------- */
.ch-wrap {
  margin: -1rem -1rem 0; padding: 1.4rem 1rem 2.4rem;
  background: linear-gradient(180deg, #0c0a28 0%, #191040 45%, #0d0b2e 100%);
  color: #f5f3ff;
  position: relative; overflow: hidden;
  min-height: calc(100vh - 150px);
}
.ch-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 28% 42%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 45% 12%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 62% 28%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 78% 52%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 88% 22%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 8% 62%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 35% 82%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 70% 88%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 92% 68%, rgba(255,255,255,.7), transparent),
    radial-gradient(ellipse 70% 30% at 50% 0%, rgba(122, 60, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 35% at 50% 100%, rgba(255, 46, 136, 0.14), transparent 70%);
}
.ch-wrap > * { position: relative; z-index: 1; }
.ch-wrap .muted { color: rgba(245, 243, 255, 0.6); }

/* title */
.lb-title { text-align: center; margin: 0.2rem 0 1rem; }
.lb-crown { width: 46px; height: 46px; margin: 0 auto 0.1rem; color: #f5b301;
  filter: drop-shadow(0 3px 10px rgba(245, 179, 1, 0.65)); }
.lb-crown svg { width: 100%; height: 100%; }
.lb-head { display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.lb-head h1 { margin: 0; font-size: 2.5rem; font-weight: 900; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #ffedb0 0%, #f5b301 55%, #d89400 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 14px rgba(245, 179, 1, 0.4)); }
.lb-laurel { width: 34px; height: 60px; color: #d8a920; opacity: 0.9; flex: 0 0 auto; }
.lb-laurel svg { width: 100%; height: 100%; }
.lb-laurel.flip { transform: scaleX(-1); }
.lb-title p { margin: 0.3rem 0 0; font-size: 0.88rem; color: rgba(245, 243, 255, 0.62); }

/* segmented control: Team/Local/Global style */
/* participants count pill */
.ch-count { display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin: 0 auto 1rem; padding: 0.6rem 1.2rem; width: fit-content; max-width: 100%;
  background: linear-gradient(180deg, rgba(20, 28, 58, 0.95), rgba(12, 17, 38, 0.95));
  border: 1.5px solid transparent; border-radius: 999px;
  background-clip: padding-box; position: relative; color: #fff; font-size: 0.95rem; }
.ch-count::before { content: ""; position: absolute; inset: -1.5px; border-radius: 999px;
  padding: 1.5px; background: linear-gradient(90deg, #7c3aed, #f5b301, #ec4899, #7c3aed);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.ch-count .cc-people svg { width: 22px; height: 22px; color: #f5b301;
  filter: drop-shadow(0 2px 6px rgba(245,179,1,.5)); }
.ch-count .cc-trophy svg { width: 22px; height: 22px; color: #f5b301;
  filter: drop-shadow(0 2px 6px rgba(245,179,1,.5)); }
.ch-count b { font-weight: 800; }

/* challenge promo banner on home — loud game style, dark card on light page */
@property --chp-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.ch-promo { position: relative; display: block; overflow: hidden; text-decoration: none;
  border-radius: 20px; padding: 1.05rem 1.1rem 1.1rem; margin-bottom: 1rem; color: #fff;
  background:
    radial-gradient(ellipse 75% 100% at 8% 0%, rgba(255, 46, 136, 0.4), transparent 65%),
    radial-gradient(ellipse 65% 90% at 95% 100%, rgba(0, 212, 255, 0.28), transparent 65%),
    radial-gradient(ellipse 50% 60% at 55% 45%, rgba(122, 60, 255, 0.25), transparent 70%),
    linear-gradient(150deg, #191238 0%, #0d1129 55%, #230f31 100%);
  border: 1px solid rgba(255, 214, 64, 0.22);
  box-shadow: 0 14px 36px rgba(13, 17, 41, 0.45); }
.ch-promo::before { /* rotating neon border */
  content: ''; position: absolute; inset: 0; border-radius: 20px; padding: 2px;
  background: conic-gradient(from var(--chp-ang),
    rgba(255, 46, 136, 0.0) 0%, #ff2e88 12%, #ffd640 25%, #00d4ff 38%,
    rgba(0, 212, 255, 0) 50%, rgba(255, 46, 136, 0) 62%, #ff2e88 74%,
    #ffd640 87%, rgba(255, 214, 64, 0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: chp-spin 4.5s linear infinite; pointer-events: none; }
@keyframes chp-spin { to { --chp-ang: 360deg; } }
.chp-shine { position: absolute; top: -20%; bottom: -20%; left: -30%; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-18deg); animation: chp-shine 3.8s ease-in-out infinite; pointer-events: none; }
@keyframes chp-shine { 0%, 55% { left: -30%; } 100% { left: 130%; } }
.chp-live { position: absolute; top: 0.7rem; right: 0.85rem; display: inline-flex;
  align-items: center; gap: 0.32rem; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.14em; color: #ff5d5d; }
.chp-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b;
  box-shadow: 0 0 10px #ff3b3b; animation: chp-pulse 1.4s ease-in-out infinite; }
@keyframes chp-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.55; } }
.chp-row { position: relative; display: flex; align-items: center; gap: 0.9rem; }
.chp-trophy { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(140deg, #ff2e88, #ff6b1a 60%, #ffd400);
  box-shadow: 0 8px 26px rgba(255, 46, 136, 0.6), 0 0 34px rgba(255, 214, 64, 0.35);
  animation: chp-float 3s ease-in-out infinite; }
.chp-trophy svg { width: 34px; height: 34px; }
@keyframes chp-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.chp-txt { display: flex; flex-direction: column; line-height: 1.05; }
.chp-txt b { font-size: 2.1rem; font-weight: 900; letter-spacing: -0.01em;
  background: linear-gradient(100deg, #fff3c4 10%, #ffd640 45%, #ff9d3c 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 214, 64, 0.35)); }
.chp-txt > span { font-size: 0.85rem; color: rgba(245, 243, 255, 0.78); margin-top: 0.2rem; }
.chp-cta { position: relative; display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; margin-top: 0.9rem; padding: 0.68rem; border-radius: 14px;
  font-weight: 800; font-size: 0.98rem; color: #1a1206;
  background: linear-gradient(100deg, #ffd640, #ffb03c);
  box-shadow: 0 6px 20px rgba(255, 180, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.chp-go { font-size: 1.3rem; line-height: 1; font-weight: 800; }
.ch-promo:active { transform: scale(0.99); }

/* segmented control: big, half-half */
.ch-wrap .seg { display: flex; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px; padding: 0.35rem; margin-bottom: 1.2rem; }
.ch-wrap .seg-btn { flex: 1; background: transparent; color: rgba(245, 243, 255, 0.6);
  border: 0; border-radius: 999px; font-weight: 800; font-size: 1.05rem;
  padding: 0.7rem 0; cursor: pointer; font-family: inherit; }
.ch-wrap .seg-btn.active { background: linear-gradient(140deg, #ff4d6d, #e8385c); color: #fff;
  box-shadow: 0 4px 16px rgba(255, 77, 109, 0.45); }

/* podium: 3 game cards, 2nd | 1st | 3rd */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.6rem;
  margin-bottom: 1.3rem; align-items: end; }
.pd-card { text-align: center; border-radius: 18px; padding: 0.7rem 0.3rem 0.9rem;
  background: linear-gradient(180deg, rgba(38, 34, 80, 0.85), rgba(24, 20, 52, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative; }
.pd-card.p1 { order: 2; padding-top: 1rem; padding-bottom: 1.15rem;
  border: 1.5px solid rgba(245, 179, 1, 0.7);
  background: linear-gradient(180deg, rgba(64, 48, 16, 0.9) 0%, rgba(35, 35, 63, 0.92) 70%);
  box-shadow: 0 10px 34px rgba(245, 179, 1, 0.30), inset 0 1px 0 rgba(255,255,255,0.1); }
.pd-card.p2 { order: 1; }
.pd-card.p3 { order: 3; }
.pd-card.me { outline: 2.5px solid #ff7b1c; outline-offset: 2px; }
.pd-crown { width: 30px; height: 30px; margin: 0 auto 0.15rem; }
.pd-crown svg { width: 100%; height: 100%; }
.pd-crown.rk1 { color: #f5b301; filter: drop-shadow(0 2px 6px rgba(245,179,1,.6)); }
.pd-crown.rk2 { color: #c3cad6; filter: drop-shadow(0 2px 6px rgba(195,202,214,.5)); }
.pd-crown.rk3 { color: #e09a52; filter: drop-shadow(0 2px 6px rgba(224,154,82,.5)); }
.pd-avatar { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.4rem; color: #fff;
  border: 2.5px solid rgba(255, 255, 255, 0.25); }
.pd-card.p1 .pd-avatar { width: 70px; height: 70px; font-size: 1.75rem;
  border-color: rgba(245, 179, 1, 0.85); box-shadow: 0 0 24px rgba(245, 179, 1, 0.5); }
.pd-crown.big { width: 52px; height: 52px; margin: -0.4rem auto 0.1rem;
  color: #ffd75e; filter: drop-shadow(0 4px 14px rgba(255, 180, 0, 0.75)); }
/* circular medal badge overlapping the avatar */
.pd-medal { width: 38px; height: 38px; margin: -0.85rem auto 0; position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.35);
  box-shadow: 0 3px 12px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.35), inset 0 -3px 6px rgba(0,0,0,0.25); }
.pd-medal span { font-weight: 900; font-size: 1.1rem; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.pd-medal.rk1 { background: radial-gradient(circle at 35% 30%, #ffe9a8, #f5b301 60%, #c07f00); }
.pd-medal.rk2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c3cad6 60%, #8a94a8); }
.pd-medal.rk3 { background: radial-gradient(circle at 35% 30%, #ffc890, #e09a52 60%, #a05a20); }
.pd-name { font-weight: 700; font-size: 0.82rem; color: #fff; margin-top: 0.4rem;
  word-break: break-word; padding: 0 0.2rem; }
.pd-pts { display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  margin-top: 0.35rem; color: #4ade80; font-weight: 800; font-size: 0.98rem; }
.pd-pts svg { width: 15px; height: 15px; }

/* Top Ranking divider */
.rank-div { display: flex; align-items: center; gap: 0.7rem; margin: 0 0.4rem 0.9rem;
  color: #f5b301; font-weight: 800; font-size: 0.95rem; }
.rank-div::before, .rank-div::after { content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 179, 1, 0.55)); }
.rank-div::after { background: linear-gradient(90deg, rgba(245, 179, 1, 0.55), transparent); }
.rank-div .rd-trophy { width: 20px; height: 20px; display: inline-flex; color: #f5b301;
  filter: drop-shadow(0 2px 6px rgba(245,179,1,.5)); }
.rank-div .rd-trophy svg { width: 100%; height: 100%; }

/* ranked rows */
.ch-rows { display: flex; flex-direction: column; gap: 0.55rem; }
.ch-row { display: flex; align-items: center; gap: 0.7rem;
  background: rgba(30, 30, 56, 0.85); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px; padding: 0.6rem 0.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.ch-row.me { border: 1.5px solid #ff7b1c; background: rgba(58, 32, 14, 0.55);
  box-shadow: 0 4px 20px rgba(255, 123, 28, 0.35), inset 0 1px 0 rgba(255,255,255,0.08); }
.ch-rank { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: rgba(245,243,255,0.75);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.ch-rank.rk1 { background: linear-gradient(180deg, #ffd75e, #e89b00); color: #1a1206; border: 0;
  box-shadow: 0 2px 10px rgba(245,179,1,.45); }
.ch-rank.rk2 { background: linear-gradient(180deg, #e8edf5, #aab4c8); color: #1a1206; border: 0; }
.ch-rank.rk3 { background: linear-gradient(180deg, #f0b878, #c07a35); color: #1a1206; border: 0; }
.ch-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.15rem; color: #fff; flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.2); }
.ch-avatar.sm { width: 44px; height: 44px; }
.ch-avatar.lg { width: 68px; height: 68px; }
.ch-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ch-name { font-weight: 700; color: #fff; font-size: 0.95rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.you-tag { display: inline-block; font-size: 0.6rem; font-weight: 800; background: #ff7b1c; color: #fff;
  border-radius: 999px; padding: 0.12rem 0.45rem; vertical-align: 2px; margin-left: 0.25rem; }
.ch-pts { display: flex; align-items: center; gap: 0.3rem; font-weight: 800; color: #4ade80;
  font-size: 0.92rem; }
.ch-pts svg { width: 14px; height: 14px; }
.ch-crown { width: 26px; height: 26px; flex: 0 0 auto; opacity: 0.9; }
.ch-crown svg { width: 100%; height: 100%; }
.ch-crown.rk1 { color: #f5b301; filter: drop-shadow(0 2px 5px rgba(245,179,1,.5)); }
.ch-crown.rk2 { color: #c3cad6; }
.ch-crown.rk3 { color: #e09a52; }
.ch-crown:not(.rk1):not(.rk2):not(.rk3) { color: #8b7cf6; opacity: 0.75; }
.lvl-chip { display: none; }

/* locked + earn card on dark */
.ch-locked { text-align: center; padding: 2rem 1.4rem; background: #1e1e38;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; }
.ch-locked h2 { color: #fff; }
.ch-locked .earn-ico { width: 54px; height: 54px; margin: 0 auto 0.6rem; }
.ch-locked .btn { margin-top: 0.8rem; }
.earn-card { background: #1e1e38; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; margin-top: 1.1rem; }
.earn-card summary { list-style: none; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1rem; cursor: pointer; font-weight: 700; color: #fff; }
.earn-card summary::-webkit-details-marker { display: none; }
.earn-chev { margin-left: auto; font-size: 1.3rem; color: rgba(245, 243, 255, 0.5);
  transition: transform 0.2s; }
.earn-card[open] .earn-chev { transform: rotate(90deg); }
.earn-ico { width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(140deg, #ff4d6d, #ff8a3d);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.earn-ico svg { width: 18px; height: 18px; }
.earn-rows { padding: 0 1rem 0.9rem; }
.earn-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07); color: rgba(245, 243, 255, 0.85); }
.earn-row span:nth-child(2) { flex: 1; font-size: 0.9rem; }
.earn-row b { font-size: 0.82rem; color: #ffd400; white-space: nowrap; }
.nick-trophy { width: 70px; height: 70px; margin: 0 auto 0.4rem; border-radius: 22px; display: flex;
  align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(140deg, #ff4d6d, #ff8a3d 60%, #ffd400);
  box-shadow: 0 10px 28px rgba(255, 77, 109, 0.4); }
.nick-trophy svg { width: 38px; height: 38px; }
.ch-wrap .empty { color: rgba(245, 243, 255, 0.6); }

/* ---------- points award popup (prize-like, queued, auto-dismiss) ---------- */
#pts-toast-host { position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 9500;
  display: flex; justify-content: center; pointer-events: none; }
.pts-toast { pointer-events: none; text-align: center; color: #fff;
  background: linear-gradient(140deg, #C84B31 0%, #E8763A 55%, #F5A623 100%);
  border-radius: 22px; padding: 0.9rem 1.7rem 0.85rem;
  box-shadow: 0 12px 40px rgba(200, 75, 49, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.25);
  min-width: 190px; opacity: 0; }
.pts-toast.pop { animation: pts-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.pts-toast.bye { animation: pts-bye 0.35s ease-in forwards; }
.pts-burst { width: 44px; height: 44px; margin: 0 auto 0.15rem; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); display: flex; align-items: center; justify-content: center; }
.pts-burst svg { width: 26px; height: 26px; }
.pts-amount { font-size: 2rem; font-weight: 800; line-height: 1.1; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.pts-label { font-weight: 700; font-size: 0.95rem; }
.pts-total { font-size: 0.8rem; opacity: 0.92; margin-top: 0.15rem; font-weight: 600; }
@keyframes pts-pop {
  0% { opacity: 0; transform: scale(0.4) translateY(18px); }
  60% { opacity: 1; transform: scale(1.08) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pts-bye { to { opacity: 0; transform: scale(0.85) translateY(-14px); } }

/* ============ Celebration sequence (words → quiz → reward) ============ */
@font-face{font-family:"Fredoka";src:url("/fonts/fredoka-700.woff2") format("woff2");font-weight:500 700;font-display:swap;}
#celebration{position:fixed;inset:0;z-index:200;display:flex;justify-content:center;background:#17212B;}
#celebration{position:fixed;inset:0;z-index:200;background:#000;}
.cel-week{background:#17212B;border-radius:20px;padding:18px 22px;width:100%;max-width:340px;margin-bottom:30px;}
.cel-wdays,.cel-wdots{display:flex;justify-content:space-between;align-items:center;}
.cel-wdays{margin-bottom:12px;}
.cel-wdays span{color:#8a8f98;font-size:14px;font-weight:500;flex:1;text-align:center;font-family:"Avenir Next","Trebuchet MS",sans-serif;}
.cel-wdays span.today{color:#FFC800;font-weight:700;}
.cel-wdots span{flex:1;display:flex;justify-content:center;}
.cel-wdots i{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:18px;font-weight:700;}
.cel-wdots i.on{background:#FFC800;color:#17212B;}
.cel-wdots i.off{background:rgba(255,255,255,.14);}
.cel-wdots i.star{background:transparent;border:2.5px solid #FFC800;color:#FFC800;}

/* ============ Home streak card ============ */
.streak-card{display:flex;gap:14px;align-items:center;background:linear-gradient(135deg,#FF9600 0%,#F07B1A 100%);border:0;color:#fff;overflow:hidden;}
.streak-flame{width:84px;height:84px;object-fit:cover;border-radius:22px;flex:none;box-shadow:0 4px 14px rgba(0,0,0,.18);}
.streak-main{flex:1;min-width:0;}
.streak-topline{display:flex;align-items:baseline;gap:8px;margin-bottom:6px;}
.streak-num{font-family:"Fredoka","Avenir Next","Trebuchet MS",sans-serif;font-weight:700;font-size:36px;line-height:1;}
.streak-unit{font-family:"Fredoka","Avenir Next","Trebuchet MS",sans-serif;font-weight:700;font-size:19px;}
.streak-start{font-family:"Fredoka","Avenir Next","Trebuchet MS",sans-serif;font-weight:700;font-size:18px;line-height:1.35;}
.hw-strip{display:flex;gap:2px;margin-bottom:6px;}
.hw-day{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;}
.hw-name{font-style:normal;font-size:10px;font-weight:700;color:rgba(255,255,255,.75);font-family:"Avenir Next","Trebuchet MS",sans-serif;}
.hw-day.today .hw-name{color:#fff;}
.hw-dot{width:12px;height:12px;border-radius:50%;background:rgba(255,255,255,.28);display:block;}
.hw-dot.on{background:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.35);}
.streak-freezes{font-size:13px;font-weight:600;color:rgba(255,255,255,.92);font-family:"Avenir Next","Trebuchet MS",sans-serif;}

/* ============ My Rewards (Progress tab) ============ */
.rewards-card{margin-bottom:1rem;}
.rewards-top{display:flex;gap:10px;margin-bottom:12px;}
.rewards-stat{flex:1;background:var(--cream,#F7F2E8);border-radius:14px;padding:10px 6px;text-align:center;display:flex;flex-direction:column;gap:2px;}
.rp-num{font-family:"Fredoka","Avenir Next","Trebuchet MS",sans-serif;font-weight:700;font-size:24px;color:var(--ink,#17212B);}
.rp-label{font-size:11px;color:var(--muted,#6B7280);font-weight:600;}
.badge-row{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px;}
.badge{flex:1 0 auto;min-width:86px;background:var(--cream,#F7F2E8);border-radius:14px;padding:10px 8px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:3px;}
.badge-icon{font-size:24px;}
.badge-name{font-size:11px;font-weight:700;color:var(--ink,#17212B);line-height:1.25;}
.badge-tick{font-size:12px;}
.badge.earned{background:#FFF3DC;box-shadow:inset 0 0 0 2px #FFC800;}
.badge.locked{opacity:.55;}
.prize-title{font-weight:700;font-size:14px;margin:10px 0 6px;color:var(--ink,#17212B);}
.prize-list{display:flex;flex-direction:column;gap:6px;}
.prize-row{display:flex;align-items:center;gap:10px;background:var(--cream,#F7F2E8);border-radius:12px;padding:8px 12px;}
.prize-ico{font-size:18px;}
.prize-name{font-weight:700;font-size:14px;flex:1;}
.prize-date{font-size:12px;color:var(--muted,#6B7280);}

/* ============ Start-Quiz CTA (end of words list) ============ */
.start-quiz-cta{display:block;width:100%;max-width:420px;margin:1.2rem auto 2.5rem;padding:0;background:none;border:0;cursor:pointer;
  animation:sqFloat 3s ease-in-out infinite;filter:drop-shadow(0 10px 22px rgba(240,123,26,.35));}
.start-quiz-cta img{display:block;width:100%;height:auto;border:0;}
.start-quiz-cta:active{transform:scale(.96);}
@keyframes sqFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}

/* ============================================================
   V3 DESIGN — rebuilt from scratch (Oct 2026)
   Warm premium look: cream canvas, soft cards, orange CTAs,
   Georgia headlines, mascot imagery.
   ============================================================ */
body{background:#FFF9F3;}
#view{padding:.9rem 1rem 0.5rem;}

/* ---------- app header ---------- */
#app-header{background:rgba(255,249,243,.94);backdrop-filter:blur(10px);border-bottom:1px solid #F6EAD9;}
#app-header .brand-name{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:1.3rem;color:#16233F;}
#app-header .brand-mark{font-size:1.35rem;}
.profile-btn{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#FF9A3D,#F9610D);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(249,97,13,.4);border:2px solid #fff;}
.profile-initial{color:#fff;font-weight:700;font-size:1.15rem;font-family:Georgia,serif;}

/* ---------- buttons ---------- */
.btn-orange{background:linear-gradient(135deg,#FF9A3D 0%,#F9610D 100%)!important;color:#fff!important;border:0!important;font-weight:700;box-shadow:0 8px 20px rgba(249,97,13,.38);}
.btn-orange:active{transform:scale(.98);}

/* ---------- section titles ---------- */
.section-title{display:flex;align-items:center;justify-content:space-between;margin:1.35rem 0 .75rem;}
.section-title h2{font-family:Georgia,serif;font-size:1.5rem;color:#16233F;margin:0;}

/* ---------- previous lessons ---------- */
.prev-strip{display:flex;gap:.85rem;overflow-x:auto;padding:.2rem .1rem .5rem;scroll-snap-type:x mandatory;}
.prev-card{flex:0 0 172px;background:#fff;border:1px solid #FBEFE0;border-radius:22px;overflow:hidden;cursor:pointer;padding:0;text-align:left;scroll-snap-align:start;box-shadow:0 10px 22px rgba(190,130,70,.12);position:relative;}
.prev-card img{width:100%;height:108px;object-fit:cover;display:block;}

/* ---------- home bottom v2 — mockup rebuild (2026-10-02) ---------- */
/* Previous lessons cards: warm cream, date pill, icon button, progress bar */
.prev-card.v2{flex:0 0 168px;background:#FEFBF6;border:0;border-radius:20px;overflow:hidden;cursor:pointer;
  padding:0;text-align:left;scroll-snap-align:start;box-shadow:0 10px 22px rgba(190,130,70,.14);position:relative;}
.pcv-photo{position:relative;display:block;}
.prev-card.v2 .pcv-photo img{width:100%;height:112px;object-fit:cover;display:block;}
.pcv-date{position:absolute;top:10px;left:10px;background:rgba(254,251,246,.95);color:#F9610D;
  font-weight:800;font-size:.72rem;padding:.3rem .7rem;border-radius:999px;box-shadow:0 2px 8px rgba(190,130,70,.20);}
.pcv-body{display:block;padding:.7rem .8rem .85rem;}
.pcv-theme{display:block;font-weight:800;font-size:.86rem;color:#16233F;margin-bottom:.55rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pcv-row{display:flex;align-items:center;gap:.6rem;}
.pcv-bar{flex:1;height:8px;background:#F3E7D3;border-radius:999px;overflow:hidden;}
.pcv-bar>span{display:block;height:100%;background:linear-gradient(90deg,#FF9F2E,#F9610D);border-radius:999px;}
.pcv-ico{display:inline-flex;width:38px;height:38px;flex:0 0 38px;border-radius:50%;background:#fff;
  align-items:center;justify-content:center;font-size:1.05rem;box-shadow:0 3px 10px rgba(190,130,70,.20);border:1px solid #FBEFE0;}
/* Review banner: full artwork, dynamic count over the sky, whole banner tappable */
.hrv-banner{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;border-radius:22px;overflow:hidden;
  background:#FFC46B url('/media/home/review-v2.webp') center/cover no-repeat;aspect-ratio:1672/941;
  box-shadow:0 10px 24px rgba(190,130,70,.16);}
.hrv-banner:active{opacity:.97;}
.hrv-count{position:absolute;left:48%;top:6%;text-align:left;line-height:1.05;}
.hrv-count b{display:block;font-size:2.7rem;font-weight:900;color:#F9610D;text-shadow:0 2px 0 rgba(255,255,255,.65);}
.hrv-count span{font-size:.95rem;font-weight:700;color:#8A6A45;}
/* Progress: scenic banner + warm card */
.hpv-banner{display:block;border-radius:20px;overflow:hidden;margin-bottom:.7rem;box-shadow:0 10px 22px rgba(190,130,70,.14);}
.hpv-banner img{width:100%;display:block;aspect-ratio:935/298;object-fit:cover;}
.card.plain.hpv-card{background:#FEFBF6;border:1px solid #FBEFE0;}
.card.plain.hpv-card .progress{background:#F3E7D3;}
.card.plain.hpv-card .progress>div{background:linear-gradient(90deg,#FF9F2E,#F9610D);}
/* ---------- lesson head + tabs ---------- */
.lesson-head{margin-bottom:.35rem;}
.lesson-head .hero-date{font-size:.82rem;color:#9AA3B2;margin-bottom:.2rem;}
.lesson-title{font-family:Georgia,serif;font-size:1.75rem;color:#16233F;margin:0 0 .45rem;text-transform:capitalize;}
.badge-level{background:#DCE9FF;color:#3B5BFD;font-weight:800;font-size:.72rem;border-radius:999px;padding:.32rem .75rem;text-transform:uppercase;letter-spacing:.05em;}
.lesson-tabs{display:flex;gap:.3rem;background:#fff;border:1px solid #FBEFE0;border-radius:20px;padding:.35rem;margin:.85rem 0 1.05rem;overflow-x:auto;box-shadow:0 8px 20px rgba(190,130,70,.10);}
.lesson-tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:none;border-radius:14px;padding:.6rem .2rem;font-size:.73rem;font-weight:600;color:#8B93A7;cursor:pointer;min-width:62px;}
.lesson-tab .lt-ico{color:#B9C2D0;}
.lesson-tab .lt-ico svg{width:21px;height:21px;}
.lesson-tab[aria-selected="true"]{background:#16233F;color:#fff;box-shadow:0 6px 14px rgba(22,35,63,.35);}
.lesson-tab[aria-selected="true"] .lt-ico{color:#FFB020;}

/* ---------- word cards ---------- */
.word-card{border-radius:24px!important;overflow:hidden;border:1px solid #FBEFE0!important;box-shadow:0 12px 28px rgba(190,130,70,.13)!important;margin-bottom:1.05rem;background:#fff;}
.word-photo{width:100%;height:176px;object-fit:cover;display:block;}
.word-head{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.15rem 0;}
.word-title{font-family:Georgia,serif;font-size:1.55rem;color:#16233F;margin:0;}
.speaker-btn{width:46px;height:46px;border-radius:50%;background:#FFF3E4;border:0;font-size:1.3rem;cursor:pointer;flex:none;box-shadow:inset 0 0 0 1px #FBE3C8;}
.word-pos{padding:.2rem 1.15rem 0;font-size:.74rem;font-weight:800;color:#9AA3B2;letter-spacing:.08em;}
.word-pron{padding:.1rem 1.15rem 0;font-size:.96rem;color:#5B6472;}
.word-meaning{padding:.4rem 1.15rem 0;font-size:1.04rem;font-weight:700;color:#16233F;}
.word-example{margin:.65rem 1.15rem 0;padding-left:.85rem;border-left:3px solid #FFB020;font-style:italic;color:#5B6472;font-size:.93rem;line-height:1.55;}
.word-fa{padding:.65rem 1.15rem 1.15rem;color:#8B93A7;font-size:.91rem;}

/* ---------- quiz ---------- */
.quiz-intro{text-align:center;padding:1.7rem 1.25rem;border-radius:24px;}
.qi-head{display:flex;align-items:center;justify-content:center;gap:.55rem;margin-bottom:.45rem;}
.qi-ico{font-size:1.7rem;}
.quiz-intro h3{font-family:Georgia,serif;font-size:1.4rem;color:#16233F;margin:0;}
.quiz-progress2{display:flex;align-items:center;gap:.75rem;margin:.45rem 0 .95rem;}
.qp-dots{flex:1;display:flex;gap:5px;}
.qp-dots i{width:9px;height:9px;border-radius:50%;background:#EADFCF;display:block;}
.qp-dots i.done{background:#F5A623;}
.qp-dots i.cur{background:#F9610D;box-shadow:0 0 0 3px #FFDDB8;}
.qp-count{font-size:.87rem;font-weight:800;color:#8B93A7;white-space:nowrap;}
.quiz-qcard{padding:1.35rem 1.15rem;border-radius:24px;}
.quiz-q{font-family:Georgia,serif;font-size:1.28rem;color:#16233F;margin-bottom:1.05rem;line-height:1.4;}
.quiz-opts{display:flex;flex-direction:column;gap:.65rem;}
.opt2{display:flex;align-items:center;gap:.75rem;border:2px solid #F1E6D4;background:#fff;border-radius:17px;padding:.85rem .95rem;font-size:.96rem;color:#16233F;cursor:pointer;text-align:left;width:100%;}
.opt2:disabled{cursor:default;}
.opt-key{width:32px;height:32px;flex:none;border-radius:50%;border:2px solid #E7DACA;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:.87rem;color:#8B93A7;background:#FFFBF5;}
.opt-text{flex:1;line-height:1.4;}
.opt-tick{width:30px;height:30px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:.95rem;}
.opt2.correct{border-color:#3B82F6;background:#EFF6FF;}
.opt2.correct .opt-key{border-color:#3B82F6;color:#3B82F6;background:#fff;}
.opt2.correct .opt-tick{background:#3B82F6;}
.opt2.wrong{border-color:#F87171;background:#FEF2F2;}
.opt2.wrong .opt-key{border-color:#F87171;color:#F87171;background:#fff;}
.opt2.wrong .opt-tick{background:#F87171;}
.opt2.dim{opacity:.4;}
.quiz-next{margin-top:.95rem;font-size:1.03rem;padding:1rem;border-radius:18px;}

/* ---------- audio player ---------- */
.audio-card2{padding:1.35rem 1.15rem;border-radius:26px!important;border:1px solid #FBEFE0!important;box-shadow:0 14px 32px rgba(190,130,70,.14)!important;background:#fff;}
.ap-title{font-family:Georgia,serif;font-size:1.25rem;font-weight:700;color:#16233F;line-height:1.35;}
.ap-sub{font-size:.87rem;color:#9AA3B2;margin:.2rem 0 .95rem;}
.ap-cover{position:relative;border-radius:20px;overflow:hidden;margin-bottom:1.05rem;}
.ap-cover img{width:100%;height:196px;object-fit:cover;display:block;}
.ap-cover-play{position:absolute;inset:0;margin:auto;width:66px;height:66px;border-radius:50%;background:rgba(255,255,255,.94);border:0;font-size:1.55rem;color:#16233F;cursor:pointer;box-shadow:0 10px 24px rgba(0,0,0,.28);}
.audio-card2.is-playing .ap-cover-play{opacity:0;pointer-events:none;}
.ap-progress{height:8px;border-radius:99px;background:#F1E6D4;margin-bottom:.45rem;}
.ap-progress>div{background:linear-gradient(90deg,#FF9A3D,#F9610D);border-radius:99px;}
.ap-times{display:flex;justify-content:space-between;font-size:.8rem;color:#9AA3B2;font-weight:700;margin-bottom:.85rem;}
.ap-controls{display:flex;align-items:center;justify-content:center;gap:1.5rem;margin-bottom:1.05rem;}
.ap-skip{display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:0;color:#5B6472;font-size:.74rem;font-weight:800;cursor:pointer;}
.ap-rs{font-size:1.6rem;}
.ap-play{width:78px;height:78px;border-radius:50%;background:linear-gradient(135deg,#FF9A3D,#F9610D);color:#fff;border:0;font-size:1.75rem;cursor:pointer;box-shadow:0 12px 28px rgba(249,97,13,.48);}
.ap-play:active{transform:scale(.94);}
.ap-foot{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center;align-items:center;}
.ap-chip{border-radius:999px!important;font-weight:600;}
.ap-speeds{display:flex;gap:.35rem;}
.speed-btn{border:1px solid #F1E6D4;background:#fff;border-radius:999px;padding:.42rem .72rem;font-size:.8rem;font-weight:800;color:#8B93A7;cursor:pointer;}
.speed-btn.active{background:#16233F;color:#fff;border-color:#16233F;}

/* ---------- grammar ---------- */
.grammar-hero{background:linear-gradient(150deg,#13403A 0%,#0B2723 100%);border-radius:26px;padding:1.5rem 1.25rem;color:#fff;margin-bottom:1.05rem;box-shadow:0 14px 30px rgba(11,39,35,.35);position:relative;overflow:hidden;}
.grammar-hero .hero-kicker{background:rgba(255,255,255,.13);color:#FBD38D;font-size:.72rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;border-radius:999px;padding:.38rem .85rem;display:inline-block;margin-bottom:.75rem;}
.grammar-hero .hero-title{font-family:Georgia,serif;font-size:1.55rem;color:#fff;margin:0 0 .75rem;line-height:1.28;}
.grammar-hero .hero-badge{background:linear-gradient(135deg,#FF9A3D,#F9610D);color:#fff;font-size:.74rem;font-weight:800;border-radius:999px;padding:.38rem .85rem;box-shadow:0 4px 12px rgba(249,97,13,.4);}
.section-kicker{font-family:Georgia,serif;font-size:1.2rem;font-weight:700;color:#C2410C;margin:1.25rem 0 .75rem;}
.rule-card{display:flex;gap:.85rem;background:#fff;border:1px solid #FBEFE0;border-radius:20px;padding:1.05rem;margin-bottom:.75rem;box-shadow:0 8px 20px rgba(190,130,70,.10);align-items:flex-start;}
.rule-num{position:static;width:34px;height:34px;flex:none;border-radius:50%;background:linear-gradient(135deg,#FF9A3D,#F9610D);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(249,97,13,.35);}
.rule-card p{margin:0;color:#3A4456;line-height:1.65;font-size:.96rem;}
.rule-card .hl{color:#C2410C;font-weight:800;}
.example-card{background:#fff;border:1px solid #FBEFE0;border-left:4px solid #F5A623;border-radius:16px;padding:.95rem 1.05rem;margin-bottom:.65rem;box-shadow:0 6px 14px rgba(190,130,70,.08);}
.ex-text{margin:0;color:#3A4456;font-size:.96rem;line-height:1.6;}
.ex-em{color:#C2410C;font-weight:800;}
.ex-note{display:block;margin-top:.35rem;font-size:.81rem;color:#9AA3B2;}
.quiz-cta{margin-top:1.25rem;text-align:center;}
.quiz-cta-text{font-weight:600;color:#5B6472;margin-bottom:.65rem;}

.stat-row{display:flex;align-items:center;gap:1rem;margin-bottom:1.05rem;}
.stat-example{font-size:.81rem;color:#9AA3B2;margin-top:.25rem;}
.attempt-card{display:flex;align-items:center;gap:.95rem;}
/* ---------- bottom nav ---------- */
.tabbar{background:rgba(255,255,255,.97);backdrop-filter:blur(12px);border-top:1px solid #F6EAD9;border-radius:26px 26px 0 0;box-shadow:0 -10px 28px rgba(190,130,70,.12);}
.tab{color:#9AA3B2;}
.tab .tab-icon svg{width:25px;height:25px;}
.tab.active{color:#F9610D;}
.tab.active .tab-label{font-weight:800;}
.tab-label{font-size:.7rem;}

/* ============ HOME v5 — mockup rebuild (2026-10-02) ============ */
/* (battle banner removed 2026-10-09 per Alireza) */

/* Streak banner v2 (2026-10-09): cream illustrated card per Alireza's mockup.
   Dynamic day count rendered as HTML text over the illustration. */
.stk-link{position:relative;display:block;overflow:hidden;border-radius:24px;margin-bottom:14px;
  background:#FFF9F1;border:1px solid #F2E5D2;min-height:128px;text-decoration:none;
  box-shadow:0 8px 24px rgba(178,132,52,.10);}
.stk-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:left center;}
.stk-scrim{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to right, rgba(255,249,241,0) 28%, rgba(255,249,241,.85) 55%, #FFF9F1 78%);}
.stk-txt{position:absolute;top:50%;left:35%;transform:translateY(-50%);display:flex;flex-direction:column;
  gap:2px;max-width:52%;}
.stk-kicker{font-size:15px;font-weight:700;color:#102A52;}
.stk-num{font-size:34px;font-weight:800;line-height:1.1;
  background:linear-gradient(90deg,#FF9D2E,#FF6A18);-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;}
.stk-sub{font-size:12.5px;color:#6B7A90;}
.stk-go{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:44px;height:44px;
  border-radius:50%;background:#F7ECD9;color:#102A52;display:flex;align-items:center;justify-content:center;
  font-size:24px;font-weight:800;flex:none;}
.stk-link:active .stk-go{background:#F1DFC2;}

.h-lesson{border-radius:22px;overflow:hidden;background:#FFFDF8;margin-bottom:14px;
  box-shadow:0 2px 12px rgba(120,80,20,.08);}
.h-lesson-hero{display:block;width:100%;border:0;cursor:pointer;
  background:url('/media/home/lesson-bg.webp') top center/cover no-repeat;min-height:178px;
  padding:0;border-radius:22px 22px 0 0;}
.h-lesson-hero:active{transform:scale(.995);}
.h-steps{list-style:none;margin:0;padding:14px 14px 2px;display:flex;flex-direction:column;gap:10px;}
.h-step button{display:flex;align-items:center;gap:11px;width:100%;background:#fff;cursor:pointer;
  border:1.5px solid #F1EDE6;border-radius:16px;padding:9px 14px 9px 9px;font:inherit;text-align:left;}
.h-step.next button{border-color:#F87171;box-shadow:0 0 0 3px rgba(248,113,113,.14);}
.h-step-icon{width:42px;height:42px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;flex:none;}
.h-step-icon svg{width:23px;height:23px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.h-step-num{width:26px;height:26px;border-radius:50%;background:#EF4444;color:#fff;font-size:13px;font-weight:800;
  display:inline-flex;align-items:center;justify-content:center;flex:none;}
.h-step-name{font-weight:700;font-size:15px;color:#23272F;flex:1;}
.h-step-check{width:30px;height:30px;border-radius:50%;background:#22C55E;color:#fff;flex:none;
  display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;}
.h-step-pill{background:linear-gradient(135deg,#FB7185,#EF4444);color:#fff;font-size:12px;font-weight:800;
  padding:8px 15px;border-radius:999px;flex:none;letter-spacing:.02em;}
.h-step-go{color:#C4BBA9;font-size:22px;font-weight:700;flex:none;padding-right:2px;}
.h-progress{padding:8px 18px 0;}
.h-progress-top{display:flex;justify-content:space-between;font-size:13px;color:#8A7A5F;margin-bottom:8px;}
.h-progress-bar{height:12px;border-radius:999px;background:#EDE7D9;overflow:hidden;}
.h-progress-bar>div{height:100%;background:linear-gradient(90deg,#34D399,#16A34A);border-radius:999px;transition:width .4s;}
.h-cta{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px 14px 0;width:calc(100% - 28px);
  padding:16px;border:0;border-radius:999px;cursor:pointer;
  background:linear-gradient(135deg,#FF8A3D,#F94F2B);color:#fff;font-size:17px;font-weight:800;
  box-shadow:0 6px 16px rgba(249,79,43,.35);}
.h-cta:active{transform:scale(.99);}
.h-cta-play{display:inline-flex;width:34px;height:34px;border-radius:50%;background:#fff;color:#F94F2B;
  align-items:center;justify-content:center;font-size:14px;padding-left:2px;}
.h-cta-sub{text-align:center;color:#A79B83;font-size:13px;margin:10px 0 18px;}

/* ============ Quiz start banner (2026-10-02) ============ */
.quiz-banner{display:block;width:calc(100% + 2rem);margin:0 -1rem;border:0;padding:0;cursor:pointer;
  background:#FFF7EA url('/media/home/quiz-banner.webp') center/cover no-repeat;aspect-ratio:3/2;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 48px,#000 calc(100% - 72px),transparent 100%);
  mask-image:linear-gradient(to bottom,transparent 0,#000 48px,#000 calc(100% - 72px),transparent 100%);}
.quiz-banner:active{opacity:.96;}

/* ============ Podcast milestone overlay (2026-10-02) ============ */
#podms{position:fixed;inset:0;z-index:210;background:#000;}
.podms-stage{position:absolute;inset:0;overflow:hidden;}
.podms-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.podms-tap{position:absolute;border:0;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent;}
.podms-tap:active{background:rgba(255,255,255,.12);border-radius:24px;}
.podms-reveal{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;
  background:rgba(20,10,0,.55);opacity:0;pointer-events:none;transition:opacity .35s ease;}
.podms-reveal.show{opacity:1;pointer-events:auto;}
.podms-reveal-card{background:linear-gradient(180deg,#fff8e8,#ffe9bd);border-radius:28px;padding:34px 46px;text-align:center;
  box-shadow:0 24px 60px rgba(0,0,0,.45);transform:scale(.7);transition:transform .35s cubic-bezier(.34,1.56,.64,1);}
.podms-reveal.show .podms-reveal-card{transform:scale(1);}
.pr-emoji{font-size:56px;line-height:1;}
.pr-label{font-weight:800;font-size:38px;color:#7a4a00;margin-top:10px;}
.pr-sub{font-size:13px;color:#a07c3a;margin-top:8px;}


/* ============ Review banner (2026-10-02) ============ */
.review-banner{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;
  border-radius:22px;background:#FEFBF6 url('/media/home/review-banner.webp') top center/cover no-repeat;
  aspect-ratio:1200/571;container-type:inline-size;text-align:left;font:inherit;
  box-shadow:0 2px 10px rgba(120,80,20,.07);}
.review-banner-count{position:absolute;left:4%;top:8%;width:52%;height:24%;background:#FEFBF6;
  display:flex;align-items:center;font-family:Georgia,'Times New Roman',serif;font-weight:700;
  font-size:8.2cqw;color:#1B2A4A;line-height:1;white-space:nowrap;}
.review-banner:active{opacity:.97;}

/* ================= Landing v2 — dark navy / flame identity ================= */
.brand-icon { width: 30px; height: 30px; border-radius: 8px; vertical-align: -8px; margin-right: 0.35rem; }

.lp {
  margin: -1rem -1rem -0.5rem; background: #101024; color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: clip;
}
.lp a { text-decoration: none; }
.lp-muted { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* Top bar */
.lp-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem; position: sticky; top: 0; z-index: 20;
  background: rgba(16,16,36,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lp-brand { display: flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 800; font-size: 1.02rem; }
.lp-brand img { width: 34px; height: 34px; border-radius: 10px; }
.lp-nav-actions { display: flex; align-items: center; gap: 0.8rem; }
.lp-signin { color: rgba(255,255,255,0.75); font-weight: 600; font-size: 0.92rem; }

/* CTA buttons */
.lp-cta {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(180deg, #ffa726, #ff8a00);
  color: #3a2200; font-weight: 800; font-size: 1rem;
  padding: 0.9rem 1.7rem; border-radius: 999px; text-align: center;
  box-shadow: 0 6px 20px rgba(255,149,0,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lp-cta:active { transform: scale(0.96); }
.lp-cta-sm { font-size: 0.88rem; padding: 0.6rem 1.2rem; }
.lp-cta-lg { font-size: 1.08rem; padding: 1rem 2.2rem; }
.lp-cta-block { display: block; width: 100%; margin-top: 1rem; box-sizing: border-box; }
.lp-cta-ghost {
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.18); box-shadow: none;
}

/* Hero */
.lp-hero {
  position: relative; text-align: center; overflow: hidden;
  padding: 2.6rem 1.2rem 2.2rem;
  background: radial-gradient(120% 90% at 50% 0%, #23234a 0%, #14142e 55%, #101024 100%);
}
.lp-glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(60px); }
.lp-glow-a { width: 340px; height: 340px; left: 50%; top: -120px; transform: translateX(-50%); background: rgba(255,149,0,0.22); }
.lp-glow-b { width: 220px; height: 220px; right: -70px; top: 30%; background: rgba(255,80,40,0.14); }
.lp-glow-c { width: 300px; height: 300px; left: 50%; bottom: -140px; transform: translateX(-50%); background: rgba(255,149,0,0.18); }
.lp-mascot {
  width: 148px; height: 148px; border-radius: 36px; position: relative; z-index: 1;
  box-shadow: 0 14px 44px rgba(255,149,0,0.35), 0 4px 14px rgba(0,0,0,0.5);
}
.lp-eyebrow {
  display: inline-block; margin-top: 1.2rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: #ffb74d;
}
.lp-hero h1 {
  font-size: 2.3rem; line-height: 1.12; margin: 0.6rem 0 0.8rem; letter-spacing: -0.01em;
}
.lp-lede { color: rgba(255,255,255,0.72); font-size: 1.02rem; line-height: 1.55; max-width: 32rem; margin: 0 auto 1.5rem; }
.lp-ctas { display: flex; flex-direction: column; gap: 0.7rem; align-items: stretch; max-width: 22rem; margin: 0 auto; }
.lp-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 1.2rem; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.lp-returning { margin-top: 1rem; color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.lp-returning a, .lp-signin-row a { color: #ffb74d; font-weight: 700; }

/* Hero lesson card */
.lp-hero-preview { max-width: 24rem; margin: 1.8rem auto 0; position: relative; z-index: 1; text-align: left; }
.lp-lesson-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.lp-lesson-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem; background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lp-lesson-brand { display: flex; align-items: center; gap: 0.45rem; font-weight: 800; font-size: 0.95rem; }
.lp-lesson-brand img { width: 26px; height: 26px; border-radius: 8px; }
.lp-lesson-level { font-size: 0.75rem; font-weight: 700; background: rgba(255,149,0,0.2); color: #ffb74d; padding: 0.25rem 0.7rem; border-radius: 999px; }
.lp-lesson-body { padding: 1.1rem; }
.lp-lesson-date { font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.lp-lesson-theme { font-size: 1.4rem; font-weight: 800; margin: 0.2rem 0 0.6rem; text-transform: capitalize; }
.lp-lesson-checks { list-style: none; margin: 0.6rem 0 1rem; padding: 0; }
.lp-lesson-checks li { display: flex; gap: 0.7rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 0.9rem; }
.lp-lesson-checks li:last-child { border-bottom: none; }
.lp-ck { font-size: 1.25rem; line-height: 1.3; }
.lp-lesson-bar { height: 8px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; margin: 0.3rem 0 0.5rem; }
.lp-lesson-bar > div { height: 100%; width: 34%; background: linear-gradient(90deg, #ffa726, #ff8a00); border-radius: 999px; }

/* Stats */
.lp-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
  padding: 1.4rem 1.2rem; background: #0c0c1e; border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lp-stat { text-align: center; }
.lp-stat b { display: block; font-size: 1.5rem; color: #ffb74d; }
.lp-stat span { font-size: 0.72rem; color: rgba(255,255,255,0.55); }

/* Sections */
.lp-section { padding: 2.6rem 1.2rem; max-width: 1060px; margin: 0 auto; }
.lp-section h2 { font-size: 1.65rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.lp-sub { color: rgba(255,255,255,0.62); margin: 0 0 1.5rem; font-size: 0.98rem; line-height: 1.5; }
.lp-center { text-align: center; margin-top: 1.8rem; }

/* Steps */
.lp-steps { display: grid; gap: 0.8rem; }
.lp-step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px; padding: 1rem 1.1rem;
}
.lp-step-num {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(180deg, #ffa726, #ff8a00); color: #3a2200;
  font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255,149,0,0.35);
}
.lp-step h3 { margin: 0 0 0.25rem; font-size: 1.02rem; }
.lp-step p { margin: 0; color: rgba(255,255,255,0.62); font-size: 0.9rem; line-height: 1.5; }

/* Preview tabs (dark restyle) */
.lp .preview-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.lp .preview-tab {
  flex: 1; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7); font-weight: 700; font-size: 0.9rem;
  padding: 0.65rem 0; border-radius: 12px; cursor: pointer;
}
.lp .preview-tab[aria-selected="true"] { background: linear-gradient(180deg, #ffa726, #ff8a00); color: #3a2200; border-color: transparent; }
.lp #preview-tab-body { color: #fff; }
.lp #preview-tab-body .muted { color: rgba(255,255,255,0.6); }

/* Levels */
.lp-levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.lp-level {
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px; padding: 1.1rem 1rem; text-align: center;
}
.lp-lvl { font-size: 1.5rem; font-weight: 800; color: #ffb74d; }
.lp-lvl-name { font-weight: 700; font-size: 0.9rem; margin: 0.2rem 0 0.35rem; }
.lp-lvl-desc { font-size: 0.8rem; color: rgba(255,255,255,0.55); line-height: 1.45; }

/* Why cards */
.lp-why { display: grid; gap: 0.8rem; }
.lp-why-card {
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px; padding: 1.2rem 1.1rem;
}
.lp-why-emoji { font-size: 1.8rem; margin-bottom: 0.5rem; }
.lp-why-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.lp-why-card p { margin: 0; color: rgba(255,255,255,0.62); font-size: 0.9rem; line-height: 1.55; }

/* Final CTA */
.lp-final {
  position: relative; overflow: hidden; text-align: center;
  padding: 3rem 1.2rem; margin-top: 1rem;
  background: radial-gradient(110% 100% at 50% 100%, #2a1f3d 0%, #16162f 60%, #101024 100%);
  border-top: 1px solid rgba(255,255,255,0.07);
}
.lp-final-mascot { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px rgba(255,149,0,0.3); position: relative; z-index: 1; }
.lp-final h2 { font-size: 1.9rem; margin: 1rem 0 0.6rem; position: relative; z-index: 1; }
.lp-final p { color: rgba(255,255,255,0.65); max-width: 26rem; margin: 0 auto 1.6rem; position: relative; z-index: 1; }
.lp-signin-row { margin-top: 1rem; color: rgba(255,255,255,0.6); font-size: 0.9rem; position: relative; z-index: 1; }
.lp-footer { text-align: center; padding: 1.4rem; color: rgba(255,255,255,0.4); font-size: 0.82rem; }

/* Desktop */
@media (min-width: 720px) {
  .lp-ctas { flex-direction: row; justify-content: center; max-width: none; }
  .lp-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-step:last-child { grid-column: 1 / -1; }
  .lp-levels { grid-template-columns: repeat(3, 1fr); }
  .lp-why { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .lp-hero h1 { font-size: 3rem; }
  .lp-steps { grid-template-columns: repeat(5, 1fr); }
  .lp-step { flex-direction: column; }
  .lp-step:last-child { grid-column: auto; }
  .lp-levels { grid-template-columns: repeat(6, 1fr); }
}

/* ================= PWA install prompt ================= */
.pwa-prompt {
  position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 70; display: flex; align-items: center; gap: 0.7rem;
  background: linear-gradient(180deg, #23233f, #191930); color: #fff;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 18px;
  padding: 0.7rem 0.8rem; box-shadow: 0 12px 32px rgba(8,6,24,0.6);
  animation: pwa-slide 0.35s ease;
}
@keyframes pwa-slide { from { transform: translateY(24px); opacity: 0; } }
.pwa-icon { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; }
.pwa-text { flex: 1; min-width: 0; }
.pwa-title { font-weight: 800; font-size: 0.92rem; }
.pwa-sub { font-size: 0.76rem; color: rgba(255,255,255,0.62); }
.pwa-btn {
  flex: 0 0 auto; border: none; cursor: pointer;
  background: linear-gradient(180deg, #ffa726, #ff8a00); color: #3a2200;
  font-weight: 800; font-size: 0.88rem; padding: 0.62rem 1.15rem; border-radius: 999px;
  box-shadow: 0 3px 12px rgba(255,149,0,0.4);
}
.pwa-btn:active { transform: scale(0.94); }
.pwa-btn-block { display: block; width: 100%; margin-top: 1.1rem; padding: 0.85rem; font-size: 1rem; }
.pwa-x {
  flex: 0 0 auto; border: none; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 0.8rem;
}
.pwa-sheet {
  position: fixed; inset: 0; z-index: 80; background: rgba(8,6,20,0.65);
  display: flex; align-items: flex-end; justify-content: center;
}
.pwa-sheet-card {
  width: 100%; max-width: 480px; background: #20203a; color: #fff;
  border-radius: 24px 24px 0 0; padding: 1.6rem 1.4rem calc(1.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.12); text-align: center;
  animation: pwa-slide 0.3s ease;
}
.pwa-sheet-card .pwa-icon { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 0.6rem; }
.pwa-sheet-card .pwa-title { font-size: 1.15rem; margin-bottom: 1rem; }
.pwa-steps { text-align: left; margin: 0 auto; max-width: 21rem; padding-left: 1.4rem; color: rgba(255,255,255,0.85); line-height: 2; font-size: 0.95rem; }
.pwa-steps b { color: #ffb74d; }
.pwa-note { margin: 0.75rem auto 0; max-width: 21rem; font-size: 0.8rem; color: rgba(255,255,255,0.6); line-height: 1.5; }
.lp h1, .lp h2, .lp h3 { color: #fff; }

/* Landing v2: dark overrides for preview tab content */
.lp .preview-word {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
}
.lp .pw-word { color: #fff; }
.lp .pw-meaning { color: rgba(255,255,255,0.62); }
.lp .muted { color: rgba(255,255,255,0.6); }
.lp a.link { color: #ffb74d; }
.lp .preview-quiz-teaser .quiz-q { color: #fff; }
.lp .preview-quiz-teaser .badge-level { background: rgba(255,255,255,0.12); color: #fff; }
.lp .preview-quiz-teaser .btn {
  display: inline-block; margin-top: 0.4rem; border: none; cursor: pointer;
  background: linear-gradient(180deg, #ffa726, #ff8a00); color: #3a2200;
  font-weight: 800; padding: 0.8rem 1.6rem; border-radius: 999px;
}
.lp .audio-card2 {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; color: #fff; border-left-color: rgba(255,255,255,0.1);
}
.lp .audio-card2 .ap-title { color: #fff; }
.lp .audio-card2 .ap-sub { color: rgba(255,255,255,0.6); }
.lp .audio-card2 .ap-times { color: rgba(255,255,255,0.55); }
.lp .audio-card2 .progress { background: rgba(255,255,255,0.14); }
.lp .audio-card2 .progress > div { background: linear-gradient(90deg, #ffa726, #ff8a00); }
.lp .audio-card2 .play-btn { background: linear-gradient(180deg, #ffa726, #ff8a00); color: #3a2200; }
.lp .audio-card2 .ap-skip { color: rgba(255,255,255,0.75); }
.lp .audio-card2 .ap-skip .ap-rs { color: rgba(255,255,255,0.55); }
.lp .audio-card2 .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.2); }

/* Landing v2: social proof band */
.lp-proof {
  position: relative; overflow: hidden; text-align: center;
  padding: 2.8rem 1.2rem;
  background: radial-gradient(100% 120% at 50% 0%, #1e1a3f 0%, #12122a 60%, #0e0e22 100%);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lp-glow-d { width: 420px; height: 200px; left: 50%; top: -60px; transform: translateX(-50%); background: rgba(255,149,0,0.16); }
.lp-proof-hero { position: relative; z-index: 1; margin-bottom: 1.6rem; }
.lp-proof-big {
  font-size: 3.2rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1;
  background: linear-gradient(180deg, #ffc966, #ff8a00);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255,149,0,0.35));
}
.lp-proof-big-sub { margin-top: 0.5rem; font-size: 1rem; color: rgba(255,255,255,0.75); font-weight: 600; line-height: 1.45; }
.lp-proof-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem;
  max-width: 640px; margin: 0 auto;
}
.lp-proof-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; padding: 1.2rem 0.8rem;
}
.lp-proof-ico { font-size: 1.9rem; margin-bottom: 0.4rem; }
.lp-proof-num {
  font-size: 1.7rem; font-weight: 900; color: #ffb74d; letter-spacing: -0.01em;
}
.lp-proof-lbl { margin-top: 0.3rem; font-size: 0.8rem; color: rgba(255,255,255,0.6); line-height: 1.45; }
@media (min-width: 720px) {
  .lp-proof-grid { grid-template-columns: repeat(4, 1fr); }
  .lp-proof-big { font-size: 4rem; }
}

/* ================= Auth (signin/signup) — dark navy / flame identity ================= */
.auth {
  margin: -1rem -1rem -0.5rem; min-height: 100vh;
  background: radial-gradient(120% 80% at 50% 0%, #23234a 0%, #14142e 55%, #101024 100%);
  color: #fff; position: relative; overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 1rem 1.1rem 2.5rem;
}
.auth-glow {
  position: absolute; width: 340px; height: 340px; left: 50%; top: -130px;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: rgba(255,149,0,0.2); filter: blur(70px);
}
.auth-back {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 0.5rem;
  color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none; margin-bottom: 1.4rem;
}
.auth-back img { width: 32px; height: 32px; border-radius: 9px; }
.auth-card {
  position: relative; z-index: 1; max-width: 440px; margin: 0 auto;
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px; padding: 1.8rem 1.4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  text-align: center;
}
.auth-mascot {
  width: 76px; height: 76px; border-radius: 20px; margin: -3.4rem auto 0.8rem; display: block;
  box-shadow: 0 10px 28px rgba(255,149,0,0.4), 0 4px 12px rgba(0,0,0,0.5);
  border: 3px solid #1b1b36; background: #1b1b36;
}
.auth-card h1 { color: #fff; font-size: 1.55rem; margin: 0 0 0.4rem; }
.auth-card .muted { color: rgba(255,255,255,0.62); font-size: 0.92rem; }
.auth-card form { text-align: left; margin-top: 1.2rem; }
.auth-card .field { margin-bottom: 1rem; }
.auth-card .field label { display: block; color: rgba(255,255,255,0.8); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.4rem; }
.auth-card .field input[type="email"],
.auth-card .field input[type="password"],
.auth-card .field input[type="text"] {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px; color: #fff; font-size: 1rem; padding: 0.85rem 1rem; font-family: inherit;
}
.auth-card .field input::placeholder { color: rgba(255,255,255,0.35); }
.auth-card .field input:focus { outline: none; border-color: #ff9500; box-shadow: 0 0 0 3px rgba(255,149,0,0.25); }
.auth-card .pw-toggle { color: rgba(255,255,255,0.6); }
.auth-card .btn {
  display: block; width: 100%; box-sizing: border-box; border: none; cursor: pointer;
  background: linear-gradient(180deg, #ffa726, #ff8a00); color: #3a2200;
  font-weight: 800; font-size: 1.02rem; padding: 0.9rem; border-radius: 999px; margin-top: 0.4rem;
  box-shadow: 0 6px 20px rgba(255,149,0,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
}
.auth-card .btn:active { transform: scale(0.97); }
.auth-card .btn:disabled { opacity: 0.6; }
.auth-card .btn-ghost {
  background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.18); box-shadow: none;
}
.auth-card .form-error { color: #ff8a80; }
.auth-card .form-note { color: #a5d6a7; }
.auth-switch { text-align: center; margin-top: 1.2rem; font-size: 0.92rem; color: rgba(255,255,255,0.65); }
.auth-card a.link { color: #ffb74d; font-weight: 700; text-decoration: none; }
.auth-card .coming-soon {
  background: rgba(255,149,0,0.1); border: 1px solid rgba(255,149,0,0.3); color: #ffd9a0;
  border-radius: 14px; padding: 0.9rem; font-size: 0.88rem; margin: 1rem 0; text-align: left;
}
/* Level picker on dark */
.auth-card .level-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 0.4rem; }
.auth-card .level-opt { cursor: pointer; position: relative; }
.auth-card .level-opt input { position: absolute; opacity: 0; pointer-events: none; }
.auth-card .level-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 0.85rem 0.4rem; transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-card .level-ico { font-size: 1.6rem; }
.auth-card .level-name { color: #fff; font-weight: 800; font-size: 0.82rem; }
.auth-card .level-desc { color: rgba(255,255,255,0.55); font-size: 0.7rem; text-align: center; line-height: 1.35; }
.auth-card .level-opt input:checked + .level-card {
  border-color: #ff9500; background: rgba(255,149,0,0.14);
  box-shadow: 0 0 0 3px rgba(255,149,0,0.2);
}
.auth-card .level-opt input:focus-visible + .level-card { outline: 2px solid #ff9500; outline-offset: 2px; }

/* ================= Teachers (phase 1) ================= */
.lp-invite {
  position: relative; z-index: 1;
  display: inline-block; margin: 0.4rem auto 0;
  background: rgba(255,149,0,0.14); border: 1px solid rgba(255,149,0,0.4);
  color: #ffd9a0; font-size: 0.92rem; padding: 0.55rem 1.1rem; border-radius: 999px;
}
.lp-invite b { color: #ffb74d; }
.tch-wrap { max-width: 720px; margin: 0 auto; }
.tch-wrap h1 { margin-bottom: 0.4rem; }
.tch-status { border-radius: 14px; padding: 0.9rem 1rem; font-weight: 600; margin-bottom: 0.8rem; }
.tch-status.ok { background: rgba(57,116,90,0.12); border: 1px solid rgba(57,116,90,0.35); color: var(--herb-dark); }
.tch-status.pending { background: rgba(255,149,0,0.1); border: 1px solid rgba(255,149,0,0.35); color: #9a6200; }
.tch-status.no { background: rgba(200,75,49,0.08); border: 1px solid rgba(200,75,49,0.3); color: #a03d22; }
.tch-invite code {
  display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--mist); border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.82rem;
}
.tch-linkrow { display: flex; gap: 0.6rem; align-items: center; }
.tch-table-card { padding: 0.4rem; overflow-x: auto; }
.tch-table { min-width: 560px; }
.tch-tr {
  display: grid; grid-template-columns: 1.6fr 0.6fr 0.7fr 0.8fr 0.7fr 0.9fr;
  gap: 0.4rem; align-items: center; padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line); font-size: 0.9rem; cursor: pointer;
}
.tch-tr:last-child { border-bottom: none; }
.tch-tr:not(.tch-th):hover { background: var(--mist); }
.tch-th { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; cursor: default; }
.tch-name { font-weight: 700; }
.tch-name small { display: block; font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.tch-bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; margin: 1rem 0 0.4rem; }
.tch-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.tch-bar-fill { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #ffa726, #ff8a00); }
.tch-bar-d { font-size: 0.62rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.tch-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: 1rem 0; text-align: center; }
.tch-totals b { display: block; font-size: 1.3rem; color: var(--tomato-dark); }
.tch-totals span { font-size: 0.75rem; color: var(--muted); }
.tch-admin-row {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tch-admin-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.tch-code-input {
  width: 130px; font-family: monospace; font-size: 0.82rem;
  border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.6rem;
}
.tch-add-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tch-add-form input {
  flex: 1; min-width: 140px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.5rem 0.7rem; font-size: 0.88rem; font-family: inherit;
}

/* ================= Admin analytics (phase 2) ================= */
.adm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.adm-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 0.8rem 0.6rem; text-align: center;
}
.adm-card b { display: block; font-size: 1.35rem; color: var(--tomato-dark); }
.adm-card span { font-size: 0.72rem; color: var(--muted); }
.adm-chart-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem; }
.adm-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.adm-tab {
  border: 1px solid var(--line); background: var(--mist); color: var(--ink);
  font-size: 0.78rem; font-weight: 700; padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer;
}
.adm-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.adm-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.adm-filters input[type="search"] {
  flex: 2; min-width: 160px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.55rem 0.8rem; font-size: 0.88rem; font-family: inherit;
}
.adm-filters select {
  flex: 1; min-width: 110px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.55rem 0.6rem; font-size: 0.85rem; font-family: inherit; background: #fff;
}
.adm-utable .tch-tr { grid-template-columns: 1.8fr 0.5fr 0.7fr 0.7fr 0.8fr 0.9fr; }
/* Daily study report (admin + teacher): per-day, per-user study table */
.daily-table { min-width: 640px; }
.daily-table .tch-tr { grid-template-columns: 0.35fr 1.7fr 0.65fr 0.55fr 0.55fr 0.7fr 0.7fr 0.55fr 0.55fr; cursor: default; }
.adm-filters input[type="date"] {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0.5rem 0.6rem; font-size: 0.85rem; font-family: inherit; background: #fff;
}
.adm-events { display: flex; flex-direction: column; }
.adm-ev {
  display: flex; justify-content: space-between; gap: 0.8rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem;
}
.adm-ev:last-child { border-bottom: none; }
@media (min-width: 720px) { .adm-cards { grid-template-columns: repeat(6, 1fr); } }

/* ================= Personalized invite hero (phase 3) ================= */
.lp-invite-hero {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 560px; width: calc(100% - 2rem); margin: 0 auto 1.4rem;
  background: linear-gradient(135deg, rgba(255,149,0,0.16), rgba(255,149,0,0.05));
  border: 1.5px solid rgba(255,149,0,0.55); border-radius: 20px;
  padding: 1.2rem 1rem 1.3rem;
  box-shadow: 0 8px 32px rgba(255,122,26,0.18);
}
.lp-invite-ava {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 0.6rem;
  background: linear-gradient(135deg, #ff8a1e, #e04a1a); color: #fff;
  font-size: 1.6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255,122,26,0.4);
}
.lp-invite-txt { font-size: 1.2rem; color: #fff; line-height: 1.7; }
.lp-invite-txt b { color: #ffb74d; }
.lp-invite-hero p { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin: 0.45rem 0 0.9rem; }
.lp-invite-hero .lp-cta { display: inline-block; text-decoration: none; }

/* ================= Teacher phase 3: weekly report + coach XP ================= */
.tch-weekly-title { font-weight: 800; font-size: 1rem; margin-bottom: 0.5rem; }
.tch-weekly-title b { color: var(--tomato-dark); }
.tch-board { display: flex; flex-direction: column; }
.tch-board-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.tch-board-row:last-child { border-bottom: none; }
.tch-board-row.me { font-weight: 800; }
.tch-board-row.me span { color: var(--tomato-dark); }

/* ================= Google SSO button ================= */
.auth-card .btn-google {
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-weight: 600; box-shadow: none;
}
.auth-card .btn-google:hover:not(:disabled) { background: #f6fafe; }
.auth-card .btn-google:disabled { opacity: 0.65; cursor: wait; }
.auth-or {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 1rem 0; color: var(--muted); font-size: 0.8rem;
}
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ================= Teacher inbox (phase 4) ================= */
.inbox-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.25rem; text-decoration: none;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
}
.inbox-badge {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px;
  border-radius: 10px; background: #e04a1a; color: #fff;
  font-size: 0.68rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.msg-card.unread { border-left: 3px solid var(--tomato); }
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin-bottom: 0.35rem; }
.msg-head .muted { font-size: 0.78rem; white-space: nowrap; }
.msg-card p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
#msg-body {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem; font-family: inherit; font-size: 0.95rem; resize: vertical; background: #fff;
}

/* ================= Funnel + cohort (phase 4, admin) ================= */
.adm-funnel { display: flex; flex-direction: column; gap: 0.45rem; }
.adm-funnel-row { display: grid; grid-template-columns: 1fr 2fr auto auto; gap: 0.6rem; align-items: center; font-size: 0.88rem; }
.adm-funnel-bar { height: 10px; border-radius: 5px; background: var(--mist); overflow: hidden; }
.adm-funnel-bar > div { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--tomato), var(--tomato-dark)); }
.adm-cohort .tch-tr { grid-template-columns: 1.2fr 0.7fr 0.6fr 0.6fr 0.6fr 0.6fr; }
.adm-coh { font-weight: 700; border-radius: 8px; padding: 0.15rem 0.3rem; text-align: center; }
.adm-coh.hot { background: rgba(57,116,90,0.15); color: var(--herb-dark); }
.adm-coh.warm { background: rgba(255,149,0,0.15); color: #b26a00; }
.adm-coh.cold { background: rgba(200,60,40,0.1); color: #a03a2a; }

/* ================= Inbox prompt banner (teacher message) ================= */
.modal-card-inbox {
  background: #FEFAF3; border-radius: 26px;
  padding: 2.1rem 1.5rem 1.6rem; max-width: 420px;
  position: relative; overflow: hidden;
}
.inbox-prompt { position: relative; }
.inbox-prompt h2 {
  font-family: Georgia, 'Times New Roman', serif;
  color: #1E2A4A; font-size: 1.5rem; font-weight: 700;
  margin: 0 0 0.35rem; line-height: 1.25; white-space: nowrap;
}
.ip-sub { color: #8A8FA3; font-size: 0.9rem; margin: 0 0 1.35rem; white-space: nowrap; }
.ip-bubble {
  width: 86px; height: 74px; margin: 0.2rem auto 1.1rem; position: relative;
  background: linear-gradient(135deg, #DED4FA 0%, #B7A5EE 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 22px rgba(150,130,230,0.35),
    inset 0 5px 10px rgba(255,255,255,0.55),
    inset 0 -7px 12px rgba(120,100,200,0.25);
}
.ip-bubble::after {
  content: ''; position: absolute; bottom: -7px; left: 24px;
  width: 20px; height: 20px; background: #BFAFF0;
  clip-path: polygon(0 0, 100% 0, 25% 100%);
}
.ip-bubble span {
  width: 11px; height: 11px; border-radius: 50%; background: #7E6FD8;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.18);
}
.ip-spark { position: absolute; color: #B9A8EE; font-style: normal; line-height: 1; }
.ip-spark.s1 { left: -26px; top: 6px; font-size: 1.1rem; transform: rotate(-18deg); }
.ip-spark.s2 { left: -32px; top: 34px; font-size: 0.8rem; transform: rotate(12deg); }
.ip-spark.s3 { right: -26px; top: 6px; font-size: 1.1rem; transform: rotate(18deg); }
.ip-spark.s4 { right: -32px; top: 34px; font-size: 0.8rem; transform: rotate(-12deg); }
.ip-primary {
  display: block; width: 100%; margin: 0 0 0.7rem; border: none; cursor: pointer;
  background: linear-gradient(135deg, #9A8CF8 0%, #7C6AF0 100%); color: #fff;
  font-size: 1rem; font-weight: 700; padding: 1rem 0.6rem; border-radius: 999px;
  box-shadow: 0 10px 24px rgba(124,106,240,0.42);
  font-family: inherit; white-space: nowrap;
}
.ip-primary:active { transform: scale(0.98); }
.ip-secondary {
  display: block; width: 100%; margin: 0; cursor: pointer;
  background: transparent; color: #3A3A4A;
  border: 1.5px solid #E5DCCB; font-size: 0.95rem; font-weight: 600;
  padding: 0.9rem 0.6rem; border-radius: 999px; font-family: inherit; white-space: nowrap;
}
.ip-cta { display: flex; align-items: flex-end; gap: 10px; }
.ip-btns { flex: 1 1 auto; min-width: 0; }
.ip-mascot {
  flex: 0 0 84px; width: 84px; height: auto;
  pointer-events: none; margin-bottom: -4px;
}
.ip-deco { position: absolute; inset: 0; pointer-events: none; }
.ip-deco::before, .ip-deco::after {
  content: ''; position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(185,168,238,0.35), transparent);
}
.ip-deco::before { width: 150px; height: 150px; left: -50px; bottom: -40px; }
.ip-deco::after { width: 110px; height: 110px; right: -30px; top: -30px; }

/* ================= Admin: telegram bot control ================= */
.bot-grid { margin: 0.2rem 0 0.2rem; }
.bot-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.55rem 0; border-bottom: 1px solid #f0ebe0; font-size: 0.95rem;
}
.bot-row:last-child { border-bottom: none; }
.bot-row input[type="number"] {
  width: 64px; padding: 0.4rem 0.5rem; border: 1.5px solid #e5dccb; border-radius: 10px;
  font-size: 0.95rem; font-family: inherit; background: #fff;
}
.bot-hours { display: inline-flex; align-items: center; gap: 0.4rem; }
.bot-checks { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; justify-content: flex-end; }
.bot-check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.92rem; cursor: pointer; }
.bot-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: #7C6AF0; cursor: pointer; }
.bot-switch {
  appearance: none; -webkit-appearance: none; width: 48px; height: 27px; border-radius: 999px;
  background: #d8d2c2; position: relative; cursor: pointer; transition: background 0.2s; margin: 0; flex: 0 0 auto;
}
.bot-switch:checked { background: #7C6AF0; }
.bot-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.bot-switch:checked::after { left: 24px; }
.bot-chat-sec { margin-top: 0.4rem; }
.bot-chat-row {
  border: 1px solid #f0ebe0; border-radius: 12px; padding: 0.7rem 0.8rem;
  margin-bottom: 0.6rem; background: #fffdf8;
}
.bot-chat-head { font-size: 0.95rem; margin-bottom: 0.45rem; }
.bot-chat-head code { font-size: 0.78rem; color: #8a8172; }
.bot-chat-row select {
  padding: 0.4rem 0.5rem; border: 1.5px solid #e5dccb; border-radius: 10px;
  font-size: 0.9rem; font-family: inherit; background: #fff;
}
.bot-chat-row textarea {
  width: 100%; box-sizing: border-box; margin: 0.45rem 0; padding: 0.5rem 0.6rem;
  border: 1.5px solid #e5dccb; border-radius: 10px; font-size: 0.9rem;
  font-family: inherit; resize: vertical; background: #fff;
}
.bot-chat-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin-top: 0.35rem; }

/* ============ Quiz game player — warm storybook design (mockup v2) ============ */
body.duo-playing .tabbar{display:none;}
body.duo-playing{padding-bottom:0!important;}
.duo-top{display:flex;align-items:center;gap:.7rem;background:#fff;border-radius:20px;
  padding:.6rem .7rem;margin:.4rem .1rem .9rem;box-shadow:0 4px 18px rgba(190,130,70,.10);position:sticky;top:.4rem;z-index:20;}
.duo-x{width:42px;height:42px;flex:none;border-radius:14px;border:2px solid var(--line);background:#fff;
  font-size:1.05rem;color:var(--ink);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.duo-pbar{flex:1;height:14px;border-radius:99px;background:#EDE4D3;overflow:hidden;}
.duo-pfill{height:100%;border-radius:99px;background:linear-gradient(90deg,#7BD747,#46B90E);transition:width .35s ease;}
.duo-hearts{display:flex;align-items:center;gap:.3rem;background:#FFF0F2;border-radius:99px;
  padding:.45rem .8rem;font-weight:800;color:#F43F5E;font-size:1rem;white-space:nowrap;}
.duo-body{max-width:var(--content-w);margin:0 auto;padding:.2rem .35rem 16rem;}
.duo-hero{display:flex;justify-content:center;margin:.1rem 0 .8rem;}
.duo-hero img{width:176px;height:auto;display:block;background:#fff;border-radius:22px;padding:.5rem .9rem;
  box-shadow:0 6px 18px rgba(190,130,70,.10);}
.duo-q{font-size:1.32rem;font-weight:800;color:#1E2A4E;margin:.4rem 0 1.1rem;line-height:1.5;text-align:center;}
.duo-q[dir="rtl"]{text-align:center;}
.duo-hint{display:inline-flex;align-items:center;gap:.4rem;background:#FFF7DE;border:1px solid #F5E6B8;color:#8A6D1B;
  border-radius:99px;padding:.45rem .95rem;font-size:.88rem;font-weight:600;margin:0 auto 1rem;}
.duo-hint-wrap{text-align:center;}
.duo-hint-wrap[dir="rtl"]{text-align:center;}
.duo-opts{display:flex;flex-direction:column;gap:.7rem;}
.duo-opt{position:relative;display:flex;align-items:center;gap:.8rem;background:#fff;border:2px solid #F1E8D8;
  border-radius:18px;padding:.95rem 1rem;font-size:1rem;color:#1E2A4E;cursor:pointer;text-align:left;width:100%;
  box-shadow:0 3px 10px rgba(190,130,70,.07);}
.duo-opt:disabled{cursor:default;}
.duo-opt .opt-key{width:38px;height:38px;flex:none;border-radius:50%;border:2px solid #E4D9C4;background:#FBF7EE;
  color:#8A7F6A;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:.95rem;}
.duo-opt .opt-text{flex:1;}
.duo-opt .opt-badge{display:none;width:34px;height:34px;flex:none;border-radius:50%;align-items:center;justify-content:center;font-size:1rem;font-weight:800;}
.duo-opt.ok{background:#EAFBE3;border-color:#4ADE80;}
.duo-opt.ok .opt-key{border-color:#22C55E;color:#16A34A;background:#fff;}
.duo-opt.ok .opt-badge{display:flex;background:#D3F5C6;color:#16A34A;}
.duo-opt.bad{background:#FFEAED;border-color:#FB7185;}
.duo-opt.bad .opt-key{border-color:#FB7185;color:#F43F5E;background:#fff;}
.duo-opt.bad .opt-badge{display:flex;background:#FFD3D9;color:#E11D48;}
.duo-opt.dim{opacity:.5;}
.duo-listen{display:flex;flex-direction:column;align-items:center;gap:.5rem;margin:.2rem 0 1.2rem;}
.duo-replay{border:1px solid #D8E2F5;background:#F2F7FF;color:#3B6FD4;border-radius:99px;
  padding:.5rem 1.15rem;font-size:.88rem;font-weight:700;cursor:pointer;font-family:inherit;}
.duo-replay:active{transform:scale(.97);}
.duo-slots{display:flex;flex-wrap:wrap;gap:.55rem;min-height:76px;border:2px dashed #B9C8E4;border-radius:20px;
  padding:.9rem;background:#F8FBFF;margin-bottom:1.1rem;align-items:center;justify-content:center;}
.duo-slots-empty{color:#9AA8C3;font-size:.92rem;}
.duo-bank{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center;margin-bottom:1.3rem;}
.duo-tok{border:0;background:#E7F0FE;color:#1E2A4E;border-radius:14px;padding:.65rem 1.05rem;font-size:1.02rem;
  font-weight:700;cursor:pointer;box-shadow:0 3px 0 #C9DCFA;}
.duo-tok:active{transform:translateY(2px);box-shadow:none;}
.duo-tok.used{opacity:0;pointer-events:none;}
.duo-tok:disabled{cursor:default;}
.duo-slots .duo-tok{background:#DCE9FD;box-shadow:0 3px 0 #A9C6F5;}
.duo-check{border:0;border-radius:18px;padding:1rem;font-size:1.05rem;font-weight:800;letter-spacing:.05em;color:#fff;
  background:linear-gradient(135deg,#34D399,#16A34A);box-shadow:0 8px 20px rgba(22,163,74,.35);cursor:pointer;}
.duo-check:disabled{opacity:.35;box-shadow:none;}
.duo-check:active{transform:scale(.98);}
/* feedback tray — floating card above the bottom */
.duo-tray-wrap{position:fixed;left:0;right:0;bottom:0;z-index:30;padding:.6rem .8rem calc(.9rem + env(safe-area-inset-bottom));}
.duo-tray-inner{max-width:var(--content-w);margin:0 auto;}
.duo-tray{display:flex;gap:.9rem;align-items:flex-start;border-radius:24px;padding:1.1rem 1.15rem;margin-bottom:.8rem;
  box-shadow:0 10px 30px rgba(190,130,70,.14);}
.duo-tray.ok{background:#E4F9DC;}
.duo-tray.bad{background:#FFE7EB;}
.duo-tray-ico{width:52px;height:52px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:1.5rem;font-weight:800;}
.duo-tray.ok .duo-tray-ico{background:#C9F2B8;color:#16A34A;}
.duo-tray.bad .duo-tray-ico{background:#FFCBD3;color:#E11D48;}
.duo-tray-title{font-size:1.18rem;font-weight:800;margin-bottom:.15rem;}
.duo-tray.ok .duo-tray-title{color:#15803D;}
.duo-tray.bad .duo-tray-title{color:#E11D48;}
.duo-tray-text{font-size:.95rem;color:#3E4A68;line-height:1.55;}
.duo-continue{display:flex;align-items:center;justify-content:center;gap:.6rem;border:0;border-radius:18px;width:100%;
  padding:1.02rem;font-size:1.08rem;font-weight:800;letter-spacing:.04em;color:#fff;cursor:pointer;}
.duo-continue.ok{background:linear-gradient(135deg,#2FD06B,#16A34A);box-shadow:0 10px 24px rgba(22,163,74,.38);}
.duo-continue.bad{background:linear-gradient(135deg,#FB5E6A,#E8354B);box-shadow:0 10px 24px rgba(232,53,75,.38);}
.duo-continue:active{transform:scale(.98);}
/* results summary */
.duo-results{max-width:var(--content-w);margin:1rem auto;padding:0 .35rem;}
.duo-rcard{position:relative;background:#fff;border-radius:28px;padding:2rem 1.4rem 1.6rem;overflow:hidden;
  box-shadow:0 14px 40px rgba(190,130,70,.13);text-align:center;}
.duo-rcard::before{content:'';position:absolute;left:0;top:0;bottom:0;width:10px;
  background:linear-gradient(180deg,#FF9A3D,#F9610D);}
.duo-rcard .duo-hero img{width:210px;}
.duo-score-big{font-size:4.2rem;font-weight:800;color:#1E2A4E;line-height:1;letter-spacing:-.02em;}
.duo-score-sub{color:#5A6578;font-size:1.05rem;margin:.5rem 0 1.2rem;}
.duo-pills{display:flex;gap:.6rem;justify-content:center;margin-bottom:1.4rem;}
.duo-pill{flex:1;max-width:150px;background:#FFFDF8;border:1px solid #F3EAD9;border-radius:18px;padding:.8rem .4rem;
  display:flex;flex-direction:column;align-items:center;gap:.15rem;}
.duo-pill .pi{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:1.25rem;font-weight:800;margin-bottom:.2rem;}
.duo-pill .pn{font-size:1.35rem;font-weight:800;color:#1E2A4E;}
.duo-pill .pl{font-size:.75rem;color:#8A93A8;font-weight:600;}
.duo-pill.green .pi{background:#D9F7CB;color:#16A34A;}
.duo-pill.red .pi{background:#FFD9DE;color:#E11D48;}
.duo-pill.gold .pi{background:#FFEFC2;color:#D97706;}
.duo-rbtns{display:flex;gap:.7rem;}
.duo-rbtns .btn{flex:1;border-radius:18px;padding:.95rem;font-size:1rem;font-weight:800;}
.duo-btn-home{background:#fff!important;border:2px solid #EFE4D2!important;color:#1E2A4E!important;
  display:flex;align-items:center;justify-content:center;gap:.5rem;box-shadow:none!important;}
.duo-btn-review{background:linear-gradient(135deg,#FF8A3D,#F9610D)!important;border:0!important;color:#fff!important;
  display:flex;align-items:center;justify-content:center;gap:.5rem;box-shadow:0 8px 20px rgba(249,97,13,.35)!important;}
/* out of hearts */
.duo-out{max-width:420px;margin:2.5rem auto;text-align:center;padding:0 1.2rem;}
.duo-out-card{background:#fff;border-radius:28px;padding:2.2rem 1.6rem;box-shadow:0 14px 40px rgba(190,130,70,.13);}
.duo-out-emoji{font-size:3.6rem;margin-bottom:.5rem;}
.duo-out h2{font-size:1.5rem;margin-bottom:.5rem;color:#1E2A4E;}
.duo-out p{color:#8A93A8;margin-bottom:1.2rem;line-height:1.65;}
.duo-out-btns{display:flex;flex-direction:column;gap:.6rem;}
.duo-out-btns .btn{border-radius:18px;padding:.95rem;font-size:1rem;font-weight:800;width:100%;}
.duo-btn-buy{background:linear-gradient(135deg,#FFD43D,#F5A623)!important;border:0!important;color:#5A3E00!important;
  display:flex;align-items:center;justify-content:center;gap:.5rem;box-shadow:0 8px 20px rgba(245,166,35,.35)!important;}
.duo-btn-buy:disabled,.duo-btn-review:disabled{opacity:.5;}
.duo-earn-note{display:none;background:#FFF7DE;border:1px solid #F5E6B8;color:#8A6D1B;border-radius:14px;
  padding:.7rem .9rem;font-size:.88rem;font-weight:600;text-align:center;}
/* exit modal */
.duo-modal-wrap{position:fixed;inset:0;background:rgba(30,42,78,.45);z-index:100;display:flex;align-items:center;
  justify-content:center;padding:1.2rem;}
.duo-modal{background:#fff;border-radius:26px;padding:1.8rem 1.5rem;width:100%;max-width:340px;text-align:center;
  box-shadow:0 24px 70px rgba(30,42,78,.28);}
.duo-modal h3{margin:0 0 .4rem;font-size:1.3rem;color:#1E2A4E;}
.duo-modal p{color:#8A93A8;margin:0 0 1.2rem;}
.duo-modal .btn{border-radius:16px;margin-top:.6rem;}

/* ---- Teacher assignments (phase 5) ---- */
.seg{display:flex;gap:.4rem;background:rgba(255,255,255,.07);border-radius:14px;padding:.3rem}
.seg button{flex:1;border:0;background:transparent;color:rgba(245,243,255,.65);border-radius:10px;padding:.55rem .3rem;font-size:.92rem;cursor:pointer}
.seg button.seg-on{background:linear-gradient(140deg,#ff8a1e,#f26d0d);color:#fff;font-weight:700}
.chk{display:flex;align-items:center;gap:.5rem;padding:.35rem 0;font-size:.92rem;cursor:pointer}
.chk input{width:1.1rem;height:1.1rem;accent-color:#f26d0d}
.as-pick{max-height:11rem;overflow:auto;border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:.3rem .7rem;margin-top:.4rem}
.as-row{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:.7rem .8rem;margin-bottom:.5rem;cursor:pointer;color:inherit}
.as-ico{font-size:1.3rem}
.as-main{flex:1;min-width:0}
.as-title{display:block;font-weight:700;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.as-meta{display:block;font-size:.78rem;color:rgba(245,243,255,.55);margin-top:.15rem}
.as-go{color:#ff8a1e;font-weight:700}
.as-results{max-height:16rem;overflow:auto;margin:.6rem 0}
.as-rrow{display:flex;justify-content:space-between;align-items:center;padding:.5rem .2rem;border-bottom:1px solid rgba(255,255,255,.08);font-size:.92rem}
.as-rrow .ok{color:#4ade80}
.hw-banner{display:flex;align-items:center;gap:.5rem;background:linear-gradient(140deg,#ff8a1e,#f26d0d);color:#fff;border-radius:16px;padding:.85rem 1rem;font-size:1rem;margin:.6rem 0;text-decoration:none;box-shadow:0 6px 18px rgba(242,109,13,.35)}
.hw-banner b{font-size:1.15rem}
.hw-banner span{margin-left:auto;font-weight:700}
.hw-card{margin-bottom:.7rem}
.hw-title{font-weight:800;font-size:1.05rem;margin-bottom:.25rem}
.hw-sub{font-size:.85rem;line-height:1.5;margin-bottom:.7rem}
.hw-done{background:rgba(74,222,128,.12);border:1px solid rgba(74,222,128,.35);color:#4ade80;border-radius:12px;padding:.6rem .8rem;font-size:.95rem}
.quiz-explain{background:#fff4e0;border:1px solid rgba(217,123,43,.45);border-radius:12px;padding:.65rem .8rem;margin:.7rem 0 0;font-size:.88rem;line-height:1.55;color:#7c4a12}
.duo-explain{background:#fff4e0;border:1px solid rgba(217,123,43,.45);border-radius:12px;padding:.6rem .8rem;margin:.6rem 0;font-size:.88rem;line-height:1.55;color:#7c4a12}

/* ---- Homework view v2 (mockup 2026-10-03) ---- */
.hw2-wrap{max-width:640px;margin:0 auto;padding-bottom:2rem}
.hw2-title{font-family:Georgia,serif;font-size:2rem;margin:1.2rem 0 1rem;display:flex;align-items:center;gap:.6rem}
.hw2-card{position:relative;overflow:hidden;background:#fffdf8;border:1px solid rgba(217,123,43,.14);border-radius:22px;padding:1.1rem 1.2rem 1.25rem;margin-bottom:.9rem;box-shadow:0 10px 30px rgba(180,110,40,.10)}
.hw2-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:8px;background:linear-gradient(180deg,#ff9a3c,#f26d0d)}
.hw2-deco{position:absolute;right:-8px;top:50%;transform:translateY(-50%);width:150px;pointer-events:none}
.hw2-deco svg{display:block;width:100%;height:auto}
.hw2-top{position:relative;display:flex;gap:.8rem;align-items:flex-start}
.hw2-ico{flex:0 0 auto;width:52px;height:52px;border-radius:14px;background:#ffedda;display:flex;align-items:center;justify-content:center;font-size:1.7rem}
.hw2-name{font-family:Georgia,serif;font-weight:700;font-size:1.28rem;line-height:1.25;color:#1e2a4e}
.hw2-lvl{display:inline-block;margin-top:.45rem;background:#ffe3c2;color:#b3540f;font-weight:800;font-size:.8rem;padding:.18rem .75rem;border-radius:999px;letter-spacing:.05em}
.hw2-meta{position:relative;margin:.75rem 0 .95rem;color:#8a8fa3;font-size:.9rem;line-height:1.5}
.hw2-cta{position:relative;display:block;width:100%;border:0;cursor:pointer;color:#fff;font-size:1.05rem;font-weight:700;padding:.9rem 3rem .9rem 1rem;border-radius:18px;background:linear-gradient(180deg,#ff9d45,#f0730a);box-shadow:0 8px 20px rgba(240,115,10,.35);text-align:center;font-family:inherit}
.hw2-cta:active{transform:scale(.99)}
.hw2-go{position:absolute;right:1.1rem;top:50%;transform:translateY(-50%);font-size:1.5rem;font-weight:400;opacity:.9}
.hw2-done{position:relative;background:#e9f9ef;border:1px solid #bfe8cd;color:#1d7a3f;border-radius:14px;padding:.7rem 1rem;font-size:.95rem;text-align:center}

/* ---- Messages view v2 (mockup 2026-10-03) ---- */
.msg2-wrap{position:relative;overflow:hidden}
.msg2-bg{position:relative;height:185px;pointer-events:none;margin-top:.4rem}
.msg2-blob{position:absolute;right:6px;bottom:-30px;width:260px;height:220px;border-radius:50%;background:radial-gradient(circle,#ffe3c2 0%,rgba(255,227,194,0) 70%)}
.msg2-bg img{position:absolute;right:26px;bottom:0;width:138px;height:auto}
.msg2-title{position:relative;z-index:1;font-family:Georgia,serif;font-size:2rem;margin:1.2rem 0 1rem;display:flex;align-items:center;gap:.55rem}
.msg2-bubble{font-size:1.7rem;filter:saturate(1.2)}
.msg2-spark{position:relative;width:14px;height:14px;margin-left:-.35rem}
.msg2-spark::before,.msg2-spark::after{content:"";position:absolute;background:#f59e0b;border-radius:2px}
.msg2-spark::before{width:10px;height:3px;transform:rotate(35deg);left:2px;top:2px}
.msg2-spark::after{width:10px;height:3px;transform:rotate(-25deg);left:2px;top:8px}
.msg2-spark.s2{transform:scale(.7) translateY(4px)}
#inbox-list{position:relative;z-index:1}
.msg2-card{position:relative;overflow:hidden;background:#fffdf8;border:1px solid rgba(217,123,43,.14);border-radius:20px;padding:1rem 1.1rem;margin-bottom:.8rem;box-shadow:0 8px 24px rgba(180,110,40,.08)}
.msg2-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:7px;background:linear-gradient(180deg,#ff9a3c,#f26d0d)}
.msg2-card.unread{border-color:rgba(242,109,13,.45)}
.msg2-card .msg-head b{font-family:Georgia,serif;font-size:1.12rem;color:#1e2a4e}
.msg2-card p{margin:.2rem 0 0;line-height:1.6;color:#3a4160}
.msg2-line{display:block}
.msg2-gap{display:block;height:.55rem}
.msg2-dim{color:#8a8fa3}
.msg2-cta{position:relative;display:flex;align-items:center;gap:.6rem;margin-top:.8rem;background:#ffe9d2;border-radius:999px;padding:.65rem .6rem .65rem 1rem;text-decoration:none;color:#e2630a;font-weight:800;font-size:1.02rem}
.msg2-cta-ico{font-size:1.35rem}
.msg2-cta-go{margin-left:auto;flex:0 0 auto;width:34px;height:34px;border-radius:50%;background:#f59e0b;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.2rem}

/* ---- New-assignment modal v2 (mockup 2026-10-03) ---- */
.modal-card.as2-card{background:#fffdf7;border:1px solid rgba(217,123,43,.12);border-radius:26px;max-width:430px;padding:1.5rem 1.35rem 1.35rem;box-shadow:0 24px 70px rgba(120,60,10,.28);text-align:left;max-height:92vh;overflow-y:auto}
.as2-head{position:relative;text-align:center;margin-bottom:.2rem}
.as2-ico{position:relative;display:inline-flex;align-items:center;justify-content:center;width:78px;height:78px}
.as2-ico::before{content:"";position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,#ffe9d2 0%,rgba(255,233,210,0) 72%)}
.as2-ico span{position:relative;font-size:2.7rem}
.as2-spark{position:absolute;width:14px;height:14px}
.as2-spark::before,.as2-spark::after{content:"";position:absolute;background:#f59e0b;border-radius:2px}
.as2-spark::before{width:11px;height:3px;transform:rotate(35deg);left:1px;top:2px}
.as2-spark::after{width:11px;height:3px;transform:rotate(-25deg);left:1px;top:8px}
.as2-spark.s1{left:calc(50% + 52px);top:14px}
.as2-spark.s2{left:calc(50% - 66px);top:34px;transform:scale(.7)}
.as2-close{position:absolute;top:-4px;right:-4px;width:34px;height:34px;border-radius:50%;background:#f4f1ea;border:0;font-size:.95rem;color:#8a8fa3;cursor:pointer;line-height:1}
.as2 h2{font-family:Georgia,serif;font-size:1.7rem;text-align:center;margin:.3rem 0 1.15rem;color:#1e2a4e}
.as2 .field{margin-bottom:.9rem}
.as2 .field>label{display:block;font-weight:700;font-size:.92rem;color:#1e2a4e;margin-bottom:.4rem}
.as2-opt{font-weight:400;color:#9a937f}
.as2 .seg{display:flex;background:#f7f2e9;border-radius:999px;padding:.3rem;gap:.2rem}
.as2 .seg button{flex:1;border:0;background:transparent;color:#9a937f;border-radius:999px;padding:.65rem .3rem;font-size:.95rem;font-weight:600;cursor:pointer;font-family:inherit;display:flex;align-items:center;justify-content:center;gap:.45rem}
.as2 .seg button.seg-on{background:linear-gradient(180deg,#ff9d45,#f0730a);color:#fff;font-weight:800;box-shadow:0 6px 14px rgba(240,115,10,.35)}
.as2 .input{display:block;width:100%;box-sizing:border-box;border:1.5px solid #e9dfcc;background:#fff;border-radius:14px;padding:.75rem .9rem;font-size:.95rem;font-family:inherit;color:#1e2a4e;appearance:none;-webkit-appearance:none}
.as2 select.input{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%238a8fa3" stroke-width="3" stroke-linecap="round"><path d="M6 9l6 6 6-6"/></svg>');background-repeat:no-repeat;background-position:right .9rem center;padding-right:2.4rem}
.as2 .input:focus{outline:none;border-color:#f59e0b}
.as2 .input::placeholder{color:#b9b2a0}
.as2-students{background:#fff8ec;border:1.5px solid #f0e2c8;border-radius:14px;padding:.55rem .9rem}
.as2 .chk{display:flex;align-items:center;gap:.55rem;padding:.4rem 0;font-size:.93rem;cursor:pointer;color:#1e2a4e;font-weight:600}
.as2 .chk input{width:1.25rem;height:1.25rem;accent-color:#f26d0d;flex:0 0 auto}
.as2-send{display:block;width:100%;border:0;cursor:pointer;color:#fff;font-size:1.05rem;font-weight:800;padding:.95rem;border-radius:18px;background:linear-gradient(180deg,#ff9d45,#f0730a);box-shadow:0 10px 24px rgba(240,115,10,.35);font-family:inherit;margin-top:.5rem}
.as2-send:disabled{opacity:.6;cursor:wait}
.as2-cancel{display:block;width:100%;margin-top:.6rem;background:transparent;border:1.5px solid #e9dfcc;color:#1e2a4e;border-radius:18px;padding:.85rem;font-size:1rem;font-weight:600;cursor:pointer;font-family:inherit}
.as2-modes{display:flex;gap:.5rem;margin:.1rem 0 .9rem}
.as2-mode{flex:1;border:1.5px solid #e9dfcc;background:#fffdf7;border-radius:14px;padding:.6rem;font:inherit;font-weight:700;font-size:.95rem;color:#5b5344;cursor:pointer}
.as2-mode.on{background:#1e2a4e;color:#fff;border-color:#1e2a4e}
.as2-mixrow{display:flex;gap:.4rem;margin-bottom:.45rem;align-items:center}
.as2-mixrow .as-mix-topic{flex:1;min-width:0}
.as2-mixrow .as-mix-count{width:4.6rem;flex:0 0 auto}
.as2-mixrow .as-mix-del{flex:0 0 auto}
.as2 .form-error{color:#d33;min-height:1.2em;font-size:.88rem;margin:.2rem 0}

/* ---- Weekly planner (2026-10-03) ---- */
.pl-back{display:inline-block;margin:1rem 0 .2rem;color:#b3540f;font-weight:700;text-decoration:none;font-size:.92rem}
.pl-title{font-family:Georgia,serif;font-size:1.9rem;margin:.2rem 0 .6rem;color:#1e2a4e}
.pl-card{padding:1.2rem 1.1rem}
.pl-day{border-top:1px solid #f0e6d2;padding:.8rem 0}
.pl-day:first-child{border-top:0}
.pl-dayhead{display:flex;align-items:baseline;gap:.6rem;margin-bottom:.5rem;flex-wrap:wrap}
.pl-dayhead b{font-family:Georgia,serif;font-size:1.05rem;color:#1e2a4e}
.pl-last{margin-left:auto;font-size:.8rem;color:#b3540f;background:#fff4e0;border-radius:999px;padding:.15rem .6rem}
.pl-row{display:grid;grid-template-columns:1fr 92px 108px;gap:.5rem}
.pl-sched{font-size:.8rem;margin-top:.35rem;min-height:1.1em;color:#b3540f}
/* ---- guided first-run tutorial v2 (showcase) ----
   One persistent dim for the whole tour: the spotlight hole glides between
   targets, text is written directly on the dim (no popup cards). */
#tut-ov{position:fixed;inset:0;z-index:9990;pointer-events:none}
#tut-catcher{position:fixed;inset:0;background:transparent;z-index:9990;cursor:pointer}
#tut-hole{position:fixed;border-radius:16px;border:2px solid #ffb14e;pointer-events:none;opacity:0;transition:left .38s cubic-bezier(.32,.72,.35,1),top .38s cubic-bezier(.32,.72,.35,1),width .38s cubic-bezier(.32,.72,.35,1),height .38s cubic-bezier(.32,.72,.35,1),border-radius .38s,opacity .25s;z-index:9991;background:transparent}
#tut-hole::before{content:'';position:absolute;inset:-2px;border-radius:18px;box-shadow:0 0 0 9999px rgba(7,10,24,.84)}
#tut-hole::after{content:'';position:absolute;inset:-2px;border-radius:18px;border:2px solid rgba(255,177,78,.9);animation:tutPulse 1.7s ease-in-out infinite}
@keyframes tutPulse{0%,100%{transform:scale(1);opacity:.95}50%{transform:scale(1.045);opacity:.35}}
#tut-text{position:fixed;z-index:9992;pointer-events:none;color:#fff;text-align:center;text-shadow:0 2px 16px rgba(0,0,0,.95),0 0 40px rgba(0,0,0,.5);opacity:0;transition:opacity .28s,transform .28s}
/* soft readability aura behind the text — not a card, just lets type breathe on the dim */
#tut-text::before{content:'';position:absolute;inset:-40px -34px;background:radial-gradient(ellipse at center,rgba(5,8,18,.78) 0%,rgba(5,8,18,0) 70%);z-index:-1;pointer-events:none}
#tut-text .tut-counter{font-size:.78rem;font-weight:800;letter-spacing:.14em;color:#ffb14e;margin-bottom:.55rem;text-shadow:0 2px 8px rgba(0,0,0,.9)}
#tut-text .tut-title{font-size:1.45rem;font-weight:800;margin-bottom:.5rem;color:#fff;filter:drop-shadow(0 3px 10px rgba(0,0,0,.85))}
#tut-text .tut-body{font-size:1.02rem;line-height:1.75;font-weight:500;color:rgba(255,255,255,.95)}
#tut-text .tut-done-emoji{font-size:3rem;margin-bottom:.6rem;filter:drop-shadow(0 4px 12px rgba(0,0,0,.8))}
#tut-text .tut-done-title{font-family:Georgia,serif;font-size:1.7rem;font-weight:700;margin-bottom:.4rem}
#tut-cta{pointer-events:auto;margin-top:1.1rem;background:linear-gradient(135deg,#ff9f2e,#ff7b2e);border:none;color:#fff;font-size:1.1rem;font-weight:800;padding:.85rem 2.6rem;border-radius:999px;cursor:pointer;box-shadow:0 6px 24px rgba(255,159,46,.45);min-height:52px}
#tut-text #tut-next{margin-top:1.1rem;width:100%;max-width:300px}
#tut-text #tut-skip{margin-top:.15rem}
#tut-controls{display:none}
#tut-next{pointer-events:auto;width:calc(100% - 56px);max-width:340px;background:linear-gradient(135deg,#ff9f2e,#ff7b2e);border:none;color:#fff;font-size:1.15rem;font-weight:800;min-height:58px;border-radius:999px;cursor:pointer;box-shadow:0 10px 30px rgba(255,159,46,.42);text-shadow:0 1px 4px rgba(0,0,0,.25)}
#tut-next:active{transform:scale(.98)}
#tut-skip{pointer-events:auto;background:none;border:none;color:rgba(255,255,255,.62);font-size:.88rem;text-decoration:underline;cursor:pointer;padding:10px 18px}
/* subtle text-button, also used in the welcome popup */
.tut-skip{background:none;border:none;color:#8a8fa3;font-size:.85rem;text-decoration:underline;cursor:pointer;padding:.4rem;display:block;width:100%}
.pl-done{text-align:center;padding:2rem 1.2rem}
.pl-done-ico{font-size:3rem}
.pl-done h2{font-family:Georgia,serif;color:#1e2a4e}
.tch-actions{display:flex;gap:.5rem}
.as-row.as-sched{border-style:dashed}
@media (max-width:420px){ .pl-row{grid-template-columns:1fr 84px} .pl-time{grid-column:1/-1} }

/* ---- Learning analytics (2026-10-03) ---- */
.an-title{font-weight:800;font-size:.95rem;color:#1e2a4e;margin-bottom:.5rem}
.an-chart{width:100%;height:auto;display:block;margin:.2rem 0}
.an-cl{font-size:9px;fill:#9a937f}
.an-cr{text-anchor:end}
.an-bars{display:flex;flex-direction:column;gap:.45rem}
.an-barrow{display:grid;grid-template-columns:1fr 110px 44px;gap:.5rem;align-items:center;font-size:.85rem}
.an-btopic{color:#3a4160;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.an-bartrack{display:block;height:10px;background:#f3ecdc;border-radius:999px;overflow:hidden}
.an-barfill{display:block;height:100%;border-radius:999px;background:#f59e0b}
.an-barfill.g{background:#3faf5c}
.an-barfill.y{background:#f59e0b}
.an-barfill.r{background:#e05252}
.an-bpct{text-align:right;font-weight:700;color:#1e2a4e}
.an-assign{display:flex;flex-direction:column}
.an-arow{display:grid;grid-template-columns:1fr auto auto;gap:.7rem;align-items:center;padding:.45rem 0;border-top:1px solid #f3ecdc;font-size:.88rem}
.an-arow:first-child{border-top:0}
.an-arow .ok{color:#1d7a3f}
.an-arow .bad{color:#c04444}
/* AI report modal */
.rpt{text-align:left}
.rpt-head{font-family:Georgia,serif;font-size:1.35rem;font-weight:700;color:#1e2a4e;margin-bottom:.7rem;text-align:center}
.rpt-body{max-height:60vh;overflow-y:auto;font-size:.94rem;line-height:1.75;color:#3a4160}
.rpt-body p{margin:.6rem 0}

/* ---- analytics: wrong-answer drill-down ---- */
.an-arow.an-click{cursor:pointer}
.an-warn{color:#c04444;font-size:.78rem;font-weight:700}
.an-wrong{padding:.2rem 0 .6rem}
.an-wq{background:#fff8ec;border:1px solid #f0e2c8;border-radius:12px;padding:.55rem .7rem;margin:.4rem 0;font-size:.85rem}
.an-wqq{color:#1e2a4e;margin-bottom:.3rem;line-height:1.5}
.an-wa{display:flex;gap:.8rem;flex-wrap:wrap}
.an-wa .bad{color:#c04444}
.an-wa .ok{color:#1d7a3f}

/* ---------- onboarding v2 (2026-10-04, his design) ---------- */
.modal-card:has(.onb) { max-width: 600px; padding: 0; overflow: hidden; border-radius: 26px; }
.onb { background: linear-gradient(180deg, #fffdf8 0%, #fff6ea 100%); color: #17212b;
  border-radius: 26px; padding: 1.4rem 1.6rem 1.5rem; text-align: left; }
.onb-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.onb-brand { font-weight: 700; font-size: 1.05rem; color: #17212b; }
.onb-x { background: none; border: 0; font-size: 1.3rem; color: #5a6b7d; cursor: pointer; padding: 0.2rem 0.4rem; }
.onb-x:hover { color: #17212b; }
.onb-body { display: flex; gap: 1rem; align-items: center; }
.onb-text { flex: 1 1 55%; }
.onb-title { position: relative; display: inline-block; font-size: 2rem; font-weight: 800;
  color: #17212b; margin: 0.2rem 0 0.9rem; letter-spacing: -0.01em; }
.onb-squiggle { display: block; height: 12px; margin-top: 2px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="12" viewBox="0 0 140 12"><path d="M3 8 Q 25 2, 48 7 T 93 7 T 137 6" fill="none" stroke="%23FF9600" stroke-width="5" stroke-linecap="round"/></svg>') no-repeat left center / 140px 12px; }
.onb-text p { color: #3c4c5e; line-height: 1.6; margin: 0.55rem 0; font-size: 1rem; }
.onb-hl { color: #ff9600; }
.onb-img { flex: 0 0 42%; max-width: 230px; border-radius: 18px; }
.onb-cta { display: block; width: 100%; margin-top: 1.1rem; padding: 0.95rem 1rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #ffa726, #ff8a00); color: #fff;
  font-size: 1.05rem; font-weight: 700; box-shadow: 0 10px 24px rgba(255,138,0,0.35); }
.onb-cta:hover { filter: brightness(1.04); }
.onb-skip { display: block; margin: 0.7rem auto 0; background: none; border: 0;
  color: #5a6b7d; text-decoration: underline; cursor: pointer; font-size: 0.95rem; }
/* waiting view (level picker) */
.onb-wait { max-width: 560px; margin: 2rem auto; text-align: center; box-shadow: 0 24px 70px rgba(120,60,10,0.18); }
.onb-wait .onb-top { justify-content: flex-start; }
.onb-wait .onb-title { font-size: 1.9rem; }
.onb-wait .onb-squiggle { margin-left: auto; margin-right: auto; background-position: center; }
.onb-sub { color: #3c4c5e; margin: 0.2rem 0 1rem; }
.onb-wait .level-pick { gap: 0.7rem; margin: 0 0 0.4rem; }
.onb-wait .level-opt { position: relative; }
.onb-wait .level-card { background: #fff; border: 2px solid #eee3d0; border-radius: 16px;
  padding: 1rem 0.5rem 0.9rem; gap: 0.3rem; transition: border-color 0.15s, box-shadow 0.15s; }
.onb-wait .level-ico { font-size: 1.9rem; }
.onb-wait .level-name { font-weight: 700; color: #17212b; font-size: 1rem; }
.onb-wait .level-desc { color: #7a8a9c; font-size: 0.82rem; }
.onb-wait .level-opt input:checked + .level-card { border-color: #ff9600;
  box-shadow: 0 8px 22px rgba(255,150,0,0.25); }
.onb-wait .level-opt input:checked + .level-card::after { content: "\2713";
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: #ff9600; color: #fff;
  font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.onb-wait .onb-cta { margin-top: 1.4rem; }
.onb-signed { color: #7a8a9c; font-size: 0.85rem; margin-top: 0.8rem; }
.onb[dir="rtl"] { text-align: right; }
.onb[dir="rtl"] .onb-squiggle { background-position: right center; }
.onb[dir="rtl"] .onb-body { flex-direction: row-reverse; }
@media (max-width: 520px) {
  .onb-body { flex-direction: column; }
  .onb[dir="rtl"] .onb-body { flex-direction: column; }
  .onb-img { max-width: 200px; }
  .onb-title { font-size: 1.7rem; }
}

/* Speaking practice (shadowing tab) */
.sp-card{margin-top:1rem}
.sp-controls{display:flex;align-items:center;gap:1rem;margin:.9rem 0}
.sp-rec{width:64px;height:64px;border-radius:50%;border:none;font-size:1.7rem;cursor:pointer;
  background:linear-gradient(180deg,#ff9a3c,#f26d0d);box-shadow:0 6px 18px rgba(242,109,13,.35);
  transition:transform .12s}
.sp-rec:active{transform:scale(.94)}
.sp-rec.recording{animation:sp-blink 1s infinite}
.sp-rec:disabled{opacity:.45;cursor:default}
@keyframes sp-blink{0%,100%{box-shadow:0 6px 18px rgba(242,109,13,.35)}50%{box-shadow:0 6px 26px rgba(220,40,40,.65)}}
.sp-timer{position:relative;flex:1;height:34px;background:#f3ede0;border-radius:999px;overflow:hidden}
.sp-timer-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(90deg,#ffb35c,#f26d0d);transition:width 1s linear}
.sp-timer span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-weight:800;color:#5a4a33;font-variant-numeric:tabular-nums}
.sp-live{display:flex;align-items:center;gap:.6rem;margin:.6rem 0;padding:.7rem .9rem;
  background:#fff8ec;border:1px dashed rgba(217,123,43,.4);border-radius:14px;color:#5a4a33}
.sp-pulse{width:12px;height:12px;border-radius:50%;background:#e23c3c;animation:sp-blink 1s infinite;flex:none}
.sp-analyzing{display:flex;align-items:center;gap:.6rem;margin:.8rem 0;color:#5a4a33}
.sp-score{display:flex;align-items:center;gap:.9rem;margin:.9rem 0;padding:.8rem 1rem;border-radius:16px;background:#f7f2e7}
.sp-score-num{font-size:2rem;font-weight:800;font-family:Georgia,serif}
.sp-score.great .sp-score-num{color:#1d9e57}
.sp-score.ok .sp-score-num{color:#d98a06}
.sp-score.low .sp-score-num{color:#d05252}
.sp-score-label{color:#5a4a33;font-size:.92rem}
.sp-said{margin:.7rem 0;color:#3a4160;line-height:1.55}
.sp-words{margin:.7rem 0 .3rem;color:#3a4160}
.sp-legend{font-size:.8rem;color:#8a8fa3;margin-left:.5rem}
.sp-legend i{display:inline-block;width:.7em;height:.7em;border-radius:3px;margin:0 .15em 0 .5em}
.sp-legend i.ok{background:#1d9e57}
.sp-legend i.miss{background:#d05252}
.sp-target{line-height:1.9;color:#3a4160;background:#fffdf8;border:1px solid rgba(217,123,43,.14);
  border-radius:14px;padding:.8rem 1rem}
.sp-w{padding:.05em .15em;border-radius:4px}
.sp-w.ok{background:rgba(29,158,87,.14)}
.sp-w.miss{background:rgba(208,82,82,.13);text-decoration:line-through;text-decoration-color:rgba(208,82,82,.6)}
.sp-note{margin:.5rem 0;font-size:.85rem;color:#a3762a}
.sp-sent{border-top:1px solid rgba(217,123,43,.14);padding:.8rem 0}
.sp-sent:first-child{border-top:none;padding-top:.2rem}
.sp-sent-top{display:flex;align-items:flex-start;gap:.7rem}
.sp-sent-text{flex:1;margin:0;line-height:1.7;color:#3a4160}
.sp-sent-num{display:inline-flex;align-items:center;justify-content:center;min-width:1.5em;height:1.5em;
  border-radius:50%;background:#f3ede0;color:#8a6d3b;font-size:.75rem;font-weight:800;margin-right:.45rem}
.sp-sent.sp-done .sp-sent-num{background:#2e7d32;color:#fff}
.sp-sent.sp-done .sp-sent-text{color:#6b7a5e}
.sp-continue{display:block;width:100%;margin:.6rem 0;padding:.75rem;border-radius:12px;
  border:1px solid rgba(46,125,50,.35);background:#eef6ee;color:#1b5e20;
  font-weight:800;font-size:.92rem;cursor:pointer;font-family:inherit}
.sp-continue:hover{background:#e2f0e2}
/* Shadowing progress report strip */
.sp-report{margin:.7rem 0;padding:.7rem .9rem;background:var(--mist);border-radius:12px}
.sp-report-top{display:flex;justify-content:space-between;align-items:center;font-size:.88rem;margin-bottom:.45rem}
.sp-pbar{height:8px;border-radius:99px;background:rgba(0,0,0,.08);overflow:hidden}
.sp-pfill{height:100%;border-radius:99px;background:linear-gradient(90deg,#66bb6a,#2e7d32);transition:width .4s}
/* Restored last-attempt detail under a shadowing sentence */
.sp-sent-detail{margin:.55rem 0;padding:.7rem .8rem;background:#faf7ef;border:1px dashed rgba(217,123,43,.4);border-radius:12px}
.sp-detail-title{font-size:.75rem;font-weight:800;color:#8a6d3b;margin-bottom:.35rem;text-transform:uppercase;letter-spacing:.04em}
/* Bookmarked words */
.save-word-btn{background:none;border:none;font-size:1.05rem;cursor:pointer;opacity:.32;padding:.25rem;line-height:1}
.save-word-btn.saved{opacity:1}
.save-word-btn:disabled{cursor:default}
.save-word-btn img{width:1.2em;height:1.2em;display:block}
.bm-ico{width:1.05em;height:1.05em;vertical-align:-.12em}
.saved-row{display:flex;justify-content:space-between;align-items:center;gap:.6rem;
  padding:.55rem 0;border-bottom:1px solid var(--line)}
.saved-row:last-child{border-bottom:none}
.saved-word{min-width:0}
.saved-actions{flex:none;display:flex;gap:.25rem;align-items:center}
.sp-btns{flex:none;display:flex;gap:.5rem}
.sp-play,.sp-mic{flex:none;width:46px;height:46px;border-radius:50%;border:none;padding:0;cursor:pointer;
  background:transparent;transition:transform .12s}
.sp-play img,.sp-mic img{width:100%;height:100%;display:block;border-radius:50%}
.sp-play:active,.sp-mic:active{transform:scale(.94)}
.sp-mic.recording{animation:sp-blink 1s infinite}
.sp-play:disabled,.sp-mic:disabled{opacity:.45;cursor:default}
.sp-play.speaking{box-shadow:0 0 0 3px rgba(242,109,13,.55)}
.sp-sent-live{display:flex;align-items:center;gap:.5rem;margin:.55rem 0 0;padding:.55rem .8rem;
  background:#fff8ec;border:1px dashed rgba(217,123,43,.4);border-radius:12px;color:#5a4a33;font-size:.9rem}
.sp-sent-live-text{flex:1}
.sp-sent-count{font-weight:800;font-variant-numeric:tabular-nums;color:#8a6d3b;flex:none}
.sp-sent-result{margin-top:.4rem}
.sp-hear{border:none;background:rgba(208,82,82,.13);border-radius:4px;padding:.05em .3em;margin:.05em;
  font:inherit;color:inherit;cursor:pointer;text-decoration:underline;text-decoration-style:dotted}
.sp-hear:active{transform:scale(.95)}

/* ==================== Admin panel (/adminpanel) — Phase 1 ==================== */
.ap-mode #app-header, .ap-mode #tabbar, .ap-mode #landing-header { display: none !important; }
.ap-wrap { display: flex; min-height: 100vh; background: #f4f1ea; }
.ap-side { width: 232px; flex: none; background: #1e2732; color: #e8e4d8; display: flex; flex-direction: column;
  padding: 1.3rem 1rem; position: sticky; top: 0; height: 100vh; }
.ap-brand { font-size: 1.15rem; font-weight: 800; margin-bottom: .3rem; }
.ap-who { font-size: .75rem; color: #9aa3b2; word-break: break-all; margin-bottom: 1.2rem; }
.ap-nav { display: flex; flex-direction: column; gap: .3rem; }
.ap-nav a { color: #c9cfda; text-decoration: none; padding: .6rem .8rem; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.ap-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ap-nav a.on { background: #d97b2b; color: #fff; }
.ap-foot { margin-top: auto; display: flex; flex-direction: column; gap: .6rem; }
.ap-logout { background: rgba(255,255,255,.08); color: #e8e4d8; border: none; border-radius: 10px;
  padding: .55rem; cursor: pointer; font-weight: 600; }
.ap-logout:hover { background: rgba(255,255,255,.16); }
.ap-note { font-size: .7rem; color: #6b7484; text-align: center; }
.ap-main { flex: 1; min-width: 0; padding: 1.6rem 1.8rem 3rem; }
.ap-head h1 { margin: 0 0 .2rem; font-size: 1.5rem; }
.ap-head .muted { margin: 0 0 1.1rem; }
.ap-back { display: inline-block; margin-bottom: .5rem; color: #4f8ef7; text-decoration: none; font-weight: 600; }
.ap-center { display: flex; justify-content: center; padding-top: 12vh; }
.ap-login { max-width: 380px; width: 100%; padding: 1.6rem; }
.ap-login h1 { margin-top: 0; font-size: 1.3rem; }
.ap-login label { display: block; margin: .8rem 0; font-size: .85rem; font-weight: 600; }
.ap-login input { display: block; width: 100%; margin-top: .3rem; padding: .6rem .7rem;
  border: 1px solid #ddd; border-radius: 10px; font-size: 1rem; }
.ap-err { color: #b3261e; font-size: .85rem; min-height: 1.2em; margin: .3rem 0; }
.ap-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.ap-kpi { background: #fff; border-radius: 14px; padding: .9rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ap-kpi-v { font-size: 1.6rem; font-weight: 800; }
.ap-kpi-l { font-size: .8rem; color: #6b6252; font-weight: 600; }
.ap-kpi-s { font-size: .75rem; color: #9a917f; }
.ap-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .9rem; margin-bottom: .9rem; }
.ap-cards .card h3, .ap-main > .card h3 { margin: 0 0 .6rem; font-size: 1rem; }
.ap-chart { width: 100%; height: auto; display: block; }
.ap-chart-cap { font-size: 11px; fill: #8a8272; font-weight: 700; }
.ap-tablewrap { overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ap-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: #8a8272; padding: .5rem .6rem; border-bottom: 2px solid #eee7d8; white-space: nowrap; }
.ap-table td { padding: .55rem .6rem; border-bottom: 1px solid #f0ead9; vertical-align: top; }
.ap-table tbody tr:hover { background: #faf7ef; }
.ap-table small.muted { font-size: .75rem; }
.ap-search { margin-bottom: .6rem; }
.ap-search input { width: 100%; max-width: 420px; padding: .6rem .8rem; border: 1px solid #ddd;
  border-radius: 10px; font-size: .95rem; }
.ap-kv { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0;
  border-bottom: 1px dashed #eee7d8; font-size: .9rem; }
.ap-kv span { color: #6b6252; }
.ap-levelset { display: block; margin-top: .8rem; font-size: .85rem; font-weight: 600; }
.ap-levelset select { margin-left: .5rem; padding: .45rem .6rem; border-radius: 8px; border: 1px solid #ddd; }
@media (max-width: 720px) {
  .ap-wrap { flex-direction: column; }
  .ap-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center;
    gap: .8rem; padding: .8rem 1rem; flex-wrap: wrap; }
  .ap-brand { margin: 0; font-size: 1rem; }
  .ap-who { display: none; }
  .ap-nav { flex-direction: row; flex-wrap: wrap; }
  .ap-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .ap-note { display: none; }
  .ap-main { padding: 1rem 1rem 3rem; }
}

/* ---------- choose-your-teacher offer (Persian, RTL) ---------- */
.tch-offer { max-width: 680px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.tch-offer .onb-title { text-align: center; }
.tch-offer-points { display: grid; gap: .5rem; margin: 1rem 0 1.2rem; }
.tch-offer-point { background: #fff; border: 1px solid #eee3d0; border-radius: 12px; padding: .7rem .9rem; font-size: .95rem; }
.tch-offer-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tch-offer-card { background: #fff; border: 1px solid #eee3d0; border-radius: 14px; padding: 1rem; text-align: center; display: flex; flex-direction: column; gap: .3rem; align-items: center; }
.tch-offer-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #f0e9d8; }
.tch-offer-initial { display: flex; align-items: center; justify-content: center; background: #d97b2b; color: #fff; font-size: 2rem; font-weight: 800; }
.tch-offer-name { font-size: 1.05rem; }
.tch-offer-card .muted { font-size: .82rem; }
.tch-offer-bio { font-size: .85rem; color: #5b6470; margin: .2rem 0; }
.tch-offer-pick { width: 100%; margin-top: .4rem; }
/* ---------- teacher public profile editor ---------- */
.tch-prof-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
/* ---------- admin teachers: public profile preview ---------- */
.apt-prof { display: flex; gap: 0.6rem; align-items: flex-start; }
.apt-prof-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: #eee7d8; }
.apt-prof-txt { font-size: 0.82rem; line-height: 1.5; min-width: 0; }
.tch-prof-photowrap { display: flex; flex-direction: column; align-items: center; }
.tch-prof-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #f0e9d8; }
.tch-prof-fields { flex: 1; min-width: 220px; display: grid; gap: .6rem; align-content: start; }
.tch-prof-fields label { display: grid; gap: .25rem; font-size: .85rem; font-weight: 600; }
.tch-prof-fields input, .tch-prof-fields textarea { padding: .5rem .6rem; border: 1px solid #ddd; border-radius: 8px; font: inherit; resize: vertical; }

/* ================= choose-teacher v2 — mobile design (2026-10-09) ================= */
.ct2-wrap { max-width: 480px; margin: 0 auto; padding: 0.9rem 1rem 2.5rem; }
.ct2-banner {
  display: flex; align-items: center; gap: 0.8rem;
  background: linear-gradient(135deg, #FFF3E2 0%, #FFE8CF 100%);
  border-radius: 24px; padding: 1.1rem 1.2rem; margin-bottom: 1rem;
  box-shadow: 0 8px 22px rgba(190,130,70,.12); overflow: hidden; position: relative;
}
.ct2-banner-txt { flex: 1; min-width: 0; }
.ct2-banner-txt h1 { font-size: 1.45rem; color: #1E2A4E; margin: 0 0 0.35rem; font-weight: 800; }
.ct2-banner-txt p { font-size: 0.85rem; color: #6B7280; margin: 0; line-height: 1.6; }
.ct2-mascot { width: 108px; height: 108px; object-fit: contain; flex: none; }
.ct2-card {
  display: flex; align-items: center; gap: 0.85rem; width: 100%;
  background: #fff; border: 2px solid transparent; border-radius: 20px;
  padding: 0.8rem 0.9rem; margin-bottom: 0.7rem; cursor: pointer; text-align: right;
  box-shadow: 0 6px 18px rgba(190,130,70,.10); font-family: inherit; color: inherit;
}
.ct2-card:active { transform: scale(0.99); }
.ct2-card.sel { border-color: #F9610D; background: #FFF8F0; }
.ct2-ava { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; flex: none; background: #F3EAD9; }
.ct2-initial {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF9A3D, #F9610D); color: #fff;
  font-size: 1.7rem; font-weight: 800;
}
.ct2-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.ct2-name { font-size: 1.05rem; color: #1E2A4E; font-weight: 800; }
.ct2-sub { font-size: 0.82rem; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct2-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: #6B7280; flex-wrap: wrap; }
.ct2-meta-bit { display: inline-flex; align-items: center; gap: 0.3rem; }
.ct2-ico { width: 18px; height: 18px; flex: none; }
.ct2-check {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  border: 2px solid #D8DCE6; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
}
.ct2-check.sel { background: #F9610D; border-color: #F9610D; }
.ct2-skipwrap { text-align: center; margin-top: 0.6rem; }
/* detail screen */
.ct2-topbar { margin-bottom: 0.2rem; }
.ct2-back {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; box-shadow: 0 4px 14px rgba(190,130,70,.16);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.ct2-back svg { width: 22px; height: 22px; }
.ct2-hero { position: relative; display: flex; justify-content: center; padding: 1.2rem 0 0.6rem; }
.ct2-blob {
  position: absolute; top: 0; width: 280px; height: 280px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,200,130,.5), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(255,170,100,.45), transparent 55%),
    radial-gradient(circle at 50% 50%, #FFE3C2 0%, rgba(255,227,194,0) 70%);
  pointer-events: none;
}
.ct2-photo { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; position: relative; box-shadow: 0 12px 32px rgba(190,130,70,.25); background: #F3EAD9; }
.ct2-photo.ct2-initial { font-size: 4rem; }
.ct2-hi {
  position: absolute; top: 2.4rem; inset-inline-end: calc(50% - 128px);
  background: #fff; border-radius: 16px 16px 16px 4px; padding: 0.35rem 0.7rem;
  font-weight: 800; font-size: 0.9rem; color: #1E2A4E;
  box-shadow: 0 6px 16px rgba(190,130,70,.20); z-index: 2;
}
.ct2-dname { text-align: center; font-size: 1.7rem; color: #1E2A4E; margin: 0.4rem 0 0.2rem; font-weight: 800; }
.ct2-dstudents { display: flex; align-items: center; justify-content: center; gap: 0.4rem; color: #6B7280; font-size: 0.92rem; }
.ct2-dstudents .ct2-ico { width: 20px; height: 20px; }
.ct2-dot { color: #C9CFDA; }
.ct2-bio { text-align: center; color: #6B7280; font-size: 0.9rem; max-width: 30rem; margin: 0.5rem auto 0; line-height: 1.7; }
.ct2-feats { display: flex; flex-direction: column; gap: 0.7rem; margin: 1.2rem 0 1.4rem; }
.ct2-feat {
  display: flex; align-items: center; gap: 0.8rem;
  background: #fff; border-radius: 18px; padding: 0.85rem 1rem;
  box-shadow: 0 6px 18px rgba(190,130,70,.10);
}
.ct2-feat-ico {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #FFE9D2, #FFD9AE);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.ct2-feat-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ct2-feat-txt b { color: #1E2A4E; font-size: 0.98rem; }
.ct2-feat-txt span { color: #6B7280; font-size: 0.82rem; }
.ct2-feat-ok {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: #22C55E; color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.ct2-select {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; border: none; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #FF9A3D 0%, #F9610D 100%); color: #fff;
  font-size: 1.15rem; font-weight: 800; padding: 1rem; border-radius: 999px;
  box-shadow: 0 10px 26px rgba(249,97,13,.40);
}
.ct2-select:active { transform: scale(0.98); }
.ct2-select:disabled { opacity: 0.6; }
.ct2-select svg { width: 22px; height: 22px; }

/* ============ Daily quests v2 (2026-10-09, supplied design) ============
   Palette: Navy #102A52 · Orange #FF7918 · Gold #FFB52E · Cream #FFF9F1
   Border #F2E5D2 · Muted #8D7B6E */
.hq-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #FFFEFB 0%, #FFF9F1 100%);
  border: 1px solid #F2E5D2; border-radius: 28px;
  padding: 20px 18px 16px; margin: 14px 0;
  box-shadow: 0 12px 32px rgba(178,132,52,.10);
}
.hq-card::before {
  content: ''; position: absolute; top: -70px; left: -40px;
  width: 280px; height: 170px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,181,46,.14), transparent 70%);
}
.hq-card::after {
  content: '\2726'; position: absolute; top: 16px; left: 30px;
  color: #FFC94D; font-size: 18px; opacity: .8; pointer-events: none;
}
.hq-hero {
  position: relative; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.hq-titles { display: flex; flex-direction: column; gap: 3px; }
.hq-card .hq-title { font-size: 22px; font-weight: 800; color: #102A52; }
.hq-sub { font-size: 13px; color: #8D7B6E; }
.hq-mega { font-size: 64px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(255,121,24,.25)); }
.hq-rows { position: relative; display: flex; flex-direction: column; gap: 12px; }
.hq-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #F2E5D2; border-radius: 22px;
  padding: 14px; box-shadow: 0 4px 14px rgba(178,132,52,.07);
}
.hq-ico {
  flex: 0 0 auto; width: 72px; height: 72px; border-radius: 20px;
  background: #FFF6E8; display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.hq-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hq-row .hq-title { font-size: 15px; font-weight: 700; color: #102A52; }
.hq-bar { display: block; height: 11px; border-radius: 99px; background: #F3EAD9; overflow: hidden; }
.hq-bar > span { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #FF9D2E, #FF6A18); transition: width .4s ease; }
.hq-prog { font-size: 12.5px; color: #8D7B6E; }
.hq-xp {
  flex: 0 0 auto; font-size: 14px; font-weight: 800; color: #B25E09;
  background: linear-gradient(180deg, #FFE9B8, #FFD97A);
  border: 1px solid #F5C86E; border-radius: 99px; padding: 10px 16px;
  box-shadow: 0 3px 8px rgba(255,181,46,.35), inset 0 1px 0 rgba(255,255,255,.6);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
button.hq-xp.is-claim {
  cursor: pointer; color: #fff; border: 0;
  background: linear-gradient(135deg, #FF9600, #F9610D);
  box-shadow: 0 4px 12px rgba(249,97,13,.4);
}
button.hq-xp.is-claim:active { transform: scale(.96); }
.hq-xp.is-claimed { background: #E9F9EF; border-color: #BDE8C9; box-shadow: none; padding: 10px 14px; }
.hq-body { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.hq-go { flex: 0 0 auto; font-size: 22px; font-weight: 800; color: #102A52; opacity: .5; }
.hq-body:active .hq-go { opacity: 1; }

/* ============ My Progress view (2026-10-09) ============ */
.pg-wrap { max-width: 640px; margin: 0 auto; padding: 4px 0 24px; }
.pg-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 6px;
}
.pg-stat {
  background: #fff; border: 1px solid #F1E8D8; border-radius: 16px;
  padding: 12px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 2px 8px rgba(23,33,43,.04);
}
.pg-ico { font-size: 22px; }
.pg-num { font-size: 20px; font-weight: 800; color: #17212B; font-variant-numeric: tabular-nums; }
.pg-lbl { font-size: 11.5px; color: #8A7B63; }
.pg-chart { display: flex; align-items: flex-end; gap: 6px; padding: 12px 4px 4px; min-height: 130px; }
.pg-bar { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.pg-fill { width: 70%; max-width: 34px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #FFB020, #F9610D); }
.pg-xp { font-size: 10.5px; font-weight: 700; color: #C47B12; min-height: 14px; font-variant-numeric: tabular-nums; }
.pg-d { font-size: 10.5px; color: #8A7B63; }
.pg-note { text-align: center; font-size: 14px; margin-top: 12px; }
.pg-note b { color: #F9610D; }

/* Home entry banner -> #/progress (v2 illustrated, 2026-10-09) */
.pg-link {
  position: relative; display: block; overflow: hidden;
  border: 1px solid #F2E5D2; border-radius: 24px;
  margin: 10px 0 4px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(178,132,52,.10);
  background: #FFF9F1; min-height: 128px;
}
.pg-link-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: left center;
}
.pg-link-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(255,249,241,0) 38%, rgba(255,249,241,.88) 66%, #FFF9F1 88%);
}
.pg-link-txt {
  position: absolute; top: 50%; right: 18px; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; max-width: 44%;
}
.pg-link-txt b { font-size: clamp(20px, 5.6vw, 26px); font-weight: 800; color: #102A52; }
.pg-link-txt span { font-size: clamp(11px, 3.2vw, 13px); color: #8D7B6E; line-height: 1.8; }

/* ============ CHALLENGE PAGE: floating dark header + tabbar (challenge only) ============ */
body.challenge-page #app-header {
  position: sticky; top: 0.6rem; z-index: 50;
  background: transparent; border: none; backdrop-filter: none;
  padding: 0 0.8rem;
}
body.challenge-page #app-header .header-inner {
  max-width: 560px; margin: 0 auto;
  background: linear-gradient(180deg, #101a3a, #0a1128);
  border: 1.5px solid rgba(60, 90, 200, 0.5);
  border-radius: 999px; padding: 0.5rem 0.6rem 0.5rem 1.1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
body.challenge-page #app-header .brand-name { color: #fff; font-family: inherit; font-weight: 800; font-size: 1.15rem; }
body.challenge-page #app-header .brand-mark { font-size: 1.5rem; filter: drop-shadow(0 0 8px rgba(60,150,255,.7)); }
body.challenge-page #app-header .inbox-btn { color: rgba(255,255,255,0.85); font-size: 1.3rem; }
body.challenge-page #app-header .profile-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb340, #f97316 65%, #ea580c);
  border: 2.5px solid #fbbf24;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.6), inset 0 2px 5px rgba(255,255,255,0.4);
}
body.challenge-page #app-header .profile-initial { color: #fff; font-weight: 900; font-size: 1.25rem; }
