/* =====================================================================
   PTE Master — design system
   Mobile-first, dark by default, light theme supported.
   ===================================================================== */

:root {
  --bg: #0a0a10;
  --bg-2: #0f0f17;
  --surface: #13131c;
  --surface-2: #1a1a25;
  --surface-3: #242432;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f4f7;
  --text-2: #a9a9b8;
  --text-3: #6f6f82;
  --brand: #7c6cff;
  --brand-2: #a855f7;
  --brand-soft: rgba(124, 108, 255, .14);
  --brand-grad: linear-gradient(135deg, #6d5bff 0%, #9b5cff 52%, #e0529c 100%);
  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, .14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, .15);
  --bad: #f43f5e;
  --bad-soft: rgba(244, 63, 94, .14);
  --sp: #fb7185;
  --wr: #fbbf24;
  --rd: #34d399;
  --ls: #60a5fa;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow: 0 14px 40px -14px rgba(0, 0, 0, .7);
  --shadow-sm: 0 4px 14px -6px rgba(0, 0, 0, .5);
  --tabbar-h: 62px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --read-size: 17px;
  --glass: rgba(10, 10, 16, .78);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --bg-2: #ececf3;
  --surface: #ffffff;
  --surface-2: #f3f3f8;
  --surface-3: #e7e7ef;
  --line: rgba(15, 15, 30, .08);
  --line-2: rgba(15, 15, 30, .16);
  --text: #111118;
  --text-2: #55556a;
  --text-3: #8b8b9c;
  --brand-soft: rgba(124, 108, 255, .12);
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, .12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, .12);
  --bad: #e11d48;
  --bad-soft: rgba(225, 29, 72, .1);
  --sp: #e11d48;
  --wr: #d97706;
  --rd: #059669;
  --ls: #2563eb;
  --shadow: 0 14px 40px -18px rgba(20, 20, 50, .35);
  --shadow-sm: 0 4px 14px -8px rgba(20, 20, 50, .3);
  --glass: rgba(244, 244, 248, .82);
  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 0% -12%, rgba(109, 91, 255, .20), transparent 62%),
    radial-gradient(640px 420px at 110% -6%, rgba(224, 82, 156, .12), transparent 60%);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(900px 520px at 0% -12%, rgba(109, 91, 255, .12), transparent 62%),
    radial-gradient(640px 420px at 110% -6%, rgba(224, 82, 156, .08), transparent 60%);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
.i { width: 20px; height: 20px; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: rgba(124, 108, 255, .35); }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
#app {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
}
body.full #app { padding-top: 0; padding-bottom: calc(100px + var(--safe-b)); }
.view { animation: view-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }
.stack-sm { display: grid; gap: 8px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.wrap { flex-wrap: wrap; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scroll-x { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex: none; }

/* ---------- type ---------- */
.h1 { font: 800 28px/1.12 var(--font-display); letter-spacing: -.025em; }
.h2 { font: 760 21px/1.2 var(--font-display); letter-spacing: -.015em; }
.h3 { font: 700 16px/1.3 var(--font); letter-spacing: -.005em; }
.t-sm { font-size: 13px; }
.t-xs { font-size: 12px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.bold { font-weight: 700; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11.5px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-ok { color: var(--ok); } .c-bad { color: var(--bad); } .c-warn { color: var(--warn); } .c-brand { color: var(--brand); }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.page-head .sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card.pad-lg { padding: 20px; }
.card.flat { background: var(--surface-2); border-color: transparent; }
.card.tap { transition: transform .15s ease, border-color .2s, background .2s; cursor: pointer; }
.card.tap:active { transform: scale(.985); }
@media (hover: hover) { .card.tap:hover { border-color: var(--line-2); } }
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(109, 91, 255, .34), transparent 55%),
    radial-gradient(100% 120% at 100% 100%, rgba(224, 82, 156, .2), transparent 55%),
    var(--surface);
}
[data-theme="light"] .hero {
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(109, 91, 255, .16), transparent 55%),
    radial-gradient(100% 120% at 100% 100%, rgba(224, 82, 156, .1), transparent 55%),
    var(--surface);
}
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 10px; }
.section-title h2 { font: 750 17px/1.2 var(--font-display); letter-spacing: -.01em; }
.section-title .link { font-size: 14px; font-weight: 650; color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.005em;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  transition: transform .12s ease, background .2s, opacity .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand-grad); color: #fff; border: 0; box-shadow: 0 10px 26px -10px rgba(124, 108, 255, .75); }
.btn.primary:active { box-shadow: 0 4px 12px -6px rgba(124, 108, 255, .6); }
.btn.ok { background: var(--ok); color: #fff; border: 0; }
.btn.rec { background: var(--bad); color: #fff; border: 0; box-shadow: 0 10px 26px -10px rgba(244, 63, 94, .7); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.outline { background: transparent; }
.btn.block { width: 100%; }
.btn.lg { height: 56px; font-size: 16.5px; border-radius: 16px; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn[disabled], .btn.disabled { opacity: .42; pointer-events: none; }
.icon-btn {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background .15s, transform .12s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: var(--surface-2); transform: scale(.94); }
.icon-btn.filled { background: var(--surface); border: 1px solid var(--line); }
.link-btn { color: var(--brand); font-weight: 650; font-size: 14px; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; }
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.hot { background: linear-gradient(135deg, rgba(251, 113, 133, .18), rgba(251, 191, 36, .18)); color: #fb923c; border-color: transparent; }
.code {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  font: 800 13.5px/1 var(--font-display);
  letter-spacing: .02em;
  color: #fff;
  flex: none;
}
.code.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 11.5px; }
.code.speaking { background: linear-gradient(135deg, #fb7185, #e11d48); }
.code.writing { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.code.reading { background: linear-gradient(135deg, #34d399, #0d9488); }
.code.listening { background: linear-gradient(135deg, #60a5fa, #4f46e5); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- tab bar ---------- */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 0 10px var(--safe-b);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-top: 1px solid var(--line);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
#tabbar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabbar-h); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10.5px; font-weight: 700; letter-spacing: .01em; transition: color .2s; }
.tab svg { width: 24px; height: 24px; transition: transform .2s; }
.tab .pill { position: absolute; top: 7px; width: 54px; height: 30px; border-radius: 999px; background: var(--brand-soft); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.3); z-index: -1; }
.tab.on { color: var(--text); }
.tab.on .pill { opacity: 1; transform: scale(1); }
.tab.on svg { color: var(--brand); }
body.full #tabbar, body.kb-open #tabbar { transform: translateY(115%); }

/* ---------- forms ---------- */
.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { min-height: 170px; resize: vertical; line-height: 1.6; display: block; }
.textarea.tall { min-height: 320px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b8b9c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field { display: grid; gap: 6px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }

.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; background: var(--surface-3); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: #fff; transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(20px); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 2px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg button { height: 36px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--text-2); transition: background .2s, color .2s; padding: 0 6px; white-space: nowrap; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }
.seg.sticky { position: sticky; top: calc(var(--safe-t) + 8px); z-index: 20; background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.choice { padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; transition: border-color .15s, background .15s; }
.choice .ttl { font-weight: 750; font-size: 15px; }
.choice .desc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.choice.on { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- list rows (settings) ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list-title { font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 22px 6px 8px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; width: 100%; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.row .ic svg { width: 19px; height: 19px; }
.row .ttl { font-weight: 650; font-size: 15px; }
.row .desc { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.row .end { margin-left: auto; color: var(--text-2); display: flex; align-items: center; gap: 6px; font-size: 14px; flex: none; }
.row .end svg { width: 18px; height: 18px; color: var(--text-3); }
.row.tap:active { background: var(--surface-2); }
.row.col { flex-direction: column; align-items: stretch; }

/* ---------- progress primitives ---------- */
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand-grad); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.bar.thin { height: 5px; }
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .ring-v { font: 800 28px/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring .ring-l { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.ring circle { transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }

.skills { display: grid; gap: 10px; }
.skill { display: grid; grid-template-columns: 78px 1fr 30px; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; }
.skill .v { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.skill .bar > i { background: currentColor; }

.stat { display: grid; gap: 2px; }
.stat .v { font: 800 22px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--text-3); font-weight: 650; }

/* ---------- home ---------- */
.greet .hi { color: var(--text-2); font-size: 15px; font-weight: 600; }
.cta-big {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--brand-grad);
  color: #fff;
  text-align: left;
  box-shadow: 0 18px 40px -18px rgba(124, 108, 255, .9);
  transition: transform .15s;
}
.cta-big:active { transform: scale(.985); }
.cta-big .ic { width: 48px; height: 48px; border-radius: 15px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.cta-big .ic svg { width: 26px; height: 26px; }
.cta-big .ttl { font: 800 17px/1.2 var(--font-display); }
.cta-big .desc { font-size: 13px; opacity: .88; margin-top: 2px; }
.drill { width: 150px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; display: grid; gap: 10px; transition: transform .15s; }
.drill:active { transform: scale(.97); }
.drill .name { font-weight: 750; font-size: 14px; line-height: 1.25; }
.drill .meta { font-size: 12px; color: var(--text-3); }
.recent { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.recent + .recent { border-top: 1px solid var(--line); }
.score-pill { min-width: 44px; height: 30px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.score-pill.hi { background: var(--ok-soft); color: var(--ok); }
.score-pill.mid { background: var(--warn-soft); color: var(--warn); }
.score-pill.lo { background: var(--bad-soft); color: var(--bad); }
.score-pill.na { background: var(--surface-2); color: var(--text-3); }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--warn-soft); border: 1px solid transparent; color: var(--text); }
.banner.info { background: var(--brand-soft); }
.banner svg { width: 22px; height: 22px; flex: none; color: var(--warn); }
.banner.info svg { color: var(--brand); }

/* ---------- practice library ---------- */
.task-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); width: 100%; text-align: left; transition: transform .15s, border-color .2s; }
.task-card:active { transform: scale(.985); }
.task-card .name { font-weight: 750; font-size: 15.5px; }
.task-card .desc { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.task-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.task-card .avg { text-align: right; flex: none; }
.task-card .avg .v { font: 800 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.task-card .avg .l { font-size: 11px; color: var(--text-3); margin-top: 3px; font-weight: 650; }
.part-head { display: flex; align-items: center; gap: 10px; margin: 24px 2px 10px; }
.part-head h2 { font: 760 17px/1.2 var(--font-display); }
.part-head .dim { font-size: 13px; }

/* ---------- session ---------- */
.sess-head {
  position: sticky; top: 0; z-index: 30;
  margin: 0 -16px 14px;
  padding: calc(var(--safe-t) + 6px) 8px 8px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.sess-head .top { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 8px; }
.sess-head .ttl { font-weight: 760; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-head .sub { font-size: 12px; color: var(--text-3); font-weight: 650; margin-top: 1px; }
.sess-head .right { display: flex; align-items: center; gap: 4px; }
.timer { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; background: var(--surface-2); font: 700 14.5px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.timer svg { width: 15px; height: 15px; color: var(--text-3); }
.timer.warn { color: var(--warn); background: var(--warn-soft); }
.timer.bad { color: var(--bad); background: var(--bad-soft); animation: blink 1s steps(2) infinite; }
.timer.idle { color: var(--text-2); }
.sess-progress { height: 3px; background: var(--line); margin: 8px -8px -8px; }
.sess-progress > i { display: block; height: 100%; width: 0; background: var(--brand-grad); transition: width .4s; }

.instr { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.instr-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.instr-card svg { width: 18px; height: 18px; color: var(--text-3); margin-top: 1px; flex: none; }
.instr-card.collapsed .instr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
  transition: transform .25s;
}
.actionbar .inner { max-width: 728px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.actionbar .btn { flex: 1; }
.actionbar .btn.fit { flex: none; }
.actionbar .note { flex: 1; font-size: 13px; color: var(--text-2); font-weight: 600; }
body.kb-open .actionbar { transform: translateY(120%); }

.passage { font-size: var(--read-size); line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.passage p + p { margin-top: .8em; }
.passage.gaps { line-height: 2.25; }
.passage-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.q { font-weight: 700; font-size: 16px; line-height: 1.45; }
.label { font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }

/* status panel (audio / recording) */
.status { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.status .s-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; position: relative; }
.status .s-ic svg { width: 22px; height: 22px; }
.status .s-lbl { font-weight: 750; font-size: 15px; }
.status .s-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; font-variant-numeric: tabular-nums; }
.status .s-track { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 9px; }
.status .s-track > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand-grad); }
.status .s-time { font: 800 20px/1 var(--mono); font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 8px; }
.status.play .s-ic { background: var(--brand-soft); color: var(--brand); }
.status.prep .s-ic { background: var(--warn-soft); color: var(--warn); }
.status.rec { border-color: rgba(244, 63, 94, .45); background: linear-gradient(0deg, var(--bad-soft), var(--bad-soft)), var(--surface); }
.status.rec .s-ic { background: var(--bad); color: #fff; }
.status.rec .s-ic::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--bad); animation: ping 1.4s cubic-bezier(0, 0, .2, 1) infinite; }
.status.rec .s-track > i { background: var(--bad); }
.status.done .s-ic { background: var(--ok-soft); color: var(--ok); }
.status.wait .s-ic svg { animation: spin 1s linear infinite; }
.status.err { border-color: rgba(244, 63, 94, .4); }
.status.err .s-ic { background: var(--bad-soft); color: var(--bad); }
.wave { width: 100%; height: 42px; margin-top: 8px; display: block; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; border-radius: 2px; background: currentColor; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }

/* speakers (group discussion) */
.speakers { display: flex; gap: 10px; justify-content: space-around; padding: 6px 0 2px; }
.spk { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); transition: color .2s, transform .2s; }
.spk .av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 800 20px/1 var(--font-display); color: #fff; opacity: .55; transition: opacity .2s, box-shadow .2s, transform .2s; }
.spk.on { color: var(--text); }
.spk.on .av { opacity: 1; transform: scale(1.08); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px currentColor; }

/* blanks (reading & listening) */
.blank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 92px; height: 34px;
  padding: 0 12px; margin: 0 2px;
  border-radius: 10px;
  border: 1.5px dashed var(--line-2);
  background: var(--surface-2);
  color: var(--text-3);
  vertical-align: middle;
  font-weight: 700; font-size: 15px;
  line-height: 1;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.blank .n { font-size: 11px; opacity: .8; }
.blank.filled { border-style: solid; border-color: var(--brand); color: var(--text); background: var(--brand-soft); }
.blank.active { box-shadow: 0 0 0 4px var(--brand-soft); border-color: var(--brand); }
.blank.drop { box-shadow: 0 0 0 4px var(--brand-soft); border-color: var(--brand); border-style: solid; }
.blank.ok { border-style: solid; border-color: var(--ok); background: var(--ok-soft); color: var(--text); }
.blank.bad { border-style: solid; border-color: var(--bad); background: var(--bad-soft); color: var(--text); }
.blank .fix { color: var(--ok); margin-left: 6px; }
.blank.bad .yours { text-decoration: line-through; opacity: .7; }
.gap-input {
  display: inline-block;
  width: 9ch; min-width: 7ch; max-width: 60vw;
  height: 34px;
  padding: 0 8px; margin: 0 2px;
  border-radius: 9px;
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font: 650 16px var(--font);
  vertical-align: middle;
  outline: none;
}
.gap-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gap-input.ok { border-color: var(--ok); background: var(--ok-soft); }
.gap-input.bad { border-color: var(--bad); background: var(--bad-soft); }
.gap-fix { font-weight: 800; color: var(--ok); margin: 0 4px 0 2px; font-size: 15px; }

.bank {
  position: sticky;
  bottom: calc(80px + var(--safe-b));
  z-index: 10;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.word-chip {
  height: 40px; padding: 0 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  font-weight: 700; font-size: 15px;
  touch-action: none;
  transition: transform .12s, background .15s, opacity .2s, border-color .15s;
}
.word-chip:active { transform: scale(.95); }
.word-chip.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.word-chip.used { opacity: .25; pointer-events: none; }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; transform: translate(-50%, -60%) scale(1.06); box-shadow: var(--shadow); background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }

/* options */
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-size: 15.5px; line-height: 1.45;
  transition: border-color .15s, background .15s, transform .12s;
  -webkit-user-select: text; user-select: text;
}
.opt:active { transform: scale(.99); }
.opt .mk { flex: none; width: 24px; height: 24px; margin-top: -1px; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.opt .mk svg { width: 15px; height: 15px; }
.opt.radio .mk { border-radius: 50%; }
.opt .lt { font-weight: 800; color: var(--text-3); margin-right: 2px; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt.on .mk { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); }
.opt.ok .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.bad { border-color: var(--bad); background: var(--bad-soft); }
.opt.bad .mk { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.missed { border-color: var(--ok); border-style: dashed; }
.opt.locked { pointer-events: none; }

/* re-order */
.ro-zone { display: grid; gap: 10px; }
.ro-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: 15.5px; line-height: 1.5;
  text-align: left; width: 100%;
  transition: transform .2s, border-color .15s, opacity .2s, box-shadow .2s;
  position: relative;
}
.ro-card .num { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-2); color: var(--text-3); }
.ro-card.placed .num { background: var(--brand-grad); color: #fff; }
.ro-card .txt { flex: 1; min-width: 0; }
.ro-card .ctrls { display: flex; flex-direction: column; gap: 2px; margin: -6px -6px -6px 0; }
.ro-card .ctrls .icon-btn { width: 34px; height: 34px; }
.ro-card .ctrls .icon-btn svg { width: 18px; height: 18px; }
.ro-card .handle { touch-action: none; cursor: grab; }
.ro-card.dragging { opacity: .9; box-shadow: var(--shadow); border-color: var(--brand); z-index: 5; }
.ro-card.ok { border-color: var(--ok); }
.ro-card.bad { border-color: var(--bad); }
.ro-card.src:active { transform: scale(.985); }
.ro-empty { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 20px; text-align: center; color: var(--text-3); font-size: 14px; font-weight: 600; }
.ro-link { font-size: 12px; font-weight: 750; margin: -4px 0 -4px 40px; display: flex; align-items: center; gap: 6px; }

/* highlight incorrect words */
.hiw { font-size: var(--read-size); line-height: 2; }
.hiw .w { padding: 3px 2px; margin: 0 -1px; border-radius: 7px; cursor: pointer; transition: background .12s, color .12s; -webkit-user-select: none; user-select: none; }
.hiw .w.on { background: #fde047; color: #111; }
.hiw .w.ok { background: var(--ok); color: #fff; }
.hiw .w.bad { background: var(--bad); color: #fff; }
.hiw .w.missed { box-shadow: inset 0 -3px 0 var(--ok); background: var(--ok-soft); }
.hiw .said { font-size: 12px; font-weight: 800; color: var(--ok); vertical-align: super; margin-left: 1px; }

/* writing */
.write-box { position: relative; }
.write-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.wc { font-variant-numeric: tabular-nums; }
.wc.ok { color: var(--ok); } .wc.warn { color: var(--warn); } .wc.bad { color: var(--bad); }
.notes { font-size: 14px; min-height: 90px; background: var(--surface-2); border-style: dashed; }
details.fold { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary svg { width: 18px; height: 18px; color: var(--text-3); transition: transform .2s; }
details.fold[open] > summary svg.chev { transform: rotate(90deg); }
details.fold > .body { padding: 0 16px 16px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.bullets { display: grid; gap: 6px; }
.bullets li { position: relative; padding-left: 16px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* charts (describe image) */
.paper { background: #fff; color: #1b1b24; border-radius: 16px; padding: 12px 10px 8px; box-shadow: var(--shadow-sm); overflow: hidden; }
.paper svg text { font-family: var(--font); }
.paper table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: #1b1b24; }
.paper th, .paper td { padding: 8px 8px; border-bottom: 1px solid #e6e6ee; text-align: left; }
.paper th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #555; background: #f4f4f9; }
.paper td:not(:first-child), .paper th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.paper .ch-title { font-weight: 800; font-size: 15px; text-align: center; margin: 4px 6px 8px; line-height: 1.3; }
.process { display: grid; gap: 0; padding: 4px 6px 8px; }
.process .step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #f1f0ff; border: 1px solid #dcd8ff; font-weight: 650; font-size: 14px; }
.process .step b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #6d5bff; color: #fff; font-size: 12.5px; flex: none; }
.process .arrow { display: grid; place-items: center; height: 22px; color: #8b83ff; }
.process .arrow svg { width: 18px; height: 18px; }

/* results */
.result { animation: rise .4s cubic-bezier(.2, .8, .2, 1) both; }
.result .head { display: flex; gap: 16px; align-items: center; }
.result .verdict { font: 800 20px/1.2 var(--font-display); letter-spacing: -.01em; }
.result .raw { font-size: 14px; color: var(--text-2); margin-top: 3px; font-weight: 600; }
.traits { display: grid; gap: 12px; margin-top: 16px; }
.trait .top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.trait .top .v { font-variant-numeric: tabular-nums; color: var(--text-2); }
.fb { font-size: 14.5px; line-height: 1.6; color: var(--text); }
.fb-list { display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.fb-list li { display: flex; gap: 8px; }
.fb-list li svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.err-item { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.5; }
.err-item .from { color: var(--bad); text-decoration: line-through; font-weight: 650; }
.err-item .to { color: var(--ok); font-weight: 750; }
.err-item .why { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.align { font-size: 16px; line-height: 1.9; }
.align .w { padding: 1px 2px; border-radius: 5px; }
.align .w.ok { color: var(--ok); }
.align .w.miss { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 2px; }
.align .w.sub { color: var(--warn); box-shadow: inset 0 -2px 0 var(--warn); }
.align .w.ins { color: var(--text-3); font-style: italic; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); font-weight: 650; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.player { display: flex; align-items: center; gap: 10px; }
.quote { border-left: 3px solid var(--brand); padding: 4px 0 4px 12px; font-size: 15px; line-height: 1.6; color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--text-3); font-weight: 650; }
.kv dd { margin: 0; font-weight: 650; }

/* summary / report */
.report-skill { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.report-skill .bar { grid-column: 1 / -1; height: 10px; }
.report-skill .n { font: 800 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.big-score { font: 850 64px/1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-weight: 750; padding: 0 8px 8px; }
.table td { padding: 11px 8px; border-top: 1px solid var(--line); }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* sheet / dialog / toast */
.backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.backdrop.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  max-width: 640px; margin: 0 auto;
  max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 6px 18px calc(18px + var(--safe-b));
  transform: translateY(105%);
  transition: transform .32s cubic-bezier(.2, .9, .25, 1);
  box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .6);
}
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 6px auto 14px; }
.sheet .sheet-title { font: 780 19px/1.25 var(--font-display); margin-bottom: 6px; }
.sheet .sheet-text { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.sheet .ctx { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 15px; line-height: 1.6; color: var(--text-2); margin-bottom: 14px; }
.sheet .ctx b { color: var(--text); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; }
.pick-list { display: grid; gap: 8px; }
.pick { height: 54px; border-radius: 15px; background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 750; font-size: 16.5px; transition: transform .12s, background .15s, border-color .15s; }
.pick:active { transform: scale(.98); }
.pick.on { border-color: var(--brand); background: var(--brand-soft); }
#toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 10px); z-index: 120; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 480px; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 650; line-height: 1.4; animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2) both; }
.toast.out { animation: toast-out .25s ease-in both; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.ok svg { color: var(--ok); } .toast.bad svg { color: var(--bad); } .toast.warn svg { color: var(--warn); } .toast.info svg { color: var(--brand); }
.toast .act { margin-left: 6px; color: var(--brand); font-weight: 800; }

/* loading */
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-3) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
.spinner.lg { width: 40px; height: 40px; border-width: 3.5px; }
.loading-card { display: grid; justify-items: center; gap: 14px; padding: 36px 20px; text-align: center; }
.loading-card .ttl { font-weight: 750; font-size: 16px; }
.loading-card .sub { font-size: 13.5px; color: var(--text-2); max-width: 300px; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 20px; color: var(--text-2); }
.empty svg { width: 42px; height: 42px; color: var(--text-3); }

/* onboarding */
.onb { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 22px) 4px calc(var(--safe-b) + 20px); }
.onb .body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.onb .logo { width: 84px; height: 84px; border-radius: 26px; background: var(--brand-grad); display: grid; place-items: center; box-shadow: 0 20px 50px -18px rgba(124, 108, 255, .9); }
.onb .logo svg { width: 44px; height: 44px; color: #fff; }
.onb .dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.onb .dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line-2); transition: width .3s, background .3s; }
.onb .dots i.on { width: 22px; background: var(--brand); }
.feature { display: flex; gap: 14px; align-items: center; }
.feature .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.feature .ic svg { width: 21px; height: 21px; color: var(--brand); }
.feature .ttl { font-weight: 750; font-size: 15px; }
.feature .desc { font-size: 13.5px; color: var(--text-2); }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

/* ---------- animations ---------- */
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 75%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes blink { 50% { opacity: .55; } }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@keyframes pop { 0% { transform: scale(.8); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
.pop { animation: pop .45s cubic-bezier(.2, .9, .3, 1.3) both; }

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

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
  #app { padding-left: 24px; padding-right: 24px; }
  .sess-head { margin-left: -24px; margin-right: -24px; padding-left: 16px; padding-right: 16px; }
  .h1 { font-size: 32px; }
  :root { --read-size: 18px; }
  .scroll-x { margin: 0; padding: 2px 0 6px; flex-wrap: wrap; overflow: visible; }
  .drill { width: calc((100% - 30px) / 4); }
}
@media (min-width: 1000px) {
  #tabbar { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 460px; border-radius: 22px; border: 1px solid var(--line-2); padding: 0 6px; box-shadow: var(--shadow); }
  body.full #tabbar, body.kb-open #tabbar { transform: translate(-50%, 160%); }
}

/* ---------- extras ---------- */
.blank svg { width: 14px; height: 14px; margin-left: 4px; opacity: .55; }
.blank.filled svg { opacity: .8; }
.err-span { background: var(--bad-soft); box-shadow: inset 0 -2px 0 var(--bad); border-radius: 4px; padding: 0 1px; }
.passage-card .label + .passage { margin-top: 2px; }
a.recent { color: inherit; }
a.recent:active, a.task-card:active { background: var(--surface-2); }
.instr-card { width: 100%; text-align: left; }
.hero .skills { min-width: 0; }
.row-flex > .grow { min-width: 0; }
.status .grow { min-width: 0; }
.status .s-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code svg { width: 22px; height: 22px; }
.code.sm svg { width: 17px; height: 17px; }
.chip.ok svg, .chip.hot svg, .chip.brand svg, .chip.warn svg { color: currentColor; }
.cta-big > svg { width: 22px; height: 22px; opacity: .85; }
.banner > svg:last-child { color: var(--text-3); width: 18px; height: 18px; }
.sess-head .icon-btn { color: var(--text); }
.pick-list .pick { width: 100%; }
a.card { display: block; color: inherit; }
a.card.row-flex, button.card.row-flex { display: flex; }
button.card { font: inherit; color: inherit; }
.skill .bar { height: 7px; }
details.fold > summary .chev { margin-left: auto; color: var(--text-3); }
details.fold > summary svg:first-child { color: var(--brand); }
details.fold[open] > summary .chev { transform: rotate(90deg); }
details.fold[open] > summary { padding-bottom: 8px; }
.quote { white-space: pre-wrap; }
.secret { -webkit-text-security: disc; text-security: disc; font-family: var(--mono); letter-spacing: .04em; }
.row .end { max-width: 62%; min-width: 0; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
