/* =====================================================================
   In Dubai Services · Next-Gen AI Persona Showcase — чистый CSS (без Tailwind)
   Оглавление:
   1. Переменные и темы   2. Базовые стили и утилиты   3. Кнопки и поля
   4. Сайдбар             5. Верхняя полоса, контейнер  6. Hero
   7. Фильтры             8. Карточки моделей           9. Сценарии / Чат-зал
   10. Страница модели + чат   11. Создание персоны   12. Футер
   13. Анимации           14. Адаптив
   ===================================================================== */

/* ---------- 1. Переменные и темы ---------- */
:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --rose: #f43f5e; --rose-300: #fda4af; --rose-400: #fb7185; --rose-600: #e11d48;
  --fuchsia-600: #c026d3; --indigo-600: #4f46e5; --emerald: #34d399; --amber: #fcd34d;
  --grad: linear-gradient(90deg, #e11d48, #c026d3, #4f46e5);
  --grad-text: linear-gradient(90deg, #f43f5e, #e879f9, #818cf8);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sb-w: 56px;
}
:root[data-theme="dark"] {
  --bg: #07090e; --fg: #f1f5f9; --heading: #ffffff;
  --panel: #0f111a; --panel-soft: rgba(255,255,255,.05); --panel-hover: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.10); --border-soft: rgba(255,255,255,.05);
  --muted: #94a3b8; --text-soft: #cbd5e1;
  --sb-bg: rgba(8,10,17,.95); --input-bg: rgba(255,255,255,.05); --bubble-model: #151928;
  --console-bg: #0b0d16; --shadow: 0 20px 40px -15px rgba(0,0,0,.7);
  --select-bg: #121422;
}
:root[data-theme="light"] {
  --bg: #f8f9fc; --fg: #0f172a; --heading: #0f172a;
  --panel: #ffffff; --panel-soft: #f1f5f9; --panel-hover: #e2e8f0;
  --border: #e2e8f0; --border-soft: #eef2f7;
  --muted: #64748b; --text-soft: #334155;
  --sb-bg: rgba(255,255,255,.95); --input-bg: #f1f5f9; --bubble-model: #f1f5f9;
  --console-bg: #ffffff; --shadow: 0 10px 25px -12px rgba(100,116,139,.35);
  --select-bg: #ffffff;
}

/* ---------- 2. Базовые стили и утилиты ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); background: var(--bg); color: var(--fg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
::selection { background: var(--rose); color: #fff; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.25); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(244,63,94,.5); }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-xxs { width: 12px; height: 12px; } .icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; } .icon-md { width: 18px; height: 18px; }
.icon-lg { width: 20px; height: 20px; } .icon-empty { width: 40px; height: 40px; color: #64748b; margin: 0 auto 12px; }
.fill { fill: currentColor; }
.text-rose { color: var(--rose-400); }
.text-gradient { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: #64748b; } .muted-2 { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: 12px; }
.scroll-mt { scroll-margin-top: 32px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-online { background: var(--emerald); }
.dot-online.glow { box-shadow: 0 0 6px rgba(52,211,153,.8); }
.dot-corner { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; box-shadow: 0 0 0 2px var(--panel); }
.pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
.only-collapsed { display: block; }
.only-expanded { display: none; }
.hide-sm { display: none; } .hide-md { display: none; }

/* ---------- 3. Кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; font-weight: 500; font-size: 14px; border: 1px solid transparent; transition: all .2s; white-space: nowrap; }
.btn-lg { padding: 12px 24px; } .btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 12px; }
.btn-block { width: 100%; padding: 10px 14px; border-radius: 12px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 25px -8px rgba(225,29,72,.45); }
.btn-primary:hover { filter: brightness(1.1); } .btn-primary:active { transform: scale(.97); }
.btn-ghost { background: var(--panel-soft); border-color: var(--border); color: var(--fg); padding: 12px 20px; }
.btn-ghost:hover { background: var(--panel-hover); }
.btn-soft { background: rgba(244,63,94,.15); color: var(--rose-400); padding: 8px 16px; border-radius: 12px; font-size: 12px; font-weight: 600; margin-top: 16px; }
.btn-soft:hover { background: rgba(244,63,94,.28); }
.btn-text { color: var(--muted); padding: 10px 16px; font-size: 14px; } .btn-text:hover { color: var(--heading); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px; border-radius: 12px; color: var(--muted); transition: color .2s, background .2s; }
.icon-btn:hover { color: var(--heading); background: var(--panel-hover); }

.input { width: 100%; padding: 10px 14px; border-radius: 12px; font: inherit; font-size: 14px; background: var(--input-bg); color: var(--heading); border: 1px solid var(--border); outline: none; transition: border-color .2s, background .2s; }
.input::placeholder { color: #64748b; }
.input:focus { border-color: rgba(244,63,94,.6); }
.input-sm { padding: 8px 12px; font-size: 12px; }
textarea.input { resize: none; }
select.input option, .sort-select option { background: var(--select-bg); color: var(--heading); }
.label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.label-strong { display: block; font-size: 12px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 9999px; background: rgba(244,63,94,.2); color: var(--rose-300); border: 1px solid rgba(244,63,94,.3); font-weight: 500; }
.panel-card { background: var(--panel); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); }

/* ---------- 4. Сайдбар ---------- */
.sb-backdrop { display: none; }
.sidebar {
  position: fixed; top: 0; left: 0; z-index: 50; height: 100vh; width: var(--sb-w);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--sb-bg); border-right: 1px solid var(--border); color: var(--fg);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  transition: width .3s var(--ease), box-shadow .3s; user-select: none; overflow: hidden;
}
.sidebar.is-expanded { width: 288px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.8); }
.sidebar.is-expanded .only-expanded { display: block; }
.sidebar.is-expanded .only-collapsed { display: none; }
.sidebar.is-expanded .sb-head-actions, .sidebar.is-expanded .sb-tag { display: flex; }
.sidebar.is-expanded .nav-text { display: flex; }
.sidebar.is-expanded .btn-create span.only-expanded { display: inline; }

.sb-top { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.sb-head { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-bottom: 1px solid var(--border-soft); }
.sb-brand { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.brand-logo { width: 36px; height: 36px; border-radius: 12px; padding: 1.5px; background: linear-gradient(45deg, #e11d48, #c026d3, #4f46e5); flex-shrink: 0; box-shadow: 0 8px 18px -6px rgba(244,63,94,.35); transition: transform .2s; }
.sb-brand:hover .brand-logo { transform: scale(1.05); }
.brand-logo-inner { width: 100%; height: 100%; border-radius: 10px; background: #0c0e18; display: flex; align-items: center; justify-content: center; }
.brand-icon { width: 18px; height: 18px; color: var(--rose-400); transition: transform .3s; }
.sb-brand:hover .brand-icon { transform: rotate(12deg); }
.brand-row { display: flex; align-items: center; gap: 6px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: .06em; background: linear-gradient(90deg, #fb7185, #f0abfc, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-chip { font-size: 10px; text-transform: uppercase; font-family: ui-monospace, monospace; padding: 2px 6px; border-radius: 4px; background: rgba(244,63,94,.15); color: var(--rose-400); font-weight: 600; border: 1px solid rgba(244,63,94,.3); }
.brand-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sb-head-actions { display: none; align-items: center; gap: 4px; }
.sb-pin { display: none; }
.sb-pin .pin-on { display: none; color: var(--rose-400); }
.sb-pin .icon { width: 16px; height: 16px; }
.sidebar.is-pinned .sb-pin .pin-on { display: inline; } .sidebar.is-pinned .sb-pin .pin-off { display: none; }
.sb-close .icon { width: 20px; height: 20px; }

.sb-menu-wrap { padding: 6px; border-bottom: 1px solid var(--border-soft); }
.sb-menu-btn { width: 100%; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 12px; background: linear-gradient(180deg, rgba(244,63,94,.15), rgba(99,102,241,.10)); border: 1px solid rgba(244,63,94,.25); color: var(--rose-400); transition: all .2s; }
.sb-menu-btn:hover { background: linear-gradient(180deg, rgba(244,63,94,.25), rgba(99,102,241,.2)); }
.sb-menu-btn .icon { width: 16px; height: 16px; }
.sb-menu-label { display: none; font-size: 9px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }

.sb-nav { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.nav-item { position: relative; display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 12px; color: var(--muted); transition: all .2s; }
.nav-item:hover { color: var(--heading); background: var(--panel-soft); }
.nav-item.active { background: linear-gradient(90deg, rgba(225,29,72,.2), rgba(192,38,211,.15), transparent); color: var(--heading); font-weight: 500; border: 1px solid rgba(244,63,94,.3); box-shadow: inset 0 2px 4px rgba(0,0,0,.2); }
:root[data-theme="light"] .nav-item.active { background: #fff1f2; border-color: #fecdd3; color: #4c0519; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.nav-bar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 9999px 9999px 0; background: linear-gradient(180deg, #f43f5e, #d946ef); box-shadow: 0 0 8px rgba(244,63,94,.6); }
.nav-icon { display: flex; transition: transform .2s; color: var(--muted); }
.nav-item:hover .nav-icon { transform: scale(1.1); color: var(--rose-400); }
.nav-item.active .nav-icon { color: var(--rose-400); }
.nav-text { display: none; flex: 1; align-items: center; justify-content: space-between; text-align: left; min-width: 0; margin-left: 12px; }
.sidebar.is-expanded .nav-item { justify-content: flex-start; padding: 10px; }
.nav-text-main { display: block; min-width: 0; }
.nav-label { display: block; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sub { display: block; font-size: 11px; color: rgba(148,163,184,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; background: var(--panel-hover); color: var(--text-soft); flex-shrink: 0; }
.badge-live { background: var(--rose); color: #fff; } .badge-fav { background: #ec4899; color: #fff; }

.sb-models { padding: 12px 12px 0; }
.sidebar.is-expanded .sb-models { border-top: 1px solid var(--border-soft); margin: 12px 12px 0; padding: 12px 0 0; }
.sb-models-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; margin-bottom: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sb-models-count { display: flex; align-items: center; gap: 4px; color: var(--emerald); }
.sb-models-count .dot { width: 6px; height: 6px; }
.sb-models-list { display: flex; flex-direction: column; gap: 6px; max-height: 176px; overflow-y: auto; padding-right: 4px; }
.sb-model { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; transition: background .2s; }
.sb-model:hover { background: var(--panel-soft); }
.sb-model-avatar { position: relative; flex-shrink: 0; }
.sb-model-avatar img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); transition: box-shadow .2s; }
.sb-model:hover .sb-model-avatar img { box-shadow: 0 0 0 1px rgba(244,63,94,.5); }
.sb-model-avatar .dot-corner { width: 8px; height: 8px; right: -2px; bottom: -2px; }
.sb-model-text { min-width: 0; flex: 1; }
.sb-model-name { display: block; font-size: 12px; font-weight: 500; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.sb-model:hover .sb-model-name { color: var(--rose-400); }
.sb-model-role { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-bottom { padding: 6px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 8px; }
.btn-create { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0; border-radius: 12px; background: rgba(244,63,94,.2); color: var(--rose-400); font-weight: 500; font-size: 14px; transition: all .2s; }
.btn-create:hover { background: rgba(244,63,94,.3); }
.btn-create span { display: none; white-space: nowrap; }
.sidebar.is-expanded .btn-create { background: var(--grad); color: #fff; padding: 10px 0; box-shadow: 0 10px 22px -8px rgba(225,29,72,.5); }
.sidebar.is-expanded .btn-create:hover { filter: brightness(1.1); }
.btn-create .icon { transition: transform .3s; } .btn-create:hover .icon { transform: rotate(90deg); }
.sb-controls { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sidebar.is-expanded .sb-controls { flex-direction: row; justify-content: space-between; }
.sb-tag { display: none; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); font-family: ui-monospace, monospace; padding: 4px 8px; border-radius: 4px; background: var(--panel-soft); }
.sb-tag .icon { color: var(--emerald); }
.theme-icon-sun { color: #fbbf24; } .theme-icon-moon { color: #6366f1; }
:root[data-theme="dark"] .theme-icon-moon, :root[data-theme="light"] .theme-icon-sun { display: none; }
.sound-on { color: var(--rose-400); } .sound-off { color: #64748b; }
:root[data-sound="on"] .sound-off, :root[data-sound="off"] .sound-on { display: none; }
.icon-btn span { display: flex; }

/* ---------- 5. Верхняя полоса, контейнер ---------- */
.app-main { padding-left: var(--sb-w); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border-soft); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-label { font-size: 12px; text-transform: uppercase; font-family: ui-monospace, monospace; letter-spacing: .1em; color: var(--muted); }
.topbar-sep { color: #475569; }
.topbar-accent { display: none; font-size: 12px; color: var(--rose-400); font-weight: 500; }
.topbar-right { display: none; font-size: 12px; color: var(--muted); gap: 16px; }
.topbar-online { display: flex; align-items: center; gap: 6px; font-family: ui-monospace, monospace; }
.container { max-width: 80rem; margin: 0 auto; padding: 24px 16px; }
.section { margin-bottom: 24px; }

.page-head { margin-bottom: 24px; }
.kicker { display: flex; align-items: center; gap: 8px; color: var(--rose-400); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.page-title { font-size: 24px; font-weight: 900; color: var(--heading); }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.empty { padding: 80px 16px; text-align: center; border-radius: 24px; border: 1px dashed var(--border); }
.empty h3 { font-size: 18px; font-weight: 700; color: var(--heading); }
.empty p { font-size: 12px; color: var(--muted); margin: 4px auto 0; max-width: 24rem; }
.empty .btn-soft { display: inline-flex; }

/* ---------- 6. Hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 24px; margin-bottom: 32px; border: 1px solid var(--border); }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #121424, #0c0e18, #150f1d); }
:root[data-theme="light"] .hero-bg { background: linear-gradient(135deg, rgba(255,241,242,.8), #fff, rgba(238,242,255,.6)); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.hero-orb-1 { top: -96px; left: -80px; width: 320px; height: 320px; background: rgba(225,29,72,.25); }
.hero-orb-2 { bottom: -96px; right: -80px; width: 384px; height: 384px; background: rgba(79,70,229,.25); animation-delay: 2s; }
.hero-body { position: relative; z-index: 1; max-width: 48rem; }
.hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--rose-400); margin-bottom: 12px; letter-spacing: .03em; }
.hero-title { font-size: 30px; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.hero-title-plain { color: var(--heading); }
.hero-text { margin-top: 16px; font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 42rem; text-wrap: balance; }
.hero-cta { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-features { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; font-size: 12px; }
.feature { display: flex; align-items: center; gap: 10px; } .feature-wide { grid-column: span 2; }
.feature-icon { padding: 6px; border-radius: 8px; display: flex; }
.feature-rose { background: rgba(244,63,94,.15); color: var(--rose-400); }
.feature-fuchsia { background: rgba(217,70,239,.15); color: #e879f9; }
.feature-indigo { background: rgba(99,102,241,.15); color: #818cf8; }
.feature-title { font-weight: 600; color: var(--heading); } .feature-sub { font-size: 11px; color: var(--muted); }

/* ---------- 7. Фильтры ---------- */
.filterbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.filter-row { display: flex; flex-direction: column; gap: 12px; }
.search { position: relative; flex: 1; max-width: 28rem; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input { padding: 10px 16px 10px 40px; border-radius: 16px; font-size: 13px; }
.filter-right { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sort { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--border); }
.sort-select { background: transparent; border: 0; outline: 0; font: inherit; font-size: 12px; color: var(--text-soft); cursor: pointer; padding: 4px 8px 4px 0; }
.chips { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.chip { padding: 6px 14px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; flex-shrink: 0; background: var(--panel-soft); color: var(--text-soft); border: 1px solid var(--border-soft); transition: all .2s; }
.chip:hover { background: var(--panel-hover); color: var(--heading); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(225,29,72,.5); }
.vibes { display: flex; align-items: center; gap: 8px; overflow-x: auto; font-size: 12px; }
.vibes-label { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.vibe { padding: 4px 10px; border-radius: 8px; font-size: 11px; white-space: nowrap; color: var(--muted); border: 1px solid transparent; transition: color .2s; }
.vibe:hover { color: var(--heading); }
.vibe.active { background: rgba(244,63,94,.2); color: var(--rose-300); border-color: rgba(244,63,94,.4); font-weight: 500; }
:root[data-theme="light"] .vibe.active { color: #be123c; }

/* ---------- 8. Карточки моделей ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card { position: relative; height: 370px; border-radius: 16px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; color: #f1f5f9; background: #0d0f18; border: 1px solid var(--border); box-shadow: 0 10px 25px -8px rgba(0,0,0,.45); transition: transform .15s var(--ease), border-color .3s; will-change: transform; }
:root[data-theme="light"] .card { border-color: #e2e8f0; box-shadow: 0 6px 18px -8px rgba(100,116,139,.45); }
.card:hover { border-color: rgba(244,63,94,.5); }
.card-glare { position: absolute; inset: 0; z-index: 30; pointer-events: none; transition: opacity .3s; }
.card-aura { position: absolute; inset: -4px; z-index: 0; pointer-events: none; opacity: 0; filter: blur(24px); transition: opacity .5s; }
.card:hover .card-aura { opacity: .3; }
.card-photo { position: absolute; inset: 0; z-index: 0; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s var(--ease); }
.card:hover .card-photo img { transform: scale(1.05); }
.card-scrim { position: absolute; inset: 0; background: linear-gradient(to top, #0a0c14, rgba(10,12,20,.4), transparent); }
.card-top { position: relative; z-index: 20; padding: 12px; display: flex; align-items: center; justify-content: space-between; }
.card-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 9999px; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); font-size: 11px; font-weight: 500; color: #fff; }
.card-chip-text { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: flex; align-items: center; gap: 6px; }
.round-btn { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 8px; border-radius: 9999px; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); color: #e2e8f0; transition: all .2s; }
.round-btn:hover { background: rgba(0,0,0,.8); color: #fff; }
.js-fav:hover { color: var(--rose-400); }
.round-btn.playing, .js-fav.active { background: var(--rose); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: 0 6px 14px -4px rgba(244,63,94,.55); }
.js-fav.active .icon { fill: currentColor; transform: scale(1.1); }
.eq { display: none; align-items: flex-end; gap: 2px; height: 10px; }
.eq span { width: 2px; background: #fff; border-radius: 9999px; animation: bounce 1s infinite; }
.eq span:nth-child(1) { height: 6px; } .eq span:nth-child(2) { height: 10px; animation-delay: .15s; } .eq span:nth-child(3) { height: 4px; animation-delay: .3s; }
.round-btn.playing .eq { display: inline-flex; } .round-btn.playing .icon { animation: pulse 1s infinite; }
.heart-plus { position: absolute; top: -8px; right: -4px; font-size: 10px; font-weight: 700; color: var(--rose-400); opacity: 0; pointer-events: none; }
.heart-plus.show { opacity: 1; animation: ping 0.9s cubic-bezier(0,0,.2,1); }
.card-bottom { position: relative; z-index: 20; padding: 24px 14px 14px; background: linear-gradient(to top, #0a0c14, rgba(10,12,20,.9), transparent); display: flex; flex-direction: column; justify-content: flex-end; }
.card-namerow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card-name-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card-name { font-weight: 700; font-size: 18px; letter-spacing: .02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.card:hover .card-name { color: var(--rose-400); }
.card-score { display: flex; align-items: center; gap: 4px; font-size: 11px; font-family: ui-monospace, monospace; font-weight: 700; color: var(--amber); flex-shrink: 0; }
.card-title { font-size: 11px; font-weight: 500; color: var(--rose-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.card-tagline { font-size: 11px; font-style: italic; color: #cbd5e1; opacity: .9; line-height: 1.35; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-btns { display: flex; align-items: center; gap: 8px; }
.btn-spark { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; background: rgba(255,255,255,.1); color: #e2e8f0; border: 1px solid rgba(255,255,255,.15); flex-shrink: 0; transition: all .2s; }
.btn-spark:hover { background: rgba(255,255,255,.2); }
.btn-spark.active { background: var(--rose); color: #fff; border-color: var(--rose-400); }
.card-go { flex: 1; }
.card-go .icon { transition: transform .2s; } .card:hover .card-go .icon { transform: translateX(2px); }
.spark { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: 14px; border-radius: 0 0 16px 16px; background: rgba(13,15,26,.95); backdrop-filter: blur(24px); border-top: 1px solid rgba(244,63,94,.3); display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -20px 40px -10px rgba(0,0,0,.6); animation: slide-up .2s ease-out; cursor: default; }
.spark-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--rose-400); }
.spark-title { display: flex; align-items: center; gap: 4px; }
.spark-close { padding: 4px; border-radius: 6px; color: #94a3b8; } .spark-close:hover { color: #fff; background: rgba(255,255,255,.1); }
.spark-prompts { display: flex; flex-direction: column; gap: 4px; max-height: 128px; overflow-y: auto; }
.spark-prompt { width: 100%; text-align: left; padding: 6px; border-radius: 8px; font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 6px; background: rgba(255,255,255,.05); color: #cbd5e1; border: 1px solid transparent; transition: all .2s; }
.spark-prompt:hover { background: rgba(255,255,255,.1); }
.spark-prompt.selected { background: rgba(244,63,94,.2); color: #fecdd3; border-color: rgba(244,63,94,.4); }
.spark-prompt-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark-answer { padding: 8px; border-radius: 8px; background: rgba(0,0,0,.4); border: 1px solid rgba(244,63,94,.2); font-size: 11px; line-height: 1.35; color: #e2e8f0; }
.spark-answer-text.typing::after { content: ''; display: inline-block; width: 6px; height: 10px; background: var(--rose-400); margin-left: 2px; animation: pulse 1s infinite; vertical-align: middle; }
.spark-continue { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 600; color: var(--rose-400); } .spark-continue:hover { color: var(--rose-300); }

/* ---------- 9. Сценарии / Чат-зал ---------- */
.grid-scenarios { display: grid; grid-template-columns: 1fr; gap: 24px; }
.scenario-card { display: flex; flex-direction: column; justify-content: space-between; padding: 20px; transition: transform .3s, border-color .3s; }
.scenario-card:hover, .lounge-card:hover { transform: scale(1.02); border-color: rgba(244,63,94,.4); }
.scenario-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.scenario-emoji { font-size: 30px; }
.scenario-who { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-soft); }
.scenario-who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.scenario-title { font-size: 18px; font-weight: 700; color: var(--heading); transition: color .2s; }
.scenario-card:hover .scenario-title { color: var(--rose-400); }
.scenario-desc { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.scenario-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--rose-400); font-weight: 500; }
.slide-x { transition: transform .2s; } .scenario-card:hover .slide-x, .lounge-card:hover .slide-x { transform: translateX(4px); }
.grid-lounge { display: grid; grid-template-columns: 1fr; gap: 24px; }
.lounge-card { display: flex; align-items: center; gap: 16px; padding: 20px; transition: transform .3s, border-color .3s; }
.lounge-avatar { position: relative; flex-shrink: 0; }
.lounge-avatar img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; box-shadow: 0 0 0 2px var(--border); transition: box-shadow .2s; }
.lounge-card:hover .lounge-avatar img { box-shadow: 0 0 0 2px rgba(244,63,94,.5); }
.lounge-avatar .dot-corner { width: 14px; height: 14px; right: -4px; bottom: -4px; }
.lounge-text { flex: 1; min-width: 0; }
.lounge-text h4 { font-weight: 700; font-size: 16px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.lounge-card:hover h4 { color: var(--rose-400); }
.lounge-role { font-size: 12px; color: var(--rose-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="light"] .lounge-role { color: #e11d48; }
.lounge-tag { font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lounge-arrow { color: #64748b; flex-shrink: 0; transition: color .2s, transform .2s; } .lounge-card:hover .lounge-arrow { color: var(--rose-400); }

/* ---------- 10. Страница модели + чат ---------- */
.model-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.profile { overflow: hidden; }
.profile-photo { position: relative; height: 340px; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.profile-scrim { position: absolute; inset: 0; background: linear-gradient(to top, var(--panel), rgba(10,12,20,.25) 55%, transparent); }
.profile-photo-text { position: absolute; left: 20px; right: 20px; bottom: 16px; }
.profile-name { font-size: 28px; font-weight: 800; color: var(--heading); margin-top: 10px; }
.profile-title { font-size: 13px; color: var(--rose-300); font-weight: 500; }
:root[data-theme="light"] .profile-title { color: #e11d48; }
.profile-body { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.profile-tagline { font-style: italic; font-size: 13px; line-height: 1.6; color: var(--text-soft); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.profile-stats div { padding: 10px 4px; border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--border-soft); }
.profile-stats strong { display: block; font-family: var(--font-display); font-size: 16px; color: var(--heading); }
.profile-stats span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.profile-block h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--rose-400); margin-bottom: 6px; }
.profile-block p { font-size: 13px; line-height: 1.65; color: var(--text-soft); }
.traits { display: flex; flex-wrap: wrap; gap: 6px; }
.trait { font-size: 11px; padding: 4px 10px; border-radius: 9999px; background: var(--panel-soft); border: 1px solid var(--border); color: var(--text-soft); }
.profile-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.profile-meta span { display: flex; align-items: center; gap: 6px; }
.js-profile-voice.playing { background: var(--rose); color: #fff; }

.chat { display: flex; flex-direction: column; height: 82vh; min-height: 520px; max-height: 860px; overflow: hidden; background: var(--console-bg); }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.chat-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-avatar { position: relative; flex-shrink: 0; }
.chat-avatar img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 2px rgba(244,63,94,.4); }
.chat-avatar .dot-corner { width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--console-bg); }
.chat-name-row { display: flex; align-items: center; gap: 8px; }
.chat-name { font-size: 16px; font-weight: 700; letter-spacing: .02em; color: var(--heading); }
.chat-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.affinity { color: #fbbf24; font-family: ui-monospace, monospace; font-weight: 600; }
.chat-head-right { display: flex; align-items: center; gap: 8px; }
.scenario-banner { padding: 10px 16px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: #e2e8f0; }
.scenario-banner-text { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.scenario-banner-text strong { font-weight: 600; }
.scenario-banner-emoji { font-size: 16px; }
.session-tag { font-size: 10px; text-transform: uppercase; font-family: ui-monospace, monospace; padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,.1); color: var(--rose-300); font-weight: 700; flex-shrink: 0; }
.chat-timeline { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; max-width: 42rem; }
.msg-model { align-self: flex-start; align-items: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; align-items: flex-end; }
.msg-avatar { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); flex-shrink: 0; }
.msg-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bubble { padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.65; word-break: break-word; }
.bubble-model { background: var(--bubble-model); color: var(--fg); border: 1px solid var(--border); border-top-left-radius: 4px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.4); }
.bubble-user { background: var(--grad); color: #fff; border-top-right-radius: 4px; box-shadow: 0 8px 18px -8px rgba(225,29,72,.5); }
.voice-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; }
.voice-pill { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 9999px; font-size: 12px; font-weight: 500; background: var(--panel-hover); color: var(--text-soft); transition: all .2s; }
.voice-pill:hover { color: var(--heading); }
.voice-pill.playing { background: var(--rose); color: #fff; box-shadow: 0 6px 14px -4px rgba(244,63,94,.5); }
.msg-time { font-size: 10px; color: var(--muted); padding: 0 4px; display: block; }
.msg-time.left { text-align: left; } .msg-time.right { text-align: right; }
.typing-row { align-items: center; }
.typing-box { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-radius: 16px; border-top-left-radius: 4px; background: var(--bubble-model); border: 1px solid var(--border); font-size: 12px; }
.tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: bounce 1s infinite; }
.tdot:nth-child(2) { animation-delay: .15s; } .tdot:nth-child(3) { animation-delay: .3s; }
.typing-text { color: var(--muted); margin-left: 4px; font-family: ui-monospace, monospace; font-size: 11px; }
.quick-starters { padding: 8px 16px; border-top: 1px solid var(--border-soft); background: rgba(0,0,0,.1); display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.quick-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.quick-btn { font-size: 12px; padding: 4px 12px; border-radius: 9999px; white-space: nowrap; flex-shrink: 0; background: var(--panel-soft); color: var(--text-soft); border: 1px solid var(--border); transition: all .2s; }
.quick-btn:hover { background: rgba(244,63,94,.2); color: var(--rose-300); }
.chat-input-bar { padding: 12px; border-top: 1px solid var(--border); background: rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.chat-form { display: flex; align-items: center; gap: 8px; }
.chat-input { flex: 1; padding: 12px 16px; border-radius: 16px; }
.send-btn { padding: 12px; border-radius: 16px; background: var(--grad); color: #fff; display: flex; box-shadow: 0 8px 18px -6px rgba(225,29,72,.5); transition: all .2s; }
.send-btn:hover:not(:disabled) { filter: brightness(1.1); } .send-btn:active:not(:disabled) { transform: scale(.95); }
.send-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 11. Создание персоны ---------- */
.create-wrap { max-width: 42rem; margin: 0 auto; }
.create-card { padding: 24px; }
.create-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.create-badge { padding: 10px; border-radius: 12px; background: linear-gradient(45deg, #e11d48, #4f46e5); color: #fff; display: flex; box-shadow: 0 8px 18px -6px rgba(244,63,94,.4); }
.create-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--heading); }
.alert { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: rgba(244,63,94,.15); border: 1px solid rgba(244,63,94,.4); color: var(--rose-300); font-size: 13px; }
.create-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.archetype-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.archetype-opt { cursor: pointer; }
.archetype-opt input { position: absolute; opacity: 0; pointer-events: none; }
.archetype-face { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; font-size: 12px; background: var(--panel-soft); border: 1px solid var(--border); color: var(--muted); transition: all .2s; }
.archetype-face .dot { width: 10px; height: 10px; }
.archetype-opt:hover .archetype-face { background: var(--panel-hover); }
.archetype-opt input:checked + .archetype-face { background: rgba(244,63,94,.2); border-color: var(--rose); color: var(--heading); font-weight: 500; }
.archetype-opt input:focus-visible + .archetype-face { outline: 2px solid var(--rose-400); outline-offset: 2px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-sep { padding-top: 4px; border-top: 1px solid var(--border-soft); }
.form-actions { padding-top: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--border); }

/* ---------- 12. Футер ---------- */
.site-footer { border-top: 1px solid var(--border-soft); margin-top: 24px; }
.footer-inner { max-width: 80rem; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-note { font-size: 12px; color: var(--muted); margin-left: 6px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; color: var(--muted); }
.footer-nav a:hover { color: var(--rose-400); }

/* ---------- 13. Анимации ---------- */
@keyframes pulse { 50% { opacity: .5; } }
@keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8,0,1,1); } 50% { transform: none; animation-timing-function: cubic-bezier(0,0,.2,1); } }
@keyframes ping { 75%, 100% { transform: scale(1.8) translateY(-4px); opacity: 0; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes subtle-breath { 0%, 100% { opacity: .6; transform: scale(1); } 50% { opacity: .85; transform: scale(1.02); } }
.breath { animation: subtle-breath 5s ease-in-out infinite; }

/* ---------- 14. Адаптив ---------- */
@media (min-width: 640px) {
  :root { --sb-w: 64px; }
  .sb-head { height: 80px; padding: 0 14px; }
  .brand-logo { width: 40px; height: 40px; } .brand-icon { width: 20px; height: 20px; }
  .sb-menu-label { display: block; }
  .sb-nav { padding: 10px; } .nav-item { padding: 10px; }
  .sb-bottom { padding: 10px; }
  .topbar { padding: 20px 24px; }
  .container { padding: 32px 24px; }
  .hide-sm { display: inline-flex; }
  .card { height: 395px; }
  .hero { padding: 40px; }
  .hero-title { font-size: 36px; } .hero-text { font-size: 16px; }
  .hero-features { grid-template-columns: repeat(3, 1fr); } .feature-wide { grid-column: span 1; }
  .filter-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .filter-right { justify-content: flex-end; }
  .page-title { font-size: 30px; } .page-sub { font-size: 14px; }
  .grid-lounge { grid-template-columns: repeat(2, 1fr); }
  .create-card { padding: 32px; } .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .archetype-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { padding: 24px; flex-direction: row; align-items: center; justify-content: space-between; }
  .chat-head, .scenario-banner, .chat-timeline, .quick-starters { padding-left: 24px; padding-right: 24px; }
  .chat-input-bar { padding: 16px; }
  .sb-pin { display: inline-flex; }
}
@media (min-width: 768px) {
  :root { --sb-w: 80px; }
  .app-main { padding-left: 96px; }
  .container { padding: 32px; }
  .topbar { padding: 20px 32px; }
  .topbar-right { display: flex; } .topbar-accent { display: inline; }
  .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .grid-scenarios { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 48px; } .hero-title { font-size: 48px; }
  .hide-md { display: flex; }
  .sb-pin { display: inline-flex; } .sb-close { display: none; }
  .footer-inner { padding: 24px 32px; }
}
@media (max-width: 767px) {
  .sb-backdrop.show { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.75); backdrop-filter: blur(6px); }
  .sidebar.is-expanded .sb-pin { display: none; }
}
@media (min-width: 1024px) {
  .grid-cards { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .grid-scenarios, .grid-lounge { grid-template-columns: repeat(3, 1fr); }
  .model-layout { grid-template-columns: 360px minmax(0, 1fr); }
  .profile { position: sticky; top: 16px; }
}
@media (min-width: 1280px) {
  .grid-cards { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Мелочи */
.field { min-width: 0; }

/* ---------- 12. Светлая тема: контраст и тонкая настройка ---------- */
:root[data-theme="light"] {
  --rose-300: #e11d48; --rose-400: #e11d48;      /* светлые розовые на белом почти не читаются */
  --emerald: #059669;
}
:root[data-theme="light"] .pill { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
:root[data-theme="light"] .brand-chip { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
:root[data-theme="light"] .btn-soft { background: #fff1f2; color: #be123c; }
:root[data-theme="light"] .btn-soft:hover { background: #ffe4e6; }
:root[data-theme="light"] .alert { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
:root[data-theme="light"] .quick-btn:hover { background: #fff1f2; color: #be123c; }
:root[data-theme="light"] .quick-starters { background: #f8fafc; }
:root[data-theme="light"] .chat-input-bar { background: #f8fafc; }
:root[data-theme="light"] .bubble-model { box-shadow: 0 2px 8px -4px rgba(100,116,139,.35); }
:root[data-theme="light"] .nav-badge { background: #e2e8f0; color: #334155; }
:root[data-theme="light"] .badge-live { background: var(--rose); color: #fff; }
:root[data-theme="light"] .badge-fav { background: #ec4899; color: #fff; }
:root[data-theme="light"] .sidebar.is-expanded { box-shadow: 0 20px 40px -10px rgba(100,116,139,.35); }
:root[data-theme="light"] .nav-item.active { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
:root[data-theme="light"] .hero-text,
:root[data-theme="light"] .page-sub { color: #475569; }
:root[data-theme="light"] .topbar-label,
:root[data-theme="light"] .typing-text { color: #64748b; }
:root[data-theme="light"] .scenario-banner { color: #f1f5f9; }          /* баннер сцены всегда на тёмном градиенте */
:root[data-theme="light"] .session-tag { color: #fecdd3; }
:root[data-theme="light"] .site-footer { border-color: var(--border); }
/* Кнопки/чипы поверх фото карточек остаются светлыми на тёмном — переопределять не нужно */

/* Удаление персоны */
.delete-form { margin-top: 8px; }
.btn-danger { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; }
.btn-danger:hover { color: #e11d48; background: rgba(244,63,94,.08); }

/* Photo catalogue */
.grid-cards { grid-template-columns: minmax(0, 1fr); }
.catalog-card { min-width: 0; height: auto; aspect-ratio: 3 / 4; }
.catalog-photo-link { display: block; position: absolute; inset: 0; color: inherit; }
.catalog-fav { position: absolute; right: 12px; top: 12px; z-index: 5; min-width: 44px; min-height: 44px; }
.catalog-fav.active { color: #fb7185; }
.catalog-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 16px; }
.catalog-pagination .btn { min-width: 44px; min-height: 44px; }
.catalog-search { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.catalog-search-label { flex-basis: 100%; }
.catalog-search .input { flex: 1; min-width: 0; width: auto; }
.catalog-photos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.catalog-photos img { display: block; width: 100%; height: auto; border-radius: 16px; }
@media (min-width: 560px) { .grid-cards, .catalog-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-cards, .catalog-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .grid-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.catalog-photo-link .card-bottom { position: absolute; bottom: 0; left: 0; right: 0; }

/* Sidebar catalogue fills the space above the bottom controls. */
.sidebar { height: 100vh; height: 100dvh; }
.sidebar .sb-top { flex: 1; min-height: 0; overflow: hidden; }
.sidebar .sb-head, .sidebar .sb-menu-wrap, .sidebar .sb-nav, .sidebar .sb-bottom { flex-shrink: 0; }
.sidebar.is-expanded .sb-models { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: 12px; }
.sidebar .sb-models-head { flex-shrink: 0; }
.sidebar .sb-models-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
.sidebar .sb-model { flex-shrink: 0; }

/* Favourite controls and notifications. */
.catalog-fav { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0; z-index: 30; cursor: pointer; }
.catalog-fav .icon { display: block; width: 18px; height: 18px; margin: 0; pointer-events: none; }
.catalog-fav.active .icon { fill: currentColor; }
.catalog-fav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.favorite-toast { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 14px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--sb-bg); color: var(--fg); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.favorite-toast[hidden] { display: none; }
.favorite-toast a { color: var(--rose); text-decoration: underline; }
.favorite-toast button { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; padding: 0; border: 0; background: transparent; color: inherit; font-size: 24px; cursor: pointer; }
@media (max-width: 559px) { .favorite-toast { right: 12px; bottom: 12px; left: 12px; max-width: none; flex-wrap: wrap; gap: 8px 12px; font-size: 14px; } .favorite-toast-message { flex: 1 1 100%; } .favorite-toast button { margin-left: auto; } }

/* Privacy policy */
.privacy-page { max-width: 800px; margin: 0 auto; padding: clamp(22px, 5vw, 48px); border-radius: 24px; }
.privacy-page .btn { margin: 0 0 24px; min-height: 44px; }
.privacy-page h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; color: var(--heading); }
.privacy-page h2 { font-size: 20px; margin: 28px 0 10px; color: var(--heading); }
.privacy-page p { margin-top: 12px; font-size: 14px; line-height: 1.85; color: var(--text-soft); }
.privacy-page .privacy-date { color: var(--muted); margin-bottom: 24px; font-size: 12px; }

/* Page-specific editorial content */
.seo-copy { margin: 40px auto 8px; padding: 28px 0 8px; border-top: 1px solid var(--border); max-width: 1120px; }
.seo-copy h2 { font-size: clamp(20px, 2.5vw, 26px); line-height: 1.35; color: var(--heading); }
.seo-copy h3 { font-size: 17px; margin: 22px 0 10px; color: var(--heading); }
.seo-copy p { max-width: 85ch; margin-top: 14px; font-size: 14px; line-height: 1.85; color: var(--text-soft); overflow-wrap: anywhere; }
.seo-copy a, .privacy-page p a { color: var(--rose-400); text-decoration: underline; text-underline-offset: 3px; }

/* Longer site brand */
.sb-brand .brand-text { min-width: 0; }
.sb-brand .brand-name { display:block; font-size:14px; letter-spacing:0; line-height:1.2; white-space:normal; }
.sb-head-actions { flex-shrink:0; }
