/* ==========================================================================
   Паспорт туриста Сочи — приложение «Паспорт в телефоне»
   Светлая, читаемая на солнце тема: песок, терракота, море и латунь штампов.
   Большие цели для пальца, нижние вкладки, одна колонка на телефоне.
   ========================================================================== */

:root {
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;

  --bg: #f6f1e8;
  --bg-2: #efe7d9;
  --surface: #ffffff;
  --surface-2: #fbf8f3;
  --line: rgba(29, 42, 47, 0.1);
  --line-strong: rgba(29, 42, 47, 0.2);
  --text: #1d2a2f;
  --text-soft: #55646b;
  --muted: #7d8a90;

  --accent: #bf5c3d;
  --accent-dark: #a24a2e;
  --accent-soft: #f6e3dc;
  --sea: #1f6f6b;
  --sea-soft: #dcefec;
  --brass: #b8922e;
  --brass-soft: #f4ead0;
  --ok: #2f8f5b;
  --danger: #c0392b;

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --shadow: 0 10px 30px -18px rgba(29, 42, 47, 0.35);
  --shadow-soft: 0 4px 14px -8px rgba(29, 42, 47, 0.25);

  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body.app-body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
a {
  color: var(--sea);
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid rgba(31, 111, 107, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ layout */

#app {
  min-height: 100vh;
}
.app-boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}
.app-boot img {
  border-radius: 50%;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.screen {
  flex: 1;
  padding: 0 16px calc(var(--tabbar) + var(--safe-b) + 24px);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.screen--flush {
  padding-left: 0;
  padding-right: 0;
}
.screen--wide {
  max-width: 1100px;
}

/* top bar */
/* Leaflet stacks its panes up to z-index 1000, so the chrome sits above that. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(246, 241, 232, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 680px;
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}
.screen--wide .topbar__inner,
.topbar--wide .topbar__inner {
  max-width: 1100px;
}
.topbar__title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.topbar__brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.topbar__brand b {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}
.topbar__brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.iconbtn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  flex: none;
}
.iconbtn:active {
  transform: scale(0.96);
}
.iconbtn svg {
  width: 22px;
  height: 22px;
}

/* bottom tabs */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar__inner {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--tabbar);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
  position: relative;
}
.tab svg {
  width: 24px;
  height: 24px;
}
.tab[aria-current="page"] {
  color: var(--accent);
}
.tab__dot {
  position: absolute;
  top: 10px;
  right: calc(50% - 18px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
}

/* desktop: a side rail instead of the bottom bar */
@media (min-width: 900px) {
  :root {
    --tabbar: 0px;
  }
  .app {
    flex-direction: row;
    align-items: stretch;
  }
  .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 232px;
    flex: none;
    padding: 20px 14px;
    border-right: 1px solid var(--line);
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .rail__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
  }
  .rail__brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  .rail__brand b {
    display: block;
    font-size: 15px;
    line-height: 1.15;
  }
  .rail__brand span {
    display: block;
    font-size: 12px;
    color: var(--muted);
  }
  .rail .tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-soft);
  }
  .rail .tab[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }
  .rail .tab__dot {
    position: static;
    margin-left: auto;
  }
  .rail__foot {
    margin-top: auto;
    font-size: 12px;
    color: var(--muted);
    padding: 8px;
  }
  .rail__foot a {
    display: block;
    margin-top: 4px;
  }
  .main {
    flex: 1;
    min-width: 0;
  }
  .tabbar {
    display: none;
  }
  .screen {
    padding-bottom: 48px;
  }
}

/* ---------------------------------------------------------------- generic */

.kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}
h2 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
}
h3 {
  font-size: 16px;
  font-weight: 800;
}
.lead {
  color: var(--text-soft);
  font-size: 16px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.stack > * + * {
  margin-top: 14px;
}
.section {
  padding-top: 18px;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section__head a {
  font-size: 14px;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.card--flat {
  box-shadow: none;
}
.card--accent {
  background: var(--accent-soft);
  border-color: transparent;
}
.card--sea {
  background: var(--sea-soft);
  border-color: transparent;
}
.card--brass {
  background: var(--brass-soft);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.15s var(--ease), background 0.15s;
  text-align: center;
}
.btn:active {
  transform: scale(0.98);
}
.btn:hover {
  background: var(--accent-dark);
}
.btn svg {
  width: 20px;
  height: 20px;
}
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover {
  background: var(--surface-2);
}
.btn--sea {
  background: var(--sea);
}
.btn--sea:hover {
  background: #185a57;
}
.btn--brass {
  background: var(--brass);
  color: #1d1a12;
}
.btn--brass:hover {
  background: #a58226;
}
.btn--block {
  width: 100%;
}
.btn--small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 11px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

/* quick action tiles (call, route, show) */
.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.quick__item svg {
  width: 24px;
  height: 24px;
  color: var(--sea);
}
.quick__item:active {
  transform: scale(0.97);
}

/* chips */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
}
.chip b {
  font-weight: 700;
  color: var(--muted);
  font-size: 12px;
}
.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.chip[aria-pressed="true"] b {
  color: rgba(255, 255, 255, 0.7);
}

/* segmented */
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--bg-2);
}
.seg button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg button svg {
  width: 18px;
  height: 18px;
}
.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

/* search */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.search svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: none;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
}
.search button {
  color: var(--muted);
}

/* forms */
.field {
  display: block;
}
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 16px;
}
.field textarea {
  min-height: 84px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(31, 111, 107, 0.18);
}
.field--code input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-soft);
}
.check input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--accent);
}
.radio-list {
  display: grid;
  gap: 8px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.radio input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: none;
}
.radio span {
  flex: 1;
  font-weight: 600;
}
.radio b {
  color: var(--text-soft);
  font-weight: 700;
}
.radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.form-error {
  background: #fdecea;
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}
.form-ok {
  background: #e6f4ec;
  color: var(--ok);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

/* ----------------------------------------------------------------- places */

.place-list {
  display: grid;
  gap: 12px;
}
.place-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease);
}
.place-card:active {
  transform: scale(0.99);
}
.place-card.is-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.place-card__media {
  position: relative;
  background: var(--bg-2);
  min-height: 112px;
}
.place-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-card__body {
  padding: 12px 12px 12px 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.place-card__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.place-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13px;
  color: var(--muted);
}
.place-card__meta b {
  color: var(--sea);
  font-weight: 700;
}
.place-card__perk {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.place-card__perk--gift {
  background: var(--brass-soft);
  color: #7a5e14;
}
.place-card__perk--treat {
  background: var(--sea-soft);
  color: var(--sea);
}
.place-card__perk--service {
  background: #e9e6f5;
  color: #4f4490;
}
.stamp-mark {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brass);
  color: #1d1a12;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.stamp-mark svg {
  width: 16px;
  height: 16px;
}

/* district groups in long lists */
.group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ------------------------------------------------------------------- map */

.map-wrap {
  position: relative;
  height: 44vh;
  min-height: 260px;
  max-height: 440px;
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.map-wrap--full {
  height: calc(100vh - 56px - var(--tabbar) - var(--safe-b));
  max-height: none;
  border-radius: 0;
  border: 0;
}
.map {
  position: absolute;
  inset: 0;
}
.map-wrap .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.7);
}
.map-fab {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 500;
  display: grid;
  gap: 8px;
}
.pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
}
.pin--route {
  background: var(--sea);
}
.pin--pickup {
  background: var(--brass);
}
.pin--stamped {
  background: var(--brass);
}
.pin svg {
  width: 16px;
  height: 16px;
  color: #fff;
  transform: rotate(45deg);
}
.pin--me {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: none;
  background: #2a7fff;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(42, 127, 255, 0.25);
}
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  font-family: var(--font);
}
.leaflet-popup-content {
  margin: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
}
.leaflet-popup-content b {
  display: block;
  font-size: 15px;
}
.leaflet-popup-content a {
  font-weight: 800;
}
.map-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 600;
}

@media (min-width: 900px) {
  .nearby {
    display: grid;
    grid-template-columns: minmax(360px, 440px) 1fr;
    gap: 20px;
    align-items: start;
  }
  .nearby__map {
    position: sticky;
    top: 76px;
  }
  .nearby__map .map-wrap {
    height: calc(100vh - 100px);
    max-height: none;
  }
}

/* ------------------------------------------------------------------ detail */

.hero {
  position: relative;
  margin: 0 -16px;
  aspect-ratio: 4 / 3;
  max-height: 46vh;
  background: var(--bg-2);
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__back {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
}
.hero__share {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 40%, rgba(246, 241, 232, 0.2) 80%, var(--bg) 100%);
}
@media (min-width: 900px) {
  .hero {
    margin: 20px 0 0;
    border-radius: var(--r-l);
    aspect-ratio: 21 / 9;
  }
}
.detail-head {
  margin-top: -36px;
  position: relative;
  z-index: 1;
}
.detail-head h1 {
  margin-top: 6px;
}
.perk-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  background: var(--accent-soft);
}
.perk-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.perk-banner__icon svg {
  width: 24px;
  height: 24px;
}
.perk-banner b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  color: var(--accent-dark);
}
.perk-banner span {
  font-size: 13px;
  color: var(--text-soft);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.fact dt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.fact dd {
  font-weight: 700;
  margin-top: 2px;
}
.rows {
  display: grid;
  gap: 8px;
}
.rowline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}
.rowline svg {
  width: 20px;
  height: 20px;
  color: var(--sea);
  flex: none;
}
.rowline span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.rowline small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}
.prose {
  color: var(--text);
  font-size: 16px;
}
.prose p + p,
.prose ul,
.prose ol,
.prose h3 {
  margin-top: 12px;
}
.prose ul,
.prose ol {
  padding-left: 20px;
}
.prose img {
  border-radius: 12px;
  margin-top: 12px;
}
.prose a {
  text-decoration: underline;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery button {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.highlights {
  display: grid;
  gap: 8px;
}
.highlight {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.highlight i {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sea-soft);
  color: var(--sea);
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
}
.highlight b {
  display: block;
}
.highlight p {
  font-size: 14px;
  color: var(--text-soft);
}

/* lightbox */
dialog.lightbox {
  border: 0;
  padding: 0;
  background: rgba(10, 14, 16, 0.96);
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
}
dialog.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}
.lightbox__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
}
.lightbox__nav {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 2;
}
.lightbox__nav .iconbtn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: transparent;
}
.lightbox__caption {
  position: absolute;
  bottom: 84px;
  left: 16px;
  right: 16px;
  text-align: center;
  color: #fff;
  font-size: 14px;
}

/* bottom sheet */
dialog.sheet {
  border: 0;
  padding: 0;
  margin: auto 0 0;
  width: 100%;
  max-width: 100%;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  padding-bottom: var(--safe-b);
}
dialog.sheet::backdrop {
  background: rgba(29, 42, 47, 0.45);
}
.sheet__inner {
  padding: 10px 18px 22px;
  max-width: 680px;
  margin: 0 auto;
}
.sheet__grip {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-strong);
  margin: 0 auto 14px;
}
@media (min-width: 900px) {
  dialog.sheet {
    margin: auto;
    max-width: 520px;
    border-radius: 22px;
  }
}

/* ----------------------------------------------------------------- stamps */

.progress {
  height: 10px;
  border-radius: 6px;
  background: var(--bg-2);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brass), #d7b35a);
  border-radius: 6px;
  transition: width 0.6s var(--ease);
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (min-width: 480px) {
  .stamp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: var(--text);
}
.stamp__seal {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  border: 2px dashed var(--line-strong);
  color: var(--muted);
  background: var(--surface);
  overflow: hidden;
}
.stamp__seal span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
}
.stamp__seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.35;
}
.stamp--on .stamp__seal {
  border: 3px solid var(--brass);
  color: #6d5413;
  background: var(--brass-soft);
  box-shadow: inset 0 0 0 3px #fff, 0 6px 14px -8px rgba(184, 146, 46, 0.8);
  transform: rotate(-6deg);
}
.stamp--on .stamp__seal img {
  filter: none;
  opacity: 1;
}
.stamp--fresh .stamp__seal {
  animation: stamp-in 0.7s var(--ease);
}
@keyframes stamp-in {
  0% {
    transform: scale(1.6) rotate(-18deg);
    opacity: 0;
  }
  60% {
    transform: scale(0.95) rotate(-4deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(-6deg);
  }
}
.stamp__title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stamp__date {
  font-size: 11px;
  color: var(--muted);
}

/* passport card */
.passport-card {
  position: relative;
  border-radius: 22px;
  padding: 22px 22px 20px;
  background: radial-gradient(120% 120% at 0% 0%, #163538 0%, #0c1a1c 60%);
  color: #f0ece2;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.passport-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  pointer-events: none;
}
.passport-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.passport-card__row img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.passport-card__brand {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.1;
}
.passport-card__sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4af37;
}
.passport-card__name {
  margin-top: 22px;
  font-size: 13px;
  color: #c3bcae;
}
.passport-card__name b {
  display: block;
  font-size: 20px;
  color: #f0ece2;
  font-weight: 700;
}
.passport-card__code {
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.passport-card__code span {
  font-size: 11px;
  color: #c3bcae;
  display: block;
}
.passport-card__code b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  letter-spacing: 0.14em;
  color: #f0d98a;
}
.passport-card__stamps {
  text-align: right;
  font-size: 12px;
  color: #c3bcae;
}
.passport-card__stamps b {
  display: block;
  font-size: 22px;
  color: #f0ece2;
  font-family: var(--font-display);
}
.passport-card--big {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.passport-card--big .passport-card__code b {
  font-size: 34px;
}
.show-screen {
  min-height: 100vh;
  background: #0c1a1c;
  padding: 16px 16px calc(24px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f0ece2;
}
.show-screen .passport-card {
  flex: 0 0 auto;
  width: 100%;
  max-width: 420px;
  margin: auto 0;
  align-self: center;
  aspect-ratio: 1 / 1.35;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.show-screen p {
  text-align: center;
  color: #c3bcae;
  font-size: 14px;
}
.pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f8f5b;
  box-shadow: 0 0 0 0 rgba(47, 143, 91, 0.6);
  animation: pulse 1.6s infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes pulse {
  to {
    box-shadow: 0 0 0 12px rgba(47, 143, 91, 0);
  }
}

/* --------------------------------------------------------------- misc */

.hero-block {
  position: relative;
  margin: 12px 0 0;
  border-radius: var(--r-l);
  overflow: hidden;
  background: #0c1a1c;
  color: #f0ece2;
  padding: 24px 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.hero-block img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero-block > * {
  position: relative;
}
.hero-block h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}
.hero-block p {
  color: #d9d3c5;
  font-size: 14px;
}
.hero-block .kicker {
  color: #d4af37;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sea-soft);
  color: var(--sea);
  font-size: 14px;
  font-weight: 600;
}
.notice svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.offline-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 64px;
  z-index: 1040;
  padding: 10px 14px;
  border-radius: 12px;
  background: #1d2a2f;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar) + var(--safe-b) + 16px);
  transform: translateX(-50%);
  z-index: 1060;
  padding: 12px 18px;
  border-radius: 14px;
  background: #1d2a2f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  text-align: center;
  animation: toast-in 0.3s var(--ease);
}
.toast--error {
  background: var(--danger);
}
@keyframes toast-in {
  from {
    transform: translate(-50%, 12px);
    opacity: 0;
  }
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 12px;
}
.empty svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  opacity: 0.5;
}
.price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}
.price-row + .price-row {
  margin-top: 6px;
}
.price-row--total {
  font-weight: 800;
  font-size: 18px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.skeleton {
  height: 110px;
  border-radius: var(--r-m);
  background: linear-gradient(90deg, var(--bg-2), var(--surface), var(--bg-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Несколько штампов одного партнёра: дополнительные печати рядом с основной */
.stamp__extra {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.stamp__extra img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.stamp__extra--album {
  justify-content: center;
}

/* Список печатей партнёра: у одного места их бывает несколько */
.stamp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.stamp-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stamp-row .stamp {
  width: 56px;
  height: 56px;
}

/* Фото путешественника в карточке Паспорта */
.passport-card__photo {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(229, 180, 92, 0.65);
  display: grid;
  place-items: center;
  color: #c3bcae;
  font-size: 12px;
}
.passport-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.passport-card__who {
  min-width: 0;
}
.passport-card__stamps--bottom {
  margin-top: 14px;
}

/* Понятная загрузка фото */
.passport-card__photo {
  position: relative;
}
.passport-card__photo--clickable {
  cursor: pointer;
}
.passport-card__photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
  text-align: center;
  font-size: 10px;
}
.passport-card__photo-empty svg {
  width: 22px;
  height: 22px;
}
.passport-card__photo-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5b45c;
  color: #1d2a25;
  border: 2px solid #1f2b27;
}
.passport-card__photo-badge svg {
  width: 14px;
  height: 14px;
}
.photo-card .photo-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.photo-upload__circle {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  border: 2px dashed rgba(229, 180, 92, 0.75);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #c3bcae;
}
.photo-upload__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-upload__circle svg {
  width: 30px;
  height: 30px;
}
.photo-upload__text {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
