:root {
  --paper: #faf8f3;
  --ink: #24211c;
  --muted: #6d675e;
  --line: #ded8cd;
  --accent: #1f6f63;
  --accent-ink: #0f3d37;
  --warn: #9c4a17;
  --active: #fff2b8;
  --next: #e2f2ed;
  --math: #dbeafe;
  --russian: #ffe4d6;
  --reading: #ece3ff;
  --english: #d7f7e8;
  --pe: #ffe9a8;
  --world: #dff2c8;
  --art: #fbd7e8;
  --music: #d7eefb;
  --labor: #e8e0d4;
  --shadow: 0 14px 40px rgba(50, 45, 36, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151a19;
  --ink: #f3efe6;
  --muted: #bbb3a7;
  --line: #3b403d;
  --accent: #74c7b7;
  --accent-ink: #d9fff6;
  --warn: #f0a36a;
  --active: #4b421f;
  --next: #1e3a35;
  --math: #1d3456;
  --russian: #55301f;
  --reading: #33294e;
  --english: #1f4938;
  --pe: #4e421b;
  --world: #29451f;
  --art: #4f2641;
  --music: #1d4050;
  --labor: #3c352d;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px clamp(10px, 3vw, 28px) 0;
  border-bottom: 0;
  background: var(--paper);
  overflow-anchor: none;
  transition: background 160ms ease;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .top-nav a,
html[data-theme="dark"] .now-panel,
html[data-theme="dark"] .summary > *,
html[data-theme="dark"] .week-controls button,
html[data-theme="dark"] .today-board,
html[data-theme="dark"] .backpack-board,
html[data-theme="dark"] .day-tabs button,
html[data-theme="dark"] .day-card,
html[data-theme="dark"] .lesson,
html[data-theme="dark"] .vacation-card,
html[data-theme="dark"] .info-card {
  background: #1d2321;
}

html[data-theme="dark"] .site-menu {
  background: #1d2321;
}

html[data-theme="dark"] .site-header.is-compact {
  background: rgba(21, 26, 25, 0.8);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: min(1440px, 100%);
  margin: 0 auto;
  min-height: 72px;
  padding: 10px clamp(14px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
  transition: min-height 160ms ease, padding 160ms ease, box-shadow 160ms ease;
}

html[data-theme="dark"] .header-inner {
  background: #1d2321;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.school-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text-link {
  display: block;
  width: fit-content;
  min-width: 0;
  color: inherit;
  border-radius: 8px;
  text-decoration: none;
}

.brand-text-link:focus-visible {
  outline: 3px solid rgba(31, 111, 99, 0.35);
  outline-offset: 4px;
}

.brand-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  width: max-content;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.logo-link {
  display: block;
  border-radius: 8px;
}

.logo-link:focus-visible {
  outline: 3px solid rgba(31, 111, 99, 0.35);
  outline-offset: 4px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  text-decoration: none;
}

.top-nav a[aria-current="page"],
.top-nav a:hover {
  border-color: var(--accent);
  background: var(--next);
  color: var(--accent-ink);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-menu {
  position: fixed;
  top: 88px;
  right: max(12px, calc((100vw - 1440px) / 2 + 28px));
  z-index: 30;
  width: 250px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.site-menu.is-compact {
  top: 88px;
}

.site-menu-nav {
  display: none;
}

.site-menu-actions {
  display: grid;
  gap: 3px;
}

.site-menu button,
.site-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  padding: 10px;
}

.menu-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-menu button:hover,
.site-menu a:hover {
  background: var(--next);
  color: var(--accent-ink);
}

.header-side {
  min-width: 0;
}

.header-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  background: var(--next);
  color: var(--accent-ink);
}

.icon-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--next);
  color: var(--accent-ink);
}

.site-header.is-compact {
  background: rgba(250, 248, 243, 0.82);
  backdrop-filter: blur(12px);
}

.site-header.is-compact .header-inner {
  background: transparent;
}

html[data-theme="dark"] .icon-button {
  background: #151a19;
  color: #ffffff;
}

html[data-theme="dark"] .icon-button:hover {
  border-color: var(--accent);
  background: #263431;
  color: #ffffff;
}

.icon-button:focus-visible {
  outline: 3px solid rgba(31, 111, 99, 0.35);
  outline-offset: 2px;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.menu-line {
  transform-origin: center;
  transition: opacity 140ms ease, transform 140ms ease;
}

.menu-button.is-open .menu-line-top {
  transform: translateY(5px) rotate(45deg);
}

.menu-button.is-open .menu-line-middle {
  opacity: 0;
}

.menu-button.is-open .menu-line-bottom {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button .theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-button .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .icon-button .theme-icon-sun {
  display: block;
}

.kicker,
.week-label,
.summary-label,
.now-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  margin: 4px 0 6px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-title {
  margin: 0;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.05;
}

.schedule-label {
  margin: 3px 0 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  letter-spacing: 0.45px;
  white-space: nowrap;
}

.now-panel {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.now-panel strong {
  font-size: 24px;
  line-height: 1;
}

.now-panel span:last-child {
  color: var(--accent-ink);
  font-weight: 700;
}

main {
  flex: 1 0 auto;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px clamp(12px, 3vw, 28px) 30px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.summary > * {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 112px;
  padding: 17px 20px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.summary strong {
  font-size: 19px;
  line-height: 1.15;
}

.now-panel strong {
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.now-panel > span:not(.widget-head):not(.widget-meta) {
  font-size: 14px;
}

#next-lesson {
  font-size: 19px;
}

#vacation-status {
  font-size: 28px;
  color: var(--accent);
}

#week-label {
  font-size: 19px;
}

.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
}

.summary-label,
.now-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
}

.widget-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.widget-icon {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.widget-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.widget-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin-top: auto;
  margin-right: -20px;
  margin-bottom: -15px;
  margin-left: -20px;
  padding: 7px 20px;
  background: color-mix(in srgb, var(--next) 58%, transparent);
  border-radius: 0 0 11px 11px;
}

.widget-footer:empty {
  display: none;
}

.vacation-footer {
  display: grid;
  gap: 5px;
  align-items: center;
}

.widget-badge {
  position: absolute;
  top: 18px;
  right: 20px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--next);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}

.vacation-progress {
  width: 100%;
  height: 7px;
  accent-color: var(--accent);
}

.summary > section {
  position: relative;
}

.week-controls {
  display: flex;
  gap: 8px;
}

.week-controls button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 14px;
}

.week-controls button:hover {
  border-color: var(--accent);
  background: var(--next);
  color: var(--accent-ink);
}

.today-board {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 16px;
  box-shadow: var(--shadow);
}

.daily-tools {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  align-items: stretch;
  gap: 14px;
  margin-top: 28px;
}

.today-board h2 {
  margin: 4px 0 0;
  font-size: 23px;
}

.backpack-board {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.backpack-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.backpack-heading h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

#backpack-date {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.backpack-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--next) 62%, transparent);
}

.backpack-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-ink);
  font-size: 13px;
}

.backpack-progress progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}

.quiet-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 10px;
}

.quiet-button:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.backpack-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 8px 16px;
}

.backpack-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}

.backpack-item input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.backpack-item input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.today-lessons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 10px;
}

.today-lessons .lesson {
  min-height: 62px;
}

.reminder {
  margin: 0;
  border-left: 4px solid var(--accent);
  background: var(--next);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 12px 14px;
}

#break-countdown {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
}

#weather-widget {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.action-notice {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  max-width: min(320px, calc(100vw - 32px));
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--next);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
}

.day-tabs {
  display: none;
  gap: 8px;
  margin: 28px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-tabs button {
  flex: 0 0 auto;
  min-width: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 14px;
}

.day-tabs button[aria-current="date"],
.day-tabs button:hover {
  border-color: var(--accent);
  background: var(--next);
  color: var(--accent-ink);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.weekly-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  margin-bottom: 12px;
}

.weekly-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.weekly-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 721px) {
  .schedule-grid {
    margin-top: 28px;
  }
}

.day-card {
  grid-column: span 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  overflow: hidden;
}

.day-card.is-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(31, 111, 99, 0.18);
}

.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
  border-bottom: 0;
  background: transparent;
}

html[data-theme="dark"] .day-head {
  background: transparent;
}

.day-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
}

.day-card.is-today .day-head h2 {
  color: var(--accent-ink);
}

.day-card.is-today .day-head h2::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
}

.day-card.is-today .day-head span {
  color: var(--accent-ink);
}

.day-head > div {
  min-width: 0;
}

.day-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--next);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}

.day-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.lessons {
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
}

.short-day-note {
  margin: 0 10px 12px;
  padding: 11px 8px;
  border-radius: 11px;
  background: var(--next);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
}

.lesson {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-width: 0;
  min-height: 53px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.lesson.subject-math {
  background: var(--math);
}

.lesson.subject-russian {
  background: var(--russian);
}

.lesson.subject-reading {
  background: var(--reading);
}

.lesson.subject-english {
  background: var(--english);
}

.lesson.subject-pe {
  background: var(--pe);
}

.lesson.subject-world {
  background: var(--world);
}

.lesson.subject-art {
  background: var(--art);
}

.lesson.subject-music {
  background: var(--music);
}

.lesson.subject-labor {
  background: var(--labor);
}

.lesson.subject-important {
  background: #dce9e4;
}

html[data-theme="dark"] .lesson.subject-important {
  background: #25453e;
}

.lesson.is-current {
  border-color: #c59b16;
  background: var(--active);
  box-shadow: 0 0 0 2px rgba(197, 155, 22, 0.2), 0 8px 22px rgba(91, 72, 10, 0.14);
  position: relative;
}

.lesson.is-next {
  border-color: var(--accent);
  background: var(--next);
}

.breakfast-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 32px;
  padding-block: 7px;
  border-color: #d8c28b;
  background: #ffffff;
  color: var(--ink);
}

.breakfast-card .lesson-icon {
  color: #a36500;
}

html[data-theme="dark"] .breakfast-card {
  border-color: #6c6041;
  background: #1d2321;
  color: var(--ink);
}

html[data-theme="dark"] .breakfast-card .lesson-icon {
  color: #ffd06c;
}

.empty-slot {
  border-style: dashed;
  background: #ffffff;
  color: var(--muted);
}

.empty-slot .lesson-icon {
  color: var(--muted);
}

.time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  white-space: nowrap;
}

.lesson-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.lesson .time-line .lesson-icon {
  display: none;
}

.lesson .time-line .time {
  font-size: 12px;
  line-height: 1;
}

.lesson .subject-line .lesson-icon {
  order: 2;
  width: 18px;
  height: 18px;
}

.lesson .subject-line .subject {
  font-size: 13px;
  line-height: 1.15;
}

.breakfast-card .time-line {
  grid-column: 1;
  grid-row: 1;
}

.breakfast-card .subject-line {
  grid-column: 2;
  grid-row: 1;
}

.breakfast-card .subject-line .subject {
  display: inline;
  color: #8b5a00;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.lesson-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--accent-ink);
}

.lesson-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.subject {
  min-width: 0;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.current-badge {
  justify-self: end;
  border: 1px solid #c59b16;
  border-radius: 999px;
  background: #fff8d5;
  color: #694d00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

html[data-theme="dark"] .current-badge {
  background: #5c4e19;
  color: #fff3b0;
}

.empty {
  padding: 18px 16px;
  color: var(--muted);
}

.vacation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.vacation-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: start;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  padding: 16px;
}

.vacation-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--next);
  font-size: 34px;
  line-height: 1;
}

.vacation-card-content {
  min-width: 0;
}

.vacation-card.is-current {
  border-color: var(--accent);
  background: var(--next);
}

.vacation-card h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.vacation-card p {
  margin: 0;
  color: var(--muted);
}

.vacation-description {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.vacation-days {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  padding: 24px;
  box-shadow: var(--shadow);
}

.info-card h2::before {
  display: inline-block;
  margin-right: 9px;
  color: var(--accent);
  font-size: 0.85em;
}

.info-card[aria-labelledby="school-title"] h2::before {
  content: "▦";
}

.info-card[aria-labelledby="staff-title"] h2::before {
  content: "♙";
}

.summary + .info-card {
  margin-top: 28px;
}

.info-card + .info-card {
  margin-top: 20px;
}

.site-info-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.site-info-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 250px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .site-info-panel {
  background: #1d2321;
}

.site-info-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 17px;
}

.site-info-panel h2 span {
  color: var(--accent);
  font-size: 21px;
}

.site-info-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.site-info-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.35;
}

.site-info-panel li {
  padding-left: 16px;
  position: relative;
}

.site-info-panel li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.site-info-panel small {
  display: inline;
  float: right;
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 360px) {
  .site-info-panel small {
    display: block;
    float: none;
    margin: 2px 0 0;
  }
}

.site-info-panel footer {
  width: auto;
  margin: auto 0 0;
  padding: 14px 0 0;
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
}

.teacher-highlight {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 11px;
  background: var(--next);
}

.teacher-highlight span {
  color: var(--muted);
  font-size: 12px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 14px;
}

.info-card h2 {
  font-size: 25px;
}

.info-card h3 {
  margin-top: 20px;
  font-size: 18px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.info-list div,
.teacher-list article {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--next) 42%, transparent);
}

.info-list div:first-child {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.info-list dt::before {
  display: inline-block;
  width: 20px;
  margin-right: 5px;
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

.info-list div:nth-child(1) dt::before { content: "▦"; }
.info-list div:nth-child(2) dt::before { content: "⌂"; }
.info-list div:nth-child(3) dt::before { content: "⌖"; }
.info-list div:nth-child(4) dt::before { content: "◷"; }
.info-list div:nth-child(5) dt::before { content: "☎"; }
.info-list div:nth-child(6) dt::before { content: "⌘"; }

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
}

.info-list a {
  color: var(--accent);
}

.teacher-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.teacher-list strong,
.teacher-list span {
  line-height: 1.45;
}

.teacher-list span {
  color: var(--muted);
}

footer {
  width: min(1440px, 100%);
  margin: auto auto 0;
  padding: 0 clamp(12px, 3vw, 28px) 28px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.footer-school {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.footer-school strong {
  color: var(--ink);
  font-size: 16px;
}

.footer-school span,
.footer-school a,
.developer {
  min-width: 0;
  color: var(--muted);
}

.footer-school a,
.developer a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.developer {
  display: grid;
  gap: 6px;
  justify-self: end;
  align-self: start;
  text-align: right;
  white-space: nowrap;
}

.footer-icon {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .site-header {
    border-bottom: 0;
  }

  .summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .daily-tools {
    grid-template-columns: 1fr;
  }

  .schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vacation-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-info-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-card,
  .day-card:nth-child(4),
  .day-card:nth-child(5) {
    grid-column: auto;
  }
}

@media (min-width: 1025px) {
  .site-header {
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: #fffdf8;
  }

  .header-inner {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .site-header.is-compact {
    padding: 0;
  }

  .menu-button {
    display: none;
  }

  .schedule-grid {
    gap: 28px 24px;
  }
}

@media (min-width: 1025px) and (max-width: 1180px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) minmax(420px, auto);
  }

  .header-side {
    justify-items: end;
  }

  .header-row {
    justify-content: flex-end;
  }

  .summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .site-header {
    position: static;
  }

  .header-inner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .header-side {
    align-self: stretch;
    justify-items: stretch;
  }

  .header-row {
    display: flex;
    justify-content: flex-end;
  }

  .info-list,
  .teacher-list {
    grid-template-columns: 1fr;
  }

  .header-row .top-nav {
    display: none;
  }

  #share-page,
  #install-app,
  #print-page,
  #theme-toggle {
    display: none;
  }

  .site-menu,
  .site-menu.is-compact {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    padding: 10px;
  }

  .site-menu-nav {
    display: grid;
    gap: 3px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }

  .site-menu-actions {
    padding-top: 6px;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    border-bottom: 0;
  }

  .header-inner {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .header-row .top-nav {
    display: none;
    margin-left: 0;
  }

  .header-actions {
    flex: 0 0 auto;
  }

  .header-row {
    align-items: center;
    display: flex;
    justify-content: flex-end;
  }

  .top-nav a {
    flex: 1 1 130px;
  }

  .site-menu {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    padding: 10px;
  }

  .site-menu.is-compact {
    top: 10px;
  }

  .site-menu-nav {
    display: grid;
    gap: 3px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }

  .site-menu-actions {
    padding-top: 6px;
  }

  .now-panel {
    min-width: 0;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .week-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .week-controls button {
    padding-inline: 8px;
  }

  .today-lessons {
    grid-template-columns: 1fr;
  }

  .backpack-list {
    grid-template-columns: 1fr;
  }

  .vacation-card {
    grid-template-columns: 1fr;
  }

  .info-list div,
  .teacher-list article {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .summary > * {
    min-height: 70px;
  }

  .day-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .weekly-heading {
    display: grid;
    gap: 12px;
  }

  .day-tabs {
    display: flex;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .vacation-list {
    grid-template-columns: 1fr;
  }

  .site-info-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .site-header {
    padding: 10px 10px 0;
  }

  .header-inner {
    align-items: center;
    gap: 12px;
    padding: 12px;
  }

  .brand-lockup {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 9px;
  }

  .brand-text-link {
    width: 100%;
    min-width: 0;
  }

  .brand-title {
    width: auto;
  }

  .schedule-label {
    white-space: normal;
  }

  .school-logo {
    width: 40px;
    height: 40px;
  }

  h1 {
    font-size: 25px;
    line-height: 1.1;
  }

  .kicker,
  .week-label,
  .summary-label,
  .now-label {
    font-size: 12px;
  }

  .header-row {
    justify-content: flex-end;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .icon-button svg {
    width: 20px;
    height: 20px;
  }

  .now-panel {
    min-width: 0;
  }

  .now-panel strong {
    font-size: 26px;
  }

  main {
    padding-inline: 10px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .now-panel,
  .summary > *,
  .today-board,
  .backpack-board,
  .info-card {
    padding: 12px;
  }

  .widget-footer {
    margin-right: -12px;
    margin-left: -12px;
    margin-bottom: -12px;
    padding-inline: 12px;
  }

  .week-controls {
    gap: 6px;
  }

  .week-controls button {
    font-size: 12px;
    padding: 10px 6px;
    min-width: 0;
  }

  .day-tabs button {
    min-width: 104px;
    padding: 10px 8px;
  }

  .day-head {
    padding: 12px;
  }

  .lessons {
    padding: 10px;
  }

  .lesson {
    gap: 8px;
    padding: 9px;
  }

  .time {
    font-size: 13px;
  }

  .subject {
    font-size: 14px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .developer {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .brand-lockup {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .school-logo {
    width: 38px;
    height: 38px;
  }

  .brand-title {
    font-size: 20px;
  }
}

@media (max-width: 340px) {
  .top-nav a {
    flex-basis: 92px;
    font-size: 13px;
  }

  .lesson {
    gap: 7px;
  }

  .time,
  .subject {
    font-size: 13px;
  }

  .subject-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .current-badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }
}

@media (max-width: 320px) {
  main {
    padding-inline: 8px;
  }

  .site-header {
    padding-inline: 8px;
  }

  .header-inner {
    padding: 10px;
  }

  .summary > *,
  .today-board,
  .backpack-board,
  .info-card {
    padding-inline: 10px;
  }

  .lesson {
    padding-inline: 8px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html {
    color-scheme: light;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 9px;
  }

  .site-header,
  .header-inner,
  main,
  footer {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 2px solid #000000;
    padding-bottom: 5mm;
  }

  .brand-lockup {
    grid-template-columns: 34px 1fr;
    gap: 8px;
  }

  .school-logo {
    width: 34px;
    height: 34px;
  }

  .top-nav,
  .header-actions,
  .now-panel,
  .today-board,
  .backpack-board,
  .week-controls,
  .day-tabs,
  .summary,
  footer {
    display: none;
  }

  h1 {
    font-size: 20px;
    margin: 2px 0;
  }

  .kicker,
  .week-label {
    font-size: 9px;
  }

  main {
    padding-top: 5mm;
  }

  .schedule-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 3mm;
  }

  .day-card,
  .lesson,
  .summary,
  .summary > *,
  .info-card {
    border-color: #000000;
    box-shadow: none;
  }

  .info-card {
    break-inside: avoid;
    margin-top: 12px;
  }

  .day-card {
    break-inside: avoid;
    min-height: 0;
  }

  .day-head {
    padding: 5px 6px;
  }

  .day-head h2 {
    font-size: 12px;
  }

  .day-head span {
    font-size: 8px;
  }

  .lessons {
    gap: 4px;
    padding: 5px;
  }

  .lesson {
    background: #ffffff;
    gap: 2px;
    min-height: 0;
    padding: 5px;
  }

  .lesson-line {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 4px;
  }

  .lesson-icon,
  .lesson-icon svg {
    width: 12px;
    height: 12px;
  }

  .time,
  .subject {
    font-size: 8px;
    line-height: 1.2;
  }

  .current-badge {
    display: none;
  }
}
