:root {
  --paper: #f8f1e7;
  --white: #fffaf1;
  --ink: #1b1821;
  --olive: #7b2732;
  --muted: #71646a;
  --line: #dfd0c2;
  --sage: #eee3d6;
  --clay: #bb6047;
  --story-bg: #f8f1e7;
  --story-panel: #fffaf1;
  --story-panel-2: #f0e2d3;
  --story-cream: #fffaf1;
  --story-muted: #71646a;
  --story-accent: #7b2732;
  --story-coral: #97462f;
  --story-line: #dfd0c2;
  --story-soft: #9a8072;
  --story-danger: #a43c3c;
  --story-focus: #1b1821;
  --story-focus-light: #fff2dc;
  color-scheme: light;
}

* {
  letter-spacing: 0 !important;
}

html,
body {
  background: var(--story-bg);
}

body {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: #bb60474a;
  color: var(--ink);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.portrait-button:focus-visible,
.favorite-button:focus-visible {
  outline: 2px solid var(--story-focus);
  outline-offset: 3px;
}

.sidebar button:focus-visible,
.sidebar a:focus-visible {
  outline-color: var(--story-focus-light);
}

body,
.page-wrap,
.chat-shell,
dialog {
  scrollbar-color: #b99d8d var(--story-bg);
}

.skip-link {
  background: var(--ink);
  color: var(--story-cream);
  border-radius: 8px;
}

.sidebar {
  width: 212px;
  padding: 34px 18px 20px;
  background: #211b22;
  border-right: 1px solid #322732;
  box-shadow: 18px 0 44px #29120d1c;
}

.brand {
  color: var(--story-cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 900;
}

.brand-dot,
.small-star {
  color: #e6a77b;
  font-family: inherit;
}

.brand-caption,
.sidebar-note p,
.sidebar-note > span:last-child,
.account-button small {
  color: #cdbcb3;
}

.nav-item {
  border-radius: 8px;
  color: #cdbcb3;
}

.nav-item.active,
.nav-item:hover {
  background: #332733;
  color: var(--story-cream);
}

.account-button {
  border-top-color: #3c303b;
  color: var(--story-cream);
}

.account-avatar,
.empty-icon {
  background: #4b2931;
  color: #ffe6d6;
}

main {
  margin-left: 212px;
  padding: 0 38px;
  background: var(--story-bg);
}

.page-wrap {
  max-width: 1280px;
}

.topbar {
  height: 78px;
  border-color: var(--story-line);
}

.breadcrumb,
.connection-button,
.ai-label,
.field-help,
.dialog-intro,
.composer-footnote,
.voice-footnote,
.private-header p,
.empty-state p,
.conversation-copy p,
.chat-header-copy p,
.chat-intro p,
.profile-section p,
.favorite-feedback,
.aside-section > p,
.aside-kicker,
.settings-block p,
.usage-row span,
.voice-caption-empty,
.voice-dialog #voice-status,
.story-hero-meta,
.discovery-count,
.discovery-footer,
.story-hero-actions small {
  color: var(--story-muted);
}

.status-dot {
  background: var(--story-coral);
  box-shadow: 0 0 0 4px #bb60471f;
}

.status-dot.connected {
  background: #61845f;
}

.button,
.text-button,
.favorite-button,
.scope-button,
.filter-chip,
.icon-button {
  border-radius: 8px;
}

.button {
  min-height: 44px;
  font-weight: 750;
}

.primary {
  background: var(--story-accent);
  color: var(--story-cream);
}

.primary:hover {
  background: #651e29;
}

.secondary,
.favorite-button,
.scope-button.active,
.composer,
.message-bubble,
.voice-caption,
input,
select,
#character-form textarea,
.memory-form textarea {
  background: var(--story-panel);
  border-color: var(--story-line);
  color: var(--ink);
}

.secondary:hover,
.favorite-button:hover,
.icon-button:hover,
.text-button:hover,
.filter-chip:hover:not(.active),
.scope-button:hover {
  background: var(--story-panel-2);
  color: var(--ink);
}

.text-button {
  color: var(--story-accent);
}

input::placeholder,
textarea::placeholder {
  color: #6f5f5b;
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: .52;
}

.launch-intro,
.voice-sample,
.acquisition-preferences,
.empty-state,
.conversation-row,
.greeting,
.memory,
.voice-preparation,
.voice-summary,
.send-recovery,
.scene-intro,
.story-context,
.recap-suggestion,
.voice-followup,
.billing-card,
.verify-box,
.allowance-box,
.auth-gate-card,
.checkout-return {
  background: var(--story-panel);
  border: 1px solid var(--story-line);
  border-radius: 8px;
  color: var(--ink);
}

.launch-intro {
  margin: 18px 0 14px;
  padding: 22px;
}

.launch-intro h1,
.private-header h1,
.empty-state h2,
.conversation-copy h3,
.chat-header h1,
.chat-intro h2,
.dialog-heading h2,
dialog > h2,
.voice-dialog h2,
.profile-copy h2,
.profile-section h3,
.aside-section h2,
.settings-block h3,
.caption-heading h3,
.story-section-heading h2,
.section-heading h2,
.story-hero h1,
.story-hero h2,
.hero h1,
.pricing-teaser-card h2,
.phone-episode-card h3,
.scene-intro h2,
.story-chat-title {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 850;
}

.launch-intro h1 {
  max-width: 680px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04;
}

.launch-intro-copy > p {
  max-width: 680px;
  margin-top: 10px;
  color: var(--story-muted);
  font-size: 14px;
  line-height: 1.65;
}

.launch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.story-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(350px, .76fr);
  min-height: 520px;
  margin: 22px 0 34px;
  overflow: hidden;
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
  box-shadow: 0 24px 70px #7b273217;
}

.story-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #fffaf1 0%, #fffaf1f4 44%, #fffaf18c 63%, transparent 82%);
}

.story-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
  padding: 54px 48px;
}

.eyebrow,
.story-hero .eyebrow,
.story-kicker,
.story-opening .eyebrow,
.scene-intro .eyebrow,
.starter-label,
.resume-story-label,
.phone-episode-top,
.auth-intent-pill {
  display: block;
  margin-bottom: 12px;
  color: var(--story-accent);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.story-kicker {
  color: var(--story-coral);
  text-transform: none;
}

.story-hero h1,
.story-hero h2,
.hero h1 {
  font-size: clamp(38px, 4.8vw, 68px);
  line-height: 1.02;
}

.story-hero-hook,
.story-hero-line,
.hero p {
  max-width: 560px;
  color: var(--story-muted);
  font-size: 15px;
  line-height: 1.78;
}

.story-hero-hook {
  margin-top: 18px;
  color: var(--ink);
  font-size: 18px;
}

.story-hero-line {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 3px solid #d9ad98;
  color: #4b3840;
}

.story-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.story-hero-meta {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.7;
}

.story-hero-art {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #ead7c8;
}

.story-hero-art::after,
.card-media::after,
.profile-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  pointer-events: none;
  background: linear-gradient(transparent, #211b2250);
}

.story-hero-art img,
.story-hero-art .portrait,
.story-hero-art .portrait-fallback {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: 50% 50%;
}

.phone-hero .story-hero-art::before {
  content: "CHAT → LIVE VOICE";
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  padding: 8px 11px;
  border: 1px solid #fffaf1b8;
  border-radius: 999px;
  background: #211b22d9;
  color: var(--story-cream);
  font-size: 10px;
  font-weight: 850;
}

.phone-hero-replies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.phone-hero-replies .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}

.phone-hero-replies .button {
  justify-content: flex-start;
  min-height: 50px;
  text-align: left;
  white-space: normal;
}

.story-section-heading,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 32px 0 18px;
}

.story-section-heading h2,
.section-heading h2 {
  font-size: 25px;
  line-height: 1.2;
}

.story-section-heading small,
.section-heading small {
  color: var(--story-muted);
  font-size: 12px;
}

.discovery-toolbar {
  gap: 12px;
}

.character-search,
.discovery-scopes {
  background: var(--story-panel);
  border-color: var(--story-line);
}

.character-search {
  border-radius: 8px;
}

.character-search > span,
.scope-button,
.filter-chip {
  color: var(--story-muted);
}

.character-search:focus-within,
.composer:focus-within {
  outline: 2px solid var(--story-focus);
  outline-offset: 2px;
  border-color: var(--story-focus);
}

.filter-chip {
  border-color: var(--story-line);
  background: #fbf3e9;
}

.filter-chip.active,
.scope-button.active {
  background: var(--story-accent);
  border-color: var(--story-accent);
  color: var(--story-cream);
}

.character-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.character-card {
  min-width: 0;
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #ead7c8;
  box-shadow: 0 18px 42px #7b273214;
}

.portrait-button {
  width: 100%;
  border-radius: 8px;
  background: #ead7c8;
  box-shadow: inset 0 0 0 1px var(--story-line);
}

.portrait {
  filter: saturate(1.02) contrast(1.02);
}

.portrait-button:hover .portrait {
  transform: scale(1.035);
}

.portrait-fallback {
  background: linear-gradient(135deg, #ead7c8, #b98572);
  color: var(--story-cream);
  text-shadow: none;
}

.portrait-fallback[data-portrait="1"] {
  background: linear-gradient(135deg, #e7d3c4, #93505c);
}

.portrait-fallback[data-portrait="2"] {
  background: linear-gradient(135deg, #eee2cf, #60746b);
}

.portrait-fallback[data-portrait="3"] {
  background: linear-gradient(135deg, #e6d2c2, #6a5968);
}

.card-label {
  top: 10px;
  left: 10px;
  max-width: calc(100% - 64px);
  border: 1px solid #fffaf180;
  border-radius: 6px;
  background: #211b22cc;
  color: var(--story-cream);
  backdrop-filter: blur(10px);
}

.card-favorite {
  top: 9px;
  right: 9px;
  border-radius: 50%;
  background: #fffaf1e8;
  border-color: #fffaf1;
  color: var(--story-accent);
  box-shadow: 0 2px 10px #211b2217;
}

.portrait-bottom {
  background: linear-gradient(transparent, #211b22bf);
}

.portrait-call {
  background: var(--story-accent);
  border-color: transparent;
  color: var(--story-cream);
  box-shadow: 0 10px 25px #211b2245;
}

.card-title h3 {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 850;
  font-size: 19px;
}

.story-card-character,
.card-subtitle {
  color: var(--story-muted);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 7px;
}

.story-card-hook {
  margin-top: 9px;
  color: #35262d;
  font-size: 13px;
  line-height: 1.65;
}

.tag {
  background: #f0e2d3;
  color: #5f4b40;
  border: 1px solid #e0cbbb;
}

.discovery-footer {
  border-color: var(--story-line);
}

.discovery-footer a,
.terms-check a,
.account-links a,
.billing-note a {
  color: var(--story-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.conversation-row:hover,
.resume-story:hover,
.phone-episode-card:hover {
  background: #fbefe3;
}

.conversation-list {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.conversation-row {
  min-width: 0;
  max-width: 100%;
}

.conversation-copy {
  overflow: hidden;
}

.resume-story {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  margin: -12px 0 22px;
  padding: 15px 18px;
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
  text-align: left;
}

.resume-story-label {
  grid-column: 1 / -1;
  margin: 0;
}

.resume-story-preview {
  overflow: hidden;
  color: var(--story-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-portrait {
  border-radius: 8px;
  background: #ead7c8;
}

.chat-shell {
  max-width: 1320px;
}

.chat-header {
  height: 92px;
  border-bottom-color: var(--story-line);
}

.chat-columns {
  grid-template-columns: minmax(0, 1fr) 250px;
}

@media (min-width: 901px) {
  .chat-columns:not(.with-aside) {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-aside:not(.is-open) {
    display: none;
  }

  .mobile-memory-toggle {
    display: grid;
  }
}

.chat-body {
  padding-right: 30px;
}

.chat-aside {
  border-left-color: var(--story-line);
}

.scene-intro {
  margin: 14px 0 24px;
  padding: 18px 20px;
}

.scene-intro .scene-label {
  color: var(--story-accent);
  font-size: 10px;
  font-weight: 850;
}

.scene-intro h2,
.story-chat-title {
  margin-top: 7px;
  font-size: 21px;
  line-height: 1.35;
}

.scene-intro p,
.scene-intro .narration {
  margin-top: 9px;
  color: var(--story-muted);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.scene-expand {
  display: none;
}

.starter-replies,
.episode-decision-options {
  display: grid;
  gap: 8px;
}

.starter-reply,
.reply-idea,
.episode-choice {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
  color: var(--ink);
  text-align: left;
  line-height: 1.55;
}

.starter-reply:hover,
.reply-idea:hover,
.episode-choice:hover {
  border-color: var(--story-accent);
  background: #fbefe3;
}

.featured-starter {
  margin-bottom: 9px;
}

.featured-starter-label,
.greeting small,
.message-label,
.message time {
  color: var(--story-muted);
}

.featured-starter .starter-reply {
  border-color: var(--story-accent);
}

.reply-ideas {
  margin-top: 9px;
  color: var(--story-muted);
}

.reply-ideas summary,
.message-options summary {
  color: var(--story-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reply-idea-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 2px;
}

.greeting p,
.message-bubble,
.voice-caption p,
.voice-summary {
  color: var(--ink);
}

.message-bubble {
  border-radius: 4px 14px 14px 14px;
}

.message.user .message-bubble,
.voice-caption.user {
  background: #f1ddd1;
  border-color: #e5c7b6;
  color: var(--ink);
}

.pending-send .message-bubble {
  opacity: .78;
}

.pending-send .message-label,
.pending-message,
.pending-dots {
  color: var(--story-accent);
}

.composer {
  box-shadow: 0 10px 32px #7b273214;
}

.send-button {
  background: var(--story-accent);
  color: var(--story-cream);
  border-radius: 8px;
}

.connection-notice,
.connection-notice button {
  color: var(--story-coral);
}

.phone-episode-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 30px;
}

.phone-episode-card {
  display: grid;
  gap: 10px;
  min-height: 192px;
  padding: 16px;
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
}

.phone-episode-card.locked {
  opacity: .58;
}

.phone-episode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.phone-episode-card p,
.phone-episode-card small {
  color: var(--story-muted);
  font-size: 12px;
  line-height: 1.55;
}

.episode-decision {
  display: grid;
  gap: 11px;
  margin: 18px 0 8px;
  padding: 16px;
  border: 1px solid #bb604755;
  border-radius: 8px;
  background: #fff4eb;
}

.episode-decision .eyebrow {
  margin-bottom: 0;
}

.episode-decision h2 {
  font-size: 18px;
  line-height: 1.25;
}

.episode-decision p {
  color: var(--story-muted);
  font-size: 12px;
  line-height: 1.6;
}

.episode-finale,
.scene-intro .episode-previous {
  color: var(--story-accent) !important;
  font-weight: 750;
}

dialog {
  background: var(--story-bg);
  border-color: var(--story-line);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 24px 90px #2d181f4a;
}

dialog::backdrop {
  background: #211b227a;
  backdrop-filter: blur(5px);
}

.profile-dialog {
  width: min(940px, calc(100% - 32px));
  padding: 0;
}

.profile-content {
  grid-template-columns: minmax(300px, .86fr) minmax(0, 1.14fr);
}

.profile-art {
  min-height: 580px;
  background: #ead7c8;
}

.profile-copy {
  padding: 32px;
}

.profile-subtitle {
  color: #35262d;
}

.profile-section {
  padding-top: 18px;
  border-top: 1px solid var(--story-line);
}

.story-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.story-facts dt {
  color: var(--story-accent);
  font-size: 11px;
  font-weight: 800;
}

.story-facts dd {
  margin: 0;
  color: var(--story-muted);
  font-size: 12px;
  line-height: 1.65;
}

.story-opening {
  margin-top: 18px;
  padding: 16px;
  border-left: 3px solid var(--story-coral);
  background: #fff4eb;
}

.story-opening p,
.story-hook {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.story-hook {
  margin-top: 14px;
}

.form-dialog,
.compact-dialog,
.voice-dialog {
  border-radius: 12px;
}

.form-error,
.global-error {
  background: #fff0ed;
  color: #8b2f2f;
  border: 1px solid #dfaaa4;
}

.required,
.danger-text,
.danger-zone h3 {
  color: var(--story-danger);
}

.settings-block {
  border-top-color: var(--story-line);
}

.settings-block code {
  background: var(--story-panel-2);
  color: var(--story-accent);
}

.account-tab.active {
  color: var(--story-cream);
}

.launch-pricing {
  align-self: stretch;
  display: grid;
  align-content: center;
  min-width: 0;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
}

.launch-pricing.compact {
  margin-top: 18px;
  padding: 14px;
}

.pricing-teaser-rows {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.preference-option,
.voice-readiness,
.voice-plus-offer,
.pricing-teaser-row {
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
  color: var(--ink);
}

.pricing-teaser-row {
  display: grid;
  gap: 3px;
  padding: 11px;
}

.preference-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  line-height: 1.55;
  min-width: 0;
}

.preference-option input {
  width: auto;
  flex: 0 0 auto;
  margin: 3px 0 0;
}

.preference-option strong,
.preference-option span {
  display: block;
  min-width: 0;
}

.preference-option span,
.pricing-teaser-row span,
.pricing-teaser-row small,
.voice-readiness li,
.voice-readiness-actions p,
.voice-preparation p {
  color: var(--story-muted);
}

.pricing-teaser-row:nth-child(2),
.voice-plus-offer {
  border-color: #bb604777;
  background: #fff4eb;
}

.pricing-teaser-row:nth-child(2) small {
  color: var(--story-accent);
  font-size: 15px;
  font-weight: 800;
}

.voice-sample audio,
.voice-choice-preview audio {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.recap-form textarea {
  color: var(--ink);
}

.usage-bar {
  background: #eadbcc;
}

.usage-bar div,
.voice-wave i {
  background: var(--story-accent);
}

.voice-dialog {
  background: var(--story-bg);
}

.voice-portrait {
  box-shadow: 0 0 0 8px #bb60471c, 0 0 0 18px #bb60470e;
}

.voice-preparation #voice-allowance {
  color: var(--story-accent);
  white-space: pre-line;
}

.voice-readiness {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  text-align: left;
}

.voice-readiness ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.voice-readiness.blocked {
  border-color: #a43c3c55;
  background: #fff0ed;
}

.voice-plus-offer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
}

.voice-plus-actions,
.voice-readiness-actions,
.settings-actions,
.profile-settings,
.preference-form,
.preference-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
}

.profile-settings,
.preference-form,
.preference-fields {
  display: grid;
}

.end-call,
.danger {
  background: var(--story-danger);
  color: var(--story-cream);
}

.toast {
  background: var(--story-accent);
  color: var(--story-cream);
  border-radius: 8px;
  box-shadow: 0 14px 40px #2d181f40;
}

.info-page {
  min-height: 100dvh;
  background: var(--story-bg);
}

.info-shell {
  min-height: 100dvh;
  margin: 0;
  padding: 34px clamp(18px, 5vw, 64px) 56px;
  display: grid;
  align-content: start;
  gap: 32px;
}

.info-brand {
  width: fit-content;
  padding: 0;
  color: var(--ink);
}

.info-card {
  width: min(780px, 100%);
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--story-line);
  border-radius: 8px;
  background: var(--story-panel);
  box-shadow: 0 22px 70px #7b273214;
}

.info-card h1 {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 850;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  margin-bottom: 18px;
}

.info-card h2 {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 850;
  font-size: 19px;
  line-height: 1.35;
  margin: 30px 0 8px;
}

.info-card p {
  color: var(--story-muted);
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.info-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
}

@media (min-width: 1600px) {
  main {
    padding: 0 54px;
  }

  .character-grid {
    gap: 28px;
  }
}

@media (max-width: 1150px) {
  main {
    margin-left: 212px;
    padding: 0 28px;
  }

  .story-hero {
    grid-template-columns: minmax(0, 1fr) minmax(290px, .7fr);
  }

  .story-hero-copy {
    padding: 42px 34px;
  }

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

  .chat-columns {
    grid-template-columns: minmax(0, 1fr) 214px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 84px;
    padding: 26px 10px 18px;
  }

  main {
    margin-left: 84px;
    padding: 0 24px;
  }

  .story-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .story-hero::before {
    background: linear-gradient(90deg, #fffaf1 0%, #fffaf1f0 50%, #fffaf170 76%, transparent 100%);
  }

  .story-hero-copy {
    min-height: 370px;
    padding: 38px 30px;
  }

  .story-hero-art {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(52%, 360px);
    opacity: .9;
  }

  .story-hero-art img,
  .story-hero-art .portrait,
  .story-hero-art .portrait-fallback {
    min-height: 100%;
  }

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

  .chat-body {
    padding-right: 0;
  }

  .chat-aside {
    background: var(--story-panel);
    border-color: var(--story-line);
    box-shadow: 0 16px 50px #2d181f2e;
  }
}

@media (max-width: 700px) {
  .discovery-toolbar {
    align-items: stretch;
  }

  .profile-content {
    display: block;
  }

  .profile-art {
    min-height: 0;
    height: 286px;
  }

  .profile-copy {
    padding: 24px;
  }

  .profile-actions,
  .voice-actions,
  .dialog-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .sidebar {
    width: auto;
    padding: 0 12px;
    background: #211b22f2;
    border-top-color: #332733;
  }

  .nav-item.active {
    background: transparent;
    color: #f1b88e;
  }

  .nav-item.active > span:first-child {
    background: #332733;
  }

  main {
    margin-left: 0;
    padding: 0 16px 76px;
  }

  .topbar {
    height: 64px;
  }

  .story-hero {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    margin-bottom: 24px;
  }

  .story-hero::before {
    display: none;
  }

  .story-hero-art {
    position: relative;
    inset: auto;
    order: 0;
    width: 100%;
    height: 242px;
    min-height: 0;
    opacity: 1;
  }

  .story-hero-art img,
  .story-hero-art .portrait,
  .story-hero-art .portrait-fallback {
    min-height: 0;
    object-position: 50% 18%;
  }

  .story-hero-copy {
    order: 1;
    min-height: 0;
    padding: 22px 18px 20px;
  }

  .story-hero h1,
  .story-hero h2,
  .hero h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .story-hero-hook {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.5;
  }

  .story-hero-line,
  .story-hero-meta {
    display: none;
  }

  .story-hero-actions {
    margin-top: 17px;
  }

  .story-hero-actions small {
    flex-basis: 100%;
  }

  .phone-hero-replies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
  }

  .phone-hero-replies .button.primary {
    grid-column: 1 / -1;
  }

  .story-section-heading,
  .section-heading {
    align-items: flex-start;
  }

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

  .card-title {
    align-items: flex-start;
  }

  .card-title h3 {
    font-size: 16px;
  }

  .story-card-character,
  .card-subtitle,
  .story-card-hook {
    font-size: 11px;
  }

  .phone-episode-rail {
    grid-template-columns: 1fr;
  }

  .chat-shell {
    height: calc(100dvh - 67px);
  }

  .scene-intro {
    padding: 15px;
  }

  .message-bubble {
    max-width: 94%;
  }

  .form-dialog,
  .compact-dialog,
  .voice-dialog {
    width: min(100% - 24px, 540px);
    max-height: min(92dvh, 760px);
  }

  .profile-dialog {
    width: min(100% - 20px, 920px);
    max-height: 92dvh;
    overflow: auto;
  }

  .settings-actions,
  .profile-actions,
  .voice-actions,
  .dialog-actions {
    align-items: stretch;
  }

  .settings-actions .button,
  .profile-actions .button,
  .voice-actions .button,
  .dialog-actions .button {
    flex: 1 1 150px;
  }
}

@media (max-width: 600px) and (max-height: 720px) {
  .scene-intro {
    margin: 5px 0 12px;
    padding: 11px 13px;
  }

  .scene-intro .eyebrow {
    display: none;
  }

  .scene-intro h2 {
    margin-top: 0;
    font-size: 16px;
  }

  .scene-intro p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
  }

  .scene-intro small {
    display: none;
  }

  .scene-intro.expanded p,
  .scene-intro.expanded small {
    display: block;
  }

  .scene-expand {
    display: block;
    min-height: 36px;
    margin-top: 3px;
    padding: 7px 0 0;
    background: transparent;
    color: var(--story-accent);
    font-size: 11px;
    text-align: left;
  }
}

@media (max-width: 600px) and (max-height: 640px) {
  .story-hero-art {
    height: clamp(132px, calc(100dvh - 410px), 185px);
  }

  .story-hero-copy {
    padding: 14px 16px 16px;
  }

  .story-hero h1 {
    font-size: clamp(28px, 7.4vw, 32px);
  }

  .story-hero-hook {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.35;
  }

  .story-hero-actions {
    margin-top: 10px;
  }
}

@media (max-width: 420px) {
  .story-facts {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card-media .card-label {
    max-width: calc(100% - 58px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Cole Season 1: dark visual-novel treatment scoped to the authored season surfaces. */
.season-hero,
.season-progress {
  --season-ink: #f7efe4;
  --season-muted: rgba(247, 239, 228, 0.72);
  --season-line: rgba(232, 185, 115, 0.26);
  --season-gold: #e8b973;
  --season-rose: #b84e65;
}

.season-hero {
  background:
    radial-gradient(circle at 18% 16%, rgba(184, 78, 101, 0.30), transparent 34%),
    radial-gradient(circle at 80% 12%, rgba(232, 185, 115, 0.20), transparent 30%),
    linear-gradient(135deg, #130d17 0%, #20131c 48%, #080b11 100%);
  border-color: var(--season-line);
  color: var(--season-ink);
  box-shadow: 0 28px 80px rgba(5, 6, 10, 0.45);
}

.season-hero h1,
.season-episode-card h3 {
  color: var(--season-ink);
}

.season-hero::before {
  background: linear-gradient(90deg, rgba(232, 185, 115, 0.32), rgba(184, 78, 101, 0.16), transparent);
}

.season-hero .eyebrow,
.season-hero .story-kicker,
.season-hero .story-hero-actions small,
.season-hero .phone-hero-replies .eyebrow {
  color: var(--season-gold);
}

.season-hero .story-hero-hook,
.season-hero .story-hero-line,
.season-hero .story-hero-meta,
.season-hero .season-pass-card p,
.season-hero .season-episode-card p {
  color: var(--season-muted);
}

.season-hero .story-hero-line {
  border-color: var(--season-line);
  background: rgba(255, 255, 255, 0.055);
}

.season-tap-start .button.secondary {
  border-color: rgba(247, 239, 228, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--season-ink);
}

.season-progress {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-top: 18px;
}

.season-pass-card,
.season-episode-card {
  border: 1px solid var(--season-line);
  border-radius: 22px;
  background: #18121b;
  color: var(--season-ink);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.season-pass-card strong,
.season-episode-card strong {
  display: block;
  color: var(--season-ink);
  font-size: 16px;
}

.season-pass-card p,
.season-episode-card p {
  color: var(--season-muted);
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.season-episode-number,
.season-episode-card small,
.season-episode-card .text-button {
  color: var(--season-gold);
}

.season-pass-card .button.secondary {
  border-color: var(--season-line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--season-ink);
}

.season-pass-card button:focus-visible,
.season-episode-card button:focus-visible {
  outline-color: var(--season-gold);
}

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

.season-episode-card {
  min-height: 132px;
  position: relative;
  overflow: hidden;
}

.season-episode-card::after {
  content: '';
  position: absolute;
  inset: auto 14px 12px 14px;
  height: 2px;
  border-radius: 999px;
  background: rgba(232, 185, 115, 0.22);
}

.season-episode-card.current,
.season-episode-card.unlocked {
  background: linear-gradient(180deg, #3b202b, #11131a);
}

.season-episode-card.locked {
  border-style: dashed;
}

.season-decision {
  border-color: rgba(232, 185, 115, 0.28);
  background:
    radial-gradient(circle at top right, rgba(184, 78, 101, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(25, 14, 24, 0.95), rgba(9, 11, 17, 0.94));
  color: #f7efe4;
}

.season-decision .eyebrow,
.season-decision h2 {
  color: #f7efe4;
}

.season-decision p,
.season-decision .aside-kicker {
  color: rgba(247, 239, 228, 0.72);
}

.season-decision .episode-choice {
  border-color: rgba(232, 185, 115, 0.30);
  background: rgba(255, 255, 255, 0.075);
  color: #f7efe4;
}

.season-decision .episode-choice:hover,
.season-decision .episode-choice:focus-visible {
  border-color: rgba(232, 185, 115, 0.58);
  background: rgba(184, 78, 101, 0.20);
}

.season-paywall-inline {
  border-color: rgba(232, 185, 115, 0.30);
  background: #18101a;
  color: #f7efe4;
}

@media (max-width: 820px) {
  .season-progress,
  .season-episode-rail {
    grid-template-columns: 1fr;
  }

  .season-episode-card {
    min-height: auto;
  }
}

.season-ending-paywall {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(232, 185, 115, 0.32);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

.season-ending-paywall strong {
  display: block;
  color: #f7efe4;
  font-size: 18px;
}

.season-ending-paywall p {
  margin: 8px 0 0;
}

.season-ending-paywall .button {
  margin-top: 12px;
}

.season-chat-shell {
  --season-ink: #f7efe4;
  --season-muted: rgba(247, 239, 228, 0.72);
  --season-line: rgba(232, 185, 115, 0.26);
  --season-gold: #e8b973;
  background:
    radial-gradient(circle at 16% 0%, rgba(184, 78, 101, 0.16), transparent 34%),
    linear-gradient(180deg, #100d15 0%, #18111b 42%, #080b11 100%);
  border-color: var(--season-line);
  color: var(--season-ink);
  box-shadow: 0 26px 80px rgba(5, 6, 10, 0.38);
}

.season-chat-shell .chat-header {
  border-bottom-color: var(--season-line);
  background: linear-gradient(90deg, rgba(20, 13, 23, 0.96), rgba(31, 18, 27, 0.94));
}

.season-chat-shell .chat-header h1,
.season-chat-shell .story-chat-title,
.season-chat-shell .scene-intro h2,
.season-chat-shell .greeting p,
.season-chat-shell .message-label {
  color: var(--season-ink);
}

.season-chat-shell .chat-body,
.season-chat-shell .messages,
.season-chat-shell .composer-area {
  background: transparent;
}

.season-chat-shell .scene-intro,
.season-chat-shell .greeting,
.season-chat-shell .message.assistant .message-bubble,
.season-chat-shell .reply-ideas,
.season-chat-shell .composer,
.season-chat-shell .preview-conversion {
  border-color: var(--season-line);
  background: rgba(12, 12, 18, 0.60);
  color: var(--season-ink);
}

.season-chat-shell .scene-intro p,
.season-chat-shell .scene-intro small,
.season-chat-shell .greeting small,
.season-chat-shell .story-chat-title,
.season-chat-shell .message.assistant .message-bubble,
.season-chat-shell .composer-area,
.season-chat-shell .composer textarea,
.season-chat-shell .composer textarea::placeholder {
  color: var(--season-muted);
}

.season-chat-shell .message.user .message-bubble {
  background: linear-gradient(135deg, rgba(184, 78, 101, 0.30), rgba(232, 185, 115, 0.18));
  color: var(--season-ink);
}

.season-chat-shell .composer textarea {
  background: transparent;
}

.season-chat-shell .chat-aside {
  border-left-color: var(--season-line);
  background: rgba(12, 12, 18, 0.50);
}

.season-paywall-lead {
  color: #f7efe4 !important;
  font-size: 15px;
  font-weight: 700;
}

main:has(.season-chat-shell) { background: #100d15; }
.season-chat-shell .text-button,
.season-chat-shell .message-options summary,
.season-chat-shell .connection-notice { color: #e8b973; }
.season-chat-shell .message time,
.season-chat-shell .composer-footnote { color: #c5bfc8; }
.season-chat-shell .messages { scrollbar-color: #776875 #15111c; }
.season-chat-shell .scene-intro .eyebrow,
.season-chat-shell .scene-intro .episode-previous { color: var(--season-gold) !important; }
