:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #ffffff;
    --canvas: #f6f8fb;
    --primary: #6c4de6;
    --primary-dark: #5235c4;
    --accent: #15a88a;
    --sunny: #ffbd2e;
    --sky: #46a7f2;
    --score-red: #d92d20;
    --score-orange: #c95f0b;
    --score-green: #11866e;
    --danger: #b42318;
    --shadow: 0 10px 30px rgba(23, 32, 51, .07);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f1effa;
    --muted: #aaa7b7;
    --line: #373949;
    --surface: #1b1d28;
    --canvas: #11131b;
    --primary: #a58cf4;
    --primary-dark: #8b72df;
    --accent: #5fd6b9;
    --score-red: #e65348;
    --score-orange: #df7a2b;
    --score-green: #35b895;
    --danger: #ff9b91;
    --shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 12%, rgba(108,77,230,.07), transparent 24%), radial-gradient(circle at 92% 28%, rgba(70,167,242,.08), transparent 25%), var(--canvas); line-height: 1.5; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header { background: color-mix(in srgb, var(--surface) 96%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav-wrap { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--primary), #9a82f4); box-shadow: 0 5px 12px rgba(108,77,230,.25); font-size: 1rem; }
nav { display: flex; align-items: center; gap: 22px; flex: 1; }
nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--primary); }
.nav-spacer { flex: 1; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap; }
.theme-toggle:hover { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.theme-icon { font-size: 1.05rem; }
.account { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.account form { margin: 0; }
.link-button { border: 0; background: none; color: var(--primary); padding: 0; cursor: pointer; font: inherit; font-weight: 650; }
.page-content { min-height: calc(100vh - 140px); padding-block: 42px 56px; }
.site-footer { color: var(--muted); font-size: .85rem; padding: 20px 0 28px; }
h1, h2 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; }
h2 { font-size: 1.35rem; }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.card, .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.hero-row, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.hero-row p:last-child, .page-heading p:last-child { margin-bottom: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.button:hover { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.button.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.small { min-height: 36px; padding: 6px 11px; font-size: .86rem; }
.button-row { display: flex; gap: 10px; margin-top: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { padding: 22px; display: grid; }
.stat-label { color: var(--muted); font-weight: 650; }
.stat-value { margin: 5px 0 -2px; font-size: 2.2rem; line-height: 1; }
.calendar-card { overflow: hidden; }
.calendar-heading { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 22px; border-bottom: 1px solid var(--line); }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; touch-action: manipulation; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.calendar-weekdays { background: color-mix(in srgb, var(--surface) 84%, var(--canvas)); border-bottom: 1px solid var(--line); }
.calendar-weekdays span { padding: 10px 12px; color: var(--muted); font-size: .78rem; font-weight: 750; text-align: center; text-transform: uppercase; }
.calendar-day { min-width: 0; min-height: 128px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 7px; text-decoration: none; background: var(--surface); transition: background .15s ease; }
.calendar-day:nth-child(5n) { border-right: 0; }
.calendar-day:hover { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.calendar-day.outside-month { background: color-mix(in srgb, var(--surface) 65%, var(--canvas)); color: var(--muted); }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.day-number { font-size: .8rem; font-weight: 750; }
.calendar-score { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: white; background: var(--primary); font-size: 1rem; }
.calendar-absence { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 10px; border-radius: 999px; color: #31526f; background: #e2f1fb; font-size: .76rem; }
.comment-preview { width: 100%; overflow: hidden; color: var(--muted); font-size: .75rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.no-score { color: var(--muted); font-size: .75rem; }
.score-0, .score-1, .score-2, .score-3, .score-4 { background: var(--score-red); }
.score-5, .score-6 { background: var(--score-orange); }
.score-7, .score-8, .score-9, .score-10 { background: var(--score-green); }
.form-card, .section-card { padding: 26px; }
.form-card { max-width: 680px; }
.form-card h2, .section-card h2 { margin-bottom: 20px; }
.form-stack { display: grid; gap: 8px; }
label { margin-top: 8px; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 11px 12px; font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(49,87,213,.14); border-color: var(--primary); }
textarea { resize: vertical; }
.slider-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }
.slider-heading label { margin: 0; }
.score-output { display: grid; place-items: center; min-width: 54px; min-height: 46px; padding: 5px 11px; border-radius: 12px; color: white; font-size: 1.35rem; font-weight: 850; }
.score-output.range-red { background: var(--score-red); }
.score-output.range-orange { background: var(--score-orange); }
.score-output.range-green { background: var(--score-green); }
.score-output.range-absent { background: #46708e; }
.score-slider { --thumb-colour: var(--score-orange); width: 100%; min-height: 48px; padding: 0; border: 0; background: transparent; cursor: pointer; appearance: none; -webkit-appearance: none; }
.score-slider.range-red { --thumb-colour: var(--score-red); }
.score-slider.range-orange { --thumb-colour: var(--score-orange); }
.score-slider.range-green { --thumb-colour: var(--score-green); }
.score-slider::-webkit-slider-runnable-track { height: 12px; border-radius: 999px; background: linear-gradient(to right, var(--score-red) 0 50%, var(--score-orange) 50% 70%, var(--score-green) 70% 100%); }
.score-slider::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -9px; border: 4px solid var(--surface); border-radius: 50%; background: var(--thumb-colour); box-shadow: 0 2px 8px rgba(23,32,51,.28); appearance: none; -webkit-appearance: none; }
.score-slider::-moz-range-track { height: 12px; border: 0; border-radius: 999px; background: linear-gradient(to right, var(--score-red) 0 50%, var(--score-orange) 50% 70%, var(--score-green) 70% 100%); }
.score-slider::-moz-range-thumb { width: 24px; height: 24px; border: 4px solid var(--surface); border-radius: 50%; background: var(--thumb-colour); box-shadow: 0 2px 8px rgba(23,32,51,.28); }
.score-slider:focus { outline: 3px solid rgba(108,77,230,.18); outline-offset: 3px; }
.slider-scale { display: grid; grid-template-columns: repeat(11, 1fr); margin-top: -4px; color: var(--muted); font-size: .8rem; }
.slider-scale span { justify-self: center; }
.slider-scale span:first-child { justify-self: start; }
.slider-scale span:last-child { justify-self: end; }
.score-key { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.score-key span { padding: 3px 8px; border-radius: 999px; color: white; font-weight: 750; }
.key-red { background: var(--score-red); }
.key-orange { background: var(--score-orange); }
.key-green { background: var(--score-green); }
.absence-option { display: flex; align-items: flex-start; gap: 12px; margin: 10px 0 8px; padding: 15px; border: 1px solid #cfdcf0; border-radius: 12px; background: #f5f9ff; }
.absence-option input { flex: 0 0 auto; width: 22px; min-height: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); }
.absence-option label { display: grid; gap: 2px; margin: 0; cursor: pointer; }
.absence-option label span { color: var(--muted); font-size: .84rem; font-weight: 450; }
.fields-disabled { opacity: .48; }
.field-help { margin: 0; color: var(--muted); font-size: .85rem; }
.validation { color: var(--danger); font-size: .86rem; }
.validation:empty { display: none; }
.audit-note { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 72%, var(--canvas)); color: var(--muted); font-size: .85rem; }
.auth-card { width: min(460px, 100%); margin: 5vh auto; padding: 32px; }
.auth-card .button { margin-top: 12px; }
.narrow-card { max-width: 620px; padding: 28px; }
.narrow-card p { margin-bottom: 24px; }
.alert { margin-bottom: 20px; padding: 13px 16px; border-radius: 10px; border: 1px solid; }
.alert.success { color: #05603a; background: #ecfdf3; border-color: #abefc6; }
.alert.error { color: #912018; background: #fef3f2; border-color: #fecdca; }
.admin-grid { display: grid; grid-template-columns: minmax(310px, .8fr) minmax(420px, 1.2fr); gap: 22px; align-items: start; }
.admin-grid .form-card { width: 100%; }
.user-list { display: grid; gap: 12px; }
.user-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.user-summary, .user-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-summary > div:first-child { display: grid; }
.badge-row, .user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { padding: 4px 9px; border-radius: 999px; background: #eef2ff; color: #3448a3; font-size: .74rem; font-weight: 750; }
.badge.enabled { color: #05603a; background: #dcfae6; }
.badge.disabled { color: #912018; background: #fee4e2; }
.user-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.user-actions form { margin: 0; }
.inline-reset { display: flex; gap: 8px; flex: 1; justify-content: flex-end; }
.inline-reset input { max-width: 220px; padding-block: 7px; }
.score-list { display: grid; gap: 10px; }
.score-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.score-row:last-child { border-bottom: 0; }
.score-pill { min-width: 74px; padding: 6px 10px; border-radius: 999px; color: white; text-align: center; font-weight: 800; }
.empty-state { color: var(--muted); margin-bottom: 0; }
.child-heading { position: relative; }
.child-heading h1 { color: #4b319f; font-size: clamp(2.35rem, 7vw, 4rem); }
.child-score-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 34px; margin-bottom: 24px; padding: 30px 36px; border: 0; color: #37276d; background: linear-gradient(125deg, #f0eaff 0%, #e5f5ff 55%, #fff4ce 100%); }
.child-score-hero::after { content: ""; position: absolute; right: -40px; bottom: -55px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.45); }
.sparkles { position: absolute; top: 18px; right: 28px; color: #8e70eb; letter-spacing: .5rem; font-size: 1.15rem; }
.average-orbit { position: relative; display: grid; place-items: center; width: 170px; height: 170px; border-radius: 50%; background: conic-gradient(var(--average-colour, #98a2b3) calc(var(--score-percent) * 1%), rgba(255,255,255,.65) 0); box-shadow: 0 14px 28px rgba(74,49,159,.15); }
.average-orbit.average-red { --average-colour: var(--score-red); }
.average-orbit.average-orange { --average-colour: var(--score-orange); }
.average-orbit.average-green { --average-colour: var(--score-green); }
.average-orbit.average-empty { --average-colour: #98a2b3; }
.average-orbit::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.average-centre { position: relative; display: grid; text-align: center; z-index: 1; }
.average-centre strong { font-size: 3rem; line-height: 1; }
.average-centre span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.child-score-copy { position: relative; z-index: 1; }
.child-score-copy h2 { font-size: clamp(1.55rem, 4vw, 2.3rem); color: #3c287e; }
.child-score-copy p:last-child { margin-bottom: 0; color: #5f5480; }
.child-history { border: 0; background: rgba(255,255,255,.92); }
.child-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.child-section-heading h2 { margin-bottom: 0; font-size: 1.6rem; color: #4b319f; }
.period-chip { padding: 6px 12px; border-radius: 999px; color: #4b319f; background: #eee9ff; font-size: .8rem; font-weight: 800; }
.child-score-row { justify-content: initial; min-height: 68px; padding-inline: 6px; }
.child-score-row time { flex: 1; font-size: 1rem; font-weight: 700; }
.day-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #6849d2; background: #f0ecff; font-size: 1.1rem; }
.child-score-row .score-pill { min-width: 88px; padding-block: 9px; font-size: .82rem; }
.child-score-row .score-pill strong { font-size: 1.15rem; }
.absent-icon { color: #31526f; background: #e2f1fb; font-size: .85rem; font-weight: 850; }
.absence-pill { min-width: 88px; padding: 9px 12px; border-radius: 999px; color: #31526f; background: #e2f1fb; text-align: center; font-size: .88rem; font-weight: 800; }
.absent-text { color: #46708e; font-size: 1.65rem; }
.history-filter-card { margin-bottom: 24px; padding: 20px; }
.history-filter-form { display: grid; grid-template-columns: minmax(140px, 190px) minmax(140px, 190px) 1fr; align-items: end; gap: 14px; }
.history-filter-form > .validation { grid-column: 1 / -1; }
.filter-field { display: grid; gap: 6px; }
.filter-field label { margin: 0; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.history-results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 28px 0 14px; }
.history-list { display: grid; gap: 12px; }
.history-entry { display: grid; grid-template-columns: minmax(190px, .7fr) 74px minmax(260px, 1.6fr); align-items: center; gap: 20px; padding: 18px 20px; }
.history-date { display: grid; gap: 4px; }
.history-date time { font-weight: 750; }
.history-updated { color: var(--muted); font-size: .78rem; }
.history-score { display: inline-flex; align-items: baseline; justify-content: center; gap: 2px; min-height: 54px; padding: 8px 10px; border-radius: 14px; color: #fff; }
.history-score strong { font-size: 1.45rem; }
.history-score small { font-weight: 700; }
.history-comment { min-width: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.history-comment > span { color: var(--muted); font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.history-comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-history { padding: 28px; text-align: center; }

.notification-stack { display: grid; gap: 14px; margin-bottom: 26px; }
.notification-card { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 19px; border-color: color-mix(in srgb, var(--primary) 36%, var(--line)); }
.notification-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: var(--primary); font-size: 1.25rem; font-weight: 900; }
.notification-content { min-width: 0; }
.notification-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.notification-heading h2 { font-size: 1.18rem; }
.notification-message { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notification-meta { margin: 0 0 10px; color: var(--muted); font-size: .84rem; }
.notification-reply { padding-top: 13px; border-top: 1px solid var(--line); }
.notification-reply > label { display: block; margin: 0 0 7px; font-size: .86rem; }
.reply-compose { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.reply-compose textarea { min-height: 72px; }

.report-upload-card { margin-bottom: 26px; }
.report-list { display: grid; gap: 12px; }
.report-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 17px 19px; }
.report-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); font-size: 1.25rem; }
.report-info { min-width: 0; display: grid; gap: 3px; }
.report-info strong { overflow-wrap: anywhere; }
.report-info span { font-size: .84rem; }

.notes-admin-grid { display: grid; grid-template-columns: minmax(310px, .8fr) minmax(430px, 1.2fr); gap: 24px; align-items: start; }
.notes-admin-grid .form-card { width: 100%; }
.audience-fieldset { margin: 12px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.audience-fieldset legend { padding: 0 6px; font-weight: 750; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check-option { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 9px; border-radius: 9px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); font-weight: 650; cursor: pointer; }
.check-option input { flex: 0 0 auto; width: 20px; min-height: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.check-option span { display: grid; min-width: 0; }
.check-option small { color: var(--muted); font-weight: 500; }
.notes-heading { margin-top: 0; }
.note-list { display: grid; gap: 14px; }
.note-card { padding: 20px; }
.note-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.note-title-row h2 { margin-bottom: 3px; font-size: 1.18rem; }
.note-title-row .muted { font-size: .8rem; }
.note-message { margin: 14px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.audience-summary { display: grid; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.audience-summary > strong { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.reply-thread { margin-top: 15px; }
.reply-thread h3 { margin: 0 0 9px; font-size: .94rem; }
.reply-item { padding: 11px 13px; border-left: 3px solid var(--primary); border-radius: 0 9px 9px 0; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.reply-item + .reply-item { margin-top: 8px; }
.reply-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reply-meta time { color: var(--muted); font-size: .75rem; }
.reply-item p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.no-replies { margin-bottom: 0; }

:root[data-theme="dark"] .brand-mark { color: #fff; background: linear-gradient(135deg, #765ad7, #9a82f4); }
:root[data-theme="dark"] .calendar-absence,
:root[data-theme="dark"] .absence-pill,
:root[data-theme="dark"] .absent-icon { color: #b9def7; background: #24394a; }
:root[data-theme="dark"] .absence-option { border-color: #344d64; background: #1d2b3a; }
:root[data-theme="dark"] .alert.success { color: #8ee8c5; background: #17372f; border-color: #2d6c59; }
:root[data-theme="dark"] .alert.error { color: #ffb4ad; background: #44231f; border-color: #744039; }
:root[data-theme="dark"] .badge { color: #cbbdff; background: #30294b; }
:root[data-theme="dark"] .badge.enabled { color: #8ee8c5; background: #17372f; }
:root[data-theme="dark"] .badge.disabled { color: #ffb4ad; background: #44231f; }
:root[data-theme="dark"] .child-heading h1,
:root[data-theme="dark"] .child-score-copy h2,
:root[data-theme="dark"] .child-section-heading h2 { color: #c9bbff; }
:root[data-theme="dark"] .child-score-hero { color: var(--ink); background: linear-gradient(125deg, #2b2546 0%, #1a3343 55%, #3b331d 100%); }
:root[data-theme="dark"] .child-score-hero::after { background: rgba(255,255,255,.06); }
:root[data-theme="dark"] .child-score-copy p:last-child { color: #c0bbcc; }
:root[data-theme="dark"] .average-orbit { background: conic-gradient(var(--average-colour, #737789) calc(var(--score-percent) * 1%), rgba(255,255,255,.12) 0); }
:root[data-theme="dark"] .average-orbit::before { background: var(--surface); }
:root[data-theme="dark"] .child-history { background: color-mix(in srgb, var(--surface) 94%, transparent); }
:root[data-theme="dark"] .period-chip,
:root[data-theme="dark"] .day-icon { color: #c9bbff; background: #30294b; }
:root[data-theme="dark"] .score-output.range-absent { color: #b9def7; background: #31526f; }

@media (max-width: 820px) {
    .nav-wrap { padding-block: 12px; flex-wrap: wrap; gap: 12px 20px; }
    nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 3px; }
    .account { margin-left: auto; }
    .admin-grid { grid-template-columns: 1fr; }
    .notes-admin-grid { grid-template-columns: 1fr; }
    .calendar-day { min-height: 100px; }
    .history-entry { grid-template-columns: 1fr 70px; }
    .history-comment { grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
    .shell { width: min(100% - 20px, 1180px); }
    .page-content { padding-top: 28px; }
    .hero-row, .page-heading { align-items: flex-start; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .calendar-weekdays { display: none; }
    .calendar-grid { grid-template-columns: 1fr; }
    .calendar-day { min-height: auto; flex-direction: row; align-items: center; }
    .calendar-day.outside-month { display: none; }
    .comment-preview { flex: 1; -webkit-line-clamp: 1; }
    .user-summary, .user-actions { align-items: flex-start; flex-direction: column; }
    .inline-reset { width: 100%; flex-direction: column; }
    .inline-reset input { max-width: none; }
    .child-score-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 34px 22px; }
    .average-orbit { width: 150px; height: 150px; }
    .child-section-heading { align-items: flex-start; flex-direction: column; }
    .account > span { display: none; }
    .theme-label { display: none; }
    nav { gap: 10px; }
    nav a { min-height: 42px; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 9px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); white-space: nowrap; }
    .hero-row .button, .page-heading .button { width: 100%; }
    .auth-card, .form-card, .section-card { padding: 22px 18px; }
    .score-row { gap: 10px; }
    .history-filter-form { grid-template-columns: 1fr 1fr; }
    .filter-actions { grid-column: 1 / -1; }
    .filter-actions .button { flex: 1; }
    .history-results-heading { align-items: flex-start; flex-direction: column; }
    .history-entry { grid-template-columns: 1fr auto; padding: 16px; }
    .notification-card { grid-template-columns: 1fr; }
    .notification-heading, .note-title-row { flex-direction: column; }
    .reply-compose { grid-template-columns: 1fr; }
    .reply-compose .button { width: 100%; }
    .report-row { grid-template-columns: 40px minmax(0, 1fr); }
    .report-row .button { grid-column: 1 / -1; width: 100%; }
    .check-list { grid-template-columns: 1fr; }
    .reply-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media (hover: none) {
    .button:hover, .calendar-day:hover { background-color: inherit; }
}
