/* heuremaree — style.css
   Мобильный приоритет: у конкурентов до 98% трафика с телефонов. */

:root {
  --sea:      #0a6ea8;
  --sea-pale: #cfe8f7;
  --sea-dark: #084f78;
  --low:      #d1495b;
  --ink:      #1b2b33;
  --muted:    #6c7f8a;
  --line:     #e2e8ec;
  --bg:       #fff;
  --bg-soft:  #f6f9fb;
  --warn-bg:  #fff8e6;
  --warn-br:  #e6c14a;
  --radius:   10px;
  --wrap:     760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  padding: 0 16px 48px;
  max-width: var(--wrap);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── шапка ────────────────────────────────────────────────────────────── */

.brand {
  display: inline-block;
  padding: 18px 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--sea-dark);
}
.brand strong { color: var(--sea); }

.breadcrumb {
  padding: 6px 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.breadcrumb a { color: var(--muted); }

.page-head { padding: 22px 0 18px; }
.page-head h1 {
  margin: 0 0 4px;
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.subtitle { margin: 0; color: var(--muted); font-size: 0.9rem; }

h2 {
  margin: 34px 0 14px;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
h3 { margin: 20px 0 8px; font-size: 0.98rem; }

/* ─── приливы дня ──────────────────────────────────────────────────────── */

.tide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.tide-card {
  padding: 12px 10px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border-top: 3px solid var(--sea);
  text-align: center;
}
.tide-card.tide-low { border-top-color: var(--low); }

.tide-type {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.tide-time {
  display: block;
  margin: 2px 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sea-dark);
}
.tide-card.tide-low .tide-time { color: var(--low); }
.tide-height { display: block; font-size: 0.85rem; color: var(--muted); }

/* ─── ключевые цифры ───────────────────────────────────────────────────── */

.key-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.key-figures > div { text-align: center; }
.key-figures dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.key-figures dd {
  margin: 3px 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.key-figures dd small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--muted);
}

.coef-high { color: var(--low); }
.coef-mid  { color: #c47f17; }
.coef-low  { color: var(--muted); }

/* ─── текст ────────────────────────────────────────────────────────────── */

.prose p { margin: 0 0 12px; }
.prose .weekly {
  padding: 12px 14px;
  border-left: 3px solid var(--sea);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note, .chart-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.notice {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.notice-warn {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-br);
}

/* ─── SVG-график ───────────────────────────────────────────────────────── */

.tide-chart {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* ─── таблица недели ───────────────────────────────────────────────────── */

.tide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.tide-table th, .tide-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.tide-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.tide-table tbody th { width: 48px; font-weight: 600; }
.tide-table .is-today { background: var(--bg-soft); }

.dow { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; }
.dom { display: block; font-size: 1.15rem; font-weight: 700; line-height: 1.1; }

.tides-cell { line-height: 1.9; }
.mini-tide {
  display: inline-block;
  margin-right: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mini-tide.high { color: var(--sea-dark); }
.mini-tide.low  { color: var(--low); }
.mini-tide small { margin-left: 3px; color: var(--muted); font-size: 0.76rem; }

.coef-cell { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ─── клёв ─────────────────────────────────────────────────────────────── */

.fishing-state {
  padding: 14px;
  border-radius: var(--radius);
  border-left: 4px solid var(--muted);
  background: var(--bg-soft);
}
.fishing-very_good { border-left-color: #2e9e5b; }
.fishing-good      { border-left-color: #4d9fd0; }
.fishing-poor      { border-left-color: #c47f17; }

.fishing-state .label {
  display: inline-block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.fishing-state p { margin: 4px 0 0; font-size: 0.9rem; }
.fishing-state .delta { color: var(--muted); font-size: 0.82rem; }

.day-score { margin: 14px 0 0; font-size: 0.92rem; }
.day-score small { color: var(--muted); }

.solunar { list-style: none; margin: 10px 0 0; padding: 0; }
.solunar li {
  padding: 8px 12px;
  margin-bottom: 5px;
  border-radius: 7px;
  background: var(--bg-soft);
  font-size: 0.88rem;
}
.solunar-major { border-left: 3px solid var(--sea); font-weight: 500; }
.solunar-minor { border-left: 3px solid var(--line); }
.solunar strong { font-variant-numeric: tabular-nums; margin-right: 6px; }

/* ─── условия ──────────────────────────────────────────────────────────── */

.cond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.cond {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cond h3 {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.cond p { margin: 0; font-size: 0.92rem; }
.cond small { color: var(--muted); }

/* ─── карта ────────────────────────────────────────────────────────────── */

#map {
  height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

/* ─── соседи и списки ──────────────────────────────────────────────────── */

.neighbour-list, .point-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2px 14px;
}
.neighbour-list li, .point-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.km, .amp {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.region-block h2 { margin-bottom: 6px; }

/* ─── подвал ───────────────────────────────────────────────────────────── */

.page-foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.page-foot p { margin: 0 0 8px; }
.page-foot a { color: var(--muted); text-decoration: underline; }
.disclaimer { padding: 10px 12px; background: var(--bg-soft); border-radius: 7px; }

/* ─── шире экран ───────────────────────────────────────────────────────── */

@media (min-width: 620px) {
  body { padding: 0 24px 56px; }
  .page-head h1 { font-size: 1.9rem; }
  .tide-time { font-size: 1.7rem; }
  #map { height: 340px; }
}

/* ─── столбики коэффициента ────────────────────────────────────────────── */

.coef-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.coef-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}
.coef-bar.is-today { background: var(--bg-soft); border-radius: 6px; }
.cb-value {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cb-fill {
  width: 100%;
  max-width: 34px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--sea);
}
.cb-fill.coef-high { background: var(--low); }
.cb-fill.coef-mid  { background: #d99b2a; }
.cb-fill.coef-low  { background: #9db6c4; }
.cb-day {
  font-size: 0.7rem;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
  text-transform: uppercase;
}

/* ─── подразделы ───────────────────────────────────────────────────────── */

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
}
.subnav a {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 0.86rem;
  background: var(--bg-soft);
}
.subnav a:hover { text-decoration: none; border-color: var(--sea); }

/* ─── глоссарий ────────────────────────────────────────────────────────── */

.lexique-list dl { margin: 0; }
.lexique-list dt {
  margin-top: 16px;
  font-weight: 700;
  font-size: 1.02rem;
}
.lexique-list dd {
  margin: 3px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

/* ─── календарь коэффициентов ──────────────────────────────────────────── */

.cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 5px;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px 5px;
  border-radius: 7px;
  border: 1px solid var(--line);
  line-height: 1.2;
}
.cal-day.is-today { outline: 2px solid var(--sea); outline-offset: 1px; }
.cd-dow { font-size: 0.62rem; text-transform: uppercase; color: var(--muted); }
.cd-num { font-size: 1.05rem; font-weight: 600; }
.cd-coef {
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cal-low   { background: #f2f7f4; }
.cal-low   .cd-coef { color: #4c7a5e; }
.cal-mid   { background: #fdf6e8; }
.cal-mid   .cd-coef { color: #b8801a; }
.cal-high  { background: #fdeceb; }
.cal-high  .cd-coef { color: #c33f3f; }
.cal-great { background: #f7dedc; border-color: #e0a9a5; }
.cal-great .cd-coef { color: #9b2226; }

.episode { margin-bottom: 24px; }
.episode h3 { margin: 0 0 8px; font-size: 1rem; }
.episode h3 small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── предупреждения ───────────────────────────────────────────────────── */

.alert-box {
  margin: 14px 0;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: #fdeceb;
  border-left: 4px solid #c33f3f;
}
.alert-box strong { display: block; font-size: 0.98rem; color: #8d2828; }
.alert-box p { margin: 6px 0 0; font-size: 0.85rem; }
.alert-until { color: var(--muted); font-size: 0.8rem !important; }

/* ─── условия: крупные значения ────────────────────────────────────────── */

.cond .big {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin: 0 0 2px;
}
.cond .big small { font-size: 0.7rem; font-weight: 400; color: var(--muted); }
.cond-air .big { color: var(--sea-dark); }

/* ─── почасовая таблица ────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hourly-table { font-size: 0.82rem; min-width: 420px; }
.hourly-table th[scope="row"] {
  width: 34px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.hourly-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hourly-table small { color: var(--muted); }

/* ─── карта: контрол слоёв ─────────────────────────────────────────────── */

.leaflet-control-layers { font-size: 0.85rem; }

/* ─── страница рыбалки ─────────────────────────────────────────────────── */

.peche-table { min-width: 620px; font-size: 0.82rem; }
.peche-table .solunar-cell { line-height: 1.7; }
.sp {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 2px 1px 0;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.78rem;
}
.sp.major { background: #e3f0f8; color: var(--sea-dark); font-weight: 600; }
.sp.minor { background: var(--bg-soft); color: var(--muted); }

.score-cell { white-space: nowrap; }
.fish-score {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.fish-a { background: #e4f4ea; color: #1f7a45; }
.fish-b { background: #e6f1f8; color: #1b6089; }
.fish-c { background: #fdf4e3; color: #9a6b12; }
.fish-d { background: #f2f4f5; color: var(--muted); }

/* ─── погодная таблица ─────────────────────────────────────────────────── */

.cond-cell { white-space: nowrap; }
.cond-cell img { vertical-align: middle; margin-right: 4px; }
.cond-cell small { color: var(--muted); font-size: 0.75rem; }

/* ─── графики ──────────────────────────────────────────────────────────── */

.chart { margin-top: 30px; }
.chart .tide-chart { margin-bottom: 4px; }

/* ─── Луна картинкой ───────────────────────────────────────────────────── */

.cond-moon { text-align: center; }
.cond-moon h3 { text-align: left; }
.moon-svg {
  display: block;
  margin: 2px auto 4px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
}
.cond-moon p { font-size: 0.85rem; }

/* ─── обзорная карта ───────────────────────────────────────────────────── */

#map-multi {
  height: 340px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
@media (min-width: 620px) {
  #map-multi { height: 420px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ШИРОКАЯ РАСКЛАДКА ДЛЯ БОЛЬШИХ ЭКРАНОВ
   Добавлено 2026-08-05.

   Всё внутри @media (min-width:1000px) — на телефонах и планшетах вёрстка
   не меняется НИ НА ПИКСЕЛЬ. Это принципиально: по VERIFICATIONS.md доля
   мобильного трафика в нише около 87 %.

   Область действия ограничена страницами с блоком .today (точка, météo,
   pêche, température-eau, coefficients). Главная, регионы, департаменты
   и лексикон не затрагиваются.

   Чтобы откатить — удалить этот блок целиком, ничего больше трогать не надо.
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1000px) {

  body:has(> .today) {
    max-width: 1440px;
    padding: 0 26px 56px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 22px;
    align-content: start;
  }

  /* ── По умолчанию КАЖДЫЙ прямой потомок занимает всю ширину.
        Так любой блок, который я не перечислил (или который появится
        позже), останется нормальным, а не схлопнется в одну колонку. ── */
  body:has(> .today) > * { grid-column: 1 / -1; }

  /* ── Чередование: пара «график + пояснение», потом пара «блок + блок»,
        потом широкая полоса. Порядок задаётся order, ширина — span.     ── */

  body:has(> .today) > .site-head   { order: -5; }
  body:has(> .today) > .brand       { order: -4; }
  body:has(> .today) > .breadcrumb  { order: -3; }
  body:has(> .today) > .page-head   { order: -2; }
  body:has(> .today) > .alert-box,
  body:has(> .today) > .notice      { order: -1; }

  /* ── Порядок по потребности посетителя.
        Он пришёл узнать «когда вода» — сначала это, потом всё остальное. ── */

  /* 1. когда сегодня */
  body:has(> .today) > .today       { order:  1; }

  /* 2. как это выглядит.
        Раньше кривая шла на 8 колонок, а пояснение на 4 — и правая
        колонка с таблицей двенадцатых выходила вдвое выше левой,
        оставляя под графиком пустоту в пол-экрана. Теперь кривая
        занимает всю ширину, а под ней парой встают текст и таблица. */
  body:has(> .today) > .chart       { order:  2; }
  body:has(> .today) > .prose       { order:  3; grid-column: span 6; }
  body:has(> .today) > .twelfths    { order:  4; grid-column: span 6; }
  /* калькулятор высоты — рядом с правилом двенадцатых: обе про одно,
     «сколько будет воды», только одно считает браузер, другое читатель */
  body:has(> .today) > .wcalc       { order:  5; }

  /* 3. а в ближайшие дни — второй по частоте запрос */
  body:has(> .today) > .week        { order:  5; }

  /* 4. коэффициенты и клёв — рядом */
  body:has(> .today) > .chart-coef  { order:  6; grid-column: span 6; }
  body:has(> .today) > .fishing     { order:  7; grid-column: span 6; }

  /* 5. погода: сводка, потом почасовая */
  body:has(> .today) > .conditions  { order:  8; }
  body:has(> .today) > .hourly      { order:  9; }

  /* 5б. солнце и луна: два графика внутри одного блока, поэтому
         на половину ширины он не годится — пара колонок у него своя.
         order — целое число, дробное свойство просто игнорирует,
         поэтому дальше всё сдвинуто на единицу. */
  body:has(> .today) > .swell       { order:  8; }
  body:has(> .today) > .astro       { order: 10; }

  /* 6. где это: карта слева, соседи справа */
  body:has(> .today) > .map-section { order: 11; grid-column: span 8; }
  body:has(> .today) > .neighbours  { order: 12; grid-column: span 4; }

  body:has(> .today) > .subnav      { order: 13; }
  body:has(> .today) > .page-foot   { order: 20; }

  /* ── Если у блока нет пары (её не отрисовали из-за нехватки данных),
        он занимает всю ширину, а не оставляет полстраницы пустой. ── */
  body:has(> .today):not(:has(> .chart-coef)) > .fishing,
  body:has(> .today):not(:has(> .fishing))    > .chart-coef,
  body:has(> .today):not(:has(> .prose))      > .chart,
  body:has(> .today):not(:has(> .neighbours)) > .map-section { grid-column: 1 / -1; }

  /* ── секции превращаются в карточки ── */
  body:has(> .today) > .prose,
  body:has(> .today) > .chart,
  body:has(> .today) > .week,
  body:has(> .today) > .fishing,
  body:has(> .today) > .conditions,
  body:has(> .today) > .hourly,
  body:has(> .today) > .map-section,
  body:has(> .today) > .neighbours {
    margin: 0 0 22px;
    padding: 0 18px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
  }

  /* заголовок секции — как шапка карточки */
  body:has(> .today) > section > h2:first-child {
    margin: 0 -18px 14px;
    padding: 13px 18px;
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  /* .prose без заголовка — просто отступ сверху */
  body:has(> .today) > .prose { padding-top: 16px; }
  body:has(> .today) > .prose p { max-width: 62ch; }
  body:has(> .today) > .prose p:first-child { margin-top: 0; }

  /* .today — плитки во всю ширину, крупнее */
  body:has(> .today) > .today { margin-bottom: 22px; }
  body:has(> .today) .tide-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  body:has(> .today) .tide-time { font-size: 1.75rem; }
  body:has(> .today) .key-figures { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

  /* карта тянется на всю карточку */
  body:has(> .today) > .map-section { padding-left: 0; padding-right: 0; }
  body:has(> .today) > .map-section > h2:first-child { margin-left: 0; margin-right: 0; }
  body:has(> .today) > .map-section > *:not(h2) { padding-left: 18px; padding-right: 18px; }
  body:has(> .today) > .map-section iframe,
  body:has(> .today) > .map-section .map { min-height: 340px; }

  /* соседи — компактный список, без внутренних полей по бокам */
  body:has(> .today) > .neighbours ul { margin: 0; }

  /* таблицы получают всю ширину и перестают жаться */
  body:has(> .today) .tide-table,
  body:has(> .today) .hourly-table { font-size: 0.92rem; }

  /* крупные экраны — чуть больше воздуха */
  h1 { font-size: 2rem; }
  body:has(> .today) > .page-head { padding: 20px 0 16px; }
}


/* ══════════════════════════════════════════════════════════════════════════
   НОВЫЕ БЛОКИ. Добавлено 2026-08-06.
   Работают на всех ширинах, включая телефон.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── «Сейчас»: уровень воды и скорость ── */
.now-bar {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0a6ea8, #0b5f92 55%, #084f78);
  color: #fff;
}
.now-bar .tube { width: 88px; }
.now-k {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 0.72;
}
.now-v {
  display: block;
  margin: 3px 0 5px;
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.now-v small { font-size: 1.25rem; font-weight: 500; opacity: 0.8; margin-left: 4px; }
.now-flow { display: block; font-size: 0.96rem; }
.now-next { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.now-big { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.15; }
.now-cap { display: block; font-size: 0.88rem; opacity: 0.8; }
.now-kpis { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.now-kpi {
  flex: 1 1 96px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  text-align: center;
}
.now-kpi .k { display: block; font-size: 0.63rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.now-kpi .v { display: block; font-size: 1.4rem; font-weight: 700; line-height: 1.25; white-space: nowrap; }

/* ── Тепловая карта погоды ── */
.hm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 6px; }
.hm {
  display: grid;
  grid-template-columns: 104px repeat(var(--hm-cols), minmax(36px, 1fr));
  gap: 4px;
  min-width: 620px;
}
.hm-h { font-size: 0.66rem; color: var(--muted); text-align: center; padding-bottom: 2px; }
.hm-k { font-size: 0.76rem; color: var(--muted); display: flex; align-items: center; padding-right: 6px; }
.hm-c {
  height: 38px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.hm-na { background: var(--bg-soft); color: var(--muted); }

/* ── Столбики коэффициентов и дуга солнца ── */
.chart-coef .chart-svg { margin-top: 4px; }
.cond-sun svg { margin: 4px 0 8px; }

/* ── Широкие экраны ── */
@media (min-width: 1000px) {
  body:has(> .today) > .now-bar {
    grid-column: 1 / -1;
    order: 0;
    grid-template-columns: 110px minmax(0, 1.1fr) minmax(0, 1fr) auto;
    gap: 24px;
    padding: 22px 28px;
  }
  body:has(> .today) > .now-bar .tube { width: 110px; }
  body:has(> .today) > .now-bar .now-v { font-size: 3.2rem; }
  body:has(> .today) > .now-bar .now-next {
    grid-column: auto;
    padding: 0 0 0 24px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
  }
  body:has(> .today) > .now-bar .now-kpis { grid-column: auto; flex-wrap: nowrap; }

  /* ── Внутри широких секций тоже две колонки:
        картинка слева, короткое пояснение справа. ── */
  body:has(> .today) > .hourly {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 0 24px;
    align-items: start;
  }
  body:has(> .today) > .hourly > h2 { grid-column: 1 / -1; }
  body:has(> .today) > .hourly > .table-scroll { grid-column: 1 / -1; }
  /* плиткам нужна вся ширина: в колонке 1fr их помещалось пять из шести,
     и «Indice UV» уезжал на отдельную строку в одиночестве */
  body:has(> .today) > .hourly > .stat-tiles { grid-column: 1 / -1; }
  body:has(> .today) > .hourly > .note {
    margin: 0;
    padding: 13px 15px;
    border-left: 3px solid var(--sea);
    background: var(--bg-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.83rem;
    line-height: 1.5;
  }

  /* пояснение под столбиками коэффициентов прижимаем к низу карточки */
  body:has(> .today) > .chart-coef { display: flex; flex-direction: column; }
  body:has(> .today) > .chart-coef > .note { margin-top: auto; padding-top: 10px; }
}


/* ══════════════════════════════════════════════════════════════════════════
   ШАПКА САЙТА. Добавлено 2026-08-06.
   Синяя полоса во всю ширину окна, внутри — логотип и разделы.
   Полоса «вырывается» из ограниченной по ширине body приёмом
   width:100vw + margin-left:calc(50% - 50vw).
   ══════════════════════════════════════════════════════════════════════════ */

.site-head {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 6px;
  background: linear-gradient(100deg, #0a6ea8, #084f78);
  color: #fff;
}
.site-head-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.site-head .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  font-size: 1.16rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: #fff;
}
.site-head .brand:hover { text-decoration: none; }
.site-head .brand strong { color: #ffd66b; font-weight: 700; }
.brand-mark { width: 27px; height: 27px; flex: none; display: block; }

.site-nav { display: flex; gap: 18px; font-size: 0.9rem; flex-wrap: wrap; }
.site-nav a { color: rgba(255, 255, 255, 0.82); }
.site-nav a:hover { color: #fff; text-decoration: none; }

/* На узком экране логотип сверху, разделы под ним */
@media (max-width: 560px) {
  .site-head-in { gap: 0 16px; padding-bottom: 8px; }
  .site-nav { font-size: 0.84rem; gap: 14px; }
}

/* Подвал-навигация страницы точки */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.subnav a {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  background: var(--bg-soft);
}


/* ── Кольцо и кривая клёва ── */
.fish-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}
.fish-score { text-align: center; }
.fish-gauge { width: 140px; margin: 0 auto; }
.fish-lab {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
@media (max-width: 620px) {
  .fish-head { grid-template-columns: 1fr; }
  .fish-gauge { width: 118px; }
}


/* Мелкие графики не должны раздуваться, когда секция уходит во всю ширину:
   виноват не блок, а SVG, который тянется за контейнером. */
.fish-head { max-width: 760px; }
.fish-head .chart-svg { max-width: 560px; }
.chart-coef .chart-svg { max-width: 680px; }
.cond-sun svg { max-width: 320px; }


/* ── Компактная строка клёва на странице приливов ── */
.fishing-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 0.92rem;
}
.fs-k {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.fs-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fs-good { background: #0d8f7a; }
.fs-mid  { background: #c8791a; }
.fs-low  { background: var(--low); }
.fs-v { font-weight: 700; }
.fs-v small { font-weight: 400; color: var(--muted); }
.fs-note { color: var(--muted); font-size: 0.86rem; }
.fs-link { margin-left: auto; white-space: nowrap; font-size: 0.88rem; }
@media (max-width: 620px) { .fs-link { margin-left: 0; } }

/* Полоса клёва не должна растягиваться под высоту соседней карточки */
.fishing-strip { align-self: start; }
@media (min-width: 1000px) {
  body:has(> .today) > .fishing-strip {
    align-self: start;
    padding: 12px 16px;
    margin-bottom: 22px;
  }
  body:has(> .today) > .fishing-strip > h2 { display: none; }
}


/* ── Коэффициент в цветном кружке (шкала Meteoconsult) ── */
.coef-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 7px;
  margin-right: 4px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}
.coef-b1 { background: #eaf3f9; color: #4a7080; }
.coef-b2 { background: #cfe3f2; color: #0a5c88; }
.coef-b3 { background: #7fb8dd; color: #08344f; }
.coef-b4 { background: #2f86bd; color: #fff; }
.coef-b5 { background: #084f78; color: #fff; }
.coef-na { background: var(--bg-soft); color: var(--muted); font-weight: 400; }

.coef-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.coef-legend .coef-chip { min-width: 0; height: 18px; font-size: 0.68rem; margin: 0; }

/* ── Обратный отсчёт ── */
.now-cd {
  display: block;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

/* ── Правило двенадцатых ── */
.twelfths {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 8px;
}
.twelfths caption {
  text-align: left;
  padding-bottom: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.twelfths th, .twelfths td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.twelfths thead th {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}
.twelfths tbody th { font-weight: 600; white-space: nowrap; }
.twelfths .tw-lvl { font-weight: 600; color: var(--sea-dark); }
.twelfths tr:last-child th, .twelfths tr:last-child td { border-bottom: 0; }


/* ══════════════════════════════════════════════════════════════════════════
   СВОДКА УСЛОВИЙ У ЗАГОЛОВКА и КАРТОЧКИ ОТСЧЁТА. Добавлено 2026-08-06.
   ══════════════════════════════════════════════════════════════════════════ */

.page-head { display: flex; align-items: flex-end; gap: 16px 26px; flex-wrap: wrap; }
.ph-main { flex: 1 1 260px; }

.cond-strip {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}
.cs-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}
.cs-item b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ic { width: 16px; height: 16px; flex: none; display: block; color: var(--sea); }

/* ── Две карточки: до малой и до полной воды ── */
.next-tides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.nt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.nt-low  { background: #fffaf0; border-color: #f0e0bd; }
.nt-high { background: #f2f9f6; border-color: #cfe6dc; }
.nt-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}
.nt-low  .nt-ic { background: #fbeccb; color: #b07a13; }
.nt-high .nt-ic { background: #d9ede4; color: #0d7355; }
.nt-ic .ic { width: 20px; height: 20px; color: inherit; }
.nt-body { min-width: 0; }
.nt-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 3px; }
.nt-k {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
}
.nt-low  .nt-k { color: #b07a13; }
.nt-high .nt-k { color: #0d7355; }
.nt-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nt-coef { font-weight: 700; color: var(--sea-dark); }
.nt-cd {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1000px) {
  body:has(> .today) > .next-tides { grid-column: 1 / -1; order: 0; }
}
@media (max-width: 560px) {
  .cond-strip { gap: 4px 12px; }
  .cs-item { font-size: 0.82rem; }
  .nt-cd { font-size: 1.25rem; }
}


/* ── Вкладки месяцев на календаре коэффициентов ── */
.month-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.mt {
  display: block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  text-align: center;
  line-height: 1.2;
  color: var(--muted);
}
.mt:hover { text-decoration: none; border-color: var(--sea-pale); }
.mt-m { display: block; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.mt-y { display: block; font-size: 0.7rem; }
.mt-on { background: var(--sea); border-color: var(--sea); color: #fff; }
.mt-on .mt-y { color: var(--sea-pale); }

/* Календарные ячейки: цвет теперь несёт кружок коэффициента, не фон */
.cal-day .coef-chip { margin: 4px 0 0; }


/* ── Вкладки подстраниц порта, сразу под заголовком ── */
.port-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.port-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.87rem;
  white-space: nowrap;
}
.port-tabs a:hover { text-decoration: none; border-color: var(--sea-pale); background: #eef6fb; }
.port-tabs .ic { width: 15px; height: 15px; }

@media (min-width: 1000px) {
  body:has(> .today) > .port-tabs { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 560px) {
  .port-tabs { gap: 6px; }
  .port-tabs a { padding: 6px 11px; font-size: 0.82rem; }
}


/* ══════════════════════════════════════════════════════════════════════════
   ГЛАВНАЯ: поиск, ближайший порт, коэффициент дня. Добавлено 2026-08-06.
   ══════════════════════════════════════════════════════════════════════════ */

.home-coef {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  white-space: nowrap;
}
.home-coef:hover { text-decoration: none; border-color: var(--sea-pale); }
.hc-k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.hc-l { font-size: 0.84rem; color: var(--muted); }

.home-find { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.hf-input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
}
.hf-input:focus { outline: 2px solid var(--sea-pale); outline-offset: 1px; background: #fff; }
.hf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--sea);
  border-radius: 999px;
  background: var(--sea);
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.hf-btn:hover { background: var(--sea-dark); border-color: var(--sea-dark); }
.hf-btn:disabled { opacity: 0.6; cursor: default; }
.hf-btn .ic { color: #fff; }
.hf-empty { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }

.rb-count {
  margin-left: 10px;
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}


/* ── Фото точки в шапке. Подпись автора обязательна по лицензии CC. ── */
.ph-photo {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.ph-credit {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}
.ph-credit a { color: var(--muted); text-decoration: underline; }
@media (max-width: 560px) {
  .ph-photo { width: 64px; height: 64px; border-radius: 11px; }
}


/* ── Вопросы и ответы. Размечены как FAQPage, поэтому обязаны быть видимы. ── */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin-bottom: 8px;
}
.faq-item summary {
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.94rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 16px 14px; font-size: 0.92rem; color: #2c3d47; }

@media (min-width: 1000px) {
  body:has(> .today) > .faq { grid-column: 1 / -1; order: 12; }
}


/* ── Карточки портов на страницах регионов ── */
.port-cards {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.pc-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  height: 100%;
  transition: border-color .12s, transform .12s;
}
.pc-link:hover { text-decoration: none; border-color: var(--sea-pale); transform: translateY(-2px); }
.pc-img {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
  background: var(--bg-soft);
}
.pc-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sea-pale);
}
.pc-noimg .ic { width: 34px; height: 34px; color: inherit; }
.pc-body { display: block; padding: 10px 12px 12px; }
.pc-name { display: block; font-weight: 600; font-size: 0.93rem; color: var(--ink); line-height: 1.3; }
.pc-amp {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pc-credits { margin: 12px 0 0; font-size: 0.7rem; color: var(--muted); line-height: 1.45; }
.pc-credits a { color: var(--muted); text-decoration: underline; }

@media (max-width: 480px) {
  .port-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .pc-img { height: 88px; }
}


/* ══════════════════════════════════════════════════════════════════════════
   ЛЕНТА УСЛОВИЙ ДНЯ. Перенесена наверх 2026-08-06 вместо шести карточек.
   ══════════════════════════════════════════════════════════════════════════ */

.cond-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
}
.ct {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-width: 0;
}
.ct-ic { display: flex; flex: none; align-items: center; justify-content: center; }
.ct-ic .ic { width: 20px; height: 20px; color: var(--sea); }
.ct-body { min-width: 0; }
.ct-k {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.ct-v {
  display: block;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.ct-s {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-wide { grid-column: span 1; }

/* фото точки крупнее */
.ph-photo { width: 140px; height: 140px; border-radius: 16px; }
@media (max-width: 560px) { .ph-photo { width: 84px; height: 84px; border-radius: 12px; } }

/* подпись к снимку — внизу страницы */
.ph-credit { margin: 20px 0 0; font-size: 0.72rem; color: var(--muted); line-height: 1.45; }
.ph-credit a { color: var(--muted); text-decoration: underline; }

@media (min-width: 1000px) {
  body:has(> .today) > .conditions { grid-column: 1 / -1; order: 2; padding: 0; border: 0; }
  body:has(> .today) > .conditions > h2 { display: none; }
  body:has(> .today) > .ph-credit { grid-column: 1 / -1; order: 19; }
}


/* ── Плитки условий внутри шапки: занимают пустоту справа от заголовка ── */
.page-head { align-items: flex-start; }
.page-head .cond-tiles {
  flex: 1 1 420px;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 8px;
}
.page-head .ct { padding: 8px 11px; gap: 8px; }
.page-head .ct-ic .ic { width: 17px; height: 17px; }
.page-head .ct-v { font-size: 0.95rem; }
.page-head .ct-k { font-size: 0.62rem; }
.page-head .ct-s { font-size: 0.7rem; }

@media (max-width: 900px) {
  .page-head .cond-tiles { flex-basis: 100%; margin-top: 6px; }
}

/* Плитка «Soleil» шире: «06:54 → 21:45» не влезает в узкую колонку */
.page-head .ct-wide { grid-column: span 2; }
@media (max-width: 520px) { .page-head .ct-wide { grid-column: span 1; } }


/* ══════════════════════════════════════════════════════════════════════════
   МЕНЬШЕ КОРОБОК. Добавлено 2026-08-06.

   Было: каждый элемент — прямоугольник со скруглением и рамкой 1px.
   Когда таких прямоугольников на экране полтора десятка, страница читается
   как набор виджетов, а не как документ. Профессиональная вёрстка разделяет
   смысл пробелом и типографикой, а рамку тратит только на то, что и правда
   отдельный объект.

   Правило здесь такое: мелочь (плитки условий, карточки приливов) теряет
   рамку и фон, крупные секции её сохраняют, но шапка секции становится
   обычным заголовком с акцентной чертой вместо серой плашки.

   Откат: удалить этот блок целиком.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── плитки условий: без рамок, разделяем тонкой чертой ── */
.cond-tiles {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.ct {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 8px 16px;
  position: relative;
}
.ct + .ct::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: var(--line);
}
.page-head .ct { padding: 7px 14px; }

/* ── приливы дня: одна лента, а не четыре коробки ── */
.tide-cards {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.tide-card {
  border-top: 0;
  border-radius: 0;
  background: none;
  padding: 16px 12px;
  position: relative;
}
.tide-card + .tide-card { box-shadow: inset 1px 0 0 var(--line); }
.tide-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--sea);
}
.tide-card.tide-low::after { background: var(--low); }

/* ── шапки секций: заголовок с акцентом вместо серой плашки ── */
@media (min-width: 1000px) {
  body:has(> .today) > section > h2:first-child {
    margin: 0 -18px 12px;
    padding: 14px 18px 10px;
    background: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    position: relative;
  }
  body:has(> .today) > section > h2:first-child::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: -1px;
    width: 34px;
    height: 2px;
    background: var(--sea);
  }
}

/* ── карточки отсчёта: убираем рамку, оставляем цветную заливку ── */
.nt-card { border: 0; }

/* ── ключевые цифры и условия внутри синей шапки не трогаем: ──
   там рамок нет и не было */


/* ── Главная: карточки регионов и обзорная карта ── */
.hm-h2 { margin: 34px 0 4px; font-size: 1.12rem; }

.region-cards {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
}
.rc {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 43, 51, .07), 0 0 0 1px rgba(27, 43, 51, .06);
  height: 100%;
  transition: transform .12s, box-shadow .12s;
}
.rc:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(27, 43, 51, .1), 0 0 0 1px rgba(10, 110, 168, .2);
}
.rc-img { display: block; width: 100%; height: 118px; object-fit: cover; background: var(--bg-soft); }
.rc-noimg { display: flex; align-items: center; justify-content: center; color: var(--sea-pale); }
.rc-noimg .ic { width: 38px; height: 38px; color: inherit; }
.rc-body { display: block; padding: 11px 13px 13px; }
.rc-name { display: block; font-weight: 700; font-size: 1rem; color: var(--ink); }
.rc-count { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--muted); }

#map-home {
  height: 460px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: 0 0 0 1px rgba(27, 43, 51, .06);
}
@media (max-width: 560px) {
  #map-home { height: 340px; }
  .region-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .rc-img { height: 92px; }
}

/* Карта региона стоит вверху страницы — делаем её заметной */
#map-multi { height: 420px; border-radius: var(--radius); background: var(--bg-soft);
  box-shadow: 0 0 0 1px rgba(27, 43, 51, .06); }
@media (max-width: 560px) { #map-multi { height: 300px; } }


/* ══════════════════════════════════════════════════════════════════════════
   ПЕРЕДЕЛКА ДВУХ БЛОКОВ. 2026-08-06.

   Что было не так. Плитки условий стояли жёсткой сеткой: при нехватке
   места последняя уезжала на свою строку сиротой, а длинная фаза луны
   обрезалась многоточием. Приливы дня сидели в скруглённой коробке
   с цветной чертой под каждой высотой — лишняя деталь и лишняя рамка.

   Как теперь. Условия — гибкая строка: элементы по ширине содержимого,
   переносятся без пустот, ничего не обрезается. Приливы — четыре колонки
   на тонких вертикальных линейках, без внешней коробки. Цвет несёт само
   время, ему не нужна подпорка снизу.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── условия дня: гибкая строка вместо сетки ── */
.cond-tiles {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2px 0;
}
.ct {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 0;
  background: none;
  border-radius: 0;
  position: relative;
}
.ct::before { display: none; }
.ct + .ct { box-shadow: inset 1px 0 0 var(--line); }
.ct-s {
  white-space: normal;      /* «dernier quartier» больше не обрезается */
  overflow: visible;
  text-overflow: clip;
  max-width: 15ch;
  line-height: 1.3;
}
.page-head .cond-tiles { flex-basis: auto; }
.page-head .ct { padding: 9px 15px; }

/* ── приливы дня: колонки на линейках, без коробки ── */
.tide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  overflow: visible;
  padding: 4px 0;
}
.tide-card {
  padding: 14px 12px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.tide-card + .tide-card { box-shadow: inset 1px 0 0 var(--line); }
.tide-card::after { display: none; }
.tide-type { letter-spacing: 0.08em; }
.tide-time { font-size: 1.7rem; letter-spacing: -0.02em; }
.tide-height { margin-top: 1px; }

/* ── вкладки подстраниц: прямоугольнее, меньше «кнопочности» ── */
.port-tabs a { border-radius: 8px; }
.subnav a { border-radius: 8px; }

@media (max-width: 560px) {
  .ct { padding: 9px 13px; }
  .tide-time { font-size: 1.45rem; }
}

/* Лента условий не должна отжимать заголовок: сжимается по содержимому */
.page-head .cond-tiles { flex: 0 1 auto; margin-left: auto; }
.page-head .ph-main { flex: 1 1 300px; }
@media (max-width: 1100px) {
  .page-head .cond-tiles { flex-basis: 100%; margin-left: 0; margin-top: 8px; }
}

/* Шесть плиток и длинное название («Saint-Valery-sur-Somme») в одну строку
   не влезают ни при какой ширине — заголовок начинал переноситься.
   Лента идёт своей строкой под ним: всё так же вверху, но h1 цел. */
.page-head .cond-tiles { flex-basis: 100%; margin-left: 0; margin-top: 10px; }
.page-head .ph-main { flex: 1 1 auto; }


/* ══════════════════════════════════════════════════════════════════════════
   ЕДИНАЯ ШИРИНА ДЛЯ ВСЕГО САЙТА. Добавлено 2026-08-06.

   Раньше 1440 px получали только страницы точек — правило было привязано
   к наличию блока .today. Главная, регионы, департаменты, лексикон и
   календарь оставались на 760 px и выглядели как другой сайт.

   Теперь ширину получают все страницы. Сетка в две колонки по-прежнему
   только на страницах точек: остальным она не нужна, у них сами блоки
   (карточки, календарь, карта) умеют занимать ширину.

   Единственное, что НЕ растягиваем, — сплошной текст. Строка в 200
   символов нечитаема, поэтому абзацы держим в пределах 78 знаков.
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1000px) {
  body {
    max-width: 1440px;
    padding: 0 26px 56px;
  }

  /* текст остаётся читаемой колонкой */
  .prose p,
  .prose li,
  .notice,
  .lexique-def,
  .page-foot p { max-width: 78ch; }

  /* заголовок и подзаголовок страницы — тоже не на всю ширину */
  .page-head .subtitle { max-width: 78ch; }

  /* списки точек: больше колонок, раз места стало больше */
  .point-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .neighbour-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

  /* календарь коэффициентов: ячейки крупнее на широком экране */
  .cal-grid { gap: 7px; }

  /* таблицы на всю ширину читаются лучше с чуть большим шрифтом */
  .tide-table { font-size: 0.92rem; }
}


/* ══════════════════════════════════════════════════════════════════════════
   ПОДВАЛ. Переделан 2026-08-06.
   Тёмная полоса во всю ширину окна — рифмуется с шапкой и закрывает страницу.
   ══════════════════════════════════════════════════════════════════════════ */

.site-foot {
  width: 100vw;
  margin: 48px 0 -48px calc(50% - 50vw);
  background: linear-gradient(160deg, #0e3a5c, #0a2b45 60%, #08223a);
  color: #cfdcea;
  font-size: 0.88rem;
}
.sf-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 26px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 28px 34px;
}
.sf-col h2 {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ea7c9;
}
.sf-col a {
  display: block;
  padding: 4px 0;
  color: #cfdcea;
}
.sf-col a:hover { color: #fff; text-decoration: none; }
.sf-col p { margin: 0; line-height: 1.6; color: #a8bfd4; }

.sf-brand .sf-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.14rem;
  color: #fff;
  margin-bottom: 10px;
}
.sf-brand .sf-logo strong { color: #ffd66b; }
.sf-brand svg { width: 26px; height: 26px; flex: none; }
.sf-src { font-size: 0.8rem; line-height: 1.75; }
.sf-src a { display: inline; color: #9dc4e2; text-decoration: underline; }

.sf-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.sf-bottom .sf-in {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 28px;
  padding-top: 18px;
  padding-bottom: 22px;
}
.sf-warn { margin: 0; font-size: 0.79rem; line-height: 1.6; color: #93aec6; max-width: 90ch; }
.sf-meta { margin: 0; font-size: 0.79rem; color: #7d9ab4; white-space: nowrap; }

@media (max-width: 900px) {
  .sf-in { grid-template-columns: 1fr 1fr; padding: 28px 16px; }
  .sf-brand { grid-column: 1 / -1; }
  .sf-bottom .sf-in { grid-template-columns: 1fr; }
  .sf-meta { white-space: normal; }
}
@media (max-width: 520px) {
  .sf-in { grid-template-columns: 1fr; }
}

/* Подвал переименован в .site-foot, а правило порядка в сетке осталось
   на старом классе .page-foot — из-за этого он вставал в середину
   страницы точки. Возвращаем его в конец. */
@media (min-width: 1000px) {
  body:has(> .today) > .site-foot { grid-column: 1 / -1; order: 100; }
}

/* ── Условия справа от заголовка, как и просили ──
   В одну строку шесть плиток не помещались рядом с длинным названием.
   Решение — не переносить их вниз, а сложить в три колонки: тогда блок
   вдвое уже, встаёт справа и заполняет пустое место у заголовка. */
@media (min-width: 1000px) {
  .page-head { flex-wrap: nowrap; align-items: flex-start; }
  .page-head .ph-main { flex: 1 1 auto; min-width: 0; }
  .page-head .cond-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    border: 0;
    padding: 0;
    column-gap: 0;
    row-gap: 2px;
  }
  .page-head .ct {
    padding: 6px 16px;
    box-shadow: inset 1px 0 0 var(--line);
  }
  .page-head .ct:nth-child(3n + 1) { box-shadow: none; padding-left: 0; }
  .page-head .ct-wide { grid-column: auto; }
}
@media (max-width: 999px) {
  .page-head { flex-wrap: wrap; }
  .page-head .cond-tiles { flex-basis: 100%; margin-top: 10px; }
}

/* Разделители в шапке убраны: сетка и пробел уже разделяют плитки */
@media (min-width: 1000px) {
  .page-head .ct { box-shadow: none; padding-left: 0; padding-right: 26px; }
}

/* ─── Солнце и луна. Добавлено 2026-08-06, переделано в тот же день ────────
   Было две дуги рядом: на широком экране они растягивались до двухсот
   пикселей высоты каждая и съедали пол-экрана ради формы, которая ничего
   не сообщает. Стало: одна лента суток и четыре факта строкой. */

.ds { margin: 4px 0 14px; }

.ds-day, .ds-night { position: relative; overflow: hidden; }
.ds-day   { height: 42px; border-radius: 8px; background: #dfe6f2; }
.ds-night { height: 14px; margin-top: 7px; border-radius: 7px; background: #eef1f7; }

/* полосы тянутся по ширине, текст в них не живёт — искажать нечего */
.ds-fill { position: absolute; inset: 0; width: 100%; height: 100%; }

.ds-sun, .ds-moon { position: absolute; top: 50%; }

.ds-sun {
  width: 17px;
  height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border-radius: 50%;
  background: #f5a623;
  box-shadow: 0 0 0 2.5px #fff;
}
.ds-sun.is-down { background: #b9c4d6; }

.ds-moon { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.ds-moon svg { display: block; width: 18px; height: 18px; overflow: visible; }
.ds-moon.is-down { opacity: 0.45; }

.ds-hours { position: relative; height: 15px; margin-top: 5px; }
.ds-hours span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: var(--muted);
}
/* крайние подписи прижимаем внутрь, иначе они торчат за край блока */
.ds-hours span:first-child { transform: none; }
.ds-hours span:last-child  { transform: translateX(-100%); }

.astro-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 12px 22px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.astro-facts li { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.af-k {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.af-v { font-size: 1.02rem; font-weight: 600; line-height: 1.25; }
.af-s { font-size: 0.78rem; line-height: 1.4; color: var(--muted); }
.af-s sup { font-size: 0.72em; }

@media (max-width: 520px) {
  .day-strip { max-height: 84px; }
  .astro-facts { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .af-v { font-size: 0.94rem; }
}

/* ─── Плитки с ходом за сутки. Добавлено 2026-08-06 ────────────────────────
   Без рамок: ряд обведённых карточек — первое, по чему видно страницу,
   собранную по шаблону. Разделяет их воздух, а не линии. */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 18px 22px;
  margin: 2px 0 20px;
}

.st { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.st-k {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.st-v { font-size: 1.32rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.st-s { font-size: 0.76rem; line-height: 1.4; color: var(--muted); }

.st-spark { display: block; margin: 3px 0 1px; }
.spark { display: block; width: 100%; height: 30px; }

/* стрелка ветра в почасовой таблице */
.td-wind { white-space: nowrap; }
.wind-arrow { vertical-align: -2px; margin-right: 3px; }
.td-wind .wv { font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .stat-tiles { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 14px 16px; }
  .st-v { font-size: 1.12rem; }
  .spark { height: 24px; }
}

/* ─── Волны и зыбь. Добавлено 2026-08-06 ───────────────────────────────────
   График слева, роза направления справа — та же пара «картинка + краткое
   пояснение», что и у остальных широких секций. */

.swell-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px 24px;
  align-items: center;
}

.swell-plot .chart-svg { width: 100%; height: auto; display: block; }
.swell-card { margin: 0; text-align: center; }
.swell-rose { width: 150px; height: auto; margin: 0 auto; display: block; }

.swell-card figcaption {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}
.swell-card figcaption strong { color: var(--ink); }

@media (max-width: 620px) {
  .swell-duo { grid-template-columns: 1fr; }
}

/* ─── Главная: живая полоса и большие приливы. Добавлено 2026-08-06 ────────
   Главная была оглавлением без единой цифры. Эти два блока дают ей
   содержание, которое меняется само и не требует ухода. */

.live-strip, .bt-list {
  display: grid;
  gap: 10px;
  margin: 2px 0 8px;
  padding: 0;
  list-style: none;
}

.live-strip { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.bt-list    { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }

.live-strip a, .bt-list a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: inherit;
  text-decoration: none;
}
.live-strip a:hover, .bt-list a:hover { background: var(--sea-pale); text-decoration: none; }

.lv-name { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.lv-lvl  { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.lv-dir  { font-size: 0.78rem; }
.lv-dir.is-up   { color: var(--sea); }
.lv-dir.is-down { color: var(--low); }
.lv-next { margin-top: 3px; font-size: 0.79rem; color: var(--muted); }
.lv-next strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.bt-list a { align-items: flex-start; gap: 3px; }
.bt-dow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.bt-day { font-size: 0.95rem; font-weight: 600; }

@media (max-width: 520px) {
  .live-strip { grid-template-columns: 1fr 1fr; }
  .lv-lvl { font-size: 1.25rem; }
  .bt-list { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
}

/* Карточка без снимка. Пустая светлая плитка среди фотографий читается
   как поломка, а не как «фото пока нет». Мягкая морская заливка делает
   её осознанной паузой в ряду. */
.rc-noimg {
  background: linear-gradient(160deg, #eaf4fb 0%, #d8ebf8 100%);
  color: #9cc3dd;
}
.rc-noimg svg { width: 42px; height: 42px; }

/* ═══ Долой коробки. 2026-08-06 ══════════════════════════════════════════
   Широкая раскладка превращала каждую секцию в карточку: рамка, скруг­ление,
   серая плашка заголовка. Плюс рамка у графика внутри — коробка в коробке,
   и так десять раз на странице. Разделять блоки должен воздух, а рамка
   нужна только там, где она несёт смысл: предупреждение, примечание,
   лента приливов. Ниже рамки снимаются, а заголовок остаётся заголовком —
   с короткой синей чертой под текстом вместо плашки. */

@media (min-width: 1000px) {
  body:has(> .today) > .prose,
  body:has(> .today) > .chart,
  body:has(> .today) > .chart-coef,
  body:has(> .today) > .twelfths,
  body:has(> .today) > .wcalc,
  body:has(> .today) > .week,
  body:has(> .today) > .fishing,
  body:has(> .today) > .conditions,
  body:has(> .today) > .hourly,
  body:has(> .today) > .swell,
  body:has(> .today) > .astro,
  body:has(> .today) > .map-section,
  body:has(> .today) > .neighbours {
    margin: 0 0 30px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  body:has(> .today) > section > h2:first-child {
    margin: 0 0 13px;
    padding: 0 0 9px;
    background: none;
    border: 0;
    border-radius: 0;
    font-size: 1.03rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  body:has(> .today) > section > h2:first-child::after {
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: var(--sea);
  }

  /* карта уже скруглена сама, боковые поля карточки ей больше не нужны */
  body:has(> .today) > .map-section > *:not(h2) { padding-left: 0; padding-right: 0; }
  body:has(> .today) > .prose { padding-top: 0; }
}

/* Ключевые цифры и столбики коэффициента тоже были в рамках — на светлой
   заливке они и так читаются как единый блок. */
.key-figures, .coef-bars { border: 0; }

/* Сам SVG-график тоже был в рамке — третий контур подряд вокруг одной
   картинки. Сетка внутри уже задаёт границы поля. */
.tide-chart { border: 0; border-radius: 0; background: none; }

/* ═══ Главная: фотогерой, ближайшие точки, сезонный блок. 2026-08-06 ══════ */

/* У шапки сайта снизу отступ в шесть пикселей — он и рисовал белую
   полоску между синей шапкой и фотографией. Когда следом идёт герой,
   отступ не нужен: снимок должен начинаться сразу под шапкой. */
.site-head:has(+ .home-hero.has-photo) { margin-bottom: 0; }

.home-hero.has-photo {
  position: relative;
  isolation: isolate;
  margin: 0 -16px 26px;
  padding: 40px 20px 26px;
  overflow: hidden;
  border-radius: 0;
  display: block;
}
.hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* затемнение снизу: белый текст поверх фотографии иначе не читается */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 40, 62, 0.32) 0%, rgba(8, 40, 62, 0.72) 100%);
}
.hero-in { max-width: var(--wrap); margin: 0 auto; }
.home-hero.has-photo h1 { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
.home-hero.has-photo .subtitle { color: rgba(255, 255, 255, 0.9); }

.home-hero.has-photo .home-find { margin: 16px 0 0; }
.home-hero.has-photo .hf-input {
  background: rgba(255, 255, 255, 0.96);
  border-color: transparent;
}
.home-hero.has-photo .hf-btn {
  background: rgba(255, 255, 255, 0.94);
  border-color: transparent;
  color: var(--sea-dark);
}
.home-hero.has-photo .home-coef {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
}

.hero-in { position: relative; }
.hero-credit {
  display: block;
  margin-top: 14px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.66);
}

/* ── ближайшие точки ── */
.near-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.nb {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: inherit;
  text-decoration: none;
}
.nb:hover { background: var(--sea-pale); text-decoration: none; }
.nb-name { font-weight: 600; }
.nb-km { font-size: 0.8rem; color: var(--muted); }

/* ── сезонный блок ── */
.spot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 2px 0 10px;
  padding: 0;
  list-style: none;
}
.spot-list a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: inherit;
  text-decoration: none;
}
.spot-list a:hover { text-decoration: none; }
.spot-list a:hover .sp-name { color: var(--sea); }
.sp-img { display: block; width: 100%; height: 124px; object-fit: cover; }
.sp-body { display: block; padding: 11px 13px 14px; }
.sp-name { display: block; font-weight: 700; }
.sp-why { display: block; margin-top: 3px; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }

@media (min-width: 1000px) {
  .home-hero.has-photo { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 54px 24px 34px; }
}
@media (max-width: 520px) {
  .home-hero.has-photo { padding: 26px 16px 20px; }
  .sp-img { height: 104px; }
}

/* Шкала комфорта воды */
.water-scale { width: 100%; max-width: 620px; height: auto; display: block; margin: 0 0 16px; }

/* ═══ Размеры и плотность. 2026-08-06, вечерняя правка ════════════════════ */

/* Текст в .prose был ограничен 62 символами в строке — разумно, когда блок
   занимал всю ширину. Теперь он и так стоит в колонке из шести делений,
   и ограничение резало строку вдвое от доступного места. */
@media (min-width: 1000px) {
  body:has(> .today) > .prose p { max-width: none; }
}

/* Таблица сравнения соседей: названия городов переносились по слогам,
   потому что колонка «Lieu» ужималась под остальные три. Отдаём ей всё
   свободное место, числовым колонкам — ровно столько, сколько нужно. */
.tide-table th[scope="row"] { white-space: nowrap; }
.tide-table th[scope="row"] a { white-space: nowrap; }
/* width: 1% на числовые колонки уводил их к правому краю и оставлял
   посреди строки пустоту — достаточно запретить перенос имени, дальше
   браузер сам отдаст колонке нужную ширину. */
.tide-table td { white-space: nowrap; }

/* Графики температуры воды и погоды были заметно крупнее содержания:
   пять точек на треть экрана. Ужимаем высоту и подписи. */
.water-scale { max-width: 520px; margin-bottom: 12px; }

/* ═══ Pêche à pied и калькулятор высоты воды. 2026-08-06 ══════════════════ */

.pap {
  margin: 14px 0 4px;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: #eef7f4;
}
.pap-head { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 0.92rem; }
.pap-head .ic { color: var(--green, #0d8f7a); }
.pap-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pap-list li { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 0.87rem; }
.pap-day { font-weight: 600; min-width: 108px; }
.pap-info { color: var(--muted); }
.pap-info strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pap-warn { margin: 10px 0 0; font-size: 0.8rem; line-height: 1.5; color: #55707f; }

.wc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 2px 0 12px;
}
.wc-row label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wc-row select, .wc-row input[type="time"] {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.wc-out { margin: 0 0 10px; font-size: 1.12rem; }
.wc-out strong { font-size: 1.32rem; letter-spacing: -0.01em; }
.wc-out.is-empty { font-size: 0.92rem; color: var(--muted); }

/* ═══ Печатная версия — /marees/[slug]/imprimer. 2026-08-06 ═══════════════
   Рыбак берёт на воду бумагу: экран на солнце не читается, руки мокрые,
   связи нет. Лист должен быть один, чёрным по белому, без украшений. */

.sheet {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 18px 40px;
  color: #000;
  background: #fff;
}

.sheet-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.sheet-bar button {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--sea);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.sheet-bar button:hover { background: var(--sea-dark); }

.sheet-head { margin-bottom: 14px; }
.sheet-head h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.01em; }
.sheet-sub { margin: 3px 0 0; font-size: 0.9rem; color: #444; }

.sheet-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.sheet-table th, .sheet-table td {
  padding: 7px 6px;
  border-bottom: 1px solid #d8dde1;
  text-align: left;
  vertical-align: top;
}
.sheet-table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  border-bottom: 1.5px solid #9aa5ac;
}
.sheet-table th[scope="row"] { white-space: nowrap; }
.sh-dow { display: block; font-size: 0.72rem; text-transform: uppercase; color: #666; }
.sh-day { font-weight: 700; }
.sh-coef { font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-tide { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sh-t { font-weight: 700; }
.sh-h { display: block; }
.sh-k { display: block; font-size: 0.7rem; letter-spacing: 0.05em; color: #666; }
.sh-tide.is-low .sh-k { color: var(--low); }
.sh-sun { white-space: nowrap; font-size: 0.8rem; color: #444; }

.sheet-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 20px 0 0;
}
.sheet-cols h2 { margin: 0 0 4px; font-size: 0.86rem; }
.sheet-cols p { margin: 0; font-size: 0.8rem; line-height: 1.5; color: #333; }

.sheet-foot {
  margin: 18px 0 0;
  padding-top: 10px;
  border-top: 1px solid #d8dde1;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #555;
}

@media print {
  /* На бумаге не нужно ничего, кроме таблицы: ни шапки сайта, ни подвала,
     ни кнопок. Ссылки чёрные — синий на монохромном принтере сереет. */
  .no-print, .site-head, .site-foot, .breadcrumb, .subnav, .port-tabs { display: none !important; }
  .sheet { max-width: none; padding: 0; font-size: 11pt; }
  .sheet-table { font-size: 9.5pt; }
  .sheet-table tr { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  @page { margin: 12mm; }
}

/* Конструктор виджета */
.wg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 16px; }
.wg-row label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wg-row select {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  max-width: 100%;
}
.wg-code {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  resize: vertical;
}

/* Поиск в конструкторе виджета */
.wg-row input[type="search"] {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  min-width: 220px;
  flex: 1 1 220px;
}
.wg-none { margin: -8px 0 14px; font-size: 0.88rem; color: var(--muted); }

/* ═══ Поиск с подсказками. 2026-08-06 ══════════════════════════════════════
   Одно поле вместо «поле + список из трёхсот пунктов»: набираешь — под
   полем появляются совпадения, выбираешь — страница открывается. */

.he-form { margin: 2px 0 18px; }

.he-search { position: relative; max-width: 520px; }
.he-search label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.he-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 1.02rem;
  color: var(--ink);
}
.he-search input:focus { outline: 2px solid var(--sea-pale); outline-offset: 1px; border-color: var(--sea); }

.he-hits {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(16, 42, 60, 0.13);
  max-height: 320px;
  overflow-y: auto;
}
.he-hits li {
  padding: 9px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}
.he-hits li:hover, .he-hits li.is-on { background: var(--bg-soft); }
.he-hits li.he-empty { color: var(--muted); cursor: default; font-size: 0.88rem; }
.he-hits li.he-empty:hover { background: none; }

.he-fallback { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.he-fallback label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.he-fallback select {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  max-width: 100%;
}
.he-fallback button {
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--sea);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ═══ Горизонтальная прокрутка. 2026-08-06 ════════════════════════════════
   Блоки «во всю ширину экрана» построены на 100vw, а эта единица включает
   полосу прокрутки — то есть они на её толщину шире видимой области, и
   внизу появлялась вторая полоса, горизонтальная. clip обрезает лишнее,
   не создавая нового контейнера прокрутки, в отличие от hidden, который
   ломает position: sticky. */
html, body { overflow-x: clip; }
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

/* Подсказки поиска на главной. Поле стоит внутри фотогероя, поэтому
   выпадающий список должен всплывать поверх снимка. */
.hf-search { position: relative; flex: 1 1 280px; min-width: 0; }
.hf-search .hf-input { width: 100%; }

.hf-hits {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(10, 35, 55, 0.28);
  max-height: 320px;
  overflow-y: auto;
  text-align: left;
}
.hf-hits li {
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.96rem;
  color: var(--ink);
}
.hf-hits li:hover, .hf-hits li.is-on { background: var(--bg-soft); }
.hf-hits li.hf-empty-row { color: var(--muted); cursor: default; font-size: 0.88rem; }
.hf-hits li.hf-empty-row:hover { background: none; }

/* ═══ Плитки условий: пять в ряд вместо трёх. 2026-08-06 ══════════════════
   Девять плиток стояли сеткой 3×3 — высокий столбец рядом с заголовком,
   который тянул шапку вниз и оставлял под названием пустоту. Пять колонок
   дают две строки: «Soleil» занимает двойную ширину (в неё пишется
   «06:52 → 21:43»), поэтому девять плиток — это ровно десять долей,
   то есть две полные строки без огрызка в конце.

   Правило идёт после того, что задавало repeat(3, …), и повторяет его
   условие по ширине: иначе оно не перебьётся. */

@media (min-width: 1000px) {
  .page-head .cond-tiles {
    grid-template-columns: repeat(5, minmax(0, auto));
    column-gap: 4px;
  }
  .page-head .ct-wide { grid-column: span 2; }
  .page-head .ct { padding: 6px 20px 6px 0; }
  .page-head .ct-ic .ic { width: 18px; height: 18px; }
}

/* На среднем экране пятью в ряд уже тесно — идём по три. */
@media (min-width: 640px) and (max-width: 999px) {
  .page-head .cond-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-head .ct-wide { grid-column: span 1; }
}

/* ═══ Выпадающий список поиска на главной. 2026-08-06 ═════════════════════
   Подсказки обрезались нижним краем фотогероя: у него стоял overflow: hidden.
   Он там был не нужен — снимок абсолютно позиционирован по inset: 0 и точно
   заполняет блок, вылезать нечему. Снимаем, и список свободно ложится
   поверх блоков ниже. */

.home-hero.has-photo { overflow: visible; }
/* Снимок скругляем сам, раз обрезки у родителя больше нет */
.hero-img { border-radius: inherit; }

/* Список должен лежать выше всего, что идёт за героем */
.home-hero.has-photo { z-index: 5; }
.hf-hits { z-index: 50; }
