:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #3c3c3c;
  --ink-strong: #292929;
  --muted: #777777;
  --muted-2: #a0a0a0;
  --line: #e5e5e5;
  --line-strong: #d7d7d7;
  --green: #58cc02;
  --green-dark: #46a302;
  --green-soft: #d7ffb8;
  --green-ink: #2f7d00;
  --blue: #1cb0f6;
  --blue-dark: #1899d6;
  --blue-soft: #ddf4ff;
  --yellow: #ffc800;
  --yellow-dark: #e5a900;
  --yellow-soft: #fff4cc;
  --red: #ff4b4b;
  --red-dark: #d93b3b;
  --red-soft: #ffdfdf;
  --purple: #ce82ff;
  --purple-dark: #ad62dd;
  --purple-soft: #f3e1ff;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --shadow-float: 0 12px 32px rgba(60, 60, 60, .12);
  --shell: 1180px;
  --focus: 0 0 0 4px rgba(28, 176, 246, .22);
  font-family: "Arial Rounded MT Bold", "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus); }
button:disabled { cursor: not-allowed; opacity: .48; }
img, video { max-width: 100%; }
::selection { background: var(--green-soft); color: var(--ink-strong); }

.icon { width: 1em; height: 1em; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em; }
.icon-fill { fill: currentColor; }

.app-shell { width: min(100%, var(--shell)); min-height: 100dvh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); }
.view-narrow { width: min(100%, 780px); margin-inline: auto; }
.view-medium { width: min(100%, 980px); margin-inline: auto; }

.topbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.brand-wrap { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--green); border-bottom: 4px solid var(--green-dark); flex: 0 0 auto; }
.brand-mark .icon { font-size: 24px; }
.brand-title { font-size: 24px; font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn { min-width: 44px; min-height: 44px; padding: 0 13px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; cursor: pointer; transition: transform .08s ease, border-color .15s ease, background .15s ease; }
.icon-btn:hover { border-color: var(--line-strong); background: #fcfcfc; }
.icon-btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; margin-top: 2px; }
.icon-btn .icon { font-size: 20px; }
.icon-btn-label { display: none; }

.card { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: var(--radius-lg); padding: 18px; }
.card-flat { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.card-soft { background: var(--surface-2); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 26px 2px 11px; }
.section-title h2 { margin: 0; font-size: 20px; line-height: 1.15; color: var(--ink-strong); letter-spacing: -.02em; }
.section-title p { margin: 4px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
strong { color: var(--ink-strong); }

.hero { position: relative; overflow: hidden; padding: clamp(22px, 4vw, 34px); border: 0; border-bottom: 6px solid var(--green-dark); border-radius: var(--radius-xl); background: var(--green); color: #fff; min-height: 214px; display: grid; align-content: center; }
.hero:before, .hero:after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero:before { width: 210px; height: 210px; right: -70px; top: -92px; background: rgba(255,255,255,.15); }
.hero:after { width: 116px; height: 116px; right: 88px; bottom: -62px; background: rgba(70,163,2,.28); }
.hero-icon { width: 48px; height: 48px; border-radius: 17px; display: grid; place-items: center; background: rgba(255,255,255,.2); margin-bottom: 14px; }
.hero-icon .icon { font-size: 27px; }
.hero-kicker { position: relative; z-index: 1; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.hero-count { position: relative; z-index: 1; margin: 5px 0 3px; font-size: clamp(46px, 10vw, 72px); font-weight: 950; line-height: .98; letter-spacing: -.055em; color: #fff; }
.hero-note { position: relative; z-index: 1; width: min(100%, 530px); font-size: 14px; font-weight: 700; line-height: 1.45; color: rgba(255,255,255,.9); }
.hero-trust { position: relative; z-index: 1; margin-top: 15px; width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,.18); font-size: 12px; font-weight: 800; }

.dashboard-grid { display: grid; gap: 18px; }
.dashboard-main, .dashboard-side { min-width: 0; }
.dashboard-side { display: grid; align-content: start; gap: 16px; }
.side-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; font-weight: 900; font-size: 16px; }
.side-card-title .icon { font-size: 21px; color: var(--green); }

.goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.goal { min-width: 0; padding: 15px 13px 13px; }
.goal-head { display: flex; align-items: center; gap: 9px; }
.goal-icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; }
.goal-icon .icon { font-size: 21px; }
.goal-study .goal-icon { color: var(--blue-dark); background: var(--blue-soft); }
.goal-book .goal-icon { color: var(--purple-dark); background: var(--purple-soft); }
.goal-questions .goal-icon { color: #9c7800; background: var(--yellow-soft); }
.goal strong { display: block; margin-top: 12px; font-size: 17px; line-height: 1; }
.goal-label { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.progress { height: 9px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: #ededed; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--green); transition: width .35s ease; }
.goal-study .progress > i { background: var(--blue); }
.goal-book .progress > i { background: var(--purple); }
.goal-questions .progress > i { background: var(--yellow); }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.action-card { min-height: 132px; padding: 16px; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 21px; background: var(--surface); display: grid; grid-template-columns: 48px 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; text-align: left; cursor: pointer; transition: transform .08s ease, border-color .15s ease, background .15s ease; }
.action-card:hover { border-color: var(--line-strong); background: #fdfdfd; }
.action-card:active { transform: translateY(3px); border-bottom-width: 2px; }
.action-card.complete { border-color: #a9e97e; background: #fbfff8; }
.action-icon { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; }
.action-icon .icon { font-size: 26px; }
.action-study .action-icon { color: var(--blue-dark); background: var(--blue-soft); }
.action-book .action-icon { color: var(--purple-dark); background: var(--purple-soft); }
.action-test .action-icon { color: #9c7800; background: var(--yellow-soft); }
.action-exam .action-icon { color: var(--green-ink); background: var(--green-soft); }
.action-copy strong { display: block; font-size: 17px; line-height: 1.15; }
.action-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 650; }
.action-chevron { color: var(--muted-2); font-size: 20px; }

.streak-card { display: flex; align-items: center; gap: 13px; }
.streak-badge { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--yellow-soft); color: #b28700; flex: 0 0 auto; }
.streak-badge .icon { font-size: 29px; }
.streak-number { font-size: 24px; font-weight: 950; line-height: 1; }
.trust-card { background: var(--blue-soft); border-color: #b8e6fb; color: #166f99; }
.trust-card strong { color: #125f83; }

.chart { height: 118px; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 8px; margin-top: 8px; }
.chart-col { height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 7px; }
.chart-track { width: 72%; height: 86px; border-radius: 999px; background: #f0f0f0; display: flex; align-items: end; overflow: hidden; }
.chart-bar { width: 100%; min-height: 5px; border-radius: 999px; background: var(--green); }
.chart-col label { font-size: 10px; color: var(--muted); font-weight: 800; }

.list { display: grid; gap: 9px; }
.list-item { min-width: 0; padding: 13px 14px; border: 2px solid var(--line); border-radius: 17px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list-item .meta { min-width: 0; }
.list-item .meta > strong { display: block; line-height: 1.3; }
.list-item small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.list-leading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.list-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--green-ink); background: var(--green-soft); flex: 0 0 auto; }
.list-icon .icon { font-size: 20px; }
.status-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; background: #efefef; color: var(--muted); }
.status-badge.ready { background: var(--green-soft); color: var(--green-ink); }
.status-badge.pending { background: var(--yellow-soft); color: #8d6b00; }
.status-badge.error { background: var(--red-soft); color: #a92f2f; }

.btn { min-height: 50px; width: 100%; padding: 13px 17px; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 16px; background: var(--surface); color: var(--ink-strong); display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 900; cursor: pointer; transition: transform .08s ease, filter .15s ease, background .15s ease; }
.btn:hover:not(:disabled) { filter: brightness(.99); }
.btn:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 2px; }
.btn.primary { color: #fff; background: var(--green); border-color: var(--green); border-bottom-color: var(--green-dark); }
.btn.blue { color: #fff; background: var(--blue); border-color: var(--blue); border-bottom-color: var(--blue-dark); }
.btn.danger { color: #a92f2f; background: var(--red-soft); border-color: #ffc2c2; border-bottom-color: #f1aaaa; }
.btn.ghost { color: var(--muted); background: transparent; border-color: transparent; border-bottom-color: transparent; }
.btn.compact { width: auto; min-height: 42px; padding: 9px 12px; border-radius: 13px; }
.btn .icon { font-size: 20px; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }

.field { display: grid; gap: 7px; margin: 13px 0; }
.field label, .field-label { color: var(--ink); font-size: 13px; font-weight: 850; }
.field-hint { margin-top: -2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink-strong); transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: var(--focus); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; font-size: 13px; line-height: 1.45; font-weight: 750; }
.checkbox-row input { width: 19px; height: 19px; margin: 0; accent-color: var(--green); }

.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 2px solid #f2df9d; border-radius: 15px; background: var(--yellow-soft); color: #6f5700; font-size: 12px; line-height: 1.5; font-weight: 650; }
.notice .icon { margin-top: 1px; font-size: 18px; flex: 0 0 auto; }
.notice.success { border-color: #afe67f; background: var(--green-soft); color: var(--green-ink); }
.notice.info { border-color: #b8e6fb; background: var(--blue-soft); color: #126b94; }
.notice.error { border-color: #ffc2c2; background: var(--red-soft); color: #9e2d2d; }
.empty-state { padding: 24px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: #fff; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 11px; border-radius: 17px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-dark); }
.empty-icon .icon { font-size: 27px; }
.empty-state strong { display: block; font-size: 16px; }
.empty-state p { max-width: 420px; margin: 6px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.auth-shell { min-height: calc(100dvh - 46px); display: grid; align-items: center; gap: 18px; }
.auth-hero { padding: 8px 6px 6px; }
.auth-logo { width: 82px; height: 82px; border-radius: 27px; display: grid; place-items: center; color: #fff; background: var(--green); border-bottom: 7px solid var(--green-dark); }
.auth-logo .icon { font-size: 43px; }
.auth-hero h1 { margin: 20px 0 7px; font-size: clamp(42px, 12vw, 64px); line-height: .95; letter-spacing: -.055em; color: var(--ink-strong); }
.auth-hero p { max-width: 500px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; font-weight: 700; }
.auth-trust { margin-top: 18px; display: flex; align-items: flex-start; gap: 10px; max-width: 520px; color: var(--green-ink); font-size: 13px; line-height: 1.5; font-weight: 800; }
.auth-trust .icon { margin-top: 2px; font-size: 20px; }
.auth-card { padding: 21px; }
.auth-card h2 { margin: 0 0 6px; font-size: 21px; }
.auth-card > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.setup-card h1, .focus-heading h1 { margin: 0; font-size: 27px; line-height: 1.1; letter-spacing: -.03em; }
.setup-card > p { margin: 7px 0 17px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.setup-illustration { width: 58px; height: 58px; border-radius: 19px; display: grid; place-items: center; margin-bottom: 16px; color: var(--green-ink); background: var(--green-soft); }
.setup-illustration .icon { font-size: 30px; }

.record-shell { width: min(100%, 980px); margin-inline: auto; }
.session-active-grid { display: grid; gap: 14px; }
.camera-wrap { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: #1d1d1d; border: 2px solid #292929; min-height: 230px; }
.camera-wrap video { width: 100%; min-height: 230px; display: block; aspect-ratio: 16 / 10; object-fit: cover; transform: scaleX(-1); }
.rec-pill { position: absolute; top: 13px; left: 13px; padding: 7px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: rgba(20,20,20,.72); color: #fff; backdrop-filter: blur(10px); font-size: 11px; font-weight: 900; }
.rec-pill .icon { color: var(--red); fill: var(--red); stroke: var(--red); font-size: 13px; }
.session-side { display: grid; align-content: start; gap: 12px; }
.timer { padding: 4px 0; text-align: center; font-size: clamp(42px, 10vw, 64px); font-weight: 950; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.055em; color: var(--ink-strong); }
.upload-state { min-height: 20px; display: flex; justify-content: center; align-items: center; gap: 7px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 750; }
.upload-state .icon { font-size: 16px; }
.session-title { display: flex; align-items: center; gap: 11px; }
.session-title-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-dark); }
.session-title-icon .icon { font-size: 21px; }
.session-title strong { font-size: 17px; }
.session-title .small { margin-top: 3px; }

.question-shell { width: min(100%, 1060px); margin-inline: auto; }
.question-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.question-title { min-width: 0; }
.question-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.question-clock { padding: 8px 11px; border-radius: 12px; background: #fff; border: 2px solid var(--line); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 900; }
.question-progress { height: 12px; margin: 10px 0 16px; overflow: hidden; border-radius: 999px; background: #ededed; }
.question-progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .25s ease; }
.question-layout { display: grid; gap: 14px; }
.question-main { min-width: 0; }
.question-side { min-width: 0; }
.question-camera { position: fixed; z-index: 20; right: 12px; top: max(12px, env(safe-area-inset-top)); width: 96px; overflow: hidden; border: 3px solid #fff; border-radius: 18px; background: #111; box-shadow: var(--shadow-float); }
.question-camera video { width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover; transform: scaleX(-1); }
.mini-rec { position: absolute; top: 7px; left: 7px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 999px; background: rgba(0,0,0,.58); color: #fff; font-size: 9px; font-weight: 900; }
.mini-rec .icon { color: var(--red); fill: var(--red); stroke: var(--red); font-size: 9px; }
.question-card { min-height: 310px; display: grid; align-content: start; gap: 16px; }
.question-context { color: var(--muted); font-size: 12px; font-weight: 800; padding-right: 90px; }
.question-card img { width: 100%; max-height: 520px; object-fit: contain; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.question-text { font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.options { display: grid; gap: 10px; }
.option { min-height: 54px; padding: 11px 13px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: #fff; display: flex; align-items: flex-start; gap: 11px; text-align: left; cursor: pointer; transition: transform .08s ease, border-color .15s ease, background .15s ease; }
.option:hover { border-color: var(--line-strong); }
.option:active { transform: translateY(2px); border-bottom-width: 2px; }
.option b { width: 32px; height: 32px; flex: 0 0 32px; border: 2px solid var(--line); border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: #fafafa; }
.option span { padding-top: 5px; line-height: 1.45; }
.option.selected { border-color: var(--blue); border-bottom-color: var(--blue-dark); background: var(--blue-soft); }
.option.selected b { border-color: var(--blue); background: #fff; color: var(--blue-dark); }
.question-nav { margin-top: 12px; padding-bottom: max(4px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); gap: 10px; position: sticky; bottom: 0; z-index: 12; background: linear-gradient(to bottom, rgba(247,247,247,0), var(--bg) 17px); padding-top: 20px; }

.result-hero { text-align: center; padding: 28px 18px; }
.result-icon { width: 66px; height: 66px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 22px; color: var(--green-ink); background: var(--green-soft); }
.result-icon .icon { font-size: 34px; }
.result-big { font-size: clamp(52px, 14vw, 78px); font-weight: 950; line-height: .95; letter-spacing: -.06em; color: var(--ink-strong); }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.result-item { min-width: 0; padding: 12px 6px; border: 2px solid var(--line); border-radius: 15px; background: #fff; text-align: center; }
.result-item strong { display: block; font-size: 18px; }
.result-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 850; }

.stats-hero { padding: 22px; border: 2px solid #afe67f; border-bottom-width: 5px; border-radius: var(--radius-lg); background: var(--green-soft); }
.stats-hero h1 { margin: 0; font-size: 27px; line-height: 1.1; }
.stats-hero p { margin: 7px 0 0; color: var(--green-ink); line-height: 1.5; font-size: 13px; font-weight: 750; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.stat-card { min-width: 0; padding: 14px; }
.stat-card-icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 11px; }
.stat-card-icon .icon { font-size: 21px; }
.stat-card:nth-child(1) .stat-card-icon { background: var(--blue-soft); color: var(--blue-dark); }
.stat-card:nth-child(2) .stat-card-icon { background: var(--purple-soft); color: var(--purple-dark); }
.stat-card:nth-child(3) .stat-card-icon { background: var(--yellow-soft); color: #9c7800; }
.stat-card strong { display: block; font-size: 25px; line-height: 1; }
.stat-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.subject-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.subject-bar { margin-top: 7px; height: 7px; background: #ededed; border-radius: 999px; overflow: hidden; }
.subject-bar i { display: block; height: 100%; background: var(--green); border-radius: inherit; }

.tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { min-height: 43px; padding: 9px 12px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 13px; background: #fff; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 850; cursor: pointer; }
.tabs button .icon { font-size: 17px; }
.tabs button.active { color: #fff; background: var(--green); border-color: var(--green); border-bottom-color: var(--green-dark); }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.admin-stat { padding: 15px; }
.admin-stat strong { display: block; font-size: 27px; line-height: 1; }
.admin-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.inline-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-actions .btn, .inline-actions .icon-btn { min-height: 38px; height: 38px; border-radius: 12px; font-size: 11px; }
.admin-form-grid { display: grid; gap: 0 12px; }
.admin-panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.admin-panel-title .icon { font-size: 22px; color: var(--green); }
.admin-panel-title h2 { margin: 0; font-size: 21px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.divider { height: 2px; margin: 18px 0; background: var(--line); }
.hidden { display: none !important; }

.loading-screen { min-height: 76dvh; display: grid; place-items: center; }
.loading-card { min-width: 230px; padding: 24px; border: 2px solid var(--line); border-radius: var(--radius-lg); background: #fff; text-align: center; }
.loading-logo { width: 58px; height: 58px; margin: 0 auto 13px; border-radius: 19px; display: grid; place-items: center; color: #fff; background: var(--green); border-bottom: 5px solid var(--green-dark); }
.loading-logo .icon { font-size: 29px; }
.loading-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: bounce 1s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: .12s; }
.loading-dots i:nth-child(3) { animation-delay: .24s; }
@keyframes bounce { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-5px); opacity: 1; } }

.toast { position: fixed; z-index: 1000; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); width: max-content; max-width: min(92vw, 560px); padding: 11px 14px; border-radius: 14px; background: var(--ink-strong); color: #fff; box-shadow: var(--shadow-float); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; font-size: 12px; font-weight: 750; line-height: 1.4; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal-backdrop { position: fixed; inset: 0; z-index: 1100; padding: 18px; display: grid; place-items: center; background: rgba(30,30,30,.45); backdrop-filter: blur(4px); }
.modal { width: min(100%, 430px); padding: 20px; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 23px; background: #fff; box-shadow: var(--shadow-float); }
.modal-icon { width: 48px; height: 48px; margin-bottom: 12px; border-radius: 16px; display: grid; place-items: center; color: #9c7800; background: var(--yellow-soft); }
.modal-icon.danger { color: #a92f2f; background: var(--red-soft); }
.modal-icon .icon { font-size: 25px; }
.modal h2 { margin: 0; font-size: 21px; }
.modal p { margin: 7px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (min-width: 720px) {
  .app-shell { padding: 24px; }
  .icon-btn-label { display: inline; }
  .auth-shell { grid-template-columns: minmax(0,1.15fr) minmax(340px,.85fr); gap: 56px; }
  .auth-card { padding: 26px; }
  .admin-form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .session-active-grid { grid-template-columns: minmax(0,1.45fr) minmax(280px,.75fr); align-items: start; }
  .session-side { position: sticky; top: 24px; }
  .timer { text-align: left; }
  .upload-state { justify-content: flex-start; text-align: left; }
}

@media (min-width: 930px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
  .dashboard-side { position: sticky; top: 24px; }
  .question-layout { grid-template-columns: minmax(0,1fr) 190px; gap: 18px; align-items: start; }
  .question-camera { position: relative; inset: auto; width: 100%; border: 2px solid var(--line); box-shadow: none; }
  .question-side { position: sticky; top: 20px; display: grid; gap: 11px; }
  .question-context { padding-right: 0; }
  .question-nav { position: static; padding-top: 12px; background: none; }
}

@media (max-width: 719px) {
  .topbar { margin-bottom: 14px; }
  .brand-title { font-size: 22px; }
  .goals { grid-template-columns: 1fr; }
  .goal { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px 10px; }
  .goal-head { display: contents; }
  .goal-icon { grid-row: 1; }
  .goal strong { grid-row: 1; margin: 0; font-size: 16px; }
  .goal-label { grid-row: 1; margin: 0; text-align: right; }
  .goal .progress { grid-column: 1 / -1; margin-top: 1px; }
  .action-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 92px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
  .stat-card-icon { margin: 0; grid-row: 1 / span 2; }
  .stat-card strong { font-size: 22px; text-align: right; }
  .stat-card span { margin: 0; }
  .admin-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .admin-stat { padding: 11px 8px; text-align: center; }
  .admin-stat strong { font-size: 22px; }
  .result-grid { gap: 6px; }
  .result-item { padding-inline: 3px; }
  .question-head { padding-right: 102px; min-height: 50px; }
}

@media (max-width: 420px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .hero { min-height: 200px; }
  .hero-count { font-size: 50px; }
  .btn-row { grid-template-columns: 1fr; }
  .question-nav { grid-template-columns: .66fr 1.34fr; }
  .question-camera { width: 86px; }
  .question-head { padding-right: 90px; }
  .result-item strong { font-size: 16px; }
  .result-item span { font-size: 8px; }
}

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