:root,
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #efebe2;
    --bg-grid: rgba(20, 18, 14, 0.08);
    --surface: rgba(255, 252, 246, 0.90);
    --surface-strong: #fffdf8;
    --line: rgba(28, 24, 20, 0.18);
    --text: #15130f;
    --muted: #645c4f;
    --accent: #0f9f5b;
    --accent-soft: rgba(15, 159, 91, 0.14);
    --warning: #f0b000;
    --warning-soft: rgba(240, 176, 0, 0.14);
    --danger: #d44d22;
    --danger-soft: rgba(212, 77, 34, 0.14);
    --shadow: 8px 8px 0 rgba(18, 16, 11, 0.08);
    --font-ui: "Avenir Next", "Helvetica Neue", sans-serif;
    --font-display: "Arial Black", "Segoe UI", sans-serif;
    --icon-tone-0-border: #8f98a3;
    --icon-tone-0-bg: #eef1f4;
    --icon-tone-0-fg: #55606d;
    --icon-tone-1-border: #8b5a2b;
    --icon-tone-1-bg: #f2dfcf;
    --icon-tone-1-fg: #6f451f;
    --icon-tone-2-border: #6f7a88;
    --icon-tone-2-bg: #e5eaef;
    --icon-tone-2-fg: #4e5865;
    --icon-tone-3-border: #a57912;
    --icon-tone-3-bg: #f4e4ab;
    --icon-tone-3-fg: #6e5300;
    --icon-tone-4-border: #4a86aa;
    --icon-tone-4-bg: #cfe4f2;
    --icon-tone-4-fg: #214f69;
    --icon-tone-5-border: #5569a4;
    --icon-tone-5-bg: #e0e6f7;
    --icon-tone-5-fg: #3d4d80;
    --icon-tone-6-border: #2b8f92;
    --icon-tone-6-bg: #d9f5f5;
    --icon-tone-6-fg: #18696b;
    --icon-tone-7-border: #584b78;
    --icon-tone-7-bg: #e8e1f3;
    --icon-tone-7-fg: #3f345a;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121416;
    --bg-grid: rgba(255, 255, 255, 0.08);
    --surface: rgba(27, 30, 34, 0.94);
    --surface-strong: #20242a;
    --line: rgba(255, 245, 227, 0.12);
    --text: #f3edde;
    --muted: #b0a695;
    --accent: #2df77f;
    --accent-soft: rgba(45, 247, 127, 0.14);
    --warning: #ffd14d;
    --warning-soft: rgba(255, 209, 77, 0.14);
    --danger: #ff7e52;
    --danger-soft: rgba(255, 126, 82, 0.14);
    --shadow: 8px 8px 0 rgba(0, 0, 0, 0.24);
    --icon-tone-0-border: color-mix(in srgb, var(--line) 92%, var(--muted));
    --icon-tone-0-bg: color-mix(in srgb, var(--surface-strong) 88%, var(--surface));
    --icon-tone-0-fg: var(--muted);
    --icon-tone-1-border: #8f6a45;
    --icon-tone-1-bg: color-mix(in srgb, #8f6a45 18%, var(--surface-strong));
    --icon-tone-1-fg: #d7ba97;
    --icon-tone-2-border: #9aa3ad;
    --icon-tone-2-bg: color-mix(in srgb, #9aa3ad 20%, var(--surface-strong));
    --icon-tone-2-fg: #eef2f6;
    --icon-tone-3-border: #c9a33a;
    --icon-tone-3-bg: color-mix(in srgb, #c9a33a 22%, var(--surface-strong));
    --icon-tone-3-fg: #ffe8a3;
    --icon-tone-4-border: #70a8c8;
    --icon-tone-4-bg: color-mix(in srgb, #70a8c8 24%, var(--surface-strong));
    --icon-tone-4-fg: #d7f0ff;
    --icon-tone-5-border: #7d8ec7;
    --icon-tone-5-bg: color-mix(in srgb, #7d8ec7 24%, var(--surface-strong));
    --icon-tone-5-fg: #e0e7ff;
    --icon-tone-6-border: #57c3c5;
    --icon-tone-6-bg: color-mix(in srgb, #57c3c5 24%, var(--surface-strong));
    --icon-tone-6-fg: #d9ffff;
    --icon-tone-7-border: #6b5e8d;
    --icon-tone-7-bg: color-mix(in srgb, #6b5e8d 24%, var(--surface-strong));
    --icon-tone-7-fg: #efe8ff;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] {
        color-scheme: dark;
        --bg: #121416;
        --bg-grid: rgba(255, 255, 255, 0.08);
        --surface: rgba(27, 30, 34, 0.94);
        --surface-strong: #20242a;
        --line: rgba(255, 245, 227, 0.12);
        --text: #f3edde;
        --muted: #b0a695;
        --accent: #2df77f;
        --accent-soft: rgba(45, 247, 127, 0.14);
        --warning: #ffd14d;
        --warning-soft: rgba(255, 209, 77, 0.14);
        --danger: #ff7e52;
        --danger-soft: rgba(255, 126, 82, 0.14);
        --shadow: 8px 8px 0 rgba(0, 0, 0, 0.24);
        --icon-tone-0-border: color-mix(in srgb, var(--line) 92%, var(--muted));
        --icon-tone-0-bg: color-mix(in srgb, var(--surface-strong) 88%, var(--surface));
        --icon-tone-0-fg: var(--muted);
        --icon-tone-1-border: #8f6a45;
        --icon-tone-1-bg: color-mix(in srgb, #8f6a45 18%, var(--surface-strong));
        --icon-tone-1-fg: #d7ba97;
        --icon-tone-2-border: #9aa3ad;
        --icon-tone-2-bg: color-mix(in srgb, #9aa3ad 20%, var(--surface-strong));
        --icon-tone-2-fg: #eef2f6;
        --icon-tone-3-border: #c9a33a;
        --icon-tone-3-bg: color-mix(in srgb, #c9a33a 22%, var(--surface-strong));
        --icon-tone-3-fg: #ffe8a3;
        --icon-tone-4-border: #70a8c8;
        --icon-tone-4-bg: color-mix(in srgb, #70a8c8 24%, var(--surface-strong));
        --icon-tone-4-fg: #d7f0ff;
        --icon-tone-5-border: #7d8ec7;
        --icon-tone-5-bg: color-mix(in srgb, #7d8ec7 24%, var(--surface-strong));
        --icon-tone-5-fg: #e0e7ff;
        --icon-tone-6-border: #57c3c5;
        --icon-tone-6-bg: color-mix(in srgb, #57c3c5 24%, var(--surface-strong));
        --icon-tone-6-fg: #d9ffff;
        --icon-tone-7-border: #6b5e8d;
        --icon-tone-7-bg: color-mix(in srgb, #6b5e8d 24%, var(--surface-strong));
        --icon-tone-7-fg: #efe8ff;
    }
}

.icon-tone--level-0,
.icon-tone--level-1,
.icon-tone--level-2,
.icon-tone--level-3,
.icon-tone--level-4,
.icon-tone--level-5,
.icon-tone--level-6,
.icon-tone--level-7,
[data-icon-tone="0"],
[data-icon-tone="1"],
[data-icon-tone="2"],
[data-icon-tone="3"],
[data-icon-tone="4"],
[data-icon-tone="5"],
[data-icon-tone="6"],
[data-icon-tone="7"] {
    border-color: var(--icon-tone-border, var(--line));
    background: var(--icon-tone-bg, var(--surface-strong));
    color: var(--icon-tone-fg, var(--text));
}

.icon-tone--level-0,
[data-icon-tone="0"] {
    --icon-tone-border: var(--icon-tone-0-border);
    --icon-tone-bg: var(--icon-tone-0-bg);
    --icon-tone-fg: var(--icon-tone-0-fg);
}

.icon-tone--level-1,
[data-icon-tone="1"] {
    --icon-tone-border: var(--icon-tone-1-border);
    --icon-tone-bg: var(--icon-tone-1-bg);
    --icon-tone-fg: var(--icon-tone-1-fg);
}

.icon-tone--level-2,
[data-icon-tone="2"] {
    --icon-tone-border: var(--icon-tone-2-border);
    --icon-tone-bg: var(--icon-tone-2-bg);
    --icon-tone-fg: var(--icon-tone-2-fg);
}

.icon-tone--level-3,
[data-icon-tone="3"] {
    --icon-tone-border: var(--icon-tone-3-border);
    --icon-tone-bg: var(--icon-tone-3-bg);
    --icon-tone-fg: var(--icon-tone-3-fg);
}

.icon-tone--level-4,
[data-icon-tone="4"] {
    --icon-tone-border: var(--icon-tone-4-border);
    --icon-tone-bg: var(--icon-tone-4-bg);
    --icon-tone-fg: var(--icon-tone-4-fg);
}

.icon-tone--level-5,
[data-icon-tone="5"] {
    --icon-tone-border: var(--icon-tone-5-border);
    --icon-tone-bg: var(--icon-tone-5-bg);
    --icon-tone-fg: var(--icon-tone-5-fg);
}

.icon-tone--level-6,
[data-icon-tone="6"] {
    --icon-tone-border: var(--icon-tone-6-border);
    --icon-tone-bg: var(--icon-tone-6-bg);
    --icon-tone-fg: var(--icon-tone-6-fg);
}

.icon-tone--level-7,
[data-icon-tone="7"] {
    --icon-tone-border: var(--icon-tone-7-border);
    --icon-tone-bg: var(--icon-tone-7-bg);
    --icon-tone-fg: var(--icon-tone-7-fg);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-ui);
    background:
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
        var(--bg);
    background-size: 24px 24px, 24px 24px, auto;
}

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

.lab-shell {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.lab-sidebar-layer {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
}

.lab-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
    z-index: 60;
}

.lab-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 61;
    width: min(340px, calc(100vw - 24px));
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 2px solid var(--line);
    background: rgba(255, 250, 243, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

:root[data-theme="dark"] .lab-sidebar {
    background: rgba(18, 21, 25, 0.82);
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .lab-sidebar {
        background: rgba(18, 21, 25, 0.82);
    }
}

.lab-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.lab-sidebar-close {
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
}

.lab-brand-copy {
    min-width: 0;
}

.lab-brand-copy strong {
    display: block;
    margin-bottom: 4px;
}

.lab-brand-subtitle {
    margin: 0;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lab-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    font-weight: 800;
}

.lab-brand p,
.lab-aside-note p,
.callout p,
.flash-card p,
.recent-empty,
.compact-note li {
    color: var(--muted);
}

.sidebar-actions {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.lab-nav {
    display: grid;
    gap: 10px;
}

.lab-nav-group {
    padding: 10px;
    border: 2px solid var(--line);
    background: color-mix(in srgb, var(--surface-strong) 86%, var(--surface));
}

.lab-nav-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
}

.lab-nav-label::-webkit-details-marker {
    display: none;
}

.lab-nav-label::after {
    content: "+";
    font-size: 0.92rem;
    line-height: 1;
}

.lab-nav-group[open] .lab-nav-label::after {
    content: "−";
}

.lab-nav-links {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.lab-nav a {
    padding: 10px 12px;
    border: 2px solid transparent;
    color: var(--text);
    text-decoration: none;
}

.lab-nav a.active,
.lab-nav a:hover {
    border-color: var(--line);
    background: var(--surface-strong);
}

.lab-aside-note {
    margin-top: 20px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.lab-sidebar-main {
    display: grid;
    gap: 18px;
    min-height: 100%;
}

.lab-mobile-menu-trigger,
[data-lab-drawer-open] {
    display: inline-grid !important;
    place-items: center;
    position: fixed;
    left: 20px;
    top: 20px;
    width: 52px;
    height: 52px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 62;
}

.theme-fab {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
}

.theme-fab__glyph {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
}

.theme-fab__glyph svg {
    display: block;
    width: 22px;
    height: 22px;
    overflow: visible;
}

.theme-fab__glyph i {
    font-size: 20px;
    line-height: 1;
}

.theme-fab__glyph path,
.theme-fab__glyph circle,
.theme-fab__glyph line {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.lab-sidebar-footer {
    margin-top: auto;
}

.lab-sidebar-footer__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.lab-sidebar-footer__icon-action {
    display: inline-grid;
    place-items: center;
    width: 100%;
    min-height: 52px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
}

body.lab-drawer-open {
    overflow: hidden;
}

.compact-note ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.lab-main {
    padding: 0;
}

.poster {
    max-width: 1520px;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.frame,
.poster-title {
    padding: 18px;
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.super-grid .super-title {
    grid-column: span 7;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-stats-frame {
    grid-column: span 4;
}

.stat-frame {
    grid-column: span 12;
    order: 3;
}

.register-frame {
    grid-column: span 8;
    order: 1;
    position: relative;
}

.book-stats-frame {
    order: 2;
}

.recent-frame,
.flash-card {
    grid-column: span 12;
}

.span-wide {
    grid-column: span 12;
}

.recent-frame {
    order: 4;
}

.micro-label,
.label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

h1,
h2,
h3 {
    margin: 0;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.9rem, 6vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.2rem, 2vw, 2rem);
    line-height: 1;
}

h3 {
    font-size: 1rem;
}

.super-title p {
    max-width: 54ch;
    color: var(--muted);
}

.quick-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-stats--wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.quick-stats--actions {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
}

.quick-stats div,
.callout,
.recent-row,
.modal-form {
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.quick-stats div {
    padding: 16px;
}

.quick-stat-action {
    margin: 0;
}

.quick-stat-submit {
    position: relative;
    width: 100%;
    min-height: 100%;
    padding: 16px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.quick-stat-submit--icon {
    display: grid;
    place-items: center;
    min-height: 92px;
    padding: 0;
}

.quick-stat-submit--action {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 10px;
    min-height: 86px;
    padding: 14px 12px;
    text-align: center;
}

.quick-stat-link {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.quick-stat-submit__glyph {
    display: inline-flex;
    width: 32px;
    height: 32px;
}

.quick-stat-submit__glyph svg {
    width: 100%;
    height: 100%;
}

.quick-stat-submit__glyph i {
    font-size: 30px;
    line-height: 1;
}

.quick-stat-submit__glyph path,
.quick-stat-submit__glyph circle,
.quick-stat-submit__glyph line {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lab-sidebar-footer {
    margin-top: auto;
}

.lab-sidebar-footer__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.lab-sidebar-footer__icon-action {
    display: inline-grid;
    place-items: center;
    width: 100%;
    min-height: 52px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
}

body.lab-drawer-open {
    overflow: hidden;
}

.quick-stat-submit:hover,
.quick-stat-submit:focus-visible {
    border-color: var(--accent);
    background: var(--surface);
    transform: translateY(-1px);
}

.quick-stat-submit--icon:hover .quick-stat-submit__glyph,
.quick-stat-submit--icon:focus-visible .quick-stat-submit__glyph {
    transform: scale(1.05);
}

.quick-stat-submit b,
.quick-stat-submit span,
.quick-stat-submit .quick-stat-meta {
    pointer-events: none;
}

.quick-stat-submit--action .quick-stat-meta {
    display: block;
    min-height: auto;
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.2;
}

.quick-stat-submit__badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-strong);
    color: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    pointer-events: none;
}

.quick-stat-submit__badge--warning {
    background: color-mix(in srgb, var(--warning-soft) 36%, var(--surface-strong));
    color: color-mix(in srgb, var(--warning) 82%, var(--text));
    border-color: color-mix(in srgb, var(--warning) 28%, var(--line));
}

:root[data-theme="light"] .quick-stat-submit__badge {
    border-color: rgba(20, 26, 34, 0.12);
    box-shadow: 0 8px 18px rgba(20, 26, 34, 0.12);
}

:root[data-theme="light"] .quick-stat-submit__badge--warning {
    background: color-mix(in srgb, var(--warning-soft) 62%, var(--surface));
    color: color-mix(in srgb, var(--warning) 88%, var(--text));
    border-color: color-mix(in srgb, var(--warning) 34%, var(--line));
}

.quick-stats b {
    display: block;
    margin-bottom: 6px;
    font-size: 1.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-stats span {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.35;
    min-height: calc(1.35em * 2);
}

.admin-badge-grid {
    display: grid;
    gap: 12px;
}

.admin-badge-ribbon {
    display: grid;
    grid-template-columns: repeat(var(--admin-badge-columns, 4), minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-badge-ribbon__item {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 96px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.admin-badge-ribbon__item--level-0 {
    border-color: var(--icon-tone-0-border);
    background: var(--icon-tone-0-bg);
    color: var(--icon-tone-0-fg);
}

.admin-badge-ribbon__item--level-1 {
    border-color: var(--icon-tone-1-border);
    background: var(--icon-tone-1-bg);
    color: var(--icon-tone-1-fg);
}

.admin-badge-ribbon__item--level-2 {
    border-color: var(--icon-tone-2-border);
    background: var(--icon-tone-2-bg);
    color: var(--icon-tone-2-fg);
}

.admin-badge-ribbon__item--level-3 {
    border-color: var(--icon-tone-3-border);
    background: var(--icon-tone-3-bg);
    color: var(--icon-tone-3-fg);
}

.admin-badge-ribbon__item--level-4 {
    border-color: var(--icon-tone-4-border);
    background: var(--icon-tone-4-bg);
    color: var(--icon-tone-4-fg);
}

.admin-badge-ribbon__item--level-5 {
    border-color: var(--icon-tone-5-border);
    background: var(--icon-tone-5-bg);
    color: var(--icon-tone-5-fg);
}

.admin-badge-ribbon__item--level-6 {
    border-color: var(--icon-tone-6-border);
    background: var(--icon-tone-6-bg);
    color: var(--icon-tone-6-fg);
}

.admin-badge-ribbon__item--level-7 {
    border-color: var(--icon-tone-7-border);
    background: var(--icon-tone-7-bg);
    color: var(--icon-tone-7-fg);
}

.admin-badge-ribbon__item:hover,
.admin-badge-ribbon__item:focus-visible {
    border-color: var(--accent);
    outline: none;
    transform: translateY(-1px);
}

.showcase-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--line);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--accent-soft) 18%, transparent), transparent 46%),
        var(--surface-strong);
    box-shadow: var(--shadow);
}

.showcase-panel__head {
    margin-bottom: 0;
}

.showcase-panel__stats {
    margin-top: 0;
}

.showcase-panel__note,
.showcase-panel__grid {
    margin-top: 0;
}

.admin-badge-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.admin-badge-card__icon,
.student-mobile-badge-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--line);
    background: color-mix(in srgb, var(--accent-soft) 56%, var(--surface-strong));
    font-size: 1.1rem;
}

.admin-badge-card__copy,
.student-mobile-badge-card__copy {
    min-width: 0;
}

.admin-badge-card__copy strong,
.student-mobile-badge-card__copy strong {
    display: block;
    margin-top: 2px;
}

.admin-badge-card__copy p,
.student-mobile-badge-card__copy p {
    margin: 6px 0 0;
    color: var(--muted);
}

.organic-stats b {
    font-size: 1.05rem;
}

.exam-balance-section {
    display: grid;
    gap: 18px;
}

.exam-balance-section .compact-head {
    margin-bottom: 0;
}

.exam-balance-section .quick-stats {
    margin-bottom: 6px;
}

.exam-balance-list {
    margin-top: 4px;
}

.lgs-monitor-frame {
    display: grid;
    gap: 18px;
}

.lgs-monitor-sidecard {
    display: grid;
    gap: 16px;
}

.lgs-monitor-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.9fr);
    gap: 18px;
    align-items: stretch;
}

.lgs-monitor-summary-card .compact-head,
.lgs-monitor-summary-card .lgs-monitor-note {
    grid-column: 1;
}

.lgs-monitor-summary-card .book-stats-grid {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
}

.lgs-monitor-sidecard .compact-head,
.lgs-monitor-frame .compact-head {
    margin-bottom: 0;
}

.lgs-monitor-note {
    margin: 0;
}

.lgs-monitor-note p {
    margin: 0;
}

.lgs-monitor-mini-grid {
    align-self: start;
}

.lgs-monitor-summary-card .lgs-monitor-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
}

.lgs-monitor-row {
    grid-template-columns:
        minmax(142px, 1.32fr)
        minmax(70px, 0.46fr)
        minmax(102px, 0.72fr)
        minmax(44px, 0.3fr)
        minmax(44px, 0.3fr)
        minmax(44px, 0.3fr)
        minmax(44px, 0.3fr)
        minmax(82px, 0.54fr);
    gap: 8px;
    align-items: stretch;
}

.lgs-monitor-row__source {
    display: grid;
    align-content: center;
    gap: 4px;
    white-space: normal;
}

.lgs-monitor-row__metric {
    justify-self: center;
    text-align: center;
}

.lgs-monitor-row__status {
    display: grid;
    place-items: center;
    justify-self: stretch;
    text-align: center;
    overflow: visible;
}

.lgs-monitor-row__status b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
}

.lgs-monitor-row.recent-row--head {
    align-items: center;
}

.lgs-monitor-row.recent-row--head .lgs-monitor-row__source,
.lgs-monitor-row.recent-row--head .lgs-monitor-row__metric,
.lgs-monitor-row.recent-row--head .lgs-monitor-row__status {
    display: flex;
    align-items: center;
    gap: 0;
}

.lgs-monitor-row.recent-row--head .lgs-monitor-row__status {
    justify-content: center;
}

.lgs-monitor-row.recent-row--head {
    font-size: 0.76rem;
    letter-spacing: 0.05em;
}

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

.lgs-monitor-source-grid .quick-stat-meta {
    line-height: 1.55;
    word-break: break-word;
}

.lgs-monitor-explainer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.organic-note-block {
    margin-top: 14px;
}

.organic-note-block p {
    margin: 0 0 8px;
    color: var(--muted);
}

.organic-admin-grid {
    margin-top: 16px;
}

.organic-admin-grid > div {
    display: grid;
    gap: 6px;
}

.organic-admin-grid small {
    color: var(--muted);
    line-height: 1.45;
}

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

.badge-detail-grid > div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.badge-detail-grid b {
    font-family: var(--font-display);
    font-size: clamp(2rem, 2.4vw, 3rem);
    line-height: 1;
    white-space: normal;
    overflow-wrap: anywhere;
}

.badge-detail-grid small {
    color: var(--muted);
    line-height: 1.45;
}

.quick-stat-meta {
    display: block;
    margin-top: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.compact-head {
    margin-bottom: 14px;
}

.book-stats-card {
    display: grid;
    gap: 14px;
}

.sync-grid .register-frame {
    grid-column: span 7;
}

.sync-grid .book-stats-frame {
    grid-column: span 5;
}

.sync-form-grid {
    align-items: start;
}

.sync-confirm {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.sync-confirm input {
    margin-top: 3px;
}

.sync-confirm span {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.sync-job-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.sync-job-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.mapping-list {
    display: grid;
    gap: 10px;
}

.mapping-list div {
    padding: 10px 12px;
    border: 2px solid var(--line);
    background: var(--surface);
}

.mapping-list span,
.sync-summary {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mapping-list b {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--text);
    word-break: break-word;
}

.book-stats-name {
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.book-stats-name span,
.book-stats-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.book-stats-name strong {
    display: block;
    font-size: 1.2rem;
    word-break: break-word;
}

.book-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.book-stats-grid div {
    padding: 12px 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.book-stats-grid b {
    display: block;
    font-size: 1.1rem;
    word-break: break-word;
}

.flash-card {
    padding: 16px 18px;
}

.flash-card--success {
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface));
}

.flash-card--error {
    background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface));
}

.flash-card--warning {
    background: color-mix(in srgb, var(--warning-soft) 70%, var(--surface));
}

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1200;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
}

.toast {
    padding: 14px 16px;
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.toast p {
    margin: 0;
    color: var(--muted);
}

.toast--success {
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface));
}

.toast--error {
    background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface));
}

.toast--warning {
    background: color-mix(in srgb, var(--warning-soft) 70%, var(--surface));
}

.toast--hiding {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    position: absolute;
    top: 16px;
    right: 16px;
}

.monitor-link-form {
    margin: 0;
}

.info-trigger {
    width: 42px;
    height: 42px;
    font-weight: 800;
    background: var(--surface-strong);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.modal-grid {
    margin-bottom: 18px;
}

.tool-input {
    display: grid;
    gap: 8px;
}

.tool-input span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.tool-input input,
.tool-input select {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    outline: 0;
}

.tool-input input:focus,
.tool-input select:focus {
    border-color: var(--accent);
}

.tool-input-with-action {
    position: relative;
}

.tool-input-with-action input {
    padding-right: 56px;
}

.tool-input-action {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.tool-input-action:hover,
.tool-input-action:focus-visible {
    color: var(--text);
    outline: none;
}

.input-span-2 {
    grid-column: span 2;
}

.input-span-4 {
    grid-column: span 4;
}

.answer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
    font-size: 0.84rem;
    color: var(--muted);
}

.invalid-hint {
    color: var(--danger);
    font-weight: 700;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.tool-btn.primary {
    background: var(--accent-soft);
}

a.tool-btn {
    text-decoration: none;
}

.tool-btn.outline {
    background: transparent;
}

.tool-btn.danger {
    background: var(--danger-soft);
}

.login-form-card {
    padding: 0;
    box-shadow: none;
}

.login-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.login-check input {
    width: 18px;
    height: 18px;
}

.login-submit-btn {
    min-width: 180px;
}

.recent-head {
    margin-bottom: 14px;
}

.recent-list {
    display: grid;
    gap: 10px;
}

.sync-runs {
    display: grid;
    gap: 10px;
}

.sync-run-row {
    display: grid;
    grid-template-columns: 0.5fr 1.2fr 1.3fr 0.7fr 1.4fr 0.9fr 0.9fr;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.sync-run-row > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sync-run-row--head {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sync-summary {
    display: grid;
    gap: 6px;
}

.sync-summary b {
    color: var(--text);
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0;
}

.recent-row {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.5fr 1.2fr 1fr 0.45fr 0.6fr 0.5fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    white-space: nowrap;
}

.student-row {
    grid-template-columns: 0.9fr 0.9fr 0.7fr 1.2fr 0.55fr 0.7fr 1fr 0.6fr 0.5fr;
}

.monitor-row {
    grid-template-columns: 0.9fr 0.95fr 0.45fr 0.45fr 0.45fr 0.45fr 0.45fr 0.55fr 0.55fr 0.72fr 0.9fr 0.38fr;
}

.monitor-test-row {
    grid-template-columns: 0.8fr 0.8fr 1fr 1.2fr 0.45fr 0.45fr 0.45fr 0.45fr 0.6fr 0.38fr;
}

.books-assignment-row {
    grid-template-columns: 0.35fr 1.6fr 0.8fr 0.8fr 0.55fr 0.55fr 0.55fr 0.55fr 0.75fr;
}

.icon-btn.active {
    color: var(--success, #22c55e);
    border-color: var(--success, #22c55e);
}

.overdue-row {
    grid-template-columns: 0.7fr 0.9fr 0.75fr 1.35fr 1.15fr 0.9fr 0.45fr;
}

.activity-row {
    grid-template-columns: 0.95fr 0.75fr 0.5fr 1.3fr 1.05fr 0.6fr 0.5fr 0.38fr;
}

.exam-balance-row {
    grid-template-columns: 1fr 0.55fr 0.55fr 0.55fr 0.55fr 0.5fr 0.9fr;
}

.overdue-row > span:nth-child(4) {
    display: grid;
    gap: 4px;
    white-space: normal;
}

.overdue-row > span:nth-child(4) b {
    margin: 0;
    font-size: 0.92rem;
}

.overdue-row > span:nth-child(4) small {
    color: var(--muted);
}

.books-assignment-row--inactive {
    background: color-mix(in srgb, var(--warning-soft) 72%, var(--surface));
    border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
}

.books-assignment-row--inactive .icon-btn {
    border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
    background: color-mix(in srgb, var(--warning-soft) 52%, var(--surface-strong));
}

.books-edit-row {
    grid-template-columns: 0.9fr 1.1fr 1.6fr;
    align-items: start;
}

.books-edit-row > span {
    overflow: visible;
}

.books-edit-group {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.books-edit-unit {
    display: grid;
    gap: 8px;
}

.books-edit-outcomes {
    display: grid;
    gap: 10px;
    padding-left: 18px;
    border-left: 2px solid var(--line);
}

.books-edit-outcome {
    display: grid;
    gap: 8px;
}

.unit-row {
    grid-template-columns: 0.95fr 1.15fr 0.45fr 0.45fr 0.45fr 0.45fr 0.45fr 0.6fr 0.6fr 0.8fr 0.38fr;
}

.unit-row--child {
    background: color-mix(in srgb, var(--surface) 82%, var(--accent-soft) 18%);
}

.unit-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.unit-cell--child {
    padding-left: 18px;
}

.unit-sub-label {
    flex: 0 0 auto;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.unit-toggle-glyph {
    flex: 0 0 auto;
    width: 14px;
    text-align: center;
}

.unit-toggle-btn {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-strong) 88%, var(--surface));
    color: var(--muted);
    cursor: pointer;
    flex: 0 0 auto;
}

.unit-toggle-btn:hover,
.unit-toggle-btn[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    color: var(--text);
}

.subject-test-row {
    grid-template-columns: 0.8fr 1fr 1fr 1.2fr 0.45fr 0.45fr 0.45fr 0.45fr 0.6fr;
}

.recent-row > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-row--head {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.recent-row--tall {
    grid-template-columns: 1.2fr 0.65fr 0.8fr 0.4fr 0.4fr 0.4fr 0.5fr 0.55fr 0.9fr 0.3fr;
    align-items: center;
}

.row-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
}

.inline-compact-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.inline-compact-form input[type="text"] {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.icon-btn--hero {
    width: 46px;
    min-width: 46px;
    height: 48px;
}

.icon-btn i {
    font-size: 14px;
    line-height: 1;
}

.icon-btn.danger {
    color: var(--danger);
}

.icon-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.monitor-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.picker-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.picker-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.picker-card:hover {
    transform: translate(-2px, -2px);
    border-color: var(--accent);
}

.picker-card strong {
    font-size: 1.1rem;
    word-break: break-word;
}

.picker-card p {
    margin: 0;
    color: var(--muted);
}

.picker-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

.panel-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.monitor-link-btn {
    white-space: nowrap;
}

.monitor-link-btn--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    line-height: 1;
}

.monitor-link-btn--icon i {
    display: block;
    line-height: 1;
}

.chips-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.chips-inline::-webkit-scrollbar {
    display: none;
}

.chips-inline .priority-chip,
.chips-inline .trend-chip {
    flex: 0 0 auto;
}


.modal-actions--split {
    justify-content: space-between;
    align-items: center;
}

.modal-actions-inline {
    justify-content: flex-end;
}

.subject-analysis-action {
    display: flex;
    justify-content: center;
}

.subject-analysis-action .icon-btn {
    text-decoration: none;
    font-size: 1rem;
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.trend-chip--up {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface));
    color: var(--accent);
}

.trend-chip--down {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
    background: color-mix(in srgb, var(--danger-soft) 82%, var(--surface));
    color: var(--danger);
}

.trend-chip--neutral {
    border-color: var(--line);
    background: color-mix(in srgb, var(--surface-strong) 88%, var(--surface));
    color: var(--muted);
}

.priority-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.76rem;
    line-height: 1.2;
    white-space: nowrap;
}

.priority-chip--critical {
    border-color: color-mix(in srgb, var(--danger) 60%, var(--line));
    background: color-mix(in srgb, var(--danger-soft) 85%, var(--surface));
    color: var(--danger);
}

.priority-chip--high {
    border-color: color-mix(in srgb, var(--warning) 60%, var(--line));
    background: color-mix(in srgb, var(--warning-soft) 85%, var(--surface));
    color: color-mix(in srgb, var(--warning) 78%, var(--text));
}

.priority-chip--medium {
    border-color: color-mix(in srgb, #5b6f8a 48%, var(--line));
    background: color-mix(in srgb, #5b6f8a 14%, var(--surface));
    color: color-mix(in srgb, #5b6f8a 84%, var(--text));
}

.priority-chip--low {
    border-color: var(--line);
    background: color-mix(in srgb, var(--surface-strong) 88%, var(--surface));
    color: var(--muted);
}

.priority-chip--ok {
    border-color: color-mix(in srgb, #22c55e 52%, var(--line));
    background: color-mix(in srgb, #22c55e 12%, var(--surface));
    color: color-mix(in srgb, #22c55e 72%, var(--text));
}

.recent-empty {
    padding: 20px 14px;
    border: 2px dashed var(--line);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.callout {
    padding: 14px;
}

.callout b {
    display: block;
    margin-bottom: 8px;
}

.modal {
    width: min(980px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    background: transparent;
}

.modal::backdrop {
    background: rgba(10, 10, 10, 0.48);
}

.modal-small {
    width: min(460px, calc(100vw - 32px));
}

.badge-detail-modal {
    width: min(1080px, calc(100vw - 32px));
}

.modal-form {
    padding: 18px;
    box-shadow: var(--shadow);
}

.info-modal-form {
    width: min(900px, calc(100vw - 32px));
}

.info-flow {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.info-section {
    padding-top: 14px;
    border-top: 2px solid var(--line);
}

.info-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.info-section h3 {
    margin-bottom: 10px;
}

.info-section p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
}

.info-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.info-list li {
    margin-bottom: 6px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.modal-section-head {
    margin-top: 22px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.delete-copy {
    margin: 0 0 18px;
    color: var(--muted);
}

@media (max-width: 1320px) {
    .stat-frame,
    .book-stats-frame,
    .register-frame,
    .recent-frame,
    .notes-frame,
    .flash-card,
    .super-grid .super-title {
        grid-column: span 12;
    }

    .sync-grid .register-frame,
    .sync-grid .book-stats-frame {
        grid-column: span 12;
    }

    .quick-stats,
    .notes-grid,
    .picker-grid {
        grid-template-columns: 1fr;
    }

    .lgs-monitor-explainer,
    .lgs-monitor-source-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1080px) {
    .lab-shell {
        grid-template-columns: 1fr;
    }

    .lab-sidebar {
        width: min(340px, calc(100vw - 24px));
    }

    .theme-fab {
        width: 48px;
        height: 48px;
    }

    .form-grid,
    .recent-row,
    .sync-run-row {
        grid-template-columns: 1fr;
    }

    .monitor-search {
        grid-template-columns: 1fr;
    }

    .lgs-monitor-summary-card {
        grid-template-columns: 1fr;
    }

    .lgs-monitor-summary-card .compact-head,
    .lgs-monitor-summary-card .lgs-monitor-note,
    .lgs-monitor-summary-card .book-stats-grid {
        grid-column: auto;
        grid-row: auto;
    }

    .input-span-2,
    .input-span-4 {
        grid-column: auto;
    }

    .recent-row {
        white-space: normal;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .panel-hero,
    .picker-meta {
        display: grid;
    }

    .toast-stack {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

.student-mobile-page {
    min-height: 100vh;
    padding: 18px 14px 96px;
}

.student-mobile-shell {
    width: min(100%, 420px);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.student-mobile-topbar,
.student-mobile-section__head,
.student-mobile-book-card__head,
.student-mobile-list-item,
.student-mobile-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.student-mobile-section__head {
    margin-bottom: 12px;
}

.student-mobile-section__head + * {
    margin-top: 12px;
}

.student-mobile-section__body {
    margin-top: 12px;
}

.student-mobile-section__body--centered {
    display: grid;
    place-items: center;
    margin-top: 0;
    padding: 8px 0;
}

.student-mobile-topbar h1,
.student-mobile-hero h2,
.student-mobile-section__head h3 {
    margin: 0;
}

.student-mobile-topbar {
    align-items: flex-start;
}

.student-mobile-topbar > :first-child {
    min-width: 0;
}

.student-mobile-topbar h1 {
    font-size: clamp(2.2rem, 3.6vw, 3.7rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.student-mobile-topbar--result h1 {
    font-size: clamp(1.7rem, 8vw, 2.7rem);
    line-height: 0.98;
}

.student-mobile-hero {
    grid-template-columns: minmax(0, 1fr) auto;
}

.student-mobile-hero__copy {
    min-width: 0;
}

.student-mobile-hero h2 {
    font-size: clamp(1.8rem, 2vw, 2.5rem);
    overflow-wrap: anywhere;
}

.student-mobile-chip,
.student-mobile-text-link {
    color: var(--text);
    text-decoration: none;
}

.student-mobile-chip {
    padding: 10px 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.student-mobile-topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-mobile-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    color: var(--text);
}

.student-mobile-chip i,
.student-mobile-icon-btn i,
.student-mobile-drawer__nav i {
    font-size: 1rem;
}

.student-mobile-hero,
.student-mobile-card,
.student-mobile-section,
.student-mobile-bottom-nav {
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.student-mobile-hero,
.student-mobile-section {
    padding: 18px;
    min-width: 0;
}

.student-mobile-section {
    display: grid;
    gap: 16px;
}

.student-mobile-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 72%, var(--surface)) 0%, var(--surface) 58%);
}

.student-mobile-hero__copy,
.student-mobile-section__head > *,
.student-mobile-section__body {
    min-width: 0;
}

.student-mobile-hero__copy p,
.student-mobile-book-card p,
.student-mobile-list-item p,
.student-mobile-feed-item p {
    margin: 4px 0 0;
    color: var(--muted);
}

.student-mobile-page [data-mobile-overflow-watch] {
    min-width: 0;
    line-height: 1.6;
}

.student-mobile-page [data-mobile-overflow-watch].is-overflowing {
    cursor: pointer;
}

.student-mobile-badge {
    display: grid;
    place-items: center;
    min-width: 94px;
    padding: 12px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    text-align: center;
}

.student-mobile-badge strong {
    font-size: 1.65rem;
    line-height: 1;
}

.student-mobile-badge span {
    font-size: 0.74rem;
    color: var(--muted);
}

.student-mobile-badge--level-0 {
    border-color: var(--icon-tone-0-border);
    background: var(--icon-tone-0-bg);
    color: var(--icon-tone-0-fg);
}

.student-mobile-badge--level-1 {
    border-color: var(--icon-tone-1-border);
    background: var(--icon-tone-1-bg);
    color: var(--icon-tone-1-fg);
}

.student-mobile-badge--level-2 {
    border-color: var(--icon-tone-2-border);
    background: var(--icon-tone-2-bg);
    color: var(--icon-tone-2-fg);
}

.student-mobile-badge--level-3 {
    border-color: var(--icon-tone-3-border);
    background: var(--icon-tone-3-bg);
    color: var(--icon-tone-3-fg);
}

.student-mobile-badge--level-4 {
    border-color: var(--icon-tone-4-border);
    background: var(--icon-tone-4-bg);
    color: var(--icon-tone-4-fg);
}

:root[data-theme="light"] .student-mobile-badge--level-4 {
    border-color: var(--icon-tone-4-border);
    background: var(--icon-tone-4-bg);
    color: var(--icon-tone-4-fg);
}

:root[data-theme="light"] .student-mobile-badge--level-4 strong {
    color: #3b7da5;
}

.student-mobile-badge--level-5 {
    border-color: var(--icon-tone-5-border);
    background: var(--icon-tone-5-bg);
    color: var(--icon-tone-5-fg);
}

.student-mobile-badge--level-6 {
    border-color: var(--icon-tone-6-border);
    background: var(--icon-tone-6-bg);
    color: var(--icon-tone-6-fg);
}

.student-mobile-badge--level-7 {
    border-color: var(--icon-tone-7-border);
    background: var(--icon-tone-7-bg);
    color: var(--icon-tone-7-fg);
}

.student-mobile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

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

.student-mobile-card {
    padding: 14px;
    min-height: 116px;
    display: grid;
    align-content: start;
    gap: 8px;
}

.student-mobile-card--accent {
    background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface));
}

.student-mobile-card--missed-safe {
    background: color-mix(in srgb, var(--accent-soft) 54%, var(--surface));
}

.student-mobile-card--missed-watch {
    background: color-mix(in srgb, var(--surface-strong) 82%, var(--warning-soft));
    border-color: color-mix(in srgb, var(--warning) 34%, var(--line));
}

.student-mobile-card--missed-warning {
    background: color-mix(in srgb, var(--warning-soft) 62%, var(--surface));
    border-color: color-mix(in srgb, var(--warning) 46%, var(--line));
}

.student-mobile-card--missed-danger {
    background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface));
    border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
}

.student-mobile-card--missed-critical {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--danger-soft) 72%, var(--surface)), color-mix(in srgb, var(--surface-strong) 90%, var(--danger-soft)));
    border-color: color-mix(in srgb, var(--danger) 64%, var(--line));
}

.student-mobile-result-hero {
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--line) 72%, var(--accent-soft));
}

.student-mobile-result-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 18%, color-mix(in srgb, var(--accent-soft) 42%, transparent), transparent 28%),
        radial-gradient(circle at 86% 22%, color-mix(in srgb, var(--warning-soft) 36%, transparent), transparent 24%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 82%, transparent), transparent 62%);
    pointer-events: none;
    opacity: 0.95;
}

.student-mobile-result-hero > * {
    position: relative;
    z-index: 1;
}

.student-mobile-result-hero--earned {
    background:
        linear-gradient(140deg, color-mix(in srgb, var(--accent-soft) 76%, var(--surface)), color-mix(in srgb, var(--surface-strong) 92%, var(--accent-soft)));
}

.student-mobile-result-hero--steady {
    background:
        linear-gradient(140deg, color-mix(in srgb, var(--warning-soft) 44%, var(--surface)), color-mix(in srgb, var(--surface-strong) 94%, var(--warning-soft)));
}

.student-mobile-result-hero--recover {
    background:
        linear-gradient(140deg, color-mix(in srgb, var(--danger-soft) 32%, var(--surface)), color-mix(in srgb, var(--surface-strong) 94%, var(--danger-soft)));
}

.student-mobile-result-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.student-mobile-result-flag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 2px solid var(--line);
    background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.student-mobile-result-card {
    min-height: 104px;
    border: 2px solid var(--line);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 92%, transparent), var(--surface-strong));
    box-shadow: var(--shadow);
}

.student-mobile-result-card--primary {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.student-mobile-result-reward {
    border-width: 2px;
    box-shadow: var(--shadow);
}

.student-mobile-organic-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.student-mobile-organic-card strong {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1;
}

.student-mobile-organic-card p,
.student-mobile-organic-note {
    margin: 0;
    color: var(--muted);
}

.student-mobile-hero__copy h1,
.student-mobile-hero__copy h2,
.student-mobile-book-card__head strong,
.student-mobile-book-card__head > span,
.student-mobile-summary-link strong,
.student-mobile-feed-item strong,
.student-mobile-list-item strong,
.student-mobile-organic-card strong,
.student-mobile-section__head h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-mobile-hero__copy p,
.student-mobile-book-card p,
.student-mobile-summary-link p,
.student-mobile-summary-link__meta,
.student-mobile-feed-item p,
.student-mobile-list-item p,
.student-mobile-organic-card p,
.student-mobile-card p,
.student-mobile-pill-card span,
.student-mobile-pill-card small,
.student-mobile-test-help {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.student-mobile-organic-card--GUCLU {
    background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface-strong));
}

.student-mobile-organic-card--TEMKINLI {
    background: color-mix(in srgb, var(--warning-soft) 30%, var(--surface-strong));
}

.student-mobile-organic-card--YETERSIZ {
    background: color-mix(in srgb, var(--surface) 85%, var(--surface-strong));
}

.student-mobile-card strong {
    font-family: var(--font-display);
    font-size: 1.9rem;
    line-height: 0.95;
    text-decoration: none;
}

.student-mobile-card p,
.student-mobile-empty {
    margin: 0;
    color: var(--muted);
}

.student-mobile-card__topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.student-mobile-card__delta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 2.8rem;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.student-mobile-card__delta--up {
    color: var(--accent);
}

.student-mobile-card__delta--down {
    color: var(--danger);
}

.student-mobile-card__delta--neutral {
    color: var(--muted);
}

.student-mobile-card__hint {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.student-mobile-form {
    display: grid;
    gap: 12px;
}

.student-mobile-field {
    display: grid;
    gap: 6px;
}

.student-mobile-field span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.student-mobile-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
}

.student-mobile-input--textarea {
    min-height: 92px;
    resize: vertical;
}

.student-mobile-form-note {
    padding: 12px;
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.student-mobile-actions {
    display: flex;
    justify-content: flex-end;
}

.student-mobile-action-btn {
    min-height: 48px;
    padding: 0 18px;
    border: 2px solid var(--line);
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 800;
}

.student-mobile-badge-ribbon {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    -webkit-overflow-scrolling: touch;
}

.student-mobile-badge-ribbon__item {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.student-mobile-badge-ribbon__item--catalog {
    border-style: dashed;
}

.student-mobile-badge-ribbon__item--level-0 {
    border-color: var(--icon-tone-0-border);
    background: var(--icon-tone-0-bg);
    color: var(--icon-tone-0-fg);
}

.student-mobile-badge-ribbon__item--level-1 {
    border-color: var(--icon-tone-1-border);
    background: var(--icon-tone-1-bg);
    color: var(--icon-tone-1-fg);
}

.student-mobile-badge-ribbon__item--level-2 {
    border-color: var(--icon-tone-2-border);
    background: var(--icon-tone-2-bg);
    color: var(--icon-tone-2-fg);
}

.student-mobile-badge-ribbon__item--level-3 {
    border-color: var(--icon-tone-3-border);
    background: var(--icon-tone-3-bg);
    color: var(--icon-tone-3-fg);
}

.student-mobile-badge-ribbon__item--level-4 {
    border-color: var(--icon-tone-4-border);
    background: var(--icon-tone-4-bg);
    color: var(--icon-tone-4-fg);
}

.student-mobile-badge-ribbon__item--level-5 {
    border-color: var(--icon-tone-5-border);
    background: var(--icon-tone-5-bg);
    color: var(--icon-tone-5-fg);
}

.student-mobile-badge-ribbon__item--level-6 {
    border-color: var(--icon-tone-6-border);
    background: var(--icon-tone-6-bg);
    color: var(--icon-tone-6-fg);
}

.student-mobile-badge-ribbon__item--level-7 {
    border-color: var(--icon-tone-7-border);
    background: var(--icon-tone-7-bg);
    color: var(--icon-tone-7-fg);
}

:root[data-theme="light"] .student-mobile-threshold {
    border-color: #b5bcc5;
    background: #f3f5f7;
    color: #66717d;
}

:root[data-theme="light"] .student-mobile-threshold--bronze.is-current {
    border-color: #8b5a2b;
    background: #f2dfcf;
    color: #6f451f;
}

:root[data-theme="light"] .student-mobile-threshold--silver.is-current {
    border-color: #6f7a88;
    background: #e5eaef;
    color: #4e5865;
}

:root[data-theme="light"] .student-mobile-threshold--gold.is-current {
    border-color: #a57912;
    background: #f4e4ab;
    color: #6e5300;
}

:root[data-theme="light"] .student-mobile-threshold--platinum.is-current {
    border-color: #467ea0;
    background: #dceef9;
    color: #2d5875;
}

:root[data-theme="light"] .student-mobile-threshold--titanium.is-current {
    border-color: #5569a4;
    background: #e0e6f7;
    color: #3d4d80;
}

:root[data-theme="light"] .student-mobile-threshold--diamond.is-current {
    border-color: #2b8f92;
    background: #d9f5f5;
    color: #18696b;
}

:root[data-theme="light"] .student-mobile-threshold--obsidian.is-current {
    border-color: #584b78;
    background: #e8e1f3;
    color: #3f345a;
}

.student-mobile-badge-ribbon__item:hover,
.student-mobile-badge-ribbon__item:focus-visible {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 18%, var(--surface-strong));
    outline: none;
}

.student-mobile-list,
.student-mobile-feed,
.student-mobile-book-list,
.student-mobile-pill-grid {
    display: grid;
    gap: 10px;
}

.student-mobile-badge-strip,
.student-mobile-badge-grid {
    display: grid;
    gap: 12px;
}

.student-mobile-badge-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-mobile-list-item,
.student-mobile-feed-item,
.student-mobile-book-card,
.student-mobile-pill-card {
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.student-mobile-feed-item {
    color: var(--text);
    text-decoration: none;
}

.student-mobile-feed-item:hover,
.student-mobile-feed-item:focus-visible {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 18%, var(--surface-strong));
    outline: none;
}

.student-mobile-feed-item.is-selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface-strong));
}

.student-mobile-feed-item--badge-catalog {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.student-mobile-feed-item--locked {
    opacity: 0.92;
}

.student-mobile-feed-item__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
}

.student-mobile-feed-item__body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.student-mobile-feed-item__body small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-mobile-badge-stat,
.student-mobile-badge-card {
    border: 2px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.student-mobile-badge-stat {
    padding: 14px;
}

.student-mobile-badge-stat strong {
    display: block;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 0.95;
}

.student-mobile-badge-stat p {
    margin: 6px 0 0;
    color: var(--muted);
}

.student-mobile-list-item span,
.student-mobile-feed-item span,
.student-mobile-pill-card span {
    white-space: nowrap;
    font-weight: 800;
}

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

.student-mobile-pill-card {
    display: grid;
    gap: 4px;
}

.student-mobile-badge-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
}

.student-mobile-pill-card small,
.student-mobile-book-card small {
    color: var(--muted);
}

.student-mobile-ledger-entry--positive {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.student-mobile-ledger-entry--negative {
    border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
}

.student-mobile-book-card--link {
    display: grid;
    gap: 6px;
    color: var(--text);
    text-decoration: none;
}

.student-mobile-book-card--link:hover,
.student-mobile-book-card--link:focus-visible {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 18%, var(--surface-strong));
    outline: none;
}

.student-mobile-book-card--locked-tap {
    cursor: pointer;
}

.student-mobile-book-card--locked-tap:hover,
.student-mobile-book-card--locked-tap:focus-visible {
    border-color: var(--warning);
    background: color-mix(in srgb, var(--warning-soft) 18%, var(--surface-strong));
    outline: none;
}

.student-mobile-book-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.student-mobile-book-card__heading {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.student-mobile-book-card__heading strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-mobile-book-card--compact {
    padding: 12px;
    gap: 4px;
}

.student-mobile-book-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.student-mobile-book-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    text-decoration: none !important;
}

.kit-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    text-decoration: none;
}

.kit-icon-btn:hover,
.kit-icon-btn:focus {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.question-review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-review-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
}

.question-review-card--wrong {
    border-left: 3px solid var(--danger);
}

.question-review-card--blank {
    border-left: 3px solid var(--warning);
}

.question-review-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.question-review-card__num {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--surface-raised);
    padding: 2px 8px;
    border-radius: 4px;
}

.question-review-card__test {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.question-review-card__unit {
    font-size: 0.75rem;
    color: var(--muted);
}

.question-review-card__answers {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.answer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    border-radius: 6px;
    min-width: 48px;
}

.answer-box--wrong {
    background: var(--danger-soft);
    border: 1px solid var(--danger);
}

.answer-box--wrong .answer-label {
    color: var(--danger);
}

.answer-box--wrong .answer-value {
    color: var(--danger);
    font-weight: 700;
}

.answer-box--empty {
    background: var(--warning-soft);
    border: 1px solid var(--warning);
}

.answer-box--empty .answer-label {
    color: var(--warning);
}

.answer-box--empty .answer-value {
    color: var(--warning);
    font-weight: 700;
}

.answer-box--correct {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
}

.answer-box--correct .answer-label {
    color: var(--accent);
}

.answer-box--correct .answer-value {
    color: var(--accent);
    font-weight: 700;
}

.answer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 2px;
}

.answer-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.answer-arrow {
    color: var(--muted);
    font-size: 0.8rem;
}

.question-review-card__text {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--muted);
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.kit-icon-btn:hover,
.kit-icon-btn:focus {
    background: var(--surface-raised);
    border-color: var(--muted);
    color: var(--text);
}

.student-mobile-book-card--compact .student-mobile-book-card__head strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.08;
}

.student-mobile-book-card--compact p {
    font-size: 0.86rem;
    line-height: 1.28;
}

.student-mobile-book-card--compact small {
    font-size: 0.84rem;
}

.student-mobile-book-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.student-mobile-priority-chip {
    min-width: 0;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-mobile-priority-chip--mini {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 0.62rem;
}

.student-mobile-trend-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 72%, var(--surface-strong));
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.student-mobile-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.student-mobile-card__footer--compact {
    padding-right: 0;
}

.student-mobile-icon-action {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    flex: 0 0 auto;
}

.student-mobile-icon-action:hover,
.student-mobile-icon-action:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent);
    outline: none;
}

.student-mobile-mini-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}

.student-mobile-mini-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
}

.student-mobile-mini-list__row span {
    color: var(--muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-mobile-mini-list__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

.student-mobile-progress {
    height: 10px;
    margin: 10px 0 8px;
    border: 2px solid var(--line);
    background: color-mix(in srgb, var(--surface) 72%, var(--surface-strong));
}

.student-mobile-book-card--compact .student-mobile-progress {
    height: 8px;
    margin: 8px 0 6px;
}

.student-mobile-progress span {
    display: block;
    height: 100%;
    background: var(--accent);
}

.student-mobile-summary-link {
    display: grid;
    gap: 6px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.student-mobile-summary-link p,
.student-mobile-summary-link__meta {
    margin: 0;
    color: var(--muted);
}

.student-mobile-summary-link__meta {
    font-weight: 700;
}

.student-mobile-thresholds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.student-mobile-threshold {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 82%, var(--surface-strong));
    color: var(--muted);
}

.student-mobile-threshold--bronze.is-current {
    border-color: #8f6a45;
    background: color-mix(in srgb, #8f6a45 18%, var(--surface-strong));
    color: #d7ba97;
}

.student-mobile-threshold--silver.is-current {
    border-color: #9aa3ad;
    background: color-mix(in srgb, #9aa3ad 20%, var(--surface-strong));
    color: #eef2f6;
}

.student-mobile-threshold--gold.is-current {
    border-color: #c9a33a;
    background: color-mix(in srgb, #c9a33a 22%, var(--surface-strong));
    color: #ffe8a3;
}

.student-mobile-threshold--platinum.is-current {
    border-color: #70a8c8;
    background: color-mix(in srgb, #70a8c8 24%, var(--surface-strong));
    color: #d7f0ff;
}

.student-mobile-threshold--titanium.is-current {
    border-color: #7d8ec7;
    background: color-mix(in srgb, #7d8ec7 24%, var(--surface-strong));
    color: #e0e7ff;
}

.student-mobile-threshold--diamond.is-current {
    border-color: #57c3c5;
    background: color-mix(in srgb, #57c3c5 24%, var(--surface-strong));
    color: #d9ffff;
}

.student-mobile-threshold--obsidian.is-current {
    border-color: #6b5e8d;
    background: color-mix(in srgb, #6b5e8d 24%, var(--surface-strong));
    color: #efe8ff;
}

.student-mobile-summary-link--accent {
    background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface-strong));
}

.student-mobile-summary-link--centered {
    width: min(100%, calc(100% - 28px));
    margin: 0 auto;
}

.student-mobile-summary-link + .student-mobile-book-list {
    margin-top: 12px;
}

.student-mobile-section--accent {
    background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface));
}

.student-mobile-section--error {
    background: color-mix(in srgb, var(--danger-soft) 42%, var(--surface));
}

.student-mobile-icon-action.is-disabled,
.student-mobile-icon-action.is-disabled:hover,
.student-mobile-icon-action.is-disabled:focus-visible {
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-strong));
    border-color: var(--line);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
}

.student-mobile-test-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.student-mobile-test-meta span,
.student-mobile-test-help {
    color: var(--muted);
}

.student-mobile-test-help {
    margin: 0;
}

.student-mobile-question-list {
    display: grid;
    gap: 12px;
}

.student-mobile-question-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.student-mobile-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.student-mobile-option-grid {
    display: grid;
    grid-template-columns: repeat(var(--student-mobile-choice-count, 5), minmax(0, 1fr));
    gap: 8px;
}

.student-mobile-option {
    min-height: 42px;
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    font-size: 0.92rem;
    padding: 0 4px;
    white-space: nowrap;
}

.student-mobile-option.is-selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface));
}

.student-mobile-save-bar {
    display: flex;
    padding: 24px 0 8px;
}

.student-mobile-save-bar[hidden] {
    display: none !important;
}

.student-mobile-save-button {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 2px solid var(--line);
    background: var(--accent);
    color: #08130d;
    box-shadow: var(--shadow);
    font-size: 1.2rem;
}

.student-mobile-save-button--wide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    padding: 0 18px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.student-mobile-review-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.student-mobile-review-table {
    border-collapse: separate;
    border-spacing: 8px;
    width: max-content;
    min-width: 100%;
}

.student-mobile-review-table th,
.student-mobile-review-table td {
    min-width: 40px;
    height: 44px;
    padding: 0 6px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    text-align: center;
    vertical-align: middle;
    font-weight: 800;
}

.student-mobile-review-table th {
    position: sticky;
    left: 0;
    min-width: 82px;
    padding: 0 12px;
    color: var(--muted);
    background: color-mix(in srgb, var(--surface) 92%, var(--surface-strong));
    text-align: left;
    z-index: 1;
}

.student-mobile-review-table--stacked {
    width: 100%;
    min-width: 100%;
}

.student-mobile-review-table--stacked th {
    position: static;
    min-width: 0;
    text-align: center;
    padding: 10px 8px;
}

.student-mobile-review-table--stacked td {
    min-width: 0;
    width: 33.33%;
}

.student-mobile-review-cell--index {
    color: var(--muted);
    font-size: 0.82rem;
    background: color-mix(in srgb, var(--surface) 86%, var(--surface-strong));
}

.student-mobile-review-cell--key {
    background: color-mix(in srgb, var(--surface) 78%, var(--accent-soft));
}

.student-mobile-review-cell--correct {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 46%, var(--surface-strong));
}

.student-mobile-review-cell--wrong {
    border-color: color-mix(in srgb, var(--danger) 68%, var(--line));
    background: color-mix(in srgb, var(--danger-soft) 56%, var(--surface-strong));
    color: color-mix(in srgb, var(--danger) 82%, var(--text));
}

.student-mobile-review-cell--blank {
    border-color: color-mix(in srgb, #6b7280 52%, var(--line));
    background: color-mix(in srgb, #6b7280 18%, var(--surface-strong));
    color: color-mix(in srgb, #6b7280 82%, var(--text));
}

.student-mobile-review-cell--cancelled {
    border-color: color-mix(in srgb, var(--warning) 52%, var(--line));
    background: color-mix(in srgb, var(--warning-soft) 42%, var(--surface-strong));
}

.student-mobile-review-cell--video {
    text-align: center;
    width: 36px;
    padding: 4px;
}

.student-mobile-review-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.student-mobile-review-video-btn:hover {
    opacity: 0.8;
}

.student-mobile-review-cell--no-video {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.student-mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 14, 0.58);
    z-index: 50;
}

.student-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(84vw, 360px);
    height: 100vh;
    height: 100dvh;
    padding: 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-left: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    z-index: 60;
    overflow: hidden;
}

.student-mobile-drawer[hidden],
.student-mobile-drawer-backdrop[hidden] {
    display: none !important;
}

.student-mobile-drawer__head,
.student-mobile-drawer__nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.student-mobile-drawer-profile {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.student-mobile-drawer-profile__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.student-mobile-drawer-profile__copy strong,
.student-mobile-drawer-profile__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-mobile-drawer-profile__copy small {
    color: var(--muted);
}

.student-mobile-drawer__nav {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    gap: 10px;
    overflow-y: auto;
    padding-right: 2px;
}

.student-mobile-drawer__nav a {
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.student-mobile-drawer__nav a span {
    flex: 1;
}

.student-mobile-drawer__nav a.is-active {
    background: color-mix(in srgb, var(--accent-soft) 65%, var(--surface-strong));
}

.student-mobile-drawer__footer {
    margin-top: auto;
    flex: 0 0 auto;
    display: grid;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 2px solid color-mix(in srgb, var(--line) 76%, transparent);
    background: var(--surface);
    position: sticky;
    bottom: 0;
}

.student-mobile-drawer__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.student-mobile-drawer__icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    font-size: 1.15rem;
}

.student-mobile-drawer__icon-action:hover,
.student-mobile-drawer__icon-action:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 color-mix(in srgb, var(--line) 75%, transparent);
}

.student-mobile-drawer__logout {
    background: color-mix(in srgb, var(--danger-soft, #f4c9c9) 52%, var(--surface-strong));
}

.student-mobile-drawer__logout:hover,
.student-mobile-drawer__logout:focus-visible {
    background: color-mix(in srgb, var(--danger-soft, #f4c9c9) 62%, var(--surface-strong));
}

.student-mobile-theme-toggle {
    position: static;
    left: auto;
    bottom: auto;
}

.student-mobile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.student-mobile-avatar--hero {
    width: 96px;
    height: 96px;
    border-radius: 28px;
}

.student-mobile-avatar--choice {
    width: 72px;
    height: 72px;
    border-radius: 22px;
}

.student-mobile-hero--profile {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.student-mobile-avatar-form {
    display: grid;
    gap: 14px;
}

.student-mobile-avatar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.student-mobile-avatar-choice {
    --avatar-accent: var(--accent);
    position: relative;
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 14px 12px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.student-mobile-avatar-choice:hover,
.student-mobile-avatar-choice:focus-within {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--avatar-accent) 62%, var(--line));
    background: color-mix(in srgb, var(--avatar-accent) 14%, var(--surface-strong));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--avatar-accent) 22%, transparent), 0 14px 28px rgba(0, 0, 0, 0.16);
}

.student-mobile-avatar-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.student-mobile-avatar-choice.is-active {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--avatar-accent) 78%, var(--line));
    background: color-mix(in srgb, var(--avatar-accent) 22%, var(--surface-strong));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--avatar-accent) 52%, transparent), 0 18px 30px rgba(0, 0, 0, 0.18);
}

.student-mobile-avatar-choice.is-active .student-mobile-avatar--choice {
    border-color: color-mix(in srgb, var(--avatar-accent) 78%, var(--line));
    background: color-mix(in srgb, var(--avatar-accent) 20%, var(--surface-strong));
}

.student-mobile-avatar-choice.is-active strong {
    color: color-mix(in srgb, var(--avatar-accent) 82%, var(--text));
}

.student-mobile-avatar-choice strong {
    font-size: 0.9rem;
}

.student-mobile-drawer__actions .student-mobile-theme-toggle {
    position: static;
    left: auto;
    bottom: auto;
    width: 100%;
    min-height: 56px;
}

body.student-mobile-drawer-open {
    overflow: hidden;
}

.student-mobile-bottom-nav {
    position: sticky;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.student-mobile-page--review {
    padding-bottom: 172px;
}

.student-mobile-page--review .student-mobile-section:last-of-type {
    margin-bottom: 72px;
}

.student-mobile-review-hero {
    position: relative;
    overflow: hidden;
}

.student-mobile-review-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.78;
    background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent-soft) 44%, transparent), transparent 30%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 90%, transparent), transparent 65%);
}

.student-mobile-review-hero > * {
    position: relative;
    z-index: 1;
}

.student-mobile-review-hero--prime {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 80%, var(--surface)) 0%, color-mix(in srgb, var(--surface) 82%, #f6eed0) 100%);
}

.student-mobile-review-hero--strong {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 62%, var(--surface)) 0%, color-mix(in srgb, var(--surface) 88%, #e6efe0) 100%);
}

.student-mobile-review-hero--steady {
    border-color: color-mix(in srgb, var(--warning) 30%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--warning-soft) 42%, var(--surface)) 0%, color-mix(in srgb, var(--surface) 90%, #efe9d8) 100%);
}

.student-mobile-review-hero--recover {
    border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--danger-soft) 36%, var(--surface)) 0%, color-mix(in srgb, var(--surface) 90%, #efe0da) 100%);
}

.student-mobile-review-hero__meta {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.student-mobile-review-badge--prime {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface-strong));
}

.student-mobile-review-badge--strong {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface-strong));
}

.student-mobile-review-badge--steady {
    border-color: color-mix(in srgb, var(--warning) 34%, var(--line));
    background: color-mix(in srgb, var(--warning-soft) 30%, var(--surface-strong));
}

.student-mobile-review-badge--recover {
    border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
    background: color-mix(in srgb, var(--danger-soft) 26%, var(--surface-strong));
}

.student-mobile-review-badge {
    gap: 6px;
}

.student-mobile-review-badge__icon {
    font-size: 1.15rem;
    line-height: 1;
}

.student-mobile-review-badge strong {
    display: block;
}

.student-mobile-result-badge {
    gap: 8px;
}

.student-mobile-result-badge__icon {
    font-size: 1.1rem;
    line-height: 1;
}

.student-mobile-review-grid .student-mobile-review-card:nth-child(2) {
    animation-delay: 0.08s;
}

.student-mobile-review-grid .student-mobile-review-card:nth-child(3) {
    animation-delay: 0.14s;
}

@media (prefers-reduced-motion: no-preference) {
    .student-mobile-page--review-motion-spark .student-mobile-review-hero,
    .student-mobile-page--review-motion-settle .student-mobile-review-hero,
    .student-mobile-page--review-motion-calm .student-mobile-review-hero {
        animation: student-review-rise 0.56s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .student-mobile-page--review-motion-spark .student-mobile-review-badge {
        animation:
            student-review-rise 0.52s cubic-bezier(0.22, 1, 0.36, 1) both,
            student-review-badge-pulse 1.3s ease-out 0.42s both;
    }

    .student-mobile-page--review-motion-settle .student-mobile-review-badge,
    .student-mobile-page--review-motion-calm .student-mobile-review-badge {
        animation: student-review-rise 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .student-mobile-page--review-motion-spark .student-mobile-review-card,
    .student-mobile-page--review-motion-settle .student-mobile-review-card,
    .student-mobile-page--review-motion-calm .student-mobile-review-card {
        animation: student-review-fade-up 0.48s ease-out both;
    }

    .student-mobile-page--review-motion-spark .student-mobile-section,
    .student-mobile-page--review-motion-settle .student-mobile-section,
    .student-mobile-page--review-motion-calm .student-mobile-section {
        animation: student-review-fade-up 0.5s ease-out both;
        animation-delay: 0.18s;
    }

    .student-mobile-page--review-motion-calm .student-mobile-review-hero {
        animation-duration: 0.44s;
    }
}

@keyframes student-review-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes student-review-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes student-review-badge-pulse {
    0% {
        transform: scale(0.96);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-soft) 55%, transparent);
    }
    55% {
        transform: scale(1.02);
        box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent-soft) 0%, transparent);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-soft) 0%, transparent);
    }
}

.student-mobile-bottom-nav a {
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    border: 2px solid transparent;
}

.student-mobile-bottom-nav a.is-active {
    border-color: var(--line);
    background: var(--surface-strong);
}

@media (max-width: 560px) {
    .student-mobile-page {
        padding: 12px 12px 108px;
    }

    .student-mobile-shell {
        width: 100%;
        gap: 12px;
    }

    .student-mobile-grid {
        gap: 10px;
    }

    .student-mobile-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .student-mobile-topbar__actions,
    .head-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .student-mobile-page--dashboard .student-mobile-topbar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .student-mobile-page--dashboard .student-mobile-topbar__actions {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .student-mobile-avatar-grid {
        grid-template-columns: 1fr;
    }

    .student-mobile-hero--profile {
        grid-template-columns: minmax(0, 1fr) 92px;
        gap: 10px;
    }

    .student-mobile-chip,
    .student-mobile-icon-action,
    .student-mobile-icon-btn {
        flex: 0 0 auto;
    }

    .student-mobile-hero {
        grid-template-columns: minmax(0, 1.35fr) minmax(108px, 0.65fr);
        align-items: stretch;
        padding: 14px;
        gap: 10px;
    }

    .student-mobile-hero h2 {
        font-size: clamp(1.5rem, 6.8vw, 2.45rem);
        line-height: 0.94;
    }

    .student-mobile-badge {
        min-width: 0;
        padding: 10px 8px;
    }

    .student-mobile-badge strong {
        font-size: 1.3rem;
    }

    .student-mobile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .student-mobile-card {
        min-height: 0;
        padding: 12px;
        gap: 6px;
    }

    .student-mobile-card strong {
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }

    .student-mobile-card p {
        font-size: 0.84rem;
        line-height: 1.32;
    }

    .student-mobile-pill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .student-mobile-organic-card {
        flex-direction: column;
        gap: 12px;
    }

    .student-mobile-organic-card .student-mobile-badge {
        align-self: flex-start;
        min-width: 92px;
    }

    .student-mobile-book-card__head {
        align-items: flex-start;
        gap: 10px;
    }

    .student-mobile-book-card--compact {
        padding: 10px;
    }

    .student-mobile-book-card--compact .student-mobile-book-card__head strong {
        font-size: 0.98rem;
    }

    .student-mobile-book-card--compact p {
        font-size: 0.82rem;
    }

    .student-mobile-book-card--compact small {
        font-size: 0.8rem;
    }

    .student-mobile-bottom-nav {
        bottom: 8px;
        gap: 6px;
        padding: 8px;
    }

    .student-mobile-bottom-nav a {
        padding: 9px 8px;
        font-size: 0.94rem;
    }

    .head-actions {
        gap: 8px;
    }

    .head-actions .student-mobile-chip {
        padding: 9px 10px;
    }

    .student-mobile-page--analysis .head-actions {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        width: 100%;
        align-items: stretch;
    }

    .student-mobile-page--analysis .head-actions .student-mobile-icon-action {
        width: 48px;
        height: 48px;
    }

    .student-mobile-page--analysis .head-actions .student-mobile-chip {
        width: 100%;
        min-width: 0;
        display: grid;
        place-items: center;
        text-align: center;
    }

    .student-mobile-page--review .student-mobile-topbar--result {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .student-mobile-page--review .student-mobile-topbar--result .student-mobile-chip {
        align-self: stretch;
        text-align: left;
    }

    .student-mobile-shell--dashboard {
        gap: 12px;
    }

    .student-mobile-hero--dashboard {
        grid-template-columns: minmax(0, 1.35fr) minmax(108px, 0.65fr);
        align-items: stretch;
        padding: 14px;
        gap: 10px;
    }

    .student-mobile-hero--dashboard .student-mobile-hero__copy {
        display: grid;
        align-content: start;
        gap: 4px;
    }

    .student-mobile-hero--dashboard h2 {
        font-size: clamp(1.5rem, 6.8vw, 2.45rem);
        line-height: 0.94;
    }

    .student-mobile-hero--dashboard .student-mobile-badge {
        min-width: 0;
        padding: 10px 8px;
    }

    .student-mobile-hero--dashboard .student-mobile-badge strong {
        font-size: 1.3rem;
    }

    .student-mobile-grid--dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .student-mobile-grid--dashboard .student-mobile-card {
        min-height: 0;
        padding: 12px;
        gap: 6px;
    }

    .student-mobile-grid--dashboard .student-mobile-card strong {
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }

    .student-mobile-grid--dashboard .student-mobile-card p {
        font-size: 0.84rem;
        line-height: 1.32;
    }

    .student-mobile-bottom-nav--dashboard {
        bottom: 8px;
        gap: 6px;
        padding: 8px;
    }

    .student-mobile-bottom-nav--dashboard a {
        padding: 9px 8px;
        font-size: 0.94rem;
    }
}

@media (max-width: 380px) {
    .student-mobile-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-mobile-book-card__head,
    .student-mobile-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .student-mobile-grid .student-mobile-card {
        padding: 10px;
    }

    .student-mobile-grid .student-mobile-card strong {
        font-size: clamp(1.55rem, 8vw, 1.95rem);
    }

    .student-mobile-grid .student-mobile-card p {
        font-size: 0.8rem;
    }
}

/* Tutor Panel Components */
.kit-tutor-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border: 2px solid var(--line);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 72%, var(--surface)) 0%, var(--surface) 58%);
    box-shadow: var(--shadow);
}

.kit-tutor-hero .micro-label {
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 4px;
    display: block;
}

.kit-tutor-hero h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    line-height: 1;
    margin: 0;
}

.kit-tutor-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.kit-tutor-stat-grid > div {
    padding: 12px 10px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.kit-tutor-stat-grid b {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-display);
}

.kit-tutor-stat-grid span {
    font-size: 0.75rem;
    color: var(--muted);
}

.kit-tutor-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.kit-tutor-back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.kit-tutor-analysis-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.kit-tutor-analysis-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.kit-tutor-analysis-btn i {
    color: var(--accent);
}

.kit-tutor-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.kit-tutor-icon-action:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.kit-tutor-subject-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 2px solid var(--line);
    background: var(--surface-strong);
}

.kit-tutor-subject-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.kit-tutor-subject-card__heading {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.kit-tutor-subject-card__heading strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.1;
    display: block;
}

.kit-tutor-subject-card__heading span {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.kit-tutor-subject-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.kit-tutor-subject-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.kit-tutor-subject-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
}

.kit-tutor-subject-card__footer small {
    font-size: 0.8rem;
    color: var(--muted);
}
