/* Расписание СПбГИПСР — мини-приложение Telegram.
   Оформление в духе Flo: белые карточки на светло-розовом фоне,
   мягкие тени вместо рамок, скруглённые пилюли и розовый акцент. */

:root {
  --bg: #fff7f9;
  --card: #ffffff;
  --card-2: #fff0f4;
  --text: #1f1b2d;
  /* Было #948fa3 — контраст ≈3.1:1 на белой карточке при кегле 10–12 px, ниже
     нормы AA (4.5:1). Этим цветом набраны все пояснения: подписи в списке
     студентов, объяснение админских тумблеров, время синхронизации. На солнце
     они были попросту нечитаемы. В тёмной теме контраст и так ≈6.5:1. */
  --muted: #6b6478;
  --line: rgba(31, 27, 45, .07);

  --accent: #ff4e77;
  --accent-2: #ff85a8;
  --accent-soft: #ffe6ed;
  --accent-text: #ffffff;

  --lecture: #ff4e77;
  --seminar: #9b5cff;
  --lab: #6c6ff5;
  --exam: #ff8a3d;
  --deadline: #ff3355;
  --event: #ff85b3;
  --task: #ffa8c6;
  --other: #b9b3c4;

  --shadow-card: 0 2px 10px rgba(31, 27, 45, .05), 0 10px 24px -18px rgba(255, 78, 119, .5);
  --shadow-pop: 0 8px 26px -10px rgba(255, 78, 119, .55);

  --radius: 22px;
  --radius-sm: 14px;
  --pad: 16px;
  --header-h: 56px;
  --groupbar-h: 50px;
  --weekbar-h: 68px;
  --tabbar-h: 60px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme='dark'] {
  --bg: #16121a;
  --card: #211a26;
  --card-2: #2a2130;
  --text: #f8eef3;
  --muted: #a89bb0;
  --line: rgba(255, 255, 255, .08);

  --accent: #ff5f8d;
  --accent-2: #ff9ab8;
  --accent-soft: rgba(255, 95, 141, .16);

  --lecture: #ff6f96;
  --seminar: #b585ff;
  --lab: #8f92ff;
  --exam: #ffa863;
  --deadline: #ff6076;
  --event: #ff9dc4;
  --task: #ffb9d3;
  --other: #b2a6bd;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, .35);
  --shadow-pop: 0 10px 26px -12px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  overscroll-behavior-y: none;
}

svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.hidden { display: none !important; }
.screen { min-height: 100%; }

/* ── Шапка ─────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 10px 0;
  background: var(--bg);
}

.header-center { flex: 1; min-width: 0; text-align: center; }
.header-title {
  /* Это h1 — сбрасываем браузерные отступы и кегль. */
  margin: 0;
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-top: 3px;
  font-weight: 600;
}
.week-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.week-dot.odd { background: var(--seminar); }

.icon-btn {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .12s ease;
}
.icon-btn:active { transform: scale(.93); }

/* ── Выбор подгруппы ───────────────────────────────────────────────────── */
.groupbar {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top));
  z-index: 29;
  display: flex;
  align-items: center;
  height: var(--groupbar-h);
  padding: 0 var(--pad);
  background: var(--bg);
}
.group-switch {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.group-switch button {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .12s ease;
  white-space: nowrap;
}
.group-switch button:active { transform: scale(.96); }
.group-switch button.on {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  box-shadow: var(--shadow-pop);
}

/* ── Полоса дней ───────────────────────────────────────────────────────── */
.weekbar {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top) + var(--groupbar-h));
  z-index: 29;
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--weekbar-h);
  padding: 0 6px;
  background: var(--bg);
}
.week-nav {
  flex: none;
  /* 24 px по ширине — вдвое меньше рекомендуемого минимума для касания. */
  width: 44px; height: 44px;
  border: none; background: transparent;
  color: var(--accent);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.daystrip { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.day-pill {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 0 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  /* На экране 320 px семь пилюль давали по ~35 px — ниже минимума. */
  min-height: 44px;
}
.day-pill .dow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.day-pill .dnum {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.day-pill .dots { display: flex; gap: 3px; height: 4px; align-items: center; }
.day-pill .dots i { width: 4px; height: 4px; border-radius: 50%; }
.day-pill.weekend .dow { color: var(--accent-2); }
.day-pill.empty .dnum { color: var(--muted); font-weight: 500; }
.day-pill.today .dnum { box-shadow: inset 0 0 0 1.8px var(--accent); color: var(--accent); }
.day-pill.selected .dnum {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  box-shadow: var(--shadow-pop);
}

/* ── Баннер «сейчас/дальше» ────────────────────────────────────────────── */
.now-banner {
  margin: 4px var(--pad) 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  box-shadow: var(--shadow-pop);
}
.now-banner .nb-icon { font-size: 20px; }
.now-banner b { font-weight: 700; }
.now-banner .nb-sub { color: rgba(255, 255, 255, .85); font-size: 12px; margin-top: 2px; }
.now-progress { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; margin-top: 8px; }
.now-progress > i { display: block; height: 100%; background: #fff; border-radius: 3px; }

/* ── Лента ─────────────────────────────────────────────────────────────── */
.content {
  padding: 6px var(--pad) calc(var(--tabbar-h) + var(--safe-bottom) + 80px);
}

.day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 4px 10px;
}
.day-head .dh-title { font-size: 15.5px; font-weight: 750; letter-spacing: -.015em; }
.day-head .dh-rel {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 650;
}
.day-head .dh-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.day-head.is-today .dh-title { color: var(--accent); }

.card {
  position: relative;
  display: flex;
  gap: 14px;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 15px 16px;
  margin-bottom: 11px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:active { transform: scale(.985); }
.card.past { opacity: .48; }
.card.now {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-pop);
}

.rail {
  flex: none;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 1px;
}
.rail .t-start { font-size: 16px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rail .t-pair {
  font-size: 10px; font-weight: 700;
  color: var(--accent-text);
  background: var(--kind, var(--accent));
  border-radius: 999px;
  padding: 2px 8px;
  margin: 4px 0 3px;
}
.rail .t-end { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail .t-allday { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; }

.body { flex: 1; min-width: 0; }

/* Несколько занятий в одном временном слоте */
.card-group { align-items: flex-start; }
.stack { flex: 1; min-width: 0; }
.stack-note {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 9px;
  font-weight: 600;
}
.stack-item {
  padding: 12px 0 13px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.stack-item:first-of-type { border-top: none; padding-top: 0; }
.stack-item:last-child { padding-bottom: 0; }

.kind-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.kind-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--kind, var(--other));
}
.sub-badge {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  background: var(--card-2);
  border-radius: 999px;
  padding: 3px 9px;
}
.sub-badge.mine { color: var(--accent); background: var(--accent-soft); }
.sub-badge.common { color: var(--muted); }

.title {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -.012em;
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text);
  background: var(--card-2);
  border-radius: 999px;
  padding: 4px 10px;
  max-width: 100%;
}
.chip b { font-weight: 700; }
.chip .ch-ico { font-size: 11px; opacity: .9; }
.chip.build { color: var(--muted); }

.teacher {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
  min-width: 0;
}
.avatar {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700;
  color: #fff;
  background: var(--kind, var(--accent));
}
.teacher span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 0 34px;
  color: var(--muted);
  font-size: 13.5px;
}
.empty-day .ed-emoji { font-size: 34px; }

.section-note {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 4px 4px;
  line-height: 1.45;
}

.stale-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: var(--shadow-card);
}

/* ── Нижние вкладки ────────────────────────────────────────────────────── */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 24px -12px rgba(31, 27, 45, .25);
}
.tab {
  border: none; background: transparent;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { color: var(--accent); }


/* ── Шторки ────────────────────────────────────────────────────────────── */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: sheet-in .2s ease;
}
@keyframes sheet-in { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 12px) var(--pad) 12px;
}
.sheet-title { flex: 1; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.sheet-close {
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px var(--pad) calc(var(--safe-bottom) + 28px);
  -webkit-overflow-scrolling: touch;
}

.search-input {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: var(--card);
  color: var(--text);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  box-shadow: var(--shadow-card);
}

.setting-group { margin-bottom: 24px; }
.setting-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 6px 10px;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.setting-row .sr-main { flex: 1; min-width: 0; }
.setting-row .sr-title { font-size: 14.5px; font-weight: 600; }
.setting-row .sr-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.setting-row .sr-mark { font-size: 17px; color: var(--accent); }

/* Строка админской панели: кто и какие права */
.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
}
.admin-row .sr-main { flex: 1; min-width: 0; }
.admin-row .sr-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .sr-title { font-size: 14px; font-weight: 650; }
.admin-row .sr-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-badge {
  margin-left: 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 7px;
  vertical-align: middle;
}
.admin-toggles { display: flex; flex-direction: column; gap: 10px; flex: none; }
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  /* Было 22 px высоты при шаге 7 px между двумя РАЗНЫМИ правами: два тумблера
     умещались в 29 px, и палец на скролле легко задевал соседний. Отзыв
     доступа при этом не отыгрывается назад тем же тумблером. */
  min-height: 44px;
}
.admin-toggle.locked { opacity: .45; cursor: default; }
.admin-toggle .at-label {
  font-size: 10.5px;
  color: var(--muted);
  width: 66px;
  text-align: right;
  white-space: nowrap;
}
.admin-toggle .switch { width: 38px; height: 22px; }
.admin-toggle .switch::after { width: 16px; height: 16px; }
.admin-toggle .switch.on::after { transform: translateX(16px); }

/* Розовый переключатель вместо галочек-эмодзи */
.switch {
  flex: none;
  width: 46px; height: 27px;
  border-radius: 999px;
  background: var(--card-2);
  position: relative;
  transition: background .2s ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 27, 45, .25);
  transition: transform .2s ease;
}
.switch.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch.on::after { transform: translateX(19px); }

.segmented {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
  background: var(--card);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-card);
}
.segmented button {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 9px 6px;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
}
.segmented button.on {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
}

.btn-danger {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--deadline);
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
}

/* ── Детали занятия ────────────────────────────────────────────────────── */
.detail-hero {
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.detail-kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--kind, var(--accent));
  margin-bottom: 7px;
}
.detail-title { font-size: 20px; font-weight: 750; letter-spacing: -.025em; margin: 0 0 12px; }
.detail-when { font-size: 14px; color: var(--text); }
.detail-when .dw-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.kv { display: flex; gap: 12px; padding: 13px 6px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: none; }
.kv .k { flex: none; width: 116px; color: var(--muted); font-size: 13px; }
.kv .v { flex: 1; font-size: 14px; overflow-wrap: anywhere; }

/* ── Экран входа ───────────────────────────────────────────────────────── */
.login-wrap {
  /* 100vh в Telegram больше фактического вьюпорта — экран входа получал
     лишнюю прокрутку. dvh считает по видимой области. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--safe-top) + 32px) 24px calc(var(--safe-bottom) + 32px);
  max-width: 460px;
  margin: 0 auto;
}
.login-logo {
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  font-size: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-pop);
}
.login-title { font-size: 24px; font-weight: 780; letter-spacing: -.03em; text-align: center; margin: 0 0 10px; }
.login-sub { font-size: 14px; color: var(--muted); text-align: center; margin: 0 0 28px; line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 11.5px; color: var(--muted); margin-left: 16px; font-weight: 600; }
.field input {
  height: 52px;
  border-radius: 999px;
  border: none;
  background: var(--card);
  color: var(--text);
  padding: 0 20px;
  font-size: 16px;
  outline: none;
  box-shadow: var(--shadow-card);
}
.field input:focus { box-shadow: 0 0 0 2px var(--accent), var(--shadow-card); }
.btn-primary {
  height: 52px;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-pop);
}
.btn-primary:disabled { opacity: .6; box-shadow: none; }
.login-error {
  font-size: 13px;
  color: var(--deadline);
  background: var(--card-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.login-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 22px; line-height: 1.55; }

/* ── Мелочи ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 78px);
  transform: translateX(-50%);
  z-index: 90;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  max-width: 88vw;
  text-align: center;
  box-shadow: var(--shadow-pop);
}

.skeleton {
  height: 88px;
  border-radius: var(--radius);
  margin-bottom: 11px;
  background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 180% 0 } to { background-position: -40% 0 } }

.subject-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
  box-shadow: var(--shadow-card);
}
.subject-row .sr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kind, var(--accent)); flex: none; }
.subject-row .sr-body { flex: 1; min-width: 0; }
.subject-row .sr-name { font-size: 14.5px; font-weight: 650; }
.subject-row .sr-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.subject-row .sr-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}

/* ── Видимый фокус ───────────────────────────────────────────────────────────
   Строки настроек, админские переключатели и вкладки теперь доступны с
   клавиатуры, а значит фокус на них обязан быть виден. Полагаемся на
   :focus-visible: у тех, кто нажимает пальцем или мышью, ничего не изменится. */
.setting-row:focus-visible,
.admin-toggle:focus-visible,
.card:focus-visible,
.stack-item:focus-visible,
.tab:focus-visible,
.sheet-close:focus-visible,
/* Было «.seg» — такого класса в разметке нет вовсе: сегментированный
   переключатель это «.segmented button». Правило не влияло ни на что. */
.segmented button:focus-visible,
.group-switch button:focus-visible,
.day-pill:focus-visible,
.icon-btn:focus-visible,
.week-nav:focus-visible,
.btn-primary:focus-visible,
.btn-danger:focus-visible,
.search-input:focus-visible {
  outline: 2px solid var(--accent, #c2185b);
  outline-offset: 2px;
  border-radius: 10px;
}

/* У поля поиска outline снят намеренно ради вида — возвращаем состояние
   фокуса рамкой, иначе с клавиатуры непонятно, где ты находишься. */
.search-input:focus {
  box-shadow: var(--shadow-card), 0 0 0 2px var(--accent, #c2185b);
}
