@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/archivo-black-latin-9be230eb35eae59d87bf77dab22906d0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/manrope-800-cyrillic-f7b742d8799b6f6ebb795151cd36e0f2.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/manrope-800-latin-4ec84e15b09e57d79f86bb231a92ec8f.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-ink: #171717;
  --color-paper: #fffdf4;
  --color-paper-ambassador: #fffef9;
  --color-sun: #ffde59;
  --color-pink: #fe6caa;
  --color-blue: #62b6ff;
  --color-muted: #5f5d56;
  --color-error: #b71939;
  --color-success: #087443;
  --border-width: 3px;
  --shadow: 6px 6px 0 var(--color-ink);
  --shadow-small: 3px 3px 0 var(--color-ink);
  --radius: 0;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 5rem;
  --font-display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-time: "Archivo Black", var(--font-display);
  --font-date-accent: "Manrope", var(--font-body);
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

/* Author display rules (e.g. .button { display: inline-flex }) otherwise override [hidden]. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid var(--color-blue);
  outline-offset: 3px;
}

/* Native <dialog> is a container; initial focus (autofocus on the dialog) must not draw a ring. */
dialog:focus,
dialog:focus-visible {
  outline: none;
}

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 1.5rem, 96rem);
}

.error-page {
  display: grid;
  min-height: 100svh;
  align-content: center;
  gap: var(--space-5);
  padding-block: var(--space-5);
}

.error-page__brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.error-page__brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: var(--shadow-small);
}

.error-page__card {
  position: relative;
  max-width: 48rem;
  padding: clamp(var(--space-4), 7vw, var(--space-6));
  background: var(--color-pink);
}

.error-page__code {
  position: absolute;
  top: 0.35rem;
  right: 0.75rem;
  color: rgba(23, 23, 23, 0.18);
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 9rem);
  line-height: 0.9;
}

.error-page__card h1 {
  max-width: 10ch;
  margin-bottom: var(--space-3);
  font-size: clamp(3.25rem, 11vw, 7rem);
}

.error-page__card p:not(.eyebrow) {
  max-width: 34rem;
  margin-bottom: var(--space-4);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.error-page__actions {
  position: relative;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: var(--space-2) var(--space-3);
  background: var(--color-sun);
  border: var(--border-width) solid var(--color-ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-3);
  row-gap: var(--space-2);
  align-items: start;
  padding-block: var(--space-4);
}

/*
 * iOS Home Screen PWA + black-translucent: layout extends under the status bar /
 * Dynamic Island. Safari (browser chrome) already insets the page — only pad in
 * standalone (html.app-standalone from fragments/pwa.html).
 */
html.app-standalone .site-header {
  padding-top: calc(var(--space-4) + env(safe-area-inset-top, 0px));
}

.site-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  flex-shrink: 0;
  overflow: hidden;
  border: var(--border-width) solid var(--color-ink);
  border-radius: 0.35rem;
  box-shadow: 4px 4px 0 var(--color-ink), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background: var(--color-pink);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 80ms ease, background-color 80ms ease;
}

.site-brand:hover {
  box-shadow: 2px 2px 0 var(--color-ink);
}

.site-brand:active {
  box-shadow: 1px 1px 0 var(--color-ink);
}

.site-brand.is-pressed {
  box-shadow: 1px 1px 0 var(--color-ink);
}

/* Keep the control in place; only its edge changes during a short press. */
.site-header .button {
  border-radius: 0.35rem;
  box-shadow: 4px 4px 0 var(--color-ink), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.site-header .button:hover {
  box-shadow: 2px 2px 0 var(--color-ink), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.site-header .button:active {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
}

.site-header .button.is-pressed {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
}

.site-brand:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 3px;
}

.site-brand__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-nav {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.nav-bell {
  position: relative;
  display: inline-flex;
}

.bell-hint {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.55rem);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: min(11.5rem, calc(100vw - 1rem));
  padding: var(--space-1) var(--space-2);
  color: var(--color-ink);
  background: var(--color-sun);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--tip-shift, 0px)));
  animation: bell-hint-bounce 1.4s ease-in-out infinite;
}

.bell-hint--wide {
  max-width: min(16.5rem, calc(100vw - 1rem));
}

.bell-hint--photo {
  max-width: min(22rem, calc(100vw - 1rem));
}

.bell-hint__arrow {
  position: absolute;
  top: -0.55rem;
  left: calc(50% - var(--tip-shift, 0px));
  width: 0.7rem;
  height: 0.7rem;
  background: var(--color-sun);
  border-top: var(--border-width) solid var(--color-ink);
  border-left: var(--border-width) solid var(--color-ink);
  transform: translateX(-50%) rotate(45deg);
}

.bell-hint__text {
  position: relative;
}

@keyframes bell-hint-bounce {
  0%,
  100% {
    transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(0);
  }

  50% {
    transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(0.28rem);
  }
}

.header-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.header-actions form {
  margin: 0;
}

/* Title page: guest CTA beside Yandex ID; align to the button row, not the legal notice. */
.header-guest-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: var(--space-2);
}

.header-guest-entry .oauth-login-gate {
  margin-inline-start: 0;
}

/*
 * Mobile dock (bottom navigation).
 * Stable app chrome above content / sheet / swipe:
 * - floating translucent plate above the full-viewport page stack
 * - equal flex slots; full-height hit targets
 * - --app-tabbar-offset keeps the end of scrollable content reachable
 * Requires viewport-fit=cover for non-zero safe-area insets (WebKit).
 */
.app-tabbar {
  --app-tabbar-glyph-lg: 2.55rem;
  --app-tabbar-glyph-sm: 2.25rem;
  --app-tabbar-glyph-cta: 2.75rem;
  --app-tabbar-inset: var(--space-2);
  --app-tabbar-radius: 0.9rem;
  /* Warm translucent stone: content remains visible while moving below the dock. */
  --app-tabbar-surface: rgba(228, 226, 218, 0.78);
  display: none;
}

.app-tabbar__rail {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
  width: 100%;
  max-width: 36rem;
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--space-1);
  /* Glyph + label stay inside the rail; safe-area padding is on .app-tabbar. */
  padding-block: 0.3rem 0.2rem;
  box-sizing: border-box;
}

.app-tabbar__tab {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  max-width: 5.5rem;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.app-tabbar__tab:disabled,
.app-tabbar__tab[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.app-tabbar__hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.app-tabbar__label {
  display: block;
  max-width: 100%;
  padding-inline: 0.1rem;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--color-ink);
  /* Two lines fit «Мои поездки» in a narrow slot without ellipsis. */
  white-space: normal;
}

.app-tabbar__glyph {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--app-tabbar-glyph-sm);
  height: var(--app-tabbar-glyph-sm);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  border-radius: 0.35rem;
  box-shadow: 4px 4px 0 var(--color-ink), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  /* Short press feedback changes the edge without moving the control. */
  transition: box-shadow 80ms ease, background-color 80ms ease;
}

.app-tabbar__glyph--avatar {
  overflow: hidden;
  padding: 0;
}

.app-tabbar__tab--lg .app-tabbar__glyph {
  width: var(--app-tabbar-glyph-lg);
  height: var(--app-tabbar-glyph-lg);
}

.app-tabbar__tab--cta .app-tabbar__glyph,
.app-tabbar__glyph--cta {
  width: var(--app-tabbar-glyph-cta);
  height: var(--app-tabbar-glyph-cta);
  border-radius: 50%;
  /* Accent is the yellow add-round icon, not the glyph plate. */
  background: var(--color-paper);
  box-shadow: var(--shadow);
}

.app-tabbar__glyph--brand {
  background: var(--color-pink);
}

@media (hover: hover) and (pointer: fine) {
  .app-tabbar__tab:hover .app-tabbar__glyph,
  .app-tabbar__hit:hover .app-tabbar__glyph {
    box-shadow: 2px 2px 0 var(--color-ink), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

.app-tabbar__tab:active .app-tabbar__glyph,
.app-tabbar__hit:active .app-tabbar__glyph {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
}

.app-tabbar__tab.is-pressed .app-tabbar__glyph,
.app-tabbar__hit.is-pressed .app-tabbar__glyph {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
}

.app-tabbar__tab:focus-visible {
  outline: none;
}

.app-tabbar__tab:focus-visible .app-tabbar__glyph,
.app-tabbar__hit:focus-visible .app-tabbar__glyph {
  outline: 3px solid var(--color-ink);
  outline-offset: 3px;
}

.app-tabbar__icon {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  object-fit: contain;
}

.app-tabbar__tab--lg .app-tabbar__icon:not(.app-tabbar__icon--brand):not(.app-tabbar__icon--avatar) {
  width: 1.65rem;
  height: 1.65rem;
}

.app-tabbar__icon--brand {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Clip logo to glyph; shadow stays on .app-tabbar__glyph (visible when pressed). */
  border-radius: 0;
}

.app-tabbar__icon--avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-paper);
}

.app-tabbar__icon--add-trip {
  width: 2.05rem;
  height: 2.05rem;
}

.app-tabbar__tab--cta .app-tabbar__icon:not(.app-tabbar__icon--add-trip) {
  width: 1.55rem;
  height: 1.55rem;
}

.app-tabbar__icon--route {
  width: 1.2rem;
  height: 1.35rem;
}

.app-tabbar .nav-bell {
  /* nav-bell is the tab slot itself; hit carries glyph + label. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-tabbar__glyph .button-badge {
  top: -0.4rem;
  right: -0.4rem;
}

.app-tabbar .bell-hint {
  top: auto;
  bottom: calc(100% + 0.55rem);
  animation: tabbar-bell-hint-bounce 1.4s ease-in-out infinite;
}

.app-tabbar .bell-hint__arrow {
  top: auto;
  bottom: -0.55rem;
  border-top: 0;
  border-left: 0;
  border-right: var(--border-width) solid var(--color-ink);
  border-bottom: var(--border-width) solid var(--color-ink);
}

@keyframes tabbar-bell-hint-bounce {
  0%,
  100% {
    transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(0);
  }

  50% {
    transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(-0.28rem);
  }
}

@media (max-width: 47.99rem) {
  :root {
    /* Glyph + caption under icons (UI-178); larger hit targets (UI-202). */
    --app-tabbar-rail: 5.25rem;
    --app-tabbar-float: 0.25rem;
  }

  /*
   * Dock markup for guests and authenticated (ADR-0483).
   * Offset matches fixed geometry (rail + home-indicator) — no JS write.
   */
  html:has([data-app-tabbar]) {
    --app-tabbar-offset: calc(
      var(--app-tabbar-rail) + 2px + var(--app-tabbar-float) +
        env(safe-area-inset-bottom, 0px)
    );
  }

  html:has([data-app-tabbar]) body {
    padding-bottom: var(--app-tabbar-offset);
  }

  html:has([data-app-tabbar]) .nav-item--tabbar {
    display: none !important;
  }

  .app-tabbar {
    display: block;
    position: fixed;
    /* Host chrome stays above the full-viewport managed page stack. */
    z-index: 50;
    right: var(--app-tabbar-inset);
    bottom: calc(var(--app-tabbar-float) + env(safe-area-inset-bottom, 0px));
    left: var(--app-tabbar-inset);
    /* Own compositor layer — reduces iOS scroll/toolbar jitter with fixed chrome. */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-sizing: border-box;
    height: auto;
    background: var(--app-tabbar-surface);
    border: 1px solid rgba(23, 23, 23, 0.14);
    border-radius: var(--app-tabbar-radius);
    box-shadow: 0 6px 24px rgba(23, 23, 23, 0.18);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
    overflow: visible;
    /* Only controls are interactive; the plate itself is visual chrome. */
    pointer-events: none;
  }

  .app-tabbar__rail {
    height: var(--app-tabbar-rail);
  }

  .app-tabbar__tab,
  .app-tabbar__hit {
    pointer-events: auto;
  }

}

.button--icon.button--compact {
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.45rem;
}

.personal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: var(--space-6);
  align-items: center;
  padding-block: var(--space-7);
}

.hero__content {
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
}

h1 {
  max-width: 7ch;
  margin-bottom: var(--space-4);
  font-size: clamp(4rem, 11vw, 8rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h3 {
  margin-bottom: var(--space-2);
  font-size: 1.75rem;
}

.hero__lead {
  max-width: 34rem;
  margin-bottom: var(--space-4);
  color: var(--color-muted);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  border: var(--border-width) solid var(--color-ink);
  /* iOS Safari: submit/secondary buttons otherwise keep system light text on paper bg. */
  -webkit-appearance: none;
  appearance: none;
  color: var(--color-ink);
  -webkit-text-fill-color: currentColor;
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 80ms ease, background-color 80ms ease;
}

.button:hover {
  box-shadow: 1px 1px 0 var(--color-ink);
}

.button:active {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

/* Validation gate: keep pointer events so hover/click can show unmet requirements. */
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.button[aria-disabled="true"]:hover,
.button[aria-disabled="true"]:active {
  transform: none;
  box-shadow: var(--shadow-small);
}

.form-action {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: top;
}

.form-action .button {
  width: 100%;
}

.form-action__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 30;
  width: max-content;
  max-width: min(18rem, calc(100vw - 1rem));
  transform: translateX(calc(-50% + var(--tip-shift, 0px)));
  padding: 0.45rem 0.6rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper, #fff);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 3px 3px 0 var(--color-ink);
  white-space: normal;
  text-align: left;
}

.form-action__tip-list {
  margin: 0;
  padding-left: 1.1rem;
}

.form-action__tip-list li + li {
  margin-top: 0.2rem;
}

.button[aria-busy="true"] {
  position: relative;
  cursor: wait;
  color: transparent;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
}

.button[aria-busy="true"]::after {
  position: absolute;
  color: var(--button-loading-color, var(--color-ink));
  -webkit-text-fill-color: currentColor;
  content: "Загрузка…";
  animation: button-busy-pulse 0.9s ease-in-out infinite;
}

@keyframes button-busy-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

@keyframes button-action-enter {
  from {
    opacity: 0;
    transform: translateY(0.35rem) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.button--action-enter {
  animation: button-action-enter 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.button--accent {
  background: var(--color-sun);
}

.button--accent.is-pressed {
  background: var(--color-ink);
  color: var(--color-paper);
  -webkit-text-fill-color: currentColor;
}

.button--secondary {
  background: var(--color-paper);
}

.button--dark {
  --button-loading-color: var(--color-paper);
  color: var(--color-paper);
  -webkit-text-fill-color: currentColor;
  background: var(--color-ink);
}

.button--danger {
  --button-loading-color: var(--color-paper);
  color: var(--color-paper);
  -webkit-text-fill-color: currentColor;
  background: var(--color-error);
}

.button--danger.is-pressed {
  background: var(--color-ink);
}

.button--success {
  --button-loading-color: var(--color-paper);
  color: var(--color-paper);
  -webkit-text-fill-color: currentColor;
  background: var(--color-success);
}

.button--success.is-pressed {
  background: var(--color-ink);
}

.button--compact {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
}

.button--icon {
  position: relative;
  width: 3.25rem;
  min-width: 3.25rem;
  padding: 0.5rem;
}

.button__icon {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
}

.button--round {
  border-radius: 50%;
}

.button__icon--add-trip {
  width: 2.05rem;
  height: 2.05rem;
  object-fit: contain;
}

.button--icon:has(.button__icon--avatar) {
  padding: 0;
  overflow: hidden;
}

.button__icon--avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-paper);
}

.button-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  border: 2px solid var(--color-ink);
  border-radius: 999px;
  background: #e10600;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

/*
 * OAuth login gate — Yandex ID + VK ID stacked, shared legal notice below
 * (COMPLIANCE-003/004). Yandex colors/border follow
 * https://yandex.ru/dev/id/doc/ru/codes/buttons-design (main / light / radius 0).
 */
.oauth-login-gate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  max-width: 13.5rem;
  /* Mirror header: buttons + notice sit on the right of the host block. */
  margin-inline-start: auto;
}

.oauth-login-gate__buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.oauth-login-gate__buttons .yandex-login,
.oauth-login-gate__buttons .vk-login {
  width: 100%;
}

.oauth-login-gate__notice {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
}

.oauth-login-gate__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.oauth-login-gate__link:hover {
  color: var(--color-blue);
}

.yandex-login {
  --yandex-login-height: 2.75rem;
  --yandex-login-pad-x: 0.8rem;
  --yandex-login-gap: 0.6rem;
  --yandex-login-icon: 1.2rem;
  --yandex-login-font: 0.875rem;
  display: flex;
  height: var(--yandex-login-height);
  min-height: var(--yandex-login-height);
  min-width: calc(var(--yandex-login-icon) * 2 + var(--yandex-login-pad-x) * 2 + 3rem);
  align-items: center;
  justify-content: center;
  gap: var(--yandex-login-gap);
  padding: 0 var(--yandex-login-pad-x);
  color: #fff;
  background: #000;
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-small);
  font-family: var(--font-body);
  font-size: var(--yandex-login-font);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow 80ms ease;
}

.yandex-login:hover {
  box-shadow: 1px 1px 0 var(--color-ink);
}

.yandex-login:active {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgb(23 23 23 / 14%);
}

.yandex-login__icon {
  display: block;
  flex: 0 0 auto;
  width: var(--yandex-login-icon);
  height: var(--yandex-login-icon);
}

.yandex-login__text {
  display: inline-block;
  pointer-events: none;
}

.vk-login {
  display: flex;
  min-height: 2.75rem;
  min-width: 7rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0 0.8rem;
  color: #fff;
  background: #0077ff;
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-small);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 80ms ease;
}

.vk-login:hover {
  box-shadow: 1px 1px 0 var(--color-ink);
}

.vk-login:active {
  box-shadow: 1px 1px 0 var(--color-ink), inset 0 1px 0 rgb(23 23 23 / 14%);
}

.vk-login__icon {
  display: block;
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
}

.vk-login__text {
  display: inline-block;
  pointer-events: none;
}

.hero__poster {
  position: relative;
  min-height: 25rem;
  padding: var(--space-4);
  overflow: hidden;
  background: var(--color-pink);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 0.8;
}

.poster__route {
  position: absolute;
  z-index: 2;
  left: var(--space-4);
  bottom: var(--space-4);
  max-width: 5ch;
  padding: 0.06em 0.1em;
  background: var(--color-pink);
}

.poster__route--end {
  top: var(--space-4);
  right: var(--space-4);
  left: auto;
  bottom: auto;
  width: fit-content;
  text-align: right;
}

.poster__road {
  position: absolute;
  z-index: 0;
  top: 18%;
  left: -8%;
  width: 5rem;
  height: 120%;
  background: var(--color-ink);
  border-inline: var(--border-width) solid var(--color-paper);
  transform: rotate(-38deg);
  transform-origin: top center;
}

.poster__car {
  position: absolute;
  z-index: 1;
  top: 46%;
  left: 42%;
  display: grid;
  width: 6.5rem;
  height: 4rem;
  place-items: center;
  color: var(--color-ink);
  background: var(--color-sun);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-family: var(--font-body);
  font-size: 2rem;
  animation: poster-car-nudge 2.8s steps(2, end) infinite;
}

.poster__stamp {
  position: absolute;
  z-index: 3;
  top: 42%;
  right: var(--space-3);
  padding: var(--space-2);
  background: var(--color-blue);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(8deg);
}

@keyframes poster-car-nudge {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(6px, -4px);
  }
}

.section {
  padding-block: var(--space-7);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: steps;
}

.card {
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow);
}

.step {
  min-height: 16rem;
  height: 100%;
  padding: var(--space-4);
  background: var(--color-paper);
}

.steps > :nth-child(2) .step {
  background: var(--color-blue);
}

.steps > :nth-child(3) .step {
  background: var(--color-sun);
}

/*
 * Scroll reveals: panel slides in from off-screen left/right.
 * Slot stays in flow for IntersectionObserver; panel is the animated child.
 * Off-screen start is gated by html.has-page-reveal (sync boot in <head>) so
 * the first paint never shows the "already open" flash. Transition only on
 * .is-revealed — never when applying the hidden state.
 */
.page-reveal {
  min-width: 0;
  overflow-x: clip;
}

.hero > .page-reveal {
  align-self: stretch;
  height: 100%;
}

.hero > .page-reveal > .hero__poster {
  height: 100%;
}

html.has-page-reveal .page-reveal[data-reveal-side="left"]:not(.is-revealed) > * {
  transform: translateX(calc(-100vw - 2rem));
}

html.has-page-reveal .page-reveal[data-reveal-side="right"]:not(.is-revealed) > * {
  transform: translateX(calc(100vw + 2rem));
}

html.has-page-reveal .page-reveal.is-revealed > * {
  transform: translateX(0);
  transition: transform 520ms cubic-bezier(0.16, 0.85, 0.25, 1);
  transition-delay: calc(min(var(--reveal-index, 0), 8) * 140ms);
}

/* Shadow lift for neo-brutal panels (cards, poster, leaderboard rows). */
html.has-page-reveal .page-reveal:not(.is-revealed) > .card,
html.has-page-reveal .page-reveal:not(.is-revealed) > .hero__poster,
html.has-page-reveal .page-reveal:not(.is-revealed) > .callout,
html.has-page-reveal .page-reveal:not(.is-revealed) > .invite-leaderboard__row,
html.has-page-reveal .page-reveal:not(.is-revealed) > .eco-me-card {
  box-shadow: 0 0 0 var(--color-ink);
}

html.has-page-reveal .page-reveal.is-revealed > .card,
html.has-page-reveal .page-reveal.is-revealed > .hero__poster,
html.has-page-reveal .page-reveal.is-revealed > .callout,
html.has-page-reveal .page-reveal.is-revealed > .invite-leaderboard__row,
html.has-page-reveal .page-reveal.is-revealed > .eco-me-card {
  transition:
    transform 520ms cubic-bezier(0.16, 0.85, 0.25, 1),
    box-shadow 520ms cubic-bezier(0.16, 0.85, 0.25, 1);
  transition-delay: calc(min(var(--reveal-index, 0), 8) * 140ms);
}

html.has-page-reveal .page-reveal.is-revealed > .card,
html.has-page-reveal .page-reveal.is-revealed > .hero__poster,
html.has-page-reveal .page-reveal.is-revealed > .callout {
  box-shadow: var(--shadow);
}

html.has-page-reveal .page-reveal.is-revealed > .invite-leaderboard__row,
html.has-page-reveal .page-reveal.is-revealed > .eco-me-card {
  box-shadow: 3px 3px 0 var(--color-ink);
}

.step__number {
  display: inline-block;
  margin-bottom: var(--space-6);
  padding: 0.25rem 0.5rem;
  color: var(--color-paper);
  background: var(--color-ink);
  font-weight: 900;
}

.step p {
  margin-bottom: 0;
}

.step--action {
  padding: 0;
}

.step__link {
  display: block;
  height: 100%;
  min-height: 16rem;
  padding: var(--space-4);
  color: inherit;
  text-decoration: none;
}

.step__link:hover,
.step__link:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: -3px;
}

.step__link h3 {
  margin-bottom: var(--space-2);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5);
  background: var(--color-pink);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow);
}

.section > .page-reveal:has(.callout) {
  margin-bottom: var(--space-7);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  padding-block: var(--space-4);
  border-top: var(--border-width) solid var(--color-ink);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.site-footer__primary {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-ink);
  font-weight: 800;
  text-decoration: none;
}

.site-footer__brand:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer__logo {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: cover;
  border: calc(var(--border-width) - 1px) solid var(--color-ink);
}

.site-footer__tagline {
  margin: 0;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  justify-content: flex-end;
}

.site-footer__legal a {
  color: var(--color-ink);
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.legal-page {
  padding-block: var(--space-4) var(--space-6);
}

.legal-page__heading {
  margin-bottom: var(--space-2);
}

.legal-page__meta {
  margin: 0 0 var(--space-4);
  color: var(--color-muted);
  font-size: 0.95rem;
}

.contact-page {
  padding-block: var(--space-4) var(--space-6);
}

.contact-page__heading {
  margin-bottom: var(--space-4);
}

.contact-page__about {
  margin-bottom: var(--space-5);
}

.contact-page__feedback {
  max-width: 48rem;
}

.contact-page__feedback-copy {
  display: grid;
  gap: var(--space-2);
}

.contact-page__feedback-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.15;
}

.contact-page__feedback-copy p {
  margin: 0;
  font-weight: 600;
  line-height: 1.45;
}

.contact-page__legal-note {
  color: var(--color-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.contact-page__legal-note a {
  font-weight: 700;
}

.contact-page__telegram {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  width: fit-content;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-md);
  background: var(--color-sun);
  box-shadow: 3px 3px 0 var(--color-ink);
  color: var(--color-ink);
  font-weight: 700;
  text-decoration: none;
}

.contact-page__telegram:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--color-ink);
}

.contact-page__telegram:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.contact-page__telegram:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 2px;
}

.contact-page__telegram-icon {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.contact-page__telegram-handle {
  font-size: 1.15rem;
}

.legal-doc {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  max-width: 48rem;
}

.legal-doc__section {
  display: grid;
  gap: var(--space-2);
}

.legal-doc__section h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.legal-doc__section h3 {
  margin: var(--space-1) 0 0;
  font-size: 1.05rem;
}

.legal-doc__section p,
.legal-doc__section ul {
  margin: 0;
  color: var(--color-ink);
  font-weight: 500;
  line-height: 1.55;
}

.legal-doc__section ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
}

.legal-doc__section a {
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.field {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  padding: var(--space-2);
  color: var(--color-ink);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-ink);
  border-radius: var(--radius);
  font: inherit;
}

/*
 * datetime-local: WebKit (esp. iOS) sizes to intrinsic content and can ignore
 * width:100% while native chrome is on — overflows the card on narrow phones.
 */
.field input[type="datetime-local"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
}

.price-share-controls {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
  min-width: 0;
}

.price-share-controls > input {
  flex: 1 1 0;
  min-width: 0;
}

.check-option--price-fixed {
  flex: 0 1 auto;
  max-width: 11rem;
  padding: var(--space-1) var(--space-2);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
}

.check-option--price-fixed[hidden] {
  display: none;
}

.price-share-controls .check-option input {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.departure-field__controls {
  display: grid;
  gap: var(--space-2);
}

.departure-quick {
  display: flex;
  gap: var(--space-1);
  align-items: stretch;
  min-width: 0;
}

.departure-quick__btn {
  flex: 1 1 0;
  margin: 0;
  min-width: 0;
  min-height: 2.5rem;
  padding: var(--space-1) 0.25rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  color: var(--color-ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.departure-quick__btn:hover {
  background: var(--color-sun);
}

.departure-quick__btn.is-selected,
.departure-quick__btn:active {
  background: var(--color-sun);
  box-shadow: var(--shadow);
  transform: translate(-1px, -1px);
}

.departure-quick__btn:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.departure-commitment {
  display: flex;
  gap: var(--space-1);
  align-items: stretch;
  min-width: 0;
}

.departure-commitment__option {
  position: relative;
  flex: 1 1 0;
  margin: 0;
  min-width: 0;
  cursor: pointer;
}

.departure-commitment__option > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.departure-commitment__label {
  display: grid;
  place-items: center;
  min-height: 2.5rem;
  padding: var(--space-1) 0.35rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  color: var(--color-ink);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.departure-commitment__option input:checked + .departure-commitment__label {
  background: var(--color-sun);
  box-shadow: var(--shadow);
  transform: translate(-1px, -1px);
}

.departure-commitment__option input:focus-visible + .departure-commitment__label {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.departure-around {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.departure-around.is-invisible {
  visibility: hidden;
}

.departure-around__field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  min-height: 2.5rem;
  margin: 0;
  padding: 0 0.35rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  color: var(--color-ink);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.field .departure-around select {
  width: 3.25ch;
  min-width: 3.25ch;
  min-height: 0;
  padding: 0.1rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: center;
  text-align-last: center;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.departure-around__prefix,
.departure-around__suffix {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .departure-quick__btn,
  .departure-commitment__label {
    transition: none;
  }
}

.field-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.field input[type="datetime-local"]::-webkit-datetime-edit,
.field input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  min-width: 0;
  max-width: 100%;
  padding: 0;
}

.field input[type="datetime-local"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

/* iOS: native appearance blocks declared width; picker still opens on tap. */
@supports (-webkit-touch-callout: none) {
  .field input[type="datetime-local"],
  .trips-filters__input--datetime {
    -webkit-appearance: none;
    appearance: none;
  }
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field textarea.trip-form__description {
  min-height: 5rem;
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--color-error);
}

.field__hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.field__message {
  margin: 0;
  color: var(--color-error);
  font-size: 0.875rem;
  font-weight: 700;
}

.status {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  width: min(100% - 2rem, 72rem);
  margin: 0 auto var(--space-3);
  padding: 0.25rem 0.5rem;
  border: 2px solid currentColor;
  font-size: 0.875rem;
  font-weight: 800;
}

.status--success {
  color: var(--color-success);
}

.status--error {
  color: var(--color-error);
}

.status--info {
  color: var(--color-ink);
}

.guest-preview-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: var(--shadow-small);
  font-size: 0.95rem;
  line-height: 1.35;
}

.guest-preview-banner__link {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 0.15em;
}

.guest-landing {
  display: grid;
  gap: 1rem;
  max-width: 28rem;
}

.guest-landing__text {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.45;
}

.guest-landing__example {
  margin: 0;
  padding: 0.85rem 1rem;
  border: var(--border-width) dashed var(--color-ink);
  background: color-mix(in srgb, var(--color-paper) 88%, var(--color-sun));
  font-size: 0.95rem;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.trust-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

.trust-badge--static {
  cursor: default;
}

.trust-badge__icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.trust-badge__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 20;
  width: max-content;
  max-width: min(14rem, calc(100vw - 1rem));
  transform: translateX(calc(-50% + var(--tip-shift, 0px)));
  padding: 0.4rem 0.55rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper, #fff);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 3px 3px 0 var(--color-ink);
  white-space: normal;
  text-align: left;
}

.profile-verification {
  margin-bottom: var(--space-5);
}

.profile-verification__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.profile-verification__head h2 {
  margin: 0;
}

.profile-verification__head .trust-badge__icon {
  width: 3rem;
  height: 3rem;
}

.profile-verification__form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.profile-verification__form label a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.profile-verification__form label a:hover {
  color: var(--color-blue);
}

.profile-verification__fields {
  display: grid;
  gap: var(--space-4);
}

.profile-verification__details {
  margin-top: var(--space-3);
}

.profile-verification__subtitle {
  margin: 0 0 var(--space-2);
  font-size: 1.125rem;
}

.profile-verification__email {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 2px solid var(--color-ink);
  background: linear-gradient(180deg, #fff 0%, #fff9e8 100%);
}

.profile-verification__email-grid {
  display: grid;
  gap: var(--space-4);
}

.profile-verification__email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.profile-verification__divider {
  margin: var(--space-4) 0 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.trust-affiliation-label {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.625rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-muted);
  vertical-align: middle;
}

.trip-detail__person-name-row .trust-affiliation-label {
  margin-left: 0;
  text-transform: uppercase;
}

.verification-actions {
  display: grid;
  gap: 0.5rem;
  min-width: 14rem;
}

.verification-actions__reject {
  display: grid;
  gap: 0.35rem;
}

.verification-actions__reject input {
  width: 100%;
  min-width: 10rem;
}

.verification-document-dialog {
  width: min(100% - 2rem, 56rem);
  max-height: calc(100% - 2rem);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-large);
}

.verification-document-dialog::backdrop {
  background: rgb(23 23 23 / 55%);
}

.verification-document-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.verification-document-dialog__header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.verification-document-dialog__body {
  display: flex;
  justify-content: center;
  max-height: min(75vh, 48rem);
  overflow: auto;
  background: var(--color-ink);
}

.verification-document-dialog__image {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.trip-detail__person-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  min-width: 0;
}

.trip-result__passenger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  max-width: 100%;
}

.trip-result__passenger-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  min-width: 0;
}

.flash-stack {
  position: fixed;
  top: max(var(--space-3), env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 1100;
  display: grid;
  gap: var(--space-2);
  width: min(calc(100% - 2rem), 28rem);
  transform: translateX(-50%);
  pointer-events: none;
}

.flash {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-1.25rem);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  pointer-events: auto;
  cursor: pointer;
}

.flash--visible {
  opacity: 1;
  transform: translateY(0);
}

.flash--leaving {
  opacity: 0;
  transform: translateY(-0.75rem);
}

.flash--success {
  color: var(--color-ink);
  background: var(--color-sun);
}

.flash--error {
  color: var(--color-paper);
  background: var(--color-error);
}

.toast-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgb(23 23 23 / 28%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.toast-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.toast-overlay--leaving {
  opacity: 0;
  pointer-events: none;
}

.toast {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  width: min(100%, 22rem);
  padding: var(--space-4) var(--space-5);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translateY(0.75rem) scale(0.96);
  transition: transform 0.28s ease;
}

.toast-overlay--visible .toast {
  transform: translateY(0) scale(1);
}

.toast--success {
  background: var(--color-sun);
}

.toast__eyebrow {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toast__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 900;
  line-height: 1.15;
}

.toast__hint {
  margin: 0;
  color: var(--color-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.toast__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
}

.toast__share {
  min-width: 10rem;
}

.toast__navigator,
.toast__yandex-go {
  flex: 0 0 auto;
}

.navigator-chooser {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: var(--space-4);
  border: none;
  background: transparent;
  color: var(--color-ink);
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.navigator-chooser[open] {
  display: grid;
}

.navigator-chooser::backdrop {
  background: rgb(23 23 23 / 45%);
}

.navigator-chooser--visible {
  opacity: 1;
  pointer-events: auto;
}

.navigator-chooser--leaving {
  opacity: 0;
  pointer-events: none;
}

.navigator-chooser__panel {
  display: grid;
  gap: var(--space-3);
  width: min(100%, 20rem);
  padding: var(--space-4) var(--space-5);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translateY(0.5rem) scale(0.97);
  transition: transform 0.2s ease;
}

.navigator-chooser--visible .navigator-chooser__panel {
  transform: translateY(0) scale(1);
}

.navigator-chooser__eyebrow {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navigator-chooser__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 900;
  line-height: 1.2;
}

.navigator-chooser__hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.navigator-chooser__actions {
  display: grid;
  gap: var(--space-2);
}

.navigator-chooser__cancel {
  width: 100%;
}

.profile-page {
  padding-block: var(--space-5) var(--space-7);
}

.users-page {
  padding-block: var(--space-4) var(--space-6);
}

.users-page h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading--compact {
  align-items: center;
  margin-bottom: var(--space-3);
}

.users-summary {
  margin: 0;
  font-weight: 700;
}

.users-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: var(--space-2) var(--space-3);
  align-items: end;
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

.users-filters .field {
  margin: 0;
}

.users-filters label {
  font-size: 0.75rem;
}

.users-filters input,
.users-filters select {
  min-height: 2.5rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.9375rem;
}

.users-filters .enum-combobox {
  width: 100%;
}

.users-filters .enum-combobox .point-combobox__option {
  display: block;
}

.users-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.admin-trip-filters__statuses {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  padding: var(--space-2);
  border: var(--border-width) solid var(--color-ink);
}

.admin-trip-filters__statuses legend {
  padding-inline: 0.35rem;
  font-weight: 700;
}

.admin-trip-filters__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
}

.admin-trip-filters__route {
  grid-column: 1 / -1;
}

.admin-trips-page .trips-filters__route [data-map-target],
.admin-trips-page #load-nearby-from {
  display: none;
}

/* Compact registry cards: /trips content + trip id; people in one row on desktop. */
.admin-trips-page .trip-result--status-rail,
.admin-trips-page .trip-result--status-rail.trip-result--link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.admin-trips-page .trip-result__main {
  display: grid;
  flex: 1 1 auto;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
}

.admin-trips-page .trip-result__status-rail {
  display: flex;
  flex: 0 0 1.6rem;
  align-items: stretch;
  width: 1.6rem;
  border-left: 2px solid var(--color-ink);
}

.admin-trips-page .trip-result__status-rail .trip-status {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0.4rem 0;
  border: 0;
  writing-mode: sideways-lr;
  white-space: nowrap;
  letter-spacing: 0.06em;
}

@supports not (writing-mode: sideways-lr) {
  .admin-trips-page .trip-result__status-rail .trip-status {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}

.admin-trips-page .trip-result__route {
  font-size: 0.95rem;
}

.admin-trips-page .trip-result__description {
  font-size: 0.8125rem;
  -webkit-line-clamp: 1;
}

.admin-trips-page .trip-result__people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
}

.admin-trips-page .trip-result__driver {
  flex: 0 1 auto;
  max-width: min(20rem, 100%);
  gap: 0.4rem;
  font-size: 0.8125rem;
}

.admin-trips-page .trip-result__driver-body {
  gap: 0.15rem;
}

.admin-trips-page .trip-result__passengers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.8125rem;
}

.admin-trips-page .trip-result__passenger-row {
  gap: 0.35rem;
}

.admin-trips-page .trip-result__avatar--driver,
.admin-trips-page .trip-result__avatar--passenger {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.95rem;
}

.admin-trips-page .trip-results__skeleton {
  min-block-size: 5.25rem;
}

.admin-trips-page .trip-results__loading {
  grid-template-rows: repeat(3, minmax(5.25rem, 1fr));
}

@media (min-width: 48rem) {
  .admin-trips-page .trip-result__people {
    flex-wrap: nowrap;
  }

  .admin-trips-page .trip-result__passengers {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* `/trips/mine`: vertical status rail (ADR-0366 / ADR-0480) + dimmed history. */
.trips-mine-page .trip-result--status-rail,
.trips-mine-page .trip-result--status-rail.trip-result--link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.trips-mine-page .trip-result__main {
  display: grid;
  flex: 1 1 auto;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2);
}

.trips-mine-page .trip-result__status-rail {
  display: flex;
  flex: 0 0 1.6rem;
  align-items: stretch;
  width: 1.6rem;
  border-left: 2px solid var(--color-ink);
}

.trips-mine-page .trip-result__status-rail .trip-status {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0.4rem 0;
  border: 0;
  writing-mode: sideways-lr;
  white-space: nowrap;
  letter-spacing: 0.06em;
}

@supports not (writing-mode: sideways-lr) {
  .trips-mine-page .trip-result__status-rail .trip-status {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}

.trips-mine-page .trip-result--status-rail.trip-result--inactive {
  background: color-mix(in srgb, var(--color-paper) 78%, var(--color-muted));
}

.trips-mine-page .trip-result--status-rail.trip-result--inactive .trip-result__main {
  color: var(--color-muted);
}

.trips-mine-page .trip-result--status-rail.trip-result--inactive .trip-result__route {
  color: color-mix(in srgb, var(--color-ink) 52%, var(--color-muted));
}

.trips-mine-page .trip-result--link.trip-result--status-rail.trip-result--inactive:hover,
.trips-mine-page .trip-result--link.trip-result--status-rail.trip-result--inactive:focus-visible {
  background: color-mix(in srgb, var(--color-paper) 68%, var(--color-muted));
}

.trips-mine-page .trip-result--link.trip-result--status-rail.trip-result--inactive:has(.user-card-link:hover),
.trips-mine-page .trip-result--link.trip-result--status-rail.trip-result--inactive:has(.user-card-link:focus-visible),
.trips-mine-page .trip-result--link.trip-result--status-rail.trip-result--inactive:has(.user-card-link:active) {
  background: color-mix(in srgb, var(--color-paper) 78%, var(--color-muted));
}

.trips-mine-page .trip-results__item {
  position: relative;
}

.trips-mine-page .trip-result--with-repeat .trip-result__main {
  padding-right: calc(var(--space-2) + 3rem);
}

.trips-mine-page .trip-result__repeat {
  position: absolute;
  z-index: 2;
  top: -0.8rem;
  right: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0.32rem;
  border: 2px solid var(--color-ink);
  border-radius: 0;
  background: var(--color-paper);
  box-shadow: 2px 2px 0 var(--color-ink);
  transform: rotate(12deg);
  transform-origin: center center;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 80ms ease;
}

.trips-mine-page .trip-result__repeat:hover {
  background: var(--color-paper);
  box-shadow: 1px 1px 0 var(--color-ink);
}

.trips-mine-page .trip-result__repeat:active {
  background: var(--color-sun);
  box-shadow: 0 0 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
  transform: translate(2px, 2px) rotate(12deg);
}

.trips-mine-page .trip-result__repeat img {
  display: block;
  width: 2.3rem;
  height: 1.9rem;
  object-fit: contain;
}

.trips-mine-page .trip-result__repeat-hint {
  position: absolute;
  z-index: 3;
  right: 1.9rem;
  bottom: calc(100% + 0.35rem);
  max-width: min(14rem, calc(100% - 3rem));
  padding: 0.35rem 0.5rem;
  border: 2px solid var(--color-ink);
  background: var(--color-sun);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  pointer-events: none;
}

.trips-mine-page .trip-result__repeat-hint::after {
  position: absolute;
  right: 0.8rem;
  bottom: -0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
  background: var(--color-sun);
  content: "";
  transform: rotate(45deg);
}

.trips-mine-page #mine-trips-list {
  min-block-size: max(20rem, calc(100dvh - var(--app-tabbar-offset, 0px) - 16rem));
}

.trips-mine-page .trip-results,
.trips-mine-page .trip-results__loading {
  --trip-results-min-block: 0;
  min-block-size: auto;
}

.trips-mine-history {
  display: grid;
  gap: var(--space-3);
}

.trips-mine-page #mine-trip-results:not([hidden]) + .trips-mine-history {
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-ink);
}

.trips-mine-page .trips-mine-history__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.users-table-wrap {
  overflow-x: auto;
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  background: var(--color-paper);
}

.users-table {
  width: 100%;
  min-width: 68rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.users-table th,
.users-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 2px solid var(--color-ink);
  border-right: 1px solid color-mix(in srgb, var(--color-ink) 25%, transparent);
  vertical-align: top;
  text-align: left;
}

.users-table th:last-child,
.users-table td:last-child {
  border-right: 0;
}

.users-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-sun);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.users-table thead a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.users-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--color-blue) 12%, var(--color-paper));
}

.users-table__row--banned {
  background: color-mix(in srgb, var(--color-pink) 18%, var(--color-paper)) !important;
}

.users-table__row--deleted {
  background: color-mix(in srgb, var(--color-muted) 16%, var(--color-paper)) !important;
  color: var(--color-muted);
}

.users-table__avatar-head,
.users-table__avatar {
  width: 5.75rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  vertical-align: middle;
}

.users-table__avatar img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  display: block;
}

.users-table__inviter-head,
.users-table__inviter {
  width: 2.75rem;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  vertical-align: middle;
  text-align: center;
}

.users-table__inviter img {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  display: block;
  margin-inline: auto;
}

.users-table__id,
.users-table__num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}

.users-table__stack {
  display: grid;
  gap: 0.15rem;
  max-width: 14rem;
  word-break: break-word;
}

.users-table__social.social-links {
  gap: 0.25rem;
}

.users-table__social .social-link {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 2px;
}

.users-table__social .social-link__icon {
  width: 1rem;
  height: 1rem;
}

.users-table__actor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.users-table__actor-avatar {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: cover;
  border: 1px solid var(--color-ink);
  background: var(--color-paper);
  box-sizing: border-box;
  flex-shrink: 0;
}

.users-table__plates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
  word-break: normal;
}

.users-table .ru-plate--compact {
  min-height: 1.45rem;
  font-size: 0.7rem;
}

.users-table .ru-plate--compact .ru-plate__body {
  padding: 0.08rem 0.3rem;
  font-size: 0.72rem;
}

.users-table .ru-plate--compact .ru-plate__region {
  min-width: 1.55rem;
  padding: 0.04rem 0.16rem 0.08rem;
}

.users-table .ru-plate--compact .ru-plate__region-code {
  font-size: 0.62rem;
}

.users-table .ru-plate--compact .ru-plate__rus {
  font-size: 0.3rem;
}

.users-table .ru-plate--compact .ru-plate__flag {
  width: 0.55rem;
  height: 0.36rem;
}

.users-table__muted {
  color: var(--color-muted);
  font-weight: 600;
}

.users-table__ban-flag,
.users-table__deleted-flag {
  text-transform: uppercase;
  font-size: 0.7rem;
}

.users-table__trust {
  color: var(--color-ink);
  font-weight: 800;
  font-size: 0.75rem;
}

.users-role {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0.1rem 0.25rem 0.1rem 0;
  padding: 0.1rem 0.35rem;
  background: var(--color-blue);
  border: 2px solid var(--color-ink);
  font-size: 0.6875rem;
  font-weight: 800;
}

.users-role__remove {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.users-role__remove:hover,
.users-role__remove:focus-visible {
  color: var(--color-red);
}

.users-table__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  width: fit-content;
  padding: 0.1rem 0.35rem;
  border: 2px solid var(--color-ink);
  background: var(--color-yellow);
  font-size: 0.6875rem;
  font-weight: 800;
}

.users-table__badge-remove {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.users-table__badge-remove:hover,
.users-table__badge-remove:focus-visible {
  color: var(--color-red);
}

/* Flex on a td breaks row height and hit-testing for wrapped buttons. */
.users-table__actions {
  min-width: 9rem;
  max-width: 13rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.users-table__actions .button {
  min-height: 1.5rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.6875rem;
  line-height: 1.15;
  white-space: nowrap;
}

.users-ban-form {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: nowrap;
  gap: 0.2rem;
  align-items: center;
  margin: 0;
}

.users-ban-form input[type="text"] {
  flex: 1 1 4.5rem;
  min-width: 0;
  min-height: 1.5rem;
  padding: 0.05rem 0.3rem;
  font-size: 0.6875rem;
}

.users-table__actions form {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.user-badge-dialog {
  width: min(100% - 2rem, 30rem);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-large);
}

.user-badge-dialog::backdrop {
  background: rgb(23 23 23 / 55%);
}

.user-badge-dialog__header,
.user-badge-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.user-badge-dialog__header {
  margin-bottom: var(--space-3);
}

.user-badge-dialog__header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.user-badge-dialog__form {
  display: grid;
  gap: var(--space-3);
}

.user-badge-dialog__actions {
  justify-content: flex-start;
}

.users-table__ambassador {
  text-align: center;
  vertical-align: middle;
}

.users-table__ambassador-icon {
  display: block;
  width: 1.125rem;
  height: auto;
  margin: 0 auto;
}

.users-ambassador-form__label {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.users-ambassador-form input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.pagination__status {
  font-weight: 800;
}

.profile-page h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(3.5rem, 8vw, 6rem);
}

.profile-account-actions {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.profile-account-actions form {
  margin: 0;
}

.profile-page > .card {
  margin-top: var(--space-5);
}

.profile-page .profile-verification {
  margin-bottom: 0;
}

.profile-page > .section-heading {
  margin-bottom: 0;
}

.invite-leaders-page > .page-reveal,
.eco-leaders-page > .page-reveal {
  margin-top: var(--space-5);
}

.invite-leaders-page > .page-reveal:first-child,
.eco-leaders-page > .page-reveal:first-child {
  margin-top: 0;
}

.invite-leaders-page > .page-reveal .section-heading,
.eco-leaders-page > .page-reveal .section-heading {
  margin-bottom: 0;
}

.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.profile-card {
  padding: var(--space-5);
}

.garage-addresses .trips-filters {
  margin: 0;
}

.garage-addresses .point-combobox__city[aria-hidden="true"] {
  display: none;
}

.profile-card h2 {
  margin-bottom: var(--space-4);
  font-size: clamp(2rem, 4vw, 3rem);
}

.profile-details {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.profile-details div {
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-ink);
}

.profile-details dt {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 800;
}

.profile-details dd {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profile-details .field dd {
  display: grid;
  gap: var(--space-1);
}

.profile-email-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}

.profile-email-actions__notify {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--color-ink);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-email-actions__notify input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--color-ink);
  cursor: pointer;
}

.profile-note {
  margin: var(--space-4) 0 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.profile-photo-preview {
  display: grid;
  gap: 1.25rem;
  margin-bottom: var(--space-4);
}

.profile-photo__upload {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.profile-photo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.profile-photo__delete {
  margin-top: var(--space-3);
}

.profile-photo-crop-dialog {
  width: min(100% - 2rem, 32rem);
  max-height: calc(100% - 2rem);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-large);
}

.profile-photo-crop-dialog::backdrop {
  background: rgb(23 23 23 / 55%);
}

.profile-photo-crop-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.profile-photo-crop-dialog__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.profile-photo-crop-dialog__hint {
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.profile-photo-crop-dialog__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 700;
}

.profile-photo-crop-dialog__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-photo-crop-dialog__legend-item::before {
  content: "";
  width: 1.25rem;
  height: 0.75rem;
  border: 2px solid var(--color-ink);
}

.profile-photo-crop-dialog__legend-item--profile::before {
  width: 0.75rem;
  height: 1rem;
  border-color: #fff;
  background: rgb(255 255 255 / 20%);
}

.profile-photo-crop-dialog__legend-item--thumb::before {
  width: 0.75rem;
  height: 0.75rem;
  border-style: dashed;
  border-color: var(--color-accent, #f5d547);
  background: rgb(245 213 71 / 15%);
}

.profile-photo-crop-dialog__stage {
  display: flex;
  justify-content: center;
  margin: 0 auto var(--space-3);
  overflow: auto;
  background: #1a1a1a;
  touch-action: none;
  user-select: none;
}

.profile-photo-crop {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border: var(--border-width) solid var(--color-ink);
  touch-action: none;
  cursor: default;
}

.profile-photo-crop__image {
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-photo-crop__selection {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  cursor: move;
  touch-action: none;
  pointer-events: auto;
}

.profile-photo-crop__selection--profile {
  z-index: 1;
  border: 2px solid rgb(255 255 255 / 85%);
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 38%);
}

.profile-photo-crop__selection--thumb {
  z-index: 3;
  border: 2px dashed var(--color-accent, #f5d547);
  box-shadow: none;
}

.profile-photo-crop__selection--profile.profile-photo-crop__selection--active {
  z-index: 2;
  border-color: #fff;
  box-shadow:
    0 0 0 2px var(--color-ink),
    0 0 0 9999px rgb(0 0 0 / 45%);
}

.profile-photo-crop__selection--thumb.profile-photo-crop__selection--active {
  z-index: 4;
  border-style: solid;
  box-shadow: 0 0 0 2px var(--color-ink);
}

.profile-photo-crop__handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-ink);
  background: #fff;
  box-shadow: var(--shadow-small);
}

.profile-photo-crop__handle--nw {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}

.profile-photo-crop__handle--ne {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.profile-photo-crop__handle--sw {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

.profile-photo-crop__handle--se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.profile-photo-crop-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-3);
}

.profile-photo-crop-dialog .status {
  margin: 0 0 var(--space-3);
}

.subscription-wait-dialog {
  width: min(100% - 2rem, 24rem);
  max-height: calc(100% - 1rem);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-large);
}

.subscription-wait-dialog::backdrop {
  background: rgb(23 23 23 / 55%);
}

.subscription-wait-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.subscription-wait-dialog__header h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.subscription-wait-choice {
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
}

.subscription-wait-choice__layout {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.subscription-wait-choice__stepper {
  flex: 0 0 auto;
  margin: 0;
  width: auto;
  grid-template-columns: 2.35rem 2.5rem 2.35rem;
  box-shadow: none;
}

.subscription-wait-choice__stepper .number-stepper__btn {
  min-height: 2.25rem;
  font-size: 1.25rem;
}

.subscription-wait-choice__stepper input {
  width: 100%;
  min-height: 2.25rem;
  padding: 0;
  border: 0;
  border-left: var(--border-width) solid var(--color-ink);
  border-right: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.subscription-wait-choice__stepper input::-webkit-outer-spin-button,
.subscription-wait-choice__stepper input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.subscription-wait-units {
  display: flex;
  flex: 1 1 12rem;
  min-width: 0;
  gap: var(--space-1);
}

.subscription-wait-units__option {
  flex: 1 1 0;
  margin: 0;
  cursor: pointer;
}

.subscription-wait-units__option > input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subscription-wait-units__label {
  display: block;
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-2);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.subscription-wait-units__option input:checked + .subscription-wait-units__label {
  background: var(--color-sun);
  box-shadow: var(--shadow);
  transform: translate(-1px, -1px);
}

.subscription-wait-units__option input:focus-visible + .subscription-wait-units__label {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.subscription-wait-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.subscription-wait-dialog__actions .button--dark {
  flex: 1 1 auto;
  min-width: 0;
}

.subscription-create {
  margin-block: 1rem;
}

.subscription-presets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  margin-block: .8rem;
}

.subscription-presets .button {
  min-height: 3.5rem;
  white-space: normal;
}

.subscription-create__custom {
  width: 100%;
  justify-content: center;
}

.subscription-schedule {
  border: 0;
  margin: .5rem 0;
  padding: 0;
}

.subscription-schedule__label {
  margin-bottom: .35rem;
  padding: 0;
  color: var(--color-muted);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
}

.subscription-schedule__hint {
  margin: -.1rem 0 .55rem;
  color: var(--color-muted);
  font-size: .78rem;
  line-height: 1.3;
}

.subscription-schedule__row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: .35rem;
  margin-block: .3rem;
}

.subscription-schedule__day {
  position: relative;
  display: grid;
  min-height: 2.5rem;
  place-items: center;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.subscription-schedule__day:has(input:checked) {
  background: var(--color-sun);
  box-shadow: 2px 2px 0 var(--color-ink);
  transform: translate(1px, 1px);
}

.subscription-schedule__day input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.subscription-schedule__day input:focus-visible + span {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.subscription-schedule__time {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  padding: .35rem .4rem;
  border: var(--border-width) solid var(--color-ink);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  /*
   * Use one predictable box model for the time fields. The native visual
   * treatment is intentionally sacrificed so iOS cannot impose its intrinsic
   * control width on the grid.
   */
  -webkit-appearance: none;
  appearance: none;
}

.subscription-item__schedule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  margin-top: .25rem;
}

.subscription-item__schedule-entry {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}

.subscription-item__schedule-day {
  padding: .1rem .3rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.2;
}

.subscription-item__schedule-time {
  font-family: var(--font-time);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.profile-form__social {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 3px solid var(--color-ink);
}

.profile-form__social h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.25rem;
}

.profile-form__social > div:first-child p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-link {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
  text-decoration: none;
  transition:
    transform 100ms ease,
    box-shadow 100ms ease;
}

.social-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--color-ink);
}

.social-link:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.social-link:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 2px;
}

.social-link__icon {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}

.booking-contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.profile-form {
  display: grid;
  gap: var(--space-4);
  background: var(--color-blue);
}

.places-page {
  padding-block: var(--space-5) var(--space-7);
}

.places-page h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(3.5rem, 8vw, 6rem);
}

.places-lead {
  max-width: 40rem;
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
}

.places-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
  align-items: start;
}

.places-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5);
}

.places-card h2,
.places-card h3 {
  margin-bottom: 0;
}

.places-card h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.places-card h3 {
  font-size: 1.125rem;
  font-weight: 800;
}

/* Map flush with card sides; chrome keeps padding (UI-216 / ADR-0475). */
.places-map-card {
  width: 100%;
  padding-inline: 0;
}

.places-map-card > :not(.places-map-slot) {
  padding-inline: var(--space-5);
}

.places-map-slot {
  position: relative;
}

.places-map-card .place-map {
  border-inline: none;
  box-shadow: none;
  border-block: var(--border-width) solid var(--color-ink);
}

.places-map-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: 3px 3px 0 var(--color-ink);
}

.places-map-banner__text {
  margin: 0;
  flex: 1 1 12rem;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.places-map-banner--idle {
  background: color-mix(in srgb, var(--color-paper) 88%, var(--color-muted));
}

.places-map-banner--selected {
  background: color-mix(in srgb, var(--color-blue) 35%, var(--color-paper));
}

.places-map-banner--new-place,
.places-map-banner--new-side {
  background: color-mix(in srgb, var(--color-sun) 55%, var(--color-paper));
}

.places-create {
  background: var(--color-blue);
}

.places-detail,
.places-create {
  grid-column: 1 / -1;
}

.places-help {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.places-show-hidden {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  user-select: none;
  cursor: pointer;
}

.places-show-hidden input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-ink);
}

.places-catchment-radius {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.places-catchment-radius input {
  width: 4.5rem;
  margin: 0;
  padding: 0.25rem 0.4rem;
  color: var(--color-ink);
  font: inherit;
  font-weight: 700;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
}

.place-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1.5px solid var(--color-ink);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.place-badge--personal {
  color: var(--color-muted);
  background: color-mix(in srgb, var(--color-muted) 18%, var(--color-paper));
  border-color: color-mix(in srgb, var(--color-muted) 55%, var(--color-ink));
}

.place-badge--pending-review {
  background: color-mix(in srgb, var(--color-blue) 55%, var(--color-paper));
}

.places-pending-review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 2px solid var(--color-ink);
  background: color-mix(in srgb, var(--color-blue) 22%, var(--color-paper));
}

.places-pending-review__summary {
  margin: 0;
  flex: 1 1 10rem;
  font-weight: 700;
}

.places-confirm-review {
  margin-top: var(--space-2);
  width: 100%;
}

.place-meta {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.place-meta[hidden] {
  display: none;
}

.place-meta__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.place-meta__creator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.place-meta__creator-name {
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
}

.place-meta__dates {
  display: grid;
  gap: 0.15rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.places-id,
.place-side__id {
  color: var(--color-muted);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.places-id {
  display: inline-block;
  margin-left: 0.45rem;
  vertical-align: baseline;
}

.place-side__id {
  display: block;
}

.place-results {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}

.place-side {
  display: grid;
  width: 100%;
  gap: 0.125rem;
  padding: var(--space-2);
  cursor: pointer;
  text-align: left;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  font: inherit;
}

.place-side:hover {
  background: var(--color-sun);
}

.place-side--selected {
  background: color-mix(in srgb, var(--color-sun) 55%, var(--color-paper));
}

.place-side span {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.place-map,
.point-map {
  position: relative;
  z-index: 0;
  width: 100%;
  min-height: min(70vh, 40rem);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  touch-action: none;
}

.places-detail__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
}

.places-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.places-more {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-ink);
}

.places-more__summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  list-style: none;
}

.places-more__summary::-webkit-details-marker {
  display: none;
}

.places-more__summary::before {
  content: "▸ ";
}

.places-more[open] > .places-more__summary::before {
  content: "▾ ";
}

.places-more__body {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.places-more__actions {
  margin: 0;
}

.places-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.place-rename-form,
.place-create-form,
.side-edit-form {
  display: grid;
  gap: var(--space-3);
}

.side-edit-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.places-sides,
.side-editor,
.place-boarding-rules {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-ink);
}

.places-sides__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.side-editor[hidden],
.places-create[hidden],
.places-detail[hidden],
.place-rename-form[hidden] {
  display: none;
}

.places-create--side #create-city-field,
.places-create--side #create-name-field {
  display: none;
}

.place-sides {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}

.place-boarding-rules .place-results li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
}

.point-stats {
  display: grid;
  gap: var(--space-2);
}

.point-stats__list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.point-stats__list dt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.point-stats__list dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.point-stats__badge {
  display: inline-block;
  width: fit-content;
  margin: 0;
  padding: 0.2rem 0.45rem;
  border: 2px solid var(--color-ink);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.point-stats__badge--ok {
  background: color-mix(in srgb, var(--color-blue) 35%, var(--color-paper));
}

.point-stats__badge--warn {
  background: var(--color-sun);
}

.point-stats__badge--stale {
  background: color-mix(in srgb, var(--color-pink) 35%, var(--color-paper));
}

.point-stats__badge--catalog {
  background: color-mix(in srgb, var(--color-blue) 22%, var(--color-paper));
}

.trips-page {
  padding-block: var(--space-5) var(--space-7);
}

.trips-page .section-heading {
  margin-bottom: var(--space-3);
}

.trips-page h1,
.contact-page h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.trips-page .trip-detail > h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: 0;
  font-family: var(--font-body, inherit);
  font-weight: 800;
}

.trips-page .trip-detail > h1.trip-detail__route {
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  line-height: 1.3;
  overflow: visible;
}

.trip-detail__route-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  overflow: visible;
}

.trip-detail__route-item {
  /* Fixed rail column so dots and avatars share one vertical center. */
  --trip-route-rail-size: 2.75rem;
  --trip-route-rail-center: calc(var(--trip-route-rail-size) / 2);
  position: relative;
  display: grid;
  grid-template-columns: var(--trip-route-rail-size) minmax(0, 1fr);
  column-gap: 0.65rem;
  align-items: start;
  min-width: 0;
  padding-bottom: 0.65rem;
}

.trip-detail__route-item--booking {
  cursor: pointer;
  border-left: 0.35rem solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.trip-detail__route-item--booking:hover,
.trip-detail__route-item--booking:focus-visible {
  background: color-mix(in srgb, var(--color-blue) 18%, transparent);
  border-left-color: var(--color-blue);
  outline: none;
}

.trip-detail__route-item--booking-pickup {
  background: color-mix(in srgb, var(--color-sun) 28%, transparent);
  border-left-color: var(--color-sun);
}

.trip-detail__route-item--booking-dropoff {
  background: color-mix(in srgb, var(--color-pink) 20%, transparent);
  border-left-color: var(--color-pink);
}

.trip-detail__route-item:last-child {
  padding-bottom: 0;
}

.trip-detail__route-item::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.4em;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  justify-self: center;
}

.trip-detail__route-item--from::before {
  background: var(--color-sun);
}

.trip-detail__route-item--to::before {
  background: var(--color-pink);
}

.trip-detail__route-item--occupants::before {
  display: none;
}

.trip-detail__route-item--occupants:not(:last-child)::after {
  /* From avatar vertical center; circle covers the line via z-index. */
  top: calc(0.05rem + var(--trip-route-rail-center));
}

.trip-detail__route-occupants {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: start;
  width: var(--trip-route-rail-size);
  margin-top: 0.05rem;
  overflow: visible;
}

.trip-detail__route-occupants--booking {
  /* Allow stacked faces + «Сяду»/«Выйду» badges to spill past the rail column. */
  width: auto;
  min-width: var(--trip-route-rail-size);
  max-width: none;
  padding-bottom: 0.85rem;
}

.trip-detail__route-booking-handle-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  cursor: grab;
  touch-action: none;
  overflow: visible;
}

.trip-detail__route-item:has(.trip-detail__booking-drag-hint) {
  z-index: 5;
  overflow: visible;
}

.trip-detail__route-list:has(
  .trip-detail__route-item--from .trip-detail__booking-drag-hint:not(.trip-detail__booking-drag-hint--below)
) {
  padding-top: 4.75rem;
}

.trip-detail__booking-drag-hint {
  position: absolute;
  z-index: 6;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  width: max-content;
  max-width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.35rem 0.5rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  color: var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--tip-shift, 0px)));
}

.trip-detail__booking-drag-hint::after {
  position: absolute;
  left: calc(50% - var(--tip-shift, 0px));
  bottom: -0.4rem;
  width: 0.7rem;
  height: 0.7rem;
  border-right: var(--border-width) solid var(--color-ink);
  border-bottom: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.trip-detail__booking-drag-hint--below {
  bottom: auto;
  top: calc(100% + 0.7rem);
}

.trip-detail__booking-drag-hint--below::after {
  top: -0.4rem;
  bottom: auto;
  border-right: 0;
  border-bottom: 0;
  border-top: var(--border-width) solid var(--color-ink);
  border-left: var(--border-width) solid var(--color-ink);
}

.trip-route--dragging .trip-detail__booking-drag-hint {
  display: none;
}

.trip-detail__route-booking-handle-wrap:active {
  cursor: grabbing;
}

.trip-detail__route-booking-handle {
  box-shadow: 3px 3px 0 var(--color-ink);
}

.trip-detail__route-booking-badge {
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  z-index: 4;
  transform: translateX(-50%);
  padding: 0.05rem 0.28rem;
  border: 1.5px solid var(--color-ink);
  border-radius: 0.2rem;
  color: var(--color-ink);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 1.5px 1.5px 0 var(--color-ink);
}

.trip-detail__route-booking-badge--pickup {
  background: var(--color-sun);
}

.trip-detail__route-booking-badge--dropoff {
  background: var(--color-pink);
}

.trip-route--dragging {
  user-select: none;
}

.trip-detail__route-occupants > .user-card-link {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

/* Keep the first avatar on the rail; stack the rest to the right. */
.trip-detail__route-occupants > :not(:first-child) {
  margin-left: -0.9rem;
}

.trip-detail__route-occupants--booking > :not(:first-child) {
  z-index: 1;
}

.trip-detail__route-occupant-wrap {
  position: relative;
  display: flex;
  flex-shrink: 0;
  line-height: 0;
}

.trip-detail__route-occupant-arrived {
  position: absolute;
  right: -0.2rem;
  bottom: -0.15rem;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--color-ink);
  border-radius: 50%;
  background: #6ee7a8;
  box-sizing: border-box;
  pointer-events: none;
}

.trip-detail__route-occupant-arrived img {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
}

.trip-detail__route-occupant {
  width: var(--trip-route-rail-size);
  height: var(--trip-route-rail-size);
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-paper);
  box-sizing: border-box;
}

.trip-detail__route-occupant--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  background: var(--color-sun);
  font-size: 1.24rem;
  font-weight: 900;
  line-height: 1;
}

.trip-detail__route-occupant--driver {
  box-shadow: 0 0 0 1px var(--color-sun);
}

.trip-detail__route-occupant--more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  min-width: 2.2rem;
  height: 2.2rem;
  border: 2px solid var(--color-ink);
  border-radius: 999px;
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.trip-detail__route-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(0.4em + 0.7rem + 2px);
  bottom: 0;
  left: calc(var(--trip-route-rail-center) - 1px);
  width: 2px;
  background: var(--color-ink);
}

.trip-detail__route-row {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--trip-route-eta-width, 4rem);
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  row-gap: 0.08rem;
  align-items: baseline;
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0.35rem 0.2rem 0.2rem;
  box-sizing: border-box;
}

.trip-detail__route-navigate {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  margin-top: 0.05em;
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  grid-column: 2;
  grid-row: 2;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.trip-detail__route-navigate:hover,
.trip-detail__route-navigate:focus-visible {
  background: color-mix(in srgb, var(--color-sun) 42%, var(--color-paper));
  border-color: var(--color-ink);
  outline: none;
}

.trip-detail__route-navigate:active {
  transform: translate(1px, 1px);
}

.trip-detail__route-map-icon {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.55;
  flex-shrink: 0;
}

.trip-detail__route-navigate:hover .trip-detail__route-map-icon,
.trip-detail__route-navigate:focus-visible .trip-detail__route-map-icon {
  opacity: 1;
}

.trip-detail__route-body {
  display: grid;
  grid-template-rows: auto auto;
  grid-row: 1 / span 2;
  gap: 0.15rem;
  min-width: 0;
  grid-column: 1;
}

.trip-detail__route-name {
  min-width: 0;
  grid-row: 1;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.trip-detail__route-city {
  grid-column: 1;
  grid-row: 1;
  grid-row: 1 / span 2;
  align-self: start;
  min-width: 0;
  margin: 0.2rem 0 0;
  padding-top: 0.28rem;
  color: var(--color-muted);
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  hyphens: auto;
  overflow-wrap: normal;
}

.trip-detail__route-list--intercity .trip-detail__route-item {
  --trip-route-city-size: 7.25rem;
  grid-template-columns: var(--trip-route-city-size) var(--trip-route-rail-size) minmax(0, 1fr);
}

.trip-detail__route-list--intercity .trip-detail__route-item::before,
.trip-detail__route-list--intercity .trip-detail__route-occupants {
  grid-column: 2;
}

.trip-detail__route-list--intercity .trip-detail__route-item:not(:last-child)::after {
  left: calc(var(--trip-route-city-size) + 0.65rem + var(--trip-route-rail-center) - 1px);
}

.trip-detail__route-list--intercity .trip-detail__route-row {
  grid-column: 3;
}

@media (max-width: 35.99rem) {
  .trip-detail__route-list--intercity .trip-detail__route-item {
    --trip-route-city-size: 5.25rem;
  }
}

.trip-detail__route-eta {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  color: var(--color-muted);
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trip-detail__route-alias {
  min-width: 0;
  grid-row: 2;
  color: var(--color-muted);
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (min-width: 36rem) {
  .trip-detail__route-alias {
    text-align: right;
  }
}

.trip-detail > .eyebrow {
  margin-bottom: 0;
}

.trips-list {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-1) var(--space-2) var(--space-5);
  margin-top: var(--space-5);
  background: var(--color-sun);
}

.trips-list__offer {
  display: grid;
}

.trips-list__offer .button {
  width: 100%;
  justify-content: center;
}

.trips-list h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.trips-filters {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.trips-filters__route {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.trips-filters--create-route {
  display: grid;
  gap: var(--space-3);
}

.trips-filters--create-route > .trips-filters__leg-stack {
  flex: none;
  width: 100%;
}

.trips-filters--create-route .via-stops {
  margin: 0;
  /* Костыль (ADR-0418): запас под выпадающий список последнего слота
     «Добавить точку», чтобы он не наезжал на «Куда». Нужен только в
     развёрнутом виде — список и слоты вставки скрыты в свёрнутом. */
  padding-bottom: calc(var(--space-2) + 7rem + var(--space-1));
}

.trips-filters--create-route .via-stops.via-stops--collapsed {
  padding: 0.125rem var(--space-2);
}

.trips-filters__time {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
}

.trips-filters__time > .trips-filters__leg {
  flex: 0 0 auto;
  width: max-content;
}

.trips-filters__time .trips-filters__point--time {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 14rem;
  min-width: 0;
}

.trips-filters__point--time .trips-filters__clear-btn {
  /* No map sibling on the right — skip the divider used on route filters. */
  border-right: 0;
}

.trips-filters__point--time .trips-filters__input--datetime {
  border-right: 0;
}

.trips-filters__circles {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--space-2);
  margin: 0 0 0 auto;
  padding: 0;
  line-height: 1;
}

.trips-filters__circles[hidden] {
  display: none;
}

.trips-filters__circle {
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.25rem;
  padding: 0 0.45rem;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  transition: box-shadow 80ms ease, transform 80ms ease;
}

.trips-filters__circle input {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--color-ink);
  cursor: pointer;
}

.trips-filters__circle:has(input:checked) {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.trips-filters__circle-icon {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
}

.trips-filters__circle-name {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 700;
}

.trips-filters__input--datetime {
  position: relative;
  box-sizing: border-box;
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  border-right: 0;
  /* Keep native picker usable; avoid iOS focus zoom. */
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

/* Empty: hide native date/time mask; show “Сейчас” like Откуда/Куда. */
.trips-filters__input--datetime.is-empty,
.trips-filters__input--datetime.is-empty::-webkit-datetime-edit {
  color: transparent;
}

.trips-filters__datetime-placeholder {
  position: static;
  grid-area: 1 / 1;
  z-index: 1;
  display: flex;
  align-items: center;
  width: max-content;
  padding: 0.375rem 0.625rem;
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.trips-filters__input--datetime:not(.is-empty) ~ .trips-filters__datetime-placeholder {
  display: none;
}

/* Entire field opens the native calendar (same as the right-side icon). */
.trips-filters__input--datetime::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.trips-filters__leg-stack {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--space-1);
  /* width:0 + flex-basis:0 — equal halves; long chips/names must not widen the row */
  width: 0;
  max-width: 100%;
  min-width: 0;
}

.trips-filters__leg-stack > .trips-filters__leg {
  flex: 0 0 auto;
  width: 100%;
}

.trips-filters__leg {
  display: flex;
  flex: 1 1 0;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
}

.trips-filters__slot-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-height: 2.25rem;
  border-right: 2px solid var(--color-ink);
}

.trips-filters__slot-icon .trips-filters__map-icon {
  display: block;
}

.trips-filters__point {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
}

.trips-filters__input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.375rem 0.625rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-ink);
  background: transparent;
  border: 0;
  border-right: 2px solid var(--color-ink);
  border-radius: var(--radius);
  font: inherit;
  /* >= 16px: iOS Safari/PWA otherwise auto-zooms on focus and may not restore. */
  font-size: 1rem;
  font-weight: 700;
}

.trips-filters__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.trips-filters__input::-webkit-textfield-decoration-container {
  min-width: 0;
  max-width: 100%;
}

.trips-filters__input:focus {
  outline: none;
}

.trips-filters__input:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: -3px;
}

.trips-filters__clear-btn,
.trips-filters__nearby-btn,
.trips-filters__saved-point-btn,
.trips-filters__map-btn {
  flex-shrink: 0;
  width: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.trips-filters__nearby-btn {
  border-right: 2px solid var(--color-ink);
}

.trips-filters__saved-point-btn {
  border-right: 2px solid var(--color-ink);
}

/* Overlay clear on the field so long names keep full width and run under ×. */
.trips-filters__clear-btn {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to right,
    rgb(255 253 244 / 0%) 0%,
    rgb(255 253 244 / 92%) 45%,
    var(--color-paper) 100%
  );
  border-right: 2px solid var(--color-ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.trips-filters__clear-btn:hover,
.trips-filters__clear-btn:active,
.trips-filters__clear-btn:focus-visible,
.trips-filters__nearby-btn:hover,
.trips-filters__nearby-btn:active,
.trips-filters__nearby-btn:focus-visible,
.trips-filters__saved-point-btn:hover,
.trips-filters__saved-point-btn:active,
.trips-filters__saved-point-btn:focus-visible,
.trips-filters__map-btn:hover,
.trips-filters__map-btn:active,
.trips-filters__map-btn:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--color-sun);
}

.trips-filters__clear-btn:hover,
.trips-filters__clear-btn:active,
.trips-filters__clear-btn:focus-visible {
  background: linear-gradient(
    to right,
    rgb(255 222 89 / 0%) 0%,
    rgb(255 222 89 / 92%) 45%,
    var(--color-sun) 100%
  );
}

.trips-filters__clear-btn:focus-visible,
.trips-filters__nearby-btn:focus-visible,
.trips-filters__saved-point-btn:focus-visible,
.trips-filters__map-btn:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: -3px;
}

.trips-filters__nearby-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.trips-filters__map-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.check-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin: 0;
  color: var(--color-ink);
  line-height: 1;
  user-select: none;
  cursor: pointer;
}

.check-option input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--color-ink);
  cursor: pointer;
}

.check-option--compact {
  gap: 0;
}

.trips-filters__circle.check-option--compact {
  gap: 0.35rem;
}

.check-option--trip {
  margin-top: 0.25rem;
  padding: var(--space-1) var(--space-2);
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.trip-form__circles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.trip-form .check-option--trip {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  align-items: flex-start;
}

.trip-form .check-option--max-two-in-back {
  align-items: center;
}

.trip-form__circles[hidden] {
  display: none;
}

.check-option__icon {
  display: block;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.check-option__icon--rear-seats {
  width: 1.65rem;
  height: 1.1rem;
}

.trip-result__instant-booking,
.trip-detail__instant-booking {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--color-ink);
  cursor: pointer;
}

.trip-result__instant-booking-icon,
.trip-detail__instant-booking-icon {
  display: block;
  width: 1rem;
  height: 1rem;
}

.trip-result__max-two-in-back,
.trip-detail__max-two-in-back {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--color-ink);
  cursor: pointer;
}

.trip-result__max-two-in-back-icon,
.trip-detail__max-two-in-back-icon {
  display: block;
  width: 1.5rem;
  height: 1rem;
  object-fit: contain;
}

.trip-result__auto-booking,
.trip-detail__auto-booking {
  position: relative;
  font-weight: 700;
  color: var(--color-ink);
  white-space: nowrap;
  cursor: pointer;
}

.trip-result__trust-circle,
.trip-detail__trust-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-ink);
  cursor: pointer;
}

.trip-result__trust-circle-icon,
.trip-detail__trust-circle-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.point-combobox {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Resting view: keep the place name readable before showing the boarding alias.
   Match the input's line box (body 1.5) and center the row — baseline + 1.35 sat
   the overlay higher than a field without alias. */
.point-combobox__caption {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-sizing: border-box;
  min-width: 0;
  padding: 0.375rem 2.5rem 0.375rem 0.625rem;
  overflow: hidden;
  cursor: text;
  pointer-events: auto;
}

.point-combobox__caption[hidden] {
  display: none;
}

.point-combobox__caption-name {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  color: var(--color-ink);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.point-combobox__caption-alias {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.82em;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide the raw input text while the caption overlays it; keep the field full-width. */
.trips-filters__input--has-caption {
  color: transparent;
}

.point-combobox__list {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  /* Wider than the field when content needs it; JS clamps to the viewport. */
  box-sizing: border-box;
  min-width: 100%;
  width: max-content;
  max-width: min(28rem, calc(100vw - 1rem));
  max-height: 14rem;
  padding: 0;
  margin: var(--space-1) 0 0;
  overflow-y: auto;
  list-style: none;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

.point-combobox__option {
  display: grid;
  width: 100%;
  gap: 0.125rem;
  padding: var(--space-2);
  cursor: pointer;
  text-align: left;
  background: var(--color-paper);
  border: 0;
  border-bottom: 2px solid var(--color-ink);
  font: inherit;
}

.point-combobox__option:last-child {
  border-bottom: 0;
}

.point-combobox__option:hover,
.point-combobox__option:focus-visible,
.point-combobox__option--active {
  background: var(--color-sun);
  outline: none;
}

.point-combobox__option span,
.point-combobox__empty {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.point-combobox__empty {
  padding: var(--space-2);
}

.point-combobox__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  margin: 0;
  overflow-x: clip;
  list-style: none;
}

.point-combobox__chip {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  gap: 0.25rem;
  padding: 0.2rem 0.35rem 0.2rem 0.5rem;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
}

.point-combobox__chip-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-combobox__chip-summary {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.point-combobox__chip-summary:hover,
.point-combobox__chip-summary:focus-visible {
  background: var(--color-sun);
  outline: none;
}

.point-combobox__chip--summary,
.point-combobox__chip--collapse {
  background: var(--color-paper);
}

.point-combobox__chip-remove {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  color: var(--color-ink);
  cursor: pointer;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.point-combobox__chip-remove:hover,
.point-combobox__chip-remove:focus-visible {
  background: var(--color-sun);
  outline: none;
}

.point-map-marker.leaflet-div-icon {
  width: 18px !important;
  height: 18px !important;
  background: transparent;
  border: none;
  overflow: visible;
}

.point-map-marker__dot {
  display: block;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  border-radius: 50%;
}

.point-map-marker--oblast .point-map-marker__dot {
  background: var(--color-pink);
}

.point-map-marker--oblast .point-map-marker__label {
  background: var(--color-pink);
}

.point-map-marker--oblast.point-map-marker--selected .point-map-marker__dot {
  background: var(--color-pink);
  border-color: var(--color-ink);
  box-shadow: 0 0 0 2px var(--color-ink);
}

.point-map-marker--oblast-member .point-map-marker__dot {
  background: color-mix(in srgb, var(--color-pink) 55%, var(--color-paper));
}

.point-map-marker--oblast-member .point-map-marker__label {
  background: color-mix(in srgb, var(--color-pink) 35%, var(--color-paper));
}

.oblast-cities {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.oblast-cities__title {
  margin: 0;
  font-size: 1rem;
}

.oblast-cities__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oblast-cities__empty {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.oblast-cities__item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.35rem 0.2rem 0.5rem;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.8125rem;
  font-weight: 700;
}

.oblast-cities__add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: start;
}

.point-map-marker__occupants {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
}

.point-map-marker__occupant-arrived {
  position: absolute;
  right: -0.2rem;
  bottom: -0.15rem;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--color-ink);
  border-radius: 50%;
  background: #6ee7a8;
  box-sizing: border-box;
  pointer-events: none;
}

.point-map-marker__occupant-arrived img {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
}

.point-map-marker__occupant {
  display: block;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  object-fit: cover;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-paper);
}

.point-map-marker__occupant--driver {
  box-shadow: 0 0 0 1px var(--color-sun);
}

.point-map-marker__occupant-more {
  position: absolute;
  right: -0.55rem;
  bottom: -0.25rem;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.2rem;
  border: 2px solid var(--color-ink);
  border-radius: 999px;
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.point-map-marker--occupants.point-map-marker--selected .point-map-marker__occupant {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 2px var(--color-blue);
}

.point-map-marker--pending-review .point-map-marker__dot {
  background: var(--color-blue);
}

.point-map-marker--pending-review .point-map-marker__label {
  background: color-mix(in srgb, var(--color-blue) 35%, var(--color-paper));
}

.point-map-marker--personal .point-map-marker__dot {
  background: color-mix(in srgb, var(--color-muted) 22%, var(--color-paper));
  border-color: color-mix(in srgb, var(--color-muted) 65%, var(--color-ink));
}

.point-map-marker--personal .point-map-marker__label {
  color: var(--color-muted);
  font-weight: 600;
  background: color-mix(in srgb, var(--color-muted) 12%, var(--color-paper));
  border-color: color-mix(in srgb, var(--color-muted) 45%, var(--color-ink));
}

.point-map-marker--personal.point-map-marker--selected .point-map-marker__dot {
  background: color-mix(in srgb, var(--color-muted) 35%, var(--color-paper));
  border-color: var(--color-blue);
  box-shadow: 0 0 0 2px var(--color-blue);
}

.point-map-marker--personal.point-map-marker--selected .point-map-marker__label {
  color: var(--color-ink);
  font-weight: 700;
}

.point-map-marker--focus .point-map-marker__dot {
  background: var(--color-pink);
  border-color: var(--color-ink);
  box-shadow: 0 0 0 2px var(--color-ink);
}

.point-map-marker--focus.point-map-marker--selected .point-map-marker__dot {
  background: var(--color-pink);
  border-color: var(--color-ink);
}

@keyframes trip-stop-marker-pulse {
  0% {
    box-shadow:
      0 0 0 2px var(--color-ink),
      0 0 0 0 color-mix(in srgb, var(--color-pink) 55%, transparent);
  }
  70% {
    box-shadow:
      0 0 0 2px var(--color-ink),
      0 0 0 16px transparent;
  }
  100% {
    box-shadow:
      0 0 0 2px var(--color-ink),
      0 0 0 0 transparent;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .point-map-marker--focus .point-map-marker__dot {
    animation: trip-stop-marker-pulse 1.8s ease-out infinite;
  }
}

.point-map-marker--focus .point-map-marker__label {
  font-weight: 800;
  background: var(--color-pink);
}

.point-map-marker__trip-count {
  position: absolute;
  top: -0.45rem;
  right: -0.55rem;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.2rem;
  box-sizing: border-box;
  color: var(--color-paper);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  border: 1.5px solid var(--color-ink);
  border-radius: 999px;
  pointer-events: none;
  box-shadow: 1px 1px 0 var(--color-ink);
}

.point-map-marker__trip-count--available {
  background: var(--color-success);
}

.point-map-marker__trip-count--unavailable {
  background: var(--color-error);
}

.point-map-marker__label {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 7.5rem;
  padding: 0.15rem 0.35rem;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--color-paper);
  border: 1.5px solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

/* Label is part of the marker hit target (do not set pointer-events: none). */
.leaflet-interactive .point-map-marker__label {
  cursor: pointer;
}

.point-map-marker--selected .point-map-marker__label {
  font-weight: 700;
  background: var(--color-sun);
}

/* `/places`: illustrative walk catchment around Place (~400 m, ADR-0473) */
.place-catchment-circle,
.point-sensitivity-circle {
  pointer-events: none;
}

/* `/places` edit overlay: logical Place (centroid) vs boarding sides */
.place-edit-marker.leaflet-div-icon {
  width: 22px !important;
  height: 22px !important;
  background: transparent;
  border: none;
  overflow: visible;
}

.place-edit-marker__shape {
  display: block;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  background: var(--color-pink);
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  transform: rotate(45deg);
}

.place-edit-marker--pending-review .place-edit-marker__shape {
  background: var(--color-blue);
}

.place-edit-marker--pending-review .place-edit-marker__label {
  background: color-mix(in srgb, var(--color-blue) 40%, var(--color-paper));
}

.place-edit-marker--personal .place-edit-marker__shape {
  background: color-mix(in srgb, var(--color-muted) 30%, var(--color-paper));
  border-color: color-mix(in srgb, var(--color-muted) 65%, var(--color-ink));
}

.place-edit-marker--personal .place-edit-marker__label {
  color: var(--color-muted);
  font-weight: 600;
  background: color-mix(in srgb, var(--color-muted) 12%, var(--color-paper));
  border-color: color-mix(in srgb, var(--color-muted) 45%, var(--color-ink));
}

.place-edit-marker__label {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 9rem;
  padding: 0.15rem 0.4rem;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--color-pink);
  border: 1.5px solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

.boarding-side-marker.leaflet-div-icon {
  width: 18px !important;
  height: 18px !important;
  background: transparent;
  border: none;
  overflow: visible;
}

.boarding-side-marker__dot {
  display: block;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  background: var(--color-blue);
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  box-shadow: 1px 1px 0 var(--color-ink);
}

.boarding-side-marker--selected .boarding-side-marker__dot {
  background: var(--color-sun);
  border-color: var(--color-ink);
  box-shadow: 0 0 0 2px var(--color-blue), 1px 1px 0 var(--color-ink);
}

.boarding-side-marker__label {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 7.5rem;
  padding: 0.15rem 0.35rem;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--color-paper);
  border: 1.5px solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

.leaflet-interactive .boarding-side-marker__label,
.leaflet-interactive .place-edit-marker__label {
  cursor: pointer;
}

.boarding-side-marker--selected .boarding-side-marker__label {
  font-weight: 700;
  background: var(--color-sun);
}

.point-map-cluster {
  position: relative;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
}

.point-map-cluster > span:first-child {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-ink);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  background: var(--color-sun);
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  box-shadow: var(--shadow-small);
}

.point-map-cluster__trip-count {
  position: absolute;
  top: -0.2rem;
  right: -0.15rem;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.2rem;
  box-sizing: border-box;
  color: var(--color-paper);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  border: 1.5px solid var(--color-ink);
  border-radius: 999px;
  pointer-events: none;
  box-shadow: 1px 1px 0 var(--color-ink);
}

.point-map-cluster__trip-count--available {
  background: var(--color-success);
}

.point-map-cluster__trip-count--unavailable {
  background: var(--color-error);
}

.point-map-cluster__label {
  position: absolute;
  left: calc(100% + 0.35rem);
  top: 50%;
  transform: translateY(-50%);
  max-width: 8.5rem;
  padding: 0.15rem 0.35rem;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--color-paper);
  border: 1.5px solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

/* Place-name label is part of the cluster hit target (same as point labels). */
.leaflet-interactive .point-map-cluster__label {
  pointer-events: auto;
}

.point-map-cluster--medium > span:first-child {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 0.95rem;
}

.point-map-cluster--large > span:first-child {
  width: 3rem;
  height: 3rem;
  font-size: 1.05rem;
  background: var(--color-blue);
  color: var(--color-paper);
}

.point-map-cluster--selected > span:first-child {
  background: var(--color-sun);
  color: var(--color-ink);
  box-shadow: 2px 2px 0 var(--color-ink);
}

.point-map-cluster--selected .point-map-cluster__label {
  font-weight: 700;
  background: var(--color-sun);
}

.point-map-user-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  padding: 0 0 4px;
  color: var(--color-ink);
  background: var(--color-sun);
  border: 2px solid var(--color-ink);
  border-radius: 999px 999px 999px 4px;
  box-shadow: var(--shadow-small);
  pointer-events: none;
}

.point-map-user-marker__icon {
  display: block;
  width: 18px;
  height: 18px;
}

.point-map.point-map--area-select,
.point-map.point-map--area-select .leaflet-container {
  cursor: crosshair;
  touch-action: none;
}

.trips-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.trips-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-2);
}

.trips-card h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.trips-search {
  background: var(--color-sun);
}

.trips-create {
  background: var(--color-blue);
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-2);
  margin-top: var(--space-5);
}

.trips-create h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.trip-form {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.number-stepper {
  display: grid;
  grid-template-columns: 3.25rem minmax(4rem, 1fr) 3.25rem;
  width: min(100%, 12rem);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
}

.number-stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  margin: 0;
  padding: 0;
  color: var(--color-ink);
  background: var(--color-sun);
  border: none;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.number-stepper__btn:hover:not(:disabled) {
  background: var(--color-blue);
}

.number-stepper__btn:active:not(:disabled) {
  background: var(--color-pink);
}

.number-stepper__btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.field .number-stepper input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.25rem;
  border: none;
  border-inline: var(--border-width) solid var(--color-ink);
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  -moz-appearance: textfield;
}

.field .number-stepper input::-webkit-outer-spin-button,
.field .number-stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.via-stops {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
}

.via-stops__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.via-stops__title {
  margin: 0;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.via-stops__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.125rem;
}

.via-stops__toggle,
.via-stops__clear {
  flex: 0 0 auto;
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.via-stops__clear {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.via-stops__toggle[hidden],
.via-stops__clear[hidden] {
  display: none;
}

.via-stops__toggle:hover,
.via-stops__toggle:active,
.via-stops__toggle:focus-visible,
.via-stops__clear:hover,
.via-stops__clear:active,
.via-stops__clear:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--color-sun);
}

.via-stops__toggle-icon {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.via-stops__toggle[aria-expanded="true"] .via-stops__toggle-icon {
  transform: rotate(180deg);
}

.via-stops__hint,
.via-stops__status {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.via-stops__hint[hidden],
.via-stops__route[hidden] {
  display: none;
}

.via-stops__route {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.via-stops__route--sorting {
  user-select: none;
}

.via-stops__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.3rem 0.45rem;
  border: 2px solid var(--color-ink);
  background: color-mix(in srgb, var(--color-ink) 5%, var(--color-paper));
  touch-action: none;
}

/* SortableJS: original slot while the mirror is dragged. */
.via-stops__item--ghost {
  opacity: 0.35;
  background: color-mix(in srgb, var(--color-sun) 40%, var(--color-paper));
  border-style: dashed;
}

.via-stops__item--chosen {
  background: var(--color-sun);
}

/* SortableJS fallback mirror (forceFallback). */
.via-stops__item--drag {
  opacity: 1;
  background: var(--color-sun);
  box-shadow: 3px 3px 0 var(--color-ink);
  cursor: grabbing;
}

.via-stops__handle {
  flex: 0 0 auto;
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  cursor: grab;
  touch-action: none;
}

.via-stops__handle:active,
.via-stops__handle.is-pressed {
  cursor: grabbing;
}

.via-stops__handle-bars {
  display: block;
  width: 0.75rem;
  height: 0.6rem;
  background:
    linear-gradient(var(--color-ink), var(--color-ink)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--color-ink), var(--color-ink)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--color-ink), var(--color-ink)) 0 100% / 100% 2px no-repeat;
}

.via-stops__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.25rem;
  row-gap: 0.05rem;
}

.via-stops__name {
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.via-stops__alias {
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.78em;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.via-stops__remove {
  flex: 0 0 auto;
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
}

.via-stops__insert {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  border: 1px dashed color-mix(in srgb, var(--color-ink) 45%, transparent);
  background: color-mix(in srgb, var(--color-ink) 3%, var(--color-paper));
}

.via-stops__insert-trigger {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 1.875rem;
  margin: 0;
  padding: 0.2rem 0.5rem;
  border: 0;
  border-right: 1px dashed color-mix(in srgb, var(--color-ink) 45%, transparent);
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.via-stops__insert-trigger:hover,
.via-stops__insert-trigger:focus-visible {
  color: var(--color-ink);
  background: var(--color-sun);
  outline: none;
}

.via-stops__insert-trigger:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: -3px;
}

.via-stops__insert-map {
  flex-shrink: 0;
  width: 1.875rem;
  min-height: 1.875rem;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.via-stops__insert-map:hover,
.via-stops__insert-map:active,
.via-stops__insert-map:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--color-sun);
}

.via-stops__add {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  margin: 0;
}

.via-stops__add .trips-filters__leg {
  margin: 0;
  border: 0;
  background: transparent;
}

.via-stops__add .trips-filters__input {
  /* Keep 1rem: iOS otherwise auto-zooms on focus. */
  min-height: 2rem;
  border-right: 1px dashed color-mix(in srgb, var(--color-ink) 45%, transparent);
}

.via-stops__add .trips-filters__map-btn {
  width: 2rem;
  min-height: 2rem;
}

/* Parked outside the route spine between re-renders — never show there. */
.via-stops > .via-stops__add {
  display: none;
}

.route-preview {
  position: relative;
  z-index: 0;
  margin-block: var(--space-3) 0;
}

/* Catalog / stop point markers on create/edit preview (ADR-0467 / ADR-0468). */
.route-preview .point-map-marker.leaflet-interactive {
  cursor: pointer;
}

.route-preview[hidden] {
  display: none;
}

.route-preview__map {
  min-height: 14rem;
  height: 14rem;
}

/* /trips/new: taller route preview (2× compact height). */
.route-preview--large .route-preview__map {
  min-height: 28rem;
  height: 28rem;
}

.trip-detail__route-map {
  margin-block: 0;
}

.trip-car-location-marker {
  display: grid;
  place-items: center;
  width: 38px !important;
  height: 38px !important;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 3px 3px 0 var(--color-ink);
}

.trip-car-location-marker img {
  width: 24px;
  height: 24px;
}

.trip-car-location-marker--preview {
  cursor: grab;
}

.trip-car-location-marker--preview:active {
  cursor: grabbing;
}

.waiting-push-count {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3);
  border: 3px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 4px 4px 0 var(--color-ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.waiting-push-count__icon {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
}

/*
 * min-block-size keeps the list as tall as the loading skeleton even with
 * few/zero results, so the tab bar doesn't jump once real content replaces it.
 * align-content: start keeps short lists top-aligned instead of stretching
 * the (few) result rows to fill the reserved height.
 */
.trip-results {
  --trip-results-min-block: max(20rem, calc(100dvh - var(--app-tabbar-offset, 0px) - 16rem));
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
  min-block-size: var(--trip-results-min-block);
}

.trip-results__loading {
  display: grid;
  grid-template-rows: repeat(3, minmax(6.5rem, 1fr));
  gap: var(--space-2);
  min-block-size: var(--trip-results-min-block);
}

.trip-results__skeleton {
  display: block;
  border: 2px solid var(--color-ink);
  background:
    linear-gradient(var(--color-paper), var(--color-paper)) 1rem 1rem / 42% 0.9rem no-repeat,
    linear-gradient(var(--color-paper), var(--color-paper)) 1rem 3rem / 72% 0.7rem no-repeat,
    linear-gradient(var(--color-paper), var(--color-paper)) 1rem 4.4rem / 56% 0.7rem no-repeat,
    color-mix(in srgb, var(--color-sun) 45%, var(--color-paper));
}

@keyframes trip-result-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trip-results__item {
  opacity: 0;
  animation: trip-result-enter 240ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--stagger-index, 0) * 40ms);
}

.trip-result {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
}

.trip-result--link {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2);
  color: inherit;
  text-decoration: none;
}

.trip-result--link:hover,
.trip-result--link:focus-visible {
  background: var(--color-sun);
}

/* Person links live inside the trip <a>; don't paint the whole card as "selected". */
.trip-result--link:has(.user-card-link:hover),
.trip-result--link:has(.user-card-link:focus-visible),
.trip-result--link:has(.user-card-link:active) {
  background: var(--color-paper);
}

.trip-result--link:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 2px;
}

.trip-result--ambassador,
.trip-result--ambassador.trip-result--link {
  position: relative;
  overflow: visible;
  background: var(--color-paper-ambassador);
  border-width: var(--border-width);
  box-shadow: 4px 4px 0 var(--color-ink);
}

.trip-result--ambassador.trip-result--link:has(.user-card-link:hover),
.trip-result--ambassador.trip-result--link:has(.user-card-link:focus-visible),
.trip-result--ambassador.trip-result--link:has(.user-card-link:active) {
  background: var(--color-paper-ambassador);
}

.trip-result__ambassador-crown {
  position: absolute;
  top: -0.4rem;
  left: -0.4rem;
  z-index: 2;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.16rem;
  box-sizing: border-box;
  border: 2px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 2px 2px 0 var(--color-ink);
  transform: rotate(-28deg);
  transform-origin: center center;
  pointer-events: none;
}

.admin-trips-page .trip-result--status-rail.trip-result--ambassador,
.trips-mine-page .trip-result--status-rail.trip-result--ambassador {
  overflow: visible;
}

.trip-result__route {
  display: block;
  min-width: 0;
  color: var(--color-ink);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.trip-results__empty {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.trip-result__details {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.35rem;
  align-items: flex-end;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.trip-result__meta-item {
  display: inline-flex;
  align-items: flex-end;
  min-height: 1.5rem;
}

.trip-departure {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  gap: 0.4rem;
  align-items: flex-end;
  min-height: 1.5rem;
}

.trip-departure__hint {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: min(19rem, 80vw);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--color-ink);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

.trip-departure__hint[hidden] {
  display: none !important;
}

.trip-departure__time-accent,
.trip-departure__time {
  display: inline-block;
  font-family: var(--font-time);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.trip-departure__time-accent {
  color: var(--color-ink);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.trip-departure__date {
  display: inline-block;
  color: var(--color-ink);
  font-family: var(--font-date-accent);
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
  white-space: nowrap;
}

.trip-departure__weekday {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trip-detail__meta > .trip-departure {
  gap: 0.6rem;
  min-height: 2.35rem;
}

.trip-detail__meta > .trip-departure .trip-departure__time-accent {
  font-size: 2.35rem;
}

.trip-detail__meta > .trip-departure .trip-departure__date {
  font-size: 2rem;
}

.trip-detail__meta > .trip-departure .trip-departure__time {
  font-size: 1.2rem;
}

.trip-departure--later .trip-departure__time {
  color: var(--color-muted);
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.trip-result--link .trip-result__details > * + *::before {
  content: "·";
  display: inline-flex;
  align-items: flex-end;
  align-self: flex-end;
  margin-inline: 0.45rem;
  color: var(--color-muted);
  font-weight: 700;
  line-height: 1;
}

.trip-result__description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@keyframes trip-seats-change {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.08);
    background: var(--color-sun);
  }

  100% {
    transform: scale(1);
  }
}

.trip-detail__seats {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding-inline: 0.15em;
  font-weight: 800;
  color: var(--color-ink);
}

.trip-detail__seats--changed {
  animation: trip-seats-change 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes passenger-enter {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trip-detail__passenger--enter {
  animation: passenger-enter 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}

@keyframes booking-contact-enter {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.booking-contact--enter {
  animation: booking-contact-enter 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.trip-result__driver {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.trip-result__driver-body {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.trip-result__people {
  display: grid;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.trip-result__driver-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  min-width: 0;
}

.trip-result__person-name {
  min-width: 0;
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.trip-result__driver .trust-affiliation-label,
.trip-result__passenger .trust-affiliation-label {
  margin-left: 0;
  text-transform: uppercase;
}

.trip-result__passengers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.5rem;
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.3;
}

.trip-result__pending-approval {
  grid-column: 1 / -1;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
}

.trip-result__passenger-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}

.trip-result__avatar-host {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  overflow: visible;
}

.trip-result__avatar-crown {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 1;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0.12rem;
  border: 2px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 2px 2px 0 var(--color-ink);
  pointer-events: none;
}

.trip-result__avatar-host:has(.trip-result__avatar--driver) .trip-result__avatar-crown,
.trip-result__avatar-host:has(.trip-result__avatar--lg) .trip-result__avatar-crown {
  width: 1.25rem;
  height: 1.25rem;
}

.trip-result__avatar {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
}

.trip-result__avatar--driver {
  width: 4.5rem;
  height: 4.5rem;
}

.trip-result__avatar--passenger {
  width: 4.5rem;
  height: 4.5rem;
}

.trip-result__avatar--lg {
  width: 5rem;
  height: 5rem;
}

@media (min-width: 34rem) {
  .trip-result__people {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }

  .trip-result__passengers {
    align-content: center;
  }
}

.trip-detail {
  display: grid;
  gap: var(--space-4);
}

.trip-archived {
  display: grid;
  gap: var(--space-3);
  max-width: 42rem;
}

.trip-archived > p {
  margin: 0;
}

.trip-archived > .button {
  justify-self: start;
  margin-top: var(--space-2);
}

.trip-detail__body {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.trip-detail__meta {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.trip-detail__details {
  align-items: flex-end;
  row-gap: 0.4rem;
  font-size: 0.875rem;
}

.trip-detail__details > * + *::before {
  content: "·";
  display: inline-flex;
  align-items: flex-end;
  align-self: flex-end;
  margin-inline: 0.45rem;
  color: var(--color-muted);
  font-weight: 700;
  line-height: 1;
}

.trip-detail__description {
  margin: 0;
  padding: var(--space-2);
  border: 3px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 3px 3px 0 var(--color-ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.trip-detail__car {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  min-width: 0;
}

.trip-detail__car-meta {
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.trip-detail__car .ru-plate--compact {
  min-height: 1.55rem;
  font-size: 0.75rem;
}

.trip-detail__car .ru-plate--compact .ru-plate__body {
  padding: 0.1rem 0.35rem;
  font-size: 0.8rem;
}

.trip-detail__car .ru-plate--compact .ru-plate__region {
  min-width: 1.7rem;
  padding: 0.05rem 0.2rem 0.1rem;
}

.trip-detail__car .ru-plate--compact .ru-plate__region-code {
  font-size: 0.68rem;
}

.trip-detail__car .ru-plate--compact .ru-plate__rus {
  font-size: 0.34rem;
}

.trip-detail__car .ru-plate--compact .ru-plate__flag {
  width: 0.62rem;
  height: 0.4rem;
}

.trip-car-photo {
  display: grid;
  place-items: center;
  /* ~250px height at full width of the 4:3 frame (333×250). */
  width: min(100%, 20.833rem);
  aspect-ratio: 4 / 3;
  border: 3px solid var(--color-ink);
  background: var(--color-paper);
  overflow: hidden;
}

.trip-car-photo-section {
  display: grid;
  gap: var(--space-1);
}

.trip-car-photo-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.trip-car-photo-section__title {
  margin: 0;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.trip-car-photo-section__toggle {
  flex: 0 0 auto;
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
}

.trip-car-photo-section__toggle-icon {
  transition: transform 0.15s ease;
}

.trip-car-photo-section__toggle[aria-expanded="true"] .trip-car-photo-section__toggle-icon {
  transform: rotate(180deg);
}

.trip-car-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-car-photo--placeholder {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--color-paper),
      var(--color-paper) 12px,
      #ececec 12px,
      #ececec 24px
    );
}

.garage-car-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.garage-car-actions > .button,
.garage-car-actions > .form-action,
.garage-car-actions > form {
  flex: 1 1 8.5rem;
  margin: 0;
}

.garage-car-actions > form {
  display: flex;
}

.garage-car-actions .button {
  width: 100%;
}

.garage-car-photo__preview {
  width: min(100%, 30rem);
  aspect-ratio: 4 / 3;
  margin: 0;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  overflow: hidden;
}

.garage-car-photo__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-detail__section {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 3px solid var(--color-ink);
}

.trip-detail__stats {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}

.trip-detail__section h2 {
  margin: 0;
  font-size: 1.125rem;
}

.trip-detail__section .booking-contact__actions {
  margin-top: 0;
}

.trip-detail__person,
.trip-detail__passenger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: center;
  min-width: 0;
  overflow: visible;
}

.trip-detail__passenger:has(.trip-detail__cancel-booking),
.trip-detail__passenger:has(.trip-detail__booking-decide) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.trip-detail__cancel-booking,
.trip-detail__booking-decide {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  margin: 0;
}

.trip-detail__booking-decide {
  display: flex;
  gap: var(--space-2);
}

.trip-detail__booking-confirm {
  min-width: 2.5rem;
  padding-inline: 0.55rem;
  background: #1f9d55;
  border-color: var(--color-ink);
  color: #fff;
}

.trip-detail__booking-confirm:hover,
.trip-detail__booking-confirm:focus-visible {
  background: #178a48;
}

.trip-detail__cancel-booking,
.trip-detail__booking-reject {
  min-width: 2.5rem;
  padding-inline: 0.55rem;
  color: #b42318;
}

.trip-detail__pending-badge {
  display: inline-block;
  width: fit-content;
  padding: 0.15rem 0.45rem;
  border: 2px solid var(--color-ink);
  background: #fff4ce;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.trip-detail__pending-approval {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
}

.trip-detail__passenger-phone {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}

.trip-detail__arrival {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.trip-detail__coordination-time {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-ink);
  white-space: nowrap;
}

.trip-detail__geo-badge {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.1rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.trip-detail__geo-badge img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.trip-detail__geo-hint {
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--shadow-small);
}

.trip-detail__person-info {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding-top: 0.1rem;
}

.trip-detail__person-name {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration: none;
}

.trip-detail__person-meta {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.3;
}

.trip-detail__social {
  margin-top: 0.15rem;
}

.trip-detail__passengers {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trip-detail__actions {
  display: grid;
  gap: var(--space-2);
}

.trip-detail__coordination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-block: var(--space-3);
}

.trip-detail__coordination > .button:not([hidden]) {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.trip-detail__coordination:has(> #trip-driver-ready:not([hidden]) + #trip-driver-car-location:not([hidden]))
  > #trip-driver-ready:not([hidden]),
.trip-detail__coordination:has(> #trip-driver-ready:not([hidden]) + #trip-driver-car-location:not([hidden]))
  > #trip-driver-car-location:not([hidden]) {
  grid-column: auto;
}

.trip-detail__coordination-row,
.trip-detail__coordination-hint {
  grid-column: 1 / -1;
}

.trip-detail__coordination-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.trip-detail__coordination-row .button {
  width: 100%;
  min-width: 0;
}

.trip-detail__coordination-row[hidden] {
  display: none;
}

.trip-detail__coordination-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.trip-detail__segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.trip-detail__segment-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 28rem) {
  .trip-detail__segment {
    grid-template-columns: 1fr;
  }
}

.trip-detail__segment[hidden] {
  display: none;
}

.trip-detail__passenger-segment {
  font-weight: 700;
  color: var(--color-ink);
}

.trip-detail__actions:not(:has(:not([hidden]))) {
  display: none;
}

@media (max-width: 22.5rem) {
  .trip-detail__passenger:has(.trip-detail__cancel-booking),
  .trip-detail__passenger:has(.trip-detail__booking-decide) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .trip-detail__cancel-booking,
  .trip-detail__booking-decide {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .trip-detail__cancel-booking {
    justify-self: end;
  }

  .trip-detail__booking-decide {
    justify-self: stretch;
    justify-content: stretch;
  }

  .trip-detail__booking-decide .button {
    flex: 1;
  }
}

.trip-map-dialog {
  /* Same max width as `.container`; ~10% viewport inset top/bottom (dvh — % margins
     resolve against width). Backdrop is denser so filter × does not read through. */
  width: min(100% - 2rem, 72rem);
  height: 80dvh;
  max-height: 80dvh;
  margin-block: 10dvh;
  margin-inline: auto;
  padding: 0;
  overflow: auto;
  /* Only when open — plain `display: flex` overrides UA `dialog:not([open]){display:none}`. */
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-large);
}

.trip-map-dialog[open] {
  display: flex;
  flex-direction: column;
}

.trip-map-dialog::backdrop {
  background: rgb(23 23 23 / 72%);
}

.trip-map-dialog__header,
.trip-map-create {
  flex-shrink: 0;
}

.trip-map-dialog__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title done";
  align-items: center;
  column-gap: var(--space-2);
  row-gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
}

/*
 * Narrow: title + «Готово» keep the first row (full title visible);
 * toolbar / filter use following rows so large icons do not squeeze the heading.
 */
.trip-map-dialog__header:has(.trip-map-dialog__toolbar:not([hidden])) {
  grid-template-areas:
    "title done"
    "toolbar toolbar";
}

.trip-map-dialog__header:has(.trip-map-dialog__to-filters:not([hidden])) {
  grid-template-areas:
    "title done"
    "filters filters";
}

.trip-map-dialog__header:has(.trip-map-dialog__toolbar:not([hidden])):has(
  .trip-map-dialog__to-filters:not([hidden])
) {
  grid-template-areas:
    "title done"
    "toolbar toolbar"
    "filters filters";
}

.trip-map-dialog__title {
  grid-area: title;
  margin: 0;
  color: var(--color-ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.trip-map-dialog__done {
  grid-area: done;
  flex-shrink: 0;
}

.trip-map-dialog__toolbar {
  grid-area: toolbar;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.trip-map-dialog__to-filters {
  grid-area: filters;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
}

.trip-map-dialog__header .button--bare.button--icon {
  width: 3.25rem;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.35rem;
  /* Keep quota badge inside the dialog (parent has overflow:auto). */
  overflow: visible;
}

.trip-map-dialog__header .button-badge {
  top: 0;
  right: 0;
}

.trip-map-dialog__header .button--bare .button__icon {
  width: 2rem;
  height: 2rem;
}

.trip-map-dialog__to-filters[hidden],
.trip-map-dialog__toolbar[hidden] {
  display: none;
}

/* Wide enough for heading + large toolbar + «Готово» on one row. */
@media (min-width: 36rem) {
  .trip-map-dialog__header:has(.trip-map-dialog__toolbar:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "title toolbar done";
  }

  .trip-map-dialog__header:has(.trip-map-dialog__toolbar:not([hidden])):has(
    .trip-map-dialog__to-filters:not([hidden])
  ) {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "title toolbar done"
      "filters filters filters";
  }
}

.trip-map-dialog__only-trips {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  user-select: none;
  cursor: pointer;
}

.trip-map-dialog__only-trips span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-map-dialog__only-trips input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-ink);
  cursor: pointer;
}

.button--bare {
  gap: 0.35rem;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border: none;
  background: transparent;
  box-shadow: none;
}

.button--bare:hover,
.button--bare:active,
.button--bare.is-pressed {
  transform: none;
  box-shadow: none;
  background: rgb(23 23 23 / 6%);
}

.button--bare.button--icon {
  width: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem;
}

/* Flex grows the slot; Leaflet root is absolutely filled (do not put height:0 on it). */
.trip-map-dialog__map-slot {
  position: relative;
  flex: 1 1 0;
  min-height: 16rem;
}

.trip-map-dialog .point-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  border-block: var(--border-width) solid var(--color-ink);
  box-shadow: none;
}

.trip-map-dialog.trip-map-dialog--area-select {
  touch-action: none;
  overscroll-behavior: contain;
}

/* Locate overlay on map (trip dialog, create/edit preview, /trips/{id}, /places). OSM attribution is bottom-left (UI-132). */
.map-locate {
  position: absolute;
  right: var(--space-1);
  bottom: var(--space-1);
  z-index: 1000;
  margin: 0;
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

.map-locate:hover,
.map-locate:active,
.map-locate:focus-visible {
  background: var(--color-sun);
}

.map-locate .button__icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Full-bleed bar under the map — keep vertical footprint small (UI-187 / ADR-0433). */
.trip-map-create {
  display: block;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: none;
  border-block-start: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: none;
}

.trip-map-create__bar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto auto;
  gap: var(--space-2);
  align-items: end;
}

.trip-map-create__hint {
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.trip-map-create__field {
  gap: 0.15rem;
}

.trip-map-create__field label {
  font-size: 0.75rem;
  line-height: 1.2;
}

.trip-map-create__field input {
  min-height: 2.35rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Personal (door-to-door) «Откуда»/«Куда»: address filled by reverse-geocode, not typed (ADR-0420 addendum). */
#trip-map-create-name:read-only {
  background: var(--color-cloud, #f1f1f1);
  color: var(--color-muted);
  cursor: default;
}

.trip-map-create__delete {
  flex-shrink: 0;
  background: var(--color-paper);
  border: var(--border-width) solid var(--color-ink);
}

.trip-map-create__delete:hover,
.trip-map-create__delete:active,
.trip-map-create__delete:focus-visible {
  background: var(--color-pink);
}

.trip-map-create__delete:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--color-paper);
}

.trip-map-create__delete:disabled:hover,
.trip-map-create__delete:disabled:active {
  background: var(--color-paper);
  transform: none;
}

.trip-map-create__delete .button__icon {
  width: 1.1rem;
  height: 1.25rem;
}

.trip-map-create__save {
  justify-self: end;
}

@media (max-width: 40rem) {
  .trip-map-create__bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name name"
      "alias delete"
      "save save";
  }

  .trip-map-create__field:first-child {
    grid-area: name;
  }

  .trip-map-create__field:nth-child(2) {
    grid-area: alias;
  }

  .trip-map-create__delete {
    grid-area: delete;
  }

  .trip-map-create__save {
    grid-area: save;
    justify-self: stretch;
  }

  .trip-map-create__save .button {
    width: 100%;
  }
}

.point-combobox__option--create {
  background: var(--color-sun);
  font-weight: 800;
}

.point-combobox__option--city {
  background: color-mix(in srgb, var(--color-sun) 35%, var(--color-paper));
  border-left: 6px solid var(--color-sun);
}

.point-combobox__option--oblast {
  background: color-mix(in srgb, var(--color-pink) 35%, var(--color-paper));
  border-left: 6px solid var(--color-pink);
}

.point-combobox__city {
  display: flex;
  align-items: center;
  align-self: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  /* Empty slot is in HTML from first paint; keep chip height so the field does not jump. */
  min-height: calc(1.65rem + 4px);
}

.trip-form .point-combobox__city[aria-hidden="true"] {
  display: none;
}

.point-combobox__city-chip {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: calc(1.65rem + 4px);
  overflow: hidden;
  padding: 0.2rem 0.35rem 0.2rem 0.5rem;
  color: var(--color-ink);
  background: var(--color-blue);
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2;
}

.point-combobox__city-chip--oblast {
  background: var(--color-pink);
}

.trip-form .point-combobox__city-chip {
  background: var(--color-sun);
}

.trip-price {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  padding-inline: 0.375rem;
  color: var(--color-ink);
  border: 2px solid var(--color-ink);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.trip-price--free {
  background: var(--color-pink);
}

.trip-price--fuel {
  background: var(--color-sun);
}

.trip-price[tabindex="0"]:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.trip-status {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  padding-inline: 0.375rem;
  color: var(--color-ink);
  border: 2px solid var(--color-ink);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.trip-status--departed {
  background: var(--color-blue);
}

.trip-status--arrived {
  background: #6ee7a8;
}

.trip-status--active {
  background: var(--color-sun);
}

.trip-status--en-route {
  background: var(--color-blue);
}

.trip-status--completed {
  background: var(--color-paper);
}

.trip-status--cancelled {
  background: var(--color-pink);
  color: var(--color-ink);
}

.trip-status--full {
  background: var(--color-pink);
  color: var(--color-ink);
}

.trip-status--moderation {
  background: var(--color-sun);
}

.trip-status--recurring {
  position: relative;
  background: var(--color-paper);
  color: var(--color-ink);
  border: var(--border-width) solid var(--color-ink);
  cursor: pointer;
}

.recurring-trip {
  display: grid;
  gap: var(--space-2);
}

.recurring-trip__enable {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 66px;
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 5px 5px 0 var(--color-ink);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.recurring-trip__enable:has(input:checked) {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--color-ink);
}

.recurring-trip__enable-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  font-family: "Archivo Black", sans-serif;
  font-size: 1.5rem;
  line-height: 1;
}

.recurring-trip__enable-copy {
  display: grid;
  gap: 2px;
  flex: 1;
}

.recurring-trip__enable-copy strong {
  font-family: "Archivo Black", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
}

.recurring-trip__enable-copy small {
  color: var(--color-muted);
  font-size: var(--font-size-sm);
}

.recurring-trip__enable input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--color-ink);
}

.auto-booking__details {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: 5px 5px 0 var(--color-blue);
}

.auto-booking__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.auto-booking__fields .number-stepper {
  width: 100%;
  grid-template-columns: 2.5rem minmax(3rem, 1fr) 2.5rem;
}

.recurring-trip__badge-row {
  display: grid;
  gap: var(--space-1);
}

.recurring-trip__details {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: 5px 5px 0 var(--color-blue);
}

.recurring-trip__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2);
}

.recurring-trip__eyebrow {
  margin: 0 0 2px;
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recurring-trip__time {
  flex-shrink: 0;
}

.recurring-trip__days-label {
  margin: 0;
  font-weight: 600;
}

.recurring-trip__days {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.recurring-trip__day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 44px;
  padding: var(--space-1) var(--space-2);
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, background 120ms ease;
}

.recurring-trip__day:has(input:checked) {
  background: var(--color-sun);
  transform: translateY(-3px);
  box-shadow: 3px 3px 0 var(--color-ink);
}

.recurring-trip__day input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.recurring-trip__algo {
  margin: var(--space-1) 0 0;
  padding: var(--space-2);
  border-left: 5px solid var(--color-pink);
  background: #fff1f7;
  color: var(--color-ink);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

@media (max-width: 480px) {
  .recurring-trip__details {
    padding: var(--space-2);
  }

  .recurring-trip__day {
    flex: 1 1 calc(14.28% - var(--space-2));
    min-width: 0;
    padding-inline: 0;
  }
}

.scope-chooser.scope-chooser--visible {
  opacity: 1;
  pointer-events: auto;
}

.trip-results__empty {
  padding: var(--space-2);
  border: 2px dashed var(--color-ink);
}

.trip-results__empty p {
  margin: 0 0 var(--space-2);
}

.subscriptions-page {
  padding-block: var(--space-5) var(--space-7);
  display: grid;
  gap: var(--space-4);
}

/* ADR-0660: push guide is always below; list does not reserve viewport height. */
.subscriptions-page #subscription-list {
  --trip-results-min-block: 0;
  min-block-size: auto;
}

.subscription-item {
  display: grid;
  gap: var(--space-2);
  list-style: none;
}

.subscription-item__header {
  display: grid;
  gap: 0.5rem;
}

.subscription-matches-wrap {
  display: grid;
  gap: var(--space-2);
  padding: 0 0 0 var(--space-3);
  border-left: 3px solid var(--color-ink);
}

.subscription-matches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.subscription-matches__pagination {
  margin-top: 0;
  justify-content: flex-start;
}

.subscription-matches__item {
  margin: 0;
  padding: 0;
}

.trip-result--subscription-match,
.trip-result--subscription-match.trip-result--link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 2.75rem;
  overflow: hidden;
}

.trip-result--subscription-match.trip-result--closed {
  cursor: default;
  opacity: 0.72;
}

.trip-result--subscription-match.trip-result--unseen {
  box-shadow: 4px 4px 0 var(--color-ink);
}

.trip-result__match-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.45rem 0.65rem;
}

.trip-result--subscription-match .trip-result__route {
  font-size: 0.9375rem;
  line-height: 1.2;
}

.trip-result--subscription-match .trip-result__details {
  row-gap: 0;
}

.trip-result--subscription-match .trip-result__meta-item {
  min-height: 0;
}

.trip-result--subscription-match .trip-result__people {
  gap: 0;
}

.trip-result--subscription-match .trip-result__avatar--subscription-match {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
}

.trip-result__match-status {
  display: flex;
  flex: 0 0 1.6rem;
  align-items: stretch;
  width: 1.6rem;
  border-left: 2px solid var(--color-ink);
}

.trip-result--subscription-match .trip-status {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0.4rem 0;
  border: 0;
  writing-mode: sideways-lr;
  white-space: nowrap;
  letter-spacing: 0.06em;
}

@supports not (writing-mode: sideways-lr) {
  .trip-result--subscription-match .trip-status {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}

.subscriptions-page > .card {
  padding: var(--space-4);
  background: var(--color-paper);
}

.push-guide {
  background: var(--color-blue);
}

.push-guide__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.push-guide h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
}

.push-guide__toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -0.35rem;
  padding: 0;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  color: var(--color-ink);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.push-guide__toggle:hover,
.push-guide__toggle:focus-visible {
  background: var(--color-paper);
}

.push-guide__toggle-icon {
  transition: transform 160ms ease;
}

.push-guide__toggle-icon.is-expanded {
  transform: rotate(180deg);
}

.push-guide__content {
  margin-top: var(--space-4);
}

.push-guide__lead {
  margin: 0 0 var(--space-3);
  max-width: 36rem;
}

.push-guide__test {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  margin-top: var(--space-3);
}

.push-guide__test-hint {
  margin: 0;
  max-width: 28rem;
  font-size: 0.9375rem;
}

.push-guide__platform {
  display: inline-block;
  margin: 0 0 var(--space-3);
  padding: 0.25rem 0.5rem;
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: 0.875rem;
  font-weight: 800;
}

.push-guide__panel + .push-guide__panel {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px dashed var(--color-ink);
}

.push-guide__panel-title {
  margin: 0 0 var(--space-2);
  font-size: 1.125rem;
  font-weight: 900;
}

.push-guide__steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: var(--space-2);
}

.push-guide__steps li::marker {
  font-weight: 900;
}

.push-guide__note {
  margin: var(--space-2) 0 0;
  max-width: 36rem;
  font-size: 0.9375rem;
}

.push-guide__video {
  position: relative;
  width: min(100%, 20rem);
  margin: var(--space-3) 0 var(--space-4);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-ink);
  box-shadow: var(--shadow-small);
}

.push-guide__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.subscriptions-page {
  max-width: 56rem;
  gap: var(--space-5);
}

.subscriptions-page #subscription-list {
  gap: var(--space-3);
}

.subscriptions-page .subscription-item {
  position: relative;
  gap: var(--space-3);
}

.subscriptions-page .subscription-item__header {
  position: relative;
  gap: var(--space-2);
  padding: var(--space-3);
  border-width: var(--border-width);
  background: var(--color-blue);
  box-shadow: var(--shadow);
}

.subscriptions-page .subscription-item--with-cancel .subscription-item__header {
  padding-right: calc(var(--space-3) + 2.75rem);
}

.subscriptions-page .subscription-item__header > strong {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.65rem);
  line-height: 1;
}

.subscriptions-page .subscription-item__header .trip-result__details {
  font-size: 0.85rem;
  font-weight: 800;
}

.subscriptions-page .subscription-item__cancel {
  position: absolute;
  z-index: 2;
  top: -0.8rem;
  right: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0.32rem;
  border: 2px solid var(--color-ink);
  border-radius: 0;
  background: var(--color-paper);
  box-shadow: 2px 2px 0 var(--color-ink);
  transform: rotate(-12deg);
  transform-origin: center center;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 80ms ease;
}

.subscriptions-page .subscription-item__cancel:hover {
  background: var(--color-paper);
  box-shadow: 1px 1px 0 var(--color-ink);
}

.subscriptions-page .subscription-item__cancel:active {
  background: var(--color-sun);
  box-shadow: 0 0 0 var(--color-ink), inset 0 1px 0 rgba(23, 23, 23, 0.14);
  transform: translate(2px, 2px) rotate(-12deg);
}

.subscriptions-page .subscription-item__cancel img {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.subscriptions-page .subscription-item__schedule {
  margin-top: var(--space-1);
  padding-top: var(--space-2);
  border-top: 2px dashed var(--color-ink);
}

.subscriptions-page .subscription-item__schedule-day {
  background: var(--color-paper);
}

.subscriptions-page .subscription-matches-wrap {
  margin-left: var(--space-2);
  padding-left: var(--space-3);
  border-left-width: var(--border-width);
}

.subscriptions-page > .subscription-create {
  margin: 0;
  background: var(--color-sun);
}

.subscriptions-page-body .subscription-create h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 0.95;
}

.subscriptions-page-body .subscription-presets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-block: var(--space-4);
}

.subscriptions-page-body .subscription-presets .button {
  min-height: 4rem;
  padding: var(--space-2);
  box-shadow: var(--shadow-small);
}

.subscriptions-page-body .subscription-create__custom {
  background: var(--color-ink);
}

.subscriptions-page > .push-guide {
  margin: 0;
  background: var(--color-blue);
}

.subscriptions-page-body .push-guide__test {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: var(--shadow-small);
}

.subscriptions-page-body .push-guide__test .button {
  background: var(--color-ink);
  color: var(--color-paper);
}

.subscriptions-page-body .push-guide__platform {
  box-shadow: var(--shadow-small);
}

.subscriptions-page-body .push-guide__panel {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
}

.subscriptions-page-body .push-guide__panel + .push-guide__panel {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--color-ink);
}

.subscriptions-page-body .subscription-wait-dialog {
  width: min(calc(100% - 1rem), 38rem);
  max-height: min(calc(100dvh - 1rem), 52rem);
  padding: 0;
  overflow: auto;
  box-shadow: 8px 8px 0 var(--color-ink);
}

.subscriptions-page-body .subscription-wait-dialog::backdrop {
  background: rgb(23 23 23 / 78%);
}

.subscriptions-page-body .subscription-wait-dialog form {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
}

.subscriptions-page-body .subscription-wait-dialog__header {
  align-items: center;
  margin: calc(-1 * var(--space-3)) calc(-1 * var(--space-2)) 0;
  padding: var(--space-3);
  background: var(--color-sun);
  border-bottom: var(--border-width) solid var(--color-ink);
}

.subscriptions-page-body .subscription-wait-dialog__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  line-height: 0.95;
}

.subscriptions-page-body .subscription-wait-dialog__header .button {
  min-height: 2.5rem;
  flex-shrink: 0;
}

.subscriptions-page-body .subscription-schedule {
  margin: 0;
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-blue);
}

.subscriptions-page-body .subscription-schedule__label {
  max-width: 30rem;
  margin-bottom: var(--space-3);
  color: var(--color-ink);
  font-size: 0.9rem;
}

.subscriptions-page-body .subscription-schedule__row {
  gap: var(--space-2);
  margin-block: var(--space-2);
}

.subscriptions-page-body .subscription-schedule__day,
.subscriptions-page-body .subscription-schedule__time {
  box-shadow: var(--shadow-small);
}

.subscriptions-page-body .subscription-schedule__day:has(input:checked) {
  box-shadow: 1px 1px 0 var(--color-ink);
}

.subscriptions-page-body .subscription-wait-dialog__actions {
  justify-content: stretch;
}

.subscriptions-page-body .subscription-wait-dialog__actions .button--dark {
  min-height: 3.5rem;
  background: var(--color-ink);
}

.subscriptions-page-body .trip-map-dialog {
  width: min(calc(100% - 1rem), 72rem);
  height: min(86dvh, 52rem);
  max-height: calc(100dvh - 1rem);
  padding: 0;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--color-ink);
}

.subscriptions-page-body .trip-map-dialog__header {
  padding: var(--space-2) var(--space-3);
  background: var(--color-sun);
  border-bottom: var(--border-width) solid var(--color-ink);
}

.subscriptions-page-body .trip-map-dialog__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.7rem);
  line-height: 1;
}

.subscriptions-page-body .trip-map-dialog__header .button--dark {
  min-height: 2.75rem;
}

.subscriptions-page-body .trip-map-dialog .point-map {
  border-block: 0;
}

.subscriptions-page-body .trip-map-create {
  padding: var(--space-3);
  background: var(--color-sun);
  border-top: var(--border-width) solid var(--color-ink);
}

@media (max-width: 30rem) {
  .subscriptions-page-body .subscription-presets {
    grid-template-columns: 1fr;
  }

  .subscriptions-page-body .subscription-wait-dialog {
    width: calc(100% - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
  }

  .subscriptions-page-body .subscription-schedule__row {
    grid-template-columns: 2.8rem minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 48rem) {
  .hero {
    grid-template-columns: 1fr;
    padding-block: var(--space-5);
  }

  .hero__poster {
    min-height: 18rem;
  }

  .poster__road {
    left: 4%;
    width: 4rem;
    transform: rotate(-42deg);
  }

  .poster__car {
    top: 48%;
    left: 36%;
    width: 5.25rem;
    height: 3.5rem;
    font-size: 1.75rem;
  }

  .poster__stamp {
    top: auto;
    right: var(--space-3);
    bottom: 38%;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: auto;
  }


  .step__number {
    margin-bottom: var(--space-4);
  }

  .callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .step__link {
    min-height: auto;
  }

  .trips-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 30rem) {
  .container {
    width: min(100% - 1.25rem, 72rem);
  }

  .site-header {
    padding-block: var(--space-3);
  }

  html.app-standalone .site-header {
    padding-top: calc(var(--space-3) + env(safe-area-inset-top, 0px));
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__legal {
    justify-content: flex-start;
  }
}

.ru-plate {
  --ru-plate-ink: #111111;
  --ru-plate-paper: #ffffff;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  min-height: 2.75rem;
  color: var(--ru-plate-ink);
  background: var(--ru-plate-paper);
  border: 2px solid var(--ru-plate-ink);
  border-radius: 0.35rem;
  box-shadow: inset 0 0 0 1px rgb(17 17 17 / 12%);
  font-family: "Segoe UI", "Arial Narrow", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  overflow: hidden;
  vertical-align: middle;
}

.ru-plate--compact {
  min-height: 2.1rem;
  border-width: 1.5px;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.ru-plate--editable {
  display: flex;
  width: min(100%, 20rem);
  min-height: 3.25rem;
}

.ru-plate__body {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.35rem 0.65rem;
  font-size: 1.2rem;
  white-space: nowrap;
}

.ru-plate--editable .ru-plate__body {
  padding: 0.45rem 0.75rem;
}

.ru-plate--compact .ru-plate__body {
  padding: 0.2rem 0.45rem;
  font-size: 0.95rem;
}

.ru-plate__field {
  width: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  caret-color: var(--ru-plate-ink);
}

.field .ru-plate__field {
  width: 100%;
  max-width: none;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.ru-plate__field--body {
  font-size: 1.35rem;
  letter-spacing: 0.12em;
}

.field .ru-plate__field--region,
.ru-plate__field--region {
  display: block;
  width: 3.25ch !important;
  min-width: 3.25ch !important;
  max-width: 3.5ch !important;
  margin: 0 auto;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.ru-plate__field::placeholder {
  color: rgb(17 17 17 / 28%);
  text-transform: uppercase;
}

.ru-plate__field:focus-visible {
  outline: none;
}

.ru-plate--editable:focus-within {
  outline: 4px solid var(--color-blue);
  outline-offset: 3px;
}

.field--error .ru-plate--editable {
  border-color: var(--color-error);
}

.ru-plate__region {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 2.75rem;
  padding: 0.2rem 0.35rem 0.25rem;
  border-left: 2px solid var(--ru-plate-ink);
}

.ru-plate__region--editable {
  gap: 0.2rem;
  min-width: 3.35rem;
  padding: 0.3rem 0.4rem 0.28rem;
  background: linear-gradient(
    to bottom,
    rgb(255 255 255 / 0%) 0 55%,
    rgb(17 17 17 / 3%) 100%
  );
}

.ru-plate--compact .ru-plate__region {
  min-width: 2.15rem;
  padding: 0.1rem 0.25rem 0.15rem;
  border-left-width: 1.5px;
}

.ru-plate__region-code {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.ru-plate--compact .ru-plate__region-code {
  font-size: 0.8rem;
}

.ru-plate__region-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.ru-plate__rus {
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.ru-plate--editable .ru-plate__rus {
  font-size: 0.5rem;
  letter-spacing: 0.1em;
}

.ru-plate--compact .ru-plate__rus {
  font-size: 0.38rem;
}

.ru-plate__flag {
  display: inline-block;
  width: 0.85rem;
  height: 0.55rem;
  border: 1px solid var(--ru-plate-ink);
  background: linear-gradient(
    to bottom,
    #ffffff 0 33.33%,
    #0039a6 33.33% 66.66%,
    #d52b1e 66.66% 100%
  );
}

.ru-plate--editable .ru-plate__flag {
  width: 0.95rem;
  height: 0.62rem;
}

.ru-plate--compact .ru-plate__flag {
  width: 0.7rem;
  height: 0.45rem;
}

.car-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
}

.car-preview__meta {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.vehicle-choice {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: stretch;
  margin: 0 0 var(--space-3);
  padding: 0;
  border: 0;
}

.vehicle-choice__option {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
}

.vehicle-choice__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vehicle-choice__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0;
}

.vehicle-choice__plate {
  display: inline-flex;
}

.vehicle-choice__plate .ru-plate {
  box-shadow: var(--shadow-small), inset 0 0 0 1px rgb(17 17 17 / 12%);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.vehicle-choice__option input:checked + .vehicle-choice__card .ru-plate {
  background: var(--color-sun);
  box-shadow: var(--shadow), inset 0 0 0 1px rgb(17 17 17 / 12%);
  transform: translate(-1px, -1px);
}

.vehicle-choice__option input:focus-visible + .vehicle-choice__card {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.vehicle-choice__add-car {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.taxi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  box-shadow: var(--shadow-small);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

.vehicle-choice__option input:checked + .vehicle-choice__card .taxi-badge {
  background: var(--color-sun);
  box-shadow: var(--shadow);
  transform: translate(-1px, -1px);
}

.taxi-badge img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}

.taxi-badge__label {
  font-weight: 700;
}

.taxi-badge--compact {
  padding: 0.2rem 0.45rem 0.2rem 0.25rem;
  font-size: 0.85rem;
  box-shadow: none;
}

.taxi-badge--compact img {
  width: 1.25rem;
  height: 1.25rem;
}

.button--with-icon {
  position: relative;
  gap: var(--space-2);
}

.button--with-icon .button__icon {
  flex: 0 0 auto;
}

.button__icon--yandex-go {
  width: auto;
  height: 1.5rem;
  max-width: 8.5rem;
  object-fit: contain;
}

.button--demand .button__icon {
  width: 1.125rem;
  height: 1.125rem;
}

.demand-link--pending {
  visibility: hidden;
  pointer-events: none;
}

.demand-lead {
  margin: 0 0 var(--space-4);
  max-width: 36rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.demand-radius {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  max-width: 28rem;
}

.demand-radius__label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
}

.demand-radius__value {
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.demand-radius__range {
  width: 100%;
  accent-color: var(--color-sun);
}

.demand-result__card {
  gap: var(--space-3);
}

.demand-result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
}

.demand-result__count {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  border: 3px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 3px 3px 0 var(--color-ink);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.2;
}

.demand-result__count[role="button"] {
  cursor: pointer;
}

.demand-result__count[role="button"][aria-expanded="true"] {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.demand-result__count[role="button"]:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 3px;
}

.demand-result__bolt {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.demand-result__waiters {
  max-width: 100%;
  overflow-x: auto;
  border-top: 2px solid var(--color-ink);
  padding-top: var(--space-2);
}

.demand-result__waiters-list {
  display: grid;
  gap: var(--space-2);
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demand-result__waiter {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: max-content;
  min-height: 2rem;
  white-space: nowrap;
}

.demand-result__waiter > a {
  display: inline-flex;
  align-items: center;
}

.demand-result__waiter-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.8rem;
}

.demand-result__waiter .trust-affiliation-label {
  margin-left: 0;
  text-transform: uppercase;
}

.demand-result__waiter-expires,
.demand-result__waiters-empty {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.trip-result__car {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  min-width: 0;
}

.trip-result__car-meta {
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.trip-result__car .ru-plate--compact {
  min-height: 1.55rem;
  font-size: 0.75rem;
}

.trip-result__car .ru-plate--compact .ru-plate__body {
  padding: 0.1rem 0.35rem;
  font-size: 0.8rem;
}

.trip-result__car .ru-plate--compact .ru-plate__region {
  min-width: 1.7rem;
  padding: 0.05rem 0.2rem 0.1rem;
}

.trip-result__car .ru-plate--compact .ru-plate__region-code {
  font-size: 0.68rem;
}

.trip-result__car .ru-plate--compact .ru-plate__rus {
  font-size: 0.34rem;
}

.trip-result__car .ru-plate--compact .ru-plate__flag {
  width: 0.62rem;
  height: 0.4rem;
}

.booking-contact__plate {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-2);
}

.nav-stack {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.nav-stack__frame {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--color-paper);
  pointer-events: auto;
  will-change: transform;
}

html.nav-stack-open,
html.nav-stack-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.user-celebration-open,
html.user-celebration-open body {
  overflow: hidden;
}

/* Invite / ambassadors */
.invite-avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  overflow: visible;
  border: 2px solid var(--color-ink);
  background: var(--color-sun);
  font-weight: 900;
  line-height: 1;
}

.invite-avatar img:not(.invite-avatar__crown) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-avatar--sm {
  width: 2.5rem;
  height: 2.5rem;
}

.invite-avatar__crown {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  padding: 0.1rem;
  border: 2px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 2px 2px 0 var(--color-ink);
}

.profile-invite__head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  justify-content: space-between;
}

.profile-invite__stats {
  margin: 0;
}

.profile-invite__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.profile-delete {
  display: grid;
  gap: var(--space-3);
}

.invite-leaders-page,
.eco-leaders-page {
  padding-block: var(--space-5) var(--space-7);
}

.invite-leaders-page h1,
.eco-leaders-page h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 7.5vw, 5rem);
  overflow-wrap: anywhere;
}

.invite-leaders-page__lead {
  margin: 0 0 var(--space-4);
}

.invite-leaders-page__cta {
  margin-top: var(--space-5);
}

.eco-leaders-page__lead {
  margin: 0 0 var(--space-4);
}

.eco-leaders-page__cta {
  margin-top: var(--space-5);
}

.eco-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

.eco-period-tabs__tab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--color-ink);
}

.eco-period-tabs__tab--active,
.eco-period-tabs__tab[aria-current="page"] {
  background: var(--color-sun);
}

.eco-me-card {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 3px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
}

.eco-me-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.02em;
}

.eco-me-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.eco-me-card__stats dt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.eco-me-card__stats dd {
  margin: 0.15rem 0 0;
  font-variant-numeric: tabular-nums;
}

.eco-me-card__stat--primary,
.eco-me-card__stat--co2 {
  padding: 0.65rem 0.75rem;
  border: 3px solid var(--color-ink);
  box-shadow: var(--shadow-small);
}

.eco-me-card__stat--primary {
  background: var(--color-sun);
}

.eco-me-card__stat--co2 {
  background: var(--color-blue);
}

.eco-me-card__stat--primary dd,
.eco-me-card__stat--co2 dd {
  font-size: 1.25rem;
  font-weight: 800;
}

.eco-me-card__bonus {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.eco-leaderboard__fuel {
  white-space: nowrap;
}

.eco-leaderboard__co2 {
  color: var(--color-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.profile-eco {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-ink);
}

.profile-eco__label {
  margin: 0 0 0.25rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.profile-eco__values {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.invite-leaderboard {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite-leaderboard__row {
  display: grid;
  grid-template-columns: 2rem 2.5rem minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: 3px 3px 0 var(--color-ink);
}

.invite-leaderboard__rank {
  font-weight: 900;
  text-align: center;
}

.invite-leaderboard__name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.invite-leaderboard__avatar-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.invite-leaderboard__count {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.eco-leaderboard .invite-leaderboard__row {
  grid-template-columns: 2rem 2.5rem minmax(0, 1fr) auto auto;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.35rem;
  font-size: 0.85em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--color-ink);
}

.feedback-page__lead {
  max-width: 36rem;
  margin: 0.5rem 0 0;
}

.feedback-list {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.feedback-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 3px solid var(--color-ink);
  box-shadow: var(--shadow);
  background: var(--color-paper);
}

.feedback-card__title {
  display: grid;
  gap: 0.25rem;
}

.feedback-card__meta {
  font-size: 0.9rem;
  opacity: 0.85;
}

.feedback-card__stars {
  display: flex;
  gap: 0.25rem;
}

.feedback-card__star {
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.feedback-card__star--on {
  background: var(--color-sun);
}

.feedback-card__text {
  width: 100%;
  min-height: 4rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--color-ink);
  font: inherit;
  resize: vertical;
  background: var(--color-paper);
  color: var(--color-ink);
}

.feedback-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.user-celebration {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.user-celebration__backdrop,
.user-celebration__fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.user-celebration__backdrop {
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(23, 23, 23, 0.62);
  cursor: pointer;
}

.user-celebration__fireworks {
  pointer-events: none;
}

.user-celebration__card {
  position: relative;
  z-index: 1;
  width: min(100%, 30rem);
  display: grid;
  gap: 0.85rem;
  max-height: min(44rem, calc(100vh - 2.5rem));
  overflow: auto;
  padding: 1.5rem 1.25rem 1.25rem;
  border: 4px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: 10px 10px 0 var(--color-ink);
  text-align: center;
  transform: translateY(1.25rem) scale(0.94);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.15), opacity 0.22s ease;
}

.user-celebration.is-visible .user-celebration__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.user-celebration__eyebrow {
  margin: 0;
  color: var(--color-success);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-celebration__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.user-celebration__avatar {
  justify-self: center;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border: 3px solid var(--color-ink);
  background: var(--color-paper);
}

.user-celebration__author,
.user-celebration__route,
.user-celebration__thanks,
.user-celebration__rating,
.user-celebration__hint,
.user-celebration__mood,
.user-celebration__total-label,
.user-celebration__total-value,
.user-celebration__rank {
  margin: 0;
}

.user-celebration__author {
  font-weight: 800;
}

.user-celebration__route,
.user-celebration__hint {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.user-celebration__review {
  margin: 0;
  padding: 1rem;
  border: 3px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: var(--shadow-small);
  font-size: 1.12rem;
  font-weight: 700;
  text-align: left;
  white-space: pre-wrap;
}

.user-celebration__review::before {
  content: "«";
}

.user-celebration__review::after {
  content: "»";
}

.user-celebration__thanks {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.user-celebration__rating {
  font-weight: 800;
}

.user-celebration__mood {
  font-size: 3rem;
  line-height: 1;
}

.user-celebration__stats {
  display: grid;
  gap: 0.75rem;
}

.user-celebration__stat {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.75rem;
  border: 3px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: var(--shadow-small);
}

.user-celebration__stat--co2 {
  background: var(--color-blue);
}

.user-celebration__stat strong {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.user-celebration__stat--fuel {
  padding-block: 1.1rem;
}

.user-celebration__stat--fuel strong {
  font-size: clamp(2.8rem, 13vw, 4rem);
}

.user-celebration__stat span {
  font-size: 0.95rem;
  font-weight: 700;
}

.user-celebration__total {
  padding: 0.85rem 0.75rem;
  border: 3px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
}

.user-celebration__total-label {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.user-celebration__total-value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  line-height: 1.1;
}

.user-celebration__rank {
  font-weight: 800;
}

.user-celebration__close {
  justify-self: center;
  min-width: 8rem;
}

/* One-time acknowledgement for the inviter; it is never rendered for the invited user. */
.invite-celebration {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.invite-celebration__backdrop,
.invite-celebration__fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.invite-celebration__backdrop {
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(23, 23, 23, 0.62);
  cursor: pointer;
}

.invite-celebration__fireworks {
  pointer-events: none;
}

.invite-celebration__card {
  position: relative;
  z-index: 1;
  width: min(100%, 30rem);
  display: grid;
  gap: 0.85rem;
  max-height: min(44rem, calc(100vh - 2.5rem));
  overflow: auto;
  padding: 1.5rem 1.25rem 1.25rem;
  border: 4px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: 10px 10px 0 var(--color-ink);
  text-align: center;
  transform: translateY(1.25rem) scale(0.94);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.15), opacity 0.22s ease;
}

.invite-celebration.is-visible .invite-celebration__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.invite-celebration__eyebrow {
  margin: 0;
  color: var(--color-success);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invite-celebration__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.invite-celebration__thank-you,
.invite-celebration__copy {
  margin: 0;
}

.invite-celebration__thank-you {
  font-size: 1.05rem;
}

.invite-celebration__people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite-celebration__person {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border: 2px solid var(--color-ink);
  background: var(--color-sun);
  box-shadow: 3px 3px 0 var(--color-ink);
}

.invite-celebration__person--more {
  padding-inline: 0.7rem;
  font-style: italic;
}

.invite-celebration__avatar {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-blue);
  font-weight: 800;
}

.invite-celebration__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-celebration__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

html.invite-celebration-open {
  overflow: hidden;
}

.profile-rating {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
}

.profile-rating__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
}

.profile-rating__link {
  margin: 0.75rem 0 0;
}

.user-card-link {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.user-card-link:hover,
.user-card-link:focus-visible,
.user-card-link:active {
  color: var(--color-ink);
  background: var(--color-sun);
  outline: 2px solid var(--color-ink);
  outline-offset: 1px;
}

.trip-result__person-name.user-card-link {
  display: inline;
  padding: 0.05em 0.2em;
  margin: -0.05em -0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.trip-result__avatar.user-card-link,
.trip-result__avatar-host.user-card-link,
.trip-detail__person .user-card-link.trip-result__avatar,
.trip-detail__person .user-card-link:has(> .trip-result__avatar-host),
a.user-card-link.trip-result__avatar {
  text-decoration: none;
}

.trip-result__avatar.user-card-link:hover,
.trip-result__avatar.user-card-link:focus-visible,
.trip-result__avatar.user-card-link:active,
.trip-result__avatar-host.user-card-link:hover,
.trip-result__avatar-host.user-card-link:focus-visible,
.trip-result__avatar-host.user-card-link:active,
.trip-detail__person .user-card-link.trip-result__avatar:hover,
.trip-detail__person .user-card-link.trip-result__avatar:focus-visible,
.trip-detail__person .user-card-link.trip-result__avatar:active,
.trip-detail__person .user-card-link:has(> .trip-result__avatar-host):hover,
.trip-detail__person .user-card-link:has(> .trip-result__avatar-host):focus-visible,
.trip-detail__person .user-card-link:has(> .trip-result__avatar-host):active,
a.user-card-link.trip-result__avatar:hover,
a.user-card-link.trip-result__avatar:focus-visible,
a.user-card-link.trip-result__avatar:active {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--color-blue);
  outline-offset: 1px;
  box-shadow: 2px 2px 0 var(--color-ink);
}

.user-card-page {
  padding-bottom: 2.5rem;
}

.user-card {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 3px solid var(--color-ink);
  box-shadow: var(--shadow);
  background: var(--color-paper);
}

.user-card__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.user-card__avatar {
  flex: 0 0 auto;
  display: inline-flex;
  width: 5.5rem;
  height: 5.5rem;
  overflow: hidden;
  border: 3px solid var(--color-ink);
  background: var(--color-muted);
}

.user-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card__portrait {
  display: grid;
  place-items: center;
  width: min(100%, 16rem);
  margin-inline: auto;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 3px solid var(--color-ink);
  background: var(--color-paper);
  box-shadow: var(--shadow-small);
}

.user-card__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Skeleton placeholder for the portrait on /profile: reserves final space
   so the page doesn't jump when /api/me resolves. The opaque loaded photo
   (object-fit: cover, 100% w/h) covers this background once it paints. */
.profile-page .user-card__portrait {
  background: linear-gradient(
      90deg,
      var(--color-paper) 25%,
      color-mix(in srgb, var(--color-sun) 28%, var(--color-paper)) 50%,
      var(--color-paper) 75%
    );
  background-size: 200% 100%;
  animation: profile-portrait-shimmer 1.3s ease-in-out infinite;
}

@keyframes profile-portrait-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-page .user-card__portrait {
    animation: none;
  }
}

.user-card__identity {
  min-width: 0;
}

.user-card__name {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.user-card__affiliation,
.user-card__meta {
  margin: 0.35rem 0 0;
}

.user-card__stats {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .user-card__stats {
    grid-template-columns: 1fr 1fr;
  }
}

.user-card__stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
}

.user-card__stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.user-card__stat-extra {
  font-size: 0.9rem;
}

.user-card__section-title {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
}

.user-card__reviews-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.user-card__reviews-head .user-card__section-title {
  margin: 0;
}

.user-card__review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.user-card__review-filter--active {
  background: var(--color-ink);
  color: var(--color-paper);
}

.user-card__about-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.user-review-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.user-review {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
}

.user-review__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.user-review__author {
  font-weight: 700;
  color: inherit;
}

.user-review__stars {
  font-weight: 700;
}

.user-review__role,
.user-review__meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

.user-review__text {
  margin: 0;
  white-space: pre-wrap;
}

.user-review__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.user-review__meta a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .user-celebration__card {
    transform: none;
    opacity: 1;
  }

  .poster__car {
    animation: none;
  }

  html.has-page-reveal .page-reveal > *,
  html.has-page-reveal .page-reveal.is-revealed > * {
    transform: none;
    transition: none;
  }

  html.has-page-reveal .page-reveal > .card,
  html.has-page-reveal .page-reveal > .hero__poster,
  html.has-page-reveal .page-reveal > .callout,
  html.has-page-reveal .page-reveal.is-revealed > .card,
  html.has-page-reveal .page-reveal.is-revealed > .hero__poster,
  html.has-page-reveal .page-reveal.is-revealed > .callout {
    box-shadow: var(--shadow);
  }

  html.has-page-reveal .page-reveal > .invite-leaderboard__row,
  html.has-page-reveal .page-reveal > .eco-me-card,
  html.has-page-reveal .page-reveal.is-revealed > .invite-leaderboard__row,
  html.has-page-reveal .page-reveal.is-revealed > .eco-me-card {
    box-shadow: 3px 3px 0 var(--color-ink);
  }
}

.admin-metrics-page {
  padding-block: var(--space-3) var(--space-5);
}

.admin-metrics-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.admin-metrics-header__title h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.admin-metrics-header__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-end;
  text-align: right;
}

.admin-metrics-period-summary,
.admin-metrics-updated {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink-muted, #444);
}

.admin-metrics-toolbar {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  background: var(--color-paper);
}

.admin-metrics-filters {
  display: grid;
  gap: var(--space-2);
}

.admin-metrics-toolbar__primary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
}

.admin-metrics-toolbar__cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.admin-metrics-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-left: auto;
}

.admin-metrics-period {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
}

.admin-metrics-period__option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.admin-metrics-period__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-metrics-period__option span {
  display: block;
  padding: 0.35rem 0.65rem;
  border-right: var(--border-width) solid var(--color-ink);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-metrics-period__option:last-child span {
  border-right: 0;
}

.admin-metrics-period__option:has(input:checked) span {
  background: var(--color-ink);
  color: var(--color-paper);
}

.admin-metrics-period__option:has(input:focus-visible) span {
  outline: 3px solid var(--color-ink);
  outline-offset: -3px;
}

.admin-metrics-compare {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.admin-metrics-custom-range {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-1);
  border-top: var(--border-width) dashed var(--color-ink);
}

.admin-metrics-advanced {
  font-size: 0.9rem;
}

.admin-metrics-advanced summary {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.admin-metrics-advanced summary::-webkit-details-marker {
  display: none;
}

.admin-metrics-advanced summary::before {
  content: "▸";
  font-size: 0.75rem;
}

.admin-metrics-advanced[open] summary::before {
  content: "▾";
}

.admin-metrics-advanced__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.admin-metrics-filters .field--compact {
  gap: 0.2rem;
  margin: 0;
}

.admin-metrics-filters .field--compact label {
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-metrics-filters .field--compact input,
.admin-metrics-filters .field--compact select {
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.85rem;
}

.admin-metrics-quality {
  margin-bottom: var(--space-2);
}

.admin-metrics-loading {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.admin-metrics-loading__skeleton {
  display: block;
  min-height: 3.5rem;
  background: linear-gradient(90deg, #f2f2f2 25%, #e8e8e8 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: admin-metrics-shimmer 1.2s infinite;
  border: var(--border-width) solid var(--color-ink);
}

.admin-metrics-loading__skeleton--short {
  min-height: 2rem;
  max-width: 28rem;
}

.admin-metrics-loading__skeleton--grid {
  min-height: 12rem;
}

@keyframes admin-metrics-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.admin-metrics-dashboard {
  display: grid;
  gap: var(--space-2);
}

.admin-metrics-dashboard__columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-2);
  align-items: start;
}

.admin-metrics-panel {
  padding: var(--space-2);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-paper);
}

.admin-metrics-panel__title {
  margin: 0 0 var(--space-2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-metrics-subtitle {
  margin: var(--space-2) 0 var(--space-1);
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-metrics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-ink);
}

.admin-metrics-kpi-grid--dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-metrics-kpi {
  min-width: 0;
  padding: var(--space-2);
  background: var(--color-paper);
}

.admin-metrics-kpi__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.25rem;
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-metrics-kpi__hint {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-sun);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.admin-metrics-kpi__value {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.1;
}

.admin-metrics-kpi__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: space-between;
  margin: 0.25rem 0 0;
  font-size: 0.7rem;
  color: var(--color-ink-muted, #444);
}

.admin-metrics-delta {
  font-weight: 700;
}

.admin-metrics-delta--up {
  color: #0a6b2d;
}

.admin-metrics-delta--down {
  color: #9a1b1b;
}

.admin-metrics-delta--flat {
  color: #666;
}

.admin-metrics-partial {
  margin-left: 0.1rem;
  color: #9a6b00;
  font-weight: 800;
}

.admin-metrics-funnel {
  margin: 0;
  padding: 0;
}

.admin-metrics-funnel__bar {
  height: 0.35rem;
  background: rgb(98 182 255 / 15%);
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 2px;
}

.admin-metrics-funnel__bar-fill {
  display: block;
  height: 100%;
  background: var(--color-blue);
  border-radius: 1px;
}

.admin-metrics-funnel__rate {
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-metrics-funnel__rate--na {
  color: #666;
}

.admin-metrics-channels {
  display: grid;
  gap: var(--space-2);
}

.admin-metrics-channel {
  display: grid;
  gap: 0.25rem;
}

.admin-metrics-channel__head {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-metrics-channel__head strong {
  font-size: 1rem;
  font-weight: 800;
}

.admin-metrics-channel__bar-track {
  height: 0.4rem;
  background: rgb(0 0 0 / 8%);
  border: var(--border-width) solid var(--color-ink);
}

.admin-metrics-channel__bar-fill {
  display: block;
  height: 100%;
  background: var(--color-sun);
}

.admin-metrics-channel__share {
  font-size: 0.75rem;
  color: var(--color-ink-muted, #444);
}

.admin-metrics-table-wrap {
  overflow: auto;
  max-height: 22rem;
}

.admin-metrics-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-metrics-table th,
.admin-metrics-table td {
  padding: 0.3rem 0.45rem;
  border-bottom: var(--border-width) solid rgb(0 0 0 / 15%);
  text-align: left;
  vertical-align: middle;
}

.admin-metrics-table__num,
.admin-metrics-table td:nth-child(n + 4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-metrics-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-sun);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-metrics-table tbody tr:hover {
  background: rgb(254 108 170 / 8%);
}

.admin-metrics-timing-grid,
.admin-metrics-retention-grid {
  display: block;
  margin-bottom: var(--space-2);
}

.admin-metrics-timing {
  min-width: 0;
  padding: var(--space-2);
  background: var(--color-paper);
}

.admin-metrics-timing h3 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-metrics-timing__value {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.admin-metrics-timing__meta {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  color: var(--color-ink-muted, #444);
}

.admin-metrics-cancellations {
  padding-top: var(--space-1);
  border-top: var(--border-width) dashed var(--color-ink);
}

.admin-metrics-cancellations .admin-metrics-kpi-grid {
  margin-top: var(--space-1);
}

.admin-metrics-inviter-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: var(--border-width) dashed var(--color-ink);
}

.admin-metrics-inviter-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.admin-metrics-inviter-rank {
  font-weight: 800;
}

.admin-metrics-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 72rem) {
  .admin-metrics-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 56rem) {
  .admin-metrics-dashboard__columns {
    grid-template-columns: 1fr;
  }

  .admin-metrics-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 40rem) {
  .admin-metrics-header__meta {
    align-items: flex-start;
    text-align: left;
  }

  .admin-metrics-toolbar__primary {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-metrics-toolbar__actions {
    margin-left: 0;
  }

  .admin-metrics-period {
    width: 100%;
  }

  .admin-metrics-period__option {
    flex: 1 1 auto;
  }

  .admin-metrics-period__option span {
    padding-inline: 0.4rem;
    text-align: center;
  }

  .admin-metrics-kpi-grid,
  .admin-metrics-kpi-grid--dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics-inviter-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 28rem) {
  .admin-metrics-kpi-grid,
  .admin-metrics-kpi-grid--dense {
    grid-template-columns: 1fr;
  }
}

/* Admin metrics: dense information hierarchy for daily decision-making. */
.admin-metrics-page {
  padding-top: var(--space-2);
}

.admin-metrics-header__lead {
  max-width: 42rem;
  margin: 0.35rem 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.admin-metrics-jump-nav {
  display: flex;
  gap: 0.35rem;
  margin-bottom: var(--space-2);
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-metrics-jump-nav button {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-metrics-jump-nav button[aria-selected="true"],
.admin-metrics-jump-nav button:hover {
  background: var(--color-sun);
}

.admin-metrics-jump-nav button[aria-selected="true"] {
  box-shadow: 3px 3px 0 var(--color-ink);
  transform: translate(-1px, -1px);
}

.admin-metrics-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2);
}

.admin-metrics-toolbar__label {
  display: grid;
  gap: 0.1rem;
  min-width: 9rem;
}

.admin-metrics-toolbar__label strong {
  font-size: 0.85rem;
}

.admin-metrics-toolbar__label span,
.admin-metrics-section-note {
  color: var(--color-muted);
  font-size: 0.7rem;
}

.admin-metrics-section-heading {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.admin-metrics-section-heading .admin-metrics-panel__title {
  margin-bottom: 0;
}

.admin-metrics-kicker {
  margin: 0 0 0.1rem;
  color: var(--color-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-metrics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: var(--space-2);
  border: var(--border-width) solid var(--color-ink);
  background: var(--color-ink);
}

.admin-metrics-summary__item {
  display: grid;
  gap: 0.2rem;
  min-height: 7.2rem;
  padding: var(--space-2);
  background: var(--color-sun);
}

.admin-metrics-summary__item--2 {
  background: var(--color-blue);
}

.admin-metrics-summary__item--3 {
  background: var(--color-pink);
}

.admin-metrics-summary__item--4 {
  background: #b9e986;
}

.admin-metrics-summary__label {
  max-width: 12rem;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-metrics-summary__value {
  align-self: center;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  line-height: 1;
}

.admin-metrics-summary__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  min-height: 1.1rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-metrics-overview .admin-metrics-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metrics-panel {
  padding: var(--space-3);
}

.admin-metrics-panel__title {
  font-size: 0.72rem;
}

.admin-metrics-metric-table {
  min-width: 0;
}

.admin-metrics-table-wrap--compact {
  max-height: none;
  border: 2px solid var(--color-ink);
}

.admin-metrics-kpi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-metrics-kpi-table th,
.admin-metrics-kpi-table td {
  padding: 0.32rem 0.5rem;
  border-bottom: 2px solid rgb(0 0 0 / 15%);
  text-align: left;
  vertical-align: middle;
}

.admin-metrics-kpi-table thead th {
  background: var(--color-sun);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-metrics-kpi-table tbody tr:nth-child(even) {
  background: rgb(98 182 255 / 8%);
}

.admin-metrics-kpi-table tbody tr:last-child th,
.admin-metrics-kpi-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-metrics-kpi-table__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-metrics-kpi-table__hint {
  display: block;
  max-width: 34rem;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.63rem;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-metrics-kpi-table td:nth-child(2) {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-metrics-kpi-table td:nth-child(3),
.admin-metrics-kpi-table td:nth-child(4) {
  color: var(--color-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.admin-metrics-overview .admin-metrics-summary__item {
  min-height: 5.3rem;
  padding: 0.65rem;
}

.admin-metrics-overview .admin-metrics-summary__value {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.admin-metrics-overview .admin-metrics-summary {
  margin-bottom: 0.65rem;
}

.admin-metrics-funnel-table th,
.admin-metrics-funnel-table td {
  padding-block: 0.28rem;
}

.admin-metrics-funnel-table__bar-col {
  width: 18%;
}

.admin-metrics-funnel-table .admin-metrics-funnel__bar {
  height: 0.45rem;
  margin: 0;
}

.admin-metrics-channel-table__bar-col {
  width: 34%;
}

.admin-metrics-channel-table__bar-col .admin-metrics-channel__bar-track {
  height: 0.5rem;
  margin: 0;
}

.admin-metrics-compact-host {
  min-width: 0;
}

.admin-metrics-timing,
.admin-metrics-kpi {
  padding: 0.65rem;
}

.admin-metrics-dashboard__columns {
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
}

.admin-metrics-dashboard__columns--growth {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.admin-metrics-kpi {
  min-height: 6.5rem;
}

.admin-metrics-kpi__value {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

.admin-metrics-channels {
  gap: 0.8rem;
}

.admin-metrics-channel__bar-track {
  height: 0.65rem;
}

.admin-metrics-table-wrap {
  max-height: 26rem;
  border: 2px solid var(--color-ink);
}

.admin-metrics-table {
  min-width: 50rem;
}

.admin-metrics-table th,
.admin-metrics-table td {
  padding: 0.45rem 0.55rem;
}

.admin-metrics-table tbody tr:nth-child(even) {
  background: rgb(98 182 255 / 8%);
}

@media (max-width: 56rem) {
  .admin-metrics-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-metrics-summary,
  .admin-metrics-overview .admin-metrics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics-kpi-table__hint {
    display: none;
  }
}

@media (max-width: 40rem) {
  .admin-metrics-panel {
    padding: var(--space-2);
  }

  .admin-metrics-section-heading {
    display: block;
  }

  .admin-metrics-section-note {
    display: block;
    margin-top: 0.35rem;
  }

  .admin-metrics-summary__item {
    min-height: 6.5rem;
  }
}

.life-feed-lead {
  margin: 0 0 var(--space-4);
  max-width: 42rem;
}

.life-feed-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-3);
}

.life-feed-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-3) 0;
  padding: 0;
  border: 0;
}

.life-feed-weekdays legend {
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.life-feed-form__flags,
.life-feed-form__actions,
.life-feed-scheme__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: var(--space-3);
}

.life-feed-scheme-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.life-feed-scheme {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  background: var(--color-paper);
}

.life-feed-scheme__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.life-feed-scheme__meta {
  margin: 0.35rem 0 0;
}

.life-feed-user {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  vertical-align: baseline;
}

.life-feed-user__avatar {
  width: 1.05em;
  height: 1.05em;
  object-fit: cover;
  border: 1px solid var(--color-ink);
  background: var(--color-paper);
  box-sizing: border-box;
  flex-shrink: 0;
}

.life-feed-empty {
  margin: 0;
}

.trust-circles-lead {
  margin: 0 0 var(--space-4);
  max-width: 42rem;
}

.trust-circles-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-3);
}

.trust-circles-form__icon-field {
  grid-column: 1 / -1;
}

.trust-circles-form__icon {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.trust-circles-form__icon input {
  flex: 1;
  min-width: 0;
  width: auto;
}

.trust-circles-form__icon-preview {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.trust-circles-form > .field {
  margin-top: var(--space-3);
}

.trust-circles-form__flags,
.trust-circles-form__actions,
.trust-circle-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: var(--space-3);
}

.trust-circles-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-circle-item {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-ink);
  box-shadow: var(--shadow-small);
  background: var(--color-paper);
}

.trust-circle-item__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.trust-circle-item__icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.trust-circle-item__meta {
  margin: 0.35rem 0 0;
}

.trust-circles-empty {
  margin: 0;
}

.trust-circle-item--selected {
  background: color-mix(in srgb, var(--color-sun) 55%, var(--color-paper));
}

.trust-circle-marker.leaflet-div-icon {
  width: 32px !important;
  height: 32px !important;
  background: transparent;
  border: none;
  overflow: visible;
}

.trust-circle-marker__icon,
.trust-circle-marker__dot {
  display: block;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  background: var(--color-paper);
  object-fit: contain;
}

.trust-circle-marker__dot {
  background: var(--color-pink);
  border-radius: 50%;
}

.trust-circle-marker--selected .trust-circle-marker__icon,
.trust-circle-marker--selected .trust-circle-marker__dot {
  box-shadow: 4px 4px 0 var(--color-ink);
}

.trust-circle-marker--draft .trust-circle-marker__dot {
  background: var(--color-sun);
}

.trust-circle-marker--inactive {
  opacity: 0.55;
}

.trust-circle-marker__label {
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 10rem;
  padding: 0.15rem 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  background: var(--color-paper);
  border: 1.5px solid var(--color-ink);
  box-shadow: var(--shadow-small);
  pointer-events: none;
}

.trust-circle-marker--selected .trust-circle-marker__label {
  background: var(--color-sun);
}

.trust-circle-catchment--selected {
  pointer-events: none;
}
