/* QR-квест ЦМИ — светлый пергамент по макету заказчика */

:root {
  --paper: #f3ead6;
  --paper-2: #efe3c8;
  --cream: #faf4e6;
  --ink: #2a2118;
  --ink-soft: #4a3d30;
  --muted: #7a6a55;
  --wine: #6b1d22;
  --wine-dk: #54151a;
  --gold: #b08a3a;
  --gold-lt: #d4b36a;
  --line: rgba(107, 29, 34, 0.22);
  --line-soft: rgba(42, 33, 24, 0.12);
  --green: #3d6b3a;
  --grey-shoe: #8a8072;

  --serif: 'Playfair Display', 'Times New Roman', serif;
  --body: 'Cormorant Garamond', Georgia, serif;
  --ui: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --shell-w: 430px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

/*
 * Атрибут hidden прячет элемент через display в стилях браузера, поэтому любое
 * своё display (например flex у рядов кнопок) его перебивает. Возвращаем
 * атрибуту силу один раз для всей вёрстки, чтобы не ловить это в каждом блоке.
 */
[hidden] { display: none !important; }

body {
  background: #e4d6b8;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
}

.stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  background:
    radial-gradient(900px 500px at 10% 0%, #f6edd8 0%, transparent 55%),
    #e4d6b8;
}

.stage-aside { display: none; width: 300px; color: var(--ink-soft); }
.stage-aside h1 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.12;
  color: var(--wine);
  margin: 0 0 6px;
}
.stage-aside .sub { font-family: var(--body); font-size: 18px; margin: 0 0 18px; }
.stage-aside .rule { height: 1px; background: linear-gradient(90deg, var(--gold), transparent); margin: 16px 0; }
.stage-aside dl { margin: 0; font-size: 13px; }
.stage-aside dt { color: var(--wine); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; margin-top: 12px; }
.stage-aside dd { margin: 3px 0 0; }
.aside-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.shell {
  position: relative;
  width: var(--shell-w);
  height: min(92vh, 900px);
  background:
    linear-gradient(180deg, rgba(255,250,240,.35), transparent 28%),
    var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 80px rgba(107, 29, 34, 0.04);
}

.shell::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

@media (min-width: 1060px) {
  .stage-aside { display: block; }
  .shell {
    border-radius: 28px;
    border: 1px solid rgba(107, 29, 34, 0.18);
    box-shadow: 0 40px 80px -36px rgba(42, 33, 24, 0.45), 0 0 0 8px #d9c8a4;
  }
}
@media (max-width: 640px) {
  .stage { gap: 0; }
  .shell { width: 100%; height: 100%; }
}

/* Header */
.topbar {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.nav-ico {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--wine);
  display: grid;
  justify-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px;
  font-family: var(--ui);
}
.nav-ico svg { width: 22px; height: 22px; }
.nav-ico span { font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.brand { text-align: center; min-width: 0; }
.brand b {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--wine);
  line-height: 1.15;
}
.brand span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow.tight { margin: 0 0 2px; justify-content: center; font-size: 9px; }

/* Views */
.views { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; }
.view { position: absolute; inset: 0; display: none; flex-direction: column; min-height: 0; }
.view.active { display: flex; }
.scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.scroll::-webkit-scrollbar { width: 3px; }
.scroll::-webkit-scrollbar-thumb { background: var(--gold); }

h1.display {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 7.4vw, 32px);
  line-height: 1.12;
  color: var(--wine);
  margin: 0 0 14px;
  text-wrap: balance;
}
h2.title {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.16;
  color: var(--wine);
  margin: 0 0 8px;
}
.prose { font-family: var(--body); font-size: 18.5px; line-height: 1.5; color: var(--ink-soft); }
.prose p { margin: 0 0 12px; }
.subtitle { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }

.flourish {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
  color: var(--gold);
}
.flourish i {
  width: 42px;
  height: 10px;
  background:
    radial-gradient(circle at 8px 5px, var(--gold) 1.4px, transparent 1.6px),
    linear-gradient(var(--gold), var(--gold)) center / 100% 1px no-repeat;
}

.frame {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.45);
}
.frame::before, .frame::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
}
.frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.btn {
  appearance: none;
  border: 1px solid var(--wine);
  background: transparent;
  color: var(--wine);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 4px;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  width: 100%;
  background: var(--wine);
  color: #f8efdc;
  border-color: var(--wine-dk);
  padding: 14px 16px;
}
.btn-ghost { background: transparent; }
/* Редкое действие рядом с основными: рамки нет, но зона нажатия та же. */
.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

.sticky-cta {
  flex: 0 0 auto;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(243, 234, 214, 0.6), var(--paper) 50%);
}

/* Start */
.start-hero { padding: 22px 22px 18px; }
.task-card { padding: 14px 16px; margin: 16px 0 20px; }
.task-card .lbl {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.task-card .val { font-family: var(--serif); font-size: 18px; color: var(--ink); line-height: 1.25; }

.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.step-cell {
  border: 1px solid var(--line);
  background: rgba(255,250,240,.5);
  padding: 14px 10px 12px;
  text-align: center;
}
.step-cell svg { width: 28px; height: 28px; color: var(--wine); }
.step-cell b { display: block; font-family: var(--serif); font-size: 14px; color: var(--wine); margin-top: 8px; }
.step-cell span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.hint-line { font-family: var(--body); font-size: 16px; color: var(--muted); margin: 0; }

/* Map */
.map-toolbar { flex: 0 0 auto; padding: 10px 16px 0; }
.floor-switch {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--gold);
  overflow: hidden;
  border-radius: 4px;
}
.floor-switch button {
  appearance: none;
  background: var(--cream);
  border: 0;
  border-right: 1px solid var(--gold);
  color: var(--ink-soft);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 6px;
  cursor: pointer;
}
.floor-switch button:last-child { border-right: 0; }
.floor-switch button.on { background: var(--wine); color: #f8efdc; }

.map-canvas {
  position: relative;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
  aspect-ratio: 1000 / 400;
  max-height: 52vh;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(156, 186, 122, 0.18), transparent 58%),
    var(--cream);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  touch-action: none;
}
.map-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.map-canvas svg:active { cursor: grabbing; }

.map-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  gap: 4px;
}
.map-zoom button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--gold);
  background: var(--cream);
  color: var(--wine);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
  padding: 0;
}
.map-zoom button:active { background: #f4e1dc; }

.plan-svg .map-paper { fill: #f7f0df; }

/* Чертёж заказчика рисуется своими цветами — здесь ему ничего не навязываем. */
.plan-svg .plan-art { pointer-events: none; }

/*
 * Зоны квеста лежат поверх плана прозрачной плёнкой: пройденный зал зеленеет.
 * Текущий зал не обводим — обводка спорила с цветами чертежа; что точка
 * выбрана, видно по самой подкове.
 */
.plan-svg .zone {
  fill: transparent;
  cursor: pointer;
}
.plan-svg .zone.is-open { fill: rgba(92, 132, 84, 0.26); }
.plan-svg .lead-line {
  stroke: var(--wine);
  stroke-width: 1.1;
  stroke-dasharray: 3 4;
  opacity: 0.45;
}

.floor-points {
  margin: 4px 16px 10px;
}
.floor-points .lbl {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 6px 0 6px 2px;
}
.fp-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  margin-bottom: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 3px solid var(--grey-shoe);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--ui);
}
.fp-row.is-wine { border-left-color: var(--wine); background: #f6e7e2; }
.fp-row.is-green { border-left-color: var(--green); }
.fp-num {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--wine);
  text-align: center;
}
.fp-name { font-size: 14px; color: var(--ink); line-height: 1.25; }
.fp-state {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.fp-row.is-green .fp-state { color: var(--green); }
.fp-row.is-wine .fp-state { color: var(--wine); }

.legend-box {
  margin: 10px 16px 8px;
  padding: 10px 12px 8px;
  width: calc(100% - 32px);
}
.legend-box .lbl {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 3px 0;
}
.shoe-ico { width: 18px; height: 18px; display: grid; place-items: center; }
.shoe-ico svg { width: 18px; height: 18px; }
.shoe-ico.grey { color: var(--grey-shoe); }
.shoe-ico.wine { color: var(--wine); }
.shoe-ico.green { color: var(--green); }

.map-cta { display: grid; gap: 10px; }
.cta-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.cta-note svg { color: var(--gold); flex: 0 0 auto; }

.route-banner {
  flex: 0 0 auto;
  margin: 0 16px 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f8efdc;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--wine);
}
.route-banner p { margin: 0; font-family: var(--body); font-size: 16.5px; line-height: 1.35; color: var(--ink); }

/* SVG map layers */
.zone-fill-dead { fill: #efe6d2; stroke: #b7a78c; stroke-width: 1; }
.zone-label {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: #5a4a38;
  pointer-events: none;
}
.zone-sub {
  font-family: var(--ui);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: #8a7a64;
  pointer-events: none;
}
.zone-hit { fill: transparent; cursor: pointer; }

.marker { cursor: pointer; }
.marker .shoe { fill: none; stroke: var(--grey-shoe); stroke-width: 2.1; }
.marker .disc { fill: #f7f0df; stroke: #b7a78c; stroke-width: 1; }
.marker .num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
}
.marker.is-current .shoe { stroke: var(--wine); }
.marker.is-current .disc { fill: #f4e1dc; stroke: var(--wine); }
.marker.is-current .num { fill: var(--wine); }
.marker.is-open .shoe { stroke: var(--green); }
.marker.is-open .disc { fill: #e3f0de; stroke: var(--green); }
.marker.is-open .num { fill: var(--green); }
.marker.is-current .pulse { animation: pulse 2.1s ease-out infinite; }
.pulse { fill: none; stroke: var(--wine); stroke-width: 1; opacity: 0; }
@keyframes pulse { 0% { r: 13; opacity: 0.7; } 100% { r: 30; opacity: 0; } }

.you-are-here {
  font-family: var(--ui);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--wine);
  text-anchor: middle;
  paint-order: stroke;
  stroke: #f7f0df;
  stroke-width: 4px;
}
.zone-award { opacity: 0; }
.zone-award.on { animation: awardPop 0.7s var(--ease) forwards; }
@keyframes awardPop {
  0% { opacity: 0; transform: scale(0.4) rotate(-18deg); }
  60% { opacity: 1; transform: scale(1.14) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Sheet preview */
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 8;
  max-height: 58%;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--gold);
  box-shadow: 0 -16px 40px -18px rgba(42, 33, 24, 0.4);
}
.map-view:has(.sheet:not([hidden])) .map-cta { display: none; }
.sheet-grip {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
  cursor: pointer;
}
.sheet-grip .bar {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 3px;
  border-radius: 2px;
  background: #c9b48a;
}
.sheet-grip .lbl {
  flex: 1;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.sheet-grip .act {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
}
.sheet-body { padding: 4px 18px 16px; overflow-y: auto; }
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wine);
  border: 1px solid var(--line);
  padding: 3px 8px;
  margin-bottom: 8px;
}

/* Point history */
.point-page { padding: 16px 20px 24px; }
.fact {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.fact .picto {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: #f8efdc;
}
.fact .picto svg { width: 20px; height: 20px; }
.fact p { margin: 0; font-family: var(--body); font-size: 17.5px; line-height: 1.42; color: var(--ink); }

.media {
  margin: 16px 0 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}
.photo {
  aspect-ratio: 16 / 10;
  width: 100%;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, #d8c6a4, #b9a17d 70%);
  display: grid;
  place-items: center;
  color: #6a5844;
  cursor: pointer;
  overflow: hidden;
}
/* Вертикальный снимок не должен раздувать карточку: рамка фиксированная, фото вписывается в неё. */
.photo img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  display: block;
}
.photo svg { width: 28px; height: 28px; opacity: 0.7; }
.media-cap {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
  min-height: calc(1.3em * 2);
}

.quiz { margin: 18px 0; padding: 14px; }
.quiz .q { font-family: var(--serif); font-size: 17px; color: var(--wine); margin-bottom: 10px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  cursor: pointer;
}
.quiz-opt.right { border-color: var(--green); background: #e5f0e2; }
.quiz-opt.wrong { border-color: var(--wine); background: #f4e1dc; }
.quiz-answer { font-family: var(--body); font-size: 16px; margin-top: 10px; color: var(--ink-soft); }

.stamp-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin: 16px 0 0;
}
.stamp-art { width: 62px; height: 62px; flex: 0 0 auto; }
.stamp-block .txt b { display: block; font-family: var(--serif); font-size: 15px; color: var(--wine); }
.stamp-block .txt span { font-family: var(--body); font-size: 15px; color: var(--muted); }
.note-draft { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 14px; line-height: 1.5; }

/* Toast */
.media-item {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}
.media-item.hero { grid-column: 1 / -1; }

.toast {
  position: absolute;
  left: 14px; right: 14px; bottom: 92px;
  z-index: 40;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #f8efdc;
  border: 1px solid var(--wine);
  transform: translateY(160%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast svg { width: 24px; height: 24px; color: var(--wine); }
.toast b { display: block; font-family: var(--serif); font-size: 14px; color: var(--wine); }
.toast span { font-family: var(--body); font-size: 15px; color: var(--ink-soft); }

/* Scan
   Сканирует штатная камера телефона, поэтому вместо видоискателя показываем
   уменьшенную копию таблички, которую нужно найти в зале. */
.scan-lead {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.plaque-hint {
  padding: 12px 20px 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.plaque {
  margin: 0 auto;
  width: min(230px, 68%);
  padding: 16px 14px 12px;
  background: var(--cream);
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}
.pl-num {
  font-family: var(--serif);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.pl-name {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.16;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.pl-qr {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--ink);
}
.pl-cta {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pl-shoe { color: var(--gold); margin-top: 4px; }

.scan-note { padding: 16px 20px 0; font-family: var(--body); font-size: 17px; color: var(--muted); text-align: center; }
.scan-note:empty { display: none; }

.scan-steps { padding: 10px 20px 20px; display: grid; gap: 10px; }
.scan-step { display: flex; gap: 11px; align-items: center; }
.scan-step i {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--gold);
}
.scan-step span { font-family: var(--body); font-size: 16px; line-height: 1.3; color: var(--ink-soft); }

/* Postcard / finish */
.postcard-wrap { padding: 12px 18px 0; }
.postcard { aspect-ratio: 3 / 2; border: 1px solid var(--gold); background: var(--cream); overflow: hidden; }
.postcard svg { width: 100%; height: 100%; display: block; }
.pc-progress {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.pc-bar { flex: 1; height: 1px; background: var(--line); position: relative; }
.pc-bar i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--wine); }

/*
 * Своего position здесь быть не должно: .view уже абсолютный и растянут по
 * родителю, а relative снимал с экрана ограничение по высоте — содержимое
 * переставало прокручиваться и нижнюю часть срезало окно оболочки.
 * Для конфетти абсолютного .view достаточно как точки отсчёта.
 */
.confetti-canvas { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.finish-body { position: relative; z-index: 6; padding: 18px 18px 24px; text-align: center; }
.awards {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 8px;
}
.award {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
}
.award .medal-ring {
  width: 62px;
  height: 62px;
  margin: 0 auto 8px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: #f8efdc;
}
.award .medal-ring svg { width: 28px; height: 28px; }
.award b { display: block; font-family: var(--serif); font-size: 11px; line-height: 1.25; color: var(--wine); }
.award span { display: none; }

.farewell { margin-top: 16px; padding: 14px; text-align: left; }
.farewell b { display: block; font-family: var(--serif); font-size: 17px; color: var(--wine); margin-bottom: 6px; }
.farewell p { margin: 0 0 6px; font-family: var(--body); font-size: 17px; }
.farewell .invite { color: var(--wine); font-family: var(--serif); }

.zone-list { display: grid; gap: 0; }
.zone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.zone-row .n {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 12px; color: var(--wine);
}
.zone-row .nm { display: block; font-family: var(--serif); font-size: 15px; color: var(--ink); }
.zone-row .st { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.zone-row.open .n { border-color: var(--green); color: var(--green); }
.zone-row .go { margin-left: auto; color: var(--gold); }

.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(26, 18, 12, 0.78);
  display: grid; place-items: center;
  padding: 24px;
}
.lightbox-card {
  width: min(520px, 100%);
  background: var(--cream);
  border: 1px solid var(--gold);
  padding: 18px;
  color: var(--ink);
}
.lightbox-card h3 { font-family: var(--serif); color: var(--wine); margin: 0 0 8px; }
.lightbox-card .photo { aspect-ratio: 3 / 4; max-height: 62vh; margin-bottom: 10px; cursor: default; }
.lightbox-card .photo img { object-fit: contain; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: 1px solid #f8efdc; color: #f8efdc;
  padding: 6px 10px; cursor: pointer; font-family: var(--ui);
}

.pad { padding: 18px 20px; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.08s !important; }
}
