:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #f8faf7;
  --text: #19231f;
  --muted: #718079;
  --line: #e3e9e5;
  --primary: #1d93e5;
  --primary-2: #1477c9;
  --primary-soft: #e6f4ff;
  --purple: #7453c7;
  --purple-soft: #eee9fb;
  --blue: #3e77c3;
  --blue-soft: #e8f0fb;
  --orange: #c77935;
  --orange-soft: #fbefe4;
  --danger: #ba4545;
  --danger-soft: #fbeaea;
  --shadow: 0 12px 35px rgba(27, 47, 38, .07);
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111714;
  --surface: #18211d;
  --surface-2: #1d2823;
  --text: #eef4f0;
  --muted: #98aaa1;
  --line: #2d3a34;
  --primary: #68bdf4;
  --primary-2: #8bcef7;
  --primary-soft: #20384a;
  --purple-soft: #2a2540;
  --blue-soft: #1e3044;
  --orange-soft: #3a2c20;
  --danger-soft: #3c2424;
  --shadow: 0 14px 38px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.app-loading { overflow: hidden; }
.app-loading .app-shell { visibility: hidden; }
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 24px;
}
.boot-loader.hidden { display: none; }
.boot-card {
  display: flex;
  min-width: min(100%, 290px);
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.boot-loader.failed .boot-card { flex-direction: column; }
.boot-loader.failed p { margin: 0; color: var(--muted); font-size: 13px; }
.boot-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: boot-spin .7s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 20;
  display: flex;
  width: 245px;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 18px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  padding: 0 10px 28px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary);
  color: var(--surface);
  font-size: 22px;
  font-weight: 700;
}

[data-theme="dark"] .brand-mark { color: #102019; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }

.main-nav { display: grid; gap: 7px; }
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  padding: 11px 13px;
  text-align: right;
  cursor: pointer;
  transition: .18s ease;
}
.nav-item span { width: 20px; font-size: 20px; text-align: center; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-2); font-weight: 600; }
.nav-badge { margin-right: auto; border-radius: 99px; background: var(--surface); padding: 0 7px; font-size: 11px; }

.sidebar-progress { margin-top: auto; border-radius: var(--radius-md); background: var(--surface-2); padding: 15px; font-size: 12px; }
.sidebar-progress small { display: block; margin-top: 8px; color: var(--muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: var(--line); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .35s ease; }
.sidebar-progress .progress-track { margin-top: 9px; }

.main-content { min-height: 100vh; margin-right: 245px; padding: 25px clamp(20px, 4vw, 58px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: clamp(22px, 3vw, 29px); }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-email {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-btn { color: var(--danger); }
.streak-pill { border: 1px solid var(--line); border-radius: 99px; background: var(--surface); padding: 8px 13px; font-size: 13px; }
.icon-btn { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; font-size: 20px; }
.icon-btn:hover { background: var(--surface-2); }

.view { display: none; animation: fade-in .2s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } }

.hero-card {
  position: relative;
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, #187fd5, #28a8ee);
  color: #fff;
  padding: clamp(25px, 5vw, 42px);
  box-shadow: var(--shadow);
}
.hero-card::after { content: ""; position: absolute; width: 290px; height: 290px; border: 45px solid rgba(255,255,255,.05); border-radius: 50%; left: -80px; top: -100px; }
.hero-card > * { position: relative; z-index: 1; }
.hero-kicker { display: inline-block; margin-bottom: 6px; color: #dff4ff; font-size: 12px; }
.hero-card h2 { margin: 0 0 7px; font-size: clamp(23px, 4vw, 34px); }
.hero-card p { max-width: 600px; margin: 0; color: #e5f6ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.btn { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 10px 17px; cursor: pointer; font-weight: 600; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { border-color: var(--primary); background: var(--primary); color: #fff; }
[data-theme="dark"] .btn-primary { color: #102019; }
.hero-card .btn-primary { border-color: #fff; background: #fff; color: #1477c9; }
.btn-light { background: var(--surface-2); }
.hero-card .btn-light { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.1); color: #fff; }
.btn-danger { border-color: var(--danger-soft); background: var(--danger-soft); color: var(--danger); }
.wide { width: 100%; }
.text-btn { border: 0; background: transparent; color: var(--primary); padding: 3px; cursor: pointer; font-weight: 600; }

.daily-ring { --progress: 0deg; display: grid; width: 144px; height: 144px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(#fff var(--progress), rgba(255,255,255,.18) 0); }
.daily-ring::before { content: ""; grid-area: 1/1; width: 116px; height: 116px; border-radius: 50%; background: #208fdc; }
.daily-ring div { z-index: 1; grid-area: 1/1; text-align: center; }
.daily-ring strong, .daily-ring span { display: block; }
.daily-ring strong { font-size: 33px; line-height: 1.2; }
.daily-ring span { color: #dff4ff; font-size: 12px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 18px 0; }
.stat-card { position: relative; display: flex; min-width: 0; align-items: center; gap: 13px; overflow: hidden; border: 0; border-radius: var(--radius-md); padding: 18px; color: #fff; box-shadow: 0 12px 28px rgba(24, 91, 139, .12); }
.stat-card::before, .stat-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.16); pointer-events: none; }
.stat-card::before { width: 118px; height: 118px; left: -35px; bottom: -78px; }
.stat-card::after { width: 92px; height: 92px; left: -15px; top: -58px; }
.stat-card > * { position: relative; z-index: 1; }
.stat-card.tone-coral { background: linear-gradient(125deg, #ffb184, #ff7199); }
.stat-card.tone-blue { background: linear-gradient(125deg, #73b9f2, #168fdf); }
.stat-card.tone-teal { background: linear-gradient(125deg, #58d3cc, #00c9b4); }
.stat-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-icon.green { background: var(--primary-soft); color: var(--primary); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }
.stat-card small { display: block; color: rgba(255,255,255,.82); font-size: 11px; }
.stat-card strong { margin-left: 4px; font-size: 24px; line-height: 1.25; }
.stat-card em { color: rgba(255,255,255,.76); font-size: 11px; font-style: normal; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .8fr); gap: 18px; margin-bottom: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 22px; box-shadow: 0 6px 24px rgba(30,45,38,.025); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.panel h3 { margin: 0; font-size: 16px; }
.panel-head p, .section-toolbar p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.trend-chip { border-radius: 99px; background: var(--primary-soft); color: var(--primary); padding: 5px 10px; font-size: 11px; }

.activity-chart { display: flex; height: 175px; align-items: end; gap: clamp(5px, 1.2vw, 11px); padding-top: 12px; }
.bar-column { display: flex; min-width: 0; height: 100%; flex: 1; flex-direction: column; justify-content: end; align-items: center; gap: 7px; }
.bar-value { color: var(--muted); font-size: 9px; opacity: 0; transition: opacity .15s; }
.bar-column:hover .bar-value { opacity: 1; }
.bar { width: 100%; max-width: 24px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--primary-soft); transition: height .3s; }
.bar.has-data { background: var(--primary); }
.bar-label { color: var(--muted); font-size: 9px; white-space: nowrap; }

.box-list { display: grid; gap: 13px; }
.box-row { display: grid; grid-template-columns: 58px 1fr 36px; align-items: center; gap: 10px; font-size: 12px; }
.box-row .progress-track { height: 8px; }
.box-row:nth-child(2) i { opacity: .82; }.box-row:nth-child(3) i { opacity: .68; }.box-row:nth-child(4) i { opacity: .55; }.box-row:nth-child(5) i { opacity: .42; }
.box-count { color: var(--muted); text-align: left; }

.word-preview-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.word-preview { display: flex; align-items: center; gap: 11px; border-radius: 13px; background: var(--surface-2); padding: 13px; }
.word-rank { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.word-preview strong, .word-preview small { display: block; }
.word-preview strong { direction: ltr; text-align: left; font-size: 14px; }
.word-preview small { color: var(--muted); font-size: 10px; }
.no-data { grid-column: 1/-1; color: var(--muted); padding: 20px; text-align: center; }

.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-toolbar h2 { margin: 0; font-size: 24px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.filters-row { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 170px; gap: 10px; margin-bottom: 17px; }
.filters-row input, .filters-row select, .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface-2); color: var(--text); padding: 10px 12px; }
.filters-row input:focus, .filters-row select:focus, .field input:focus, .field select:focus, .field textarea:focus, .answer-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-field { position: relative; }
.search-field span { position: absolute; right: 13px; top: 9px; color: var(--muted); }
.search-field input { padding-right: 39px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); font-weight: 500; text-align: right; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
td.word-cell { direction: ltr; text-align: left; font-size: 14px; font-weight: 600; }
.box-badge { display: inline-block; min-width: 55px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); padding: 3px 8px; text-align: center; }
.box-badge.new { background: var(--purple-soft); color: var(--purple); }
.mistake-count { color: var(--danger); font-weight: 600; }
.row-menu { display: flex; gap: 5px; }
.mini-btn { border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 4px 7px; cursor: pointer; }
.mini-btn:hover { background: var(--line); color: var(--text); }
.mini-btn.delete:hover { color: var(--danger); }
.mini-btn.add-to-box-one { background: var(--primary-soft); color: var(--primary); font-size: 17px; font-weight: 700; line-height: 1; }
.mini-btn.add-to-box-one:hover { background: var(--primary); color: #fff; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 18px; }
.pagination span { color: var(--muted); font-size: 12px; }

.review-setup, .review-session { max-width: 680px; margin: 30px auto 0; }
.setup-card { text-align: center; padding: clamp(28px, 6vw, 46px); }
.setup-icon, .empty-icon { display: grid; width: 62px; height: 62px; place-items: center; margin: 0 auto 16px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); font-size: 30px; }
.setup-card h2, .empty-state h2 { margin: 0 0 6px; }
.setup-card > p, .empty-state > p { margin: 0 auto 20px; color: var(--muted); }
.setup-breakdown, .completion-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.setup-breakdown div, .completion-stats div { border-radius: 13px; background: var(--surface-2); padding: 13px; }
.setup-breakdown strong, .setup-breakdown span, .completion-stats strong, .completion-stats span { display: block; }
.setup-breakdown strong, .completion-stats strong { font-size: 21px; }
.setup-breakdown span, .completion-stats span { color: var(--muted); font-size: 10px; }
.compact-field { max-width: 260px; margin: 0 auto 13px; text-align: right; }

.session-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.session-progress { flex: 1; color: var(--muted); font-size: 11px; }
.session-progress .progress-track { margin-top: 7px; }
.flash-card { min-height: 560px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); padding: clamp(24px, 6vw, 46px); text-align: center; box-shadow: var(--shadow); }
.card-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.card-meta span { border-radius: 99px; background: var(--surface-2); padding: 4px 10px; }
.instruction { margin: 55px 0 22px; color: var(--muted); }
.listen-btn { display: grid; width: 118px; height: 118px; place-items: center; margin: 0 auto 10px; border: 0; border-radius: 50%; background: var(--primary-soft); color: var(--primary); cursor: pointer; box-shadow: 0 0 0 12px rgba(63, 130, 101, .06); }
.listen-btn:hover { transform: scale(1.02); }
.listen-btn span { display: block; font-size: 31px; line-height: 1; transform: translateX(-2px); }
.listen-btn small { display: block; margin-top: -20px; font-size: 10px; }
.replay-link { margin-bottom: 32px; font-size: 11px; }
.answer-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; text-align: right; }
.answer-input { width: 100%; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface-2); color: var(--text); padding: 13px 15px; text-align: left; font-size: 18px; }
.dont-know { margin-top: 12px; color: var(--muted); font-size: 11px; }
.answer-feedback { margin-top: 25px; text-align: right; }
.feedback-heading { display: flex; align-items: center; gap: 12px; border-radius: 13px; background: var(--primary-soft); padding: 13px; }
.feedback-heading > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; }
.feedback-heading strong, .feedback-heading p { display: block; margin: 0; }
.feedback-heading p { color: var(--muted); font-size: 11px; }
.answer-feedback.wrong .feedback-heading { background: var(--danger-soft); }
.answer-feedback.wrong .feedback-heading > span { background: var(--danger); }
.correct-spelling { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px 15px; text-align: left; }
.correct-spelling small, .correct-spelling strong { display: block; }
.correct-spelling small { color: var(--muted); font-size: 10px; }
.correct-spelling strong { font-size: 22px; }
.word-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; }

.empty-state { max-width: 620px; margin: 70px auto; text-align: center; }
.completion-stats { max-width: 420px; margin: 25px auto; }
.hidden { display: none !important; }

.report-stats .stat-card { justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: center; box-shadow: none; }
.report-stats .stat-card::before, .report-stats .stat-card::after { display: none; }
.report-stats .stat-card small, .report-stats .stat-card em { color: var(--muted); }
.line-chart { min-height: 240px; }
.line-chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: var(--primary-soft); opacity: .7; }
.chart-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.chart-label { fill: var(--muted); font-size: 9px; }
.metric-list { display: grid; gap: 18px; }
.metric-row .row-between { margin-bottom: 7px; font-size: 12px; }
.metric-row strong { color: var(--primary); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card h3 { margin-bottom: 20px; }
.settings-card > p { color: var(--muted); font-size: 12px; }
.field { display: block; margin-bottom: 15px; font-size: 12px; font-weight: 500; }
.field > small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { display: block; margin-top: 6px; }
.field input[type="range"] { padding: 0; box-shadow: none; }
.field output { color: var(--muted); }
.stack-actions { display: grid; gap: 9px; }
.interval-list { display: grid; gap: 9px; }
.interval-list span { display: flex; justify-content: space-between; border-radius: 10px; background: var(--surface-2); padding: 9px 12px; font-size: 12px; }
.settings-note { margin: 14px 0 0; }
.repo-link { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin-top: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); color: var(--text); padding: 13px; text-decoration: none; transition: .18s ease; }
.repo-link:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.repo-link > span:first-child { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--text); color: var(--surface); font-size: 20px; }
.repo-link strong, .repo-link small { display: block; }
.repo-link small { color: var(--muted); direction: ltr; text-align: right; }
.repo-link > b { color: var(--primary); font-size: 18px; }

dialog { width: min(500px, calc(100% - 30px)); border: 0; border-radius: 20px; background: var(--surface); color: var(--text); padding: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 20, 15, .55); backdrop-filter: blur(3px); }
.dialog-card { padding: 23px; }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head { margin-bottom: 18px; }
.dialog-head h3 { margin: 0; }
.dialog-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.dialog-actions { justify-content: flex-start; margin-top: 20px; }
.new-words-illustration { position: relative; display: grid; height: 92px; place-items: center; overflow: hidden; margin-bottom: 20px; border-radius: 15px; background: linear-gradient(125deg, #58d3cc, #00c9b4); }
.new-words-illustration::before, .new-words-illustration::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.19); }
.new-words-illustration::before { width: 125px; height: 125px; right: -38px; top: -75px; }
.new-words-illustration::after { width: 105px; height: 105px; left: -25px; bottom: -70px; }
.new-words-illustration span { z-index: 1; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: rgba(255,255,255,.22); color: #fff; font-size: 29px; }
.available-words { margin: -5px 0 0; color: var(--muted); font-size: 11px; }
.available-words strong { color: var(--text); }
.toast { position: fixed; z-index: 50; bottom: 25px; left: 25px; max-width: min(400px, calc(100% - 40px)); border: 1px solid var(--line); border-radius: 12px; background: var(--text); color: var(--surface); padding: 11px 16px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .2s; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .word-preview-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { inset: auto 0 0; width: 100%; height: 68px; padding: 7px 8px; border-top: 1px solid var(--line); border-left: 0; }
  .brand, .sidebar-progress { display: none; }
  .main-nav { display: grid; height: 100%; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .nav-item { position: relative; justify-content: center; flex-direction: column; gap: 0; padding: 3px; font-size: 9px; text-align: center; }
  .nav-item span { font-size: 17px; }
  .nav-badge { position: absolute; top: 1px; right: calc(50% + 7px); margin: 0; padding: 0 5px; }
  .main-content { margin-right: 0; padding: 18px 14px 95px; }
  .topbar { margin-bottom: 18px; }
  .user-email { display: none; }
  .streak-pill { padding: 7px 9px; }
  .hero-card { align-items: start; flex-direction: column; }
  .daily-ring { position: absolute; left: 22px; bottom: 22px; width: 91px; height: 91px; }
  .daily-ring::before { width: 73px; height: 73px; }
  .daily-ring strong { font-size: 22px; }
  .daily-ring span { font-size: 9px; }
  .hero-card > div:first-child { width: 100%; }
  .hero-card p { padding-left: 0; }
  .hero-actions { padding-left: 105px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-icon { width: 35px; height: 35px; }
  .stat-card strong { font-size: 19px; }
  .panel { padding: 16px; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .filters-row { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1/-1; }
  .settings-grid { grid-template-columns: 1fr; }
  .flash-card { min-height: 520px; }
}

@media (max-width: 430px) {
  .topbar h1 { font-size: 20px; }
  .eyebrow { font-size: 10px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { display: block; }
  .stat-icon { margin-bottom: 8px; }
  .hero-card { min-height: 300px; }
  .hero-actions { padding-left: 0; flex-direction: column; align-items: stretch; }
  .daily-ring { display: none; }
  .setup-breakdown, .completion-stats { gap: 5px; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .btn { flex: 1; }
}

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