/* ===== Базовое ===== */
:root{
  --bg:#f4f1ea; --card:#ffffff; --ink:#1d1b16; --muted:#6b6457;
  --line:#e4ded2; --accent:#c8102e; --accent2:#0b6b5e;
  --shadow:0 2px 10px rgba(0,0,0,.07); --radius:14px;
  --maxw:1100px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang SC","Noto Sans",sans-serif;
  line-height:1.5; -webkit-font-smoothing:antialiased;
}
a{color:var(--accent)}
img,video{max-width:100%}

/* ===== Hero ===== */
.hero{
  background:
    radial-gradient(120% 140% at 80% -20%, #e23 0%, transparent 55%),
    linear-gradient(135deg,#1d1b16,#3a2f2a 60%,#5b2a2a);
  color:#fff; padding:46px 18px 40px;
}
.hero__inner{max-width:var(--maxw); margin:0 auto}
.hero__kicker{margin:0 0 6px; opacity:.85; font-size:14px; letter-spacing:.3px}
.hero__title{margin:0 0 10px; font-size:clamp(30px,6vw,52px); font-weight:800; letter-spacing:-.02em}
.hero__sub{margin:0; max-width:760px; font-size:clamp(15px,2.4vw,18px); opacity:.95}
.hero__sub strong{color:#ffd56b}

/* ===== Nav ===== */
.nav{position:sticky; top:0; z-index:600; background:rgba(255,255,255,.92);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--line)}
.nav__inner{max-width:var(--maxw); margin:0 auto; display:flex; gap:6px; overflow-x:auto;
  padding:8px 12px; -webkit-overflow-scrolling:touch}
.nav a{white-space:nowrap; text-decoration:none; color:var(--ink); font-weight:600;
  font-size:14px; padding:8px 12px; border-radius:999px}
.nav a:hover{background:var(--bg)}

/* ===== Sections ===== */
.section{max-width:var(--maxw); margin:0 auto; padding:30px 18px}
.section__title{font-size:clamp(22px,3.4vw,30px); margin:0 0 6px; font-weight:800; letter-spacing:-.01em}
.section__hint{margin:0 0 16px; color:var(--muted); font-size:14px}

/* ===== Карта ===== */
#map{height:460px; border-radius:var(--radius); box-shadow:var(--shadow);
  border:1px solid var(--line); z-index:1}
.legend{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
.legend__item{display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  background:var(--card); border:1px solid var(--line); border-radius:999px;
  padding:6px 12px; font-size:13px; font-weight:600; box-shadow:var(--shadow); transition:.15s}
.legend__item:hover{transform:translateY(-1px)}
.legend__item.is-off{opacity:.4}
.legend__dot{width:13px; height:13px; border-radius:50%; border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.15)}
.legend__item--home .legend__dot{background:#111; border-color:#ffd56b}

/* ===== Day chips ===== */
.day-chips{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px}
.day-chips a{text-decoration:none; font-size:13px; font-weight:700; color:#fff;
  padding:6px 12px; border-radius:999px; box-shadow:var(--shadow)}

/* ===== Day block ===== */
.day{margin-bottom:34px; scroll-margin-top:64px}
.day__head{border-left:6px solid var(--day,#888); padding:4px 0 4px 14px; margin-bottom:14px}
.day__no{display:inline-block; font-size:12px; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:#fff; background:var(--day,#888);
  padding:3px 10px; border-radius:999px; margin-bottom:8px}
.day__title{margin:0; font-size:clamp(19px,3vw,24px); font-weight:800}
.day__meta{margin:4px 0 0; color:var(--muted); font-size:14px}
.day__travel{margin:6px 0 0; font-size:13px; color:#8a5a12; background:#fff7e6;
  display:inline-block; padding:5px 10px; border-radius:8px; border:1px solid #f0e2bf}

/* ===== Cards grid ===== */
.cards{display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:16px; display:flex; flex-direction:column; gap:8px}
.card__top{display:flex; justify-content:space-between; align-items:flex-start; gap:8px}
.card__badge{flex:none; font-size:12px; font-weight:700; padding:3px 9px; border-radius:999px;
  background:var(--bg); color:var(--muted); border:1px solid var(--line); white-space:nowrap}
.card__name{margin:0; font-size:17px; font-weight:800; line-height:1.25}
.card__en{margin:2px 0 0; font-size:12.5px; color:var(--muted)}
.card__district{font-size:12.5px; color:var(--accent2); font-weight:700}
.card__tip{margin:0; font-size:14px; font-weight:600}
.card__detail{margin:0; font-size:13.5px; color:var(--muted)}
.card__foot{margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:6px}
.card__src{font-size:12px; color:var(--muted)}
.card__src b{color:var(--ink); font-weight:700}
.btn-video{appearance:none; border:0; cursor:pointer; font-weight:700; font-size:13.5px;
  color:#fff; background:var(--accent); padding:8px 14px; border-radius:999px; transition:.15s}
.btn-video:hover{filter:brightness(1.08)}
.card__approx{font-size:11.5px; color:#9a7b00; background:#fff7e6; border:1px solid #f0e2bf;
  border-radius:6px; padding:2px 7px; align-self:flex-start}

/* ===== Apps & Tips ===== */
.apps-grid{display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.app{background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:14px}
.app__name{font-weight:800; font-size:16px}
.app__zh{color:var(--muted); font-weight:600; font-size:13px; margin-left:6px}
.app__purpose{font-size:13.5px; color:var(--muted); margin:6px 0 8px}
.tips-grid{display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.tip{background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:16px; display:flex; flex-direction:column; gap:8px}
.tip__title{font-weight:800; font-size:16px}
.tip__title .tip__icon{margin-right:6px}
.tip__text{font-size:13.5px; color:var(--muted); margin:0}
.mini-video{align-self:flex-start; font-size:12.5px; font-weight:700; color:var(--accent);
  background:none; border:1px solid var(--accent); padding:5px 11px; border-radius:999px; cursor:pointer}
.mini-video:hover{background:var(--accent); color:#fff}

/* ===== Footer ===== */
.footer{max-width:var(--maxw); margin:20px auto 0; padding:24px 18px 40px;
  color:var(--muted); font-size:13px; text-align:center; border-top:1px solid var(--line)}

/* ===== Модалка ===== */
.modal{position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:18px}
.modal[hidden]{display:none}
.modal__backdrop{position:absolute; inset:0; background:rgba(0,0,0,.8)}
.modal__box{position:relative; z-index:1; background:#000; border-radius:16px; overflow:hidden;
  max-width:min(440px,94vw); width:100%; box-shadow:0 20px 60px rgba(0,0,0,.5)}
.modal__close{position:absolute; top:8px; right:8px; z-index:2; width:38px; height:38px;
  border-radius:50%; border:0; background:rgba(0,0,0,.55); color:#fff; font-size:18px; cursor:pointer}
.modal__close:hover{background:rgba(0,0,0,.8)}
#modal-video{display:block; width:100%; max-height:80vh; background:#000}
.modal__caption{color:#eee; font-size:13px; margin:0; padding:10px 14px 14px; background:#111}

.home-icon{font-size:24px; line-height:30px; text-align:center;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}

/* ===== Leaflet popup ===== */
.leaflet-popup-content{margin:10px 12px; font-size:13px}
.popup__name{font-weight:800; font-size:14px; display:block}
.popup__district{color:#0b6b5e; font-weight:700; font-size:12px}
.popup__btn{display:inline-block; margin-top:6px; cursor:pointer; font-weight:700; color:#fff;
  background:var(--accent); padding:5px 11px; border-radius:999px; font-size:12.5px; border:0}

@media (max-width:560px){
  #map{height:380px}
  .section{padding:24px 14px}
}
