:root { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #183458; background: #fffaf3; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 1px solid #b8ccdf; border-radius: 10px; background: #fff; color: #183458; padding: 8px 13px; }
button:hover { background: #eaf4fe; }
button[type="submit"], #add { background: #166db0; border-color: #166db0; color: #fff; }
button[type="submit"]:hover, #add:hover { background: #105b96; }
input, select { border: 1px solid #bdccda; border-radius: 10px; padding: 9px; background: #fff; color: #183458; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 10; background: #fff; padding: 10px; }
.site-header { display: flex; align-items: center; gap: 18px; padding: 12px max(20px, calc((100vw - 1320px) / 2)); background: #17456e; color: #fff; }
.site-header a { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 800; text-decoration: none; font-size: 1.2rem; }
.site-header img { object-fit: contain; }
.site-header span { margin-right: auto; }
.site-header button { color: #17456e; }
main { max-width: 1360px; margin: 0 auto; padding: 16px 20px 40px; }
.message:not(:empty) { border-radius: 10px; background: #e3f5ef; padding: 10px 14px; margin: 0 0 14px; }
.message.is-error { background: #fdebe8; color: #9a2920; }
.panel { background: #fff; border: 1px solid #d8e2ec; border-radius: 18px; padding: 20px; }
.auth-panel { max-width: 450px; margin: 8vh auto; }
.auth-panel h1 { margin-top: 0; }
.auth-panel form, .activity-form label { display: grid; gap: 7px; }
.auth-panel form { gap: 18px; }
.auth-panel > button { margin-top: 16px; }
.welcome { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin: 8px 0 16px; }
.welcome h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 2px 0; }
.welcome p { margin: 0; color: #65778b; }
.print-student { display: none; }
.eyebrow { color: #997b39; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.welcome label { display: grid; gap: 4px; min-width: 220px; }
.family-links { margin: 0 0 12px; }
.family-links a { display: inline-block; border: 1px solid #b8ccdf; border-radius: 10px; padding: 7px 12px; color: #17456e; background: #fff; font-weight: 700; text-decoration: none; }
.family-links a:hover { background: #eaf4fe; }
.toolbar, .week-nav, .actions, .form-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar { justify-content: space-between; margin-bottom: 14px; }
.week-nav strong { min-width: 210px; text-align: center; }
.week-nav button { font-size: 1.5rem; line-height: 1; min-width: 38px; }
.activity-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.activity-form h2, .form-actions { grid-column: 1 / -1; margin: 0; }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.day { min-width: 0; border: 1px solid #d8e2ec; border-radius: 16px; background: #fff; padding: 13px; break-inside: avoid; }
.day header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.day time { color: #697a8d; }
.school-list { border-bottom: 1px solid #dde6ed; padding-bottom: 5px; margin-bottom: 5px; }
.school { display: grid; grid-template-columns: 65px 1fr; gap: 6px; padding: 2px 0; font-size: .88rem; }
.school span, .activity small { color: #6c7e91; }
.activities { display: grid; gap: 2px; }
.activity { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 3px 0; }
.activity.is-done span { color: #368163; }
.activity input { width: 18px; height: 18px; accent-color: #16866f; }
.activity span { display: flex; flex: 1; min-width: 0; flex-wrap: wrap; gap: 6px; overflow-wrap: anywhere; }
.activity button { padding: 1px 5px; border: 0; background: none; font-size: 1.15rem; }
.empty { color: #8492a5; font-size: .86rem; }
@media (max-width: 780px) { .board { grid-template-columns: 1fr; } .activity-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { main { padding-inline: 12px; } .site-header { padding-inline: 12px; } .site-header span { display: none; } .site-header a { margin-right: auto; } .activity-form { grid-template-columns: 1fr; } .actions { width: 100%; } .actions button { flex: 1; } }
@page { size: A4 portrait; margin: 10mm; }
@media print {
  :root { background: #fff; print-color-adjust: exact; }
  .site-header, .message, .welcome label, .family-links, .toolbar button, .activity-form, .activity button { display: none !important; }
  main { max-width: none; padding: 0; }
  .welcome { margin: 0 0 4mm; }
  .welcome h1 { font-size: 19pt; }
  .welcome p#welcomeName { display: none; }
  .welcome .print-student { display: block; color: #183458; font-size: 10pt; margin-top: 1mm; }
  .toolbar { margin-bottom: 4mm; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3mm; }
  .day { border-radius: 2mm; padding: 3mm; font-size: 9pt; }
  .school, .activity { font-size: 8.5pt; }
}
