:root {
    --canvas: #f4f1ea;
    --surface: #fffdfa;
    --surface-muted: #ece9e1;
    --surface-strong: #31443a;
    --text: #252a26;
    --text-soft: #626a64;
    --line: #d8d5cd;
    --line-strong: #bdbab1;
    --accent: #315f4b;
    --accent-hover: #264b3b;
    --accent-soft: #e2ece6;
    --success: #2f6a4e;
    --danger: #a13f3f;
    --danger-soft: #f6e7e5;
    --warning: #8b641f;
    --radius-sm: 8px;
    --radius-md: 10px;
    --sidebar-width: 248px;
    --mobile-nav-height: 66px;
    color-scheme: light;
    font-family: "Avenir Next", "Bahnschrift", "Aptos", sans-serif;
    font-size: 16px;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { min-width: 320px; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.025em; font-weight: 650; }
h2 { margin-bottom: 0; font-size: 1.06rem; line-height: 1.35; font-weight: 650; }
h3 { margin-bottom: 0; font-size: 1rem; font-weight: 650; }
p { line-height: 1.55; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.icon { width: 19px; height: 19px; flex: 0 0 auto; }
.app-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px 18px; background: #eeebe4; border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 650; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--surface-strong); color: #fffdfa; font-size: .88rem; letter-spacing: -.04em; }
.brand-name { font-size: 1.02rem; }
.sidebar .brand { padding: 0 10px; }
.sidebar-nav { display: grid; gap: 3px; margin-top: 38px; }
.nav-item { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 11px; border-radius: var(--radius-sm); color: #535b55; font-size: .91rem; }
.nav-item:hover { background: #e4e1da; color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.sidebar-account { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.account-copy { min-width: 0; display: grid; gap: 3px; flex: 1; }
.account-copy { color: var(--text); }
.account-copy:hover { color: var(--accent); }
.account-copy strong, .account-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: .84rem; }
.account-copy span { color: var(--text-soft); font-size: .73rem; }
.app-main { min-width: 0; }
.page { width: min(1180px, 100%); margin: 0 auto; padding: 38px 42px 72px; }
.mobile-header, .mobile-nav { display: none; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer; font-size: .9rem; font-weight: 620; line-height: 1.2; white-space: nowrap; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); color: #fff; }
.button-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.button-secondary:hover { background: var(--surface-muted); color: var(--text); }
.button-quiet { color: var(--text-soft); }
.button-quiet:hover { background: var(--surface-muted); color: var(--text); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #853434; color: #fff; }
.button-light { background: #f7f5f0; color: #1f2a24; }
.button-light:hover { background: #e8e5de; color: #1f2a24; }
.button-compact { min-height: 36px; padding: 7px 11px; font-size: .82rem; }
.button-block { width: 100%; }
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .mobile-nav a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(49, 95, 75, .24); outline-offset: 2px; }
.button:disabled { background: #a9aea9; cursor: not-allowed; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-soft); cursor: pointer; }
.icon-button:hover { background: var(--surface-muted); color: var(--text); }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-header p { max-width: 680px; margin-bottom: 0; color: var(--text-soft); font-size: .91rem; }
.compact-header { align-items: flex-start; margin: 14px 0 22px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: .86rem; }
.back-link:hover { color: var(--text); }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #b9d2c3; border-radius: var(--radius-sm); background: #e9f2ec; color: #244f3b; font-size: .88rem; }
.message.error { border-color: #dbb9b6; background: var(--danger-soft); color: #7b3131; }

.next-lesson { min-height: 142px; display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; align-items: center; gap: 26px; padding: 22px 24px; border: 1px solid #bccbc2; border-left: 4px solid var(--accent); border-radius: var(--radius-md); background: var(--surface); }
.next-lesson-time { display: grid; gap: 3px; align-content: center; padding-right: 24px; border-right: 1px solid var(--line); }
.next-lesson-time strong { font-size: 1.8rem; font-weight: 620; letter-spacing: -.03em; }
.next-lesson-time span { color: var(--text-soft); font-size: .78rem; }
.next-lesson-main h2 { margin: 5px 0 3px; font-size: 1.35rem; }
.next-lesson-main p { margin-bottom: 0; color: var(--text-soft); font-size: .9rem; }
.next-lesson-actions { display: grid; justify-items: stretch; gap: 5px; }
.next-lesson-actions .button { width: 100%; }
.status-line { min-height: 20px; }
.status { display: inline-flex; align-items: center; color: var(--text-soft); font-size: .76rem; }
.status-live, .status-in_progress { color: var(--success); font-weight: 650; }
.status-cancelled, .status-student_no_show { color: var(--danger); }
.status-held, .status-held_externally { color: var(--success); }

.today-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 32px; margin-top: 32px; }
.content-section, .aside-section { min-width: 0; }
.section-heading { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-heading a { font-size: .82rem; }
.section-empty { margin: 0; padding: 14px 0; color: var(--text-soft); font-size: .86rem; }
.timeline-list { border-top: 1px solid var(--line); }
.timeline-row { min-height: 72px; display: grid; grid-template-columns: 56px 12px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.timeline-row time { color: var(--text-soft); font-size: .85rem; font-variant-numeric: tabular-nums; }
.timeline-marker { width: 8px; height: 8px; border: 2px solid var(--accent); border-radius: 50%; background: var(--canvas); }
.timeline-copy { min-width: 0; display: grid; gap: 4px; }
.timeline-copy strong, .timeline-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-copy strong { font-size: .9rem; }
.timeline-copy span { color: var(--text-soft); font-size: .79rem; }
.today-aside, .detail-aside { display: grid; align-content: start; gap: 26px; }
.aside-section { padding-left: 20px; border-left: 1px solid var(--line); }
.action-row { min-height: 56px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 18px; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); color: var(--text); }
.action-row:hover { color: var(--accent); }
.action-row > span { min-width: 0; display: grid; gap: 3px; }
.action-row strong, .action-row span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-row strong { font-size: .84rem; }
.action-row span span { color: var(--text-soft); font-size: .75rem; }
.action-row-static { grid-template-columns: 20px minmax(0, 1fr); }
.chevron { width: 16px; height: 16px; color: #929791; }
.balance-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: .82rem; }
.balance-row strong { white-space: nowrap; }
.amount-negative { color: var(--danger) !important; }
.amount-positive { color: var(--success) !important; }

.list-surface, .form-surface { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.schedule-row { min-height: 82px; display: grid; grid-template-columns: 66px 78px minmax(180px, 1fr) auto auto; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.schedule-row:last-child { border-bottom: 0; }
.schedule-date, .schedule-time, .schedule-person { min-width: 0; display: grid; gap: 3px; }
.schedule-date strong { font-size: 1.12rem; }
.schedule-date span, .schedule-time span, .schedule-person span { color: var(--text-soft); font-size: .76rem; }
.schedule-time strong { font-variant-numeric: tabular-nums; }
.schedule-person strong, .schedule-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-actions, .header-actions { display: flex; align-items: center; gap: 8px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 170px auto; gap: 10px; max-width: 720px; margin: -5px 0 20px; }
.filter-bar .button { min-height: 44px; }

.student-row { min-height: 86px; display: grid; grid-template-columns: minmax(210px, .9fr) minmax(220px, 1.1fr) minmax(110px, auto) 18px; align-items: center; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text); }
.student-row:last-child { border-bottom: 0; }
.student-row:hover { background: #faf8f3; color: var(--text); }
.student-row.is-muted { opacity: .55; }
.student-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.student-identity > div { min-width: 0; display: grid; gap: 3px; }
.student-identity strong, .student-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-identity span { color: var(--text-soft); font-size: .76rem; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #e5e9df; color: #40563d; font-weight: 650; }
.avatar-large { width: 56px; height: 56px; font-size: 1.12rem; }
.track-summary { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px 12px; }
.track-summary span { color: var(--text-soft); font-size: .82rem; }
.balance-summary { display: grid; justify-items: end; gap: 3px; font-size: .82rem; font-variant-numeric: tabular-nums; }

.student-page-header { align-items: center; margin-top: 14px; }
.student-header-identity { display: flex; align-items: center; gap: 15px; }
.student-header-identity > div { min-width: 0; }
.student-header-identity p { margin: 0; }
.detail-layout, .finance-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .7fr); gap: 34px; }
.track-list, .ledger-list { border-top: 1px solid var(--line); }
.track-row { min-height: 78px; display: grid; grid-template-columns: minmax(160px, 1fr) minmax(150px, .8fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.track-copy, .track-money { min-width: 0; display: grid; gap: 4px; }
.track-copy span, .track-money span { color: var(--text-soft); font-size: .78rem; }
.track-money strong, .track-money span { text-align: right; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.upcoming-row { min-height: 49px; display: grid; gap: 3px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.upcoming-row time { font-size: .82rem; }
.upcoming-row span { color: var(--text-soft); font-size: .75rem; }
.access-list { margin: 0; }
.access-list > div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.access-list dt { color: var(--text-soft); font-size: .79rem; }
.access-list dd { margin: 0; font-size: .79rem; }
.homework-heading { margin-top: 30px; }
.homework-compact-list { border-top: 1px solid var(--line); }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.invite-link-row { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.invite-link-row span { color: var(--text-soft); font-size: .73rem; }
.invite-link-row .button { justify-self: start; }

.attachment-list, .resource-list { display: grid; gap: 7px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.attachment-list strong { font-size: .78rem; }
.attachment-list a, .resource-list a, .review-block a, .feedback-box a { overflow-wrap: anywhere; font-size: .78rem; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 28px; align-items: start; }
.review-materials { display: grid; gap: 12px; }
.review-block { display: grid; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.review-answer { border-left: 3px solid var(--accent); }
.review-block p { margin: 0; }
.review-form { position: sticky; top: 22px; }
.eyebrow { color: var(--text-soft); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.preserve-lines { white-space: pre-line; }

.participant-layout { grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); }
.participant-next-lesson { grid-template-columns: 90px minmax(0, 1fr) auto; }
.participant-note { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.participant-note strong { font-size: .8rem; }
.participant-note p { margin: 0; color: var(--text-soft); font-size: .78rem; line-height: 1.5; }
.homework-list-row { min-height: 74px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--text); }
.homework-list-row:last-child { border-bottom: 0; }
.homework-list-row > div { min-width: 0; display: grid; gap: 4px; }
.homework-list-row strong, .homework-list-row div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.homework-list-row div span { color: var(--text-soft); font-size: .76rem; }
.homework-detail-layout { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(360px, 1.25fr); gap: 28px; align-items: start; }
.assignment-sheet { min-height: 250px; display: grid; align-content: start; gap: 16px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fbf8f1; }
.assignment-sheet > p { margin: 0; font-size: .92rem; line-height: 1.7; }
.homework-submit-form { padding: 22px; }
.feedback-box { display: grid; gap: 10px; margin-bottom: 14px; padding: 18px; border-left: 3px solid var(--accent); background: #eef1eb; }
.feedback-box p { margin: 0; font-size: .84rem; }
.accepted-box { display: flex; gap: 14px; padding: 22px; border: 1px solid #b9c8ba; border-radius: var(--radius-md); background: #eef1eb; }
.accepted-box .icon { width: 24px; height: 24px; color: var(--accent); }
.accepted-box p { margin: 4px 0 0; color: var(--text-soft); font-size: .8rem; }
.parent-card-list { display: grid; gap: 18px; }
.parent-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.parent-card .section-heading > span { color: var(--text-soft); font-size: .75rem; }
.parent-card-section { margin-top: 24px; }
.parent-card-section h3 { margin-bottom: 8px; font-size: .78rem; }
.invite-join-content { width: min(880px, calc(100% - 40px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .85fr); gap: 56px; align-items: center; margin: 0 auto; padding: 80px 0; }
.invite-join-copy h1 { max-width: 520px; margin: 10px 0 14px; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.08; }
.invite-join-copy p { max-width: 520px; margin: 0; color: var(--text-soft); }
.invite-join-form .timezone-preview { grid-column: auto; margin: 0; }
.profile-timezone-preview { grid-column: auto; margin: 0; }
.reminders-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 32px; align-items: start; }
.reminder-form { position: sticky; top: 22px; }
.reminder-list { border-top: 1px solid var(--line); }
.reminder-row { min-height: 78px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.reminder-row > div { min-width: 0; display: grid; gap: 4px; }
.reminder-row > div span { color: var(--text-soft); font-size: .76rem; }
.reminder-actions { display: flex; gap: 6px; }

.form-surface { padding: 24px; }
.narrow-form { max-width: 720px; }
.form-grid { display: grid; gap: 20px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.form-field label { font-size: .82rem; font-weight: 620; }
.form-control { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); }
textarea.form-control { min-height: 92px; resize: vertical; }
.form-control:hover { border-color: #9e9c95; }
.form-control:focus { border-color: var(--accent); outline: 3px solid rgba(49, 95, 75, .15); }
.field-help, .field-error { font-size: .75rem; line-height: 1.4; }
.field-help { color: var(--text-soft); }
.field-error { color: var(--danger); }
.has-error .form-control { border-color: var(--danger); }
.form-check-input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.checkbox-field { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 3px 9px; margin-top: 20px; }
.checkbox-field label { font-size: .84rem; font-weight: 620; }
.checkbox-field p { grid-column: 2; margin: 0; color: var(--text-soft); font-size: .76rem; }
.form-alert { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #dbb9b6; border-radius: var(--radius-sm); background: var(--danger-soft); color: #7b3131; font-size: .82rem; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-actions-right { justify-content: flex-end; }
.form-note { margin: 16px 0 0; color: var(--text-soft); font-size: .76rem; }

.completion-header { align-items: flex-end; }
.completion-time { color: var(--text-soft); font-size: .76rem; }
.completion-form { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.completion-section { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; padding: 25px; border-bottom: 1px solid var(--line); }
.completion-section-heading { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px; }
.completion-section-heading > span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text-soft); font-size: .73rem; }
.completion-section-heading h2 { margin-top: 2px; }
.completion-section-heading p { margin: 5px 0 0; color: var(--text-soft); font-size: .75rem; }
.completion-fields { display: grid; gap: 17px; }
.audience-fieldset { margin: 0; padding: 0; border: 0; }
.audience-fieldset legend { margin-bottom: 9px; font-size: .82rem; font-weight: 620; }
.audience-options { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.audience-options > div > label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: .8rem; }
.audience-options input { width: 17px; height: 17px; accent-color: var(--accent); }
.completion-summary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.charge-checkbox { margin: 0; }
.next-lesson-summary { display: grid; gap: 4px; padding-left: 22px; border-left: 1px solid var(--line); }
.next-lesson-summary span { color: var(--text-soft); font-size: .73rem; }
.next-lesson-summary strong { font-size: .87rem; }
.completion-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 25px; }

.schedule-rule-form { max-width: 1040px; }
.schedule-rule-intro { display: grid; gap: 4px; margin-bottom: 18px; padding: 15px 18px; border-left: 3px solid var(--accent); background: #eef1eb; }
.schedule-rule-intro strong { font-size: .85rem; }
.schedule-rule-intro span { color: var(--text-soft); font-size: .76rem; }
.schedule-rule-list { display: grid; gap: 12px; }
.schedule-rule-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.schedule-rule-number { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text-soft); font-size: .78rem; }
.schedule-rule-fields { display: grid; grid-template-columns: 1fr 120px minmax(180px, 1.2fr) 100px; gap: 16px; }
.schedule-rule-fields .form-alert { grid-column: 1 / -1; }
.delete-rule-field { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 44px; color: var(--text-soft); font-size: .76rem; }
.delete-rule-field input { width: 17px; height: 17px; accent-color: var(--danger); }

.balance-strip { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.balance-strip > div { min-width: 150px; display: grid; gap: 4px; padding: 16px 20px; border-right: 1px solid var(--line); }
.balance-strip > div:last-child { border-right: 0; }
.balance-strip span { color: var(--text-soft); font-size: .75rem; }
.balance-strip strong { font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.ledger-row { min-height: 70px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.ledger-date, .ledger-copy { min-width: 0; display: grid; gap: 3px; }
.ledger-date strong, .ledger-date span { font-size: .76rem; }
.ledger-date span, .ledger-copy span { color: var(--text-soft); }
.ledger-copy strong { font-size: .84rem; }
.ledger-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.ledger-amount { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance-row-link { color: var(--text); }
.balance-row-link:hover { color: var(--accent); }
.balance-row-link > span { display: grid; gap: 2px; }
.balance-row-link > span span { color: var(--text-soft); font-size: .73rem; }
.aside-note { margin: -8px 0 0 20px; color: var(--text-soft); font-size: .76rem; }

.empty-state { min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 28px; color: var(--text-soft); text-align: left; }
.empty-state-primary { min-height: 142px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: rgba(255, 253, 250, .6); }
.empty-state h2 { margin-bottom: 5px; color: var(--text); }
.empty-state p { max-width: 520px; margin-bottom: 0; font-size: .86rem; }
.empty-icon { width: 34px; height: 34px; color: var(--accent); }

.video-stage { min-height: 520px; display: grid; grid-template-rows: 1fr auto; border-radius: var(--radius-md); background: #1d2521; color: #f7f5f0; overflow: hidden; }
.video-status { width: 100%; min-width: 0; max-width: 580px; display: grid; justify-items: start; align-self: center; gap: 10px; padding: 42px; }
.video-status-icon { width: 42px; height: 42px; margin-bottom: 8px; color: #b9c9be; }
.video-status h2 { font-size: 1.32rem; }
.video-status p { margin-bottom: 12px; color: #c2cac5; font-size: .9rem; }
.video-footer { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; border-top: 1px solid #38413c; color: #aeb8b1; font-size: .75rem; }
.room-help { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.room-help h2 { margin-bottom: 4px; }
.room-help p { margin-bottom: 0; color: var(--text-soft); font-size: .82rem; }
.room-help a { white-space: nowrap; font-size: .84rem; }

.standalone-page { min-height: 100vh; }
.auth-body { background: #e9e6df; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .92fr) minmax(420px, 1.08fr); }
.auth-intro { min-height: 100vh; display: flex; flex-direction: column; padding: 42px clamp(32px, 6vw, 84px); background: var(--surface-strong); color: #f9f7f2; }
.brand-inverse { color: #fff; }
.brand-inverse:hover { color: #fff; }
.brand-inverse .brand-mark { background: #f8f5ef; color: var(--surface-strong); }
.auth-intro-copy { max-width: 560px; margin: auto 0 52px; }
.auth-intro-copy h1 { max-width: 520px; margin-bottom: 16px; font-size: clamp(2.1rem, 4vw, 3.25rem); line-height: 1.08; }
.auth-intro-copy p { max-width: 530px; margin-bottom: 0; color: #d2d9d4; font-size: 1rem; }
.auth-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #dbe1dd; font-size: .85rem; }
.auth-form-panel { width: min(460px, calc(100% - 48px)); display: flex; flex-direction: column; justify-content: center; align-self: center; justify-self: center; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 2px 8px rgba(49, 44, 35, .08); }
.auth-form-copy h2 { margin-bottom: 8px; font-size: 1.42rem; }
.auth-form-copy p { margin-bottom: 24px; color: var(--text-soft); font-size: .86rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 8px; color: var(--text-soft); font-size: .72rem; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.privacy-note { margin: 20px 0 0; color: var(--text-soft); font-size: .72rem; text-align: center; }

.onboarding-body { background: var(--canvas); }
.onboarding-shell { min-height: 100vh; }
.onboarding-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 980px) / 2)); border-bottom: 1px solid var(--line); }
.onboarding-header > span { color: var(--text-soft); font-size: .78rem; }
.onboarding-content { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 80px; }
.onboarding-copy { max-width: 650px; margin-bottom: 28px; }
.onboarding-copy p { margin-bottom: 0; color: var(--text-soft); }
.onboarding-form { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.form-section { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; padding: 26px; border-bottom: 1px solid var(--line); }
.form-section-heading p { margin: 5px 0 0; color: var(--text-soft); font-size: .76rem; }
.timezone-preview { grid-column: 2; margin: -6px 0 0; color: var(--text-soft); font-size: .76rem; }
.onboarding-form > .form-actions { justify-content: flex-end; margin: 0; padding: 20px 26px; border-top: 0; }
.onboarding-form > .form-actions span { color: var(--text-soft); font-size: .75rem; }

/* Lesson-centred launch flow */
.view-tabs { display: flex; gap: 22px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.view-tabs a { padding: 0 1px 11px; color: var(--text-soft); font-size: .84rem; }
.view-tabs a[aria-current="page"] { margin-bottom: -1px; border-bottom: 2px solid var(--accent); color: var(--text); font-weight: 620; }
.schedule-days { display: grid; gap: 30px; }
.schedule-day-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.schedule-day-header h2 { font-size: 1rem; text-transform: capitalize; }
.schedule-day-header span { color: var(--text-soft); font-size: .72rem; }
.schedule-row { min-height: 82px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.schedule-row-main { min-width: 0; flex: 1; display: grid; grid-template-columns: 78px minmax(180px, 1fr) auto 18px; align-items: center; gap: 18px; color: var(--text); }
.schedule-row-main:hover { color: var(--text); }
.schedule-row-main .chevron { color: var(--text-soft); }
.schedule-actions { flex: 0 0 auto; }
.timeline-row { grid-template-columns: 56px 12px minmax(0, 1fr) auto 36px; }
.timeline-copy a { color: var(--text); }
.student-row { grid-template-columns: minmax(210px, .9fr) minmax(220px, 1.1fr) 18px; }
.track-row { grid-template-columns: minmax(160px, 1fr) auto; }
.upcoming-row { grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; color: var(--text); }
.upcoming-row:hover { color: var(--text); }
.upcoming-row time { grid-column: 1; }
.upcoming-row span { grid-column: 1; }
.upcoming-row .icon { grid-column: 3; grid-row: 1 / 3; color: var(--text-soft); }

.lesson-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.lesson-detail-header > div { min-width: 0; }
.lesson-detail-header h1 { margin: 10px 0 5px; font-size: clamp(1.8rem, 3vw, 2.55rem); }
.lesson-student-link { max-width: 100%; display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; font-size: .9rem; }
.lesson-student-link .icon { width: 15px; height: 15px; }
.lesson-primary-actions { display: flex; align-items: center; gap: 8px; }
.lesson-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 42px; }
.lesson-detail-main { min-width: 0; display: grid; gap: 38px; }
.lesson-overview, .lesson-section { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.lesson-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0 0; }
.lesson-facts div { min-width: 0; display: grid; gap: 6px; padding: 0 18px; border-left: 1px solid var(--line); }
.lesson-facts div:first-child { padding-left: 0; border-left: 0; }
.lesson-facts dt { color: var(--text-soft); font-size: .7rem; }
.lesson-facts dd { margin: 0; overflow-wrap: anywhere; font-size: .88rem; font-weight: 580; }
.fallback-link-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding: 15px 0 0; border-top: 1px solid var(--line); }
.fallback-link-row > div { display: grid; gap: 3px; }
.fallback-link-row span { color: var(--text-soft); font-size: .74rem; }
.consent-statuses { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0 16px; border-block: 1px solid var(--line); }
.consent-statuses div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; }
.consent-statuses div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.consent-statuses span { color: var(--text-soft); font-size: .77rem; }
.consent-statuses strong { font-size: .8rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recording-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.recording-row > div { display: grid; gap: 3px; }
.recording-row span { color: var(--text-soft); font-size: .74rem; }
.lesson-detail-aside { display: grid; align-content: start; gap: 28px; }
.lesson-note { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lesson-note p { margin: 0 0 5px; font-size: .82rem; }
.lesson-note span, .danger-zone p { color: var(--text-soft); font-size: .72rem; }
.danger-zone { border-top: 1px solid var(--line); }
.danger-zone h2 { margin-bottom: 6px; }
.completion-next-lesson { margin: 20px 24px; padding: 16px 0 0; border-top: 1px solid var(--line); border-left: 0; }
.completion-next-lesson a { font-weight: 620; }

.room-body { overflow: hidden; }
.room-body .app-layout, .room-body .app-main { height: 100vh; height: 100dvh; min-height: 0; }
.room-body .app-main { display: flex; flex-direction: column; overflow: hidden; }
.room-body .page { width: 100%; max-width: none; min-height: 0; display: flex; flex: 1; flex-direction: column; padding: 24px 28px 28px; }
.room-body .room-header { min-height: 60px; align-items: center; margin-bottom: 16px; }
.room-body .room-header h1 { max-width: 56vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-body .video-stage.has-embed { min-height: 0; height: auto; flex: 1; }
.room-body .room-help { display: none; }
.video-stage.has-embed { min-height: 520px; height: calc(100vh - 132px); height: calc(100dvh - 132px); background: #0f1714; }
.zoom-room { width: 100%; min-height: 0; height: 100%; background: #0f1714; }
.zoom-room > * { max-width: 100%; }
.zoom-room-loading { min-height: inherit; height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; color: #fff; }
.zoom-room-loading p { margin: 0; color: #d5ddd9; font-size: .82rem; }
.zoom-room-loader { width: 26px; height: 26px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: room-spin .8s linear infinite; }
.zoom-room-error { min-height: inherit; }
@keyframes room-spin { to { transform: rotate(360deg); } }
.test-mode-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding: 8px 32px; border-bottom: 1px solid #ded7c8; background: #fff8df; color: #5f5128; font-size: .72rem; }
.test-mode-strip a { color: inherit; font-weight: 650; }
.test-mode-strip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.test-login-layout { width: min(100% - 32px, 560px); margin: 0 auto; padding: 48px 0; }
.test-login-layout > .brand { display: inline-flex; margin-bottom: 32px; }
.test-login-panel { padding-top: 24px; border-top: 1px solid var(--line); }
.test-login-panel h1 { margin: 0 0 8px; font-size: 1.7rem; }
.test-account-list { display: grid; margin-top: 24px; border-top: 1px solid var(--line); }
.test-account-list form { border-bottom: 1px solid var(--line); }
.test-account-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.test-account-button > span:first-child { display: grid; gap: 3px; }
.test-account-button strong { font-size: .86rem; }
.test-account-button small { color: var(--text-soft); font-size: .72rem; }
.auth-fields { display: grid; gap: 10px; margin-top: 24px; }
.auth-fields label { color: var(--text-soft); font-size: .72rem; font-weight: 650; }
.auth-fields input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); }
.auth-fields .button { margin-top: 4px; }
.eyebrow-link { display: inline-block; margin-bottom: 5px; font-size: .74rem; }
.recording-header { margin-bottom: 22px; }
.recording-header h1 { margin: 7px 0 4px; }
.recording-header p { margin: 0; color: var(--text-soft); }
.recording-stage { height: min(760px, calc(100vh - 220px)); border-radius: var(--radius-md); background: #0f1714; overflow: hidden; }
.recording-frame { width: 100%; height: 100%; border: 0; }
.recording-state { min-height: 360px; display: grid; place-content: center; justify-items: center; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-md); text-align: center; }
.recording-state p { margin: 5px 0 0; color: var(--text-soft); }

.attachment-preview-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.attachment-preview-section h2 { margin-bottom: 12px; font-size: .86rem; }
.attachment-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.attachment-preview { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.attachment-preview-media { height: 118px; display: grid; place-items: center; background: #f0eee8; overflow: hidden; }
.attachment-preview-media img { width: 100%; height: 118px; display: block; object-fit: cover; }
.file-preview-icon { display: grid; justify-items: center; gap: 7px; color: var(--text-soft); }
.file-preview-icon .icon { width: 30px; height: 30px; }
.file-preview-icon small { font-size: .64rem; text-transform: uppercase; }
.attachment-preview-footer { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; background: var(--surface); }
.attachment-preview-footer > a { overflow: hidden; color: var(--text); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.icon-button-danger { color: #9b4439; }
.attachment-delete-button { padding: 3px 0; border: 0; background: transparent; color: #9b4439; font: inherit; font-size: .68rem; cursor: pointer; }
.attachment-delete-button:hover { color: #71322a; text-decoration: underline; }
.settings-group { display: grid; gap: 14px; margin-top: 22px; padding: 18px 0 0; border: 0; border-top: 1px solid var(--line); }
.settings-group legend { padding: 0 0 10px; font-size: .82rem; font-weight: 620; }

@media (max-width: 1020px) and (min-width: 761px) {
    :root { --sidebar-width: 80px; }
    .sidebar { padding-inline: 12px; }
    .sidebar .brand { padding-inline: 10px; }
    .sidebar .brand-name, .nav-item span, .account-copy { display: none; }
    .sidebar-nav { justify-items: center; }
    .nav-item { width: 46px; justify-content: center; padding: 0; }
    .sidebar-account { justify-content: center; padding-inline: 0; }
    .page { padding-inline: 30px; }
    .today-layout, .detail-layout, .finance-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
    .schedule-row { align-items: stretch; flex-direction: column; }
    .schedule-row-main { grid-template-columns: 70px minmax(160px, 1fr) auto 18px; }
    .schedule-actions { align-self: flex-end; }
    .student-row { grid-template-columns: minmax(200px, 1fr) minmax(180px, .8fr) 18px; }
}

@media (max-width: 760px) {
    :root { font-size: 15px; }
    .app-layout { display: block; min-height: 100vh; }
    .sidebar { display: none; }
    .mobile-header { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(244, 241, 234, .96); }
    .mobile-timezone { max-width: 46%; overflow: hidden; color: var(--text-soft); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
    .page { width: 100%; padding: 24px 16px calc(var(--mobile-nav-height) + 30px); }
    .mobile-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; min-height: var(--mobile-nav-height); display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: #fbf9f4; }
    .mobile-nav a { min-width: 0; display: grid; justify-items: center; align-content: center; gap: 4px; color: #747b75; font-size: .66rem; }
    .mobile-nav a.active { color: var(--accent); }
    .mobile-nav .icon { width: 20px; height: 20px; }
    .page-header { align-items: center; gap: 14px; margin-bottom: 20px; }
    .page-header p { font-size: .8rem; }
    .page-header .button { min-height: 39px; padding-inline: 11px; }
    .page-header .button .icon { display: none; }
    .compact-header { align-items: flex-start; }
    .next-lesson { min-height: 0; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 17px; }
    .next-lesson-time { padding-right: 13px; }
    .next-lesson-time strong { font-size: 1.4rem; }
    .next-lesson-main h2 { font-size: 1.14rem; }
    .next-lesson form { grid-column: 1 / -1; }
    .next-lesson form .button { width: 100%; }
    .next-lesson-actions { grid-column: 1 / -1; }
    .next-lesson-actions form { grid-column: auto; }
    .today-layout, .detail-layout, .finance-layout { grid-template-columns: 1fr; gap: 28px; margin-top: 27px; }
    .aside-section { padding-left: 0; border-left: 0; }
    .timeline-row { grid-template-columns: 48px 10px minmax(0, 1fr) 34px; }
    .timeline-row > .status { grid-column: 3; padding-bottom: 10px; }
    .timeline-row > .icon-button { grid-column: 4; grid-row: 1 / 3; }
    .schedule-surface, .student-list { border-right: 0; border-left: 0; border-radius: 0; margin-right: -16px; margin-left: -16px; }
    .schedule-row { align-items: stretch; flex-direction: column; gap: 8px; padding: 12px 16px; }
    .schedule-row-main { grid-template-columns: 58px minmax(0, 1fr) 18px; gap: 10px; }
    .schedule-row-main > .status { grid-column: 2; justify-self: start; }
    .schedule-row-main > .chevron { grid-column: 3; grid-row: 1 / 3; }
    .schedule-actions { align-self: flex-end; }
    .filter-bar { grid-template-columns: 1fr 120px; }
    .filter-bar .search-field { grid-column: 1 / -1; }
    .filter-bar .button { width: 100%; }
    .student-page-header { align-items: flex-start; }
    .header-actions { flex: 0 0 auto; flex-direction: column-reverse; align-items: stretch; }
    .student-row { grid-template-columns: minmax(0, 1fr) 16px; gap: 12px; padding: 15px 16px; }
    .student-identity { grid-column: 1; }
    .track-summary { grid-column: 1; padding-left: 54px; }
    .balance-summary { grid-column: 1; justify-items: start; padding-left: 54px; }
    .student-row > .chevron { grid-column: 2; grid-row: 1 / 4; }
    .student-page-header { align-items: center; }
    .student-header-identity { min-width: 0; flex: 1; }
    .student-page-header > .button { flex: 0 0 auto; }
    .student-header-identity h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .track-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 0; }
    .row-actions { grid-column: 2; grid-row: 1 / 3; flex-direction: column; align-items: flex-end; }
    .form-surface { padding: 18px; }
    .form-grid.two-columns { grid-template-columns: 1fr; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .completion-header { align-items: flex-start; }
    .completion-time { display: none; }
    .completion-section { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; }
    .completion-summary { grid-template-columns: 1fr; }
    .next-lesson-summary { padding: 15px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .completion-actions { align-items: stretch; flex-direction: column-reverse; padding: 18px; }
    .completion-actions .button { width: 100%; }
    .schedule-rule-card { grid-template-columns: 1fr; padding: 18px; }
    .schedule-rule-fields { grid-template-columns: 1fr 1fr; }
    .schedule-rule-fields .form-field:nth-of-type(3), .schedule-rule-fields .form-field:nth-of-type(5) { grid-column: 1 / -1; }
    .delete-rule-field { grid-column: 1 / -1; }
    .review-layout, .homework-detail-layout, .participant-layout { grid-template-columns: 1fr; }
    .review-form { position: static; }
    .participant-next-lesson { grid-template-columns: 70px minmax(0, 1fr); }
    .participant-next-lesson form { grid-column: 1 / -1; }
    .participant-next-lesson .button { width: 100%; }
    .homework-list-row { grid-template-columns: minmax(0, 1fr) 18px; gap: 10px; padding: 14px 16px; }
    .homework-list-row .status { grid-column: 1; justify-self: start; }
    .homework-list-row .chevron { grid-column: 2; grid-row: 1 / 3; }
    .homework-detail-layout { margin-right: -16px; margin-left: -16px; gap: 14px; }
    .assignment-sheet, .homework-submit-form { border-right: 0; border-left: 0; border-radius: 0; }
    .invite-join-content { width: min(100% - 28px, 600px); grid-template-columns: 1fr; gap: 26px; padding: 42px 0; }
    .invite-join-copy h1 { font-size: 2rem; }
    .reminders-layout { grid-template-columns: 1fr; }
    .reminder-form { position: static; grid-row: 1; }
    .reminder-row { grid-template-columns: 1fr; padding: 14px 0; }
    .reminder-actions { flex-wrap: wrap; }
    .balance-strip { margin-right: -16px; margin-left: -16px; border-right: 0; border-left: 0; border-radius: 0; overflow-x: auto; flex-wrap: nowrap; }
    .ledger-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 9px; padding: 10px 0; }
    .ledger-amount { grid-column: 2; }
    .ledger-row form { grid-column: 3; grid-row: 1 / 3; }
    .empty-state { min-height: 220px; align-items: flex-start; flex-direction: column; padding: 24px 18px; }
    .empty-state .button { width: 100%; }
    .video-stage { min-height: 430px; margin-right: -16px; margin-left: -16px; border-radius: 0; }
    .video-stage.has-embed, .zoom-room { min-height: 0; }
    .recording-stage { height: calc(100vh - 180px); min-height: 560px; margin-right: -16px; margin-left: -16px; border-radius: 0; }
    .video-status { padding: 28px 20px; }
    .video-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding-block: 10px; }
    .room-help { align-items: flex-start; flex-direction: column; }
    .room-header { align-items: stretch; flex-direction: column; }
    .room-header form, .room-header .button { width: 100%; }
    .room-body .app-layout, .room-body .app-main { min-height: 100vh; min-height: 100dvh; }
    .room-body .mobile-header, .room-body .mobile-nav, .room-body .test-mode-strip, .room-body .room-help { display: none; }
    .room-body .page { height: 100vh; height: 100dvh; padding: 0; overflow: hidden; }
    .room-body .room-header { min-height: 64px; height: 64px; align-items: center; flex-direction: row; gap: 10px; margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--canvas); }
    .room-body .room-header > div { min-width: 0; flex: 1; }
    .room-body .room-header .eyebrow-link { margin-bottom: 2px; font-size: .66rem; }
    .room-body .room-header h1 { max-width: none; margin: 0; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
    .room-body .room-header p { display: none; }
    .room-body .room-header form, .room-body .room-header .button { width: auto; }
    .room-body .room-header .button { min-height: 36px; padding: 7px 9px; font-size: .72rem; }
    .room-body .video-stage, .room-body .video-stage.has-embed { width: 100%; height: calc(100vh - 64px); height: calc(100dvh - 64px); min-height: 0; margin: 0; border-radius: 0; }
    .room-body .zoom-room { width: 100%; height: 100%; min-height: 0; }
    .test-mode-strip { padding-inline: 16px; font-size: .68rem; }
    .test-mode-strip a { flex: 0 0 auto; }
    .lesson-detail-header { align-items: stretch; flex-direction: column; }
    .lesson-detail-header h1 { font-size: 2rem; line-height: 1.08; overflow-wrap: anywhere; }
    .lesson-primary-actions { align-items: stretch; flex-direction: column; }
    .lesson-primary-actions .button { width: 100%; }
    .lesson-detail-layout { grid-template-columns: 1fr; gap: 32px; }
    .lesson-facts { grid-template-columns: 1fr 1fr; gap: 18px 0; }
    .lesson-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
    .fallback-link-row { align-items: stretch; flex-direction: column; }
    .consent-statuses { grid-template-columns: 1fr; }
    .consent-statuses div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
    .consent-actions { align-items: stretch; flex-direction: column; }
    .consent-actions .button { width: 100%; }
    .auth-layout { display: block; min-height: 100vh; padding: 28px 0; }
    .auth-intro { display: none; }
    .auth-form-panel { width: min(100% - 28px, 460px); min-height: calc(100vh - 56px); padding: 26px 22px; box-shadow: none; }
    .onboarding-header { min-height: 58px; padding: 0 16px; }
    .onboarding-header > span { display: none; }
    .onboarding-content { width: min(100% - 28px, 920px); padding: 30px 0 50px; }
    .onboarding-copy { margin-bottom: 20px; }
    .form-section { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; }
    .timezone-preview { grid-column: 1; }
    .onboarding-form > .form-actions { padding: 18px; }
    .onboarding-form > .form-actions span { text-align: center; }
    input, select, textarea { font-size: 16px; }
}

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