:root {
  /* Без этого нативные виджеты (значок и текст в <input type="date">)
     всегда рисуются в светлой схеме браузера и становятся невидимыми
     на тёмном фоне Telegram — переопределяется из JS под тему Telegram. */
  color-scheme: light dark;
  --bg: var(--tg-theme-bg-color, #f2f5fa);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #14171f);
  --hint: var(--tg-theme-hint-color, #7c8797);
  --link: var(--tg-theme-link-color, #2b86ff);
  --button: var(--tg-theme-button-color, #2b86ff);
  --button-text: var(--tg-theme-button-text-color, #ffffff);
  --border: rgba(0, 0, 0, 0.08);
  --danger: #e5484d;
  --success: #1aa877;
}

* { box-sizing: border-box; }

/* Некоторые наши классы (.gate-screen, .cards и т.д.) задают display
   с той же специфичностью, что и встроенное правило [hidden]{display:none} —
   без !important они могут его перебить, и "скрытый" элемент всё равно
   займёт место на экране. Эта строка гарантирует, что hidden всегда побеждает. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding-bottom: 76px;
  /* На iOS свайп вниз в самом верху страницы даёт "резиновый" отскок, а на
     Android тот же жест может понять как pull-to-refresh — внутри Mini App
     оба выглядят как баг, а не как системный жест браузера. */
  overscroll-behavior-y: contain;
}

/* Серая вспышка при тапе (стандартная для мобильных браузеров) не нужна —
   у кнопок/вкладок ниже своё нажатое состояние (:active), это выглядит
   более "нативно". Плюс touch-action убирает остаточную задержку тапа
   в некоторых встроенных WebView. */
button, .dir-btn, .tab-btn, .weekday-btn, a.btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Высота баннера считается через aspect-ratio на самом контейнере (а не
   через "width:100%; height:auto" на <img>) — некоторые версии Safari/
   WebKit на iOS не всегда корректно вычисляют внутреннее соотношение
   сторон SVG внутри <img>, из-за чего баннер мог растягиваться заметно
   выше, чем нужно. aspect-ratio + overflow:hidden гарантируют точную
   высоту чисто через CSS-арифметику, независимо от того, как конкретный
   браузер решит отрисовать сам SVG внутри. */
.banner {
  line-height: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  aspect-ratio: 800 / 260;
  overflow: hidden;
}
.banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gate-screen {
  min-height: calc(100vh - 140px);
  /* 100vh на iOS Safari считает область за адресной строкой, из-за чего
     контент обрезается/скачет при её появлении-исчезновении — dvh учитывает
     реальную видимую высоту. Строка ниже переопределяет предыдущую там, где
     dvh поддерживается, и просто игнорируется там, где нет. */
  min-height: calc(100dvh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
}
.gate-screen .gate {
  max-width: 420px;
  width: 100%;
}

.app {
  padding: 14px 14px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.tab[hidden] { display: none; }

.direction-switch {
  display: flex;
  background: var(--secondary-bg);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dir-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 10px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dir-btn.active {
  background: var(--button);
  color: var(--button-text);
}
.dir-btn:active {
  opacity: 0.75;
}

/* 4 направления (Челябинск⇄Кунашак, Челябинск⇄Аргаяш) в один ряд с flex:1
   не помещаются на узком экране — переносим на 2 колонки, 2 строки. */
#directionSwitch {
  flex-wrap: wrap;
}
#directionSwitch .dir-btn {
  flex: 1 1 calc(50% - 2px);
  min-width: 0;
}

/* В админке 5 вкладок (Пользователи/Поездки/Бронирования/Поддержка/Рассылка)
   в один ряд с flex:1 не помещаются на узком экране — последняя ("Рассылка")
   вылезала за пределы рамки .direction-switch. Переносим на 2 колонки. */
#adminSubSwitch {
  flex-wrap: wrap;
}
#adminSubSwitch .dir-btn {
  /* 3 в ряд (3+2), а не 2 в ряд (3 строки) — короче по высоте, меньше скролла. */
  flex: 1 1 calc(33.333% - 4px);
  min-width: 0;
  padding: 8px 4px;
  font-size: 12px;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--secondary-bg);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.ride-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ride-card .route {
  font-size: 16px;
  font-weight: 700;
}
.ride-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--hint);
  font-size: 13px;
}
.ride-card .driver {
  font-size: 13px;
  color: var(--hint);
}
.ride-card .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
}
.ride-card .comment {
  font-size: 13px;
  font-style: italic;
  color: var(--hint);
}
.ride-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.ok { background: rgba(26,168,119,0.15); color: var(--success); }
.badge.full { background: rgba(229,72,77,0.12); color: var(--danger); }
.badge.cancelled { background: rgba(229,72,77,0.12); color: var(--danger); }
.badge.completed { background: rgba(26,168,119,0.15); color: var(--success); }
.badge.pending { background: rgba(255,171,64,0.18); color: #b9700a; }
.badge.platform-telegram { background: rgba(43,134,255,0.15); color: #2b86ff; }
.badge.platform-max { background: rgba(139,92,246,0.15); color: #8b5cf6; }

.driver-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.driver-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.btn {
  display: block;
  background: var(--button);
  color: var(--button-text);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn:not(:disabled):active {
  opacity: 0.8;
  transform: scale(0.98);
}
.btn.secondary {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn.small {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
}

form.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
form.card h3 { margin: 0 0 4px; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--hint);
  font-weight: 600;
}
input, select, textarea {
  font-family: inherit;
  /* Было поднято до 16px против авто-зума iOS Safari при фокусе на поле —
     но у большинства пользователей Android, и там это просто увеличивало
     все поля без всякой пользы. Вернули как было; компромисс сознательный. */
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
textarea { resize: vertical; min-height: 60px; }

/* На iOS (Telegram WebView) значок/текст нативного <input type="date">
   не всегда подчиняются color-scheme и остаются чёрными — поэтому
   для этих полей всегда держим светлый фон, чтобы штатный чёрный
   текст и значок календаря были видны при любой теме приложения. */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  background: #ffffff;
  color: #14171f;
  color-scheme: light;
  /* Стандартная едва заметная рамка (8% непрозрачности) на белом фоне
     карточки/фильтра сливается в сплошное белое пятно без границ —
     здесь рамку делаем заметнее, раз фон всегда белый независимо от темы. */
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.section-title {
  margin: 18px 0 10px;
  font-size: 14px;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.section-title:first-child { margin-top: 0; }

.empty {
  color: var(--hint);
  font-size: 14px;
  text-align: center;
  padding: 24px 10px;
}
.error-state .retry-btn {
  margin: 10px auto 0;
}

/* Заглушки-скелетоны на время загрузки списков (поездки/брони) — вместо
   пустого экрана до ответа сервера. */
.skeleton-card {
  background: var(--secondary-bg);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-90 { width: 90%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-line { animation: none; }
}

.gate {
  text-align: center;
}
.gate h3 { margin-top: 0; }

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row .label { color: var(--hint); }

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--secondary-bg);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 10;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--hint);
  cursor: pointer;
  transition: color 0.15s ease;
}
.tab-icon {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.tab-btn span {
  font-size: 11px;
  font-weight: 600;
}
.tab-btn.active {
  color: var(--link);
}
.tab-btn.active .tab-icon {
  transform: scale(1.08);
}
.tab-btn:active {
  opacity: 0.7;
}

.toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2430;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.max-icon {
  border-radius: 5px;
  display: block;
  object-fit: contain;
}
.login-option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hint);
  margin: 14px 0 10px;
}
#loginCodeBox {
  margin-top: 14px;
}
#loginCodeBox p {
  margin: 0 0 8px;
  font-size: 14px;
}
#loginOpenTelegramLink,
#loginOpenMaxLink {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 8px;
}
.login-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.login-code-text {
  flex: 1;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px;
}
.login-code-row .btn {
  flex: 0 0 auto;
  width: auto;
}
.login-code-status {
  color: var(--hint);
  font-size: 13px;
  margin: 10px 0 0 !important;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.confirm-box {
  background: var(--secondary-bg);
  color: var(--text);
  border-radius: 14px;
  padding: 20px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.confirm-box p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.4;
}
.cancel-reason-input {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  margin-bottom: 14px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-actions .btn {
  width: auto;
  flex: 1;
}

/* Страницы оферты / политики конфиденциальности */
.legal-back-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
}
.legal-back-link {
  display: inline-block;
  color: var(--link);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.legal .card {
  line-height: 1.55;
  font-size: 14px;
}
.legal h1 {
  font-size: 20px;
  margin: 0 0 4px;
}
.legal .legal-meta {
  color: var(--hint);
  font-size: 13px;
  margin: 0 0 16px;
}
.legal h2 {
  font-size: 16px;
  margin: 22px 0 8px;
}
.legal p, .legal ul {
  margin: 0 0 10px;
}
.legal ul {
  padding-left: 20px;
}
.legal li {
  margin-bottom: 4px;
}
.legal a {
  color: var(--link);
}
.legal strong {
  color: var(--text);
}

/* Фильтр по дате в поиске */
.date-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.date-filter input[type="date"] {
  flex: 1;
}

.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.search-filters select {
  flex: 1;
  min-width: 120px;
  font-size: 13px;
  padding: 8px 10px;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 14px !important;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.weekday-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.weekday-btn {
  flex: 1 0 auto;
  min-width: 40px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.weekday-btn.active {
  background: var(--button);
  color: var(--button-text);
  border-color: var(--button);
}
.weekday-btn:active {
  opacity: 0.75;
}

/* Фильтр диапазона (день/неделя/месяц/дата) в "Мои поездки" */
.range-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--secondary-bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  flex-wrap: wrap;
}
.range-filter .dir-btn {
  flex: 0 0 auto;
  padding: 8px 10px;
}
.range-filter input[type="date"] {
  flex: 1;
  min-width: 120px;
  border: none;
  border-radius: 9px;
  padding: 8px;
  font-size: 13px;
  /* Фиксированный светлый цвет, а не var(--bg) — та переменная меняется
     вместе с темой оформления и в тёмной теме сама становится тёмной,
     из-за чего поле даты (текст/иконка которого всегда тёмные — см.
     глобальное правило input[type=date] выше) сливалось бы с фоном
     точно так же, как раньше сливалось белое на белом в светлой теме. */
  background: #eef1f6;
}

.range-period-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary-bg);
  border-radius: 12px;
  padding: 8px;
  margin: -6px 0 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.range-period-inputs input[type="date"] {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 9px;
  padding: 8px;
  font-size: 13px;
  /* Фиксированный светлый цвет, не var(--bg) — см. комментарий у .range-filter. */
  background: #eef1f6;
}
.range-period-inputs span {
  color: var(--hint);
  flex: 0 0 auto;
}

/* Раскрывающийся список пассажиров у поездки водителя */
.passenger-toggle-btn {
  margin-top: 4px;
}
.passengers-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.passengers-panel .passenger-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  padding: 6px 0;
}
.phone-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--link);
  font-weight: 600;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
}
.passengers-panel h4 {
  margin: 6px 0 2px;
  font-size: 14px;
}
.passengers-panel .stats-row {
  margin: 4px 0;
}
.passengers-panel .earnings-total {
  font-weight: 700;
  color: var(--success);
  margin-top: 4px;
}

/* Выбор количества мест при бронировании */
.seat-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.seat-picker label {
  font-size: 13px;
  color: var(--hint);
  font-weight: 600;
  white-space: nowrap;
}
.seat-picker select {
  flex: 0 0 auto;
  width: 64px;
}
.seat-picker .book-btn {
  flex: 1;
}

/* Рейтинг звёздами */
.stars {
  color: var(--hint);
  font-size: 14px;
  letter-spacing: 1px;
}
.stars .filled {
  color: #f5a623;
}
.rating-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--hint);
}

.rate-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.rate-widget button {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  color: var(--hint);
}
.rate-widget button.filled {
  color: #f5a623;
}

/* Статистика в админке */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-tile {
  background: var(--secondary-bg);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-tile .value {
  font-size: 20px;
  font-weight: 700;
}
.stat-tile .label {
  font-size: 12px;
  color: var(--hint);
}

/* Ответ администратора в поддержке */
.support-reply {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.support-reply input {
  flex: 1;
}
.support-reply button {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 14px;
}
.support-from-admin {
  border-left: 3px solid var(--link);
}

/* ==========================================================================
   Платформенные оптимизации: iOS, Android, ПК
   ========================================================================== */

/* Авто-увеличение текста при повороте в альбомную ориентацию — поведение
   и iOS Safari, и Chrome на Android: они сами наращивают кегль в широких
   блоках, из-за чего вёрстка внутри Mini App внезапно «разъезжается».
   Ширина у нас фиксированная колонкой, подстраивать ничего не нужно. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* iOS: поле с кеглем меньше 16px заставляет Safari/WebKit зумить всю
   страницу при фокусе, и обратно она сама не возвращается — экран
   остаётся «уехавшим». user-scalable=no в <meta viewport> это не лечит:
   iOS намеренно игнорирует его начиная с 10-й версии.
   Глобально поднимать кегль до 16px мы уже пробовали и откатили — на
   Android это просто раздувало все поля без пользы (см. комментарий у
   правила input выше). Поэтому поднимаем только там, где проблема
   реально есть: @supports (-webkit-touch-callout: none) срабатывает на
   движке WebKit под iOS/iPadOS и не трогает ни Android, ни ПК. */
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px;
  }
}

/* Пальцевые цели. Apple HIG требует минимум 44x44pt, Material — 48dp;
   .btn сейчас около 43px, а .btn.small — около 33px, то есть в них
   стабильно промахиваются. Поднимаем только на устройствах с «грубым»
   указателем (палец), чтобы на ПК кнопки не раздувались под мышь. */
@media (pointer: coarse) {
  /* Перечисляем классы поимённо, а не просто button: часть кнопок у нас
     живёт прямо внутри строки текста (.phone-link), и min-height им
     раздул бы саму строку. Для таких — отдельное правило ниже. */
  .btn, .dir-btn, .tab-btn, .weekday-btn {
    min-height: 44px;
  }
  .btn.small, .support-reply button {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  /* Телефон в карточке пассажира — кнопка без отступов посреди текста.
     Растягивать её по высоте нельзя, поэтому просто расширяем область
     нажатия по вертикали, не меняя высоту самой строки. */
  .phone-link {
    padding: 6px 0;
  }
  /* Звёзды оценки — самые мелкие цели интерфейса (сейчас ~26px). Ставим
     40, а не 44: пять звёзд по 44 плюс кнопка «Оценить» не помещаются в
     ширину карточки на узком экране. Высота при этом полные 44, а
     flex-wrap страхует от переполнения на совсем узких телефонах. */
  .rate-widget {
    flex-wrap: wrap;
  }
  .star-btn {
    min-width: 40px;
    min-height: 44px;
  }
}

/* ПК: указатель мыши без состояния наведения делает интерфейс «мёртвым» —
   непонятно, что кликабельно. Только для устройств, которые реально умеют
   hover: на тач-экранах то же правило залипало бы после тапа. */
@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .dir-btn:hover,
  .weekday-btn:hover,
  .phone-link:hover {
    filter: brightness(0.94);
    cursor: pointer;
  }
  .card:hover {
    border-color: rgba(0, 0, 0, 0.14);
  }
  .tab-btn:hover {
    color: var(--link);
  }
}

/* Клавиатурная навигация на ПК: сейчас видимого фокуса нет вовсе — при
   ходьбе по Tab непонятно, где находишься. :focus-visible показывает
   рамку только при навигации с клавиатуры и не рисует её при обычном
   тапе или клике мышью. */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Длинные списки поездок/пользователей: браузер пропускает вёрстку и
   отрисовку карточек за пределами экрана. contain-intrinsic-size задаёт
   их примерную высоту заранее, чтобы полоса прокрутки не прыгала.
   Заметнее всего на слабых Android-телефонах и в админке, где список
   пользователей не ограничен постранично. */
@supports (content-visibility: auto) {
  .ride-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 180px;
  }
}
