:root {
  color-scheme:light;
  --bg:#f6f8fc;
  --paper:#fff;
  --ink:#172c46;
  --muted:#77849a;
  --accent:#3566e8;
  --soft:#edf2ff;
  --line:#e8edf5;
  --green:#2c8a64;
  --amber:#a56c17;
  --amber-bg:#fff6e5;
  --shadow:0 16px 60px #1e3b6b0a;
  --radius:20px;
  --safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-content-safe-area-inset-bottom,0px));
  font-family:'Segoe UI',Tahoma,sans-serif;
  font-synthesis:none
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-size:14px;
  line-height:1.5;
  -webkit-tap-highlight-color:transparent
}
button,input,a {
  font:inherit
}
button,a,input {
  touch-action:manipulation
}
button {
  color:inherit;
  cursor:pointer
}
button {
  border:0;
  background:none
}
a {
  color:inherit;
  text-decoration:none
}
button:focus-visible,a:focus-visible,input:focus-visible {
  outline:3px solid #7b9fff;
  outline-offset:4px
}
svg {
  height:22px;
  width:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}
.svg-sprite {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}
button[disabled] {
  opacity:.45;
  cursor:wait
}
[hidden] {
  display:none!important
}
.skip-link {
  position:fixed;
  top:-70px;
  left:24px;
  z-index:100;
  background:var(--accent);
  color:white;
  padding:12px;
  border-radius:10px
}
.skip-link:focus {
  top:12px
}
.app-layout {
  max-width:1640px;
  margin:auto;
  min-height:100dvh;
  display:grid;
  grid-template-columns:250px minmax(0,1fr)
}
.sidebar {
  background:var(--paper);
  padding:40px 26px 30px;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100dvh
}
.brand {
  display:flex;
  gap:13px;
  align-items:center;
  font-family:'Segoe UI Variable Display','Segoe UI',sans-serif;
  font-size:23px;
  font-weight:750;
  letter-spacing:-.5px;
  line-height:1.1
}
.brand small {
  font-size:12px;
  font-weight:500;
  letter-spacing:.2px;
  display:block;
  color:var(--muted);
  margin-top:5px
}
.brand-mark {
  display:grid;
  place-items:center;
  width:43px;
  height:43px;
  flex-shrink:0;
  background:var(--accent);
  border-radius:13px;
  color:#fff
}
.brand-mark svg {
  width:26px;
  height:26px
}
.nav-caption {
  font-size:10px;
  letter-spacing:1.6px;
  color:var(--muted);
  font-weight:700;
  margin:55px 12px 17px
}
.side-nav {
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 14px;
  border-radius:12px;
  text-align:left;
  margin:3px 0;
  font-size:13px;
  color:var(--muted);
  font-weight:600
}
.side-nav.selected {
  color:var(--accent);
  background:var(--soft)
}
.nav-dot {
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--accent);
  margin-left:auto
}
.sidebar-group {
  border-top:1px solid var(--line);
  padding:26px 12px 0;
  margin-top:27px
}
.sidebar-group small {
  font-size:11px;
  color:var(--muted)
}
.sidebar-group strong {
  display:block;
  font-size:20px;
  font-weight:700;
  margin:7px 0 3px
}
.sidebar-group p {
  font-size:12px;
  color:var(--muted);
  margin:0
}
.sidebar-group button {
  color:var(--accent);
  font-size:12px;
  font-weight:600;
  padding:0;
  margin-top:16px
}
.sidebar-bottom {
  margin-top:auto;
  font-size:10px;
  color:var(--muted);
  padding:25px 8px 0;
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap
}
.sidebar-bottom .text-link {
  width:100%;
  margin-top:10px;
  font-size:11px;
  justify-content:space-between
}
.live-dot {
  width:6px;
  height:6px;
  display:inline-block;
  background:var(--green);
  border-radius:50%;
  flex-shrink:0
}
.main-content {
  max-width:1110px;
  width:100%;
  padding:43px 55px 30px;
  margin:0 auto;
  min-width:0
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:32px;
  gap:15px
}
.eyebrow {
  font-size:10px;
  letter-spacing:1.7px;
  font-weight:700;
  color:var(--muted);
  margin:0 0 7px
}
h1 {
  font-family:'Segoe UI Variable Display','Segoe UI',sans-serif;
  font-size:38px;
  font-weight:750;
  letter-spacing:-1.5px;
  line-height:1.1;
  margin:0
}
.title-dot {
  color:var(--accent)
}
.header-actions {
  display:flex;
  align-items:center;
  gap:20px
}
.today-label {
  font-size:12px;
  color:var(--muted)
}
.icon-button {
  width:36px;
  height:36px;
  display:inline-grid;
  place-items:center;
  border-radius:10px;
  color:var(--muted)
}
.icon-button:hover {
  background:var(--soft);
  color:var(--accent)
}
.icon-button svg {
  width:19px;
  height:19px
}
.flip {
  transform:rotate(180deg)
}
.overview {
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:18px;
  margin-bottom:32px
}
.group-card,.summary-card {
  display:flex;
  gap:16px;
  align-items:center;
  min-height:126px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:25px;
  text-align:left
}
.group-card {
  transition:border-color .2s,box-shadow .2s
}
.group-card:hover {
  border-color:#b5c9ff;
  box-shadow:var(--shadow)
}
.group-card-icon,.summary-icon {
  width:45px;
  height:45px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  border-radius:14px;
  background:var(--soft);
  color:var(--accent)
}
.summary-icon {
  background:var(--bg);
  color:var(--muted)
}
.group-card-content {
  display:flex;
  flex-direction:column;
  min-width:0
}
.group-card small,.summary-card small {
  font-size:9px;
  letter-spacing:1.3px;
  color:var(--muted);
  font-weight:700
}
.group-card strong {
  font-size:24px;
  font-weight:700;
  letter-spacing:-.4px;
  margin:2px 0
}
.group-card-content>span,.summary-card div>span {
  font-size:11px;
  color:var(--muted);
  display:block
}
.switch-icon {
  width:17px;
  height:17px;
  color:var(--muted);
  margin-left:auto
}
.summary-card strong {
  display:block;
  font-size:19px;
  letter-spacing:-.4px;
  font-weight:650;
  margin:4px 0
}
.summary-card.current {
  background:var(--soft);
  border-color:#dce6ff
}
.summary-card.current .summary-icon {
  background:var(--paper);
  color:var(--accent)
}
.schedule-panel {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:23px 25px 18px;
  margin-bottom:27px
}
.calendar-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:22px
}
h2 {
  font-size:19px;
  font-weight:700;
  letter-spacing:-.4px;
  margin:0
}
.calendar-toolbar p {
  font-size:10px;
  color:var(--muted);
  margin:4px 0 0
}
.calendar-actions {
  display:flex;
  gap:14px;
  align-items:center
}
.week-arrows {
  display:flex;
  gap:1px;
  align-items:center
}
.today-button {
  font-size:11px;
  padding:8px 7px;
  font-weight:600
}
.view-toggle {
  background:var(--bg);
  border:1px solid var(--line);
  padding:3px;
  display:flex;
  border-radius:9px;
  gap:2px
}
.view-toggle button {
  font-size:11px;
  padding:7px 12px;
  border-radius:6px;
  color:var(--muted)
}
.view-toggle .active {
  background:var(--paper);
  color:var(--ink);
  box-shadow:0 2px 5px #172c460d
}
.week-strip {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:7px
}
.day-button {
  border-radius:13px;
  min-height:76px;
  padding:9px 4px 7px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  position:relative;
  color:var(--muted);
  border:1px solid transparent
}
.day-button .weekday {
  font-size:10px
}
.day-button .day-number {
  font-size:21px;
  font-weight:650;
  letter-spacing:-.5px
}
.day-button .day-dot {
  width:4px;
  height:4px;
  border-radius:50%;
  background:var(--accent);
  margin-top:2px
}
.day-button .day-dot.empty {
  background:transparent
}
.day-button .day-dot.review {
  background:var(--amber)
}
.day-button.today:not(.active) {
  color:var(--accent);
  background:var(--soft)
}
.day-button.active {
  background:var(--accent);
  color:#fff;
  box-shadow:0 5px 15px #3566e825
}
.day-button.active .day-dot {
  background:#fff
}
.day-button:hover:not(.active) {
  border-color:#b7c9f5
}
.day-button.weekend:not(.active):not(.today) {
  background:var(--bg)
}
.agenda {
  min-height:250px
}
.agenda-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:17px;
  padding:0 3px
}
.agenda-title h2 {
  font-size:18px;
  text-transform:capitalize
}
.agenda-title .count {
  font-size:11px;
  color:var(--muted);
  font-weight:400;
  margin-left:10px
}
.pdf-link {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  white-space:nowrap
}
.pdf-link svg {
  width:16px;
  height:16px
}
.pdf-link:hover {
  color:var(--accent)
}
.day-note {
  display:flex;
  gap:9px;
  align-items:flex-start;
  padding:12px 15px;
  border-radius:10px;
  background:var(--soft);
  font-size:12px;
  margin:0 0 16px;
  color:var(--accent)
}
.day-note.warning {
  background:var(--amber-bg);
  color:var(--amber)
}
.day-note svg {
  width:17px;
  height:17px;
  margin-top:1px
}
.lesson-list {
  display:flex;
  flex-direction:column;
  gap:13px;
  position:relative
}
.lesson-row {
  display:grid;
  grid-template-columns:49px minmax(0,1fr);
  gap:10px;
  position:relative
}
.lesson-row::before {
  content:'';
  position:absolute;
  left:23px;
  top:44px;
  bottom:-28px;
  width:1px;
  background:var(--line)
}
.lesson-row:last-child::before {
  display:none
}
.pair-marker {
  font-family:Consolas,monospace;
  font-size:16px;
  color:var(--muted);
  background:var(--bg);
  position:relative;
  z-index:1;
  align-self:start;
  display:grid;
  place-items:center;
  width:47px;
  height:47px;
  border:1px solid var(--line);
  border-radius:50%;
  margin-top:17px
}
.lesson-row.current .pair-marker {
  color:#fff;
  background:var(--accent);
  border-color:var(--accent);
  box-shadow:0 0 0 5px var(--soft)
}
.lesson-card {
  border:1px solid var(--line);
  background:var(--paper);
  border-radius:16px;
  overflow:hidden;
  padding:19px 22px;
  position:relative
}
.lesson-row.current .lesson-card {
  border-color:#b8ccff;
  box-shadow:var(--shadow)
}
.lesson-row.current .lesson-card::before {
  content:'';
  position:absolute;
  left:0;
  top:18px;
  bottom:18px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:var(--accent)
}
.lesson-topline {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:9px
}
.lesson-time {
  font-family:Consolas,'Courier New',monospace;
  font-size:11px;
  letter-spacing:.15px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:6px
}
.lesson-time svg {
  width:13px;
  height:13px
}
.lesson-status {
  font-size:9px;
  letter-spacing:.2px;
  color:var(--accent);
  background:var(--soft);
  padding:3px 7px;
  border-radius:5px;
  font-weight:600
}
.lesson-status.finished {
  color:var(--muted);
  background:var(--bg)
}
.lesson-subject {
  font-size:15px;
  line-height:1.4;
  font-weight:650;
  margin:0 0 9px;
  letter-spacing:-.15px;
  overflow-wrap:anywhere
}
.lesson-details {
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  font-size:11px;
  color:var(--muted)
}
.room {
  display:inline-flex;
  gap:5px;
  align-items:center;
  background:var(--bg);
  padding:3px 7px;
  border-radius:5px;
  color:var(--ink)
}
.room svg {
  width:13px;
  height:13px
}
.subgroup {
  font-size:10px;
  color:var(--accent);
  font-weight:500;
  white-space:nowrap;
  margin-left:8px
}
.lesson-variant+.lesson-variant {
  border-top:1px solid var(--line);
  padding-top:13px;
  margin-top:13px
}
.lesson-row.finished .pair-marker {
  color:#aeb8c7
}
.day-section+.day-section {
  margin-top:34px
}
.schedule-status {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
  font-size:10px;
  margin:28px 4px 0
}
.schedule-status>span {
  display:flex;
  gap:7px;
  align-items:center
}
.page-footer {
  border-top:1px solid var(--line);
  margin-top:40px;
  padding-top:26px;
  color:var(--muted)
}
.footer-brand {
  display:flex;
  align-items:center;
  gap:13px;
  color:var(--ink);
  font-family:'Segoe UI Variable Display','Segoe UI',sans-serif;
  font-size:20px;
  font-weight:700;
  letter-spacing:-.4px
}
.footer-brand img {
  display:block;
  width:52px;
  height:52px;
  flex-shrink:0;
  border-radius:13px;
  object-fit:contain
}
.page-footer p {
  max-width:490px;
  margin:14px 0 0;
  font-size:11px;
  line-height:1.8
}
.page-footer a {
  text-decoration:underline;
  text-underline-offset:3px
}
.page-footer a:hover {
  color:var(--accent)
}
.text-link {
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:11px;
  padding:0
}
.text-link:hover {
  color:var(--accent)
}
.text-link svg {
  width:13px;
  height:13px
}
.empty-state,.loading-state {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:46px 20px 50px;
  border:1px dashed #d7e1f0;
  background:var(--paper);
  border-radius:17px;
  gap:9px
}
.empty-state .empty-icon {
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  background:var(--soft);
  color:var(--accent);
  border-radius:17px;
  margin-bottom:6px
}
.empty-state .empty-icon svg {
  width:26px;
  height:26px
}
.empty-state h3 {
  font-size:17px;
  font-weight:650;
  letter-spacing:-.3px;
  margin:0
}
.empty-state p {
  font-size:12px;
  color:var(--muted);
  max-width:320px;
  margin:0;
  line-height:1.7
}
.primary-button {
  background:var(--accent);
  color:#fff;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:11px 17px;
  font-size:12px;
  font-weight:600;
  margin-top:12px;
  min-height:42px
}
.loading-state {
  min-height:220px;
  border-style:solid;
  color:var(--muted);
  font-size:12px
}
.spinner {
  height:24px;
  width:24px;
  border-radius:50%;
  border:2px solid var(--line);
  border-top-color:var(--accent);
  animation:spin .8s linear infinite;
  margin-bottom:10px
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
.error-banner {
  font-size:12px;
  border-radius:12px;
  padding:14px;
  background:var(--amber-bg);
  color:var(--amber);
  margin-bottom:20px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between
}
.error-banner button {
  font-weight:700;
  text-decoration:underline;
  white-space:nowrap
}
.mobile-nav {
  display:none
}
dialog {
  color:var(--ink);
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:24px;
  padding:28px;
  box-shadow:0 24px 100px #172c4629;
  max-height:85dvh
}
dialog::backdrop {
  background:#14243f66;
  backdrop-filter:blur(4px)
}
.group-dialog {
  width:500px
}
.dialog-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:23px
}
.dialog-header h2 {
  font-size:24px;
  letter-spacing:-.8px
}
.search-input {
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 14px;
  color:var(--muted)
}
.search-input svg {
  width:19px;
  height:19px
}
.search-input input {
  width:100%;
  border:0;
  outline:none;
  background:none;
  color:var(--ink);
  font-size:13px;
  min-width:0
}
.search-input:focus-within {
  border-color:#9bb5ff;
  outline:3px solid var(--soft)
}
.filter-chips {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:18px
}
.filter-chips button {
  padding:7px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  font-size:11px;
  color:var(--muted)
}
.filter-chips button.active {
  background:var(--accent);
  border-color:var(--accent);
  color:#fff
}
.profile-filters {
  display:flex;
  gap:15px;
  margin:18px 0 10px;
  flex-wrap:wrap
}
.profile-filters button {
  font-size:11px;
  color:var(--muted);
  padding:0 0 5px;
  border-bottom:2px solid transparent
}
.profile-filters button.active {
  color:var(--accent);
  border-bottom-color:var(--accent);
  font-weight:600
}
.result-count {
  font-size:10px;
  color:var(--muted);
  padding-top:8px;
  border-top:1px solid var(--line);
  margin:0 0 10px
}
.group-results {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  max-height:310px;
  overflow:auto;
  padding:3px 3px 5px;
  overscroll-behavior:contain
}
.group-result {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:4px;
  text-align:left;
  padding:12px 13px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:11px;
  min-height:64px
}
.group-result strong {
  font-size:14px;
  font-weight:650;
  display:block
}
.group-result small {
  color:var(--muted);
  font-size:9px
}
.group-result svg {
  width:16px;
  height:16px;
  color:var(--accent)
}
.group-result.active {
  background:var(--soft);
  border-color:#b3c8ff
}
.no-groups {
  grid-column:1/-1;
  color:var(--muted);
  font-size:12px;
  padding:18px 0;
  text-align:center
}
.info-dialog {
  width:450px;
  padding:30px
}
.info-dialog>h2 {
  font-size:30px;
  letter-spacing:-1px;
  line-height:1.2;
  margin:12px 0 18px
}
.info-dialog>p:not(.eyebrow) {
  color:var(--muted);
  font-size:13px;
  line-height:1.8
}
.info-note {
  display:flex;
  gap:12px;
  background:var(--bg);
  padding:15px;
  border-radius:12px;
  margin-top:20px
}
.info-note svg {
  color:var(--accent);
  width:21px;
  height:21px;
  margin-top:3px
}
.info-note p {
  font-size:11px;
  color:var(--muted);
  margin:0;
  line-height:1.8
}
.info-dialog .primary-button {
  width:100%;
  margin-top:24px
}
.noscript {
  position:fixed;
  bottom:20px;
  left:20px;
  right:20px;
  background:var(--paper);
  padding:20px;
  border:1px solid var(--line)
}
:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#141d2c;
  --paper:#1b2739;
  --ink:#e4ecfa;
  --muted:#94a5bf;
  --accent:#86a6ff;
  --soft:#253656;
  --line:#2c3a50;
  --green:#78cba4;
  --amber:#e9bc6d;
  --amber-bg:#3c3225;
  --shadow:0 16px 60px #0002
}
:root[data-theme=dark] .day-button.active,:root[data-theme=dark] .brand-mark,:root[data-theme=dark] .primary-button,:root[data-theme=dark] .filter-chips button.active,:root[data-theme=dark] .lesson-row.current .pair-marker {
  color:#14203a
}
:root[data-theme=dark] .day-button.active .day-dot {
  background:#14203a
}
:root[data-theme=dark] .summary-card.current {
  border-color:var(--line)
}
:root[data-theme=dark] .empty-state {
  border-color:var(--line)
}
@media(min-width:1440px) {
  .main-content {
    padding-top:55px
  }
  .topbar {
    margin-bottom:38px
  }
  .lesson-card {
    padding:22px 25px
  }
  .schedule-panel {
    padding:26px 28px 20px
  }
  .overview {
    margin-bottom:34px
  }
}
@media(max-width:1100px) {
  .app-layout {
    grid-template-columns:212px minmax(0,1fr)
  }
  .sidebar {
    padding:32px 18px
  }
  .main-content {
    padding:34px 30px 26px
  }
  .calendar-actions {
    gap:6px
  }
  .view-toggle button {
    padding:6px 9px
  }
  .group-card,.summary-card {
    padding:20px;
    gap:12px
  }
  .group-card strong {
    font-size:21px
  }
  .summary-card strong {
    font-size:17px
  }
  .group-card-icon,.summary-icon {
    width:38px;
    height:38px
  }
}
@media(max-width:800px) {
  .app-layout {
    display:block
  }
  .sidebar {
    display:none
  }
  .main-content {
    max-width:650px;
    padding:25px 23px calc(95px + var(--safe-bottom))
  }
  .topbar {
    margin-bottom:24px
  }
  .overview {
    gap:12px;
    margin-bottom:22px
  }
  .group-card,.summary-card {
    min-height:112px
  }
  .today-label {
    font-size:10px
  }
  .mobile-nav {
    position:fixed;
    display:flex;
    bottom:0;
    left:0;
    right:0;
    padding:10px 20px calc(8px + var(--safe-bottom));
    background:var(--paper);
    border-top:1px solid var(--line);
    justify-content:space-around;
    z-index:10
  }
  .mobile-nav button {
    width:95px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
    color:var(--muted);
    font-size:9px;
    min-height:45px
  }
  .mobile-nav button svg {
    width:21px;
    height:21px
  }
  .mobile-nav .selected {
    color:var(--accent)
  }
  .mobile-nav .selected svg {
    background:var(--soft);
    box-sizing:content-box;
    padding:3px 17px;
    margin:-3px -17px 0;
    border-radius:13px
  }
}
@media(max-width:520px) {
  .main-content {
    padding:25px 17px calc(95px + var(--safe-bottom));
    padding-top:max(25px,var(--tg-content-safe-area-inset-top,0px))
  }
  .eyebrow {
    font-size:8px;
    letter-spacing:1.4px;
    margin-bottom:8px
  }
  h1 {
    font-size:31px;
    letter-spacing:-1.1px
  }
  .topbar {
    align-items:flex-end;
    margin-bottom:24px
  }
  .header-actions {
    gap:7px;
    padding-bottom:1px
  }
  .today-label {
    font-size:9px;
    max-width:75px;
    line-height:1.5;
    text-align:right
  }
  .icon-button {
    width:32px;
    height:32px
  }
  .overview {
    display:block;
    margin-bottom:22px
  }
  .group-card {
    padding:18px;
    width:100%;
    min-height:104px;
    gap:14px;
    border-radius:17px
  }
  .group-card strong {
    font-size:25px;
    margin:2px 0
  }
  .group-card small {
    font-size:8px
  }
  .group-card-content>span {
    font-size:10px
  }
  .group-card-icon {
    width:43px;
    height:43px
  }
  .summary-card {
    padding:15px 1px 0;
    min-height:0;
    border:0;
    background:none;
    gap:10px;
    border-radius:0
  }
  .summary-card .summary-icon {
    background:none;
    width:22px;
    height:22px
  }
  .summary-card .summary-icon svg {
    width:17px;
    height:17px
  }
  .summary-card div {
    display:flex;
    flex-wrap:wrap;
    gap:0 7px;
    align-items:baseline
  }
  .summary-card small {
    display:none
  }
  .summary-card strong {
    font-size:11px;
    letter-spacing:0;
    margin:0;
    font-weight:650
  }
  .summary-card div>span {
    font-size:10px
  }
  .summary-card.current {
    background:none;
    border:0
  }
  .summary-card.current .summary-icon {
    background:none
  }
  .schedule-panel {
    padding:17px 12px 13px;
    border-radius:17px;
    margin-bottom:25px
  }
  .calendar-toolbar {
    margin:0 2px 17px;
    align-items:flex-start;
    gap:5px;
    flex-wrap:wrap
  }
  .calendar-toolbar h2 {
    font-size:16px
  }
  .calendar-toolbar p {
    font-size:8px;
    margin-top:4px
  }
  .calendar-actions {
    gap:0;
    display:contents
  }
  .week-arrows {
    margin-left:auto;
    margin-top:-2px;
    gap:0
  }
  .week-arrows .icon-button {
    width:26px;
    height:26px
  }
  .today-button {
    font-size:10px;
    padding:6px 4px
  }
  .view-toggle {
    margin-top:11px;
    order:4;
    width:100%;
    justify-content:center;
    padding:3px;
    border-radius:9px
  }
  .view-toggle button {
    width:auto;
    flex:1;
    padding:6px;
    font-size:10px
  }
  .week-strip {
    gap:3px
  }
  .day-button {
    min-height:66px;
    border-radius:11px;
    padding:8px 2px 5px
  }
  .day-button .weekday {
    font-size:9px
  }
  .day-button .day-number {
    font-size:18px
  }
  .day-button .day-dot {
    width:3px;
    height:3px
  }
  .agenda-title {
    margin-bottom:15px;
    padding:0 2px
  }
  .agenda-title h2 {
    font-size:16px
  }
  .agenda-title .count {
    font-size:10px;
    margin-left:6px
  }
  .pdf-link {
    font-size:10px;
    gap:4px
  }
  .pdf-link svg {
    width:13px;
    height:13px
  }
  .lesson-row {
    grid-template-columns:33px minmax(0,1fr);
    gap:8px
  }
  .pair-marker {
    width:32px;
    height:32px;
    font-size:12px;
    margin-top:23px
  }
  .lesson-row::before {
    left:15px;
    top:47px
  }
  .lesson-row.current .pair-marker {
    box-shadow:0 0 0 3px var(--soft)
  }
  .lesson-card {
    padding:16px;
    border-radius:14px
  }
  .lesson-topline {
    gap:8px;
    margin-bottom:8px
  }
  .lesson-time {
    font-size:10px;
    gap:5px
  }
  .lesson-time svg {
    width:12px;
    height:12px
  }
  .lesson-status {
    font-size:8px;
    padding:3px 5px
  }
  .lesson-subject {
    font-size:14px;
    margin-bottom:8px
  }
  .lesson-details {
    gap:7px;
    font-size:10px
  }
  .room {
    font-size:9px;
    padding:3px 6px
  }
  .subgroup {
    font-size:9px;
    display:inline-block;
    margin-left:5px
  }
  .lesson-list {
    gap:11px
  }
  .day-note {
    font-size:10px;
    padding:11px 12px;
    gap:7px
  }
  .schedule-status {
    font-size:9px;
    margin-top:24px
  }
  .schedule-status .text-link {
    font-size:10px
  }
  .page-footer {
    margin-top:32px;
    padding-top:23px
  }
  .page-footer p {
    font-size:10px
  }
  body[data-view=teachers] h1 {
    font-size:clamp(24px,6.7vw,31px);
    letter-spacing:-.9px
  }
  .empty-state {
    padding:35px 18px
  }
  .empty-state h3 {
    font-size:16px
  }
  .empty-state p {
    font-size:11px
  }
  .group-dialog {
    position:fixed;
    inset:auto 0 0;
    margin:0;
    width:100%;
    max-width:none;
    max-height:88dvh;
    border-radius:25px 25px 0 0;
    padding:25px 21px calc(24px + var(--safe-bottom));
    border-bottom:0
  }
  .group-dialog .dialog-header {
    margin-bottom:21px
  }
  .dialog-header h2 {
    font-size:23px
  }
  .group-results {
    max-height:42dvh
  }
  .info-dialog {
    width:calc(100% - 34px);
    padding:25px
  }
  .info-dialog>h2 {
    font-size:27px
  }
}
.bells-note {
  font-size:10px;
  color:var(--muted);
  margin:12px 0 0 59px;
  line-height:1.6
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}

/* A real-time card, independent of the selected calendar day. */
.overview { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }
.summary-card.timer-card {
  --timer-accent:var(--accent);
  display:block;
  min-width:0;
  padding:17px 21px 16px;
  min-height:150px;
}
.timer-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.timer-card .timer-kicker { display:inline-flex; align-items:center; gap:6px; font-size:8px; font-weight:700; letter-spacing:1px; color:var(--muted); }
.timer-dot { height:5px; width:5px; border-radius:50%; background:var(--timer-accent); flex-shrink:0; }
.timer-settings-button { width:30px; height:28px; margin:-5px -6px -3px 0; }
.timer-settings-button svg { width:17px; height:17px; }
.timer-body { display:flex; gap:15px; align-items:center; flex-wrap:wrap; margin-top:9px; }
.timer-numbers { flex:0 0 auto; }
.timer-card #timer-value { font-family:Consolas,'Courier New',monospace; font-size:30px; font-weight:650; font-variant-numeric:tabular-nums; letter-spacing:-1px; line-height:1.15; color:var(--timer-accent); display:block; white-space:nowrap; }
.timer-card #timer-label { font-size:9px; color:var(--muted); display:block; margin-top:4px; }
.timer-context { flex:1 1 120px; min-width:0; }
.timer-card #timer-title { font-size:12px; font-weight:650; letter-spacing:-.1px; line-height:1.5; color:var(--ink); margin:0 0 3px; }
.timer-card #timer-detail { font-size:10px; line-height:1.6; color:var(--muted); overflow-wrap:anywhere; }
.timer-progress { height:3px; background:var(--soft); border-radius:4px; overflow:hidden; margin-top:13px; }
.timer-progress span { display:block; height:100%; background:var(--timer-accent); border-radius:4px; }
.timer-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; }
.timer-card #timer-source { color:var(--muted); font-size:8px; }
.timer-foot button { font-size:10px; color:var(--accent); padding:0; }
.timer-warning { color:var(--amber); font-size:9px; line-height:1.5; margin:8px 0 0; }
.timer-card[data-state=internal_break],.timer-card[data-state=between_pairs] { --timer-accent:var(--green); }
.timer-card[data-state=finished],.timer-card[data-state=free_day] { --timer-accent:var(--ink); }
.timer-dialog { width:490px; padding:28px; }
.timer-dialog .dialog-header { margin-bottom:16px; }
.timer-settings-intro { color:var(--muted); font-size:12px; line-height:1.8; margin:0 0 22px; }
.timer-field { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:17px 0; border-bottom:1px solid var(--line); }
.timer-field>span:first-child { min-width:0; }
.timer-field strong { display:block; font-size:13px; font-weight:600; margin-bottom:5px; }
.timer-field small { display:block; color:var(--muted); font-size:10px; line-height:1.7; max-width:245px; }
.timer-number-field { display:flex; align-items:center; gap:8px; flex-shrink:0; color:var(--muted); font-size:11px; }
.timer-number-field input { border:1px solid var(--line); color:var(--ink); background:var(--bg); border-radius:10px; width:65px; min-height:44px; padding:9px 6px; font-size:17px; text-align:center; font-variant-numeric:tabular-nums; }
.timer-duration-preview { background:var(--soft); color:var(--accent); border-radius:9px; padding:11px 13px; font-size:11px; text-align:center; margin:18px 0; }
.timer-dialog .info-note { margin-top:0; }
.timer-form-error { font-size:11px; line-height:1.7; color:var(--amber); margin:15px 0 0; }
.timer-form-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:22px; }
.timer-form-actions .primary-button { margin:0; min-width:130px; }
@media(max-width:1100px) {
  .summary-card.timer-card { padding:17px; }
  .timer-body { gap:11px; }
  .timer-card #timer-value { font-size:27px; }
}
@media(max-width:520px) {
  .summary-card.timer-card { border:1px solid var(--line); background:var(--paper); border-radius:17px; padding:16px 17px; margin-top:12px; min-height:138px; }
  .timer-card div { display:block; }
  .timer-card .timer-heading,.timer-card .timer-body,.timer-card .timer-foot { display:flex; }
  .timer-card .timer-body { align-items:center; gap:16px; flex-wrap:wrap; }
  .timer-card .timer-context { display:block; flex:1 1 110px; }
  .timer-card .timer-numbers { display:block; }
  .timer-card #timer-value { font-size:32px; }
  .timer-card #timer-title { font-size:12px; }
  .timer-card #timer-detail { font-size:10px; }
  .timer-card #timer-label { font-size:9px; }
  .timer-card .timer-kicker { font-size:8px; }
  .timer-dialog { position:fixed; inset:auto 0 0; margin:0; width:100%; max-width:none; max-height:90dvh; border-radius:25px 25px 0 0; padding:25px 21px calc(24px + var(--safe-bottom)); border-bottom:0; }
  .timer-dialog .dialog-header h2 { font-size:23px; }
  .timer-field { gap:13px; }
  .timer-field small { font-size:10px; }
}

.bells-caption { color:var(--muted); font-size:12px; line-height:1.7; margin:-7px 0 18px; }
.bell-list { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.bell-row { padding:20px 23px; }
.bell-row+.bell-row { border-top:1px solid var(--line); }
.bell-row-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:5px 16px; }
.bell-row-heading strong { font-size:14px; font-weight:650; }
.bell-row-heading>span { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.bell-parts { color:var(--accent); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; line-height:1.7; margin:8px 0 0; }
.bell-parts>span { color:var(--muted); margin:0 5px; font-weight:400; }
.bell-break { color:var(--muted); font-size:11px; margin:9px 0 0; }
.bells-footnote { margin:18px 3px 0; max-width:600px; }
.bells-footnote p { color:var(--muted); font-size:11px; line-height:1.8; margin:0 0 9px; }
.bells-footnote .text-link { color:var(--accent); }
@media(max-width:600px) {
  .bell-row { padding:18px; }
  .bell-parts { font-size:13px; }
  .bells-view .agenda-title h2 .count { display:block; margin:7px 0 0; }
}

.nearest-schedule { max-width:440px; margin:17px 0 0; }
.nearest-schedule p { margin:0; color:var(--muted); font-size:12px; line-height:1.9; }
.nearest-schedule .text-link { display:inline; color:var(--accent); font-size:inherit; line-height:inherit; text-decoration:underline; text-underline-offset:3px; }
.nearest-schedule small { display:block; margin-top:6px; color:var(--muted); font-size:10px; line-height:1.7; }
.nearest-schedule+.primary-button { margin-top:16px; }
