/* =========================================================
   КАРТОМЕТР — дизайн-система
   Инструмент, который измеряет живой пульс города.
   ========================================================= */

:root {
    /* ---- поверхности ---- */
    --paper: #F7F7F4;
    --surface: #FFFFFF;
    --surface-2: #EFEFEA;
    --surface-3: #E7E6DF;
    --line: #E2E1DA;
    --line-soft: #ECEBE5;

    /* ---- текст ---- */
    --ink: #15161A;
    --ink-soft: #4A4A47;
    --muted: #8C8C86;

    /* ---- бренд / сигнал ---- */
    --flare: #FF4C29;
    --flare-hover: #FF6440;
    --flare-ink: #C23A1E;
    --flare-wash: rgba(255, 76, 41, .08);

    /* ---- смысловые цвета меток ---- */
    --mine: #FF2E63;
    --friends: #7C6FEF;
    --public: #23A870;
    --manual: #FFAB1A;
    --wave: #FF9500;

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(21,22,26,.05), 0 1px 1px rgba(21,22,26,.04);
    --shadow-md: 0 10px 30px rgba(21,22,26,.08);
    --shadow-lg: 0 24px 64px rgba(21,22,26,.16);
    --shadow-flare: 0 10px 26px rgba(255,76,41,.32);

    --ease: cubic-bezier(.4,0,.2,1);
    --ease-spring: cubic-bezier(.2,.9,.25,1.2);

    --font-display: 'Unbounded', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}
a { color: var(--flare); text-decoration: none; }
input, textarea, select, button { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--flare); color: #fff; }

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

:focus-visible { outline: 2.5px solid var(--flare); outline-offset: 2px; border-radius: 6px; }

/* ===== Тип ===== */
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.accent { color: var(--flare); }
.subtitle { color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.hint { color: var(--muted); font-size: 13.5px; }

/* ===== Flash ===== */
.flash {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 999; background: var(--ink); color: #fff;
    padding: 12px 22px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg); animation: flash-in .35s var(--ease-spring);
    max-width: calc(100vw - 40px); text-align: center;
}
@keyframes flash-in { from { opacity: 0; transform: translate(-50%,-14px); } to { opacity: 1; transform: translate(-50%,0); } }

/* ===== Кнопки ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: var(--radius-pill); font-size: 15.5px; font-weight: 600;
    border: none; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), opacity .18s var(--ease);
    letter-spacing: -0.01em; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--flare); color: #fff; box-shadow: var(--shadow-flare); }
.btn-primary:hover { background: var(--flare-hover); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn-green { background: var(--public); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.icon-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--surface);
    box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center;
    font-size: 17px; cursor: pointer; color: var(--ink); transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.92); }

/* ===== Карточки / поля ===== */
.card { background: var(--surface); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; letter-spacing: -0.005em; }
.field input, .field textarea, .field select {
    width: 100%; padding: 14px 16px; border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); font-size: 16px; background: var(--surface);
    transition: border-color .18s, box-shadow .18s; color: var(--ink);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--flare); box-shadow: 0 0 0 4px var(--flare-wash);
}
.field-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ===== Центрированные страницы (лендинг / вход / регистрация) ===== */
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 420px; padding: 36px 30px 30px; }
.auth-box.card { box-shadow: var(--shadow-md); }

.logo-circle {
    width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 20px;
    background: linear-gradient(150deg, var(--flare) 0%, #FF7A3D 100%);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    box-shadow: var(--shadow-flare); position: relative;
}
.logo-circle::after {
    content: ''; position: absolute; inset: -6px; border-radius: 26px;
    border: 1.5px solid rgba(255,76,41,.25); animation: logo-ring 2.6s var(--ease) infinite;
}
@keyframes logo-ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }

.cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.feature-list { display: flex; flex-direction: column; gap: 4px; margin-top: 32px; text-align: left; }
.feature-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line-soft); }
.feature-item:first-child { border-top: none; }
.feature-item .em { font-size: 20px; width: 30px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.feature-item b { display: block; font-size: 15px; font-weight: 600; }
.feature-item span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.switch-link { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--muted); }

/* ===== Переключатели типа/приватности/аккаунта ===== */
.visibility-toggle { display: flex; gap: 10px; }
.vis-option { flex: 1; text-align: center; padding: 14px 8px; background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--radius-md); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: all .18s var(--ease); }
.vis-option.selected { border-color: var(--flare); background: var(--flare-wash); color: var(--flare-ink); }

/* ===== Приложение / карта ===== */
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.map-wrap { flex: 1; position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; z-index: 1; background: var(--surface-3); }
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-md) !important; border-radius: var(--radius-sm) !important; overflow: hidden; }

.spot-pin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow-sm); position: relative; }
.spot-pin.is-wave::before {
    content: ''; position: absolute; inset: -9px; border-radius: 50%;
    border: 2px solid currentColor; opacity: .55; animation: pin-pulse 1.8s var(--ease) infinite;
}
@keyframes pin-pulse { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
.you-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--flare); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(255,76,41,.18); }

/* FAB стек */
.fab-column { position: absolute; bottom: calc(96px + env(safe-area-inset-bottom)); right: 18px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.big-add, .fab-main {
    width: 62px; height: 62px; border-radius: 50%; background: var(--flare); color: #fff;
    border: none; font-size: 28px; font-weight: 400; box-shadow: var(--shadow-flare);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform .2s var(--ease-spring); position: relative;
}
.big-add::before, .fab-main::before {
    content: ''; position: absolute; inset: -8px; border-radius: 50%;
    border: 1.5px solid rgba(255,76,41,.3);
}
.big-add:active, .fab-main:active { transform: scale(.9); }
.fab-mini { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: none; font-size: 19px; box-shadow: var(--shadow-md); cursor: pointer; transition: transform .15s var(--ease); }
.fab-mini:active { transform: scale(.9); }
.fab-mini.active { background: var(--manual); color: #fff; }

/* Легенда */
.legend-btn { position: absolute; top: 16px; right: 16px; z-index: 18; }
.legend-panel {
    position: absolute; top: 64px; right: 16px; z-index: 18; background: var(--surface);
    border-radius: var(--radius-md); padding: 16px 18px; display: none; flex-direction: column; gap: 11px;
    font-size: 13.5px; box-shadow: var(--shadow-lg); min-width: 190px;
}
.legend-panel.open { display: flex; animation: sheet-pop .2s var(--ease-spring); }
.legend-row { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-weight: 500; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.legend-dot.mine { background: var(--mine); }
.legend-dot.friends { background: var(--friends); }
.legend-dot.public { background: var(--public); }
.legend-dot.manual { background: var(--manual); }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* Категорийный фильтр над картой */
.category-scroller { position: absolute; top: 16px; left: 16px; right: 66px; z-index: 17; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.category-scroller::-webkit-scrollbar { display: none; }
.cat-chip { flex-shrink: 0; padding: 9px 15px; background: var(--surface); border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--ink-soft); box-shadow: var(--shadow-sm); cursor: pointer; border: 1.5px solid transparent; transition: all .15s var(--ease); }
.cat-chip.selected { background: var(--ink); color: #fff; }

.manual-mode-banner {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%) translateY(-160%);
    z-index: 30; background: var(--manual); color: #fff; font-weight: 600; font-size: 13.5px;
    padding: 12px 18px; border-radius: var(--radius-pill); display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-md); transition: transform .28s var(--ease-spring); white-space: nowrap;
}
.manual-mode-banner.open { transform: translateX(-50%) translateY(0); }
.btn-close-banner { background: rgba(255,255,255,.3); border: none; color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 12px; }

/* ===== Нижняя навигация (glass) ===== */
.bottom-nav {
    display: flex; justify-content: space-around; padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.82); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-top: 1px solid var(--line-soft); z-index: 100; position: relative;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 5px 14px; border-radius: 14px; transition: color .15s; position: relative; }
.nav-item.active { color: var(--flare); }
.nav-item .ic { font-size: 22px; transition: transform .15s var(--ease-spring); }
.nav-item.active .ic { transform: translateY(-1px); }
.nav-badge { position: absolute; top: 0; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--mine); border: 2px solid var(--surface); }

/* ===== Шторки / модалки ===== */
.sheet-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(21,22,26,.42); display: none; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.sheet-overlay.open { display: flex; animation: overlay-in .2s var(--ease); }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); position: relative; animation: sheet-up .32s var(--ease-spring); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 38px; height: 4px; background: var(--line); border-radius: 2px; margin: 0 auto 16px; }
.sheet-close { position: absolute; top: 18px; right: 18px; background: var(--surface-2); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 14px; cursor: pointer; color: var(--muted); z-index: 2; }
.sheet h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 18px; padding-right: 30px; }

.duration-toggle { display: flex; gap: 8px; flex-wrap: wrap; }
.duration-option { flex: 1; min-width: 52px; text-align: center; padding: 11px 4px; background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s var(--ease); }
.duration-option.selected { border-color: var(--flare); background: var(--flare-wash); color: var(--flare-ink); }
.one-spot-hint { background: var(--flare-wash); color: var(--flare-ink); padding: 11px 15px; border-radius: var(--radius-sm); font-size: 12.5px; margin: 10px 0; font-weight: 500; }
.mood-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-chip { padding: 9px 15px; background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--radius-pill); font-size: 13.5px; cursor: pointer; transition: all .15s var(--ease); }
.mood-chip.selected { border-color: var(--flare); background: var(--flare-wash); color: var(--flare-ink); }
.category-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.category-picker .cat-chip.selected { background: var(--flare); }

.photo-drop { padding: 20px; border: 2px dashed var(--line); border-radius: var(--radius-md); text-align: center; color: var(--muted); cursor: pointer; font-size: 14px; transition: border-color .18s; }
.photo-drop:hover { border-color: var(--flare); }

.org-search-box { position: relative; }
.org-search-results { max-height: 190px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-top: 8px; }
.org-search-results:empty { display: none; border: none; }
.org-result-row { padding: 11px 14px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.org-result-row:last-child { border-bottom: none; }
.org-result-row:hover { background: var(--surface-2); }
.org-selected-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; background: var(--flare-wash); color: var(--flare-ink); border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; margin-top: 8px; }
.org-selected-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 13px; opacity: .7; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.toggle-row .lbl { font-size: 14.5px; font-weight: 600; }
.switch { position: relative; width: 46px; height: 27px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: var(--radius-pill); transition: background .18s var(--ease); cursor: pointer; }
.switch .track::before { content: ''; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s var(--ease-spring); box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--flare); }
.switch input:checked + .track::before { transform: translateX(19px); }
.sub-field-group { margin-top: 12px; padding-left: 2px; }

.voice-row { display: flex; align-items: center; gap: 12px; }
.voice-rec-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); border: none; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .18s var(--ease); }
.voice-rec-btn.recording { background: var(--mine); color: #fff; animation: rec-pulse 1.1s ease-in-out infinite; }
@keyframes rec-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,46,99,.4); } 50% { box-shadow: 0 0 0 8px rgba(255,46,99,0); } }
.voice-status { font-size: 13.5px; color: var(--muted); }
.voice-status.ready { color: var(--public); font-weight: 600; }

/* ===== Списки / ленты / профили ===== */
.list-page { max-width: 640px; margin: 0 auto; padding: 28px 20px calc(96px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }

.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 30px 0 12px; }
.section-title:first-child { margin-top: 0; }
.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state .em { font-size: 46px; margin-bottom: 14px; display: block; }
.empty-state p { font-size: 14.5px; line-height: 1.6; }

.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--flare); overflow: hidden; flex-shrink: 0; font-family: var(--font-display); font-size: 15px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.row-card { display: flex; align-items: center; gap: 14px; padding: 13px 14px; background: var(--surface); border-radius: var(--radius-md); margin-bottom: 8px; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
a.row-card, .row-card[onclick] { cursor: pointer; }
a.row-card:hover, .row-card[onclick]:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.row-card .info { flex: 1; min-width: 0; }
.row-card .name { font-weight: 600; font-size: 15px; }
.row-card .sub { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 30px; height: 30px; font-size: 12px; margin-left: -10px; border: 2.5px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

.social-proof-banner { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 14px; margin: 14px 0; }
.social-proof-banner .txt { font-size: 13.5px; font-weight: 500; color: var(--ink-soft); flex: 1; }
.social-proof-banner .txt b { color: var(--ink); }

/* Профиль */
.profile-card { text-align: center; margin-bottom: 8px; }
.profile-avatar-lg { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px; font-size: 34px; }
.profile-name-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.verified-tick { font-size: 15px; }
.level-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; padding: 5px 13px 5px 6px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; margin-top: 10px; }
.level-badge .lv-num { background: var(--flare); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; }
.xp-bar-wrap { max-width: 220px; margin: 10px auto 0; }
.xp-bar-track { height: 6px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--flare), #FF8A50); border-radius: var(--radius-pill); transition: width .5s var(--ease-spring); }
.xp-label { font-size: 11px; color: var(--muted); margin-top: 5px; font-family: var(--font-mono); }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px,1fr)); gap: 10px; margin-top: 6px; }
.badge-item { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 6px; text-align: center; box-shadow: var(--shadow-sm); }
.badge-item .ic { font-size: 24px; }
.badge-item .nm { font-size: 10.5px; color: var(--muted); margin-top: 6px; font-weight: 600; line-height: 1.3; }

.spot-thumb-row { display: flex; align-items: center; gap: 14px; }
.spot-thumb { width: 46px; height: 46px; border-radius: var(--radius-xs); background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden; flex-shrink: 0; }
.spot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.expiry-chip { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.org-cover { height: 148px; background: linear-gradient(135deg, var(--flare), #7C6FEF); border-radius: 0 0 var(--radius-lg) var(--radius-lg); background-size: cover; background-position: center; margin: -28px -20px 0; }
.org-header-card { margin-top: -44px; padding-top: 0; }
.org-stats-row { display: flex; gap: 26px; justify-content: center; margin: 16px 0 4px; }
.org-stat { text-align: center; }
.org-stat .num { display: block; font-size: 21px; font-weight: 800; font-family: var(--font-mono); }
.org-stat .lbl { font-size: 11.5px; color: var(--muted); }

/* Друзья / поиск */
.search-box { position: relative; margin-bottom: 8px; }
.tabs-row { display: flex; gap: 8px; margin: 4px 0 4px; }
.tab-chip { padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-soft); cursor: pointer; border: none; }
.tab-chip.active { background: var(--ink); color: #fff; }

/* Настройки */
.avatar-upload-row { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.avatar-preview { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: var(--flare); background-size: cover; background-position: center; overflow: hidden; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.section-divider { height: 1px; background: var(--line); margin: 26px 0; }
.settings-subtitle { font-size: 16px; font-weight: 700; margin-bottom: 14px; font-family: var(--font-display); }
.checkbox-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; font-size: 15px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.checkbox-row:last-child { border-bottom: none; }
.checkbox-row input { width: 19px; height: 19px; accent-color: var(--flare); }

/* Чат */
.chat-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(255,255,255,.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line-soft); z-index: 10; }
.chat-head .name { font-weight: 700; font-size: 15.5px; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 74%; padding: 11px 15px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; }
.bubble.mine { align-self: flex-end; background: var(--flare); color: #fff; border-bottom-right-radius: 5px; }
.bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-soft); border-bottom-left-radius: 5px; }
.chat-input-row { display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line-soft); }
.chat-input-row input { flex: 1; padding: 12px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--line); font-size: 15px; }
.chat-input-row input:focus { outline: none; border-color: var(--flare); }
.chat-send { width: 44px; height: 44px; border-radius: 50%; background: var(--flare); color: #fff; border: none; font-size: 17px; flex-shrink: 0; cursor: pointer; }

/* ===== Адаптив ===== */
@media (max-width: 480px) {
    .auth-box { padding: 30px 22px 26px; }
}
@media (min-width: 720px) {
    .app-shell { max-width: 720px; margin: 0 auto; box-shadow: var(--shadow-lg); }
}
