/* Lancar AI — design system */
:root {
  --bg: #f5f4fb;
  --surface: #ffffff;
  --surface-2: #f8f7fd;
  --ink: #17142b;
  --ink-2: #4a4664;
  --muted: #7a7695;
  --line: #e8e5f3;
  --brand: #4b3bff;
  --brand-2: #8a5cff;
  --brand-soft: #eeebff;
  --accent: #ff6b6b;
  --ok: #12a87a;
  --ok-soft: #e4f7f0;
  --warn: #f0a030;
  --bad: #d9415e;
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 20, 43, .04), 0 8px 24px rgba(23, 20, 43, .06);
  --shadow-lg: 0 20px 50px rgba(40, 30, 120, .18);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; }
button { font-family: inherit; }
a { color: var(--brand); }
h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(75, 59, 255, .45); outline-offset: 2px; border-radius: 10px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px; background: var(--surface-2); border-radius: var(--r-sm); text-align: center; }

/* buttons */
.btn { border: 0; border-radius: 14px; padding: 12px 20px; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .12s, filter .15s, background .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px rgba(75, 59, 255, .28); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.big { padding: 16px 30px; font-size: 17px; border-radius: 16px; }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.glass { background: rgba(255, 255, 255, .12); color: #fff; backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(255, 255, 255, .2); }
.icon-btn { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(245, 244, 251, .82); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-color: var(--line); }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand b { color: var(--brand); margin-left: 2px; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 6px 14px rgba(75, 59, 255, .3); }
.top-right { display: flex; gap: 8px; align-items: center; }
.pill { background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.warn { background: #fff5e3; border-color: #f7d49a; color: #8a5a00; }
.avatar-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff9a6b, var(--accent)); }

/* avatar component */
.ava { position: relative; border-radius: 50%; overflow: hidden; background: var(--ava-bg, #eee); flex: none; }
.ava img, .ava svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- onboarding ---------- */
.ob-layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; min-height: calc(100vh - 64px); padding-top: 20px; padding-bottom: 40px; }
.ob-hero h1 { margin: 24px 0 20px; }
.ob-faces { display: flex; }
.ob-faces .ava { width: 74px; height: 74px; border: 4px solid var(--bg); margin-right: -16px; box-shadow: var(--shadow); }
.ob-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: var(--ink-2); font-size: 16px; }
.ob-points span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); margin-right: 10px; box-shadow: var(--shadow); }
.ob-card { padding: 30px; }
.ob-top { display: grid; gap: 10px; margin-bottom: 22px; }
.ob-count { font-size: 13px; font-weight: 700; color: var(--brand); }
.progress { height: 8px; background: var(--line); border-radius: 9px; overflow: hidden; }
#obBar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .35s; }
.ob-step h2 { font-size: 24px; margin-bottom: 6px; }
.ob-step .muted { margin: 0; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.options.cols { grid-template-columns: 1fr 1fr; }
.opt { padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; background: #fff; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 12px; transition: .15s; }
.opt:hover { border-color: #cbc4ff; }
.opt small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 12px; color: #fff; }
.opt.on .check { background: var(--brand); border-color: var(--brand); }
.opt .ava { width: 52px; height: 52px; }
.ob-step input[type=text] { width: 100%; padding: 16px; font-size: 18px; font-family: inherit; border: 2px solid var(--line); border-radius: var(--r); margin-top: 18px; outline: none; }
.ob-step input[type=text]:focus { border-color: var(--brand); }
.ob-actions { display: flex; justify-content: space-between; margin-top: 26px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch; margin-top: 18px; }
.hero-text { padding: 28px; border-radius: var(--r-lg); color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(255, 107, 107, .55), transparent 40%), linear-gradient(135deg, #3a2cf0, #7a4dff); box-shadow: var(--shadow-lg); }
.hero-text .eyebrow { margin: 0 0 6px; opacity: .8; font-weight: 600; font-size: 14px; }
.hero-text .sub { opacity: .9; margin: 8px 0 22px; }
.hero-text .btn.primary { background: #fff; color: var(--brand); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .95; }
.cta-meta .ava { width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, .7); }
.goal { display: flex; gap: 18px; align-items: center; }
.goal p { margin: 4px 0 10px; font-size: 14px; }
.ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--line) 0); }
.ring > div { width: 82px; height: 82px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; }
.ring b { font-size: 24px; line-height: 1; }
.ring small { color: var(--muted); font-size: 11px; }
.mini-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-stats span { font-size: 12px; font-weight: 700; background: var(--surface-2); padding: 4px 10px; border-radius: 999px; }
.plan-card { margin-top: 20px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--ok-soft); border: 1px solid #bfe9d9; display: flex; gap: 14px; align-items: center; }
.plan-card .ic { font-size: 26px; }
.plan-card b { display: block; }
.plan-card .muted { font-size: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 34px 0 14px; gap: 10px; }
.section-head .muted { font-size: 13px; }

.tutor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tutor { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 16px; cursor: pointer; text-align: left; transition: .15s; box-shadow: var(--shadow); color: var(--ink); }
.tutor:hover { transform: translateY(-3px); border-color: #cbc4ff; }
.tutor[aria-checked=true] { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(75, 59, 255, .14), var(--shadow); }
.tutor .ava { width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px; margin-bottom: 12px; }
.tutor .name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tutor .age { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.tutor p { margin: 6px 0 10px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: 11px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px; color: var(--ink-2); }
.play { position: absolute; top: 24px; right: 24px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); cursor: pointer; font-size: 14px; }
.picked, .play { z-index: 2; }
.picked { position: absolute; top: 24px; left: 24px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; display: none; }
.tutor[aria-checked=true] .picked { display: block; }

.lesson-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lesson { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 18px; cursor: pointer; text-align: left; transition: .15s; display: flex; gap: 14px; align-items: flex-start; color: var(--ink); }
.lesson:hover { border-color: #cbc4ff; }
.lesson[aria-checked=true] { border-color: var(--brand); background: linear-gradient(180deg, #fff, var(--brand-soft)); }
.lesson .ic { font-size: 26px; width: 50px; height: 50px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.lesson b { display: block; font-size: 15px; }
.lesson .en { font-size: 12px; color: var(--muted); }
.lesson p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.lvl { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 3px 8px; border-radius: 999px; }
.rec { position: absolute; top: -10px; left: 16px; font-size: 11px; font-weight: 800; background: var(--accent); color: #fff; padding: 3px 9px; border-radius: 999px; }

.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 110px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.row:last-child { border-bottom: 0; }
.row .wrong { color: var(--bad); text-decoration: line-through; font-size: 13px; }
.row .count { font-size: 12px; font-weight: 800; background: #fdeaee; color: var(--bad); padding: 2px 8px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--brand-soft); color: #2d1fb8; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chips span small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.sticky-cta { display: none; }

/* ---------- session (call screen) ---------- */
.session { display: grid; grid-template-columns: 1fr 380px; height: calc(100dvh - 64px); }
.call { position: relative; display: flex; flex-direction: column; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #3b2f9e 0%, #1d1752 55%, #120e33 100%); }
.call-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; gap: 10px; }
.call-title { display: flex; flex-direction: column; align-items: center; font-weight: 700; font-size: 14px; text-align: center; }
.timer { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.panel-toggle { position: relative; }
.dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.call-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; padding: 24px 20px 0; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.stage-ava { width: min(230px, 26vh); aspect-ratio: 1; position: relative; flex: none; margin-top: 10px; }
.stage-ava .ava { width: 100%; height: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); transition: transform .3s; border: 5px solid rgba(255, 255, 255, .15); }
.stage-ava::before, .stage-ava::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 3px solid transparent; opacity: 0; }
.stage-ava.speaking::before { border-color: rgba(160, 140, 255, .7); animation: ripple 1.6s infinite; }
.stage-ava.speaking::after { border-color: rgba(160, 140, 255, .5); animation: ripple 1.6s .8s infinite; }
.stage-ava.speaking .ava { animation: talk .5s ease-in-out infinite alternate; }
/* live lip-sync video sits over the still image and fades in while the tutor talks */
.live-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; border-radius: 50%; }
.live-video.show { opacity: 1; }
.stage-ava.live.speaking .ava { animation: none; }
.stage-ava.listening::before { border-color: rgba(255, 107, 107, .85); animation: ripple 1.1s infinite; }
.stage-ava.thinking .ava { animation: think 1.8s ease-in-out infinite; }
@keyframes ripple { 0% { transform: scale(.95); opacity: .9; } 100% { transform: scale(1.22); opacity: 0; } }
@keyframes talk { from { transform: scale(1) rotate(0); } to { transform: scale(1.02) rotate(.6deg); } }
@keyframes think { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg) translateY(-3px); } }
.wave { display: flex; gap: 5px; height: 26px; align-items: center; margin-top: 14px; opacity: 0; transition: opacity .2s; }
.wave.on { opacity: 1; }
.wave i { width: 5px; height: 6px; border-radius: 4px; background: #b9aaff; transition: height .08s; }
.tutor-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tutor-line b { font-size: 18px; }
.status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.status.listening { background: rgba(255, 107, 107, .3); }
.status.thinking { background: rgba(240, 160, 48, .3); }
.status.speaking { background: rgba(138, 92, 255, .45); }
.caption-card { width: min(680px, 100%); margin-top: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-lg); padding: 18px 20px 12px; backdrop-filter: blur(10px); }
.caption { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; margin: 0; min-height: 32px; text-align: center; transition: filter .2s; }
.caption.blur { filter: blur(7px); }
.caption.err { color: #ffb3c0; font-size: 15px; }
.translation { margin: 10px 0 0; text-align: center; color: #cfc7ff; font-size: 15px; font-style: italic; }
.caption-tools { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tool { border: 0; background: rgba(255, 255, 255, .1); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tool:hover { background: rgba(255, 255, 255, .2); }
.tool[aria-pressed=true] { background: rgba(138, 92, 255, .6); }
.you-said { min-height: 24px; margin: 14px 0 0; color: #ffc2cc; font-style: italic; text-align: center; max-width: 640px; }
.phrases { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 680px; }
.phrases button { border: 1px dashed rgba(255, 255, 255, .4); background: transparent; color: #fff; padding: 7px 12px; border-radius: 12px; font-size: 13px; cursor: pointer; }
.call-controls { display: flex; justify-content: center; align-items: flex-start; gap: 34px; padding: 14px 20px 20px; }
.ctl { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 58px; height: 58px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; align-content: center; margin-top: 10px; }
.ctl span { font-size: 20px; line-height: 1; }
.ctl small { font-size: 10px; opacity: .8; margin-top: 3px; }
.ctl[aria-pressed=true] { background: rgba(138, 92, 255, .6); }
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mic-wrap small { font-size: 12px; opacity: .8; }
.mic { width: 82px; height: 82px; border-radius: 50%; border: 0; font-size: 32px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8e53); box-shadow: 0 12px 30px rgba(255, 107, 107, .45); transition: transform .15s; }
.mic:hover { transform: scale(1.05); }
.mic.on { animation: micPulse 1s infinite; background: #fff; color: var(--accent); }
.mic.wait { background: rgba(255, 255, 255, .15); box-shadow: none; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 50% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }
.text-form { display: flex; gap: 8px; padding: 0 20px 20px; max-width: 700px; width: 100%; margin: 0 auto; }
.text-form input { flex: 1; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; font-family: inherit; outline: none; }
.text-form input::placeholder { color: rgba(255, 255, 255, .55); }
.toast { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); cursor: pointer; animation: drop .25s ease-out; z-index: 5; max-width: 90%; }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } }

.panel { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-close { display: none; }
.tabs { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.tab { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.tab.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.tabpane { flex: 1; overflow: auto; padding: 16px; }
.scores { display: grid; gap: 10px; margin-bottom: 16px; }
.score { display: grid; grid-template-columns: 84px 30px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.score b { font-size: 13px; text-align: right; }
.meter { height: 8px; background: var(--line); border-radius: 9px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, var(--warn), var(--ok)); transition: width .6s; }
.feedback-list { display: grid; gap: 10px; }
.turn { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; animation: drop2 .3s ease-out; }
@keyframes drop2 { from { opacity: 0; transform: translateY(-6px); } }
.turn-head { font-size: 12px; color: var(--muted); padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.fb { padding: 10px 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
.fb:last-child { border-bottom: 0; }
.fb .wrong { color: var(--bad); text-decoration: line-through; }
.fb .right { color: var(--ok); font-weight: 700; }
.fb .why { color: var(--muted); font-size: 13px; margin-top: 4px; }
.fb .tag { font-size: 11px; font-weight: 700; background: #fdeaee; color: var(--bad); padding: 1px 7px; border-radius: 999px; margin-right: 6px; }
.fb.good { background: var(--ok-soft); }
.fb.natural { background: var(--brand-soft); }
.fb.vocab b { color: var(--brand); }
.transcript { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.transcript .t { padding: 9px 13px; border-radius: 16px; max-width: 88%; line-height: 1.45; }
.transcript .t.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.transcript .t.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.transcript .conf { font-size: 11px; opacity: .75; display: block; margin-top: 3px; }

/* ---------- summary modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(18, 14, 51, .55); display: grid; place-items: center; padding: 20px; z-index: 40; backdrop-filter: blur(4px); }
.modal-card { background: #fff; border-radius: 28px; max-width: 560px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .3s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.sum-head { padding: 28px 28px 20px; text-align: center; color: #fff; background: linear-gradient(135deg, #3a2cf0, #8a5cff); }
.sum-head .big-emoji { font-size: 44px; }
.sum-head h2 { font-size: 24px; margin: 6px 0; }
.sum-head p { opacity: .92; margin: 0; font-size: 15px; line-height: 1.5; }
.sum-body { padding: 22px 28px 28px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -40px; margin-bottom: 18px; }
.stat-row div { background: #fff; border-radius: 16px; padding: 12px; text-align: center; box-shadow: var(--shadow); font-size: 12px; color: var(--muted); }
.stat-row b { display: block; font-size: 22px; color: var(--ink); }
.sum-list { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.sum-list li { padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.sum-list.good li { background: var(--ok-soft); }
.sum-list.todo li { background: #fff5e3; }
.next-box { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--brand-soft); margin: 6px 0 18px; }
.next-box .ic { font-size: 26px; }
.sum-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loading { padding: 50px 28px; text-align: center; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 1s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .tutor-grid { grid-template-columns: repeat(2, 1fr); }
  .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .session { grid-template-columns: 1fr; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; height: 72vh; border-radius: 24px 24px 0 0; z-index: 30; box-shadow: var(--shadow-lg); transform: translateY(105%); transition: transform .3s; border: 0; }
  .panel.open { transform: none; }
  .panel-close { display: block; }
}
@media (min-width: 981px) { .panel-toggle { display: none; } }
@media (max-width: 760px) {
  .ob-layout { grid-template-columns: 1fr; gap: 20px; min-height: auto; }
  .ob-hero h1 { font-size: 26px; margin: 16px 0 10px; }
  .ob-points { display: none; }
  .hero { grid-template-columns: 1fr; }
  .lesson-grid, .progress-grid { grid-template-columns: 1fr; }
  .options.cols { grid-template-columns: 1fr; }
  .hero-cta .btn { display: none; }
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 35%); z-index: 15; }
  .pill#xpBadge { display: none; }
  .call-controls { gap: 22px; }
  .stage-ava { width: min(190px, 26vh); }
  .session { height: 100dvh; }
  .call-top .btn { white-space: nowrap; }
  .call-title { font-size: 13px; }
  .caption-card { padding: 14px 14px 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
