* { box-sizing: border-box; }
body { margin: 0; color: #222; background: #fff; font: 16px/1.5 system-ui, sans-serif; }
a { color: #12589a; }
.site-header { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; }
.brand img { display: block; width: 100px; height: auto; }
.school-info h1 { margin: 0 0 .25rem; font-size: 1.3rem; }
.school-info p { margin: .15rem 0; }
.schedule-nav { padding: .5rem 1rem; text-align: center; border-block: 1px solid #ddd; }
.schedule-nav p { margin: .4rem; }
main { max-width: 1440px; margin: 1rem auto; padding: 0 1rem; }
main > h2, .welcome { text-align: center; }
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 1rem; }
.schedule-tile { display: block; text-align: center; text-decoration: none; color: inherit; }
.schedule-tile img { display: block; width: 95%; max-width: 1200px; height: auto; margin: 0 auto .35rem; }
.schedule-tile span { display: block; padding: .35rem; }
.notice { text-align: center; }
.sheet-frame { width: 100%; max-width: 780px; height: min(72vh, 760px); margin: 0 auto; }
.sheet-frame iframe { width: 100%; height: 100%; border: 0; }
.print-page { max-width: 1300px; }
.print-page h1 { text-align: center; font-size: 1.35rem; }
.print-actions { display: flex; justify-content: center; gap: 1rem; }
.print-actions button { padding: .5rem 1rem; cursor: pointer; }
.print-page img { display: block; width: 100%; max-width: 1200px; height: auto; margin: auto; }
@media (max-width: 600px) {
  .site-header { align-items: flex-start; justify-content: flex-start; }
  .brand img { width: 72px; }
  .school-info h1 { font-size: 1rem; }
}
@page { size: A4; margin: 1cm; }
@media print {
  .print-actions { display: none; }
  .print-page { max-width: none; margin: 0; padding: 0; }
  .print-page h1 { display: none; }
  .print-page img { width: 100%; max-width: none; max-height: 27.7cm; object-fit: contain; }
}
