:root {
  --app-frame-max-width: 1194px;
  --app-frame-target-width: 1194;
  --app-frame-target-height: 834;
  --app-frame-aspect-ratio: 1194 / 834;
  --app-shell-padding: clamp(0.9rem, 1.5vw, 1.25rem);
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --surface: rgba(16, 16, 16, 0.94);
  --surface-strong: rgba(24, 24, 24, 0.98);
  --panel: rgba(19, 19, 19, 0.9);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f7f7;
  --muted: #b0b0b0;
  --accent-rgb: 255, 23, 23;
  --accent-strong-rgb: 204, 18, 18;
  --accent: #ff1717;
  --accent-strong: #cc1212;
  --accent-soft: rgba(var(--accent-rgb), 0.14);
  --steel: #a6a6a6;
  --steel-soft: rgba(166, 166, 166, 0.16);
  --brass: #d7d7d7;
  --brass-deep: #f3f3f3;
  --attempt-fill: rgba(var(--accent-rgb), 0.2);
  --attempt-fill-strong: rgba(var(--accent-rgb), 0.52);
  --accuracy-fill: rgba(232, 190, 79, 0.2);
  --accuracy-fill-strong: rgba(232, 190, 79, 0.54);
  --gold: #ffd55f;
  --gold-soft: rgba(232, 190, 79, 0.16);
  --success: #7ce1a6;
  --danger: #ff6a6a;
  --technique-factor-color: #99cfff;
  --technique-zero-color: #ffd86b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
  --radius: 28px;
  --ambient-left-rgb: 255, 23, 23;
  --ambient-right-rgb: 255, 255, 255;
  --carousel-button-size: 50px;
  --calendar-button-size: 44px;
  --carousel-nav-bleed: 44px;
  --bg-layer-1: var(--bg);
  --bg-layer-2: var(--bg-soft);
  --surface-1: var(--surface);
  --surface-2: var(--surface-strong);
  --border-subtle: var(--stroke);
  --border-strong: var(--stroke-strong);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.2);
  --shadow-medium: var(--shadow);
  --glow-accent: rgba(var(--accent-rgb), 0.24);
  --glow-success: rgba(124, 225, 166, 0.2);
  --glow-danger: rgba(255, 106, 106, 0.2);
  --control-radius: 18px;
  --control-radius-pill: 999px;
  --control-surface: rgba(255, 255, 255, 0.055);
  --control-surface-strong: rgba(255, 255, 255, 0.082);
  --control-surface-active: rgba(var(--accent-rgb), 0.16);
  --control-border: rgba(255, 255, 255, 0.13);
  --control-border-strong: rgba(255, 255, 255, 0.2);
  --hero-surface:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.16), transparent 42%),
    linear-gradient(165deg, rgba(20, 20, 20, 0.96), rgba(12, 12, 12, 0.92));
  --interactive-lift: translateY(-2px);
  --interactive-duration: 140ms;
  --home-action-height: 46px;
  --top-ui-offset: clamp(0.55rem, 1.8vh, 0.95rem);
  --app-content-max-width: 980px;
  --carousel-label-width: 22ch;
  --selector-chip-width: 18ch;
}

body[data-theme="sunny-beach-day"] {
  --bg: #07161b;
  --bg-soft: #102129;
  --surface: rgba(14, 25, 31, 0.94);
  --surface-strong: rgba(22, 35, 42, 0.98);
  --panel: rgba(14, 24, 30, 0.92);
  --stroke: rgba(220, 196, 153, 0.2);
  --stroke-strong: rgba(220, 196, 153, 0.32);
  --text: #f8f2e7;
  --muted: #c9bca7;
  --accent-rgb: 225, 154, 95;
  --accent-strong-rgb: 217, 108, 82;
  --accent: #e19a5f;
  --accent-strong: #d96c52;
  --gold: #d9be6b;
  --gold-soft: rgba(217, 190, 107, 0.2);
  --success: #4ca197;
  --danger: #d96c52;
  --ambient-left-rgb: 76, 161, 151;
  --ambient-right-rgb: 217, 190, 107;
}

body[data-theme="jungle"] {
  --bg: #0a130a;
  --bg-soft: #121e12;
  --surface: rgba(15, 28, 16, 0.94);
  --surface-strong: rgba(22, 36, 22, 0.98);
  --panel: rgba(17, 31, 19, 0.92);
  --stroke: rgba(153, 204, 94, 0.2);
  --stroke-strong: rgba(153, 204, 94, 0.32);
  --text: #f3f6e7;
  --muted: #c8d0b1;
  --accent-rgb: 240, 173, 10;
  --accent-strong-rgb: 200, 134, 17;
  --accent: #f0ad0a;
  --accent-strong: #c88611;
  --gold: #f8f17f;
  --gold-soft: rgba(248, 241, 127, 0.18);
  --success: #97cc5c;
  --danger: #85462b;
  --ambient-left-rgb: 89, 137, 90;
  --ambient-right-rgb: 240, 173, 10;
}

body[data-theme="frozen"] {
  --bg: #090d17;
  --bg-soft: #101825;
  --surface: rgba(15, 24, 35, 0.94);
  --surface-strong: rgba(20, 31, 44, 0.98);
  --panel: rgba(17, 27, 40, 0.92);
  --stroke: rgba(157, 195, 227, 0.2);
  --stroke-strong: rgba(157, 195, 227, 0.34);
  --text: #f1f6fc;
  --muted: #b7c8d8;
  --accent-rgb: 157, 86, 195;
  --accent-strong-rgb: 125, 63, 163;
  --accent: #9d56c3;
  --accent-strong: #7d3fa3;
  --gold: #9cc2e0;
  --gold-soft: rgba(156, 194, 224, 0.2);
  --success: #9dc3e3;
  --danger: #93005f;
  --technique-factor-color: #8fceff;
  --technique-zero-color: #ffd88a;
  --ambient-left-rgb: 157, 86, 195;
  --ambient-right-rgb: 157, 195, 227;
}

body[data-theme="aang"] {
  --bg: #140f0a;
  --bg-soft: #1b130d;
  --surface: rgba(28, 20, 14, 0.94);
  --surface-strong: rgba(35, 24, 17, 0.98);
  --panel: rgba(30, 21, 15, 0.92);
  --stroke: rgba(244, 193, 53, 0.22);
  --stroke-strong: rgba(244, 193, 53, 0.34);
  --text: #f9efe3;
  --muted: #dbcdbf;
  --accent-rgb: 238, 114, 35;
  --accent-strong-rgb: 201, 90, 22;
  --accent: #ee7223;
  --accent-strong: #c95a16;
  --gold: #f4c135;
  --gold-soft: rgba(244, 193, 53, 0.2);
  --success: #b6d7f4;
  --danger: #6e1700;
  --ambient-left-rgb: 238, 114, 35;
  --ambient-right-rgb: 182, 215, 244;
}

body[data-color-mode="light"] {
  --bg: #e8eef7;
  --bg-soft: #dfe7f3;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --panel: rgba(255, 255, 255, 0.86);
  --stroke: rgba(24, 32, 46, 0.14);
  --stroke-strong: rgba(24, 32, 46, 0.26);
  --text: #182334;
  --muted: #4e5d73;
  --steel: #5a6a80;
  --steel-soft: rgba(78, 93, 115, 0.18);
  --brass: #2d3b50;
  --brass-deep: #101a2a;
  --attempt-fill: rgba(var(--accent-rgb), 0.16);
  --attempt-fill-strong: rgba(var(--accent-rgb), 0.36);
  --accuracy-fill: rgba(232, 190, 79, 0.18);
  --accuracy-fill-strong: rgba(232, 190, 79, 0.42);
  --shadow: 0 18px 44px rgba(31, 42, 60, 0.16);
  --hero-surface:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95));
  --shadow-soft: 0 10px 20px rgba(31, 42, 60, 0.1);
  --shadow-medium: 0 16px 34px rgba(31, 42, 60, 0.14);
  --glow-accent: rgba(var(--accent-rgb), 0.14);
}

body[data-theme="solo-leveling"] {
  --bg: #1d1340;
  --bg-soft: #221426;
  --surface: rgba(29, 19, 64, 0.92);
  --surface-strong: rgba(34, 20, 38, 0.96);
  --panel: rgba(29, 19, 64, 0.9);
  --stroke: rgba(164, 128, 242, 0.24);
  --stroke-strong: rgba(68, 94, 242, 0.44);
  --text: #f2f2f2;
  --muted: rgba(242, 242, 242, 0.72);
  --accent-rgb: 164, 128, 242;
  --accent-strong-rgb: 68, 94, 242;
  --accent: #a480f2;
  --accent-strong: #445ef2;
  --gold: #a480f2;
}

body[data-theme="mudkip"] {
  --bg: #0c1a24;
  --bg-soft: #132433;
  --surface: rgba(21, 39, 55, 0.94);
  --surface-strong: rgba(28, 50, 68, 0.98);
  --panel: rgba(24, 44, 60, 0.92);
  --stroke: rgba(165, 187, 212, 0.2);
  --stroke-strong: rgba(165, 187, 212, 0.34);
  --text: #ecf2fb;
  --muted: #b7c6d8;
  --accent-rgb: 239, 169, 71;
  --accent-strong-rgb: 89, 158, 204;
  --accent: #efa947;
  --accent-strong: #599ecc;
  --gold: #efa947;
  --gold-soft: rgba(239, 169, 71, 0.2);
  --success: #79c0e9;
  --danger: #d96f42;
  --ambient-left-rgb: 121, 187, 218;
  --ambient-right-rgb: 239, 169, 71;
}

body[data-color-mode="light"] {
  color-scheme: light;
  --bg: #e8eef7;
  --bg-soft: #dfe7f3;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --panel: rgba(255, 255, 255, 0.86);
  --stroke: rgba(24, 32, 46, 0.14);
  --stroke-strong: rgba(24, 32, 46, 0.26);
  --text: #182334;
  --muted: #4e5d73;
  --steel: #5a6a80;
  --steel-soft: rgba(78, 93, 115, 0.18);
  --brass: #2d3b50;
  --brass-deep: #101a2a;
  --attempt-fill: rgba(var(--accent-rgb), 0.16);
  --attempt-fill-strong: rgba(var(--accent-rgb), 0.36);
  --accuracy-fill: rgba(232, 190, 79, 0.18);
  --accuracy-fill-strong: rgba(232, 190, 79, 0.42);
  --shadow: 0 18px 44px rgba(31, 42, 60, 0.16);
  --hero-surface:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95));
  --shadow-soft: 0 10px 20px rgba(31, 42, 60, 0.1);
  --shadow-medium: 0 16px 34px rgba(31, 42, 60, 0.14);
  --glow-accent: rgba(var(--accent-rgb), 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: clip;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color-scheme: dark;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.16), transparent 26%),
    radial-gradient(circle at left center, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 58%, transparent 88%);
}

body[data-color-mode="light"]::before {
  opacity: 0.22;
}

body[data-color-mode="light"] .card,
body[data-color-mode="light"] .operation-choice,
body[data-color-mode="light"] .choice-pill,
body[data-color-mode="light"] .toggle,
body[data-color-mode="light"] .problem-wrap,
body[data-color-mode="light"] .table-card,
body[data-color-mode="light"] .technique-card,
body[data-color-mode="light"] .technique-lesson-card,
body[data-color-mode="light"] .technique-example-card,
body[data-color-mode="light"] .technique-switch-card,
body[data-color-mode="light"] .technique-hint,
body[data-color-mode="light"] .technique-pattern-row,
body[data-color-mode="light"] .calendar-day {
  background: var(--surface-strong);
  border-color: var(--stroke);
}

body[data-color-mode="light"] .carousel-position-indicator {
  background: rgba(22, 33, 50, 0.94);
  border-color: rgba(22, 33, 50, 0.42);
  color: #f2f7ff;
}

body[data-color-mode="light"] .calendar-day.has-activity {
  background: rgba(255, 255, 255, 0.96);
}

body[data-color-mode="light"] .calendar-day.empty {
  background: transparent;
}

body[data-color-mode="light"] .daily-widget {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
}

body[data-color-mode="light"] .app-shell {
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.96), rgba(242, 247, 253, 0.94));
}

body[data-color-mode="light"] .home-hero-banner,
body[data-color-mode="light"] .daily-widget,
body[data-color-mode="light"] .home-calendar-widget,
body[data-color-mode="light"] .home-cta-card,
body[data-color-mode="light"] .home-launcher {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body[data-color-mode="light"] .options-dialog {
  background: rgba(243, 246, 251, 0.96);
  border-color: rgba(24, 32, 46, 0.14);
}

body[data-color-mode="light"] .options-card {
  background: rgba(250, 252, 255, 0.58);
  border-top-color: rgba(24, 32, 46, 0.12);
}

body[data-color-mode="light"] .hero-tagline {
  color: #334960;
}

body[data-color-mode="light"] .daily-inspiration,
body[data-color-mode="light"] .reward-mini {
  background: rgba(247, 250, 255, 0.96);
  border-color: rgba(24, 32, 46, 0.14);
}

body[data-color-mode="light"] .reward-mini-attempt {
  background: linear-gradient(135deg, rgba(247, 175, 188, 0.88), rgba(236, 128, 151, 0.82));
  border-color: rgba(172, 56, 86, 0.26);
}

body[data-color-mode="light"] .reward-mini-attempt .reward-glyph-shell {
  background: rgba(223, 71, 111, 0.22);
  color: #de516e;
}

body[data-color-mode="light"] .reward-mini-accuracy {
  background: linear-gradient(135deg, rgba(246, 233, 186, 0.94), rgba(236, 217, 157, 0.88));
  border-color: rgba(168, 130, 25, 0.24);
}

body[data-color-mode="light"] .reward-mini-accuracy .reward-glyph-shell {
  background: rgba(214, 166, 57, 0.24);
  color: #d09f22;
}

body[data-color-mode="light"] .daily-inspiration-label,
body[data-color-mode="light"] .daily-inspiration-copy {
  color: #4b5d77;
}

body[data-color-mode="light"] .reward-mini-copy strong,
body[data-color-mode="light"] .reward-mini-copy span {
  color: #1b2a40;
}

body[data-color-mode="light"] .hero-tagline {
  color: #6b7b92;
}

body[data-color-mode="light"] .session-badge {
  background: rgba(246, 250, 255, 0.98);
  border-color: rgba(24, 32, 46, 0.2);
  color: #1f2e45;
}

body[data-color-mode="light"] .combo-indicator {
  background: rgba(255, 255, 255, 0.98);
  color: #1f2e45;
  border-color: rgba(24, 32, 46, 0.22);
}

body[data-color-mode="light"] .combo-indicator.tier-smoke {
  border-color: rgba(24, 32, 46, 0.34);
  box-shadow: 0 0 14px rgba(24, 32, 46, 0.14);
}

body[data-color-mode="light"] .combo-indicator.tier-spark {
  border-color: rgba(214, 140, 38, 0.48);
  box-shadow: 0 0 16px rgba(214, 140, 38, 0.2);
}

body[data-color-mode="light"] .combo-indicator.tier-flame {
  border-color: rgba(195, 66, 41, 0.58);
  box-shadow: 0 0 18px rgba(195, 66, 41, 0.22);
}

body[data-color-mode="light"] .progress-track.streak-smoke::after {
  background: radial-gradient(circle, rgba(35, 56, 86, 0.22), transparent 64%);
}

body[data-color-mode="light"] .progress-track.streak-spark::after {
  background: radial-gradient(circle, rgba(214, 140, 38, 0.32), transparent 66%);
}

body[data-color-mode="light"] .progress-track.streak-flame::after {
  background: radial-gradient(circle, rgba(195, 66, 41, 0.34), transparent 70%);
}

body[data-color-mode="light"] .problem-wrap.streak-smoke::before {
  box-shadow: 0 0 26px rgba(35, 56, 86, 0.16);
}

body[data-color-mode="light"] .problem-wrap.streak-spark::before {
  box-shadow:
    0 0 30px rgba(214, 140, 38, 0.2),
    inset 0 0 0 1px rgba(214, 140, 38, 0.24);
}

body[data-color-mode="light"] .problem-wrap.streak-flame::before {
  box-shadow:
    0 0 32px rgba(195, 66, 41, 0.22),
    inset 0 0 0 1px rgba(195, 66, 41, 0.28);
}

body[data-color-mode="light"] .calendar-weekdays {
  color: rgba(42, 58, 84, 0.7);
}

body[data-color-mode="light"] .day-number {
  color: #25364f;
}

body[data-color-mode="light"] .calendar-day.has-attempt-goal {
  background: linear-gradient(180deg, rgba(255, 241, 244, 0.98), rgba(255, 248, 250, 0.96));
  border-color: rgba(var(--accent-rgb), 0.2);
}

body[data-color-mode="light"] .calendar-day.has-attempt-goal.has-accuracy-goal {
  background: linear-gradient(135deg, rgba(255, 242, 223, 0.98), rgba(255, 248, 236, 0.96));
}

body[data-color-mode="light"] .calendar-day.has-accuracy-goal {
  box-shadow:
    inset 0 0 0 1px rgba(214, 166, 57, 0.25),
    0 8px 16px rgba(214, 166, 57, 0.12);
}

body[data-color-mode="light"] .carousel-button:disabled {
  background: rgba(237, 243, 250, 0.9);
  color: rgba(26, 40, 62, 0.44);
}

body[data-color-mode="light"] .technique-completion-card {
  border-color: rgba(24, 32, 46, 0.14);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 38%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94));
}

body[data-color-mode="light"] .technique-completion-copy {
  color: #4a5d78;
}

body[data-color-mode="light"] .technique-stage-pill.is-locked {
  background: rgba(225, 234, 246, 0.9);
  border-color: rgba(80, 101, 132, 0.3);
  color: #495f7d;
}

body[data-color-mode="light"] .technique-card:disabled {
  border-color: rgba(80, 101, 132, 0.24);
  background:
    radial-gradient(circle at top right, rgba(80, 101, 132, 0.08), transparent 36%),
    rgba(251, 253, 255, 0.96);
}

body[data-color-mode="light"] .practice-panel,
body[data-color-mode="light"] .techniques-screen-panel,
body[data-color-mode="light"] .countdown-panel {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.94));
}

body[data-color-mode="light"] .technique-coming-soon-card {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.09), transparent 48%),
    rgba(255, 255, 255, 0.9);
}

body[data-color-mode="light"] .problem-wrap {
  background:
    radial-gradient(circle at top, rgba(var(--accent-rgb), 0.08), transparent 40%),
    rgba(251, 253, 255, 0.96);
}

body[data-color-mode="light"] .home-panel {
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.94));
}

body[data-color-mode="light"] .home-action-card {
  background: rgba(250, 253, 255, 0.98);
  border-color: rgba(24, 32, 46, 0.14);
  color: var(--text);
}

body[data-color-mode="light"] .coach-card,
body[data-color-mode="light"] .roadmap-card,
body[data-color-mode="light"] .insight-item,
body[data-color-mode="light"] .recent-item,
body[data-color-mode="light"] .reward-status-card {
  background: var(--surface-strong);
  border-color: var(--stroke);
  color: var(--text);
}

body[data-color-mode="light"] .coach-card .fact-meta,
body[data-color-mode="light"] .roadmap-card .fact-meta {
  color: #51637c;
}

body[data-color-mode="light"] button:hover:not(:disabled) {
  transform: none;
}

body[data-color-mode="light"] .utility-button,
body[data-color-mode="light"] .nav-button,
body[data-color-mode="light"] .ghost-button,
body[data-color-mode="light"] .calendar-nav-button,
body[data-color-mode="light"] .carousel-button {
  background: rgba(24, 35, 52, 0.94);
  border-color: rgba(24, 35, 52, 0.46);
  color: #f1f6ff;
  box-shadow:
    0 10px 20px rgba(13, 21, 34, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

button,
input,
select {
  font: inherit;
}

button {
  appearance: none;
  border: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    filter 180ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-0.5px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

select {
  text-align: center;
  text-align-last: center;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.72);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100vw, calc(100dvh * (var(--app-frame-target-width) / var(--app-frame-target-height))), var(--app-frame-max-width));
  height: min(100dvh, calc(100vw * (var(--app-frame-target-height) / var(--app-frame-target-width))), 834px);
  aspect-ratio: var(--app-frame-aspect-ratio);
  margin: 0 auto;
  padding: 0 clamp(0.7rem, 1.6vw, 1.1rem);
  display: grid;
}

.page-shell:not(.is-home-shell) .page-header {
  display: none;
}

.page-shell:not(.is-home-shell) .home-top-actions {
  display: none;
}

.page-shell:not(.is-home-shell) .ambient {
  opacity: 0.42;
}

.page-shell.is-home-shell .screen-stage {
  display: none;
}

.page-shell.is-home-shell .page-header {
  height: 100%;
  align-content: start;
  margin-bottom: 0;
  padding-top: var(--top-ui-offset);
  padding-bottom: var(--app-dock-space);
}

.ambient {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.7;
}

.ambient-left {
  top: 0.25rem;
  left: -3.5rem;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0));
}

.ambient-right {
  top: 7rem;
  right: -2.2rem;
  width: 170px;
  height: 170px;
  background: linear-gradient(
    135deg,
    rgba(var(--ambient-right-rgb), 0.2),
    rgba(var(--ambient-right-rgb), 0)
  );
}

.card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  max-width: 100%;
}

.card,
.panel,
.table-card,
.focus-card,
.technique-card,
.nav-button,
.utility-button,
.primary-button,
.ghost-button,
.carousel-button,
.calendar-nav-button {
  transition:
    transform var(--interactive-duration) ease,
    box-shadow var(--interactive-duration) ease,
    border-color var(--interactive-duration) ease,
    background var(--interactive-duration) ease,
    color var(--interactive-duration) ease;
}

.table-card:hover,
.table-card:focus-within,
.focus-card:hover,
.technique-card:hover,
.nav-button:hover:not(:disabled),
.utility-button:hover:not(:disabled),
.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.carousel-button:hover:not(:disabled),
.calendar-nav-button:hover:not(:disabled) {
  transform: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--glow-accent);
}

.page-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 1.15rem;
  justify-items: center;
  align-items: start;
  margin-bottom: 0;
}

.home-top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}

.home-top-actions .utility-button {
  height: 36px;
  min-height: 36px;
  width: auto;
  min-width: 46px;
  padding: 0 0.85rem;
  border-radius: 999px;
}

.home-top-actions .home-settings-button {
  padding: 0 0.75rem;
}

.home-top-actions .home-settings-button svg {
  width: 18px;
  height: 18px;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
}

.home-hero-block {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  padding: 0.08rem 0.2rem 0.3rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.home-hero-left,
.home-hero-right {
  position: relative;
  z-index: 1;
}

.hero-copy {
  grid-area: banner;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  width: 100%;
  padding: 0;
  justify-items: start;
  text-align: left;
}

.home-hero-banner {
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-side {
  grid-area: nav;
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  margin-top: 0;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  justify-content: start;
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(112px, 12vw, 170px);
  height: clamp(112px, 12vw, 170px);
  flex: 0 0 auto;
  color: var(--accent);
  margin-top: 0.1rem;
}

.hero-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(180deg) scaleX(-1);
}

.hero-mark path {
  fill: currentColor;
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.section-kicker {
  margin: 0 0 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.carousel-shell-head .section-kicker {
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.16em;
  font-size: 0.92rem;
}

body[data-color-mode="light"] .section-kicker,
body[data-color-mode="light"] .carousel-shell-head .section-kicker,
body[data-color-mode="light"] .focused-view-title {
  color: color-mix(in srgb, var(--accent) 70%, #243550 30%);
}

body[data-color-mode="light"][data-theme="solo-leveling"] .section-kicker,
body[data-color-mode="light"][data-theme="solo-leveling"] .carousel-shell-head .section-kicker,
body[data-color-mode="light"][data-theme="solo-leveling"] .focused-view-title {
  color: #4b5568;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.25rem, 3.8vw, 3.35rem);
  font-weight: 700;
  line-height: 0.92;
  white-space: nowrap;
}

.home-hero-block h1 {
  font-size: clamp(3.1rem, 5.8vw, 4.6rem);
  white-space: normal;
  line-height: 0.95;
  margin-bottom: clamp(0.2rem, 0.7vw, 0.45rem);
}

h1 span {
  display: block;
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.32rem, 2.2vw, 1.95rem);
  font-weight: 700;
}

.intro,
.section-note,
.preview-label,
.stat-label,
.feedback,
.fact-meta,
.recent-meta,
.roadmap-copy,
.daily-progress-status {
  color: var(--muted);
}

.intro {
  margin: 0;
  max-width: 42rem;
  line-height: 1.5;
  font-size: 1rem;
  font-style: italic;
}

.hero-text-block {
  display: grid;
  gap: 0.24rem;
  max-width: none;
  padding-top: 0.02rem;
}

.hero-text-block .eyebrow {
  margin-bottom: 0.34rem;
  font-size: clamp(1.08rem, 1.36vw, 1.28rem);
  letter-spacing: 0.2em;
}

.hero-tagline {
  margin: 0;
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.22rem, 1.55vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
}

.shell-nav {
  display: grid;
  grid-template-columns:
    88px
    minmax(132px, 1.05fr)
    minmax(146px, 1.18fr)
    minmax(118px, 0.95fr);
  gap: 0.42rem;
  width: min(500px, 100%);
}

.utility-button,
.nav-button,
.primary-button,
.ghost-button,
.carousel-button,
.calendar-nav-button {
  border-radius: var(--control-radius-pill);
}

.utility-button,
.nav-button,
.ghost-button,
.calendar-nav-button,
.carousel-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    rgba(29, 29, 29, 0.88);
  border: 1px solid var(--control-border);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

body[data-color-mode="light"] .utility-button,
body[data-color-mode="light"] .nav-button,
body[data-color-mode="light"] .ghost-button,
body[data-color-mode="light"] .calendar-nav-button,
body[data-color-mode="light"] .carousel-button {
  background: rgba(255, 255, 255, 0.95);
  color: #1b2a40;
  border-color: rgba(24, 35, 52, 0.2);
  box-shadow: 0 4px 10px rgba(13, 21, 34, 0.08);
}

body[data-color-mode="light"] .focused-view-head .ghost-button {
  box-shadow: none;
}

body[data-color-mode="light"] .focused-view-head .ghost-button:hover:not(:disabled),
body[data-color-mode="light"] .focused-view-head .ghost-button:focus-visible:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(25, 39, 58, 0.18);
}

body[data-color-mode="light"] .carousel-actions-floating .carousel-button {
  background: rgba(26, 40, 62, 0.92);
  border-color: rgba(20, 33, 54, 0.36);
  color: #f2f6ff;
  box-shadow: 0 4px 10px rgba(22, 33, 50, 0.16);
}

body[data-color-mode="light"] .progress-filter select,
body[data-color-mode="light"] .facts-filter select,
body[data-color-mode="light"] .records-filter select,
body[data-color-mode="light"] .fact-carousel-selector,
body[data-color-mode="light"] .fact-range-nav,
body[data-color-mode="light"] .fact-range-button {
  background: rgba(255, 255, 255, 0.95);
  color: #1b2a40;
  border-color: rgba(24, 35, 52, 0.2);
  box-shadow: 0 6px 12px rgba(13, 21, 34, 0.08);
}

body[data-color-mode="light"] .fact-range-button {
  background: rgba(24, 35, 52, 0.045);
  box-shadow: none;
}

body[data-color-mode="light"] .focus-chip {
  font-weight: 800;
}

body[data-color-mode="light"] .subtle-chip {
  color: #4a5a70;
  background: rgba(95, 117, 148, 0.14);
  border-color: rgba(80, 101, 130, 0.24);
}

body[data-color-mode="light"] .success-chip {
  color: #236a49;
  background: rgba(87, 188, 130, 0.22);
  border-color: rgba(54, 146, 97, 0.34);
}

body[data-color-mode="light"] .warning-chip {
  color: #8a6619;
  background: rgba(238, 195, 73, 0.24);
  border-color: rgba(194, 148, 29, 0.36);
}

body[data-color-mode="light"] .carousel-inline-nav-button {
  background: rgba(24, 35, 52, 0.045);
  color: color-mix(in srgb, var(--accent) 70%, #243550 30%);
  border-color: transparent;
  box-shadow: none;
}

body[data-color-mode="light"] .app-dock {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.9)),
    rgba(255, 255, 255, 0.94);
  border-color: rgba(24, 35, 52, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 14px 30px rgba(13, 21, 34, 0.16);
}

body[data-color-mode="light"] .app-dock-button {
  color: rgba(27, 42, 64, 0.66);
}

body[data-color-mode="light"] .app-dock-button:hover:not(:disabled),
body[data-color-mode="light"] .app-dock-button:focus-visible:not(:disabled) {
  color: #1b2a40;
  background: rgba(24, 35, 52, 0.06);
}

body[data-color-mode="light"] .app-dock-button.is-active {
  color: #fffaf7;
  border-color: rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 22px rgba(var(--accent-rgb), 0.2);
}

.nav-button,
.primary-button,
.ghost-button {
  padding: 0.82rem 0.92rem;
}

.utility-button:hover:not(:disabled),
.nav-button:hover:not(:disabled),
.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.carousel-button:hover:not(:disabled),
.calendar-nav-button:hover:not(:disabled),
.practice-keypad .ghost-button:hover:not(:disabled),
.practice-keypad .primary-button:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 9px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(var(--accent-rgb), 0.13);
  filter: brightness(1.025);
}

.utility-button:active:not(:disabled),
.nav-button:active:not(:disabled),
.primary-button:active:not(:disabled),
.ghost-button:active:not(:disabled),
.carousel-button:active:not(:disabled),
.calendar-nav-button:active:not(:disabled),
.practice-keypad .ghost-button:active:not(:disabled),
.practice-keypad .primary-button:active:not(:disabled) {
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  filter: brightness(0.98);
}

.utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 48px;
  padding: 0 0.7rem;
  color: var(--text);
}

.utility-button svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.08;
  white-space: normal;
  text-align: center;
}

.nav-button-stack {
  display: grid;
  gap: 0.04rem;
  justify-items: center;
  line-height: 1.02;
  min-width: 0;
}

.nav-button-stack span {
  display: block;
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-button-stack span:last-child {
  font-size: 0.92rem;
}

.nav-button-primary,
.primary-button {
  color: #fffaf7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 24px rgba(var(--accent-rgb), 0.24);
}

.nav-button.is-active {
  border-width: 2px;
}

.nav-button:not(.nav-button-primary).is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.nav-button-primary.is-active {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.16),
    0 14px 28px rgba(var(--accent-rgb), 0.24);
}

body[data-color-mode="light"] .nav-button-primary {
  color: #1b2a40;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: rgba(var(--accent-rgb), 0.36);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.12),
    0 14px 24px rgba(var(--accent-rgb), 0.22);
}

.daily-widget {
  width: 100%;
  padding: 0.86rem 0.9rem 0.9rem;
  align-self: start;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.16), transparent 32%),
    linear-gradient(145deg, rgba(22, 22, 22, 0.98), rgba(15, 15, 15, 0.92));
}

.daily-widget-top {
  display: flex;
  align-items: start;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.daily-inspiration {
  display: grid;
  gap: 0.44rem;
  margin-bottom: 0.88rem;
  padding: 0.78rem 0.84rem;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(20, 20, 20, 0.92);
}

.daily-inspiration-label {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.daily-inspiration-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
  font-size: 0.98rem;
}

.reward-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.7rem;
}

.home-launcher {
  display: grid;
  width: min(680px, 100%);
  justify-items: center;
  align-content: start;
  row-gap: 0.55rem;
  margin-top: 1.35rem;
}

.home-start-button {
  min-height: 44px;
  width: 100%;
  font-size: 1rem;
  margin-bottom: 0;
}

.home-feedback-group {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-daily-group,
.home-momentum-group {
  width: 100%;
}

.home-feedback-panel {
  padding: 0.62rem 0.72rem 0.68rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
}

.home-feedback-label {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.home-feedback-context {
  margin: 0.22rem 0 0.3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.2rem;
  justify-items: center;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--muted);
}

.home-weekly-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.34rem;
  width: min(520px, 100%);
}

.weekly-day-pill {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.02rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.weekly-day-label {
  letter-spacing: 0.03em;
}

.weekly-day-tick {
  font-size: 0.84rem;
  line-height: 1;
  visibility: hidden;
}

.weekly-day-pill.is-completed {
  border-color: rgba(var(--accent-rgb), 0.62);
  color: var(--text);
}

.weekly-day-pill.is-completed .weekly-day-tick {
  visibility: visible;
}

.weekly-day-pill.is-missed {
  opacity: 0.52;
  color: var(--muted);
}

.weekly-day-pill.hype-1 {
  background: rgba(var(--accent-rgb), 0.12);
}

.weekly-day-pill.hype-2,
.weekly-day-pill.hype-3 {
  background: rgba(var(--accent-rgb), 0.2);
}

.weekly-day-pill.hype-4,
.weekly-day-pill.hype-5 {
  background: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

.weekly-day-pill.hype-6,
.weekly-day-pill.hype-7 {
  background: rgba(var(--accent-rgb), 0.44);
  border-color: rgba(var(--accent-rgb), 0.82);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.22);
}

.home-daily-stats {
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.2rem;
  align-items: center;
  justify-items: center;
  color: var(--text);
}

.home-stat-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.home-stat-icon {
  font-size: 1.65rem;
  line-height: 1;
}

.home-stat-value {
  display: inline-block;
}

.home-button-stack {
  width: auto;
  display: grid;
  grid-template-columns: minmax(58px, 66px) minmax(58px, 66px);
  gap: 0.52rem;
  justify-content: end;
  align-items: center;
  margin: 0;
}

.home-button-stack .utility-button,
.home-button-stack .home-start-button {
  min-height: var(--home-action-height);
  height: var(--home-action-height);
  width: 100%;
  border-radius: 999px;
}

.home-button-stack .home-about-button,
.home-settings-button {
  padding: 0 0.74rem;
}

.home-button-stack .home-settings-button svg {
  width: 19px;
  height: 19px;
}

.home-button-stack .home-start-button {
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fffaf7;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.22),
    0 8px 16px rgba(var(--accent-rgb), 0.28);
  background-clip: padding-box;
}

body[data-color-mode="light"] .home-button-stack .nav-button,
body[data-color-mode="light"] .home-settings-button {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(24, 35, 52, 0.16);
  color: rgba(27, 42, 64, 0.86);
}

body[data-color-mode="light"] .home-menu-row .nav-button {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(24, 35, 52, 0.16);
  color: rgba(27, 42, 64, 0.86);
}

body[data-color-mode="light"] .visual-anchor {
  background: rgba(24, 35, 52, 0.08);
  color: color-mix(in srgb, var(--accent) 48%, #1b2a40 52%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 10px rgba(13, 21, 34, 0.08);
}

body[data-color-mode="light"] .home-start-button .visual-anchor,
body[data-color-mode="light"] .primary-button .visual-anchor {
  background: rgba(255, 255, 255, 0.2);
  color: #fffaf7;
}

.home-menu-row {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
  width: min(100%, 720px);
  justify-self: center;
  margin-inline: auto;
}

.home-menu-row .nav-button,
.home-menu-row .home-start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  height: auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 0.78rem 0.88rem;
  text-align: center;
  border-radius: 22px;
  white-space: normal;
}

.home-menu-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  justify-items: center;
}

.home-menu-label,
.home-menu-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-menu-label {
  color: inherit;
}

.home-menu-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.home-start-button .home-menu-meta {
  color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 920px) {
  .home-hero-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "banner banner"
      "actions actions"
      "stats momentum";
    align-items: start;
    column-gap: clamp(0.9rem, 2.6vw, 1.7rem);
    row-gap: 1.1rem;
    min-height: 0;
  }

  .home-hero-left {
    grid-area: banner;
  }

  .home-feedback-group {
    grid-area: stats;
    align-self: start;
  }

  .home-momentum-group {
    grid-area: momentum;
    align-self: start;
  }

  .home-hero-right {
    grid-area: banner;
    align-self: start;
    display: grid;
    align-items: start;
    justify-items: end;
  }

  .home-button-stack {
    margin-top: 0;
  }

  .home-weekly-strip {
    width: min(760px, 100%);
  }
}

.home-feedback-group,
.home-momentum-group {
  display: none;
}

.streak-banner {
  position: absolute;
  top: 0.8rem;
  left: 50%;
  transform: translate(-50%, -12px);
  width: min(520px, calc(100% - 1.6rem));
  z-index: 8;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  padding: 0.7rem 0.88rem;
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.streak-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.streak-banner-title,
.streak-banner-copy {
  margin: 0;
}

.streak-banner-copy {
  color: var(--muted);
  margin-top: 0.12rem;
  font-size: 1rem;
}

.reward-strip-note {
  margin: 0.58rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.reward-mini {
  --reward-progress: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
  padding: 0.82rem 0.95rem;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--reward-stroke, rgba(255, 255, 255, 0.08));
  background: rgba(28, 28, 28, 0.96);
  isolation: isolate;
}

.reward-mini::before {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--reward-progress));
  background: linear-gradient(
    135deg,
    var(--reward-fill, rgba(216, 170, 75, 0.16)),
    var(--reward-fill-strong, rgba(216, 170, 75, 0.34))
  );
  opacity: 0.78;
  transition:
    transform 220ms ease,
    background 220ms ease,
    opacity 220ms ease;
  z-index: 0;
}

.reward-mini > * {
  position: relative;
  z-index: 1;
}

.reward-mini-attempt {
  --reward-fill: rgba(var(--accent-rgb), 0.22);
  --reward-fill-strong: rgba(var(--accent-rgb), 0.5);
  --reward-stroke: rgba(var(--accent-rgb), 0.18);
  --reward-shell: rgba(var(--accent-rgb), 0.16);
  --reward-icon: #ff8080;
}

.reward-mini-accuracy {
  --reward-fill: rgba(232, 190, 79, 0.22);
  --reward-fill-strong: rgba(232, 190, 79, 0.54);
  --reward-stroke: rgba(232, 190, 79, 0.18);
  --reward-shell: rgba(232, 190, 79, 0.16);
  --reward-icon: #ffd55f;
}

.reward-mini.is-earned {
  border-color: rgba(58, 43, 31, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.reward-mini.is-earned::before {
  opacity: 1;
}

.reward-mini-attempt.is-earned {
  background: linear-gradient(135deg, rgba(60, 18, 18, 0.98), rgba(42, 15, 15, 0.96));
}

.reward-mini-accuracy.is-earned {
  background: linear-gradient(135deg, rgba(55, 45, 12, 0.98), rgba(33, 28, 10, 0.96));
}

.reward-glyph-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  order: 2;
  margin-left: auto;
  border-radius: 18px;
  background: var(--reward-shell);
  color: var(--reward-icon);
}

.reward-mini-accuracy .reward-glyph-shell {
  width: 58px;
  height: 58px;
}

.reward-glyph {
  width: 28px;
  height: 28px;
  display: block;
}

.reward-mini-accuracy .reward-glyph {
  width: 30px;
  height: 30px;
}

.reward-glyph path {
  fill: currentColor;
}

.reward-mini-copy {
  display: grid;
  gap: 0.12rem;
  order: 1;
  flex: 1 1 auto;
  text-align: left;
}

.reward-mini-copy strong {
  font-size: 1rem;
}

.reward-mini-copy span {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  --app-dock-space: 4.8rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: var(--app-shell-padding);
  overflow: clip;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.96), rgba(9, 9, 9, 0.98));
}

.screen-stage {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: var(--app-dock-space);
  overflow: hidden;
}

.app-dock {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: clamp(0.72rem, 2dvh, 1rem);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  width: min(92%, 27rem);
  min-height: 3.34rem;
  padding: 0.32rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(14, 14, 14, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.app-dock-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.55rem;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background var(--interactive-duration) ease,
    border-color var(--interactive-duration) ease,
    box-shadow var(--interactive-duration) ease,
    color var(--interactive-duration) ease;
}

.app-dock-button:hover:not(:disabled),
.app-dock-button:focus-visible:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.app-dock-button:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
}

.app-dock-button.is-active {
  color: #fffaf7;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 52%),
    linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 8px 18px rgba(var(--accent-rgb), 0.2);
}

.screen {
  display: none;
  min-height: 0;
  min-width: 0;
}

.screen.is-active {
  display: block;
  width: min(980px, 100%);
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
  overflow-x: clip;
  animation: rise-in 320ms ease both;
}

.screen-grid {
  display: grid;
  gap: 0.4rem;
}

.focused-view-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 58px;
  align-items: center;
  justify-content: stretch;
  gap: 0.8rem;
  margin: 0 0 0.38rem;
  padding-top: var(--top-ui-offset);
  width: 100%;
  max-width: var(--app-content-max-width);
  margin-inline: auto;
}

#resultsScreen .focused-view-head,
#progressScreen .focused-view-head {
  --results-progress-side-gutter: 0rem;
  padding-inline: 0;
}

.focused-view-head .ghost-button[data-view-target="home"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  width: 58px;
  min-height: var(--home-action-height);
  height: var(--home-action-height);
  padding: 0;
}

.focused-view-head .ghost-button[data-view-target="home"] svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.focused-view-head .global-options-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  width: 58px;
  min-height: var(--home-action-height);
  height: var(--home-action-height);
  padding: 0;
}

.focused-view-head .global-options-button svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.focused-view-head:has(.focused-view-title) {
  justify-content: space-between;
}

.focused-view-head:has(.focused-view-kicker-row) {
  grid-template-columns: minmax(0, 1fr) 58px 58px;
}

#techniquesScreen .focused-view-head {
  grid-template-columns: minmax(300px, 1fr) auto 58px 58px;
}

.focused-view-kicker-row {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  justify-content: center;
  width: max-content;
}

.focused-view-kicker-row .section-kicker {
  margin: 0;
}

.focused-view-head:has(.focused-view-kicker-row) .ghost-button[data-view-target="home"] {
  margin-left: 0;
}

.results-top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.62rem;
  justify-self: end;
  align-self: end;
  width: auto;
  margin-top: 0.35rem;
}

.results-top-actions .ghost-button {
  min-height: var(--home-action-height);
  height: var(--home-action-height);
  min-width: 154px;
  justify-content: center;
}

.technique-exit-nav.is-hidden {
  display: none;
}

.focused-view-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  margin: 0.28rem 0 0.44rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.home-panel {
  display: grid;
  gap: 0.95rem;
  min-height: 260px;
  align-content: start;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 34%),
    linear-gradient(165deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.92));
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.home-action-card {
  width: 100%;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(22, 22, 22, 0.96);
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 0.4rem;
}

.home-action-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.home-action-card strong {
  line-height: 1.3;
}

.setup-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.progress-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.results-grid {
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
}

.full-span {
  grid-column: 1 / -1;
}

.panel {
  padding: 1rem 1.05rem;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  background: transparent;
}

.operation-panel {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  background: transparent;
}

.operation-panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.operation-choice-grid {
  display: grid;
  gap: 0.6rem;
}

.operation-choice-grid.is-pruned-view {
  gap: 0;
}

.operation-choice {
  position: relative;
  display: block;
  max-height: 84px;
  border-radius: var(--control-radius);
  border: 1px solid var(--control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.018);
  overflow: hidden;
  transition:
    opacity 320ms ease,
    transform 320ms ease,
    max-height 260ms ease,
    border-color 260ms ease;
}

.operation-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.operation-choice-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 0.58rem;
  min-height: 64px;
  padding: 0.85rem 0.95rem;
  text-align: left;
}

.operation-choice-icon,
.choice-pill-icon,
.session-badge-icon,
.hud-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.82rem;
  height: 1.82rem;
  border-radius: 0.7rem;
  background: var(--control-surface-strong);
  color: color-mix(in srgb, var(--text) 88%, var(--accent) 12%);
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.12);
}

.operation-choice-copy strong {
  font-size: 1rem;
  line-height: 1.2;
  min-width: 0;
}

.operation-choice-copy small {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.operation-choice-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.operation-change-button {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.24rem 0.54rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.operation-choice.is-selected .operation-choice-status {
  display: none;
}

.operation-choice:has(input:checked) {
  border-color: rgba(var(--accent-rgb), 0.4);
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.14), transparent 48%),
    rgba(var(--accent-rgb), 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.16),
    0 8px 18px rgba(0, 0, 0, 0.12);
  animation: operation-select-slide 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.operation-choice:has(input:checked) .operation-choice-copy small {
  color: rgba(255, 255, 255, 0.86);
}

.operation-choice.is-disabled {
  opacity: 0.62;
}

.operation-choice.is-disabled .operation-choice-copy small {
  color: rgba(255, 255, 255, 0.48);
}

.operation-choice.is-pruned {
  opacity: 0;
  transform: translateX(22px);
  max-height: 0;
  border-color: transparent;
  pointer-events: none;
  transition-delay: 0ms, 0ms, 120ms, 0ms;
}

.operation-choice.is-fading {
  opacity: 0.25;
  transform: scale(0.985);
}

.operation-choice.is-pruned .operation-choice-copy {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

@keyframes operation-select-slide {
  from {
    transform: translateX(18px);
    opacity: 0.65;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.setup-step-shell {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.2rem;
}

.setup-step-field {
  animation: rise-in 240ms ease both;
}

.setup-settings-panel {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.setup-settings-awaiting {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.setup-settings-form {
  animation: rise-in 240ms ease both;
}

.setup-settings-head {
  align-items: center;
}

#setupScreen .focused-view-head {
  margin-bottom: 0.3rem;
}

#setupScreen .operation-panel {
  gap: 0.62rem;
}

#setupScreen .section-heading.compact {
  margin-bottom: 0.42rem;
}

#setupScreen .operation-panel-copy {
  margin-bottom: 0.02rem;
  line-height: 1.38;
}

#setupScreen .operation-choice-grid {
  gap: 0.48rem;
}

#setupScreen .operation-choice-copy {
  min-height: 54px;
  padding: 0.7rem 0.85rem;
}

#setupScreen .setup-step-shell {
  gap: 0.56rem;
  margin-top: 0.12rem;
}

#setupScreen .settings-form {
  gap: 0.58rem;
}

#setupScreen .field > span {
  margin-bottom: 0.14rem;
}

#setupScreen .field-hint {
  margin: 0.08rem 0 0.24rem;
}

#setupScreen .choice-pill > span {
  padding: 0.56rem 0.74rem;
}

#setupScreen .choice-pill-copy {
  gap: 0.12rem;
  min-height: 2.4rem;
  align-content: center;
}

#setupScreen .choice-pill-copy strong {
  font-size: 0.92rem;
}

#setupScreen .choice-pill-copy small {
  font-size: 0.78rem;
}

@media (min-width: 600px) {
  #setupScreen .operation-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  #setupScreen .operation-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#setupScreen .setup-actions {
  padding-top: 0;
}

#setupScreen .field input,
#setupScreen .field select {
  padding: 0.68rem 0.84rem;
  border-radius: 16px;
}

#setupScreen .option-field {
  gap: 0.38rem;
}

#setupScreen .setup-option-list {
  gap: 0.35rem 0.6rem;
}

#setupScreen .extra-options-field {
  padding-top: 0.3rem;
}

#setupScreen #questionTargetField .choice-row-compact,
#setupScreen #timeField .choice-row-compact,
#setupScreen #sparTimingField .choice-row-compact {
  gap: 0.42rem;
}

@media (min-width: 900px) {
  #setupScreen #isolationField {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0.42rem 0.72rem;
    align-items: end;
  }

  #setupScreen #isolationField.is-hidden {
    display: none !important;
  }

  #setupScreen #isolationField > span {
    grid-column: 1 / -1;
  }

  #setupScreen #isolationField > label {
    margin: 0;
  }

  #setupScreen #isolationField .isolation-range-grid {
    margin-top: 0;
    gap: 0.42rem;
  }
}

.setup-actions {
  justify-content: flex-end;
  padding-top: 0.2rem;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.section-heading.compact {
  margin-bottom: 0.75rem;
}

.section-note {
  margin: 0.25rem 0 0;
  max-width: 26ch;
  text-align: right;
  font-size: 1rem;
  line-height: 1.45;
}

.settings-form,
.preview-stack,
.insight-list,
.recent-strip {
  display: grid;
  gap: 0.8rem;
}

.field,
.toggle,
.choice-pill,
.answer-field {
  display: block;
}

.field > span,
.field-helper,
.toggle strong {
  display: block;
  margin-bottom: 0.4rem;
}

.field-helper {
  font-size: 0.96rem;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.range-options-block {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 0.7rem;
  align-items: start;
}

.range-block {
  display: grid;
  gap: 0.42rem;
}

.compact-field-grid {
  gap: 0.65rem;
}

.mini-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mini-toggle-stack {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  justify-self: start;
  width: 100%;
  padding-top: 0;
}

.option-stack-title {
  display: block;
  margin-bottom: 0.26rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}

.option-stack-spacer {
  visibility: hidden;
  margin-bottom: 0;
}

.mini-toggle-list {
  display: grid;
  gap: 0.18rem;
  padding-top: 0.06rem;
}

.setup-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mini-toggle-list .toggle-row {
  align-items: flex-start;
}

.mini-toggle-list .toggle input {
  margin-top: 0.04rem;
}

.compact-toggle {
  height: 100%;
}

.field input,
.field select,
.answer-field input {
  width: 100%;
  padding: 0.84rem 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.field input:focus,
.field select:focus,
.answer-field input:focus {
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
  transform: translateY(-1px);
}

.centered-field input,
.centered-field select {
  text-align: center;
  text-align-last: center;
}

.field select option {
  text-align: center;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.centered-choice {
  justify-content: center;
}

.workout-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.workout-type-grid .choice-pill,
.workout-type-grid .session-choice {
  min-width: 0;
  padding: 0.22rem;
}

.workout-type-grid .choice-pill > span {
  min-height: 3.9rem;
  padding: 0.74rem 0.86rem;
}

.workout-type-grid .choice-pill-copy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.12rem;
  align-content: center;
  justify-items: start;
  text-align: left;
}

.workout-type-grid .choice-pill-copy small {
  grid-column: 1;
  max-width: none;
  white-space: normal;
}

.choice-row-compact .choice-pill {
  min-width: 96px;
}

.choice-pill {
  position: relative;
  flex: 1 1 0;
  min-width: 156px;
  padding: 0.3rem;
  border-radius: var(--control-radius);
  border: 1px solid var(--control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.018);
}

.choice-pill.compact {
  flex: 0 1 auto;
}

.session-choice {
  min-width: 170px;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill > span {
  display: block;
  padding: 0.78rem 0.95rem;
  border-radius: calc(var(--control-radius) - 5px);
  text-align: center;
  color: var(--muted);
}

.choice-pill:has(input:checked) {
  border-color: rgba(var(--accent-rgb), 0.44);
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 48%),
    rgba(var(--accent-rgb), 0.1);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.choice-pill:has(input:checked) > span {
  color: var(--text);
  font-weight: 700;
}

.choice-pill-copy {
  display: grid;
  gap: 0.16rem 0.5rem;
  grid-template-columns: 1fr;
  justify-items: start;
  align-items: center;
  text-align: left;
}

.choice-pill-copy:has(.choice-pill-icon) {
  grid-template-columns: auto minmax(0, 1fr);
}

.choice-pill-copy strong {
  display: block;
  font-size: 0.98rem;
  min-width: 0;
}

.choice-pill-copy small {
  display: block;
  grid-column: 1;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.2;
  max-width: 16ch;
  white-space: nowrap;
}

.choice-pill-icon {
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 0.78rem;
  font-size: 0.95rem;
}

.choice-pill-copy:has(.choice-pill-icon) small {
  grid-column: 2;
}

.toggle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.92rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(26, 26, 26, 0.84);
  border: 1px solid var(--control-border);
}

.toggle input {
  position: relative;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.48rem;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  border: 1px solid var(--control-border-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.18rem;
  width: 1.04rem;
  height: 1.04rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  transform: translate(0, -50%);
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.toggle input:checked {
  border-color: rgba(var(--accent-rgb), 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(var(--accent-rgb), 0.14);
}

.toggle input:checked::after {
  background: #ffffff;
  transform: translate(1.1rem, -50%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.32);
}

.toggle input:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), 0.2),
    inset 0 1px 2px rgba(0, 0, 0, 0.32);
}

.bare-toggle {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  grid-template-columns: 1fr;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  justify-content: flex-start;
  min-height: 28px;
}

.toggle-label {
  color: var(--text);
  font-weight: 700;
}

.tooltip-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
  cursor: help;
}

body[data-color-mode="light"] .tooltip-dot {
  border-color: rgba(72, 97, 130, 0.42);
  color: #617695;
  background: rgba(236, 243, 252, 0.9);
}

.tooltip-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 0.55rem);
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  max-width: 220px;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: rgba(12, 12, 12, 0.98);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity 180ms ease;
}

.tooltip-dot:hover::after,
.tooltip-dot:focus-visible::after {
  opacity: 1;
}

.tooltip-dot:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.45);
  outline-offset: 2px;
}

.nested-field {
  margin-top: 0.55rem;
}

.option-field {
  display: grid;
  gap: 0.5rem;
}

.extra-options-field {
  padding-top: 0.65rem;
}

.isolation-range-grid {
  margin-top: 0.5rem;
}

.preview-item,
.hud-card,
.stat-block,
.insight-item,
.recent-item,
.coach-card,
.table-card,
.roadmap-card,
.reward-status-card {
  border-radius: 24px;
  border: 1px solid var(--control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)),
    rgba(22, 22, 22, 0.92);
}

.preview-item,
.insight-item,
.recent-item,
.coach-card,
.roadmap-card,
.table-card,
.reward-status-card {
  padding: 0.95rem;
}

.preview-label {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.preview-value {
  font-size: 1.06rem;
}

.preview-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.compact-preview {
  min-height: 0;
}

.preview-note {
  margin-top: 0.85rem;
  line-height: 1.6;
}

.preview-actions {
  justify-content: flex-end;
  margin-top: 0.9rem;
}

.techniques-screen-panel {
  min-height: 0;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0.2rem 0 0;
}

.technique-menu-shell,
.technique-celebration-shell {
  display: grid;
  gap: 1rem;
  align-content: start;
  animation: rise-in 260ms ease both;
}

.technique-lesson-wrap {
  display: grid;
  gap: 0.42rem;
  align-content: start;
  min-height: 0;
}

.technique-menu-shell {
  min-height: 0;
}

.technique-menu-head,
.technique-lesson-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.72rem;
}

.technique-menu-head-compact {
  align-items: flex-start;
}

.technique-menu-title-block {
  display: grid;
  gap: 0.35rem;
}

.technique-selector-row {
  --facts-selector-width: 18ch;
  margin-top: 0.25rem;
}

.technique-menu-copy,
.techniques-copy {
  margin: 0;
  max-width: none;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.technique-operation-field {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 210px);
  justify-self: end;
}

.technique-operation-field > span {
  font-weight: 700;
  color: var(--muted);
}

.technique-operation-field select {
  width: 100%;
  height: 46px;
  padding: 0.72rem 2rem;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--surface-strong);
  color: var(--text);
  text-align: center;
  text-align-last: center;
}

.technique-empty-state {
  min-height: 98px;
  display: grid;
  place-items: center;
  text-align: center;
}

.technique-coming-soon-card {
  max-width: 520px;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.09), transparent 48%),
    rgba(22, 22, 22, 0.94);
  text-align: left;
}

.technique-coming-soon-card h3 {
  margin: 0 0 0.3rem;
}

.technique-coming-soon-card p {
  margin: 0;
  color: var(--muted);
}

.technique-table-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.68rem;
}

.technique-card {
  display: grid;
  gap: 0.24rem;
  align-content: start;
  min-height: 84px;
  width: 100%;
  padding: 0.72rem 0.8rem;
  border-radius: 24px;
  border: 1px solid var(--control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(22, 22, 22, 0.92);
  color: var(--text);
  text-align: left;
}

.technique-card strong {
  font-size: 0.96rem;
}

.technique-card-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.18;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.technique-card-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.technique-card.is-active {
  border-color: rgba(232, 190, 79, 0.3);
  background:
    radial-gradient(circle at top right, rgba(232, 190, 79, 0.12), transparent 34%),
    rgba(22, 22, 22, 0.98);
  box-shadow: inset 0 0 0 1px rgba(232, 190, 79, 0.12);
}

.technique-card.is-active .technique-card-pill {
  background: rgba(232, 190, 79, 0.16);
  color: var(--gold);
}

.technique-card.is-building {
  border-color: rgba(232, 190, 79, 0.22);
  background:
    radial-gradient(circle at top right, rgba(232, 190, 79, 0.08), transparent 36%),
    rgba(22, 22, 22, 0.98);
}

.technique-card.is-building .technique-card-pill {
  background: rgba(232, 190, 79, 0.16);
  color: var(--gold);
}

.technique-card.is-completed {
  border-color: rgba(124, 225, 166, 0.24);
  background:
    radial-gradient(circle at top right, rgba(124, 225, 166, 0.12), transparent 34%),
    rgba(22, 22, 22, 0.98);
  box-shadow: inset 0 0 0 1px rgba(124, 225, 166, 0.1);
}

.technique-card.is-completed .technique-card-pill {
  background: rgba(124, 225, 166, 0.16);
  color: var(--success);
}

.technique-card:disabled {
  opacity: 0.92;
  cursor: not-allowed;
  border-color: rgba(127, 146, 170, 0.34);
  background:
    radial-gradient(circle at top right, rgba(127, 146, 170, 0.12), transparent 34%),
    rgba(24, 24, 24, 0.97);
}

.technique-card:disabled:hover {
  transform: none;
}

.technique-shell {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.technique-stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.technique-context-actions {
  display: flex;
  justify-content: flex-start;
}

.technique-stage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
   gap: 0.35rem;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(28, 28, 28, 0.92);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technique-stage-pill.is-active {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text);
}

.technique-stage-pill.is-unlocked {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
}

.technique-stage-pill.is-locked {
  opacity: 1;
  border-color: rgba(127, 146, 170, 0.34);
  background: rgba(57, 67, 82, 0.42);
  color: #c6d0de;
}

.technique-stage-pill[data-technique-stage-jump]:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.54);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.technique-stage-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.8rem;
  height: 0.8rem;
  color: var(--muted);
}

.technique-stage-lock svg {
  width: 100%;
  height: 100%;
  display: block;
}

.technique-stage-lock path,
.technique-stage-lock rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.technique-lesson-card {
  display: grid;
  gap: 0.52rem;
  padding: 0.72rem;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: rgba(20, 20, 20, 0.96);
}

.technique-lesson-card.technique-question-shell {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.technique-rule-grid,
.technique-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.technique-example-card,
.technique-switch-card,
.technique-hint {
  padding: 0.9rem 0.95rem;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(24, 24, 24, 0.96);
}

.technique-example-card,
.technique-switch-card {
  display: grid;
  gap: 0.35rem;
}

.make10-idea-card .technique-helper,
.make10-idea-card .technique-equation,
.make10-idea-card .technique-example-card {
  text-align: center;
}

.addition-idea-card .technique-helper,
.addition-idea-card .technique-example-card {
  text-align: center;
}

.technique-step-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.addition-example-equation {
  font-size: clamp(1rem, 2vw, 1.34rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.addition-practice-hint {
  margin-top: 0.5rem;
  text-align: center;
}

.technique-equation {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.technique-caption,
.technique-helper,
.technique-progress-copy {
  color: var(--muted);
  line-height: 1.5;
}

.technique-zero {
  color: var(--technique-zero-color);
}

.technique-factor {
  color: var(--technique-factor-color);
}

.technique-pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
}

.technique-pattern-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  min-height: 82px;
  padding: 0.82rem 0.86rem;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(24, 24, 24, 0.96);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.technique-pattern-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  min-height: 1.6rem;
  flex: 0 0 1.6rem;
}

.technique-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: transparent;
  background: transparent;
  opacity: 0;
  transition:
    opacity 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.technique-status-icon svg {
  width: 0.86rem;
  height: 0.86rem;
  display: block;
}

.technique-status-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.technique-status-icon.is-correct {
  opacity: 1;
  border-color: rgba(124, 225, 166, 0.55);
  background: rgba(124, 225, 166, 0.16);
  color: var(--success);
}

.technique-status-icon.is-error {
  opacity: 1;
  border-color: rgba(255, 106, 106, 0.56);
  background: rgba(255, 106, 106, 0.14);
  color: var(--danger);
}

.technique-pattern-row.is-correct {
  border-color: rgba(124, 225, 166, 0.28);
  box-shadow: inset 0 0 0 1px rgba(124, 225, 166, 0.08);
}

.technique-pattern-row.is-error {
  border-color: rgba(255, 106, 106, 0.24);
}

.technique-inline-input {
  width: 4.8rem;
  padding: 0.5rem 0.62rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface-strong);
  color: var(--text);
  text-align: center;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.technique-inline-input:focus {
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.technique-inline-input.is-error {
  border-color: rgba(255, 106, 106, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 106, 106, 0.1);
}

.technique-inline-input.is-wide {
  width: 5.8rem;
}

.technique-inline-input.is-correct {
  border-color: rgba(124, 225, 166, 0.68);
  box-shadow: 0 0 0 3px rgba(124, 225, 166, 0.1);
}

.technique-inline-input,
.technique-answer-wrap .answer-field input {
  font-variant-numeric: tabular-nums;
}

.is-technique-colored {
  color: var(--text);
  -webkit-text-fill-color: currentColor;
  caret-color: var(--text);
  background-image: linear-gradient(
    90deg,
    var(--technique-factor-color) 0%,
    var(--technique-factor-color) var(--technique-factor-stop, 100%),
    var(--technique-zero-color) var(--technique-factor-stop, 100%),
    var(--technique-zero-color) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
}

.technique-answer-wrap .answer-field input.is-technique-colored {
  background-image: none;
  color: var(--text);
  -webkit-text-fill-color: currentColor;
  caret-color: var(--text);
}

.technique-inline-input.is-technique-colored:focus,
.technique-answer-wrap .answer-field input.is-technique-colored:focus {
  color: var(--text);
  -webkit-text-fill-color: currentColor;
  background-image: none;
  caret-color: var(--text);
}

.technique-question-shell {
  display: grid;
  gap: 0.6rem;
}

.technique-practice-shell {
  gap: 0;
}

.technique-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.technique-question {
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.technique-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.technique-practice-problem {
  margin: 0;
  min-height: 62px;
}

.technique-practice-problem .technique-question {
  font-size: clamp(2.3rem, 6.2vw, 3.6rem);
}

.technique-keypad {
  gap: 0.28rem;
  margin-top: 0.08rem;
}

.technique-keypad .ghost-button {
  min-height: 40px;
  font-size: 1rem;
  padding: 0.35rem;
}

.technique-practice-input-row .primary-button {
  min-height: 46px;
  padding-inline: 1rem;
}

.technique-answer-wrap {
  position: relative;
}

.technique-answer-wrap .answer-field {
  margin: 0;
}

.technique-input-row .answer-field input {
  min-height: 46px;
}

.technique-answer-wrap .answer-field input {
  padding-right: 3.1rem;
}

.technique-answer-wrap.is-correct .answer-field input {
  border-color: rgba(124, 225, 166, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 225, 166, 0.1);
}

.technique-answer-wrap.is-error .answer-field input {
  border-color: rgba(255, 106, 106, 0.68);
  box-shadow: 0 0 0 3px rgba(255, 106, 106, 0.1);
}

.technique-answer-signal {
  position: absolute;
  top: 50%;
  right: 0.82rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.technique-status-icon-inline {
  width: 1.6rem;
  height: 1.6rem;
}

.technique-hint {
  border-color: rgba(232, 190, 79, 0.16);
  background: rgba(232, 190, 79, 0.08);
}

.technique-feedback {
  min-height: 1.1rem;
  margin: 0.12rem 0 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.technique-feedback:empty {
  display: none;
}

.technique-feedback.success {
  color: var(--success);
}

.technique-feedback.error {
  color: var(--danger);
}

.technique-compare-question {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.technique-compare-box {
  width: 0.95em;
  height: 0.95em;
  border: 2px solid currentColor;
  border-radius: 0.14em;
}

.technique-compare-mini {
  margin: 0.28rem 0 0;
  text-align: center;
  font-size: 1.18rem;
  color: var(--muted);
  font-weight: 700;
}

.technique-operator-row {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  padding-top: 0.4rem;
}

.technique-operator-button {
  min-width: 132px;
  min-height: 88px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  border-radius: 18px;
}

.technique-operator-symbol {
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
}

.technique-operator-label {
  font-size: 0.78rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.technique-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
  align-items: center;
  padding-top: 0.35rem;
}

.technique-action-row-end {
  padding-top: 0.7rem;
}

.technique-action-row-end {
  justify-content: flex-end;
}

.technique-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-left: 0;
}

.technique-completion-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.2rem;
  border-radius: 24px;
  border: 1px solid rgba(232, 190, 79, 0.16);
  background:
    radial-gradient(circle at top right, rgba(232, 190, 79, 0.12), transparent 34%),
    rgba(20, 20, 20, 0.96);
}

.technique-completion-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.technique-completion-copy {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.6;
}

.technique-completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.countdown-panel {
  display: grid;
  place-items: center;
  min-height: 480px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(var(--accent-rgb), 0.16), transparent 30%),
    linear-gradient(160deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.92));
  align-content: center;
  gap: 0.65rem;
}

.countdown-panel .section-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.19em;
}

.countdown-copy {
  margin: 0.35rem 0 0;
  max-width: 14ch;
  font-size: clamp(1.45rem, 3.8vw, 2.35rem);
  color: var(--text);
  font-weight: 700;
  line-height: 1.05;
}

.countdown-subcopy {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.countdown-number {
  min-width: 3ch;
  font-size: clamp(5.3rem, 15vw, 8.4rem);
  font-weight: 700;
  line-height: 1;
}

.countdown-pop {
  animation: countdown-pop 300ms ease;
}

.practice-panel {
  max-width: none;
  margin: 0;
  background: transparent;
}

.practice-topbar,
.practice-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.56rem 0.88rem;
  border-radius: 18px;
  border: 1px solid var(--control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(24, 24, 24, 0.56);
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 88%, var(--muted) 12%);
}

.session-badge-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.58rem;
  font-size: 0.82rem;
}

.subtle-button {
  padding: 0.75rem 0.96rem;
}

.hud-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.72rem 0;
}

.hud-card,
.stat-block {
  padding: 0.82rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: transparent;
}

.hud-card,
.stat-block {
  display: grid;
  place-items: center;
  text-align: center;
}

.hud-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  margin-bottom: 0.28rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.hud-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.52rem;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--text) 74%, var(--muted) 26%);
}

.hud-value,
.stat-value {
  display: block;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.05;
  width: 100%;
  text-align: center;
}

.practice-progress-row {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  margin-bottom: 0.5rem;
  min-height: 34px;
}

.progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
}

.progress-track.streak-smoke::after {
  opacity: 0.44;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 62%);
  animation: streak-smoke 1.9s ease-in-out infinite;
}

.progress-track.streak-spark::after {
  opacity: 0.56;
  background: radial-gradient(circle, rgba(255, 191, 102, 0.5), transparent 66%);
  animation: streak-spark 1s linear infinite;
}

.progress-track.streak-flame::after {
  opacity: 0.74;
  background: radial-gradient(circle, rgba(255, 96, 60, 0.64), transparent 70%);
  animation: streak-flame 0.76s linear infinite;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition:
    width 220ms ease,
    background 220ms ease;
}

.progress-text {
  min-width: 144px;
  text-align: right;
  font-size: 1rem;
  color: var(--muted);
}

.spar-strike-hud {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.spar-strike-box {
  width: 34px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background: rgba(20, 20, 20, 0.96);
  color: transparent;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.spar-strike-box.is-hit {
  border-color: rgba(var(--accent-rgb), 0.66);
  background: rgba(var(--accent-rgb), 0.2);
  color: #ffd0d0;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.26);
}

.combo-indicator {
  width: fit-content;
  min-width: 124px;
  margin: 0 0 0.42rem auto;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(26, 26, 26, 0.94);
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 170ms ease,
    transform 170ms ease,
    box-shadow 170ms ease,
    border-color 170ms ease;
}

.combo-indicator.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.practice-response-rail {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
  min-height: 0.58rem;
  margin: -0.1rem 0 0.35rem auto;
}

.practice-response-dot {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid transparent;
}

.practice-response-dot.correct {
  background: rgba(124, 225, 166, 0.86);
  border-color: rgba(124, 225, 166, 0.9);
}

.practice-response-dot.incorrect,
.practice-response-dot.skipped {
  background: rgba(var(--accent-rgb), 0.86);
  border-color: rgba(var(--accent-rgb), 0.9);
}

.combo-indicator.tier-smoke {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.combo-indicator.tier-spark {
  border-color: rgba(255, 191, 102, 0.54);
  box-shadow: 0 0 16px rgba(255, 191, 102, 0.24);
}

.combo-indicator.tier-flame {
  border-color: rgba(255, 97, 70, 0.64);
  box-shadow: 0 0 20px rgba(255, 97, 70, 0.3);
}

.problem-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 194px;
  margin: 0.68rem 0;
  padding: 1rem;
  text-align: center;
  border-radius: 28px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(circle at top, rgba(var(--accent-rgb), 0.12), transparent 34%),
    rgba(18, 18, 18, 0.96);
}

.problem-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

.problem-wrap.streak-smoke::before {
  opacity: 0.44;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.16);
  animation: streak-smoke 1.9s ease-in-out infinite;
}

.problem-wrap.streak-spark::before {
  opacity: 0.58;
  box-shadow:
    0 0 34px rgba(255, 190, 100, 0.28),
    inset 0 0 0 1px rgba(255, 190, 100, 0.3);
  animation: streak-spark 1s linear infinite;
}

.problem-wrap.streak-flame::before {
  opacity: 0.76;
  box-shadow:
    0 0 46px rgba(255, 97, 70, 0.36),
    inset 0 0 0 1px rgba(255, 97, 70, 0.4);
  animation: streak-flame 0.7s linear infinite;
}

.problem-text {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-size: clamp(3rem, 9vw, 5.2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.answer-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.62rem;
  align-items: center;
  touch-action: manipulation;
}

.practice-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
  margin-top: 0.3rem;
  touch-action: manipulation;
}

.practice-keypad .ghost-button,
.practice-keypad .primary-button {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  justify-content: center;
  font-size: 1.08rem;
  font-weight: 700;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.practice-panel.streak-flame {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 97, 70, 0.3),
    0 0 34px rgba(255, 97, 70, 0.24);
}

.practice-panel.streak-smoke {
  box-shadow:
    var(--shadow),
    0 0 22px rgba(255, 255, 255, 0.12);
}

.practice-panel.streak-spark {
  box-shadow:
    var(--shadow),
    0 0 30px rgba(255, 190, 100, 0.2);
}

.answer-field input {
  min-height: 58px;
  font-size: 1rem;
  text-align: center;
  touch-action: manipulation;
}

.answer-field {
  position: relative;
}

.answer-field input {
  padding-right: 2.4rem;
}

.answer-status-icon {
  position: absolute;
  right: -0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  border: 2px solid transparent;
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease, color 140ms ease;
  pointer-events: none;
}

.answer-status-icon.is-correct,
.answer-status-icon.is-error,
.answer-status-icon.is-sign-error {
  opacity: 1;
  transform: translateY(-50%) scale(1.02);
}

.answer-status-icon.is-correct {
  color: #ffffff;
  background: #0f8a53;
  border-color: #0c6940;
}

.answer-status-icon.is-error {
  color: #ffffff;
  background: #c44536;
  border-color: #933125;
}

.answer-status-icon.is-sign-error {
  color: #ffffff;
  background: #af8828;
  border-color: #8d6b17;
}

.answer-field.is-correct input {
  border-color: var(--success);
  box-shadow: 0 0 0 4px var(--glow-success);
}

.answer-field.is-error input {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px var(--glow-danger);
}

.answer-field.is-sign-error input {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 190, 79, 0.18);
}

.answer-field input::placeholder {
  text-align: center;
}

.feedback {
  display: none;
}

.practice-panel.has-touch-keypad .problem-wrap {
  min-height: 170px;
}

.practice-panel.has-touch-keypad .hud-card {
  padding: 0.72rem;
}

.keypad-sign-toggle[aria-pressed="true"] {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--text);
}

.feedback.success {
  color: var(--success);
}

.feedback.error {
  color: var(--danger);
}

.problem-wrap.feedback-correct {
  box-shadow: 0 0 0 2px rgba(21, 166, 96, 0.45), 0 0 28px rgba(21, 166, 96, 0.2);
}

.problem-wrap.feedback-error {
  box-shadow: 0 0 0 2px rgba(201, 69, 54, 0.45), 0 0 28px rgba(201, 69, 54, 0.2);
}

.results-summary {
  margin: 0 0 0.95rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(24, 24, 24, 0.96);
  text-align: center;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-stats,
.stats-grid,
.streak-metrics {
  display: grid;
  gap: 0.8rem;
}

.results-actions {
  display: none;
}

.results-stats .stat-block {
  cursor: default;
}

.results-stats .stat-block:hover {
  transform: none;
  box-shadow: none;
}

.results-stats,
.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.results-stats {
  align-self: start;
}

.streak-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.95rem;
}

.compact-stat .stat-value {
  font-size: clamp(1.32rem, 3vw, 1.85rem);
}

.stat-label {
  margin-top: 0.25rem;
  width: 100%;
  text-align: center;
}

.results-actions {
  margin-top: 1.15rem;
}

.slide-subtitle {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.calendar-nav-button,
.carousel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-weight: 700;
  line-height: 1;
}

.calendar-nav-button {
  width: var(--calendar-button-size);
  height: var(--calendar-button-size);
  font-size: 1.22rem;
}

.carousel-button {
  width: var(--carousel-button-size);
  height: var(--carousel-button-size);
  font-size: 1.3rem;
}

.carousel-button {
  box-shadow:
    0 20px 34px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.calendar-nav-button:disabled {
  background: rgba(28, 28, 28, 0.8);
  border-color: rgba(255, 255, 255, 0.06);
}

.month-label {
  min-width: 0;
  text-align: center;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 700;
}

.reward-status-card {
  margin-bottom: 0.75rem;
  text-align: center;
  line-height: 1.45;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

.calendar-weekdays {
  margin: 0.8rem 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72);
}

.calendar-weekdays span {
  text-align: center;
}

.calendar-weekdays.compact {
  margin-top: 0;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: space-between;
  min-height: 74px;
  padding: 0.58rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(19, 19, 19, 0.95);
}

.calendar-grid.compact .calendar-day {
  min-height: 68px;
}

.calendar-day.empty {
  background: transparent;
  border-style: dashed;
  opacity: 0.18;
}

.calendar-day.today {
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.calendar-day.has-activity {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(24, 24, 24, 0.95);
}

.calendar-day.has-attempt-goal {
  background: linear-gradient(180deg, rgba(42, 20, 20, 0.96), rgba(24, 18, 18, 0.94));
  border-color: rgba(var(--accent-rgb), 0.14);
}

.calendar-day.has-accuracy-goal {
  box-shadow:
    inset 0 0 0 1px rgba(232, 190, 79, 0.22),
    0 10px 20px rgba(232, 190, 79, 0.12);
}

.calendar-day.has-attempt-goal.has-accuracy-goal {
  background: linear-gradient(135deg, rgba(58, 28, 16, 0.98), rgba(28, 20, 18, 0.94));
}

.calendar-day-top {
  display: flex;
  align-items: start;
  justify-content: flex-start;
}

.calendar-day-body {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
}

.day-number {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
  font-weight: 700;
}

.day-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  width: 100%;
}

.day-attempt,
.day-accuracy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.day-attempt {
  width: 17px;
  height: 17px;
  color: #ff7b7b;
}

.day-accuracy {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.day-attempt svg,
.day-accuracy svg {
  width: 100%;
  height: 100%;
  display: block;
}

.day-attempt path,
.day-accuracy path {
  fill: currentColor;
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.carousel-actions {
  display: flex;
  gap: 0.42rem;
}

.carousel-shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: 0;
  margin-bottom: 0.72rem;
}

.carousel-shell-head-kicker-nav {
  display: none;
}

.carousel-inline-kicker {
  display: block;
  margin: 0;
  width: var(--carousel-label-width);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-inline-nav-row {
  display: inline-grid;
  grid-template-columns: 1.38rem var(--carousel-label-width) 1.38rem;
  align-items: center;
  gap: 0.42rem;
}

.carousel-inline-nav-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.38rem;
  height: 1.38rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.carousel-inline-nav-button:hover:not(:disabled),
.carousel-inline-nav-button:focus-visible:not(:disabled) {
  color: var(--accent-strong);
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.08);
  filter: none;
}

.carousel-inline-nav-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.carousel-panel {
  --carousel-frame-height: clamp(450px, 62dvh, 700px);
  --carousel-side-gutter: var(--results-progress-side-gutter, clamp(2.9rem, 4.2vw, 4.2rem));
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-inline: var(--carousel-side-gutter);
  overflow: visible;
}

.carousel-actions-floating {
  position: static;
  inset: auto;
  display: flex;
  justify-content: center;
  pointer-events: none;
  margin: 0;
  z-index: 1;
}

.carousel-actions-floating .carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  background: rgba(248, 251, 255, 0.88);
  border-color: rgba(12, 22, 36, 0.2);
  color: #121d2b;
  box-shadow:
    0 14px 24px rgba(4, 10, 18, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.carousel-actions-floating .carousel-button:hover:not(:disabled),
.carousel-actions-floating .carousel-button:focus-visible:not(:disabled) {
  transform: translateY(-50%);
}

.carousel-actions-floating .carousel-button:first-child {
  left: calc((var(--carousel-side-gutter) - var(--carousel-button-size)) / 2);
}

.carousel-actions-floating .carousel-button:last-child {
  right: calc((var(--carousel-side-gutter) - var(--carousel-button-size)) / 2);
}

body[data-color-mode="light"] .carousel-actions-floating .carousel-button {
  background: rgba(26, 40, 62, 0.92);
  border-color: rgba(20, 33, 54, 0.36);
  color: #f2f6ff;
  box-shadow: 0 4px 10px rgba(22, 33, 50, 0.16);
}

.carousel-button:disabled {
  opacity: 0.4;
  background: rgba(225, 233, 243, 0.8);
  border-color: rgba(12, 22, 36, 0.14);
  color: rgba(12, 22, 36, 0.4);
  box-shadow: none;
}

.carousel-position-indicator {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 0.82rem);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(16, 24, 36, 0.88);
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  z-index: 18;
}

.carousel-position-copy {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.carousel-position-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.app-page-indicator {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 0.82rem);
  transform: translateX(-50%);
  z-index: 19;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(16, 24, 36, 0.88);
  backdrop-filter: blur(6px);
}

.app-page-indicator.is-hidden {
  display: none;
}

.app-page-indicator .carousel-position-dot {
  width: 6px;
  height: 6px;
}

body[data-color-mode="light"] .app-page-indicator {
  background: rgba(22, 33, 50, 0.94);
  border-color: rgba(22, 33, 50, 0.42);
}

body[data-color-mode="light"] .carousel-position-dot.is-active {
  background: #36557b;
}

body[data-color-mode="light"] #techniquesScreen {
  background: transparent;
}

.carousel-position-dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.carousel-position-dot.is-active {
  background: rgba(var(--accent-rgb), 0.96);
}

.results-carousel,
.progress-carousel {
  display: grid;
  gap: 0.95rem;
  position: relative;
  flex: 1 1 auto;
  height: min(100%, var(--carousel-frame-height));
  min-height: min(100%, var(--carousel-frame-height));
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

.screen-grid,
.screen-grid > *,
.tracker-layout,
.focus-columns,
.focus-column,
.carousel-panel,
.results-carousel,
.progress-carousel,
.results-slide,
.progress-slide {
  min-width: 0;
}

.results-screen-panel,
.progress-screen-panel {
  height: 100%;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.2rem 0 0.1rem;
}

#resultsScreen.screen.is-active,
#progressScreen.screen.is-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 0.42rem;
  overflow-y: hidden;
}

/* Keep slide content clear of top utility rail; no upward overlap. */
#resultsScreen .results-screen-panel,
#progressScreen .progress-screen-panel {
  margin-top: 0;
}

.results-slide,
.progress-slide {
  display: none;
}

.results-slide.is-active,
.progress-slide.is-active {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: none;
}

.results-slide[data-results-slide="summary"].is-active {
  grid-template-rows: auto auto auto;
  align-content: start;
}

.progress-slide[data-progress-slide="facts"].is-active {
  overflow-y: hidden;
  gap: 0.7rem;
}

.progress-slide[data-progress-slide="facts"] .table-grid {
  gap: 0.48rem;
}

@media (min-width: 768px) and (max-width: 1366px) {
  .page-shell {
    width: 100%;
    padding-top: 0;
  }

  .carousel-panel {
    --carousel-frame-height: clamp(420px, 54dvh, 580px);
  }

  .hero-mark {
    width: clamp(86px, 10vw, 120px);
    height: clamp(86px, 10vw, 120px);
  }

  h1 {
    font-size: clamp(2.7rem, 4.8vw, 4.05rem);
  }

  .hero-copy {
    min-height: 0;
  }

  .carousel-panel {
    padding-inline: clamp(1.1rem, 3vw, 2.1rem);
  }

  .slide-heading-with-filter {
    gap: 0.75rem;
  }

  .facts-selector-row,
  .records-selector-row {
    --facts-selector-width: 16ch;
    gap: 0.48rem;
  }

  .mastery-view-controls {
    gap: 0.48rem;
  }

  .mastery-view-controls .progress-inline-selector {
    --facts-selector-width: 16ch;
  }

  .focus-columns {
    gap: 0.7rem;
  }

  .focus-column {
    padding-inline: 0.4rem;
  }

  .focus-column + .focus-column {
    padding-left: 1rem;
  }
}

.slide-heading,
.tracker-slide-head {
  display: grid;
  gap: 1rem;
  align-content: start;
  justify-items: start;
  margin-bottom: 0.4rem;
}

.slide-heading-with-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.slide-heading-with-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 0.4rem;
}

.slide-heading-with-filter > div {
  display: grid;
  gap: 0.72rem;
}

.tracker-slide-head {
  margin-bottom: 0;
}

.slide-heading h2 {
  font-size: clamp(1.72rem, 3vw, 2.36rem);
  line-height: 1.03;
}

.tracker-slide-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.stacked-heading span {
  display: block;
}

.stacked-heading {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 0.88;
}

.calendar-nav-tall {
  align-self: flex-start;
}

.tracker-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 1.45rem;
  align-items: start;
}

.tracker-left-column {
  display: grid;
  gap: 1rem;
  padding-right: 0.85rem;
  border-right: 1px solid var(--stroke);
}

.tracker-side-panel {
  display: grid;
  gap: 0.8rem;
}

.tracker-stat-grid,
.tracker-mini-grid {
  display: grid;
  gap: 0.75rem;
}

.tracker-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tracker-mini-card {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 0.82rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: transparent;
  text-align: center;
}

.tracker-mini-value {
  font-size: 1.3rem;
  font-weight: 700;
  width: 100%;
  text-align: center;
}

.tracker-mini-label {
  font-size: 0.76rem;
  line-height: 1.12;
  white-space: nowrap;
  color: var(--muted);
  width: 100%;
  text-align: center;
}

.tracker-calendar-wrap {
  display: grid;
  gap: 0.38rem;
  padding-top: 0;
  min-width: 0;
}

.tracker-side-panel .compact-stat {
  min-height: 108px;
}

.tracker-calendar-head,
.records-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.progress-filter select,
.facts-filter select,
.records-filter select {
  min-width: 210px;
  width: 210px;
  height: 40px;
  padding: 0.5rem 2rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(29, 29, 29, 0.94);
  color: var(--text);
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.progress-filter select option,
.facts-filter select option,
.records-filter select option {
  text-align: center;
}

.progress-filter,
.facts-filter,
.records-filter {
  position: relative;
}

.progress-filter::after,
.facts-filter::after,
.records-filter::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.86rem;
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-62%) rotate(45deg);
  opacity: 0.85;
  pointer-events: none;
}

.records-filter-row-head {
  justify-content: flex-end;
}

.tracker-title-block h2 {
  max-width: 10ch;
}

.tracker-title-block .carousel-inline-kicker {
  white-space: nowrap;
}

.tracker-calendar-head .preview-label {
  margin-bottom: 0;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
}

.tracker-calendar-head .calendar-nav {
  display: inline-grid;
  grid-template-columns: 0.9rem minmax(9ch, max-content) 0.9rem;
  align-items: center;
  gap: 0.52rem;
}

.tracker-calendar-head .calendar-nav-button {
  width: 0.9rem;
  height: 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: none;
}

.tracker-calendar-head .calendar-nav-button:hover:not(:disabled),
.tracker-calendar-head .calendar-nav-button:focus-visible:not(:disabled) {
  color: var(--text);
  box-shadow: none;
  filter: brightness(1.12);
}

.tracker-calendar-head .calendar-nav-button:disabled {
  background: transparent;
  border-color: transparent;
  color: var(--text);
  opacity: 0.4;
}

.tracker-calendar-head .month-label {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.tracker-calendar-wrap .calendar-weekdays,
.tracker-calendar-wrap .calendar-grid {
  gap: 0.35rem;
}

.tracker-calendar-wrap .calendar-day {
  min-height: 66px;
  padding: 0.52rem;
  border-radius: 16px;
}

.tracker-calendar-wrap .calendar-grid.compact .calendar-day {
  min-height: 62px;
}

.focus-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: start;
}

.focus-stack {
  display: grid;
  gap: 1.1rem;
}

.focus-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.focus-panel {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  grid-template-rows: auto 1fr;
}

.focus-column {
  display: grid;
  gap: 0.42rem;
  align-content: start;
  padding-inline: 0.9rem;
  min-height: 100%;
}

.focus-column:first-child {
  padding-left: 0;
}

.focus-column:last-child {
  padding-right: 0;
}

.focus-column + .focus-column {
  padding-left: 1.4rem;
  border-left: 1px solid var(--stroke);
}

.focus-panel-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.focus-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.focus-card-grid-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.focus-card {
  display: grid;
  gap: 0.36rem;
  align-content: start;
  min-height: 96px;
  padding: 0.68rem 0.74rem;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.focus-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.focus-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.26rem 0.54rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14);
  color: #ff8a8a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.subtle-chip {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.success-chip {
  background: rgba(124, 225, 166, 0.14);
  color: var(--success);
}

.warning-chip {
  background: rgba(232, 190, 79, 0.16);
  color: var(--gold);
}

.focus-panel .empty-state {
  min-height: 132px;
}

.focus-card .fact-name {
  font-size: 0.94rem;
  line-height: 1.25;
}

.focus-metric {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.focus-meta-row {
  color: var(--muted);
  line-height: 1.45;
}

.mastery-grid {
  display: grid;
  gap: 0.85rem;
  align-items: start;
}

.mastery-view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.56rem;
}

.mastery-view-controls .fact-carousel-selector.is-disabled {
  opacity: 0.45;
}

.mastery-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.mastery-card {
  display: grid;
  gap: 0.62rem;
  align-content: start;
  width: 100%;
  min-width: 0;
  min-height: 188px;
  padding: 0.95rem;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(14, 14, 14, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mastery-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.mastery-card-head strong {
  display: block;
  margin: 0.14rem 0 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 850;
  line-height: 0.95;
}

.mastery-score {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
}

.mastery-score-large {
  width: 3.4rem;
  height: 3.4rem;
  font-size: 1.18rem;
}

.mastery-rank-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
}

.mastery-rank-dot {
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.mastery-rank-dot.is-current {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.5);
}

.mastery-meter {
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.mastery-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.mastery-snapshot-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.mastery-snapshot-metrics div,
.mastery-signal-grid {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.mastery-signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.mastery-snapshot-metrics div,
.mastery-signal-grid div {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  padding: 0.46rem 0.5rem;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.mastery-snapshot-metrics strong,
.mastery-signal-grid strong {
  font-size: 0.92rem;
  line-height: 1.1;
}

.mastery-snapshot-metrics span,
.mastery-signal-grid span,
.mastery-card-next,
.mastery-next span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.mastery-card-next {
  display: block;
}

.mastery-detail-panel {
  display: grid;
  gap: 0.78rem;
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.11), rgba(255, 255, 255, 0.02)),
    rgba(14, 14, 14, 0.42);
}

.mastery-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.mastery-detail-head h3 {
  margin: 0.12rem 0 0;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  line-height: 1;
}

.mastery-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 0.8rem;
}

.mastery-detail-grid section {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.mastery-detail-grid h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mastery-rank-track-detail {
  gap: 0.36rem;
}

.mastery-rank-track-detail .mastery-rank-dot {
  height: 0.56rem;
}

.mastery-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.mastery-form-row span {
  min-width: 0;
  padding: 0.38rem 0.44rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.mastery-form-row strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
}

.mastery-next {
  display: grid;
  gap: 0.22rem;
  padding-top: 0.1rem;
}

.mastery-next p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
}

.mastery-summary-note {
  margin: 0;
}

.records-filter-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.is-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.facts-header-content {
  display: grid;
  gap: 0.66rem;
  width: 100%;
}

.facts-header-content .carousel-inline-kicker {
  min-width: 0;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  letter-spacing: 0.2em;
}

.facts-selector-row {
  --facts-selector-width: 14ch;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--facts-selector-width), var(--facts-selector-width)));
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.2rem;
}

.fact-carousel-selector {
  display: inline-grid;
  grid-template-columns: 0.9rem minmax(0, 1fr) 0.9rem;
  align-items: center;
  gap: 0.52rem;
  min-height: 40px;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(29, 29, 29, 0.94);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  width: var(--facts-selector-width);
}

.progress-inline-selector {
  --facts-selector-width: 18ch;
}

.fact-range-nav {
  width: var(--facts-selector-width);
  min-width: 0;
  max-width: none;
}

.fact-range-nav[hidden] {
  display: none;
}

.fact-range-button {
  width: 1.38rem;
  height: 1.38rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.fact-range-button:hover:not(:disabled),
.fact-range-button:focus-visible:not(:disabled) {
  color: var(--accent-strong);
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.08);
  filter: none;
}

.fact-range-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.fact-carousel-label,
#factRangeLabel {
  flex: 1 1 auto;
  display: block;
  min-width: 84px;
  text-align: center;
  font-size: 0.96rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.records-selector-row {
  --facts-selector-width: 18ch;
}

.records-panel-head {
  min-height: 40px;
}

.single-column-grid {
  grid-template-columns: 1fr;
}

.single-column-grid .focus-card {
  min-height: 84px;
}

.records-split {
  gap: 0.95rem;
}

.results-title-highlight {
  color: var(--gold);
  text-shadow: 0 0 24px rgba(232, 190, 79, 0.16);
}

.record-card .focus-chip {
  max-width: 100%;
}

.coach-card strong,
.roadmap-card strong {
  color: var(--text);
}

.insight-item {
  display: grid;
  gap: 0.75rem;
}

.insight-top,
.recent-top,
.table-card-top,
.table-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.fact-name,
.recent-equation,
.table-name {
  font-weight: 700;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.bar-fill.unseen {
  background: rgba(115, 101, 90, 0.24);
}

.bar-fill.needs {
  background: linear-gradient(90deg, rgba(212, 90, 53, 0.75), rgba(181, 60, 34, 0.96));
}

.bar-fill.steady {
  background: linear-gradient(90deg, rgba(216, 170, 75, 0.86), rgba(195, 131, 28, 0.96));
}

.bar-fill.strong {
  background: linear-gradient(90deg, rgba(47, 124, 83, 0.86), rgba(28, 101, 62, 0.96));
}

.recent-strip {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.recent-item.correct {
  border-color: rgba(124, 225, 166, 0.22);
}

.recent-item.incorrect {
  border-color: rgba(var(--accent-rgb), 0.22);
}

.recent-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.recent-pill.correct {
  background: rgba(124, 225, 166, 0.12);
  color: var(--success);
}

.recent-pill.incorrect {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--danger);
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 0.62rem;
}

.table-grid.multiplication-table-grid,
.table-grid.addition-table-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-grid.addition-table-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-card {
  display: grid;
  gap: 0.62rem;
  min-height: 158px;
  grid-template-rows: auto auto auto 1fr;
  padding: 0.62rem 0.68rem;
  border-radius: 20px;
  border: 1px solid var(--control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
}

.table-card[role="button"],
.addition-bucket-card {
  cursor: pointer;
}

.table-card[role="button"]:hover,
.table-card[role="button"]:focus-within,
.addition-bucket-card:hover,
.addition-bucket-card:focus-within {
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.08), transparent 46%),
    rgba(255, 255, 255, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.24),
    0 10px 22px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

@media (hover: hover) and (pointer: fine) {
  .focus-card:hover,
  .recent-item:hover,
  .coach-card:hover,
  .tracker-mini-card:hover {
    border-color: rgba(var(--accent-rgb), 0.24);
    background:
      radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.07), transparent 48%),
      rgba(255, 255, 255, 0.024);
    box-shadow:
      inset 0 0 0 1px rgba(var(--accent-rgb), 0.18),
      0 8px 18px rgba(0, 0, 0, 0.14);
  }
}

.stat-block:hover {
  transform: none;
  border-color: var(--stroke);
  background: rgba(22, 22, 22, 0.96);
  box-shadow: none;
}

.addition-bucket-card {
  position: relative;
  min-height: 166px;
  padding: 0;
  overflow: hidden;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.addition-bucket-card:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.52);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.addition-bucket-face {
  display: grid;
  gap: 0.54rem;
  padding: 0.62rem 0.72rem;
  grid-template-rows: auto auto auto auto;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.addition-bucket-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
  min-height: 52px;
}

.addition-bucket-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.addition-bucket-front {
  opacity: 1;
  transform: translateY(0);
}

.addition-bucket-back {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.addition-bucket-card.is-flipped .addition-bucket-front {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.addition-bucket-card.is-flipped .addition-bucket-back {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.addition-bucket-card .table-name {
  font-size: 1.03rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.addition-card-toggle-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.addition-card-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.72rem;
  height: 1.72rem;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.addition-card-toggle-button svg {
  width: 0.92rem;
  height: 0.92rem;
  display: block;
}

.addition-card-toggle-button:hover,
.addition-card-toggle-button:focus-visible {
  color: #ffffff;
  border-color: rgba(var(--accent-rgb), 0.56);
  background: rgba(var(--accent-rgb), 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

.addition-example-list {
  display: grid;
  gap: 0.28rem 0.7rem;
  margin: 0;
  padding-left: 1rem;
}

@media (min-width: 900px) {
  .addition-example-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.table-name-button {
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color var(--interactive-duration) ease;
}

.table-name-button:hover,
.table-name-button:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.tracker-action-hint {
  margin: 0.18rem 0 0;
  max-width: none;
  text-align: left;
  color: var(--muted);
}

.addition-example-item {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.35;
}

.addition-example-empty {
  min-height: 1.3rem;
}

.table-name {
  font-size: 1.04rem;
}

.table-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.64rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-pill.unseen {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.table-pill.needs {
  background: rgba(var(--accent-rgb), 0.14);
  color: #ff8a8a;
}

.table-pill.steady {
  background: rgba(232, 190, 79, 0.16);
  color: var(--gold);
}

.table-pill.strong {
  background: rgba(124, 225, 166, 0.16);
  color: var(--success);
}

.table-card.unseen {
  border-color: rgba(255, 255, 255, 0.08);
}

.table-card.needs {
  border-color: rgba(var(--accent-rgb), 0.16);
}

.table-card.steady {
  border-color: rgba(232, 190, 79, 0.18);
}

.table-card.strong {
  border-color: rgba(124, 225, 166, 0.16);
}

.table-card-stats {
  font-size: 1rem;
  color: var(--muted);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.table-card-middle {
  min-height: 2.2rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.table-zone {
  min-width: 0;
}

.table-zone-head,
.addition-bucket-head {
  min-height: 44px;
}

.table-zone-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.table-zone-footer {
  align-self: end;
  justify-content: space-between;
}

.table-action-cue {
  font-size: 0.78rem;
}

.coach-card,
.roadmap-card {
  line-height: 1.6;
}

.roadmap-card {
  margin-top: 0.9rem;
  background: rgba(20, 20, 20, 0.96);
}

.utility-actions {
  margin-top: 0.9rem;
}

.options-dialog {
  width: min(640px, calc(100% - 1rem));
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.96);
  color: var(--text);
  box-shadow: none;
}

.options-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.options-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 1rem 0;
}

.options-stack {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem 1rem 1rem;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.options-card {
  padding: 0.95rem;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.options-copy {
  margin: 0.2rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.options-card .field + .field {
  margin-top: 0.82rem;
}

.options-list {
  margin: 0.2rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.38rem;
  line-height: 1.45;
}

.options-reset-button {
  justify-self: start;
}

.confirm-dialog {
  width: min(420px, calc(100% - 1rem));
}

.confirm-actions {
  justify-content: flex-end;
}

.confirm-actions > button {
  flex: 1 1 168px;
  justify-content: center;
  min-width: 0;
}

.empty-state {
  place-items: center;
  text-align: center;
}

.is-hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countdown-pop {
  from {
    opacity: 0;
    transform: scale(0.82);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-fade-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes streak-smoke {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.26;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.5;
  }
}

@keyframes streak-spark {
  0% {
    transform: scale(0.98);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: scale(1.04);
    filter: hue-rotate(18deg);
  }
  100% {
    transform: scale(0.98);
    filter: hue-rotate(0deg);
  }
}

@keyframes streak-flame {
  0% {
    transform: translateY(0) scale(0.98);
    filter: saturate(1.05);
  }
  50% {
    transform: translateY(-1px) scale(1.04);
    filter: saturate(1.28);
  }
  100% {
    transform: translateY(0) scale(0.98);
    filter: saturate(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  button,
  .reward-mini::before {
    transition: none !important;
  }

  button:hover:not(:disabled),
  button:active:not(:disabled) {
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  .card,
  .panel,
  .table-card,
  .focus-card,
  .technique-card,
  .nav-button,
  .utility-button,
  .primary-button,
  .ghost-button,
  .carousel-button,
  .calendar-nav-button,
  .progress-fill,
  .bar-fill {
    transition: none !important;
  }

  .screen.is-active,
  .results-slide.is-active,
  .progress-slide.is-active,
  .technique-menu-shell,
  .technique-lesson-wrap,
  .technique-celebration-shell,
  .countdown-pop,
  .progress-track::after,
  .problem-wrap::before {
    animation: none !important;
  }
}

@media (max-width: 1080px) {
  body {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .results-grid,
  .progress-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "banner"
      "dashboard";
  }

  .hero-side {
    justify-items: end;
    margin-bottom: 0;
  }

  .hero-copy {
    min-height: 0;
    padding-top: 0.3rem;
    grid-template-columns: 1fr;
    grid-template-areas:
      "nav"
      "title";
  }

  .hero-side {
    padding-top: 0;
  }

  .shell-nav {
    width: min(520px, 100%);
  }

  .daily-widget {
    width: 100%;
  }

  .home-calendar-widget {
    width: 100%;
  }

  .home-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .home-side-stack {
    grid-template-rows: auto;
  }

  h1 {
    white-space: normal;
  }

  .section-note {
    text-align: left;
  }

  .daily-progress-status {
    max-width: none;
  }

  .mastery-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mastery-detail-grid {
    grid-template-columns: 1fr;
  }

  .tracker-layout,
  .focus-split,
  .focus-columns {
    grid-template-columns: 1fr;
  }

  .facts-selector-row {
    grid-template-columns: repeat(auto-fit, minmax(var(--facts-selector-width), var(--facts-selector-width)));
  }

  .home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-insight-strip {
    grid-template-columns: 1fr;
  }

  .home-calendar-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracker-left-column {
    padding-right: 0;
    padding-bottom: 0.7rem;
    border-right: none;
    border-bottom: 1px solid var(--stroke);
  }

  .tracker-calendar-wrap {
    padding-left: 0;
    padding-top: 0;
  }

  .focus-column,
  .focus-panel + .focus-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .focus-column + .focus-column,
  .focus-panel + .focus-panel {
    padding-left: 0;
    padding-top: 0.8rem;
    border-left: none;
    border-top: 1px solid var(--stroke);
  }

  .techniques-screen-panel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .screen-stage {
    overflow: visible;
  }

  .screen.is-active {
    height: auto;
    overflow: visible;
    display: block;
  }

  #resultsScreen .results-screen-panel,
  #progressScreen .progress-screen-panel {
    margin-top: 0;
  }

  .page-shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
    aspect-ratio: auto;
    padding-top: 0;
  }

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

  .hero-title-row {
    align-items: flex-start;
  }

  .hero-mark {
    width: 64px;
    height: 64px;
  }

  .reward-strip,
  .hud-row,
  .results-stats,
  .stats-grid,
  .mastery-grid,
  .mastery-overview-grid,
  .mastery-detail-grid,
  .mastery-form-row,
  .streak-metrics,
  .setup-option-list,
  .preview-pair,
  .range-options-block,
  .mini-toggle-grid,
  .tracker-mini-grid,
  .focus-card-grid,
  .focus-card-grid-triple,
  .technique-rule-grid,
  .technique-switch-grid,
  .home-action-grid {
    grid-template-columns: 1fr;
  }

  .mini-toggle-stack {
    grid-column: 1 / -1;
  }

  .mini-toggle-stack {
    padding-top: 0;
  }

  .mastery-snapshot-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mastery-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .choice-pill,
  .choice-pill.compact,
  .session-choice {
    flex: 1 1 100%;
    min-width: 0;
  }

  .carousel-panel {
    padding-inline: 1rem;
  }

  .carousel-actions-floating {
    position: static;
    transform: none;
    justify-content: space-between;
    inset: auto;
    pointer-events: auto;
    margin-bottom: 0.65rem;
  }

  .carousel-actions-floating .carousel-button {
    position: static;
    transform: none;
  }

  .carousel-position-indicator {
    margin-inline: auto;
  }

  .preview-actions {
    justify-content: stretch;
  }

  .preview-actions .primary-button {
    width: 100%;
  }

  .tooltip-dot::after {
    left: 0;
    top: calc(100% + 0.55rem);
    transform: none;
    max-width: 240px;
  }

  .slide-heading-with-filter,
  .carousel-shell-head,
  .records-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .setup-settings-head,
  .technique-menu-head-compact {
    flex-direction: column;
    align-items: flex-start;
  }

  .technique-operation-field {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .calendar-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .results-summary {
    white-space: normal;
  }

  .progress-filter select,
  .facts-filter select,
  .records-filter select {
    min-width: 0;
    width: 100%;
  }

  .records-filter-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .table-grid.addition-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technique-pattern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technique-table-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .facts-selector-row {
    grid-template-columns: repeat(auto-fit, minmax(var(--facts-selector-width), var(--facts-selector-width)));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: 100%;
    padding: 0 0.5rem;
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  .home-hero-block h1 {
    font-size: clamp(2.45rem, 10vw, 3.45rem);
  }

  .app-shell {
    padding: 0.7rem;
  }

  .home-top-actions {
    gap: 0.4rem;
  }

  .home-top-actions .utility-button {
    min-height: 40px;
    height: 40px;
  }

  .home-button-stack {
    width: 100%;
    grid-template-columns: minmax(42px, 48px) minmax(42px, 48px) repeat(3, minmax(78px, 102px));
    gap: 0.34rem;
    margin-left: 0;
  }

  .home-button-stack .nav-button,
  .home-button-stack .home-start-button,
  .home-button-stack .utility-button {
    min-height: var(--home-action-height);
    height: var(--home-action-height);
  }

  .home-button-stack .nav-button {
    padding: 0 0.56rem;
    font-size: 0.89rem;
  }

  .home-button-stack .home-start-button {
    padding: 0 0.72rem;
  }

  .home-feedback-context,
  .home-daily-stats {
    column-gap: 0.78rem;
  }

  .home-stat-cell {
    font-size: 1.62rem;
    gap: 0.44rem;
  }

  .home-stat-icon {
    font-size: 1.38rem;
  }

  .panel {
    padding: 0.9rem;
  }

  .practice-topbar,
  .practice-progress-row,
  .section-heading,
  .carousel-header,
  .carousel-shell-head,
  .slide-heading-with-filter,
  .slide-heading,
  .tracker-slide-head,
  .insight-top,
  .recent-top,
  .table-card-top,
  .table-card-stats {
    flex-direction: column;
    align-items: start;
  }

  .calendar-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .shell-nav {
    grid-template-columns: 76px repeat(3, minmax(0, 1fr));
  }

  .results-screen-panel,
  .progress-screen-panel {
    min-height: 0;
  }

  .answer-form {
    grid-template-columns: 1fr;
  }

  .progress-text {
    min-width: 0;
    text-align: left;
  }

  .calendar-day {
    min-height: 66px;
  }

  .table-grid.addition-table-grid {
    grid-template-columns: 1fr;
  }

  .reward-strip {
    grid-template-columns: 1fr;
  }

  .hero-title-row {
    gap: 0.8rem;
  }

  .hero-mark {
    width: 74px;
    height: 74px;
  }

  .hero-tagline {
    white-space: normal;
  }

  .nav-button {
    min-height: 54px;
  }

  .utility-button {
    width: 76px;
    height: 54px;
  }

  .hero-copy {
    padding-top: 0.25rem;
  }

  .daily-progress-status {
    white-space: normal;
    text-align: left;
  }

  .technique-pattern-grid {
    grid-template-columns: 1fr;
  }

  .technique-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technique-input-row {
    grid-template-columns: 1fr;
  }

  .technique-question-meta,
  .technique-shell-head,
  .technique-action-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .technique-table-grid {
    grid-template-columns: 1fr;
  }
}

@media (pointer: coarse) and (min-width: 768px) {
  .app-page-indicator.is-hidden {
    display: none;
  }

  .app-page-indicator {
    display: inline-flex;
  }
}
/* Session override: header consistency + light-mode polish */
#resultsScreen .focused-view-head,
#progressScreen .focused-view-head,
#techniquesScreen .focused-view-head,
#setupScreen .focused-view-head {
  max-width: var(--app-content-max-width);
  margin-inline: auto;
}

#progressScreen .focused-view-kicker-row,
#resultsScreen .carousel-inline-nav-row {
  width: max-content;
  justify-content: center;
}

.practice-panel {
  background: var(--panel-bg, rgba(18, 18, 18, 0.95));
}

.techniques-screen-panel {
  background: transparent;
}

body[data-color-mode="light"] .practice-panel,
body[data-color-mode="light"] .panel {
  background: #e6ebf2;
}

body[data-color-mode="light"] .techniques-screen-panel {
  background: transparent;
}

body[data-color-mode="light"] .app-shell {
  background: #e6ebf2;
}

body[data-color-mode="light"] .practice-panel,
body[data-color-mode="light"] .technique-menu-shell,
body[data-color-mode="light"] .technique-lesson-card,
body[data-color-mode="light"] .technique-lesson-wrap {
  border-color: rgba(38, 56, 84, 0.18);
}
