:root {
  --bg: #EEF3FA;
  --card: #FFFFFF;
  --ink: #1C1C1E;
  --ink2: #8E8E93;
  --accent: #007AFF;
  --line: rgba(60, 60, 67, 0.12);
  /* Frosted glass over a cool wash — slightly more open so blue shows through */
  --glass-bg: rgba(255, 255, 255, .68);
  --glass-blur: blur(28px) saturate(180%);
  --glass-radius: 22px;
  --glass-shadow:
    0 1px 2px rgba(40, 80, 140, .04),
    0 10px 24px rgba(40, 80, 140, .06),
    0 24px 48px rgba(40, 80, 140, .07);
  --tab-on-bg: rgba(120, 120, 128, .14);
  /* Эталон карточки: ИПГС 3-2 · четверг · нечётная — одинаковый кегль во всех днях */
  --lesson-time-size: 13px;
  --lesson-subj-size: 14.5px;
  --lesson-meta-size: 12.5px;
  --lesson-time-col: 59px;
  --hub-pad: 4px;
  --hub-web-nudge: 0px;
  --app-bottom-gap: 0px;
  /*
   * HUB GEOMETRY — LOCKED (see docs/hub-geometry.md).
   * Do not change without explicit user approval.
   */
  --hub-left: max(20px, calc(env(safe-area-inset-left, 0px) + 14px));
  --hub-bottom: max(
    0px,
    calc(var(--hub-pad) + env(safe-area-inset-bottom, 0px) + var(--app-bottom-gap) - var(--hub-web-nudge))
  );
  --hub-pad-top: 3px;
  --hub-pad-bottom: 6px;
  --hub-pad-left: 11px;
  --hub-pad-right: 11px;
  --hub-search-gap: 8px;
  --search-hub-right: max(20px, calc(env(safe-area-inset-right, 0px) + 10px));
  --search-hub-size: 62px;
  --search-hub-ico: 32px;
  --pane-bottom-pad: max(
    96px,
    calc(110px + env(safe-area-inset-bottom, 0px) + var(--app-bottom-gap) - var(--hub-web-nudge))
  );
}
[data-theme="dark"] {
  --bg: #070B12;
  --card: #1C1C1E;
  --ink: #F5F5F7;
  --ink2: #8E8E93;
  --accent: #0A84FF;
  --line: rgba(84, 84, 88, 0.45);
  --glass-bg: rgba(28, 32, 42, .72);
  --glass-shadow:
    0 1px 2px rgba(0, 0, 0, .25),
    0 10px 20px rgba(0, 0, 0, .3),
    0 24px 48px rgba(0, 0, 0, .4);
  --tab-on-bg: rgba(120, 120, 128, .28);
}

/* Shared glass surface — cards, chips, nav circles, floating hubs */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none;
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
}
.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
.phone::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% -18%, rgba(168, 204, 246, .46), transparent 60%),
    radial-gradient(ellipse 80% 50% at 108% 108%, rgba(190, 218, 248, .34), transparent 55%),
    var(--bg);
}
[data-theme="dark"] .phone::before {
  background:
    radial-gradient(ellipse 120% 70% at 50% -18%, rgba(46, 88, 150, .32), transparent 60%),
    radial-gradient(ellipse 80% 50% at 108% 108%, rgba(36, 64, 110, .22), transparent 55%),
    var(--bg);
}
.phone > .body { position: relative; z-index: 1; }
.body {
  padding: 14px 16px 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
html[data-shell="web"] .body {
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
}
.scroll-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  margin: 0 -16px;
  padding-bottom: 0;
}
.panes {
  display: flex;
  width: 300%;
  height: 100%;
  position: relative;
  transition: transform 0.42s cubic-bezier(0.34, 1.35, 0.48, 1);
}
.panes.dragging { transition: none; }
.panes.sliding {
  will-change: transform;
}
.pane {
  width: 33.3333%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: transparent;
}
#paneImportant,
#paneOther {
  overflow-y: auto;
  padding: 0 16px;
  padding-bottom: var(--pane-bottom-pad);
}
#paneOther.other-sub {
  touch-action: pan-y;
  position: relative;
}
#paneOther.other-sub.other-short {
  touch-action: none;
  overflow: hidden;
}
#paneOther.other-sub .other-slide {
  touch-action: pan-y;
  min-height: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
#paneOther.other-sub.other-short .other-slide {
  z-index: 1;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  touch-action: none;
}
/* In-flow зона свайпа назад — под контентом, на всю оставшуюся высоту */
#paneOther .other-back-catch {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  z-index: 0;
  flex: 1 0 auto;
  width: 100%;
  min-height: 55vh;
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.01);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#paneOther.other-sub .sub-head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}
#paneOther.other-sub .back-btn {
  position: relative;
  z-index: 3;
  pointer-events: auto !important;
}
.other-swipe-space { display: none; }
.pane::-webkit-scrollbar { display: none; }
.day-viewport {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  /* Let the browser keep vertical scroll; give horizontal pans to JS */
  touch-action: pan-y;
}
.day-track {
  display: flex;
  height: 100%;
  position: relative;
  left: 0;
}
.day-track.moving {
  will-change: transform;
}
.day-track.animating {
  transition: transform 0.34s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.day-page {
  height: 100%;
  overflow-y: auto;
  padding: 0 16px;
  padding-bottom: var(--pane-bottom-pad);
  box-sizing: border-box;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 0 0 auto;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
}
.day-page::-webkit-scrollbar { display: none; }
.day-swipe-space {
  flex: 1 0 auto;
  min-height: 160px;
  width: 100%;
  touch-action: pan-y;
}
#paneSchedule,
.header,
#scrollViewport {
  touch-action: pan-y;
}

.groupbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.group-chip, .role-pill {
  border: none; background: var(--glass-bg); border-radius: 14px; padding: 7px 10px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.group-chip { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink); max-width: 72%; }
.group-chip span { color: var(--ink2); font-weight: 500; }
.role-pill { color: var(--accent); background: rgba(0,122,255,.1); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

.header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 48px;
  align-items: center;
  column-gap: 10px;
  margin-bottom: 16px;
  height: 74px;
  min-height: 74px;
  overflow: visible;
  touch-action: manipulation;
}
.header.hide-on-important { display: none; }
.header > #prev { grid-column: 1; grid-row: 1; }
.header > #next { grid-column: 4; grid-row: 1; }
.daymeta {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: center;
  height: 74px;
  display: flex;
  align-items: center;
  margin-top: 6px;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.weekday-cloud {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 52px;
  min-width: 52px;
  height: 46px;
  padding: 5px 0;
  box-sizing: border-box;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none;
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
}
.weekday-abbr,
.daytitle {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1C1C1E;
  white-space: nowrap;
}
.weekday-parity,
.daysub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: #0A84FF;
  white-space: nowrap;
}
[data-theme="dark"] .weekday-abbr,
[data-theme="dark"] .daytitle { color: #F5F5F7; }
[data-theme="dark"] .weekday-parity,
[data-theme="dark"] .daysub { color: #0A84FF; }
.navbtn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--glass-bg);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  cursor: pointer; flex-shrink: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}
.navbtn:active { opacity: 0.72; transform: scale(0.94); }
.navbtn svg {
  width: 23px; height: 23px; display: block;
  stroke: #1C1C1E; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
[data-theme="dark"] .navbtn svg { stroke: #F5F5F7; }
.date-carousel {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  margin-top: 6px;
  margin-right: -4px;
  transform: translateX(-2px);
  width: 218px;
  max-width: 218px;
  position: relative;
  z-index: 1;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
/* Peak under drum mirror; dissolves toward midpoint with weekday (L)
   and toward screen edge (R). Lives outside overflow:hidden viewport. */
.date-carousel-shade {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 200px;
  height: 108px;
  transform: translate(-50%, -36%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 40% 48% at 50% 42%,
    rgba(0, 0, 0, 0.115) 0%,
    rgba(0, 0, 0, 0.055) 34%,
    rgba(0, 0, 0, 0.02) 58%,
    transparent 76%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 18%,
    #000 36%,
    #000 64%,
    rgba(0, 0, 0, 0.35) 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 18%,
    #000 36%,
    #000 64%,
    rgba(0, 0, 0, 0.35) 82%,
    transparent 100%
  );
}
[data-theme="dark"] .date-carousel-shade {
  background: radial-gradient(
    ellipse 40% 48% at 50% 42%,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.22) 34%,
    rgba(0, 0, 0, 0.06) 58%,
    transparent 76%
  );
}
.date-carousel-viewport {
  width: 218px;
  height: 74px;
  overflow: hidden;
  perspective: 520px;
  perspective-origin: 50% 50%;
  position: relative;
  z-index: 1;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.date-carousel-viewport:active { cursor: grabbing; }
/* Static glass mirror — dates scroll behind it */
.date-carousel-mirror {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 50px;
  height: 64px;
  margin-left: -25px;
  margin-top: -32px;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.date-carousel-track {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}
.date-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 64px;
  margin-left: -25px;
  margin-top: -32px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 0;
  border: none;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  opacity: 0.4;
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: auto;
}
.date-chip .datenum {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #AEAEB2;
}
.date-chip .datemon {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: rgba(10, 132, 255, 0.38);
}
.date-chip.on {
  filter: none !important;
  opacity: 1 !important;
}
.date-chip.on .datenum {
  font-size: 22px;
  color: #1C1C1E;
}
.date-chip.on .datemon {
  font-size: 12px;
  color: #0A84FF;
}
.weeklabel { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--accent); text-transform: uppercase; }
[data-theme="dark"] .date-chip .datenum { color: #636366; }
[data-theme="dark"] .date-chip .datemon { color: rgba(10, 132, 255, 0.35); }
[data-theme="dark"] .date-chip.on .datenum { color: #F5F5F7; }
[data-theme="dark"] .date-chip.on .datemon { color: #0A84FF; }

.list { display: flex; flex-direction: column; gap: 14px; flex: 0 0 auto; padding: 2px 0 8px; }
.empty {
  padding: 28px 16px; text-align: center;
  color: var(--ink2); font-size: 13px;
}
.empty.glass,
.item.glass {
  /* recipe from .glass — explicit so cards match weekday/nav */
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none;
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
}
.item {
  padding: 12px 14px; display: flex; gap: 19px;
  align-items: flex-start;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.time {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  font-size: var(--lesson-time-size); font-weight: 600; color: var(--ink2); line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.time-start, .time-end {
  display: block; white-space: nowrap;
  font-size: var(--lesson-time-size);
  font-weight: 600;
  line-height: 1.25;
}
.stripe { width: 3px; align-self: stretch; border-radius: 3px; background: var(--accent); flex: 0 0 3px; }
.stripe.red { background: #FF3B30; }
.stripe.yellow { background: #FFCC00; }
.stripe.green { background: #34C759; }
.stripe.gray { background: #8E8E93; }
.time-block {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  width: var(--lesson-time-col); flex: 0 0 var(--lesson-time-col);
  min-width: var(--lesson-time-col); max-width: var(--lesson-time-col);
  overflow: hidden;
}
.time-stars {
  display: flex; gap: 0; line-height: 1;
  width: 100%; max-width: 100%; overflow: hidden;
}
.time-stars .stars {
  display: flex; letter-spacing: 0; gap: 0;
  width: 100%; justify-content: space-between;
}
.time-stars .star { font-size: 11px; letter-spacing: 0; line-height: 1; }

.sub-count {
  color: var(--ink2);
  font-weight: 600;
  font-size: 0.92em;
}

.lesson-pick-sheet {
  background: var(--bg);
  padding-bottom: max(28px, calc(16px + env(safe-area-inset-bottom, 0px)));
}
.lesson-pick-title {
  font-size: 13px; font-weight: 600; color: var(--ink2);
  margin: 0 0 12px; letter-spacing: .02em; text-transform: uppercase;
}
.lesson-pick-actions { display: flex; flex-direction: column; gap: 10px; }
.lesson-pick-btn {
  display: flex; flex-direction: row; align-items: center; gap: 14px;
  width: 100%; border: none; border-radius: var(--glass-radius);
  padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--glass-bg); color: var(--ink);
  font-family: inherit;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, opacity .12s ease;
}
.lesson-pick-btn:active { opacity: 0.72; transform: scale(0.985); }
.lesson-pick-btn .lp-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.lp-label { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.lp-sub { font-size: var(--lesson-meta-size); font-weight: 500; color: var(--ink2); line-height: 1.35; }
.lesson-pick-btn .item-chev { margin-left: auto; color: var(--ink2); }

.subject-sheet { padding-bottom: max(28px, calc(16px + env(safe-area-inset-bottom, 0px))); }
.subject-head { text-align: left; touch-action: pan-y; }
.subject-name {
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25;
  margin-bottom: 10px;
}
.subject-agg {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; color: var(--ink2); margin-bottom: 18px;
}
.subject-agg b { color: var(--ink); }
.subject-agg .muted { color: var(--ink2); }
.subject-colors-label {
  font-size: 12px; font-weight: 600; color: var(--ink2);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px;
}

/* iOS-style importance wheel: fixed shell + scrolling labels (3D) */
.imp-drum-shell {
  --imp-row: 56px;
  position: relative;
  width: 100%;
  height: calc(var(--imp-row) * 5);
  margin: 0 0 18px;
  border-radius: 16px;
  background: var(--bg);
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.imp-drum-highlight {
  pointer-events: none;
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: var(--imp-row);
  margin-top: calc(var(--imp-row) / -2);
  z-index: 4;
  box-sizing: border-box;
  border-top: 1.5px solid rgba(60, 60, 67, 0.28);
  border-bottom: 1.5px solid rgba(60, 60, 67, 0.28);
  background: rgba(0, 122, 255, 0.06);
  border-radius: 10px;
}
[data-theme="dark"] .imp-drum-highlight {
  border-top-color: rgba(235, 235, 245, 0.32);
  border-bottom-color: rgba(235, 235, 245, 0.32);
  background: rgba(10, 132, 255, 0.12);
}
.imp-drum {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-y;
  perspective: 1000px;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
}
.imp-drum::-webkit-scrollbar { display: none; }
.imp-drum-track {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
}
.imp-drum-spacer { height: calc(var(--imp-row) * 2); width: 100%; }
.imp-drum-item {
  height: var(--imp-row);
  width: 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  color: var(--ink2);
  letter-spacing: -0.01em;
  opacity: 0.35;
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
  box-sizing: border-box;
}
.imp-drum-item.on {
  color: var(--ink);
  font-weight: 700;
}
.imp-drum-lab {
  text-align: center;
  max-width: 100%;
}
.subject-confirm {
  width: 100%;
  margin-top: 6px;
  min-height: 54px;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 14px;
  letter-spacing: -0.01em;
}
.subject-change {
  font-size: 19px;
  min-height: 58px;
  padding: 17px 18px;
}
.subject-agg.muted-line { color: var(--ink2); }
.subject-bars {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0 0 18px;
}
.subject-bar-row { display: flex; flex-direction: column; gap: 6px; }
.subject-bar-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.subject-bar-lab { flex: 1; min-width: 0; }
.subject-bar-n {
  color: var(--ink2); font-size: 12.5px; font-weight: 600; flex: 0 0 auto;
}
.subject-bar-track {
  height: 8px; border-radius: 999px; background: rgba(60, 60, 67, 0.12);
  overflow: hidden;
}
[data-theme="dark"] .subject-bar-track { background: rgba(84, 84, 88, 0.45); }
.subject-bar-fill {
  height: 100%; border-radius: 999px; min-width: 0;
  transition: width 0.35s ease;
}
.subject-bar-fill.red { background: #FF3B30; }
.subject-bar-fill.yellow { background: #FFCC00; }
.subject-bar-fill.green { background: #34C759; }
.subject-bar-fill.gray { background: #8E8E93; }
.subject-done {
  width: 100%;
  margin-top: 10px;
  min-height: 48px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: var(--bg);
  color: var(--accent);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.subject-done:active { opacity: 0.65; }
.subj-chip {
  width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.subj-chip.red { background: #FF3B30; }
.subj-chip.yellow { background: #FFCC00; }
.subj-chip.green { background: #34C759; }
.subj-chip.gray { background: #8E8E93; }
.item-main { flex: 1; min-width: 0; }
.item-subj {
  font-size: var(--lesson-subj-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}
.item-kind {
  display: block;
  font-size: var(--lesson-subj-size);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 1px;
  white-space: pre-line;
}
.item-meta {
  font-size: var(--lesson-meta-size);
  font-weight: 500;
  color: var(--ink2);
  margin-top: 2px;
  line-height: 1.35;
}
.item-note {
  margin-top: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 8px; display: inline-block;
}
.item-tap {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.item-tap:active { transform: scale(0.985); opacity: 0.7; }
svg.item-chev,
.item-chev-slot {
  width: 15px; height: 15px; align-self: center; flex: 0 0 15px; display: block;
}
svg.item-chev {
  stroke: var(--ink2); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* Liquid-glass floating tab bar + Telegram-like bubble lens
   IMPORTANT: backdrop-filter must NOT be on the same element that
   contains the bubble — WebKit clips overflow to the pill shape. */
.tabbar {
  position: fixed;
  left: var(--hub-left);
  right: calc(var(--search-hub-right) + var(--search-hub-size) + var(--hub-search-gap));
  width: auto;
  max-width: none;
  margin: 0;
  /* TG: 4px + safe + contentSafeArea. Web: чуть ниже, как в Mini App */
  bottom: var(--hub-bottom);
  display: block;
  gap: 4px;
  /* LOCKED vertical pads — docs/hub-geometry.md */
  padding: var(--hub-pad-top) var(--hub-pad-right) var(--hub-pad-bottom) var(--hub-pad-left);
  min-height: 0;
  z-index: 8;
  border-radius: 999px;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  transform-origin: center bottom;
  will-change: transform;
}
.search-hub {
  position: fixed;
  right: var(--search-hub-right);
  bottom: var(--hub-bottom);
  width: var(--search-hub-size);
  height: var(--search-hub-size);
  z-index: 8;
  border: none;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-hub-glass {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none;
  box-shadow: var(--glass-shadow);
}
[data-theme="dark"] .search-hub-glass {
  background: var(--glass-bg);
  border: none;
  box-shadow: var(--glass-shadow);
}
.search-hub-ico {
  position: relative;
  z-index: 1;
  width: var(--search-hub-ico);
  height: var(--search-hub-ico);
  display: block;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search-hub:active { transform: scale(0.94); opacity: 0.85; }

.search-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  max-width: 480px;
  margin: 0 auto;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
}
.search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 8px;
  flex: 0 0 auto;
}
.search-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.search-close {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: var(--glass-bg); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.search-close svg {
  width: 20px; height: 20px; display: block;
  stroke: #1C1C1E; fill: none; stroke-width: 2.4; stroke-linecap: round;
}
[data-theme="dark"] .search-close svg { stroke: #F5F5F7; }
.search-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 16px 12px;
  -webkit-overflow-scrolling: touch;
}
.search-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  background: var(--glass-bg); border: none; border-radius: var(--glass-radius);
  padding: 15px 16px; margin-bottom: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  text-align: left; cursor: pointer;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  -webkit-tap-highlight-color: transparent;
}
.search-row:active { opacity: 0.65; }
.search-row.on { outline: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.search-row .check {
  width: 18px; height: 18px; flex: 0 0 auto;
  stroke: var(--accent); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.search-row-name { min-width: 0; line-height: 1.3; }
.search-row-sub {
  display: block; margin-top: 2px;
  font-size: 12.5px; font-weight: 500; color: var(--ink2);
}
.search-dock {
  flex: 0 0 auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid var(--line);
}
.search-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass-bg);
  border-radius: var(--glass-radius);
  padding: 12px 14px;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.search-field svg {
  width: 18px; height: 18px; flex: 0 0 auto;
  stroke: var(--ink2); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.search-field input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  -webkit-appearance: none;
}
.search-field input::placeholder { color: var(--ink2); font-weight: 500; }

.tabbar-glass {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none;
  box-shadow: var(--glass-shadow);
}
/* Full-pill hit target under lens: catches gaps/padding dead zones */
.tabbar-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}
[data-theme="dark"] .tabbar-glass {
  background: var(--glass-bg);
  border: none;
  box-shadow: var(--glass-shadow);
}
[data-theme="dark"] .tab-lens,
[data-theme="dark"] .tab-lens.bubble {
  background: var(--tab-on-bg);
  border: none;
  box-shadow: none;
}
[data-theme="dark"] .badge { box-shadow: 0 0 0 1.5px rgba(28,28,30,0.9); }
.tab-lens {
  position: absolute;
  top: 6px;
  left: 0;
  width: 50%;
  height: calc(100% - 12px);
  border-radius: 999px;
  z-index: 2;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  transform-origin: center center;
  /* Active segment = neutral gray capsule; icon/text blue on top */
  background: var(--tab-on-bg);
  border: none;
  box-shadow: none;
  transform: translate3d(5px, 0, 0);
  will-change: transform, width, height, border-radius, box-shadow, top;
}
.tab-lens::after {
  display: none;
}
.tab-lens:active, .tab-lens.dragging { cursor: grabbing; }
.tab-lens.bubble,
.tab-lens.bubble.traveling {
  background: var(--tab-on-bg);
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.tab-lens.bubble::after {
  display: none;
}
.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  padding: 5px 8px 6px;
  min-width: 0;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  position: relative;
  z-index: 2;
  font-family: inherit;
  cursor: pointer;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transform-origin: center 60%;
  box-sizing: border-box;
}
.tab-stack {
  position: relative;
  display: block;
  width: 100%;
  z-index: 3;
  /* Let touches fall through to the lens except on real tab buttons */
  pointer-events: none;
}
.tab-layer {
  display: flex;
  gap: 4px;
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
}
.tab-layer-base {
  position: static;
  z-index: 1;
}
.tab-layer-base .tab {
  pointer-events: auto;
}
/* Expand each item's tap target into gaps / pill padding */
.tab-layer-base .tab::before {
  content: '';
  position: absolute;
  top: -14px;
  bottom: -14px;
  left: -10px;
  right: -10px;
}
.tab-layer-blue {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  color: var(--accent);
  pointer-events: none;
  /* clip-path updated in JS to match bubble */
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
}
.tab-layer-blue .tab {
  color: var(--accent);
  pointer-events: none;
  cursor: default;
  z-index: 1;
}
.tab.hot { color: var(--ink); }
.tab.active {
  color: #0A84FF;
  font-weight: 700;
  background: transparent;
  box-shadow: none;
  /* press/drag goes to lens under the active tab */
  pointer-events: none;
}
.tab-layer-blue .tab.active {
  color: #0A84FF;
  font-weight: 700;
  pointer-events: none;
}
.tabbar.dragging .tab {
  pointer-events: none;
}
.tab.active::after { display: none; }
.tab i, .tab .tab-ico { font-size: 28px; line-height: 1; }
.tab svg.tab-ico {
  width: 28px;
  height: 28px;
  display: block;
  margin-bottom: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.badge {
  position: absolute;
  top: 6px;
  right: 22%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF3B30;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85);
}
@media (prefers-reduced-motion: reduce) {
  .tab-lens, .tab, .panes { transition: none !important; }
}

.backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 40; display: flex; align-items: flex-end;
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.backdrop.open { opacity: 1; }
.backdrop.closing { opacity: 0; pointer-events: none; }
.sheet {
  width: 100%; background: var(--card); border-radius: 20px 20px 0 0; padding: 10px 18px 28px;
  box-shadow: 0 -8px 24px rgba(0,0,0,.18); max-height: 85%; overflow-y: auto;
  transform: translate3d(0, 110%, 0);
  transition: transform 0.38s cubic-bezier(0.22, 0.9, 0.28, 1);
  overscroll-behavior: none;
}
.cal-sheet {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}
.backdrop.open .sheet { transform: translate3d(0, 0, 0); }
.backdrop.closing .sheet { transform: translate3d(0, 110%, 0); }
.sheet.dragging { transition: none !important; }
.handle {
  width: 36px; height: 24px; margin: 0 auto 8px; padding: 0;
  position: relative; background: transparent; cursor: grab; touch-action: none;
}
.handle::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 4px; border-radius: 2px; background: var(--line);
}
.teacher-sheet .teacher-head { touch-action: pan-y; }
.sheet-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-body {
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
.cal-nav button {
  width: 42px; height: 42px; border: none; background: var(--glass-bg); border-radius: 50%; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.cal-nav button svg {
  width: 20px; height: 20px; display: block;
  stroke: #1C1C1E; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
[data-theme="dark"] .cal-nav button svg { stroke: #F5F5F7; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays { margin-bottom: 6px; gap: 0; }
.cal-weekdays span { font-size: 11px; color: var(--ink2); text-align: center; font-weight: 600; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-size: 13px; font-weight: 500; border: none; background: transparent; cursor: pointer; font-family: inherit;
}
.cal-day.today { border: 1px solid var(--accent); color: var(--accent); }
.cal-day.selected { background: var(--accent); color: #fff; }

.group-option {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px;
  border: none; background: var(--bg); border-radius: 12px; margin-bottom: 8px; cursor: pointer;
  font-family: inherit; text-align: left;
}
.group-option.active { outline: 2px solid var(--accent); background: rgba(0,122,255,.06); }
.group-option strong { display: block; font-size: 14px; }
.group-option small { color: var(--ink2); font-size: 12px; }

.imp-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff;
  border: none; border-radius: 14px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer;
  width: 100%; font-family: inherit;
}
.imp-hint { font-size: 12px; color: var(--ink2); text-align: center; margin: 4px 0 8px; line-height: 1.4; }
.status { display: flex; gap: 8px; margin-bottom: 12px; }
.status-pill {
  flex: 1; background: var(--glass-bg); border-radius: 12px; padding: 8px 10px; text-align: center;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.status-pill b { display: block; font-size: 15px; font-weight: 700; }
.status-pill span { font-size: 10px; color: var(--ink2); font-weight: 500; text-transform: uppercase; }

.ticket {
  background: var(--glass-bg); border-radius: var(--glass-radius); padding: 12px 14px;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; }
.ticket-del {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; background: rgba(255, 59, 48, 0.1); color: #FF3B30;
  cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 6px 10px; border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.ticket-del:active { opacity: 0.7; transform: scale(0.97); }
.ticket-del-ico {
  width: 15px; height: 15px; display: block;
  stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.imp-add-ico {
  width: 18px; height: 18px; display: block;
  stroke: currentColor; fill: none; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ticket-subj { font-size: 14px; font-weight: 600; margin-top: 7px; }
.ticket-desc { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.ticket-meta { font-size: 11px; color: var(--ink2); margin-top: 6px; }

.sess-banner {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink2);
  background: var(--glass-bg);
  border-radius: var(--glass-radius);
  padding: 12px 14px;
  margin: 0 0 14px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.sess-day { margin-bottom: 16px; }
.sess-day-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 4px 8px;
  letter-spacing: -0.01em;
}
.sess-day.past { opacity: 0.55; }
.sess-card { margin-bottom: 8px; }
.sess-link {
  display: block;
  text-align: center;
  margin: 8px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.form {
  background: var(--glass-bg); border-radius: var(--glass-radius); padding: 14px; display: flex; flex-direction: column; gap: 8px;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow); margin-bottom: 4px;
}
.form select, .form input, .form textarea {
  font-family: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; background: var(--bg); color: var(--ink);
}
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
  font-size: 13px; color: var(--ink2); cursor: pointer; font-family: inherit;
}
.btn-save {
  background: var(--accent); border: none; border-radius: 10px; padding: 8px 14px; font-size: 13px;
  color: #fff; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-save:disabled {
  background: color-mix(in srgb, var(--ink2) 28%, var(--bg));
  color: color-mix(in srgb, var(--ink2) 72%, #fff);
  cursor: default;
  opacity: 1;
}
.onboard {
  background: var(--glass-bg); border-radius: var(--glass-radius); padding: 18px;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.onboard h2 { margin: 0 0 8px; font-size: 20px; }
.onboard p { margin: 0 0 14px; color: var(--ink2); font-size: 13px; line-height: 1.45; }
.error { color: #B23A2E; font-size: 13px; text-align: center; padding: 20px; }
[data-theme="dark"] .error { color: #FF6B5E; }

/* «Другое» pane */
.menu-list { display: flex; flex-direction: column; gap: 12px; padding: 2px 0 8px; }
.menu-list-sub { gap: 10px; }
.pers-block { margin-bottom: 18px; }
.pers-block:last-child { margin-bottom: 4px; }
.pers-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 4px 8px;
}
.menu-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--glass-bg); border: none; border-radius: var(--glass-radius);
  padding: 18px 18px;
  font-family: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em; line-height: 1.25;
  text-align: left; cursor: pointer;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, opacity .12s ease;
}
.menu-btn:active { opacity: 0.72; transform: scale(0.985); }
.sess-jump {
  justify-content: space-between;
  flex: 0 0 auto;
}
.sess-jump .item-chev {
  color: var(--ink2);
}
.menu-btn.on {
  outline: none;
  background: var(--tab-on-bg);
  color: #0A84FF;
  font-weight: 700;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.menu-btn.locked,
.menu-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  filter: grayscale(0.25);
}
.menu-btn.locked:active,
.menu-btn:disabled:active {
  opacity: 0.42;
  transform: none;
}
.menu-btn svg.lock {
  width: 17px; height: 17px; flex: 0 0 auto; display: block;
  stroke: var(--ink2); fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.menu-btn-sub {
  justify-content: space-between;
  padding: 16px 18px;
  font-size: 16px;
  border-radius: 16px;
}
.menu-label { flex: 1; min-width: 0; }
.menu-ico {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.menu-ico svg { width: 22px; height: 22px; display: block; }
.menu-ico[data-ico="palette"] { color: #AF52DE; background: rgba(175, 82, 222, .12); }
.menu-ico[data-ico="exam"] { color: #FF9500; background: rgba(255, 149, 0, .14); }
.menu-ico[data-ico="book"] { color: #5856D6; background: rgba(88, 86, 214, .12); }
.menu-ico[data-ico="person"] { color: #007AFF; background: rgba(0, 122, 255, .12); }
.menu-ico[data-ico="star"] { color: #FFB000; background: rgba(255, 176, 0, .16); }
.menu-ico[data-ico="map"] { color: #34C759; background: rgba(52, 199, 89, .14); }
.menu-ico[data-ico="install"] { color: #5856D6; background: rgba(88, 86, 214, .12); }
[data-theme="dark"] .menu-ico[data-ico="palette"] { background: rgba(191, 90, 242, .18); color: #BF5AF2; }
[data-theme="dark"] .menu-ico[data-ico="exam"] { background: rgba(255, 159, 10, .18); color: #FF9F0A; }
[data-theme="dark"] .menu-ico[data-ico="book"] { background: rgba(94, 92, 230, .18); color: #5E5CE6; }
[data-theme="dark"] .menu-ico[data-ico="person"] { background: rgba(10, 132, 255, .18); color: #0A84FF; }
[data-theme="dark"] .menu-ico[data-ico="star"] { background: rgba(255, 214, 10, .16); color: #FFD60A; }
[data-theme="dark"] .menu-ico[data-ico="map"] { background: rgba(48, 209, 88, .18); color: #30D158; }
[data-theme="dark"] .menu-ico[data-ico="install"] { background: rgba(94, 92, 230, .18); color: #5E5CE6; }
.menu-btn svg.check {
  width: 18px; height: 18px; flex: 0 0 auto; display: block;
  stroke: var(--accent); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.other-slide {
  min-height: 100%;
  will-change: transform, opacity;
}
.other-slide.swipe-back {
  transition: transform .18s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
}
.sub-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  position: relative;
  z-index: 8;
}
.sub-head-solo { padding: 2px 2px 4px; }
.back-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--glass-bg);
  display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0;
  cursor: pointer;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.back-btn svg {
  width: 21px; height: 21px; display: block;
  stroke: #1C1C1E; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
[data-theme="dark"] .back-btn svg { stroke: #F5F5F7; }
.sub-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

.contacts { display: flex; flex-direction: column; }
.contact-letter {
  position: sticky; top: 0; z-index: 2; background: var(--bg);
  font-size: 12px; font-weight: 700; color: var(--ink2); letter-spacing: .04em;
  padding: 8px 4px 5px;
}
.contact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: var(--glass-bg); border: none; border-radius: 12px; padding: 11px 14px; margin-bottom: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.contact-row:active { opacity: 0.6; }
.contact-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-rating {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.contact-rating.muted { color: var(--ink2); font-weight: 500; }
.contact-rating small { color: var(--ink2); font-size: 11px; font-weight: 500; }

.contacts-reviews { gap: 0; }
.contacts-reviews .contact-letter {
  font-size: 13px;
  padding: 12px 4px 8px;
}
.contacts-reviews .contact-row {
  border-radius: var(--glass-radius);
  padding: 18px 18px;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: var(--glass-shadow);
}
.contacts-reviews .contact-name {
  white-space: normal;
  line-height: 1.3;
}
.contacts-reviews .contact-rating {
  font-size: 15px;
  gap: 5px;
}
.contacts-reviews .contact-rating small { font-size: 12px; }

/* Install guide */
.install-guide { padding: 2px 2px 24px; }
.install-hero {
  font-size: 14px; font-weight: 600; color: var(--ink2); line-height: 1.35;
  margin: 0 2px 16px;
}
.install-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.install-steps li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--glass-bg); border-radius: var(--glass-radius); padding: 14px;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.install-n {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700;
}
.install-body { min-width: 0; flex: 1; }
.install-body strong {
  display: block; font-size: 14.5px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em; margin-bottom: 4px;
}
.install-body p {
  margin: 0; font-size: 13px; font-weight: 500; color: var(--ink2); line-height: 1.4;
}
.install-link {
  display: inline;
  margin-top: 8px;
  font-size: 15px; font-weight: 700; color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.install-link:active { opacity: 0.65; }

/* Teacher sheet */
.stars { letter-spacing: 1px; }
.star { color: var(--line); font-size: 13px; }
.star.on { color: #FFB000; }
.teacher-head { text-align: left; margin-bottom: 14px; }
.teacher-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.teacher-title-text { min-width: 0; flex: 1; }
.teacher-name {
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25;
}
.teacher-subj {
  margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--ink2);
}
.teacher-sched-btn {
  flex: 0 0 auto;
  border: none; border-radius: 12px;
  padding: 8px 12px;
  background: #34C759; color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(52, 199, 89, .35);
}
.teacher-sched-btn:active { opacity: 0.82; transform: scale(0.97); }
.teacher-rating {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin-top: 8px;
  font-size: 13px; color: var(--ink2);
}
.teacher-rating b { color: var(--ink); font-size: 14px; }
.teacher-sched-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.teacher-sched-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.teacher-sched-name {
  font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 14px;
}
.teacher-sched-name .teacher-subj { display: inline; margin: 0; font-weight: 500; }
.teacher-block { margin-bottom: 14px; }
.block-title {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink2); margin-bottom: 8px;
}
.teacher-note {
  background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; font-weight: 600; color: var(--ink2); text-align: center;
}
.review-form { display: flex; flex-direction: column; }
.review-form textarea {
  font-family: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; background: var(--bg); color: var(--ink); resize: vertical; margin-bottom: 8px;
}
.stars-input { display: flex; gap: 4px; margin-bottom: 8px; }
.star-btn {
  border: none; background: transparent; padding: 2px 4px; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--line); font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.star-btn.on { color: #FFB000; }
.form-err { font-size: 12px; color: #B23A2E; margin-bottom: 8px; }
.review {
  background: var(--bg); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review-when { font-size: 11px; color: var(--ink2); }
.review-text { font-size: 13px; margin-top: 5px; line-height: 1.4; }
.tsched-day { margin-bottom: 10px; }
.tsched-wd { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.tsched-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--glass-bg); border-radius: var(--glass-radius); padding: 12px 14px;
  border: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow); margin-bottom: 8px;
}
.tsched-time {
  display: flex; flex-direction: column; gap: 0;
  font-size: var(--lesson-time-size); font-weight: 600; color: var(--ink2);
  flex: 0 0 var(--lesson-time-col); width: var(--lesson-time-col); line-height: 1.25;
  white-space: nowrap;
}
.tsched-main { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.tsched-main b {
  font-size: var(--lesson-subj-size); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3;
}
.tsched-main small {
  font-size: var(--lesson-meta-size); color: var(--ink2); margin-top: 2px; line-height: 1.35;
}
