:root {
  /* Основа: ваша тёмно-синяя гамма */
  --bg: #003153;          /* фон страницы */
  --card: #002147;        /* карточки, строки, шапка */
  --ink: #ffffff;         /* основной текст */
  --muted: #a9c4da;       /* второстепенный текст */
  --line: #2b5a80;        /* рамки и разделители */
  --accent: #005E79;      /* кнопки, логотип */
  --accent-ink: #ffffff;  /* текст на кнопках */
  --link: #7cc8e0;        /* ссылки и контурные кнопки */
  --focus: #7cc8e0;       /* обводка при навигации с клавиатуры */
  --danger: #ff8f80;      /* ошибки в формах */
  --cancel: #4B0082;      /* кнопки отмены, удаления и выхода */
  --cancel-line: #7a3fc4; /* рамка этих кнопок, чтобы их было видно на тёмном фоне */

  /* Метки */
  --tag-bg: #0e4c69;  --tag-ink: #cdeefa;   /* обычная */
  --warn-bg: #5b4205; --warn-ink: #ffd98a;  /* «Нужен капитан» */
  --off-bg: #3b4a5a;  --off-ink: #d5dce4;   /* «Отменено» */

  /* Поля ввода и плашки с именами */
  --input-bg: #00284f; --input-line: #4a7799;
  --chip-bg: #123f66;  --chip-ink: #e6f1f9;

  /* Всплывающие сообщения */
  --ok-bg: #0d4a3c;  --ok-ink: #c9f1e4;
  --err-bg: #5c1a14; --err-ink: #ffd3cc;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 14px rgba(0, 0, 0, .2);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
/* Рамку фокуса показываем только у полей ввода; у ссылок, кнопок и значков при нажатии её нет */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 1px;
}
a:focus, a:focus-visible, button:focus, button:focus-visible, summary:focus, summary:focus-visible,
[tabindex]:focus, [tabindex]:focus-visible { outline: none; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 64px; }

/* Шапка закреплена сверху экрана (position: fixed, а не sticky): «липкую» шапку Safari на iPhone
   переставал рисовать, когда страница внезапно укорачивалась (закрыли список друзей внизу).
   Место под шапку — отступ у body, высоту шапки скрипт кладёт в --topbar-h. */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: fixed; top: 0; left: 0; right: 0; z-index: 20; }
body { padding-top: var(--topbar-h, 57px); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--link); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand:focus, .brand:focus-visible, .brand:active { outline: none; box-shadow: none; }
.mark { width: 32px; height: 32px; flex: none; color: var(--link); }
.topbar form { margin: 0; }
.topbar .linklike { color: var(--muted); text-decoration: none; font-size: 15px; }
.topbar .linklike:hover { color: var(--ink); text-decoration: underline; }

h1, h2 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 30px; font-weight: 800; margin: 28px 0 8px; }
/* Между заголовком страницы (или подписью под ним) и карточкой с формой — единый отступ */
h1 + form.card, p.lead + form.card { margin-top: 20px; }
h2 { font-size: 18px; font-weight: 700; color: var(--muted); margin: 60px 0 20px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 17px; margin-bottom: 20px; }

.hero { padding: 36px 0 8px; }
.hero h1 { font-size: 36px; margin-top: 0; }
.hero .lead { font-size: 18px; max-width: 30em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.row { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.row:hover { border-color: var(--link); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; display: block; overflow-wrap: anywhere; }
.row .sub { color: var(--muted); font-size: 14px; }
/* Карточки ивентов и групп: всегда три строки, длинный текст обрезается многоточием, поэтому высота у всех карточек одинаковая.
   Ивент: название; когда и где; группа-организатор. Группа: название; описание; число участников. */
.event-row .title, .event-row .sub, .group-row .title, .group-row .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }

.date { flex: none; width: 44px; text-align: center; border-radius: 10px; background: var(--card); border: 1px solid var(--line); overflow: hidden; line-height: 1.1; }
.date span { display: block; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; padding: 2px 0; }
.date b { display: block; font-size: 18px; font-weight: 800; padding: 3px 0 4px; }
.date.off span { background: var(--off-bg); color: var(--off-ink); }
.date.off b { color: var(--muted); }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--tag-bg); color: var(--tag-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.off { background: var(--off-bg); color: var(--off-ink); }

.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; background: #c9441e; }
.avatar.t1 { background: #1c7c7d; }
.avatar.t2 { background: #7a4b8c; }
.avatar.t3 { background: #946014; }
.avatar.t4 { background: #2f5d9e; }
.avatar.big { width: 56px; height: 56px; font-size: 24px; }
.grouphead { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
/* Иконка группы на её странице — высотой со строку названия (30px × 1.2) */
.grouphead .avatar { width: 36px; height: 36px; font-size: 17px; }
.grouphead h1 { margin: 0; }
.grouphead-link { color: inherit; text-decoration: none; }
/* Описание группы, число участников и кнопки начинаются там же, где её название: сдвиг на ширину иконки (36px) и отступ (12px) */
.under-title { padding-left: 48px; margin-top: 4px; }
.actions.under-title { margin-top: 16px; }

form.stack label { display: block; font-weight: 600; margin: 14px 0 4px; }
form.stack label:first-of-type { margin-top: 0; }
input[type=text], input[type=email], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--input-bg); color: var(--ink); color-scheme: dark;
}
/* Safari на iPhone рисует поле даты своей шириной и вылезает за форму — убираем родной вид, держим в 100% */
input[type=datetime-local] { display: block; max-width: 100%; min-width: 0; min-height: 46px; -webkit-appearance: none; appearance: none; text-align: left; }
input[type=datetime-local]::-webkit-date-and-time-value { text-align: left; }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--danger); font-size: 14px; }

.btn, button.btn { display: inline-block; font: inherit; font-weight: 700; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.15); }
button.btn:disabled { cursor: default; filter: none; }  /* например, «Ваш голос»: уже выбран, нажать нельзя */
.btn.ghost { background: transparent; color: var(--link); border-color: var(--link); }
.btn.danger { background: var(--cancel); color: #ffffff; border-color: var(--cancel-line); }
button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.actions form { margin: 0; }
.rsvp button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--card); }

.messages { list-style: none; padding: 0; margin: 16px 0 0; }
.messages li { padding: 11px 14px; border-radius: 10px; margin-bottom: 8px; background: var(--ok-bg); color: var(--ok-ink); }
.messages li.error { background: var(--err-bg); color: var(--err-ink); }
.profile-about { margin: 12px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.people { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; margin: 0 0 12px; }
.people li { background: var(--chip-bg); color: var(--chip-ink); border-radius: 99px; padding: 3px 12px; font-size: 14px; }
.people li:has(.person-chip) { padding-left: 4px; white-space: nowrap; }
.people.center { justify-content: center; }
/* Имя участника везде ведёт в его профиль */
.person-link { color: inherit; text-decoration: none; }
.person-link:hover { color: var(--link); text-decoration: underline; }
.person-chip { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 8px; white-space: nowrap; vertical-align: middle; }
.people li:has(.person-link:hover) { outline: 1px solid var(--link); }
.people li .person-link:hover { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) { .row, .btn { transition: border-color .15s, filter .15s; } }
@media (max-width: 420px) { h1 { font-size: 26px; } .hero h1 { font-size: 30px; } }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.choice { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; min-height: 170px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.choice:hover { border-color: var(--link); }
.choice .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tag-bg); color: var(--link); margin-bottom: 8px; }
.choice .icon svg { width: 24px; height: 24px; }
.choice.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.choice.primary .icon { background: rgba(255,255,255,.18); color: #fff; }
.choice.primary .sub { color: rgba(255,255,255,.88); }
.choice .title { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.choice .sub { color: var(--muted); font-size: 15px; }
.choice .go { margin-top: auto; padding-top: 10px; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .choice { transition: border-color .15s, transform .15s; } .choice:hover { transform: translateY(-2px); } }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } .choice { min-height: 0; } }
.topnav { display: flex; align-items: center; gap: 18px; }
a.linklike { color: var(--muted); text-decoration: none; font-size: 15px; }
a.linklike:hover { color: var(--ink); text-decoration: underline; }
form.choice { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; min-height: 0; }
button.choice { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.choice .badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--tag-bg); color: var(--tag-ink); }
.choice.primary .badge { background: rgba(255,255,255,.22); color: #fff; }
.captainbox { margin-top: 16px; }
.candidates { list-style: none; padding: 0; margin: 12px 0 4px; }
.candidates li { display: flex; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.candidates .grow { flex: 1; min-width: 8em; }
.candidates form { margin: 0; }
.card > .candidates li:first-child { border-top: 0; padding-top: 0; }
.members-plain { display: flex; flex-wrap: wrap; gap: 4px 28px; }
/* Участники на странице ивента и в группе: овальная подложка, аватарка и имя чуть меньше, чем в профиле */
.event-people li:has(.person-chip) { padding: 4px 14px 4px 4px; }
.event-people .person-chip { font-size: 16px; gap: 8px; }
.event-people .person-chip .pavatar { width: 30px; height: 30px; }
.members-plain.friends-edit { justify-content: center; }
.friends-edit .grow { background: var(--chip-bg); color: var(--chip-ink); border-radius: 99px; padding: 4px 16px 4px 4px; }
.friends-edit .friend-x { display: none; }
.friends-edit.editing .friend-x { display: block; }
.members-plain li { border-top: 0; padding: 8px 0; }
.members-plain .grow { flex: 0 1 auto; min-width: 0; }
.members-plain .btn.icon { width: 40px; height: 40px; padding: 0; align-self: center; }
.members-plain .btn.icon svg { width: 18px; height: 18px; }
.members-plain .person-chip { font-size: 17px; gap: 10px; }
.members-plain .person-chip .pavatar { width: 36px; height: 36px; }
.card > .candidates li:last-child { padding-bottom: 0; }
/* Все кнопки сайта одного размера: уменьшенных кнопок больше нет */
/* Кнопка-иконка (редактировать, удалить) — квадрат высотой с обычную кнопку */
.btn.icon { display: inline-grid; place-items: center; padding: 0 13px; align-self: stretch; }
.btn.icon svg { width: 22px; height: 22px; }
.push-right { margin-left: auto; }
.candidates button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
img.avatar { display: block; object-fit: cover; background: none; }
.actions.center { justify-content: center; }
.page-top { margin-top: 28px; }

/* Карточки ивентов и групп: палитра «TARDIS Blue». На светлых цветах — тёмный текст. */
.theme-colorful .event-row.ev-oxford, .theme-colorful .group-row.ev-oxford { background: #002147; }
.theme-colorful .event-row.ev-prussian, .theme-colorful .group-row.ev-prussian { background: #003153; }
.theme-colorful .event-row.ev-tardis, .theme-colorful .group-row.ev-tardis { background: #003B6F; }
.theme-colorful .event-row.ev-cobalt, .theme-colorful .group-row.ev-cobalt { background: #0047AB; }
.theme-colorful .event-row.ev-steel, .theme-colorful .group-row.ev-steel { background: #4682B4; border-color: #4682B4; }
.theme-colorful .event-row.ev-lightsteel, .theme-colorful .group-row.ev-lightsteel { background: #B0C4DE; border-color: #B0C4DE; }
.theme-colorful .event-row.ev-cobalt .sub, .theme-colorful .group-row.ev-cobalt .sub { color: #dbe7f2; }
.theme-colorful .event-row.ev-steel .title, .theme-colorful .event-row.ev-steel .sub, .theme-colorful .group-row.ev-steel .title, .theme-colorful .group-row.ev-steel .sub { color: #001428; }
.theme-colorful .event-row.ev-lightsteel .title, .theme-colorful .group-row.ev-lightsteel .title { color: #001428; }
.theme-colorful .event-row.ev-lightsteel .sub, .theme-colorful .group-row.ev-lightsteel .sub { color: #1d3a5c; }
.theme-colorful .event-row.ev-steel:hover, .theme-colorful .event-row.ev-lightsteel:hover, .theme-colorful .group-row.ev-steel:hover, .theme-colorful .group-row.ev-lightsteel:hover { border-color: #ffffff; }

/* Карточка с заголовком ивента: в теме Navy — цвета обычных карточек, в Shades of Blue — цвета ивента */
.event-hero { margin-top: 24px; padding: 20px 18px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.event-hero h1 { margin-top: 0; }
.event-hero > :last-child { margin-bottom: 0; }
.organizers { margin: 14px 0 0; }
.organizers a { text-decoration: none; }  /* группа-организатор — ссылка без подчёркивания */
/* Заголовки разделов со списками ивентов и групп — по центру */
h2.h-center { text-align: center; }
/* Поясняющая надпись под центрированным заголовком: блок по центру, а строки внутри начинаются с одной левой линии.
   Короткая надпись занимает ровно свою ширину, длинная переносится в блоке до 420px. */
.empty-center { width: fit-content; max-width: min(420px, 100%); margin-left: auto; margin-right: auto; text-align: left; }
/* Двоеточие после заголовка, под которым есть карточки (у пустого раздела его нет) */
.colon::after { content: ":"; }
/* Текст вне карточек на странице ивента стоит на одной линии с текстом внутри карточек (рамка 1px + отступ 18px) */
.inset { padding-left: 19px; }
.theme-colorful .event-hero.ev-oxford     { background: #002147; }
.theme-colorful .event-hero.ev-prussian   { background: #003153; }
.theme-colorful .event-hero.ev-tardis     { background: #003B6F; }
.theme-colorful .event-hero.ev-cobalt     { background: #0047AB; }
.theme-colorful .event-hero.ev-steel      { background: #4682B4; border-color: #4682B4; }
.theme-colorful .event-hero.ev-lightsteel { background: #B0C4DE; border-color: #B0C4DE; }
.theme-colorful .event-hero.ev-cobalt .lead { color: #dbe7f2; }
.theme-colorful .event-hero.ev-steel h1, .theme-colorful .event-hero.ev-steel .lead, .theme-colorful .event-hero.ev-steel .desc { color: #001428; }
.theme-colorful .event-hero.ev-lightsteel h1, .theme-colorful .event-hero.ev-lightsteel .desc { color: #001428; }
.theme-colorful .event-hero.ev-lightsteel .lead { color: #1d3a5c; }

/* Меню настроек в правом углу шапки */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--link); }
.menu summary::-webkit-details-marker { display: none; }
/* Подсветка при наведении — только там, где есть мышь: на телефоне она «залипала» после закрытия меню */
@media (hover: hover) { .menu summary:hover, .menu[open] summary { background: var(--tag-bg); } }
/* На телефоне иконки шапки не подсвечиваются вовсе, даже системной вспышкой при касании */
.topbar a, .topbar summary { -webkit-tap-highlight-color: transparent; }
/* Штурвал: значок настроек; при нажатии проворачивается на оборот */
.menu .gear { display: block; width: 30px; height: 30px; background: currentColor;
  -webkit-mask: url("icons/wheel.png") center / contain no-repeat; mask: url("icons/wheel.png") center / contain no-repeat; }
@keyframes wheel-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) { .menu .gear.spin { animation: wheel-spin .7s ease-in-out; } }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.35); padding: 6px; z-index: 10; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--tag-bg); }
.menu-panel form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

.menu-panel form.menu-theme { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu-label { display: block; padding: 8px 12px 4px; font-size: 13px; color: var(--muted); }
.menu-panel button[role=menuitemradio] { padding-left: 34px; position: relative; }
.menu-panel button[aria-checked=true]::before { content: "✓"; position: absolute; left: 12px; color: var(--link); font-weight: 700; }

/* Профиль в шапке */
.topright { display: flex; align-items: center; gap: 6px; min-width: 0; }
.profile-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; min-width: 0; }
@media (hover: hover) { .profile-chip:hover { background: var(--tag-bg); } }
.pavatar { display: block; flex: none; border-radius: 50%; }
.pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; color: var(--link); }  /* цвет как у иконок шапки */
/* В мобильной версии от имени в шапке остаётся только аватар */
@media (max-width: 520px) { .pname { display: none; } .profile-chip { padding: 4px; } }
.profile-head { display: flex; align-items: center; gap: 16px; margin: 28px 0 16px; }
.profile-head h1 { margin: 0; }

/* Стопка прошедших ивентов на странице группы: под верхней карточкой видны края ещё двух */
.past-stack.collapsed { position: relative; isolation: isolate; padding-bottom: 28px; cursor: pointer; }
.past-stack.collapsed > .row { margin-bottom: 0; }
.past-stack.collapsed > .row:not(:first-child) { display: none; }
.past-stack.collapsed::before, .past-stack.collapsed::after {
  content: ""; position: absolute; height: 60px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--link) 75%, transparent); box-shadow: var(--shadow);
}
.past-stack.collapsed::before { z-index: -1; left: 14px; right: 14px; bottom: 14px; background: color-mix(in srgb, var(--card) 72%, var(--link)); }
.past-stack.collapsed::after { z-index: -2; left: 30px; right: 30px; bottom: 0; background: color-mix(in srgb, var(--card) 85%, var(--link)); }
.past-stack.collapsed:hover > .row:first-child { border-color: var(--link); }

/* Выбор аватарки из готовых (профиль и редактирование группы) */
.avatar-picker { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.avatar-picker legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.avatar-option, form.stack .avatar-option { display: grid; place-items: center; padding: 4px; margin: 0; border-radius: 50%; cursor: pointer; font-weight: normal; }
.avatar-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.avatar-option img { display: block; width: 48px; height: 48px; border-radius: 50%; }
.avatar-option:hover img { filter: brightness(1.15); }
.avatar-option:has(input:checked) { box-shadow: 0 0 0 3px var(--link); }
.avatar-option:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }

/* Иконка слева от заголовка раздела (фуражка, голосование, бинокль) */
.h-icon { width: 24px; height: 24px; margin-right: 8px; vertical-align: -6px; }
/* Фуражка и компас — векторные иконки с полями внутри, поэтому их рамка больше, чтобы по размеру они совпадали с иконками-картинками (32px) */
.h-icon-lg { width: 36px; height: 36px; margin-right: 6px; vertical-align: -11px; }

/* Иконки-картинки у заголовков (карта с лупой — «Другие группы», песочные часы — «Выбирают капитана», треуголка — «Вы капитан в ивентах»).
   Картинка служит маской, поэтому иконка красится в цвет текста заголовка в обеих темах. */
.h-img { display: inline-block; width: 32px; height: 32px; margin-right: 8px; vertical-align: -9px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.h-img-hourglass { --icon: url("icons/hourglass.png"); }
.h-img-anchor { --icon: url("icons/anchor.png"); transform-origin: 50% 20%; }
.h-img-compass-rose { --icon: none; }
.h-img-map-search { --icon: url("icons/map-search.png"); }
.h-img-pirate-hat { --icon: url("icons/pirate-hat.png"); }
.h-img-bottle { --icon: url("icons/bottle.png"); }
.h-img-pipe { --icon: url("icons/pipe.png"); }

/* Иконка заголовка стоит над текстом заголовка, по центру */
h2.h-center > .h-icon, h2.h-center > .h-img { display: block; margin: 0 auto 6px; vertical-align: baseline; }

/* Быстрая навигация в шапке: иконки разделов страницы, клик плавно прокручивает к разделу */
html { scroll-behavior: smooth; }
h2[id] { scroll-margin-top: 72px; }   /* чтобы закреплённая шапка не закрывала заголовок раздела */
.quicknav { display: flex; align-items: center; gap: 2px; margin: 0 auto; min-width: 0; }
/* На широком экране иконки разделов стоят ровно посередине шапки; по краям — логотип, аватар и настройки */
@media (min-width: 521px) {
  .topbar .wrap { position: relative; }
  .quicknav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
.quicknav a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--link); }
.quicknav a:focus-visible { background: var(--tag-bg); }
@media (hover: hover) { .quicknav a:hover { background: var(--tag-bg); } }
.quicknav .h-img, .quicknav .h-icon { position: static; transform: none; margin: 0; width: 26px; height: 26px; vertical-align: middle; }
.quicknav .h-icon-lg { width: 30px; height: 30px; }
/* Шляпа широкая и плоская, поэтому в квадрате кажется мельче остальных; её делаем шире */
.h-img.h-img-pirate-hat { width: 36px; height: 23px; }  /* картинка обрезана по краям, чтобы отступ до текста был как у остальных иконок */
.h-img.h-img-bottle { width: 44px; height: 44px; }  /* бутылка с письмом крупнее остальных */
.quicknav .h-img.h-img-pirate-hat { width: 32px; height: 20px; }
@media (max-width: 520px) {
  .quicknav a { width: 30px; height: 30px; }
  .quicknav .h-img, .quicknav .h-icon { width: 22px; height: 22px; }
  .quicknav .h-icon-lg { width: 26px; height: 26px; }
  .quicknav .h-img.h-img-pirate-hat { width: 28px; height: 18px; }
  /* На узком экране, когда в шапке есть иконки разделов, от логотипа остаётся только морской конёк, а имя короче */
  .topbar:has(.quicknav) .brand-text { display: none; }
}

/* Тема Navy: в шапке логотип, название, иконки разделов, значок настроек и имя пользователя белые */
.theme-standard .topbar .brand,
.theme-standard .topbar .mark,
.theme-standard .topbar .menu summary,
.theme-standard .topbar .quicknav a,
.theme-standard .topbar .pname { color: #ffffff; }
/* Тема Navy: заголовки разделов на странице и их иконки тоже белые */
.theme-standard main h2 { color: #ffffff; }
/* Тема Navy: контурные кнопки и их надписи и иконки белые */
.theme-standard .btn.ghost { color: #ffffff; border-color: #ffffff; }
/* …но выбранный ответ («Иду», «Возможно», «Не иду», «Ваш голос») — белая кнопка с тёмным текстом, чтобы читался */
.theme-standard .btn.ghost[aria-pressed=true] { background: #ffffff; border-color: #ffffff; color: var(--card); }
/* Тема Shades of Blue: заголовки разделов и их иконки белые — как в Navy */
/* …и иконки разделов и значок настроек в шапке белые */
.theme-colorful .topbar .quicknav a,
.theme-colorful .topbar .menu summary { color: #ffffff; }
.theme-colorful main h2 { color: #ffffff; }
/* Shades of Blue: контурные кнопки — залитые акцентным цветом с белой надписью, как «Добавить в друзья»;
   выбранный ответ («Иду», «Ваш голос») — белая кнопка с тёмным текстом, чтобы отличался */
.theme-colorful .btn.ghost { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.theme-colorful .btn.ghost[aria-pressed=true] { background: #ffffff; border-color: #ffffff; color: var(--card); }
/* Компас — два слоя: корпус стоит на месте, при нажатии стрелка крутится и с покачиванием останавливается */
.h-img.h-img-compass-rose, .quicknav .h-img.h-img-compass-rose { position: relative; background: none; -webkit-mask: none; mask: none; }
.h-img-compass-rose::before, .h-img-compass-rose::after { content: ""; position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--layer) center / contain no-repeat; mask: var(--layer) center / contain no-repeat; }
.h-img-compass-rose::before { --layer: url("icons/compass-body.png"); }
.h-img-compass-rose::after { --layer: url("icons/compass-needle.png"); transform-origin: 50% 55.5%; }
@keyframes compass-spin {
  0% { transform: rotate(0); }
  55% { transform: rotate(420deg); }
  75% { transform: rotate(340deg); }
  90% { transform: rotate(372deg); }
  100% { transform: rotate(360deg); }
}
.h-img-compass-rose.spin::after { animation: compass-spin .6s ease-out; }
h2 > .h-img-compass-rose { cursor: pointer; }
/* Песочные часы при нажатии переворачиваются с лёгким покачиванием */
@keyframes hourglass-flip {
  0% { transform: rotate(0); }
  60% { transform: rotate(195deg); }
  80% { transform: rotate(172deg); }
  100% { transform: rotate(180deg); }
}
.h-img-hourglass.spin { animation: hourglass-flip .6s ease-in-out; }
h2 > .h-img-hourglass { cursor: pointer; }
/* Чайки при нажатии делают круг вокруг центра иконки, оставаясь ровно (не переворачиваясь) */
@keyframes gull-circle {
  from { transform: translate(var(--dx), var(--dy)) rotate(0deg) translate(calc(-1 * var(--dx)), calc(-1 * var(--dy))) rotate(0deg); }
  to { transform: translate(var(--dx), var(--dy)) rotate(360deg) translate(calc(-1 * var(--dx)), calc(-1 * var(--dy))) rotate(-360deg); }
}
svg[data-anim=gulls] { overflow: visible; }
svg[data-anim=gulls] path { transform-box: fill-box; transform-origin: 50% 50%; }
svg[data-anim=gulls] path:first-child { --dx: -3.4px; --dy: 4.1px; }   /* от центра чайки до центра иконки */
svg[data-anim=gulls] path + path { --dx: 5.25px; --dy: -4px; }
svg[data-anim=gulls].spin path { animation: gull-circle .6s ease-in-out; }
h2 > svg[data-anim=gulls] { cursor: pointer; }
/* Шляпа капитана при нажатии подпрыгивает: приседает, взлетает и мягко приземляется */
@keyframes hat-hop {
  0% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0) scale(1.08, .9); }
  45% { transform: translateY(-9px) scale(.96, 1.05) rotate(-6deg); }
  70% { transform: translateY(0) scale(1.06, .93); }
  85% { transform: translateY(-2px) scale(1, 1); }
  100% { transform: translateY(0) scale(1, 1); }
}
.h-img-pirate-hat.spin { animation: hat-hop .6s ease-out; transform-origin: 50% 100%; }
h2 > .h-img-pirate-hat { cursor: pointer; }
/* «Другие группы»: карта и лупа — два слоя, чтобы при нажатии лупа водила по карте влево-вправо */
.h-img.h-img-map-search, .quicknav .h-img.h-img-map-search { position: relative; background: none; -webkit-mask: none; mask: none; }
.h-img-map-search::before, .h-img-map-search::after { content: ""; position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--layer) center / contain no-repeat; mask: var(--layer) center / contain no-repeat; }
.h-img-map-search::before { --layer: url("icons/map-search-map.png"); }
.h-img-map-search::after { --layer: url("icons/map-search-lens.png"); }
@keyframes lens-search {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-22%, -6%); }
  45% { transform: translate(-4%, -14%); }
  65% { transform: translate(-30%, -2%); }
  85% { transform: translate(-8%, -4%); }
}
.h-img-map-search.spin::after { animation: lens-search .6s ease-in-out; }
h2 > .h-img-map-search { cursor: pointer; }
/* «Ближайшие ивенты»: свиток — два слоя; при нажатии шнурки с колечками качаются, как на ветру */
.h-img-scroll { --icon: none; }
.h-img.h-img-scroll, .quicknav .h-img.h-img-scroll { position: relative; background: none; -webkit-mask: none; mask: none; }
.h-img-scroll::before, .h-img-scroll::after { content: ""; position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--layer) center / contain no-repeat; mask: var(--layer) center / contain no-repeat; }
.h-img-scroll::before { --layer: url("icons/scroll-body.png"); }
.h-img-scroll::after { --layer: url("icons/scroll-cords.png"); transform-origin: 56% 52%; }
@keyframes scroll-cords {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-14deg); }
  45% { transform: rotate(12deg); }
  68% { transform: rotate(-7deg); }
  85% { transform: rotate(3deg); }
}
.h-img-scroll.spin::after { animation: scroll-cords .6s ease-in-out; }
h2 > .h-img-scroll { cursor: pointer; }
/* «Ивенты ваших групп»: трубка и дым — два слоя; при нажатии дым поднимается, тает и появляется снова */
.h-img.h-img-pipe, .quicknav .h-img.h-img-pipe { position: relative; background: none; -webkit-mask: none; mask: none; }
.h-img-pipe::before, .h-img-pipe::after { content: ""; position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--layer) center / contain no-repeat; mask: var(--layer) center / contain no-repeat; }
.h-img-pipe::before { --layer: url("icons/pipe-body.png"); }
.h-img-pipe::after { --layer: url("icons/pipe-smoke.png"); }
@keyframes pipe-smoke {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  45% { transform: translate(6%, -22%) scale(1.15); opacity: 0; }
  46% { transform: translate(-2%, 12%) scale(.7); opacity: 0; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
.h-img-pipe.spin::after { animation: pipe-smoke .6s ease-in-out; transform-origin: 60% 40%; }
h2 > .h-img-pipe { cursor: pointer; }
/* «Прошедшие ивенты»: бутылка с письмом при нажатии покачивается на волнах */
@keyframes bottle-bob {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-9deg); }
  40% { transform: rotate(9deg); }
  62% { transform: rotate(-5deg); }
  82% { transform: rotate(3deg); }
}
.h-img-bottle.spin { animation: bottle-bob 1.2s ease-in-out; transform-origin: 50% 50%; }  /* качается от центра влево-вправо */
h2 > .h-img-bottle { cursor: pointer; }
/* Страница группы: «Создать ивент», «Пригласить в группу», «Выйти из группы» — одной ширины */
.group-actions .btn:not(.icon) { width: 12.5em; padding-left: 12px; padding-right: 12px; text-align: center; }
/* Страница группы: кнопки по центру, имена участников — по левому краю названия группы */
.actions.group-actions { padding-left: 0; justify-content: center; margin-top: 32px; }
.people.under-title { padding-left: 48px; margin-top: 8px; }
/* «…» в списке участников группы: открывает всех */
.people li.people-more { padding: 0; }
.people li.people-more button { font: inherit; font-weight: 700; color: var(--chip-ink); background: none; border: 0; padding: 3px 12px; cursor: pointer; border-radius: 99px; }
.people li[hidden] { display: none; }

/* Дружба: кнопки на странице человека и заявки в профиле */
.actions.friend-actions { justify-content: center; margin: 8px 0 24px; }
.friend-requests { list-style: none; padding: 0; margin: 24px auto 16px; max-width: 420px; }  /* отступ от заголовка до первой заявки */
.friend-requests li { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0; font-weight: 600; }
.friend-requests li + li { margin-top: 36px; }  /* заявки без черты, с большим расстоянием */
.friend-requests form { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; }

/* Кнопка «Настройки» внизу профиля: открывает форму имени и аватарки */
a.edit-profile-btn { text-decoration: none; }
/* Перо справа от имени — того же размера, что иконки в шапке (как кнопка меню настроек) */
.edit-profile-btn { margin-left: auto; align-self: center; flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; color: #ffffff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.edit-profile-btn svg { width: 28px; height: 28px; }
/* Перо вместо карандаша: PNG служит маской, поэтому красится в цвет кнопки в обеих темах */
.feather-ico { display: block; width: 28px; height: 28px; background: currentColor;
  -webkit-mask: url("icons/feather.png") center / contain no-repeat; mask: url("icons/feather.png") center / contain no-repeat; }
.edit-profile-btn:focus-visible, .edit-profile-btn[aria-expanded=true] { background: var(--tag-bg); }
@media (hover: hover) { .edit-profile-btn:hover { background: var(--tag-bg); } }
#profile-settings[hidden], #profile-save[hidden], #profile-boats[hidden] { display: none; }

/* Точки-уведомления (заявки в друзья, новые ивенты, голосование): бирюзовые */
.avatar-wrap { position: relative; display: block; flex: none; }
.notify-dot { position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
.quicknav a { position: relative; }
.quicknav a .notify-dot { top: 2px; right: 2px; }

/* Минимум/максимум участников под названием ивента */
.event-hero .limits { margin: 2px 0 6px; font-weight: 700; font-size: 18px; }
.event-hero .limits-note { margin: 0 0 8px; font-size: 14px; opacity: .85; }  /* подсказка про минимум — в том же блоке, что «1/4» */
button.btn.no-spots { opacity: .5; }  /* «Иду» / «Вступить», когда мест нет */

/* Форма ивента: минимум и максимум участников — рядом, крупные колёса прокрутки */
.wheels { display: flex; gap: 16px; margin-top: 14px; }
.wheel-field { flex: 1; min-width: 0; text-align: center; position: relative; }
.wheel-tip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 90%; padding: 8px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.25); border-radius: 8px; background: #1d2433; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 5; }
.wheel-tip.on { opacity: 1; visibility: visible; }
form.stack .wheel-field label { margin-top: 0; }
.wheel-help { font-size: 13px; margin: 6px 0 0; }
.wheel-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wheel { position: relative; height: 96px; overflow-y: scroll; scroll-snap-type: y mandatory; border: 1px solid var(--input-line);
  border-radius: 14px; background: var(--input-bg); scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel-list { padding: 32px 0; }
.wheel-item { height: 32px; line-height: 32px; scroll-snap-align: center; font-size: 20px; font-weight: 700; color: var(--muted); cursor: pointer; user-select: none; }
.wheel-item.on { color: var(--ink); font-size: 24px; }
.wheel-field select.wheel-select:not(.wheel-hidden) { font-size: 28px; font-weight: 700; text-align: center; padding: 14px; }

/* Иконка «Поделиться» в правом верхнем углу шапки ивента — как «Пригласить на ивент» */
.event-hero { position: relative; }
.event-hero:has(.share-btn) h1 { padding-right: 44px; }
.share-btn { position: absolute; top: 14px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; color: #ffffff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.share-btn svg { width: 26px; height: 26px; }
@media (hover: hover) { .share-btn:hover { background: rgba(255,255,255,.12); } }
.theme-colorful .event-hero.ev-steel .share-btn, .theme-colorful .event-hero.ev-lightsteel .share-btn { color: #001428; }
.share-btn.copied::after { content: "Ссылка скопирована"; position: absolute; top: 44px; right: 0; white-space: nowrap; font: 600 13px/1 system-ui, sans-serif; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--card); }

/* Список друзей для приглашения на ивент */
.invite-friends { margin: 0 auto 16px; max-width: 420px; }
.friend-pick { list-style: none; padding: 0; margin: 0 0 4px; }
.friend-pick label { display: flex; align-items: center; gap: 12px; padding: 12px 4px; font-weight: 600; cursor: pointer; }
.friend-pick label.off { cursor: default; opacity: .6; }
.friend-pick input { width: 20px; height: 20px; accent-color: var(--accent); }
.invite-friends[hidden] { display: none; }

/* Приглашения на ивенты в профиле — карточками ивентов, над каждой — кто пригласил */
.invite-cards { margin-top: 16px; }
.invite-cards .event-row { margin-bottom: 20px; }
.invite-from { margin: 0 0 6px; font-size: 14px; text-align: center; }  /* кто пригласил — над карточкой, по центру */

/* Заявка в друзья: аватар и имя рядом */
.request-who { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 17px; }
@media (hover: hover) { .request-who:hover span { color: var(--link); } }
.invite-friends button.btn:disabled { opacity: .5; }  /* «Пригласить», пока никто не отмечен */

/* Поле «Когда»: иконка календаря справа; нажатие проходит сквозь неё в само поле */
.date-wrap { position: relative; }
.date-wrap input[type=datetime-local] { padding-left: 46px; }
.date-icon { position: absolute; left: 12px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--link); pointer-events: none; }
/* Родной значок Chrome — прозрачный, поверх нашей иконки: по ней по-прежнему открывается календарь */
.date-wrap input[type=datetime-local]::-webkit-calendar-picker-indicator { position: absolute; left: 8px; width: 30px; height: 30px; opacity: 0; cursor: pointer; }

/* Лодка капитана на личной странице */
.boat-card { position: relative; }
.boat-edit { position: absolute; top: 10px; right: 10px; color: #ffffff; }
.boat-edit svg { width: 22px; height: 22px; }
.boat-edit .feather-ico { width: 22px; height: 22px; }
.boat-head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.boat-icon { width: 40px; height: 40px; flex: none; color: #ffffff; }
/* Парусная яхта: PNG служит маской, поэтому иконка красится в цвет ссылок в обеих темах */
.boat-img { display: block; width: 48px; height: 48px; margin: -4px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.boat-img-motoryacht-m1 { --icon: url("icons/motoryacht.png"); }
.boat-img-motoryacht-m2 { --icon: url("icons/motoryacht-2.png"); }
.boat-img-motoryacht-m3 { --icon: url("icons/motoryacht-3.png"); }
.boat-img-motoryacht-m4 { --icon: url("icons/motoryacht-4.png"); }
.boat-img-motoryacht-m5 { --icon: url("icons/motoryacht-5.png"); }
.boat-img-motoryacht-m6 { --icon: url("icons/motoryacht-6.png"); }
.boat-img-launch-l1 { --icon: url("icons/launch.png"); }
.boat-img-launch-l2 { --icon: url("icons/launch-2.png"); }
.boat-img-launch-l3 { --icon: url("icons/launch-3.png"); }
.boat-img-launch-l5 { --icon: url("icons/launch-5.png"); }
.boat-img-sail-s1 { --icon: url("icons/sailing-ship.png"); }
.boat-img-sail-s3 { --icon: url("icons/sailing-ship-3.png"); }
.boat-img-sail-s4 { --icon: url("icons/sailing-ship-4.png"); }
.boat-img-sail-s6 { --icon: url("icons/sailing-ship-6.png"); }
.boat-img-sail-s7 { --icon: url("icons/sailing-ship-7.png"); }
.boat-img-sail-s8 { --icon: url("icons/sailing-ship-8.png"); }
.boat-img-sail-s12 { --icon: url("icons/sailing-ship-12.png"); }
.boat-img-catamaran-1 { --icon: url("icons/catamaran.png"); }
.boat-img-catamaran-2 { --icon: url("icons/catamaran-2.png"); }
.boat-img-catamaran-4 { --icon: url("icons/catamaran-4.png"); }
.boat-img-catamaran-7 { --icon: url("icons/catamaran-7.png"); }
.boat-img-catamaran-5 { --icon: url("icons/catamaran-5.png"); }
.boat-img-catamaran-6 { --icon: url("icons/catamaran-6.png"); }
/* Выбор иконки катамарана в форме лодки */
.boat-icon-picker { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.boat-icon-picker[hidden] { display: none; }
.boat-icon-picker legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.boat-icon-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.boat-icon-option, form.stack .boat-icon-option { display: grid; place-items: center; padding: 8px; margin: 0; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: normal; }
.boat-icon-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.boat-icon-option .boat-img { margin: 0; width: 56px; height: 56px; color: #ffffff; }
.boat-icon-option:hover { border-color: var(--link); }
.boat-icon-option:has(input:checked), .boat-icon-option.current { box-shadow: 0 0 0 3px var(--link); }
.boat-icon-locked { position: relative; background: none; font: inherit; color: inherit; }
.boat-icon-star { position: absolute; top: 2px; right: 8px; font-size: 22px; font-weight: 800; line-height: 1; color: var(--link); }
.boat-icon-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; padding: 6px 12px; border-radius: 8px; background: #1d2433; color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 5; }
.boat-icon-locked.tip-on .boat-icon-tip { opacity: 1; visibility: visible; }
.boat-icon-option:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.boat-name { font-size: 20px; font-weight: 800; margin: 0; }
.boat-sub { margin: 2px 0 0; }
.boat-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.boat-facts div { background: var(--chip-bg); color: var(--chip-ink); border-radius: 10px; padding: 8px 12px; }
.boat-facts dt { font-size: 12px; color: var(--muted); margin: 0; }
.boat-facts dd { margin: 0; font-weight: 700; }
.boat-about { margin: 14px 0 0; }
.add-boat { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; color: #ffffff; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.add-boat svg { width: 30px; height: 30px; }
.add-boat:focus-visible { background: var(--tag-bg); }
@media (hover: hover) { .add-boat:hover { background: var(--tag-bg); } }
.len-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.len-pair input { width: 100%; }
form.stack .len-pair label { margin-top: 14px; }
.captainbox.plain { padding: 0 4px; text-align: center; }
.captainbox.plain .person-chip { font-size: 16px; gap: 8px; }
.captainbox.plain .person-chip .pavatar { width: 30px; height: 30px; }
.event-kind { margin: -4px 0 10px; font-size: 14px; }
.event-kind a { text-decoration: none; }
.event-kind .tag a { color: inherit; }
.captain-line { margin: 0; }
.captain-label { display: inline-block; font-size: 22px; margin-bottom: 8px; }
.vote-hint { font-size: 14px; margin: 10px 0 0; text-align: center; }
.captainbox.plain { text-align: left; }
.captainbox.plain:has(.captain-line) { text-align: center; }
.captainbox.plain .candidates { margin-top: 8px; }
.captainbox.plain .candidates li:first-child { border-top: 0; }
.captainbox.plain .candidates .person-chip { font-size: 16px; }
.captainbox.plain .candidates li { flex-wrap: nowrap; }
.captainbox.plain .candidates .grow { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.captainbox.plain .candidates .grow b { display: block; }
.captainbox.plain .candidates .votes { min-width: 5.5em; text-align: right; }
.captainbox.plain .candidates form .btn { min-width: 132px; }
/* Якорь при нажатии покачивается на волнах */
@keyframes anchor-sway {
  0% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 55% { transform: rotate(14deg); } 80% { transform: rotate(-6deg); } 100% { transform: rotate(0); }
}
.h-img-anchor.spin { animation: anchor-sway .6s ease-in-out; }
h2 > .h-img-anchor { cursor: pointer; }
.captain-label ~ .h-img-anchor, .captainbox .h-img-anchor { margin-right: 10px; vertical-align: -6px; }
.actions.rsvp { margin-top: 32px; }
.captainbox { margin-top: 32px; }
.captainbox.plain .candidates .cand-boat { flex-basis: 100%; display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.cand-boat .boat-icon { width: 36px; height: 36px; margin: 0; }
.cand-boat-text { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.cand-boat-text b { display: block; font-size: 15px; }
.boat-img-submarine { --icon: url("icons/submarine.png"); }
.captainbox.plain .candidates li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.captainbox.plain .candidates li:first-child { border-top: 1px solid var(--line); }
.captainbox.plain .candidates { margin-top: 14px; margin-bottom: 0; }
.captainbox.plain .candidates .person-chip { gap: 10px; }
.captainbox.plain .candidates .person-chip .pavatar { width: 36px; height: 36px; }
.captainbox.plain .candidates .cand-boat { gap: 10px; margin-top: 8px; }
.captainbox { margin-top: 48px; }
/* Кандидат: плашка с капитаном и голосованием, под ней отдельная полоска с лодкой */
.captainbox.plain .candidates li { display: block; background: none; border: 0; box-shadow: none; padding: 0; margin-bottom: 14px; }
.captainbox.plain .candidates li:first-child { border-top: 0; }
.cand-top { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 12px 14px; box-shadow: var(--shadow); }
.cand-top .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cand-top .grow b { display: block; }
.cand-top .votes { white-space: nowrap; min-width: 0; }
.cand-top form .btn { min-width: 0; padding: 9px 12px; }
.cand-boats { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 12px 14px; background: rgba(255,255,255,.04); display: flex; flex-direction: column; gap: 10px; }
.cand-boats .cand-boat { display: flex; align-items: center; gap: 10px; margin: 0; flex-basis: auto; }
.cand-boats .boat-icon { width: 34px; height: 34px; margin: 0; }
.captainbox.plain .candidates li { margin-bottom: 22px; }
.vote-title .captain-label { margin-bottom: 0; }
/* «Выбираем капитана»: якорь, заголовок и срок голосования — тремя строками по центру */
.vote-title { text-align: center; }
.vote-title .h-img-anchor { display: block; margin: 0 auto 6px; width: 32px; height: 32px; }
.vote-title .captain-label { display: block; margin: 0; }
.vote-title .when { margin: 2px 0 0; font-size: 14px; }
.boat-card { scroll-margin-top: 76px; }
a.cand-boat { color: inherit; text-decoration: none; }
a.cand-boat:hover, a.cand-boat:hover * { text-decoration: none; }
.friend-requests .request-who { display: inline-flex; align-items: center; gap: 10px; background: var(--chip-bg); color: var(--chip-ink); border-radius: 99px; padding: 4px 16px 4px 4px; text-decoration: none; font-size: 17px; white-space: nowrap; }
/* Заявки в друзья: аватар, имя и кнопки в одну строку */
.friend-requests { max-width: none; }
.friend-requests li { flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: nowrap; }
.friend-requests li + li { margin-top: 16px; }
.friend-requests form { flex-wrap: nowrap; gap: 6px; }
.friend-requests .btn { padding: 8px 10px; font-size: 14px; }
.friend-requests .request-who { font-size: 15px; gap: 8px; padding: 3px 12px 3px 3px; min-width: 0; }
.friend-requests .pavatar { width: 32px; height: 32px; }
.friend-requests .request-who { font-size: 17px; gap: 10px; padding: 4px 16px 4px 4px; }
.friend-requests .pavatar { width: 36px; height: 36px; }
/* Заявки в друзья: овал с аватаром, именем, галочкой и крестиком; овалы идут друг за другом */
.friend-requests { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: none; }
.friend-requests li, .friend-requests li + li { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; margin: 0; background: var(--chip-bg); color: var(--chip-ink); border-radius: 99px; padding: 4px 6px 4px 4px; }
.friend-requests .request-who { background: none; padding: 0 6px 0 0; border-radius: 0; font-size: 17px; gap: 10px; }
.friend-requests form { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; }
.req-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; padding: 0; cursor: pointer; color: #fff; }
.req-btn svg { width: 18px; height: 18px; }
.req-btn.ok { background: #2fa36b; }
.req-btn.no { background: rgba(255,255,255,.14); }
@media (hover: hover) { .req-btn:hover { filter: brightness(1.15); } }
.req-btn.ok { background: var(--accent); color: var(--accent-ink); }
.req-btn.no { background: var(--cancel); color: #ffffff; box-shadow: inset 0 0 0 1px var(--cancel-line); }
.req-btn.ok { background: #40E0D0; color: #00284f; }
/* Общие друзья: аватар и имя того же размера, что в списке друзей, на овальной подложке */
#mutual-friends li:has(.person-chip) { padding: 4px 16px 4px 4px; }
#mutual-friends .person-chip { font-size: 17px; gap: 10px; }
#mutual-friends .person-chip .pavatar { width: 36px; height: 36px; }
.profile-about { padding-left: 88px; }  /* 72 (аватар) + 16 (зазор): текст идёт по одной вертикали с именем */
.head-remove { margin: 0 0 0 auto; align-self: center; }
.head-remove .btn.icon { width: 40px; height: 40px; padding: 0; }
.head-remove .btn.icon svg { width: 18px; height: 18px; }
.head-friend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0 0 0 auto; align-self: center; }
.head-friend .btn { padding: 9px 12px; font-size: 14px; white-space: nowrap; }
/* Друзья в режиме редактирования: овал обводит аватар, имя и крестик вместе */
.friends-edit li { background: var(--chip-bg); color: var(--chip-ink); border-radius: 99px; padding: 4px 16px 4px 4px; align-items: center; gap: 10px; }
.friends-edit .grow { background: none; padding: 0; border-radius: 0; }
.friends-edit.editing li { padding-right: 6px; }
.friends-edit.editing .grow { padding-right: 6px; }
.friends-edit .friend-x { margin: 0; }
.friends-edit .friend-x .btn.icon { width: 34px; height: 34px; border-radius: 50%; padding: 0; align-self: center; }
.friends-edit .friend-x .btn.icon svg { width: 16px; height: 16px; }
/* Заголовок раздела с пером справа */
.section-head { position: relative; }
.section-head .section-edit { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin: 0; }
.section-head { display: flex; align-items: center; justify-content: center; min-height: 40px; margin: 60px 0 20px; }
.section-head h2 { margin: 0; }
.section-head .section-edit { top: 50%; transform: translateY(-50%); }
.captain-line .person-chip, .captain-line .person-chip:hover, .captain-line .person-chip:hover * { text-decoration: none; }
/* Идут / Возможно / Не идут: аватар и имя того же размера, что у друзей и капитанов */
.event-people .person-chip { font-size: 17px; gap: 10px; }
.event-people .person-chip .pavatar { width: 36px; height: 36px; }
.event-people li:has(.person-chip) { padding: 4px 16px 4px 4px; }
/* Идут / Возможно / Не идут: заголовки и списки по центру */
h2.inset:has(+ .event-people) { text-align: center; }
.event-people { justify-content: center; }
.captain-label, .vote-title .captain-label { font-size: 16px; font-weight: 700; }  /* тот же кегль, что у кнопок «Иду / Не иду» */
/* Выбранная «Иду»: крестик на углу показывает, что выбор можно снять */
.rsvp button[aria-pressed=true]:has(.going-x) { position: relative; }
.going-x { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; padding: 4px; border-radius: 50%; display: grid; place-items: center; background: var(--cancel); color: #ffffff; box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 1px var(--cancel-line); }
.going-x svg { width: 100%; height: 100%; }
.captain-label, .vote-title .captain-label { font-size: 18px; }  /* как заголовки «Идут / Возможно» */
/* «Снять свою кандидатуру» — вплотную к своей карточке капитана, как её нижняя часть */
.cand-withdraw { margin: 0; }
.cand-withdraw .btn { display: block; width: 100%; border-radius: 0 0 var(--radius) var(--radius); }
.candidates li:has(.cand-withdraw) .cand-boats { border-radius: 0; }
/* «Иду / Возможно / Не иду» — нижняя полоса карточки ивента, вплотную к её краям */
.event-hero { overflow: visible; }
.actions.rsvp.rsvp-strip { display: flex; flex-wrap: nowrap; gap: 0; margin: 18px -18px -20px; border-top: 1px solid var(--line); }
.rsvp-strip .btn, .rsvp-strip button.btn { flex: 1 1 0; min-width: 0; border: 0; border-radius: 0; background: rgba(0, 0, 0, .18); color: inherit; padding: 15px 6px; font-size: 15px; position: relative; }
.rsvp-strip .btn + .btn { border-left: 1px solid var(--line); }
.rsvp-strip button[aria-pressed=true] { background: #ffffff; color: #001428; }
.rsvp-strip button:disabled:not([aria-pressed=true]) { opacity: .5; }
.rsvp-strip .going-x { top: 6px; right: 8px; width: 12px; height: 12px; padding: 0; border-radius: 0; background: none; box-shadow: none; color: #001428; opacity: .7; }
.theme-colorful .event-hero.ev-steel .rsvp-strip, .theme-colorful .event-hero.ev-lightsteel .rsvp-strip { color: #001428; }
.rsvp-strip form { display: contents; }
.rsvp-strip .btn.danger, .rsvp-strip button.btn.danger { background: var(--cancel); color: #ffffff; }
.captain-strip { margin-top: 20px; }
/* «Голосовать» / «Ваш голос» — нижняя часть карточки капитана */
.cand-vote { margin: 0; }
.cand-vote .btn { display: block; width: 100%; border-radius: 0 0 var(--radius) var(--radius); padding: 15px 8px; }
.cand-vote .btn[aria-pressed=true] { background: #ffffff; color: #001428; border-color: #ffffff; }
.candidates li:has(.cand-vote) .cand-boats { border-radius: 0; }
/* Выбранные кнопки («Иду», «Ваш голос», «Возможно», «Не иду») — акцентного цвета, остальные в полосе приглушены */
.theme-colorful .rsvp-strip button.btn.ghost:not(.danger), .theme-colorful .cand-vote button.btn.ghost { background: rgba(0, 0, 0, .22); color: var(--link); border-color: var(--line); }
.theme-colorful .rsvp-strip button.btn.ghost[aria-pressed=true], .theme-colorful .cand-vote button.btn.ghost[aria-pressed=true],
.rsvp-strip button[aria-pressed=true], .cand-vote .btn[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rsvp-strip .going-x { color: var(--accent-ink); }
.theme-colorful .event-hero.ev-steel .rsvp-strip button[aria-pressed=true], .theme-colorful .event-hero.ev-lightsteel .rsvp-strip button[aria-pressed=true] { color: var(--accent-ink); }
/* Та же логика в теме Navy: выбранная кнопка полосы — акцентного цвета, остальные приглушены */
.theme-standard .rsvp-strip button.btn.ghost:not(.danger), .theme-standard .cand-vote button.btn.ghost { background: rgba(0, 0, 0, .22); color: #ffffff; border-color: var(--line); }
.theme-standard .rsvp-strip button.btn.ghost[aria-pressed=true], .theme-standard .cand-vote button.btn.ghost[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vote-title .vote-hint { margin: 2px 0 0; }

/* Капитан на странице ивента — такой же раздел, как «Идут / Возможно / Не идут»: левый край и отступы совпадают */
.captainbox.plain:has(.captain-line) { padding: 0; }
.captainbox h2.captain-head { margin-top: 40px; }
ul.captain-line { margin: 0 0 12px; }
.captainbox.plain .captain-line .person-chip { font-size: 17px; gap: 10px; }
.captainbox.plain .captain-line .person-chip .pavatar { width: 36px; height: 36px; }

/* Точки-уведомления на карточках: в правом верхнем углу */
.event-row, .friend-requests li { position: relative; }
.event-row > .notify-dot, .friend-requests li > .notify-dot { top: -3px; right: -3px; width: 14px; height: 14px; box-shadow: 0 0 0 3px var(--bg); }

/* Выбор капитана: при наведении вся карточка капитана (профиль, лодка, кнопка) обводится тонким внешним кольцом */
.captainbox.plain .candidates li { border-radius: var(--radius); }
.captainbox.plain .candidates li:focus-within { box-shadow: 0 0 0 1px var(--link); }
@media (hover: hover) { .captainbox.plain .candidates li:hover { box-shadow: 0 0 0 1px var(--link); } }

/* «Пригласить друзей»: список раскрывается под кнопкой, такой же ширины, и всплывает поверх страницы */
.actions.rsvp.rsvp-strip { overflow: hidden; border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); }
.invite-friends.invite-dd { position: absolute; top: 100%; z-index: 15; max-width: none; margin: 0; padding: 6px 12px 0; box-sizing: border-box; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.invite-dd .friend-pick { margin: 0; }
.invite-dd .friend-pick label { padding: 10px 2px; font-size: 15px; }
.invite-dd .actions { margin: 0 -12px; }
.invite-dd .actions .btn { display: block; width: 100%; border-radius: 0; padding: 14px 8px; }
.invite-dd .empty-center { padding: 10px 0 12px; font-size: 14px; }

/* Нигде на сайте нет подчёркивания при наведении */
a:hover, a:hover *, button:hover, .linklike:hover, .person-link:hover, .topbar .linklike:hover, a.linklike:hover { text-decoration: none; }

/* Прогноз погоды под местом ивента */
.weather { margin: 6px 0 0; font-size: 15px; }

/* Точка ивента: готовые места и карта */
.place-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.place-picker select { width: 100%; }
.place-status { margin: 0; font-size: 14px; text-align: center; }
.place-status .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
#place-map { height: 280px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
#place-map[hidden] { display: none; }

/* Календарь с погодой в форме ивента */
.wx-cal-btn { display: block; width: 100%; text-align: left; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--input-line); background: var(--input-bg); color: var(--ink); cursor: pointer; }
.wx-cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 8px; box-shadow: var(--shadow); }
.wx-cal[hidden], .wx-cal-wrap[hidden] { display: none; }
.wx-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wx-nav { background: none; border: 0; color: var(--link); font-size: 22px; padding: 2px 10px; cursor: pointer; }
.wx-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wx-dow { text-align: center; color: var(--muted); font-size: 12px; padding-bottom: 2px; }
.wx-day { border: 0; border-radius: 8px; padding: 4px 0 5px; background: rgba(255, 255, 255, .05); color: var(--ink); font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 58px; cursor: pointer; }
.wx-day.empty { background: none; cursor: default; }
.wx-day b { font-size: 15px; }
.wx-day span { font-size: 11px; line-height: 1.15; color: var(--muted); }
.wx-day span.strong { color: #ffd98a; font-weight: 700; }
.wx-day.past { opacity: .3; cursor: default; }
.wx-day.sel { background: var(--accent); outline: 1px solid #40E0D0; }
.wx-day.sel span { color: #fff; }
.wx-time { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 600; }
.wx-sum { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.wx-hint { font-size: 12px; margin: 6px 4px 0; }
.leaflet-control-attribution { font-size: 10px; background: rgba(0, 20, 40, .55) !important; color: #cfe3f1 !important; padding: 1px 6px; }
.leaflet-control-attribution a { color: inherit !important; }
.wx-nav:disabled { opacity: .25; cursor: default; }
.wx-day b em { font-style: normal; font-size: 12px; font-weight: 600; margin-left: 2px; color: #ffffff; }
.wx-cal-btn.placeholder { color: var(--muted); }

/* «Создать ивент» — нижняя полоса карточки формы, вплотную к её краям */
.form-strip { margin: 18px -18px -18px; }
.form-strip .btn, .form-strip button.btn { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); padding: 15px 8px; font-size: 15px; }
.wx-day.today { box-shadow: inset 0 0 0 1px #ffffff; }
.wx-wheels { margin-top: 12px; }
.wx-wheels .wheel-field label { display: block; margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
/* Месяцы чередуются по фону: светлый, обычный, светлый… (октябрь, декабрь, февраль — светлые) */
.wx-day.m-light:not(.sel) { background: rgba(255, 255, 255, .1); }

/* Список точек: свой, без пункта «Выбрать точку» внутри */
.place-dd { position: relative; }
.place-dd[hidden], .place-dd-list[hidden], #place-preset[hidden] { display: none; }
.place-dd-btn { display: block; width: 100%; text-align: left; font: inherit; padding: 11px 38px 11px 14px; border-radius: 10px; border: 1px solid var(--input-line); background: var(--input-bg); color: var(--ink); cursor: pointer; position: relative; }
.place-dd-btn.placeholder { color: var(--muted); }
.place-dd-btn::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); }
.place-dd-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.place-dd-list li { padding: 10px 14px; cursor: pointer; }
.place-dd-list li.on { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .place-dd-list li:hover { background: rgba(255, 255, 255, .08); } .place-dd-list li.on:hover { background: var(--accent); } }
/* Карта не должна перекрывать раскрытый список точек: слои Leaflet (z-index до 1000) остаются внутри карты */
#place-map { position: relative; z-index: 0; isolation: isolate; }
.place-dd { z-index: 10; }  /* выше карты, но ниже шапки (z-index 20) */
/* «Указать на карте»: без белой обводки, как поле списка точек */
#place-map-btn.btn.ghost, .theme-standard #place-map-btn.btn.ghost, .theme-colorful #place-map-btn.btn.ghost, #place-geo-btn.btn.ghost, .theme-standard #place-geo-btn.btn.ghost, .theme-colorful #place-geo-btn.btn.ghost { border-color: transparent; background: var(--input-bg); }

/* Значки погоды в ячейках календаря */
.wx-day .wx-ico { display: block; width: 15px; height: 15px; margin: 1px 0 0; color: #ffffff; }
.wx-day .wx-ico svg { display: block; width: 15px; height: 15px; }
.wx-day { min-height: 66px; }

/* В ячейке календаря значок погоды и температура — в одном ряду */
.wx-day .wx-row { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 1px; }
.wx-day .wx-row .wx-ico { margin: 0; }
.wx-day { min-height: 56px; }
.wx-day .wx-ico { color: var(--muted); }  /* значок — того же цвета, что температура и ветер */
.wx-day.sel .wx-ico { color: #ffffff; }   /* у выбранного дня все подписи белые */
select[hidden] { display: none; }
/* Раскрытый список выше соседних списков (иначе «Доступность» уходит под «Где»), но всё равно ниже шапки (z-index 20) */
.place-dd:has(.place-dd-list:not([hidden])) { z-index: 12; }
/* Поле «Цена»: без стрелок вверх-вниз */
#id_price { -moz-appearance: textfield; appearance: textfield; }
#id_price::-webkit-outer-spin-button, #id_price::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* «Цена»: поле слева, «С человека / За ивент» справа в одной строке */
.price-row { display: flex; gap: 8px; align-items: stretch; }
.price-row > input { flex: 1 1 0; min-width: 0; }
.price-row > .place-dd { flex: 0 0 auto; width: 150px; }
.price-row .place-dd-btn { height: 100%; white-space: nowrap; }
/* Стрелки у всех раскрывающихся списков формы — одного цвета, независимо от цвета текста в строке */
.place-dd-btn::after { border-color: var(--muted); }

/* «Создать ивент» / «Создать группу» — подложка, выглядывающая из-под верха первой карточки списка */
.over-card { position: relative; z-index: 1; margin: 0 12px -14px; padding-bottom: 14px; }
.over-card + .row { position: relative; z-index: 2; }
.over-card .btn { display: flex; align-items: center; justify-content: center; min-height: 40px; width: 100%; box-sizing: border-box; border-radius: var(--radius) var(--radius) 0 0; padding: 0 8px; font-size: 14px; line-height: 1.2; }

/* Ивент: погода сразу под временем, место — ниже */
.event-hero .lead:has(+ .weather) { margin-bottom: 0; }
.event-hero .weather { margin: 4px 0 12px; }
.event-hero .weather + .lead { margin-top: 0; }
.event-hero .lead.loc { margin-bottom: 4px; }
#loc-toggle { color: inherit; text-decoration: none; cursor: pointer; }
#loc-map { height: 240px; margin: 0 0 14px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; position: relative; z-index: 0; isolation: isolate; }
#loc-map[hidden] { display: none; }
.loc-ico { width: 10px; height: 16px; vertical-align: -2px; margin-left: 12px; }
.event-hero .weather .wx-ico { display: inline-block; width: 20px; height: 20px; vertical-align: -5px; }
.event-hero .weather .wx-ico svg { display: block; width: 20px; height: 20px; }

/* Пустой список на главной: карточка-заглушка, над ней — подложка с кнопкой «Создать …» */
.row.empty-card { justify-content: center; text-align: center; color: var(--muted); padding: 22px 14px; }
/* Пустой список: кнопка «Создать …» — подложка под карточкой-заглушкой */
.row.empty-card { position: relative; z-index: 2; margin-bottom: 0; }
.under-card { position: relative; z-index: 1; margin: -14px 12px 14px; padding-top: 14px; }
.under-card .btn { display: flex; align-items: center; justify-content: center; min-height: 40px; width: 100%; box-sizing: border-box; border-radius: 0 0 var(--radius) var(--radius); padding: 0 8px; font-size: 14px; line-height: 1.2; }
.row.empty-card:hover, .theme-standard .row.empty-card:hover, .theme-colorful .row.empty-card:hover { border-color: var(--line); }

/* Непросмотренное на странице — рамка цвета кнопок вместо точки (точки остаются только в шапке) */
.row.is-new, .friend-requests li.is-new, .theme-standard .row.is-new, .theme-colorful .row.is-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.row.is-new:hover, .theme-standard .row.is-new:hover, .theme-colorful .row.is-new:hover { border-color: var(--link); box-shadow: 0 0 0 1px var(--link), var(--shadow); }

/* Порядок групп: значок «три полоски» справа от названия раздела и меню выбора */
.sec-head { position: relative; display: flow-root; margin: 60px 0 20px; }
.sec-head > h2 { margin: 0; }
.sort-wrap { position: absolute; right: 0; bottom: -7px; z-index: 12; }
.sort-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--link); cursor: pointer; padding: 0; }
.sort-btn svg { width: 22px; height: 22px; }
.sort-btn[aria-expanded="true"] { background: var(--tag-bg); }
@media (hover: hover) { .sort-btn:hover { background: var(--tag-bg); } }
.sort-list { position: absolute; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 240px; text-align: left; font-size: 16px; font-weight: 400; }
.sort-list[hidden] { display: none; }
.sort-list li { padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.sort-list li.on { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .sort-list li:hover { background: rgba(255, 255, 255, .08); } .sort-list li.on:hover { background: var(--accent); } }
.over-card + .group-list > .row:first-child { position: relative; z-index: 2; }
/* Значок порядка — по вертикали посередине между иконкой раздела и его названием */
.sort-wrap { top: 50%; bottom: auto; transform: translateY(-50%); }
/* Слева, по началу плашки «Создать группу» (её отступ — 12px) */
.sort-wrap { left: 12px; right: auto; }
.sort-list { left: 0; right: auto; }
/* Значок порядка — нарисованные линии, на одном уровне с названием раздела */
.sort-wrap { top: auto; bottom: -7px; transform: none; }
.sort-ico { display: block; width: 30px; height: 30px; background: currentColor; -webkit-mask: url("icons/sort-lines.png") center / contain no-repeat; mask: url("icons/sort-lines.png") center / contain no-repeat; }
/* Значок порядка — вертикальная стрелка с двумя наконечниками */
.sort-ico { width: 26px; height: 26px; background: none; -webkit-mask: none; mask: none; }
/* Справа: сама стрелка — ровно над правым краем плашки «Создать группу» (её отступ 12px, поля кнопки учтены) */
.sort-wrap { left: auto; right: -1px; }
.sort-list { left: auto; right: 0; }
.sort-ico { width: 22px; height: 22px; }
.sort-wrap { right: -2px; }

/* Стрелки порядка ⇅ — по центру под последней карточкой или стопкой групп; меню открывается вверх */
.sort-wrap { position: relative; display: flex; justify-content: center; left: auto; right: auto; top: auto; bottom: auto; transform: none; margin: 2px 0 0; z-index: 12; }
.past-stack.collapsed + .sort-wrap, .group-list:has(> .past-stack.collapsed) + .sort-wrap { margin-top: 6px; }
.sort-ico { width: 24px; height: 24px; }
.sort-list { left: 50%; right: auto; top: auto; bottom: calc(100% + 4px); transform: translateX(-50%); }

/* Настройки группы: «Сохранить» и удаление — нижняя полоса карточки */
.form-strip.split { display: flex; }
.form-strip.split .btn { border-radius: 0; }
.form-strip.split .btn:first-child { flex: 1; border-bottom-left-radius: calc(var(--radius) - 1px); }
.form-strip.split .btn.icon { display: grid; place-items: center; width: 64px; flex: none; padding: 0; border-left: 1px solid var(--line); border-bottom-right-radius: calc(var(--radius) - 1px); }
/* «Указать на карте»: значок геопозиции слева от надписи */
#place-map-btn .pin-ico, #place-geo-btn .pin-ico { width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; }

/* Раздел «Погода» */
.h-img-weather { --icon: url("icons/weather.png"); }
.wx-page { margin-top: 14px; }
.wxp-note { margin: 12px 4px 4px; }
.wx-day-h { font-weight: 700; margin: 12px 4px 8px; }
.wx-hours { border-radius: 10px; overflow: clip; background: rgba(255, 255, 255, .06); }
.wx-hours table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wx-hours th { position: sticky; top: var(--topbar-h, 57px); z-index: 2; background: var(--card); font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.wx-hours td { padding: 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); white-space: nowrap; }
.wx-hours td:first-child, .wx-hours th:first-child { padding-left: 12px; font-weight: 600; }
.wx-hours tr:last-child td { border-bottom: 0; }
.wx-hours td.ico svg { display: block; width: 24px; height: 24px; color: var(--muted); }
.wx-hours td.strong { color: #ffd98a; font-weight: 700; }
.wx-hours tr.cur { background: var(--accent); }
.wx-hours tr.cur td.ico svg { color: #fff; }
.wx-hours tr.approx td { opacity: .75; }

/* «Погода»: переключатель вида и циферблат на 12 часов */
.seg { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.seg button { flex: 1; font: inherit; font-weight: 700; padding: 9px 8px; border: 0; background: var(--card); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.seg button small { display: block; font-size: 12px; font-weight: 600; opacity: .85; margin-bottom: 1px; }
.wxp-view { margin-top: 14px; }
.dl-half { width: 210px; margin: 0 auto 10px; }
.dial { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin: 6px auto 0; container-type: inline-size; }
.dl-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.dl-ring .o { fill: var(--card); stroke: var(--line); stroke-width: .25; } .dl-ring .i { fill: var(--bg); stroke: var(--line); stroke-width: .25; }
.dl-ring line { stroke: var(--line); stroke-width: .25; }
.dl-num { position: absolute; transform: translate(-50%, -50%); font-size: clamp(14px, 4.4cqw, 24px); font-weight: 700; width: 9cqw; height: 9cqw; display: grid; place-items: center; }
.dl-num.now { background: var(--accent); color: #fff; border-radius: 50%; }
.dl-slot { position: absolute; transform: translate(-50%, -50%); width: 14cqw; padding: 1cqw 0; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: center; line-height: 1.15; cursor: pointer; }
.dl-slot.sel { background: var(--accent); }
.dl-slot.none { color: var(--muted); cursor: default; opacity: .5; }
.dl-slot.approx { opacity: .8; }
.dl-ic { display: block; width: clamp(16px, 5cqw, 26px); height: clamp(16px, 5cqw, 26px); margin: 0 auto 2px; color: var(--muted); } .dl-ic svg { display: block; width: 100%; height: 100%; }
.dl-slot.sel .dl-ic { color: #fff; }
.dl-slot b { display: block; font-size: clamp(11px, 3.2cqw, 16px); }
.dl-slot em { display: block; font-style: normal; font-size: clamp(9px, 2.3cqw, 12px); color: var(--muted); }
.dl-slot em.s { color: #ffd98a; font-weight: 700; } .dl-slot.sel em { color: #fff; }
.dl-center { position: absolute; left: 27.5%; top: 27.5%; width: 45%; height: 45%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dl-big { width: clamp(28px, 9cqw, 46px); height: clamp(28px, 9cqw, 46px); color: var(--link); } .dl-big svg { display: block; width: 100%; height: 100%; }
.dl-t { font-size: clamp(22px, 6.5cqw, 34px); font-weight: 700; line-height: 1.1; }
.dl-h { color: var(--muted); font-size: clamp(11px, 2.6cqw, 13px); } .dl-w { font-size: clamp(11px, 2.7cqw, 14px); }
/* Вид «Барабан»: слева дни, справа часы выбранного дня */
.dr-lbl { display: grid; grid-template-columns: 42% 58%; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; margin: 12px 0 6px; }
.drums { position: relative; display: grid; grid-template-columns: 42% 58%; height: 294px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.drums::before { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 42px; transform: translateY(-50%); border-radius: 12px; background: var(--accent); box-shadow: 0 0 0 1px var(--link); pointer-events: none; }
.drums::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), transparent 30%, transparent 70%, var(--bg)); pointer-events: none; opacity: .9; }
.dcol { position: relative; z-index: 1; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; padding: 126px 0; scrollbar-width: none; outline: none; cursor: grab; overscroll-behavior: contain; }
.dcol::-webkit-scrollbar { display: none; }
.dcol.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.dcol + .dcol { border-left: 1px solid var(--line); }
.dcol .r { height: 42px; scroll-snap-align: center; display: grid; align-items: center; gap: 6px; padding: 0 14px; transform-origin: center; }
.dcol.d .r { grid-template-columns: 26px 1fr 24px 38px; } .dcol.h .r { grid-template-columns: var(--hc); }
.dcol .r.on { font-weight: 700; }
.dcol .a { color: var(--muted); text-transform: uppercase; font-size: 13px; } .dcol .b { font-size: 18px; font-weight: 700; } .dcol .b em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 3px; }
.dcol .i svg { width: 22px; height: 22px; display: block; } .dcol .c { font-weight: 700; } .dcol .w { color: var(--muted); font-size: 13px; text-align: right; } .dcol .w.s { color: #ffd98a; font-weight: 700; }
.dcol .r.on .a, .dcol .r.on .b em, .dcol .r.on .w { color: #fff; }
.dr-sum { margin-top: 12px; padding: 8px 24px 12px; font-size: 15px; text-align: center; }   /* подробности часа — прямо на фоне карточки, без подложки */

/* «Барабан»: часы со всеми данными; на телефоне — широкий, дни плитками сверху */
.drums { --hc: 44px 28px 40px 1fr 1fr 1fr 1fr; }
.dr-lbl .hh, .dr-lbl.hh { display: grid; grid-template-columns: var(--hc); gap: 6px; padding: 0 14px; align-items: end; text-align: center; }
.dr-lbl .hh span:first-child, .dr-lbl.hh span:first-child { text-align: left; }
.dcol.h .r > span:not(.b) { text-align: center; } .dcol.h .r > span.b { text-align: left; }
.dcol.h .g, .dcol.h .p, .dcol.h .v { color: var(--muted); font-size: 13px; } .dcol.h .g.s { color: #ffd98a; font-weight: 700; }
.dcol.h .r.on .g, .dcol.h .r.on .p, .dcol.h .r.on .v { color: #fff; } .dcol.h .r.on .g.s { color: #ffd98a; }
.dcol.h .i svg { margin: auto; }
.dr-lbl { --hc: 44px 28px 40px 1fr 1fr 1fr 1fr; }
.drums.wide { grid-template-columns: 1fr; --hc: 34px 26px 36px 1fr 1fr 42px 36px; }
.dr-lbl.hh { --hc: 34px 26px 36px 1fr 1fr 42px 36px; grid-template-columns: var(--hc); gap: 4px; font-size: 11px; margin: 4px 0 6px; }
.drums.wide .dcol.h .r { gap: 4px; padding: 0 12px; }
.wd-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
.wd-days::-webkit-scrollbar { display: none; }
.dchip { flex: 0 0 auto; width: 54px; display: grid; justify-items: center; gap: 1px; padding: 7px 0 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; cursor: pointer; }
.dchip span { font-size: 12px; color: var(--muted); text-transform: uppercase; } .dchip b { font-size: 18px; } .dchip i svg { width: 20px; height: 20px; display: block; }
.dchip.on { background: var(--accent); border-color: var(--link); box-shadow: 0 0 0 1px var(--link); } .dchip.on span { color: #fff; }
.drums:not(.wide), .dr-lbl:not(.hh) { grid-template-columns: 34% 66%; }
.drums:not(.wide), .dr-lbl:not(.hh) { --hc: 40px 26px 36px 1fr 1fr 1fr 1fr; }
.drums:not(.wide) .dcol.h .r, .dr-lbl:not(.hh) .hh { gap: 4px; padding: 0 10px; }
.dcol.h .r > span { white-space: nowrap; } .dr-lbl .hh span, .dr-lbl.hh span { white-space: nowrap; }
.drums:not(.wide) .dcol.d .r { grid-template-columns: 24px 1fr 22px 34px; padding: 0 10px; }
.wx-src { margin: 14px 2px 0; font-size: 12px; text-align: center; } .wx-src a { color: inherit; text-decoration: underline; }

/* Вид «Диаграмма»: двое суток — температура, ветер и порывы, осадки, волна */
.ch-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 8px; }
.ch-nav button { width: 38px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.ch-nav button:disabled { opacity: .35; cursor: default; }
.ch-sum { margin: 8px 0 0; background: none; padding: 8px 24px 12px; }   /* подробности часа под диаграммой — прямо на фоне карточки, без подложки */
.chart { max-width: 720px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 6px 2px 2px; outline: none; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.ch-grid { stroke: #274a68; stroke-width: .6; } .ch-sep { stroke: #3b5a78; stroke-dasharray: 3 4; stroke-width: .8; }
.ch-ax { fill: #8fb0cc; font-size: 12px; } .ch-u { fill: #8fb0cc; font-size: 10px; } .ch-day { fill: #a9c4da; font-size: 12px; font-weight: 700; }   /* числа на диаграмме крупнее */
.ch-t { fill: none; stroke: #ffb86b; stroke-width: 2.2; stroke-linejoin: round; } .ch-tfill { fill: #ffb86b; opacity: .13; }
.ch-ic { color: #a9c4da; }
.ch-w { fill: #6fb3ee; opacity: .85; } .ch-w.s { fill: #ffd98a; }
.ch-g { fill: none; stroke: #fff; stroke-width: 1.3; stroke-dasharray: 4 3; opacity: .9; }
.ch-r { fill: #5aa9ff; opacity: .9; } .ch-v { fill: none; stroke: #5fe0c0; stroke-width: 2; stroke-linejoin: round; }
.ch-cur { stroke: #fff; stroke-width: 1.4; } .ch-dot { fill: #ffb86b; stroke: #fff; stroke-width: 2; }
.ch-hint { font-size: 12px; text-align: center; margin: 0 4px 8px; }   /* подсказка над диаграммой */
.ch-nav .ch-clear { width: 26px; height: 26px; margin-left: -6px; border-radius: 50%; font-size: 18px; padding: 0; color: var(--muted); }   /* крестик: сбросить выбранные дни */
.wxp-view button { padding: 9px 4px; font-size: 14px; white-space: nowrap; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wxp-view .wxv-ico { width: 26px; height: 26px; display: block; }  /* иконки видов погоды: таблица, диаграмма, барабан, циферблат */
@media (max-width: 640px) { .wxp-view button { font-size: 13px; } }
/* Переключатель видов погоды — таблетка из иконок, наполовину заходит на верхний край карточки прогноза */
.seg.wxp-view { display: flex; gap: 2px; width: max-content; margin: 14px auto -21px; padding: 3px; overflow: visible; border: 1px solid var(--line); border-radius: 999px; background: var(--card); position: relative; z-index: 3; box-shadow: var(--shadow); }
.wxp-view button { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; background: transparent; color: var(--muted); }
.wxp-view button.on { background: var(--accent); color: #fff; }
.wxp-view button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* подпись — только для экранного чтения и подсказки */
.wxp-view .wxv-ico { width: 22px; height: 22px; }
.seg.wxp-view + .wx-page { margin-top: 0; padding-top: 30px; }   /* место под таблетку на верхнем краю прогноза */
#wxp:has(.wxp-day:empty) { display: none; }
.seg.wxp-view[hidden] { display: none; }   /* точка не выбрана — таблетки нет */
.wx-day.range { background: rgba(0, 150, 170, .35); } .wx-day.range span { color: #fff; }
.wx-day.few { opacity: .35; cursor: not-allowed; }
.wx-hours .day-sep td { text-align: center; font-weight: 700; padding: 12px 6px 6px; color: var(--muted); border: 0; }
/* Кнопка следующего дня в таблице погоды — вкладка под карточкой (.under-card), карточка поверх неё */
.wx-page { position: relative; z-index: 2; }
.wx-more-tab[hidden] { display: none; }
@media (max-width: 640px) { .wx-hours td .mm { display: none; } }  /* на телефоне в таблице вместо «14:00» просто «14» */
@media (max-width: 640px) { .wx-hours td:first-child, .wx-hours th:first-child { width: 1%; padding-left: 10px; padding-right: 0; } .wx-hours td, .wx-hours th { padding-left: 4px; padding-right: 4px; } }  /* телефон: узкий столбец часа */

.wx-hours th.gc, .wx-hours td.gc { width: 1%; } .wx-hours th.gc { white-space: normal; min-width: 0; }  /* узкий столбец порывов: заголовок переносится («Порыв, / уз») */
.wx-hours th.gc, .wx-hours td.gc { padding-left: 2px; padding-right: 2px; }
/* Над таблицей дата закреплена под шапкой сайта, ниже неё — заголовки столбцов */
.wx-day-h:has(+ .wx-hours) { position: sticky; top: var(--topbar-h, 57px); z-index: 3; box-sizing: border-box; height: 40px; line-height: 20px; margin: 12px 0 0; padding: 10px 4px; text-align: center; background: var(--card); border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--line); }
.wx-hours th { top: calc(var(--topbar-h, 57px) + 40px); }
@media (max-width: 640px) { .wx-hours th .cm { display: none; } .wx-hours th .un { display: block; } }  /* телефон: единицы всегда второй строкой, запятая не нужна */
.wx-hours td:nth-child(3), .wx-hours th:nth-child(3) { padding-right: 14px; }  /* больше воздуха между температурой и ветром */
.ch-vfill { fill: #5fe0c0; opacity: .16; }
.wx-day-h.wx-center { text-align: center; }
.wx-month-h { grid-column: 1 / -1; text-align: center; font-weight: 700; padding: 10px 0 4px; margin-top: 4px; border-top: 1px solid var(--line); }  /* название следующего месяца внутри календаря погоды */
.place-btns { display: flex; justify-content: center; gap: 40px; }   /* «Гео» и «На карте» — ссылки без рамок под списком точек */
.place-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 18px; font-weight: 600; color: var(--link); cursor: pointer; }
.place-link[hidden] { display: none; }
#place-geo-btn.place-link .pin-ico, #place-map-btn.place-link .pin-ico { width: 22px; height: 22px; margin: 0; }   /* иконка вплотную к подписи */
#place-map-btn[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 4px; }   /* карта открыта */
/* Барабан часов на ПК: час, небо и температура свободнее; ветер с порывами плотнее; осадки и волна разнесены */
@media (min-width: 641px) {
  .drums.wide, .dr-lbl.hh { --hc: 56px 46px 56px 76px 64px 1fr 1fr; }
  .drums.wide .dcol.h .r, .dr-lbl.hh { gap: 12px; padding: 0 20px; }
  .dr-lbl.hh { font-size: 12px; }
  .drums.wide .dcol.h .w, .drums.wide .dcol.h .g, .drums.wide .dcol.h .p, .drums.wide .dcol.h .v { font-size: 16px; }   /* ветер, порывы, осадки и волна крупнее */
}
/* Карта ветра — пятый вид прогноза */
.wm-map { height: 360px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; position: relative; z-index: 0; isolation: isolate; background: var(--bg); }
@media (min-width: 641px) { .wm-map { height: 460px; } }
.wm-pt { background: none; border: 0; }
.wm-pt .wm-arrow { position: absolute; left: 13px; top: 0; width: 14px; height: 56px; display: flex; align-items: center; justify-content: center; }
.wm-pt .wm-kn { position: absolute; left: 26px; top: 18px; font-size: 12px; font-weight: 700; color: #002147; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.wm-legend { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.wm-legend i { display: inline-block; width: 22px; height: 8px; border-radius: 2px; margin-left: 6px; }
.wm-slider { display: flex; align-items: center; gap: 10px; padding: 8px 6px 4px; font-size: 13px; color: var(--muted); }
.wm-slider input { flex: 1; accent-color: var(--accent); }
.wm-layers { margin: 0 0 10px; }   /* слои карты: «Ветер и порывы» / «Температура и осадки» */
.wm-layers button { font-size: 14px; padding: 8px 6px; }
.wm-pt .wm-kn small { font-size: 11px; font-weight: 600; opacity: .8; }
.wm-pt-t .wm-temp { position: absolute; left: 0; top: 0; width: 40px; display: flex; flex-direction: column; align-items: center; color: #002147; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }   /* значок неба над температурой, без цветной подложки */
.wm-pt-t .wm-sky svg { width: 22px; height: 22px; display: block; color: #002147; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff); }
.wm-pt-t .wm-temp b { font-size: 13px; font-weight: 700; line-height: 1.1; }
.wm-pt-t .wm-rain { position: absolute; left: 0; width: 40px; justify-content: center; top: 38px; display: flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 700; color: #0b3d91; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap; }
.wm-lg-drop { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; }
.wm-pt-t .wm-drop path { fill: #002147; }   /* капля осадков на карте — тёмная, как значок неба */
.wm-pt-t .wm-rain { color: #002147; }
.wm-slider input:focus, .wm-slider input:focus-visible { outline: none; box-shadow: none; }   /* без квадратной рамки вокруг ползунка */
.wm-step { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--link); display: flex; align-items: center; justify-content: center; cursor: pointer; }   /* стрелки по краям ползунка карты */
/* Карта на всю карточку прогноза: заголовок и слои сверху, легенда и ползунок снизу — поверх карты */
#wxp.wm-full { padding: 0; overflow: hidden; }
#wxp.wm-full .wxp-day { margin: 0; }
.wm-wrap { position: relative; height: 520px; }
@media (min-width: 641px) { .wm-wrap { height: 600px; } }
.wm-wrap .wm-map { position: absolute; inset: 0; height: auto; border: 0; border-radius: 0; }
/* Под карточкой с картой: заголовок, ползунок, легенда, слои */
.wm-ctrl { margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.wm-ctrl[hidden] { display: none; }
.wm-title { text-align: center; font-weight: 700; font-size: 15px; }
.wm-ctrl .wm-legend { margin: 0; }
.wm-ctrl .wm-slider { padding: 0; }
/* Слои карты — вкладка, прилегающая к нижнему краю карточки с картой, с закруглёнными нижними углами */
.wm-ctrl { margin-top: 0; }
.wm-ctrl .wm-layers { margin: -1px 12px 4px; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); position: relative; z-index: 1; }
.wm-wrap .leaflet-top.leaflet-left { top: 26px; }   /* кнопки зума ниже таблетки видов */
/* Крупные подписи городов на карте ветра */
.wm-city { background: none; border: 0; }
.wm-city span { position: absolute; left: 6px; top: -8px; white-space: nowrap; font-size: 12px; font-weight: 700; color: #1b1b1b; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 4px #fff, 0 0 4px #fff; pointer-events: none; }
.wm-city::before { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #1b1b1b; box-shadow: 0 0 0 1.5px #fff; }
.wm-city.left span { left: auto; right: 6px; }
.wm-city.up span { top: -26px; left: -20px; }   /* Херцег-Нови — подпись над точкой: южнее стрелка ветра */
@media (max-width: 640px) { .wm-wrap .leaflet-container { cursor: default; touch-action: pan-y; } }
.wm-city.down span { top: 5px; left: 0; transform: translateX(-50%); }   /* Котор — подпись под точкой */
/* Без тонких полос между фрагментами карты при дробном масштабе (известная особенность Chrome/Safari) */
@media (min-width: 641px) { .wm-wrap .leaflet-container img.leaflet-tile { mix-blend-mode: plus-lighter; } }   /* ПК: дробный масштаб без щелей */
.wm-wrap .leaflet-container { background: #aad3df; }   /* цвет моря OpenStreetMap — если щель всё же мелькнёт, её не видно */
.wm-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }   /* телефон: карта в целом масштабе, растянутая целиком */
.wm-k { position: absolute; inset: 0; }   /* обёртка обратного сжатия значков */
.wm-inner, .wm-inner .leaflet-tile { image-rendering: auto; } .wm-inner { will-change: auto; }
.wm-pt .wm-kn.low { top: 34px; }
/* Ползунок часов на карте ветра — крупнее: толще дорожка, больше бегунок */
.wm-slider input[type=range] { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; }
.wm-slider input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--line); }
.wm-slider input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--line); }
.wm-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.wm-slider input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
@media (max-width: 640px) { .wm-pt-t .wm-rain { top: 33px; line-height: 1; } .wm-pt-t .wm-temp b { line-height: 1; } }   /* телефон: мм вплотную под температурой */
.wx-hours td.wg .gu { opacity: .75; font-size: .92em; }   /* порывы — через слэш после ветра */
.wx-hours td.wg, .wx-hours td.mmc { white-space: nowrap; }
.wx-hours th.wg, .wx-hours td.wg { width: 1%; padding-left: 4px; padding-right: 4px; }   /* «Ветер и порывы» — узкий столбец */
.wx-hours th.wg { white-space: normal; line-height: 1.15; }   /* заголовок переносится в две строки */
/* ПК: столбцы таблицы погоды расставлены равномерно */
@media (min-width: 641px) {
  .wx-hours table { table-layout: fixed; width: 100%; }
  .wx-hours th, .wx-hours td { text-align: center; }
  .wx-hours th:nth-child(1), .wx-hours td:nth-child(1) { width: 11%; }
  .wx-hours th:nth-child(2), .wx-hours td:nth-child(2) { width: 9%; }
  .wx-hours th:nth-child(n+3), .wx-hours td:nth-child(n+3) { width: 16%; padding-left: 4px; padding-right: 4px; }
  .wx-hours th.wg, .wx-hours td.wg { width: 16%; }
  .wx-hours td.ico svg { margin: 0 auto; }
}
