/* ================= Tokenlar ================= */
:root {
  --lojuvard: #14295C;
  --lojuvard-deep: #0d1b40;
  --tilla: #D4A13A;
  --tilla-soft: #e8c57a;
  --firuza: #1FA6A8;

  --bg: #f6f1e7;           /* ganch / qog'oz rangi */
  --surface: #ffffff;
  --surface-2: #efe8da;
  --text: #1c2236;
  --muted: #5f6578;
  --line: #e2d8c4;
  --heading: var(--lojuvard);
  --link: #13737a;
  --accent-text: #8a6416;   /* oq fonda o'qiladigan tilla */
  --shadow: 0 2px 6px rgba(20, 41, 92, .08), 0 12px 32px rgba(20, 41, 92, .10);
  --nav-bg: rgba(255, 255, 255, .94);
  --hero-from: #14295C;
  --hero-to: #0f4f6b;

  --font-head: 'Philosopher', Georgia, 'Times New Roman', serif;
  --font-body: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --topbar-h: 64px;
  /* Yuqori panelning to'liq balandligi: telefon tizim paneli (soat, batareya) uchun joy bilan */
  --topbar-full: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  --bottomnav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1430;
    --surface: #121f45;
    --surface-2: #182a57;
    --text: #ebe6da;
    --muted: #a5acc2;
    --line: #26386a;
    --heading: #f0d08a;
    --link: #5fd0d2;
    --accent-text: #e8c57a;
    --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --nav-bg: rgba(13, 24, 56, .94);
    --hero-from: #0b1838;
    --hero-to: #0b3a4e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1430;
  --surface: #121f45;
  --surface-2: #182a57;
  --text: #ebe6da;
  --muted: #a5acc2;
  --line: #26386a;
  --heading: #f0d08a;
  --link: #5fd0d2;
  --accent-text: #e8c57a;
  --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --nav-bg: rgba(13, 24, 56, .94);
  --hero-from: #0b1838;
  --hero-to: #0b3a4e;
  color-scheme: dark;
}

/* ================= Asos ================= */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
}
@media (min-width: 761px) { body { padding-bottom: 0; } }
h1, h2, h3 { font-family: var(--font-head); color: var(--heading); line-height: 1.15; margin: 0; font-weight: 700; }
a { color: var(--link); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--firuza); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 3000;
  background: var(--tilla); color: var(--lojuvard-deep); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }
main { outline: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ================= Yuqori panel ================= */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  height: var(--topbar-full);
  padding: 0 16px; padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 24px;
  background: var(--lojuvard); color: #fff;
  border-bottom: 3px solid var(--tilla);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font: 700 21px var(--font-head);
}
.brand-mark { width: 34px; height: 34px; color: #1d3a7a; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a {
  color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.topnav a:hover { color: #fff; }
.topnav a.active { color: var(--lojuvard-deep); background: var(--tilla); }
.topbar-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
/* Til tanlash: tugma + ro'yxat (13 til) */
.lang-menu { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
  font: 700 13px var(--font-body); letter-spacing: .04em;
}
.lang-btn svg { width: 18px; height: 18px; }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 6px; list-style: none;
  min-width: 190px; max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--surface, #fff); color: var(--text, #14295C); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(10, 20, 48, .28); border: 1px solid rgba(20, 41, 92, .12);
}
.lang-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px;
  background: none; color: inherit; cursor: pointer; font: 500 15px var(--font-body); text-align: start;
}
.lang-list button:hover, .lang-list button:focus-visible { background: rgba(212, 161, 58, .16); outline: none; }
.lang-list button[aria-checked="true"] { font-weight: 700; background: rgba(20, 41, 92, .08); }
.lang-list .flag { font-size: 18px; line-height: 1; }
.lang-list .code { margin-inline-start: auto; font-size: 12px; opacity: .55; letter-spacing: .04em; }

/* O'ngdan chapga (arabcha) */
[dir="rtl"] .lang-list { text-align: right; }
/* Bosh harf (drop cap): arab yozuvida harflar ulanadi — o'chiriladi; xitoy/yapon/koreysda ham kerak emas */
[dir="rtl"] .site-summary > p:first-of-type::first-letter,
:lang(zh) .site-summary > p:first-of-type::first-letter,
:lang(ja) .site-summary > p:first-of-type::first-letter,
:lang(ko) .site-summary > p:first-of-type::first-letter { font: inherit; float: none; margin: 0; color: inherit; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
}
.icon-btn svg { width: 20px; height: 20px; display: none; }
.icon-btn[data-mode="auto"] .i-auto,
.icon-btn[data-mode="light"] .i-light,
.icon-btn[data-mode="dark"] .i-dark { display: block; }

/* ================= Pastki navigatsiya (telefon) ================= */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: none;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--nav-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
  position: relative; min-width: 0; padding: 0 2px;
}
/* Uzun nomlar (nemischa, qozoqcha…) bir qatorda qoladi */
.bottomnav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottomnav svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--heading); }
.bottomnav a.active::before {
  content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--tilla);
}

@media (max-width: 760px) {
  .topnav { display: none; }
  .bottomnav { display: flex; }
  .topbar { gap: 10px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
}
/* Telefonda nom SOS va til tugmalari yonida sig'maydi — faqat belgi qoladi */
@media (max-width: 480px) {
  .brand span { display: none; }
}

/* ================= Naqsh (girih) ================= */
.girih {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23D4A13A' stroke-opacity='.28' stroke-width='1.2'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3Cpath d='M0 0l18 18M64 0L46 18M0 64l18-18M64 64L46 46'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
}

/* ================= Bosh sahifa: hero ================= */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background-color: var(--hero-from);
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(31, 166, 168, .45), transparent 60%),
    linear-gradient(160deg, var(--hero-from), var(--hero-to));
}
.hero-pattern { position: absolute; inset: 0; opacity: .9; }
.hero-inner { position: relative; padding: 56px 16px 64px; max-width: 1120px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tilla-soft);
}
.hero h1 {
  color: #fff; font-size: clamp(40px, 8vw, 72px);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.hero h1 em { font-style: normal; color: var(--tilla); }
.hero-lead { max-width: 640px; margin: 18px 0 28px; font-size: clamp(16px, 2.2vw, 19px); color: rgba(255, 255, 255, .88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ================= Tugmalar ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 15px var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: var(--tilla); color: var(--lojuvard-deep); }
.btn-gold:hover { background: var(--tilla-soft); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { border-color: #fff; }
.btn-primary { background: var(--lojuvard); color: #fff; }
.btn-primary:hover { background: var(--lojuvard-deep); }
.btn-ghost-link { color: var(--heading); border-color: var(--line); background: transparent; }
.btn-ghost-link:hover { border-color: var(--tilla); }
:root[data-theme="dark"] .btn-primary { background: var(--firuza); color: #06232a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: var(--firuza); color: #06232a; } }

/* ================= Bo'limlar ================= */
.section { padding: 36px 0 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(26px, 4vw, 34px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.ornament { display: flex; align-items: center; gap: 10px; color: var(--tilla); margin-bottom: 6px; }
.ornament::before, .ornament::after { content: ''; height: 1px; width: 28px; background: currentColor; opacity: .7; }
.ornament svg { width: 14px; height: 14px; }
.link-more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ================= Peshtoq kartochkalar ================= */
.arch-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
@media (max-width: 520px) { .arch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

.arch-card {
  position: relative; display: block;
  aspect-ratio: 3 / 4;
  text-decoration: none; color: #fff;
  filter: drop-shadow(0 10px 18px rgba(20, 41, 92, .22));
  transition: transform .25s ease, filter .25s ease;
}
.arch-card:hover { transform: translateY(-4px); filter: drop-shadow(0 16px 24px rgba(20, 41, 92, .3)); }
.arch-card:focus-visible { outline: none; }
.arch-card:focus-visible .arch-frame .outer { stroke: var(--firuza); stroke-width: 10; }
.arch-clip {
  position: absolute; inset: 0;
  clip-path: var(--arch-clip);
  background: var(--lojuvard);
  overflow: hidden;
}
.arch-clip img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.arch-card:hover .arch-clip img { transform: scale(1.05); }
.arch-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(9, 18, 44, .92) 0%, rgba(9, 18, 44, .55) 32%, transparent 62%);
}
.arch-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.arch-frame .outer { fill: none; stroke: var(--tilla); stroke-width: 7; }
.arch-frame .inner { fill: none; stroke: var(--tilla); stroke-width: 1.2; stroke-opacity: .85; }
.arch-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 14% 12%;
  text-align: center;
}
.arch-title {
  font: 700 clamp(16px, 2.2vw, 20px)/1.2 var(--font-head);
  color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.arch-meta { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--tilla-soft); letter-spacing: .03em; }
@media (max-width: 520px) {
  .arch-body { padding: 0 10% 11%; }
  .arch-title { font-size: 15px; }
  .arch-meta { font-size: 11px; margin-top: 5px; }
}

/* Rasm yo'q bo'lsa — joy egallovchi */
.placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(31, 166, 168, .55), transparent 55%),
    linear-gradient(170deg, #1d3a7a, var(--lojuvard) 55%, #0b1838);
}
.placeholder[data-v="1"] {
  background:
    radial-gradient(circle at 50% 42%, rgba(212, 161, 58, .45), transparent 55%),
    linear-gradient(170deg, #173a66, #0f2f55 55%, #0a1a38);
}
.placeholder[data-v="2"] {
  background:
    radial-gradient(circle at 50% 42%, rgba(31, 166, 168, .7), transparent 58%),
    linear-gradient(170deg, #0f5a6e, #0d3d5c 55%, #0a1f3d);
}
.placeholder-layer { position: absolute; inset: 0; }
.placeholder svg.star { position: relative; width: 38%; height: auto; margin-bottom: 30%; color: var(--tilla); opacity: .9; }

/* ================= Obida sahifasi ================= */
.crumbs { padding: 18px 0 0; font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--heading); }
.site-layout {
  display: grid; gap: 32px; padding: 18px 0 48px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
}
@media (max-width: 860px) { .site-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
.site-hero { position: relative; max-width: 440px; width: 100%; margin: 0 auto; }
@media (max-width: 860px) { .site-hero { max-width: min(300px, 72vw); } }
.site-hero .arch-card { pointer-events: none; }
.site-text h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 14px; }
.site-text .lead-rule { width: 72px; height: 3px; background: var(--tilla); border-radius: 3px; margin-bottom: 20px; }
.site-text > p, .site-summary p { margin: 0 0 14px; font-size: 17px; }
.site-summary > p:first-of-type::first-letter {
  font: 700 3.1em/0.9 var(--font-head); float: left; margin: 4px 8px 0 0; color: var(--tilla);
}
.location-card {
  margin-top: 28px; padding: 16px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 3px solid var(--firuza);
}
.location-card h2 { font-size: 22px; margin-bottom: 12px; }
.mini-map { height: 260px; border-radius: 10px; overflow: hidden; margin-bottom: 14px; z-index: 0; }
.location-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.location-soon {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted);
}
.location-soon svg { width: 34px; height: 34px; flex: none; color: var(--tilla); }
.location-soon strong { display: block; color: var(--text); font-size: 16px; }

/* ================= Xarita sahifasi ================= */
.map-page { position: relative; }
.map-full {
  height: calc(100vh - var(--topbar-full) - 3px);
  height: calc(100dvh - var(--topbar-full) - 3px);
  z-index: 0;
}
@media (max-width: 760px) {
  .map-full {
    height: calc(100vh - var(--topbar-full) - 3px - var(--bottomnav-h) - env(safe-area-inset-bottom));
    height: calc(100dvh - var(--topbar-full) - 3px - var(--bottomnav-h) - env(safe-area-inset-bottom));
  }
}
.map-note {
  position: absolute; left: 12px; bottom: 28px; z-index: 500;
  max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600;
}

/* Leaflet: pin, popup, qatlam almashtirgich */
.pin { background: none; border: 0; }
.pin svg { width: 34px; height: 46px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.leaflet-popup-content-wrapper { border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 12px 16px; font-family: var(--font-body); }
.popup-title { font: 700 17px/1.25 var(--font-head); color: var(--heading); margin-bottom: 8px; }
.popup-open {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--tilla); color: var(--lojuvard-deep) !important;
  font-weight: 700; font-size: 13px; text-decoration: none;
}
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-layers {
  border: 0 !important; border-radius: 12px !important; box-shadow: var(--shadow) !important;
  background: var(--surface) !important; color: var(--text);
  font: 600 13px/1.2 var(--font-body);
}
.leaflet-control-layers-expanded { padding: 7px 12px; }
.leaflet-control-layers-base label { margin: 3px 0; cursor: pointer; }
.leaflet-control-layers-selector { accent-color: var(--firuza); margin-inline-end: 5px; }
.leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--line); }
.leaflet-control-attribution { font-size: 10px; }
/* Tun rejimida sxema plitkalari qorong'ilashtiriladi */
:root[data-theme="dark"] .tiles-scheme { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tiles-scheme { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
}

/* ================= Holatlar ================= */
.state { padding: 64px 16px; text-align: center; color: var(--muted); }
.state h2 { margin-bottom: 10px; }
.skeleton { background: var(--surface-2); clip-path: var(--arch-clip); aspect-ratio: 3 / 4; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.footer { padding: 28px 16px 36px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ================= Kerakli joylar (4-bosqich) ================= */
.cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (max-width: 520px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 18px 10px 14px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: transform .2s ease, border-color .2s ease;
}
.cat-tile:hover { transform: translateY(-3px); border-bottom-color: var(--tilla); }
.cat-tile.empty { opacity: .62; }
.cat-icon-wrap {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; flex: none;
  background: linear-gradient(150deg, var(--lojuvard), #1d3a7a);
  color: var(--tilla);
  box-shadow: inset 0 0 0 1.5px rgba(212, 161, 58, .55);
}
.cat-icon { width: 28px; height: 28px; }
.cat-name { font: 700 15px/1.25 var(--font-head); color: var(--heading); }
.cat-count { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) {
  .cat-tile { padding: 14px 6px 12px; }
  .cat-icon-wrap { width: 46px; height: 46px; border-radius: 14px; }
  .cat-icon { width: 24px; height: 24px; }
  .cat-name { font-size: 13px; }
  .cat-count { font-size: 11px; }
}

.cat-head { margin: 6px 0 12px; }
.cat-title { display: flex; align-items: center; gap: 14px; font-size: clamp(26px, 5vw, 36px); }
.distance-basis {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 18px; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-size: 14px;
}
.distance-basis svg { width: 18px; height: 18px; color: var(--firuza); flex: none; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--link); font: 700 14px var(--font-body); text-decoration: underline;
}

.place-list { display: grid; gap: 14px; padding-bottom: 40px; }
.place-card {
  display: grid; grid-template-columns: 1fr; overflow: hidden;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-inline-start: 4px solid var(--line);
}
.place-card.partner { border-inline-start-color: var(--tilla); background: linear-gradient(90deg, rgba(212, 161, 58, .09), transparent 40%), var(--surface); }
@media (min-width: 640px) {
  .place-card:has(.place-img) { grid-template-columns: 180px 1fr; }
}
.place-img { width: 100%; height: 100%; max-height: 200px; object-fit: cover; }
.place-body { padding: 14px 16px 16px; min-width: 0; }
.place-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; margin-bottom: 4px; }
.place-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pbadge { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pbadge-partner { background: var(--tilla); color: var(--lojuvard-deep); }
.pbadge-verified { background: rgba(31, 166, 168, .14); color: var(--link); }
.place-dist {
  margin-inline-start: auto; white-space: nowrap;
  font: 700 15px var(--font-body); color: var(--heading);
}
.place-name { font-size: 20px; margin: 2px 0 6px; }
.place-line { margin: 0 0 3px; font-size: 14px; color: var(--text); }
.place-line .muted, .muted { color: var(--muted); }
.place-desc { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.place-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 14px; }
.btn-sm svg { width: 18px; height: 18px; }
.small { font-size: 13px; }
.distance-basis > span { flex: 1 1 200px; min-width: 0; }
@media (max-width: 639px) { .place-img { max-height: 170px; } }

/* ================= Gid buyurtmasi (5-bosqich) ================= */
.container-narrow { max-width: 760px; }
.book-form, .done-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; border-top: 4px solid var(--tilla);
}
.book-context {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 10px;
  background: var(--surface-2);
}
.book-context span { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.book-context strong { font-family: var(--font-head); font-size: 18px; color: var(--heading); }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.form-label { font-size: 14px; font-weight: 700; color: var(--text); }
.form-hint { font-size: 12px; color: var(--muted); }
.form-hint.center { text-align: center; margin: 12px 0 0; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font: 16px/1.4 var(--font-body);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field select { appearance: auto; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--firuza); outline: none; box-shadow: 0 0 0 3px rgba(31, 166, 168, .2); }
.form-field [aria-invalid="true"] { border-color: #c0392b; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid-3 { grid-template-columns: 1.3fr .8fr 1fr; }
@media (max-width: 600px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } .book-form, .done-card { padding: 16px; } }
.btn-block { width: 100%; }
.form-alert {
  margin: 4px 0 14px; padding: 11px 14px; border-radius: 10px;
  background: rgba(192, 57, 43, .1); color: #a5281b; font-weight: 600; font-size: 14px;
}
:root[data-theme="dark"] .form-alert { color: #ff9b8f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-alert { color: #ff9b8f; } }
/* Honeypot — ekrandan tashqarida, ko'zga ko'rinmaydi (display:none emas — ba'zi botlar buni tekshiradi) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.done-card { text-align: center; }
.done-icon { width: 64px; height: 64px; color: var(--firuza); margin: 6px auto 12px; display: block; }
.done-card h1 { font-size: clamp(26px, 5vw, 34px); margin-bottom: 8px; }
.done-lead { color: var(--muted); margin: 0 auto 18px; max-width: 480px; }
.done-summary { text-align: start; margin: 0 auto 20px; max-width: 420px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); }
.done-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.done-row dt { color: var(--muted); }
.done-row dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.site-cta { margin: 22px 0 0; }
.guide-band { padding: 0 0 48px; }
.guide-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff; box-shadow: var(--shadow);
  border: 1px solid rgba(212, 161, 58, .5);
}
.guide-inner h2 { color: var(--tilla); font-size: 26px; margin-bottom: 6px; }
.guide-inner p { margin: 0; max-width: 560px; color: rgba(255, 255, 255, .86); }
@media (max-width: 760px) { .guide-inner { margin: 0 16px; } }

/* ================= Marshrutlar (6-bosqich) ================= */
.section-tight { padding-top: 8px; }
.route-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 520px) { .route-grid { grid-template-columns: minmax(0, 1fr); } }
.route-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none;
  border-top: 4px solid var(--tilla);
  transition: transform .2s ease;
}
.route-card:hover { transform: translateY(-3px); }
.route-card h3 { font-size: 22px; margin-bottom: 6px; }
.route-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 14px; font-weight: 600; }
.route-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.route-meta-item svg { width: 17px; height: 17px; color: var(--firuza); }
.route-chain {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
  font-size: 14px; color: var(--text);
}
.route-chain li:not(:last-child)::after { content: '→'; margin: 0 8px; color: var(--tilla); font-weight: 700; }
.route-card .link-more { margin-top: auto; color: var(--link); }

.route-page { padding: 10px 0 48px; }
.route-header h1 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 10px; }
.route-desc { max-width: 760px; margin: 14px 0 0; font-size: 17px; }
.route-layout {
  display: grid; gap: 24px; margin-top: 24px;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start;
}
@media (max-width: 860px) { .route-layout { grid-template-columns: minmax(0, 1fr); } .route-main { order: -1; } }
.route-side h2 { font-size: 22px; margin-bottom: 14px; }
.route-map { height: 420px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); z-index: 0; }
@media (max-width: 600px) { .route-map { height: 320px; } }
.route-missing { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.route-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; inset-inline-start: 15px; top: 16px; bottom: 16px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--tilla) 0 6px, transparent 6px 11px);
}
.timeline-stop { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; }
.timeline-num {
  position: relative; z-index: 1; flex: none;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lojuvard); color: var(--tilla); border: 2px solid var(--tilla);
  font: 700 14px var(--font-body);
}
.timeline-name { font: 700 17px var(--font-head); color: var(--heading); text-decoration: none; }
.timeline-name:hover { text-decoration: underline; }
.timeline-note { flex-basis: 100%; padding-inline-start: 44px; font-size: 12px; color: var(--muted); }
.timeline-walk {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 4px 0 4px 44px; font-size: 13px; color: var(--muted);
}
.timeline-walk svg { width: 16px; height: 16px; color: var(--firuza); }

.num-pin span {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--lojuvard); color: var(--tilla); border: 2px solid var(--tilla);
  font: 700 14px var(--font-body); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* ================= HozirGo (7-bosqich) ================= */
.hozirgo-slot:empty { display: none; }
.hozirgo-slot { margin: 0 0 18px; }
.hozirgo-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #1FA6A8, #14295C); color: #fff; text-decoration: none;
  box-shadow: var(--shadow);
}
.hozirgo-btn svg { width: 34px; height: 34px; flex: none; color: var(--tilla); }
.hozirgo-btn strong { display: block; font: 700 18px var(--font-head); }
.hozirgo-btn small { display: block; opacity: .85; font-size: 13px; }
.hozirgo-arrow { margin-inline-start: auto; font-size: 22px; color: var(--tilla); }

/* ================= Chiptalar (8-bosqich) ================= */
.ticket-section { margin-top: 26px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--tilla); }
.ticket-section h2 { display: flex; align-items: center; gap: 8px; font-size: 22px; margin-bottom: 10px; }
.ticket-section h2 svg { width: 24px; height: 24px; color: var(--tilla); }
.demo-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: rgba(212, 161, 58, .15); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.offer-box { padding: 12px 0; border-top: 1px solid var(--line); }
.offer-box:first-of-type { border-top: 0; }
.offer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 15px; }
.price-table td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.price-table td.num { text-align: right; font-weight: 700; white-space: nowrap; }
.qty-list { display: grid; gap: 8px; }
.qty-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.qty-name { font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--heading); font-size: 22px; font-weight: 700; cursor: pointer; }
.stepper output { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.total-sum { font: 700 24px var(--font-head); color: var(--heading); }
.form-hint.warn { color: #c0392b; font-weight: 600; }
.ticket-card { max-width: 440px; margin: 0 auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; text-align: center; padding-bottom: 18px; }
.ticket-top { padding: 22px 18px 18px; background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); color: #fff; border-bottom: 3px dashed var(--tilla); }
.ticket-brand { color: var(--tilla); font: 700 15px var(--font-head); letter-spacing: .05em; }
.ticket-top h1 { color: #fff; font-size: 24px; margin: 6px 0; }
.ticket-id { font-size: 13px; opacity: .8; }
.ticket-status { display: inline-block; margin: 14px 0 6px; padding: 4px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.st-paid { background: rgba(31, 157, 85, .15); color: #1f9d55; }
.st-pending { background: rgba(212, 161, 58, .18); color: var(--accent-text); }
.st-cancelled, .st-refunded { background: rgba(192, 57, 43, .12); color: #c0392b; }
.ticket-qr { display: block; width: min(280px, 80%); height: auto; margin: 8px auto; padding: 10px; background: #fff; border-radius: 12px; }
.center { text-align: center; }
.ticket-card .done-summary { margin: 12px 16px 16px; }
.ticket-card .done-actions { padding: 0 16px; }
.my-tickets { display: grid; gap: 10px; }
.my-ticket { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.my-ticket .ticket-status { margin: 0; flex: none; }
@media print {
  .topbar, .bottomnav, .footer, .no-print, .skip-link { display: none !important; }
  body { background: #fff; padding: 0; }
  .ticket-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ================= SOS, so'zlashgich, maslahatlar (9-bosqich) ================= */
.sos-btn {
  display: grid; place-items: center; height: 40px; padding: 0 12px; border-radius: 999px;
  background: #c0392b; color: #fff; text-decoration: none; font: 800 14px var(--font-body); letter-spacing: .06em;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
}
.sos-btn:hover { background: #a93226; }
.sos-hero { background: linear-gradient(160deg, #8e1f16, #c0392b); color: #fff; padding: 34px 0 30px; }
.sos-hero h1 { color: #fff; font-size: clamp(30px, 6vw, 44px); }
.sos-hero p { margin: 8px 0 0; color: rgba(255, 255, 255, .9); }
.sos-numbers { display: grid; gap: 10px; margin-top: -8px; }
.sos-call {
  display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; border-inline-start: 6px solid #c0392b;
}
.sos-call:active { transform: scale(.99); }
.sos-num { font: 800 34px var(--font-body); color: #c0392b; letter-spacing: .02em; }
.sos-name { font-weight: 700; font-size: 16px; }
.sos-call svg { width: 26px; height: 26px; color: #c0392b; }
.sos-nearest { margin-top: 26px; display: grid; gap: 16px; }
.sos-basis { margin: 0; }
.sos-block h2 { font-size: 21px; margin-bottom: 8px; }
.sos-place { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.sos-place-actions { display: flex; gap: 6px; flex: none; }
.sos-place-actions svg { width: 18px; height: 18px; }

.help-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.help-link {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px;
}
.help-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--lojuvard); color: var(--tilla); font: 800 13px var(--font-body); }
.help-sos .help-ico { background: #c0392b; color: #fff; }
@media (max-width: 560px) {
  .help-links { grid-template-columns: 1fr; gap: 8px; }
}

.speech-status { margin: 0 0 12px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.speech-status:empty { display: none; }
.phrase-list { display: grid; gap: 22px; padding-bottom: 30px; }
.phrase-group h2 { font-size: 20px; margin-bottom: 10px; }
.phrase { padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.phrase-main, .phrase-tr { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.phrase-main strong { font: 700 19px var(--font-head); color: var(--heading); }
.phrase-tr { margin-top: 6px; color: var(--muted); font-size: 15px; }
.say {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-width: 56px; height: 36px; padding: 0 10px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--heading);
  font: 700 12px var(--font-body); cursor: pointer;
}
.say svg { width: 17px; height: 17px; }
.say.playing { background: var(--firuza); border-color: var(--firuza); color: #fff; }

.tip-list { display: grid; gap: 10px; padding-bottom: 30px; }
.tip { border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 0 16px; }
.tip summary { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; font: 700 18px var(--font-head); color: var(--heading); list-style: none; }
.tip summary::-webkit-details-marker { display: none; }
.tip summary::after { content: '+'; margin-inline-start: auto; font: 700 22px var(--font-body); color: var(--tilla); }
.tip[open] summary::after { content: '−'; }
.tip-ico { font-size: 24px; }
.tip p { margin: 0 0 14px; }

/* ================= O'tmishga sayohat va audiogid (10-bosqich) ================= */
.media-section { margin: 24px 0; }
.media-section h2 { font-size: 22px; margin-bottom: 4px; }
.media-section .small { margin: 0 0 10px; }
.compare {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 3px solid var(--tilla); background: var(--surface-2);
  touch-action: pan-y; user-select: none;
}
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* O'tmish rasmi chap tomonda; chiziq o'ngga surilsa ko'proq ko'rinadi */
.compare-past-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-past { filter: sepia(.25); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: var(--tilla); pointer-events: none;
}
.compare-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lojuvard); color: var(--tilla); border: 2px solid var(--tilla); font-weight: 700; font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.compare-tag {
  position: absolute; top: 10px; padding: 3px 10px; border-radius: 999px; pointer-events: none;
  background: rgba(10, 20, 48, .72); color: #fff; font-size: 12px; font-weight: 700;
}
.compare-tag.left { left: 10px; }
.compare-tag.right { right: 10px; }
/* Ko'rinmas, butun maydonni qoplaydigan surgich — sichqoncha, barmoq va klaviatura bilan ishlaydi */
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + * , .compare:has(.compare-range:focus-visible) { outline: 3px solid var(--firuza); outline-offset: 3px; }
.site-video { width: 100%; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); }
.audio-guide {
  margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); border-inline-start: 4px solid var(--firuza);
}
.audio-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.audio-head svg { width: 34px; height: 34px; color: var(--firuza); flex: none; }
.audio-head h2 { font-size: 20px; margin: 0; }
.audio-head p { margin: 0; }
.audio-player { width: 100%; }
.audio-tts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= Offline (11-bosqich) ================= */
.offline-banner {
  position: sticky; top: var(--topbar-full); z-index: 999;
  padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 700;
  background: var(--tilla); color: var(--lojuvard-deep);
}

/* AI izohi (surgich va video ostida) */
.ai-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }
.ai-badge { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--tilla); color: var(--lojuvard-deep); font: 800 11px var(--font-body); font-style: normal; letter-spacing: .04em; margin-top: 1px; }

/* ================= "O'tmishga sayohat" tugmasi va ko'ruvchi ================= */
.past-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 16px auto 0; padding: 14px 18px;
  border: 0; border-radius: 16px; cursor: pointer; text-align: start;
  background: linear-gradient(135deg, #f0cf7a, var(--tilla) 45%, #b8862a);
  color: var(--lojuvard-deep); box-shadow: 0 8px 22px rgba(212, 161, 58, .45), inset 0 0 0 2px rgba(255, 255, 255, .35);
  font-family: var(--font-body); transition: transform .15s ease, box-shadow .15s ease;
}
.past-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(212, 161, 58, .55), inset 0 0 0 2px rgba(255, 255, 255, .45); }
.past-btn:active { transform: translateY(0); }
.past-btn strong { display: block; font: 700 20px/1.2 var(--font-head); }
.past-btn small { display: block; margin-top: 2px; font-size: 13px; opacity: .85; }
.past-btn-spark { font-size: 28px; line-height: 1; animation: spark 2.4s ease-in-out infinite; }
@keyframes spark { 50% { transform: scale(1.18) rotate(12deg); } }
.past-btn.soon { filter: saturate(.75); }
.site-toast {
  position: fixed; left: 50%; bottom: calc(var(--bottomnav-h) + 18px + env(safe-area-inset-bottom)); z-index: 3000;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--lojuvard); color: #fff; font-weight: 600; text-align: center;
  box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s ease;
}
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 761px) { .site-toast { bottom: 28px; } }

html.pv-open, html.pv-open body { overflow: hidden; }
.pv-overlay {
  --fade: 1;
  position: fixed; inset: 0; z-index: 2500; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 10, 26, calc(.88 * var(--fade))); opacity: 0; transition: opacity .25s ease;
}
.pv-overlay.show { opacity: 1; }
.pv-sheet {
  position: relative; width: 100%; max-width: 900px; height: 100%; max-height: 100%;
  display: flex; flex-direction: column; background: #0a1430; color: #eef1f8;
  transform: translateY(30px); transition: transform .28s ease;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.pv-overlay.show .pv-sheet { transform: translateY(0); }
@media (min-width: 761px) { .pv-overlay { align-items: center; } .pv-sheet { height: auto; max-height: 94vh; border-radius: 20px; border: 2px solid var(--tilla); overflow: hidden; } }
.pv-grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); margin: 8px auto 0; flex: none; }
@media (min-width: 761px) { .pv-grab { display: none; } }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 12px; flex: none; }
.pv-kicker { color: var(--tilla); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.pv-title { color: #fff; font-size: clamp(20px, 5vw, 28px); margin: 2px 0 0; }
.pv-close {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 20px; cursor: pointer;
}
.pv-close:hover { background: rgba(255, 255, 255, .18); }
.pv-body { flex: 1; overflow-y: auto; padding: 0 16px 20px; overscroll-behavior: contain; }
.pv-video, .pv-single { display: block; width: 100%; max-height: 62vh; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #000; border: 2px solid var(--tilla); }
.pv-compare { margin-top: 16px; }
.pv-label { margin: 0 0 8px; font-size: 13px; color: #b8c3e0; }
.pv-compare .compare { border-color: var(--tilla); }
.pv-body .ai-note { color: #b8c3e0; }
.pv-actions { display: flex; gap: 10px; margin-top: 16px; }
.pv-share {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 0; background: var(--tilla); color: var(--lojuvard-deep); font: 700 15px var(--font-body);
}
.pv-share svg { width: 20px; height: 20px; }
.pv-swipe { margin: 14px 0 0; text-align: center; font-size: 12px; color: #8a96b8; }
@media (min-width: 761px) { .pv-swipe { display: none; } }

/* Bosh sahifa bo'limi */
.past-home { padding-top: 30px; padding-bottom: 8px; }
.past-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 520px) { .past-grid { grid-template-columns: minmax(0, 1fr); } }
.past-card {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 2px solid var(--tilla);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; background: #000; box-shadow: var(--shadow); text-align: start;
}
.pc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(9, 18, 44, .9), transparent 60%); }
.pc-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(212, 161, 58, .92); color: var(--lojuvard-deep); font-size: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.pc-body { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.pc-badge { display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px; background: var(--tilla); color: var(--lojuvard-deep); font: 800 11px var(--font-body); }
.pc-title { display: block; color: #fff; font: 700 19px/1.2 var(--font-head); }

/* Obidalar ro'yxati: kichik belgi */
.arch-badge {
  position: absolute; left: 50%; top: 36%; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; background: var(--tilla); color: var(--lojuvard-deep);
  font: 800 11px var(--font-body); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .past-btn-spark { animation: none; } }

/* ================= Obida: to'liq ma'lumot bo'limlari ================= */
.site-summary { margin-bottom: 6px; }
.site-summary p { font-size: 18px; }
.info-checking {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0 0 10px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  background: var(--surface-2); color: var(--accent-text); border: 1px solid var(--line);
}
.info-checking::before { content: '⏳'; font-size: 11px; }
.info-head .info-checking { margin: 0; }
.info-toc {
  margin: 22px 0 8px; padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-inline-start: 3px solid var(--tilla);
}
.info-toc strong { display: block; font: 700 15px var(--font-head); color: var(--heading); margin-bottom: 6px; }
.info-toc ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 2px; }
.info-toc button {
  background: none; border: 0; padding: 6px 0; min-height: 36px; cursor: pointer;
  font: inherit; font-size: 15px; color: var(--link); text-align: start;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
}
.info-toc button:hover, .info-toc button:focus-visible { text-decoration-color: currentColor; }
.info-block {
  margin-top: 26px; scroll-margin-top: calc(var(--topbar-full) + 14px);
  transition: box-shadow .25s, background-color .25s;
}
.info-block p { margin: 0 0 12px; font-size: 17px; }
.info-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: start;
  gap: 6px 12px; margin-bottom: 10px;
}
.info-head h2 { grid-column: 1; }
.info-head .info-checking { grid-column: 1; grid-row: 2; }
.info-head .info-listen { grid-column: 2; grid-row: 1 / span 2; }
.info-head h2 { font-size: 24px; margin: 0; }
.info-head h2:focus { outline: none; }
.info-listen {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 17px;
}
.info-listen:hover { border-color: var(--tilla); }
.info-toggle {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: 600 15px var(--font-body); color: var(--link);
}
.info-toggle::after { content: ' ▾'; }
.info-toggle[aria-expanded="true"]::after { content: ' ▴'; }
.info-legends {
  padding: 18px 18px 8px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px dashed var(--tilla);
}
.info-legends p { font-style: italic; }
.info-block.speaking { box-shadow: -4px 0 0 var(--firuza); }
.info-legends.speaking { box-shadow: inset 4px 0 0 var(--firuza); }
.audio-now { margin: 8px 0 0; color: var(--accent-text); font-weight: 600; }
.audio-now:empty { display: none; }

/* ================= Ilova sozlamalari (Android) ================= */
.help-links:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.appset-card {
  padding: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 3px solid var(--tilla);
}
.appset-label { display: grid; gap: 6px; font-weight: 600; color: var(--heading); }
.appset-input {
  width: 100%; min-height: 48px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 16px var(--font-body);
}
.appset-input:focus { outline: 2px solid var(--firuza); outline-offset: 1px; }
.appset-status { margin: 10px 0; min-height: 1.4em; font-size: 15px; }
.appset-status.ok { color: var(--link); }
.appset-status.err { color: #c0392b; }
.appset-version { margin-top: 14px; text-align: center; }

/* Yuklanmagan rasm/video o'rnidagi belgi (lojuvard fon, tilla yulduz) */
img.media-fallback { object-fit: cover; background: #14295C; }
video.media-fallback { background: #14295C; }

/* ================= Yangi versiya belgisi ================= */
.update-banner {
  position: fixed; z-index: 2500; inset-inline: 12px; bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; background: var(--lojuvard); color: #fff;
  box-shadow: 0 12px 32px rgba(10, 20, 48, .35); border: 1px solid rgba(212, 161, 58, .5);
  max-width: 560px; margin-inline: auto;
}
@media (min-width: 761px) { .update-banner { bottom: 20px; } }
.update-text { flex: 1 1 180px; font-weight: 600; font-size: 14px; }
.update-banner .btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.update-later { border: 0; background: none; color: rgba(255, 255, 255, .75); font: 600 14px var(--font-body); cursor: pointer; padding: 6px; }
