/* Волна ИНТЕРФЕЙС-2: главная по спецификации владельца
   (mockups/home-v2-spec.md): объёмный космос позади настоящего
   глобуса, слева вверху «Аккаунт» и одна кнопка «Я здесь», справа
   язык и зум, внизу — только «Куда посмотреть?» на всю ширину.
   Никаких плиток и абзацев. Читаемость: текст ≥16px, цели ≥48px. */
html.home-cosmos, html.home-cosmos body { height: 100%; }
/* Атрибут hidden на главной — закон: никакой display из классов
   (.d1-btn и пр.) не вправе его перекрывать. */
body.home [hidden] { display: none !important; }
body.home {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #eaf2f0;
  background: #02040a;
  overflow: hidden;
  position: fixed;
  inset: 0;
}
/* Космос: статичный canvas и fx-canvas — позади глобуса (z 0). */
#cosmos, #cosmos-fx {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}
/* Контейнер глобуса — ПРОЗРАЧНЫЙ: базовый styles.css красит #globe
   в непрозрачный #0b2e29, и тогда космос под картой не виден вовсе.
   Прозрачный контейнер + прозрачное «пространство» вокруг сферы =
   объёмное небо видно вокруг планеты; при нырке карта перекрывает
   его собой. */
#globe { position: fixed; inset: 0; z-index: 1; background: transparent; border-radius: 0; }
#globe .maplibregl-canvas { outline: none; }
/* Лёгкий ореол вокруг самого глобуса. */
.halo {
  position: fixed; left: 50%; top: 44%; z-index: 2; pointer-events: none;
  width: min(88vmin, 560px); height: min(88vmin, 560px);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(64,160,255,0.30) 52%, rgba(64,160,255,0.10) 66%, transparent 72%);
}
/* Зум карты — справа, под плашкой языка. ДОЛГИ-1 (владелец
   25.11.2026 23:19): колонка опущена ниже плашки — видимый зазор
   ~3 мм, края скруглены. */
#globe .maplibregl-ctrl-group {
  margin-top: 76px !important; border-radius: 18px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
#globe .maplibregl-ctrl-group button { width: 44px; height: 44px; }

/* Язык — справа вверху. ДОЛГИ-1: одна тёмная стеклянная плашка в
   стиле «Аккаунт» (текущий язык + «▼»); стопка остальных языков
   интерфейса вырастает из неё вниз, той же ширины и стиля. */
.home-lang { position: fixed; top: 14px; right: 14px; z-index: 6; }
.lang-plaque, .lang-stack a {
  min-width: 96px; min-height: 48px; padding: 0 16px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-size: 17px; font-weight: 700; text-decoration: none;
  color: #eaf2f0; background: rgba(8,20,32,.66); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px); cursor: pointer;
}
.lang-plaque .car { font-size: 12px; color: #9fb4c4; }
.lang-stack {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.lang-stack a { width: 100%; }

/* Левый верхний угол: «Аккаунт» и «Я здесь». */
.home-left { position: fixed; top: 14px; left: 14px; z-index: 6; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.corner-btn, .here-btn {
  /* ДОЛГИ-1 (владелец 25.11.2026 23:24): «Аккаунт» и «Я здесь» —
     строго одного размера: одинаковые ширина и высота, левые края
     в одну линию (колонка .home-left), текст по центру. */
  width: 176px; min-height: 52px; box-sizing: border-box;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font-size: 17px; font-weight: 700; color: #eaf2f0;
  background: rgba(8,20,32,.66); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.acct { position: relative; z-index: 4; }
.here-btn { position: relative; z-index: 1; }
.acct-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: rgba(6,18,28,.96); border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; padding: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.55);
}
.acct-menu a, .acct-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 48px; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: #eaf2f0; font-size: 17px; font-weight: 600;
  text-decoration: none; text-align: left; cursor: pointer; box-sizing: border-box;
}
.acct-menu a:hover, .acct-menu button:hover { background: rgba(255,255,255,.08); }
/* Цифра ждущего на самой кнопке «Аккаунт»: красная пилюля в углу
   кнопки + мягкая пульсация, чтобы глаз цеплялся без открытия меню. */
.corner-btn { position: relative; }
.acct-badge {
  position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 11px; background: #d43a2f; color: #fff;
  font-size: 13px; font-weight: 700; line-height: 22px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.35); pointer-events: none;
  animation: acct-pulse 1.6s ease-in-out infinite;
}
@keyframes acct-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .acct-badge { animation: none; }
}
.menu-badge {
  background: #d43a2f; color: #fff; border-radius: 999px;
  min-width: 24px; height: 24px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
/* «Я здесь»: серая — меня нет; зелёная со светящейся точкой — я тут. */
.here-btn .here-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #8b98a5; flex: none;
}
.here-btn.on {
  background: #0f6a5c; border-color: #2fe673; color: #fff;
}
.here-btn.on .here-dot {
  background: #2fe673;
  box-shadow: 0 0 10px 3px rgba(47,230,115,.75);
}

/* Низ: одна кнопка на всю ширину + компактный пуш-блок. */
.home-bottom {
  position: fixed; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 5; display: flex; flex-direction: column; gap: 10px;
}
.searchpill {
  width: 100%; min-height: 60px; padding: 14px 20px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(8,20,32,.78); color: #eaf2f0; backdrop-filter: blur(8px);
  font-size: 19px; font-weight: 700; text-align: center; cursor: pointer;
}
.searchpill.big { box-shadow: 0 8px 28px rgba(0,0,0,.5); }
#home-pushbox {
  background: rgba(8,20,32,.78); border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; padding: 10px 14px; backdrop-filter: blur(8px);
  font-size: 16px;
}
#home-pushbox p { margin: 0 0 8px; }
/* Волна v46: спокойная плашка ожидания на главной — заказ отправлен,
   человек ждёт ответа; плашка живёт, пока заказ ждёт, и говорит
   главное: нажимать ничего не нужно, сессия подключится сама. */
.wait-plaque {
  background: rgba(15,106,92,.92); color: #fff;
  border: 1px solid rgba(255,255,255,.25); border-radius: 16px;
  padding: 12px 16px; font-size: 17px; line-height: 1.35;
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}
.wait-plaque[hidden] { display: none; }
/* Волна v88: содержимое плашки — текст стопкой, под ним кнопка
   «Отменить» на всю ширину плашки: на узком экране (390 px) пара
   текст + кнопка стоит аккуратно и не разваливается. */
.wait-plaque-text { display: block; }
.wait-plaque-cancel { display: block; width: 100%; margin-top: 10px; min-height: 48px; }
.wait-plaque-cancel[hidden] { display: none; }
.wait-plaque-err { margin-top: 8px; font-size: 15px; line-height: 1.3; color: #ffd9d0; }
#home-pushbox p:last-child { margin-bottom: 0; }
#home-pushbox .d1-btn { min-height: 48px; }

/* Карточка человека по тыку в точку глобуса. */
.globe-card {
  position: fixed; left: 14px; right: 14px; z-index: 7;
  bottom: calc(104px + env(safe-area-inset-bottom));
  background: rgba(6,18,28,.96); border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(0,0,0,.55);
}
.globe-card .gc-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; }
.gc-name { font-size: 19px; font-weight: 800; padding-right: 48px; }
.gc-meta { font-size: 16px; color: #b9cdc8; margin-top: 4px; overflow-wrap: anywhere; }
.gc-price { font-size: 16px; font-weight: 700; margin-top: 4px; }
.gc-price[hidden] { display: none; }
.gc-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gc-actions .d1-btn { flex: 1; min-height: 52px; }

/* Шторка-дверь. */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #08131d; border-radius: 22px 22px 0 0;
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0,0,0,.6);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-head b { font-size: 19px; }
.sheet-x {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06); color: #eaf2f0; font-size: 24px; cursor: pointer; line-height: 1;
}
.geo-wrap { position: relative; }
#door-place {
  width: 100%; min-height: 52px; padding: 12px 14px; box-sizing: border-box;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.25);
  background: #0b1c2a; color: #eaf2f0; font-size: 17px;
}
.geo-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 3;
  background: #0b1c2a; border: 1px solid rgba(255,255,255,.2); border-radius: 14px;
  overflow: hidden; box-shadow: 0 12px 28px rgba(0,0,0,.5);
}
.geo-suggest button {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.08);
  color: #eaf2f0; font-size: 16px; text-align: left; cursor: pointer;
}
.geo-suggest button:last-child { border-bottom: 0; }
.door-tiles { display: flex; gap: 10px; margin: 14px 0 4px; }
.door-tiles .tile {
  flex: 1; min-height: 54px; padding: 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.05);
  color: #eaf2f0; font-size: 17px; font-weight: 700;
}
.door-tiles .tile.on { background: #0f6a5c; border-color: #0f6a5c; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  min-height: 48px; padding: 10px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.05);
  color: #eaf2f0; font-size: 16px; font-weight: 600;
}
.chip.on { background: #0f6a5c; border-color: #2fe673; color: #fff; }
.door-when { display: block; margin-top: 12px; font-size: 16px; }
.door-when input {
  width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 12px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.25);
  background: #0b1c2a; color: #eaf2f0; font-size: 16px;
}
.door-msg { font-size: 16px; color: #b9cdc8; margin: 12px 0 0; }
.door-msg:empty { margin: 0; }
.door-msg a { color: #7fe3c0; }
/* ДОЛГИ-1: честная надпись авто-расширения радиуса зоны. */
.door-radius { color: #ffe1a8; font-weight: 600; }
/* ДОЛГИ-1: гостевая подсказка у заказа — заметная плашка, а не
   тихая строка: гость не должен упереться в стену. */
#door-guest-hint {
  background: rgba(15,106,92,.28); border: 1px solid #2fe673;
  border-radius: 14px; padding: 12px 14px; font-size: 17px; color: #eaf2f0;
}
#door-guest-hint a { font-weight: 800; }
.door-broadcast { width: 100%; margin-top: 12px; min-height: 54px; font-size: 17px; }
.person {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1);
}
.person.dim { opacity: .55; }
.person .pdot { width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; flex: none; background: #8b98a5; }
.person .pdot.ready { background: #2fe673; box-shadow: 0 0 8px 2px rgba(47,230,115,.6); }
.person .pdot.busy { background: #ffb020; }
.person .pinfo { flex: 1; min-width: 0; }
.person .pname { font-size: 17px; font-weight: 700; }
.person .pmeta { font-size: 16px; color: #b9cdc8; margin-top: 2px; overflow-wrap: anywhere; }
.person .pact { flex: none; }
#door-form { margin-top: 12px; }
#door-form .d1-form label { color: #b9cdc8; }
#door-form .d1-form input, #door-form .d1-form select, #door-form .d1-form textarea {
  background: #0b1c2a; color: #eaf2f0; border-color: rgba(255,255,255,.25);
}

/* Волна v91 «Дверь по одному» (экраны владельца, door-mockups):
   в плашке «Посмотреть» люди — по одному карточкой; листание —
   пара «Назад»/«Следующий» и счётчик; цены — плашками, у самой
   низкой — зелёная пометка. Те же классы карточки переиспользует
   листалка откликов (.fan-sheet). */
.door-head { font-size: 15px; color: #b9cdc8; text-align: center; margin: 12px 0 0; }
.dcard {
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px; padding: 18px; margin-top: 14px;
}
.dcard-row { display: flex; align-items: center; gap: 10px; }
.dcard-dot {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  background: #8b98a5;
}
.dcard-dot.ready { background: #2fe673; box-shadow: 0 0 10px #2fe673, 0 0 3px #2fe673; }
.dcard-dot.busy { background: #ffb020; box-shadow: 0 0 8px rgba(255,176,32,.8); }
.dcard-name { font-size: 25px; font-weight: 800; overflow-wrap: anywhere; }
.dcard-ready {
  margin-left: auto; font-size: 13px; font-weight: 700; color: #2fe673;
  letter-spacing: .4px; text-transform: uppercase; flex: none;
}
.dcard-city { font-size: 16px; color: #b9cdc8; margin-top: 3px; overflow-wrap: anywhere; }
.dcard-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dcard-chip {
  padding: 8px 13px; border-radius: 999px; font-size: 15px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #eaf2f0;
}
/* v96: активный выбор услуги на карточках — плашка-кнопка;
   выбранная — фирменный зелёный (как .chip.on у фишек двери). */
button.dcard-chip { cursor: pointer; font: inherit; }
.dcard-chip.on { background: #0f6a5c; border-color: #2fe673; color: #fff; }
.dcard-hint, .gc-hint { margin-top: 10px; font-size: 15px; font-weight: 700; color: #ffb020; }
.gc-svcs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dcard-chips.svc-attn, .gc-svcs.svc-attn {
  outline: 2px solid #2fe673; outline-offset: 5px; border-radius: 10px;
}
.dcard-prices { display: flex; gap: 10px; margin-top: 16px; }
.dcard-price {
  flex: 1; text-align: center; background: rgba(20,101,90,.24);
  border: 1px solid rgba(47,230,115,.28); border-radius: 16px; padding: 12px 6px;
}
.dcard-price b { display: block; font-size: 26px; font-weight: 800; color: #fff; }
.dcard-price span { font-size: 14px; color: #b9cdc8; }
.dcard-price .tag { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #2fe673; }
.dcard-order { width: 100%; min-height: 58px; font-size: 18px; margin-top: 16px; }
.dcard-nav { display: flex; gap: 10px; margin-top: 12px; }
.dcard-nav .d1-btn { flex: 1; min-height: 50px; font-size: 16px; }
.dcard-nav .d1-btn.off { opacity: .38; }
.dcard-counter { text-align: center; font-size: 14px; color: #8fa8a2; margin-top: 12px; }
/* Форма заказа только об одном человеке (экран 2): шапка-плашка
   одной строкой — точка, имя, город, цена за минуту. */
.dform-who {
  display: flex; align-items: center; gap: 9px; padding: 13px 16px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.10); border-radius: 16px;
}
.dform-who b { font-size: 18px; font-weight: 800; }
.dform-who .dcity { font-size: 16px; color: #b9cdc8; overflow-wrap: anywhere; }
.dform-who .dper { margin-left: auto; font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }
.dform-back { width: 100%; margin-top: 10px; min-height: 48px; font-size: 16px; }
.dform-submit { width: 100%; }
/* Плашка ожидания: кнопка «Отклики: N» — тем же рядом, что отмена. */
.wait-plaque-resp { display: block; width: 100%; margin-top: 10px; min-height: 48px; }
.wait-plaque-resp[hidden] { display: none; }
/* Листалка откликов — шторка поверх двери и карточки глобуса. */
.fan-sheet { z-index: 9; }
.fan-err { margin-top: 10px; font-size: 16px; color: #ffd9d0; }
.fan-empty { font-size: 16px; color: #b9cdc8; margin-top: 12px; }

/* Волна v93 «Пригласить друга»: запасная плашка приглашения —
   по центру экрана, тёмное стекло в стиле карточки глобуса.
   Показывается только там, где нет navigator.share. */
.invite-plaque {
  position: fixed; left: 50%; top: 50%; z-index: 10;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px); box-sizing: border-box;
  background: rgba(6,18,28,.97); border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px; padding: 18px;
  box-shadow: 0 16px 44px rgba(0,0,0,.6); color: #eaf2f0;
}
.invite-plaque[hidden] { display: none; }
.invite-plaque-h { font-size: 20px; font-weight: 800; }
.invite-plaque-text { font-size: 16px; line-height: 1.4; color: #d7e5e1; margin-top: 10px; }
.invite-plaque-link {
  font-size: 16px; font-weight: 700; color: #fff; margin-top: 10px;
  overflow-wrap: anywhere; user-select: all;
}
.invite-plaque-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.invite-plaque-actions .d1-btn { flex: 1; min-height: 52px; }

/* Волна v96: плашка установки поверх глобуса — тёмное стекло,
   как плашка приглашения, но ВЕСЬ учебный текст полным
   контрастом (#fff): заголовок, объяснение, фраза и финальная
   строка (поправка владельца о бледном тексте 29.11.2026). */
.pp-install-card {
  position: fixed; left: 50%; top: 50%; z-index: 10;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px); box-sizing: border-box;
  background: rgba(6,18,28,.97); border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px; padding: 22px 18px 18px;
  box-shadow: 0 16px 44px rgba(0,0,0,.6); color: #fff;
  text-align: center; max-height: 92vh; overflow-y: auto;
}
.pp-install-card[hidden] { display: none; }
.pp-install-close {
  position: absolute; top: 6px; right: 10px;
  background: none; border: none; color: #fff;
  font-size: 30px; line-height: 1; padding: 6px; cursor: pointer;
}
.pp-install-head { font-size: 25px; font-weight: 700; line-height: 1.3; margin: 4px 0 10px; color: #fff; }
.pp-install-reason { font-size: 17px; line-height: 1.4; margin: 0 0 4px; color: #fff; }
.pp-install-pic { margin: 16px 0 6px; }
.pp-install-pic img { width: 112px; height: 112px; border-radius: 26px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.pp-install-phrase { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 10px 0 0; color: #fff; }
.pp-install-glyph { margin: 16px 0 10px; color: #fff; }
.pp-install-glyph svg { display: inline-block; width: 104px; height: 104px; }
.pp-install-glyph svg[hidden] { display: none; }
.pp-install-sub { font-size: 19px; line-height: 1.35; margin: 0 0 6px; color: #fff; }
.pp-install-btn { width: 100%; font-size: 21px; font-weight: 700;
  padding: 18px 24px; border-radius: 16px; margin-top: 14px; }
