﻿:root {
  --bg: #08080a;
  --panel: #151217;
  --panel-2: #1e171e;
  --ink: #fff5f7;
  --muted: rgba(255, 245, 247, 0.68);
  --accent: #a855f7;
  --accent-rgb: 168, 85, 247;
  --accent-dark-rgb: 67, 20, 92;
  --accent-2: #d8b4fe;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(70, 18, 92, 0.54), rgba(8, 8, 10, 0.94) 56%, rgba(88, 12, 48, 0.4)),
    url("assets/chat-background.png") center / cover no-repeat,
    var(--bg);
}

body {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: transparent !important;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body.creator-mode {
  overflow: auto;
}

body.copy-locked,
body.copy-locked *:not(input):not(textarea):not(select) {
  -webkit-user-select: none;
  user-select: none;
}

body.copy-locked img,
body.copy-locked video {
  -webkit-user-drag: none;
  user-drag: none;
}

body.print-locked::after {
  content: "Copie et impression désactivées.";
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: #08080a;
  color: #fff;
  font-size: clamp(20px, 4vw, 42px);
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}

@media print {
  body.copy-locked * {
    visibility: hidden !important;
  }

  body.copy-locked::before {
    content: "Impression désactivée.";
    visibility: visible !important;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    color: #000;
    background: #fff;
    font: 700 24px Arial, sans-serif;
  }
}

body.setup-active {
  overflow: hidden;
}

body.setup-active .mode-bar {
  display: none;
}

body.setup-tab-preferences [data-admin-entry],
body.setup-tab-preferences [data-chat-home],
body.setup-tab-preferences [data-creator-toggle] {
  display: none;
}

body.preferences-page-active .topbar,
body.preferences-page-active .quick-persona-head,
body.preferences-page-active .setup-logo-stage,
body.preferences-page-active .setup-tabs,
body.preferences-page-active [data-setup-panel],
body.preferences-page-active [data-help-panel],
body.preferences-page-active [data-contact-panel],
body.preferences-page-active [data-member-account-panel],
body.preferences-page-active [data-session-images-panel],
body.preferences-page-active .quick-persona-grid,
body.preferences-page-active .setup-start-row,
body.preferences-page-active .setup-card:not(.settings-panel) {
  display: none !important;
}

body.auth-page-active .setup-tabs,
body.auth-page-active [data-setup-panel],
body.auth-page-active [data-help-panel],
body.auth-page-active [data-contact-panel],
body.auth-page-active [data-payment-panel],
body.auth-page-active [data-auth-entry],
body.auth-page-active .panel-head,
body.auth-page-active .scene-status,
body.auth-page-active .player-voice-bar,
body.auth-page-active .presence-strip,
body.auth-page-active .hypnosis-stage,
body.auth-page-active .messages,
body.auth-page-active .chat-input-hint,
body.auth-page-active .composer,
body.auth-page-active .setup-start-row,
body.auth-page-active .main-lower-logo {
  display: none !important;
}

body.auth-page-active .chat-panel {
  overflow: auto;
}

body.auth-page-active [data-member-account-panel] {
  display: block !important;
  position: relative;
  max-width: min(1280px, calc(100vw - 28px));
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin: 2px auto 0;
  padding: 8px 12px 10px;
}

body.auth-page-active .auth-layout {
  display: grid !important;
  grid-template-columns: minmax(430px, 1fr) minmax(330px, 0.88fr);
  align-items: stretch;
  gap: 14px 18px;
  width: 100%;
  max-width: min(1040px, 100%);
  margin: 0 auto;
}

body.auth-page-active .auth-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

body.member-session-active.auth-page-active [data-member-login-form],
body.member-session-active.auth-page-active [data-member-account-form],
body.member-session-active.auth-page-active [data-member-verify-form] {
  display: none !important;
}

body.help-page-active .setup-tabs,
body.help-page-active [data-setup-panel],
body.help-page-active [data-contact-panel],
body.help-page-active [data-payment-panel],
body.help-page-active [data-member-account-panel],
body.help-page-active .panel-head,
body.help-page-active .scene-status,
body.help-page-active .player-voice-bar,
body.help-page-active .presence-strip,
body.help-page-active .hypnosis-stage,
body.help-page-active .messages,
body.help-page-active .chat-input-hint,
body.help-page-active .composer,
body.help-page-active .setup-start-row,
body.help-page-active .main-lower-logo {
  display: none !important;
}

body.help-page-active .chat-panel {
  overflow: auto;
}

body.help-page-active .chat-panel > :not(.quick-persona-panel),
body.help-page-active .quick-persona-panel > :not(.quick-persona-head):not([data-help-panel]) {
  display: none !important;
}

body.help-page-active [data-help-panel] {
  display: grid !important;
  width: 100%;
  margin: 14px 0 0;
}

body.about-page-active .setup-tabs,
body.about-page-active [data-setup-panel],
body.about-page-active [data-contact-panel],
body.about-page-active [data-help-panel],
body.about-page-active [data-payment-panel],
body.about-page-active [data-member-account-panel],
body.about-page-active .panel-head,
body.about-page-active .scene-status,
body.about-page-active .player-voice-bar,
body.about-page-active .presence-strip,
body.about-page-active .hypnosis-stage,
body.about-page-active .messages,
body.about-page-active .chat-input-hint,
body.about-page-active .composer,
body.about-page-active .setup-start-row,
body.about-page-active .main-lower-logo {
  display: none !important;
}

body.about-page-active .chat-panel {
  overflow: auto;
}

body.about-page-active .chat-panel > :not(.quick-persona-panel),
body.about-page-active .quick-persona-panel > :not(.quick-persona-head):not([data-about-panel]) {
  display: none !important;
}

body.about-page-active [data-about-panel] {
  display: grid !important;
  width: 100%;
  margin: 14px 0 0;
}

body.contact-page-active .setup-tabs,
body.contact-page-active [data-setup-panel],
body.contact-page-active [data-help-panel],
body.contact-page-active [data-about-panel],
body.contact-page-active [data-toys-panel],
body.contact-page-active [data-payment-panel],
body.contact-page-active [data-member-account-panel],
body.contact-page-active .panel-head,
body.contact-page-active .scene-status,
body.contact-page-active .player-voice-bar,
body.contact-page-active .presence-strip,
body.contact-page-active .hypnosis-stage,
body.contact-page-active .messages,
body.contact-page-active .chat-input-hint,
body.contact-page-active .composer,
body.contact-page-active .setup-start-row,
body.contact-page-active .main-lower-logo {
  display: none !important;
}

body.contact-page-active .chat-panel {
  overflow: auto;
}

body.contact-page-active .chat-panel > :not(.quick-persona-panel),
body.contact-page-active .quick-persona-panel > :not(.quick-persona-head):not([data-contact-panel]) {
  display: none !important;
}

body.contact-page-active [data-contact-panel] {
  display: grid !important;
  width: min(860px, 100%);
  margin: 14px auto 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: calc(100dvh - 118px);
  overflow: hidden;
}

/* The contact panel has a heading, an introduction and a form.  It must own
   its scrolling area instead of inheriting the two-row help-panel layout. */
body.contact-page-active [data-contact-panel] .contact-form {
  min-height: 0;
  overflow: auto;
  padding: 0 6px 4px 0;
}

body.toys-page-active .setup-tabs,
body.toys-page-active [data-setup-panel],
body.toys-page-active [data-contact-panel],
body.toys-page-active [data-help-panel],
body.toys-page-active [data-about-panel],
body.toys-page-active [data-payment-panel],
body.toys-page-active [data-member-account-panel],
body.toys-page-active .panel-head,
body.toys-page-active .scene-status,
body.toys-page-active .player-voice-bar,
body.toys-page-active .presence-strip,
body.toys-page-active .hypnosis-stage,
body.toys-page-active .messages,
body.toys-page-active .chat-input-hint,
body.toys-page-active .composer,
body.toys-page-active .setup-start-row,
body.toys-page-active .main-lower-logo {
  display: none !important;
}

body.toys-page-active .chat-panel {
  overflow: auto;
}

body.toys-page-active .chat-panel > :not(.quick-persona-panel),
body.toys-page-active .quick-persona-panel > :not(.quick-persona-head):not([data-toys-panel]) {
  display: none !important;
}

body.toys-page-active [data-toys-panel] {
  display: grid !important;
  width: 100%;
  margin: 14px 0 0;
}

body.payment-page-active .setup-tabs,
body.payment-page-active [data-setup-panel],
body.payment-page-active [data-contact-panel],
body.payment-page-active [data-help-panel],
body.payment-page-active [data-about-panel],
body.payment-page-active [data-toys-panel],
body.payment-page-active [data-member-account-panel],
body.payment-page-active .panel-head,
body.payment-page-active .scene-status,
body.payment-page-active .player-voice-bar,
body.payment-page-active .presence-strip,
body.payment-page-active .hypnosis-stage,
body.payment-page-active .messages,
body.payment-page-active .chat-input-hint,
body.payment-page-active .composer,
body.payment-page-active .setup-start-row,
body.payment-page-active .main-lower-logo {
  display: none !important;
}

body.payment-page-active .chat-panel {
  overflow: auto;
}

body.payment-page-active .chat-panel > :not(.quick-persona-panel),
body.payment-page-active .quick-persona-panel > :not(.quick-persona-head):not([data-payment-panel]) {
  display: none !important;
}

body.payment-page-active [data-payment-panel] {
  display: grid !important;
  width: min(1180px, 100%);
  margin: 14px auto 0;
}

body.preferences-page-active .chat-panel {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

body.preferences-page-active .quick-persona-panel {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.preferences-page-active .app-shell {
  width: min(1480px, calc(100% - 28px));
  height: 100dvh;
  min-height: 0;
  padding: 10px 0;
  overflow: hidden;
}

body.preferences-page-active.setup-active .app-shell {
  height: 100dvh;
  min-height: 0;
}

body.age-gate-active {
  overflow: hidden;
}

body.age-gate-active .app-shell {
  display: none;
}

body,
body.creator-mode,
body.setup-active,
body.preferences-page-active,
body.auth-page-active,
body.payment-page-active,
body.age-gate-active {
  background: transparent !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

.hypnosis-start-main {
  border-color: rgba(var(--accent-rgb), 0.9);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-dark-rgb), 0.95));
  color: #fff;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 0 18px rgba(var(--accent-rgb), 0.42);
}

.app-shell {
  width: min(1480px, calc(100% - 28px));
  height: 100dvh;
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.creator-mode .app-shell {
  height: auto;
  min-height: 100dvh;
}

.setup-active .app-shell {
  height: auto;
  min-height: 100dvh;
}

.chat-active .app-shell {
  width: min(1600px, calc(100% - 24px));
  height: 100dvh;
  min-height: 0;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

body.setup-active .topbar,
body.auth-page-active .topbar,
body.preferences-page-active .topbar {
  display: none !important;
}

.mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
}

.mode-bar strong,
.mode-bar span {
  display: block;
}

.mode-bar strong {
  margin-bottom: 2px;
}

.mode-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.api-pill {
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.api-pill.is-ok {
  border-color: rgba(var(--accent-rgb), 0.5);
  color: #b8fff3;
}

.api-pill.is-error {
  border-color: rgba(225, 29, 72, 0.7);
  color: #ffd0dc;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  flex: 1;
  min-height: 0;
}

.creator-mode .layout {
  display: none;
}

.creator-mode.profile-open .layout {
  display: block;
}

.creator-page {
  display: block;
}

.creator-page.is-hidden {
  display: none !important;
}

.creator-page-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 180px),
    var(--panel);
  box-shadow: var(--shadow);
}

.creator-page-head h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.creator-page-head p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.creator-tool-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.creator-tool-tabs button,
.creator-tool-overview button {
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 8px;
  background: rgba(8, 6, 10, 0.78);
  color: var(--ink);
  font-weight: 900;
  min-height: 44px;
}

.creator-tool-tabs button.is-active,
.creator-tool-overview button:hover {
  border-color: rgba(var(--accent-rgb), 0.95);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.86), rgba(var(--accent-dark-rgb), 0.92));
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.28);
}

.creator-tool-intro,
.creator-tool-overview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  margin-bottom: 14px;
}

.creator-tool-intro {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.creator-tool-intro strong {
  font-size: 18px;
}

.creator-tool-intro span {
  color: var(--muted);
  font-weight: 800;
}

.creator-tool-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  padding: 12px;
}

.creator-tool-overview button {
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 14px;
  min-height: 96px;
  text-align: left;
}

.creator-tool-overview span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.creator-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.8fr);
  gap: 14px;
  align-items: start;
}

body.creator-tool-image-generator .creator-page-grid,
body.creator-tool-image-bank .creator-page-grid,
body.creator-tool-comfy .creator-page-grid,
body.creator-tool-hypno-images .creator-page-grid,
body.creator-tool-overview .creator-page-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.creator-tool-overview .creator-page-grid {
  display: none;
}

.creator-images,
.creator-settings {
  display: grid;
  gap: 14px;
}

.member-admin-panel,
.admin-promo-form {
  display: grid;
  gap: 12px;
}

.admin-members-summary {
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(var(--accent-rgb), 0.08);
  font-weight: 900;
}

.admin-members-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.admin-member-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.24);
}

.admin-member-card h4,
.admin-member-card p {
  margin: 0;
}

.admin-member-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.member-menu-optin {
  margin: 7px 0;
  padding: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 220px),
    var(--panel);
  box-shadow: var(--shadow);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.settings-panel,
.chat-panel,
.image-panel {
  padding: 14px;
}

.settings-panel {
  display: none;
  gap: 16px;
  position: fixed;
  z-index: 45;
  top: 14px;
  left: 14px;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(225, 29, 72, 0.7) rgba(0, 0, 0, 0.2);
}

.profile-open .settings-panel {
  display: grid;
}

.preferences-page-active .settings-panel {
  position: static;
  display: grid;
  width: 100%;
  max-height: none;
  overflow: visible;
}

.preferences-page-active .profile-logo-stage {
  display: none;
}

.preferences-page-active .profile-head [data-profile-close],
.preferences-page-active .profile-bottom-actions [data-profile-close] {
  display: none;
}

.profile-visitor-exit {
  display: none;
}

body.preferences-page-active:not(.profile-return-auth):not(.member-session-active) .profile-visitor-exit {
  display: inline-flex;
}

.profile-return-auth.preferences-page-active .profile-head [data-profile-close],
.profile-return-auth.preferences-page-active .profile-bottom-actions [data-profile-close] {
  display: inline-flex;
}

.preferences-page-active .settings-panel {
  border-color: rgba(var(--accent-rgb), 0.34);
}

.preferences-page-active .profile-head {
  align-items: start;
  margin-bottom: 8px;
}

.profile-language-picker,
.age-language-picker {
  margin-left: auto;
  justify-self: end;
}

.age-language-picker {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: fit-content;
}

.language-picker select {
  max-width: 150px;
}

.preferences-page-active .profile-intro {
  margin: 4px 0 8px;
}

.preferences-page-active .profile-bottom-actions {
  position: sticky;
  bottom: 8px;
  z-index: 8;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 0 0;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 10, 0.94) 24%);
}

.profile-enter-chat {
  min-width: min(360px, 100%);
  border-color: rgba(var(--accent-rgb), 0.82);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-dark-rgb), 0.95));
  color: #fff;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.26);
}

.profile-enter-chat:disabled,
.profile-enter-chat.is-disabled {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(90, 90, 96, 0.72), rgba(46, 46, 52, 0.72));
  color: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(0.75);
}

.preference-lexicon {
  margin: 0 0 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.26);
}

.preference-lexicon summary {
  cursor: pointer;
  color: rgb(var(--accent-rgb));
  font-weight: 800;
}

.preference-lexicon p {
  margin: 8px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.45;
}

.preference-lexicon-row {
  justify-content: flex-start;
  margin: 0 0 10px;
}

.preference-lexicon-page {
  position: fixed;
  inset: clamp(12px, 2vh, 24px) clamp(12px, 3vw, 48px);
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  max-width: min(1280px, calc(100vw - 24px));
  margin: 0 auto;
  border: 1px solid rgba(var(--accent-rgb), 0.46);
  border-radius: 10px;
  padding: clamp(14px, 2vw, 24px);
  background:
    linear-gradient(180deg, rgba(22, 8, 30, 0.96), rgba(7, 5, 10, 0.98)),
    rgba(0, 0, 0, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72), 0 0 42px rgba(var(--accent-rgb), 0.14);
}

.preference-lexicon-page.is-hidden {
  display: none !important;
}

.preference-lexicon-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.preference-lexicon-page-head h2 {
  margin: 0;
  color: #fff;
}

.preference-lexicon-content {
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 18px 0;
  color: var(--ink);
  font-size: clamp(15px, 1.05vw, 18px);
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
}

.profile-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0, 0, 0, 0.62);
}

.profile-head,
.quick-persona-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.profile-head h2,
.quick-persona-head h2 {
  margin-bottom: 4px;
}

.quick-persona-panel {
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  background:
    linear-gradient(90deg, rgba(225, 29, 72, 0.13), transparent 52%),
    rgba(0, 0, 0, 0.22);
}

.home-logo-stage {
  display: flex;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 2px 0 8px;
}

.home-logo-stage img {
  display: block;
  width: min(760px, 96%);
  max-height: clamp(260px, 50vh, 640px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 26px rgba(180, 55, 255, 0.32))
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.48));
}

.quick-persona-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.setup-account-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.setup-left-actions {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.setup-page-title {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.setup-left-actions button,
.setup-account-actions > button,
.auth-page-head button {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.9), rgba(var(--accent-dark-rgb), 0.88));
  color: #fff;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.24);
}

.setup-account-actions button.is-active,
.setup-tabs button.is-active {
  border-color: rgba(var(--accent-rgb), 0.9);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-dark-rgb), 0.95));
  color: #fff;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.32);
}

.member-avatar {
  width: auto;
  min-width: 86px;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.member-avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(220px, 78vw);
  padding: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background: rgba(8, 6, 12, 0.96);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
}

.member-avatar-menu button {
  width: 100%;
}

.login-confirmation {
  margin: 8px 0 10px auto;
  width: fit-content;
  max-width: min(520px, 100%);
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  border-radius: 8px;
  background: rgba(15, 9, 24, 0.92);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18);
}

.auth-panel-head,
.site-help-head,
.site-about-head,
.site-help-lexicon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-panel-head {
  margin: 0 0 14px;
}

.site-help-panel,
.site-about-panel,
.site-toys-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100dvh - 118px);
  overflow: hidden;
}

.site-help-head,
.site-about-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.site-help-body,
.site-about-body,
.site-toys-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 6px 4px 0;
}

.site-about-body {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 0.75fr);
  gap: 22px;
  align-items: stretch;
}

.site-about-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.site-about-copy p {
  margin: 0;
  line-height: 1.55;
  color: rgba(255, 245, 247, 0.92);
}

.about-suggestions-button {
  justify-self: start;
  margin-top: 2px;
}

.about-logo-stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.about-logo-stage img {
  width: min(100%, 520px);
  max-height: min(54vh, 540px);
  object-fit: contain;
}

.about-actions {
  grid-column: 1 / -1;
  justify-content: center;
  margin-top: 4px;
}

.site-help-intro {
  margin: 0 0 12px;
  color: #fff;
}

.site-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.site-help-topic,
.site-help-lexicon {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 4, 8, 0.42);
}

.site-help-topic {
  padding: 12px;
}

.site-help-topic h4,
.site-help-lexicon h4 {
  margin: 0 0 8px;
  color: #fff;
}

.site-help-topic p {
  margin: 0;
  line-height: 1.45;
}

.site-help-lexicon {
  margin-top: 12px;
  padding: 12px;
}

.site-help-lexicon-content {
  max-height: min(54dvh, 620px);
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--ink);
}

.purchase-notice {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.64);
}

.purchase-notice-box {
  position: relative;
  width: min(460px, 94vw);
  padding: 24px 26px 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.62);
  border-radius: 8px;
  background: rgba(11, 7, 16, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62), 0 0 28px rgba(var(--accent-rgb), 0.22);
  text-align: center;
}

.purchase-notice-box h3 {
  margin: 0 0 10px;
  color: #fff;
}

.purchase-notice-box p {
  margin: 0;
  line-height: 1.5;
}

.purchase-notice-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.setup-logo-stage {
  display: grid;
  place-items: center;
  margin: 10px auto 14px;
  pointer-events: none;
}

.setup-logo-stage img {
  display: block;
  width: min(430px, 62vw);
  max-height: clamp(170px, 27vh, 310px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 22px rgba(186, 70, 255, 0.28))
    drop-shadow(0 12px 26px rgba(0, 0, 0, 0.42));
}

.main-lower-logo {
  display: grid;
  place-items: center;
  min-height: clamp(120px, 24vh, 320px);
  margin: 2px auto 4px;
  overflow: hidden;
  pointer-events: none;
}

.main-lower-logo img {
  display: block;
  width: min(960px, 98%);
  height: min(32vh, 390px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 24px rgba(186, 70, 255, 0.32))
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.46));
}

body.preferences-page-active .main-lower-logo,
body.chat-active .main-lower-logo,
body.hypnosis-active .main-lower-logo,
body.creator-mode .main-lower-logo {
  display: none;
}

.setup-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.setup-tabs [data-setup-tab="chat"] {
  order: 1;
}

.setup-tabs [data-setup-tab="hypnosis"] {
  order: 2;
}

.setup-tabs [data-setup-tab="sessionImages"] {
  order: 3;
}

.setup-tabs [data-setup-tab="preferences"] {
  order: 4;
}

.setup-tabs button,
.setup-start-button {
  min-height: 44px;
  font-weight: 900;
}

.setup-tab-panel {
  display: none;
}

.setup-tab-panel.is-active {
  display: block;
}

.setup-tab-panel[data-setup-panel="preferences"] [data-profile-toggle-inline] {
  margin-top: 16px;
}

body:not(.chat-subview-create) [data-member-persona-live],
body:not(.chat-subview-own) [data-member-persona-own-panel],
body:not(.chat-subview-community) [data-member-persona-public-panel] {
  display: none !important;
}

body.chat-subview-own .setup-tabs,
body.chat-subview-create .setup-tabs,
body.chat-subview-own .login-confirmation,
body.chat-subview-create .login-confirmation,
body.chat-subview-own [data-help-panel],
body.chat-subview-create [data-help-panel],
body.chat-subview-own [data-contact-panel],
body.chat-subview-create [data-contact-panel],
body.chat-subview-own [data-member-account-panel],
body.chat-subview-create [data-member-account-panel],
body.chat-subview-own [data-session-images-panel],
body.chat-subview-create [data-session-images-panel],
body.chat-subview-own [data-chat-section-title],
body.chat-subview-create [data-chat-section-title],
body.chat-subview-own [data-official-persona-grid],
body.chat-subview-create [data-official-persona-grid],
body.chat-subview-own [data-chat-main-buttons],
body.chat-subview-create [data-chat-main-buttons],
body.chat-subview-own [data-quick-ensemble-picker],
body.chat-subview-create [data-quick-ensemble-picker],
body.chat-subview-community .setup-tabs,
body.chat-subview-community .login-confirmation,
body.chat-subview-community [data-help-panel],
body.chat-subview-community [data-contact-panel],
body.chat-subview-community [data-member-account-panel],
body.chat-subview-community [data-session-images-panel],
body.chat-subview-community [data-chat-section-title],
body.chat-subview-community [data-official-persona-grid],
body.chat-subview-community [data-chat-main-buttons],
body.chat-subview-community [data-quick-ensemble-picker],
body.chat-subview-community [data-member-persona-live] {
  display: none !important;
}

body.chat-subview-own .app-shell,
body.chat-subview-create .app-shell,
body.chat-subview-community .app-shell {
  width: min(1280px, calc(100% - 28px));
  height: 100dvh;
  padding: 14px 0;
}

body.chat-subview-own .quick-persona-panel,
body.chat-subview-create .quick-persona-panel,
body.chat-subview-community .quick-persona-panel {
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.chat-subview-own .quick-persona-head,
body.chat-subview-create .quick-persona-head,
body.chat-subview-community .quick-persona-head {
  display: flex;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(225, 29, 72, 0.13), transparent 52%),
    rgba(0, 0, 0, 0.22);
}

body.chat-subview-own [data-setup-panel="chat"],
body.chat-subview-create [data-setup-panel="chat"],
body.chat-subview-community [data-setup-panel="chat"] {
  height: 100%;
}

body.chat-subview-create [data-member-persona-live],
body.chat-subview-own [data-member-persona-own-panel],
body.chat-subview-community [data-member-persona-public-panel],
body.chat-subview-create [data-member-persona-live].is-active,
body.chat-subview-own [data-member-persona-own-panel].is-active,
body.chat-subview-community [data-member-persona-public-panel].is-active {
  display: grid !important;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100dvh - 28px);
  margin: 0;
  padding: 20px;
}

body.chat-subview-create [data-member-persona-live] > summary {
  display: none;
}

body.chat-subview-create .member-create-back {
  justify-content: center;
  order: 3;
  /* Keep the return button visibly separated from the form and slightly higher in the viewport. */
  margin: 20px 0 28px;
}

body.chat-subview-create .member-create-back button {
  min-width: 180px;
  border-color: rgba(var(--accent-rgb), 0.78);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-dark-rgb), 0.92));
  color: #fff;
  font-weight: 900;
}

.site-help-panel {
  margin: 10px 0 12px;
}

.site-help-panel p,
.site-toys-panel p {
  margin: 8px 0;
  line-height: 1.45;
}

.session-images-panel {
  display: none;
  margin: 10px 0 12px;
}

.setup-tab-chat .session-images-panel {
  display: none;
}

.setup-tab-session-images .session-images-panel.is-active {
  display: block;
}

.session-images-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.session-images-head h3,
.session-images-head p {
  margin: 0;
}

.session-images-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.session-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.session-image-card {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  text-align: left;
}

.session-image-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #050405;
}

.session-image-card span {
  overflow: hidden;
  color: rgba(255, 235, 244, 0.84);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-mode-panel {
  margin-top: 12px;
}

.setup-start-button {
  width: min(280px, 100%);
}

.chat-main-buttons {
  display: grid;
  grid-column: span 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  align-self: start;
  gap: 18px;
  margin: 0;
  width: 100%;
}

.chat-main-buttons .setup-start-button {
  width: 100%;
  min-height: 58px;
}

.chat-main-buttons [data-chat-start-official] {
  margin-bottom: 0;
}

.setup-start-button.is-hidden {
  display: none !important;
}

.quick-persona-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin-top: 10px;
}

.persona-grid.quick-persona-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.quick-persona-grid .persona-card img {
  height: clamp(150px, 22vh, 240px);
  aspect-ratio: auto;
  object-fit: contain;
}

.quick-ensemble-picker {
  grid-template-columns: 1fr;
  align-items: center;
}

.quick-ensemble-picker h3,
.quick-ensemble-picker p {
  grid-column: 1 / -1;
}

[data-creator-tool] {
  display: none !important;
}

.creator-mode [data-creator-tool] {
  display: revert !important;
}

.creator-mode section[data-creator-tool],
.creator-mode .panel[data-creator-tool] {
  display: block !important;
}

.creator-mode .api-pill[data-creator-tool] {
  display: block !important;
}

.creator-mode button[data-creator-tool] {
  display: inline-flex !important;
}

.is-hidden {
  display: none !important;
}

.creator-mode [data-creator-tool].is-hidden {
  display: none !important;
}

.creator-mode [data-creator-image-section][hidden] {
  display: none !important;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.persona-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  text-align: left;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.persona-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.86);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.22);
}

.persona-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.56);
  background: rgba(255, 255, 255, 0.055);
}

.persona-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.persona-card span,
.persona-card small,
.field span {
  color: rgba(255, 245, 247, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.persona-card small {
  color: rgba(117, 255, 240, 0.86);
  font-size: 11px;
  line-height: 1.2;
}

.ensemble-picker {
  display: none;
  margin-top: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.24);
}

.ensemble-picker.is-open {
  display: grid;
  gap: 8px;
}

.ensemble-picker h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.ensemble-picker p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-persona-panel {
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.setup-card {
  margin-top: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), transparent 82%),
    rgba(0, 0, 0, 0.2);
}

.setup-section-title {
  margin: 14px 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.member-account-panel summary,
.member-persona-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

body.auth-page-active .member-account-panel > summary {
  display: none;
}

.member-account-form h3,
.member-verify-form h3,
.liberty-pack-info h3 {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  margin: 0 0 9px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.36);
}

.member-account-form,
.member-verify-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 0;
}

.member-verify-intro {
  margin: 0;
  color: rgba(255, 245, 247, 0.9);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.register-flow-intro {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid rgba(var(--accent-rgb), 0.82);
  border-radius: 0 7px 7px 0;
  color: rgba(255, 245, 247, 0.92);
  background: rgba(var(--accent-rgb), 0.1);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.42;
}

.register-details-title {
  margin: 2px 0 -1px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.register-account-step {
  display: grid;
  gap: 8px;
}

.member-account-form + .member-account-form {
  margin-top: 0;
}

body.auth-page-active .auth-panel-head {
  grid-area: head;
}

body.auth-page-active [data-member-login-form] {
  grid-area: login;
}

body.auth-page-active [data-password-change-form] {
  grid-area: login;
}

body.auth-page-active [data-member-account-form] {
  grid-area: signup;
}

body.auth-page-active [data-member-login-form],
body.auth-page-active [data-member-account-form],
body.auth-page-active [data-password-change-form],
body.auth-page-active [data-member-verify-form] {
  min-width: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.18);
}

body.auth-page-active [data-member-verify-form] {
  grid-area: verify;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  border-color: rgba(var(--accent-rgb), 0.7);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.16), rgba(0, 0, 0, 0.2)),
    rgba(0, 0, 0, 0.26);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.16);
}

body.auth-page-active [data-member-verify-form] > * {
  min-width: 0;
}

body.auth-page-active [data-member-verify-form] .field span {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

body.auth-page-active [data-member-verification-code] {
  border-color: rgba(var(--accent-rgb), 0.82);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.24);
}

body.auth-page-active [data-member-account-status] {
  grid-area: status;
}

body.auth-page-active .field {
  gap: 4px;
}

body.auth-page-active .field input,
body.auth-page-active .field select {
  min-height: 32px;
  padding: 6px 9px;
}

body.auth-page-active .button-row {
  gap: 7px;
}

body.auth-page-active .button-row button,
body.auth-page-active [data-member-verify-form] button,
body.auth-page-active .field-button button {
  min-height: 32px;
  padding: 6px 10px;
}

body.auth-page-active .field-button > span {
  display: none;
}

body.auth-page-active .field-button {
  justify-content: end;
  align-self: end;
}

body.auth-page-active .liberty-pack-info {
  align-self: start;
  position: static;
}

body.auth-page-active [data-member-subscription] {
  align-self: start;
}

.member-subscription {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.payment-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-option-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

body.auth-page-active .auth-left .payment-choice-row {
  grid-template-columns: 1fr;
  gap: 6px;
}

.payment-choice-row button {
  width: 100%;
}

.payram-checkout-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 2px;
  padding: 7px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  border-radius: 7px;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  background: rgba(var(--accent-rgb), 0.2);
}

.payram-checkout-link:hover,
.payram-checkout-link:focus-visible {
  border-color: rgba(var(--accent-rgb), 1);
  background: rgba(var(--accent-rgb), 0.34);
}

.payram-pending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.payram-dismiss-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 212, 226, 0.52);
  border-radius: 10px;
  color: #ffe9f1;
  background: rgba(97, 24, 58, 0.34);
  font: inherit;
  font-weight: 800;
}

.payram-dismiss-button:hover,
.payram-dismiss-button:focus-visible {
  border-color: rgba(255, 212, 226, 0.95);
  background: rgba(132, 33, 77, 0.52);
}

.payment-option-button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 9px 12px;
  place-items: center;
  text-align: center;
}

.payment-option-button--payram {
  min-height: 92px;
}

body.auth-page-active .auth-left .payment-option-button {
  min-height: 58px;
  padding: 7px 9px;
}

body.auth-page-active .auth-left .payment-option-button--payram {
  min-height: 84px;
}

.payment-option-button span,
.payment-option-button small {
  color: var(--muted);
  line-height: 1.3;
}

.payment-option-button small {
  font-size: 12px;
}

.payment-option-button .payment-option-secure {
  color: var(--accent);
  font-weight: 900;
}

.payment-options-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.payment-options-copy {
  display: grid;
  gap: 16px;
  margin: 12px 0 16px;
}

.auth-page-head {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 0;
}

.auth-page-head h2,
.auth-page-head p,
.liberty-pack-info p {
  margin: 0;
}

.auth-page-head p,
.liberty-pack-info p {
  color: var(--muted);
  line-height: 1.55;
}

.liberty-pack-info {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
}

.register-trial-note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.auth-logo-stage {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(150px, 24vh, 260px);
  margin: 8px 0 0;
  padding: 4px 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-logo-stage img {
  display: block;
  width: min(520px, 100%);
  max-height: clamp(150px, 24vh, 250px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 20px rgba(186, 70, 255, 0.28))
    drop-shadow(0 10px 20px rgba(0, 0, 0, 0.42));
}

body.auth-page-active .register-captcha {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 8px;
}

body.auth-page-active .register-captcha .field:first-child {
  min-width: 0;
}

body.auth-page-active .register-preferences-callout {
  margin: 5px 0 6px;
  padding: 7px 9px;
}

body.auth-page-active .register-preferences-callout h4 {
  margin-bottom: 4px;
  font-size: 13px;
}

body.auth-page-active .register-preferences-callout p {
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.25;
}

body.auth-page-active .register-preferences-callout.is-complete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 10px;
  margin: 0 0 5px;
}

body.auth-page-active .register-preferences-callout.is-complete h4 {
  display: none;
}

body.auth-page-active .register-preferences-callout.is-complete p {
  grid-column: 1;
  margin: 0;
}

body.auth-page-active .register-preferences-callout.is-complete button {
  grid-column: 2;
  grid-row: 1;
}

.liberty-pack-info [data-plan-description] {
  display: grid;
  gap: 7px;
}

.payment-security-note {
  margin: 0 0 16px;
  padding: 7px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  text-align: center;
}

.payment-age-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.payment-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: stretch;
}

.site-payment-panel .member-subscription {
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 180px),
    rgba(0, 0, 0, 0.22);
}

.payment-logo-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  pointer-events: none;
}

.payment-logo-stage img {
  display: block;
  width: min(380px, 92%);
  max-height: 260px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 22px rgba(186, 70, 255, 0.3))
    drop-shadow(0 12px 22px rgba(0, 0, 0, 0.46));
}

.plan-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.plan-choice {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background: rgba(11, 5, 16, 0.92);
  color: var(--ink);
  text-align: left;
}

.plan-choice span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.plan-choice.is-active {
  border-color: rgba(var(--accent-rgb), 0.95);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.5), rgba(49, 8, 70, 0.58));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.34);
}

.site-copyright {
  position: fixed;
  left: 14px;
  bottom: 8px;
  z-index: 30;
  color: rgba(245, 236, 255, 0.62);
  font-size: 11px;
  line-height: 1.2;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.82);
}

@media (max-width: 1120px) {
  body.auth-page-active.setup-active .chat-panel,
  body.auth-page-active .quick-persona-panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.auth-page-active .auth-layout {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 64px);
    overflow: auto;
    padding: 10px;
  }

  body.auth-page-active [data-member-verify-form] {
    grid-template-columns: 1fr;
  }

  .auth-logo-stage {
    min-height: 120px;
  }

  .auth-logo-stage img {
    width: min(420px, 88%);
    max-height: 120px;
  }

  .plan-choice-row,
  .payment-choice-row {
    grid-template-columns: 1fr;
  }

  .payment-page-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body.auth-page-active [data-member-account-form] .grid-2,
  body.auth-page-active .register-captcha {
    grid-template-columns: minmax(0, 1fr);
  }

  body.auth-page-active .register-captcha .field-button {
    justify-self: stretch;
    align-self: stretch;
  }

  body.auth-page-active .register-captcha .field-button button {
    width: 100%;
  }

  body.auth-page-active .register-preferences-callout.is-complete {
    grid-template-columns: minmax(0, 1fr);
  }

  body.auth-page-active .register-preferences-callout.is-complete button {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }
}

.setup-mode-panel {
  display: grid;
  gap: 10px;
}

.setup-mode-panel h3 {
  margin: 0;
  font-size: 15px;
}

.setup-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.setup-mode-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.32);
  font-weight: 900;
}

.register-preferences-callout {
  margin: 12px 0 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  border-radius: 8px;
  padding: 12px;
  background: rgba(var(--accent-rgb), 0.08);
}

.captcha-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  margin: 5px 0;
  padding: 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.7);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 36%),
    rgba(0, 0, 0, 0.65);
}

.captcha-art.is-loading {
  opacity: 0.72;
}

.captcha-image {
  display: block;
  width: min(100%, 310px);
  height: auto;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
}

.captcha-glyph {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: #fff;
  color: #18081f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-shadow: none;
  box-shadow: inset 0 0 14px rgba(var(--accent-rgb), 0.15);
  user-select: none;
}

.captcha-glyph:nth-child(2n) {
  transform: rotate(-4deg) translateY(1px);
}

.captcha-glyph:nth-child(3n) {
  transform: rotate(5deg) translateY(-1px);
}

.captcha-glyph.operator {
  min-width: 24px;
  border-color: rgba(var(--accent-rgb), 0.48);
  color: rgb(var(--accent-rgb));
  background: rgba(255, 255, 255, 0.92);
  font-family: Arial, sans-serif;
}

.register-preferences-callout h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.register-preferences-callout p {
  margin: 0 0 10px;
}

.setup-mode-option:has(input:checked) {
  border-color: rgba(var(--accent-rgb), 0.78);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18);
}

.setup-hypnosis-choice {
  justify-content: start;
}

.hypnosis-scenario-choice {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hypnosis-scenario-choice .hypnosis-start-main {
  justify-self: center;
  width: min(430px, 100%);
  min-height: 66px;
  margin: 30px auto 4px;
  padding: 15px 26px;
  font-size: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 28px rgba(var(--accent-rgb), 0.44);
}

.hypnosis-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  width: 100%;
  margin: 12px 0 16px;
}

.hypnosis-scenario-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 112px;
  padding: 12px 14px;
  text-align: left;
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(14, 9, 18, 0.88);
}

.hypnosis-scenario-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.95);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.82), rgba(var(--accent-dark-rgb), 0.86));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.24);
}

.hypnosis-scenario-portrait {
  width: 82px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.hypnosis-scenario-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.hypnosis-scenario-card strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.22;
}

.hypnosis-scenario-card span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.setup-start-button {
  justify-self: start;
  min-height: 44px;
  border-color: rgba(var(--accent-rgb), 0.78);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-dark-rgb), 0.92));
  color: #fff;
  font-weight: 900;
}

.member-persona-choice-panel {
  display: block;
}

.member-persona-choice-panel h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.member-persona-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.member-persona-choice-head h3 {
  margin: 0;
}

.member-persona-main-menu-button {
  flex: 0 0 auto;
  min-width: 180px;
  border-color: rgba(var(--accent-rgb), 0.78);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-dark-rgb), 0.92));
  color: #fff;
  font-weight: 900;
}

.member-persona-choice-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  align-content: start;
  gap: 14px;
  margin-bottom: 16px;
}

.member-gallery-actions {
  justify-content: center;
  gap: 14px;
}

.member-gallery-actions button {
  min-width: 180px;
  border-color: rgba(var(--accent-rgb), 0.78);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-dark-rgb), 0.92));
  color: #fff;
  font-weight: 900;
}

.member-persona-gallery-pager {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.member-gallery-actions .member-persona-gallery-pager button {
  min-width: 106px;
}

.member-persona-gallery-pager [data-member-persona-gallery-page] {
  min-width: 48px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

/* Les vues de créations occupent un écran HD/4K complet sans faire défiler la page. */
@media (min-width: 1100px) and (min-height: 700px) {
  body.setup-active.chat-subview-own .app-shell,
  body.setup-active.chat-subview-create .app-shell,
  body.setup-active.chat-subview-community .app-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.setup-active.chat-subview-own .chat-panel,
  body.setup-active.chat-subview-create .chat-panel,
  body.setup-active.chat-subview-community .chat-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.chat-subview-own .quick-persona-panel,
  body.chat-subview-create .quick-persona-panel,
  body.chat-subview-community .quick-persona-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    gap: 10px;
    overflow: hidden;
  }

  body.chat-subview-own .quick-persona-head,
  body.chat-subview-create .quick-persona-head,
  body.chat-subview-community .quick-persona-head {
    margin: 0;
  }

  body.chat-subview-own [data-setup-panel="chat"],
  body.chat-subview-create [data-setup-panel="chat"],
  body.chat-subview-community [data-setup-panel="chat"] {
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  body.chat-subview-create [data-member-persona-live],
  body.chat-subview-own [data-member-persona-own-panel],
  body.chat-subview-community [data-member-persona-public-panel],
  body.chat-subview-create [data-member-persona-live].is-active,
  body.chat-subview-own [data-member-persona-own-panel].is-active,
  body.chat-subview-community [data-member-persona-public-panel].is-active {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  body.chat-subview-create .member-persona-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.85fr);
    align-items: stretch;
    min-height: 0;
    gap: 16px;
  }

  body.chat-subview-own .member-persona-choice-gallery,
  body.chat-subview-community .member-persona-choice-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    overflow: hidden;
  }

  body.chat-subview-create .member-persona-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px 12px;
  }

  body.chat-subview-create .member-persona-form .field {
    gap: 4px;
    margin-bottom: 0;
  }

  body.chat-subview-create .member-persona-form textarea {
    min-height: 64px;
    height: 64px;
  }

  body.chat-subview-create .member-persona-form .check-row,
  body.chat-subview-create .member-persona-form .button-row,
  body.chat-subview-create .member-persona-form [data-member-persona-status] {
    grid-column: 1 / -1;
  }

  body.chat-subview-create .member-persona-side {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

  body.chat-subview-create .member-persona-preview {
    min-height: 0;
    height: 100%;
  }

  body.chat-subview-create .member-persona-preview img {
    max-height: min(360px, 100%);
  }
}

@media (max-width: 620px) {
  .member-persona-choice-head {
    align-items: stretch;
    flex-direction: column;
  }

  .member-persona-main-menu-button {
    width: 100%;
  }
}

.chat-member-persona-panel {
  margin-top: 12px;
}

.member-persona-create-details {
  border-color: rgba(var(--accent-rgb), 0.3);
}

.chat-member-persona-panel:not([open]) {
  padding-bottom: 10px;
}

.member-persona-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.member-persona-preview,
.member-persona-gallery {
  display: grid;
  gap: 9px;
}

.member-persona-card-description {
  display: block;
  max-height: 4.5em;
  overflow: hidden;
  color: rgba(255, 235, 247, 0.76);
  font-size: 12px;
  line-height: 1.25;
}

.member-persona-preview {
  min-height: 120px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.member-persona-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.member-persona-gallery {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  align-content: start;
}

.member-persona-gallery .persona-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-auto-rows: auto;
  align-items: start;
  gap: 10px 14px;
  min-height: 0;
  padding: 12px;
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(0, 0, 0, 0.44);
}

.member-persona-gallery .persona-card img {
  grid-row: 1 / span 5;
  width: 150px;
  height: 210px;
  object-fit: cover;
  object-position: center top;
  border-radius: 7px;
  background: #050405;
}

.member-persona-gallery .persona-card span,
.member-persona-gallery .persona-card small,
.member-persona-gallery .persona-card .member-persona-card-description {
  grid-column: 2;
  margin: 0;
}

.member-persona-gallery .persona-card span {
  align-self: end;
  font-size: 18px;
  line-height: 1.15;
}

.member-persona-gallery .persona-card small {
  color: rgba(224, 255, 248, 0.86);
  font-size: 13px;
  line-height: 1.25;
}

.member-persona-gallery .persona-card .member-persona-card-description {
  max-height: none;
  color: rgba(255, 235, 247, 0.82);
  font-size: 13px;
  line-height: 1.35;
}

.member-persona-gallery .persona-card .mini-edit-button {
  grid-column: 2;
  justify-self: start;
  min-width: 120px;
  min-height: 36px;
  padding: 8px 14px;
}

.ensemble-combo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr);
  gap: 8px;
}

.ensemble-combo-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 86px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  text-align: left;
}

.ensemble-combo-card.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  background: rgba(0, 0, 0, 0.48);
}

.ensemble-combo-card img {
  width: 76px;
  height: 76px;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 6px;
  background: #050405;
}

.ensemble-combo-card span {
  color: rgba(255, 245, 247, 0.92);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.identity-picker,
.scenario-picker {
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.preferences-page-active .identity-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px 12px;
}

.preferences-page-active .identity-picker h3,
.preferences-page-active .identity-picker .identity-title-current {
  grid-column: 1 / -1;
}

.preferences-page-active .scenario-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 10px;
}

.preferences-page-active .scenario-picker h3,
.preferences-page-active .scenario-picker .scenario-help,
.preferences-page-active .scenario-picker .scenario-head {
  grid-column: 1 / -1;
}

.preferences-page-active .scenario-picker .scenario-head {
  display: none;
}

.preferences-page-active .scenario-row {
  min-height: 46px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(0, 0, 0, 0.18);
  grid-template-columns: minmax(110px, 1fr) repeat(3, 30px);
}

.preferences-page-active .scenario-row > span {
  line-height: 1.15;
}

.identity-picker h3,
.scenario-picker h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.scenario-head,
.scenario-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 46px 70px 46px;
  gap: 8px;
  align-items: center;
}

.scenario-help {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scenario-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.scenario-legend > span {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(0, 0, 0, 0.18);
  line-height: 1.2;
}

.legend-dots {
  display: inline-grid;
  grid-template-columns: repeat(3, 14px);
  gap: 4px;
  align-items: center;
  vertical-align: middle;
}

.legend-dots b {
  width: 13px;
  height: 13px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.72);
}

.legend-yes b:nth-child(1),
.legend-maybe b:nth-child(2),
.legend-no b:nth-child(3) {
  border-color: rgba(var(--accent-rgb), 0.96);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 16%, rgba(var(--accent-rgb), 0.95) 18% 50%, rgba(var(--accent-dark-rgb), 0.98) 52% 100%);
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.22),
    0 0 12px rgba(var(--accent-rgb), 0.48);
}

.scenario-head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scenario-row {
  min-height: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 245, 247, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.scenario-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  justify-self: center;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12), transparent 45%),
    rgba(0, 0, 0, 0.42);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.scenario-row input:hover {
  border-color: rgba(var(--accent-rgb), 0.72);
  transform: scale(1.08);
}

.scenario-row input:checked {
  border-color: rgba(var(--accent-rgb), 0.96);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 18%, rgba(var(--accent-rgb), 0.95) 20% 48%, rgba(var(--accent-dark-rgb), 0.98) 50% 100%);
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.28),
    0 0 14px rgba(var(--accent-rgb), 0.58);
}

.scenario-row input:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.85);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .preferences-page-active .scenario-picker {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .preferences-page-active .identity-picker,
  .preferences-page-active .scenario-picker {
    grid-template-columns: 1fr;
  }

  .preferences-page-active .profile-logo-stage img {
    width: min(190px, 52vw);
    max-height: 115px;
  }
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.check-row span {
  color: rgba(255, 245, 247, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-field input[type="checkbox"] {
  width: auto;
  min-height: 0;
  flex: 0 0 auto;
  margin-top: 2px;
}

.checkbox-field span {
  line-height: 1.35;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.field textarea {
  resize: vertical;
  overflow-y: auto;
  white-space: pre-wrap;
}

.preferences-page-active .field textarea {
  min-height: 72px;
  max-height: 150px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.composer textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.62);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
  background: rgba(0, 0, 0, 0.46);
}

.limit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.limit-list span {
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(var(--accent-rgb), 0.08);
  color: rgba(235, 255, 252, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.chat-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 26vw, 620px);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  height: 100%;
  min-height: 0;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.setup-active .chat-panel {
  display: block;
  height: auto;
  overflow: visible;
}

body.auth-page-active.setup-active .chat-panel {
  min-height: calc(100dvh - 18px);
  height: auto;
  overflow: visible;
}

body.auth-page-active.setup-active .app-shell {
  height: 100dvh;
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow: auto;
}

body.auth-page-active .quick-persona-panel {
  max-height: none;
  overflow: visible;
}

.setup-active .chat-panel > .panel-head,
.setup-active .scene-status,
.setup-active .player-voice-bar,
.setup-active .presence-strip,
.setup-active .hypnosis-stage,
.setup-active .messages,
.setup-active .voice-audio,
.setup-active .composer {
  display: none !important;
}

.chat-active .chat-panel > .panel-head {
  grid-row: 1;
}

.chat-active .scene-status {
  grid-row: 2;
}

.chat-active .messages {
  grid-row: 3 / 5;
}

.chat-active .composer {
  grid-row: 5;
}

.chat-active .presence-strip {
  grid-row: 1 / 6;
}

.chat-active {
  overflow: hidden;
}

.chat-active .mode-bar {
  display: none;
}

.chat-active .topbar {
  margin-bottom: 8px;
}

.chat-active .chat-panel {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 34vw);
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100dvh - 84px);
  min-height: 0;
  overflow: hidden;
}

.chat-active .chat-panel > .panel-head {
  grid-column: 1;
  grid-row: 1;
}

.chat-active .scene-status,
.chat-active .player-hypnosis-picker,
.chat-active [data-start-scene-player],
.chat-active [data-start-hypnosis-player],
.chat-active [data-pause-hypnosis-player],
.chat-active [data-stop-hypnosis-player] {
  display: none !important;
}

.chat-active .messages {
  grid-column: 1;
  grid-row: 2;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.chat-active .composer {
  grid-column: 1;
  grid-row: 3;
}

.chat-active .presence-strip {
  grid-column: 2;
  grid-row: 1 / 4;
  height: 100%;
  max-height: none;
  overflow: hidden;
}

.chat-active .presence-card {
  min-height: 100%;
  align-content: center;
}

.chat-active .presence-card img {
  width: 100%;
  height: calc(100dvh - 132px);
  max-height: none;
  object-fit: contain;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-persona-panel {
  grid-column: 1 / -1;
}

.scene-started:not(.profile-open) .quick-persona-panel {
  display: none;
}

.chat-panel > .panel-head {
  grid-column: 1;
  grid-row: 2;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 0;
}

.scene-status {
  grid-column: 1;
  grid-row: 3;
  margin: -2px 0 0;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.presence-strip {
  display: grid;
  grid-column: 2;
  grid-row: 2 / 6;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
  max-height: calc(100vh - 176px);
  margin-bottom: 0;
  overflow: hidden;
  padding-right: 0;
}

.presence-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  background: rgba(0, 0, 0, 0.3);
  text-align: left;
}

.presence-card img {
  width: 100%;
  height: min(68vh, calc(100vh - 248px));
  max-height: calc(100vh - 248px);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: top center;
  border-radius: 6px;
  background: #050405;
}

.presence-card > span {
  padding: 0 8px 8px;
}

.presence-card-wide img {
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  object-position: center top !important;
}

.presence-card strong,
.presence-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-card strong {
  font-size: 13px;
}

.presence-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.chat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-actions [data-start-hypnosis-player] {
  margin-top: 10px;
}

.session-audio-controls {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 240px;
}

.session-audio-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.session-audio-controls input[type="range"] {
  width: clamp(140px, 18vw, 230px);
  accent-color: var(--accent);
}

.session-audio-controls button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 12px;
}

.session-audio-controls button.is-active {
  border-color: rgba(var(--accent-rgb), 0.95);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-dark-rgb), 0.94));
  color: #fff;
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.28);
}

.player-hypnosis-picker {
  min-width: 170px;
}

.player-hypnosis-audio-status {
  flex-basis: 100%;
  margin: -4px 0 0;
  text-align: right;
}

.player-voice-bar {
  grid-column: 1;
  grid-row: 6;
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.26);
}

.player-voice-bar label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.player-voice-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.player-voice-bar select,
.player-voice-bar input[type="text"] {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--ink);
}

.player-voice-bar input[type="text"] {
  width: min(330px, 52vw);
  padding: 0 9px;
}

.player-voice-bar input[type="range"] {
  width: min(180px, 30vw);
  accent-color: var(--accent);
}

.voice-speed-control {
  min-width: min(280px, 100%);
}

.player-voice-bar button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 10px;
}

[data-local-chat-status].is-ok {
  color: #75fff0;
}

[data-local-chat-status].is-error {
  color: #ffd0dc;
}

.compact-check {
  min-height: 0;
}

.messages {
  grid-column: 1;
  grid-row: 4;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.message {
  box-sizing: border-box;
  max-width: 96%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.05);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  animation: messageIn 0.2s ease both;
}

.message.user {
  justify-self: end;
  max-width: 88%;
  border-color: rgba(225, 29, 72, 0.35);
  background: rgba(225, 29, 72, 0.14);
}

.message.assistant {
  justify-self: start;
}

.message.system {
  justify-self: center;
  max-width: 92%;
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.1);
  color: #ffe7a3;
}

.message-speaker {
  display: inline-block;
  color: #ff2fa8;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 47, 168, 0.42);
}

.message-speech {
  color: #ff69c7;
  font-weight: 850;
}

.message-action {
  display: block;
  margin-bottom: 0.72rem;
  border-left: 3px solid #38bdf8;
  padding-left: 9px;
  color: #67d8ff;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent 72%);
  font-style: italic;
  font-weight: 700;
}

.message-user-speaker {
  color: #ff5fb7;
  font-weight: 900;
}

.message-user-text {
  color: #ffc1e4;
  font-weight: 800;
}

.message-guest-speaker {
  color: #d8b4fe;
}

.message-guest-speech {
  color: #f6eaff;
}

.message-guest-action {
  color: #ffd166;
}

.message small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.message-photo-offer {
  display: block;
  width: fit-content;
  margin-top: 9px;
  min-height: 30px;
  padding: 5px 9px;
  border-color: rgba(255, 72, 176, 0.36);
  background: rgba(255, 72, 176, 0.14);
  color: #ffe6f4;
  font-size: 11px;
  font-weight: 900;
}

.message-session-image {
  display: block;
  width: min(100%, 280px);
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(184, 74, 255, 0.42);
  border-radius: 8px;
  background: rgba(8, 3, 14, 0.92);
  color: #f7e9ff;
  text-align: left;
  box-shadow: 0 0 18px rgba(184, 74, 255, 0.2);
}

.message-session-image img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.message-session-image span {
  display: block;
  padding: 7px 9px;
  color: #f2d8ff;
  font-size: 11px;
  font-weight: 900;
}

.locked-trial-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.locked-trial-actions .message-photo-offer {
  margin-top: 0;
}

.composer {
  grid-column: 1;
  grid-row: 5;
  margin-top: 0;
}

.stop-rule {
  margin: 0 0 8px;
  border: 1px solid rgba(255, 72, 176, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 235, 244, 0.88);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.chat-input-hint {
  margin: 0 0 8px;
  color: rgba(255, 220, 238, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.composer textarea {
  width: 100%;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  resize: vertical;
  overflow: hidden;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.composer.is-sending textarea {
  border-color: rgba(225, 29, 72, 0.38);
}

.composer textarea:disabled {
  cursor: wait;
  opacity: 0.78;
}

.form-row,
.button-row,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-mode-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.inline-mode-picker span {
  color: rgba(255, 245, 247, 0.86);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.inline-mode-picker select {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--ink);
  font-weight: 900;
}

.inline-mode-picker input[type="file"] {
  max-width: 210px;
  min-height: 30px;
  padding: 4px;
  font-size: 11px;
}

.inline-mode-picker input[type="search"] {
  width: 150px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--ink);
}

.inline-audio-select {
  max-width: 260px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--ink);
  font-weight: 800;
}

.inline-status {
  width: 100%;
  text-align: right;
}

.form-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.voice-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-subscription .voice-status:not(.is-hidden) {
  padding: 10px 12px;
  border: 1px solid rgba(203, 154, 255, 0.38);
  border-radius: 10px;
  background: rgba(18, 8, 24, 0.72);
  color: rgba(255, 244, 255, 0.94);
  font-size: 13px;
  line-height: 1.4;
}

.member-subscription .voice-status.is-error {
  border-color: rgba(255, 112, 149, 0.9);
  background: rgba(110, 16, 42, 0.76);
  color: #fff5f8;
}

.interactive-panel {
  display: grid;
  gap: 10px;
}

.toy-help {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.35;
}

.toy-connect-guide {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(178, 77, 255, 0.28);
  border-radius: 8px;
  background: rgba(5, 4, 8, 0.46);
}

.toy-download-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(210, 158, 255, 0.55);
  background: linear-gradient(180deg, rgba(154, 67, 255, 0.92), rgba(96, 26, 166, 0.92));
  color: white;
  font-weight: 900;
  text-decoration: none;
}

.toy-card-action {
  width: 100%;
  margin: 8px 0 2px;
}

.lovense-qr-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
}

.lovense-qr-card img {
  width: min(260px, 72vw);
  height: auto;
  border: 8px solid #fff;
  border-radius: 8px;
  background: #fff;
}

.lovense-qr-code {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.toy-inline-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 10px;
  padding: 7px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.toy-inline-note a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(var(--accent-rgb), 0.12);
  font-weight: 800;
  text-decoration: none;
}

.toy-inline-link {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.58);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.toy-install-grid,
.toy-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toy-settings-grid {
  align-items: end;
}

.site-toys-panel {
  max-width: 980px;
  margin: 0 auto 14px;
}

.toy-connect-guide ol {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.35;
}

.toy-connect-guide li + li {
  margin-top: 4px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.toy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.toy-actions button {
  width: 100%;
  min-height: 34px;
  padding: 8px 9px;
}

@media (max-width: 820px) {
  .toy-install-grid,
  .toy-settings-grid {
    grid-template-columns: 1fr;
  }
}

[data-toy-stop] {
  border-color: rgba(255, 69, 115, 0.78);
  background: linear-gradient(180deg, rgba(128, 16, 45, 0.9), rgba(70, 7, 25, 0.94));
}

.voice-audio {
  grid-column: 1;
  width: 100%;
  margin-top: 10px;
  display: none;
}

[data-hypnosis-audio-player] {
  display: none;
}

.hypnosis-file-list {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 8px 9px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

[data-hypnosis-audio-library] {
  min-height: 130px;
}

[data-hypnosis-video-library] {
  min-height: 130px;
}

.range-field strong {
  float: right;
  color: var(--accent-2);
  font-size: 12px;
}

.range-field input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
  background: transparent;
}

.hypnosis-stage {
  --swing-duration: 3s;
  --flash-opacity: 0.65;
  --spiral-media-opacity: 0.42;
  position: relative;
  height: 230px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(225, 29, 72, 0.08), rgba(var(--accent-rgb), 0.04)),
    #050507;
}

.hypnosis-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 80px);
  pointer-events: none;
}

.hypnosis-spiral {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(92%, 420px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: var(--spiral-image, url("assets/pendulum/neon-spiral-static.png")) center / contain no-repeat;
  opacity: var(--spiral-opacity, 0.62);
  filter:
    drop-shadow(0 0 12px rgba(255, 20, 190, 0.72))
    drop-shadow(0 0 36px rgba(255, 20, 190, 0.36));
  mix-blend-mode: screen;
  pointer-events: none;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform, opacity;
  animation: hypnosisSpiralSpin 12s linear infinite;
  transition: opacity 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}

.hypnosis-stage.is-persona-flash .hypnosis-spiral {
  opacity: calc(var(--spiral-opacity, 0.62) * 0.86);
  filter:
    drop-shadow(0 0 16px rgba(255, 20, 190, 0.8))
    drop-shadow(0 0 46px rgba(255, 20, 190, 0.42));
}

.hypnosis-stage.is-media-flash .hypnosis-spiral {
  opacity: var(--spiral-media-opacity, 0.42);
  filter:
    blur(1px)
    drop-shadow(0 0 10px rgba(255, 20, 190, 0.36));
}

.hypnosis-pendulum {
  position: absolute;
  left: 50%;
  top: 16px;
  z-index: 2;
  width: 132px;
  height: 190px;
  margin-left: -66px;
  transform-origin: 50% 0;
  animation: pendulumSwing var(--swing-duration) ease-in-out infinite;
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.hypnosis-pendulum.has-real-sprite {
  top: -8px;
  width: 340px;
  height: 278px;
  margin-left: -170px;
}

.pendulum-real-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 20px 16px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 16px rgba(255, 229, 165, 0.15));
}

.hypnosis-pendulum.has-real-sprite .pendulum-real-image {
  display: block;
}

.hypnosis-pendulum.has-real-sprite .pendulum-hinge,
.hypnosis-pendulum.has-real-sprite .pendulum-line,
.hypnosis-pendulum.has-real-sprite .pendulum-disc,
.hypnosis-pendulum.has-real-sprite .pendulum-shadow {
  display: none;
}

.hypnosis-stage.is-flashing .hypnosis-pendulum {
  opacity: 0;
  filter: blur(10px);
}

.hypnosis-stage.is-phase-intro .hypnosis-spiral,
.hypnosis-stage.is-phase-intro .hypnosis-pendulum {
  opacity: 0;
  animation-play-state: paused;
}

.hypnosis-stage.is-phase-countdown .hypnosis-flash-image,
.hypnosis-stage.is-phase-countdown .hypnosis-flash-video,
.hypnosis-stage.is-phase-intro .hypnosis-flash-image,
.hypnosis-stage.is-phase-intro .hypnosis-flash-video {
  display: none !important;
}

.hypnosis-stage.is-hypnosis-paused .hypnosis-spiral,
.hypnosis-stage.is-hypnosis-paused .hypnosis-pendulum {
  animation-play-state: paused;
}

.hypnosis-mistress-image {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.94;
  filter:
    drop-shadow(0 22px 28px rgba(0, 0, 0, 0.78))
    drop-shadow(0 0 26px rgba(255, 0, 150, 0.35));
}

.hypnosis-stage.is-phase-intro .hypnosis-mistress-image {
  display: block;
}

.pendulum-hinge {
  position: absolute;
  left: 50%;
  top: 0;
  width: 28px;
  height: 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 235, 180, 0.55);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent 38%),
    linear-gradient(90deg, #5b4b30, #f5d57c, #6d5934);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.65);
}

.pendulum-line {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 96px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(90deg, #4d3a1e, #ffe39a 42%, #6c4f28 70%, #2b2115);
  box-shadow: 0 0 10px rgba(255, 209, 116, 0.28);
}

.pendulum-disc {
  position: absolute;
  left: 50%;
  top: 88px;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  transform: translateX(-50%);
  overflow: hidden;
  border: 2px solid rgba(255, 232, 163, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 18%, transparent 34%),
    radial-gradient(circle at 50% 52%, rgba(var(--accent-rgb), 0.22), transparent 48%),
    linear-gradient(135deg, #131014, #342017 42%, #020203 100%);
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 0 18px rgba(255, 235, 184, 0.18),
    inset 0 -12px 20px rgba(0, 0, 0, 0.65),
    0 22px 26px rgba(0, 0, 0, 0.54),
    0 0 24px rgba(225, 29, 72, 0.22);
}

.pendulum-disc::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 224, 151, 0.44);
  border-radius: 50%;
}

.pendulum-disc.has-custom-sprite .pendulum-pentacle,
.pendulum-disc.has-custom-sprite::before {
  display: none;
}

.pendulum-pentacle {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  fill: none;
  stroke: rgba(255, 230, 158, 0.9);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 5px rgba(255, 221, 137, 0.45));
}

.pendulum-shadow {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 86px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(7px);
}

.hypnosis-flash-image,
.hypnosis-flash-video {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: var(--flash-opacity);
}

.hypnosis-flash-image.is-visible,
.hypnosis-flash-video.is-visible {
  display: block;
  animation: flashPulse 0.22s ease both;
}

.hypnosis-stage.is-persona-flash .hypnosis-flash-image.is-visible {
  opacity: 0.82;
}

.hypnosis-stage.is-media-flash .hypnosis-flash-image.is-visible,
.hypnosis-stage.is-media-flash .hypnosis-flash-video.is-visible {
  animation-duration: 0.13s;
}

.hypnosis-active {
  overflow: hidden;
}

.hypnosis-active .topbar,
.hypnosis-active .mode-bar,
.hypnosis-active .quick-persona-panel,
.hypnosis-active .presence-strip,
.hypnosis-active .player-voice-bar {
  display: none !important;
}

.hypnosis-active [data-start-scene-player],
.hypnosis-active [data-start-hypnosis-player],
.hypnosis-active .player-hypnosis-picker,
.hypnosis-active [data-stop-voice],
.hypnosis-active [data-clear-chat] {
  display: none !important;
}

.hypnosis-active .app-shell {
  width: 100%;
  padding: 0;
}

.hypnosis-active .chat-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(230px, 1fr) minmax(190px, 31vh) auto;
  gap: 8px;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  align-items: stretch;
  border-radius: 0;
  background: #050507;
}

.hypnosis-active .panel-head {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

.hypnosis-active .scene-status {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  place-items: center;
  justify-self: center;
  box-sizing: border-box;
  width: min(920px, calc(100dvw - 32px));
  max-width: 100%;
  min-height: clamp(190px, 31vh, 330px);
  max-height: 34vh;
  padding: 16px 24px;
  overflow: auto;
  border-color: rgba(255, 0, 200, 0.34);
  background: rgba(0, 0, 0, 0.18);
  color: #fff0f8;
  font-size: clamp(13px, 1.05vw, 18px);
  font-weight: 950;
  line-height: 1.34;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow:
    0 0 10px rgba(255, 0, 200, 0.85),
    0 0 28px rgba(255, 0, 200, 0.46),
    0 2px 6px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hypnosis-active .scene-status.is-subtitle-visible {
  opacity: 1;
  transform: translateY(0);
}

.hypnosis-active .hypnosis-stage {
  grid-column: 1;
  grid-row: 2;
  height: auto;
  min-height: 260px;
  align-self: stretch;
  margin-bottom: 0;
}

.hypnosis-active .hypnosis-spiral {
  width: min(82vmin, 760px);
}

.hypnosis-active .hypnosis-pendulum.has-real-sprite {
  top: -18px;
  width: min(56vw, 680px);
  height: min(46vh, 500px);
  margin-left: calc(min(56vw, 680px) / -2);
}

.hypnosis-active .messages {
  grid-column: 1;
  display: none;
}

.hypnosis-active .composer {
  grid-column: 1;
  grid-row: 4;
  margin-top: 0;
  display: none;
}

.hypnosis-active .composer textarea {
  min-height: 46px;
}

@keyframes pendulumSwing {
  0% {
    transform: rotate(-21deg);
  }

  50% {
    transform: rotate(21deg);
  }

  100% {
    transform: rotate(-21deg);
  }
}

@keyframes hypnosisSpiralSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.98);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg) scale(0.98);
  }
}

@keyframes flashPulse {
  from {
    opacity: 0;
    transform: scale(1.02);
  }

  to {
    opacity: var(--flash-opacity);
    transform: scale(1);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button,
.result-actions a,
.batch-form a {
  min-height: 38px;
  border: 1px solid rgba(225, 29, 72, 0.46);
  border-radius: 7px;
  padding: 0 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 48%),
    rgba(225, 29, 72, 0.18);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease,
    opacity 0.14s ease;
}

button:hover,
.result-actions a:hover,
.batch-form a:hover {
  border-color: rgba(255, 158, 182, 0.78);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.image-panel {
  grid-column: 1 / -1;
}

.creator-mode .image-panel[data-creator-tool] {
  display: grid !important;
  gap: 14px;
}

.image-panel > .panel-head {
  order: 0;
}

.batch-tool {
  order: 1;
}

.image-grid {
  order: 2;
}

.image-toggle-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.image-toggle-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-panel.is-hidden {
  display: none;
}

.image-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 14px;
}

.source-preview,
.result-frame {
  display: grid;
  place-items: center;
  width: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
}

.source-preview {
  min-height: 190px;
  margin-bottom: 10px;
  overflow: hidden;
}

.source-preview img {
  display: none;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.source-preview.has-image img {
  display: block;
}

.source-preview.has-image span {
  display: none;
}

.result-frame {
  min-height: 540px;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
}

.result-frame img {
  display: none;
  width: 100%;
  max-height: 760px;
  object-fit: contain;
}

.result-frame.has-image img {
  display: block;
}

.result-frame.has-image span {
  display: none;
}

.result-actions {
  justify-content: flex-end;
  margin: 10px 0;
}

.result-actions a.is-disabled {
  pointer-events: none;
  opacity: 0.42;
}

.batch-tool {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.creator-mode .image-panel .batch-tool {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 16px;
  border-top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.compact-head {
  margin-bottom: 8px;
}

.batch-form {
  display: grid;
  gap: 10px;
}

.scenario-progress-wrap {
  display: grid;
  gap: 6px;
  min-width: min(520px, 100%);
}

.scenario-progress-wrap progress {
  width: 100%;
  height: 12px;
  accent-color: var(--violet);
}

.scenario-preview-player {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(190, 80, 255, 0.28);
  border-radius: 8px;
  background: rgba(6, 4, 10, 0.72);
}

.scenario-preview-player audio {
  width: 100%;
}

.scenario-admin-list-wrap {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(190, 80, 255, 0.28);
  border-radius: 8px;
  background: rgba(6, 4, 10, 0.72);
}

.scenario-admin-list-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.scenario-admin-list-head span:first-child {
  color: #fff;
  font-size: 15px;
}

.scenario-admin-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.scenario-admin-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(14, 9, 18, 0.86);
}

.scenario-admin-row.is-active {
  border-color: rgba(var(--accent-rgb), 0.85);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.2);
}

.scenario-admin-check {
  width: 22px;
  height: 22px;
  align-self: center;
  justify-self: center;
  accent-color: var(--violet);
}

.scenario-admin-main {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.scenario-admin-main strong {
  font-size: 15px;
}

.scenario-admin-main span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.slider-row span {
  min-width: 96px;
  text-align: right;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.session-bank-preview {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.session-prompt-admin-tool textarea[readonly] {
  min-height: 260px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}

.session-prompt-row-tools,
.session-prompt-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-prompt-row-tools p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.session-prompt-rows {
  display: grid;
  gap: 12px;
}

.session-prompt-row {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(180, 76, 255, 0.32);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.session-prompt-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.session-prompt-field-grid .field.is-wide {
  grid-column: 1 / -1;
}

.comfy-reference-tool,
.lora-admin-tool,
.workflow-admin-tool {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tool-list {
  display: grid;
  gap: 8px;
}

.tool-list-item {
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.tool-list-item strong {
  overflow-wrap: anywhere;
}

.tool-list-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.tool-list-item-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.batch-preview {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.session-bank-preview.batch-preview,
.session-bank-preview {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
}

.batch-preview.has-items {
  display: grid;
}

.batch-thumb {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.batch-thumb-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  color: rgba(255, 245, 247, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.batch-thumb-selector input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.batch-thumb-image {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 2 / 3;
  background: rgba(0, 0, 0, 0.5);
}

.batch-thumb-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.batch-thumb span {
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: rgba(255, 245, 247, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.batch-form a.is-disabled,
.batch-form button.is-disabled {
  pointer-events: none;
  opacity: 0.42;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
}

details p {
  white-space: pre-wrap;
}

.age-gate,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(70, 18, 92, 0.42), rgba(8, 8, 10, 0.86) 58%, rgba(88, 12, 48, 0.32)),
    url("assets/chat-background.png") center / cover fixed no-repeat,
    var(--bg);
  background-blend-mode: normal !important;
  overflow-y: auto;
}

.age-gate.is-hidden,
.lightbox:not(.is-open) {
  display: none;
}

.age-box {
  width: min(460px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(225, 29, 72, 0.34);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.age-gate[data-age-gate] .age-box {
  width: min(780px, 100%);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(10, 8, 12, 0.9), rgba(5, 4, 7, 0.92));
}

.age-logo-stage {
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.age-logo-stage img {
  width: min(620px, 94vw);
  max-height: 54vh;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(255, 42, 145, 0.36));
}

.age-box:has(.age-warning:not(.is-hidden)) .age-logo-stage img {
  max-height: min(28vh, 220px);
}

.age-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.age-actions button {
  min-width: 120px;
  min-height: 46px;
  font-weight: 900;
}

.age-warning {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 42, 145, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  text-align: left;
}

.age-warning.is-hidden {
  display: none;
}

.age-warning h3 {
  margin: 0 0 10px;
  text-align: center;
}

.age-warning p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.age-warning .age-actions {
  position: sticky;
  bottom: -14px;
  z-index: 2;
  padding: 10px 0 2px;
  background:
    linear-gradient(180deg, transparent, rgba(7, 5, 8, 0.96) 24%),
    rgba(7, 5, 8, 0.96);
}

.age-message {
  min-height: 22px;
  margin-top: 12px;
  color: #ffb5c5;
  font-weight: 900;
}

.lightbox {
  z-index: 60;
}

.lightbox img {
  width: auto;
  max-width: min(94vw, 940px);
  max-height: 92vh;
  object-fit: contain;
  border: 1px solid rgba(225, 29, 72, 0.36);
  background: #050405;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 58px;
  min-height: 78px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.58);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.9), rgba(var(--accent-dark-rgb), 0.92));
  color: #fff;
  font-size: 54px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.28);
}

.lightbox-nav:hover {
  box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.48);
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

.lightbox-nav.is-hidden {
  display: none;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 48px;
  min-height: 48px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

.lightbox-download {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  transform: translateX(-50%);
  border: 1px solid rgba(var(--accent-rgb), 0.68);
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(10, 5, 18, 0.94);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.3);
}

.lightbox-download.is-hidden {
  display: none;
}

.modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .layout,
  .creator-page-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel {
    order: 2;
    position: fixed;
    max-height: calc(100vh - 20px);
    overflow: auto;
  }

  .batch-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .chat-panel {
    order: 1;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .chat-active {
    overflow: auto;
  }

  .chat-active .app-shell {
    height: auto;
    min-height: 100dvh;
  }

  .chat-active .chat-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(320px, 46vh) auto;
    height: auto;
    min-height: calc(100dvh - 80px);
    overflow: visible;
  }

  .chat-active .presence-strip {
    grid-column: 1;
    grid-row: 2;
    height: auto;
  }

  .chat-active .presence-card img {
    height: min(44vh, 360px);
  }

  .chat-active .messages {
    grid-column: 1;
    grid-row: 3;
    min-height: 320px;
  }

  .chat-active .composer {
    grid-column: 1;
    grid-row: 4;
  }

  .chat-panel > .panel-head,
  .scene-status,
  .player-voice-bar,
  .messages,
  .composer,
  .presence-strip,
  .voice-audio {
    grid-column: 1;
    grid-row: auto;
  }

  .presence-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    max-height: none;
    overflow: visible;
  }

  .presence-card img {
    max-height: 240px;
  }

  .chat-actions {
    justify-content: flex-start;
  }

  .quick-persona-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .persona-grid.quick-persona-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .chat-main-buttons {
    grid-column: 1 / -1;
  }

  .quick-ensemble-picker {
    grid-template-columns: 1fr;
  }

  .ensemble-combo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ensemble-combo-card[data-ensemble-combo="woman,transWoman,feminized"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 16px, 1480px);
  }

  .topbar,
  .creator-page-head,
  .panel-head {
    display: grid;
    align-items: start;
  }

  .persona-grid {
    grid-template-columns: 1fr;
  }

  .persona-grid.quick-persona-grid {
    grid-template-columns: 1fr;
  }

  .chat-main-buttons {
    grid-template-columns: 1fr;
  }

  .presence-strip {
    grid-template-columns: 1fr;
  }

  .messages {
    height: 360px;
    min-height: 360px;
  }

  .batch-grid {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .site-about-body {
    grid-template-columns: 1fr;
  }

  .about-logo-stage {
    min-height: 220px;
  }
}

/* Duo/trio final overrides. */
:root {
  --duo-trio-card-image-height: clamp(94px, 12vh, 132px);
}

.quick-persona-grid .persona-card[data-persona="ensemble"],
.quick-persona-grid .persona-card[data-persona="ensemble"].is-active,
.ensemble-combo-card,
.ensemble-combo-card.is-active,
.presence-card[data-presence-key="ensemble"],
.presence-card[data-presence-key="ensemble"].is-active {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.quick-persona-grid {
  align-items: start !important;
}

.quick-ensemble-picker {
  width: min(1080px, 100%) !important;
  margin: 10px auto 0 !important;
}

.chat-main-buttons {
  grid-column: 1 / -1 !important;
  width: min(1360px, 100%) !important;
  justify-self: center !important;
  margin-inline: auto !important;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) !important;
  gap: 14px !important;
}

.chat-main-buttons .setup-start-button {
  min-height: 52px !important;
}

.ensemble-combo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

.ensemble-combo-card {
  padding: 4px !important;
  gap: 4px !important;
  min-height: 0 !important;
}

.ensemble-combo-card span {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

.quick-persona-grid .persona-card[data-persona="ensemble"]:hover,
.ensemble-combo-card:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: none !important;
}

.ensemble-combo-card {
  grid-template-columns: 1fr !important;
  align-items: start !important;
}

.ensemble-combo-card[data-ensemble-combo="woman,transWoman,feminized"] {
  min-width: 0 !important;
}

.quick-persona-grid .persona-card[data-persona="ensemble"] img,
.ensemble-combo-card img {
  width: min(100%, calc(var(--duo-trio-card-image-height) * 0.75)) !important;
  height: var(--duo-trio-card-image-height) !important;
  max-height: var(--duo-trio-card-image-height) !important;
  justify-self: center !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  object-position: center top !important;
  border: 0 !important;
  box-shadow: none !important;
}

.presence-card[data-presence-key="ensemble"] img,
.chat-active .presence-card[data-presence-key="ensemble"] img {
  width: 100% !important;
  height: calc(100dvh - 132px) !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center top !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ensemble-combo-card span {
  text-align: center !important;
}

@media (max-width: 900px) {
  .presence-card[data-presence-key="ensemble"] img,
  .chat-active .presence-card[data-presence-key="ensemble"] img {
    height: min(44vh, 360px) !important;
    max-height: min(44vh, 360px) !important;
  }
}

/* Duo/trio portrait strips: each character is an individual image in an equal-height column. */
.ensemble-portrait-strip {
  --ensemble-count: 2;
  display: grid !important;
  grid-template-columns: repeat(var(--ensemble-count), minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: min(100%, calc(var(--duo-trio-card-image-height) * var(--ensemble-count) * 0.72)) !important;
  justify-self: center !important;
  height: var(--duo-trio-card-image-height) !important;
  max-height: var(--duo-trio-card-image-height) !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #050405 !important;
  box-shadow: none !important;
}

.quick-persona-grid .persona-card[data-persona="ensemble"] .ensemble-portrait-strip,
.ensemble-combo-card .ensemble-portrait-strip {
  height: var(--duo-trio-card-image-height) !important;
  max-height: var(--duo-trio-card-image-height) !important;
}

.ensemble-portrait-strip img,
.quick-persona-grid .persona-card[data-persona="ensemble"] .ensemble-portrait-strip img,
.ensemble-combo-card .ensemble-portrait-strip img,
.presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip img,
.chat-active .presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip img {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #050405 !important;
  box-shadow: none !important;
}

.ensemble-portrait-strip img[data-ensemble-portrait="transWoman"],
.quick-persona-grid .persona-card[data-persona="ensemble"] .ensemble-portrait-strip img[data-ensemble-portrait="transWoman"],
.ensemble-combo-card .ensemble-portrait-strip img[data-ensemble-portrait="transWoman"],
.presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip img[data-ensemble-portrait="transWoman"],
.chat-active .presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip img[data-ensemble-portrait="transWoman"] {
  object-position: center center !important;
}

.presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip,
.chat-active .presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip {
  width: 100% !important;
  height: calc(100dvh - 132px) !important;
  max-height: none !important;
}

.chat-active .presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip {
  align-self: stretch !important;
}

.ensemble-combo-card.is-active {
  position: relative !important;
  border-color: rgba(189, 91, 255, 0.95) !important;
  box-shadow:
    0 0 0 2px rgba(189, 91, 255, 0.32),
    0 0 24px rgba(189, 91, 255, 0.28) !important;
}

.ensemble-combo-card.is-active::after {
  content: "Choisi";
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(189, 91, 255, 0.96), rgba(95, 29, 137, 0.96));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.quick-persona-grid .persona-card.is-active {
  position: relative !important;
  border-color: rgba(189, 91, 255, 0.95) !important;
  background: rgba(45, 13, 64, 0.64) !important;
  box-shadow:
    0 0 0 2px rgba(189, 91, 255, 0.32),
    0 0 24px rgba(189, 91, 255, 0.28) !important;
}

.quick-persona-grid .persona-card.is-active::after {
  content: "Choisi";
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(189, 91, 255, 0.96), rgba(95, 29, 137, 0.96));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.presence-card[data-presence-key="ensemble"],
.presence-card[data-presence-key="ensemble"].is-active,
.quick-persona-grid .persona-card[data-persona="ensemble"],
.quick-persona-grid .persona-card[data-persona="ensemble"].is-active,
.ensemble-combo-card {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .chat-main-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ensemble-combo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ensemble-combo-card[data-ensemble-combo="woman,transWoman,feminized"] {
    grid-column: 1 / -1 !important;
  }

  .presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip,
  .chat-active .presence-card[data-presence-key="ensemble"] .ensemble-portrait-strip {
    height: min(44vh, 360px) !important;
    max-height: min(44vh, 360px) !important;
  }
}

