/* ВАЙБЧЕК v2 — один мобильный интерфейс на любом экране. Без фреймворков. */

@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap;
  src: url("../fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap;
  src: url("../fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap;
  src: url("../fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #EDFFF4;
  --bg-outside: #D9F6E6;
  --ink: #111111;
  --acid: #B6FF45;
  --acid-deep: #5FA314;
  --teal: #20E6B0;
  --teal-soft: #D9FFF2;
  --lilac: #D3A0F5;
  --lilac-soft: #F3E4FD;
  --white: #FFFFFF;
  --muted: #52615B;
  --line: #CFE9DA;
  --danger: #B3261E;
  --danger-bg: #FFE9E7;
  --like: #FF4F7B;

  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;

  --col: 480px;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 28px;
  --r-photo: 24px;
  --shadow: 0 1px 0 rgba(17,17,17,.06), 0 8px 24px -12px rgba(17,17,17,.22);
  --shadow-lift: 0 18px 40px -18px rgba(17,17,17,.45);
  --tap: 44px;
  --top-h: 56px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom);
  --app-h: 100dvh;  /* высота «экрана»: на телефоне окно, на мониторе — рамка телефона */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-outside); color: var(--ink); font: 16px/1.5 var(--font-ui); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
.title-xl { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.title-l { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.title-m { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; justify-content: center; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.i { width: 24px; height: 24px; flex: none; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--top-h) + 16px); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }

/* --- Оболочка: колонка-«телефон» --------------------------------------- */
.app { position: relative; max-width: var(--col); margin: 0 auto; min-height: 100vh; min-height: var(--app-h); background: var(--bg); display: flex; flex-direction: column; }
@media (min-width: 560px) {
  .app { z-index: 1; box-shadow: 0 0 0 1px rgba(17,17,17,.06), 0 30px 80px -30px rgba(17,17,17,.35); }
  body::before, body::after { content: ""; position: fixed; z-index: 0; pointer-events: none; background: center/contain no-repeat; }
  body::before { width: 140px; height: 140px; left: max(24px, calc(50% - var(--col) / 2 - 220px)); top: 18%; background-image: url("../images/star.svg"); transform: rotate(-12deg); }
  body::after { width: 90px; height: 120px; right: max(24px, calc(50% - var(--col) / 2 - 180px)); bottom: 16%; background-image: url("../images/bolt.svg"); transform: rotate(14deg); }
}
@media (max-width: 900px) { body::before, body::after { display: none; } }

/* --- Монитор: приложение в рамке телефона ---------------------------------
   Рамка (.device) с transform — для position: fixed внутри неё она становится точкой отсчёта,
   поэтому таббар, шторки, тосты и оверлеи прилипают к рамке, а не к окну. Прокручивается .app. */
@media (min-width: 760px) and (min-height: 620px) {
  :root { --app-h: min(calc(100dvh - 48px), 880px); --safe-b: 0px; }
  html, body { height: 100%; overflow: hidden; }
  body { display: grid; place-items: center; }
  .device { position: relative; z-index: 1; height: var(--app-h); aspect-ratio: 390 / 812; max-width: calc(100vw - 48px);
    border: 2px solid var(--ink); border-radius: 44px; overflow: hidden; background: var(--bg); transform: translateZ(0);
    box-shadow: 8px 10px 0 var(--ink), 0 40px 90px -30px rgba(17,17,17,.45); }
  .device > .app { height: 100%; min-height: 0; max-width: none; overflow-y: auto; overscroll-behavior: contain; box-shadow: none; scrollbar-width: none; }
  .device > .app::-webkit-scrollbar { display: none; }
  .tabbar, .sheet-body { width: 100%; }
  .toasts { width: calc(100% - 32px); }
}

.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 4px; padding: 0 6px 0 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
/* Без backdrop-filter: иначе фиксированные листы внутри шапки позиционируются от неё, а не от экрана. */
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar.has-back { padding-left: 4px; }
.logo { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -.04em; text-decoration: none; line-height: 1; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); }
.logo img { width: 28px; height: 28px; border-radius: 8px; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; flex: none; padding: 0; }
.iconbtn:hover { background: rgba(17,17,17,.06); }
.iconbtn .badge { position: absolute; top: 4px; right: 2px; }

main { flex: 1; padding: 12px 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
.no-nav main { padding-bottom: 32px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* --- Нижняя панель -------------------------------------------------------- */
.tabbar { position: fixed; z-index: 40; bottom: 0; left: 50%; transform: translateX(-50%); width: min(var(--col), 100%); background: var(--white); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar ul { list-style: none; margin: 0; padding: 0 6px; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; text-decoration: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.tabbar .pill { display: grid; place-items: center; width: min(56px, 100%); height: 30px; border-radius: 999px; transition: background .15s; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] .pill { background: var(--acid); }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 8px); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--like); color: var(--white); font-size: 11px; font-weight: 800; line-height: 1; }

/* --- Кнопки ---------------------------------------------------------------- */
.btn { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font: 700 16px/1.2 var(--font-ui); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.btn:active { transform: none; box-shadow: none; }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-acid { background: var(--acid); }
.btn-lilac { background: var(--lilac); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { box-shadow: none; background: rgba(17,17,17,.05); transform: none; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-small { min-height: var(--tap); padding: 6px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn .i { width: 20px; height: 20px; }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; min-height: var(--tap); }

/* --- Поля ------------------------------------------------------------------ */
.field { display: block; margin-bottom: 16px; }
.field > label, .field > .label, fieldset > legend { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--r-m); background: var(--white); color: var(--ink); font: 16px/1.4 var(--font-ui);
}
textarea { min-height: 120px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--danger) !important; background: var(--danger-bg); }
.error { display: block; color: var(--danger); font-weight: 600; font-size: 14px; margin-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: var(--tap); padding: 6px 0; cursor: pointer; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }

/* Звёзды рейтинга: radio под капотом. В DOM порядок 5→1, row-reverse подсвечивает «до выбранной». */
.rate { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate label { cursor: pointer; color: #C9D9D0; padding: 2px; border-radius: 12px; }
.rate label .i { width: 46px; height: 46px; fill: currentColor; stroke: currentColor; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #FFC531; }
.rate input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }
.stars-static { display: inline-flex; gap: 1px; color: #FFC531; vertical-align: middle; }
.stars-static .i { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; }
.stars-static .off { color: #D5E3DB; }

/* Крупный выбор варианта (режим отзыва) */
.options { display: grid; gap: 10px; }
.option { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--white); cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--bg); flex: none; }
.option strong { display: block; }
.option span span { color: var(--muted); font-size: 14px; }
.option:has(input:checked) { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.option:has(input:checked) .ico { background: var(--acid); }
.option:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }

/* --- Тосты ------------------------------------------------------------------ */
.toasts { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 12px); width: min(calc(var(--col) - 32px), calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.no-nav .toasts { bottom: 20px; }
/* Исчезают сами через ~4,5 с даже без JS */
.toast { pointer-events: auto; padding: 12px 16px; border-radius: var(--r-m); background: var(--ink); color: var(--white); font-weight: 600; box-shadow: var(--shadow-lift); animation: toast-in .25s ease both, toast-out .3s ease 4.5s forwards; }
.toast.error { background: var(--danger); }
.toast.celebrate { background: var(--lilac); color: var(--ink); border: 2px solid var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); visibility: hidden; } }

/* --- Карточки и списки -------------------------------------------------------- */
.card { background: var(--white); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 18px; }
.note { border-radius: var(--r-m); padding: 14px 16px; background: var(--white); border: 1.5px solid var(--line); }
.note-lilac { background: var(--lilac-soft); border-color: var(--lilac); }
.note-acid { background: #E9FFC9; border-color: #A8E35C; }
.invite { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-l); background: var(--lilac-soft); border: 2px solid var(--ink); margin: 12px 0; }
.invite .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--lilac); flex: none; }
.invite .grow { flex: 1; min-width: 0; }
.invite p { margin: 0; }
.invite.soft { border-color: var(--line); background: var(--white); }
.invite.soft .ico { background: var(--bg); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: var(--r-m); padding: 12px 14px; position: relative; }
.list-item.unread { box-shadow: inset 4px 0 0 var(--like); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 800; }
.list-item .title a { text-decoration: none; }
.list-item .title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-m); }
.list-item .preview { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.list-item .side { position: relative; z-index: 2; display: flex; gap: 8px; align-items: center; }
.list-item .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); flex: none; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--teal); display: grid; place-items: center; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.s { width: 36px; height: 36px; font-size: 14px; }

/* Меню-строки (профиль, настройки) */
.menu-list { list-style: none; margin: 0; padding: 0; background: var(--white); border-radius: var(--r-l); overflow: hidden; }
.menu-list > li + li { border-top: 1px solid var(--line); }
.menu-list form { margin: 0; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 18px; background: none; border: 0; text-decoration: none; font: 600 16px var(--font-ui); color: var(--ink); cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }
.menu-list .grow { flex: 1; }
.menu-list .menu-sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.3; }
.menu-list .chev { color: var(--muted); width: 20px; height: 20px; }
.menu-list .danger { color: var(--danger); }
.section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 4px 8px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--white); font-weight: 700; font-size: 13px; }
.chip .i { width: 15px; height: 15px; }
.chip-like .i { color: var(--like); fill: var(--like); }
.chip-star .i { color: #FFC531; fill: #FFC531; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.empty { text-align: center; padding: 40px 12px; }
.empty img { width: 96px; margin: 0 auto 14px; }
.empty h2 { font-family: var(--font-display); font-weight: 700; font-size: 20px; }

/* --- Колода свайпов -------------------------------------------------------- */
.deck-main { padding-top: 10px; }
.deck-wrap { display: flex; flex-direction: column; gap: 16px; height: calc(var(--app-h) - var(--top-h) - var(--nav-h) - var(--safe-b) - 34px); min-height: 460px; }
.deck { position: relative; flex: 1; min-height: 0; }
.swipe-card { position: absolute; inset: 0; border-radius: var(--r-photo); overflow: hidden; background: var(--teal); box-shadow: var(--shadow-lift); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.swipe-card:first-child { z-index: 2; }
.swipe-card:nth-child(2) { z-index: 1; transform: scale(.95) translateY(12px); filter: brightness(.97); }
.swipe-card:nth-child(2) .info, .swipe-card:nth-child(2) .dots { visibility: hidden; }
.swipe-card:nth-child(n+3) { visibility: hidden; }
.swipe-card.dragging { transition: none; cursor: grabbing; z-index: 5; }
.swipe-card.settle { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.swipe-card.fly { transition: transform .35s ease-in; z-index: 5; }
.swipe-card .photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.swipe-card .photos img:not(.on) { visibility: hidden; }
.swipe-card .dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.swipe-card .dots span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.45); }
.swipe-card .dots span.on { background: var(--white); }
.swipe-card .tap { position: absolute; top: 0; bottom: 40%; width: 45%; z-index: 2; background: none; border: 0; cursor: pointer; padding: 0; }
.swipe-card .tap.prev { left: 0; }
.swipe-card .tap.next { right: 0; }
.swipe-card .info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 80px 18px 18px; color: var(--white); background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.45) 60%, transparent); }
.swipe-card .info a { color: inherit; text-decoration: none; }
.swipe-card .name { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.swipe-card .name .i { width: 22px; height: 22px; opacity: .85; }
.swipe-card .chip { background: rgba(255,255,255,.2); color: var(--white); }
.swipe-card .quote { margin: 10px 0 0; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swipe-card .bio-line { margin: 8px 0 0; font-size: 14px; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stamp { position: absolute; top: 40px; z-index: 4; padding: 4px 14px; border: 4px solid; border-radius: 12px; font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: .04em; opacity: 0; pointer-events: none; }
.stamp.like { left: 18px; color: var(--acid); border-color: var(--acid); transform: rotate(-14deg); }
.stamp.nope { right: 18px; color: var(--white); border-color: var(--white); transform: rotate(14deg); }
.deck-actions { display: flex; justify-content: center; align-items: center; gap: 20px; }
.deck-actions form { display: contents; }
.round { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .1s, box-shadow .1s; color: var(--ink); padding: 0; }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.round .i { width: 28px; height: 28px; }
.round.small { width: 48px; height: 48px; }
.round.small .i { width: 22px; height: 22px; }
.round.like { width: 70px; height: 70px; background: var(--acid); }
.round.like .i { width: 32px; height: 32px; fill: var(--like); stroke: var(--ink); }
.round[disabled] { opacity: .3; cursor: default; box-shadow: 0 4px 0 var(--ink); transform: none; }
.deck-end { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 20px; border-radius: var(--r-photo); background: var(--acid) url("../images/squiggles.svg") center/cover; border: 2px solid var(--ink); }
.deck-end .box { background: var(--white); border-radius: var(--r-l); padding: 22px; box-shadow: var(--shadow); }
.deck-end img { width: 80px; margin: 0 auto 10px; }
.deck-end h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; }

/* --- Анкета ------------------------------------------------------------------ */
.carousel { position: relative; }
.carousel .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-photo); }
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .slide { flex: 0 0 100%; scroll-snap-align: center; }
.carousel .slide img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--teal); }
.carousel .dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; pointer-events: none; }
.carousel .dots span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.5); }
.carousel .dots span.on { background: var(--white); }
.photo-empty { width: 100%; aspect-ratio: 3 / 4; border-radius: var(--r-photo); background: var(--teal); display: grid; place-items: center; font-family: var(--font-display); font-size: 64px; font-weight: 800; }
.profile-head { margin: 16px 0 10px; }
.profile-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; margin: 0 0 8px; }
.bio { font-size: 16px; margin: 12px 0 0; }
.actionbar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 20; display: flex; gap: 8px; align-items: center; margin: 18px 0; padding: 8px; border-radius: 999px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: var(--shadow-lift); }
.actionbar form { display: contents; }
.actionbar .btn { flex: 1; min-height: 48px; padding: 8px 14px; }
.actionbar .round { box-shadow: none; width: 48px; height: 48px; }
.actionbar .round .i { width: 22px; height: 22px; }
.actionbar .round.liked { background: var(--acid); }
.actionbar .round.liked .i { fill: var(--like); }

/* Листы снизу на <details>: работают без JS, JS закрывает по клику мимо и Esc */
.sheet > summary { list-style: none; cursor: pointer; }
.sheet > summary::-webkit-details-marker { display: none; }
.sheet[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 80; background: rgba(17,17,17,.4); cursor: default; }
.sheet-body { position: fixed; z-index: 81; left: 50%; bottom: 0; transform: translateX(-50%); width: min(var(--col), 100%); max-height: calc(var(--app-h) * .85); overflow-y: auto; background: var(--white); border-radius: var(--r-l) var(--r-l) 0 0; padding: 10px 18px calc(18px + var(--safe-b)); animation: sheet-in .22s ease both; text-align: left; color: var(--ink); font-size: 16px; }
.sheet-body::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 14px; }
.sheet-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
@keyframes sheet-in { from { transform: translate(-50%, 30%); opacity: 0; } }
.sheet-actions { list-style: none; margin: 0; padding: 0; }
.sheet-actions li + li { border-top: 1px solid var(--line); }
.sheet-actions form { margin: 0; }
.sheet-actions button, .sheet-actions a, .sheet-actions summary { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 4px; border: 0; background: none; font: 600 16px var(--font-ui); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.sheet-actions .danger { color: var(--danger); }
.sheet-actions details[open] > summary { color: var(--muted); }
.sheet-form { padding: 6px 0 12px; }

/* --- Отзывы: лента комментариев ---------------------------------------------- */
.reviews-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.reviews-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 0; }
.reviews { display: grid; gap: 10px; }
.review { background: var(--white); border-radius: var(--r-l); padding: 14px 16px; }
.review header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.review header .grow { flex: 1; min-width: 0; }
.review .author { font-weight: 800; text-decoration: none; display: block; }
.review .meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.review .body { margin: 0; }
.reply { margin: 12px 0 0 14px; padding: 10px 14px; background: var(--bg); border-radius: var(--r-m); }
.reply .who { font-weight: 800; font-size: 13px; margin-bottom: 2px; }
.reply p { margin: 0; }
.review footer { display: flex; gap: 4px; align-items: center; margin-top: 8px; }
.reply-form textarea { min-height: 84px; }
.reply-box > summary { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; cursor: pointer; list-style: none; }
.reply-box > summary::-webkit-details-marker { display: none; }

/* --- Фото-слоты ---------------------------------------------------------------- */
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-m); overflow: hidden; background: var(--white); }
.slot:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot.empty-slot { display: grid; place-items: center; border: 2px dashed #9BC9B0; background: rgba(255,255,255,.55); color: var(--muted); cursor: pointer; transition: background .15s, border-color .15s; }
.slot.empty-slot:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.slot.empty-slot .plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--acid); color: var(--ink); border: 2px solid var(--ink); }
.slot.empty-slot input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.slot.empty-slot:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.slot .main-tag { position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--acid); font-size: 12px; font-weight: 800; pointer-events: none; }
.slot > .sheet > summary { position: absolute; inset: 0; }
.slot > .sheet > summary img { width: 100%; height: 100%; object-fit: cover; }
.slot.busy::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55); }
.slot.busy::before { content: ""; position: absolute; z-index: 2; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border: 4px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.slot .slot-error { position: absolute; z-index: 3; left: 6px; right: 6px; bottom: 6px; padding: 4px 8px; border-radius: 10px; background: var(--danger); color: var(--white); font-size: 12px; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }
.js .nojs-only { display: none; }

/* --- Шаги регистрации --------------------------------------------------------- */
.steps { display: flex; gap: 6px; margin: 4px 0 20px; }
.steps span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.steps span.on { background: var(--ink); }
.js .step:not(.active) { display: none; }
.step-title { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; }
.step-sub { color: var(--muted); margin: 0 0 20px; }
.step-nav { display: flex; gap: 10px; margin-top: 8px; }
.step-nav .btn { flex: 1; }
.nojs .step-nav .js-only, .step-nav .js-only { display: none; }
.js .step-nav .js-only { display: inline-flex; }
.js .step-submit-nojs { display: none; }

/* --- Переписка --------------------------------------------------------------------- */
.chat-main { display: flex; flex-direction: column; padding-bottom: 0; }
.messages { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.msg { max-width: 80%; padding: 9px 14px; border-radius: 20px 20px 20px 6px; background: var(--white); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: var(--teal-soft); border-radius: 20px 20px 6px 20px; }
.msg .t { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); margin-top: 2px; }
.msg .sheet > summary { font-size: 11px; color: var(--muted); text-decoration: underline; min-height: 0; }
.composer { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); background: var(--bg); padding: 10px 16px 12px; margin: 0 -16px; border-top: 1px solid var(--line); }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 48px; height: 48px; max-height: 140px; resize: none; border-radius: 24px; padding: 12px 18px; }
.composer .round { width: 48px; height: 48px; box-shadow: none; background: var(--ink); color: var(--white); flex: none; }
.composer .round .i { width: 22px; height: 22px; }

/* --- Модерация --------------------------------------------------------------------- */
.mod-item { background: var(--white); border-radius: var(--r-m); padding: 14px; }
.mod-item + .mod-item { margin-top: 10px; }
.mod-item blockquote { margin: 8px 0; padding: 10px 12px; background: var(--bg); border-radius: var(--r-s); white-space: pre-wrap; overflow-wrap: anywhere; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mod-actions form { display: grid; gap: 8px; width: 100%; }
.log { font-size: 14px; }
.log li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }

/* --- Документы --------------------------------------------------------------------- */
.legal h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.legal h2 { font-size: 18px; margin-top: 1.6em; }
.legal li { margin-bottom: .4em; }

/* --- Празднование: мэтч и открытие слепых отзывов -------------------------------------- */
.celebrate-pop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(17,17,17,.45); padding: 16px; }
.celebrate-pop .box { position: relative; background: var(--acid) url("../images/squiggles.svg") center/cover; border: 2px solid var(--ink); border-radius: 36px; padding: 36px 22px 22px; max-width: 360px; width: 100%; text-align: center; overflow: hidden; animation: pop-box .35s cubic-bezier(.2,1.4,.4,1) both; }
.celebrate-pop .box .hero { width: 96px; margin: -6px auto 8px; animation: pop .7s cubic-bezier(.2,1.6,.4,1) both; }
.celebrate-pop .box .bolt { position: absolute; width: 40px; top: 20px; animation: pop .7s .1s cubic-bezier(.2,1.6,.4,1) both; }
.celebrate-pop .box .bolt.l { left: 24px; rotate: -18deg; }
.celebrate-pop .box .bolt.r { right: 24px; rotate: 18deg; }
.celebrate-pop h2 { font-family: var(--font-display); font-weight: 900; font-size: 28px; letter-spacing: -.02em; }
.celebrate-pop .box > p { background: var(--white); border-radius: var(--r-m); padding: 10px 12px; font-weight: 600; }
.celebrate-pop .actions { display: grid; gap: 8px; }
@keyframes pop { from { transform: scale(0) rotate(-40deg); } }
@keyframes pop-box { from { transform: scale(.85); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.menu-list summary { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 18px; cursor: pointer; font-weight: 600; list-style: none; }
.menu-list summary::-webkit-details-marker { display: none; }
.menu-list summary:hover { background: var(--bg); }
.menu-list summary.danger { color: var(--danger); }
.step-nav [aria-disabled="true"] { opacity: .4; pointer-events: none; }
.topbar a.row { text-decoration: none; gap: 10px; flex-wrap: nowrap; min-width: 0; }
.auth-hero { position: relative; margin: 8px 0 22px; padding: 26px 20px; border-radius: var(--r-l); background: var(--acid) url("../images/squiggles.svg") center/cover; border: 2px solid var(--ink); overflow: hidden; }
.auth-hero h1 { font-family: var(--font-display); font-weight: 900; font-size: 28px; letter-spacing: -.03em; margin: 0; position: relative; }
.auth-hero p { margin: 6px 0 0; font-weight: 600; position: relative; }
.auth-hero img { position: absolute; right: -8px; top: -10px; width: 96px; }
.review footer .link, .msg .sheet > summary { font-size: 12px; color: var(--muted); min-height: 32px; }
.review footer { gap: 14px; }
.actionbar .btn { white-space: nowrap; font-size: 15px; }
/* Сегментированный выбор (пол, кого показывать) */
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--white); border: 2px solid var(--ink); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 40px; padding: 0 8px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; text-align: center; }
.seg input:checked + span { background: var(--acid); }
.seg input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 1px; }
.range-row { display: flex; gap: 10px; align-items: center; }
.range-row input { text-align: center; }
/* Карта выбора точки */
.place-main { padding: 0; display: flex; flex-direction: column; }
.map { flex: 1; min-height: calc(var(--app-h) * .6); background: var(--teal-soft); }
.place-panel { padding: 14px 16px calc(16px + var(--safe-b)); background: var(--white); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.place-panel .row { flex-wrap: nowrap; }
.place-panel .btn { flex: 1; }
.pin-marker { width: 44px; height: 44px; margin: -40px 0 0 -22px; background: url("../images/star.svg") center/contain no-repeat; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.leaflet-container { font: inherit; }
.chip-dist .i { width: 15px; height: 15px; }
.tick { display: inline-flex; color: var(--muted); }
.tick .i { width: 16px; height: 16px; }
.tick.read { color: #11A57D; }
.typing { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-style: italic; }
.typing::after { content: ""; display: inline-block; width: 1em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.topbar:has(details[open]), .actionbar:has(details[open]), .slot:has(details[open]), .msg:has(details[open]), .review:has(details[open]), .menu-list li:has(details[open]) { z-index: 85; position: relative; }
.topbar:has(details[open]) { position: sticky; }
/* Тосты сверху, под шапкой: внизу они перекрывали кнопки ленты и панель действий */
.toasts { bottom: auto; top: calc(var(--top-h) + 10px); }
.no-nav .toasts { bottom: auto; top: calc(var(--top-h) + 10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); visibility: hidden; } }

/* --- Статистика ------------------------------------------------------------- */
.stat-note { margin: 4px 4px 12px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-l); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-wide { grid-column: 1 / -1; }
.stat-acid { background: var(--acid); }
.stat-lilac { background: var(--lilac); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.stat-label .i { width: 16px; height: 16px; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.05; letter-spacing: -.03em; }
.stat-num-s { font-size: 22px; line-height: 1.2; padding: 8px 0 4px; }
.stat-dim { color: var(--muted); }
.stat-of { font-size: 20px; color: var(--muted); }
.stat-sub { font-size: 13px; color: var(--muted); line-height: 1.3; }
.stat-acid .stat-sub, .stat-lilac .stat-sub { color: rgba(17,17,17,.7); }
.stat-delta, .stat-badge { font-family: var(--font-display); font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--white); }
.stat-delta.down { background: rgba(17,17,17,.15); color: var(--ink); }
.stat-badge { background: var(--white); color: var(--ink); border: 2px solid var(--ink); }
.spark { width: 100%; height: 64px; margin-top: 6px; overflow: visible; }
.spark-area { fill: rgba(17,17,17,.12); }
.spark-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.stat-foot { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: rgba(17,17,17,.6); }
.stat-row { display: flex; align-items: center; gap: 18px; }
.stars-bars { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 4px; min-width: 0; }
.stars-bars li { display: grid; grid-template-columns: 12px 1fr 22px; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.stars-bars svg { width: 100%; height: 8px; display: block; }
.stars-bars .bar-bg { fill: rgba(255,255,255,.55); }
.stars-bars .bar { fill: var(--ink); }
.stars-bars .cnt { text-align: right; }
a.chip { text-decoration: none; color: inherit; }
.profile-head a.chip-like { border: 1.5px solid var(--line); }

/* --- Цвет анкеты и «новенький» ----------------------------------------------- */
.acc-acid { --acc: var(--acid); }
.acc-lilac { --acc: var(--lilac); }
.acc-pink { --acc: #FF8FB8; }
.acc-orange { --acc: #FFA24C; }
.acc-sky { --acc: #7CCBFF; }
.acc-teal { --acc: var(--teal); }
.swipe-card.acc { background: var(--acc); }
.swipe-card.acc::after { content: ""; position: absolute; inset: 0; z-index: 4; border: 6px solid var(--acc); border-radius: inherit; pointer-events: none; }
.carousel.acc .track { box-shadow: 0 0 0 6px var(--acc); }
.carousel.acc .slide img, .photo-empty { background: var(--acc, var(--teal)); }
.profile-head.acc .name-hl { background: linear-gradient(transparent 58%, var(--acc) 58%, var(--acc) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.profile-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-new { background: var(--ink); color: var(--acid); font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .02em; padding: 4px 9px; }
.swipe-card .chip-new { background: var(--acid); color: var(--ink); }
.profile-head .chip-new { font-size: 11px; vertical-align: middle; }

.swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 40px)); justify-content: space-between; gap: 6px; padding: 6px 4px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch > span { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--acc); border: 2px solid var(--ink); cursor: pointer; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.swatch input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 4px; }
.sw-none > span { background: var(--white) linear-gradient(135deg, transparent 46%, var(--ink) 46%, var(--ink) 54%, transparent 54%); }
.sw-acid { --acc: var(--acid); } .sw-lilac { --acc: var(--lilac); } .sw-pink { --acc: #FF8FB8; }
.sw-orange { --acc: #FFA24C; } .sw-sky { --acc: #7CCBFF; } .sw-teal { --acc: var(--teal); }

/* --- Ивенты ----------------------------------------------------------------- */
.event-list { display: grid; gap: 12px; }
.event-card { display: block; text-decoration: none; color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-l); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px; position: relative; overflow: hidden; transition: transform .1s, box-shadow .1s; }
.event-card.acc { box-shadow: 4px 4px 0 var(--ink), inset 6px 0 0 var(--acc); padding-left: 20px; }
.event-card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.event-card.is-off { opacity: .6; }
.event-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.event-when { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.event-when .i { width: 16px; height: 16px; }
.event-tag { font-family: var(--font-display); font-weight: 700; font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--acid); white-space: nowrap; }
.event-tag.go { background: var(--ink); color: var(--acid); }
.event-tag.wait { background: var(--lilac-soft); }
.event-tag.off { background: var(--bg); color: var(--muted); }
.event-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 6px; overflow-wrap: anywhere; }
.event-place { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; min-width: 0; }
.event-place .i { width: 16px; height: 16px; flex: none; }
.event-place > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-author { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 700; }
.event-hint { margin: 4px 4px 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.event-hero { background: var(--acc, var(--acid)); border: 2px solid var(--ink); border-radius: var(--r-l); box-shadow: 4px 4px 0 var(--ink); padding: 18px; margin: 4px 0 12px; }
.event-title-l { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 8px; overflow-wrap: anywhere; }
.event-hero .event-place > span:first-of-type { white-space: normal; }
.event-body { margin: 12px 0 0; }
.event-spots { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-weight: 700; }
.event-spots .spot { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed var(--ink); }
.event-spots .spot.taken { background: var(--ink); border-style: solid; }
.event-spots .small { margin-left: 4px; }
.event-host { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: var(--r-m); padding: 12px 14px; text-decoration: none; margin-bottom: 8px; }
.event-host .grow { flex: 1; line-height: 1.3; }
.join-actions { gap: 8px; }
.join-actions form { margin: 0; }
.round.small.yes { background: var(--acid); }
.round:disabled { opacity: .4; cursor: not-allowed; }
.join-state { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.join-state form { margin: 0; }
.danger-zone { margin-top: 20px; }
.danger-zone summary { list-style: none; display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone form { margin-top: 8px; }
