:root {
  --bg: #e7eef0;
  --bg-deep: #0b2f36;
  --surface: rgba(255, 255, 255, 0.72);
  --ink: #132226;
  --muted: #5a6f74;
  --line: rgba(19, 34, 38, 0.12);
  --accent: #d08a2a;
  --accent-ink: #1a1206;
  --teal: #1f6b74;
  --danger: #b42318;
  --radius: 14px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --shadow-soft: 0 18px 40px rgba(11, 47, 54, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #c9dde2 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #d9e8c8 0%, transparent 45%),
    linear-gradient(180deg, #dfe9eb 0%, var(--bg) 40%, #d5e2e5 100%);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

.app {
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  max-width: 720px;
  margin: 0 auto;
}

.view {
  display: none;
  animation: viewIn 0.45s ease both;
}

.view.is-active {
  display: block;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* HERO */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  color: #f4f8f9;
  overflow: hidden;
}

.hero--compact {
  min-height: min(52vh, 420px);
  max-height: 480px;
  border-radius: 0 0 28px 28px;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-2%, -1%, 0);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 47, 54, 0.25) 0%, rgba(11, 47, 54, 0.55) 42%, rgba(11, 47, 54, 0.92) 100%),
    linear-gradient(90deg, rgba(11, 47, 54, 0.35), transparent 55%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 24px 20px 28px;
  max-width: 34rem;
}

.hero__brand {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  animation: rise 0.7s ease both;
}

.hero__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 16ch;
  animation: rise 0.7s ease 0.08s both;
}

.hero__lead {
  margin: 0 0 22px;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(244, 248, 249, 0.86);
  max-width: 28ch;
  animation: rise 0.7s ease 0.16s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: rise 0.7s ease 0.24s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.28);
}

.btn--small {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  background: var(--bg-deep);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
}

.trip-panel {
  margin: 14px 0 8px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.trip-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.trip-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
}

.trip-panel__note {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #374151;
}

.trip-panel__hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #6b7280;
}

.trip-sheet {
  margin: 4px 0 8px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.trip-sheet__row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}

.trip-sheet__row:last-of-type {
  border-bottom: 0;
}

.trip-sheet__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.trip-sheet__value {
  font-size: 0.95rem;
  line-height: 1.35;
  color: #111827;
  font-weight: 500;
}

.trip-sheet__muted {
  color: #6b7280;
  font-weight: 400;
}

.trip-sheet__price {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
  font-size: 0.9rem;
  color: #4b5563;
}

.trip-sheet__price span {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f766e;
}

.trip-sheet__comment {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.4;
}

.trip-sheet__empty {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.4;
}

.trip-request {
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  margin-bottom: 10px;
}

.trip-request:last-of-type {
  margin-bottom: 0;
}

.trip-request__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.trip-request__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #111827;
}

.trip-request__seats {
  margin-top: 2px;
  font-size: 0.8rem;
  color: #6b7280;
}

.trip-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  background: #eef2f7;
  color: #4b5563;
}

.trip-badge.is-ok {
  background: #dcfce7;
  color: #166534;
}

.trip-badge.is-wait {
  background: #fef3c7;
  color: #92400e;
}

.trip-badge.is-muted {
  background: #f3f4f6;
  color: #6b7280;
}

.trip-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.trip-actions--stack {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.trip-btn {
  min-height: 42px;
  width: 100%;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.trip-phone {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--yandex-blue, #3d7bf5);
  text-decoration: none;
}

.trips-tabs-wrap {
  padding: 4px 16px 12px;
  box-sizing: border-box;
  max-width: 100%;
}

.trips-tabs {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.trips-tab {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--muted, #8a8a8e);
  border-radius: 10px;
  min-height: 34px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.trips-tab:active {
  opacity: 0.85;
}

.trips-tab.is-active {
  background: #fff;
  color: var(--ink, #1a1a1a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.field.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.hero__brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 7vw, 2.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  animation: rise 0.7s ease both;
}

.hero__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 18ch;
  animation: rise 0.7s ease 0.08s both;
}

.hero__lead {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(244, 248, 249, 0.86);
  max-width: 32ch;
  animation: rise 0.7s ease 0.16s both;
}

.hero__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  animation: rise 0.7s ease 0.24s both;
}

.hero__actions .btn {
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.9rem;
}

@media (max-width: 360px) {
  .hero__actions {
    grid-template-columns: 1fr;
  }
}

.home-panel {
  position: relative;
  z-index: 2;
  margin-top: -20px;
  padding: 0 14px 20px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(231, 238, 240, 0.98) 0%, var(--bg) 120px);
}

.home-menu {
  display: grid;
  gap: 10px;
  padding: 8px 2px 16px;
  grid-template-columns: 1fr 1fr;
}

.menu-tile {
  text-align: left;
  padding: 14px 14px 14px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
}

.menu-tile__icon {
  grid-row: 1 / span 2;
  font-size: 1.35rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(31, 107, 116, 0.1);
}

.menu-tile--trips .menu-tile__icon {
  background: rgba(31, 107, 116, 0.14);
}
.menu-tile--market .menu-tile__icon {
  background: rgba(208, 138, 42, 0.18);
}

.menu-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 107, 116, 0.35);
}

.menu-tile__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.menu-tile__hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.home-strip {
  margin: 4px 2px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.home-news {
  padding: 4px 2px 8px;
}

.home-news__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.home-news__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.link-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  padding: 6px 10px;
  border-radius: 8px;
}

.news-feed {
  display: grid;
  gap: 12px;
}

.news-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(11, 47, 54, 0.06);
  text-align: left;
  animation: rise 0.45s ease both;
}

.news-card--wide {
  grid-template-columns: 1fr;
}

.news-card__img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.news-card--wide .news-card__img {
  width: 100%;
  height: 160px;
}

.news-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-card__tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(31, 107, 116, 0.12);
  color: var(--teal);
}

.news-card__tag--event {
  background: rgba(208, 138, 42, 0.18);
  color: #8a5a12;
}

.news-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.news-card__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: auto;
}

.list--news {
  padding-top: 4px;
}

.list--news .news-card {
  grid-template-columns: 1fr;
}

.list--news .news-card__img {
  width: 100%;
  height: 180px;
}

.home-strip a {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

.home-strip img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.home-strip__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(11, 47, 54, 0.85));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

/* PAGE */
.page-head__sub--with-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.info-hint {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  background: rgba(31, 107, 116, 0.12);
  border: 1px solid rgba(31, 107, 116, 0.25);
}

.info-hint:hover,
.info-hint:focus-visible {
  background: rgba(31, 107, 116, 0.2);
}

.hint-popover {
  position: fixed;
  z-index: 80;
  max-width: min(300px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-deep);
  color: #f4f8f9;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

.hint-popover[hidden] {
  display: none !important;
}

.modal__pay-note {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.page-head {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 18px 16px 8px;
}

.page-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.page-head__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.back {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  position: relative;
}

.back::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(2px, -1px);
}

.filters {
  padding: 8px 16px 4px;
}

.filters--row {
  display: grid;
  gap: 10px;
}

@media (min-width: 560px) {
  .filters--row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  outline: none;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
}

.list {
  display: grid;
  gap: 10px;
  padding: 12px 16px 24px;
}

.row {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
  animation: rise 0.45s ease both;
}

.row:nth-child(2) {
  animation-delay: 0.04s;
}
.row:nth-child(3) {
  animation-delay: 0.08s;
}
.row:nth-child(4) {
  animation-delay: 0.12s;
}

.row:active {
  transform: scale(0.995);
}

.row__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.row__meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.row__price {
  margin-top: 4px;
  font-weight: 700;
  color: var(--teal);
}

.row__car {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bg-deep);
}

.row--with-photo {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
}

.row__thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.row__body {
  min-width: 0;
}

.field--photo input[type="file"] {
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.photo-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
}

.photo-preview[hidden] {
  display: none !important;
}

.field--photo input[type='file'] {
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
  font: inherit;
}

.empty,
.error,
.loading {
  padding: 28px 8px;
  text-align: center;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

/* TABBAR */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 8px 10px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(247, 251, 252, 0.9);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.tab {
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.tab.is-active {
  color: var(--bg-deep);
  background: rgba(31, 107, 116, 0.12);
}

/* MODAL */
.modal {
  border: 0;
  padding: 0;
  max-width: 100%;
  width: min(520px, calc(100% - 24px));
  background: transparent;
}

.modal::backdrop {
  background: rgba(11, 47, 54, 0.55);
  backdrop-filter: blur(4px);
}

.modal__panel {
  margin: 0;
  border-radius: 18px;
  background: #f7fbfc;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.modal__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  position: relative;
  background: rgba(19, 34, 38, 0.06);
}

.modal__close::before,
.modal__close::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  background: var(--ink);
}

.modal__close::before {
  transform: rotate(45deg);
}
.modal__close::after {
  transform: rotate(-45deg);
}

.modal__body {
  display: grid;
  gap: 12px;
  padding: 8px 16px 4px;
  max-height: 60vh;
  overflow: auto;
}

.modal__foot {
  padding: 12px 16px 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 18px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(90vw, 420px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-deep);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: var(--shadow-soft);
  animation: rise 0.3s ease both;
}

@media (min-width: 768px) {
  .hero__content {
    padding-left: 32px;
    padding-right: 32px;
  }

  .home-panel {
    padding-left: 24px;
    padding-right: 24px;
  }

  .home-menu {
    grid-template-columns: 1fr 1fr;
  }

  .page-head,
  .filters,
  .list,
  .trips-tabs-wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ——— Shops map ——— */
.view--shops-map {
  padding-bottom: 0;
}

.view--shops-map.is-active {
  display: block;
}

.shops-map-stage {
  position: relative;
  height: calc(100dvh - var(--tabbar-h) - var(--safe-bottom, 0px));
  min-height: 420px;
  overflow: hidden;
  background: #e8ecf1;
}

.shops-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.shops-map .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
}

.shops-map .leaflet-control-attribution {
  display: none;
}

.shops-map-fab {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 6;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--yandex-yellow, #ffcc00);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shops-map-fab:active {
  transform: scale(0.96);
}

.shops-map-popup__addr {
  font-size: 0.82rem;
  color: var(--muted, #8a8a8e);
}

.shops-map-popup__actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.shops-map-popup-products {
  margin-top: 0;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.shops-map-pin {
  background: transparent;
  border: none;
}

.shops-map-pin__dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffcc00;
  border: 2px solid #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.shops-map-pin--user .shops-map-pin__dot {
  background: #3d7bf5;
  border-color: #fff;
}

.shops-map-pin--new .shops-map-pin__dot {
  background: #ef4444;
  border-color: #fff;
  animation: shopsPinPulse 1.2s ease infinite;
}

.shops-map-pin--poi {
  background: transparent;
  border: none;
}

.shops-map-pin--marker {
  background: transparent;
  border: none;
}

.shops-map-pin__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  font-size: 0.95rem;
  line-height: 1;
}

.shops-map-pin--shop .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--shop,
.map-icon-picker__icon.shops-map-pin--shop {
  background: #ffcc00;
  color: #1a1a1a;
}

.shops-map-pin--church .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--church {
  background: #7c3aed;
  color: #fff;
}

.shops-map-pin--admin .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--admin {
  background: #0f766e;
  color: #fff;
}

.shops-map-pin--fuel .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--fuel,
.map-icon-picker__icon.shops-map-pin--fuel {
  background: #ea580c;
  color: #fff;
}

.shops-map-pin--hospital .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--hospital,
.map-icon-picker__icon.shops-map-pin--hospital {
  background: #dc2626;
  color: #fff;
}

.shops-map-pin--school .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--school,
.map-icon-picker__icon.shops-map-pin--school {
  background: #2563eb;
  color: #fff;
}

.shops-map-pin--kindergarten .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--kindergarten {
  background: #f59e0b;
  color: #fff;
}

.shops-map-pin--pharmacy .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--pharmacy,
.map-icon-picker__icon.shops-map-pin--pharmacy {
  background: #059669;
  color: #fff;
}

.shops-map-pin--bank .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--bank {
  background: #1d4ed8;
  color: #fff;
}

.shops-map-pin--post .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--post {
  background: #0369a1;
  color: #fff;
}

.shops-map-pin--police .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--police {
  background: #1e3a8a;
  color: #fff;
}

.shops-map-pin--fire .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--fire {
  background: #b91c1c;
  color: #fff;
}

.shops-map-pin--library .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--library {
  background: #7c2d12;
  color: #fff;
}

.shops-map-pin--market .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--market,
.map-icon-picker__icon.shops-map-pin--market {
  background: #65a30d;
  color: #fff;
}

.shops-map-pin--cafe .shops-map-pin__glyph,
.shops-map-legend__icon.shops-map-pin--cafe,
.map-icon-picker__icon.shops-map-pin--cafe {
  background: #92400e;
  color: #fff;
}

.shops-map-popup__type {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted, #8a8a8e);
}

@keyframes shopsPinPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.shops-map--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.shops-map-rain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(80, 120, 160, 0.12), rgba(40, 70, 110, 0.2));
  overflow: hidden;
}

.shops-map-rain::before,
.shops-map-rain::after {
  content: "";
  position: absolute;
  inset: -20% 0 0;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 14px,
    rgba(255, 255, 255, 0.08) 14px 15px
  );
  animation: shopsRain 1.2s linear infinite;
}

.shops-map-rain::after {
  animation-duration: 0.85s;
  opacity: 0.55;
}

@keyframes shopsRain {
  from {
    transform: translateY(-8%);
  }
  to {
    transform: translateY(18%);
  }
}

.shops-map-stage--rain .shops-map-top {
  backdrop-filter: blur(10px);
}

.shops-map-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 64px 10px 12px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.shops-map-top__back {
  position: static;
  transform: none;
}

.shops-map-top__text {
  min-width: 0;
}

.shops-map-top__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}

.shops-map-top__sub {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted, #8a8a8e);
}

.shops-map-weather {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #8a8a8e);
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
}

.shops-map-weather--rain {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.shops-map-views {
  position: absolute;
  top: 56px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  max-width: calc(100% - 24px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.shops-map-legend {
  position: absolute;
  top: 108px;
  left: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(220px, calc(100% - 24px));
  max-height: min(52dvh, 380px);
  overflow-y: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  -webkit-overflow-scrolling: touch;
}

.shops-map-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 7px 8px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.shops-map-legend__row.is-on {
  opacity: 1;
  background: rgba(0, 0, 0, 0.04);
}

.shops-map-legend__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.shops-map-legend__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1a1a;
}

.map-icon-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-icon-picker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  background: #fff;
}

.map-icon-picker__item:has(input:checked) {
  border-color: #3d7bf5;
  background: rgba(61, 123, 245, 0.08);
}

.map-icon-picker__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.map-icon-picker__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.map-icon-picker__label {
  font-size: 0.92rem;
  font-weight: 600;
}

.shops-map-view {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--muted, #8a8a8e);
  padding: 6px 11px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.shops-map-view.is-active {
  background: #1a1a1a;
  color: #fff;
}

.shops-map-fallback {
  position: absolute;
  top: 100px;
  left: 12px;
  right: 12px;
  bottom: 24px;
  z-index: 3;
  overflow: auto;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(0, 0, 0, 0.08));
}

.shops-map-fallback__note {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted, #8a8a8e);
}

.shops-map-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  max-height: 42%;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shops-map-sheet__handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.shops-map-sheet__content {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.shops-sheet-list-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #8a8a8e);
}

.shops-sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.shops-sheet-list > li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: stretch;
}

.shops-sheet-route {
  border: none;
  background: rgba(61, 123, 245, 0.12);
  color: var(--yandex-blue, #3d7bf5);
  border-radius: 12px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.shops-map-popup-route {
  border: none;
  background: #3d7bf5;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.shops-sheet-item {
  width: 100%;
  text-align: left;
  border: none;
  background: #f5f5f7;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
}

.shops-sheet-item__name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
}

.shops-sheet-item__meta {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted, #8a8a8e);
}

.shops-sheet-card__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.shops-sheet-card__meta,
.shops-sheet-card__desc,
.shops-sheet-card__phone {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted, #8a8a8e);
}

.shops-sheet-card__phone a {
  color: var(--yandex-blue, #3d7bf5);
  font-weight: 600;
  text-decoration: none;
}

.shops-sheet__rain-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.82rem;
}

.shops-sheet-back {
  border: none;
  background: none;
  padding: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yandex-blue, #3d7bf5);
  cursor: pointer;
}

.shops-sheet-card__actions {
  display: grid;
  gap: 8px;
}

.shops-map-add-pin {
  border: none;
  background: transparent;
  color: var(--yandex-blue, #3d7bf5);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
}

.shops-map-stage--add .shops-map {
  cursor: crosshair;
}

.shops-route-panel {
  position: absolute;
  top: 108px;
  right: 12px;
  z-index: 4;
  width: min(280px, calc(100% - 248px));
  max-height: 40%;
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(0, 0, 0, 0.1));
}

.shops-route-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.shops-route-panel__close {
  border: none;
  background: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #8a8a8e);
}

.shops-route-panel__meta {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.shops-route-panel__steps {
  margin: 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: var(--muted, #8a8a8e);
  display: grid;
  gap: 4px;
}

.shops-sheet-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #8a8a8e);
}
