:root {
  --ink: #1a2433;
  --ink-soft: #3d4a5c;
  --paper: #f3f0e8;
  --paper-2: #e8e4d8;
  --water: #1c4b6e;
  --water-deep: #0f2d44;
  --mist: #9eb6c8;
  --brass: #b08a3c;
  --brass-light: #d4b56a;
  --stone: #6b737c;
  --ok: #2f6b4f;
  --danger: #8b3a3a;
  --shadow: 0 18px 50px rgba(15, 45, 68, 0.18);
  --radius: 4px;
  --font-display: "Unbounded", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --header-h: 64px;
  --player-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

html.no-smooth-scroll {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(158, 182, 200, 0.35), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(176, 138, 60, 0.12), transparent 55%),
    linear-gradient(180deg, #dfe8ef 0%, var(--paper) 42%, var(--paper-2) 100%);
  line-height: 1.5;
}

/* Главная: ровно один экран без микропрокрутки (учёт панели браузера) */
body:has(#view-home.is-active) {
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0.75rem 1.25rem;
  background: rgba(15, 45, 68, 0.92);
  color: #f7f4ec;
  backdrop-filter: blur(10px);
}

.header-start {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  max-width: 100%;
}

.brand strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: normal;
  line-height: 1.25;
}

.header-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: nowrap;
  align-items: center;
}

.mode-switch {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border-radius: var(--radius);
  background: rgba(15, 45, 68, 0.45);
  border: 1px solid rgba(247, 244, 236, 0.22);
}

.mode-switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(247, 244, 236, 0.72);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.85rem;
  border-radius: calc(var(--radius) - 1px);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.mode-switch-btn:hover {
  color: #f7f4ec;
  background: rgba(247, 244, 236, 0.08);
}

.mode-switch-btn.is-active {
  background: var(--brass);
  color: #1a1408;
  font-weight: 700;
}

.mode-switch-btn.is-active:hover {
  background: var(--brass-light);
  color: #1a1408;
}

.header-mo {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
  align-self: center;
}

.header-mo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn-icon {
  box-sizing: border-box;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: var(--radius);
  background: rgba(247, 244, 236, 0.1);
  color: #f7f4ec;
  border: 1px solid rgba(247, 244, 236, 0.25);
}

.btn-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(247, 244, 236, 0.18);
}

.voice-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius);
  border: 1px solid rgba(247, 244, 236, 0.25);
  background: rgba(0, 0, 0, 0.2);
}

.voice-switch-light {
  border-color: rgba(26, 36, 51, 0.18);
  background: rgba(26, 36, 51, 0.06);
  width: 100%;
}

.voice-switch-light .voice-btn {
  flex: 1;
  color: var(--ink-soft);
}

.voice-switch-light .voice-btn.is-active {
  background: var(--brass);
  color: #1a1408;
}

.voice-btn {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  color: rgba(247, 244, 236, 0.8);
  font-size: 0.8rem;
  font-weight: 600;
}

.voice-btn.is-active {
  background: var(--brass);
  color: #1a1408;
}

.voice-hint {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: rgba(247, 244, 236, 0.8);
}

.voice-hint strong {
  color: var(--brass-light);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brass);
  color: #1a1408;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--brass-light);
}

.btn-ghost {
  background: rgba(247, 244, 236, 0.1);
  color: #f7f4ec;
  border: 1px solid rgba(247, 244, 236, 0.25);
}

.btn-ghost:hover {
  background: rgba(247, 244, 236, 0.18);
}

.btn-dark {
  background: var(--water-deep);
  color: #f7f4ec;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  border: 1px solid rgba(28, 75, 110, 0.35);
  color: var(--water);
  background: rgba(255, 255, 255, 0.45);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

#view-home.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1.25rem 1.15rem 1rem;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 45, 68, 0.15) 0%, rgba(15, 45, 68, 0.72) 55%, rgba(15, 45, 68, 0.92) 100%),
    url("../images/hero-neva.svg") center/cover no-repeat;
  transform: scale(1.02);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: scale(1.02) translateY(0);
  }
  to {
    transform: scale(1.06) translateY(-1.5%);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  color: #f7f4ec;
  text-align: center;
}

.hero-kicker {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe4a3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.hero-kicker a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hero-kicker a:hover {
  color: #fff6d8;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.05;
  font-weight: 600;
}

.hero p {
  margin: 0 auto 1.5rem;
  max-width: 32rem;
  font-size: 1.05rem;
  color: rgba(247, 244, 236, 0.88);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.voice-hint {
  text-align: center;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 7rem;
}

.site-footer {
  flex-shrink: 0;
  padding: 0.35rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: rgba(15, 45, 68, 0.06);
  border-top: 1px solid rgba(28, 75, 110, 0.12);
}

.site-footer p {
  margin: 0;
  max-width: 40rem;
  margin-inline: auto;
  line-height: 1.35;
}

.site-footer-meta {
  margin-top: 0.15rem !important;
  font-size: 0.7rem;
  opacity: 0.9;
}

.site-footer a {
  color: var(--water);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--water-deep);
}

.legal-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.legal-main {
  flex: 1;
  padding: 1.25rem 1rem 2rem;
}

.legal-card {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.35rem 1.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 75, 110, 0.12);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--water-deep);
}

.legal-card h2 {
  margin: 1.25rem 0 0.45rem;
  font-size: 1.02rem;
  color: var(--water-deep);
}

.legal-card p,
.legal-card li {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}

.legal-card ul {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
}

.legal-card a {
  color: var(--water);
}

.panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(28, 75, 110, 0.12);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}

/* Карточка точки — непрозрачная, иначе сквозь неё «ездит» градиент фона */
.panel.detail {
  background: #f7f4ec;
}

.route-bar {
  display: grid;
  gap: 0;
  padding: 0.45rem 0.85rem 0.55rem;
  background: linear-gradient(90deg, var(--water-deep), var(--water));
  color: #f7f4ec;
  text-align: center;
}

.progress-wrap {
  display: grid;
  gap: 0.3rem;
  max-width: 28rem;
  width: 100%;
  margin: 0 auto;
}

.progress-label {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brass), var(--brass-light));
  transition: width 0.35s ease;
}

.map-layout {
  display: grid;
  grid-template-columns: 2.15fr 1fr;
  min-height: calc(100dvh - var(--header-h) - 5.5rem);
}

.map-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#map {
  flex: 1;
  min-height: 420px;
  background: #c5d3de;
}

.map-place-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0.7rem 1rem;
  border: 0;
  border-top: 1px solid rgba(28, 75, 110, 0.12);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  line-height: 1.3;
}

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

.map-place-chip:hover,
.map-place-chip:focus-visible {
  background: rgba(28, 75, 110, 0.06);
  outline: none;
}

.place-list {
  max-height: calc(100dvh - var(--header-h) - 5.5rem);
  overflow: auto;
  background: rgba(243, 240, 232, 0.92);
}

.place-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.9rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(28, 75, 110, 0.1);
  color: inherit;
  transition: background 0.2s ease;
}

.place-item:hover,
.place-item.is-active {
  background: rgba(28, 75, 110, 0.08);
}

.place-item.is-near {
  box-shadow: inset 3px 0 0 var(--ok);
}

.place-item.is-audio .place-order {
  background: #1e6bb8;
  color: #fff;
}

.place-item.is-route-red .place-order {
  background: #c0392b;
  color: #fff;
}

.place-item.is-route-red.is-active .place-order {
  background: #8b1e14;
}

.place-item.is-route-red.is-near {
  box-shadow: inset 3px 0 0 #c0392b;
}

.place-item.is-done .place-order {
  background: var(--ok);
  color: #fff;
}

.place-item.is-candidate .place-order {
  background: #2f9e44;
  color: #f7f4ec;
}

.place-list-sep {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2f6b4f;
  background: rgba(47, 158, 68, 0.1);
  border-bottom: 1px solid rgba(47, 110, 79, 0.15);
  text-align: center;
}

.place-order {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  background: #2f9e44;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.place-item h3 {
  margin: 0 0 0.15rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.place-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.place-play {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(176, 138, 60, 0.15);
  color: var(--water-deep);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
}

.place-play-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: block;
  margin: 0;
}

.detail {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "media"
    "actions"
    "body";
  gap: 0;
}

.detail-media {
  grid-area: media;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(160deg, #163a55 0%, var(--water-deep) 55%, #0a1f30 100%);
  position: relative;
}

.detail-media::after {
  display: none;
}

.detail-media h2 {
  margin: 0;
  max-width: 36rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: #f7f4ec;
}

.detail-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(28, 75, 110, 0.12);
  background: #f3f0e8;
}

.detail-play-row {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  max-width: 22rem;
  margin-right: auto;
  margin-left: 0.15rem;
}

.detail-play-row #btn-play {
  flex: 1 1 auto;
  min-width: 0;
}

.detail-play-row #btn-photos {
  flex: 0 0 auto;
  min-width: 5.25rem;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.detail-actions .btn-ghost {
  color: var(--water);
  border: 1px solid rgba(28, 75, 110, 0.35);
  background: #fff;
}

.detail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
}

.detail-nav .btn {
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 1rem;
  line-height: 1;
}

.detail-nav-arrow {
  width: 2.7rem;
  height: 2.7rem;
  display: block;
  flex-shrink: 0;
}

.detail-body {
  grid-area: body;
  padding: 1.25rem 1.35rem 2rem;
  text-align: center;
  background: #f7f4ec;
}

.detail-body .eyebrow {
  margin: 0 0 0.5rem;
  color: var(--brass);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-address {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.detail-text {
  margin: 0 auto;
  color: var(--ink);
  font-size: 1.02rem;
  max-width: 40rem;
  text-align: center;
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  min-height: var(--player-h);
  padding: 0.75rem 1rem;
  background: rgba(15, 45, 68, 0.96);
  color: #f7f4ec;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.player.is-visible {
  display: grid;
  animation: rise 0.3s ease both;
}

.player-info {
  min-width: 0;
}

.player-info strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.player-progress {
  width: 100%;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(247, 244, 236, 0.18);
  overflow: hidden;
}

.player-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brass), var(--brass-light));
  transition: width 0.15s linear;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-btn {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brass);
  color: #1a1408;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.player-close {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 236, 0.25);
  color: #f7f4ec;
  font-size: 1rem;
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 1rem);
  transform: translateX(-50%) translateY(12px);
  z-index: 60;
  max-width: min(92vw, 420px);
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  background: rgba(26, 36, 51, 0.92);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 68;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) 1rem
    max(0.75rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

body:has(.player.is-visible) .settings-sheet {
  padding-bottom: max(0.75rem, calc(var(--player-h) + 0.5rem));
}

.settings-sheet[hidden] {
  display: none;
}

.photo-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.5rem
    max(0.5rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.photo-sheet[hidden] {
  display: none;
}

.photo-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 22, 0.88);
}

.photo-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  max-height: calc(
    100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: #f7f4ec;
  border-radius: 0;
  box-shadow: none;
}

.photo-sheet-stage {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  max-height: inherit;
  margin: 0 auto;
}

.photo-sheet-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.45rem;
  padding: 0 0.1rem;
}

.photo-sheet-close {
  position: static;
  color: #f7f4ec !important;
  border: 1px solid rgba(247, 244, 236, 0.4) !important;
  background: rgba(15, 45, 68, 0.55) !important;
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  box-shadow: none;
}

.photo-sheet-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  background: transparent;
}

.photo-sheet-gallery img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(
    100dvh - 3.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
  object-fit: contain;
  background: transparent;
  border-radius: 2px;
}

.photo-sheet-empty {
  margin: 0.5rem 0 0;
  color: rgba(247, 244, 236, 0.75);
  font-size: 0.95rem;
  text-align: center;
}

.settings-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 45, 68, 0.55);
}

.settings-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: calc(
    100dvh - 1.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.85rem 1rem 0.9rem;
  background: #f7f4ec;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

body:has(.player.is-visible) .settings-sheet-panel {
  max-height: calc(
    100dvh - var(--player-h) - 2rem - env(safe-area-inset-top, 0px) -
      env(safe-area-inset-bottom, 0px)
  );
}

.feedback-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.feedback-types .voice-btn {
  background: rgba(26, 36, 51, 0.06);
  color: var(--ink-soft);
  border: 1px solid rgba(26, 36, 51, 0.18);
}

.feedback-types .voice-btn.is-active {
  background: var(--water);
  color: #f7f4ec;
  border-color: var(--water);
}

.settings-sheet-panel h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.settings-label {
  margin: 0.65rem 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.settings-sheet-panel > .settings-label:first-of-type {
  margin-top: 0;
}

.settings-label + .voice-switch {
  margin-bottom: 0.15rem;
}

.settings-note {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.feedback-email {
  display: block;
  width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(28, 75, 110, 0.28);
  border-radius: 10px;
  background: rgba(243, 240, 232, 0.9);
  color: var(--water);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  user-select: all;
  -webkit-user-select: all;
}

.feedback-email:hover,
.feedback-email:focus-visible {
  border-color: rgba(28, 75, 110, 0.55);
  outline: none;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.settings-actions .btn {
  min-height: 38px;
  padding: 0.4rem 0.75rem;
}

.settings-actions-inline {
  flex-wrap: nowrap;
  align-items: stretch;
}

.settings-actions-inline .btn {
  flex: 0 1 auto;
  width: auto;
  white-space: nowrap;
}

.settings-actions-inline [data-settings-close] {
  flex: 0 0 auto;
  padding-inline: 0.85rem;
}

.settings-actions .btn-ghost {
  background: rgba(26, 36, 51, 0.06);
  color: var(--ink-soft);
  border: 1px solid rgba(26, 36, 51, 0.18);
}

.settings-actions .btn-ghost:hover {
  background: rgba(26, 36, 51, 0.1);
}

@media (min-width: 640px) {
  .geo-help {
    align-items: center;
    padding-bottom: 1rem;
  }
}

.geo-help {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(var(--player-h) + 1rem);
}

.geo-help[hidden] {
  display: none;
}

.geo-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 45, 68, 0.55);
}

.geo-help-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(78dvh, 560px);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.35rem;
  background: #f7f4ec;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.geo-help-panel h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.geo-help-panel p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.geo-help-denied {
  color: var(--danger) !important;
  font-weight: 600;
}

.geo-help-steps {
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.geo-help-steps li + li {
  margin-top: 0.65rem;
}

.geo-help-steps strong {
  color: var(--ink);
}

.geo-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.geo-help-actions .btn-ghost {
  background: rgba(26, 36, 51, 0.06);
  color: var(--ink-soft);
  border: 1px solid rgba(26, 36, 51, 0.18);
}

.geo-help-actions .btn-ghost:hover {
  background: rgba(26, 36, 51, 0.1);
}

@media (min-width: 640px) {
  .geo-help {
    align-items: center;
    padding-bottom: 1rem;
  }
}

#map .ymaps-2-1-79-map,
#map ymaps {
  border-radius: 0;
}

/* ПК: карта шире за счёт всей ширины окна, список не сжимать; всё в один экран */
@media (min-width: 901px) {
  body:has(#view-route.is-active) {
    height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  body:has(#view-route.is-active) main {
    flex: 1 1 auto;
    min-height: 0;
  }

  #view-route.is-active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  #view-route .shell {
    max-width: none;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.4rem 1rem 0.45rem;
    box-sizing: border-box;
  }

  body:has(.player.is-visible) #view-route .shell {
    padding-bottom: calc(var(--player-h) + 0.35rem);
  }

  #view-route .panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #view-route .map-layout {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  }

  #view-route .map-stack {
    min-height: 0;
    height: 100%;
  }

  #view-route #map {
    min-height: 0;
    height: 100%;
  }

  #view-route .place-list {
    max-height: none;
    height: 100%;
    min-height: 0;
    overflow: auto;
  }

  body:has(#view-route.is-active) .site-footer {
    padding: 0.25rem 1rem;
  }

  body:has(#view-route.is-active) .site-footer p {
    line-height: 1.25;
  }
}

@media (max-width: 900px) {
  /* Один скролл страницы: сверху большая карта + 1 адрес, ниже — весь список */
  .map-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .map-stack {
    min-height: calc(100dvh - var(--header-h) - 4.2rem - 5.6rem);
  }

  #map {
    min-height: calc(100dvh - var(--header-h) - 4.2rem - 5.6rem);
  }

  .place-list {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .shell {
    padding-top: 0.4rem;
    padding-bottom: calc(var(--player-h) + 0.75rem);
  }
}

@media (max-width: 600px) {
  .app-header {
    align-items: center;
    padding: 0.45rem 0.75rem;
    min-height: 0;
  }

  .header-start {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.3rem;
  }

  .brand strong {
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.2;
    padding-right: 0.25rem;
  }

  .header-mo {
    width: 64px;
    height: 64px;
    align-self: center;
    max-width: 64px;
    max-height: 64px;
  }

  .voice-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }

  .hero {
    padding: 0.5rem 0.85rem 0.4rem;
    align-content: center;
  }

  .hero-kicker {
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .hero h1 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.45rem, 6.5vw, 2rem);
  }

  .hero p {
    margin-bottom: 0.65rem;
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .hero-cta {
    gap: 0.5rem;
  }

  .voice-hint {
    margin-top: 0.55rem;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .site-footer {
    padding: 0.22rem 0.75rem 0.28rem;
    font-size: 0.65rem;
    line-height: 1.25;
  }

  .site-footer p {
    line-height: 1.25;
  }

  .site-footer-meta {
    margin-top: 0.08rem !important;
    font-size: 0.62rem;
  }

  .shell {
    padding: 0.5rem 0.75rem calc(var(--player-h) + 0.75rem);
  }

  .btn {
    min-height: 38px;
    padding: 0.45rem 0.8rem;
  }

  .btn-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .btn-icon svg {
    width: 24px;
    height: 24px;
  }
}
