:root { color-scheme: light; font-family: Arial, sans-serif; color: #111; background: #fff; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
button, select { font: inherit; }
button, select, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, select:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
main { width: min(100%, 1180px); margin: 0 auto; padding: 20px; }
.filters { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: end; padding: 12px 0 16px; background: #fff; border-bottom: 1px solid #ccc; }
.view-switch { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; border: 1px solid #999; }
.view-switch button { min-height: 44px; padding: 0 16px; border: 0; border-right: 1px solid #999; background: #fff; cursor: pointer; }
.view-switch button:last-child { border-right: 0; }
.view-switch button.selected { color: #fff; background: #111; }
label { display: grid; gap: 5px; font-size: 12px; }
select { min-width: 170px; min-height: 44px; padding: 0 34px 0 12px; color: #111; background: #fff; border: 1px solid #999; border-radius: 0; }
.schedule { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; padding-top: 22px; }
.schedule section { min-width: 0; }
h2 { margin: 0; padding: 0 0 10px; font-size: 16px; border-bottom: 2px solid #111; }
ol { margin: 0; padding: 0; list-style: none; }
li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 55px; padding: 9px 0; border-bottom: 1px solid #ddd; }
.period { font-size: 18px; font-weight: 700; }
.lesson-main { min-width: 0; }
.lesson-main strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.lesson-main small { display: block; margin-top: 2px; font-size: 12px; color: #555; }
.room { font-size: 12px; text-align: right; }
.empty { margin: 0; padding: 18px 0; color: #888; border-bottom: 1px solid #ddd; }
@media (max-width: 760px) {
  main { padding: 0 12px 24px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; }
  .view-switch { grid-column: 1 / -1; }
  .view-switch button { padding: 0 8px; }
  select { width: 100%; min-width: 0; }
  .schedule { grid-template-columns: 1fr; gap: 26px; padding-top: 18px; }
  li { min-height: 58px; }
}
@media (max-width: 360px) { .filters { grid-template-columns: 1fr; } .view-switch { grid-column: auto; } }
@media print { main { width: 100%; padding: 0; } .filters { display: none; } .schedule { grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 0; } li { min-height: 0; break-inside: avoid; } }
