:root {
  --canvas: #f0eff0;
  --surface: #fff;
  --surface-muted: #f8f9fa;
  --navy: #1a1b1e;
  --ink: #1a1b1e;
  --muted: #5c5f66;
  --teal: #1971c2;
  --teal-dark: #1864ab;
  --pale: #e7f5ff;
  --paper: var(--canvas);
  --line: #dee2e6;
  --white: var(--surface);
  --amber: #8a5a00;
  --amber-pale: #fff9db;
  --focus: #1c7ed6;
  --accent: #1971c2;
  --accent-hover: #1864ab;
  --accent-text: #1864ab;
  --accent-soft: #e7f5ff;
  --accent-line: #a5d8ff;
  --warning-text: #8a5a00;
  --warning-soft: #fff9db;
  --warning-line: #ffe066;
  --radius: 12px;
  --shadow-sm: 0 1px 2px #1018280a;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
button,
input,
a {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--accent-text);
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.025em;
}
svg.icon {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}
span[data-icon] {
  display: inline-flex;
  flex-shrink: 0;
}
strong {
  font-weight: 650;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  padding: 12px;
  background: white;
  z-index: 20;
}
.skip-link:focus {
  top: 12px;
}
.topbar {
  height: 68px;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1504px) / 2));
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 1;
  min-width: 0;
}
.wordmark > strong {
  display: none;
}
.wordmark-label {
  font-size: 12px;
  letter-spacing: 0.01em;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  color: var(--muted);
  white-space: nowrap;
}
.wordmark-logo {
  display: block;
  height: 38px;
  width: auto;
  flex-shrink: 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.icon-pill {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-pill:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: #ced4da;
}
.icon-pill .icon {
  width: 18px;
  height: 18px;
}
.info-pill {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.info-pill .icon {
  color: var(--accent-text);
}
.info-pill:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--accent-text);
}
.status-dot,
.tiny-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--accent);
  flex-shrink: 0;
}
.timezone {
  display: none;
}
.app-shell {
  max-width: 1560px;
  margin: auto;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}
.rail {
  padding: 30px 20px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--surface-muted);
}
.eyebrow {
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.class-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-height: 64px;
  width: 100%;
  padding: 11px 13px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.class-switch:hover:not(:disabled) {
  border-color: var(--accent-line);
}
.class-switch[data-mode='class'] {
  --browse-cube: #2f9e44;
  --browse-cube-glow: rgb(47 158 68 / 55%);
}
.class-switch[data-mode='lecturer'] {
  --browse-cube: #e03131;
  --browse-cube-glow: rgb(224 49 49 / 55%);
}
.class-switch-icon .icon,
.class-switch-arrows .icon {
  width: 17px;
  height: 17px;
}
.class-switch-icon .icon {
  color: var(--browse-cube);
  animation: browse-cube-glow 2.8s ease-in-out infinite;
}
.class-switch-icon .cube-face {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.1;
}
.class-switch-icon .cube-top {
  fill-opacity: 0.48;
}
.class-switch-icon .cube-left {
  fill-opacity: 0.72;
}
@keyframes browse-cube-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 1px var(--browse-cube-glow));
  }
  50% {
    filter: drop-shadow(0 0 6px var(--browse-cube-glow));
  }
}
.class-switch-copy {
  min-width: 0;
  flex: 1;
}
.class-switch-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}
.class-switch-copy small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.class-switch-arrows {
  margin-left: auto;
  color: var(--teal);
}
.rail-menu {
  margin-top: 32px;
}
.menu-label {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 650;
}
.menu-label .icon {
  width: 17px;
}
.menu-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: auto;
}
.rail-menu p {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 2px 0;
  line-height: 1.6;
}
.calendar-card {
  margin-top: 36px;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.calendar-card-icon {
  display: flex;
  background: var(--accent-soft);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.calendar-card h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.calendar-card p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 8px 0 16px;
}
.calendar-card small {
  display: block;
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 10px;
}
.calendar-card .button {
  font-size: 11px;
  gap: 6px;
  padding: 10px;
  min-height: 40px;
  background: var(--accent);
  color: #fff;
}
.calendar-card .button:hover:not(:disabled) {
  background: var(--accent-hover);
}
.calendar-card .button svg {
  width: 16px;
}
.rail-bottom {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding-top: 40px;
  color: var(--muted);
}
.rail-bottom .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.rail-bottom strong {
  font-size: 11px;
  color: var(--ink);
}
.rail-bottom p {
  font-size: 10px;
  line-height: 1.8;
  margin: 7px 0 9px;
}
.text-button {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-text);
  font-size: 11px;
  text-decoration: none;
  min-height: 32px;
}
.text-button:hover {
  text-decoration: underline;
}
.text-button .icon {
  width: 15px;
  height: 15px;
}
.rail-bottom .text-button {
  font-size: 10px;
}
main {
  padding: 26px 30px 28px;
  min-width: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  min-height: 40px;
  padding: 9px 14px;
  white-space: nowrap;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.button .icon {
  width: 16px;
  height: 16px;
}
.full {
  width: 100%;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
}
.summary-item:last-child {
  border-right: 0;
}
.summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
}
.summary-item strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.summary-label {
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}
.summary-item .summary-icon .icon {
  width: 17px;
  height: 17px;
}
.planner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.planner-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.planner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.week-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.icon-button {
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
}
.icon-button:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: var(--accent-line);
}
.icon-button .icon {
  width: 16px;
  height: 16px;
}
.previous svg {
  transform: rotate(180deg);
}
.week-title {
  position: relative;
  flex: 0 0 190px;
  width: 190px;
  min-width: 0;
  text-align: center;
}
.week-title strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.week-title input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.week-title:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
.today-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--surface);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
.today-button:hover:not(:disabled) {
  background: var(--surface-muted);
}
.view-switch {
  display: flex;
  gap: 2px;
  background: var(--surface-muted);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.view-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 11px;
  min-height: 30px;
  border-radius: 6px;
  color: var(--muted);
}
.view-switch button:hover {
  color: var(--ink);
}
.view-switch .icon {
  width: 13px;
  height: 13px;
}
.view-switch .active {
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.planner-subbar {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.schedule-context {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.schedule-context .status-dot {
  background: var(--accent);
  width: 5px;
  height: 5px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 8px 10px;
  min-height: 38px;
}
.search-field .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.search-field input {
  border: 0;
  outline: none;
  background: transparent;
  min-width: 0;
  width: 100%;
  color: var(--ink);
  font-size: 12px;
}
.search-field:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: transparent;
}
.search-field input:focus-visible {
  outline: none;
}
.planner-subbar .search-field {
  width: 260px;
}
.schedule {
  min-height: 395px;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
}
.day-column {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 0 8px 16px;
  min-height: 395px;
  background: var(--surface);
}
.day-column:last-child {
  border-right: 0;
}
.day-column.weekend {
  background: var(--surface-muted);
}
.day-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--line);
  margin: 0 -8px 12px;
}
.day-heading span {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.day-heading strong {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  font-weight: 600;
}
.day-heading.current strong {
  background: var(--accent);
  color: #fff;
}
.day-heading.current span {
  color: var(--accent-text);
  font-weight: 650;
}
.day-exception {
  display: block;
  font-size: 10px;
  color: var(--warning-text);
  background: var(--warning-soft);
  border: 1px solid var(--warning-line);
  border-radius: 6px;
  padding: 5px;
  margin-bottom: 8px;
  line-height: 1.5;
}
.lesson {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #cfe3f7;
  background: #f5faff;
  border-radius: 8px;
  padding: 10px 9px 9px;
  margin-top: 8px;
  position: relative;
  transition:
    border-color 0.15s,
    background 0.15s;
  overflow-wrap: anywhere;
}
.lesson:hover {
  border-color: #74b3e8;
  background: #ecf6ff;
}
.lesson.alt {
  border-color: #e2e8f0;
  background: #f8f9fa;
}
.lesson.alt:hover {
  border-color: #adb5bd;
  background: #f1f3f5;
}
.lesson.warm {
  border-color: #f2dfb3;
  background: #fffbf0;
}
.lesson.warm:hover {
  border-color: #e0b264;
  background: #fff7e2;
}
.lesson-time {
  font-size: 11px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #1d6296;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.lesson-time .icon {
  width: 11px;
  height: 11px;
}
.lesson h3 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.lesson-meta {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 4px;
}
.lesson-meta .icon {
  width: 10px;
  height: 10px;
  margin-top: 2px;
}
.lesson-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  margin-top: 7px;
  padding-top: 7px;
}
.lesson .badge {
  font-size: 9px;
  padding: 3px 6px;
  margin-top: 7px;
  white-space: normal;
  line-height: 1.5;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-line);
}
.amber {
  background: var(--warning-soft);
  color: var(--warning-text);
  border-color: var(--warning-line);
}
.no-day {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 32px;
  line-height: 1.8;
}
.no-day > span {
  display: block;
  width: 5px;
  height: 5px;
  margin: 0 auto 10px;
  background: var(--line);
  border-radius: 50%;
}
.planner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  gap: 12px;
}
.planner-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tiny-dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
}
.below-planner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 1px;
}
.below-planner p {
  font-size: 10px;
  color: var(--muted);
}
.below-planner strong {
  color: var(--ink);
  font-weight: 500;
  margin-right: 5px;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 2px;
  padding: 14px 1px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.site-footer p {
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
}
.site-footer strong {
  color: var(--ink);
  font-weight: 600;
}
.site-footer .text-button {
  flex-shrink: 0;
  font-size: 11px;
}
.state-panel {
  padding: 65px 22px;
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}
.state-panel h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 19px 0 10px;
}
.state-panel p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 375px;
  margin: 0 auto 22px;
}
.state-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pale);
  width: 66px;
  height: 66px;
  border-radius: 19px;
  color: var(--teal);
  margin: auto;
}
.state-illustration .icon {
  width: 28px;
  height: 28px;
}
.state-panel .button {
  min-width: 165px;
}
.loading-spinner {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes theme-toggle-switch {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.86);
  }
}
@keyframes theme-icon-switch {
  from {
    transform: rotate(-90deg) scale(0.6);
    opacity: 0.2;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}
.theme-toggle.theme-switching {
  animation: theme-toggle-switch 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.theme-toggle.theme-switching .icon {
  animation: theme-icon-switch 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes logo-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 2px rgb(255 255 255 / 60%)) drop-shadow(0 0 9px rgb(255 255 255 / 34%))
      drop-shadow(0 0 20px rgb(255 255 255 / 16%));
  }
  50% {
    filter: drop-shadow(0 0 3px rgb(255 255 255 / 74%)) drop-shadow(0 0 13px rgb(255 255 255 / 48%))
      drop-shadow(0 0 30px rgb(255 255 255 / 26%));
  }
}
.agenda-list {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.agenda-day-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.agenda-day-heading h2 {
  font-size: 17px;
  font-weight: 600;
}
.agenda-day-heading h2 span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 7px;
  font-weight: 400;
}
.agenda-events {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.agenda-events .lesson {
  margin: 0;
  padding: 16px;
}
.agenda-events .lesson-time {
  font-size: 11px;
  margin-bottom: 11px;
  color: var(--accent-text);
}
.agenda-events .lesson-time .icon {
  width: 13px;
  height: 13px;
}
.agenda-events .lesson h3 {
  font-size: 15px;
  margin-bottom: 11px;
}
.agenda-events .lesson-meta {
  font-size: 11px;
  gap: 7px;
}
.agenda-events .lesson-meta .icon {
  width: 13px;
  height: 13px;
}
.agenda-events .lesson-note {
  font-size: 10px;
}
.agenda-events .lesson .badge {
  font-size: 10px;
}
.day-strip,
.compact-class-row {
  display: none;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 540px;
  width: calc(100% - 36px);
  padding: 24px;
  color: var(--ink);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: var(--surface);
  box-shadow: 0 20px 60px #0f172a33;
}
.dialog::backdrop {
  background: #0f172a80;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}
.dialog-heading .eyebrow {
  margin-bottom: 7px;
}
.dialog h2 {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.2;
}
.dialog-heading .icon-button {
  border: 0;
  background: var(--paper);
  min-width: 36px;
  min-height: 36px;
}
.dialog-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.class-search {
  min-height: 52px;
  border-radius: 10px;
  background: var(--paper);
  margin-bottom: 8px;
}
.class-search input {
  font-size: 15px;
}
.class-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  max-height: 390px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.class-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
  min-height: 56px;
}
.class-option:hover,
.class-option.selected {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.class-option > span {
  min-width: 0;
}
.class-option strong {
  font-size: 15px;
  display: block;
  line-height: 1.3;
}
.class-option small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.class-option .icon {
  width: 16px;
  color: var(--teal);
}
.picker-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 24px 8px;
}
.export-class {
  padding: 15px 17px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  margin: 20px 0 16px;
}
.export-class strong {
  font-size: 15px;
  display: block;
}
.export-class p {
  font-size: 12.5px;
  color: var(--accent-text);
  margin-top: 5px;
}
.export-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
  padding: 14px;
  background: var(--amber-pale);
  border-radius: 11px;
  color: var(--amber);
  margin: 17px 0;
}
.export-notice .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.download-link {
  display: flex;
  text-decoration: none;
  font-size: 13px;
  min-height: 50px;
}
.download-link .icon {
  width: 19px;
  height: 19px;
}
.export-dialog details {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.export-dialog summary {
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  min-height: 25px;
}
.export-dialog details p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin-top: 10px;
}
.export-dialog details a {
  font-size: 13px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
}
.export-dialog details .icon {
  width: 12px;
  height: 12px;
}
.calendar-import-label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 25px;
}
.export-footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 19px;
}
.lesson-title-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.lesson-dialog h2 {
  font-size: 26px;
  margin-bottom: 8px;
}
.lesson-class {
  font-size: 12px;
  color: var(--accent-text);
  margin-bottom: 20px;
}
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.detail-row > .icon {
  color: var(--muted);
  width: 18px;
  height: 18px;
  margin-top: 3px;
}
.detail-row small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}
.detail-row strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.lesson-flags {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
}
.about-content p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
  margin: 17px 0;
}
.about-content a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  margin: 6px 0;
}
.about-content .icon {
  width: 13px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #1a1b1e;
  color: #f8f9fa;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 12px;
  max-width: calc(100% - 30px);
  box-shadow: 0 8px 30px #0f172a4d;
}
.noscript {
  position: fixed;
  bottom: 0;
  padding: 20px;
  background: var(--amber-pale);
  width: 100%;
  text-align: center;
}
.mobile-export {
  display: none;
}
@media (min-width: 1650px) {
  .day-column {
    padding: 0 11px 19px;
  }
  .day-heading {
    margin: 0 -11px 12px;
  }
  .lesson {
    padding: 13px 11px;
  }
  .lesson h3 {
    font-size: 13px;
  }
  .lesson-meta {
    font-size: 11px;
  }
  .lesson-time {
    font-size: 11px;
  }
  .lesson-note {
    font-size: 10px;
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .rail {
    padding: 32px 18px;
  }
  .calendar-card {
    padding: 20px 14px;
  }
  main {
    padding: 31px 23px;
  }
  .planner-toolbar {
    padding: 18px 15px;
    gap: 8px;
  }
  .week-controls {
    gap: 7px;
  }
  .week-title {
    flex-basis: 170px;
    width: 170px;
  }
  .today-button {
    padding: 7px 9px;
  }
  .view-switch button {
    padding: 7px 9px;
  }
  .planner-subbar {
    padding: 13px 15px;
  }
  .summary-item {
    padding: 10px 12px;
    gap: 7px;
  }
  .summary-item strong {
    font-size: 17px;
  }
  .lesson h3 {
    font-size: 12px;
  }
  .lesson-meta {
    font-size: 10px;
  }
  .lesson-time {
    font-size: 10px;
  }
  .day-column {
    padding-left: 6px;
    padding-right: 6px;
  }
  .day-heading {
    margin-left: -6px;
    margin-right: -6px;
  }
  .lesson {
    padding: 9px 6px;
  }
}
@media (max-width: 1000px) {
  .rail {
    display: none;
  }
  .app-shell {
    display: block;
    max-width: 960px;
  }
  main {
    padding: 25px 25px 40px;
  }
  .compact-class-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 25px;
  }
  .compact-class-row .class-switch {
    max-width: 330px;
    min-height: 60px;
  }
  .compact-class-row .class-switch small {
    font-size: 11px;
  }
  .compact-class-row .class-switch strong {
    font-size: 14px;
  }
  .calendar-card {
    display: none;
  }
  .planner-toolbar {
    padding: 20px;
  }
  .planner-subbar {
    padding: 14px 20px;
  }
  .day-column {
    padding-left: 8px;
    padding-right: 8px;
  }
  .day-heading {
    margin-left: -8px;
    margin-right: -8px;
  }
  .lesson h3 {
    font-size: 13px;
  }
  .lesson-meta {
    font-size: 10px;
  }
  .lesson-time {
    font-size: 10px;
  }
  .lesson {
    padding: 10px 8px;
  }
  .week-title {
    flex-basis: 170px;
    width: 170px;
  }
}
@media (max-width: 700px) {
  :root {
    font-size: 14px;
  }
  .topbar {
    height: 60px;
    padding: 0 16px;
    gap: 8px;
  }
  .wordmark {
    gap: 10px;
  }
  .wordmark-label {
    display: none;
  }
  .wordmark-logo {
    height: 32px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .icon-pill {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  main {
    padding: 22px 17px 116px;
  }
  .compact-class-row {
    margin-bottom: 25px;
  }
  .compact-class-row .class-switch {
    max-width: none;
    width: 100%;
    min-height: 64px;
    border-radius: 13px;
    padding: 12px 16px;
  }
  .compact-class-row .class-switch small {
    font-size: 11px;
  }
  .compact-class-row .class-switch strong {
    font-size: 14px;
  }
  .compact-class-row .class-switch .icon {
    width: 18px;
    height: 18px;
  }
  .summary {
    margin-bottom: 18px;
  }
  .summary-item {
    padding: 9px 8px;
    gap: 6px;
  }
  .summary-item .summary-icon .icon {
    width: 15px;
    height: 15px;
  }
  .summary-item strong {
    font-size: 16px;
  }
  .summary-label {
    font-size: 11px;
  }
  .planner {
    border-radius: 15px;
  }
  .planner-toolbar {
    padding: 13px 12px 11px;
    display: flex;
    gap: 8px;
  }
  .week-controls {
    gap: 5px;
    justify-content: flex-start;
    flex: 1;
  }
  .planner-actions {
    margin-left: auto;
    gap: 0;
  }
  .week-controls,
  .planner-actions {
    display: contents;
  }
  #previous-week {
    order: 1;
  }
  .week-title {
    order: 2;
  }
  #next-week {
    order: 3;
  }
  .share-week {
    order: 4;
  }
  #today-button {
    order: 5;
  }
  .share-week {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .share-week > span:last-child {
    display: none;
  }
  .icon-button {
    min-width: 44px;
    min-height: 44px;
  }
  .week-title {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
  }
  .week-title strong {
    font-size: 12px;
  }
  .today-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
  }
  .view-switch {
    display: none;
  }
  .planner-subbar {
    display: none;
  }
  .schedule-context {
    display: none;
  }
  .planner-subbar .search-field {
    width: 100%;
    min-height: 43px;
    border-radius: 9px;
  }
  .search-field input {
    font-size: 12px;
  }
  .day-strip {
    display: flex;
    padding: 3px 10px 12px;
    gap: 5px;
    overflow: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line);
    scroll-snap-type: x proximity;
  }
  .day-strip::-webkit-scrollbar {
    display: none;
  }
  .day-tab {
    flex: 1 0 42px;
    min-height: 61px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 10px;
    color: var(--muted);
    scroll-snap-align: start;
    font-size: 10px;
  }
  .day-tab strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
  }
  .day-tab.active {
    background: var(--accent);
    color: #fff;
  }
  .day-tab.active strong {
    color: #fff;
  }
  .day-tab .day-marker {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 1px;
  }
  .day-tab.active .day-marker {
    background: #d0ebff;
  }
  .day-tab.today:not(.active) {
    background: var(--pale);
  }
  .schedule {
    min-height: 280px;
  }
  .agenda-list {
    padding: 18px 13px;
    gap: 19px;
  }
  .agenda-day-heading {
    margin-bottom: 12px;
  }
  .agenda-day-heading h2 {
    font-size: 16px;
  }
  .agenda-day-heading h2 span {
    font-size: 10px;
    display: block;
    margin: 4px 0 0;
  }
  .agenda-day-heading .badge {
    font-size: 9px;
    max-width: 145px;
  }
  .agenda-events {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .agenda-events .lesson {
    border-radius: 11px;
    padding: 16px;
  }
  .agenda-events .lesson h3 {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 11px;
  }
  .agenda-events .lesson-meta {
    font-size: 11px;
    line-height: 1.7;
  }
  .agenda-events .lesson-time {
    font-size: 11px;
    color: var(--accent-text);
  }
  .agenda-events .lesson-note {
    font-size: 10px;
  }
  .agenda-events .lesson .badge {
    font-size: 10px;
  }
  .planner-footer {
    padding: 13px;
    font-size: 9px;
    display: block;
  }
  .planner-footer > span:last-child {
    display: block;
    margin-top: 5px;
    padding-left: 10px;
    font-size: 9px;
  }
  .below-planner {
    padding: 16px 0 5px;
    display: block;
  }
  .below-planner p {
    font-size: 10px;
    line-height: 1.8;
  }
  .below-planner .text-button {
    display: none;
  }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
    font-size: 10.5px;
  }
  .site-footer .text-button {
    font-size: 11px;
  }
  .mobile-export {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #ffffffef;
    backdrop-filter: blur(12px);
    z-index: 3;
  }
  .mobile-export > div {
    min-width: 0;
  }
  .mobile-export small {
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
  }
  .mobile-export strong {
    font-size: 11px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
  }
  .mobile-export .button {
    font-size: 10px;
    min-height: 46px;
    padding: 11px 13px;
    gap: 7px;
    border-radius: 10px;
  }
  .mobile-export .icon {
    width: 16px;
    height: 16px;
  }
  .dialog {
    padding: 24px 21px;
    border-radius: 20px;
    max-height: calc(100dvh - 40px);
  }
  .dialog h2 {
    font-size: 24px;
  }
  .dialog-heading .icon-button {
    min-width: 44px;
    min-height: 44px;
  }
  .dialog-description {
    font-size: 14px;
  }
  .export-dialog,
  .lesson-dialog {
    margin: auto 0 0;
    max-width: none;
    width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 92dvh;
    padding-bottom: max(25px, env(safe-area-inset-bottom));
  }
  .dialog-heading {
    margin-bottom: 18px;
  }
  .dialog-heading .eyebrow {
    font-size: 9px;
  }
  .export-dialog details summary {
    min-height: 32px;
    font-size: 13px;
  }
  .export-dialog details p {
    font-size: 13px;
  }
  .export-class strong {
    font-size: 16px;
  }
  .export-notice {
    font-size: 13px;
  }
  .export-class p {
    font-size: 12.5px;
  }
  .export-dialog .download-link {
    font-size: 14px;
    min-height: 50px;
  }
  .state-panel {
    padding: 43px 19px;
  }
  .state-panel h2 {
    font-size: 23px;
  }
  .state-panel p {
    font-size: 14px;
  }
  .state-panel .button {
    min-height: 46px;
    font-size: 13px;
  }
  .toast {
    bottom: 94px;
    min-width: 260px;
    text-align: center;
  }
}
@media (max-width: 360px) {
  .planner-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: 'prev date next' '. share today';
    align-items: center;
  }
  #previous-week {
    grid-area: prev;
  }
  .week-title {
    grid-area: date;
  }
  #next-week {
    grid-area: next;
  }
  #share-button {
    grid-area: share;
    justify-self: end;
  }
  #today-button {
    grid-area: today;
    justify-self: end;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
@media print {
  .topbar,
  .rail,
  .compact-class-row,
  .mobile-export,
  .view-switch,
  .below-planner,
  .header-actions,
  .planner-subbar,
  .planner-footer,
  .day-strip {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  main {
    padding: 0;
  }
  .planner {
    border: 0;
  }
  .planner-toolbar {
    padding: 15px 0;
  }
  .week-controls > button,
  .week-title input {
    display: none;
  }
  .summary {
    display: none;
  }
  .week-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .lesson {
    break-inside: avoid;
  }
  .agenda-events {
    grid-template-columns: 1fr;
  }
  body {
    background: white;
  }
}

@media (max-width: 360px) {
  .wordmark-label {
    display: none;
  }
  .day-tab {
    flex-basis: 44px;
  }
  .mobile-export strong {
    max-width: 145px;
  }
}
.mobile-source-group {
  display: contents;
}
.file-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.file-source-row > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.file-source-row > div:first-child > .icon {
  width: 16px;
  height: 16px;
}
.file-source-row #file-source-label {
  overflow-wrap: anywhere;
}
.file-source-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.file-source-actions .button {
  font-size: 12px;
  min-height: 40px;
}
.file-source-actions .text-button {
  font-size: 12px;
}
#dav-hint {
  margin: -2px 0 18px;
  font-size: 12.5px;
}
.file-picker-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
}
.file-input {
  width: 100%;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}
.file-input::file-selector-button {
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  background: var(--accent);
  color: #fff;
  margin-right: 12px;
  font: inherit;
  cursor: pointer;
}
.file-help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
}
.local-file-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: 11px;
  background: var(--pale);
  font-size: 13px;
  color: var(--teal-dark);
  line-height: 1.8;
  margin-top: 22px;
}
.local-file-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}
.file-progress,
.file-error {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.file-progress {
  background: var(--pale);
  color: var(--teal-dark);
}
.file-error {
  background: var(--amber-pale);
  color: var(--amber);
}
@media (max-width: 700px) {
  .mobile-source-group {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    overflow: hidden;
  }
  .mobile-source-group .compact-class-row {
    display: block;
    margin: 0;
  }
  .mobile-source-group .class-switch {
    width: 100%;
    max-width: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .mobile-source-group .file-source-row {
    margin: 0;
    padding: 0;
    border-top: 0;
    font-size: 11px;
    gap: 8px;
  }
  .mobile-source-group .file-source-row:has(#dav-export:not([hidden]), #restore-source:not([hidden])) {
    padding: 8px 16px 10px;
    border-top: 1px solid var(--line);
  }
  .mobile-source-group .file-source-row > div:first-child {
    position: absolute;
    top: 32px;
    right: 44px;
    transform: translateY(-50%);
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    gap: 6px;
    z-index: 1;
    pointer-events: none;
  }
  .mobile-source-group .file-source-row > div:first-child #latest-timetable {
    pointer-events: auto;
  }
  .mobile-source-group .file-source-row #file-source-label {
    display: none;
  }
  .mobile-source-group .file-source-row > div:first-child > span[data-icon='book'] {
    display: none;
  }
  .mobile-source-group .revision-notice {
    min-height: 30px;
    font-size: 11px;
  }
  .file-source-actions {
    margin-left: auto;
  }
  .file-source-actions .button {
    min-height: 40px;
  }
  .file-source-actions .text-button {
    font-size: 12px;
  }
  .file-input {
    font-size: 11px;
  }
  .file-input::file-selector-button {
    min-height: 44px;
  }
  .file-help {
    font-size: 11px;
  }
  .local-file-note {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .mobile-source-group .file-source-row > div:first-child {
    right: 38px;
  }
  .mobile-source-group .file-source-row .revision-notice {
    padding: 4px 8px;
    font-size: 10px;
  }
}

.class-dialog[open] {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
}
.class-dialog .dialog-heading {
  flex: 0 0 auto;
  margin-bottom: 16px;
}
.class-picker-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.browse-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.browse-mode {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 650;
}
.browse-mode:hover {
  border-color: var(--accent-line);
}
.browse-mode[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-text);
}
.class-picker-content .dialog-description {
  margin-bottom: 12px;
}
.class-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.class-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--paper);
}
.class-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.class-results-toolbar .text-button {
  font-size: 12.5px;
  min-height: 34px;
}
.class-results {
  flex: 1;
  min-height: 0;
}
.class-results .picker-empty {
  grid-column: 1/-1;
}
@media (max-width: 700px) {
  .class-dialog[open] {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    height: min(720px, calc(100dvh - 16px));
    max-height: calc(100dvh - 16px);
    border-radius: 20px 20px 0 0;
    padding: 18px 18px max(16px, env(safe-area-inset-bottom));
  }
  .class-dialog .dialog-heading {
    margin-bottom: 14px;
  }
  .class-dialog .dialog-heading h2 {
    font-size: 22px;
  }
  .class-filters {
    grid-template-columns: 1fr 1.15fr 0.85fr;
  }
  .class-filters select {
    padding: 8px;
    font-size: 13px;
  }
  .class-results {
    grid-template-columns: 1fr;
    max-height: none;
  }
}
select,
textarea {
  font: inherit;
  color: inherit;
}
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.preference-fields {
  display: grid;
  gap: 18px;
}
.preference-fields label {
  display: block;
  font-size: 14px;
}
.preference-fields input {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 10px;
}
.preference-fields select,
.preference-fields textarea {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid var(--muted);
  border-radius: 8px;
  background: var(--white);
}
button,
summary {
  min-height: 44px;
}
.large-text main,
.large-text .dialog {
  font-size: 18px;
}
.large-text .lesson h3 {
  font-size: 18px;
}
.large-text .lesson-meta,
.large-text .lesson-note,
.large-text .lesson-time,
.large-text .dialog-description,
.large-text .class-option small,
.large-text .file-help {
  font-size: 15px;
}
.large-text .class-option strong {
  font-size: 17px;
}
.large-text .week-title strong {
  font-size: 14px;
}
.large-text .site-footer {
  font-size: 14px;
}
.large-text .week-grid {
  grid-template-columns: repeat(7, minmax(165px, 1fr));
  overflow-x: auto;
}
.high-contrast {
  --ink: #0b0c0e;
  --muted: #212529;
  --line: #495057;
  --teal: #0b4f8a;
  --teal-dark: #0b4f8a;
  --pale: #d0ebff;
  --accent-text: #0b4f8a;
}
.high-contrast .lesson,
.high-contrast .lesson.alt,
.high-contrast .lesson.warm {
  background: #fff;
  color: #0b0c0e;
  border: 2px solid #212529;
}
.high-contrast .lesson-meta,
.high-contrast .lesson-note,
.high-contrast .lesson-time {
  color: #0b0c0e;
}
.reduce-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (max-width: 700px) {
  .header-actions {
    gap: 5px;
  }
  .large-text .week-grid {
    display: block;
  }
  .preference-fields {
    gap: 12px;
  }
}
@media (forced-colors: active) {
  .lesson,
  .class-option,
  .button,
  .day-tab,
  .icon-pill {
    border: 1px solid ButtonText;
  }
  .day-tab.active {
    outline: 2px solid Highlight;
  }
  .status-dot,
  .day-marker {
    background: CanvasText;
  }
}
.no-day {
  color: var(--muted);
}
.weekend .no-day {
  color: var(--muted);
  opacity: 1;
}
.day-tab.active > span:first-child {
  color: #fff;
  opacity: 1;
}
:root.high-contrast {
  --teal: #0b4f8a;
  --accent-text: #0b4f8a;
}
@media (max-width: 700px) {
  .week-controls {
    min-width: 0;
  }
  .schedule {
    touch-action: pan-y;
  }
}

.revision-notice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.revision-notice:hover {
  background: #d0ebff;
}
.revision-new-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.file-source-row > div:first-child {
  flex-wrap: wrap;
}
.large-text .revision-notice {
  font-size: 14px;
}
@media (forced-colors: active) {
  .revision-notice {
    border: 1px solid ButtonText;
  }
  .revision-new-dot {
    background: ButtonText;
  }
}
.mode-badge {
  display: inline-block;
  margin-top: 7px;
  white-space: normal;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-line);
  font-size: 11px;
}
.lesson-mode-notice {
  padding: 13px 14px;
  margin: 18px 0;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
}
.lesson-mode-notice p {
  margin-top: 7px;
  line-height: 1.7;
}
.large-text .mode-badge {
  font-size: 15px;
}
.high-contrast .lesson-mode-notice,
.high-contrast .mode-badge {
  border-color: var(--accent-text);
}
.theme-toggle {
  justify-content: center;
}
.theme-toggle .icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 700px) {
  .theme-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #242424;
  --surface: #2e2e2e;
  --surface-muted: #1f1f1f;
  --navy: #1f1f1f;
  --ink: #c9c9c9;
  --muted: #b8b8b8;
  --teal: #4dabf7;
  --teal-dark: #4dabf7;
  --pale: #4dabf724;
  --paper: var(--canvas);
  --line: #424242;
  --white: var(--surface);
  --amber: #ffd43b;
  --amber-pale: #ffd43b1a;
  --focus: #4dabf7;
  --accent: #1971c2;
  --accent-hover: #1864ab;
  --accent-text: #4dabf7;
  --accent-soft: #4dabf71f;
  --accent-line: #4dabf766;
  --warning-text: #ffd43b;
  --warning-soft: #ffd43b14;
  --warning-line: #ffd43b66;
  --shadow-sm: 0 1px 2px #0000004d;
}
:root[data-theme='dark'] a {
  color: var(--accent-text);
}
:root[data-theme='dark'] button:focus-visible,
:root[data-theme='dark'] a:focus-visible,
:root[data-theme='dark'] input:focus-visible,
:root[data-theme='dark'] select:focus-visible,
:root[data-theme='dark'] textarea:focus-visible,
:root[data-theme='dark'] summary:focus-visible,
:root[data-theme='dark'] .search-field:focus-within,
:root[data-theme='dark'] .week-title:focus-within {
  outline-color: var(--focus);
}
:root[data-theme='dark'] .topbar {
  background: #1f1f1f;
  border-color: #424242;
  color: #c9c9c9;
}
:root[data-theme='dark'] .wordmark {
  color: #c9c9c9;
}
:root[data-theme='dark'] .wordmark-label {
  color: #b8b8b8;
  border-color: #424242;
}
:root[data-theme='dark'] .wordmark-logo {
  filter: drop-shadow(0 0 2px rgb(255 255 255 / 60%)) drop-shadow(0 0 9px rgb(255 255 255 / 34%))
    drop-shadow(0 0 20px rgb(255 255 255 / 16%));
  animation: logo-glow 5s ease-in-out infinite;
}
:root[data-theme='dark'] .icon-pill {
  background: #2e2e2e;
  border-color: #424242;
  color: #c9c9c9;
}
:root[data-theme='dark'] .icon-pill:hover:not(:disabled) {
  background: #3b3b3b;
  border-color: #696969;
}
:root[data-theme='dark'] .info-pill {
  background: #4dabf71f;
  border-color: #4dabf766;
}
:root[data-theme='dark'] .info-pill:hover:not(:disabled) {
  background: #4dabf72e;
  border-color: #4dabf7;
}
:root[data-theme='dark'] .info-pill .icon {
  color: #4dabf7;
}
:root[data-theme='dark'] .rail {
  background: #1f1f1f;
  border-color: #424242;
}
:root[data-theme='dark'] .class-switch {
  background: #2e2e2e;
  border-color: #424242;
}
:root[data-theme='dark'] .class-switch:hover:not(:disabled) {
  border-color: #4dabf7;
}
:root[data-theme='dark'] .class-switch[data-mode='class'] {
  --browse-cube: #51cf66;
  --browse-cube-glow: rgb(81 207 102 / 55%);
}
:root[data-theme='dark'] .class-switch[data-mode='lecturer'] {
  --browse-cube: #ff6b6b;
  --browse-cube-glow: rgb(255 107 107 / 55%);
}
:root[data-theme='dark'] .mobile-source-group {
  background: #2e2e2e;
  border-color: #424242;
}
:root[data-theme='dark'] .mobile-source-group .class-switch {
  border: 0;
  background: transparent;
}
:root[data-theme='dark'] .mobile-source-group .file-source-row {
  border-color: #424242;
}
:root[data-theme='dark'] .calendar-card {
  background: #2e2e2e;
  border-color: #424242;
}
:root[data-theme='dark'] .calendar-card-icon,
:root[data-theme='dark'] .menu-label {
  background: #4dabf71f;
  color: #4dabf7;
}
:root[data-theme='dark'] .calendar-card .button {
  background: #1971c2;
  color: #fff;
}
:root[data-theme='dark'] .calendar-card .button:hover:not(:disabled) {
  background: #1864ab;
}
:root[data-theme='dark'] .secondary,
:root[data-theme='dark'] .today-button,
:root[data-theme='dark'] .icon-button,
:root[data-theme='dark'] .class-filters select {
  background: #2e2e2e;
  border-color: #424242;
  color: #c9c9c9;
}
:root[data-theme='dark'] .secondary:hover:not(:disabled),
:root[data-theme='dark'] .icon-button:hover:not(:disabled) {
  background: #3b3b3b;
  border-color: #4dabf7;
}
:root[data-theme='dark'] .view-switch {
  background: #1f1f1f;
  border-color: #424242;
}
:root[data-theme='dark'] .view-switch .active {
  background: #2e2e2e;
  color: #4dabf7;
}
:root[data-theme='dark'] .search-field {
  background: #1f1f1f;
  border-color: #424242;
}
:root[data-theme='dark'] .day-column {
  background: #2e2e2e;
}
:root[data-theme='dark'] .day-column.weekend {
  background: #292929;
}
:root[data-theme='dark'] .lesson {
  background: #26313a;
  border-color: #3b4b59;
}
:root[data-theme='dark'] .lesson:hover {
  background: #2c3a45;
  border-color: #74b3e8;
}
:root[data-theme='dark'] .lesson.alt {
  background: #2a2a2a;
  border-color: #424242;
}
:root[data-theme='dark'] .lesson.alt:hover {
  background: #333;
  border-color: #696969;
}
:root[data-theme='dark'] .lesson.warm {
  background: #302b20;
  border-color: #5a4a28;
}
:root[data-theme='dark'] .lesson.warm:hover {
  background: #3a3325;
  border-color: #e0b264;
}
:root[data-theme='dark'] .lesson-time {
  color: #8ec9fa;
}
:root[data-theme='dark'] .lesson-note {
  border-top-color: #424242;
}
:root[data-theme='dark'] .no-day > span {
  background: #424242;
}
:root[data-theme='dark'] .primary,
:root[data-theme='dark'] .day-heading.current strong,
:root[data-theme='dark'] .day-tab.active,
:root[data-theme='dark'] .file-input::file-selector-button {
  background: #1971c2;
  color: #fff;
}
:root[data-theme='dark'] .primary:hover:not(:disabled) {
  background: #1864ab;
}
:root[data-theme='dark'] .dialog {
  background: #2e2e2e;
  border-color: #424242;
}
:root[data-theme='dark'] .dialog::backdrop {
  background: #000000b3;
}
:root[data-theme='dark'] .class-option {
  background: #2e2e2e;
  border-color: #424242;
}
:root[data-theme='dark'] .class-option:hover,
:root[data-theme='dark'] .class-option.selected {
  background: #4dabf71f;
  border-color: #4dabf7;
}
:root[data-theme='dark'] .browse-mode {
  background: #242424;
  border-color: #424242;
}
:root[data-theme='dark'] .browse-mode[aria-pressed='true'] {
  background: #4dabf71f;
  border-color: #4dabf7;
}
:root[data-theme='dark'] .mobile-export {
  background: #1f1f1fee;
  border-color: #424242;
}
:root[data-theme='dark'] .revision-notice {
  background: #4dabf71f;
  border-color: #4dabf766;
  color: #8ec9fa;
}
:root[data-theme='dark'] .revision-notice:hover {
  background: #4dabf72e;
}
:root[data-theme='dark'] .revision-new-dot {
  background: #4dabf7;
}
:root[data-theme='dark'] .badge,
:root[data-theme='dark'] .mode-badge,
:root[data-theme='dark'] .lesson-mode-notice {
  color: #8ec9fa;
}
:root[data-theme='dark'] .toast {
  background: #3b3b3b;
  color: #f8f9fa;
}
:root[data-theme='dark'] .high-contrast {
  --ink: #f8f9fa;
  --muted: #e9ecef;
  --line: #adb5bd;
  --teal: #a5d8ff;
  --teal-dark: #a5d8ff;
  --pale: #0d3b66;
  --accent-text: #a5d8ff;
  --accent-line: #a5d8ff;
}
:root[data-theme='dark'].high-contrast .lesson,
:root[data-theme='dark'].high-contrast .lesson.alt,
:root[data-theme='dark'].high-contrast .lesson.warm {
  background: #242424;
  color: #f8f9fa;
  border: 2px solid #adb5bd;
}
:root[data-theme='dark'].high-contrast .lesson-meta,
:root[data-theme='dark'].high-contrast .lesson-note,
:root[data-theme='dark'].high-contrast .lesson-time {
  color: #f8f9fa;
}
