/* =========================================================================
   Zenius student app. One stylesheet, mobile first.
   1 Tokens  2 Base  3 Sky background  4 Layout  5 Buttons  6 Fields
   7 Tags, subjects, Zen tile  8 Toast, banner, sheet, skeleton
   9 Login  10 Name  11 Ask  12 Lesson  13 My lessons  14 Settings
   15 Motion  16 Breakpoints (600 / 1024 / 1280)
   ========================================================================= */

/* 1 ---------------------------------------------------------------- tokens */
:root {
  /* ink */
  --ink: #0b0d12; --ink-2: #3b4250; --ink-3: #6b7280; --line: #e6eaf0; --line-2: #d4dbe5;
  /* surfaces */
  --surface: #ffffff; --surface-2: #f5f8fb; --sky-50: #f3faff; --sky-100: #e3f3ff; --sky-300: #8fd0ff; --sky-500: #3aa6ee;
  --bg-top: #ffffff; --bg-bottom: #d9efff;
  /* status */
  --ok: #15803d; --ok-soft: #e8f7ec; --warn: #b45309; --warn-soft: #fff3e0; --bad: #b91c1c; --bad-soft: #fdecec;
  /* board */
  --board: #1c3a2f; --board-2: #234536; --chalk: #f4f1e8; --chalk-dim: rgba(244, 241, 232, .72);
  --chalk-yellow: #f6e27a; --chalk-pink: #f4a6c0; --chalk-green: #9be3b0; --board-glass: rgba(10, 24, 18, .55);
  /* radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 28px; --r-pill: 999px;
  /* shadows (most elements have none) */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -8px rgba(15, 23, 42, .12);
  --sh-3: 0 2px 4px rgba(15, 23, 42, .06), 0 24px 48px -16px rgba(15, 23, 42, .22);
  /* type */
  --f-display: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, sans-serif;
  --f-ui: Inter, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-board: Kalam, "Noto Sans Devanagari", cursive;
  /* motion */
  --e-out: cubic-bezier(.2, .8, .2, 1); --t-press: 120ms; --t-view: 240ms; --t-sheet: 200ms;
  /* layout */
  --gutter: 16px; --kb: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --chalk-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* subject colours (exact keys = SUBJECTS); used only for tiles, dots, example bars and labels */
[data-subj="maths"] { --s-ink: #4338ca; --s-soft: #eef0ff; }
[data-subj="physics"] { --s-ink: #0369a1; --s-soft: #e6f4fd; }
[data-subj="chemistry"] { --s-ink: #be185d; --s-soft: #fdeef5; }
[data-subj="biology"] { --s-ink: #15803d; --s-soft: #e8f7ec; }
[data-subj="history"] { --s-ink: #b45309; --s-soft: #fff3e0; }
[data-subj="geography"] { --s-ink: #0f766e; --s-soft: #e3f6f3; }
[data-subj="political_science"] { --s-ink: #6d28d9; --s-soft: #f1ecff; }
[data-subj="sociology"] { --s-ink: #9333ea; --s-soft: #f6edff; }
[data-subj="economics"] { --s-ink: #047857; --s-soft: #e4f6ef; }
[data-subj="environmental_science"] { --s-ink: #4d7c0f; --s-soft: #f0f7e3; }
[data-subj="computer_science"] { --s-ink: #334155; --s-soft: #eef2f6; }
[data-subj="english"] { --s-ink: #1d4ed8; --s-soft: #eaf0ff; }
[data-subj="hindi"] { --s-ink: #c2410c; --s-soft: #fff0e6; }
[data-subj="general_knowledge"] { --s-ink: #a16207; --s-soft: #fdf6dc; }
[data-subj="other"] { --s-ink: #475569; --s-soft: #f1f5f9; }

/* 2 ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  color: var(--ink);
  font: 400 16px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, var(--bg-top) 0, #f2f9ff 38%, var(--bg-bottom) 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--noise); opacity: .035;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); border-radius: var(--r-sm); }
::selection { background: var(--sky-300); color: var(--ink); }

.display { font: 800 32px/1.05 var(--f-display); letter-spacing: -.035em; text-wrap: balance; }
.h1 { font: 800 26px/1.15 var(--f-display); letter-spacing: -.03em; text-wrap: balance; }
.label { font: 700 12px/1.3 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.lede { font-size: 17px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: var(--r-md); text-decoration: none; }
.skip:focus-visible { top: 16px; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; }
svg.lucide { width: 20px; height: 20px; flex: none; stroke-width: 2; }

/* 3 ------------------------------------------------------- sky background */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; border-radius: 50%; background: #fff; filter: blur(48px); opacity: .9; }
.cloud-a { width: 520px; height: 220px; top: -60px; right: -120px; }
.cloud-b { width: 620px; height: 260px; bottom: -80px; left: -200px; opacity: .7; }
body[data-view="lesson"] .sky { display: none; }

/* 4 ---------------------------------------------------------------- layout */
main { position: relative; z-index: 1; min-height: 100dvh; }
.view { min-height: 100dvh; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
body[data-view="boot"] main { opacity: 0; }

/* 5 --------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border: 0; border-radius: var(--r-pill);
  font: 600 16px/1.2 var(--f-ui); text-decoration: none; white-space: nowrap;
  transition: transform var(--t-press) var(--e-out), background-color 150ms, box-shadow 150ms, opacity 150ms;
  -webkit-user-select: none; user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: 1; cursor: progress; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #22262f; }
.btn-primary.is-done { background: var(--ok); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-outline { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-outline:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-compact { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-google { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); gap: 12px; }
.btn-google:hover { background: var(--surface-2); }
.btn-google .tag { margin-left: 4px; }
.btn-text {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; margin: 0 -10px;
  border: 0; background: none; border-radius: var(--r-pill); color: var(--ink);
  font: 600 15px/1 var(--f-ui); text-decoration: none; white-space: nowrap;
  transition: background-color 150ms, transform var(--t-press) var(--e-out);
}
.btn-text:hover { background: rgba(11, 13, 18, .05); }
.btn-text:active { transform: scale(.97); }
.btn-text .ic, .btn-text svg.lucide { width: 18px; height: 18px; }
.btn-link { border: 0; background: none; padding: 4px 0; color: var(--ink); font: 600 15px/1.3 var(--f-ui); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.btn-link:hover { text-decoration-color: var(--ink); }
.btn-danger-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--bad); font: 600 14px/1 var(--f-ui); text-decoration: none; }
.btn-danger-text svg.lucide { width: 16px; height: 16px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }

/* sticky primary action in the thumb zone (phone) */
.sticky-cta { position: sticky; bottom: var(--kb); z-index: 5; margin-top: 24px; padding: 12px 0 max(16px, var(--safe-b)); }

/* 6 ---------------------------------------------------------------- fields */
.field { display: grid; gap: 8px; }
.field-label { font: 600 14px/1.3 var(--f-ui); color: var(--ink); }
.field-help { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.field-help.center { text-align: center; }
.field-error { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--bad); }
.field-error svg.lucide { width: 16px; height: 16px; margin-top: 1px; }
.field-error .btn-text { margin-left: auto; font-size: 13px; min-height: 32px; }
.input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: #fff; font-size: 16px; line-height: 1.4;
  transition: border-color 150ms, box-shadow 150ms;
}
.input::placeholder { color: #9aa3b2; }
.input:hover { border-color: #b9c3d1; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(143, 208, 255, .45); }
.input:focus-visible { border-radius: var(--r-md); }
textarea.input { padding: 14px 16px; resize: none; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; transition: border-color 150ms, box-shadow 150ms; }
.input-group:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(143, 208, 255, .45); }
.input-group .input { border: 0; box-shadow: none; padding-left: 12px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.input-prefix { display: inline-flex; align-items: center; padding: 0 4px 0 16px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; border-right: 1px solid var(--line); margin: 12px 0; padding-right: 12px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap svg.lucide { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-3); }

/* segmented switch */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 44px; padding: 4px; margin-bottom: 20px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--r-pill); background: #fff; box-shadow: var(--sh-1), 0 0 0 1px rgba(15, 23, 42, .04); transition: transform 200ms var(--e-out); }
.seg[data-on="email"] .seg-thumb { transform: translateX(100%); }
.seg-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; border-radius: var(--r-pill); font: 600 15px/1 var(--f-ui); color: var(--ink-3); transition: color 150ms; }
.seg-btn[aria-selected="true"] { color: var(--ink); }
.seg-btn svg.lucide { width: 16px; height: 16px; }

/* one OTP input drawn as six cells */
.otp { position: relative; width: max-content; max-width: 100%; }
.otp-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; z-index: 2; cursor: text; caret-color: transparent; }
.otp-cells { display: grid; grid-template-columns: repeat(6, 48px); gap: 8px; }
.otp-cells span { height: 56px; display: grid; place-items: center; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line-2); font: 700 24px/1 var(--f-display); font-variant-numeric: tabular-nums; transition: border-color 120ms, box-shadow 120ms, transform 120ms; }
.otp-cells span.is-filled { border-color: #b9c3d1; }
.otp-cells span.is-active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--sky-300); }
.otp-cells span.is-active:empty::after { content: ""; width: 2px; height: 24px; background: var(--ink); animation: caret 1s steps(1) infinite; }

/* 7 ------------------------------------------------- tags, subjects, Zen */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font: 600 12px/1 var(--f-ui); white-space: nowrap; flex: none; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-neutral { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.tag-sky { background: var(--sky-100); color: #0b5a8c; height: 22px; font-size: 11px; }
.subj-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--r-md); background: var(--s-soft); color: var(--s-ink); }
.subj-tile svg.lucide { width: 20px; height: 20px; }
.subj-tile-48 { width: 48px; height: 48px; }
.subj-tile-48 svg.lucide { width: 22px; height: 22px; }
.subj-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--s-ink, var(--ink-3)); flex: none; }
.subj-word { color: var(--s-ink); font-weight: 600; }
.zen-tile { display: block; overflow: hidden; border-radius: var(--r-xl); background: var(--sky-100); flex: none; }
.zen-tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.zen-96 { width: 96px; height: 120px; }
.zen-72 { width: 72px; height: 90px; border-radius: var(--r-lg); }
.zen-56 { width: 56px; height: 70px; border-radius: var(--r-lg); }

/* 8 ----------------------------------------- toast, banner, sheet, skeleton */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 90;
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 440px);
  padding: 12px 18px; border-radius: var(--r-pill); background: var(--ink); color: #fff;
  font: 500 15px/1.35 var(--f-ui); box-shadow: var(--sh-3);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity 200ms, transform 240ms var(--e-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast svg.lucide { width: 18px; height: 18px; color: var(--sky-300); }
.banner-offline { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; background: var(--warn-soft); color: var(--warn); font: 600 14px/1.3 var(--f-ui); border-bottom: 1px solid #f6dfbd; }
.banner-offline svg.lucide { width: 16px; height: 16px; }

.sheet { padding: 0; margin: 0; border: 0; max-width: none; max-height: none; width: 100%; background: transparent; color: var(--ink); }
.sheet::backdrop { background: rgba(11, 13, 18, .4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--t-sheet); }
.sheet.is-in::backdrop { opacity: 1; }
.sheet[open] { position: fixed; inset: auto 0 0 0; display: block; overflow: visible; }
.sheet-inner {
  position: relative; max-height: 88svh; overflow: auto; overscroll-behavior: contain;
  padding: 8px 20px max(20px, var(--safe-b)); background: #fff;
  border-radius: var(--r-2xl) var(--r-2xl) 0 0; box-shadow: var(--sh-3);
  transform: translateY(100%); transition: transform var(--t-sheet) var(--e-out);
}
.sheet.is-in .sheet-inner { transform: none; }
.sheet-grab { display: block; width: 40px; height: 4px; margin: 4px auto 8px; border-radius: 4px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 16px; }
.sheet-title { font: 800 22px/1.2 var(--f-display); letter-spacing: -.02em; }
.sheet-photo { width: 100%; border-radius: var(--r-lg); }
.benefits { display: grid; gap: 12px; margin-bottom: 24px; }
.benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.benefits svg.lucide { color: var(--ok); margin-top: 2px; }
.sheet-cta { display: grid; gap: 10px; }
.sheet-cta .field-help { margin: -2px 0 8px; }
.sheet-cta .btn-text { justify-self: center; margin: 4px 0 0; }
.note-block { margin-top: 16px; }
.note-wrap { margin-top: 8px; }
.sheet-note { min-height: 72px; }
.sheet-foot { display: flex; gap: 8px; align-items: flex-start; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.sheet-foot svg.lucide { width: 16px; height: 16px; margin-top: 1px; }
.sheet-warn { display: flex; gap: 8px; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.good-news { display: flex; gap: 12px; align-items: flex-start; padding: 16px; margin-bottom: 20px; border-radius: var(--r-lg); background: var(--ok-soft); color: #0f5b2c; font-size: 16px; line-height: 1.45; }
.good-news svg.lucide { color: var(--ok); margin-top: 2px; }
.good-news-neutral { background: var(--sky-50); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--sky-100); }
.good-news-neutral svg.lucide { color: var(--sky-500); }

.skeleton { position: relative; overflow: hidden; display: block; background: var(--surface-2); border-radius: var(--r-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); animation: shimmer 1.4s infinite; }
.skel-spot { height: 120px; border-radius: var(--r-xl); margin-bottom: 24px; }
.skel-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.skel-tile { width: 40px; height: 40px; border-radius: var(--r-md); }
.skel-tile48 { width: 48px; height: 48px; border-radius: var(--r-md); flex: none; }
.skel-lines { flex: 1; display: grid; gap: 8px; }
.skel-line { height: 12px; width: 100%; }
.skel-short { width: 45%; }
.skel-stat { height: 40px; width: 60%; margin-top: 12px; }

/* 9 ----------------------------------------------------------------- login */
/* One centred card on every screen size (founder reference): Zen, welcome, Google, "or", Phone | Email, CTA. */
.login { min-height: 100dvh; }
.login-col { position: relative; display: flex; flex-direction: column; min-height: 100dvh; padding: 0 var(--gutter); }
.login-banner { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 8px 96px 8px 0; }
.login-banner-zen { width: 56px; height: 56px; border-radius: var(--r-lg); object-fit: cover; object-position: 50% 15%; background: var(--sky-100); flex: none; }
.login-banner p { font-size: 14px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lang-pill { position: absolute; top: 18px; right: var(--gutter); z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .85); font: 600 14px/1 var(--f-ui); transition: background-color 150ms, transform var(--t-press) var(--e-out); }
.lang-pill:hover { background: #fff; }
.lang-pill:active { transform: scale(.97); }
.lang-pill svg.lucide { width: 16px; height: 16px; }
.login-step { flex: 1; display: flex; flex-direction: column; padding-top: 16px; animation: fade-up var(--t-view) var(--e-out) both; }
.login-step .display { margin-bottom: 12px; }
.login-step .lede { margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; flex: 1; }
.login-step > .login-form .sticky-cta, .name-card .sticky-cta { margin-top: auto; }
.google-slot { min-height: 52px; }
.google-slot:empty { display: none; }
.gis-host { min-height: 44px; display: flex; justify-content: center; }
.g-mark { flex: none; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-3); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.consent { margin: 4px 0 16px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.consent a { color: var(--ink-2); text-underline-offset: 2px; }
.btn-back { align-self: flex-start; margin-bottom: 16px; }
.sent-to { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dev-strip { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 10px 14px; border-radius: var(--r-md); background: var(--sky-100); color: #0b5a8c; font: 600 14px/1.35 var(--f-ui); }
.dev-strip svg.lucide { width: 16px; height: 16px; }
.resend { min-height: 44px; display: flex; align-items: center; margin-top: 8px; color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.resend .btn-text { margin-left: -10px; font-size: 14px; }
.code-hint { margin-top: 4px; }
.login-art { display: none; }
.art-card { position: relative; height: 100%; border-radius: var(--r-2xl); overflow: hidden; box-shadow: var(--sh-2); background: linear-gradient(160deg, #f6fbff 0%, #dff1ff 55%, #c9e8ff 100%); }
.art-picture, .art-picture img { display: block; width: 100%; height: 100%; }
.art-picture img { object-fit: cover; object-position: 30% 50%; }
.art-placeholder { position: absolute; inset: 0; }
.art-placeholder::before { content: ""; position: absolute; inset: 0; background-image: var(--noise); opacity: .05; }
.art-placeholder::after { content: ""; position: absolute; width: 70%; height: 40%; right: -10%; bottom: 8%; border-radius: 50%; background: #fff; filter: blur(60px); opacity: .8; }
.art-zen { position: absolute; left: 9%; bottom: 9%; z-index: 1; width: 340px; max-width: 46%; height: auto; aspect-ratio: 640 / 790; object-fit: cover; object-position: 50% 20%; border: 8px solid #fff; border-radius: var(--r-2xl); background: var(--sky-100); box-shadow: var(--sh-3); transform: rotate(-3deg); }
.art-bubble { position: absolute; z-index: 2; top: 14%; right: 9%; max-width: 330px; padding: 20px 22px; border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 6px; background: #fff; box-shadow: var(--sh-2); font: 700 22px/1.3 var(--f-display); letter-spacing: -.015em; color: var(--ink); }
.art-chalk { position: absolute; z-index: 2; top: calc(14% + 148px); right: 9%; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: var(--r-lg); background: var(--board); color: var(--chalk); font: 400 20px/1 var(--f-board); box-shadow: var(--sh-2), inset 0 0 0 2px rgba(255, 255, 255, .06); overflow: hidden; transform: rotate(-2deg); }
.art-chalk::before { content: ""; position: absolute; inset: 0; background-image: var(--chalk-grain); opacity: .06; }
.art-chalk .art-arrow { color: var(--chalk-dim); }
.art-chalk .art-ans { color: var(--chalk-yellow); font-weight: 700; }

/* 10 ------------------------------------------------------------------ name */
.view-name { display: flex; }
.name-card { flex: 1; display: flex; flex-direction: column; padding: 24px var(--gutter) 0; }
.zen-intro { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 28px; }
.bubble { position: relative; margin-bottom: 18px; padding: 12px 16px; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px; background: #fff; box-shadow: var(--sh-2); font: 600 15px/1.4 var(--f-ui); }
.name-card .h1 { margin-bottom: 24px; }

/* 11 ------------------------------------------------------------------- ask */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.topnav { display: flex; gap: 12px; }
.ask { padding-bottom: 48px; }
.ask-notices { display: grid; gap: 12px; }
.ask-notices:not(:empty) { margin-bottom: 20px; }
.notice { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.notice > svg.lucide { margin-top: 2px; color: var(--ink-3); }
.notice-quiet { color: var(--ink-2); }
.notice-card { padding: 14px 16px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .9); border: 1px solid var(--line); }
.notice-body { flex: 1; min-width: 0; }
.notice-title { font-weight: 600; }
.notice-text { color: var(--ink-3); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.notice-thumb { width: 52px; height: 52px; border-radius: var(--r-md); object-fit: cover; flex: none; background: var(--surface-2); }
.notice-thumb-text { display: grid; place-items: center; color: var(--ink-3); }

.greet { display: flex; align-items: center; gap: 16px; margin: 4px 0 24px; }
.zen-greet { position: relative; flex: none; }
.zen-greet .zen-tile { width: 88px; height: 104px; }
.zen-greet::after { content: "Zen"; position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .9); font: 700 11px/1.5 var(--f-ui); letter-spacing: .02em; }
.zen-greet.is-react .zen-tile { animation: nod 600ms var(--e-out); }
.zen-say { position: absolute; z-index: 4; left: calc(100% - 12px); top: -10px; width: max-content; max-width: 220px; padding: 10px 14px; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px; background: var(--ink); color: #fff; font: 600 14px/1.35 var(--f-ui); box-shadow: var(--sh-2); }
.zen-say.is-in { animation: pop 240ms var(--e-out) both; }
.greet-text { min-width: 0; }
.greet-line { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 600 14px/1.3 var(--f-ui); color: var(--ink-2); }
.greet-line svg.lucide { width: 16px; height: 16px; color: var(--sky-500); }
.late-bubble { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--sky-100); color: #0b5a8c; font: 600 13px/1.35 var(--f-ui); }

.boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.box {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 124px; padding: 14px 8px; border: 0; border-radius: var(--r-xl); background: #fff; box-shadow: var(--sh-2);
  text-align: center; transition: transform var(--t-press) var(--e-out), box-shadow 200ms var(--e-out);
}
.box::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(227, 243, 255, .5), rgba(255, 255, 255, 0) 45%); pointer-events: none; }
.box:active { transform: scale(.97); }
.box-disc { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sky-100); color: var(--ink); transition: background-color 200ms; }
.box-disc svg.lucide { width: 22px; height: 22px; }
.box-txt { position: relative; display: grid; gap: 2px; }
.box-label { font: 600 15px/1.25 var(--f-ui); }
.box-sub { font-size: 12px; line-height: 1.3; color: var(--ink-3); }
.box.is-active { box-shadow: inset 0 0 0 2px var(--ink), var(--sh-2); }
.box.is-listening { box-shadow: inset 0 0 0 2px var(--ink), var(--sh-2); }
.box.is-listening .box-disc { background: var(--sky-300); animation: pulse 1.2s ease-in-out infinite; }
.box.is-drop { box-shadow: var(--sh-2); outline: 2px dashed var(--ink); outline-offset: -6px; }
.ask-msg { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .85); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.ask-msg svg.lucide { width: 18px; height: 18px; color: var(--ink-3); margin-top: 1px; }

.type-area { margin-top: 12px; padding: 8px; border-radius: var(--r-xl); background: #fff; box-shadow: var(--sh-2); animation: fade-up var(--t-view) var(--e-out) both; }
.type-input { display: block; width: 100%; min-height: 76px; padding: 12px 12px 4px; border: 0; resize: none; background: transparent; font: 400 16px/24px var(--f-ui); }
.type-input::placeholder { color: #9aa3b2; }
.type-input:focus-visible { box-shadow: none; }
.type-cta { display: flex; justify-content: flex-end; padding: 4px; }
.type-cta .btn { min-width: 132px; }
/* phone: while typing, Explain rides above the keyboard in the thumb zone */
@media (max-width: 1023px) {
  body.is-typing .type-cta { position: fixed; z-index: 30; left: var(--gutter); right: var(--gutter); bottom: calc(12px + var(--kb) + var(--safe-b)); padding: 0; }
  body.is-typing .type-cta .btn { width: 100%; box-shadow: var(--sh-3); }
  body.is-typing .type-area { padding-bottom: 12px; }
}

.ask-rail { margin-top: 32px; }
.ask-rail > * + * { margin-top: 24px; }
.spot { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; padding: 16px; border-radius: var(--r-xl); background: #fff; box-shadow: var(--sh-2); text-decoration: none; overflow: hidden; transition: transform var(--t-press) var(--e-out), box-shadow 200ms; animation: fade-up var(--t-view) var(--e-out) both; }
.spot:active { transform: scale(.98); }
.spot-body { display: grid; gap: 3px; min-width: 0; }
.spot-head { font: 600 14px/1.3 var(--f-ui); color: var(--ink-2); }
.spot-title { font: 700 18px/1.25 var(--f-display); letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.spot-cta { grid-column: 2; justify-self: start; pointer-events: none; }
.spot-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sky-100); }
.spot-bar i { display: block; height: 100%; background: var(--sky-300); border-radius: 0 3px 3px 0; }
.board-mini { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; width: 72px; height: 56px; padding: 6px 8px; border-radius: var(--r-md); background: var(--board); color: var(--chalk); overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .05); }
.board-mini::before { content: ""; position: absolute; inset: 0; background-image: var(--chalk-grain); opacity: .07; }
.board-mini-q { font: 700 11px/1 var(--f-board); color: var(--chalk-pink); }
.board-mini-t { font: 400 12px/1.15 var(--f-board); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-stamp { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; }
.spot-ok .spot-stamp { background: var(--ok-soft); color: var(--ok); }
.spot-bad .spot-stamp { background: var(--bad-soft); color: var(--bad); }
.spot-warn .spot-stamp { background: var(--warn-soft); color: var(--warn); }
.spot-stamp svg.lucide { width: 24px; height: 24px; }
.recent .label { margin-bottom: 4px; }
.recent-list li + li { border-top: 1px solid var(--line); }
.recent-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 4px; margin: 0 -4px; border-radius: var(--r-md); text-decoration: none; transition: background-color 150ms; }
.recent-row:hover { background: rgba(255, 255, 255, .7); }
.recent-list li:nth-child(n+4) { display: none; }
.rr-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rr-title { font: 600 15px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-meta { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.see-all { margin-top: 4px; font-size: 14px; }
.proof { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.proof svg.lucide { width: 16px; height: 16px; color: var(--ok); }
.examples .label { margin-bottom: 12px; }
.ex-list { display: grid; gap: 10px; }
.ex-list li.ex-more { display: none; }
.ex-card {
  position: relative; display: grid; gap: 4px; width: 100%; padding: 14px 44px 14px 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; text-align: left; overflow: hidden; transition: transform var(--t-press) var(--e-out), border-color 150ms, box-shadow 200ms;
}
.ex-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s-ink); }
.ex-card:hover { border-color: var(--line-2); box-shadow: var(--sh-1); }
.ex-card:active, .ex-card.is-pressed { transform: scale(.98); }
.ex-label { font: 700 12px/1.3 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--s-ink); }
.ex-q { font-size: 15px; line-height: 1.4; color: var(--ink); }
.ex-card .ex-go { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; color: var(--ink-3); transform: translate(-4px, -50%); opacity: 0; transition: opacity 150ms, transform 200ms var(--e-out); }
.ex-card:hover .ex-go, .ex-card:focus-visible .ex-go { opacity: 1; transform: translate(0, -50%); }

/* 12 ---------------------------------------------------------------- lesson */
body[data-view="lesson"] { background: #eef4f8; }
.lesson { display: flex; flex-direction: column; min-height: 100dvh; }
.lesson-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; background: rgba(238, 244, 248, .92); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
.lesson-head .btn-back { margin: 0; padding: 0 8px; flex: none; }
.lh-title { flex: 1; min-width: 0; }
.lh-h { display: flex; align-items: center; gap: 8px; font: 700 16px/1.25 var(--f-display); letter-spacing: -.01em; min-width: 0; }
.lh-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-sub { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lh-sub .subj-dot { display: none; }
.lh-lessons { display: none; }
.lbl-long { display: none; }
#finishBtn { flex: none; }
.view-lesson.is-busy #finishBtn, .view-lesson.is-busy .lh-lessons, .view-lesson.is-busy .zp-lessons { visibility: hidden; }
.view-lesson.is-busy #finishBtn { display: none; }

.lesson-body { display: flex; flex-direction: column; flex: 1; }
.stage { position: relative; height: max(58svh, 340px); background: var(--board); overflow: hidden; color: var(--chalk); isolation: isolate; }
.board { position: absolute; inset: 0; }
.board::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: var(--chalk-grain); opacity: .06; }
.board::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .05), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(255, 255, 255, .03), transparent 50%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), inset 0 0 80px rgba(0, 0, 0, .25); }
.board-scroll { position: relative; z-index: 1; height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(244, 241, 232, .25) transparent; }
.board-col { max-width: 860px; margin: 0 auto; padding: 56px 16px 156px; font: 400 20px/1.45 var(--f-board); }
/* keep the first lines clear of the Zen tile, then use the full width */
.board-col::before { content: ""; float: right; width: 92px; height: 73px; }
.board :focus-visible { box-shadow: 0 0 0 3px var(--board), 0 0 0 5px var(--chalk); }

.b-problem { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; margin-bottom: 24px; }
.b-q { font-weight: 700; color: var(--chalk-pink); }
.b-qtext { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.b-thumb-btn { padding: 0; border: 0; background: none; border-radius: var(--r-md); }
.b-thumb { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; border: 2px solid rgba(244, 241, 232, .3); background: rgba(255, 255, 255, .08); }
.b-took { flex-basis: 100%; font: 400 15px/1.45 var(--f-ui); color: var(--chalk-dim); }
.b-link { padding: 0; border: 0; background: none; color: var(--chalk); font: 600 15px/1.45 var(--f-ui); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(244, 241, 232, .4); }
.chalk-skel { display: grid; gap: 14px; width: 100%; }
.chalk-skel span { height: 16px; border-radius: 8px; background: rgba(244, 241, 232, .12); animation: chalk-pulse 1.4s ease-in-out infinite; }
.chalk-skel .short { width: 55%; }

.think-lines { display: grid; gap: 14px; }
.think-lines li { display: flex; align-items: center; gap: 12px; color: var(--chalk-dim); animation: write-on 900ms steps(18) both; }
.think-lines li.is-now { color: var(--chalk); }
.think-lines li.is-done { color: var(--chalk-dim); }
.think-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chalk-dim); flex: none; }
.think-lines li.is-now .think-dot { background: var(--chalk-yellow); animation: chalk-pulse 1s ease-in-out infinite; }
.think-lines li.is-done .think-dot { background: var(--chalk-green); }

.b-fail { display: grid; gap: 16px; }
.b-chalk-line { font: 400 22px/1.45 var(--f-board); }
.b-tips { display: grid; gap: 10px; }
.b-tips li { display: flex; align-items: center; gap: 12px; color: var(--chalk); }
.b-tips svg.lucide { color: var(--chalk-yellow); }
.b-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn-chalk { background: var(--chalk); color: var(--board); }
.btn-chalk-ghost { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1px rgba(244, 241, 232, .45); }

.b-steps { display: grid; gap: 22px; counter-reset: none; }
.b-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; transition: opacity 300ms; }
.b-step.is-done { opacity: .78; }
.b-step.is-upcoming { opacity: .45; }
.b-step.is-active { opacity: 1; }
.b-num { font-weight: 700; color: var(--chalk-pink); line-height: 1.45; }
.b-step-body { min-width: 0; }
.b-write { display: grid; gap: 8px; }
.b-write.is-writing { animation: write-on 1.2s steps(24) both; }
.b-text { overflow-wrap: anywhere; }
.b-latex { color: var(--chalk-yellow); font-size: 1.05em; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.b-latex .katex-display { margin: 0; text-align: left; }
.b-latex .katex-display > .katex { text-align: left; }
.b-visual { margin: 6px 0 0; padding: 12px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .03); border: 1px dashed rgba(244, 241, 232, .22); }
.b-visual:empty { display: none; }
.b-visual svg { width: 100%; max-width: 560px; height: auto; max-height: 360px; margin: 0 auto; }
.b-visual .bsvg, .b-visual .bsvg * { stroke-linecap: round; }
.mermaid-out svg { max-width: 100%; max-height: 420px; }
.smiles svg { max-height: 240px; margin: 0 auto; }
.vcap { margin-top: 8px; font: 400 14px/1.4 var(--f-ui); color: var(--chalk-dim); text-align: center; }
.vfail { font: 400 18px/1.45 var(--f-board); color: var(--chalk-dim); }
.btable-wrap { overflow-x: auto; }
.btable { width: 100%; border-collapse: collapse; font: 400 17px/1.35 var(--f-board); }
.btable th, .btable td { padding: 8px 10px; border-bottom: 1px solid rgba(244, 241, 232, .22); text-align: left; vertical-align: top; }
.btable th { color: var(--chalk-yellow); font-weight: 700; }
.b-say { display: none; margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--sky-300); font: 400 15px/1.5 var(--f-ui); color: var(--chalk-dim); }
.b-step.is-active .b-say { display: block; animation: fade-in 300ms both 400ms; }
.raw-tex { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }

.b-answer { position: relative; margin-top: 28px; padding: 16px 18px; border: 2px solid var(--chalk-yellow); border-radius: var(--r-lg); }
.b-answer.is-writing { animation: write-on 1.2s steps(24) both; }
.b-ans-label { font: 400 15px/1 var(--f-ui); color: var(--chalk-dim); margin-bottom: 8px; }
.b-ans { font: 700 26px/1.3 var(--f-board); overflow-wrap: anywhere; }
.b-ans.is-struck { opacity: .55; text-decoration: line-through; text-decoration-color: var(--chalk-pink); text-decoration-thickness: 3px; }
.b-ans-new { margin-top: 8px; color: var(--chalk-yellow); }
.b-stamp { position: absolute; top: -18px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid var(--chalk-green); border-radius: var(--r-md); background: var(--board); color: var(--chalk-green); font: 700 16px/1 var(--f-board); transform: rotate(-6deg); }
.b-stamp svg.lucide { width: 18px; height: 18px; }
.b-stamp.is-in { animation: stamp 300ms var(--e-out) both; }
.b-done { display: flex; align-items: center; gap: 12px; margin-top: 18px; font: 700 24px/1.3 var(--f-board); color: var(--chalk); }
.chalk-tick { width: 40px; height: 40px; flex: none; }
.chalk-tick path { fill: none; stroke: var(--chalk-green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 400ms var(--e-out) forwards 300ms; }
.chalk-tick.is-static path { animation: none; stroke-dashoffset: 0; }
.b-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); font: 400 15px/1.5 var(--f-ui); }
.b-note svg.lucide { width: 18px; height: 18px; margin-top: 2px; }
.b-note-warn { background: rgba(255, 243, 224, .1); color: #ffe2b5; box-shadow: inset 0 0 0 1px rgba(255, 226, 181, .3); }
.b-note-ok { background: rgba(155, 227, 176, .1); color: var(--chalk-green); box-shadow: inset 0 0 0 1px rgba(155, 227, 176, .3); }
.b-note-bad { background: rgba(244, 166, 192, .1); color: var(--chalk); box-shadow: inset 0 0 0 1px rgba(244, 166, 192, .35); }
.b-extra-group { margin-top: 28px; }
.b-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font: 400 16px/1.4 var(--f-ui); color: var(--chalk-dim); }
.b-divider::before, .b-divider::after { content: ""; flex: 1; height: 0; border-top: 2px dashed rgba(244, 241, 232, .25); }
.b-divider span { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-steps-extra .b-num { color: var(--sky-300); }
.b-source { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; font: 400 14px/1.5 var(--f-ui); color: var(--chalk-dim); }
.b-source svg.lucide { width: 16px; height: 16px; margin-top: 3px; }
.b-source-note { margin-top: 2px; }
.b-sample { margin-top: 20px; font: 400 13px/1.4 var(--f-ui); color: rgba(244, 241, 232, .5); }

/* LIVE pill, PiP */
.live-pill { position: absolute; z-index: 3; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .95); color: var(--ink); font: 600 11px/1 var(--f-ui); letter-spacing: .06em; font-variant-numeric: tabular-nums; box-shadow: var(--sh-1); }
.live-pill .rec { width: 8px; height: 8px; border-radius: 50%; background: #e11d48; animation: rec 1.6s ease-in-out infinite; }
.live-pill.is-saved .rec { display: none; }
.live-timer { color: var(--ink-3); letter-spacing: 0; }
.pip { position: absolute; z-index: 3; top: 12px; right: 12px; width: 84px; height: 105px; border-radius: var(--r-lg); overflow: hidden; background: var(--sky-100); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .16); transition: box-shadow 200ms; }
.pip img, .pip video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transform-origin: 50% 80%; }
.pip video, .pip audio { display: none; }
.pip.is-simli video { display: block; position: absolute; inset: 0; }
.pip.is-speaking { box-shadow: 0 0 0 3px var(--sky-300), 0 0 32px 4px rgba(143, 208, 255, .45); }
.pip-name { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(11, 13, 18, .7); color: #fff; font: 700 11px/1.5 var(--f-ui); }

/* player on the board */
.player { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: var(--r-lg); background: var(--board-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.pl-main { display: flex; align-items: center; gap: 12px; }
.pl-play { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #fff; flex: none; }
.pl-disc { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink); transition: transform var(--t-press) var(--e-out); }
.pl-play:active .pl-disc { transform: scale(.94); }
.pl-play.is-pulse .pl-disc { animation: play-pulse 1s var(--e-out) 2; }
.pl-disc svg.lucide { width: 22px; height: 22px; fill: currentColor; }
.pl-lbl { font: 600 12px/1 var(--f-ui); }
.pl-play:focus-visible { box-shadow: none; }
.pl-play:focus-visible .pl-disc { box-shadow: 0 0 0 3px var(--board), 0 0 0 5px var(--chalk); }
.pl-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pl-status { font: 600 15px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sub { font: 400 13px/1.3 var(--f-ui); color: rgba(255, 255, 255, .7); }
.pl-meta { font: 600 11px/1 var(--f-ui); color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.pl-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--sky-300); transition: width 400ms var(--e-out); }
.pl-chip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); color: #fff; font: 600 13px/1 var(--f-ui); flex: none; transition: background-color 150ms, transform var(--t-press) var(--e-out); }
.pl-chip:hover { background: rgba(255, 255, 255, .2); }
.pl-chip:active { transform: scale(.97); }
.pl-chip svg.lucide { width: 16px; height: 16px; }
.pl-chip span { display: none; }
.pl-alt { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.pl-alt .btn { flex: none; min-height: 48px; }
.pl-think { display: flex; gap: 5px; padding: 0 6px; }
.pl-think i { width: 8px; height: 8px; border-radius: 50%; background: var(--chalk); animation: dots 1.2s ease-in-out infinite; }
.pl-think i:nth-child(2) { animation-delay: .15s; }
.pl-think i:nth-child(3) { animation-delay: .3s; }
.btn-solution { width: 100%; min-height: 52px; }

/* Zen panel */
.zpanel { display: flex; flex-direction: column; gap: 12px; padding: 16px var(--gutter) max(24px, var(--safe-b)); background: #fff; }
.zp-head, .zp-chatwrap { display: none; }
.zp-head .label { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.zp-h { font: 600 17px/1.3 var(--f-ui); margin-top: 4px; }
.zp-tag { position: absolute; top: 16px; right: 16px; }
.zp-chatwrap { position: relative; flex: 1; min-height: 0; }
.zp-chat { height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.chip-new { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--ink); color: #fff; font: 600 13px/1 var(--f-ui); box-shadow: var(--sh-2); }
.chip-new svg.lucide { width: 16px; height: 16px; }
.cm { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.cm.is-new { animation: fade-up 240ms var(--e-out) both; }
.cm-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: var(--sky-100); flex: none; }
.cm-b { padding: 10px 12px; border-radius: var(--r-lg); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.cm-zen .cm-b { background: var(--surface-2); border-bottom-left-radius: 4px; color: var(--ink-2); }
.cm-me { justify-content: flex-end; }
.cm-me .cm-b { display: flex; gap: 10px; align-items: flex-start; max-width: 88%; background: var(--sky-100); border-bottom-right-radius: 4px; color: var(--ink); }
.cm-thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.cm-teacher .cm-b { position: relative; width: 100%; padding-left: 16px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.cm-teacher .cm-b::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--warn); }
.cm-tone-ok .cm-b::before { background: var(--ok); }
.cm-tone-bad .cm-b::before { background: var(--bad); }
.cm-t-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.cm-t-head svg.lucide { width: 16px; height: 16px; }
.cm-typing { display: flex; gap: 4px; padding: 14px; }
.cm-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: dots 1.2s ease-in-out infinite; }
.cm-typing i:nth-child(2) { animation-delay: .15s; }
.cm-typing i:nth-child(3) { animation-delay: .3s; }

.zp-cards { display: grid; gap: 12px; }
.zp-cards:empty { display: none; }
.t-card { position: relative; padding: 14px 16px 14px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; overflow: hidden; animation: fade-up var(--t-view) var(--e-out) both; }
.t-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-2); }
.t-warn::before { background: var(--warn); }
.t-ok::before { background: var(--ok); }
.t-bad::before { background: var(--bad); }
.t-neutral::before { background: var(--sky-300); }
.t-offer { border-color: var(--ink); }
.t-offer::before { background: var(--ink); }
.t-head { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1.35; }
.t-head svg.lucide { width: 18px; height: 18px; }
.t-head .t-tag { margin-left: auto; }
.t-warn .t-head svg.lucide { color: var(--warn); }
.t-ok .t-head svg.lucide { color: var(--ok); }
.t-bad .t-head svg.lucide { color: var(--bad); }
.t-sub { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.t-body { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.t-note { display: inline-block; margin-top: 4px; color: var(--ink); }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.done-card { padding: 16px; border-radius: var(--r-lg); background: var(--sky-50); box-shadow: inset 0 0 0 1px var(--sky-100); animation: fade-up var(--t-view) var(--e-out) both; }
.done-line { font: 700 17px/1.35 var(--f-display); letter-spacing: -.01em; }
.done-actions { display: grid; gap: 8px; margin-top: 12px; }
.done-actions .btn { width: 100%; }
.zp-latest { padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.zp-latest.is-new { animation: fade-up 240ms var(--e-out) both; }
.zp-latest .label { margin-bottom: 4px; }
.latest-text { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-height: 9em; overflow: auto; }
.zp-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zp-quick .btn { min-height: 48px; padding: 0 12px; font-size: 15px; }
.zp-disabled { font-size: 13px; color: var(--ink-3); text-align: center; }
.composer { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: #fff; transition: border-color 150ms, box-shadow 150ms; }
.composer:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(143, 208, 255, .45); }
.composer-input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; font-size: 16px; }
.composer-input:focus-visible { box-shadow: none; }
.composer-input::placeholder { color: #9aa3b2; }
.composer-speak { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font: 600 13px/1 var(--f-ui); flex: none; }
.composer-speak svg.lucide { width: 16px; height: 16px; }
.composer-speak.is-listening { background: var(--sky-300); color: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
.composer .btn { flex: none; min-height: 40px; padding: 0 14px; }
.composer .btn svg.lucide { width: 16px; height: 16px; }
.composer.is-sticky { position: fixed; z-index: 30; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b) + var(--kb)); box-shadow: var(--sh-3); }
.composer:has(.composer-input:disabled) { opacity: .6; }
.zp-lessons { align-self: center; margin-top: 4px; }

/* 13 ----------------------------------------------------------- my lessons */
.page { padding-bottom: 64px; }
.page-top { height: 64px; display: flex; align-items: center; }
.page-top .btn-back { margin: 0 0 0 -10px; }
.page-sub { margin: 6px 0 20px; color: var(--ink-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.search { position: sticky; top: 8px; z-index: 10; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; margin-bottom: 8px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line-2); box-shadow: var(--sh-1); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(143, 208, 255, .45); }
.search > svg.lucide { color: var(--ink-3); }
.search-input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-input:focus-visible { box-shadow: none; }
.search-clear { margin: 0; font-size: 14px; }
.h-day { margin: 24px 0 10px; }
.h-group { display: grid; gap: 8px; }
.h-row { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; text-decoration: none; overflow: hidden; transition: border-color 150ms, box-shadow 200ms, transform var(--t-press) var(--e-out); }
a.h-row:hover { border-color: var(--line-2); box-shadow: var(--sh-1); }
a.h-row:active { transform: scale(.99); }
.h-skel { margin-bottom: 8px; }
.h-text { display: grid; gap: 3px; min-width: 0; }
.h-title { font: 600 16px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-preview { font-size: 14px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-meta { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.h-kids { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.h-kids svg.lucide { width: 14px; height: 14px; color: var(--ink-3); }
.h-end { grid-column: 2; display: flex; align-items: center; gap: 8px; }
.h-end:not(:has(.tag)) { display: none; }
.h-open { display: none; align-items: center; gap: 2px; font: 600 14px/1 var(--f-ui); color: var(--ink-2); }
.h-open svg.lucide { width: 16px; height: 16px; }
.h-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sky-100); }
.h-bar i { display: block; height: 100%; background: var(--sky-300); }
.h-state, .h-empty { display: grid; justify-items: center; gap: 16px; padding: 40px 20px; text-align: center; color: var(--ink-2); }
.h-empty { margin-top: 12px; border: 2px dashed var(--line-2); border-radius: var(--r-xl); background: rgba(255, 255, 255, .5); }
.h-empty p, .h-state p { max-width: 340px; }
.btn-more { display: flex; margin: 20px auto 0; }
.page-rail { display: none; }
.rail-card { padding: 20px; border-radius: var(--r-xl); border: 1px solid var(--line); background: rgba(255, 255, 255, .85); }
.stats { display: grid; gap: 16px; margin-top: 14px; }
.stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.stats dt { font-size: 14px; color: var(--ink-2); }
.stats dd { font: 800 28px/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* 14 -------------------------------------------------------------- settings */
.view-settings .h1, .view-history .h1 { margin-top: 4px; }
.set-card { display: grid; gap: 16px; margin-top: 20px; padding: 20px; border-radius: var(--r-xl); border: 1px solid var(--line); background: #fff; }
.set-row { display: grid; gap: 8px; }
.set-k { font: 600 15px/1.35 var(--f-ui); }
.set-inline { display: flex; gap: 8px; align-items: center; }
.set-inline .btn { flex: none; }
.methods { display: grid; gap: 8px; }
.methods li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.methods li svg.lucide { width: 18px; height: 18px; color: var(--ink-3); }
.methods .tag { margin-left: auto; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: #fff; text-align: left; transition: border-color 150ms, box-shadow 150ms, transform var(--t-press) var(--e-out); }
.radio-card:active { transform: scale(.98); }
.radio-card b { display: block; font: 600 16px/1.3 var(--f-ui); }
.radio-card small { display: block; font-size: 13px; color: var(--ink-3); }
.radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; transition: border-color 150ms, border-width 150ms; }
.radio-card[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.radio-card[aria-checked="true"] .radio-dot { border: 6px solid var(--ink); }
.set-switch { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.switch { position: relative; width: 52px; height: 32px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--line-2); transition: background-color 200ms; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform 200ms var(--e-out); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }
.set-link { display: flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; font-weight: 600; }
.set-link .ic-end { margin-left: auto; color: var(--ink-3); width: 16px; height: 16px; }
.set-legal { font-size: 14px; color: var(--ink-3); }
.set-legal a { color: var(--ink-2); }
.set-card #signOutBtn { justify-self: start; }
.rail-account { display: grid; justify-items: start; gap: 6px; }
.rail-name { margin-top: 8px; font: 800 22px/1.2 var(--f-display); letter-spacing: -.02em; }
.rail-sub { font-size: 14px; color: var(--ink-3); }
.rail-methods { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.rail-methods li { display: flex; align-items: center; gap: 8px; }
.rail-methods svg.lucide { width: 16px; height: 16px; color: var(--ink-3); }
.delete-card { max-width: 520px; display: grid; gap: 16px; }
.delete-card form { display: grid; gap: 4px; }

/* 15 ---------------------------------------------------------------- motion */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.94); } }
@keyframes nod { 30% { transform: rotate(-3deg) scale(1.03); } 60% { transform: rotate(2deg); } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes rec { 50% { opacity: .35; } }
@keyframes dots { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes chalk-pulse { 50% { opacity: .35; } }
@keyframes write-on { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stamp { from { opacity: 0; transform: rotate(0deg) scale(.8); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
@keyframes play-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(255, 255, 255, .18); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.is-shake { animation: shake 240ms ease-in-out; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--t-view); animation-timing-function: var(--e-out); }

@media (prefers-reduced-motion: reduce) {
  .board-scroll { scroll-behavior: auto; }
  .cm.is-new, .zp-latest.is-new, .t-card, .done-card, .spot, .type-area, .login-step, .zen-say.is-in, .b-step.is-active .b-say { animation: fade-in 200ms both; }
  .live-pill .rec, .box.is-listening .box-disc, .composer-speak.is-listening, .think-lines li.is-now .think-dot, .pl-think i, .cm-typing i, .skeleton::after, .chalk-skel span, .spin { animation: none; }
  .spin { border-right-color: currentColor; opacity: .6; }
  .b-write.is-writing, .b-answer.is-writing, .think-lines li { animation: fade-in 200ms both; }
  .btn:active:not(:disabled), .box:active, .spot:active, .ex-card:active, .radio-card:active, .pl-play:active .pl-disc { transform: none; }
  .is-shake, .zen-greet.is-react .zen-tile, .pl-play.is-pulse .pl-disc { animation: none; }
  .b-stamp.is-in { animation: fade-in 200ms both; }
  .seg-thumb, .switch-knob, .sheet-inner { transition-property: opacity; }
}

/* 16 ----------------------------------------------------------- breakpoints */
@media (max-width: 359px) {
  .otp-cells { grid-template-columns: repeat(6, 44px); gap: 6px; }
  .otp-cells span { height: 52px; }
  .boxes { grid-template-columns: 1fr; }
  .box { flex-direction: row; justify-content: flex-start; min-height: 72px; padding: 12px 16px; text-align: left; }
}

/* tablet: phone layout with a wider board */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .display { font-size: 40px; }
  .boxes { gap: 12px; }
  .box { min-height: 140px; }
  .pip { width: 96px; height: 120px; }
  .board-col { padding: 64px 28px 156px; font-size: 22px; }
  .board-col::before { width: 92px; height: 80px; }
  .pl-chip span { display: inline; }
  .name-card { max-width: 480px; margin: 0 auto; }
  .lh-sub { display: flex; }
  .h-open { display: inline-flex; }
  .h-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .h-end, .h-end:not(:has(.tag)) { grid-column: auto; display: flex; flex-direction: column; align-items: flex-end; }
  .recent-list li:nth-child(n+4) { display: block; }
  .recent-list li:nth-child(n+6) { display: none; }
}

/* desktop */
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .display { font-size: 52px; line-height: 1.02; }
  .h1 { font-size: 34px; line-height: 1.1; }

  .sticky-cta { position: static; padding: 0; margin-top: 24px; background: none; }
  .consent { margin-top: 20px; }

  /* name: centred 440 card on the sky */
  .view-name { align-items: center; justify-content: center; }
  .name-card { flex: 0 0 auto; width: 440px; padding: 32px; border-radius: var(--r-2xl); background: #fff; box-shadow: var(--sh-2); }

  /* ask: 7/5 on a 12-column grid */
  .topbar { height: 72px; }
  .ask { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-top: 8px; padding-bottom: 64px; }
  .ask-main { grid-column: 1 / span 7; }
  .ask-rail { grid-column: 9 / span 4; margin-top: 0; padding-top: 213px; }
  .ask-notices:not(:empty) + .greet { margin-top: 0; }
  .greet { align-items: flex-end; gap: 28px; margin: 0 0 36px; min-height: 185px; }
  .zen-greet .zen-tile { width: 148px; height: 185px; border-radius: var(--r-2xl); }
  .zen-greet::after { left: 12px; bottom: 12px; font-size: 12px; }
  .greet-text { padding-bottom: 6px; }
  .greet-line { font-size: 15px; margin-bottom: 10px; }
  .boxes { gap: 16px; }
  .box { align-items: flex-start; justify-content: space-between; min-height: 168px; padding: 20px; text-align: left; }
  .box-label { font-size: 17px; }
  .box-sub { font-size: 14px; }
  .box:hover:not(.is-active):not(.is-listening) { transform: translateY(-2px); box-shadow: var(--sh-3); }
  .box:active { transform: scale(.98); }
  .type-area { margin-top: 16px; }
  .ex-list li.ex-more { display: block; }
  .spot-continue { grid-template-columns: 120px minmax(0, 1fr); }
  .spot-continue .board-mini { width: 120px; height: 90px; padding: 10px 12px; }
  .board-mini-q { font-size: 13px; }
  .board-mini-t { font-size: 15px; -webkit-line-clamp: 3; }
  .spot { padding: 18px; }
  .toast { bottom: 32px; }

  /* lesson: board + 360 panel, full viewport height */
  .lesson { height: 100dvh; padding: 0 24px 24px; }
  .lesson-head { position: static; gap: 16px; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lesson-head .btn-back { padding: 0 10px; }
  .lh-h { font-size: 20px; }
  .lh-h > .subj-dot { display: none; }
  .lh-sub .subj-dot { display: inline-block; }
  .lh-lessons { display: inline-flex; margin: 0; }
  .lbl-long { display: inline; }
  .lbl-short { display: none; }
  .lesson-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; min-height: 0; }
  .stage { height: auto; min-height: 520px; border-radius: var(--r-xl); box-shadow: var(--sh-2); }
  .pip { top: 16px; right: 16px; width: 128px; height: 160px; }
  .live-pill { top: 16px; left: 16px; }
  .board-col { padding: 72px 40px 168px; font-size: 24px; }
  .board-col::before { width: 116px; height: 116px; }
  .b-ans { font-size: 30px; }
  .player { left: 16px; right: 168px; bottom: 16px; padding: 12px 16px; }
  .pl-play { flex-direction: row; gap: 10px; }
  .pl-lbl { font-size: 14px; min-width: 44px; text-align: left; }
  .pl-bar { height: 6px; }
  .zpanel { position: relative; min-height: 0; padding: 16px; border-radius: var(--r-xl); border: 1px solid var(--line); }
  .zp-head { display: block; padding-right: 120px; }
  .zp-chatwrap { display: block; }
  .zp-latest { display: none; }
  .t-head .t-tag { display: none; }
  .zp-lessons { display: none; }
  .done-actions { grid-template-columns: 1fr; }
  .composer.is-sticky { position: static; box-shadow: none; }

  /* history and settings: list + rail */
  .page-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .page-main { grid-column: 1 / span 8; max-width: 760px; }
  .page-rail { display: block; grid-column: 9 / span 4; padding-top: 52px; }
  .page-rail > * { position: sticky; top: 24px; }
  .page-grid-narrow .page-main { max-width: 640px; }
  .radio-cards { grid-template-columns: 1fr 1fr; }

  .sheet[open] { inset: 0; width: 100%; height: 100%; display: grid; place-items: center; background: transparent; }
  .sheet-inner { width: 440px; max-height: min(88vh, 760px); padding: 20px 28px 28px; border-radius: var(--r-2xl); transform: translateY(12px) scale(.98); opacity: 0; transition: transform var(--t-sheet) var(--e-out), opacity var(--t-sheet); }
  .sheet.is-in .sheet-inner { transform: none; opacity: 1; }
  .sheet-grab { display: none; }
}

@media (min-width: 1280px) {
  .lesson-body { grid-template-columns: minmax(0, 1fr) 380px; }
  .board-col { font-size: 26px; }
}

/* hover only where it exists */
@media (hover: none) {
  .box:hover, a.h-row:hover, .ex-card:hover { box-shadow: var(--sh-2); }
  .ex-card .ex-go { opacity: 1; transform: translate(0, -50%); }
}

/* lesson states that have nothing to ask about yet */
.view-lesson[data-phase="unreadable"] .zpanel, .view-lesson[data-phase="failed"] .zpanel { display: none; }

/* login card (overrides the base login rules above) */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.login-col { width: 100%; max-width: 460px; min-height: 0; padding: 28px 28px 24px; background: rgba(255, 255, 255, .96); border: 1px solid rgba(255, 255, 255, .9); border-radius: 28px; box-shadow: 0 30px 80px -40px rgba(30, 60, 100, .45), 0 8px 24px -16px rgba(30, 60, 100, .2); overflow: hidden; isolation: isolate; }
.login-col::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 170px; background: repeating-linear-gradient(90deg, rgba(143, 208, 255, .16) 0 1px, transparent 1px 22px), linear-gradient(180deg, #e6f3fd 0%, rgba(255, 255, 255, 0) 100%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.login-banner { justify-content: center; min-height: 0; padding: 0; margin: 4px 0 12px; }
.login-banner p { display: none; }
.login-banner-zen { width: 64px; height: 64px; border-radius: 20px; border: 3px solid #fff; box-shadow: 0 8px 20px -10px rgba(30, 60, 100, .5); }
.lang-pill { top: 16px; right: 16px; height: 32px; padding: 0 12px; font-size: 13px; }
.login-step { flex: 0 0 auto; padding-top: 0; }
#loginStart .display { text-align: center; font-size: clamp(26px, 6vw, 32px); line-height: 1.15; margin-bottom: 8px; }
#loginStart .lede { text-align: center; font-size: 15px; margin-bottom: 24px; }
.login-form { flex: 0 0 auto; }
.login-step > .login-form .sticky-cta { margin-top: 16px; }
.login-col .btn-primary.btn-block { min-height: 52px; border-radius: 999px; }
.new-here { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.login-col .consent { text-align: center; margin-top: 8px; }
.login-art { display: none !important; }
@media (min-width: 1024px) {
  .login { display: grid; grid-template-columns: none; place-items: center; }
  .login-col { max-width: 480px; padding: 40px 44px 32px; justify-content: flex-start; }
  .login-banner { display: flex; }
}
.google-slot .btn { width: 100%; max-width: 100%; min-width: 0; }
.google-slot .btn > span:not(.tag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================================
   17 v2: clean, minimal, Inter only, brand blue from the Zenius logo.
   Overrides the tokens above, then styles the new pieces (app bar, tabs,
   language menu, onboarding, settings hub, plans).
   ========================================================================= */
:root {
  --brand: #4f7bff; --brand-600: #3a66f0; --brand-700: #2d55d6; --brand-50: #f2f5ff; --brand-100: #e3eaff; --brand-200: #c9d6ff;
  --ink: #0f172a; --ink-2: #334155; --ink-3: #64748b; --line: #e8edf4; --line-2: #d7dfea;
  --surface-2: #f6f8fb; --bg-top: #ffffff; --bg-bottom: #f4f7fd;
  --f-display: Inter, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px -8px rgba(15, 23, 42, .10);
  --sh-3: 0 2px 6px rgba(15, 23, 42, .05), 0 24px 48px -20px rgba(15, 23, 42, .22);
}
body { background: linear-gradient(180deg, #ffffff 0, #f8faff 420px, var(--bg-bottom) 100%); letter-spacing: -.006em; }
body::before, .sky { display: none; }
.display { font: 700 30px/1.1 var(--f-display); letter-spacing: -.035em; }
.h1 { font: 700 26px/1.2 var(--f-display); letter-spacing: -.03em; }
.label { font: 600 12px/1.3 var(--f-ui); letter-spacing: .06em; }
:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand); }
::selection { background: var(--brand-100); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -8px rgba(79, 123, 255, .7); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-outline { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-700); }
.input:focus, .input-group:focus-within, .composer:focus-within, .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 123, 255, .16); }
.tag-sky { background: var(--brand-50); color: var(--brand-700); }
.toast svg.lucide { color: var(--brand-200); }
.pl-bar i, .h-bar i, .spot-bar i { background: var(--brand); }
.otp-cells span { font-family: var(--f-ui); font-weight: 700; }
.otp-cells span.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 123, 255, .18); }
.otp-cells span.is-active:empty::after { background: var(--brand); }
.switch[aria-checked="true"] { background: var(--brand); }
.seg-btn[aria-selected="true"] { color: var(--brand-700); }
.box { box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.box::before { display: none; }
.box-disc { background: var(--brand-50); color: var(--brand); }
.box.is-active, .box.is-listening { box-shadow: inset 0 0 0 2px var(--brand), var(--sh-2); }
.box.is-listening .box-disc { background: var(--brand); color: #fff; }
.zen-greet::after { content: none; }
.h-row, .rail-card, .set-card, .notice-card { border-color: var(--line); box-shadow: none; }
.page-top { height: 56px; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark { width: 30px; height: auto; }
.logo-word { font: 800 22px/1 var(--f-ui); letter-spacing: -.04em; color: var(--brand); }

/* login: logo on top of the card */
.login-banner { justify-content: center; margin: 0 0 18px; }
.login-banner .logo-mark { width: 40px; }
.login-banner .logo-word { font-size: 28px; }
.login-col::before { background: linear-gradient(180deg, var(--brand-50) 0%, rgba(255, 255, 255, 0) 100%); }
.lang-pill { border-color: var(--line-2); }

/* app bar + tabs */
.appbar { display: flex; align-items: center; gap: 16px; height: 64px; }
.appbar-home { display: inline-flex; text-decoration: none; flex: none; }
.apptabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.apptab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink-3); font: 600 14px/1 var(--f-ui); text-decoration: none; white-space: nowrap; transition: background-color 150ms, color 150ms; }
.apptab svg.lucide { width: 16px; height: 16px; }
.apptab:hover { color: var(--ink); }
.apptab[aria-current="page"] { background: #fff; color: var(--brand-700); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.appbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: #fff; font: 600 14px/1 var(--f-ui); }
.lang-btn svg.lucide { width: 16px; height: 16px; color: var(--ink-3); }
.lang-btn .ic-sm, .lang-btn svg.lucide-chevron-down { width: 14px; height: 14px; }
.lang-btn:hover { border-color: var(--ink-3); }
.me-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: #fff; text-decoration: none; font: 600 14px/1 var(--f-ui); }
.me-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: var(--brand-50); }
.lang-menu { position: absolute; z-index: 80; padding: 6px; border-radius: 16px; background: #fff; box-shadow: var(--sh-3), 0 0 0 1px var(--line); animation: pop 160ms var(--e-out) both; }
.lang-menu-h { padding: 8px 10px 6px; font: 600 12px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; text-align: left; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--surface-2); box-shadow: none; }
.lang-menu b { display: block; font: 600 15px/1.3 var(--f-ui); }
.lang-menu small { display: block; font-size: 12px; color: var(--ink-3); }
.lang-menu span { flex: 1; }
.lang-menu svg.lucide { width: 18px; height: 18px; color: var(--brand); opacity: 0; }
.lang-menu [aria-checked="true"] svg.lucide { opacity: 1; }
@media (max-width: 767px) {
  .appbar { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; gap: 10px; }
  .apptabs { order: 3; width: 100%; }
  .apptab { flex: 1; justify-content: center; padding: 0 6px; font-size: 13px; }
  .me-btn { padding: 0 10px 0 4px; font-size: 13px; }
  .lang-btn { height: 40px; padding: 0 10px; }
  .logo-word { font-size: 20px; }
}

/* lesson header links */
.lh-nav { display: none; align-items: center; gap: 4px; }
.lh-link { margin: 0; font-size: 14px; color: var(--ink-2); }
.view-lesson.is-busy .lh-nav { visibility: hidden; }
@media (min-width: 1024px) { .lh-nav { display: flex; } .lh-lessons { display: inline-flex; } }

/* history */
.h-opened { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.h-opened svg.lucide { width: 13px; height: 13px; }
.h-open { color: var(--brand-700); gap: 4px; }
.h-open svg.lucide { width: 14px; height: 14px; }

/* onboarding */
.view-welcome { display: flex; justify-content: center; }
.ob { width: 100%; max-width: 560px; display: flex; flex-direction: column; min-height: 100dvh; padding: 0 var(--gutter) max(16px, var(--safe-b)); }
.ob-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.ob-top .btn-back { margin: 0; justify-self: start; }
.ob-count { justify-self: end; font: 600 13px/1 var(--f-ui); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ob-bar { height: 4px; border-radius: 4px; background: var(--brand-100); overflow: hidden; margin-bottom: 28px; }
.ob-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width 400ms var(--e-out); }
.ob-card { flex: 1; display: flex; flex-direction: column; }
.ob-step.is-in { animation: fade-up 260ms var(--e-out) both; }
.ob-h { font: 700 28px/1.15 var(--f-display); letter-spacing: -.035em; text-wrap: balance; }
.ob-sub { margin: 8px 0 24px; color: var(--ink-3); font-size: 16px; }
.input-xl { min-height: 60px; font-size: 20px; font-weight: 600; border-radius: 16px; }
.ob-age-other { margin-top: 16px; max-width: 220px; }
.ob-cta { margin-top: auto; padding-top: 24px; position: sticky; bottom: calc(var(--kb) + 8px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: #fff; font: 600 15px/1 var(--f-ui); color: var(--ink); transition: border-color 150ms, background-color 150ms, color 150ms, transform var(--t-press) var(--e-out); }
.chip svg.lucide { width: 18px; height: 18px; color: var(--ink-3); }
.chip:hover { border-color: var(--ink-3); }
.chip:active { transform: scale(.96); }
.chip.is-on { border-color: var(--brand); background: var(--brand-100); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand); }
.chip.is-on svg.lucide { color: var(--brand); }
.chips-sm .chip { min-height: 40px; padding: 0 14px; font-size: 14px; }
.tutor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tutor-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 16px; border: 1px solid var(--line-2); border-radius: 22px; background: #fff; text-align: left; transition: border-color 150ms, box-shadow 200ms, transform var(--t-press) var(--e-out); }
.tutor-card:active { transform: scale(.98); }
.tutor-pic { display: block; aspect-ratio: 5 / 6; border-radius: 16px; overflow: hidden; background: var(--brand-50); }
.tutor-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.tutor-txt { padding: 0 6px; }
.tutor-txt b { display: block; font: 700 17px/1.3 var(--f-ui); }
.tutor-txt small { display: block; font-size: 13px; color: var(--ink-3); }
.tutor-check { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; opacity: 0; transform: scale(.6); transition: opacity 150ms, transform 200ms var(--e-out); }
.tutor-check svg.lucide { width: 16px; height: 16px; stroke-width: 3; }
.tutor-card.is-on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), 0 12px 28px -16px rgba(79, 123, 255, .6); }
.tutor-card.is-on .tutor-check { opacity: 1; transform: none; }
.tutor-card-sm .tutor-pic { aspect-ratio: 1; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-card { display: grid; gap: 2px; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: #fff; text-align: left; transition: border-color 150ms, box-shadow 150ms; }
.lang-card b { font: 700 17px/1.3 var(--f-ui); }
.lang-card small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.lang-card.is-on { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.ob-done { display: grid; justify-items: center; text-align: center; padding-top: 12px; }
.ob-done-pic { width: 140px; height: 168px; border-radius: 28px; overflow: hidden; margin-bottom: 20px; background: var(--brand-50); box-shadow: 0 16px 40px -20px rgba(79, 123, 255, .7); animation: pop 400ms var(--e-out) both; }
.ob-done-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.ob-done .ob-sub { margin-bottom: 20px; }
.ob-sum { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ob-sum li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.ob-sum svg.lucide { width: 16px; height: 16px; color: var(--brand); }
@media (min-width: 768px) {
  .ob { min-height: 0; padding-top: 32px; padding-bottom: 48px; }
  .ob-card { padding: 32px; border-radius: 28px; background: #fff; box-shadow: var(--sh-2), 0 0 0 1px var(--line); min-height: 520px; }
  .ob-cta { position: static; }
  .ob-h { font-size: 32px; }
}

/* settings hub */
.set-page { max-width: 720px; }
.set-h { margin-top: 4px; }
.set-sub { margin: 6px 0 20px; color: var(--ink-3); }
.me-card { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 4px 0 20px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--sh-1); text-decoration: none; }
.me-pic { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; background: var(--brand-50); flex: none; }
.me-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.me-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.me-txt b { font: 700 20px/1.25 var(--f-ui); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-txt small { font-size: 14px; color: var(--ink-3); }
.me-card .btn { flex: none; }
.set-list { border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.set-list > li + li { border-top: 1px solid var(--line); }
.set-row-link, .acct-row { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; text-decoration: none; }
a.set-row-link:hover { background: var(--surface-2); }
.set-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-50); color: var(--brand); flex: none; }
.set-ic svg.lucide { width: 20px; height: 20px; }
.set-row-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.set-row-txt b { font: 600 16px/1.3 var(--f-ui); }
.set-row-txt small { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-chev { color: var(--ink-3); width: 18px !important; height: 18px !important; }
.set-signout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 16px; border: 0; border-radius: 16px; background: transparent; color: var(--ink-2); font: 600 15px/1 var(--f-ui); }
.set-signout:hover { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.set-form { display: grid; gap: 22px; }
.set-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.set-form legend { padding: 0; margin-bottom: 10px; }
.set-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.set-save { position: sticky; bottom: calc(var(--kb) + 12px); display: flex; justify-content: flex-end; }
.set-save .btn { min-width: 160px; }
.set-sec { margin-top: 24px; }
.set-sec .label { margin-bottom: 12px; }
.set-switch-row { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.set-switch-row > div { flex: 1; }
.set-k { font: 600 15px/1.35 var(--f-ui); }
.set-inline { display: flex; gap: 8px; align-items: center; }
.set-inline .input-group, .set-inline > .input { flex: 1; min-width: 0; }
.set-inline .btn { flex: none; }
.acct-flow { padding: 0 16px 16px; }
.acct-form { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.lk-code { display: grid; gap: 8px; }
.lk-otp { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-weight: 700; }
.set-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.plan-note { display: flex; align-items: center; gap: 8px; margin: 8px 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); font-size: 14px; }
.plan-note svg.lucide { width: 16px; height: 16px; }
.plans { display: grid; gap: 12px; }
.plan { display: grid; gap: 12px; padding: 20px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.plan header { display: flex; align-items: center; justify-content: space-between; }
.plan-name { font: 700 18px/1.2 var(--f-ui); }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price b { font: 800 34px/1 var(--f-ui); letter-spacing: -.04em; }
.plan-price span { color: var(--ink-3); font-size: 14px; }
.plan ul { display: grid; gap: 8px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.plan li svg.lucide { width: 16px; height: 16px; color: var(--brand); margin-top: 2px; }
.plan.is-pop { box-shadow: 0 0 0 2px var(--brand), 0 18px 40px -24px rgba(79, 123, 255, .8); }
.plan.is-current { background: var(--surface-2); }
@media (min-width: 768px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } .set-page { max-width: 880px; } }
@media (max-width: 420px) { .me-card .btn span { display: none; } .me-card .btn { width: 44px; padding: 0; } .set-two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ob-step.is-in, .ob-done-pic, .lang-menu { animation: fade-in 150ms both; } .chip:active, .tutor-card:active { transform: none; } }

.zp-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }
.zp-nav .btn-text { margin: 0; font-size: 14px; color: var(--ink-2); }
.view-lesson.is-busy .zp-nav { visibility: hidden; }
@media (min-width: 1024px) { .zp-nav { display: none; } }
.set-sec .tutor-grid { max-width: 440px; }
.set-sec .lang-grid { max-width: 560px; }
/* Ask: no side rail, one centred column */
.ask-rail { display: none !important; }
@media (min-width: 1024px) { .ask { display: block; max-width: 820px; } .ask-main { max-width: none; } }
/* Ask: everything centred (tutor above the question, boxes centred) */
.ask { margin-left: auto; margin-right: auto; }
.greet { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.greet-line { justify-content: center; }
.zen-say { left: 50%; top: auto; bottom: calc(100% + 8px); transform: translateX(-50%); }
.box { align-items: center; justify-content: center; text-align: center; }
.box-txt { justify-items: center; }
@media (min-width: 1024px) {
  .ask { padding-top: 24px; }
  .greet { align-items: center; min-height: 0; gap: 18px; margin-bottom: 40px; }
  .zen-greet .zen-tile { width: 120px; height: 150px; }
  .box { align-items: center; justify-content: center; gap: 14px; min-height: 176px; text-align: center; }
}
/* app bar: logo | tabs centred on the line | language + profile pill */
.appbar { display: grid; grid-template-columns: 1fr auto 1fr; }
.appbar-home { justify-self: start; }
.apptabs { justify-self: center; }
.appbar-end { justify-self: end; margin-left: 0; }
.me-btn { gap: 6px; padding: 0 12px 0 4px; height: 44px; color: var(--ink-3); }
.me-btn img { width: 36px; height: 36px; }
.me-btn:hover, .me-btn[aria-expanded="true"] { border-color: var(--ink-3); color: var(--ink); }
.me-menu-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.me-menu-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: var(--brand-50); flex: none; }
.me-menu-head span { min-width: 0; }
.me-menu-head b { display: block; font: 600 15px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu-head small { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu button svg.lucide { opacity: 1; color: var(--ink-3); }
.me-menu button[data-act="logout"] b { color: var(--bad); }
.me-menu button[data-act="logout"] svg.lucide { color: var(--bad); }
@media (max-width: 767px) {
  .appbar { display: flex; }
  .appbar-end { margin-left: auto; }
  .me-btn { padding: 0 10px 0 4px; }
}

/* =========================================================================
   18 Sky + glass (founder references): a soft sky that fades to white,
   frosted cards, an iridescent glow behind the tutor, floating questions.
   ========================================================================= */
:root { --glass: rgba(255, 255, 255, .66); --glass-strong: rgba(255, 255, 255, .82); --glass-line: rgba(255, 255, 255, .9); --glass-blur: saturate(1.6) blur(20px); --sky-1: #a9d8ff; --sky-2: #d4ecff; --sky-3: #eef7ff; }
body { background: linear-gradient(180deg, var(--sky-1) 0, var(--sky-2) 220px, var(--sky-3) 460px, #fbfdff 760px, #ffffff 100%); }
body::before { display: block; opacity: .03; }
.sky { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.cloud { position: absolute; border-radius: 50%; background: #fff; filter: blur(40px); opacity: .85; animation: drift 38s ease-in-out infinite alternate; }
.cloud-a { width: 620px; height: 200px; top: 120px; left: -160px; }
.cloud-b { width: 720px; height: 240px; top: 60px; right: -220px; opacity: .7; animation-duration: 46s; }
.cloud-c { width: 460px; height: 160px; top: 260px; left: 38%; opacity: .55; animation-duration: 52s; }
.cloud-d { width: 900px; height: 260px; top: 360px; left: -10%; opacity: .9; filter: blur(60px); animation-duration: 60s; }
@keyframes drift { to { transform: translateX(60px); } }
body[data-view="lesson"] .sky { display: none; }
body[data-view="lesson"] { background: #eef3f9; }

/* glass surfaces */
.box, .set-list, .me-card, .plan, .h-row, .rail-card, .lang-card, .tutor-card, .set-switch-row, .search, .notice-card, .type-area, .zpanel {
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 1px 2px rgba(30, 64, 120, .05), 0 18px 40px -24px rgba(30, 64, 120, .28);
  border-color: transparent;
}
.chip { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: rgba(255, 255, 255, .95); box-shadow: 0 1px 2px rgba(30, 64, 120, .06), 0 8px 18px -12px rgba(30, 64, 120, .3); }
.chip.is-on { background: #fff; }
.box:hover:not(.is-active):not(.is-listening) { box-shadow: inset 0 0 0 1px #fff, 0 24px 48px -24px rgba(30, 64, 120, .45); }
.plan.is-current { background: rgba(255, 255, 255, .5); }
.plan.is-pop { box-shadow: inset 0 0 0 2px var(--brand), 0 24px 48px -24px rgba(79, 123, 255, .6); }
.set-list > li + li { border-top-color: rgba(15, 23, 42, .06); }

/* glass app bar + segmented tabs (reference: Rooms / Inspiration / Profiles) */
.appbar { position: sticky; top: 0; z-index: 30; }
.apptabs { background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 10px 30px -18px rgba(30, 64, 120, .4); }
.apptab[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 14px -8px rgba(30, 64, 120, .35); }
.apptab[aria-current="page"] svg.lucide { color: var(--brand); }
.lang-btn, .me-btn { background: rgba(255, 255, 255, .6); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: rgba(255, 255, 255, .95); box-shadow: 0 6px 16px -10px rgba(30, 64, 120, .35); }
.lang-menu { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px #fff, 0 30px 60px -24px rgba(30, 64, 120, .45); }

/* iridescent orb glow behind the tutor (reference: orb over clouds) */
.zen-greet, .ob-done-pic { isolation: isolate; }
.zen-greet::before, .ob-done::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 220px; height: 220px; transform: translate(-50%, -50%);
  border-radius: 50%; filter: blur(28px); opacity: .85;
  background: conic-gradient(from 210deg, #a5c8ff, #c7b8ff, #ffc9e8, #b9f0ff, #a5c8ff);
  animation: orb 12s linear infinite;
}
.ob-done { position: relative; isolation: isolate; }
.ob-done::before { top: 96px; width: 240px; height: 240px; }
@keyframes orb { to { transform: translate(-50%, -50%) rotate(360deg); } }
.zen-greet .zen-tile { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .9), 0 24px 40px -24px rgba(30, 64, 120, .55); background: rgba(255, 255, 255, .7); }
.greet .display { font-weight: 700; letter-spacing: -.04em; }

/* login: card floats on the sky, example questions drift above the heading (reference: chat bubbles) */
.login-col { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: rgba(255, 255, 255, .95); box-shadow: inset 0 0 0 1px #fff, 0 40px 90px -40px rgba(30, 64, 120, .55); }
.login-col::before { display: none; }
.float-qs { position: relative; height: 128px; margin: 0 -6px 14px; }
.fq { position: absolute; padding: 9px 14px; border-radius: 18px; background: #fff; color: var(--ink); font: 500 14px/1.25 var(--f-ui); white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 24px -14px rgba(30, 64, 120, .45); animation: bob 6s ease-in-out infinite; }
.fq::after { content: ""; position: absolute; bottom: -4px; width: 12px; height: 12px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.fq-1 { top: 0; left: 6%; } .fq-1::after { left: 18px; }
.fq-2 { top: 30px; right: 4%; animation-delay: -1.5s; } .fq-2::after { right: 18px; }
.fq-3 { top: 64px; left: 0; animation-delay: -3s; } .fq-3::after { left: 22px; }
.fq-4 { top: 94px; right: 0; animation-delay: -4.5s; } .fq-4::after { right: 22px; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (max-width: 380px) { .fq { font-size: 13px; padding: 8px 12px; } }

/* onboarding: pill progress (reference: ChatGPT story dots) */
.ob-bar { height: 6px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9); }
.ob-bar i { background: linear-gradient(90deg, var(--brand), #8fb0ff); }
@media (min-width: 768px) {
  .ob-card { background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px #fff, 0 40px 90px -40px rgba(30, 64, 120, .5); }
}
.input { background: rgba(255, 255, 255, .9); }

@media (prefers-reduced-motion: reduce) { .cloud, .fq, .zen-greet::before, .ob-done::before { animation: none; } }

/* lesson rating (celebration card + finish sheet) */
.fx-rate { display: grid; justify-items: center; gap: 8px; margin: 14px 0 6px; text-align: center; }
.fx-rate-q { font: 700 18px/1.3 var(--f-ui); color: var(--ink); }
.fx-rate-stars { display: flex; gap: 8px; }
.fx-star { display: grid; justify-items: center; gap: 2px; width: 52px; padding: 8px 0 6px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px var(--line-2); color: #c3cad6; transition: transform 140ms var(--e-out), color 150ms, background-color 150ms; }
.fx-star svg.lucide { width: 26px; height: 26px; }
.fx-star small { font: 700 11px/1 var(--f-ui); color: var(--ink-3); }
.fx-star:hover { transform: translateY(-2px); }
.fx-star.on { color: #f5a524; background: #fff7e6; box-shadow: inset 0 0 0 1.5px #f5c45a; }
.fx-star.on svg.lucide { fill: currentColor; }
.fx-rate-word { font: 600 14px/1.3 var(--f-ui); color: var(--ink-2); min-height: 18px; }
.sheet-rate .fx-rate { margin: 4px 0 18px; }
.rate-skip { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .fx-star:hover { transform: none; } }

/* =========================================================================
   19 v3 Corporate blue: one blue scale + white + black, Apple-style liquid glass,
   lighter type (600 max), Lucide icons. Overrides everything above.
   ========================================================================= */
:root {
  --brand: #2f62f0; --brand-600: #2453d8; --brand-700: #1f4fd8; --brand-50: #f3f7ff; --brand-100: #e3ecff; --brand-200: #c7d8ff;
  --ink: #0a0f1c; --ink-2: #2b3445; --ink-3: #657085; --line: rgba(10, 15, 28, .08); --line-2: rgba(10, 15, 28, .14);
  --sky-1: #cfe0ff; --sky-2: #e6efff; --sky-3: #f4f8ff;
  --ok: #1f4fd8; --ok-soft: #e8f0ff; --warn: #2b3445; --warn-soft: #eef2f8;
  --f-display: Inter, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lg-bg: linear-gradient(150deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5));
  --lg-blur: saturate(1.8) blur(24px);
  --lg-edge: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(10, 15, 28, .04);
  --lg-shadow: 0 1px 2px rgba(10, 30, 80, .06), 0 16px 40px -22px rgba(10, 30, 80, .28);
}
body { background: radial-gradient(1200px 520px at 50% -120px, #d6e4ff 0%, rgba(214, 228, 255, 0) 70%), linear-gradient(180deg, #eef4ff 0, #f7faff 520px, #ffffff 100%); letter-spacing: -.011em; }
.cloud { background: #fff; opacity: .75; }
.display, .h1, .ob-h, .set-h, .greet .display { font-weight: 600; letter-spacing: -.035em; }
.display { font-size: 30px; } .h1 { font-size: 25px; }
.label, .kicker { font-weight: 600; }
b, strong { font-weight: 600; }
.logo-word { font-weight: 700; color: var(--brand-700); }
.btn { font-weight: 500; }
.btn-primary { background: linear-gradient(180deg, #3b6dff, #2453d8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 24px -12px rgba(36, 83, 216, .7); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #3164f6, #1f4bcc); }
.btn-secondary, .btn-outline { background: var(--lg-bg); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); box-shadow: var(--lg-edge), var(--lg-shadow); color: var(--ink); }

/* liquid glass surfaces */
.box, .set-list, .me-card, .plan, .h-row, .rail-card, .lang-card, .tutor-card, .set-switch-row, .search, .notice-card, .type-area, .zpanel, .apptabs, .lang-btn, .me-btn, .login-col, .ob-card, .chip, .composer, .fx-star, .acct-form {
  background: var(--lg-bg); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-edge), var(--lg-shadow); border-color: transparent;
}
.lang-menu { background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .72)); box-shadow: var(--lg-edge), 0 30px 60px -24px rgba(10, 30, 80, .35); }
.apptab[aria-current="page"], .chip.is-on, .lang-card.is-on, .tutor-card.is-on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand), 0 10px 24px -14px rgba(36, 83, 216, .6); }
.apptab[aria-current="page"] svg.lucide, .chip.is-on svg.lucide { color: var(--brand); }
.chip { font-weight: 500; }
.box-disc, .set-ic, .gi { background: linear-gradient(160deg, #ffffff, #e6eeff); color: var(--brand); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(47, 98, 240, .12); }
.box-label, .set-row-txt b, .tutor-txt b, .lang-card b, .me-txt b, .plan-name, .h-title { font-weight: 600; }
.plan-price b { font-weight: 600; }
.tag-ok, .tag-sky { background: var(--brand-50); color: var(--brand-700); }
.tag-warn { background: #eef2f8; color: var(--ink-2); }

/* single-hue subjects */
[data-subj] { --s-ink: #1f4fd8 !important; --s-soft: #eaf1ff !important; }

/* orb: blue only */
.zen-greet::before, .ob-done::before { background: radial-gradient(circle, rgba(79, 123, 255, .45), rgba(79, 123, 255, 0) 65%); animation: none; filter: blur(18px); }
.zen-greet .zen-tile, .ob-done-pic, .tutor-pic, .me-pic { background: linear-gradient(180deg, #e9f0ff, #f8fbff); }
.zen-tile img, .tutor-pic img, .ob-done-pic img { object-position: 50% 12%; }

/* streak / xp chips: blue */
.fx-stat-flame, .hud-fire { color: var(--brand) !important; }

/* login: example questions float on the sky, outside the card */
.login { position: relative; overflow: hidden; }
.login > .float-qs { position: absolute; inset: 0; height: auto; margin: 0; pointer-events: none; z-index: 0; }
.login > .float-qs .fq { font-weight: 500; background: var(--lg-bg); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); box-shadow: var(--lg-edge), var(--lg-shadow); }
.login > .float-qs .fq::after { display: none; }
.login > .float-qs .fq-1 { top: 12%; left: 8%; } .login > .float-qs .fq-2 { top: 22%; left: auto; right: 8%; }
.login > .float-qs .fq-3 { top: auto; bottom: 22%; left: 6%; } .login > .float-qs .fq-4 { top: auto; bottom: 12%; right: 7%; }
.login-col { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .login { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
  .login > .float-qs { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 460px; }
  .login > .float-qs .fq { position: static; animation: none; font-size: 13px; padding: 7px 12px; }
  .login > .float-qs .fq-3, .login > .float-qs .fq-4 { display: none; }
}

/* celebration tutor pose */
.fx-cel-tutor { width: 120px; height: auto; flex: none; filter: drop-shadow(0 18px 20px rgba(10, 30, 80, .18)); }

/* rating stars: blue */
.fx-star.on { color: var(--brand); background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand), var(--lg-shadow); }

/* quick sign-in: name + mobile + selfie */
.quick-form { gap: 16px; }
.quick-form .field { gap: 6px; }
.selfie { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px 10px 10px; border: 0; border-radius: 18px; text-align: left; background: var(--lg-bg); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); box-shadow: var(--lg-edge), inset 0 0 0 1px var(--line-2); transition: box-shadow 150ms; }
.selfie:hover { box-shadow: var(--lg-edge), inset 0 0 0 1px var(--brand); }
.selfie-pic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(160deg, #fff, #e3ecff); color: var(--brand); box-shadow: inset 0 0 0 1px rgba(47, 98, 240, .18); }
.selfie-pic img { width: 100%; height: 100%; object-fit: cover; }
.selfie-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.selfie-txt b { font: 600 15px/1.3 var(--f-ui); }
.selfie-txt small { font-size: 13px; color: var(--ink-3); }
.selfie-chev { color: var(--ink-3); }
.selfie.is-done { box-shadow: var(--lg-edge), inset 0 0 0 1.5px var(--brand); }
.selfie.is-done .selfie-pic { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-200); }

/* selfie camera sheet */
.cam { position: relative; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; background: #0a0f1c; margin-bottom: 14px; }
.cam video, .cam canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam video { transform: scaleX(-1); }
.cam-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #fff; font: 500 15px/1.45 var(--f-ui); }
.cam-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 1024px) { .sheet-cam .sheet-inner { width: 460px; } }
