:root {
  --bg: #fbf4ed;
  --bg-accent: #f4dfd3;
  --card: rgba(255, 250, 245, 0.78);
  --card-strong: rgba(255, 253, 250, 0.96);
  --border: rgba(95, 56, 47, 0.12);
  --text: #25181f;
  --muted: #6f5962;
  --accent: #de6b49;
  --accent-strong: #b2472f;
  --accent-soft: rgba(242, 184, 154, 0.36);
  --accent-glow: rgba(223, 119, 78, 0.28);
  --secondary: #22576f;
  --secondary-soft: rgba(84, 132, 154, 0.18);
  --success: #2f7d62;
  --shadow: 0 24px 70px rgba(74, 35, 41, 0.12);
  --panel-glow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.wallet-modal-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(31, 19, 20, .58); backdrop-filter: blur(14px); }
.wallet-modal { position: relative; width: min(980px, 100%); max-height: 90vh; overflow: auto; padding: clamp(28px, 5vw, 56px); border-radius: 34px; background: linear-gradient(145deg, #fffaf5, #f7e6d8); box-shadow: 0 32px 90px rgba(38, 19, 17, .28); }
.wallet-modal h2 { margin: 8px 0 10px; font-family: var(--display-font); font-size: clamp(2rem, 5vw, 4rem); }
.wallet-modal-copy { max-width: 680px; color: var(--muted); }
.wallet-modal-close { position: absolute; top: 20px; right: 22px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.72); font-size: 1.7rem; cursor: pointer; }
.wallet-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.wallet-plan-card { position: relative; display: flex; min-height: 280px; flex-direction: column; padding: 26px; border: 1px solid rgba(114,64,37,.14); border-radius: 26px; background: rgba(255,255,255,.78); }
.wallet-plan-card.is-featured { border-color: #bd713d; box-shadow: 0 18px 44px rgba(160,88,43,.15); }
.wallet-plan-card h3 { margin: 0 0 22px; font-size: 1.25rem; }
.wallet-plan-card strong { font-size: 2.3rem; }
.wallet-plan-card p { color: var(--muted); font-weight: 700; }
.wallet-plan-card button { margin-top: auto; padding: 14px; border: 0; border-radius: 999px; color: white; background: linear-gradient(90deg, #ef7b4e, #bd482f); font-weight: 800; cursor: pointer; }
.wallet-plan-card button:disabled { opacity: .55; cursor: wait; }
.wallet-plan-badge { position: absolute; top: 18px; right: 18px; font-size: .68rem; letter-spacing: .12em; font-weight: 900; color: #7c411f; }
.wallet-payment-status { min-height: 24px; margin: 20px 0 0; color: var(--accent-strong); font-weight: 700; }
.wallet-history { grid-column: 1 / -1; margin-top: 8px; padding: 22px; border-radius: 22px; background: rgba(255,255,255,.56); }
.wallet-history h3 { margin: 0 0 12px; }
.wallet-history div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid rgba(95,59,38,.1); text-transform: capitalize; }
.wallet-history div strong { font-size: .82rem; color: var(--accent-strong); }
@media (max-width: 720px) { .wallet-plan-grid { grid-template-columns: 1fr; } .wallet-plan-card { min-height: 220px; } }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(229, 137, 95, 0.26), transparent 26%),
    radial-gradient(circle at 90% 10%, rgba(69, 118, 145, 0.16), transparent 18%),
    radial-gradient(circle at 30% 80%, rgba(236, 194, 159, 0.28), transparent 22%),
    linear-gradient(135deg, #fff7f2 0%, var(--bg) 40%, var(--bg-accent) 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(16px);
  opacity: 0.7;
}

body::before {
  top: 6%;
  right: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(239, 146, 104, 0.26), transparent 68%);
}

body::after {
  bottom: 6%;
  left: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(72, 121, 144, 0.18), transparent 68%);
}

.shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar,
.main {
  padding: 24px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(39, 23, 35, 0.92), rgba(71, 39, 49, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  color: #fff8f3;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar .subtle,
.sidebar .panel-copy,
.sidebar .field span,
.sidebar .panel-header h2,
.sidebar .auth-step-note,
.sidebar .empty-state,
.sidebar .conversation-item p,
.sidebar .asset-item p {
  color: rgba(255, 240, 233, 0.74);
}

.sidebar .brand h1,
.sidebar .panel-header h2,
.sidebar .user-card,
.sidebar .conversation-item h3,
.sidebar .asset-item h3 {
  color: #fffaf6;
}

.brand h1,
.hero h2,
.chat-header h2,
.panel-header h2,
.character-card h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.brand h1,
.hero h2 {
  margin: 0;
  line-height: 1.05;
}

.brand .subtle {
  margin-top: 10px;
  max-width: 34ch;
  line-height: 1.55;
}

.brand {
  padding: 8px 6px 2px;
}

.brand-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff1e7;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
}

.page-link.active {
  background: rgba(255, 236, 224, 0.16);
  color: #fffaf6;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffe8de;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.subtle {
  color: var(--muted);
  margin: 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  box-shadow: var(--panel-glow), var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  pointer-events: none;
}

.panel-copy {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.panel-header,
.chat-actions,
.chat-header,
.chat-header-main,
.character-card-top,
.auth-toggle,
.chat-stats,
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.auth-step-note {
  min-height: 20px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.auth-alert {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(157, 45, 32, 0.16);
  background: rgba(157, 45, 32, 0.08);
  color: #9d2d20;
  font-size: 0.9rem;
  line-height: 1.45;
}

.phone-input-group {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
}

.country-code-select {
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

.field input,
.field textarea,
.field select,
.chat-form textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(95, 59, 38, 0.12);
  padding: 14px 15px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.chat-form textarea:focus {
  outline: 2px solid rgba(178, 95, 59, 0.25);
  border-color: var(--accent);
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-field input {
  width: 22px;
  height: 22px;
}

.chat-form textarea {
  min-height: 110px;
  resize: vertical;
}

.primary-button,
.ghost-button,
.toggle-button,
.character-card {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, #f08257, var(--accent-strong));
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(223, 110, 74, 0.26);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-button,
.toggle-button {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(95, 59, 38, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.ghost-button.danger-button {
  background: rgba(157, 45, 32, 0.08);
  color: #9d2d20;
  border-color: rgba(157, 45, 32, 0.18);
}

.toggle-button.active {
  background: linear-gradient(135deg, rgba(242, 182, 149, 0.88), rgba(255, 230, 214, 0.92));
  color: #7f311d;
  border-color: rgba(178, 95, 59, 0.12);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  height: calc(100vh - 140px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.85fr) auto;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 18px;
  padding: 26px 28px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(247, 203, 175, 0.75), transparent 30%),
    linear-gradient(135deg, rgba(255, 252, 249, 0.86), rgba(255, 245, 238, 0.94));
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 26px 64px rgba(75, 39, 44, 0.12);
}

.hero-actions {
  align-items: end;
  justify-content: end;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-kicker {
  margin: 0;
  color: var(--secondary);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.95;
  max-width: 11ch;
}

.hero-subtitle {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(95, 59, 38, 0.09);
  color: var(--text);
  font-size: 0.84rem;
}

.button-link {
  text-decoration: none;
}

.hero-showcase {
  display: grid;
  gap: 12px;
}

.showcase-card {
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.showcase-card.is-accent {
  background: linear-gradient(135deg, rgba(246, 230, 222, 0.92), rgba(250, 243, 235, 0.84));
}

.showcase-card strong,
.showcase-card p {
  display: block;
  margin: 0;
}

.showcase-card strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.2;
}

.showcase-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.showcase-label {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.menu-language {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  font-size: 0.88rem;
  color: var(--muted);
}

.menu-language select {
  border-radius: 14px;
  border: 1px solid rgba(95, 59, 38, 0.12);
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-panel {
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 225, 205, 0.34), transparent 18%),
    linear-gradient(135deg, rgba(255, 251, 247, 0.84), rgba(255, 247, 239, 0.96));
}

.tier-summary-list,
.tier-architecture-grid {
  display: grid;
  gap: 12px;
}

.consultation-panel {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(132, 162, 230, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(255, 250, 246, 0.92), rgba(247, 242, 255, 0.72));
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.consultation-toggle {
  margin: 0;
}

.consultation-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.inline-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.place-search-status {
  min-height: 20px;
}

.place-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.place-result-button {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(95, 59, 38, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.place-result-button:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 95, 59, 0.28);
  box-shadow: 0 10px 22px rgba(90, 57, 42, 0.08);
}

.place-result-label {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.place-result-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.tier-blueprint {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.tier-note-block {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 247, 240, 0.92);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.tier-note-block strong,
.tier-note-block p {
  margin: 0;
}

.tier-note-block p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.tier-blueprint-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.readiness-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.readiness-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
}

.readiness-badge.is-ready {
  background: rgba(47, 125, 98, 0.12);
  color: var(--success);
}

.readiness-badge.is-warning {
  background: rgba(222, 107, 73, 0.12);
  color: var(--accent-strong);
}

.tier-warning {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(222, 107, 73, 0.18);
  background: rgba(222, 107, 73, 0.08);
  color: var(--accent-strong);
  line-height: 1.5;
}

.tier-summary-card,
.architecture-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff7f1;
}

.tier-summary-card p,
.architecture-card p,
.architecture-card h3,
.architecture-card ul {
  margin: 0;
}

.tier-summary-card p,
.architecture-card ul {
  margin-top: 10px;
  line-height: 1.55;
  color: rgba(255, 241, 232, 0.82);
}

.architecture-card {
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(95, 59, 38, 0.08);
}

.architecture-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.tier-architecture-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roster-panel-home {
  margin-top: 18px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
}

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

.dashboard-card {
  min-height: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.dashboard-card h3,
.dashboard-card p,
.dashboard-stat,
.dashboard-card ul {
  margin: 0;
}

.dashboard-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.dashboard-card .panel-header {
  align-items: start;
}

.dashboard-profile-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.dashboard-profile-header strong {
  font-size: 1.1rem;
}

.verification-row,
.dashboard-stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.verification-pill,
.dashboard-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.verification-pill {
  background: rgba(47, 125, 98, 0.1);
  color: var(--success);
}

.verification-pill.is-muted {
  background: rgba(114, 93, 82, 0.1);
  color: var(--muted);
}

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

.dashboard-stat {
  flex-direction: column;
  align-items: start;
  gap: 2px;
  min-height: 92px;
  border-radius: 18px;
  background: rgba(240, 201, 167, 0.2);
  color: var(--text);
  border: 1px solid rgba(178, 95, 59, 0.08);
  padding: 14px;
}

.dashboard-stat strong {
  font-size: 1.35rem;
}

.dashboard-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.status-badge,
.tier-pill,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
}

.status-badge {
  background: rgba(255, 255, 255, 0.88);
  color: var(--secondary);
  padding: 10px 14px;
  border: 1px solid rgba(86, 132, 156, 0.15);
  box-shadow: 0 12px 24px rgba(68, 99, 115, 0.08);
}

.character-grid,
.conversation-list,
.message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.roster-panel,
.chat-panel,
.history-panel,
.admin-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.character-grid,
.conversation-list {
  padding-right: 4px;
}

.character-card {
  width: 100%;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(252, 245, 239, 0.95));
  border-radius: 26px;
  border: 1px solid transparent;
  padding: 18px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.character-card:hover,
.conversation-item:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 95, 59, 0.3);
  box-shadow: 0 14px 30px rgba(90, 57, 42, 0.1);
}

.character-card-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.character-copy {
  min-width: 0;
  flex: 1;
}

.character-avatar,
.chat-avatar {
  flex: 0 0 auto;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(178, 95, 59, 0.28), rgba(95, 45, 28, 0.72));
  color: #fffaf5;
  display: grid;
  place-items: center;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow: hidden;
  border: 1px solid rgba(95, 59, 38, 0.1);
  box-shadow: 0 12px 24px rgba(90, 57, 42, 0.14);
}

.character-avatar {
  width: 72px;
  height: 72px;
  font-size: 1rem;
}

.chat-avatar {
  width: 104px;
  height: 104px;
  font-size: 1.35rem;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-composite {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.34), transparent 48%),
    linear-gradient(180deg, var(--avatar-backdrop-base, rgba(255, 249, 244, 0.9)), var(--avatar-backdrop-glow, rgba(58, 31, 22, 0.12)));
  transition: background 320ms ease;
}

.avatar-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.avatar-layer.is-background {
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}

.avatar-layer.is-character,
.avatar-layer.is-expression {
  inset: 4% 3% 0;
  width: 94%;
  height: 96%;
  object-fit: contain;
}

.avatar-layer.is-expression {
  filter: drop-shadow(0 6px 16px rgba(58, 31, 22, 0.12));
}

.avatar-fallback {
  text-transform: uppercase;
  color: var(--avatar-backdrop-ink, inherit);
  transition: background 320ms ease, color 320ms ease;
}

.character-card.active,
.conversation-item.active {
  border-color: rgba(178, 95, 59, 0.55);
  box-shadow: 0 16px 40px rgba(178, 95, 59, 0.16);
}

.character-card h3 {
  margin: 10px 0 6px;
  font-size: 1.15rem;
}

.character-card .role,
.character-card .description {
  margin: 0;
}

.character-card .description {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.tier-pill,
.category-pill {
  padding: 6px 10px;
}

.tier-pill {
  background: rgba(242, 182, 149, 0.26);
  color: var(--accent-strong);
}

.category-pill {
  background: rgba(84, 132, 154, 0.14);
  color: var(--secondary);
}

.chat-panel {
  background:
    radial-gradient(circle at top right, rgba(245, 209, 187, 0.34), transparent 20%),
    linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(252, 246, 240, 0.98));
}

.chat-header-main {
  align-items: center;
}

.message-list {
  flex: 1;
  padding: 4px 2px 4px 0;
}

.memory-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.memory-panel .panel-header {
  margin-bottom: 0;
}

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

.memory-card,
.memory-structured,
.memory-item {
  border-radius: 18px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.84);
  padding: 12px 14px;
}

.memory-card p,
.memory-structured p,
.memory-item p,
.memory-item h3,
.memory-list-meta {
  margin: 0;
}

.memory-card strong,
.memory-structured strong {
  display: block;
  margin-bottom: 6px;
}

.memory-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(178, 95, 59, 0.12);
  color: var(--accent-strong);
  font-size: 0.8rem;
}

.memory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-item-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.memory-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-type-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(47, 125, 98, 0.1);
  color: var(--success);
  font-size: 0.78rem;
}

.memory-list-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.memory-action-button {
  border: 1px solid rgba(95, 59, 38, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
}

.memory-action-button.is-danger {
  color: #9d2d20;
}

.message {
  max-width: min(80%, 720px);
  padding: 14px 16px;
  border-radius: 20px;
  line-height: 1.5;
  white-space: pre-wrap;
  animation: rise 180ms ease;
}

.message.user {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(236, 157, 117, 0.24), rgba(237, 131, 91, 0.34));
}

.message.character {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.message-meta {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.message-voice-control {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: min(100%, 420px);
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(220, 248, 224, 0.92), rgba(239, 251, 239, 0.96));
  border: 1px solid rgba(47, 125, 98, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.message-voice-control audio {
  display: none;
}

.message-voice-play {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #2f9474, #25745d);
  box-shadow: 0 9px 18px rgba(47, 125, 98, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.message-voice-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(47, 125, 98, 0.28);
}

.message-voice-play:disabled {
  cursor: wait;
  opacity: 0.62;
}

.message-voice-play-icon {
  display: block;
  margin-left: 2px;
  font-size: 0.9rem;
  line-height: 1;
}

.message-voice-control.is-playing .message-voice-play-icon {
  margin-left: 0;
  font-size: 0.72rem;
  letter-spacing: -0.18em;
}

.message-voice-control.is-loading .message-voice-play-icon {
  width: 17px;
  height: 17px;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  font-size: 0;
  animation: voiceButtonSpin 700ms linear infinite;
}

.message-voice-track {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.message-voice-waveform {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  overflow: hidden;
}

.message-voice-bar {
  flex: 1 1 0;
  min-width: 2px;
  max-width: 4px;
  height: var(--voice-bar-height, 14px);
  border-radius: 999px;
  background: rgba(72, 98, 90, 0.32);
  transition: background 100ms linear, transform 100ms linear;
}

.message-voice-bar.is-played {
  background: #2f8c70;
  transform: scaleY(1.06);
}

.message-voice-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(55, 80, 72, 0.72);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

@keyframes voiceButtonSpin {
  to {
    transform: rotate(360deg);
  }
}

.message-visual-cue {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(236, 157, 117, 0.12);
  border: 1px solid rgba(178, 95, 59, 0.14);
}

.message-visual-cue p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.message-visual-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(178, 95, 59, 0.14);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-visual-preview {
  position: relative;
  margin-top: 12px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 251, 247, 0.92);
}

.message-visual-layer {
  display: block;
  width: 100%;
  height: 100%;
}

.message-visual-layer.is-full,
.message-visual-layer.is-background {
  object-fit: cover;
}

.message-visual-preview.is-composite .message-visual-layer {
  position: absolute;
  inset: 0;
}

.message-visual-layer.is-character {
  z-index: 1;
  object-fit: contain;
}

.conversation-item {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid transparent;
  cursor: pointer;
  color: #fffaf6;
}

.conversation-item-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conversation-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(178, 95, 59, 0.24), rgba(95, 45, 28, 0.68));
  color: #fffaf5;
  display: grid;
  place-items: center;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow: hidden;
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.conversation-copy {
  min-width: 0;
  flex: 1;
}

.conversation-item h3,
.conversation-item p {
  margin: 0;
}

.conversation-item p {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar .conversation-item p,
.sidebar .conversation-item h3 {
  color: #fff7f2;
}

.empty-state {
  color: var(--muted);
  justify-content: center;
  align-items: center;
  min-height: 140px;
  text-align: center;
  border: 1px dashed rgba(95, 59, 38, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  padding: 18px;
}

.user-card,
.chat-stats {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.user-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-panel textarea {
  min-height: 84px;
  resize: vertical;
}

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

.asset-block {
  border-top: 1px solid rgba(95, 59, 38, 0.1);
  margin-top: 6px;
  padding-top: 14px;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
}

.asset-list.empty-state {
  display: flex;
}

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

.asset-dropzone {
  border: 1px dashed rgba(178, 95, 59, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.asset-dropzone.active {
  border-color: rgba(178, 95, 59, 0.72);
  background: rgba(240, 201, 167, 0.28);
  transform: translateY(-1px);
}

.asset-upload-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: start;
  text-align: left;
}

.asset-helper-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 245, 236, 0.92), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(178, 95, 59, 0.14);
}

.asset-helper-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.asset-upload-preview-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.asset-upload-preview-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(95, 59, 38, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.asset-upload-preview-card p {
  margin: 6px 0 0;
  color: var(--muted);
  word-break: break-word;
}

.asset-upload-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.asset-upload-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.asset-upload-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  background: rgba(240, 201, 167, 0.3);
  color: var(--text);
}

.asset-upload-badge.is-muted {
  background: rgba(95, 59, 38, 0.08);
  color: var(--muted);
}

.upload-thumb {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(255, 245, 236, 0.84), rgba(255, 255, 255, 0.92));
  border-radius: 14px;
}

.asset-draft-format-validation {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(95, 59, 38, 0.12);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  transition: width 120ms ease;
}

.asset-layer-hint {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.emotion-tag-grid,
.selected-emotion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emotion-tag-button,
.selected-emotion-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.84rem;
}

.emotion-tag-button {
  border: 1px solid rgba(95, 59, 38, 0.1);
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  cursor: pointer;
}

.emotion-tag-button.is-active {
  background: rgba(240, 201, 167, 0.28);
  color: var(--text);
  border-color: rgba(178, 95, 59, 0.24);
}

.emotion-tag-button.is-custom {
  border-style: dashed;
}

.emotion-tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(95, 59, 38, 0.08);
  font-size: 0.68rem;
  color: var(--muted);
}

.selected-emotion-tag {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(95, 59, 38, 0.08);
  color: var(--text);
}

.selected-emotion-tag button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.asset-preview-studio {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 250, 246, 0.88);
}

.asset-preview-stage {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.asset-composer-preview {
  width: 140px;
  height: 176px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(178, 95, 59, 0.28), rgba(95, 45, 28, 0.72));
  color: #fffaf5;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(95, 59, 38, 0.1);
  box-shadow: 0 14px 30px rgba(90, 57, 42, 0.12);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.asset-preview-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.asset-composer-layer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-layer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(95, 59, 38, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.asset-layer-pill strong {
  color: var(--text);
}

.asset-validation-studio {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 252, 248, 0.9);
}

.asset-analysis-studio {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 252, 248, 0.9);
}

.asset-analysis-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-analysis-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(95, 59, 38, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
}

.asset-validation-summary,
.asset-validation-findings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asset-validation-card {
  flex: 1 1 180px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.asset-validation-card strong,
.asset-validation-card p {
  margin: 0;
}

.asset-validation-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.asset-validation-card.is-good {
  border-color: rgba(47, 125, 98, 0.18);
  background: rgba(47, 125, 98, 0.08);
}

.asset-validation-card.is-warning {
  border-color: rgba(222, 107, 73, 0.18);
  background: rgba(222, 107, 73, 0.08);
}

.asset-validation-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(95, 59, 38, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.asset-item {
  aspect-ratio: 1 / 1;
  min-height: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(95, 59, 38, 0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 10px;
}

.asset-item-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.asset-item-headline {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.asset-layer-badge,
.asset-overlay-pill,
.asset-analysis-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(95, 59, 38, 0.08);
  border: 1px solid rgba(95, 59, 38, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
}

.asset-analysis-badge.is-completed {
  background: rgba(47, 125, 98, 0.1);
  border-color: rgba(47, 125, 98, 0.16);
  color: var(--success);
}

.asset-analysis-badge.is-skipped {
  background: rgba(95, 59, 38, 0.08);
}

.asset-analysis-badge.is-failed {
  background: rgba(157, 45, 32, 0.1);
  border-color: rgba(157, 45, 32, 0.18);
  color: #9d2d20;
}

.asset-analysis-badge.is-pending,
.asset-analysis-badge.is-processing {
  background: rgba(222, 107, 73, 0.1);
  border-color: rgba(222, 107, 73, 0.14);
  color: var(--accent-strong);
}

.asset-item-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.asset-item-controls .mini-button {
  width: 100%;
  justify-content: center;
}

.mini-button {
  border: 1px solid rgba(95, 59, 38, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.mini-button.is-danger {
  color: #9d2d20;
  border-color: rgba(157, 45, 32, 0.18);
  background: rgba(157, 45, 32, 0.08);
}

.asset-item h3 {
  margin: 0;
}

.asset-item.active {
  border-color: rgba(178, 95, 59, 0.55);
  box-shadow: 0 14px 30px rgba(178, 95, 59, 0.14);
}

.asset-item.active .edit-asset-button {
  border-color: rgba(178, 95, 59, 0.35);
  background: rgba(240, 201, 167, 0.3);
  color: var(--text);
}

.asset-preview-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: linear-gradient(135deg, rgba(255, 247, 239, 0.9), rgba(255, 255, 255, 0.96));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  margin-top: 0;
  border-radius: 0;
  border: 0;
  padding: 8px;
}

.asset-preview-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.asset-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(180deg, rgba(26, 18, 14, 0.02), rgba(26, 18, 14, 0.88));
  color: #fff7f1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.asset-preview-shell:hover .asset-preview-overlay,
.asset-item.active .asset-preview-overlay {
  opacity: 1;
  pointer-events: auto;
}

.asset-overlay-summary {
  display: grid;
  gap: 6px;
}

.asset-overlay-summary-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff7f1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asset-overlay-emotions {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #fffdf9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asset-see-more-button {
  align-self: flex-start;
  border: 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.96);
  color: #7d3623;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.asset-see-more-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(32, 18, 14, 0.18);
}

.asset-metadata-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.asset-metadata-modal.hidden {
  display: none;
}

.asset-metadata-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 15, 11, 0.56);
  backdrop-filter: blur(6px);
}

.asset-metadata-dialog {
  position: relative;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  background: #fffaf6;
  border: 1px solid rgba(198, 108, 76, 0.16);
  box-shadow: 0 28px 60px rgba(52, 26, 19, 0.22);
}

.asset-metadata-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.asset-metadata-dialog-head h3 {
  margin: 4px 0 0;
}

.asset-metadata-textbox {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border-radius: 20px;
  border: 1px solid rgba(198, 108, 76, 0.18);
  background: #fff;
  padding: 16px 18px;
  font: 0.83rem/1.55 "SFMono-Regular", "Menlo", "Monaco", monospace;
  color: #4b2a20;
}

.royal-studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.royal-studio-panel {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 252, 248, 0.92);
}

.royal-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.royal-card-list.empty-state {
  display: flex;
}

.royal-card {
  border: 1px solid rgba(95, 59, 38, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(74, 35, 41, 0.06);
}

button.royal-card {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.royal-card.active,
.royal-card:hover {
  border-color: rgba(178, 95, 59, 0.34);
  box-shadow: 0 14px 28px rgba(178, 95, 59, 0.12);
}

.royal-card.is-default {
  border-color: rgba(178, 95, 59, 0.24);
  background: linear-gradient(135deg, rgba(255, 247, 239, 0.96), rgba(255, 255, 255, 0.96));
}

.royal-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.royal-card-head h4 {
  margin: 0;
  font-size: 1rem;
}

.royal-card-key {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  word-break: break-all;
}

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

.royal-meta-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 247, 239, 0.82);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.royal-meta-grid span,
.royal-card-foot {
  color: var(--muted);
  font-size: 0.8rem;
}

.royal-meta-grid strong {
  color: var(--text);
  font-size: 0.88rem;
  word-break: break-word;
}

.royal-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.royal-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(95, 59, 38, 0.08);
  border: 1px solid rgba(95, 59, 38, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
}

.royal-pill.is-accent {
  background: rgba(240, 201, 167, 0.3);
  color: var(--text);
  border-color: rgba(178, 95, 59, 0.14);
}

.royal-pill.is-ready {
  background: rgba(47, 125, 98, 0.1);
  border-color: rgba(47, 125, 98, 0.14);
  color: var(--success);
}

.royal-pill.is-warning {
  background: rgba(222, 107, 73, 0.1);
  border-color: rgba(222, 107, 73, 0.16);
  color: var(--accent-strong);
}

.royal-pill.is-muted {
  background: rgba(95, 59, 38, 0.05);
}

.royal-card-foot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.45;
}

.page-home {
  background:
    radial-gradient(circle at 12% 12%, rgba(241, 163, 121, 0.22), transparent 24%),
    radial-gradient(circle at 90% 14%, rgba(86, 132, 156, 0.14), transparent 20%),
    linear-gradient(180deg, #fff9f3 0%, #f8ede4 52%, #f4e7dc 100%);
}

.page-home .shell-home {
  display: block;
  min-height: 100vh;
  max-width: 1380px;
  margin: 0 auto;
  padding: 22px 22px 38px;
}

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

.home-brandmark {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-brandmark strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.home-nav {
  margin-top: 0;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.home-hero-copy,
.home-showcase-stack,
.home-value-card,
.home-tier-card {
  position: relative;
  overflow: hidden;
}

.home-hero-copy {
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(255, 226, 205, 0.74), transparent 28%),
    linear-gradient(145deg, rgba(255, 252, 248, 0.9), rgba(255, 245, 238, 0.98));
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 26px 66px rgba(70, 36, 38, 0.1);
}

.home-title {
  margin: 0;
  max-width: 11ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.home-subtitle {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.home-metric-card {
  padding: 16px 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.home-metric-card span,
.home-metric-card strong,
.home-metric-card p {
  display: block;
  margin: 0;
}

.home-metric-card span {
  color: var(--secondary);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-metric-card strong {
  margin-top: 8px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.15rem;
}

.home-metric-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.home-hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-visual-stage {
  position: relative;
  min-height: 360px;
  padding: 20px 18px 18px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 201, 166, 0.42), transparent 24%),
    radial-gradient(circle at 20% 82%, rgba(95, 140, 163, 0.16), transparent 22%),
    linear-gradient(145deg, rgba(255, 252, 248, 0.88), rgba(247, 238, 231, 0.96));
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 24px 60px rgba(70, 36, 38, 0.09);
  overflow: hidden;
}

.home-visual-halo {
  position: absolute;
  inset: 8% auto auto 18%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(229, 126, 78, 0.18), transparent 68%);
  filter: blur(8px);
  animation: breathe 8s ease-in-out infinite;
}

.home-visual-device {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin-left: auto;
  padding: 14px;
  border-radius: 28px;
  background: rgba(42, 28, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 56px rgba(43, 27, 29, 0.22);
  animation: floatCard 8s ease-in-out infinite;
}

.home-visual-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 240, 233, 0.78);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.home-visual-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7ae1b7;
  box-shadow: 0 0 0 6px rgba(122, 225, 183, 0.14);
}

.home-visual-screen {
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(246, 239, 233, 0.96));
  min-height: 250px;
}

.home-visual-overline {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-visual-screen h2 {
  margin: 0;
  max-width: 13ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.02;
}

.home-visual-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.92rem;
}

.home-visual-message-user {
  margin-left: auto;
  max-width: 88%;
  background: rgba(232, 162, 120, 0.2);
  color: var(--text);
}

.home-visual-message-ai {
  max-width: 92%;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.home-visual-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.home-visual-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(84, 132, 154, 0.12);
  color: var(--secondary);
  font-size: 0.78rem;
}

.home-floating-note {
  position: absolute;
  z-index: 0;
  max-width: 180px;
  padding: 14px 14px 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 18px 34px rgba(70, 36, 38, 0.08);
  backdrop-filter: blur(12px);
}

.home-floating-note span,
.home-floating-note strong {
  display: block;
  margin: 0;
}

.home-floating-note span {
  color: var(--secondary);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-floating-note strong {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.home-floating-note-left {
  left: 18px;
  bottom: 22px;
  animation: floatNoteLeft 9s ease-in-out infinite;
}

.home-floating-note-right {
  right: 24px;
  top: 22px;
  animation: floatNoteRight 11s ease-in-out infinite;
}

.home-showcase-stack {
  padding: 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 208, 176, 0.42), transparent 26%),
    linear-gradient(180deg, rgba(255, 250, 245, 0.88), rgba(248, 241, 233, 0.95));
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 22px 54px rgba(70, 36, 38, 0.08);
}

.home-scene-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.home-scene-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.home-scene-card.is-accent,
.home-tier-card.is-highlight {
  background: linear-gradient(145deg, rgba(246, 231, 221, 0.96), rgba(252, 245, 238, 0.92));
}

.home-scene-card strong,
.home-scene-card p {
  display: block;
  margin: 0;
}

.home-scene-card strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.25;
}

.home-scene-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.58;
}

.home-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.home-auth-panel {
  padding: 22px;
  background: rgba(255, 251, 247, 0.9);
}

.home-value-strip,
.home-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-value-card,
.home-tier-card {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 36, 38, 0.06);
}

.home-value-card h2,
.home-tier-card h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  line-height: 1.18;
}

.home-value-card h2 {
  font-size: 1.45rem;
}

.home-tier-card h3 {
  font-size: 1.3rem;
}

.home-value-card p,
.home-tier-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.home-section-heading {
  margin-bottom: 16px;
}

.home-section-heading h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.05;
  max-width: 17ch;
}

.home-catalog-panel {
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 223, 204, 0.42), transparent 20%),
    linear-gradient(145deg, rgba(255, 252, 248, 0.9), rgba(247, 240, 233, 0.96));
}

.page-home .character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-right: 0;
}

.page-home .character-card {
  height: 100%;
  min-height: 280px;
  padding: 20px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(255, 228, 211, 0.42), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 245, 240, 0.96));
  box-shadow: 0 20px 44px rgba(70, 36, 38, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-home .character-card:nth-child(3n + 2) {
  transform: translateY(18px);
}

.page-home .character-card:hover {
  transform: translateY(-4px);
}

.page-home .character-card:nth-child(3n + 2):hover {
  transform: translateY(12px);
}

.page-home .character-card-top {
  align-items: flex-start;
}

.page-home .character-card-body {
  align-items: flex-end;
  gap: 18px;
}

.page-home .character-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-home .character-card h3 {
  margin-top: 0;
  font-size: 1.28rem;
}

.page-home .character-card .role {
  font-size: 0.92rem;
  color: var(--secondary);
}

.page-home .character-card .description {
  margin-top: 12px;
  font-size: 0.93rem;
  line-height: 1.6;
}

.page-home .character-avatar {
  width: 118px;
  height: 118px;
  border-radius: 26px;
  box-shadow: 0 18px 30px rgba(90, 57, 42, 0.16);
}

.language-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.language-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.language-checkbox input {
  margin: 0;
}

.advanced-settings {
  border-radius: 20px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.68);
  padding: 0 18px 18px;
}

.advanced-settings summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 18px 0;
}

.advanced-settings summary::-webkit-details-marker {
  display: none;
}

.advanced-settings-body {
  display: grid;
  gap: 16px;
}

.voice-config-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.voice-preview-actions {
  display: grid;
  gap: 10px;
}

.voice-preview-audio {
  width: 100%;
}

.royal-launch-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(190, 120, 73, 0.18);
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.94), rgba(255, 255, 255, 0.82));
}

.royal-launch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.royal-launch-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.royal-launch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(95, 59, 38, 0.08);
  color: #7b563f;
}

.royal-launch-badge.is-live {
  background: rgba(70, 143, 110, 0.14);
  color: #2f7758;
}

.royal-launch-badge.is-ready {
  background: rgba(214, 158, 46, 0.14);
  color: #8a5f11;
}

.royal-launch-badge.is-draft {
  background: rgba(173, 104, 69, 0.12);
  color: #8e5132;
}

.royal-launch-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.royal-launch-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  background: rgba(255, 255, 255, 0.84);
  color: #785e52;
  font-size: 0.88rem;
  font-weight: 600;
}

.royal-launch-metric.is-good {
  border-color: rgba(70, 143, 110, 0.22);
  color: #2f7758;
}

.royal-launch-metric.is-pending {
  border-color: rgba(173, 104, 69, 0.18);
  color: #8e5132;
}

.royal-launch-requirements {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #725b4f;
}

.checkbox-field input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-home .tier-pill,
.page-home .category-pill {
  padding: 7px 12px;
  font-size: 0.74rem;
}

.page-home .empty-state {
  min-height: 180px;
  place-items: center;
}

body.modal-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

@keyframes rise {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes floatNoteLeft {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

@keyframes floatNoteRight {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 6px, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .shell,
  .workspace {
    grid-template-columns: 1fr;
  }

  .page-home .shell-home {
    padding: 22px 18px 34px;
  }

  .home-hero,
  .home-value-strip,
  .home-tier-grid,
  .page-home .character-grid,
  .home-metric-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-layout,
  .tier-architecture-grid {
    grid-template-columns: 1fr;
  }

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

  .workspace {
    height: auto;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .chat-avatar {
    width: 72px;
    height: 88px;
  }
}

@media (max-width: 720px) {
  .home-topbar,
  .home-status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-copy,
  .home-showcase-stack,
  .home-auth-panel,
  .home-value-card,
  .home-tier-card {
    padding: 20px;
  }

  .home-title {
    max-width: none;
    font-size: 2.9rem;
  }

  .home-visual-device {
    margin: 0 auto;
  }

  .home-floating-note {
    position: static;
    max-width: none;
    margin-top: 12px;
    animation: none;
  }

  .home-scene-row {
    grid-template-columns: 1fr;
  }

  .page-home .character-card:nth-child(3n + 2) {
    transform: none;
  }

  .page-home .character-card:hover,
  .page-home .character-card:nth-child(3n + 2):hover {
    transform: translateY(-3px);
  }

  .hero,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-stat-grid,
  .memory-grid,
  .split-fields,
  .phone-input-group {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px 18px;
  }

  .hero-title {
    max-width: none;
    font-size: 2.7rem;
  }

  .dashboard-profile-header,
  .dashboard-meta-row {
    flex-direction: column;
  }
}

.pricing-panel {
  margin-bottom: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 0%, rgba(214, 130, 84, 0.16), transparent 32%),
    rgba(255, 252, 248, 0.94);
}

.pricing-panel-header,
.pricing-header-actions,
.pricing-save-row,
.pricing-tier-heading,
.pricing-total span {
  display: flex;
  align-items: center;
}

.pricing-panel-header,
.pricing-save-row {
  justify-content: space-between;
  gap: 18px;
}

.pricing-header-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pricing-margin-badge {
  padding: 10px 14px;
  border-radius: 999px;
  color: #276e5a;
  background: rgba(92, 157, 132, 0.12);
  border: 1px solid rgba(92, 157, 132, 0.18);
  font-weight: 700;
  font-size: 0.84rem;
}

.pricing-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pricing-tier-card {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 22px;
  border: 1px solid rgba(92, 55, 43, 0.1);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 34px rgba(72, 42, 31, 0.05);
}

.pricing-tier-premium {
  background: linear-gradient(145deg, rgba(255, 250, 240, 0.95), rgba(255, 255, 255, 0.78));
}

.pricing-tier-royal {
  color: #fff8f1;
  background: linear-gradient(145deg, #392825, #211719);
}

.pricing-tier-royal .field span,
.pricing-tier-royal .field small {
  color: rgba(255, 248, 241, 0.72);
}

.pricing-tier-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.pricing-tier-heading strong {
  font-size: 0.82rem;
  opacity: 0.72;
}

.pricing-tier-card .field small {
  min-height: 1.2em;
  font-size: 0.78rem;
}

.pricing-tier-card input {
  font-size: 1.15rem;
  font-weight: 750;
}

.pricing-total {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border-radius: 17px;
  background: rgba(176, 98, 59, 0.09);
  font-size: 0.8rem;
}

.pricing-total span {
  justify-content: space-between;
  gap: 12px;
}

.pricing-tier-royal .pricing-total {
  background: rgba(255, 255, 255, 0.09);
}

.pricing-advanced {
  padding: 16px 20px;
  border: 1px solid rgba(92, 55, 43, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.pricing-advanced summary {
  cursor: pointer;
  font-weight: 750;
}

.pricing-advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.pricing-save-row {
  padding-top: 4px;
}

@media (max-width: 1100px) {
  .pricing-tier-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-tier-royal {
    grid-column: 1 / -1;
  }

  .pricing-advanced-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .pricing-panel-header,
  .pricing-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-header-actions {
    justify-content: flex-start;
  }

  .pricing-tier-grid,
  .pricing-advanced-grid {
    grid-template-columns: 1fr;
  }

  .pricing-tier-royal {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .sidebar,
  .main {
    padding: 16px;
  }

  .hero {
    align-items: start;
    flex-direction: column;
  }

  .message {
    max-width: 92%;
  }

  .split-fields {
    grid-template-columns: 1fr;
  }

  .phone-input-group {
    grid-template-columns: 1fr;
  }

  .asset-preview-stage {
    grid-template-columns: 1fr;
  }

  .asset-composer-preview {
    width: 100%;
    max-width: 220px;
    justify-self: center;
  }

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

  .chat-header,
  .chat-header-main {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-item-body {
    align-items: flex-start;
  }

  .character-card-body {
    align-items: center;
  }

  .character-avatar {
    width: 60px;
    height: 60px;
  }

  .chat-avatar {
    width: 64px;
    height: 64px;
  }
}

.landing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.landing-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff8f2;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 240, 228, 0.26), transparent 38%),
    linear-gradient(145deg, #d66c47, #7b3a2a);
  box-shadow: 0 14px 28px rgba(112, 57, 34, 0.16);
}

.landing-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.landing-brand-copy strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}

.landing-brand-copy small {
  color: var(--muted);
  max-width: 28ch;
  font-size: 0.78rem;
  line-height: 1.4;
}

.landing-toolbar,
.landing-account-utilities,
.landing-menu-actions,
.landing-hero-actions,
.landing-pill-row,
.landing-slider-controls,
.landing-tier-band-actions,
.landing-character-topline,
.landing-banner-note {
  display: flex;
  align-items: center;
}

.landing-toolbar {
  justify-content: flex-end;
  gap: 14px;
}

.landing-guest-actions,
.landing-account-utilities {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.landing-guest-actions .button-link {
  min-width: 132px;
}

.landing-account-utilities.hidden,
.landing-guest-actions.hidden {
  display: none;
}

.landing-menu-card {
  min-width: 238px;
  padding: 14px 16px;
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.82);
  border: 1px solid rgba(95, 59, 38, 0.09);
  box-shadow: 0 16px 34px rgba(70, 36, 38, 0.07);
  backdrop-filter: blur(14px);
}

.landing-menu-card strong,
.landing-menu-card p {
  margin: 0;
  display: block;
}

.landing-menu-label {
  margin: 0 0 6px;
  color: var(--secondary);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landing-menu-card strong {
  font-size: 1rem;
}

.landing-menu-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
  min-height: 2.6em;
}

.landing-menu-actions {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.landing-menu-actions .ghost-button {
  min-height: 40px;
  padding-inline: 14px;
}

.landing-menu-actions-profile .ghost-button:last-child {
  border-color: rgba(157, 45, 32, 0.18);
  color: #9d2d20;
}

.landing-main {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 22px;
  align-items: stretch;
}

.landing-hero-copy,
.landing-tier-band,
.landing-auth-panel,
.landing-stage-device {
  position: relative;
  overflow: hidden;
}

.landing-hero-copy {
  padding: 38px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 219, 196, 0.72), transparent 30%),
    linear-gradient(145deg, rgba(255, 252, 248, 0.96), rgba(249, 240, 233, 0.96));
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 30px 72px rgba(70, 36, 38, 0.1);
}

.landing-kicker {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(3.2rem, 6vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.landing-subtitle {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.74;
}

.landing-pill-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(95, 59, 38, 0.08);
  color: var(--secondary);
  font-size: 0.82rem;
}

.landing-hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.landing-banner-note {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.landing-banner-note p {
  margin: 0;
  color: var(--muted);
}

.landing-hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
}

.landing-hero-visual {
  position: relative;
  min-height: 100%;
  border-radius: 34px;
  background:
    radial-gradient(circle at 16% 16%, rgba(226, 145, 101, 0.22), transparent 24%),
    radial-gradient(circle at 84% 76%, rgba(92, 132, 154, 0.16), transparent 22%),
    linear-gradient(150deg, rgba(255, 250, 245, 0.9), rgba(245, 236, 228, 0.96));
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 28px 64px rgba(70, 36, 38, 0.09);
  overflow: hidden;
}

.landing-stage-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
}

.landing-stage-glow-one {
  width: 240px;
  height: 240px;
  left: -40px;
  top: -20px;
  background: radial-gradient(circle, rgba(231, 111, 61, 0.18), transparent 68%);
  animation: breathe 8s ease-in-out infinite;
}

.landing-stage-glow-two {
  width: 260px;
  height: 260px;
  right: -60px;
  bottom: -70px;
  background: radial-gradient(circle, rgba(84, 132, 154, 0.16), transparent 68%);
  animation: breathe 10s ease-in-out infinite reverse;
}

.landing-stage-device {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
  min-height: 100%;
}

.landing-stage-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 18px 36px rgba(70, 36, 38, 0.08);
}

.landing-stage-card-normal {
  margin-top: 48px;
  animation: floatCard 9s ease-in-out infinite;
}

.landing-stage-card-premium {
  animation: floatCard 7s ease-in-out infinite reverse;
}

.landing-stage-card-royal {
  margin-top: 28px;
  animation: floatCard 8.6s ease-in-out infinite;
}

.landing-stage-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.landing-stage-card-meta span {
  color: var(--secondary);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landing-stage-card-meta strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1rem;
  line-height: 1.18;
}

.landing-stage-avatar,
.landing-character-media,
.landing-character-avatar {
  aspect-ratio: 1 / 1;
}

.landing-stage-avatar {
  width: 100%;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
}

.landing-stage-avatar .avatar-layer-stack,
.landing-character-avatar .avatar-layer-stack {
  width: 100%;
  height: 100%;
}

.landing-stage-signal {
  position: absolute;
  z-index: 2;
  max-width: 180px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 18px 34px rgba(70, 36, 38, 0.08);
  backdrop-filter: blur(12px);
}

.landing-stage-signal span,
.landing-stage-signal strong {
  display: block;
  margin: 0;
}

.landing-stage-signal span {
  color: var(--secondary);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landing-stage-signal strong {
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.42;
}

.landing-stage-signal-left {
  left: 22px;
  bottom: 18px;
}

.landing-stage-signal-right {
  right: 20px;
  top: 20px;
}

.landing-auth-panel {
  padding: 22px;
  background: rgba(255, 251, 247, 0.92);
  box-shadow: 0 22px 52px rgba(70, 36, 38, 0.08);
}

.landing-tier-showcase {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.landing-section-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 54ch;
}

.landing-section-intro h2,
.landing-tier-band h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.landing-section-intro h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  line-height: 1;
}

.landing-tier-band {
  padding: 24px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 18px 44px rgba(70, 36, 38, 0.06);
}

.landing-tier-band.is-highlight {
  background: linear-gradient(145deg, rgba(249, 239, 231, 0.96), rgba(255, 248, 242, 0.94));
}

.landing-tier-band.is-royal {
  background:
    radial-gradient(circle at 86% 14%, rgba(236, 210, 178, 0.38), transparent 28%),
    linear-gradient(145deg, rgba(255, 249, 242, 0.96), rgba(246, 235, 225, 0.96));
}

.landing-tier-band-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.landing-tier-band-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.65;
}

.landing-tier-band-actions {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.landing-tier-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.landing-slider-controls {
  gap: 8px;
}

.landing-slider-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(95, 59, 38, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(70, 36, 38, 0.08);
}

.landing-slider-shell {
  overflow: hidden;
}

.landing-slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.landing-slider-track::-webkit-scrollbar {
  display: none;
}

.landing-character-card {
  width: 100%;
  min-height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 16px 34px rgba(70, 36, 38, 0.08);
  scroll-snap-align: start;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.landing-character-card:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 95, 59, 0.32);
  box-shadow: 0 20px 40px rgba(90, 57, 42, 0.12);
}

.landing-character-media {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(247, 236, 229, 0.92), rgba(241, 226, 214, 0.86));
  border: 1px solid rgba(95, 59, 38, 0.08);
}

.landing-character-avatar {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  border: 0;
}

.landing-character-avatar .avatar-image,
.landing-stage-avatar .avatar-image {
  object-fit: contain;
}

.landing-character-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-character-topline {
  justify-content: space-between;
  gap: 8px;
}

.landing-character-card h3,
.landing-character-role,
.landing-character-description {
  margin: 0;
}

.landing-character-card h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.32rem;
  line-height: 1.02;
}

.landing-character-role {
  color: var(--secondary);
  font-size: 0.9rem;
}

.landing-character-description {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

@media (max-width: 1200px) {
  .landing-bar,
  .landing-tier-band-head {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-toolbar,
  .landing-guest-actions,
  .landing-account-utilities {
    justify-content: stretch;
  }

  .landing-hero,
  .landing-hero-stage {
    grid-template-columns: 1fr;
  }

  .landing-stage-device {
    min-height: 520px;
  }
}

@media (max-width: 900px) {
  .landing-account-utilities,
  .landing-guest-actions {
    flex-direction: column;
  }

  .landing-menu-card {
    min-width: 0;
  }

  .landing-stage-device {
    grid-template-columns: 1fr;
  }

  .landing-stage-card-normal,
  .landing-stage-card-royal {
    margin-top: 0;
  }

  .landing-stage-signal {
    position: static;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .page-home .shell-home {
    padding: 18px 16px 32px;
  }

  .landing-brand-copy small {
    max-width: none;
  }

  .landing-hero-copy,
  .landing-tier-band,
  .landing-auth-panel {
    padding: 22px;
    border-radius: 26px;
  }

  .landing-hero-copy h1 {
    max-width: none;
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .landing-slider-track {
    grid-auto-columns: minmax(230px, 86vw);
  }
}

.page-home .landing-bar {
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.page-home .landing-utility-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.page-home .landing-menu {
  position: relative;
}

.page-home .landing-menu summary {
  list-style: none;
}

.page-home .landing-menu summary::-webkit-details-marker {
  display: none;
}

.page-home .landing-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.86);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 8px 18px rgba(70, 36, 38, 0.045);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.page-home .landing-menu[open] .landing-menu-trigger,
.page-home .landing-menu-trigger:hover {
  border-color: rgba(178, 95, 59, 0.18);
  box-shadow: 0 12px 24px rgba(70, 36, 38, 0.07);
  transform: translateY(-1px);
}

.page-home .landing-menu-trigger-label {
  color: var(--secondary);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-home .landing-menu-trigger strong {
  font-size: 0.9rem;
  line-height: 1;
}

.page-home .landing-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 36px));
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 251, 247, 0.96);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 22px 48px rgba(36, 18, 16, 0.16);
  backdrop-filter: blur(16px);
  z-index: 50;
}

.page-home .landing-menu-panel strong,
.page-home .landing-menu-panel p {
  margin: 0;
}

.page-home .landing-menu-panel .landing-menu-copy {
  margin-top: 6px;
}

.page-home .landing-menu-panel .landing-chip-actions {
  margin-top: 14px;
}

.page-home .landing-menu-credits .landing-menu-panel {
  width: 280px;
}

.page-home .landing-menu-account .landing-menu-panel {
  width: 320px;
}

.page-home .landing-account-head,
.page-home .landing-menu-panel strong,
.page-home .landing-menu-panel p {
  margin: 0;
}

.page-home .landing-account-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.page-home .landing-chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .landing-chip-actions.hidden {
  display: none;
}

.page-home .landing-menu-panel .primary-button,
.page-home .landing-menu-panel .ghost-button {
  min-height: 38px;
  padding-inline: 14px;
}

.page-home .landing-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 40px;
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 138, 88, 0.22), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(150, 178, 170, 0.18), transparent 26%),
    linear-gradient(155deg, rgba(26, 18, 21, 0.98), rgba(43, 29, 31, 0.96) 52%, rgba(32, 20, 23, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 90px rgba(22, 10, 14, 0.32);
  overflow: hidden;
}

.page-home .landing-banner-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.page-home .landing-banner-spotlight {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.page-home .landing-featured-card,
.page-home .landing-media-strip-frame {
  border-radius: 32px;
  background: rgba(255, 252, 248, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px rgba(12, 6, 8, 0.18);
  backdrop-filter: blur(16px);
}

.page-home .landing-featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(240px, 0.58fr);
  gap: 16px;
  width: 100%;
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}

.page-home .landing-featured-card--media-only {
  display: block;
  padding: 12px;
}

.page-home .landing-featured-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  padding: 8px 4px 8px 0;
  min-width: 0;
  overflow: hidden;
}

.page-home .landing-featured-copy .landing-menu-label {
  color: rgba(223, 234, 255, 0.82);
}

.page-home .landing-featured-copy strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(1.32rem, 1.8vw, 1.78rem);
  line-height: 0.98;
  color: #fff6ee;
  max-width: 10.5ch;
  overflow-wrap: anywhere;
}

.page-home .landing-featured-blurb {
  margin: 0;
  color: rgba(245, 229, 219, 0.78);
  font-size: 0.93rem;
  line-height: 1.56;
  max-width: 28ch;
  overflow-wrap: anywhere;
}

.page-home .landing-loved-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
}

.page-home .landing-loved-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-radius: 20px;
  background: rgba(255, 248, 241, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  min-width: 0;
}

.page-home .landing-loved-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 181, 0.24);
  box-shadow: 0 14px 30px rgba(8, 3, 4, 0.22);
}

.page-home .landing-loved-card.is-primary {
  grid-template-columns: 54px minmax(0, 1fr);
  padding: 14px 15px;
  background: linear-gradient(165deg, rgba(255, 245, 236, 0.16), rgba(255, 230, 214, 0.09));
  box-shadow: 0 20px 38px rgba(8, 3, 4, 0.24);
}

.page-home .landing-loved-card.is-secondary {
  grid-template-columns: 42px minmax(0, 1fr);
}

.page-home .landing-loved-rank {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: rgba(255, 188, 145, 0.18);
  color: #ffd0b2;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.page-home .landing-loved-card.is-primary .landing-loved-rank {
  width: 54px;
  border-radius: 18px;
  background: rgba(255, 188, 145, 0.24);
}

.page-home .landing-loved-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.page-home .landing-loved-copy strong {
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.15;
  color: #fff7f1;
  overflow-wrap: anywhere;
}

.page-home .landing-loved-copy span {
  color: rgba(235, 218, 205, 0.72);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-home .landing-loved-copy em {
  margin-top: 4px;
  color: rgba(245, 229, 219, 0.75);
  font-style: normal;
  font-size: 0.81rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-home .landing-loved-card.is-primary .landing-loved-copy strong {
  font-size: 1.08rem;
}

.page-home .landing-loved-card.is-secondary .landing-loved-copy em {
  display: none;
}

.page-home .landing-loved-cta {
  align-self: center;
  color: #ffd0b2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.page-home .landing-loved-card.is-primary .landing-loved-cta {
  grid-column: 2;
  margin-top: 0;
}

.page-home .landing-loved-card.is-secondary .landing-loved-cta {
  grid-column: 2;
}

.page-home .landing-motion-stage {
  position: relative;
  min-height: 560px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(244, 161, 109, 0.28), transparent 20%),
    radial-gradient(circle at 78% 20%, rgba(133, 167, 154, 0.22), transparent 24%),
    linear-gradient(155deg, rgba(21, 15, 19, 0.98), rgba(39, 25, 28, 0.95) 54%, rgba(25, 17, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.page-home .landing-motion-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.55;
  animation: landingGlowDrift 18s ease-in-out infinite;
}

.page-home .landing-motion-glow-one {
  width: 180px;
  height: 180px;
  top: 28px;
  left: 32px;
  background: rgba(246, 179, 135, 0.32);
}

.page-home .landing-motion-glow-two {
  width: 210px;
  height: 210px;
  right: 18px;
  bottom: 20px;
  background: rgba(154, 186, 176, 0.28);
  animation-delay: -4s;
}

.page-home .landing-stage-gallery {
  position: absolute;
  inset: 20px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  gap: 10px;
  z-index: 2;
}

.page-home .landing-stage-gallery.empty-state {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-home .landing-stage-tile {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 251, 247, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 48px rgba(7, 3, 5, 0.24);
  transform-origin: center;
  padding: 0;
  cursor: pointer;
}

.page-home .landing-stage-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease, opacity 420ms ease;
}

.page-home .landing-stage-image {
  object-position: center 18%;
  animation: landingImagePanOne 28s ease-in-out infinite alternate;
  will-change: object-position, transform;
}

.page-home .landing-stage-image-2 {
  animation-name: landingImagePanTwo;
  animation-duration: 32s;
}

.page-home .landing-stage-image-3 {
  animation-name: landingImagePanThree;
  animation-duration: 30s;
}

.page-home .landing-stage-image-4 {
  animation-name: landingImagePanFour;
  animation-duration: 34s;
}

.page-home .landing-stage-image-5 {
  animation-name: landingImagePanFive;
  animation-duration: 26s;
}

.page-home .landing-stage-image-6 {
  animation-name: landingImagePanSix;
  animation-duration: 33s;
}

.page-home .landing-stage-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 12, 12, 0) 45%, rgba(19, 12, 12, 0.44) 100%);
  pointer-events: none;
}

.page-home .landing-stage-tile-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  color: #fff9f2;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.page-home .landing-stage-tile:hover {
  transform: translateY(-2px) scale(1.012);
  box-shadow: 0 26px 60px rgba(7, 3, 5, 0.3);
}

.page-home .landing-stage-tile:focus-visible {
  outline: 2px solid rgba(255, 214, 181, 0.82);
  outline-offset: 3px;
}

.page-home .landing-stage-tile-1 {
  grid-column: 1 / span 4;
  grid-row: 2 / span 4;
  animation: landingTileFloatOne 18s ease-in-out infinite;
  z-index: 2;
}

.page-home .landing-stage-tile-2 {
  grid-column: 5 / span 3;
  grid-row: 1 / span 3;
  animation: landingTileFloatTwo 22s ease-in-out infinite;
  z-index: 1;
}

.page-home .landing-stage-tile-3 {
  grid-column: 8 / span 5;
  grid-row: 2 / span 4;
  animation: landingTileFloatThree 20s ease-in-out infinite;
  z-index: 2;
}

.page-home .landing-stage-tile-4 {
  grid-column: 2 / span 3;
  grid-row: 6 / span 3;
  animation: landingTileFloatFour 21s ease-in-out infinite;
  z-index: 1;
}

.page-home .landing-stage-tile-5 {
  grid-column: 5 / span 4;
  grid-row: 4 / span 5;
  animation: landingTileFloatFive 24s ease-in-out infinite;
  z-index: 4;
  box-shadow: 0 28px 70px rgba(7, 3, 5, 0.34);
}

.page-home .landing-stage-tile-6 {
  grid-column: 9 / span 3;
  grid-row: 6 / span 3;
  animation: landingTileFloatSix 19s ease-in-out infinite;
  z-index: 2;
}

.page-home .landing-stage-tile-7 {
  grid-column: 1 / span 4;
  grid-row: 9 / span 4;
  animation: landingTileFloatSeven 23s ease-in-out infinite;
  z-index: 2;
}

.page-home .landing-stage-tile-8 {
  grid-column: 5 / span 3;
  grid-row: 9 / span 3;
  animation: landingTileFloatEight 20s ease-in-out infinite;
  z-index: 1;
}

.page-home .landing-stage-tile-9 {
  grid-column: 8 / span 5;
  grid-row: 9 / span 4;
  animation: landingTileFloatNine 25s ease-in-out infinite;
  z-index: 3;
}

.page-home .landing-stage-tile-2 img,
.page-home .landing-stage-tile-4 img,
.page-home .landing-stage-tile-8 img {
  filter: saturate(0.9) blur(1.4px);
  opacity: 0.82;
  transform: scale(1.03);
  animation: none;
}

.page-home .landing-stage-tile-1 img,
.page-home .landing-stage-tile-3 img,
.page-home .landing-stage-tile-6 img,
.page-home .landing-stage-tile-7 img,
.page-home .landing-stage-tile-9 img {
  filter: saturate(0.96);
  opacity: 0.94;
}

.page-home .landing-stage-tile-5 img {
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.015);
  animation-duration: 22s;
}

.page-home .landing-stage-tile-1 img,
.page-home .landing-stage-tile-9 img {
  animation-duration: 36s;
}

.page-home .landing-stage-tile-3 img,
.page-home .landing-stage-tile-6 img,
.page-home .landing-stage-tile-7 img {
  animation-duration: 30s;
}

.page-home .landing-stage-tile-5::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 2;
  pointer-events: none;
}

.page-home .landing-feature-chip {
  position: absolute;
  z-index: 4;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 242, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(8, 3, 4, 0.18);
  color: #5b463f;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: landingFeaturePulse 12s ease-in-out infinite;
}

.page-home .landing-feature-chip-one {
  top: 18px;
  left: 170px;
}

.page-home .landing-feature-chip-two {
  top: 24px;
  right: 156px;
  animation-delay: 3s;
}

.page-home .landing-feature-chip-three {
  bottom: 34px;
  right: 34px;
  animation-delay: 6s;
}

.page-home .landing-feature-chip-four {
  bottom: 24px;
  left: 182px;
  animation-delay: 9s;
}

.page-home .landing-media-strip-frame {
  grid-column: 1 / -1;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.08), rgba(255, 240, 230, 0.05));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 30px rgba(8, 3, 4, 0.16);
}

.page-home .landing-media-ribbon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: none;
}

.page-home .landing-media-ribbon::-webkit-scrollbar {
  display: none;
}

.page-home .landing-media-tile {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 152px;
  gap: 8px;
  padding: 11px;
  text-align: left;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 249, 243, 0.12), rgba(255, 239, 228, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(8, 3, 4, 0.14);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
  position: relative;
}

.page-home .landing-media-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 214, 181, 0.24);
  background: linear-gradient(180deg, rgba(255, 249, 243, 0.16), rgba(255, 238, 226, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 34px rgba(8, 3, 4, 0.2);
}

.page-home .landing-media-tile.is-medium {
  width: 168px;
}

.page-home .landing-media-tile.is-wide {
  width: 188px;
}

.page-home .landing-media-tile.is-lifted {
  margin-top: -10px;
}

.page-home .landing-media-tile.is-lowered {
  margin-top: 10px;
}

.page-home .landing-media-tile-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(244, 232, 222, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(8, 3, 4, 0.18);
}

.page-home .landing-media-tile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms ease, filter 420ms ease;
}

.page-home .landing-media-tile:hover .landing-media-tile-image {
  transform: scale(1.035);
  filter: saturate(1.02);
}

.page-home .landing-media-tile-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  text-align: center;
  min-height: 2.35rem;
  justify-content: center;
}

.page-home .landing-media-tile-copy strong {
  font-size: 0.92rem;
  line-height: 1.2;
  color: #fff4eb;
  letter-spacing: 0.01em;
}

.page-home .landing-tier-showcase {
  gap: 22px;
  margin-top: 28px;
}

.page-home .landing-tier-band {
  padding: 22px;
}

.page-home .landing-section-intro .subtle {
  max-width: 50ch;
  line-height: 1.7;
}

.page-home .landing-tier-band-head h3 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.02;
}

.page-home .landing-character-card {
  gap: 12px;
}

.page-home .landing-character-media {
  aspect-ratio: 1 / 1;
}

.page-home .landing-character-avatar,
.page-home .landing-character-avatar .avatar-image,
.page-home .landing-stage-avatar,
.page-home .landing-stage-avatar .avatar-image {
  width: 100%;
  height: 100%;
}

.page-home .landing-character-avatar .avatar-image,
.page-home .landing-stage-avatar .avatar-image {
  object-fit: contain;
}

.page-home .landing-auth-modal.hidden {
  display: none;
}

.page-home .landing-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.page-home .landing-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 18, 18, 0.42);
  backdrop-filter: blur(10px);
}

.page-home .landing-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 28px));
  margin: 6vh auto 0;
  padding: 22px;
  background: rgba(255, 251, 247, 0.98);
  box-shadow: 0 34px 88px rgba(36, 18, 16, 0.22);
}

@media (max-width: 1200px) {
  .page-home .landing-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-home .landing-utility-rail {
    justify-content: space-between;
  }

  .page-home .landing-brand-copy small {
    max-width: 40ch;
  }

  .page-home .landing-menu {
    flex: 1 1 0;
    min-width: 0;
  }

  .page-home .landing-menu-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .page-home .landing-featured-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(460px, auto) auto;
  }

  .page-home .landing-featured-card--media-only {
    padding: 12px;
  }
}

@media (max-width: 900px) {
  .page-home .landing-utility-rail {
    flex-direction: column;
    align-items: stretch;
  }

  .page-home .landing-loved-grid {
    grid-template-columns: 1fr;
  }

  .page-home .landing-loved-card.is-primary {
    grid-row: auto;
  }

  .page-home .landing-motion-stage {
    min-height: 520px;
  }

  .page-home .landing-media-ribbon {
    gap: 12px;
  }

  .page-home .landing-feature-chip {
    font-size: 0.68rem;
  }
}

@media (max-width: 720px) {
  .page-home .landing-banner,
  .page-home .landing-menu-panel,
  .page-home .landing-tier-band,
  .page-home .landing-auth-dialog,
  .page-home .landing-featured-card,
  .page-home .landing-media-strip-frame {
    border-radius: 24px;
  }

  .page-home .landing-banner {
    padding: 14px;
  }

  .page-home .landing-featured-card {
    padding: 12px;
  }

  .page-home .landing-menu-trigger {
    min-height: 50px;
    padding: 10px 14px;
  }

  .page-home .landing-brand-copy small {
    max-width: none;
  }

  .page-home .landing-menu-panel {
    width: min(320px, calc(100vw - 28px));
  }

  .page-home .landing-motion-stage {
    min-height: 420px;
  }

  .page-home .landing-feature-chip {
    padding: 8px 10px;
    font-size: 0.62rem;
  }

  .page-home .landing-feature-chip-one {
    left: 110px;
  }

  .page-home .landing-feature-chip-two {
    right: 86px;
  }

  .page-home .landing-feature-chip-four {
    left: 112px;
  }

  .page-home .landing-stage-gallery {
    inset: 14px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
  }

  .page-home .landing-stage-tile {
    border-radius: 18px;
  }

  .page-home .landing-stage-tile-1,
  .page-home .landing-stage-tile-2,
  .page-home .landing-stage-tile-3,
  .page-home .landing-stage-tile-4,
  .page-home .landing-stage-tile-5,
  .page-home .landing-stage-tile-6,
  .page-home .landing-stage-tile-7,
  .page-home .landing-stage-tile-8,
  .page-home .landing-stage-tile-9 {
    grid-column: auto;
    grid-row: auto;
  }

  .page-home .landing-loved-card,
  .page-home .landing-loved-card.is-primary,
  .page-home .landing-loved-card.is-secondary {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .page-home .landing-loved-cta,
  .page-home .landing-loved-card.is-primary .landing-loved-cta {
    grid-column: 2;
  }

  .page-home .landing-media-tile,
  .page-home .landing-media-tile.is-medium,
  .page-home .landing-media-tile.is-wide {
    width: 140px;
  }

  .page-home .landing-media-tile.is-lifted,
  .page-home .landing-media-tile.is-lowered {
    margin-top: 0;
  }
}

@keyframes landingGlowDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(10px, -8px, 0) scale(1.06);
  }
}

@keyframes landingTileFloatOne {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1.6deg);
    opacity: 0.96;
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(0.6deg);
    opacity: 1;
  }
}

@keyframes landingTileFloatTwo {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(1.4deg);
    opacity: 0.92;
  }
  50% {
    transform: translate3d(0, 5px, 0) rotate(-0.8deg);
    opacity: 1;
  }
}

@keyframes landingTileFloatThree {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.8deg);
    opacity: 0.94;
  }
  50% {
    transform: translate3d(0, -6px, 0) rotate(1deg);
    opacity: 1;
  }
}

@keyframes landingTileFloatFour {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0.8deg); }
  50% { transform: translate3d(0, 6px, 0) rotate(-0.7deg); }
}

@keyframes landingTileFloatFive {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.1deg); }
  50% { transform: translate3d(0, -6px, 0) rotate(0.5deg); }
}

@keyframes landingTileFloatSix {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(1.2deg); }
  50% { transform: translate3d(0, 5px, 0) rotate(-0.9deg); }
}

@keyframes landingTileFloatSeven {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.8deg); }
  50% { transform: translate3d(0, -6px, 0) rotate(0.8deg); }
}

@keyframes landingTileFloatEight {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0.9deg); }
  50% { transform: translate3d(0, 5px, 0) rotate(-0.8deg); }
}

@keyframes landingTileFloatNine {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -7px, 0) rotate(0.6deg); }
}

@keyframes landingImagePanOne {
  0% { object-position: center 8%; transform: scale(1.02); }
  100% { object-position: center 92%; transform: scale(1.08); }
}

@keyframes landingImagePanTwo {
  0% { object-position: center 14%; transform: scale(1.03); }
  100% { object-position: center 86%; transform: scale(1.07); }
}

@keyframes landingImagePanThree {
  0% { object-position: center 10%; transform: scale(1.01); }
  100% { object-position: center 88%; transform: scale(1.06); }
}

@keyframes landingImagePanFour {
  0% { object-position: center 18%; transform: scale(1.02); }
  100% { object-position: center 82%; transform: scale(1.07); }
}

@keyframes landingImagePanFive {
  0% { object-position: center 12%; transform: scale(1.03); }
  100% { object-position: center 90%; transform: scale(1.09); }
}

@keyframes landingImagePanSix {
  0% { object-position: center 16%; transform: scale(1.02); }
  100% { object-position: center 84%; transform: scale(1.07); }
}

@keyframes landingFeaturePulse {
  0%,
  16%,
  100% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.96);
  }
  22%,
  34% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  40% {
    opacity: 0;
    transform: translate3d(0, -8px, 0) scale(0.98);
  }
}

.page-dashboard .chat-shell {
  min-height: 100vh;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.page-dashboard .chat-shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 28px;
  background: rgba(255, 251, 247, 0.78);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 18px 42px rgba(70, 36, 38, 0.08);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 200;
  overflow: visible;
}

.page-dashboard .chat-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.page-dashboard .chat-shell-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d66c47, #7b3a2a);
  color: #fff7f0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 28px rgba(112, 57, 34, 0.16);
}

.page-dashboard .chat-shell-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-dashboard .chat-shell-brand-copy strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.12rem;
}

.page-dashboard .chat-shell-brand-copy small {
  color: var(--muted);
  font-size: 0.8rem;
}

.page-dashboard .chat-shell-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.page-dashboard .chat-shell-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
  font-size: 0.78rem;
  color: var(--muted);
}

.page-dashboard .chat-shell-picker span {
  padding-left: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  font-size: 0.66rem;
  font-weight: 700;
}

.page-dashboard .chat-shell-picker select {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid rgba(95, 59, 38, 0.12);
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
}

.page-dashboard .chat-shell-menu {
  position: relative;
}

.page-dashboard .chat-shell-menu[open] {
  z-index: 220;
}

.page-dashboard .chat-shell-menu summary {
  list-style: none;
}

.page-dashboard .chat-shell-menu summary::-webkit-details-marker {
  display: none;
}

.page-dashboard .chat-shell-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.86);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 8px 18px rgba(70, 36, 38, 0.045);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.page-dashboard .chat-shell-menu[open] .chat-shell-menu-trigger,
.page-dashboard .chat-shell-menu-trigger:hover {
  border-color: rgba(178, 95, 59, 0.18);
  box-shadow: 0 12px 24px rgba(70, 36, 38, 0.07);
  transform: translateY(-1px);
}

.page-dashboard .chat-shell-menu-trigger span {
  color: var(--secondary);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-dashboard .chat-shell-menu-trigger strong {
  font-size: 0.9rem;
  line-height: 1;
}

.page-dashboard .chat-shell-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 36px));
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 251, 247, 0.96);
  border: 1px solid rgba(95, 59, 38, 0.08);
  box-shadow: 0 22px 48px rgba(36, 18, 16, 0.16);
  backdrop-filter: blur(16px);
  z-index: 50;
}

.page-dashboard .chat-shell-menu-panel strong,
.page-dashboard .chat-shell-menu-panel p {
  margin: 0;
}

.page-dashboard .chat-shell-menu-panel .landing-menu-copy {
  margin-top: 6px;
}

.page-dashboard .chat-shell-main {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  z-index: 1;
}

.page-dashboard .chat-panel-minimal {
  flex: 1;
  min-height: calc(100vh - 122px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 32px;
}

.page-dashboard .chat-panel-minimal .chat-header {
  padding-bottom: 4px;
}

.page-dashboard .chat-panel-minimal .chat-avatar {
  width: 84px;
  height: 84px;
  font-size: 1.08rem;
}

.page-dashboard .chat-panel-minimal .message-list {
  flex: 1;
  min-height: 0;
  padding: 4px 4px 4px 0;
}

.page-dashboard .chat-form-minimal {
  margin-top: auto;
}

.page-dashboard .chat-form-minimal textarea {
  min-height: 132px;
}

.page-dashboard .status-badge {
  min-height: 48px;
  padding-inline: 14px;
}

@media (max-width: 1080px) {
  .page-dashboard .chat-shell-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-dashboard .chat-shell-tools {
    justify-content: stretch;
  }

  .page-dashboard .chat-shell-picker,
  .page-dashboard .chat-shell-menu {
    flex: 1 1 220px;
  }

  .page-dashboard .chat-shell-menu-trigger {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .page-dashboard .chat-shell {
    padding: 14px;
    gap: 14px;
  }

  .page-dashboard .chat-shell-bar,
  .page-dashboard .chat-panel-minimal,
  .page-dashboard .chat-shell-menu-panel {
    border-radius: 24px;
  }

  .page-dashboard .chat-shell-brand-copy small {
    display: none;
  }

  .page-dashboard .chat-shell-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .page-dashboard .chat-shell-picker,
  .page-dashboard .chat-shell-menu {
    min-width: 0;
    width: 100%;
  }

  .page-dashboard .chat-panel-minimal {
    min-height: calc(100vh - 120px);
    padding: 14px;
  }

  .page-dashboard .chat-panel-minimal .chat-avatar {
    width: 72px;
    height: 72px;
  }

  .page-dashboard .chat-form-minimal textarea {
    min-height: 112px;
  }
}

.page-dashboard {
  background:
    radial-gradient(circle at 12% 8%, rgba(232, 117, 76, 0.28), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(69, 126, 153, 0.22), transparent 26%),
    linear-gradient(135deg, #1a1014 0%, #2a1717 42%, #45291f 100%);
}

.page-dashboard::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.page-dashboard .chat-shell {
  max-width: 1320px;
  padding: clamp(14px, 2.4vw, 34px);
  gap: clamp(14px, 2vw, 26px);
}

.page-dashboard .chat-shell-bar {
  padding: 12px;
  border-radius: 34px;
  border: 1px solid rgba(255, 245, 235, 0.13);
  background: rgba(255, 247, 239, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.page-dashboard .chat-shell-brand {
  padding: 6px 10px 6px 6px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
}

.page-dashboard .chat-shell-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 21px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.55), transparent 22%),
    linear-gradient(145deg, #ff865d, #bc3f28);
  box-shadow: 0 18px 36px rgba(255, 96, 56, 0.22);
}

.page-dashboard .chat-shell-brand-copy strong,
.page-dashboard .chat-shell-brand-copy small,
.page-dashboard .chat-shell-picker,
.page-dashboard .chat-shell-picker span,
.page-dashboard .chat-shell-menu-trigger span,
.page-dashboard .chat-shell-menu-trigger strong {
  color: #fff8f0;
}

.page-dashboard .chat-shell-brand-copy small {
  opacity: 0.68;
}

.page-dashboard .chat-shell-tools {
  gap: 9px;
}

.page-dashboard .chat-shell-picker {
  min-width: 190px;
}

.page-dashboard .chat-shell-picker select,
.page-dashboard .chat-shell-menu-trigger,
.page-dashboard .status-badge {
  min-height: 54px;
  border: 1px solid rgba(255, 245, 235, 0.14);
  color: #fff8f0;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.page-dashboard .chat-shell-picker select {
  border-radius: 19px;
}

.page-dashboard .chat-shell-picker select option {
  color: var(--text);
}

.page-dashboard .chat-shell-menu-panel {
  width: min(390px, calc(100vw - 34px));
  padding: 18px;
  border: 1px solid rgba(255, 245, 235, 0.16);
  background: rgba(38, 24, 25, 0.94);
  color: #fff8f0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.page-dashboard .chat-shell-menu-panel .landing-menu-copy,
.page-dashboard .landing-account-head p {
  color: rgba(255, 248, 240, 0.72);
}

.page-dashboard .chat-shell-main {
  justify-content: center;
}

.page-dashboard .chat-panel-minimal {
  width: min(100%, 1040px);
  min-height: calc(100vh - 138px);
  padding: clamp(16px, 2vw, 28px);
  border: 1px solid rgba(255, 245, 235, 0.14);
  border-radius: clamp(28px, 4vw, 48px);
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.98), rgba(255, 246, 237, 0.92)),
    radial-gradient(circle at 20% 0%, rgba(255, 214, 186, 0.55), transparent 34%);
  box-shadow: 0 44px 110px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.page-dashboard .chat-panel-minimal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 180px;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(230, 111, 72, 0.16), transparent 38%),
    radial-gradient(circle at 80% 0%, rgba(36, 91, 112, 0.12), transparent 32%);
}

.page-dashboard .chat-panel-minimal .chat-header,
.page-dashboard .chat-panel-minimal .message-list,
.page-dashboard .chat-form-minimal {
  position: relative;
  z-index: 1;
}

.page-dashboard .chat-panel-minimal .chat-header {
  align-items: center;
  padding: 6px 4px 18px;
  border-bottom: 1px solid rgba(95, 59, 38, 0.08);
}

.page-dashboard .chat-panel-minimal .chat-avatar {
  width: 96px;
  height: 96px;
  border-radius: 30px;
  box-shadow: 0 18px 44px rgba(84, 42, 31, 0.16);
}

.page-dashboard .chat-panel-minimal #selectedCharacterName {
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.page-dashboard .chat-panel-minimal .message-list {
  padding: 18px 10px 10px;
}

.page-dashboard .chat-form-minimal {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(95, 59, 38, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 50px rgba(73, 38, 33, 0.08);
}

.page-dashboard .chat-form-minimal textarea {
  min-height: 104px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 250, 245, 0.86);
  box-shadow: inset 0 0 0 1px rgba(95, 59, 38, 0.08);
}

.page-dashboard .chat-actions {
  align-items: center;
}

.page-dashboard .chat-actions .primary-button {
  min-width: 150px;
}

.page-dashboard .creator-dashboard-card {
  border-color: rgba(255, 245, 235, 0.16);
  background:
    radial-gradient(circle at top right, rgba(255, 132, 88, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.08);
}

.page-dashboard .creator-dashboard-grid span {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 248, 240, 0.72);
}

.page-dashboard .creator-dashboard-grid b,
.page-dashboard .creator-dashboard-head strong {
  color: #fff8f0;
}

.creator-character-dialog {
  border: 1px solid rgba(255, 245, 235, 0.16);
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 123, 83, 0.24), transparent 30%),
    radial-gradient(circle at 12% 0%, rgba(71, 128, 153, 0.18), transparent 28%),
    linear-gradient(145deg, #fffaf4, #f4ded1);
}

.creator-character-dialog .field input,
.creator-character-dialog .field select,
.creator-character-dialog .field textarea {
  background: rgba(255, 255, 255, 0.82);
}

.creator-character-dialog .auth-actions {
  justify-content: flex-end;
  padding-top: 6px;
}

@media (max-width: 760px) {
  .page-dashboard .chat-shell {
    padding: 10px;
  }

  .page-dashboard .chat-shell-bar {
    border-radius: 26px;
  }

  .page-dashboard .chat-shell-brand {
    width: 100%;
  }

  .page-dashboard .chat-shell-picker,
  .page-dashboard .chat-shell-menu {
    flex: 1 1 100%;
  }

  .page-dashboard .chat-panel-minimal {
    min-height: calc(100vh - 160px);
    border-radius: 30px;
  }

  .page-dashboard .chat-panel-minimal .chat-header-main {
    align-items: flex-start;
  }

  .page-dashboard .chat-panel-minimal .chat-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .page-dashboard .chat-actions {
    display: grid;
    gap: 10px;
  }

  .page-dashboard .chat-actions .primary-button {
    width: 100%;
  }
}

.page-home .landing-main {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
  padding: clamp(12px, 2vw, 22px) 0 clamp(42px, 6vw, 78px);
}

.feed-hero,
.creator-cta {
  width: min(1120px, calc(100vw - 28px));
  margin: 0 auto;
  border: 1px solid rgba(97, 54, 43, 0.12);
  border-radius: clamp(26px, 4vw, 46px);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(135deg, rgba(255, 250, 245, 0.92), rgba(244, 222, 210, 0.62));
  box-shadow: 0 22px 70px rgba(77, 38, 32, 0.1);
}

.feed-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  align-items: end;
  gap: 24px;
  min-height: 220px;
  padding: clamp(26px, 5vw, 58px);
  overflow: hidden;
}

.feed-hero h1 {
  max-width: 820px;
  margin: 8px 0 0;
  font-family: var(--display-font);
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.feed-hero p,
.creator-cta p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.character-feed {
  width: min(960px, calc(100vw - 28px));
  max-height: min(76vh, 860px);
  margin: 0 auto;
  display: grid;
  gap: 22px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding: 4px 8px 32px;
  scrollbar-width: thin;
}

.character-feed.empty-state {
  min-height: 360px;
  place-items: center;
  border: 1px dashed rgba(97, 54, 43, 0.18);
  border-radius: 34px;
  background: rgba(255, 252, 248, 0.66);
  color: var(--muted);
}

.feed-character-card {
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(260px, 0.72fr);
  align-items: stretch;
  min-height: min(72vh, 760px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: clamp(28px, 5vw, 54px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(35, 21, 26, 0.92), rgba(76, 52, 49, 0.78)),
    radial-gradient(circle at 10% 10%, rgba(225, 111, 73, 0.42), transparent 36%);
  box-shadow: 0 34px 95px rgba(45, 20, 24, 0.2);
  animation: feedCardIn 0.7s ease both;
  animation-delay: calc(var(--feed-index, 0) * 70ms);
}

.feed-character-card:nth-child(3n + 2) {
  background:
    linear-gradient(135deg, rgba(24, 46, 58, 0.94), rgba(74, 50, 41, 0.76)),
    radial-gradient(circle at 100% 10%, rgba(113, 159, 182, 0.42), transparent 36%);
}

.feed-character-card:nth-child(3n + 3) {
  background:
    linear-gradient(135deg, rgba(55, 31, 24, 0.94), rgba(22, 20, 26, 0.82)),
    radial-gradient(circle at 0% 100%, rgba(234, 159, 103, 0.44), transparent 34%);
}

.feed-character-media {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: clamp(18px, 4vw, 42px);
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.24), transparent 36%);
  cursor: pointer;
}

.feed-character-media .landing-character-avatar {
  width: min(100%, 560px);
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: clamp(24px, 4vw, 46px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26);
}

.feed-character-media .avatar-image,
.feed-character-media .avatar-layer {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feed-character-media .avatar-layer.is-background {
  object-fit: cover;
}

.feed-character-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: clamp(24px, 5vw, 54px);
  color: #fff8f0;
}

.feed-character-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feed-character-content .tier-pill,
.feed-character-content .category-pill {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff8f0;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
}

.feed-character-content h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(3.4rem, 7vw, 7.2rem);
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.feed-character-role,
.feed-character-description {
  margin: 0;
  color: rgba(255, 248, 240, 0.82);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.55;
}

.feed-character-role {
  font-weight: 800;
  color: rgba(255, 248, 240, 0.96);
}

.feed-chat-button {
  align-self: flex-start;
  margin-top: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.creator-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
}

.creator-cta h2 {
  max-width: 760px;
  margin: 6px 0 10px;
  font-family: var(--display-font);
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.creator-dashboard-card,
.creator-review-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(70, 96, 78, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.76), transparent 34%),
    linear-gradient(135deg, rgba(237, 245, 238, 0.88), rgba(255, 246, 238, 0.78));
}

.creator-dashboard-card.hidden,
.creator-review-panel.hidden {
  display: none;
}

.creator-dashboard-head strong {
  display: block;
  margin-top: 4px;
  color: var(--success);
  font-size: 1.12rem;
}

.creator-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.creator-dashboard-grid span {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.creator-dashboard-grid b {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
}

.creator-create-button {
  width: 100%;
  margin-top: 10px;
}

.creator-create-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.creator-character-modal.hidden {
  display: none;
}

.creator-character-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.creator-character-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100vw - 28px));
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid rgba(255, 245, 235, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 123, 83, 0.24), transparent 30%),
    radial-gradient(circle at 12% 0%, rgba(71, 128, 153, 0.18), transparent 28%),
    linear-gradient(145deg, #fffaf4, #f4ded1);
  box-shadow: 0 34px 90px rgba(37, 18, 21, 0.28);
}

.creator-character-dialog h2 {
  margin: 4px 0 8px;
  font-family: var(--display-font);
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.language-checkbox-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.creator-review-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-color: rgba(222, 107, 73, 0.18);
  background:
    radial-gradient(circle at top right, rgba(222, 107, 73, 0.16), transparent 34%),
    rgba(255, 250, 245, 0.88);
}

.creator-review-panel h3 {
  margin: 4px 0 8px;
  text-transform: capitalize;
}

@keyframes feedCardIn {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .feed-hero,
  .feed-character-card {
    grid-template-columns: 1fr;
  }

  .creator-cta {
    display: grid;
  }

  .character-feed {
    width: min(620px, calc(100vw - 20px));
    max-height: none;
    overflow-y: visible;
    scroll-snap-type: none;
  }

  .feed-character-card {
    min-height: auto;
  }

  .feed-character-media {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .feed-character-media .landing-character-avatar {
    width: min(100%, 420px);
  }

  .feed-chat-button,
  .creator-cta .primary-button {
    width: 100%;
  }
}

/* Elegant compact pass: keep the visual feed premium without feeling oversized. */
.page-home .landing-main {
  gap: clamp(22px, 4vw, 48px);
  padding-bottom: clamp(34px, 5vw, 70px);
}

.feed-hero {
  min-height: clamp(230px, 34vw, 390px);
  padding: clamp(24px, 4vw, 52px);
  border-radius: clamp(26px, 4vw, 44px);
}

.feed-hero h1 {
  max-width: 780px;
  font-size: clamp(3.1rem, 9vw, 8.3rem);
  line-height: 0.84;
  letter-spacing: -0.075em;
}

.feed-hero p {
  max-width: 560px;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.65;
}

.character-feed {
  width: min(980px, calc(100vw - 44px));
  gap: clamp(18px, 2.4vw, 30px);
}

.feed-character-card {
  grid-template-columns: minmax(280px, 0.88fr) minmax(300px, 1fr);
  min-height: clamp(520px, 72vh, 660px);
  border-radius: clamp(28px, 4vw, 42px);
}

.feed-character-media {
  padding: clamp(18px, 3vw, 32px);
}

.feed-character-media .landing-character-avatar {
  width: min(100%, 520px);
  max-height: min(68vh, 560px);
  border-radius: clamp(26px, 4vw, 38px);
}

.feed-character-content {
  gap: clamp(12px, 1.8vw, 20px);
  padding: clamp(24px, 4vw, 46px);
}

.feed-character-content h3 {
  font-size: clamp(2.8rem, 6.8vw, 6.9rem);
  letter-spacing: -0.075em;
}

.feed-character-role,
.feed-character-description {
  max-width: 560px;
  font-size: clamp(0.98rem, 1.55vw, 1.22rem);
  line-height: 1.65;
}

.feed-character-description {
  color: rgba(255, 247, 239, 0.74);
}

.feed-character-topline {
  gap: 8px;
}

.feed-character-content .tier-pill,
.feed-character-content .category-pill {
  padding: 7px 11px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

.feed-chat-button {
  min-height: 52px;
  padding-inline: 22px;
  font-size: 0.98rem;
}

.creator-cta {
  width: min(980px, calc(100vw - 44px));
  padding: clamp(22px, 3vw, 36px);
  border-radius: 34px;
}

.creator-cta h2 {
  font-size: clamp(2rem, 4vw, 4.4rem);
}

.creator-cta p {
  font-size: clamp(0.98rem, 1.5vw, 1.16rem);
}

.page-dashboard .chat-shell {
  max-width: 1180px;
}

.page-dashboard .chat-shell-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 17px;
}

.page-dashboard .chat-shell-picker select,
.page-dashboard .chat-shell-menu-trigger,
.page-dashboard .status-badge {
  min-height: 48px;
  font-size: 0.92rem;
}

.page-dashboard .chat-panel-minimal {
  width: min(100%, 920px);
  min-height: calc(100vh - 132px);
  border-radius: clamp(26px, 4vw, 42px);
}

.page-dashboard .chat-panel-minimal .chat-avatar {
  width: 78px;
  height: 78px;
  border-radius: 24px;
}

.page-dashboard .chat-panel-minimal #selectedCharacterName {
  font-size: clamp(1.9rem, 4.2vw, 3.8rem);
  letter-spacing: -0.055em;
}

.page-dashboard .chat-panel-minimal #selectedCharacterMeta,
.page-dashboard .chat-panel-minimal .subtle,
.message {
  font-size: 0.96rem;
  line-height: 1.6;
}

.message-visual {
  max-width: min(420px, 82vw);
  border-radius: 24px;
}

.message-visual img,
.message-visual-layer {
  border-radius: 22px;
}

.page-dashboard .chat-form-minimal textarea {
  min-height: 86px;
  font-size: 0.98rem;
}

.creator-character-dialog {
  width: min(780px, calc(100vw - 28px));
}

.creator-character-dialog h2 {
  font-size: clamp(2rem, 4.4vw, 3.9rem);
}

@media (max-width: 860px) {
  .character-feed,
  .creator-cta {
    width: min(560px, calc(100vw - 22px));
  }

  .feed-hero {
    padding: 24px;
  }

  .feed-character-card {
    min-height: auto;
    border-radius: 30px;
  }

  .feed-character-media .landing-character-avatar {
    width: min(100%, 360px);
    max-height: 430px;
  }

  .feed-character-content {
    padding: 24px;
  }
}

/* Strong compact feed correction: prevent oversized cards and text overflow. */
.page-home .character-feed {
  width: min(820px, calc(100vw - 36px));
  max-height: none;
  gap: 18px;
  padding-inline: 0;
  overflow-x: hidden;
}

.page-home .feed-character-card {
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 0.82fr);
  min-height: 0;
  height: auto;
  max-height: none;
  border-radius: 30px;
}

.page-home .feed-character-media {
  min-height: 0;
  padding: clamp(14px, 2.2vw, 24px);
}

.page-home .feed-character-media .landing-character-avatar {
  width: min(100%, 360px);
  max-width: 360px;
  max-height: 360px;
  border-radius: 26px;
}

.page-home .feed-character-content {
  min-width: 0;
  justify-content: center;
  gap: 11px;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.page-home .feed-character-content h3 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: clamp(2.1rem, 4.2vw, 3.65rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.page-home .feed-character-role,
.page-home .feed-character-description {
  max-width: 100%;
  overflow-wrap: break-word;
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  line-height: 1.5;
}

.page-home .feed-character-role {
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
}

.page-home .feed-chat-button {
  min-height: 46px;
  margin-top: 4px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.page-home .feed-character-content .tier-pill,
.page-home .feed-character-content .category-pill {
  padding: 6px 9px;
  font-size: 0.68rem;
}

.page-home .feed-hero {
  width: min(820px, calc(100vw - 36px));
}

.page-home .feed-hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
}

@media (max-width: 760px) {
  .page-home .character-feed,
  .page-home .feed-hero,
  .page-home .creator-cta {
    width: min(430px, calc(100vw - 22px));
  }

  .page-home .feed-character-card {
    grid-template-columns: 1fr;
  }

  .page-home .feed-character-media {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .page-home .feed-character-media .landing-character-avatar {
    width: min(100%, 300px);
    max-width: 300px;
    max-height: 300px;
  }

  .page-home .feed-character-content h3 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }
}

/* Final visual scale lock: make feed cards visibly compact and contained. */
.page-home .character-feed {
  width: min(700px, calc(100vw - 36px));
}

.page-home .feed-character-card {
  grid-template-columns: 280px minmax(0, 1fr);
  border-radius: 26px;
}

.page-home .feed-character-media {
  padding: 16px;
}

.page-home .feed-character-media .landing-character-avatar {
  width: 260px;
  max-width: 260px;
  max-height: 260px;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.page-home .feed-character-content {
  gap: 9px;
  padding: 20px 22px;
}

.page-home .feed-character-content h3 {
  font-size: clamp(1.85rem, 3.2vw, 2.85rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.page-home .feed-character-role,
.page-home .feed-character-description {
  font-size: 0.88rem;
  line-height: 1.45;
}

.page-home .feed-character-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.page-home .feed-chat-button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.84rem;
}

.page-home .feed-hero {
  width: min(700px, calc(100vw - 36px));
  min-height: 190px;
  padding: 24px 28px;
}

.page-home .feed-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.page-home .feed-hero p {
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .page-home .character-feed,
  .page-home .feed-hero,
  .page-home .creator-cta {
    width: min(360px, calc(100vw - 20px));
  }

  .page-home .feed-character-card {
    grid-template-columns: 1fr;
  }

  .page-home .feed-character-media .landing-character-avatar {
    width: 250px;
    max-width: 250px;
    max-height: 250px;
  }

  .page-home .feed-character-content {
    padding: 18px;
  }
}

/* Vertical social-feed layout: image first, character details below. */
.page-home .landing-main {
  gap: clamp(18px, 3vw, 34px);
}

.page-home .feed-hero,
.page-home .character-feed,
.page-home .creator-cta {
  width: min(460px, calc(100vw - 28px));
}

.page-home .feed-hero {
  min-height: 0;
  padding: 22px;
  border-radius: 28px;
}

.page-home .feed-hero {
  grid-template-columns: 1fr;
  gap: 12px;
}

.page-home .feed-hero h1 {
  max-width: 100%;
  font-size: clamp(2rem, 8vw, 3.35rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.page-home .feed-hero p {
  max-width: 100%;
  font-size: 0.92rem;
  line-height: 1.5;
}

.page-home .character-feed {
  display: grid;
  gap: 20px;
  max-height: none;
  padding: 0 0 34px;
  overflow: visible;
  scroll-snap-type: none;
}

.page-home .feed-character-card {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
  border-radius: 30px;
  scroll-snap-align: none;
}

.page-home .feed-character-media {
  min-height: 0;
  padding: 14px;
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.page-home .feed-character-media .landing-character-avatar {
  width: min(100%, 360px);
  max-width: 360px;
  max-height: 360px;
  border-radius: 24px;
}

.page-home .feed-character-content {
  justify-content: start;
  gap: 10px;
  padding: 18px 20px 20px;
}

.page-home .feed-character-topline {
  gap: 7px;
}

.page-home .feed-character-content h3 {
  font-size: clamp(2.05rem, 9vw, 3.25rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.page-home .feed-character-role,
.page-home .feed-character-description {
  font-size: 0.92rem;
  line-height: 1.48;
}

.page-home .feed-character-description {
  -webkit-line-clamp: 3;
}

.page-home .feed-chat-button {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
}

.page-home .creator-cta {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
}

.page-home .creator-cta h2 {
  font-size: clamp(1.95rem, 7vw, 3rem);
}

.page-home .creator-cta .primary-button {
  width: 100%;
}
