/* «Печатня»: бумага, краска, киноварь. Заголовки Playfair Display (кириллица есть), текст Manrope. */
:root {
  --paper: #F3ECDD;
  --paper-2: #EDE4D2;
  --ink: #1B1813;
  --ink-2: #2A2622;
  --red: #B8352A;
  --muted: #6E675C;
  --rule: #D9CFBB;
  --blue: #2F6FD1;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}

main#view {
  padding: calc(14px + var(--safe-t)) 20px calc(var(--nav-h) + var(--safe-b) + 20px);
  min-height: 100dvh;
}
main#view.view--map { padding: 0; min-height: 0; }

/* ----- шапка экрана ----- */
.kick {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 7px; font-weight: 600;
}
.kick--red { color: var(--red); }
.kick--red::before { content: ''; width: 7px; height: 7px; background: var(--red); border-radius: 50%; flex: none; }
h1.title {
  font-family: var(--serif); font-weight: 600;
  font-size: 44px; line-height: 0.95; letter-spacing: -0.025em; margin: 10px 0 14px;
}
h1.title em { font-style: italic; font-weight: 400; color: var(--red); }
.lead {
  font-family: var(--serif); font-size: 14px; color: var(--ink-2); line-height: 1.4;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 9px 0; margin: 0 0 4px;
}

/* ----- строки ленты ----- */
.row {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 13px 0;
  border-bottom: 1px solid var(--rule); align-items: start; width: 100%; text-align: left;
}
.row--btn { cursor: pointer; }
.row .num {
  font-family: var(--serif); font-weight: 700;
  font-size: 28px; line-height: 1; color: var(--ink);
}
.row .num--small { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); font-weight: 700; padding-top: 4px; }
.row .t { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.row .t .dist { letter-spacing: 0.04em; text-transform: none; }
.row .n { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; margin: 2px 0 1px; letter-spacing: -0.01em; }
.row .s { font-size: 12.5px; color: var(--muted); }
.row--done { opacity: 0.4; }
.row--now {
  background: var(--ink); color: var(--paper); margin: 0 -20px; padding: 16px 20px; border: 0;
}
.row--now .num { color: var(--red); }
.row--now .t { color: var(--red); }
.row--now .s { color: #C9BFAE; }
.row--now .n { font-size: 22px; }
.row .btns { grid-column: 2; display: flex; gap: 8px; margin-top: 12px; }

/* ----- кнопки ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 0 14px; border: 1px solid var(--ink); color: var(--ink); font-weight: 700;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  background: transparent; flex: 1; border-radius: 2px;
}
.btn--red { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--dashed { border-style: dashed; }
.row--now .btn { border-color: var(--paper); color: var(--paper); }
.row--now .btn--red { background: var(--red); border-color: var(--red); }
.btn:active { transform: translateY(1px); }

/* ----- служебная строка (геолокация) ----- */
.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--muted); padding: 8px 0 10px; border-bottom: 1px solid var(--rule);
}
.notice .btn { flex: none; min-height: 32px; padding: 0 10px; font-size: 10px; }

/* ----- нижняя навигация ----- */
nav#nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 6px var(--safe-b); background: var(--paper); border-top: 1px solid var(--ink);
  display: flex; justify-content: space-around; z-index: 1000;
}
nav#nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700;
  color: var(--muted); min-height: 44px;
}
nav#nav a i { display: block; width: 18px; height: 18px; border-radius: 5px; background: var(--rule); }
nav#nav a.on { color: var(--ink); }
nav#nav a.on i { background: var(--red); }

/* ----- тост ----- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-size: 13px; padding: 10px 16px; border-radius: 2px;
  z-index: 2000; max-width: calc(100% - 40px); box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
#toast[hidden] { display: none; }

/* ----- заглушка ----- */
.placeholder { padding: 40px 0; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 18px; }

/* ----- карточка места ----- */
.pd .back { font-size: 12px; color: var(--muted); padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.pd-num { font-size: 60px; font-weight: 700; line-height: 0.9; color: var(--red); margin-top: 4px; }
.pd-title { font-size: 34px; line-height: 1; margin: 6px 0 6px; }
.pd-local { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.pd-status { margin-bottom: 10px; }
.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; padding: 10px 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); font-size: 13px;
}
.facts dt { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.facts dd { margin: 0; }
.verified { font-size: 11px; color: var(--muted); padding: 6px 0 12px; }
.story p { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0 0 12px; }
.story p.dropcap::first-letter {
  font-family: var(--serif); font-size: 46px; float: left; line-height: 0.78; padding: 5px 7px 0 0; color: var(--red); font-weight: 700;
}
.tips { margin: 4px 0 12px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.tips li { margin-bottom: 4px; }
.site a { font-size: 13px; font-weight: 700; }
.pd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ink); }
.pd-wide { grid-column: 1 / -1; }

/* ----- карта ----- */
.map-wrap { position: relative; height: calc(100dvh - var(--nav-h) - var(--safe-b)); }
.leaflet-host { position: absolute; inset: 0; background: #EFE7D6; }
.leaflet-container { font-family: var(--sans); }
.leaflet-container .leaflet-control-attribution { background: rgba(243,236,221,0.85); color: var(--muted); font-size: 10px; }
.pin-wrap { background: none; border: 0; }
.pin {
  width: 100%; height: 100%; border-radius: 50%; background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper); box-shadow: 0 2px 6px rgba(0,0,0,0.3); font-family: var(--sans);
}
.pin--done { background: #9A917F; }
.pin--active { background: var(--red); transform: scale(1.15); }
.pin--optional { background: var(--paper); color: var(--ink); border-color: var(--ink); font-size: 11px; box-shadow: none; }
.map-top { position: absolute; left: 12px; right: 12px; top: calc(12px + var(--safe-t)); display: flex; justify-content: space-between; z-index: 500; pointer-events: none; }
.chip {
  pointer-events: auto; background: var(--paper); border: 1px solid var(--ink); font-size: 11px; font-weight: 700;
  padding: 0 12px; min-height: 40px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 2px;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; background: var(--paper);
  border-top: 2px solid var(--ink); padding: 10px 20px 14px;
}
.sheet .handle { width: 36px; height: 3px; background: var(--rule); margin: 0 auto 8px; }
.sheet h3 { font-size: 20px; line-height: 1.1; margin: 4px 0 2px; }
.sheet .s { font-size: 12.5px; color: var(--muted); }
.sheet .btns { display: flex; gap: 8px; margin-top: 10px; }

/* ----- список мест ----- */
.group { margin-top: 18px; }
.group h2 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 2px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }

/* ----- инфо ----- */
.blk { border-top: 1px solid var(--ink); padding: 10px 0 12px; }
.blk h2 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 8px; }
.tr { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; font-size: 13.5px; padding: 5px 0; align-items: baseline; }
.tr b { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.tr small { display: block; color: var(--muted); font-size: 11.5px; }
.tr--alt { opacity: 0.55; }
.tr .eur { font-weight: 700; white-space: nowrap; }
.wx { display: flex; justify-content: space-between; align-items: flex-start; font-size: 13.5px; gap: 10px; }
.wx b { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; }
.wx .right { text-align: right; color: var(--muted); font-size: 12px; }
.chk { display: flex; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; width: 100%; text-align: left; min-height: 44px; }
.chk i { width: 16px; height: 16px; border: 1.5px solid var(--ink); display: inline-block; flex: none; }
.chk--ok { opacity: 0.45; text-decoration: line-through; }
.chk--ok i { background: var(--ink); }
.total { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 20px; font-weight: 700; border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 8px; }
.foot { font-size: 11px; color: var(--muted); padding-top: 14px; }
.note { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }

/* Приглушаем стандартные тайлы OSM под бумагу. */
.leaflet-tile { filter: sepia(0.35) saturate(0.55) brightness(1.04) contrast(0.92); }
