/* =====================================================================
   Поток — единая дизайн-система (UI layer)
   Подключается ПОСЛЕ style.css и приводит к одному виду кнопки, окна,
   поля ввода, шрифты и мобильную раскладку. Старый style.css не трогаем:
   чтобы откатить — достаточно убрать <link> на этот файл и ui.js.
   ===================================================================== */

/* ---------- 1. Токены ---------- */
:root {
  /* поверхности */
  --ui-surface: rgba(20, 13, 32, 0.97);
  --ui-surface-2: rgba(255, 255, 255, 0.05);
  --ui-surface-3: rgba(255, 255, 255, 0.08);
  --ui-border: rgba(255, 255, 255, 0.12);
  --ui-border-strong: rgba(255, 255, 255, 0.22);
  --ui-scrim: rgba(8, 4, 16, 0.78);
  /* текст: вторичный и третичный подняты ради контраста (WCAG AA) */
  --ui-text: rgba(255, 255, 255, 0.94);
  --ui-text-2: rgba(255, 255, 255, 0.74);
  --ui-text-3: rgba(255, 255, 255, 0.58);
  --muted: rgba(255, 255, 255, 0.62);
  /* акценты берутся из темы (--p1/--p2), поэтому темы продолжают работать */
  --ui-accent: var(--p1);
  --ui-accent-2: var(--p2);
  --ui-on-accent: #170d24;
  --ui-danger: #ff8a96;
  --ui-success: #7fe0b4;
  --ui-gold: #f2c96b;
  /* шрифты */
  --ui-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ui-font-display: 'Cormorant Garamond', Georgia, serif;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  /* скругления и отступы */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --tap: 44px;
  /* слои */
  --z-header: 100;
  --z-float: 900;
  --z-modal: 5000;
  --z-alert: 8000;
  --z-toast: 9500;
  /* высота видимой области (ui.js обновляет её с учётом клавиатуры) */
  --app-h: 100vh;
}
@supports (height: 100dvh) { :root { --app-h: 100dvh; } }

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--ui-font); }

/* ---------- 2. Полосы прокрутки и выделение ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(201, 180, 240, 0.28) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(201, 180, 240, 0.28); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(201, 180, 240, 0.45); }
::selection { background: rgba(201, 180, 240, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

/* ---------- 3. Кнопки ----------
   Три вида: главная (заливка), вторичная (стекло), текстовая.
   Главная: явные классы подтверждения + последняя кнопка в паре. */
html body :is(
  .btn-glass, .btn-next, .btn-back, .btn-primary, .btn-secondary, .btn-activate,
  .auth-modal-btn-primary, .auth-modal-btn-secondary, .sc-btn-cancel, .sc-btn-confirm,
  .share-btn-cancel, .share-btn-confirm, .clone-req-submit, .amb-submit-btn, .amb-cancel-btn,
  .lux-btn-confirm, .lux-btn-buy, .lux-btn-more, .mg-activate-btn, .qb-publish-btn,
  .btn-ticket-hero, .btn-activate-cert, .btn-awakening, .soul-intro-btn, .acq-btn,
  .btn-intro-back, .btn-intro-next, .amb-payout-btn, .potok-btn
) {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: var(--tap) !important;
  padding: 10px 22px !important;
  border-radius: var(--r-md) !important;
  font-family: var(--ui-font) !important;
  font-size: 15px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  text-align: center !important;
  white-space: normal;
  cursor: pointer;
  animation: none !important;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .15s, opacity .2s !important;
  -webkit-tap-highlight-color: transparent;
  max-width: 100%;
}
/* вторичная (по умолчанию для стеклянных и «назад») */
html body :is(.btn-glass, .btn-back, .btn-secondary, .auth-modal-btn-secondary, .sc-btn-cancel,
  .share-btn-cancel, .amb-cancel-btn, .btn-intro-back, .lux-btn-more, .btn-activate-cert, .potok-btn--secondary) {
  background: var(--ui-surface-2) !important;
  border: 1px solid var(--ui-border-strong) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
html body :is(.btn-glass, .btn-back, .btn-secondary, .auth-modal-btn-secondary, .sc-btn-cancel,
  .share-btn-cancel, .amb-cancel-btn, .btn-intro-back, .lux-btn-more):hover {
  background: var(--ui-surface-3) !important;
  border-color: var(--ui-accent) !important;
  transform: none !important;
  letter-spacing: 0.01em !important;
}
/* главная */
html body :is(.btn-next:not(.btn-secondary), .btn-primary, .btn-activate, .auth-modal-btn-primary,
  .sc-btn-confirm, .share-btn-confirm, .clone-req-submit, .amb-submit-btn, .lux-btn-confirm,
  .lux-btn-buy, .mg-activate-btn, .qb-publish-btn, .btn-ticket-hero,
  .btn-awakening, .soul-intro-btn, .btn-intro-next, .amb-payout-btn, .ui-primary,
  .potok-btn--primary,
  .modal :is(div, footer) > .btn-glass:last-child:not(:first-child)) {
  background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-2)) !important;
  border: 1px solid transparent !important;
  color: var(--ui-on-accent) !important;
  box-shadow: 0 6px 22px rgba(201, 180, 240, 0.22) !important;
}
html body :is(.btn-next:not(.btn-secondary), .btn-primary, .btn-activate, .auth-modal-btn-primary,
  .sc-btn-confirm, .share-btn-confirm, .clone-req-submit, .amb-submit-btn, .lux-btn-confirm,
  .lux-btn-buy, .mg-activate-btn, .qb-publish-btn, .btn-ticket-hero,
  .btn-awakening, .soul-intro-btn, .btn-intro-next, .amb-payout-btn, .ui-primary,
  .modal :is(div, footer) > .btn-glass:last-child:not(:first-child)):hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 28px rgba(201, 180, 240, 0.32) !important;
  transform: translateY(-1px) !important;
}
html body :is(.btn-glass, .btn-next, .btn-back, .btn-primary, .btn-activate, .auth-modal-btn-primary,
  .sc-btn-confirm, .lux-btn-confirm, .btn-intro-next, .btn-intro-back):active { transform: scale(.98) !important; }
html body :is(.btn-glass, .btn-next, .btn-back, .btn-primary, .btn-activate, .auth-modal-btn-primary,
  .sc-btn-confirm, .share-btn-confirm, .lux-btn-confirm, .clone-req-submit, .amb-submit-btn, .qb-publish-btn):disabled {
  background: var(--ui-surface-2) !important;
  color: var(--ui-text-3) !important;
  border-color: var(--ui-border) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  filter: none;
}
html body #btn-start, html body #btn-cookie-accept {
  background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-2)) !important;
  border: 1px solid transparent !important; color: var(--ui-on-accent) !important;
  box-shadow: 0 6px 22px rgba(201, 180, 240, 0.22) !important;
}
/* «Назад», «Отмена», «Позже» — всегда вторичные, даже если размечены как главные */
html body :is(button, a):is([id$="-back"], [id*="-back-"], [id*="cancel"], [id$="-no"], [data-act="close"]):not(#ui-none),
html body #btn-auth-login, html body .btn-next.btn-secondary:not(#ui-none) {
  background: var(--ui-surface-2) !important;
  border: 1px solid var(--ui-border-strong) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}
/* опасное действие: распознаём по id */
html body :is(#btn-dissolve-wipe, #btn-logout-confirm, #btn-sp-yes, #btn-dissolve-export) {
  background: rgba(255, 110, 130, 0.12) !important;
  border: 1px solid rgba(255, 138, 150, 0.45) !important;
  color: var(--ui-danger) !important;
  box-shadow: none !important;
}
/* стартовая кнопка заставки — крупнее, но в той же системе */
html body #btn-start { min-height: 54px !important; padding: 14px 34px !important; font-size: 16px !important; border-radius: var(--r-pill) !important; margin: 32px auto 0 !important; }
html body #btn-start .btn-glass-icon { opacity: 1; }
/* ряды кнопок: одинаковая высота, перенос на узких экранах */
.btn-row, .auth-modal-actions { display: flex; flex-wrap: wrap; gap: 10px !important; align-items: stretch; }

/* ---------- 4. Кнопка закрытия: всегда круглая ---------- */
html body :is(.modal-close, .auth-modal-close, .clone-req-close, .ambassador-close, .pm-close, .qb-close, .sp-close, .potok-close) {
  flex: none !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  background: var(--ui-surface-2) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-text-2) !important;
  font: 400 18px/1 var(--ui-font) !important;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s !important;
  box-shadow: none !important;
}
html body :is(.modal-close, .auth-modal-close, .clone-req-close, .ambassador-close, .pm-close, .qb-close, .sp-close, .potok-close):hover {
  background: var(--ui-surface-3) !important; color: #fff !important; border-color: var(--ui-border-strong) !important;
}
/* крестики, которые стоят прямо в окне (без шапки), — в правый верхний угол */
html body :is(.auth-modal, .clone-req-modal) > :is(.auth-modal-close, .clone-req-close) {
  position: absolute !important; top: 12px !important; right: 12px !important; z-index: 6;
}
html body .ambassador-close { position: fixed !important; top: 12px !important; right: 12px !important; z-index: 6; }

/* ---------- 5. Окна ---------- */
.modal-overlay {
  background: var(--ui-scrim) !important;
  padding: 16px !important;
  overscroll-behavior: contain;
}
/* все «коробки» окон */
html body .modal-overlay > :is(.modal, .auth-modal, .clone-req-modal, .share-modal, .qb-modal, .alert-modal, .cookie-modal) {
  max-height: calc(var(--app-h) - 32px) !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55) !important;
  color: var(--ui-text);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
html body .modal-overlay > .modal:not(.arena-modal):not(.gift-shop-modal):not(.support-modal):not(.legal-modal):not(.lux-modal) {
  padding: 24px !important;
}
html body .modal-overlay > .qb-modal { overflow: hidden; }
/* шапка окна: заголовок слева, крестик справа, прилипает при прокрутке */
html body :is(.modal-head, .lux-modal-header, .qb-header, .arena-header-bar, .support-modal-head) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
html body .modal > .modal-head {
  position: sticky;
  top: -24px;
  z-index: 5;
  margin: -24px -24px 18px !important;
  padding: 18px 20px 14px 24px !important;
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
html body :is(.arena-modal, .gift-shop-modal, .support-modal, .legal-modal) > .modal-head { position: sticky; top: 0; z-index: 5; background: var(--ui-surface); }
html body .lux-modal-header { position: relative; margin-bottom: 16px; }
html body .lux-modal-header > .modal-close { order: 99; }
/* заголовки окон */
html body :is(.modal-title, .lux-modal-title, .qb-title, .auth-modal-title, .clone-req-title) {
  font-family: var(--ui-font-display) !important;
  font-size: var(--fs-xl) !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25 !important;
  color: var(--ui-text) !important;
  text-transform: none !important;
  margin: 0;
  min-width: 0;
}
/* мелкий капс-подзаголовок → читаемый */
html body :is(.modal, .auth-modal, .qb-modal, .share-modal, .clone-req-modal) :is(label, .label, .form-label, .settings-label, .lux-label) {
  letter-spacing: 0.04em !important;
}
/* текст в окнах: не меньше 13–14px */
html body .modal-overlay :is(p, li, .modal-text, .info-text, .auth-modal-desc) { font-size: max(14px, 1em); line-height: 1.6; color: var(--ui-text-2); }
html body .modal-overlay small { font-size: 13px; }
/* стек окон: под верхним окном нижние не просвечивают */
.modal-overlay.open ~ .modal-overlay.open { background: rgba(8, 4, 16, 0.6) !important; }

/* ---------- 6. Поля ввода и выпадающие списки ---------- */
html body :is(input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="tel"], input[type="search"], input:not([type]), select, textarea):not(.msg-input) {
  font-family: var(--ui-font) !important;
  font-size: 16px !important; /* меньше 16px — iPhone увеличивает страницу при фокусе */
  color: var(--ui-text) !important;
  min-height: var(--tap);
  border-radius: var(--r-sm) !important;
}
html body select {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9b4f0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding: 10px 40px 10px 14px !important;
  border: 1px solid var(--ui-border-strong) !important;
  cursor: pointer;
}
html body select option { background: #1a1028; color: #fff; }
html body :is(input, select, textarea):focus { border-color: var(--ui-accent) !important; outline: none; box-shadow: 0 0 0 3px rgba(201, 180, 240, 0.18) !important; }
html body input[type="checkbox"], html body input[type="radio"] { accent-color: var(--ui-accent); width: 20px; height: 20px; min-height: 0; flex: none; }
::placeholder { color: var(--ui-text-3) !important; opacity: 1; }

/* ---------- 7. Подвал с документами ---------- */
html body .legal-footer { font-size: 12px !important; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)) !important; gap: 12px !important; background: rgba(14, 8, 22, 0.96) !important; }
html body .legal-footer a { color: var(--ui-text-3) !important; text-decoration: none; padding: 4px 2px; }
html body .legal-footer a:hover { color: var(--ui-text) !important; }

/* ---------- 8. Плавающие кнопки поддержки и подарков ---------- */
html body .footer-controls :is(.support-btn, .gift-btn) {
  width: 44px !important; height: 44px !important; min-width: 44px; border-radius: 50% !important; flex: none !important;
  display: inline-flex; align-items: center !important; justify-content: center !important;
  background: var(--ui-surface) !important; border: 1px solid var(--ui-border) !important; font-size: 19px !important;
}

/* ---------- 9. Чат ---------- */
html body .chat-log { scroll-behavior: auto !important; overscroll-behavior: contain; }
html body .msg { max-width: min(680px, 82%) !important; }
html body .msg.assistant {
  font-family: var(--ui-font) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  line-height: 1.62 !important;
  color: var(--ui-text) !important;
  padding: 14px 18px !important;
  border-radius: 18px 18px 18px 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--ui-border) !important;
  border-left: 3px solid var(--ui-accent) !important;
  white-space: pre-wrap;
  position: relative;
}
html body .msg.user {
  font-family: var(--ui-font) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  padding: 12px 16px !important;
  border-radius: 18px 18px 6px 18px !important;
  border-right-width: 1px !important;
  white-space: pre-wrap;
}
html body .msg.guest { font-size: 15px !important; line-height: 1.55 !important; }
html body .msg-like-btn { width: 32px !important; height: 32px !important; min-width: 32px; border-radius: 50% !important; flex: none; }
html body .chat-footer { gap: 8px !important; align-items: flex-end !important; }
html body .chat-footer :is(.emoji-btn, .camera-btn, .send-btn, .support-btn, .gift-btn) {
  flex: none !important; width: 44px !important; height: 44px !important; min-width: 44px !important;
  border-radius: 50% !important; padding: 0 !important; display: inline-flex; align-items: center !important; justify-content: center !important;
}
html body .msg-input {
  font-family: var(--ui-font) !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  min-height: 44px !important;
  padding: 11px 16px !important;
  border-radius: 22px !important;
}
html body .soul-name { font-family: var(--ui-font-display); }
html body .icon-btn { flex: none !important; width: 40px !important; height: 40px !important; min-width: 40px; border-radius: 50% !important; }

/* ---------- 10. Карточки личностей ---------- */
html body .p-card .p-name, html body .p-card h3 { font-size: var(--fs-lg); }
html body .p-card.locked { opacity: 0.55; }

/* ---------- 11. Уведомления (тосты) ---------- */
html body :is(.toast, .potok-toast) { z-index: var(--z-toast) !important; font-size: 14px !important; border-radius: var(--r-md) !important; }

/* =====================================================================
   12. СМАРТФОН (до 768px)
   ===================================================================== */
@media (max-width: 768px) {
  /* окна — выезжающие снизу панели на всю ширину */
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  /* окна-страницы (биржа, амбассадоры) прокручиваются целиком сверху */
  html body :is(.ambassador-overlay, .marketplace-overlay) { align-items: flex-start !important; overflow-y: auto !important; padding: 0 !important; }
  html body .modal-overlay > :is(.modal, .auth-modal, .clone-req-modal, .share-modal, .qb-modal, .alert-modal, .cookie-modal) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    max-height: calc(var(--app-h) - 24px) !important;
    border-radius: 22px 22px 0 0 !important;
    border-bottom: none !important;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    animation: potokSheetIn .32s cubic-bezier(.16, 1, .3, 1) both !important;
  }
  html body .modal-overlay > .modal:not(.arena-modal):not(.gift-shop-modal):not(.support-modal):not(.legal-modal):not(.lux-modal) { padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)) !important; }
  html body .modal > .modal-head { top: -20px; margin: -20px -18px 16px !important; padding: 14px 14px 12px 18px !important; border-radius: 22px 22px 0 0; }
  /* «ручка» у панели */
  html body .modal-overlay > :is(.modal, .auth-modal, .clone-req-modal, .share-modal, .qb-modal, .cookie-modal)::before {
    content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22);
    margin: -8px auto 10px; flex: none;
  }
  html body .modal-overlay > .modal > .modal-head:first-child { margin-top: -20px !important; }
  /* кнопки в окнах — на всю ширину, главная сверху не нужна: оставляем порядок, но растягиваем */
  html body .modal-overlay :is(.btn-row, .auth-modal-actions) > :is(button, a) { flex: 1 1 140px; }
  html body .modal-overlay .modal > .btn-glass:only-of-type { width: 100%; }

  /* Арена душ на телефоне */
  html body .arena-modal { overflow-y: auto !important; }
  html body .arena-select-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 12px !important; padding: 16px !important; }
  html body .soul-slot { min-width: 0; gap: 8px !important; }
  html body .soul-slot-label { letter-spacing: 0.06em !important; font-size: 11px !important; text-align: center; }
  html body .soul-picker-trigger { min-height: 170px !important; border-radius: 18px !important; padding: 12px 8px !important; }
  html body .soul-picker-trigger * { overflow-wrap: anywhere; }
  html body .arena-vs-badge { font-size: 16px !important; }

  /* чат — экран приложения: шапка сверху, лента прокручивается, поле ввода внизу */
  html body #s-chat.active {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    height: var(--app-h) !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
    z-index: 100;
  }
  html body #s-chat .chat-header {
    position: relative !important;
    flex: none !important;
    height: auto !important;
    flex-wrap: wrap !important;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px !important;
    gap: 8px !important;
    background: rgba(14, 8, 22, 0.92) !important;
    backdrop-filter: blur(14px);
    z-index: var(--z-header);
  }
  html body #s-chat .hdr-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
  html body #s-chat .soul-name { max-width: 46vw !important; font-size: 18px !important; }
  html body #s-chat .soul-tag { display: block !important; font-size: 11px !important; letter-spacing: 0.06em !important; }
  html body #s-chat .hdr-right {
    flex: 1 1 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  html body #s-chat .hdr-right::-webkit-scrollbar { display: none; }
  html body #s-chat .hdr-right > * { flex: none !important; margin: 0 !important; }
  html body #s-chat .hdr-right #btn-settings { margin-left: auto !important; }
  html body #s-chat .token-group { min-height: 36px; }
  html body #s-chat .chat-log {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 14px 12px 16px !important;
    gap: 12px !important;
    mask-image: none !important;
  }
  html body #s-chat .msg { max-width: 88% !important; }
  html body #s-chat .msg.assistant { font-size: 15.5px !important; padding: 12px 14px !important; }
  html body #s-chat .chat-footer {
    position: relative !important;
    flex: none !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(14, 8, 22, 0.94) !important;
    border-top: 1px solid var(--ui-border);
  }
  html body #s-chat .typing-indicator { flex: none; margin: 0 !important; padding: 4px 14px !important; }
  html body #s-chat .typing-indicator:not(.active) { height: 0 !important; padding: 0 !important; overflow: hidden; }
  html body #s-chat .chat-footer { margin: 0 !important; }
  /* на телефоне смайлы есть в клавиатуре */
  html body #s-chat #btn-emoji { display: none !important; }
  /* поддержка и подарки переезжают в строку ввода (ui.js), плавающий блок прячем */
  html body.ui-chat-tools-moved .footer-controls { display: none !important; }
  /* подвал с документами на экране чата не нужен (есть в настройках) */
  html body.ui-chat-open .legal-footer { display: none !important; }

  /* экраны онбординга */
  /* старое правило bottom:40px сдвигало экраны вверх и обрезало заголовки */
  html body .screen:not(#s-chat) { top: auto !important; bottom: auto !important; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 76px !important; }
  html body .persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  html body .p-card { padding: 22px 10px !important; gap: 8px !important; border-radius: 18px !important; min-width: 0; }
  html body .p-card:hover { transform: none !important; }
  html body .btn-row { width: 100%; }
  html body .btn-row > :is(.btn-back, .btn-next, .btn-glass) { flex: 1 1 0; min-width: 0; }
  html body :is(.splash-info-links, .info-links) { gap: 8px !important; }

  /* подвал документов — одна строка с прокруткой */
  html body .legal-footer { justify-content: flex-start !important; overflow-x: auto; white-space: nowrap; gap: 14px !important; }
  html body .legal-footer::-webkit-scrollbar { display: none; }
}

/* горизонтальная ориентация телефона: шапку и подвал делаем компактнее */
@media (max-height: 500px) and (orientation: landscape) {
  html body #s-chat.active { position: fixed !important; inset: 0 0 auto 0 !important; height: var(--app-h) !important; display: flex !important; flex-direction: column !important; overflow: hidden !important; padding: 0 !important; }
  html body #s-chat .chat-header { flex-wrap: nowrap !important; padding: 4px 10px !important; min-height: 0 !important; height: auto !important; }
  html body #s-chat .hdr-right { flex: 0 1 auto !important; overflow-x: auto; }
  html body #s-chat .soul-tag { display: none !important; }
  html body #s-chat .chat-log { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; }
  html body #s-chat .chat-footer { padding: 4px 10px !important; }
  html body .modal-overlay > :is(.modal, .auth-modal, .clone-req-modal, .share-modal, .qb-modal, .alert-modal, .cookie-modal) { max-height: calc(var(--app-h) - 8px) !important; }
  html body.ui-chat-open .legal-footer { display: none !important; }
}

@keyframes potokSheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

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


/* капча: перетаскивание ползунка не выделяет текст на странице */
html body #captcha-container, html body .captcha-slider, html body [id*="captcha"] { -webkit-user-select: none; user-select: none; }

/* возрастная маркировка 18+ (картинка) */
html body .age-mark { display: block; flex: none; pointer-events: none; user-select: none; }
html body .age-mark--splash { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; width: 44px; height: 44px; z-index: 5; opacity: 0.9; }
html body .age-mark--footer { width: 20px; height: 20px; opacity: 0.8; }
@media (max-width: 768px) {
  html body .age-mark--splash { width: 36px; height: 36px; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; }
  /* в нижней строке на телефоне места нет — значок остаётся на заставке */
  html body .age-mark--footer { display: none; }
}

/* ---------- Строка ввода на телефоне: поле во всю ширину, доп. кнопки в панели «＋» ---------- */
.ui-tools-toggle { display: none; }
@media (max-width: 768px) {
  html body #s-chat .chat-footer { gap: 8px !important; align-items: flex-end !important; }
  html body #s-chat .msg-input { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
  html body .ui-tools-toggle {
    display: inline-flex; flex: none; width: 44px; height: 44px; border-radius: 50%;
    align-items: center; justify-content: center; position: relative;
    background: var(--ui-surface, rgba(255,255,255,.06)); border: 1px solid var(--ui-border, rgba(201,180,240,.2));
    color: var(--ui-text, #eee); font: 300 26px/1 var(--ui-font, Inter, sans-serif); padding: 0 0 2px; cursor: pointer;
    transition: transform .2s ease, background .2s ease;
  }
  html body .ui-tools-toggle.open { transform: rotate(45deg); background: rgba(201,180,240,.16); }
  html body .ui-tools-toggle.has-badge::after {
    content: ''; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%;
    background: #f472b6; box-shadow: 0 0 0 2px rgba(14,8,22,.94);
  }
  html body .ui-chat-tools {
    position: absolute; left: 10px; bottom: calc(100% + 8px); z-index: 30;
    display: none; gap: 10px; padding: 8px; align-items: center;
    background: rgba(20, 12, 32, .97); border: 1px solid var(--ui-border, rgba(201,180,240,.2));
    border-radius: 30px; box-shadow: 0 12px 30px rgba(0,0,0,.45);
  }
  html body .ui-chat-tools.open { display: flex; animation: potokSheetIn .18s ease; }
  html body .ui-chat-tools :is(.support-btn, .gift-btn, .camera-btn) { width: 44px !important; height: 44px !important; }
}

/* ---------- Редактор личности (платная настройка матрицы) ---------- */
html body .modal-overlay.mx-overlay {
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 16px !important; background: rgba(6, 3, 10, .82) !important; backdrop-filter: blur(10px);
}
.mx-modal {
  --mx-gold: #d8b878; --mx-gold-2: #f3dfae; --mx-line: rgba(216, 184, 120, .22);
  position: relative; width: min(780px, 100%); max-height: min(92vh, calc(var(--app-h, 100vh) - 32px));
  display: flex; flex-direction: column; overflow: hidden; color: #f2ecf8;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(216,184,120,.10), transparent 60%),
    linear-gradient(180deg, #17101f 0%, #0d0913 100%);
  border: 1px solid var(--mx-line); border-radius: 28px;
  box-shadow: 0 40px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(243,223,174,.08);
  animation: potokSheetIn .25s ease;
}
.mx-head { flex: none; position: relative; text-align: center; padding: 28px 56px 20px; border-bottom: 1px solid var(--mx-line); }
.mx-kicker { font: 500 11px/1 var(--ui-font, Inter, sans-serif); letter-spacing: .28em; text-transform: uppercase; color: var(--mx-gold); }
.mx-title {
  margin-top: 10px; font: 400 clamp(28px, 6vw, 40px)/1.05 'Cormorant Garamond', serif; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6e2, var(--mx-gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mx-sub { margin-top: 8px; font: 400 12px/1.4 var(--ui-font, Inter, sans-serif); color: rgba(242,236,248,.55); letter-spacing: .04em; }
.mx-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--mx-line); background: rgba(255,255,255,.03); color: var(--mx-gold-2);
  font: 300 24px/1 var(--ui-font, Inter, sans-serif); cursor: pointer;
}
.mx-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 8px 28px 20px; }
.mx-group { padding-top: 18px; }
.mx-group-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font: 400 21px/1.2 'Cormorant Garamond', serif; color: var(--mx-gold-2); letter-spacing: .03em;
}
.mx-group-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--mx-line), transparent); }
.mx-group-icon { color: var(--mx-gold); font-size: 16px; }
.mx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.mx-trait { padding: 12px 14px 10px; border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); }
.mx-trait-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mx-trait-label { font: 400 15px/1.2 var(--ui-font, Inter, sans-serif); color: #f2ecf8; }
.mx-trait-val { font: 500 20px/1 'Cormorant Garamond', serif; color: var(--mx-gold-2); min-width: 22px; text-align: right; }
.mx-trait-hints { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font: 400 10.5px/1.2 var(--ui-font, Inter, sans-serif); color: rgba(242,236,248,.42); letter-spacing: .03em; }
.mx-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y;
}
.mx-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--mx-gold) 0, var(--mx-gold-2) var(--pct, 50%), rgba(255,255,255,.1) var(--pct, 50%));
}
.mx-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); }
.mx-range::-moz-range-progress { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--mx-gold), var(--mx-gold-2)); }
html body .mx-modal .mx-range::-webkit-slider-thumb {
  -webkit-appearance: none !important; width: 22px !important; height: 22px !important; margin-top: -9px !important; border-radius: 50% !important;
  background: radial-gradient(circle at 35% 30%, #fff8e8, #d8b878 70%) !important; border: 2px solid #1a1222 !important;
  box-shadow: 0 0 0 1px #d8b878, 0 4px 14px rgba(216,184,120,.45) !important;
}
.mx-range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8e8, var(--mx-gold) 70%);
  border: 2px solid #1a1222; box-shadow: 0 0 0 1px var(--mx-gold), 0 4px 14px rgba(216,184,120,.45);
}
.mx-foot {
  flex: none; padding: 16px 28px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--mx-line);
  background: linear-gradient(180deg, rgba(13,9,19,.6), #0d0913); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mx-error { color: #f0a6c8; font-size: 13px; text-align: center; }
.mx-cta {
  width: 100%; max-width: 460px; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 22px; border-radius: 18px; border: 1px solid rgba(243,223,174,.6); cursor: pointer;
  background: linear-gradient(135deg, #f6e3b4 0%, #d8b878 45%, #a8803f 100%); color: #1b1206;
  font: 600 15px/1.2 var(--ui-font, Inter, sans-serif); letter-spacing: .02em; text-align: left;
  box-shadow: 0 10px 30px rgba(216,184,120,.28), inset 0 1px 0 rgba(255,255,255,.5);
}
.mx-cta:disabled { cursor: not-allowed; filter: grayscale(.4); }
.mx-price { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(27,18,6,.14); font-weight: 700; white-space: nowrap; }
html body .mx-modal .mx-cancel { background: none !important; border: none !important; box-shadow: none !important; color: rgba(242,236,248,.55); font: 400 14px/1 var(--ui-font, Inter, sans-serif); padding: 8px 16px; cursor: pointer; }
@media (max-width: 768px) {
  html body .modal-overlay.mx-overlay { padding: 0 !important; align-items: flex-end !important; }
  .mx-modal { width: 100%; max-height: calc(var(--app-h, 100vh) - 12px); height: calc(var(--app-h, 100vh) - 12px); border-radius: 26px 26px 0 0; border-bottom: none; }
  .mx-head { padding: 22px 52px 14px; }
  .mx-body { padding: 4px 16px 16px; }
  .mx-grid { grid-template-columns: 1fr; gap: 8px; }
  .mx-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .mx-cta { min-height: 54px; font-size: 14.5px; }
}
html body .mx-modal button#btn-editor-back.mx-cancel { background: none !important; border: 0 !important; outline: none; box-shadow: none !important; }


/* ---------- 9. Список личностей (Мать-Творец) ---------- */
/* цена на розовой кнопке «Создать новую личность» была почти не видна */
html body .soul-create-btn { flex-wrap: wrap; row-gap: 6px !important; }
html body .soul-create-btn .soul-cost { color: #3b1730 !important; background: rgba(255, 255, 255, 0.6) !important; opacity: 1 !important; font-weight: 600; padding: 3px 10px !important; white-space: nowrap; }

@media (max-width: 600px) {
  html body .soul-list-wrap .soul-card { padding: 16px 14px !important; gap: 12px !important; border-radius: 18px !important; margin: 6px 0 !important; }
  html body .soul-list-wrap .soul-card:hover { transform: none !important; }
  html body .soul-card .soul-card-info { flex: 1 1 100% !important; }
  html body .soul-card .soul-card-toggle { flex: 1 1 100% !important; justify-content: space-between; border-radius: 14px !important; padding: 8px 12px !important; }
  /* кнопки: «Войти» на всю ширину, остальные делят строку поровну — ничего не уезжает за край */
  html body .soul-card .soul-card-actions { flex: 1 1 100% !important; display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  html body .soul-card .soul-card-actions .soul-btn { flex: 1 1 0 !important; min-width: 0 !important; margin: 0 !important; padding: 10px 6px !important; font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; justify-content: center; }
  html body .soul-card .soul-card-actions .btn-enter { flex: 1 1 100% !important; order: -1; padding: 12px !important; font-size: 15px !important; font-weight: 600; color: #2a1020 !important; background: linear-gradient(135deg, #f3b6d6, #e9c8f5) !important; border-color: transparent !important; }
  html body .soul-card .soul-app-export-info { flex: 1 1 100% !important; margin: 0 !important; }
  html body .soul-card .soul-delete-link { margin-left: auto; }
  html body .soul-create-btn { flex-direction: column !important; padding: 14px 16px !important; }

  /* подвал документов: одна строка в конце страницы, а не поверх содержимого */
  html body:not(.ui-chat-open) .legal-footer { position: relative !important; bottom: auto !important; box-shadow: none !important; margin-top: 8px; }
  html body:not(.ui-chat-open) .legal-footer { justify-content: center !important; white-space: normal !important; overflow: visible !important; }
  html body .legal-links { flex-wrap: wrap !important; justify-content: center !important; gap: 4px 16px !important; }
  html body .screen:not(#s-chat) { padding-bottom: 24px !important; }

  /* значок суперпользователя меньше и не закрывает заголовки */
  html body #superuser-dashboard { left: 8px !important; top: 8px !important; }
  html body #superuser-dashboard #su-toggle { width: 38px !important; height: 38px !important; border-radius: 12px !important; opacity: 0.8; }
  html body #superuser-dashboard #su-toggle span:first-child { font-size: 12px !important; }
}


/* ── 10. Итог батла: утверждение и результат ─────────────────────────── */
.battle-claim { margin: 0.6rem 0 0.8rem; padding: 0.8rem 1rem; border-radius: 14px;
  background: rgba(167,139,250,0.08); border: 1px solid rgba(167,139,250,0.25); text-align: center; }
.battle-claim-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.battle-claim-topic { margin-top: 0.25rem; font-size: 0.98rem; line-height: 1.4; color: #fff; }
.battle-claim-result { margin-top: 0.55rem; font-size: 1.02rem; font-weight: 600; }
.battle-claim-result.confirmed { color: #7ee2a8; }
.battle-claim-result.refuted { color: #ff8f8f; }
.battle-claim-result.draw { color: #e6c97a; }
.battle-claim-sides { margin-top: 0.35rem; font-size: 0.78rem; color: rgba(255,255,255,0.5); }

/* ── 11. Окно подготовки личности к батлам ────────────────────────────── */
.battle-prep-link { background: none; border: 0; padding: 0 0 0 4px; color: #c9b2ff; font-size: 0.68rem; cursor: pointer; white-space: nowrap; pointer-events: auto; }
.battle-prep-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,0.65); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
@media (min-width: 700px) { .battle-prep-overlay { align-items: center; } }
.battle-prep-modal { width: 100%; max-width: 420px; max-height: calc(100% - 8px); overflow-y: auto; background: #17131f; border: 1px solid rgba(200,160,255,0.35); border-radius: 20px; padding: 20px 18px; color: #eee; font-size: 15px; line-height: 1.45; }
.battle-prep-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #d7c2ff; }
.battle-prep-warn { font-size: 13.5px; color: #f0c987; background: rgba(240,190,90,0.08); border: 1px solid rgba(240,190,90,0.25); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.battle-prep-opt { border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.03); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.battle-prep-opt.active { border-color: rgba(200,160,255,0.75); background: rgba(167,139,250,0.12); }
.battle-prep-opt-title { font-weight: 600; color: #fff; margin-bottom: 4px; }
.battle-prep-opt-text { font-size: 13.5px; color: rgba(255,255,255,0.65); }
.battle-prep-note { font-size: 12px; color: rgba(255,255,255,0.45); margin: 2px 0 14px; }
.battle-prep-actions { display: flex; gap: 10px; }
.battle-prep-actions button { flex: 1; padding: 11px 0; border-radius: 999px; font: inherit; cursor: pointer; }
.battle-prep-cancel { background: none; border: 1px solid rgba(255,255,255,0.2); color: #eee; }
.battle-prep-ok { flex: 1.4 !important; border: 0; background: linear-gradient(90deg,#b98cff,#ff7ac8); color: #140f1c; font-weight: 600; }

/* ── 12. Тренды: итог батла на карточке и демо-вердикт ────────────────── */
.tb-outcome { margin: 0.25rem 0 0.35rem; font-size: 0.86rem; font-weight: 600; }
.tb-outcome.confirmed { color: #7ee2a8; }
.tb-outcome.refuted { color: #ff8f8f; }
.tb-outcome.draw { color: #e6c97a; }
.tb-demo-wrap { display: flex; justify-content: center; align-self: stretch; width: 100%; margin: 0.9rem 0 0.4rem; }
.tb-demo-cta { padding: 0.55rem 1.2rem; }

/* ---------- 13. Карточка личности: нижняя строка «Стереть память» · «Удалить личность» ---------- */
html body .soul-card .soul-card-links { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; }
html body .soul-card .soul-card-links .soul-delete-link { flex: none; margin: 0 4px 0 auto; }
html body .soul-card .soul-memory-link { flex: none; padding: 0; margin: 0 0 0 4px; border: 0; background: transparent; color: rgba(200, 180, 255, 0.6); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; opacity: 0.8; transition: color 0.2s ease, opacity 0.2s ease; }
html body .soul-card .soul-memory-link:hover { color: rgba(225, 210, 255, 0.95); opacity: 1; }

/* ---------- 14. Телефон: подготовка к батлам и таблица очков на арене ---------- */
@media (max-width: 600px) {
  /* подпись «Базовая/Максимальная подготовка» уходит на вторую строку, а не за край карточки */
  html body .soul-card .soul-card-toggle { flex-wrap: wrap !important; row-gap: 4px !important; }
  html body .soul-card .soul-card-toggle .battle-prep-link { flex: 1 1 100%; text-align: left; padding: 0 !important; white-space: normal; }
  /* две колонки очков помещаются в ширину экрана */
  html body .arena-result-view { padding-left: 0.6rem !important; padding-right: 0.6rem !important; }
  html body .score-breakdown-row { gap: 8px !important; padding: 0 !important; }
  html body .score-breakdown-card { min-width: 0; padding: 0.6rem 0.55rem !important; font-size: 0.66rem !important; }
  html body .score-breakdown-card .score-row { text-align: left; gap: 4px !important; }
  html body .score-breakdown-card .score-label { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
  html body .score-breakdown-card .score-total-row { font-size: 0.72rem !important; }
}

/* ---------- 15. Телефон: экран настройки батла и кнопка инвесторов ---------- */
@media (max-width: 600px) {
  /* настройка батла: меньше полей, карточки «За/Против» в ширину экрана, кнопка «В бой» всегда видна */
  html body #battle-arena-modal .arena-stage { height: auto !important; max-height: calc(100dvh - 130px) !important; }
  html body .arena-setup-view { padding: 1.2rem 1rem !important; gap: 1rem !important; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
  html body .arena-role-row { gap: 8px !important; }
  html body .arena-role-card { min-width: 0; padding: 0.75rem 0.7rem !important; }
  html body .arena-role-soul-name { padding-right: 22px; }
  html body .arena-role-badge { font-size: 0.6rem !important; letter-spacing: 0.03em !important; white-space: normal; line-height: 1.3; max-width: 100%; box-sizing: border-box; }
  html body .arena-topic-input, html body #arena-duration { width: 100% !important; box-sizing: border-box; min-width: 0; }
  html body .arena-controls { padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom, 0px)) !important; }
  /* «Готовим информацию» не вылезает за кнопку «Для инвесторов» */
  html body .amb-investor-btn { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
  html body .amb-investor-btn-tag { white-space: normal; }
}
@media (max-width: 600px) {
  /* выбор личности для батла: карточки не шире окна, счётчик побед под именем */
  html body .battle-picker-list { grid-template-columns: minmax(0, 1fr) !important; padding-left: 0 !important; padding-right: 0 !important; width: 100% !important; box-sizing: border-box; }
  html body .battle-pick-card { min-width: 0 !important; width: 100% !important; box-sizing: border-box; flex-wrap: wrap; row-gap: 6px; }
  html body .battle-pick-card-main { min-width: 0; flex: 1 1 100%; }
  /* биржа: заголовок и сортировка друг под другом */
  html body .lux-market-controls { flex-wrap: wrap !important; gap: 10px !important; }
  html body .lux-market-controls .lux-market-sort { flex: 1 1 100%; min-width: 0; width: 100% !important; }
}

/* ---------- 16. Галочка «Рэп-батл» на экране настройки ---------- */
html body .arena-rap-toggle { display: flex; align-items: center; gap: 12px; margin-top: 0.4rem; padding: 10px 14px; border: 1px solid rgba(201, 180, 240, 0.2); border-radius: 14px; background: rgba(255, 255, 255, 0.03); cursor: pointer; text-align: left; }
html body .arena-rap-toggle input { position: absolute; opacity: 0; pointer-events: none; }
html body .arena-rap-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid rgba(201, 180, 240, 0.45); display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
html body .arena-rap-toggle input:checked + .arena-rap-box { background: #c9b4f0; border-color: #c9b4f0; }
html body .arena-rap-toggle input:checked + .arena-rap-box::after { content: '✓'; color: #1a0f2a; font-size: 14px; font-weight: 700; }
html body .arena-rap-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html body .arena-rap-text b { color: rgba(255, 255, 255, 0.9); font-size: 0.9rem; font-weight: 600; }
html body .arena-rap-text small { color: var(--muted); font-size: 0.72rem; line-height: 1.3; }
