/* Компания — веб-клиент. Палитра, шрифты и кнопки — те же, что на lifekeeper24.ru
 * (site/index.html, «Snow palette»): ночная синева, лёд и ледниковый акцент,
 * заголовки Russo One капсом, текст Inter. Шрифты и картинки берутся с того же
 * бэкенда по /assets/*, поэтому на поддомене пути абсолютные. */

@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Russo One';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/russo-one-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Russo One';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/russo-one-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Russo One';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/russo-one-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF}

:root {
  color-scheme: dark;
  /* ---- палитра сайта ---- */
  --midnight: #0B1826;
  --midnight-2: #102336;
  --midnight-3: #15304A;
  --ice: #CFE9FA;
  --ice-bright: #E8F6FF;
  --on-ice: #0B2333;
  --glacier: #7FD0FF;
  --sunset: #FF8A3D;
  --alarm: #FF5A47;
  --text: #F4F9FD;
  --muted: #A8BCCB;
  --faint: #7D93A5;
  /* ---- роли ---- */
  --bg: var(--midnight);
  --bg-2: #0E1F31;
  --card: var(--midnight-2);
  --card-2: var(--midnight-3);
  --line: rgba(207, 233, 250, .12);
  --line-2: rgba(207, 233, 250, .24);
  --like: var(--ice);
  --on-like: var(--on-ice);
  --nope: var(--alarm);
  --super: var(--sunset);
  --on-super: #2A1200;
  --r: 20px;
  --head: 'Russo One', Impact, 'Arial Black', sans-serif;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  /* buddy.js ставит inline font-family:var(--font) у возраста в анкете */
  --display: var(--head);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
::selection { background: var(--glacier); color: var(--on-ice); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--glacier); }
:focus-visible { outline: 3px solid var(--glacier); outline-offset: 2px; border-radius: 8px; }
img { display: block; max-width: 100%; }
.noscript { padding: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Логотип (как в шапке сайта) ──────────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.logo-badge { width: 38px; height: 38px; border-radius: 11px; flex: none; background: var(--ice); color: var(--on-ice); display: grid; place-items: center; }
.logo-badge svg { width: 20px; height: 20px; }
.logo-txt { font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; font-size: 17px; line-height: 1.05; white-space: nowrap; }
.logo-txt b { color: var(--glacier); font-weight: 400; }
.logo-txt small { display: block; font-family: var(--font); text-transform: none; letter-spacing: .02em; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.logo.compact .logo-badge { width: 32px; height: 32px; border-radius: 10px; }
.logo.compact .logo-badge svg { width: 17px; height: 17px; }
.logo.compact .logo-txt { font-size: 15px; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.app { height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
.side { display: none; }
.main { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.screen { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 24px; }
.screen.feed { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 8px; }

.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); background: rgba(9, 20, 33, .97);
  padding-bottom: var(--safe-b);
}
.tab {
  background: none; border: 0; padding: 9px 4px 10px; min-height: 56px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11.5px; font-weight: 600; position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--glacier); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--glacier); }
.tab .dot { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--sunset); color: var(--on-super); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

@media (min-width: 900px) {
  .app { grid-template-columns: 340px 1fr; grid-template-rows: 1fr; }
  .tabs { display: none; }
  .side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg-2); }
  .side-brand { padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
  .side-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .side-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .side-nav button { background: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 4px; min-height: 40px;
    color: var(--muted); font-weight: 600; font-size: 12.5px; transition: border-color .2s, color .2s, background .2s; }
  .side-nav button:hover { color: var(--text); border-color: var(--line-2); }
  .side-nav button[aria-current="page"] { color: var(--on-ice); border-color: transparent; background: var(--ice); }
  .side-body { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
  .screen { padding: 28px 36px 36px; }
  .screen > .wrap { max-width: 660px; margin: 0 auto; }
  .screen.feed > .topbar { display: none; }
  .screen.feed > .modebar { width: 100%; max-width: 660px; margin-left: auto; margin-right: auto; padding: 0; }
}

/* ── Типографика и элементы ───────────────────────────────────────────── */
h1, h2, h3 { margin: 0; font-weight: 400; }
.h1, .display { font-family: var(--head); text-transform: uppercase; letter-spacing: .01em; line-height: 1.08; font-size: 26px; text-wrap: balance; }
.h2 { font: 700 18px/1.3 var(--font); }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--glacier); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 14px; border: 2px solid var(--line-2);
  background: transparent; color: var(--text); text-decoration: none;
  font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: 14px;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn:hover { border-color: var(--glacier); color: var(--glacier); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ice); color: var(--on-ice); border-color: transparent; }
.btn.primary:hover { background: var(--ice-bright); color: var(--on-ice); }
.btn.primary:active { background: #B8DDF4; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 12px; border-radius: 11px; border-width: 1px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  display: inline-grid; place-items: center; color: var(--text); transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--line-2); color: var(--glacier); }
.icon-btn svg { width: 20px; height: 20px; }

.field { display: block; }
.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(7, 17, 28, .55); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--glacier); box-shadow: 0 0 0 3px rgba(127, 208, 255, .18); }
textarea.input { min-height: 96px; resize: vertical; }
select.input option { background: var(--midnight-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 14px; min-height: 36px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
button.chip:hover { color: var(--text); border-color: var(--glacier); }
button.chip[aria-pressed="true"] { color: var(--on-ice); background: var(--ice); border-color: transparent; }
.chip.soon { opacity: .5; cursor: not-allowed; border-style: dashed; }

.card-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.sep { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* ── Шапка ленты: режим и поездки ─────────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.brand { font-family: var(--head); text-transform: uppercase; font-size: 20px; }
.modebar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.modebar::-webkit-scrollbar { display: none; }
.trip-chip { display: inline-flex; gap: 6px; align-items: center; }
.trip-chip b { font-weight: 700; }
.trip-chip .n { color: inherit; opacity: .7; font-weight: 600; }

/* ── Колода анкет ─────────────────────────────────────────────────────── */
.deck { position: relative; flex: 1; min-height: 380px; max-width: 440px; width: 100%; margin: 0 auto; }
.pcard {
  position: absolute; inset: 0; border-radius: 24px; overflow: hidden; background: var(--card-2);
  border: 1px solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none;
  will-change: transform; box-shadow: 0 30px 70px rgba(3, 10, 18, .55);
}
.pcard.under { transform: scale(.955) translateY(12px); filter: brightness(.6); transition: transform .25s, filter .25s; }
.pcard img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pcard .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-size: 72px; color: var(--faint);
  background: radial-gradient(120% 80% at 50% 0%, var(--midnight-3), var(--midnight-2)); }
.pcard .bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.pcard .bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(244, 249, 253, .3); }
.pcard .bars i.on { background: #fff; }
.pcard .scrim { position: absolute; inset: auto 0 0 0; height: 64%; background: linear-gradient(to top, rgba(7, 17, 28, .97) 6%, rgba(7, 17, 28, .6) 52%, transparent); pointer-events: none; }
.pcard .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 20px; z-index: 2; }
.pcard .name { font-family: var(--head); text-transform: uppercase; font-size: 28px; line-height: 1.08; letter-spacing: .01em; }
.pcard .name small { font-family: var(--font); text-transform: none; font-weight: 400; font-size: 24px; margin-left: 6px; color: #D4E3EE; }
.pcard .meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pcard .meta .chip { background: rgba(11, 24, 38, .6); border-color: rgba(207, 233, 250, .2); color: #E3EEF6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 5px 11px; min-height: 0; }
.pcard .meta .chip.trip { border-color: var(--glacier); color: var(--glacier); }
.pcard .about { margin-top: 10px; padding-right: 52px; color: #D4E3EE; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .more { position: absolute; right: 14px; bottom: 22px; z-index: 3; }
.pcard .super-badge { position: absolute; top: 24px; left: 14px; z-index: 3; background: var(--super); color: var(--on-super); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 12px; }
.pcard .tap { position: absolute; top: 0; bottom: 35%; width: 50%; z-index: 1; }
.pcard .tap.l { left: 0; } .pcard .tap.r { right: 0; }
.stamp {
  position: absolute; top: 46px; z-index: 4; padding: 4px 14px; border: 4px solid; border-radius: 12px;
  font: 400 30px/1.1 var(--head); text-transform: uppercase; opacity: 0; pointer-events: none;
}
.stamp.like { left: 22px; color: var(--ice); border-color: var(--ice); transform: rotate(-14deg); }
.stamp.nope { right: 22px; color: var(--nope); border-color: var(--nope); transform: rotate(14deg); }
.stamp.super { left: 50%; top: auto; bottom: 34%; color: var(--super); border-color: var(--super); transform: translateX(-50%) rotate(-6deg); }

.actions { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px 0 4px; }
.act {
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--card);
  display: grid; place-items: center; color: var(--text); transition: transform .12s, background .2s, border-color .2s;
  box-shadow: 0 10px 24px rgba(3, 10, 18, .35);
}
.act:hover { border-color: var(--glacier); }
.act:active { transform: scale(.9); }
.act svg { width: 26px; height: 26px; }
.act.s { width: 48px; height: 48px; } .act.s svg { width: 20px; height: 20px; }
.act.l { width: 66px; height: 66px; }
.act.nope { color: var(--nope); }
.act.nope:hover { border-color: var(--nope); }
.act.super { color: var(--super); position: relative; }
.act.super:hover { border-color: var(--super); }
.act.super .count { position: absolute; right: -2px; top: -2px; background: var(--super); color: var(--on-super); font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 5px; line-height: 16px; }
.act.like { background: var(--like); color: var(--on-like); border-color: transparent; }
.act.like:hover { background: var(--ice-bright); }
.act.undo { color: var(--muted); }
.act[disabled] { opacity: .35; pointer-events: none; }

.liked-banner { margin: 0 auto 12px; max-width: 440px; width: 100%; padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(255, 138, 61, .35); background: rgba(255, 138, 61, .08); color: var(--muted); font-size: 13px; }
.liked-banner b { color: var(--sunset); }

.empty { text-align: center; margin: auto; max-width: 360px; padding: 28px 8px; }
.empty .h2 { margin-bottom: 8px; font-family: var(--head); font-weight: 400; text-transform: uppercase; font-size: 20px; letter-spacing: .01em; }
.empty .btn { margin-top: 18px; }

/* ── Карточка профиля ─────────────────────────────────────────────────── */
.sheet-bg { position: fixed; inset: 0; background: rgba(3, 10, 18, .7); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.sheet { background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 10px 20px calc(24px + var(--safe-b)); animation: up .22s ease-out; box-shadow: 0 -20px 50px rgba(3, 10, 18, .5); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
@media (min-width: 900px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; border-bottom: 1px solid var(--line); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px; }
.gallery img { width: 78%; aspect-ratio: 3/4; object-fit: cover; border-radius: 18px; scroll-snap-align: center; flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-family: var(--head); font-weight: 400; font-size: 20px; color: var(--glacier); }
.stat span { color: var(--muted); font-size: 12px; }

/* ── Мэтч ─────────────────────────────────────────────────────────────── */
.match { position: fixed; inset: 0; z-index: 50; background: radial-gradient(90% 70% at 50% 30%, rgba(21, 48, 74, .97), rgba(7, 17, 28, .98)); display: grid; place-items: center; text-align: center; padding: 24px; animation: fade .25s; }
.match .h1 { font-size: clamp(34px, 8vw, 52px); color: var(--glacier); }
.match .pair { display: flex; justify-content: center; margin: 28px 0; }
.match .pair img, .match .pair .ph { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ice); background: var(--card-2); box-shadow: 0 20px 40px rgba(3, 10, 18, .5); }
.match .pair > :last-child { margin-left: -18px; }
.match .btns { display: grid; gap: 10px; width: min(340px, 100%); margin: 0 auto; }

/* ── Списки: мэтчи, курорты ───────────────────────────────────────────── */
.new-matches { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.nm { background: none; border: 0; padding: 0; width: 74px; flex: none; text-align: center; color: var(--text); font-size: 12px; font-weight: 600; }
.nm .ava { width: 74px; height: 74px; border: 2px solid var(--glacier); margin-bottom: 4px; }
.ava { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--card-2); flex: none; display: grid; place-items: center; font-family: var(--head); color: var(--muted); overflow: hidden; }
.ava.sm { width: 32px; height: 32px; font-size: 12px; }
.list-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px; border-radius: 14px; border: 1px solid transparent; background: none; text-align: left; color: var(--text); transition: background .2s, border-color .2s; }
.list-item:hover { background: rgba(127, 208, 255, .06); }
.list-item[aria-current="true"] { background: var(--card); border-color: var(--line); }
.list-item .t { font-weight: 700; }
.list-item .s { color: var(--muted); font-size: 13px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--sunset); color: var(--on-super); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.section-title { margin: 22px 0 10px; font: 700 12px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--glacier); }
.resort-search { margin: 14px 0 8px; }

/* ── Чат ──────────────────────────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.chat-context { margin: 10px 16px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; background: rgba(127, 208, 255, .04); }
.chat-context b { color: var(--glacier); font-weight: 600; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--ice); color: var(--on-ice); border-color: transparent; border-radius: 18px 18px 6px 18px; }
.msg time { display: block; margin-top: 2px; font-size: 11px; color: var(--faint); }
.msg.me time { color: rgba(11, 35, 51, .6); }
.rmsg { display: flex; gap: 8px; align-items: flex-start; }
.rmsg .who { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.rmsg.me { flex-direction: row-reverse; }
.rmsg.me .msg { background: var(--ice); color: var(--on-ice); }
.plan { border: 1px solid var(--line-2); background: var(--card); border-radius: 16px; padding: 12px 14px; max-width: 92%; border-left: 3px solid var(--glacier); }
.plan .when { font-weight: 700; }
.plan .place { color: var(--muted); font-size: 13px; }
.plans { flex: none; padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.plans .plan { min-width: 240px; flex: none; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg-2); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; padding: 12px 16px; border-radius: 23px; }
.composer .send { width: 46px; height: 46px; border-radius: 50%; background: var(--ice); color: var(--on-ice); border: 0; display: grid; place-items: center; flex: none; transition: background .2s; }
.composer .send:hover { background: var(--ice-bright); }
.composer .send svg { width: 20px; height: 20px; }
.plan-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.screen.chatscreen { padding: 0; overflow: hidden; }

/* ── Анкета ───────────────────────────────────────────────────────────── */
.photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-slot { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; border: 1px dashed var(--line-2); background: rgba(7, 17, 28, .45); display: grid; place-items: center; color: var(--muted); transition: border-color .2s; }
.ph-slot:hover { border-color: var(--glacier); }
.ph-slot img { width: 100%; height: 100%; object-fit: cover; }
.ph-slot .x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(7, 17, 28, .75); color: #fff; display: grid; place-items: center; }
.ph-slot .main-tag { position: absolute; left: 6px; bottom: 6px; background: var(--ice); color: var(--on-ice); border-radius: 8px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.ph-slot button.add { position: absolute; inset: 0; background: none; border: 0; color: var(--glacier); font-size: 30px; }
.ph-slot button.mk { position: absolute; left: 6px; right: 6px; bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; background: rgba(7, 17, 28, .75); border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 600; color: #fff; }
.switch-row { display: flex; align-items: center; gap: 14px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--card-2); border: 1px solid var(--line-2); transition: background .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + i { background: var(--ice); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(22px); background: var(--on-ice); }
.switch input:focus-visible + i { outline: 3px solid var(--glacier); outline-offset: 2px; }
.notice { padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(127, 208, 255, .05); font-size: 14px; }

/* ── Вход и регистрация: первый экран в духе hero сайта ───────────────── */
.auth-screen { position: relative; height: 100%; overflow-y: auto; display: flex; flex-direction: column; isolation: isolate; }
.auth-bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth-veil { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 17, 28, .93) 0%, rgba(7, 17, 28, .78) 50%, rgba(7, 17, 28, .55) 100%),
              linear-gradient(0deg, rgba(7, 17, 28, .9) 0%, transparent 40%); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; max-width: 1160px; width: 100%; margin: 0 auto; }
.back-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 4px; transition: color .2s; }
.back-link:hover { color: var(--text); }
.auth-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: center; padding: 12px 20px 40px; max-width: 1160px; width: 100%; margin: 0 auto; }
.auth-pitch .kicker { margin-bottom: 12px; }
.auth-pitch .display { font-size: clamp(32px, 6vw, 60px); }
.auth-pitch .lead { margin: 16px 0 0; color: #D4E3EE; font-size: clamp(15px, 1.6vw, 18px); max-width: 32em; }
.auth-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.auth-points li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15px; }
.auth-points li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--glacier); }
.auth-card { background: rgba(11, 24, 38, .86); border: 1px solid var(--line-2); border-radius: 24px; padding: 26px 22px; box-shadow: 0 30px 70px rgba(3, 10, 18, .5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); width: 100%; max-width: 440px; }
.auth-card .h2 { font-family: var(--head); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; margin-bottom: 18px; }
.auth-card form > * + * { margin-top: 14px; }
.auth-card .consent a { color: var(--glacier); }
.switch-link { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 10px 0; min-height: 44px; width: 100%; }
.switch-link:hover { color: var(--text); }
@media (max-width: 899px) {
  .auth-points { display: none; }
  .auth-card { margin: 0 auto; }
}
@media (min-width: 900px) {
  .auth-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; padding: 24px 24px 64px; }
  .auth-card { justify-self: end; padding: 32px 30px; }
}
/* старый каркас экрана входа на случай кэша старого buddy.js */
.auth { max-width: 420px; margin: 0 auto; padding: 48px 20px; }
.auth .lead { margin: 12px 0 28px; color: var(--muted); font-size: 16px; }
.auth form > * + * { margin-top: 12px; }
.err { color: var(--alarm); font-size: 13px; min-height: 18px; }

.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ice); color: var(--on-ice); font-weight: 600; padding: 11px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 16px 40px rgba(3, 10, 18, .45); }
.toast.on { opacity: 1; transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
