/* ============================================================
   Cheaket — стили веб-интерфейса (Фаза 2)
   Единый файл. Секции помечены комментариями.
   ============================================================ */

  :root{
    --bg:#FAFBFC; --surface:#FFFFFF; --surface-2:#F4F6F9;
    --ink:#0F1B2D; --muted:#647084; --line:#E7EAEF;
    --brand:#1956D6; --brand-tint:#EEF3FE;
    --good:#18915E; --good-bg:#E6F4EC;
    --wait:#B9760E; --wait-bg:#FBF1DE;
    --high:#CC4B37; --high-bg:#FBE9E5;
    --r:16px; --r-sm:10px;
    --shadow:0 1px 2px rgba(15,27,45,.04), 0 8px 24px rgba(15,27,45,.05);
    --maxw:1120px;
    --dots:rgba(15,27,45,.13); --dots-gap:11.2px;
  }
  *{box-sizing:border-box}
  html{-webkit-text-size-adjust:100%}
  body{
    margin:0; background:var(--bg); color:var(--ink);
    font-family:"Inter",system-ui,sans-serif; font-size:15.5px; line-height:1.5;
    font-feature-settings:"tnum" 1,"cv05" 1;
    min-height:100vh; display:flex; flex-direction:column;
  }
  /* Фон: сетка точек у верха страницы, растворяется книзу (сессия 11.10.2026).
     Под всем контентом (z-index:-1 над фоном body), клики не перехватывает. */
  body::before{
    content:""; position:absolute; top:0; left:0; right:0; height:930px;
    z-index:-1; pointer-events:none;
    background-image:radial-gradient(var(--dots) 1px, transparent 1.3px);
    background-size:var(--dots-gap) var(--dots-gap);
    -webkit-mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,.45) 35%, transparent 70%);
            mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,.45) 35%, transparent 70%);
  }
  h1,h2,h3{font-family:"Manrope",sans-serif; margin:0; letter-spacing:-.02em; line-height:1.1}
  a{color:inherit; text-decoration:none}
  .wrap{max-width:var(--maxw); margin:0 auto; padding:0 24px}
  .demo-tag{display:inline-block; font-size:11px; font-weight:600; letter-spacing:.06em;
    text-transform:uppercase; color:var(--brand); background:var(--brand-tint);
    padding:3px 8px; border-radius:6px}
  .num{font-variant-numeric:tabular-nums}

  /* ---- position:relative — опора для абсолютных элементов внутри (метки кодов блоков убраны, §75) ---- */
  .panel,.card{position:relative}
  .hero,.section,.rt-head,header,footer{position:relative}

  /* ---------- Header ---------- */
  header{position:sticky; top:0; z-index:50; background:rgba(250,251,252,.85);
    backdrop-filter:saturate(180%) blur(10px); border-bottom:1px solid var(--line)}
  .hbar{display:flex; align-items:center; gap:28px; height:64px}
  .hbar .curdd + .curdd{margin-left:-18px}   /* три дропдауна рядом — gap 28px избыточен */
  .logo{display:flex; align-items:center; gap:9px; font-family:"Manrope"; font-weight:800;
    font-size:19px; letter-spacing:-.03em; cursor:pointer}
  .logo-img{height:36px; width:auto; display:block}
  nav.main{display:flex; gap:22px; margin-left:6px}
  nav.main a, .navprofile{color:var(--muted); font-weight:500; font-size:14.5px; padding:6px 0; position:relative; cursor:pointer}
  nav.main a:hover, .navprofile:hover{color:var(--ink)}
  nav.main a.active, .navprofile.active{color:var(--ink); font-weight:600}
  nav.main a.dim{opacity:.55}
  .hstats{color:var(--muted); font-size:9.5px; line-height:1.15;
          white-space:nowrap; letter-spacing:.1px; opacity:.85}
  .hspace{flex:1}
  .cur{display:flex; align-items:center; gap:6px; border:1px solid var(--line);
    background:var(--surface); border-radius:999px; padding:7px 12px; font-weight:600;
    font-size:14px; cursor:pointer}
  .cur:hover{border-color:#cdd4de}
  .cur svg{opacity:.5}

  /* ---------- Buttons ---------- */
  .btn{display:inline-flex; align-items:center; justify-content:center; gap:8px;
    font-weight:600; font-size:15px; border-radius:12px; padding:13px 20px; cursor:pointer;
    border:1px solid transparent; transition:transform .04s ease, background .15s ease}
  .btn:active{transform:translateY(1px)}
  .btn-primary{background:var(--brand); color:#fff}
  .btn-primary:hover{background:#1547b3}
  .btn-ghost{background:var(--surface); border-color:var(--line); color:var(--ink)}
  .btn-ghost:hover{border-color:#cdd4de}
  .btn-block{width:100%}

  /* ---------- Pills ---------- */
  .pill{display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:13px;
    padding:5px 11px; border-radius:999px}
  .pill .dot{width:7px; height:7px; border-radius:50%}
  .pill-good{background:var(--good-bg); color:var(--good)} .pill-good .dot{background:var(--good)}
  .pill-wait{background:var(--wait-bg); color:var(--wait)} .pill-wait .dot{background:var(--wait)}
  .pill-high{background:var(--high-bg); color:var(--high)} .pill-high .dot{background:var(--high)}

  /* ---------- HOME: hero ---------- */
  .hero{padding:72px 0 40px; text-align:center}
  .hero h1{font-size:clamp(34px,5vw,54px); font-weight:800; max-width:760px; margin:0 auto}
  .hero h1 .accent{color:var(--brand)}
  .hero p.sub{color:var(--muted); font-size:18px; max-width:560px; margin:18px auto 0}

  .search{max-width:840px; margin:36px auto 0; background:var(--surface);
    border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow);
    padding:10px; display:grid; grid-template-columns:1fr 1fr 150px auto; gap:8px; align-items:stretch}
  .field{display:flex; flex-direction:column; justify-content:center; text-align:left;
    padding:9px 14px; border-radius:var(--r-sm); background:var(--surface-2)}
  .field label{font-size:11.5px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted)}
  .field .val{font-weight:600; font-size:16px; margin-top:2px}
  .field .val.ph{color:#9aa3b1; font-weight:500}
  .search .btn{height:100%}

  .trip-row{display:flex; align-items:center; justify-content:center; gap:12px; margin-top:20px; flex-wrap:wrap}
  .trip-switch{position:relative; display:inline-flex; background:var(--surface-2); border:1px solid var(--line); border-radius:999px; padding:3px; flex-shrink:0}
  .trip-switch .thumb{position:absolute; top:3px; left:3px; bottom:3px; width:150px; background:var(--brand); border-radius:999px; transition:transform .2s ease}
  .trip-switch button{position:relative; z-index:1; border:none; background:transparent; padding:9px 0; width:150px; font-family:inherit; font-weight:600; font-size:14px; color:var(--muted); cursor:pointer}
  .trip-switch button.sel{color:#fff}
  .nights-inline{display:none; align-items:center; gap:8px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-sm); padding:9px 14px}
  .nights-inline select{border:none; background:transparent; font-family:inherit; font-size:14px; font-weight:600; color:var(--ink); cursor:pointer}
  /* §87: пояснение под «Туда-обратно» — вид «Внимание» (.as-disclaimer, §67 п.5) */
  .rt-note{max-width:720px; margin:16px auto 0; text-align:left}
  .rt-note[hidden]{display:none}

  .examples{margin:18px auto 0; color:var(--muted); font-size:14px}
  .examples a{color:var(--brand); font-weight:600; margin:0 4px; cursor:pointer}

  /* ---------- HOME: popular ---------- */
  .section{padding:46px 0}
  .section-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:20px; gap:16px}
  .section-head h2{font-size:24px; font-weight:700}
  .section-head .hint{color:var(--muted); font-size:14px}
  .cards{display:grid; grid-template-columns:repeat(3,1fr); gap:16px}
  .card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
    padding:18px; cursor:pointer; transition:border-color .15s ease, transform .08s ease;
    box-shadow:var(--shadow)}
  .card:hover{border-color:#cdd4de; transform:translateY(-2px)}
  .card .route{display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; font-family:"Manrope"; font-weight:700; font-size:18px; line-height:1.3}
  .card .route .r-from, .card .route .r-to{white-space:nowrap}
  .card .route .arr{color:var(--muted)}
  .card .cities{color:var(--muted); font-size:13.5px; margin-top:3px}
  .card .row{display:flex; align-items:flex-end; justify-content:space-between; margin-top:22px}
  .card .price{font-family:"Manrope"; font-weight:800; font-size:22px}
  .card .price small{font-weight:600; font-size:13px; color:var(--muted)}

  /* ---------- ROUTE PAGE ---------- */
  .rt-top{padding:30px 0 8px}
  .crumbs{color:var(--muted); font-size:13.5px; margin-bottom:14px}
  .crumbs a{color:var(--muted); cursor:pointer} .crumbs a:hover{color:var(--ink)}
  .rt-head{display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; padding-right:48px}
  .rt-title h1{font-size:clamp(26px,3.4vw,38px); font-weight:800}
  .rt-title .pair{color:var(--muted); font-size:16px; margin-top:6px}
  .date-picker{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
  .date-chip{border:1px solid var(--line); background:var(--surface); border-radius:10px;
    padding:9px 14px; font-weight:600; font-size:14px; cursor:pointer}
  .date-chip.sel{border-color:var(--brand); background:var(--brand-tint); color:var(--brand)}
  .date-chip:disabled{opacity:.4; cursor:not-allowed}
  .mode-chip{cursor:pointer; user-select:none}
  .mode-toggle-row{display:flex; gap:8px}
  .ttl-row{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
  .mode-toggle-panel{padding:12px 18px; margin-bottom:18px}
  .mode-bar{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}

  .rt-grid{display:grid; grid-template-columns:1.55fr 1fr; gap:18px; margin-top:22px; align-items:stretch}
  .panel{background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
    box-shadow:var(--shadow); padding:22px}
  .panel h3{font-size:16px; font-weight:700; margin-bottom:4px}
  .panel .ph-sub{color:var(--muted); font-size:13px; margin-bottom:16px}

  /* verdict */
  .verdict{padding:24px}

  /* chart */
  .chart-box{position:relative; height:260px; margin-top:6px}
  .chart-legend{display:flex; gap:18px; margin-top:14px; font-size:13px; color:var(--muted); flex-wrap:wrap}
  .chart-legend span{display:inline-flex; align-items:center; gap:7px}
  .chart-legend i{width:12px; height:12px; border-radius:3px; display:inline-block}
  /* §100: легенда точек истории цены #R2 (есть точки календаря) */
  .hist-legend{margin-top:8px; gap:6px 14px; font-size:12.5px}
  .hist-legend i.hl-dot{width:9px; height:9px; border-radius:50%; background:var(--brand)}
  .hist-legend i.hl-ring{background:#fff; box-shadow:inset 0 0 0 1.5px var(--brand)}
  .hist-legend i.hl-cal{background:#8b95a7}

  /* CTA panel */
  .cta-card{background:linear-gradient(180deg,#fff, #f7f9fd); border:1px solid var(--line)}
  .cta-card .price-now{font-family:"Manrope"; font-weight:800; font-size:34px}
  .cta-card .price-now small{font-size:14px; color:var(--muted); font-weight:600}
  .cta-note{font-size:12.5px; color:var(--muted); margin-top:6px}
  .app-inst{text-align:center; margin-top:8px}
  .app-inst a{color:var(--brand); font-weight:600; text-decoration:none}
  .dl-page .app-inst{text-align:left; margin:-6px 0 14px}
  .cta-card .btn-block{margin-top:16px}

  .grader{margin-top:16px; padding-top:16px; border-top:1px dashed var(--line)}
  .grader label{font-size:13px; font-weight:600; color:var(--ink)}
  .grader .inrow{display:flex; gap:8px; margin-top:8px}
  .grader input{flex:1; border:1px solid var(--line); border-radius:10px; padding:11px 13px;
    font-family:"Inter"; font-size:15px; font-weight:600; color:var(--ink); min-width:0}
  .grader input:focus{outline:none; border-color:var(--brand)}
  .grader .result{margin-top:10px; font-size:14px; font-weight:600; min-height:20px}

  /* #R7 оценщик v3 (§46.9): результат POST /api/assess */
  .pill-neutral{background:var(--surface-2); color:var(--muted)} .pill-neutral .dot{background:#9aa3b1}
  .as-res{display:flex; flex-direction:column; gap:8px; font-size:13.5px; line-height:1.45; color:var(--ink)}
  .as-res p{margin:0}
  .as-head{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
  .as-adv{font-weight:600}
  .as-track{color:var(--muted); font-size:12.5px}
  .as-lad{padding:10px 12px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px}
  .as-lad-ttl{font-size:12.5px; font-weight:600; margin-bottom:6px}
  .as-tbl{width:100%; border-collapse:collapse; font-size:12.5px}
  .as-tbl td{padding:3px 0; vertical-align:middle; white-space:nowrap}
  .as-tbl .as-l{width:1%; padding-right:10px; color:var(--muted)}
  .as-tbl .as-p{width:1%; padding-right:10px; font-variant-numeric:tabular-nums}
  .as-tbl .as-bar span{display:block; height:6px; min-width:2px; border-radius:3px; background:var(--brand)}
  .as-tbl .as-v{width:1%; padding-left:10px; text-align:right; font-weight:600; font-variant-numeric:tabular-nums}
  .as-risk{margin-top:8px !important; font-size:12.5px}
  .as-warn{background:var(--wait-bg); color:#7a4e09; border-radius:8px; padding:7px 10px; font-size:12.5px}
  .as-note{font-size:12px; color:var(--muted)}
  /* §67: сравнение с нашей ценой, строки «уже есть», подсказка к лестнице, оговорка */
  .as-cmp{font-size:12.5px; color:var(--muted)}
  .as-tbl tr.as-done .as-bar span{background:var(--good)}
  .as-tbl tr.as-done .as-v{color:var(--good)}
  .as-seen{margin-top:6px !important; font-size:12px; color:var(--good)}
  .as-help{vertical-align:middle; margin-left:2px}
  .as-help .ch-ic{width:16px; height:16px}
  .as-help .chart-help-pop{font-weight:400; font-size:12.5px; line-height:1.45}
  /* предупреждение «Внимание» (§67 п.5): знак, яркая рамка — не сноска */
  /* по центру свободного места панели: панель — колонка, обёртка забирает остаток
     высоты (без :has — просто под блоком «На выбранную дату») */
  .rt-grid > div > .panel:has(> .asd-wrap:not([hidden])){display:flex; flex-direction:column}
  .asd-wrap{flex:1 1 auto; display:flex; flex-direction:column; justify-content:center; padding-top:20px}
  .asd-wrap[hidden]{display:none}
  .as-disclaimer{display:flex; gap:12px; align-items:center;
    background:#FFF4D6; border:2px solid #F2A93B; border-radius:12px; padding:14px 16px;
    color:#4A3200; font-size:13px; line-height:1.5; box-shadow:0 2px 0 rgba(217,119,6,.15)}
  .as-disclaimer .asd-ic{flex:0 0 30px; width:30px; height:30px}
  .as-disclaimer .asd-ttl{font-size:13px; font-weight:800; letter-spacing:.06em;
    text-transform:uppercase; color:#B45309; margin-bottom:3px}
  .as-disclaimer p{margin:0}
  .as-disclaimer a{color:inherit; text-decoration:underline}

  .freeze{margin-top:14px; display:flex; align-items:center; justify-content:space-between;
    gap:12px; padding:14px 16px; border:1px dashed #cdd4de; border-radius:12px; background:var(--surface-2)}
  .freeze .ttl{font-weight:700; font-size:14px}
  .freeze .desc{font-size:12.5px; color:var(--muted); margin-top:2px}
  .soon{font-size:11px; font-weight:700; color:var(--muted); background:#e6e9ee; padding:4px 9px; border-radius:999px; white-space:nowrap}

  /* date strip */
  .dates-strip{display:grid; grid-template-columns:repeat(7,1fr); gap:8px; margin-top:6px}
  .dcell{border:1px solid var(--line); border-radius:10px; padding:10px 6px; text-align:center; cursor:pointer}
  .dcell .d{font-size:12px; color:var(--muted)}
  .dcell .p{font-family:"Manrope"; font-weight:700; font-size:14px; margin-top:4px}
  .dcell.low{background:var(--good-bg); border-color:#bfe3cd} .dcell.low .p{color:var(--good)}
  .dcell.hi{background:var(--high-bg); border-color:#f1c9bf} .dcell.hi .p{color:var(--high)}

  /* direct vs connect */
  .dvc{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:4px}
  .dvc .opt{border:1px solid var(--line); border-radius:12px; padding:14px}
  .dvc .opt .t{font-size:13px; color:var(--muted); font-weight:600}
  .dvc .opt .pr{font-family:"Manrope"; font-weight:800; font-size:22px; margin-top:4px}
  .dvc .opt .meta{font-size:12.5px; color:var(--muted); margin-top:4px}
  .dvc .opt.best{border-color:#bfe3cd; background:var(--good-bg)}

  /* footer */
  footer{border-top:1px solid var(--line); margin-top:auto; padding:18px 0; color:var(--muted); font-size:13px}
  .fbar{display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap}

  /* ---------- SEASON ---------- */
  .stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}
  .stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:18px;position:relative}
  .stat .k{font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
  .stat .v{font-family:"Manrope";font-weight:800;font-size:24px;margin-top:6px}
  .stat .v small{font-size:13px;color:var(--muted);font-weight:600}
  .stat.good{border-color:#bfe3cd;background:var(--good-bg)} .stat.good .v{color:var(--good)}
  .stat.high{border-color:#f1c9bf;background:var(--high-bg)} .stat.high .v{color:var(--high)}

  .mtable{width:100%;border-collapse:collapse;font-size:14px}
  .mtable th{text-align:left;font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.03em;padding:10px 12px;border-bottom:1px solid var(--line)}
  .mtable td{padding:11px 12px;border-bottom:1px solid var(--line)}
  .mtable tr:last-child td{border-bottom:none}
  .mtable .mname{font-weight:600}
  .mtable .mp{font-family:"Manrope";font-weight:700;font-variant-numeric:tabular-nums}
  .mtable .go{color:var(--brand);font-weight:600;cursor:pointer;white-space:nowrap}
  .mbar{height:8px;border-radius:4px;background:var(--surface-2);overflow:hidden;min-width:90px;max-width:160px}
  .mbar i{display:block;height:100%;border-radius:4px}

  .note{display:flex;gap:12px;align-items:flex-start;background:var(--brand-tint);border:1px solid #d6e2fb;border-radius:12px;padding:14px 16px;font-size:13.5px;color:#274a8c}
  .note b{color:var(--ink)}

  /* ---------- ROUND-TRIP ---------- */
  .combos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
  .combo{border:1px solid var(--line);border-radius:10px;padding:11px;text-align:center}
  .combo .len{font-size:12px;color:var(--muted)}
  .combo .cp{font-family:"Manrope";font-weight:700;margin-top:3px}
  .combo.best{border-color:#bfe3cd;background:var(--good-bg)} .combo.best .cp{color:var(--good)}

  /* ---------- INSIGHTS ---------- */
  .feed{display:grid;grid-template-columns:1fr 1fr;gap:18px}
  .insight{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:20px;position:relative;display:flex;flex-direction:column}
  .insight .itag{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--brand);background:var(--brand-tint);padding:3px 8px;border-radius:6px;align-self:flex-start}
  .insight h3{font-size:18px;font-weight:800;margin:12px 0 0;line-height:1.25}
  .insight p{color:var(--muted);font-size:14px;margin:8px 0 0}
  .insight .mini{height:130px;margin-top:14px;position:relative}
  .insight .ifoot{display:flex;align-items:center;justify-content:space-between;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-size:12.5px;color:var(--muted)}
  .insight .ifoot a{color:var(--brand);font-weight:600;cursor:pointer}

  @media (max-width:880px){.stat-row{grid-template-columns:1fr}.feed{grid-template-columns:1fr}}

  /* round-trip search + confidence + low-data */
  .rt-search{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:16px;max-width:680px}
  .dur-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
  .conf{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:3px 9px;white-space:nowrap}
  .conf .dot{width:6px;height:6px;border-radius:50%}
  .conf.hi .dot{background:var(--good)} .conf.mid .dot{background:var(--wait)} .conf.lo .dot{background:var(--high)}
  .hrow{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
  .hrow h3{margin-bottom:0}
  .opt-note{margin-top:12px;font-size:13px;background:var(--brand-tint);border:1px solid #d6e2fb;border-radius:10px;padding:10px 12px;color:#274a8c}
  .lowdata{border:1px dashed #cdd4de;border-radius:12px;background:var(--surface-2);padding:22px;text-align:center}
  .lowdata .ld-ic{width:32px;height:32px;display:block;margin:0 auto 8px}
  .lowdata .ld-t{font-weight:700;color:var(--ink);font-size:14.5px}
  .lowdata .ld-s{font-size:12.5px;margin-top:5px;color:var(--muted)}
  @media(max-width:880px){.rt-search{grid-template-columns:1fr}}

  /* cookie notice (ненавязчивое) */
  .cookiebar{position:fixed;right:20px;bottom:20px;z-index:80;max-width:360px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 32px rgba(15,27,45,.16)}
  .cookiebar .cb-in{padding:12px 14px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;position:relative}
  .cookiebar p{margin:0;font-size:13px;color:var(--muted)}
  .cookiebar a{color:var(--brand);font-weight:600;cursor:pointer}
  .cookiebar.hidden{display:none}

  .view{display:none} .view.show{display:block}

  @media (max-width:880px){
    .search{grid-template-columns:1fr 1fr; }
    .search .btn{grid-column:1 / -1}
    .cards{grid-template-columns:1fr}
    .rt-grid{grid-template-columns:minmax(0,1fr)}   /* §71.6 п.2: 1fr растягивался по min-content формы */
    nav.main{display:none}
    .navprofile{display:none}
    .hstats{display:none}
  }

/* ===== ДОБАВЛЕНО ДЛЯ ЖИВОГО UI (Фаза 2) ===== */
.curform{margin:0}
select.cur{appearance:none;-webkit-appearance:none;font-family:inherit;font-size:14px;
  font-weight:600;color:var(--ink);background-color:var(--surface);border:1px solid var(--line);
  border-radius:999px;padding:7px 30px 7px 12px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23647084' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center}
select.cur:hover{border-color:#cdd4de}
a.card{display:block;color:inherit;text-decoration:none}

/* ===== кастомный дропдаун валюты (как у Aviasales) ===== */
.curdd{position:relative}
.curdd-btn{display:inline-flex;align-items:center;gap:8px;font-family:inherit;font-size:14px;
  font-weight:600;color:var(--ink);background:var(--surface);border:1px solid var(--line);
  border-radius:10px;padding:8px 12px;cursor:pointer}
.curdd-btn:hover{border-color:#cdd4de}
.curdd-btn svg{opacity:.5}
.curdd-panel.wide{min-width:210px}
.curdd-panel{position:absolute;top:calc(100% + 8px);right:0;min-width:140px;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;
  box-shadow:var(--shadow);padding:6px;display:none;z-index:60;max-height:340px;overflow:auto}
.curdd.open .curdd-panel{display:block}
.curdd-item{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:9px 12px;border-radius:8px;font-size:14px;font-weight:600;color:var(--ink);text-decoration:none}
.curdd-item:hover{background:var(--surface-2)}
.curdd-item.sel{color:var(--brand)}

/* ===== метки кодов блоков (#R1 и т.п.) — привязка к своей панели ===== */
.panel{position:relative}
.hero{position:relative}
.section-head{position:relative}
.grader{position:relative}

/* ===== реальный поиск на главной ===== */
.field select, .field input{border:none; background:transparent; font-family:inherit;
  font-size:16px; font-weight:600; color:var(--ink); width:100%; padding:0; margin-top:2px; outline:none}
.field select{cursor:pointer; -webkit-appearance:none; appearance:none}
.field input::placeholder{color:#9aa3b1; font-weight:500}
.field select:invalid{color:#9aa3b1; font-weight:500}
.ac-panel{position:absolute; top:calc(100% + 13px); left:0; right:0; background:var(--surface);
  border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:6px;
  z-index:50; display:none; max-height:320px; overflow:auto; text-align:left}
.ac-panel.open{display:block}
.ac-item{padding:9px 12px; border-radius:8px; cursor:pointer; display:flex;
  justify-content:space-between; align-items:center; gap:10px}
.ac-item:hover, .ac-item.active{background:var(--surface-2)}
.ac-item .code{color:var(--muted); font-weight:600; font-size:13px}
.ac-empty{padding:10px 12px; color:var(--muted); font-size:13px}
.search-msg{max-width:840px; margin:10px auto 0; color:#cc4b37; font-size:13.5px; text-align:center; min-height:18px}

/* ============================================================
   Виджеты поиска на главной: дропдаун "Откуда", клавиатура
   автодополнения "Куда", кастомный календарь "Когда".
   ============================================================ */
.fromdd{position:relative}
.fromdd-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;
  width:100%;font-family:inherit;font-size:16px;font-weight:600;color:var(--ink);
  background:transparent;border:none;border-radius:0;
  padding:0;cursor:pointer;text-align:left}
.fromdd-btn:hover{opacity:.85}
.fromdd-btn:focus{outline:none}
.fromdd-btn:focus-visible{outline:none}
.fromdd-btn .ph{color:#9aa3b1;font-weight:500}
.fromdd-btn svg{opacity:.5;flex:0 0 auto}
.fromdd-panel{position:absolute;top:calc(100% + 26px);left:-24px;right:-21px;z-index:40;
  max-height:340px;overflow-y:auto;
  background:#fff;border:1px solid #e3e7ee;border-radius:12px;
  box-shadow:0 12px 32px rgba(20,40,80,.20);padding:6px;display:none}
.fromdd.open .fromdd-panel{display:block}
.fromdd-group{font-family:inherit;font-weight:700;font-size:14px;
  text-transform:uppercase;letter-spacing:.04em;color:#9aa3b1;
  padding:10px 12px 4px}
.fromdd-item{display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:9px 12px;border-radius:8px;cursor:pointer;font-size:14.5px;color:var(--text,#1a2230);white-space:nowrap}
.fromdd-item:hover{background:var(--surface-2,#f3f5f9)}
.fromdd-item.sel{color:var(--brand,#1956D6);font-weight:600}
.fromdd-item.kbd{background:var(--surface-2,#f3f5f9)}
.fromdd-item .code{color:#9aa3b1;font-size:12.5px}
.ac-item.kbd{background:var(--surface-2,#f3f5f9)}
/* --- календарь "Когда" --- */
.caldd{position:relative}
.caldd-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;
  width:100%;font-family:inherit;font-size:16px;font-weight:600;color:var(--ink);
  background:transparent;border:none;padding:0;cursor:pointer;text-align:left}
.caldd-btn:hover{opacity:.85}
.caldd-btn:focus,.caldd-btn:focus-visible{outline:none}
.caldd-btn .ph{color:#9aa3b1;font-weight:500}
.caldd-panel{position:absolute;top:calc(100% + 25px);left:-21px;z-index:40;
  width:max-content;background:#fff;border:1px solid #e3e7ee;border-radius:12px;
  box-shadow:0 12px 32px rgba(20,40,80,.20);padding:14px;display:none}
.caldd.open .caldd-panel{display:block}
.cal-head{display:flex;align-items:flex-start;gap:8px;margin-bottom:10px}
.cal-nav{flex:0 0 auto;width:30px;height:30px;border:1px solid #e3e7ee;border-radius:8px;
  background:#fff;cursor:pointer;font-size:18px;line-height:1;color:var(--ink);
  display:flex;align-items:center;justify-content:center}
.cal-nav:hover{border-color:#cdd4de;background:var(--surface-2,#f3f5f9)}
.cal-nav:disabled{opacity:.35;cursor:default}
.cal-months{display:flex;gap:22px;flex:1 1 auto;justify-content:space-around}
.cal-month{min-width:224px}
.cal-title{text-align:center;font-weight:700;font-size:14.5px;color:var(--ink);
  margin-bottom:8px;text-transform:capitalize}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal-dow{text-align:center;font-size:11.5px;font-weight:600;color:#9aa3b1;
  padding:4px 0;text-transform:uppercase}
.cal-day{text-align:center;font-size:13.5px;padding:7px 0;border-radius:7px;
  cursor:pointer;color:var(--ink);user-select:none}
.cal-day:hover{background:var(--surface-2,#f3f5f9)}
.cal-day.weekend{color:#5b8def}
.cal-day.today{box-shadow:inset 0 0 0 1px #c7d0de}
.cal-day.sel{background:var(--brand,#1956D6);color:#fff;font-weight:600}
.cal-day.sel:hover{background:var(--brand,#1956D6)}
.cal-day.empty{visibility:hidden;cursor:default}
.cal-day.disabled{color:#d4d9e2;cursor:default}
.cal-day.disabled:hover{background:transparent}

/* --- бейджи мобильных приложений в футере (режим "Скоро", не кликабельны) --- */
.appbadges{display:flex;gap:10px;align-items:center;margin:4px 0}
.appbadge{display:inline-flex;align-items:center;gap:9px;
  background:#1a1d24;color:#fff;border-radius:9px;padding:7px 13px;
  cursor:default;user-select:none;opacity:.55;
  border:1px solid rgba(255,255,255,.08)}
.appbadge svg{flex:0 0 auto}
.appbadge-txt{display:flex;flex-direction:column;justify-content:center;line-height:1.15;text-align:left}
.appbadge-txt .l1{font-size:9.5px;letter-spacing:.02em;opacity:.85}
.appbadge-txt .l2{font-size:14px;font-weight:600;letter-spacing:.01em}

/* --- подпись студии и телеграм в футере --- */
.fcredit{color:var(--muted);font-size:12.5px;margin-top:6px}
.ftg{font-size:12.5px;margin-top:2px}
.ftg a{color:var(--muted);text-decoration:underline}
.ftg a:hover{color:var(--brand,#1956D6)}

/* --- текстовый блок футера (всё слева, колонкой) --- */
.ftext{display:flex;flex-direction:column;gap:4px;text-align:left}
.fdisc{color:var(--muted)}
.fdisc a{color:var(--muted);text-decoration:underline}
.ftext .fcredit{margin-top:0}
.ftext .ftg{margin-top:0}

/* --- центрированный заголовок секции (главная: "Популярные направления") --- */
.section-head.centered{flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center}

/* --- #R0 заголовок страницы маршрута --- */
.crumb-title{font-size:11.5px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color:var(--muted)}
.h1-blue{color:var(--brand); font-weight:800}
.h1-plain{color:var(--ink); font-weight:600; font-size:0.9em}
.h1-sep{color:var(--ink); font-weight:600; font-size:0.9em}
.h1-cities{color:var(--brand); font-weight:700; font-size:1rem; margin-top:12px}
/* §86: строка городов теперь внутри <h1> (страница «в одну сторону») — вид как
   у прежнего div: шрифт текста, без сжатия букв, интерлиньяж body. */
.route-hero h1 .h1-cities{display:block; font-family:"Inter",system-ui,sans-serif;
  letter-spacing:normal; line-height:1.5}
/* §86: блок «Цены на авиабилеты …: коротко» (route.html, после «Сезонности») */
.route-answer p{margin:8px 0 0; font-size:14px; line-height:1.55; color:var(--ink)}
.route-answer h2.ttl + p{margin-top:10px}

/* --- Подъём "Популярные" ближе к поиску + QR телеграм-бота --- */
.section-popular{margin-top:-30px}
.tg-qr{display:flex; flex-direction:column; align-items:center; text-align:center; margin-top:36px}
.tg-qr-label{font-size:15px; font-weight:600; color:var(--ink); margin-bottom:12px}
.tg-qr-code{background:#fff; padding:14px; border-radius:14px;
  border:1px solid var(--line); box-shadow:var(--shadow); line-height:0}

/* --- Код аэропорта под названием города в карточке популярных --- */
.card .route-codes{font-size:12.5px; color:var(--muted); font-weight:500;
  letter-spacing:.03em; margin-top:2px}
.card .route-codes .arr, .card .route .arr{color:var(--muted)}

/* --- #R0 акцентная плашка заголовка маршрута --- */
.route-hero{background:var(--brand-tint); border:1px solid #d5e2fb;
  border-radius:var(--r); padding:20px 24px; margin:12px 0 4px; text-align:center}
.route-hero h1{margin:0}
/* Плашка маршрута: фото городов по краям, видимость 70% у края -> 0 к 1/4 ширины
   (примерка 11.10.2026). Нет файла города -> 404 -> фото просто не рисуется. */
.route-hero{position:relative; overflow:hidden; isolation:isolate}
.route-hero::before,.route-hero::after{
  content:""; position:absolute; top:0; bottom:0; width:25%; z-index:-1; pointer-events:none;
  background-size:cover; background-position:center; background-repeat:no-repeat}
.route-hero::before{left:0; background-image:var(--hero-from, none);
  -webkit-mask-image:linear-gradient(to right, rgba(0,0,0,.8), transparent);
          mask-image:linear-gradient(to right, rgba(0,0,0,.8), transparent)}
.route-hero::after{right:0; background-image:var(--hero-to, none);
  -webkit-mask-image:linear-gradient(to left, rgba(0,0,0,.8), transparent);
          mask-image:linear-gradient(to left, rgba(0,0,0,.8), transparent)}
.photo-credits{margin:6px 4px 0; font-size:11px; color:var(--muted)}
.photo-credits a{text-decoration:underline; text-decoration-color:var(--line)}

  /* #R7/#R8: поля ввода и кнопки одной высоты, ровно по уровню */
  .cta-card input[type="date"], .cta-card input[type="number"], .cta-card .btn{height:42px}

  /* колонки rt-grid одной высоты: панель заполняет колонку */
  .rt-grid > div{display:flex; flex-direction:column}
  .rt-grid > div > .panel{flex:1}
  .rt-grid > div > .panel.mode-toggle-panel{flex:0 0 auto}

  /* уверенность: цвет по уровню */
  .conf.hi{color:var(--good)}
  .conf.mid{color:var(--wait)}
  .conf.lo{color:var(--high)}

  /* #R9 диапазонный график */
  .rc-head{display:flex; justify-content:space-between; align-items:flex-start;
    gap:16px; flex-wrap:wrap; margin-bottom:14px}
  .rc-gran{display:flex; gap:6px; flex-shrink:0}

  /* #R9: скролл по оси X с фиксированной осью Y */
  .rc-wrap{position:relative}
  .rc-axis{position:absolute; left:0; top:0; width:76px; height:320px; z-index:2}
  .rc-scroll{margin-left:76px; overflow-x:auto; overflow-y:hidden}
  .rc-inner{height:320px}
  .rc-scroll::-webkit-scrollbar{height:9px}
  .rc-scroll::-webkit-scrollbar-track{background:var(--surface-2); border-radius:5px}
  .rc-scroll::-webkit-scrollbar-thumb{background:#cdd4de; border-radius:5px}
  .rc-scroll::-webkit-scrollbar-thumb:hover{background:#b3bcc9}

  /* #R9: индикация загрузки при смене гранулярности */
  .rc-busy{opacity:.45; transition:opacity .15s}
  .rc-chip{cursor:pointer; user-select:none}
  /* #R9 → история цены по клику на свечу (панель под графиком) */
  .rc-detail{margin-top:14px; padding:14px 16px; border:1px solid #e3e7ee; border-radius:12px; background:#fff}
  .rcd-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap}
  .rcd-tools{display:flex; align-items:center; gap:6px; flex-wrap:wrap}
  .rcd-btn{border:1px solid #d5dbe4; background:#fff; border-radius:8px; width:32px; height:32px; font-size:16px; line-height:1; cursor:pointer}
  .rcd-btn:hover{background:var(--surface-2)}
  .rcd-open{font-size:13px; margin:0 4px}
  .rcd-open.rcd-dis{color:var(--muted); opacity:.55; pointer-events:none; text-decoration:none; cursor:default}
  .rc-detail[hidden], .rc-detail [hidden]{display:none !important}


  /* подсказки к графикам (#R2, #R9) */
  .chart-help{position:relative; display:inline-flex; align-items:center; justify-content:center;
    width:26px; height:26px; flex-shrink:0; cursor:help; outline:none; margin-left:4px}
  .chart-help .ch-ic{width:22px; height:22px; display:block}
  .chart-help:hover .ch-ic{filter:brightness(1.06)}
  .chart-help-pop{position:absolute; top:calc(100% + 8px); right:0; width:340px; max-width:80vw;
    background:var(--surface); border:1px solid var(--line); border-radius:12px;
    box-shadow:0 12px 32px rgba(16,24,40,.18); padding:14px 16px; font-size:13px; line-height:1.55;
    font-weight:400; text-align:left; color:inherit; opacity:0; visibility:hidden;
    transform:translateY(-4px); transition:opacity .14s, transform .14s, visibility .14s;
    z-index:60; pointer-events:none; white-space:normal; cursor:default}
  .chart-help:hover .chart-help-pop, .chart-help:focus .chart-help-pop,
  .chart-help:focus-within .chart-help-pop{opacity:1; visibility:visible; transform:translateY(0)}
  .chart-help-pop b{display:block; font-weight:700; font-size:13.5px; margin-bottom:5px}
  .chart-help-pop ul{margin:7px 0 0; padding-left:17px}
  .chart-help-pop li{margin-bottom:4px}
  .chart-help-pop .chp-use{margin-top:9px; padding-top:9px; border-top:1px solid var(--line)}
  /* §74: окно справки — от шапки графика, а не от значка: когда переключатель #R9
     переносится под заголовок, значок слева и окно уходило за левый край */
  .rc-head{position:relative}
  .rc-head .chart-help{position:static}
  /* §76: на десктопе справки к графикам — шире и в две колонки (#R9 было 340x854px,
     на экране 900px низ уходил за край). Не помещается под шапкой — route_common.js
     (placeChartHelp) открывает над шапкой или сдвигает вверх в пределах окна. */
  @media (min-width:641px){
    .rc-head .chart-help-pop{width:min(680px,100%); columns:2; column-gap:28px}
    .rc-head .chart-help-pop b{break-after:avoid}
    .rc-head .chart-help-pop li, .rc-head .chart-help-pop .chp-use{break-inside:avoid}
    .rc-head .chart-help-pop .chp-use{margin-top:12px; padding-top:0; border-top:0}
  }
  /* §74: на телефоне — панель снизу во всю ширину, длинная справка листается внутри */
  @media (max-width:640px){ .chart-help-pop{position:fixed; left:12px; right:12px; top:auto;
    bottom:calc(12px + env(safe-area-inset-bottom, 0px)); width:auto; max-width:none;
    max-height:min(70vh,560px); overflow-y:auto; overscroll-behavior:contain;
    pointer-events:auto; z-index:95; transform:translateY(8px)} }

/* ===== Интересное (/insights), 12.10.2026 ===== */
.ins-h1{margin:10px 0 6px}
.ins-sub{color:#5b6472;max-width:760px;margin:0 0 16px;line-height:1.5}
.ins-draftnote{background:#fff6d6;border:1px solid #f0d77a;border-radius:8px;padding:8px 12px;margin:0 0 14px;font-size:13px}
.ins-tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.ins-tag{border:1px solid #d6dbe3;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer}
.ins-tag.active{background:#1f2937;border-color:#1f2937;color:#fff}
.ins-list{display:flex;flex-direction:column;gap:16px}
.ins-card{display:grid;grid-template-columns:1fr;gap:24px;align-items:center}
.ins-card.has-chart{grid-template-columns:minmax(0,1fr) minmax(0,420px)}
.ins-body{display:flex;flex-direction:column;gap:8px;min-width:0}
.ins-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:12px}
.ins-badge{background:#eef3fd;color:#2f6fe4;border-radius:6px;padding:2px 8px;font-weight:600}
.ins-badge-draft{background:#fff1e0;color:#b45f06}
.ins-pub{color:#8a93a3;margin-right:4px}
.ins-title{font-size:18px;line-height:1.3;margin:2px 0 0}
.ins-lead{margin:0;line-height:1.5;color:#2b3340}
.ins-chart{position:relative;height:200px}
.ins-routes{display:flex;flex-wrap:wrap;gap:8px;font-size:13px}
.ins-method summary{cursor:pointer;color:#5b6472;font-size:13px}
.ins-method p{margin:6px 0 0;font-size:13px;color:#5b6472;line-height:1.5}
.ins-note{margin:6px 0 0;font-size:12px;color:#8a93a3;line-height:1.4}
@media (max-width:760px){.ins-card.has-chart{grid-template-columns:1fr}}

/* ===== #W погода в городе прилёта (§49), 18.10.2026 ===== */
.conf.wx-fc{color:var(--brand)} .conf.wx-fc .dot{background:var(--brand)}
.conf.wx-norm .dot{background:#9aa3b1}
.wx-sub{font-size:13px; color:var(--muted); margin-top:2px}
.wx-tiles{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px}
.wx-tile{background:var(--brand-tint); border:1px solid #d6e2fb; border-radius:12px; padding:11px 13px}
.wx-tile .k{font-size:12px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em}
.wx-tile .v{font-family:"Manrope"; font-weight:800; font-size:21px; margin-top:2px}
.wx-tile .s{font-size:12px; color:var(--muted)}
.wx-strip{display:grid; grid-template-columns:repeat(7,1fr); gap:8px; margin-top:14px}
.wx-day{border:1px solid var(--line); border-radius:10px; padding:8px 2px 7px; text-align:center}
.wx-day .d{font-size:12px; color:var(--muted)}
.wx-day .d b{color:var(--ink); font-weight:600}
.wx-day svg{width:30px; height:30px; display:block; margin:3px auto 2px}
.wx-day .t{font-family:"Manrope"; font-weight:700; font-size:14px}
.wx-day .t small{color:var(--muted); font-weight:600; font-size:12px}
.wx-day .r{font-size:11.5px; color:var(--brand); font-weight:600; min-height:17px}
.wx-day .r .wx-drop{display:inline-block; width:10px; height:10px; margin:0 3px -1px 0}
.wx-cols{display:grid; grid-template-columns:1fr 1fr; gap:0 24px}
.wx-sec{margin-top:16px; min-width:0}
.wx-sec-ttl{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:7px;
  font-size:12px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em}
.wx-sec-ttl .pill{text-transform:none; letter-spacing:0; font-size:12px; padding:3px 9px}
.wx-list{margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:5px; font-size:13.5px}
.wx-list li{display:flex; gap:9px; align-items:flex-start}
.wx-list li::before{content:""; flex:0 0 6px; height:6px; margin-top:8px; border-radius:50%; background:var(--brand)}
.wx-list li.from::before{background:#9aa3b1}
.wx-acc{padding:9px 12px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px}
.wx-acc .as-tbl td{white-space:normal}
.wx-acc .as-tbl td:first-child{width:1%; white-space:nowrap; padding-right:14px; color:var(--muted)}
.wx-acc .as-tbl td:last-child{width:1%; white-space:nowrap; padding-left:12px; text-align:right; font-weight:600}
/* §74: узкий блок (телефон, две колонки погоды на ~800px) — строка в две:
   «фактор — уровень», под ними пояснение. Считается по ширине блока, не экрана */
.wx-acc{container-type:inline-size}
@container (max-width:460px){
  .wx-acc .as-tbl, .wx-acc .as-tbl tbody{display:block}
  .wx-acc .as-tbl tr{display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; padding:5px 0}
  .wx-acc .as-tbl tr + tr{border-top:1px solid var(--line)}
  .wx-acc .as-tbl td{display:block; width:auto; padding:0; white-space:normal}
  .wx-acc .as-tbl td:first-child{grid-column:1; grid-row:1; padding-right:0}
  .wx-acc .as-tbl td:last-child{grid-column:2; grid-row:1; padding-left:0; max-width:60cqi}
  .wx-acc .as-tbl td:nth-child(2){grid-column:1 / -1; grid-row:2; margin-top:2px}
}
.wx-foot{margin-top:14px; font-size:12px; color:var(--muted); line-height:1.45}
.wx-foot a{color:var(--brand)}
@media (max-width:760px){
  .wx-cols, .wx-tiles{grid-template-columns:1fr}
  .wx-strip{grid-template-columns:repeat(4,1fr)}
}

/* ===== Избранное (§59): билет ===== */
/* §97.4: билет левее на половину своей ширины (было -12px) — промахивались в «Профиль» */
.navfav{position:relative; display:inline-flex; align-items:center; color:var(--muted);
  margin-right:5px; flex:0 0 auto}
.navfav:hover, .navfav.active, .navfav.has{color:var(--brand)}
.navfav .tk{display:block}
.tk .tk-body{fill:none; stroke:currentColor; stroke-width:1.6}
.tk .tk-perf{stroke:currentColor; stroke-width:1.2; stroke-dasharray:1.6 1.6}
.tk .tk-plus{stroke:currentColor; stroke-width:1.5; stroke-linecap:round; fill:none}
.tk .tk-fill{fill:currentColor}
.tk .tk-hole{fill:var(--surface)}
.tk .tk-check{stroke:var(--surface); stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; fill:none}
.navfav-n{fill:currentColor; font:700 9px "Inter",sans-serif; letter-spacing:-.02em}

.fav-wrap{position:relative; margin-left:auto}
.fav-btn{display:inline-flex; align-items:center; gap:8px; padding:6px 13px 6px 9px;
  border-radius:999px; border:1px solid #d5e2fb; background:var(--surface); color:var(--muted);
  font:600 13.5px/1 "Inter",sans-serif; cursor:pointer;
  transition:color .15s, border-color .15s}
.fav-btn:hover{color:var(--brand); border-color:var(--brand)}
.fav-btn.on{color:var(--brand); border-color:#b9cdf6}
.fav-btn .tk{display:block; flex:0 0 auto}
.fav-btn .tk-on{display:none}
.fav-btn.on .tk-on{display:inline}
.fav-btn.on .tk-off{display:none}
.fav-btn.fav-off{display:none}
.fav-btn.punch .tk{animation:favPunch .42s ease-out}
@keyframes favPunch{0%{transform:scale(1)} 35%{transform:scale(1.25) rotate(-9deg)}
  70%{transform:scale(.94) rotate(2deg)} 100%{transform:none}}
.fav-tip{position:absolute; z-index:20; top:calc(100% + 8px); right:0; width:max-content; max-width:280px;
  background:var(--ink); color:#fff; font-size:13px; line-height:1.4; padding:8px 12px; border-radius:10px}
.fav-tip a{color:#9cc0ff; font-weight:600}
@media (max-width:600px){
  .fav-btn{padding:6px 8px}
  .fav-btn .fav-lbl{display:none}
  .fav-tip{max-width:240px}
}

/* страница /favorites */
.fav-head{display:flex; align-items:baseline; gap:12px}
.fav-total{color:var(--muted); font-size:14px}
.fav-loading{color:var(--muted); font-size:14px; padding:12px 0}
/* display:flex перебивал атрибут hidden — плашка «пусто» и тост висели всегда */
.fav-page [hidden], .fav-toast[hidden]{display:none !important}
.fav-empty{display:flex; align-items:center; gap:16px; text-align:left; padding:14px 18px; margin-top:4px}
.fav-empty-txt{flex:1; min-width:0}
.fav-empty .btn{margin:0 !important; flex:0 0 auto}
.fav-empty-ic{color:var(--brand); flex:0 0 auto; display:flex}
@media (max-width:600px){ .fav-empty{flex-wrap:wrap} .fav-empty .btn{flex-basis:100%; text-align:center} }
.fav-list{display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r); overflow:hidden}
.fav-list:empty{display:none}
.fav-card{display:flex; align-items:center; border-top:1px solid var(--line)}
.fav-card:first-child{border-top:0}
.fav-card-in{flex:1; min-width:0; display:flex; align-items:center; gap:16px; padding:14px 6px 14px 18px; color:inherit}
a.fav-card-in:hover{background:var(--brand-tint)}
.fav-ic{color:var(--brand); flex:0 0 auto}
.fav-ic .tk{display:block}
.fav-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px}
.fav-route{font-family:"Manrope",sans-serif; font-weight:800; color:var(--brand); font-size:16px}
.fav-cities{font-size:13.5px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.fav-meta{font-size:12.5px; color:var(--muted)}
.fav-price{text-align:right; flex:0 0 auto; min-width:120px}
.fav-now{font-weight:700; font-size:16px; color:var(--ink); white-space:nowrap}
.fav-pl{font-weight:500; font-size:13px; color:var(--muted)}
.fav-na{font-size:12.5px; color:var(--muted)}
.fav-delta{font-size:12.5px; font-weight:600; margin-top:3px; white-space:nowrap}
.fav-delta.down{color:var(--good)} .fav-delta.up{color:var(--high)} .fav-delta.eq{color:var(--muted)}
.fav-was{font-weight:400; color:var(--muted)}
.fav-skel{display:inline-block; width:90px; height:14px; border-radius:6px; background:var(--surface-2)}
.fav-del{flex:0 0 auto; width:40px; height:40px; margin:0 8px; border:0; background:none; border-radius:10px;
  color:var(--muted); cursor:pointer; display:grid; place-items:center}
.fav-del:hover{color:var(--high); background:var(--high-bg)}
.fav-card.gone .fav-card-in{cursor:default}
.fav-card.gone .fav-ic, .fav-card.gone .fav-route, .fav-card.gone .fav-cities,
.fav-card.gone .fav-now, .fav-card.gone .accent{color:#a7afbb}
.fav-gone{margin-top:28px}
.fav-gone-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px}
.fav-h2{font-size:17px; color:var(--muted)}
.fav-clear{border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:7px 14px;
  font:600 13px "Inter",sans-serif; color:var(--muted); cursor:pointer}
.fav-clear:hover{color:var(--high); border-color:#f0c4bb}
.fav-toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:90; display:flex;
  align-items:center; gap:14px; background:var(--ink); color:#fff; padding:11px 16px; border-radius:12px;
  font-size:14px; box-shadow:0 12px 32px rgba(15,27,45,.25)}
.fav-toast button{border:0; background:none; color:#9cc0ff; font:700 14px "Inter",sans-serif; cursor:pointer; padding:0}
@media (max-width:600px){
  .fav-card-in{gap:10px; padding:12px 2px 12px 12px; flex-wrap:wrap}
  .fav-price{min-width:0; text-align:left; flex-basis:100%; padding-left:44px}
  .fav-del{margin:0 4px}
}


/* ================= §68 (04.11.2026): #R5 переключатель + #R1 «Цифры / Шкала» =================
   route.html и route_rt.html — общие макросы _r1.html (§70). Стили старого
   route_rt.html удалены 06.11.2026 (§71.6 п.3). */

/* #R5 «Смешанные / Только прямые» — как «В одну сторону / Туда-обратно» (.trip-switch) */
.mode-switch{display:inline-flex; padding:3px; background:var(--surface-2); border:1px solid var(--line); border-radius:999px}
.mode-switch .mode-chip{border:0; background:transparent; border-radius:999px; padding:7px 0; width:136px;
  font:600 14px/1.3 "Inter",sans-serif; color:var(--muted); cursor:pointer; transition:background .2s, color .2s}
.mode-switch .mode-chip.sel{background:var(--brand); color:#fff}
.mode-switch .mode-chip:not(.sel):not(:disabled):hover{color:var(--ink)}
.mode-switch .mode-chip:disabled{opacity:.4; cursor:not-allowed}

/* #R1: общее */
.r1 [hidden]{display:none !important}
.r1 .pc{font-weight:600; font-size:.75em; color:var(--muted)}
.r1-prelim{margin:0 0 16px}
.r1-head{display:flex; align-items:center; justify-content:space-between; gap:10px 12px; flex-wrap:wrap}
.r1-h, .r1-h3{margin:0; font:600 15px/1.35 "Inter",sans-serif; letter-spacing:0; color:var(--ink)}
.r1-sub{font-size:13px; font-weight:400; color:var(--muted); margin-left:8px}
.r1-views{display:inline-flex; padding:2px; background:var(--surface-2); border:1px solid var(--line); border-radius:999px}
.r1-vbtn{border:0; background:transparent; border-radius:999px; padding:5px 13px;
  font:600 12.5px/1.3 "Inter",sans-serif; color:var(--muted); cursor:pointer}
.r1-vbtn:hover{color:var(--ink)}
.r1-vbtn[aria-pressed="true"]{background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(15,27,45,.14)}
.r1[data-view="nums"] .r1-only-scale, .r1[data-view="nums"] .r1-scale{display:none}
.r1[data-view="scale"] .r1-only-nums, .r1[data-view="scale"] .r1-nums{display:none}

/* #R1 «Цифры» */
.r1-grid{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) minmax(0,1.45fr); margin-top:14px}
.r1-cell{padding:0 20px; border-left:1px solid #EDF0F4; min-width:0}
.r1-cell:first-child{padding-left:0; border-left:0}
.r1-cell:last-child{padding-right:0}
.r1-k{font-size:13px; font-weight:500; color:var(--muted)}
.r1-v{font-family:"Manrope",sans-serif; font-weight:700; font-size:20px; letter-spacing:-.01em; margin-top:4px; white-space:nowrap}
.r1-mincap{margin-top:4px; font-size:12.5px; line-height:1.45; color:var(--muted)}
.r1-dot{display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--good); margin-right:6px; vertical-align:1px}
.r1-find{display:flex; gap:8px; align-items:flex-start; margin:14px 0 0; font-size:13px; line-height:1.5; color:var(--muted)}
.r1-ic{flex:0 0 15px; width:15px; height:15px; margin-top:2px; fill:none; stroke:var(--muted); stroke-width:1.5; stroke-linecap:round}
.r1-div{border:0; height:1px; background:var(--line); margin:22px 0}
.r1-cmp{display:inline-flex; gap:6px; align-items:center; margin:14px 0 0; padding:4px 10px; border-radius:12px; font-size:13px; font-weight:600}
.r1-cmp svg{flex:0 0 11px; width:11px; height:11px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.r1-cmp-lo{background:var(--good-bg); color:#126E47}
.r1-cmp-hi{background:var(--wait-bg); color:#8A560A}
.r1-cmp-eq{background:var(--surface-2); color:var(--muted)}
.r1-lownote{margin:10px 0 0; font-size:12.5px; color:var(--muted)}
.r1-empty-t{margin:8px 0 0; font-size:13.5px; color:var(--muted)}
.r1-ph{display:flex; align-items:center; gap:14px; margin-top:12px; padding:14px 16px;
  border:1px dashed #cdd4de; border-radius:12px; background:var(--surface-2)}
.r1-ph-b{flex:1; min-width:0}
.r1-ph-t{font-size:14px; font-weight:600; color:var(--ink)}
.r1-ph-s{font-size:12.5px; color:var(--muted); margin-top:2px}
.r1-ic-cal{flex:0 0 26px; width:26px; height:26px; fill:none; stroke:#9aa3b1; stroke-width:1.8; stroke-linecap:round}
.r1-ph-arrow{flex:0 0 20px; width:20px; height:20px; fill:none; stroke:var(--brand); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}

/* #R1 «Шкала» (разметку строит renderR1Scale) */
.r1-scale{margin-top:16px}
.r1-srow + .r1-srow{margin-top:12px}
.r1-srow-h{display:flex; align-items:baseline; justify-content:space-between; gap:4px 12px; flex-wrap:wrap}
.r1-srow-t{font-size:14px; font-weight:600; color:var(--ink)}
.r1-srow-t.is-date{color:var(--brand)}
.r1-srow-t.is-ghost{color:#8a94a6}
.r1-srow-v{font-size:13px; color:var(--muted)}
.r1-srow-v b{font-family:"Manrope",sans-serif; font-weight:700; font-size:18px; color:var(--ink); margin-left:4px}
.r1-track{position:relative; height:64px}
.r1-rail{position:absolute; top:28px; left:0; right:0; height:10px; border-radius:999px; background:#EEF1F5}
.r1-band{position:absolute; top:28px; height:10px; border-radius:999px; background:#A9C0F3; min-width:4px}
.r1-track.is-date .r1-band{background:var(--brand)}
.r1-med{position:absolute; top:22px; width:3px; height:22px; margin-left:-1.5px; border-radius:2px; background:var(--ink); box-shadow:0 0 0 2px #fff}
.r1-min{position:absolute; top:26px; width:14px; height:14px; margin-left:-7px; border-radius:50%; background:var(--good); box-shadow:0 0 0 2px #fff}
.r1-lbl{position:absolute; font-size:12px; color:var(--muted); white-space:nowrap}
.r1-lbl-min{top:4px; font-weight:600; color:#126E47}
.r1-lbl-lo{top:44px}
.r1-ghost{display:flex; align-items:center; justify-content:center; gap:8px; min-height:40px; margin:12px 0;
  padding:4px 14px; border:1px dashed #cdd4de; border-radius:999px; background:var(--surface-2);
  font-size:13px; color:var(--muted); text-align:center}
.r1-ghost .r1-ic-cal{flex-basis:16px; width:16px; height:16px}
.r1-ghost-arrow{color:var(--brand)}
.r1-axis{position:relative; height:22px; margin-top:4px; border-top:1px solid var(--line)}
.r1-axis span{position:absolute; top:4px; font-size:11.5px; color:var(--muted); white-space:nowrap}
.r1-legend{display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:10px; font-size:12px; color:var(--muted)}
.r1-legend span{display:inline-flex; align-items:center; gap:6px}
.r1-legend i{display:inline-block}
.r1-lg-min{width:9px; height:9px; border-radius:50%; background:var(--good)}
.r1-lg-med{width:3px; height:12px; border-radius:2px; background:var(--ink)}
.r1-lg-band{width:16px; height:7px; border-radius:999px; background:#A9C0F3}
.r1-minline{margin:10px 0 0; font-size:13px; color:var(--muted)}
.r1-scale .r1-cmp{margin-top:12px}

/* «справа» нет, когда колонки встали друг под друга (.rt-grid, 880px) */
@media (max-width:880px){ .r1-ph-arrow, .r1-ghost-arrow{display:none} }
@media (max-width:600px){
  .r1-grid{grid-template-columns:1fr 1fr; row-gap:14px}
  .r1-cell:nth-child(2){padding-right:0}
  .r1-cell:nth-child(3){grid-column:1 / -1; padding-left:0; border-left:0}
  .r1-sub{display:block; margin-left:0}
  .r1-vbtn{padding:8px 14px}
  /* §83: переключатель и билет «В избранное» — в одну строку (на 320–429 px
     билет уезжал на вторую строку, 17.11). Чипы — по тексту + 4 px, остаток
     места поровну; переключатель сжимается от 258 px. */
  .mode-bar{flex-wrap:nowrap; gap:8px}
  .mode-switch{flex:0 1 258px; min-width:0}
  .mode-switch .mode-chip{flex:1 1 auto; min-width:0; width:auto; padding:7px 4px; white-space:nowrap}
}
@media (max-width:370px){ .mode-switch .mode-chip{font-size:13px} }
@media (max-width:340px){
  .panel.mode-toggle-panel{padding-left:14px; padding-right:14px}
  .mode-switch .mode-chip{font-size:12px; padding:7px 2px}
}


/* ================= §68 п.3 (04.11.2026): заголовки и описания панелей =================
   .ttl / .desc (route.html, route_rt.html) были без стилей: заголовок — обычный текст
   15.5px, описание — тем же кеглем и цветом, что основной текст. Теперь как в #R1. */
.panel .ttl{font:600 15px/1.35 "Inter",sans-serif; letter-spacing:0; color:var(--ink)}
.panel .desc{font-size:13px; line-height:1.5; color:var(--muted); margin-top:3px}
/* фокус с клавиатуры — фирменной рамкой, а не чёрной браузерной */
.r1-vbtn:focus-visible, .mode-switch .mode-chip:focus-visible{outline:2px solid var(--brand); outline-offset:1px}
.r1-vbtn:focus:not(:focus-visible), .mode-switch .mode-chip:focus:not(:focus-visible){outline:none}


/* ================= §70 (05.11.2026): индикатор загрузки страницы маршрута =================
   Страницы маршрута собирает сервер; первая сборка RT — до 6–8 с (§69.4), ждать
   приходится на странице, с которой ушли. Полоса сверху — сразу, плашка — если
   дольше 0.7 с (base.html, pageLoading). */
.pg-load{position:fixed; left:0; right:0; top:0; height:3px; z-index:1000; overflow:hidden;
  pointer-events:none; opacity:0; transition:opacity .15s}
.pg-load.on{opacity:1}
.pg-load::before{content:""; position:absolute; top:0; bottom:0; left:-40%; width:40%;
  background:var(--brand); border-radius:0 3px 3px 0; animation:pgLoad 1.1s ease-in-out infinite}
@keyframes pgLoad{0%{left:-40%} 100%{left:100%}}
/* §73: между шапкой (низ 65px) и заголовком главной (верх 145px); nowrap — на
   телефоне fixed + left:50% сжимал плашку в две строки */
.pg-load-msg{position:fixed; left:50%; top:84px; transform:translateX(-50%); z-index:1000;
  white-space:nowrap;
  display:flex; align-items:center; gap:10px; max-width:calc(100vw - 32px);
  background:#fff; border:1px solid var(--line); border-radius:999px; padding:9px 18px;
  font-size:14px; color:var(--ink); box-shadow:0 8px 28px rgba(16,24,40,.14)}
.pg-load-msg[hidden]{display:none}
.pg-spin{flex:0 0 auto; width:15px; height:15px; border-radius:50%;
  border:2px solid var(--brand-tint); border-top-color:var(--brand); animation:pgSpin .8s linear infinite}
@keyframes pgSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){ .pg-load::before, .pg-spin{animation-duration:2.4s} }

/* ===== §71.6 п.2: мобильная шапка — кнопка ☰ и панель меню (≤880px) ===== */
.mnav-btn{display:none; width:40px; height:40px; padding:0; flex:0 0 auto;
  align-items:center; justify-content:center; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:10px; cursor:pointer}
.mnav-btn:hover{border-color:#cdd4de}
.mnav-btn svg{display:block}
.mnav-btn .ic-x, header.mnav-open .mnav-btn .ic-menu{display:none}
header.mnav-open .mnav-btn .ic-x{display:block}
.mnav{background:var(--surface); border-top:1px solid var(--line); box-shadow:var(--shadow)}
.mnav[hidden]{display:none}
.mnav .wrap{padding-top:4px; padding-bottom:16px}
.mnav-links a{display:block; padding:12px 0; border-bottom:1px solid var(--line);
  color:var(--ink); font-weight:500; font-size:15.5px; text-decoration:none}
.mnav-links a.active{font-weight:700}
.mnav-links a.mnav-acc{color:var(--brand); font-weight:600}
.mnav-cap{font-size:12px; color:var(--muted); margin:14px 0 6px}
.mnav-set{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap:8px}
.mnav-set label{display:flex; flex-direction:column; gap:4px; min-width:0; font-size:12px; color:var(--muted)}
.mnav-set select.cur{width:100%; min-width:0; font-size:16px; border-radius:10px; padding:8px 26px 8px 10px;
  background-position:right 8px center}
@media (max-width:880px){
  .mnav-btn{display:inline-flex}
  .hbar > .curdd{display:none}
  .hbar{gap:14px}
  .navfav{margin-right:17px}   /* §97.4: было 0 — промахивались в ☰ */
}
@media (min-width:881px){ .mnav{display:none !important} }
/* §72.6 п.2: iOS Safari приближает страницу при фокусе в поле со шрифтом < 16px
   и не отдаляет обратно — на телефоне 16px. !important: у #gradeInput шрифт
   в style, у .ainput/.aselect — в auth.css (подключён позже app.css).
   .acode (26px) и .field (16px) не трогаем. Плашка «Внимание» — знак над текстом. */
@media (max-width:880px){
  #gradeInput, .nights-inline select, .ainput, .aselect{font-size:16px !important}
  .as-disclaimer{flex-direction:column; gap:8px; align-items:flex-start}
}
/* §72.6 п.2: календарь главной на телефоне — один месяц (два = 576px > экрана);
   «›» в index.html (renderCal) блокируется по видимому месяцу — тот же 640px */
@media (max-width:640px){ .cal-months .cal-month + .cal-month{display:none} }
/* §88: «Выберите дату…» на странице маршрута — нажатие открывает календарь
   (route_common.js, openDatePicker). Заглушки — как кнопки: синяя рамка и
   светлый фон при наведении; короткие фразы — синие с пунктиром. */
[data-pick-date]{cursor:pointer}
.r1-ph[data-pick-date], .r1-ghost[data-pick-date], .lowdata[data-pick-date]{
  transition:border-color .15s, background-color .15s}
.r1-ph[data-pick-date]:hover, .r1-ghost[data-pick-date]:hover, .lowdata[data-pick-date]:hover{
  border-color:var(--brand); background:var(--brand-tint)}
.r1-ph[data-pick-date]:hover .r1-ph-t, .lowdata[data-pick-date]:hover .ld-t,
.r1-ghost[data-pick-date]:hover{color:var(--brand)}
.r1-ph[data-pick-date]:hover .r1-ic-cal{stroke:var(--brand)}
[data-pick-date]:focus{outline:none}
[data-pick-date]:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
.pick-link{color:var(--brand); border-bottom:1px dashed currentColor}
.pick-link:hover{border-bottom-style:solid}
.grader-off input:disabled, .grader-off button:disabled{pointer-events:none}
/* поле даты после нажатия: рамка и мягкое кольцо на 1.6 с (у кнопки border в style) */
#calddR8 .caldd-btn{transition:border-color .3s, box-shadow .3s}
#calddR8.flash .caldd-btn{border-color:var(--brand) !important; box-shadow:0 0 0 4px rgba(25,86,214,.18)}
