/* Главная: ночной город с героем во всю ширину стекает на бумагу, под ним — «Найти повод выйти», два раздела и настоящие события. */
.home { display: flex; flex-direction: column; gap: 20px; padding: calc(12px + var(--safe-t)) 16px calc(var(--tabbar-h) + 24px); }
/* Шапка без рамки: сцена от самого края экрана, всё нажимаемое — живыми слоями поверх. Низ — подтёки краски (melt) на бумагу. */
.hh { position: relative; isolation: isolate; margin: calc(-12px - var(--safe-t)) -16px 0; padding: calc(12px + var(--safe-t)) 16px 0; height: calc(318px + var(--safe-t)); background: var(--scene);
  clip-path: inset(-20px 0 -56px 0); } /* при прокрутке герой не уходит ниже подтёков */
.hh-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hh-city { display: block; width: 100%; height: 100%; }
.hh-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
/* фраза героя — бумажный пузырь на крышах слева от него, хвостик смотрит на героя; тап по герою — новая фраза */
.say-bubble { position: absolute; z-index: 3; left: 14px; right: 168px; bottom: 58px; max-width: 200px; margin: 0 0 0 auto; padding: 10px 13px; border-radius: 16px 16px 4px 16px; transform: rotate(2deg);
  font-size: 13.5px; font-weight: 600; line-height: 1.3; background: #f4efe6; color: var(--scene); box-shadow: 3px 3px 0 var(--amber); }
/* герой стоит на крыше справа: ноги спрайта — у нижнего края кадра (sprites/*.png, 640×640) */
.hh { overflow-x: clip; } /* герой, сдвинутый за край, не должен растягивать страницу вбок */
.sitter { position: absolute; z-index: 2; right: -8px; bottom: 2px; width: 200px; display: block; }
.sitter .hero-sprite { width: 200px; height: 200px; }
/* «в эфире»: друзья видят тебя на событии — вокруг героя тёплое свечение, слева плашка (тап — «как видят друзья») */
.sitter.on-air::before { content: ""; position: absolute; z-index: -1; left: 6%; right: 6%; bottom: 0; height: 88%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--coral) 70%, transparent), color-mix(in srgb, var(--coral) 25%, transparent) 60%, transparent); }
.sitter.on-air .hero-sprite { filter: drop-shadow(0 0 6px var(--coral)) drop-shadow(0 0 18px color-mix(in srgb, var(--coral) 60%, transparent)); }
.air-pill { position: absolute; z-index: 4; left: 14px; top: calc(104px + var(--safe-t)); max-width: min(210px, calc(100% - 196px)); display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 14px; text-align: left; font-size: 12.5px; font-weight: 600; line-height: 1.25; background: #f4efe6; color: var(--scene); border: 2px solid var(--scene); box-shadow: 3px 3px 0 var(--coral); }
.air-pill svg { flex: none; width: 16px; height: 16px; color: var(--coral); }
.hh:has(.air-pill) .say-bubble { display: none; } /* статус важнее фразы — и места на крышах на двоих не хватает */
.air-pill b { font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .sitter.on-air::before { animation: air-glow 2.4s ease-in-out infinite; }
}
@keyframes air-glow { 50% { opacity: .55; transform: scale(1.06); } }
.lvl-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.home-top { position: relative; z-index: 4; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand { position: relative; display: flex; flex-direction: column; gap: 2px; }
.logo { font: 900 27px/1 var(--f-head); letter-spacing: .01em; }
.logo span { color: var(--amber); }
.city { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 14px; font-weight: 600; color: var(--muted); }
.city svg { color: var(--coral); }
.city .chev { font-size: 12px; font-style: normal; transition: transform .2s; }
.city.open .chev { transform: rotate(180deg); }
.city-menu { position: absolute; z-index: 12; top: calc(100% + 4px); left: 0; min-width: 180px; display: flex; flex-direction: column; padding: 6px; border-radius: 14px; background: #f4efe6; color: var(--scene); border: 2px solid var(--scene); box-shadow: 3px 3px 0 var(--coral); animation: fade .15s; }
.city-menu button { min-height: 44px; padding: 0 12px; border-radius: 10px; text-align: left; font-weight: 600; }
.city-menu button.on { background: var(--amber); }
.city-pick { display: flex; gap: 10px; margin-top: 8px; }
.city-pick .pill { flex: 1; min-height: 52px; font-size: 16px; }
.top-btns { display: flex; gap: 10px; padding-top: 4px; }
.lvl-ring { background: var(--amber); }

/* «Найти повод выйти» — тёмный плакат с жёлтой стрелкой и розовой печатной тенью */
.cta { display: flex; align-items: center; gap: 12px; margin-top: 36px; padding: 13px 14px 13px 16px; border-radius: 22px; background: var(--ink); color: var(--bg); box-shadow: 4px 4px 0 var(--coral);
  transition: transform .4s var(--spring), box-shadow .4s var(--spring); }
.cta > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* главная кнопка — заметная, но не на пол-экрана: заголовок в одну-две строки, подпись в одну */
.cta .h-screen { font-size: clamp(24px, 7vw, 30px); line-height: .95; color: var(--bg); text-wrap: balance; }
.cta-sub { color: #c9bdb3; font-size: 12px; font-weight: 500; line-height: 1.3; }
.cta-go { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: var(--ink); font-style: normal; }
.cta-go svg { width: 24px; height: 24px; }
.cta:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--coral); transition-duration: .06s; }

/* два раздела — высокие плакаты своей краской: растровые точки гаснут к низу, название сверху, герой стоит внизу справа */
.discs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.disc { position: relative; overflow: hidden; min-height: 178px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 12px 12px; border-radius: 20px; color: var(--scene);
  border: 2.5px solid var(--ink); box-shadow: var(--hard); transition: transform .4s var(--spring), box-shadow .4s var(--spring); }
.disc::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background: radial-gradient(var(--ink) 1.3px, transparent 1.5px) 0 0 / 8px 8px;
  -webkit-mask: linear-gradient(170deg, #000 15%, transparent 65%); mask: linear-gradient(170deg, #000 15%, transparent 65%); }
.disc:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); transition-duration: .07s; }
.disc b { position: relative; z-index: 1; font: 900 30px/.9 var(--f-head); }
.disc small { position: relative; z-index: 1; max-width: 60%; font-size: 12px; line-height: 1.25; font-weight: 600; }
.disc-hero { position: absolute; right: -6px; bottom: -6px; width: 62%; max-width: 120px; aspect-ratio: 1; object-fit: contain; object-position: bottom right; pointer-events: none; }
.disc-radar { background: var(--mint); }
.disc-party { background: var(--coral); }

/* «Друзья сейчас» — карточки вбок (пальцем, мышью, колёсиком — ui.js dragScroll); к краю прилипают мягко, только если остановился рядом */
.now, .trend { display: flex; flex-direction: column; gap: 10px; }
.now .h-sec, .trend .h-sec { font-size: 24px; }
.trend .h-sec a { font: 600 13px var(--f-body); color: var(--muted); }
.now-row { display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; }
.now-row::-webkit-scrollbar { display: none; }
.fr-now-card { flex: none; width: 212px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; background: var(--bg); border: 2px dashed var(--coral); text-align: left; user-select: none; }
.fnc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fnc-head > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.fnc-head b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fnc-head small, .fnc-place { font-size: 12px; color: var(--muted); }
.fnc-faces { display: flex; flex: none; }
.fnc-faces img, .fnc-faces svg { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--amber); object-fit: cover; object-position: 50% 12%; -webkit-user-drag: none; }
.fnc-faces > * + * { margin-left: -14px; background: var(--mint); }
.fnc-go { min-height: 36px; background: var(--coral); }
.fnc-me { justify-content: center; background: var(--coral); border: 2px solid var(--ink); box-shadow: var(--hard); }
.fnc-me b { font-size: 15px; }
.fnc-me small { font-size: 12px; }

/* «Набирает популярность» — список: фото, что и когда, сколько каналов пишет */
.trend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trend-list li[data-i] { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); cursor: pointer; }
.tr-ph { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--raised) var(--img, none) center / cover; border: 1.5px solid var(--ink); }
.trend-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trend-list b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trend-list small { font-size: 12px; color: var(--muted); }
.tr-up { flex: none; padding: 3px 8px; border-radius: 99px; background: var(--ink); color: var(--amber); font-size: 11px; font-weight: 800; white-space: nowrap; }
.tr-skel { height: 64px; border-radius: 14px; background: linear-gradient(90deg, var(--surface) 0, var(--raised) 50%, var(--surface) 100%) 0 0 / 200% 100%; animation: skel 1.4s linear infinite; }
.tr-empty { color: var(--muted); font-size: 14px; }
@keyframes skel { to { background-position: -200% 0; } }

/* холодный старт: выбор интересов */
.interests { display: flex; flex-direction: column; gap: 10px; }
.interests .h-sec { font-size: 17px; }
.int-chips { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.int-chips::-webkit-scrollbar { display: none; }
.int { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--raised); border: 1px solid var(--line); transition: background .15s, color .15s; }
.int.on { background: var(--lavender); color: var(--on-accent); border-color: var(--lavender); }
.int.on::before { content: "✓ "; }
.int-done { min-height: 32px; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--lavender); }



@media (max-width: 350px) {
  .disc { padding: 12px 10px 10px; }
  .disc b { font-size: 20px; }
  .disc-hero { width: 92px; height: 92px; }
}

/* ---------- живая шапка ---------- */
/* Параллакс: при прокрутке город уезжает медленнее страницы, герой — чуть быстрее города (--sy ставит motion.js).
   Звёзды и окна мигают. Герой дышит (ось — ступни, ноги почти не тянутся); тап — прыжок по законам анимации:
   замах-сжатие, вытягивание на взлёте, зависание, сжатие при приземлении, дотяжка. Пузырь выскакивает от хвостика. */
@media (prefers-reduced-motion: no-preference) {
  .sitter .hero-sprite { transform-origin: 50% 98%; animation: breathe 3.8s ease-in-out infinite; }
  .sitter.hop .hero-sprite { animation: hop .7s linear; }
  .say-bubble { transform-origin: 0 100%; animation: bubble-pop .5s var(--spring) .35s backwards; }
  .say-bubble.pop { animation: bubble-pop .5s var(--spring); }
}
@keyframes breathe { 50% { transform: translateY(-1px) scale(1.008, 1.02); } }
@keyframes hop {
  0% { transform: none; animation-timing-function: ease-out; }
  14% { transform: scale(1.1, .86); animation-timing-function: ease-in; }
  32% { transform: translateY(-20px) scale(.93, 1.1); animation-timing-function: ease-out; }
  50% { transform: translateY(-26px) scale(1, 1); animation-timing-function: ease-in; }
  68% { transform: translateY(-2px) scale(.96, 1.06); animation-timing-function: ease-out; }
  78% { transform: scale(1.08, .9); animation-timing-function: ease-in-out; }
  90% { transform: scale(.98, 1.03); }
  100% { transform: none; }
}
@keyframes bubble-pop { from { opacity: 0; transform: rotate(-10deg) scale(.3); } 70% { transform: rotate(-1deg) scale(1.05); } to { transform: rotate(-2deg) scale(1); } }
