:root {
  color-scheme: light;
  --bg: #e4edf1;
  --sheet: #f7fafc;
  --bg-2: #eef4f7;
  --ink: #1b2530;
  --muted: #5c6b78;
  --line: #cfdbe3;
  --line-strong: #24303a;
  --accent: #1e6f86;
  --on-accent: #f3fbfc;
  --danger: #c2473b;
  --ok: #2c7a52;
  --badge: #c2473b;
  --today: #1e6f86;
  --today-fg: #f3fbfc;
  --lecture: #2d8a58;
  --lecture-bg: #e8f6ee;
  --practice: #c48a16;
  --practice-bg: #fbf3e0;
  --lab: #6a5aa8;
  --lab-bg: #f1eef8;
  --credit: #2a7fb3;
  --credit-bg: #e7f3fa;
  --exam: #c2473b;
  --exam-bg: #faeeec;
  --other: #667280;
  --other-bg: #eef1f4;
  --window: #7d8894;
  --window-bg: #f3f5f7;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, ui-monospace, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1116;
  --sheet: #161c23;
  --bg-2: #1e262e;
  --ink: #e8eef3;
  --muted: #9aa7b4;
  --line: #2c3640;
  --line-strong: #d5dee6;
  --accent: #5eb4c8;
  --on-accent: #0c1518;
  --danger: #e07a72;
  --ok: #7dca9a;
  --badge: #e07a72;
  --today: #3d8fa4;
  --today-fg: #f3fbfc;
  --lecture: #6ecb96;
  --lecture-bg: #173024;
  --practice: #e0b45a;
  --practice-bg: #2c2414;
  --lab: #a99be0;
  --lab-bg: #242036;
  --credit: #6eb6e0;
  --credit-bg: #152734;
  --exam: #e07a72;
  --exam-bg: #2d1c1b;
  --other: #8b97a4;
  --other-bg: #1c232a;
  --window: #8b97a4;
  --window-bg: #1c232a;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]),
  html[data-theme="system"] {
    color-scheme: dark;
    --bg: #0d1116;
    --sheet: #161c23;
    --bg-2: #1e262e;
    --ink: #e8eef3;
    --muted: #9aa7b4;
    --line: #2c3640;
    --line-strong: #d5dee6;
    --accent: #5eb4c8;
    --on-accent: #0c1518;
    --danger: #e07a72;
    --ok: #7dca9a;
    --badge: #e07a72;
    --today: #3d8fa4;
    --today-fg: #f3fbfc;
    --lecture: #6ecb96;
    --lecture-bg: #173024;
    --practice: #e0b45a;
    --practice-bg: #2c2414;
    --lab: #a99be0;
    --lab-bg: #242036;
    --credit: #6eb6e0;
    --credit-bg: #152734;
    --exam: #e07a72;
    --exam-bg: #2d1c1b;
    --other: #8b97a4;
    --other-bg: #1c232a;
    --window: #8b97a4;
    --window-bg: #1c232a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.wrap {
  width: min(880px, calc(100% - 32px));
  margin: 24px auto 48px;
  padding: 28px 32px 40px;
  background: var(--sheet);
  border: 1px solid var(--line-strong);
}

.wrap--wide {
  width: min(1120px, calc(100% - 32px));
}

.kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.brand h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.brand .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hello {
  font-size: 0.92rem;
  margin-right: 4px;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}

.btn:active,
.icon-btn:active,
.weekbar button:active,
.variants button:active,
.seg button:active {
  transform: translateY(1px);
}

.btn:hover,
.icon-btn:hover,
.seg button:hover,
.variants button:hover,
.nav button:hover {
  background: var(--bg-2);
}

.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn.primary:hover {
  filter: none;
  background: var(--ink);
  color: var(--sheet);
}

.theme-fab {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5;
  background: var(--sheet);
}

.btn.wide { width: 100%; }

.btn.danger { color: var(--danger); border-color: currentColor; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  min-width: 36px;
  height: 36px;
  padding: 0;
  position: relative;
}

.icon-btn svg { display: block; }

.theme-btn svg { display: none; }
html[data-theme-pref="system"] .theme-btn .theme-icon-system,
html:not([data-theme-pref]) .theme-btn .theme-icon-system,
html[data-theme-pref="light"] .theme-btn .theme-icon-light,
html[data-theme-pref="dark"] .theme-btn .theme-icon-dark { display: block; }

.bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--badge);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  animation: pop .22s ease;
}

.bell-badge.hidden { display: none; animation: none; }

.tg-ico { display: block; }

.variants {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  margin-top: 18px;
}

.variants button {
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  min-height: 48px;
  padding: 10px 8px;
  cursor: pointer;
  font-size: 0.98rem;
  transition: background-color .18s ease, color .18s ease;
}

.variants button:last-child { border-right: 0; }

.variants button.active {
  color: var(--on-accent);
  font-weight: 600;
  background: var(--accent);
}

.drawer {
  display: grid;
  grid-template-rows: 1fr;
  padding: 14px 16px 8px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  background: var(--bg-2);
  overflow: hidden;
  transition: grid-template-rows .28s ease, padding .28s ease, border-color .2s ease;
}

.drawer-inner { min-height: 0; overflow: hidden; }

.drawer.hidden {
  display: grid !important;
  grid-template-rows: 0fr;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}

.hidden { display: none !important; }

.pref {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 10px 16px;
  align-items: center;
  padding: 8px 0;
}

.pref > span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
}

.seg button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color .18s ease, color .18s ease;
}

.seg button:last-child { border-right: 0; }

.seg button.active {
  background: var(--accent);
  color: var(--on-accent);
}

.weekbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin: 16px 0 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}

.weekbar button {
  border: 1px solid var(--line-strong);
  background: var(--sheet);
  color: var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color .18s ease, transform .12s ease;
}

.weekbar button:hover { background: var(--bg-2); }

#week, .week {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

#week.tick { animation: rise .28s ease; }

.sync {
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0 0 16px;
}

.day {
  border: 1px solid var(--line-strong);
  margin: 0 0 12px;
  background: var(--sheet);
  animation: rise .38s ease both;
}

.day:nth-child(1) { animation-delay: .02s; }
.day:nth-child(2) { animation-delay: .05s; }
.day:nth-child(3) { animation-delay: .08s; }
.day:nth-child(4) { animation-delay: .11s; }
.day:nth-child(5) { animation-delay: .14s; }
.day:nth-child(6) { animation-delay: .17s; }
.day:nth-child(7) { animation-delay: .2s; }

.day.today {
  box-shadow: inset 3px 0 0 var(--today);
  border-color: var(--today);
}

.day.today .day-head {
  background: var(--today);
  color: var(--today-fg);
}

.day.today .day-head:hover { background: var(--today); filter: brightness(1.08); }

.day.today .day-date,
.day.today .day-count,
.day.today .day-toggle,
.day.today .day-title {
  color: var(--today-fg);
}

.day.past:not(.today) .day-title { color: var(--muted); }

.day.past:not(.today) .lesson,
.day.past:not(.today) .window {
  opacity: 0.58;
}

.day-head {
  width: 100%;
  border: 0;
  background: var(--bg-2);
  color: inherit;
  display: grid;
  grid-template-columns: 1fr auto auto 1.1rem;
  gap: 12px;
  align-items: baseline;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease;
}

.day-head:hover { background: var(--line); }

.day:not(.collapsed) .day-head {
  border-bottom: 1px solid var(--line);
}

.day-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.day-date,
.day-count,
.day-toggle {
  color: var(--muted);
  font-size: 0.92rem;
}

.day-toggle {
  font-family: var(--mono);
  min-width: 1rem;
  text-align: right;
  transition: transform .2s ease;
}

.day.collapsed .day-toggle { transform: rotate(0deg); }

.day-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .28s ease;
}

.day.collapsed .day-body { grid-template-rows: 0fr; }

.day-inner {
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px 12px;
  transition: padding .28s ease;
}

.day.collapsed .day-inner { padding-top: 0; padding-bottom: 0; }

.lesson {
  --type: var(--other);
  --type-bg: var(--other-bg);
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 6px 18px;
  padding: 14px 16px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-left-color: var(--type);
  background: var(--type-bg);
  animation: rise .32s ease both;
}

.lesson.lecture { --type: var(--lecture); --type-bg: var(--lecture-bg); }
.lesson.practice { --type: var(--practice); --type-bg: var(--practice-bg); }
.lesson.lab { --type: var(--lab); --type-bg: var(--lab-bg); }
.lesson.credit { --type: var(--credit); --type-bg: var(--credit-bg); }
.lesson.exam { --type: var(--exam); --type-bg: var(--exam-bg); }
.lesson.other { --type: var(--other); --type-bg: var(--other-bg); }

.lesson.current {
  border-color: var(--type);
  box-shadow: inset 0 0 0 1px var(--type);
}

.now-flag {
  display: none;
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--type, var(--today));
}

.lesson.current .now-flag,
.window.current .now-flag { display: inline; }

.kind {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 7px;
  margin-right: 8px;
  color: var(--type);
  border: 1px solid var(--type);
  vertical-align: baseline;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  margin: 0 0 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-item::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--swatch, var(--muted));
}

.legend-item.lecture { --swatch: var(--lecture); }
.legend-item.practice { --swatch: var(--practice); }
.legend-item.lab { --swatch: var(--lab); }
.legend-item.credit { --swatch: var(--credit); }
.legend-item.exam { --swatch: var(--exam); }

.when {
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
}

.when .time { color: var(--ink); display: block; font-weight: 500; }

.when .pair {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--type, var(--muted));
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subject {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.92rem;
}

.window {
  --type: var(--window);
  color: var(--muted);
  font-style: italic;
  font-size: 0.92rem;
  padding: 10px 14px;
  margin: 8px 0;
  border: 1px dashed var(--window);
  background: var(--window-bg);
}

.window.current {
  color: var(--ink);
  font-style: normal;
  border-style: solid;
  border-color: var(--window);
}

.empty {
  color: var(--muted);
  padding: 10px 4px 6px;
  font-style: italic;
}

.notice {
  padding: 22px 16px;
  color: var(--muted);
  border: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 18, 24, 0.48);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  width: min(520px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 22px 22px 24px;
  transform: translateY(-10px);
  transition: transform .22s ease;
}

.modal-backdrop.open .modal-card { transform: none; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
}

.announcement-text { white-space: pre-wrap; font-size: 1rem; line-height: 1.5; }

.announcement-date {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}

.history-list { display: flex; flex-direction: column; gap: 0; }

.history-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.history-empty { color: var(--muted); padding: 8px 0; font-style: italic; }

.auth-sheet {
  width: min(440px, calc(100% - 32px));
  margin: 12vh auto 0;
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  padding: 32px 28px 36px;
}

.auth-sheet h1,
.login-gate h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.lede {
  color: var(--muted);
  margin: 0 0 28px;
}

.auth-status {
  margin: 14px 0 0;
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-status.bad { color: var(--danger); }

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.id-login .hint {
  margin: 0 0 10px;
  font-size: 0.88rem;
}

.id-login .note {
  margin: 10px 0 0;
  font-size: 0.82rem;
}

.alt {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.alt summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
}

.alt summary::-webkit-details-marker { display: none; }

.alt .field { margin-top: 14px; }

.field {
  display: flex;
  gap: 0;
  border: 1px solid var(--line-strong);
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  outline: none;
}

.field .btn {
  border: 0;
  border-left: 1px solid var(--line-strong);
}

.text-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.text-link:hover { color: var(--accent); }

.muted { color: var(--muted); }

.good { color: var(--ok); }
.bad { color: var(--danger); }
.mono { font-family: var(--mono); font-size: 0.78rem; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.top h1 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

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

.card {
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 18px;
  margin: 16px 0;
}

.card h2, .card h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.tabs {
  display: flex;
  gap: 0;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin-top: 4px;
}

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  padding: 12px 14px;
  white-space: nowrap;
  cursor: pointer;
}

.tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
  font-weight: 600;
}

.section { display: none; }
.section.active { display: block; }

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

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

label { display: block; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

input, select, textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 9px 10px;
}

textarea { min-height: 150px; resize: vertical; }

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.stat {
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.stat:last-child { border-right: 0; }

.stat b { display: block; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin-top: 4px; color: var(--accent); }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
}

table { border-collapse: collapse; width: 100%; min-width: 750px; }

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: var(--bg-2);
  position: sticky;
  top: 0;
}

td input[type="checkbox"] { width: auto; margin: 0; }
td input, td select { margin: 0; min-width: 105px; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--ink);
  color: var(--sheet);
  padding: 10px 14px;
  border-radius: 0;
  max-width: 360px;
  z-index: 10;
  font-size: 0.88rem;
}

.login-gate {
  position: relative;
  width: min(440px, 100%);
  margin: 8vh auto 0;
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  padding: 32px 28px 36px;
}

.login-gate .theme-fab {
  position: absolute;
  top: 12px;
  right: 12px;
}

.wrap,
.auth-sheet,
.login-gate {
  animation: sheet-in .45s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { transform: scale(.55); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 20px, 880px); margin: 12px auto 28px; padding: 18px 14px 28px; }
  .masthead, .top { align-items: flex-start; flex-wrap: wrap; }
  .account { width: 100%; justify-content: flex-start; }
  .pref { grid-template-columns: 1fr; gap: 6px; }
  .weekbar { grid-template-columns: 1fr 1fr; }
  .weekbar #week, .weekbar .week { grid-column: 1 / -1; order: -1; text-align: left; }
  .weekbar .sync { text-align: left; }
  .lesson { grid-template-columns: 1fr; gap: 6px; }
  .grid, .grid3, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .variants { grid-template-columns: repeat(3, 1fr); }
  .variants button { font-size: 0.84rem; padding: 10px 4px; }
  .auth-sheet, .login-gate { padding: 22px 18px 28px; }
}

@media (max-width: 560px) {
  .day-head { grid-template-columns: 1fr auto 1.1rem; }
  .day-count { display: none; }
}
