:root {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --surface-muted: #eef5f8;
    --surface-strong: #dff3ee;
    --text: #173042;
    --text-soft: #597286;
    --line: #d8e6ee;
    --brand: #1674a8;
    --brand-dark: #0e567d;
    --accent: #1d9c8d;
    --accent-soft: #cfeee8;
    --danger: #d86062;
    --shadow: 0 18px 55px rgba(18, 53, 72, 0.09);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(29, 156, 141, 0.16), transparent 22%),
        radial-gradient(circle at top left, rgba(22, 116, 168, 0.12), transparent 28%),
        var(--bg);
    line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.section, .compact-section { padding: 36px 0 52px; }
.section-muted { padding: 18px 0 0; }
.section-surface { background: rgba(255, 255, 255, 0.62); }
.narrow-section { padding: 64px 0; }
.page-shell { padding-bottom: 60px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(244, 248, 251, 0.88);
    border-bottom: 1px solid rgba(216, 230, 238, 0.7);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    font-weight: 800;
}

.brand small { display: block; color: var(--text-soft); }
.nav-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-links > a:not(.btn) {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 600;
}
.nav-links > a.active, .nav-links > a:not(.btn):hover {
    background: rgba(22, 116, 168, 0.08);
    color: var(--brand-dark);
}
.inline-form { margin: 0; }

.site-footer {
    margin-top: 48px;
    padding: 28px 0 42px;
    border-top: 1px solid rgba(216, 230, 238, 0.9);
    color: var(--text-soft);
}
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.hero {
    padding: 56px 0 32px;
}
.hero-grid, .dashboard-grid, .auth-grid, .split-layout, .profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.hero h1, .page-header h1, .auth-copy h1, .centered-card h1 {
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 1.08;
    margin: 10px 0 16px;
}
.lead { font-size: 1.06rem; color: var(--text-soft); max-width: 62ch; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--brand);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }
.trust-row, .inline-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    color: var(--text-soft);
    font-size: 0.93rem;
}
.trust-row span, .inline-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.card, .glass-card, .hero-card, .announcement-card, .testimonial-card, .feature-card, .stat-card,
.badge-card, .list-item-card, .question-admin-card {
    background: var(--surface);
    border: 1px solid rgba(216, 230, 238, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.card, .feature-card, .testimonial-card, .hero-card, .announcement-card, .question-admin-card { padding: 24px; }
.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(18, 53, 72, 0.12); }
.glass-card { background: rgba(255, 255, 255, 0.68); }
.hero-card { padding: 28px; }
.hero-stat-grid, .stats-grid, .feature-grid, .three-grid, .badge-grid {
    display: grid;
    gap: 16px;
}
.hero-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-stat-grid article {
    padding: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(22, 116, 168, 0.08), rgba(29, 156, 141, 0.08));
}
.hero-stat-grid strong { display: block; font-size: 1.7rem; margin-bottom: 6px; }
.feature-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.announcement-card { background: linear-gradient(135deg, rgba(22, 116, 168, 0.08), rgba(29, 156, 141, 0.08)); }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(1.6rem, 2.2vw, 2.4rem); }
.left-aligned { margin-top: 24px; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card h3, .card h3, .testimonial-card strong { margin-top: 0; }
.testimonial-card p { font-size: 1.02rem; }
.testimonial-card span { color: var(--text-soft); }
.cta-band { padding: 20px 0 36px; }
.cta-shell {
    padding: 26px 28px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(13, 73, 106, 0.96), rgba(29, 156, 141, 0.92));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; }
.btn-secondary { background: rgba(22, 116, 168, 0.09); color: var(--brand-dark); }
.btn-ghost { background: rgba(23, 48, 66, 0.06); color: var(--text); }
.btn-block { width: 100%; justify-content: center; }

.exercise-gateway-card {
    max-width: 920px;
    margin: 0 auto;
    padding: 34px;
}

.exercise-gateway-grid {
    margin-top: 24px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exercise-gateway-item {
    display: block;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(22, 116, 168, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(233, 244, 248, 0.9));
    color: var(--text);
    text-align: left;
}

.exercise-gateway-item strong,
.exercise-gateway-item span {
    display: block;
}

.exercise-gateway-item strong {
    margin-bottom: 8px;
}

.exercise-gateway-item span {
    color: var(--text-soft);
}

.student-home-page {
    padding: 38px 0 64px;
    background:
        linear-gradient(90deg, rgba(48, 137, 126, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(48, 137, 126, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #fff6dc 0%, #edf8ef 45%, #eff8ff 100%);
    background-size: 34px 34px, 34px 34px, auto;
    overflow-x: clip;
}

.student-home-page * {
    min-width: 0;
}

.student-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: center;
    padding: 28px 0 32px;
    border-bottom: 2px dashed rgba(79, 151, 131, 0.3);
}

.student-home-copy h1 {
    max-width: 12ch;
    margin: 12px 0 14px;
    color: #173042;
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 1.02;
}

.student-home-copy .lead {
    max-width: 62ch;
    color: #476071;
    font-size: 1.08rem;
}

.student-home-actions,
.student-home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.student-home-actions {
    margin-top: 24px;
}

.student-home-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.student-home-stats {
    margin-top: 18px;
}

.student-home-stats span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    background: #fffdf7;
    color: #486273;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(35, 88, 96, 0.07);
}

.student-home-stats strong {
    color: #e06b3b;
}

.student-plan-panel {
    padding: 22px;
    border-radius: 8px;
    border: 2px solid rgba(245, 184, 75, 0.34);
    background: linear-gradient(180deg, #fffef8, #fff1c8);
    box-shadow: 0 18px 34px rgba(130, 100, 40, 0.12);
}

.student-plan-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 2px dashed rgba(224, 107, 59, 0.22);
    color: #486273;
    font-weight: 900;
}

.student-plan-header strong {
    color: #e06b3b;
    font-size: 1.65rem;
}

.student-plan-list {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.student-plan-list li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.student-plan-list span {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #d7f8ef;
    color: #146b61;
    font-weight: 900;
}

.student-plan-list p {
    margin: 0;
    color: #385a68;
    font-weight: 800;
}

.student-plan-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1388b2, #22aa84);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(34, 170, 132, 0.18);
}

.student-plan-link:hover {
    color: #ffffff;
}

.student-announcement-strip,
.student-route-grid,
.student-highlight-grid,
.student-voice-strip {
    display: grid;
    gap: 18px;
}

.student-announcement-strip {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 24px 0 30px;
}

.student-announcement-strip article {
    padding: 18px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.84);
    background: #f4f7ff;
    box-shadow: 0 14px 28px rgba(52, 87, 93, 0.08);
}

.student-announcement-strip span,
.student-highlight-card div span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(22, 116, 168, 0.09);
    color: #24566f;
    font-size: 0.82rem;
    font-weight: 900;
}

.student-announcement-strip strong,
.student-announcement-strip p {
    display: block;
}

.student-announcement-strip strong {
    margin-top: 10px;
    color: #123042;
}

.student-announcement-strip p {
    margin: 7px 0 0;
    color: #4d6878;
}

.student-route-section,
.student-highlight-section,
.student-voice-strip {
    margin-top: 34px;
}

.student-section-heading {
    margin-bottom: 18px;
}

.student-section-heading h2 {
    margin: 10px 0 0;
    color: #173042;
    font-size: clamp(1.65rem, 2.4vw, 2.45rem);
    line-height: 1.12;
}

.student-route-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.student-route-card {
    display: grid;
    gap: 12px;
    min-height: 184px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    color: #123042;
    box-shadow: 0 16px 34px rgba(52, 87, 93, 0.09);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.student-route-card:hover {
    transform: translateY(-4px) rotate(-0.2deg);
    border-color: rgba(29, 156, 141, 0.28);
    color: #123042;
    box-shadow: 0 24px 46px rgba(52, 87, 93, 0.14);
}

.student-route-count {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #e06b3b;
    font-weight: 900;
}

.student-route-card strong {
    font-size: 1.16rem;
    line-height: 1.2;
}

.student-route-card p {
    margin: 0;
    color: #4d6878;
    overflow-wrap: anywhere;
}

.student-route-mint { background: #f3fff9; }
.student-route-sky { background: #f4fbff; }
.student-route-sun { background: #fff7da; }
.student-route-lilac { background: #f8f6ff; }
.student-route-peach { background: #fff2ec; }
.student-route-leaf { background: #edf8ef; }

.student-highlight-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.student-highlight-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: #fffaf2;
    box-shadow: 0 16px 34px rgba(52, 87, 93, 0.09);
}

.student-highlight-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.student-highlight-card div span:first-child {
    background: #d7f8ef;
    color: #146b61;
}

.student-highlight-card h3 {
    margin: 0;
    color: #123042;
    font-size: 1.18rem;
    line-height: 1.2;
}

.student-highlight-card p {
    margin: 0;
    color: #4d6878;
    overflow-wrap: anywhere;
}

.student-highlight-card a {
    margin-top: auto;
    font-weight: 900;
    color: #0e567d;
}

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

.student-voice-strip blockquote {
    margin: 0;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 28px rgba(52, 87, 93, 0.08);
}

.student-voice-strip p {
    margin: 0;
    color: #385a68;
    font-weight: 800;
}

.student-voice-strip footer {
    margin-top: 12px;
    color: #5b7280;
    font-weight: 900;
}

.exercise-library-page {
    padding: 38px 0 64px;
    background:
        linear-gradient(90deg, rgba(48, 137, 126, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(48, 137, 126, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #fff6dc 0%, #edf8ef 45%, #eff8ff 100%);
    background-size: 34px 34px, 34px 34px, auto;
    overflow-x: clip;
}

.exercise-library-page * {
    min-width: 0;
}

.exercise-library-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 28px 0 22px;
    border-bottom: 2px dashed rgba(79, 151, 131, 0.3);
}

.exercise-library-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    line-height: 1.03;
    color: #173042;
    max-width: 12ch;
    overflow-wrap: normal;
}

.exercise-library-hero p {
    margin: 0;
    max-width: 68ch;
    color: #476071;
    font-size: 1.05rem;
}

.exercise-library-summary {
    min-width: 150px;
    padding: 18px 20px;
    border-radius: 8px;
    border: 2px solid rgba(245, 184, 75, 0.36);
    background: linear-gradient(180deg, #fffef8, #fff0bf);
    text-align: center;
    box-shadow: 0 14px 26px rgba(130, 100, 40, 0.11);
}

.exercise-library-summary strong {
    display: block;
    color: #e06b3b;
    font-size: 2.2rem;
    line-height: 1;
}

.exercise-library-summary span {
    color: #486273;
    font-weight: 800;
}

.exercise-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 24px;
}

.exercise-category-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: #fffdf7;
    color: #36596a;
    font-size: 0.86rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(35, 88, 96, 0.07);
}

.exercise-category-chips span:nth-child(3n + 2) {
    background: #effcf7;
}

.exercise-category-chips span:nth-child(3n + 3) {
    background: #f4f7ff;
}

.exercise-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.exercise-library-card {
    position: relative;
    min-width: 0;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(52, 87, 93, 0.09);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.exercise-library-card:hover {
    transform: translateY(-4px) rotate(-0.2deg);
    border-color: rgba(29, 156, 141, 0.28);
    box-shadow: 0 24px 46px rgba(52, 87, 93, 0.14);
}

.exercise-card-topline {
    height: 7px;
    margin: -20px -20px 2px;
    background: #1d9c8d;
}

.exercise-card-type-timed_reading .exercise-card-topline,
.exercise-card-type-timed_reading_plus .exercise-card-topline {
    background: #5aa9e6;
}

.exercise-card-type-rsvp .exercise-card-topline,
.exercise-card-type-chunk_focus .exercise-card-topline {
    background: #31c48d;
}

.exercise-card-type-pursuit_dot .exercise-card-topline,
.exercise-card-type-saccade_switch .exercise-card-topline {
    background: #f5b84b;
}

.exercise-card-type-peripheral_flash .exercise-card-topline {
    background: #9b8cff;
}

.exercise-card-type-color_match,
.exercise-card-type-similar_words {
    background: #fffaf2;
}

.exercise-card-type-color_match .exercise-card-topline,
.exercise-card-type-similar_words .exercise-card-topline {
    background: #ff7b6b;
}

.exercise-card-type-rsvp,
.exercise-card-type-chunk_focus {
    background: #f3fff9;
}

.exercise-card-type-timed_reading,
.exercise-card-type-timed_reading_plus {
    background: #f4fbff;
}

.exercise-card-type-pursuit_dot,
.exercise-card-type-saccade_switch {
    background: #fff9ea;
}

.exercise-card-type-peripheral_flash {
    background: #f8f6ff;
}

.exercise-card-meta,
.exercise-card-tags,
.exercise-card-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.exercise-card-meta span,
.exercise-card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(22, 116, 168, 0.09);
    color: #24566f;
    font-size: 0.82rem;
    font-weight: 800;
}

.exercise-card-meta span:first-child {
    background: #d7f8ef;
    color: #146b61;
}

.exercise-library-card h2 {
    margin: 0;
    color: #123042;
    font-size: 1.26rem;
    line-height: 1.18;
}

.exercise-library-card p {
    margin: 0;
    color: #4d6878;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.exercise-card-tags {
    margin-top: auto;
}

.exercise-card-tags span {
    background: rgba(255, 255, 255, 0.78);
    color: #385a68;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: inset 0 0 0 1px rgba(54, 89, 106, 0.07);
}

.exercise-card-footer {
    justify-content: space-between;
    padding-top: 4px;
}

.exercise-card-footer > span {
    flex: 1 1 150px;
    color: #5b7280;
    font-size: 0.9rem;
    font-weight: 800;
}

.exercise-card-footer .btn {
    border-radius: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1388b2, #22aa84);
    box-shadow: 0 10px 18px rgba(34, 170, 132, 0.18);
}

.page-header, .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.page-header { margin-bottom: 24px; }
.page-header.narrow-header { align-items: center; }
.card-header h2 { margin: 0; font-size: 1.15rem; }
.card-header span, .muted-text, .helper-text, .mini-meta, .metric-list span, .auth-footer-row a, .result-chip span { color: var(--text-soft); }
.page-meta-stack { display: grid; gap: 10px; }

.flash {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}
.flash-success { background: rgba(29, 156, 141, 0.1); border-color: rgba(29, 156, 141, 0.2); }
.flash-error { background: rgba(216, 96, 98, 0.08); border-color: rgba(216, 96, 98, 0.18); }
.flash-list { margin: 10px 0 0 18px; padding: 0; }

.form-card, .spaced-form { display: grid; gap: 16px; }
.field-grid { display: grid; gap: 16px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; font-weight: 600; }
.field input, .field textarea, .field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: 3px solid rgba(22, 116, 168, 0.14);
    border-color: rgba(22, 116, 168, 0.55);
}
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
}
.checkbox-row.top-gap { margin-top: 28px; }
.auth-footer-row { display: flex; justify-content: space-between; gap: 12px; }
.centered-card { text-align: center; max-width: 720px; margin: 0 auto; }
.stack-list, .stack-block { display: grid; gap: 14px; }
.list-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}
.list-item-card.vertical, .list-item-card.compact { align-items: flex-start; }
.result-chip {
    text-align: right;
    display: grid;
    gap: 4px;
}
.result-chip strong { font-size: 1.1rem; }

.stats-grid.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid.five-col { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-grid.six-col { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card { padding: 18px 20px; }
.stat-card span { display: block; color: var(--text-soft); margin-bottom: 10px; }
.stat-card strong { font-size: 1.45rem; }
.accent-card { background: linear-gradient(135deg, rgba(22, 116, 168, 0.12), rgba(29, 156, 141, 0.12)); }

.progress-track {
    height: 12px;
    background: rgba(22, 116, 168, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin: 14px 0 10px;
}
.progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}
.metric-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.metric-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(216, 230, 238, 0.65);
}
.metric-list.relaxed li { justify-content: flex-start; border-bottom: 0; padding-bottom: 0; }
.metric-list.relaxed li span { color: var(--text); }
.empty-state {
    padding: 18px;
    border-radius: 16px;
    background: rgba(22, 116, 168, 0.05);
    color: var(--text-soft);
}
.badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.badge-card { padding: 18px; }
.badge-card.highlight { background: linear-gradient(135deg, rgba(22, 116, 168, 0.1), rgba(29, 156, 141, 0.12)); }
.badge-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    margin-bottom: 10px;
}
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(22, 116, 168, 0.1);
    color: var(--brand-dark);
    font-size: 0.84rem;
    font-weight: 700;
}
.pill-soft { background: rgba(29, 156, 141, 0.12); color: #146b61; }
.mini-meta { padding-left: 18px; }

.exercise-shell { display: grid; gap: 18px; }
.exercise-stage { padding: 26px; }
.exercise-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}
.timer-box {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(22, 116, 168, 0.08);
}
.timer-box strong { font-size: 1.4rem; }
.slider-control { display: grid; gap: 8px; width: min(300px, 100%); }
.slider-control input { width: 100%; }
.reading-panel {
    max-height: 420px;
    overflow-y: auto;
    padding: 24px;
    border-radius: 18px;
    background: #fbfdff;
    border: 1px solid var(--line);
    font-size: 1.1rem;
    line-height: 1.95;
}
.focus-panel {
    min-height: 280px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(22, 116, 168, 0.06), rgba(29, 156, 141, 0.06));
    border: 1px solid rgba(216, 230, 238, 0.85);
    padding: 28px;
    text-align: center;
}
.word-view, .chunk-view {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.03em;
}
.word-view {
    max-width: 18ch;
    min-height: 5.4rem;
    line-height: 1.15;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    position: relative;
    padding-bottom: 18px;
}
.word-view-anchor {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #1d9c8d;
    box-shadow: 0 0 0 6px rgba(29, 156, 141, 0.14);
    justify-self: center;
    margin-top: -6px;
}
.exercise-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.question-card { padding: 24px; }
.question-list { display: grid; gap: 18px; }
.question-item {
    padding: 18px;
    border-radius: 18px;
    background: rgba(22, 116, 168, 0.05);
    display: grid;
    gap: 10px;
}
.question-item label { display: flex; align-items: center; gap: 10px; }

.chart-card { min-height: 380px; }
.progress-chart {
    width: 100%;
    min-height: 290px;
    display: block;
}
.table-shell { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(216, 230, 238, 0.65);
    text-align: left;
}
th { color: var(--text-soft); font-size: 0.9rem; }
.question-admin-card { margin-top: 18px; }
.highlight-surface { background: rgba(29, 156, 141, 0.07); }
.align-right { display: flex; justify-content: flex-end; margin-top: 10px; }

@media (max-width: 1080px) {
    .exercise-gateway-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid,
    .dashboard-grid,
    .auth-grid,
    .split-layout,
    .profile-grid,
    .footer-grid,
    .feature-strip,
    .feature-grid,
    .three-grid,
    .stats-grid.five-col,
    .stats-grid.six-col,
    .four-col { grid-template-columns: 1fr 1fr; }
    .stats-grid.four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .exercise-gateway-grid {
        grid-template-columns: 1fr;
    }

    .student-home-page {
        padding: 26px 0 44px;
    }

    .student-home-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-top: 22px;
    }

    .student-home-copy h1 {
        font-size: 2.25rem;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .student-home-copy .lead {
        max-width: 100%;
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .student-home-actions .btn,
    .student-plan-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .student-home-stats span {
        flex: 1 1 100%;
    }

    .student-plan-panel,
    .student-route-card,
    .student-highlight-card,
    .student-voice-strip blockquote,
    .student-announcement-strip article {
        padding: 18px;
    }

    .student-route-card,
    .student-highlight-card {
        min-height: 0;
    }

    .student-route-grid,
    .student-highlight-grid,
    .student-announcement-strip,
    .student-voice-strip {
        grid-template-columns: 1fr;
    }

    .exercise-library-page {
        padding: 26px 0 44px;
    }

    .exercise-library-hero {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding-top: 22px;
        gap: 16px;
    }

    .exercise-library-hero h1 {
        max-width: 12ch;
        font-size: 2rem;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .exercise-library-summary {
        text-align: left;
        min-width: 0;
    }

    .exercise-category-chips span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .exercise-library-grid {
        grid-template-columns: 1fr;
    }

    .exercise-library-card {
        min-height: 0;
        padding: 18px;
    }

    .exercise-card-topline {
        margin: -18px -18px 2px;
    }

    .exercise-card-tags {
        align-items: stretch;
    }

    .exercise-card-tags span {
        flex: 1 1 100%;
    }

    .exercise-card-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .exercise-card-footer .btn {
        width: 100%;
        text-align: center;
    }

    .nav-shell,
    .page-header,
    .card-header,
    .exercise-topbar,
    .cta-shell,
    .list-item-card { flex-direction: column; align-items: stretch; }
    .hero-grid,
    .dashboard-grid,
    .auth-grid,
    .split-layout,
    .profile-grid,
    .footer-grid,
    .feature-strip,
    .feature-grid,
    .three-grid,
    .hero-stat-grid,
    .badge-grid,
    .field-grid,
    .stats-grid,
    .stats-grid.four-col,
    .stats-grid.five-col,
    .stats-grid.six-col { grid-template-columns: 1fr; }
    .site-header { position: static; }
    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .nav-links > a:not(.btn) {
        display: inline-flex;
        justify-content: center;
        text-align: center;
        padding: 9px 8px;
        overflow-wrap: anywhere;
    }
    .container { width: min(100% - 24px, 1180px); }
    .hero { padding-top: 28px; }
    .card, .feature-card, .testimonial-card, .hero-card, .announcement-card, .question-card, .question-admin-card { padding: 18px; }
    .word-view, .chunk-view { font-size: 2.1rem; }
}

.exercise-quick-settings {
    display: grid;
    gap: 12px;
    width: min(560px, 100%);
}
.inline-control-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-control {
    min-width: 0;
}
.exercise-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.exercise-status-strip > div {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(22, 116, 168, 0.05);
    border: 1px solid rgba(216, 230, 238, 0.85);
}
.exercise-status-strip span {
    display: block;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.training-panel {
    display: grid;
    gap: 16px;
}
.exercise-hint-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(29, 156, 141, 0.08);
    color: var(--text);
}
.exercise-hint-card strong {
    display: block;
    margin-bottom: 6px;
}
.dot-training-panel {
    align-items: stretch;
}
.exercise-canvas {
    width: 100%;
    min-height: 340px;
    height: 340px;
    border-radius: 22px;
    border: 1px solid rgba(216, 230, 238, 0.85);
    background: #f5fafc;
    touch-action: none;
}
.saccade-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.saccade-target {
    min-height: 86px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-soft);
    font-size: 1.2rem;
    font-weight: 800;
}
.saccade-target.is-active {
    background: linear-gradient(135deg, rgba(22, 116, 168, 0.18), rgba(29, 156, 141, 0.18));
    color: var(--brand-dark);
    border-color: rgba(22, 116, 168, 0.5);
    box-shadow: inset 0 0 0 2px rgba(22, 116, 168, 0.18);
}
.saccade-target.is-wrong {
    border-color: rgba(216, 96, 98, 0.55);
    color: var(--danger);
}
.peripheral-stage {
    --peripheral-font-size: 34px;
    position: relative;
    min-height: 340px;
    border-radius: 24px;
    border: 1px solid rgba(216, 230, 238, 0.85);
    background: linear-gradient(180deg, rgba(22, 116, 168, 0.04), rgba(29, 156, 141, 0.04));
}
.fixation-cross {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2.3rem, calc(var(--peripheral-font-size, 34px) * 1.15), 4.8rem);
    font-weight: 800;
    color: var(--brand-dark);
}
.peripheral-slot {
    position: absolute;
    width: clamp(58px, calc(var(--peripheral-font-size, 34px) + 34px), 104px);
    height: clamp(58px, calc(var(--peripheral-font-size, 34px) + 34px), 104px);
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: var(--peripheral-font-size, 34px);
    font-weight: 800;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.peripheral-slot.is-visible {
    opacity: 1;
    transform: scale(1);
    background: rgba(22, 116, 168, 0.12);
}
.slot-top { top: 34px; left: 50%; transform: translateX(-50%); }
.slot-right { top: 50%; right: 34px; transform: translateY(-50%); }
.slot-bottom { bottom: 34px; left: 50%; transform: translateX(-50%); }
.slot-left { top: 50%; left: 34px; transform: translateY(-50%); }
.option-cluster {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.option-chip {
    border-radius: 16px;
    padding: 14px 12px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: var(--peripheral-option-font-size, 1rem);
    font-weight: 700;
}
.option-chip.is-correct {
    background: rgba(29, 156, 141, 0.12);
    border-color: rgba(29, 156, 141, 0.4);
}
.option-chip.is-wrong {
    background: rgba(216, 96, 98, 0.08);
    border-color: rgba(216, 96, 98, 0.4);
}
.color-match-panel {
    gap: 18px;
}
.color-match-stage {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid rgba(185, 150, 82, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 252, 0.96)),
        #ffffff;
    box-shadow: inset 0 0 34px rgba(23, 48, 66, 0.08);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.color-match-stage.is-correct {
    border-color: rgba(29, 156, 141, 0.62);
    box-shadow: inset 0 0 0 3px rgba(29, 156, 141, 0.18), inset 0 0 34px rgba(23, 48, 66, 0.08);
}
.color-match-stage.is-wrong {
    border-color: rgba(216, 96, 98, 0.68);
    box-shadow: inset 0 0 0 3px rgba(216, 96, 98, 0.16), inset 0 0 34px rgba(23, 48, 66, 0.08);
}
.color-match-word-card {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}
.color-match-word {
    min-width: min(520px, 82vw);
    min-height: 1.25em;
    display: grid;
    place-items: center;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}
.color-match-progress {
    color: var(--text-soft);
    font-weight: 800;
}
.color-match-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.color-match-choice {
    min-height: 68px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.15rem;
    box-shadow: 0 14px 28px rgba(18, 53, 72, 0.12);
}
.color-match-true {
    background: #1d9c55;
}
.color-match-false {
    background: #b70f22;
}
.color-match-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.color-match-score-grid article {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(216, 230, 238, 0.85);
    background: #ffffff;
    text-align: center;
}
.color-match-score-grid span {
    display: block;
    color: var(--text-soft);
    font-weight: 800;
    margin-bottom: 6px;
}
.color-match-score-grid strong {
    font-size: 1.5rem;
}
.similar-words-panel {
    gap: 18px;
}
.similar-words-stage {
    --similar-word-size: clamp(1.85rem, 4.2vw, 3.8rem);
    position: relative;
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid rgba(185, 150, 82, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 250, 252, 0.95)),
        #ffffff;
    box-shadow: inset 0 0 34px rgba(23, 48, 66, 0.08);
    overflow: hidden;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.similar-words-stage.is-correct {
    border-color: rgba(29, 156, 141, 0.62);
    box-shadow: inset 0 0 0 3px rgba(29, 156, 141, 0.18), inset 0 0 34px rgba(23, 48, 66, 0.08);
}
.similar-words-stage.is-wrong {
    border-color: rgba(216, 96, 98, 0.68);
    box-shadow: inset 0 0 0 3px rgba(216, 96, 98, 0.16), inset 0 0 34px rgba(23, 48, 66, 0.08);
}
.similar-words-row {
    position: absolute;
    inset: 0;
}
.similar-word {
    position: absolute;
    left: var(--word-x, 50%);
    top: var(--word-y, 50%);
    transform: translate(-50%, -50%);
    min-width: 4ch;
    text-align: center;
    color: rgba(23, 48, 66, 0.86);
    font-size: var(--similar-word-size);
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}
.similar-words-progress {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    color: var(--text-soft);
    font-weight: 800;
}
.similar-words-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.similar-words-choice {
    min-height: 68px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.15rem;
    box-shadow: 0 14px 28px rgba(18, 53, 72, 0.12);
}
.similar-words-same {
    background: #1d9c55;
}
.similar-words-different {
    background: #b70f22;
}
.similar-words-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.similar-words-score-grid article {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(216, 230, 238, 0.85);
    background: #ffffff;
    text-align: center;
}
.similar-words-score-grid span {
    display: block;
    color: var(--text-soft);
    font-weight: 800;
    margin-bottom: 6px;
}
.similar-words-score-grid strong {
    font-size: 1.5rem;
}
.reading-theme-toggle {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.flow-reader-panel {
    --reader-font-size: 22px;
    --reader-line-height: 1.9;
    position: relative;
    max-height: 380px;
    overflow-y: auto;
    padding: 24px 26px;
    border-radius: 22px;
    border: 1px solid rgba(216, 230, 238, 0.85);
    background: #fbfdff;
}
.flow-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 12px;
}
.flow-reader-panel.theme-dark {
    background: #123042;
    color: #eff8ff;
}
.flow-reader-panel.guide-hidden .guide-line {
    opacity: 0;
}
.guide-line {
    position: sticky;
    top: 50%;
    height: 2px;
    margin: 0 -26px;
    background: linear-gradient(90deg, transparent, rgba(22, 116, 168, 0.7), transparent);
    opacity: 0.9;
    z-index: 2;
}
.flow-line {
    font-size: var(--reader-font-size);
    line-height: var(--reader-line-height);
    margin: 0;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.flow-line-text {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.38em;
}
.flow-word {
    position: relative;
    display: inline-block;
    padding: 0 4px 6px;
    border-radius: 10px;
    opacity: 0.36;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.flow-line.is-active {
    opacity: 0.86;
    color: rgba(23, 48, 66, 0.78);
    transform: translateX(6px);
    font-weight: 700;
}
.flow-line.is-active .flow-word {
    opacity: 0.34;
}
.flow-line.is-active .flow-word.is-glow {
    opacity: 1;
    background: rgba(22, 116, 168, 0.12);
    color: var(--brand-dark);
    box-shadow: 0 10px 18px rgba(22, 116, 168, 0.12);
}
.flow-line.is-active .flow-line-text.has-glow::after {
    content: '';
    position: absolute;
    left: var(--focus-dot-x, 50%);
    bottom: -6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #1d9c8d;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px rgba(29, 156, 141, 0.16);
}
.flow-reader-panel.theme-dark .flow-line.is-active {
    color: rgba(255, 255, 255, 0.78);
}
.flow-reader-panel.theme-dark .flow-line.is-active .flow-word.is-glow {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
.flow-reader-panel.theme-dark .flow-line.is-active .flow-word {
    opacity: 0.4;
}
.flow-line.is-passed {
    opacity: 0.38;
}
.review-grid {
    margin-bottom: 20px;
}
.review-note {
    margin: -4px 0 20px;
}
.review-subheader {
    margin: 8px 0 16px;
}
.recommendation-card {
    margin-top: 18px;
}
.recommendation-preview {
    align-items: flex-start;
}
.config-hidden {
    display: none !important;
}

@media (max-width: 760px) {
    .exercise-status-strip,
    .inline-control-grid,
    .option-cluster,
    .color-match-choice-row,
    .color-match-score-grid,
    .similar-words-choice-row,
    .similar-words-score-grid,
    .saccade-board {
        grid-template-columns: 1fr;
    }
    .peripheral-stage,
    .exercise-canvas {
        min-height: 280px;
        height: 280px;
    }
}

.slot-top { top: 34px; left: calc(50% - 32px); transform: scale(0.92); }
.slot-right { top: calc(50% - 32px); right: 34px; transform: scale(0.92); }
.slot-bottom { bottom: 34px; left: calc(50% - 32px); transform: scale(0.92); }
.slot-left { top: calc(50% - 32px); left: 34px; transform: scale(0.92); }
.peripheral-slot.is-visible.slot-top,
.peripheral-slot.is-visible.slot-right,
.peripheral-slot.is-visible.slot-bottom,
.peripheral-slot.is-visible.slot-left {
    transform: scale(1);
}

.dot-training-panel:fullscreen,
.dot-training-panel.is-immersive {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-radius: 0;
    background: linear-gradient(180deg, #07141d, #0d2331);
    z-index: 9999;
    display: grid;
    align-content: stretch;
    overflow: hidden;
    touch-action: none;
}
.dot-training-panel:fullscreen .exercise-hint-card,
.dot-training-panel.is-immersive .exercise-hint-card {
    display: none;
}
.dot-training-panel:fullscreen .pursuit-toolbar,
.dot-training-panel.is-immersive .pursuit-toolbar {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 10px);
    right: calc(env(safe-area-inset-right) + 12px);
    z-index: 10040;
}
.dot-training-panel:fullscreen .pursuit-toolbar .helper-text,
.dot-training-panel.is-immersive .pursuit-toolbar .helper-text {
    display: none;
}
.dot-training-panel:fullscreen #pursuit-fullscreen-toggle,
.dot-training-panel.is-immersive #pursuit-fullscreen-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
}
.dot-training-panel:fullscreen #pursuit-fullscreen-toggle::after,
.dot-training-panel.is-immersive #pursuit-fullscreen-toggle::after {
    content: "×";
    font-size: 1.35rem;
    line-height: 1;
}
.dot-training-panel:fullscreen .exercise-canvas,
.dot-training-panel.is-immersive .exercise-canvas {
    width: 100%;
    min-height: calc(100vh - 150px);
    min-height: calc(100dvh - 150px);
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
    margin-top: 58px;
    margin-bottom: 74px;
    border-color: rgba(255, 255, 255, 0.12);
    background: #06131a;
}
.dot-training-panel:fullscreen #pursuit-helper,
.dot-training-panel.is-immersive #pursuit-helper,
.dot-training-panel:fullscreen .helper-text,
.dot-training-panel.is-immersive .helper-text {
    color: rgba(239, 248, 255, 0.82);
}
.dot-training-panel {
    position: relative;
    min-height: 460px;
}
.pursuit-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.pursuit-toolbar .helper-text {
    max-width: 620px;
}
.pursuit-immersive-controls {
    display: none;
}
.dot-training-panel:fullscreen .pursuit-immersive-controls,
.dot-training-panel.is-immersive .pursuit-immersive-controls {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    left: calc(env(safe-area-inset-left) + 10px);
    right: calc(env(safe-area-inset-right) + 64px);
    z-index: 10035;
    display: grid;
    grid-template-columns: auto minmax(110px, 160px) minmax(120px, 190px);
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(6, 19, 26, 0.84);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}
.pursuit-immersive-controls strong {
    color: #eff8ff;
    font-size: 1rem;
    white-space: nowrap;
}
.pursuit-immersive-controls label {
    display: grid;
    gap: 3px;
}
.pursuit-immersive-controls span {
    color: rgba(239, 248, 255, 0.75);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pursuit-immersive-controls select {
    width: 100%;
    min-height: 34px;
    padding: 6px 28px 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #ffffff;
    color: #0d2636;
    font-weight: 800;
}
.exercise-canvas {
    min-height: 420px;
    height: clamp(420px, 62vh, 760px);
}
.saccade-target {
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}
.saccade-target.is-dim {
    opacity: 0.35;
    transform: scale(0.94);
}
.saccade-target.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #1674a8, #1d9c8d);
    border-color: rgba(22, 116, 168, 0.88);
    box-shadow: 0 0 0 4px rgba(22, 116, 168, 0.18), 0 18px 44px rgba(13, 38, 54, 0.22);
    transform: scale(1.08);
    animation: saccadePulse 0.72s ease-in-out infinite alternate;
}
@keyframes saccadePulse {
    from {
        box-shadow: 0 0 0 4px rgba(22, 116, 168, 0.18), 0 14px 32px rgba(13, 38, 54, 0.18);
    }
    to {
        box-shadow: 0 0 0 8px rgba(29, 156, 141, 0.18), 0 24px 54px rgba(13, 38, 54, 0.26);
    }
}
.flow-focus-window {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(216, 230, 238, 0.85);
    background: linear-gradient(135deg, rgba(22, 116, 168, 0.08), rgba(29, 156, 141, 0.08));
}
.flow-focus-window strong {
    font-size: clamp(1.1rem, 1.6vw, 1.55rem);
    color: var(--brand-dark);
}
.flow-focus-window span {
    color: var(--text-soft);
    font-weight: 700;
}
.flow-reader-panel {
    scroll-behavior: auto;
}
.flow-line {
    opacity: 0.18;
    filter: blur(0.2px);
}
.flow-line.is-active {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(22, 116, 168, 0.08);
    opacity: 1;
    transform: translateX(10px);
    filter: none;
}
.flow-line.is-passed {
    opacity: 0.28;
}
@media (max-width: 760px) {
    .exercise-canvas {
        min-height: 300px;
        height: 300px;
    }
    .pursuit-toolbar {
        align-items: flex-start;
    }
}
body.exercise-fullscreen-open { overflow: hidden; }
body.exercise-fullscreen-open .site-header,
body.exercise-fullscreen-open .site-footer {
    display: none;
}
body.exercise-fullscreen-open .exercise-topbar {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    left: calc(env(safe-area-inset-left) + 10px);
    right: calc(env(safe-area-inset-right) + 86px);
    z-index: 10030;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(6, 19, 26, 0.82);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}
body.exercise-fullscreen-open .timer-box {
    min-width: 76px;
    padding: 8px 10px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #eff8ff;
}
body.exercise-fullscreen-open .timer-box span,
body.exercise-fullscreen-open .timer-box strong {
    color: #eff8ff;
}
body.exercise-fullscreen-open .exercise-quick-settings {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}
body.exercise-fullscreen-open .slider-control {
    min-width: 112px;
    padding: 7px 9px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #eff8ff;
}
body.exercise-fullscreen-open .slider-control span,
body.exercise-fullscreen-open .slider-control small {
    color: rgba(239, 248, 255, 0.82);
}
body.exercise-fullscreen-open .slider-control small {
    display: none;
}
body.exercise-fullscreen-open .slider-control select {
    min-height: 34px;
    padding: 6px 30px 6px 10px;
    color: #0d2636;
}
body.exercise-fullscreen-open .exercise-actions {
    position: fixed;
    left: calc(env(safe-area-inset-left) + 12px);
    right: calc(env(safe-area-inset-right) + 12px);
    bottom: calc(env(safe-area-inset-bottom) + 10px);
    z-index: 10030;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 9px;
    border-radius: 20px;
    background: rgba(6, 19, 26, 0.82);
    box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}
body.exercise-fullscreen-open .exercise-actions .btn {
    flex: 1 1 auto;
    max-width: 180px;
    padding: 11px 14px;
}
body.exercise-fullscreen-open .exercise-topbar {
    display: none;
}
@media (max-width: 760px) {
    body.exercise-fullscreen-open .exercise-topbar {
        right: calc(env(safe-area-inset-right) + 58px);
        gap: 8px;
        align-items: stretch;
    }
    body.exercise-fullscreen-open .timer-box {
        min-width: 66px;
    }
    body.exercise-fullscreen-open .timer-box strong {
        font-size: 1rem;
    }
    body.exercise-fullscreen-open .exercise-quick-settings {
        flex: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.exercise-fullscreen-open .slider-control {
        min-width: 0;
        gap: 4px;
    }
    body.exercise-fullscreen-open .slider-control span {
        font-size: 0.72rem;
    }
    body.exercise-fullscreen-open .slider-control select {
        width: 100%;
        font-size: 0.82rem;
    }
    .dot-training-panel:fullscreen .pursuit-immersive-controls,
    .dot-training-panel.is-immersive .pursuit-immersive-controls {
        right: calc(env(safe-area-inset-right) + 58px);
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
        gap: 6px;
        padding: 7px 8px;
    }
    .pursuit-immersive-controls strong {
        font-size: 0.9rem;
    }
    .pursuit-immersive-controls span {
        font-size: 0.66rem;
    }
    .pursuit-immersive-controls select {
        min-height: 32px;
        font-size: 0.78rem;
    }
    .dot-training-panel:fullscreen .exercise-canvas,
    .dot-training-panel.is-immersive .exercise-canvas {
        min-height: calc(100vh - 132px);
        min-height: calc(100dvh - 132px);
        height: calc(100vh - 132px);
        height: calc(100dvh - 132px);
        margin-top: 52px;
        margin-bottom: 66px;
    }
    body.exercise-fullscreen-open .exercise-actions {
        padding: 7px;
    }
    body.exercise-fullscreen-open .exercise-actions .btn {
        max-width: none;
        padding: 10px 9px;
        font-size: 0.84rem;
    }
}
