html,
body {
  background: var(--paper);
  overflow-x: clip;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3-cyrillic.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range:
    U+0400-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --ink: #1b2537;
  --muted: #56657a;
  --rule: #e2e7ee;
  --rule-strong: #cad3df;
  --field-rule: #a4afbe;
  --accent: #354fc5;
  --accent-hover: #293fa6;
  --accent-soft: #edf1ff;
  --accent-line: #c9d4fa;
  --positive: #226248;
  --positive-bg: #eff8f2;
  --warning: #80501d;
  --warning-bg: #fff7e8;
  --warning-line: #ecd6ae;
  --danger: #a1323c;
  --danger-bg: #fff0f1;
  --white: #ffffff;
  --transparent: transparent;
  --hero: #f8faff;
  --hero-line: #d3ddf2;
  --window: #f2f8f4;
  --overlay: #15203470;
  --shadow: #28374e0d;
  --glass: #ffffffd9;
  --glass-edge: #ffffffed;
  --glass-shadow: 0 8px 26px #29384f08, inset 0 1px 0 #ffffffd9;
  --font-body:
    "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-body);
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: var(--transparent);
}
button,
select,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
:focus-visible {
  outline: 3px solid var(--accent);
}
button:disabled,
.button.primary:disabled {
  background: var(--rule);
  border-color: var(--rule-strong);
  color: var(--ink);
  cursor: wait;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  font-weight: 700;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 10px;
  padding: 10px;
  background: var(--surface);
  z-index: 20;
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
  clip-path: inset(100%);
}
.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  clip-path: none;
}
.topbar {
  height: 90px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 0 max(28px, calc((100% - 1220px) / 2));
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.4px;
  flex-shrink: 0;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  margin-top: 6px;
}
.brand-mark {
  width: 43px;
  height: 45px;
  background: var(--accent);
  border-radius: 12px 12px 12px 4px;
  display: grid;
  place-items: center;
  color: var(--white);
}
.main-nav {
  display: flex;
  align-self: stretch;
  gap: 28px;
}
.main-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  border-bottom: 3px solid var(--transparent);
  padding-top: 3px;
}
.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.main-nav a:hover {
  color: var(--accent);
}
#change-count {
  font-size: 12px;
  min-width: 20px;
  background: var(--accent-soft);
  padding: 0 6px;
  text-align: center;
  border-radius: 6px;
}
.profile-picker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  min-width: 0;
}
.avatar {
  width: 35px;
  height: 35px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
}
.profile-picker select {
  border: 1px solid var(--field-rule);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px;
  max-width: 180px;
  font-size: 14px;
  color: var(--ink);
  text-overflow: ellipsis;
}
.shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 28px 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading p {
  color: var(--muted);
  margin-top: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border-radius: 8px;
  border: 1px solid var(--rule-strong);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}
.button.primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.button.secondary {
  background: var(--surface);
  color: var(--ink);
}
.button.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.check-button span {
  font-size: 21px;
  line-height: 15px;
  font-weight: 400;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 28px;
  align-items: start;
}
.today-panel {
  border: 1px solid var(--hero-line);
  background: var(--hero);
  border-radius: var(--radius);
  padding: 26px 28px 0;
  position: relative;
  overflow: clip;
}
.date-line {
  display: flex;
  align-items: center;
  gap: 14px;
}
.date-line h2 {
  font-size: 19px;
  font-weight: 600;
}
.date-pill {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  font-size: 12px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.current-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 22px 0 24px;
  min-height: 177px;
}
.current-event > div:first-child {
  flex: 1;
  min-width: 0;
}
.event-caption {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}
.current-event h3 {
  font-size: 27px;
  letter-spacing: -0.45px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 420px;
}
.current-event p {
  color: var(--muted);
  margin-top: 9px;
  font-size: 15px;
  max-width: 390px;
}
.day-summary {
  border-top: 1px solid var(--hero-line);
  padding: 13px 0;
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  min-height: 48px;
}
.day-summary strong {
  color: var(--ink);
  font-weight: 600;
}
.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 25px 0 18px;
}
.segmented {
  display: flex;
  background: var(--rule);
  padding: 3px;
  border-radius: 8px;
}
.segmented button {
  min-height: 35px;
  border: 0;
  padding: 5px 15px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  background: var(--transparent);
  font-weight: 550;
}
.segmented button.selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px var(--shadow);
}
.date-input input {
  min-height: 40px;
  width: 145px;
  color: var(--muted);
  border: 1px solid var(--field-rule);
  border-radius: 7px;
  padding: 5px 8px;
  background: var(--surface);
  font-size: 14px;
}
.day-list {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: clip;
}
.lesson-row {
  display: grid;
  grid-template-columns: 39px 88px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 17px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
  min-height: 95px;
}
.lesson-row:last-child {
  border-bottom: 0;
}
.lesson-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}
.lesson-time {
  line-height: 1.35;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lesson-time small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}
.lesson-info h3 {
  font-size: 17px;
  font-weight: 600;
}
.lesson-info p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}
.lesson-room {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.lesson-room strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 550;
  padding-left: 4px;
}
.lesson-row.active-lesson {
  background: var(--accent-soft);
}
.active-lesson .lesson-number {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}
.window-row {
  background: var(--window);
}
.window-row .lesson-number {
  border: 0;
  color: var(--positive);
  font-size: 21px;
}
.window-row h3 {
  color: var(--positive);
}
.review-row {
  background: var(--warning-bg);
}
.review-row .lesson-number {
  border: 0;
  color: var(--warning);
  font-size: 20px;
}
.empty-state {
  padding: 35px 28px;
}
.empty-symbol {
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 10px;
}
.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--muted);
  font-size: 15px;
  max-width: 440px;
}
.empty-state .button {
  margin-top: 20px;
}
.empty-state .text-link {
  margin: 16px 0 0;
  display: block;
}
.context-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.week-panel,
.changes-preview {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 21px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 17px;
}
.small-icon {
  color: var(--muted);
  font-size: 19px;
}
.week-select {
  border: 1px solid var(--field-rule);
  border-radius: 6px;
  background: var(--surface);
  width: 100%;
  padding: 4px 8px;
  color: var(--ink);
  font-weight: 550;
  font-size: 14px;
  min-height: 36px;
}
.mini-week {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 17px 0;
}
.mini-day {
  border: 1px solid var(--transparent);
  background: var(--transparent);
  padding: 7px 1px 6px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  min-height: 61px;
  font-variant-numeric: tabular-nums;
}
.mini-day span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.mini-day.selected {
  background: var(--accent);
  color: var(--white);
}
.mini-day.selected span {
  color: var(--white);
  opacity: 0.8;
}
.mini-day.is-today:not(.selected) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.mini-day:hover:not(.selected) {
  background: var(--paper);
}
.week-panel > p {
  font-size: 13px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.count-label {
  color: var(--muted);
  font-size: 12px;
}
.changes-preview .section-heading {
  margin-bottom: 3px;
}
.preview-change {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.preview-change h3 {
  font-size: 14px;
  font-weight: 600;
}
.preview-change p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.preview-change:last-child {
  border: 0;
}
.preview-empty {
  padding: 14px 0 4px;
}
.change-type {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}
.text-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 550;
  border: 0;
  padding: 0;
  background: var(--transparent);
  text-align: left;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.changes-preview > .text-link {
  margin-top: 12px;
}
.source-panel {
  padding: 0 9px;
}
.source-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.source-symbol {
  color: var(--positive);
  font-size: 22px;
}
.source-title h2 {
  font-size: 15px;
  font-weight: 600;
}
.source-panel > p {
  font-size: 14px;
}
.source-panel > .small {
  font-size: 12px;
  margin-top: 5px;
}
.source-panel .text-link {
  display: flex;
  margin-top: 9px;
  font-size: 13px;
}
.setup-banner {
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  padding: 18px 22px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
}
.setup-banner > div {
  flex: 1;
}
.setup-banner h2 {
  font-size: 17px;
}
.setup-banner p {
  font-size: 14px;
  color: var(--warning);
  margin-top: 4px;
  max-width: 650px;
}
.setup-banner .button {
  flex-shrink: 0;
}
.notice {
  padding: 15px 20px;
  border-radius: 9px;
  margin-bottom: 22px;
  font-size: 15px;
  border: 1px solid var(--rule);
}
.danger {
  color: var(--danger);
  background: var(--danger-bg);
}
.demo-banner {
  padding: 10px 28px;
  background: var(--warning-bg);
  color: var(--warning);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--warning-line);
  font-size: 14px;
}
.demo-banner button {
  background: var(--transparent);
  border: 0;
  color: var(--warning);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  padding: 33px 0 26px;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
}
.footer span span {
  padding: 0 9px;
  color: var(--rule-strong);
}
.footer #footer-school {
  padding: 0;
  color: var(--muted);
}
.loading-row {
  padding: 45px 24px;
  color: var(--muted);
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.week-day {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  overflow: clip;
}
.week-day > button {
  border: 0;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: var(--paper);
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
}
.week-day .week-entry {
  padding: 12px 13px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.week-entry:last-child {
  border-bottom: 0;
}
.week-entry strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.week-entry p {
  color: var(--muted);
  margin-top: 3px;
}
.week-entry.window-row {
  color: var(--positive);
}
.week-entry.review-row {
  color: var(--warning);
}
.changes-full {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.previous-original {
  margin: -5px 0 20px;
}
.change-full {
  padding: 23px 27px;
  border-bottom: 1px solid var(--rule);
}
.change-full:last-child {
  border-bottom: 0;
}
.change-full h2 {
  font-size: 19px;
}
.change-full p {
  color: var(--muted);
  margin-top: 5px;
}
.change-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.change-value {
  background: var(--paper);
  padding: 12px 15px;
  border-radius: 7px;
  font-size: 15px;
}
.change-value > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 30px;
  align-items: start;
}
.settings-main {
  min-width: 0;
}
.settings-section {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 23px;
}
.settings-section > h2 {
  margin-bottom: 14px;
}
.settings-section > p {
  font-size: 14px;
  margin-bottom: 18px;
}
.settings-section .section-heading h2 {
  font-size: 20px;
}
form label:not(.check-label) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 17px;
  font-size: 14px;
  font-weight: 550;
}
form input:not([type="checkbox"]),
form select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--field-rule);
  border-radius: 7px;
  padding: 10px 11px;
  background: var(--surface);
  color: var(--ink);
  min-height: 43px;
  font-size: 16px;
  font-weight: 400;
}
form input::placeholder {
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 18px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 19px;
}
.binding-intro {
  margin: 10px 0 16px;
}
.quick-class-block {
  background: var(--accent-soft);
  padding: 16px;
  border-radius: 9px;
  margin: 16px 0 22px;
}
.quick-class-block h3 {
  font-size: 16px;
}
.quick-class-block p {
  font-size: 13px;
  margin-top: 5px;
}
.quick-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
form label.quick-class {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px 11px;
  margin: 0;
  cursor: pointer;
}
.quick-class input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0;
}
.quick-class:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
}
.binding-intro h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.binding-intro p {
  font-size: 14px;
}
.binding-list {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.binding-class {
  padding: 13px 15px;
  border-bottom: 1px solid var(--rule);
}
.binding-class:last-child {
  border-bottom: 0;
}
.binding-class-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.binding-class-title h4 {
  font-size: 16px;
  margin: 0;
}
.binding-class-title button {
  font-size: 12px;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
}
.check-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin: 3px 0 0;
}
.confirm-check {
  padding: 17px 0 0;
}
.settings-help {
  border-left: 2px solid var(--accent-line);
  padding: 0 0 0 22px;
}
.settings-help h2 {
  font-size: 17px;
}
.settings-help ol {
  padding-left: 19px;
  color: var(--muted);
  font-size: 14px;
  margin: 15px 0 22px;
}
.settings-help li {
  margin-bottom: 13px;
  padding-left: 3px;
}
.settings-help p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.settings-help .button {
  margin-bottom: 20px;
}
.upload-form .file-field input {
  border-style: dashed;
  padding: 16px 12px;
}
.pending-item,
.issue-item {
  border-top: 1px solid var(--rule);
  padding: 18px 0 5px;
  margin-top: 18px;
}
.pending-item h3,
.issue-item h3 {
  font-size: 16px;
}
.pending-item p,
.issue-item p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}
.pending-item form {
  margin-top: 15px;
}
.issue-item .text-link {
  margin-top: 8px;
}
.bell-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
}
.bell-row label {
  font-size: 12px !important;
  margin-bottom: 0 !important;
}
.bell-row input,
.bell-row select {
  padding: 7px !important;
  font-size: 13px !important;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--ink);
  color: var(--white);
  border-radius: 9px;
  padding: 13px 21px;
  box-shadow: 0 8px 30px var(--shadow);
  max-width: calc(100% - 32px);
  font-size: 15px;
}
dialog {
  padding: 27px;
  border: 1px solid var(--rule-strong);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
  width: 600px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 35px);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: var(--overlay);
}
dialog .section-heading {
  margin-bottom: 8px;
}
dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 14px;
  padding: 14px;
  background: var(--paper);
  border-radius: 7px;
  max-height: 160px;
  overflow-y: auto;
}
dialog .text-link {
  margin-bottom: 15px;
}
.source-preview {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin-bottom: 12px;
}
.source-preview img {
  display: block;
  max-width: 100%;
  max-height: 258px;
  object-fit: contain;
}
.close-button {
  border: 0;
  background: var(--paper);
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 26px;
  line-height: 1;
}
.noscript {
  padding: 20px;
  text-align: center;
  color: var(--danger);
  background: var(--danger-bg);
}
@media (min-width: 1400px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
  }
}
@media (max-width: 1000px) {
  .topbar {
    gap: 28px;
  }
  .main-nav {
    gap: 20px;
  }
  .profile-picker select {
    max-width: 120px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 265px;
    gap: 20px;
  }
  .today-panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .lesson-row {
    padding: 18px;
    column-gap: 12px;
    grid-template-columns: 29px 72px minmax(0, 1fr) auto;
  }
  .current-event h3 {
    font-size: 25px;
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
  }
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 74px;
    padding: 0 21px;
    gap: 16px;
  }
  .brand {
    font-size: 21px;
    gap: 10px;
  }
  .brand small {
    font-size: 10px;
    margin-top: 4px;
  }
  .brand-mark {
    width: 38px;
    height: 40px;
    border-radius: 10px 10px 10px 4px;
  }
  .profile-picker select {
    max-width: 130px;
    font-size: 12px;
  }
  .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  .main-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(61px + env(safe-area-inset-bottom));
    padding: 0 13px env(safe-area-inset-bottom);
    justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--rule);
    z-index: 30;
    gap: 0;
  }
  .main-nav a {
    padding: 0 12px;
    border-bottom: 0;
    border-top: 0;
    font-size: 14px;
  }
  .main-nav a.active {
    border-bottom: 0;
    border-top-color: transparent;
  }
  .shell {
    padding: 27px 20px 72px;
  }
  h1 {
    font-size: 29px;
    letter-spacing: -0.65px;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 23px;
    align-items: flex-start;
  }
  .page-heading p {
    font-size: 14px;
    margin-top: 5px;
  }
  .check-button {
    font-size: 0;
    padding: 10px 12px;
    min-height: 39px;
    margin-top: 2px;
  }
  .check-button span {
    font-size: 22px;
  }
  .workspace {
    display: block;
  }
  .context-column {
    margin-top: 27px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
  }
  .source-panel {
    grid-column: 1/-1;
    padding: 0 4px;
  }
  .today-panel {
    padding: 21px 22px 0;
  }
  .date-line {
    gap: 10px;
  }
  .date-line h2 {
    font-size: 17px;
  }
  .date-pill {
    font-size: 11px;
    padding: 5px 7px;
  }
  .current-event {
    gap: 17px;
    min-height: 167px;
    padding: 19px 0 24px;
  }
  .current-event h3 {
    font-size: 25px;
  }
  .current-event p {
    font-size: 14px;
    margin-top: 8px;
  }
  .event-caption {
    font-size: 13px;
  }
  .day-summary {
    gap: 18px;
    font-size: 13px;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .schedule-toolbar {
    gap: 10px;
    padding: 21px 0 16px;
  }
  .segmented button {
    padding: 5px 12px;
    font-size: 13px;
  }
  .date-input input {
    width: 133px;
    font-size: 12px;
    padding: 6px;
    min-height: 40px;
  }
  .lesson-row {
    padding: 18px 17px;
    grid-template-columns: 28px 67px minmax(0, 1fr) auto;
    column-gap: 12px;
    min-height: 91px;
  }
  .lesson-number {
    width: 27px;
    height: 29px;
    font-size: 13px;
  }
  .lesson-time {
    font-size: 14px;
  }
  .lesson-time small {
    font-size: 12px;
  }
  .lesson-info h3 {
    font-size: 16px;
  }
  .lesson-info p {
    font-size: 13px;
  }
  .lesson-room {
    font-size: 11px;
  }
  .lesson-room strong {
    font-size: 15px;
    display: block;
    padding: 0;
  }
  .setup-banner {
    padding: 17px;
    display: block;
    margin-bottom: 21px;
  }
  .setup-banner p {
    font-size: 13px;
    margin-top: 6px;
  }
  .setup-banner .button {
    margin-top: 13px;
    min-height: 38px;
  }
  .settings-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .settings-main {
    width: 100%;
  }
  .settings-section {
    padding: 20px;
    border-radius: 12px;
  }
  .settings-section .section-heading h2 {
    font-size: 19px;
  }
  .settings-help {
    margin-top: 9px;
  }
  .form-grid {
    gap: 0 12px;
  }
  .form-grid label {
    font-size: 13px !important;
  }
  .binding-class {
    padding: 12px;
  }
  .bell-row {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  }
  .bell-row label:nth-last-child(-n + 2) {
    grid-column: auto;
  }
  .demo-banner {
    display: block;
    font-size: 12px;
    padding: 9px 20px;
  }
  .demo-banner button {
    font-size: 12px;
    display: block;
    padding: 4px 0 0;
  }
  .footer {
    margin-top: 30px;
    padding: 24px 0 15px;
    font-size: 11px;
  }
  .toast {
    bottom: 79px;
  }
  .changes-full .empty-state {
    padding: 26px 21px;
  }
  .change-full {
    padding: 21px;
  }
  .change-comparison {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
}
@media (max-width: 460px) {
  .profile-picker {
    gap: 0;
  }
  .profile-picker .avatar {
    display: none;
  }
  .profile-picker select {
    max-width: 113px;
    padding-right: 0;
  }
  .context-column {
    display: flex;
    flex-direction: column;
  }
  .week-panel {
    order: 0;
  }
  .changes-preview {
    order: 1;
  }
  .source-panel {
    order: 2;
  }
  .week-panel .mini-week {
    gap: 10px;
    padding: 15px 0;
  }
  .mini-day {
    font-size: 17px;
  }
  .lesson-row {
    grid-template-columns: 25px 59px minmax(0, 1fr) 38px;
    column-gap: 10px;
    padding: 17px 14px;
  }
  .lesson-info h3 {
    font-size: 15px;
  }
  .lesson-time {
    font-size: 13px;
  }
  .lesson-time small {
    font-size: 11px;
  }
  .lesson-room {
    text-align: right;
  }
  .lesson-info p {
    font-size: 12px;
  }
  .lesson-number {
    width: 25px;
  }
  .segmented button {
    padding: 5px 10px;
    font-size: 12px;
  }
  .date-input input {
    width: 124px;
    font-size: 11px;
  }
  .week-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  .week-day .week-entry {
    padding: 12px 16px;
  }
  .today-panel {
    padding-left: 19px;
    padding-right: 19px;
  }

  .current-event {
    gap: 13px;
  }
  .current-event h3 {
    font-size: 23px;
  }
  .current-event p {
    font-size: 13px;
  }
  .event-caption {
    font-size: 12px;
  }
  .date-line h2 {
    font-size: 16px;
  }
  .empty-state {
    padding: 28px 21px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
/* The glass layer carries navigation; timetable content stays optically stable. */
html {
  min-width: 320px;
  scroll-padding-top: 114px;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 9% 0, #dce5f988, transparent 40%),
    radial-gradient(ellipse at 92% 20%, #e1ecea88, transparent 35%),
    var(--paper);
}
button,
.button,
.text-link,
select,
input {
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}
h1 {
  font-size: 34px;
  letter-spacing: -1px;
  line-height: 1.16;
}
h2 {
  letter-spacing: -0.3px;
}
.topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: min(1240px, calc(100% - 48px));
  height: auto;
  min-height: 76px;
  margin: 14px auto 0;
  padding: 10px 20px;
  gap: 30px;
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}
.brand {
  gap: 10px;
  font-size: 21px;
  letter-spacing: -0.55px;
}
.brand small {
  font-size: 11px;
  letter-spacing: 0.15px;
  margin-top: 5px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 #ffffff33;
}
.brand-mark svg {
  width: 24px;
  height: 24px;
}
.main-nav {
  align-self: auto;
  align-items: center;
  gap: 4px;
  margin-left: 22px;
}
.main-nav a {
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 7px 16px;
  font-size: 15px;
}
.main-nav a.active {
  background: var(--accent-soft);
}
.main-nav a:hover:not(.active) {
  background: var(--surface-soft);
  color: var(--ink);
}
.profile-picker select {
  min-height: 44px;
  max-width: 205px;
  padding: 8px 24px 8px 7px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.profile-add {
  display: grid;
  place-items: center;
  min-width: 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: var(--surface);
}
.profile-add svg {
  width: 18px;
  height: 18px;
}
.shell {
  max-width: 1240px;
  padding: 38px 26px 0;
}
.page-heading {
  margin-bottom: 25px;
}
.page-heading p {
  max-width: 65ch;
  font-size: 15px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 13px;
}
.button.secondary {
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-edge);
}
.workspace {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
}
.schedule-column {
  min-width: 0;
}
.today-panel {
  padding: 27px 30px 0;
  box-shadow: 0 12px 30px #23374d04;
}
.date-line {
  justify-content: space-between;
}
.date-line h2 {
  font-size: 18px;
  letter-spacing: -0.15px;
}
.date-pill {
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  border-color: var(--rule);
}
.current-event {
  display: block;
  min-height: 155px;
  padding: 29px 0 25px;
}
.current-event h3 {
  max-width: 650px;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.9px;
  line-height: 1.14;
}
.current-event p {
  max-width: 62ch;
  font-size: 16px;
  margin-top: 10px;
  line-height: 1.45;
}
.event-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.event-caption::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.day-summary {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.day-summary strong {
  font-weight: 650;
}
.schedule-toolbar {
  padding: 22px 0 16px;
  gap: 14px;
}
.segmented {
  padding: 4px;
  border: 1px solid var(--glass-edge);
  border-radius: 15px;
  background: #e1e7efb3;
  box-shadow: inset 0 1px 2px #1c2b4207;
}
.segmented button {
  min-height: 36px;
  border-radius: 11px;
  padding: 6px 18px;
}
.segmented button.selected {
  box-shadow:
    0 2px 5px #1c2b4210,
    0 0 0 1px #1c2b4203;
}
.date-input input {
  min-height: 44px;
  width: 147px;
  padding: 8px 10px;
  border-color: var(--rule-strong);
  border-radius: 13px;
  background: var(--glass);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.day-list {
  box-shadow: 0 8px 25px #28374e03;
}
.lesson-row {
  grid-template-columns: 35px 88px minmax(0, 1fr) auto;
  gap: 17px;
  padding: 20px 25px;
  min-height: 94px;
}
.lesson-number {
  width: 30px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-weight: 550;
}
.lesson-time {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.25px;
  line-height: 1.2;
}
.lesson-time small {
  font-size: 13px;
  margin-top: 5px;
  letter-spacing: 0;
}
.lesson-info {
  min-width: 0;
}
.lesson-info h3 {
  font-size: 18px;
  line-height: 1.3;
}
.lesson-info p {
  margin-top: 4px;
  line-height: 1.35;
}
.lesson-room {
  font-size: 12px;
  text-align: right;
}
.lesson-room strong {
  display: block;
  padding: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.lesson-row.active-lesson {
  box-shadow: inset 3px 0 0 var(--accent);
}
.window-row .lesson-number,
.review-row .lesson-number {
  background: transparent;
}
.context-column {
  gap: 20px;
}
.week-panel,
.changes-preview {
  border-radius: 20px;
  box-shadow: 0 5px 20px #28374e03;
}
.section-heading h2 {
  font-size: 18px;
}
.week-select {
  min-height: 42px;
  padding: 7px 10px;
  border-color: var(--rule-strong);
  border-radius: 11px;
  background: var(--surface-soft);
}
.mini-day {
  border-radius: 12px;
  font-size: 17px;
  font-weight: 550;
}
.mini-day span {
  margin-bottom: 4px;
  font-weight: 400;
}
.preview-change h3 {
  font-size: 15px;
}
.text-link {
  min-height: 36px;
  padding: 3px 0;
  font-weight: 600;
}
.setup-banner {
  padding: 19px 23px;
  border-color: var(--accent-line);
  border-radius: 18px;
  background: var(--accent-soft);
}
.setup-banner > div {
  min-width: 0;
}
.setup-banner p {
  color: var(--muted);
}
.notice {
  border-radius: 15px;
}
.demo-banner {
  padding: 13px 24px 0;
  background: transparent;
  border: 0;
  font-size: 13px;
  gap: 16px;
}
.demo-banner button {
  min-height: 32px;
}
.week-day {
  min-width: 0;
  border-radius: 18px;
}
.week-day > button {
  min-height: 48px;
  background: var(--surface-soft);
}
.week-entry strong {
  font-size: 15px;
}
.changes-full {
  overflow: clip;
}
.change-value {
  border-radius: 13px;
  background: var(--surface-soft);
}
.settings-section {
  padding: 27px;
}
form input:not([type="checkbox"]),
form select {
  min-height: 45px;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 16px;
}
form input::placeholder {
  opacity: 1;
}
input::file-selector-button {
  padding: 7px 11px;
  margin-right: 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.binding-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.binding-controls > label {
  margin-bottom: 12px !important;
}
.binding-summary {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.binding-summary > summary {
  min-height: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.binding-summary[open] > summary {
  margin-bottom: 11px;
}
.binding-list {
  max-height: 430px;
  border-color: var(--rule-strong);
  border-radius: 14px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.binding-class {
  padding: 13px 15px;
}
summary.binding-class-title {
  min-height: 35px;
  margin-bottom: 0;
  list-style: none;
  cursor: pointer;
}
summary.binding-class-title::-webkit-details-marker {
  display: none;
}
summary.binding-class-title::after {
  content: "+";
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
  margin-left: auto;
}
.binding-class[open] > summary {
  margin-bottom: 10px;
}
.binding-class[open] > summary::after {
  content: "−";
}
.binding-class .check-label {
  padding: 8px 0;
}
.check-label {
  line-height: 1.4;
}
.check-label input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.check-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.manual-binding-builder,
.binding-scope {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--surface-soft);
}
.manual-binding-builder > summary,
.binding-scope > summary {
  min-height: 28px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.manual-binding-builder[open] > summary,
.binding-scope[open] > summary {
  margin-bottom: 16px;
}
.selected-binding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--accent-line);
  font-size: 14px;
}
.selected-binding > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.selected-binding button {
  flex-shrink: 0;
}
.profile-welcome {
  padding: 27px;
  border: 1px solid var(--hero-line);
  border-radius: var(--radius);
  background: var(--hero);
  margin-bottom: 22px;
}
.profile-welcome h2 {
  margin-bottom: 8px;
}
.profile-welcome p {
  color: var(--muted);
  max-width: 65ch;
}
.welcome-profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
  margin-top: 20px;
}
.welcome-profile {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-height: 88px;
  padding: 17px;
  border: 1px solid var(--rule-strong);
  border-radius: 15px;
  background: var(--surface);
  text-align: left;
}
.welcome-profile:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.welcome-profile strong {
  font-size: 17px;
  font-weight: 600;
}
.welcome-profile span,
.welcome-profile small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.settings-help {
  border: 0;
  padding: 6px 0 0;
}
.bell-row {
  gap: 9px;
  padding: 14px 0;
}
.bell-row > button {
  grid-column: 1/-1;
  justify-self: start;
}
.toast {
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  color: var(--surface);
}
dialog {
  border-radius: 24px;
  box-shadow: 0 30px 100px #15203440;
}
dialog pre {
  border-radius: 12px;
  background: var(--surface-soft);
}
.close-button {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-soft);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .topbar,
  .main-nav,
  .segmented,
  .date-input input,
  .button.secondary {
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    backdrop-filter: blur(20px) saturate(135%);
  }
}
@media (min-width: 1280px) {
  .workspace:has(#week-grid:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace:has(#week-grid:not([hidden])) .context-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .workspace:has(#week-grid:not([hidden])) .week-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .workspace:has(#week-grid:not([hidden])) .source-panel {
    padding: 20px;
  }
}
@media (max-width: 1050px) {
  .topbar {
    width: calc(100% - 32px);
    padding: 10px 16px;
    gap: 16px;
  }
  .main-nav {
    margin-left: 0;
  }
  .main-nav a {
    padding: 7px 11px;
    font-size: 14px;
  }
  .profile-picker .avatar {
    display: none;
  }
  .profile-picker select {
    max-width: 160px;
  }
  .today-panel {
    padding-left: 24px;
    padding-right: 24px;
  }
  .current-event h3 {
    font-size: 29px;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 90px;
    scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .topbar {
    top: 8px;
    width: calc(100% - 24px);
    min-height: 65px;
    height: auto;
    margin-top: 8px;
    padding: 9px 12px;
    border-radius: 20px;
    gap: 10px;
  }
  .brand {
    gap: 8px;
    font-size: 19px;
  }
  .brand small {
    margin-top: 4px;
    font-size: 10px;
  }
  .brand-mark {
    width: 35px;
    height: 36px;
    border-radius: 11px;
  }
  .brand-mark svg {
    width: 22px;
    height: 22px;
  }
  .profile-picker {
    gap: 3px;
  }
  .profile-picker select {
    max-width: 125px;
    padding: 8px 17px 8px 4px;
    font-size: 13px;
  }
  .profile-add {
    min-width: 32px;
    width: 32px;
    height: 36px;
    border-radius: 10px;
  }
  .main-nav {
    position: fixed;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    z-index: 40;
    min-height: 59px;
    height: auto;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--glass-edge);
    border-radius: 21px;
    background: var(--glass);
    box-shadow:
      0 4px 24px #18283a17,
      inset 0 1px 0 var(--glass-edge);
  }
  .main-nav a {
    flex: 1;
    min-height: 44px;
    padding: 8px 10px;
    border: 0 !important;
    border-radius: 15px;
    font-size: 14px;
  }
  .shell {
    padding: 27px 20px 98px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 21px;
  }
  .page-heading p {
    font-size: 14px;
  }
  .heading-actions {
    justify-content: flex-end;
    gap: 6px;
  }
  .heading-actions .button {
    padding: 8px 12px;
    font-size: 13px;
  }
  .check-button {
    font-size: 0 !important;
    width: 44px;
    height: 44px;
    padding: 10px !important;
    flex-shrink: 0;
  }
  .check-button span {
    font-size: 24px;
  }
  .today-panel {
    padding: 22px 23px 0;
    border-radius: 23px;
  }
  .date-line h2 {
    font-size: 17px;
  }
  .date-pill {
    padding: 5px 8px;
    font-size: 11px;
  }
  .current-event {
    min-height: 151px;
    padding: 24px 0;
  }
  .current-event h3 {
    font-size: 29px;
    letter-spacing: -0.75px;
  }
  .current-event p {
    font-size: 15px;
    line-height: 1.4;
  }
  .event-caption {
    font-size: 13px;
    margin-bottom: 9px;
  }
  .day-summary {
    font-size: 13px;
    gap: 8px 17px;
    padding: 13px 0;
  }
  .schedule-toolbar {
    padding: 19px 0 14px;
    gap: 9px;
  }
  .segmented {
    padding: 3px;
    border-radius: 14px;
  }
  .segmented button {
    min-height: 37px;
    padding: 5px 13px;
    font-size: 13px;
    border-radius: 11px;
  }
  .date-input input {
    min-height: 45px;
    width: 135px;
    padding: 8px;
    border-radius: 13px;
    font-size: 13px;
  }
  .day-list {
    border-radius: 20px;
  }
  .lesson-row {
    grid-template-columns: 26px 65px minmax(0, 1fr) 42px;
    column-gap: 11px;
    padding: 18px 17px;
    min-height: 92px;
  }
  .lesson-number {
    width: 26px;
    height: 30px;
    border-radius: 9px;
    font-size: 13px;
  }
  .lesson-time {
    font-size: 16px;
  }
  .lesson-time small {
    font-size: 12px;
  }
  .lesson-info h3 {
    font-size: 17px;
    letter-spacing: -0.2px;
  }
  .lesson-info p {
    font-size: 13px;
  }
  .lesson-room {
    font-size: 11px;
  }
  .lesson-room strong {
    font-size: 21px;
  }
  .setup-banner {
    padding: 18px 20px;
  }
  .setup-banner p {
    font-size: 14px;
  }
  .setup-banner .button {
    margin-top: 14px;
  }
  .settings-section {
    padding: 21px;
    border-radius: 20px;
  }
  .settings-help {
    margin-top: 3px;
    padding: 15px 4px;
  }
  .binding-controls {
    gap: 10px;
  }
  .demo-banner {
    padding: 11px 22px 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px 12px;
    font-size: 12px;
  }
  .demo-banner button {
    display: inline-block;
    padding: 0;
    min-height: 27px;
  }
  .toast {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
  dialog {
    padding: 23px;
    border-radius: 21px;
  }
}
@media (max-width: 460px) {
  .profile-picker select {
    max-width: 105px;
    font-size: 12px;
  }
  .lesson-row {
    grid-template-columns: 22px 56px minmax(0, 1fr) 35px;
    column-gap: 9px;
    padding: 17px 14px;
  }
  .lesson-number {
    width: 23px;
    height: 28px;
    font-size: 12px;
  }
  .lesson-time {
    font-size: 15px;
  }
  .lesson-time small {
    font-size: 12px;
  }
  .lesson-info h3 {
    font-size: 16px;
  }
  .lesson-info p {
    font-size: 13px;
  }
  .lesson-room strong {
    font-size: 20px;
  }
  .current-event h3 {
    font-size: 27px;
  }
  .current-event p {
    font-size: 14px;
  }
  .today-panel {
    padding: 21px 20px 0;
  }
  .date-line h2 {
    font-size: 16px;
  }
  .segmented button {
    padding: 5px 11px;
    font-size: 12px;
  }
  .date-input input {
    width: 126px;
    font-size: 12px;
  }
  .day-summary {
    gap: 7px 14px;
  }
  .form-grid,
  .binding-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .binding-controls > label {
    margin-bottom: 7px !important;
  }
  .heading-actions [data-action="new-profile"] {
    max-width: 104px;
    line-height: 1.1;
  }
  .profile-welcome {
    padding: 22px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #101722;
    --surface: #1b2533;
    --surface-soft: #222e3e;
    --ink: #edf2fb;
    --muted: #b1bed0;
    --rule: #344153;
    --rule-strong: #4a5b71;
    --field-rule: #6f8096;
    --accent: #aec0ff;
    --accent-hover: #c6d3ff;
    --accent-soft: #293655;
    --accent-line: #4a608c;
    --positive: #a6d9ba;
    --positive-bg: #223b31;
    --warning: #edcc91;
    --warning-bg: #3a3023;
    --warning-line: #665438;
    --danger: #ffb6bc;
    --danger-bg: #432a34;
    --hero: #202d43;
    --hero-line: #3b4e6d;
    --window: #22372f;
    --overlay: #050a1399;
    --glass: #1b2533e8;
    --glass-edge: #57677a77;
    --glass-shadow: 0 8px 26px #00000012, inset 0 1px 0 #ffffff0a;
    --shadow: #00000025;
  }
  body {
    background:
      radial-gradient(ellipse at 10% 0, #22375166, transparent 45%),
      var(--paper);
  }
  .brand-mark,
  .button.primary,
  .mini-day.selected,
  .active-lesson .lesson-number {
    color: #17213a;
  }
  .mini-day.selected span {
    color: #17213a;
  }
  .segmented {
    background: #131d2bb3;
  }
  .button.secondary {
    box-shadow: inset 0 1px 0 #ffffff0b;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .main-nav,
  .segmented,
  .date-input input,
  .button.secondary {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--surface);
  }
  body {
    background: var(--paper);
  }
}
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .topbar,
  .main-nav,
  .date-input input,
  .button.secondary {
    background: var(--surface);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
@media (forced-colors: active) {
  body {
    background: Canvas;
  }
  .topbar,
  .main-nav,
  .today-panel,
  .button,
  .segmented,
  .date-input input,
  .lesson-number,
  .mini-day,
  .day-list {
    border: 1px solid CanvasText;
    background: Canvas;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .main-nav a.active,
  .segmented button.selected,
  .mini-day.selected,
  .button.primary {
    outline: 2px solid Highlight;
  }
  .lesson-row.active-lesson {
    border-inline-start: 3px solid Highlight;
  }
}
@media print {
  body {
    background: #fff;
  }
  .topbar,
  .demo-banner,
  .schedule-toolbar,
  .context-column,
  .footer,
  .heading-actions,
  .check-button,
  .toast {
    display: none !important;
  }
  .shell {
    padding: 0;
  }
  .workspace {
    display: block;
  }
  .today-panel,
  .day-list {
    box-shadow: none;
  }
}

.source-teacher-summary {
  margin: 14px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}
.source-teacher-summary p {
  margin: 0 0 8px;
}
.source-teacher-summary p:last-child {
  margin-bottom: 0;
}

/* Original vanilla implementation inspired by 21st.dev Glass Tabs and Glass Tab Bar. */
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.main-nav {
  padding: 4px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 64%, transparent);
  box-shadow: inset 0 1px 2px #17253f05;
}
.main-nav a {
  gap: 7px;
  border-radius: 999px;
}
.main-nav a.active {
  color: var(--accent);
  background: var(--glass);
  box-shadow:
    0 3px 9px #17253f0c,
    inset 0 1px 0 var(--glass-edge);
}
.segmented {
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}
.segmented button {
  border-radius: 999px;
}
.segmented button.selected {
  background: var(--glass);
  box-shadow:
    0 3px 10px #17253f12,
    inset 0 1px 0 var(--glass-edge);
}
.today-panel {
  background: var(--surface);
  border-color: var(--rule);
}
.event-caption {
  font-weight: 600;
}
.day-summary {
  border-color: var(--rule);
}
.lesson-row.active-lesson {
  background: var(--accent-soft);
}
.lesson-row.active-lesson .lesson-number {
  background: var(--accent);
  color: white;
}
.telegram-section {
  border-color: var(--accent-line);
  background: var(--surface);
}
.telegram-section > p {
  margin: 0 0 12px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
  white-space: nowrap;
}
.status-chip.is-connected {
  color: var(--positive);
  background: var(--positive-bg);
}
.telegram-time {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.telegram-time > label {
  flex: 0 1 190px;
}
.telegram-time > span {
  padding-bottom: 12px;
}
.danger-text {
  color: var(--danger);
}
.school-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  width: min(100%, 1030px);
  margin: 42px auto 68px;
  padding: 24px;
  border: 1px solid var(--glass-edge);
  border-radius: 30px;
  background: color-mix(in srgb, var(--glass) 85%, transparent);
  box-shadow:
    0 30px 80px #17346612,
    inset 0 1px 0 var(--glass-edge);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
}
.school-access h1 {
  font-size: clamp(28px, 3.2vw, 36px);
  margin: 20px 0 16px;
  letter-spacing: -0.035em;
}
.access-form-panel {
  padding: 18px 14px;
  min-width: 0;
}
.access-form-panel > p {
  max-width: 39ch;
  color: var(--muted);
}
.access-form-panel > .small:last-child {
  margin-top: 16px;
}
.access-preview {
  position: relative;
  min-width: 0;
  padding: 28px 22px 24px;
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background:
    radial-gradient(
      ellipse at 75% 4%,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 70%
    ),
    color-mix(in srgb, var(--accent-soft) 64%, var(--surface-soft));
  box-shadow: inset 0 1px 0 var(--glass-edge);
}
.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 22px;
}
.example-label {
  border: 1px solid var(--accent-line);
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  background: var(--glass);
}
.sample-timetable {
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  background: var(--glass);
  box-shadow:
    0 16px 38px #1c376216,
    inset 0 1px 0 var(--glass-edge);
}
.sample-next {
  padding: 22px 20px;
}
.sample-next > strong {
  display: block;
  font-size: 23px;
  letter-spacing: -0.5px;
  margin: 7px 0 5px;
}
.sample-next > p {
  font-size: 14px;
  color: var(--muted);
}
.sample-lesson,
.sample-window {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 17px 20px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}
.sample-lesson > span {
  font-weight: 650;
}
.sample-lesson small,
.sample-window small,
.preview-message small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.sample-lesson > b {
  margin-left: auto;
  font-size: 20px;
  font-weight: 650;
}
.sample-window {
  background: color-mix(in srgb, var(--positive-bg) 65%, transparent);
  color: var(--positive);
}
.sample-window > span {
  font-size: 24px;
  width: 35px;
  text-align: center;
}
.preview-message {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 4px 0;
  font-size: 13px;
}
.preview-message svg {
  width: 30px;
  height: 30px;
  stroke: var(--accent);
  stroke-width: 1.5;
  flex: 0 0 auto;
}
.brand small {
  font-size: 11px;
}
.access-mark {
  width: 52px;
  height: 52px;
  padding: 12px;
  border-radius: 17px;
  color: var(--accent);
  background: var(--accent-soft);
}
.access-mark svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#access-form {
  display: grid;
  gap: 12px;
  margin: 28px 0 20px;
}
#access-form > label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
#access-form .button {
  width: 100%;
}
#device-link {
  width: 100%;
  font-size: 14px;
  margin-top: 6px;
}
#device-link-box {
  margin-top: 20px;
}
@media (max-width: 760px) {
  .school-access {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 26px;
    padding: 16px;
    gap: 16px;
    border-radius: 24px;
  }
  .access-form-panel {
    padding: 10px 6px;
  }
  .access-preview {
    padding: 20px 14px;
  }
  .main-nav {
    padding: 6px;
    border-radius: 24px;
    gap: 4px;
  }
  .main-nav a {
    min-height: 48px;
    flex-direction: column;
    gap: 3px;
    border-radius: 17px;
    font-size: 11px;
    padding: 5px 8px;
    position: relative;
  }
  .main-nav .nav-icon {
    width: 20px;
    height: 20px;
  }
  #change-count {
    position: absolute;
    top: 3px;
    left: calc(50% + 10px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 17px;
  }
  .telegram-time > span {
    flex-basis: 100%;
    padding: 0;
  }
}
@media (forced-colors: active) {
  .main-nav a.active,
  .segmented button.selected {
    outline: 2px solid Highlight;
    background: Canvas;
    color: CanvasText;
  }
}
/* Backdrop on a sticky ancestor would re-anchor the fixed mobile dock. */
@media (max-width: 760px) {
  .topbar {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    backdrop-filter: blur(20px) saturate(135%);
  }
  .main-nav {
    top: auto;
  }
  .heading-actions [data-action="new-profile"] {
    display: none;
  }
  .heading-actions:has([data-action="check"][hidden]) {
    display: none;
  }
  .demo-banner button {
    margin-left: 7px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar::before {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  .topbar::before {
    background: Canvas;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
.footer span span {
  color: var(--muted);
}
@media (max-width: 760px) {
  .profile-add {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
  .profile-picker select {
    max-width: 112px;
  }
  .text-link {
    min-height: 44px;
  }
  .binding-class-title {
    min-height: 44px;
  }
}
@media (max-width: 390px) {
  .profile-picker select {
    max-width: 90px;
  }
}
@media print {
  :root {
    color-scheme: light;
    --paper: #fff;
    --surface: #fff;
    --surface-soft: #f3f3f3;
    --ink: #111;
    --muted: #444;
    --rule: #ccc;
    --rule-strong: #aaa;
    --hero: #fff;
    --hero-line: #bbb;
    --accent: #263d9b;
    --accent-soft: #f0f2f8;
    --positive: #20583b;
    --window: #f3f7f3;
  }
  .profile-welcome,
  #offline-banner {
    display: none !important;
  }
}
