/* ═══════════════════════════════════════════════════════════════
   БУХЛОГ · дизайн-система «Nocturne Lux»
   Тёмный ночной клуб, янтарный свет, стекло и глубина.
   Токены → база → компоненты → экраны → адаптив.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0908;
  --bg-2: #100e0b;
  --bg-3: #161310;
  --surface: rgba(255, 240, 220, .045);
  --surface-2: rgba(255, 240, 220, .075);
  --surface-3: rgba(255, 240, 220, .11);
  --line: rgba(237, 182, 109, .16);
  --line-soft: rgba(255, 240, 220, .08);
  --line-strong: rgba(237, 182, 109, .38);
  --amber: #edb66d;
  --amber-2: #ffcf8e;
  --amber-3: #c98a3e;
  --text: #f3ecdd;
  --text-2: #b3a88f;
  --text-3: #7d7462;
  --ok: #62d99b;
  --ok-dim: rgba(98, 217, 155, .14);
  --warn: #f2b04d;
  --bad: #f07e6c;
  --bad-dim: rgba(240, 126, 108, .14);
  --radius-s: 12px;
  --radius: 18px;
  --radius-l: 26px;
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .3);
  --glow: 0 0 0 1px rgba(237, 182, 109, .25), 0 0 30px rgba(237, 182, 109, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(237, 182, 109, .09), transparent 60%),
    radial-gradient(900px 480px at 108% 12%, rgba(140, 90, 160, .06), transparent 60%),
    radial-gradient(700px 700px at 50% 115%, rgba(237, 182, 109, .05), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-2); }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.015em; }
h1 em, h2 em { font-family: var(--display); font-style: italic; font-weight: 600; color: var(--amber); letter-spacing: 0; }
p { margin: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
::selection { background: rgba(237, 182, 109, .35); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

/* тонкий скроллбар */
* { scrollbar-width: thin; scrollbar-color: rgba(237, 182, 109, .25) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(237, 182, 109, .22); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Загрузка ─────────────────────────────────────────────── */
.app-loading {
  min-height: 100dvh; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; color: var(--text-2);
}
.app-loading .seal { width: 64px; height: 64px; font-size: 30px; }
.app-loading b { letter-spacing: .34em; font-size: 13px; color: var(--text); }
.loading-line { width: 120px; height: 2px; border-radius: 2px; background: var(--line-soft); position: relative; overflow: hidden; }
.loading-line::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--amber), transparent); animation: line-sweep 1.3s var(--ease-soft) infinite; }
@keyframes line-sweep { from { transform: translateX(-110%); } to { transform: translateX(320%); } }

/* ── Печать-печать бренда ─────────────────────────────────── */
.seal {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 21px; color: var(--amber);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 215, 160, .28), transparent 55%),
    linear-gradient(160deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 14px rgba(237, 182, 109, .18), var(--glow);
}
.mini-seal { width: 30px; height: 30px; font-size: 13px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--amber); background: var(--surface); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-3);
}
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; transition: background .3s, box-shadow .3s; }
.led.on, .led:not(.busy):not([class*='off']) { background: var(--ok); box-shadow: 0 0 8px rgba(98, 217, 155, .8); }
.led.busy { background: var(--warn); box-shadow: 0 0 8px rgba(242, 176, 77, .9); animation: led-pulse 1.6s ease-in-out infinite; }
@keyframes led-pulse { 50% { opacity: .45; } }

/* ── Кнопки ───────────────────────────────────────────────── */
.btn {
  -webkit-appearance: none; appearance: none; border: 1px solid var(--line-soft);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-s);
  font: 600 14px/1 var(--font); letter-spacing: .01em; color: var(--text);
  background: var(--surface-2); cursor: pointer; user-select: none;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .25s, color .2s, opacity .2s;
}
.btn:hover { background: var(--surface-3); border-color: var(--line); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary {
  background: linear-gradient(150deg, var(--amber-2), var(--amber) 55%, var(--amber-3));
  border-color: transparent; color: #241703;
  box-shadow: 0 2px 14px rgba(237, 182, 109, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.primary:hover { box-shadow: 0 4px 22px rgba(237, 182, 109, .5), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn.danger { color: var(--bad); border-color: rgba(240, 126, 108, .35); background: var(--bad-dim); }
.btn.danger:hover { background: rgba(240, 126, 108, .22); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(0, 0, 0, .25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.primary) .spin { border-color: rgba(255, 240, 220, .25); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Поля ─────────────────────────────────────────────────── */
label.fieldwrap, .form label { display: block; }
label, .fieldlabel { font-size: 12.5px; font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.field {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border-radius: var(--radius-s); border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, .28); color: var(--text);
  font: 500 15px/1.3 var(--font);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field::placeholder { color: var(--text-3); }
.field:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(237, 182, 109, .13); background: rgba(0, 0, 0, .36); }
textarea.field { resize: vertical; min-height: 74px; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
input[type=file].field { padding: 9px 12px; font-size: 13px; color: var(--text-2); }
input[type=file].field::file-selector-button { margin-right: 12px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-3); color: var(--amber); font: 700 12.5px var(--font); cursor: pointer; }
.form-error {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 12px; padding: 10px 13px; border-radius: var(--radius-s);
  background: var(--bad-dim); border: 1px solid rgba(240, 126, 108, .3);
  color: var(--bad); font-size: 13.5px; font-weight: 600;
}
.form-note { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.form { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Карточки ─────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 240, 220, .055), rgba(255, 240, 220, .028) 55%);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  padding: 22px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card > .head, .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.head h2 { font-size: 21px; }
.head .muted { font-size: 13px; margin-top: 3px; }
.eyebrow + h2, .eyebrow + .title { margin-top: 7px; }

/* появление карточек (experience.js) */
.reveal-item { animation: reveal .55s var(--ease) both; animation-delay: var(--reveal-delay, 0ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* ── Тосты ────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  max-width: min(92vw, 480px); z-index: 200;
  padding: 13px 20px; border-radius: 14px;
  background: rgba(20, 17, 13, .92); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--text); font-weight: 600; font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; backdrop-filter: blur(16px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(240, 126, 108, .5); color: #ffb4a8; }

/* ── Диалоги ──────────────────────────────────────────────── */
dialog {
  width: min(560px, calc(100vw - 22px)); max-height: min(86dvh, 780px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-l);
  background: linear-gradient(170deg, #191512, #100e0b 65%);
  color: var(--text); box-shadow: var(--shadow);
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(5, 4, 3, .6); backdrop-filter: blur(6px); }
dialog[open] { animation: dlg-in .32s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(22px) scale(.97); } }
dialog .dlg-head, dialog .head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 22px 14px; margin: 0;
  background: linear-gradient(180deg, #191512 78%, transparent);
}
dialog .dlg-body, dialog .dlgform { padding: 4px 22px 20px; display: grid; gap: 14px; overflow-y: auto; }
dialog > form.dlgform { max-height: calc(86dvh - 80px); overflow-y: auto; }
.dlgform label { display: grid; gap: 0; }
.dlgfoot { display: flex; gap: 10px; padding: 14px 22px 20px; }
.dlgfoot .btn { flex: 1; }
dialog h2 { font-size: 22px; }
dialog .head h2 { font-size: 20px; }

/* свайп-закрытие на мобиле */
@media (max-width: 760px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; border-radius: 22px 22px 0 0; border-bottom: 0; margin: auto 0 0; position: fixed; bottom: 0; left: 0; transform: var(--swipe-offset, 0); transition: transform .2s var(--ease-soft); }
  dialog[open] { animation: sheet-in .34s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(60%); } }
  dialog::before { content: ''; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 42px; height: 4px; border-radius: 4px; background: rgba(255, 240, 220, .22); z-index: 4; }
}

/* ── Чипы и бейджи ────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--text-2);
}
.chip.ok { color: var(--ok); background: var(--ok-dim); border-color: rgba(98, 217, 155, .3); }
.chip.warn { color: var(--warn); background: rgba(242, 176, 77, .13); border-color: rgba(242, 176, 77, .3); }
.chip.bad { color: var(--bad); background: var(--bad-dim); border-color: rgba(240, 126, 108, .3); }
.chip.amber { color: var(--amber); background: rgba(237, 182, 109, .12); border-color: var(--line); }

/* ── Вкладки ──────────────────────────────────────────────── */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line-soft); border-radius: 12px;
}
.tabs button {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 9px;
  font: 700 13px var(--font); color: var(--text-2);
  transition: background .2s, color .2s, box-shadow .2s;
}
.tabs button.on { background: var(--surface-3); color: var(--amber); box-shadow: inset 0 0 0 1px var(--line); }
.tabs.wide { display: flex; width: 100%; }
.tabs.wide button { flex: 1; }

/* ── Аватары ──────────────────────────────────────────────── */
.avatar {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid rgba(255, 240, 220, .12);
  background: radial-gradient(circle at 35% 30%, #2c251c, #1a150f);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.avatar:hover { transform: scale(1.05); }
.avatar.sm { width: 32px; height: 32px; }
.avatar.lg { width: 64px; height: 64px; }
.avatar.xl { width: 84px; height: 84px; }
.avatar-letter {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font: 800 19px var(--display); font-style: italic; color: var(--amber);
  background: radial-gradient(circle at 35% 30%, #2c251c, #1a150f);
  border: 2px solid rgba(255, 240, 220, .12);
}

/* ── Пустые состояния и скелетоны ─────────────────────────── */
.empty { text-align: center; padding: 34px 18px; color: var(--text-2); }
.empty .empty-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1px dashed var(--line); color: var(--amber); font-size: 22px; margin-bottom: 12px; }
.empty h3 { font-size: 17px; color: var(--text); margin-bottom: 5px; }
.empty p { font-size: 13.5px; }
.empty-footnote { display: block; margin-top: 12px; font-size: 10.5px; letter-spacing: .18em; color: var(--text-3); }
.skeleton { border-radius: var(--radius-s); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%); background-size: 280% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.sk-line { height: 13px; margin: 9px 0; }
.sk-card { height: 120px; margin: 12px 0; }

/* ── Шапка приложения ─────────────────────────────────────── */
.shell { min-height: 100dvh; display: flex; flex-direction: column; max-width: 1180px; margin: 0 auto; padding: 0 18px; opacity: 0; transition: opacity .4s var(--ease); }
.shell.hydrated { opacity: 1; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0; position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(10, 9, 8, .92) 70%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand small { display: block; font-size: 9.5px; letter-spacing: .3em; color: var(--text-3); font-weight: 800; }
.brand b { display: block; font-size: 16px; letter-spacing: .12em; }
.line { display: flex; align-items: center; gap: 11px; }
.line b { font-size: 14px; display: block; }
.line .muted { font-size: 12.5px; display: block; }

.appnav {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0 16px;
}
.appnav > * { flex: none; }
.sync-pill { white-space: nowrap; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: var(--surface);
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em; color: var(--text-3);
}
.sync-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); transition: background .3s; }
.sync-pill.live { color: var(--ok); border-color: rgba(98, 217, 155, .25); }
.sync-pill.live i { background: var(--ok); box-shadow: 0 0 8px rgba(98, 217, 155, .7); }

.wallet-pill {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: linear-gradient(140deg, rgba(237, 182, 109, .16), rgba(237, 182, 109, .06));
  color: var(--text); font: 700 13.5px var(--font);
  transition: transform .15s var(--ease), box-shadow .25s;
  margin-left: auto;
}
.wallet-pill:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.wallet-pill strong { color: var(--amber); font-size: 14px; }
.wallet-pill .wallet-label { color: var(--text-3); font-weight: 600; }

/* ── Hero главного экрана ─────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-l); border: 1px solid var(--line-soft);
  background: linear-gradient(150deg, rgba(237, 182, 109, .1), rgba(20, 16, 12, .6) 45%, rgba(12, 10, 8, .8));
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px;
  padding: 34px; margin-bottom: 22px;
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-cta { padding: 14px 26px; font-size: 15px; border-radius: 14px; }
.hero-caption { font-size: 10px; letter-spacing: .22em; color: var(--text-3); font-weight: 800; }
.hero-intro { color: var(--text-2); font-size: 14.5px; }
.scene-stage { position: relative; min-height: 320px; border-radius: var(--radius); overflow: hidden; }
.scene-stage canvas { position: absolute; inset: 0; width: 100%; !important; height: 100% !important; }
.scene-aura {
  position: absolute; inset: -20%; pointer-events: none;
  background: radial-gradient(46% 46% at 50% 55%, rgba(237, 182, 109, .17), transparent 70%);
  animation: aura-breathe 6s ease-in-out infinite;
}
@keyframes aura-breathe { 50% { opacity: .65; transform: scale(1.05); } }
.scene-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .9; }
.scene-stage[data-render-mode='webgl'] .scene-fallback { display: none; }
.scene-orbit { position: absolute; inset: 12%; border-radius: 50%; border: 1px solid rgba(237, 182, 109, .13); pointer-events: none; }
.scene-orbit.orbit-b { inset: 24%; border-style: dashed; animation: orbit-spin 40s linear infinite; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.scene-coordinate { position: absolute; top: 14px; left: 16px; font-size: 9.5px; letter-spacing: .22em; color: var(--text-3); font-weight: 800; }
.scene-note { position: absolute; bottom: 14px; right: 16px; }

/* ── Статистика круга ─────────────────────────────────────── */
.club-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.club-stat {
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(165deg, rgba(255, 240, 220, .05), rgba(255, 240, 220, .02));
}
.club-stat span { font-size: 10px; letter-spacing: .2em; font-weight: 800; color: var(--text-3); }
.club-stat b { display: block; font-size: 30px; margin: 5px 0 1px; font-variant-numeric: tabular-nums; }
.club-stat small { color: var(--text-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; }
.club-stat-live { border-color: rgba(98, 217, 155, .22); }

.layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; padding-bottom: 40px; }
.stack { display: grid; gap: 20px; }

/* ── Люди ─────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.person {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line-soft); background: var(--surface);
  transition: border-color .2s, background .2s, transform .15s var(--ease);
}
.person:hover { border-color: var(--line); background: var(--surface-2); transform: translateY(-1px); }
.person .pinfo { flex: 1; min-width: 0; }
.person .pinfo b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .status { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--text-3); }
.person .status .led.on ~ *, .person .status:has(.led.on) { color: var(--ok); }
.person .btn { flex: none; }

/* ── Компании ─────────────────────────────────────────────── */
.sessions { display: grid; gap: 14px; }
.session { display: grid; grid-template-columns: 118px 1fr; gap: 16px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--surface); transition: border-color .2s, transform .15s var(--ease); }
.session:hover { border-color: var(--line); transform: translateY(-1px); }
.session .photo, .session .photo-ph { width: 118px; height: 118px; border-radius: 14px; object-fit: cover; }
.session .photo-ph { display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #2c251c, #17120d); color: var(--amber); font-size: 26px; }
.session .sbody { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.session h3 { font-size: 16.5px; }
.session .meta { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.session .members { display: flex; align-items: center; }
.session .members .avatar { width: 28px; height: 28px; margin-right: -8px; border: 2px solid #171310; }
.session .row { margin-top: auto; padding-top: 6px; }

/* ── Чат ──────────────────────────────────────────────────── */
#chatDlg { width: min(640px, 100vw); }
.chatbox {
  height: min(46dvh, 430px); overflow-y: auto; padding: 6px 4px;
  display: flex; flex-direction: column; gap: 3px;
  scroll-behavior: smooth;
}
.chat-date { text-align: center; font-size: 10.5px; letter-spacing: .14em; font-weight: 800; color: var(--text-3); padding: 12px 0 6px; text-transform: uppercase; }
.message-line { display: flex; gap: 9px; align-items: flex-end; max-width: 92%; animation: msg-in .25s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.message-line.is-mine { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { width: 28px; height: 28px; }
.bubble { padding: 9px 14px 7px; border-radius: 16px 16px 16px 5px; background: var(--surface-2); border: 1px solid var(--line-soft); min-width: 0; }
.bubble.mine { background: linear-gradient(150deg, rgba(237, 182, 109, .24), rgba(237, 182, 109, .13)); border-color: var(--line); border-radius: 16px 16px 5px 16px; }
.bubble b { font-size: 12px; color: var(--amber); display: block; margin-bottom: 2px; }
.bubble p { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.bubble time { display: block; text-align: right; font-size: 10px; color: var(--text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.chat-context summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text-2); padding: 4px 0; }
.chat-context[open] summary { color: var(--amber); }
#chatPhoto .photo { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius-s); margin-top: 8px; }
.members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ── Магазин ──────────────────────────────────────────────── */
.shop-dialog { width: min(760px, 100vw); }
.wallet-card {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(237, 182, 109, .14), rgba(237, 182, 109, .05));
  border: 1px solid var(--line);
}
.wallet-card span { font-size: 10px; letter-spacing: .2em; font-weight: 800; color: var(--text-3); display: block; }
.wallet-card b { font-size: 26px; color: var(--amber); }
.wallet-card small { display: block; color: var(--text-2); font-size: 12px; max-width: 220px; }
.wallet-card .btn { margin-left: auto; }
.shop-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.shop-item { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 8px; transition: transform .15s var(--ease), border-color .2s; }
.shop-item:hover { transform: translateY(-2px); border-color: var(--line); }
.shop-preview { height: 84px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(237, 182, 109, .12), rgba(0, 0, 0, .3)); border: 1px solid var(--line-soft); }
.shop-sample { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--swatch); box-shadow: 0 0 14px color-mix(in srgb, var(--swatch) 55%, transparent); }
.shop-sample.name-sample { display: grid; place-items: center; border: none; background: none; box-shadow: none; font: 800 17px var(--font); color: var(--swatch); }
.sample-letter { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--swatch); box-shadow: 0 0 14px color-mix(in srgb, var(--swatch) 55%, transparent); font: 800 19px var(--display); font-style: italic; color: var(--amber); }
.shop-rarity { font-size: 10px; letter-spacing: .14em; font-weight: 800; color: var(--text-3); text-transform: uppercase; }
.shop-item h3 { font-size: 15px; }
.shop-item p { font-size: 12px; color: var(--text-2); flex: 1; }
.rarity-epic .shop-rarity { color: #c9a0ff; }
.rarity-legendary .shop-rarity { color: var(--amber-2); }
.rarity-rare .shop-rarity { color: #7db4ff; }
.shop-footnote { font-size: 12px; }

/* ── Welcome / вход ───────────────────────────────────────── */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; max-width: 1180px; margin: 0 auto; padding: 0 18px 30px; }
.welcome-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.welcome-login { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--text); transition: box-shadow .25s, transform .15s; }
.welcome-login:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.welcome-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; align-items: stretch; padding: 12px 0 26px; }
.welcome-story { display: flex; flex-direction: column; gap: 18px; }
.welcome-copy .eyebrow { color: var(--amber); }
.welcome-copy h1 { font-size: clamp(40px, 5.4vw, 62px); margin-top: 12px; }
.welcome-copy p { margin-top: 14px; color: var(--text-2); font-size: 16.5px; line-height: 1.6; }
.story-bottom { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .22em; color: var(--text-3); font-weight: 800; }
.authbox {
  align-self: center; width: 100%; max-width: 440px;
  border-radius: var(--radius-l); padding: 30px 30px 26px;
  border: 1px solid var(--line);
  background: linear-gradient(168deg, rgba(255, 240, 220, .07), rgba(255, 240, 220, .025) 55%, rgba(10, 9, 8, .4));
  box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.auth-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.authbox h2 { font-size: 28px; }
.authbox > .muted { margin: 8px 0 18px; }
.auth-tabs { width: 100%; margin-bottom: 18px; }
.auth-submit { margin-top: 6px; width: 100%; padding: 14px; font-size: 15px; border-radius: 13px; }
.auth-trust { display: flex; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--text-2); }
.lock-mark { flex: none; width: 15px; height: 15px; margin-top: 2px; border: 1.6px solid var(--amber); border-radius: 4px; position: relative; opacity: .8; }
.lock-mark::after { content: ''; position: absolute; top: -7px; left: 3px; width: 7px; height: 6px; border: 1.6px solid var(--amber); border-bottom: 0; border-radius: 6px 6px 0 0; }
.registration-note { margin-top: 14px; font-size: 12.5px; color: var(--text-2); padding: 11px 13px; border-radius: 12px; background: rgba(237, 182, 109, .07); border: 1px solid var(--line-soft); }
.welcome-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 26px; }
.welcome-features article { display: flex; gap: 13px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--surface); }
.feature-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); color: var(--amber); font-size: 17px; background: rgba(237, 182, 109, .08); }
.welcome-features h3 { font-size: 14.5px; margin-bottom: 3px; }
.welcome-features p { font-size: 12.5px; color: var(--text-2); }
.foot { display: flex; justify-content: space-between; padding: 16px 0 0; font-size: 10px; letter-spacing: .2em; color: var(--text-3); font-weight: 800; margin-top: auto; }

/* центрированный вариант (гейты, ожидание) */
.auth-centered { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-centered .authbox { max-width: 520px; }
.auth-centered h1 { font-size: 30px; }
.auth-centered .brand { margin-bottom: 18px; }
.notice { padding: 12px 15px; border-radius: 12px; background: rgba(237, 182, 109, .08); border: 1px solid var(--line-soft); font-size: 13px; color: var(--text-2); }
.notice b { color: var(--amber); }
.install-steps { display: grid; gap: 10px; margin: 16px 0; }
.install-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 13.5px; }
.install-step b { flex: none; font-size: 11px; letter-spacing: .1em; color: var(--amber); border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; margin-top: 1px; }
.setup-actions { display: grid; gap: 10px; margin-top: 16px; }
.setup-check { display: flex; gap: 9px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.setup-check input { accent-color: var(--amber); width: 16px; height: 16px; }

/* ── Профиль ──────────────────────────────────────────────── */
.preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-top: 4px; border: 2px solid var(--line); }
.profile-card .line b { display: block; }

/* ── Клуб-гайд ────────────────────────────────────────────── */
.club-guide ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: guide; }
.club-guide li { display: flex; gap: 13px; }
.club-guide li > span { counter-increment: guide; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; font-size: 11px; font-weight: 800; color: var(--amber); border: 1px solid var(--line); background: rgba(237, 182, 109, .08); }
.club-guide b { display: block; font-size: 14px; margin-bottom: 2px; }
.club-guide p { font-size: 12.5px; color: var(--text-2); }

/* ── Уведомление владельца ────────────────────────────────── */
.owner-notice { text-align: center; }
.notice-icon { width: 52px; height: 52px; margin: 26px auto 0; display: grid; place-items: center; border-radius: 50%; font-size: 24px; font-weight: 800; color: var(--amber); background: rgba(237, 182, 109, .12); border: 1px solid var(--line-strong); box-shadow: var(--glow); }
.owner-notice .eyebrow { margin-top: 14px; }
.owner-notice h2 { margin: 8px 22px 0; }
.owner-notice-body { padding: 14px 30px 4px; color: var(--text-2); font-size: 14.5px; white-space: pre-wrap; }
.owner-notice .btn { margin: 18px auto 26px; min-width: 180px; }

/* ── Офлайн-плашка ────────────────────────────────────────── */
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 150; padding: 8px; text-align: center; font-size: 12.5px; font-weight: 700; color: #241703; background: linear-gradient(90deg, var(--warn), var(--amber-2)); transform: translateY(-100%); transition: transform .3s var(--ease); }
.offline-bar.show { transform: none; }

/* ── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-features { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .scene-stage { min-height: 260px; }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hero { padding: 24px 20px; }
  .club-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .club-stat { padding: 13px 12px; }
  .club-stat b { font-size: 22px; }
  .card { padding: 17px; }
  .people { grid-template-columns: 1fr; }
  .session { grid-template-columns: 84px 1fr; }
  .session .photo, .session .photo-ph { width: 84px; height: 84px; }
  .appnav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .appnav::-webkit-scrollbar { display: none; }
  .wallet-pill { margin-left: 0; }
  .welcome-copy h1 { font-size: 38px; }
  .authbox { padding: 24px 20px; }
  .desktop-break { display: none; }
  .top { padding: 12px 0; }
  .line .btn { padding: 7px 11px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
