:root {
    color-scheme: light;
    --ink: #08285f;
    --ink-soft: #47648b;
    --accent: #0865df;
    --accent-dark: #034cac;
    --accent-pale: #eef7ff;
    --line: #c8d7ea;
    --line-strong: #84a0c2;
    --surface: #ffffff;
    --absence: #b86b00;
    --absence-bg: #fff2d2;
    --error: #b42318;
    --error-bg: #fff1f0;
    --radius: 12px;
    --content: 1180px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--surface); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-size: 16px;
    line-height: 1.45;
}

button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.page-shell { min-height: 100vh; }

.topbar {
    min-height: 104px;
    max-width: var(--content);
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--ink);
    text-decoration: none;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.045em;
    font-weight: 750;
}
.brand-logo { width: 60px; height: 60px; object-fit: contain; flex: 0 0 auto; }

.topbar-actions, .text-button {
    display: flex;
    align-items: center;
}

.topbar-actions { gap: 18px; }
.profile-username { width: 100%; padding: 12px; border: 1px solid var(--ink-soft); border-radius: 8px; font: inherit; margin-bottom: 16px; }
.profile-panel { padding: 16px max(16px, calc((100vw - 1120px) / 2)); background: var(--accent-pale); }
.profile-panel h2 { margin: 0; font-size: 1.2rem; }
.profile-panel .text-button { display: inline-flex; margin-left: 12px; }
.profile-toggle { font-size: .9rem; }
.class-overview-panel { padding: 20px max(16px, calc((100vw - 1120px) / 2)); background: var(--accent-pale); }
.class-overview-panel h2 { margin: 0; font-size: 1.2rem; }
.class-overview-heading-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
#class-overview-absences { border: 1px solid var(--ink-soft); border-radius: 8px; padding: 6px 10px; width: 160px; min-height: 44px; font-size: .8rem; line-height: 1.2; white-space: pre-line; text-align: center; }
#class-overview-absences:hover:not(:disabled) { background: white; }
.class-overview-heading-row .primary-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; padding: 8px; }
.class-overview-heading-row .primary-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.class-overview-table-wrap { width: min(100%, 720px); overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
.class-overview-table { width: 720px; table-layout: fixed; border-collapse: collapse; text-align: center; font-size: .95rem; }
.class-overview-table col:nth-child(1) { width: 13%; }
.class-overview-table col:nth-child(2) { width: 25%; }
.class-overview-table col:nth-child(3) { width: 16%; }
.class-overview-table col:nth-child(4), .class-overview-table col:nth-child(5) { width: 23%; }
.class-overview-table th, .class-overview-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: center; }
#class-overview-panel .class-overview-table tbody th, #class-overview-panel .class-overview-table tbody td { padding-block:7.3px; }
.class-overview-table th { background: var(--accent-pale); }
.class-overview-table tbody tr:last-child td { border-bottom: 0; }
.class-overview-table .class-grade-total { text-align: center; vertical-align: middle; font-weight: 700; border-left: 1px solid var(--line); }
.class-overview-table .class-grand-total { background: white; font-weight: 700; }
.class-overview-table .class-grand-total th { background: white; text-align: right; }
.class-overview-table tr[data-grade="5"] { background: #a4d6e2; }
.class-overview-table tr[data-grade="6"] { background: #c0fda9; }
.class-overview-table tr[data-grade="7"] { background: #fdf3a0; }
.class-overview-table tr[data-grade="8"] { background: #f5c277; }
.class-overview-table tr[data-grade="9"] { background: #ef857a; }
.class-overview-table tr[data-grade="10"] { background: #f2abf0; }
.class-locations-wrap { width:min(100%,800px); }
.class-locations-table { width:800px; font-size:.875rem; }
.class-locations-table col:nth-child(1) { width:11%; }
.class-locations-table col:nth-child(2) { width:25%; }
.class-locations-table col:nth-child(n+3) { width:16%; }
.class-overview-table.class-locations-table th, .class-overview-table.class-locations-table td { padding:6px 8px; vertical-align:middle; }
.class-locations-table thead th { white-space:pre-line; }
.class-locations-table tbody th { background:transparent; font-weight:600; }
.class-locations-table td.class-locations-error { font-size:.8rem; color:var(--error); }
.class-locations-status { margin:0 0 12px; font-size:.875rem; color:var(--ink-soft); }
.class-locations-hint { display:none; margin:0 0 8px; font-size:.8rem; color:var(--ink-soft); }
@media(max-width:850px) { .class-locations-hint { display:block; } }
.class-overview-table tr[data-grade="11"], .class-overview-table tr[data-grade="12"], .class-overview-table tr[data-grade="13"] { background: #d9d9d9; }
#class-overview-toggle[aria-expanded="true"] { color: var(--ink); }
.time-toggle { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid currentColor; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.time-toggle:hover, .time-toggle[aria-pressed="true"] { background: var(--ink); color: white; }
.time-panel { padding: 16px max(16px, calc((100vw - 1120px) / 2)); background: #fff6dc; }
.time-panel h2 { margin: 0; font-size: 1.2rem; }
.time-panel form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.time-panel label { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.time-panel input { padding: 10px; border: 1px solid var(--ink-soft); border-radius: 8px; font: inherit; min-width: 0; max-width: 100%; box-sizing: border-box; }
.action-divider { width: 1px; height: 28px; background: var(--line); }

.text-button {
    border: 0;
    background: transparent;
    padding: 10px 4px;
    gap: 9px;
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
}

.text-button:hover { color: var(--accent); }
.text-button:disabled { opacity: .45; cursor: default; }
.text-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

button:focus-visible, input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
    outline-offset: 2px;
}

.login-view {
    min-height: calc(100vh - 104px);
    display: grid;
    place-items: center;
    padding: 32px 24px 14vh;
}

.login-form { width: min(100%, 360px); }
.login-icon { width: 52px; height: 52px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-form h1 { margin: 10px 0 18px; font-size: 2rem; line-height: 1.1; letter-spacing: -.025em; }
.login-form label, .picker label { display: block; margin-bottom: 7px; font-weight: 680; }

.password-control, .combobox-wrap { position: relative; }
.password-control input, .combobox-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    font-size: 1rem;
}
.password-control input:focus, .combobox-wrap input:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.password-control input[aria-invalid="true"] { border-color: var(--error); outline-color: color-mix(in srgb, var(--error) 18%, transparent); }
.icon-button { position: absolute; right: 7px; top: 6px; width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.form-error { margin: 7px 0 0; color: var(--error); font-size: .875rem; }

.primary-button {
    min-height: 52px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0 24px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.primary-button:disabled { opacity: .48; cursor: default; }
.login-form > .primary-button { width: 100%; margin-top: 26px; }
.login-note { margin: 30px -30px 0; text-align: center; color: var(--ink-soft); font-size: .925rem; }

.selection-band { background: var(--accent-pale); border-block: 1px solid #dcecff; }
.selection-grid {
    max-width: var(--content);
    margin: 0 auto;
    padding: 28px 30px 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: end;
}
.combobox-wrap.has-clear input { padding-right: 100px; }
.clear-picker, .dropdown-toggle {
    position: absolute;
    z-index: 1;
    top: 6px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}
.clear-picker { right: 53px; font-size: 1.5rem; line-height: 1; }
.dropdown-toggle { right: 7px; display: grid; place-items: center; color: var(--ink); }
.clear-picker:hover, .dropdown-toggle:hover { color: var(--accent); background: var(--accent-pale); }
.dropdown-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }
.option-list {
    position: absolute;
    z-index: 20;
    inset: calc(100% + 6px) 0 auto;
    max-height: 290px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(8, 40, 95, .14);
}
.option-list button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #e8eef6;
    padding: 11px 13px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.option-list button:last-child { border-bottom: 0; }
.option-list button:hover, .option-list button[aria-selected="true"] { background: var(--accent-pale); color: var(--accent-dark); }
.option-empty { padding: 12px 13px; color: var(--ink-soft); }
.catalog-meta { max-width: var(--content); margin: 0 auto; padding: 0 30px 14px; color: var(--ink-soft); font-size: .875rem; }

.result-region { max-width: var(--content); margin: 0 auto; padding: 28px 30px 64px; }
.result-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.result-toolbar h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.18; letter-spacing: -.025em; }
.student-contact-section { margin-top: 8px; }
.phase-exam { display: inline-block; margin: 6px 0; padding: 3px 10px; border-radius: 6px; background: var(--accent-pale); color: var(--accent-dark); font-weight: 700; }
.contact-button { width:160px; min-width:0; max-width:100%; padding:0 8px; font-size:.875rem; margin-bottom:14px; }
.student-detail-actions { display: flex; flex-wrap: wrap; gap: 0 12px; }
.result-summary { flex:1; min-width:0; }
.student-identity { display:grid; width:fit-content; max-width:100%; grid-template-columns:minmax(0,1fr) auto; column-gap:16px; align-items:start; }
.student-identity > div:first-child { min-width:0; }
#result-title { overflow-wrap:anywhere; }
#student-name-baseline { display:inline-block; width:0; height:0; vertical-align:baseline; }
.student-photo-frame { width:72px; height:108px; overflow:hidden; }
.student-photo-frame img { display:block; width:100%; height:100%; object-fit:contain; object-position:left bottom; }
#student-photo-open { display:block; width:100%; height:100%; padding:0; border:0; background:none; cursor:zoom-in; }
#student-photo-open:focus-visible { outline-offset:-3px; }
#student-photo-dialog { padding:0; border:0; border-radius:8px; overflow:hidden; }
#student-photo-dialog::backdrop { background:#102f6270; }
#student-photo-large {
    display:block;
    width:min(var(--zoom-width), calc(100vw - 32px), calc((100dvh - 32px) * var(--photo-aspect)));
    height:auto;
}
#student-photo-dialog button {
    position:absolute; top:6px; right:6px; width:36px; height:36px; padding:0;
    border:1px solid var(--ink); border-radius:50%; background:white; color:var(--ink);
    font-size:1.5rem; line-height:1; cursor:pointer;
}
#student-photo-status { display:flex; height:100%; align-items:center; font-size:.75rem; color:var(--ink-soft); overflow-wrap:anywhere; }
.student-absences, .student-classreg, .student-exemptions { margin-top: 16px; overflow-wrap: anywhere; }
.student-absences article, .student-classreg article, .student-exemptions article { padding: 12px 0; border-bottom: 1px solid var(--ink-soft); }
.student-absences p, .student-classreg p, .student-exemptions p { margin: 4px 0; white-space: pre-wrap; }
.primary-button.contact-button[aria-pressed="true"],
.primary-button.contact-button[aria-pressed="true"]:hover {
    background: #fff;
    color: var(--accent-dark);
    border-color: var(--accent-dark);
}
.student-contact-status { margin: 4px 0 0; color: var(--ink-soft); }
.contact-confirm-form { margin: 12px 0; max-width: 440px; }
.contact-confirm-form p { margin: 0 0 10px; }
.contact-confirm-form label { display: block; margin-bottom: 6px; }
.contact-confirm-form input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--ink-soft); border-radius: 8px; font: inherit; }
.contact-confirm-form button { margin: 10px 0; width: 100%; }
.student-attribute { margin: 4px 0 0; color: var(--ink-soft); }
.student-attribute p {
    margin: 3px 0 0;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: .3em;
    align-items: baseline;
}
.student-attribute strong { color: var(--ink); overflow-wrap: anywhere; }
.refresh-block { display: flex; flex-direction: column; align-items: flex-end; }
.refresh-button { color: var(--accent); }
.updated-at { min-height: 20px; color: var(--ink-soft); font-size: .875rem; }

.notice {
    margin-top: 42px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 19px 20px;
    border-radius: var(--radius);
}
.notice svg { flex: 0 0 auto; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.notice strong { display: block; }
.notice p { margin: 3px 0 0; }
.info-notice { color: #274f7e; background: #edf5fd; }
.error-notice { color: var(--error); background: var(--error-bg); }

.timeline {
    position: relative;
    margin-top: 54px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.timeline::before { content: ""; position: absolute; top: 0; left: 11%; right: 11%; height: 1px; background: var(--line-strong); }
.phase { position: relative; padding: 28px 28px 4px; text-align: center; min-width: 0; }
.phase + .phase { border-left: 1px solid var(--line); }
.phase-dot { position: absolute; top: -7px; left: 50%; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; transform: translateX(-50%); }
.current-phase .phase-dot { width: 20px; height: 20px; top: -10px; border-color: var(--accent); background: var(--accent); }
.phase h2 { margin: 2px 0 14px; color: var(--ink-soft); font-size: 1.2rem; }
.current-phase h2 { color: var(--accent); }
.phase-time { display: block; margin-bottom: 12px; color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.05; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.current-phase .phase-time { font-weight: 760; }
.phase-item + .phase-item { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.phase-line { margin: 3px 0; }
.phase-empty { margin: 24px 0 0; color: var(--ink-soft); }
.split-note { color: var(--accent-dark); font-weight: 700; }
.phase-absence { display: inline-block; margin: 0 0 14px; padding: 5px 9px; border-radius: 999px; color: #6d3c00; background: var(--absence-bg); font-size: .86rem; font-weight: 750; }

.absence-notice {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 26px;
    border-radius: var(--radius);
    color: #6d3c00;
    background: var(--absence-bg);
}
.absence-notice svg { flex: 0 0 auto; width: 48px; height: 48px; fill: none; stroke: #d77c00; stroke-width: 1.8; stroke-linecap: round; }
.absence-notice strong { display: block; font-size: 1.08rem; }
.absence-notice p { margin: 4px 0 0; }

.is-loading { opacity: .62; pointer-events: none; }

@media (max-width: 820px) {
    .topbar { min-height: 82px; padding-inline: 20px; }
    .brand { font-size: 2rem; }
    .brand-logo { width: 46px; height: 46px; }
    .topbar-actions { gap: 8px; }
    .topbar-actions .text-button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .action-divider { height: 24px; }
    .selection-grid { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px 18px; }
    .catalog-meta { padding: 0 20px 12px; }
    .result-region { padding: 24px 20px 48px; }
    .result-toolbar { align-items: flex-end; }
    .result-toolbar h1 { font-size: 1.35rem; }
    .refresh-button { padding-top: 2px; }
    .timeline { display: block; margin-top: 36px; padding-left: 28px; }
    .timeline::before { top: 5px; bottom: 10px; left: 7px; width: 1px; height: auto; right: auto; }
    .phase { padding: 0 0 28px 18px; text-align: left; }
    .phase + .phase { border-left: 0; }
    .phase-dot, .current-phase .phase-dot { left: -21px; top: 4px; transform: none; }
    .phase h2 { display: inline-block; margin: 0 0 5px; }
    .phase-time { margin-bottom: 7px; font-size: 1.4rem; }
    .absence-notice { margin-top: 22px; padding: 18px; align-items: flex-start; gap: 14px; }
    .absence-notice svg { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
    .topbar { padding: 16px; flex-wrap: wrap; gap: 12px; }
    .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
    .class-overview-table th, .class-overview-table td { padding: 9px 7px; }
    #class-overview-panel .class-overview-table tbody th, #class-overview-panel .class-overview-table tbody td { padding-block:4.9px; }
    .brand { font-size: 1.7rem; }
    .selection-grid, .result-region { padding-inline: 16px; }
    .catalog-meta { padding-inline: 16px; }
    .result-toolbar { display: block; }
    .refresh-block { margin-top: 14px; align-items: flex-start; }
    .notice { margin-top: 28px; padding: 16px; }
    .login-note { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.menu-shell { position: relative; margin-left:auto; }
.menu-toggle { border: 1px solid var(--ink-soft); border-radius: 8px; background: white; padding: 10px 14px; cursor: pointer; font-weight: 650; }
.app-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; max-height:calc(100dvh - 120px); overflow:auto; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px #102f6226; z-index: 100; }
.app-menu a, .app-menu button { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 11px 12px; color: var(--ink); text-decoration: none; border-radius: 6px; cursor: pointer; }
.app-menu a:hover, .app-menu button:hover, .app-menu [aria-current]:not(.menu-admin) { background: var(--accent-pale); }
.app-menu-row { display:flex; align-items:center; gap:4px; }
.app-menu-row > a:first-child { flex:1; width:auto; min-width:0; }
.app-menu .menu-admin { display:flex; flex:0 0 44px; align-items:center; justify-content:center; width:44px; height:44px; padding:10px; }
.menu-admin svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.tool-page { max-width: 1120px; margin: auto; padding: 24px 20px 48px; }
.tool-page h1 { margin: 0 0 20px; font-size: 1.8rem; }
.tool-page select, .tool-page input[type=date] { font: inherit; padding: 10px; border: 1px solid var(--ink-soft); border-radius: 7px; max-width: 100%; }
.tool-controls { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin-block:16px; }
.tool-controls label { display:flex; flex-direction:column; gap:6px; }
.report-class-picker { position:relative; display:flex; flex-direction:column; gap:6px; width:300px; max-width:100%; }
#kl-class { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:white; color:inherit; text-align:left; }
.report-class-panel { position:absolute; z-index:15; top:100%; left:0; width:340px; max-width:calc(100vw - 48px); padding:12px; border:1px solid var(--line); border-radius:8px; background:white; box-shadow:0 8px 24px #152c4f26; }
.report-class-panel .tool-controls { margin:0 0 12px; gap:8px; }
#kl-classes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:260px; overflow:auto; margin-bottom:12px; }
#kl-classes label { display:flex; flex-direction:row; align-items:center; gap:8px; padding:4px; }
.report-options { display:flex; flex-wrap:wrap; gap:16px; padding:12px; border:1px solid var(--line); border-radius:8px; }
.report-students { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; max-height:220px; overflow:auto; padding:12px; border:1px solid var(--line); border-radius:8px; }
.report-students label, .report-filter label { display:flex; align-items:center; gap:8px; }
.report-output { overflow-x:auto; }
.report-output table { width:100%; border-collapse:collapse; }
.report-output th, .report-output td { padding:10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.report-filter { display:flex; flex-wrap:wrap; gap:12px; margin-block:16px; }
.report-status { white-space:pre-line; }
.report-components { display:block; }
.report-component-choices { display:flex; flex-wrap:wrap; gap:12px 20px; }
.report-component-choices + .report-component-choices { margin-top:16px; }
.report-component-choices label { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:baseline; gap:6px; max-width:100%; }
.report-confirm { width:min(520px,calc(100% - 40px)); border:1px solid var(--line); border-radius:12px; padding:24px; color:var(--ink); }
.report-confirm::backdrop { background:#102f6270; }
.report-confirm h2 { margin-top:0; font-size:1.2rem; }
.report-confirm button { max-width:100%; }
.report-download { border:1px solid var(--line); border-radius:8px; padding:12px 16px; margin-top:16px; background:var(--accent-pale); }
.report-download a { color:var(--accent); font-weight:650; }
.report-table-hint { display:none; font-size:.85rem; color:var(--ink-soft); }
@media(max-width:600px) { .report-table-hint { display:block; } }

#time-editor-anchor { display:flex; justify-content:center; margin-top:24px; }
.time-editor { display:grid; grid-template-columns:28px minmax(0,1fr); align-items:center; gap:8px; width:336px; max-width:100%; text-align:left; }
.time-calendar { display:flex; align-items:center; justify-content:center; width:28px; height:36px; color:var(--ink); border-radius:6px; }
.time-calendar:hover { background:var(--accent-pale); }
.time-calendar svg, .time-trash svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.inline-time-control { display:flex; align-items:center; width:300px; max-width:100%; height:44px; border:1px solid #dfbd66; border-radius:8px; background:#fff6dc; }
.inline-time-control:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.inline-time-control input { flex:1; width:0; min-width:0; padding:8px 6px; border:0; background:transparent; color:var(--ink); font:inherit; font-size:16px; }
.inline-time-control input:focus { outline:none; }
.time-trash { display:flex; flex:0 0 36px; align-items:center; justify-content:center; height:40px; padding:4px; border:0; border-radius:6px; background:transparent; color:var(--ink); cursor:pointer; }
.time-trash:hover:not(:disabled) { background:#f3dfa3; }
.time-editor .form-error { grid-column:1 / -1; margin:0; }
.timeline.has-time-editor { margin-top:104px; }
.current-phase > .time-editor { position:absolute; left:calc(50% - 18px); bottom:calc(100% + 20px); transform:translateX(-50%); }
@media(max-width:820px) {
    .timeline.has-time-editor { margin-top:36px; }
    .current-phase > .time-editor { position:static; transform:none; margin:0 0 20px -18px; max-width:calc(100% + 18px); }
    .current-phase-body { position:relative; }
    .current-phase-body > .phase-dot { left:-39px; top:4px; }
}

.cards-print-warning { color:var(--error); }

.names-module { max-width:1000px; }
.names-heading,.names-settings-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.names-heading h1 { margin-bottom:0; }
.names-settings-button { gap:8px; }
.names-settings-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; }
.names-controls { display:flex; align-items:center; justify-content:center; gap:16px; margin:28px 0 16px; color:var(--ink-soft); font-size:.9rem; }
.names-controls select { border:1px solid var(--line); border-radius:8px; padding:7px 10px; background:white; color:var(--ink); font:inherit; }
.names-card { max-width:440px; margin:0 auto; text-align:center; }
.names-photo-wrap { height:330px; display:flex; align-items:center; justify-content:center; }
.names-photo-wrap img { height:100%; width:auto; max-height:100%; max-width:100%; object-fit:contain; border-radius:6px; }
.names-answer { min-height:64px; margin:20px 0 4px; font-size:1.3rem; font-weight:700; overflow-wrap:anywhere; }
.names-reveal { width:100%; }
.names-rate { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.names-rate > button { border:1px solid var(--line-strong); border-radius:var(--radius); padding:14px 10px; font:inherit; font-weight:700; cursor:pointer; }
#names-miss { background:white; color:var(--ink); }
.names-settings-heading { margin-top:28px; }
.names-settings-heading h2 { margin:0; }
.names-classes { margin:24px 0; display:grid; gap:10px; }
.names-class { border:1px solid var(--line); border-radius:10px; padding:14px 16px; }
.names-class-label { display:flex; align-items:center; gap:10px; font-weight:700; cursor:pointer; }
.names-modes { display:flex; flex-wrap:wrap; gap:12px 24px; margin:14px 0 8px 24px; font-size:.95rem; }
.names-modes label,.names-student { display:flex; align-items:center; gap:8px; }
.names-students { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:10px 20px; margin:16px 0 0 24px; max-height:280px; overflow:auto; }
.names-student { font-size:.95rem; }
.names-student.no-photo { color:var(--ink-soft); }
.names-no-photo-icon { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; }
.names-no-photos { font-size:.9rem; color:var(--ink-soft); }
.names-storage { margin-top:36px; border-top:1px solid var(--line); padding-top:20px; }
.names-storage h3 { margin-top:0; }
.names-storage p { font-size:.9rem; color:var(--ink-soft); max-width:76ch; }
.names-danger { background:white; border:1px solid var(--error); border-radius:8px; color:var(--error); font:inherit; padding:10px 14px; cursor:pointer; }
.names-spinner { display:inline-block; width:16px; height:16px; margin-left:10px; border:2px solid #ffffff70; border-top-color:white; border-radius:50%; animation:loading-spin .8s linear infinite; }
@keyframes loading-spin { to {transform:rotate(360deg)} }
@media(max-width:480px) { .names-heading { align-items:flex-start; gap:12px; } .names-settings-button { font-size:.85rem; } .names-photo-wrap { height:290px; } .names-answer { font-size:1.15rem; } .names-students { grid-template-columns:1fr; margin-left:0; } .names-modes { margin-left:0; } }
@media(prefers-reduced-motion:reduce) { .names-spinner { animation:none; } }
.names-module .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.site-footer { max-width:var(--content); margin:0 auto; padding:24px 30px; font-size:.875rem; }
.site-footer a, .privacy-page a { color:var(--accent-dark); text-underline-offset:3px; }
.privacy-page { max-width:820px; margin:0 auto; padding:24px 24px 40px; overflow-wrap:anywhere; }
.privacy-page h1 { margin:20px 0 8px; }
.privacy-page h2 { margin:28px 0 10px; font-size:1.25rem; line-height:1.3; }
.privacy-page p, .privacy-page li { line-height:1.65; }
.privacy-page li + li { margin-top:8px; }
.privacy-page address { font-style:normal; line-height:1.65; }
.privacy-date { color:var(--ink-soft); font-size:.875rem; }
.privacy-pending { margin:24px 0; padding:16px; border:1px solid #d6b95c; border-radius:var(--radius); background:#fff9df; line-height:1.6; }
.privacy-pending strong { display:block; margin-bottom:4px; }
.names-placeholder-image { display: block; max-width: 160px; max-height: 200px; margin: 1rem auto; }
