:root {
  color-scheme: light;
  --bg: #f8f3f7;
  --paper: #fffafd;
  --paper-strong: #ffffff;
  --soft: #f0e8f4;
  --soft-2: #f7efe9;
  --ink: #17131b;
  --muted: #665f70;
  --line: #ddd2e2;
  --violet: #7c3aed;
  --violet-dark: #5b21b6;
  --rose: #dc4b73;
  --sage: #247761;
  --amber: #bd6b25;
  --danger: #b42335;
  --shadow: 0 22px 70px rgba(42, 25, 62, 0.16);
}

body.theme-studio {
  --bg: #f4f6f8;
  --paper: #ffffff;
  --paper-strong: #ffffff;
  --soft: #edf1f4;
  --soft-2: #eef5f2;
  --ink: #14171a;
  --muted: #5c6670;
  --line: #d8dee5;
  --violet: #2563eb;
  --violet-dark: #1d4ed8;
  --rose: #c2415b;
  --sage: #0f766e;
  --amber: #a16207;
  --shadow: 0 18px 52px rgba(24, 35, 47, 0.12);
}

body.theme-midnight {
  color-scheme: dark;
  --bg: #111215;
  --paper: #181a20;
  --paper-strong: #1f222a;
  --soft: #20242c;
  --soft-2: #171d20;
  --ink: #f4f0ea;
  --muted: #b5adbd;
  --line: #313640;
  --violet: #8b7cf6;
  --violet-dark: #a9a0ff;
  --rose: #f4728b;
  --sage: #5ec5ad;
  --amber: #e5a74f;
  --danger: #fb7185;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

body.theme-story {
  --bg: #f6f1ec;
  --paper: #fffaf6;
  --paper-strong: #ffffff;
  --soft: #f1e8de;
  --soft-2: #edf3ef;
  --ink: #1d1a16;
  --muted: #6b625a;
  --line: #ded4c8;
  --violet: #7a5cce;
  --violet-dark: #5941a9;
  --rose: #c14e69;
  --sage: #2f7d6a;
  --amber: #a9652d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
textarea,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

.appView[hidden],
[hidden] {
  display: none !important;
}

.brandRow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 850;
}

.brand,
.tagline {
  display: block;
}

.brand {
  font-size: 18px;
  font-weight: 780;
}

.tagline {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.primaryButton,
.secondaryButton,
.ghostButton,
.ghostLink,
.iconButton,
.navLink {
  border-radius: 8px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.primaryButton {
  padding: 0 18px;
  background: var(--violet);
  color: #ffffff;
  font-weight: 760;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.22);
}

.primaryButton:hover {
  background: var(--violet-dark);
}

.primaryButton.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.secondaryButton,
.ghostButton,
.ghostLink,
.iconButton,
.navLink {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0 14px;
}

.secondaryButton:hover,
.ghostButton:hover,
.ghostLink:hover,
.iconButton:hover,
.navLink:hover {
  border-color: rgba(124, 58, 237, 0.45);
  color: var(--violet-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.landingApp {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(248, 243, 247, 0.35)),
    var(--bg);
}

.siteNav {
  min-height: 72px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(248, 243, 247, 0.92);
  border-bottom: 1px solid rgba(221, 210, 226, 0.78);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.navActions,
.heroActions,
.headerActions,
.editorActions,
.panelHeader,
.meterTop,
.chatHeader,
.dialogHeader,
.adminTopbar,
.adminHero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.heroBand {
  position: relative;
  min-height: min(760px, 78dvh);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 64px 28px;
  border-bottom: 1px solid var(--line);
}

.heroBg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(56vw, 760px);
  height: 100%;
  object-fit: cover;
  object-position: 64% 24%;
}

.heroVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.theme-story .heroBg {
  opacity: 0.42;
}

body.theme-story .heroVideo:not([hidden]) + .heroBg {
  opacity: 0.18;
}

.heroBand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 250, 253, 0.98) 0%, rgba(255, 250, 253, 0.94) 34%, rgba(255, 250, 253, 0.42) 62%, rgba(255, 250, 253, 0.08) 100%),
    linear-gradient(180deg, rgba(248, 243, 247, 0.15) 0%, rgba(248, 243, 247, 0.74) 100%);
}

body.theme-midnight .heroBand::before {
  background:
    linear-gradient(90deg, rgba(17, 18, 21, 0.96) 0%, rgba(17, 18, 21, 0.84) 38%, rgba(17, 18, 21, 0.28) 72%, rgba(17, 18, 21, 0.06) 100%),
    linear-gradient(180deg, rgba(17, 18, 21, 0.18) 0%, rgba(17, 18, 21, 0.86) 100%);
}

.heroCopy {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  text-shadow: 0 1px 18px rgba(255, 250, 253, 0.92);
}

.eyebrow {
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.heroCopy h1 {
  margin-top: 14px;
  font-size: 76px;
  line-height: 0.95;
  font-weight: 850;
}

.heroText {
  margin-top: 20px;
  width: min(520px, 100%);
  color: #3d3546;
  font-size: 20px;
  line-height: 1.48;
}

.heroActions {
  justify-content: flex-start;
  margin-top: 30px;
  flex-wrap: wrap;
}

.heroSignal {
  position: absolute;
  z-index: 1;
  right: 28px;
  max-width: min(330px, calc(100vw - 56px));
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 250, 253, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(23, 19, 27, 0.12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
}

.heroSignal.top {
  top: 28%;
}

.heroSignal.bottom {
  bottom: 12%;
  border-color: rgba(36, 119, 97, 0.25);
  color: var(--sage);
}

.outcomeStrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.outcomeStrip div {
  min-height: 116px;
  padding: 24px 28px;
  display: grid;
  align-content: center;
  gap: 6px;
  background: var(--paper);
}

.outcomeStrip b {
  font-size: 25px;
}

.outcomeStrip span {
  color: var(--muted);
  line-height: 1.42;
}

.previewBand,
.stepsBand,
.finalBand {
  padding: 72px 28px;
}

.previewBand {
  display: grid;
  grid-template-columns: minmax(320px, 470px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  background: var(--paper-strong);
}

.chatPreview {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffafd, #f4edf8);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.previewTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.previewTop b,
#phaseBadge,
.statusPill {
  border-radius: 999px;
  background: rgba(36, 119, 97, 0.1);
  color: var(--sage);
  padding: 5px 9px;
  font-size: 12px;
}

.previewBubble {
  width: fit-content;
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.48;
}

.previewBubble.user {
  justify-self: end;
  background: var(--violet);
  color: #ffffff;
}

.previewBubble.assistant {
  background: #ffffff;
  border: 1px solid var(--line);
}

.previewMetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.previewMetrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.7);
}

.previewCopy h2,
.sectionLead h2,
.finalBand h2 {
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.08;
}

.previewCopy p,
.sectionLead p,
.finalBand p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
}

.featureGrid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.featureGrid article,
.steps article {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px;
}

.featureGrid b,
.steps b {
  display: block;
  font-size: 16px;
}

.featureGrid span,
.steps p {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.stepsBand {
  background: var(--soft-2);
}

.sectionLead {
  width: min(720px, 100%);
}

.steps {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps article span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--amber);
  font-weight: 850;
}

.finalBand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--ink);
  color: #ffffff;
}

.finalBand p {
  color: rgba(255, 255, 255, 0.72);
}

.chatShell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  background: var(--bg);
}

.leftPane {
  display: grid;
  grid-template-rows: auto minmax(220px, min(44dvh, 430px)) auto;
  gap: 18px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f4edf8, #f7efe9);
}

body.theme-studio .leftPane {
  background: linear-gradient(180deg, #edf1f4, #eef5f2);
}

body.theme-midnight .leftPane {
  background: linear-gradient(180deg, #171a21, #151a1d);
}

body.theme-story .leftPane {
  background: linear-gradient(180deg, #f1e8de, #edf3ef);
}

.portraitPanel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.portrait {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.portraitCaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 250, 253, 0.84);
  color: var(--ink);
  font-size: 13px;
}

.portraitCaption span {
  color: var(--muted);
}

.clarityPanel,
.chatPane,
dialog,
.adminTopbar,
.adminSide,
.adminMain,
.loginBox {
  background: var(--paper);
}

.clarityPanel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.statusPill.danger {
  background: rgba(180, 35, 53, 0.1);
  color: var(--danger);
}

.meterTop {
  color: var(--muted);
  font-size: 13px;
}

.track {
  height: 8px;
  border-radius: 999px;
  background: #e7ddec;
  overflow: hidden;
  margin-top: 7px;
}

.track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), var(--rose));
  transition: width 0.24s ease;
}

.nextStep {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--muted);
  font-size: 13px;
}

.nextStep p {
  color: var(--ink);
  margin-top: 8px;
  line-height: 1.5;
}

.chatPane {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  height: 100dvh;
}

.chatHeader {
  grid-row: 1;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.chatHeader h1 {
  font-size: 24px;
  line-height: 1.15;
}

.chatHeader p,
.adminHero p,
.loginBox p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.mobileStatus {
  grid-row: 3;
  display: none;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  background: var(--soft);
}

.mobileStatus span {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
}

.followupBar {
  grid-row: 4;
  margin: 0 18px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.followupBar span {
  min-width: 0;
  font-size: 0.92rem;
}

.messages {
  grid-row: 5;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: min(720px, 88%);
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.52;
  white-space: pre-wrap;
  box-shadow: 0 1px 0 rgba(23, 19, 27, 0.04);
}

.message.assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--line);
}

.message.user {
  align-self: flex-end;
  background: var(--violet);
  color: #ffffff;
}

.message.typing {
  color: var(--muted);
}

.composer {
  grid-row: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

textarea,
input,
select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: none;
  min-height: 52px;
  max-height: 220px;
  padding: 13px 14px;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

body.theme-midnight textarea,
body.theme-midnight input,
body.theme-midnight select,
body.theme-midnight .message.assistant,
body.theme-midnight .previewBubble.assistant {
  background: #20232b;
}

#sendButton {
  align-self: start;
  height: 52px;
  min-height: 52px;
  padding: 0 18px;
  background: var(--violet);
  color: #ffffff;
  font-weight: 760;
  border: 0;
  border-radius: 8px;
}

#sendButton:hover {
  background: var(--violet-dark);
}

dialog {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(23, 19, 27, 0.44);
}

.dialogHeader {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.memoryTabs {
  padding: 10px 12px 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.memoryTabs button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.memoryTabs button.active {
  background: var(--violet);
  color: #fffaf6;
  border-color: var(--violet);
}

.iconButton {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.memoryContent {
  padding: 16px;
  max-height: min(70dvh, 620px);
  overflow: auto;
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.identityDialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.identityForm {
  display: grid;
  max-height: calc(100dvh - 28px);
  padding-bottom: 12px;
  box-sizing: border-box;
  overflow-y: auto;
}

.identityHero {
  min-height: 210px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 28px 24px 24px;
  background:
    linear-gradient(180deg, rgba(29, 24, 48, 0.2) 0%, rgba(29, 24, 48, 0.92) 100%),
    url("/assets/emma.jpg?v=20260624-portrait-1") center 18% / cover;
  color: #fffaf6;
}

.identityHero span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 250, 246, 0.82);
  font-size: 12px;
  font-weight: 820;
}

.identityHero h2 {
  margin: 0;
  max-width: 360px;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: 0;
}

.identityHero p {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 250, 246, 0.74);
  line-height: 1.45;
}

.identityBody {
  padding: 18px;
  display: grid;
  gap: 14px;
}

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

.identityCards article,
.identityPaywall {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-strong);
}

.identityCards article {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.identityCards b,
.identityPaywall b {
  color: var(--ink);
}

.identityCards p,
.identityPaywall p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.identityBody label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.identityBody input[type="text"],
.identityBody input:not([type]) {
  min-height: 42px;
}

.identityOptions {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.identityOptions legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.identityOptions label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
}

.identityOptions input {
  width: 16px;
  height: 16px;
  accent-color: var(--violet);
}

.identityPaywall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.identityActions {
  position: sticky;
  bottom: 12px;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0) 0%, var(--paper) 34%);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 560px) {
  .identityHero {
    min-height: 148px;
    padding: 24px 18px 20px;
  }

  .identityHero h2 {
    font-size: 28px;
  }

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

  .identityCards article,
  .identityPaywall {
    padding: 10px;
  }

  .identityCards p,
  .identityPaywall p {
    font-size: 11px;
  }

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

  .identityPaywall .ghostButton {
    min-width: 94px;
    padding-inline: 10px;
  }
}

.inlineStatus {
  color: var(--muted);
  font-size: 13px;
}

.inlineStatus.isError {
  color: var(--rose);
}

.memoryBlock {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.memoryBlock b {
  color: var(--ink);
}

.memoryBlock p {
  white-space: pre-line;
}

.memoryHero,
.paywallBox {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.memoryHero b,
.paywallBox b {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.bookHero,
.bookChapter {
  display: grid;
  gap: 10px;
}

.bookImage {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.bookPositiveMoments {
  display: grid;
  gap: 10px;
}

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

.bookPositiveGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.bookPositiveCard {
  display: grid;
  gap: 8px;
}

.bookPositiveCard span {
  color: var(--ink);
  font-weight: 820;
}

.bookPositiveCard small {
  color: var(--muted);
  line-height: 1.4;
}

.bookPageList,
.emotionEventList {
  display: grid;
  gap: 10px;
}

.bookPageCard,
.emotionEventCard {
  display: grid;
  gap: 7px;
}

.bookPageCard span,
.emotionEventCard span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.bookPageCard p,
.emotionEventCard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.bookPageCard blockquote {
  margin: 2px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--violet);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--ink);
}

.emotionFilterRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emotionFilterRow span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--emotion-color) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--emotion-color) 16%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.emotionCalendar {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-strong);
}

.emotionCalendar span {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 8px;
  background: var(--emotion-color);
  opacity: var(--emotion-alpha);
}

.emotionEventCard {
  border-left: 4px solid var(--emotion-color);
}

.emotionEventCard small {
  color: var(--muted);
}

.bookImageControls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.bookImageControl {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.bookImageControl input,
.bookImageControl select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
}

.bookImageHint {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bookImageAction {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  min-height: 34px;
  padding: 0 10px;
  font-weight: 720;
}

.bookImageAction:disabled {
  cursor: wait;
  opacity: 0.68;
}

@media (max-width: 560px) {
  .bookImageControls {
    grid-template-columns: 1fr;
  }
}

.paywallBox {
  background: #201b24;
  color: #f8f3f7;
}

.paywallBox p,
.paywallBox span {
  color: rgba(248, 243, 247, 0.76);
}

.miniStats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.miniStats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--muted);
}

.miniStats b {
  color: var(--ink);
}

.followupItem button {
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 10px;
}

.accountPanel,
.subscriptionPanel,
.privacyPanel {
  display: grid;
  gap: 12px;
}

.subscriptionActions,
.privacyActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacyPanel label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  line-height: 1.35;
}

.privacyPanel select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 8px;
}

.privacyActions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  min-height: 34px;
  padding: 0 10px;
}

.danger {
  color: #9d2f2f !important;
  border-color: rgba(157, 47, 47, 0.35) !important;
}

.emptyText {
  color: var(--muted);
  margin: 0;
}

.adminShell {
  min-height: 100dvh;
  background: var(--bg);
}

.adminTopbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.adminBrand {
  color: var(--ink);
}

.adminLogin {
  min-height: calc(100dvh - 70px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.loginBox {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.loginBox label,
.promptEditor label,
.adminForm label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.formError {
  color: var(--danger);
  font-size: 13px;
}

.adminWorkspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.adminSide,
.adminMain {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.adminSide {
  align-self: start;
  padding: 14px;
}

.adminSectionTitle {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.adminNav {
  display: grid;
  gap: 8px;
}

.adminNav button,
.promptTabs {
  display: grid;
  gap: 8px;
}

.adminNav button,
.promptTab {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
}

.adminNav button.active,
.promptTab.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--violet-dark);
}

.promptTabs {
  display: grid;
  gap: 8px;
}

.adminMain {
  min-width: 0;
  padding: 18px;
}

.adminHero {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.adminPanel,
.promptEditor,
.adminForm {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.formGrid,
.promptMeta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.formGrid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.connectionBox {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.connectionBox h2,
.wizardStep h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.connectionBox p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.wizardMode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wizardMode .active,
.wizardSteps button.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--violet-dark);
}

.personaWizardGrid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.wizardSteps {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 96px;
}

.wizardSteps button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.wizardCanvas {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.wizardStep {
  display: none;
  gap: 14px;
}

.wizardStep.active {
  display: grid;
}

.personaPreview {
  display: grid;
  gap: 14px;
}

.previewPersonaTop,
.previewPersonaGrid,
.previewPersonaColumns {
  display: grid;
  gap: 10px;
}

.previewPersonaTop {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.previewPersonaTop span,
.previewPersonaTop b {
  display: block;
}

.previewPersonaTop span {
  font-size: 20px;
  font-weight: 800;
}

.previewPersonaTop b,
.previewPersonaGrid strong,
.previewPersonaColumns strong {
  color: var(--ink);
}

.previewPersonaGrid,
.previewPersonaColumns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.previewPersonaGrid div,
.previewPersonaColumns section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.previewPersonaGrid span,
.personaPreview p,
.previewPersonaColumns li {
  color: var(--muted);
  line-height: 1.45;
}

.previewPersonaColumns ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.personaJsonPanel {
  display: grid;
  gap: 14px;
}

.toggleGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.switchLine {
  min-height: 42px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink) !important;
}

.switchLine.inline {
  align-self: end;
}

.switchLine input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.promptLayout,
.questLayout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.imageAdminGrid,
.contentAdminGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.contentAdminGrid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.integrationList {
  display: grid;
  gap: 8px;
}

.integrationItem {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.integrationItem span {
  color: var(--muted);
  font-size: 12px;
}

.contentResult {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.contentPackage {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.contentPackage h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.contentPackage p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.contentPackage small,
.contentPackage figcaption,
.contentSlide span {
  color: var(--muted);
  font-size: 12px;
}

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

.contentAssets figure {
  margin: 0;
  display: grid;
  gap: 6px;
}

.contentAssets img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.contentSlides {
  display: grid;
  gap: 8px;
}

.contentSlide {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.promptLayout {
  grid-template-columns: 210px minmax(0, 1fr) minmax(280px, 340px);
}

.promptSidePanel,
.promptToolBlock,
.promptConfigForm,
.promptVersionList,
.promptConfigList {
  display: grid;
  gap: 10px;
}

.promptToolBlock {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.promptToolBlock .panelHeader {
  align-items: flex-start;
  padding: 0;
}

.promptToolBlock h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.promptToolBlock p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.promptVersionItem,
.promptConfigItem {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.promptConfigItem.active {
  border-color: rgba(124, 58, 237, 0.38);
  background: rgba(124, 58, 237, 0.08);
}

.promptVersionMeta {
  display: grid;
  gap: 3px;
}

.promptVersionMeta strong {
  font-size: 13px;
  line-height: 1.25;
}

.promptVersionMeta span,
#promptVersionStatus,
#promptConfigStatus {
  color: var(--muted);
  font-size: 12px;
}

.promptVersionPreview {
  word-break: break-word;
}

.questList {
  display: grid;
  gap: 10px;
}

.questCard,
.emptyState {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 12px;
}

.questCard {
  display: grid;
  gap: 12px;
}

.questCard.muted {
  opacity: 0.62;
}

.questCard p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.42;
}

.questCard span,
.emptyState {
  color: var(--muted);
  font-size: 12px;
}

.questActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghostButton.danger {
  color: var(--danger);
}

.imageResult {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  overflow: hidden;
}

.imageResult:empty {
  display: none;
}

.imageResult img {
  width: min(360px, 100%);
  height: auto;
  display: block;
}

#promptText {
  min-height: 420px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

#promptSaveStatus {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .heroBand {
    min-height: 70dvh;
  }

  .heroCopy h1 {
    font-size: 56px;
  }

  .heroText {
    font-size: 18px;
  }

  .heroSignal.top {
    top: auto;
    bottom: 84px;
  }

  .outcomeStrip,
  .previewBand,
  .steps {
    grid-template-columns: 1fr;
  }

  .previewBand,
  .stepsBand,
  .finalBand {
    padding: 52px 20px;
  }

  .finalBand {
    align-items: flex-start;
    flex-direction: column;
  }

  .chatShell {
    grid-template-columns: 1fr;
  }

  .leftPane {
    display: none;
  }

  .mobileStatus {
    display: flex;
  }

  .chatPane {
    height: 100dvh;
  }

  .message {
    max-width: 96%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  #sendButton {
    height: 48px;
  }

  .adminWorkspace {
    grid-template-columns: 1fr;
  }

  .formGrid,
  .formGrid.three,
  .promptMeta,
  .personaWizardGrid,
  .previewPersonaGrid,
  .previewPersonaColumns,
  .promptLayout,
  .questLayout,
  .imageAdminGrid,
  .contentAdminGrid {
    grid-template-columns: 1fr;
  }

  .wizardSteps {
    position: static;
  }

  .adminHero,
  .editorActions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .siteNav {
    padding: 12px 14px;
  }

  .siteNav .tagline,
  .navLink {
    display: none;
  }

  .heroBand {
    min-height: 68dvh;
    padding: 42px 18px 112px;
    align-items: end;
  }

  .heroBand::before {
    background:
      linear-gradient(180deg, rgba(255, 250, 253, 0.12) 0%, rgba(255, 250, 253, 0.58) 36%, rgba(255, 250, 253, 0.96) 78%),
      linear-gradient(90deg, rgba(255, 250, 253, 0.7), rgba(255, 250, 253, 0.2));
  }

  .heroBg {
    inset: 0;
    width: 100%;
    object-position: center 18%;
  }

  .heroCopy h1 {
    font-size: 46px;
  }

  .heroText {
    font-size: 16px;
  }

  .heroActions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .heroSignal {
    left: 18px;
    right: 18px;
    max-width: none;
    font-size: 13px;
  }

  .heroSignal.top {
    display: none;
  }

  .heroSignal.bottom {
    bottom: 22px;
  }

  .outcomeStrip div {
    min-height: auto;
    padding: 20px;
  }

  .previewCopy h2,
  .sectionLead h2,
  .finalBand h2 {
    font-size: 30px;
  }

  .featureGrid {
    grid-template-columns: 1fr;
  }

  .chatHeader {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .messages {
    padding: 16px;
  }

  .composer {
    padding: 12px 14px 16px;
  }

  .adminTopbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Emma visual refresh */
:root {
  --bg: #f6f4f2;
  --paper: #fffdfb;
  --paper-strong: #ffffff;
  --soft: #eee8ec;
  --soft-2: #edf3ef;
  --ink: #17141a;
  --muted: #67606b;
  --line: #ded6dc;
  --violet: #6f3ee8;
  --violet-dark: #4d249f;
  --rose: #c84768;
  --sage: #16705f;
  --amber: #a6642a;
  --shadow: 0 24px 64px rgba(27, 20, 32, 0.13);
}

body {
  background:
    linear-gradient(180deg, #fbf8f6 0%, #f4f1f3 48%, #eef3f1 100%),
    var(--bg);
}

.mark {
  background: #17141a;
  box-shadow: 0 10px 24px rgba(23, 20, 26, 0.16);
}

.primaryButton {
  background: #17141a;
  box-shadow: 0 14px 32px rgba(23, 20, 26, 0.18);
}

.primaryButton:hover,
#sendButton:hover {
  background: #2b2434;
}

.secondaryButton,
.ghostButton,
.ghostLink,
.iconButton,
.navLink {
  background: rgba(255, 253, 251, 0.78);
  backdrop-filter: blur(14px);
}

.landingApp {
  background: #f6f4f2;
}

.siteNav {
  min-height: 68px;
  background: rgba(255, 253, 251, 0.78);
  border-bottom: 1px solid rgba(222, 214, 220, 0.72);
}

.heroBand {
  min-height: min(790px, calc(100dvh - 96px));
  align-items: end;
  padding: 96px 28px 74px;
  border-bottom: 0;
  background: #17141a;
}

.heroBg,
.heroVideo {
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: 62% 26%;
}

.heroBg {
  filter: saturate(0.96) contrast(1.02);
}

.heroBand::before {
  background:
    linear-gradient(90deg, rgba(18, 14, 20, 0.88) 0%, rgba(18, 14, 20, 0.68) 38%, rgba(18, 14, 20, 0.24) 72%, rgba(18, 14, 20, 0.1) 100%),
    linear-gradient(180deg, rgba(18, 14, 20, 0.08) 0%, rgba(18, 14, 20, 0.64) 100%);
}

.heroCopy {
  width: min(620px, 100%);
  margin-left: clamp(0px, 3vw, 44px);
  color: #ffffff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.32);
}

.heroCopy .eyebrow {
  color: #ffb4c4;
}

.heroCopy h1 {
  font-size: clamp(56px, 7vw, 108px);
  line-height: 0.9;
}

.heroText {
  width: min(560px, 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 21px;
}

.heroActions .primaryButton {
  background: #ffffff;
  color: #17141a;
}

.heroActions .primaryButton:hover {
  background: #f2ecea;
}

.heroActions .secondaryButton {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.heroSignal {
  right: clamp(24px, 4vw, 60px);
  background: rgba(255, 253, 251, 0.88);
  backdrop-filter: blur(18px);
}

.heroSignal.top {
  top: 26%;
}

.heroSignal.bottom {
  bottom: 8%;
}

.outcomeStrip {
  width: min(1180px, calc(100% - 56px));
  margin: -28px auto 0;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(222, 214, 220, 0.78);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(27, 20, 32, 0.09);
}

.outcomeStrip div {
  background: rgba(255, 253, 251, 0.94);
}

.previewBand {
  padding-top: 86px;
  background:
    linear-gradient(180deg, #f8f5f3 0%, #fffdfb 100%);
}

.chatPreview,
.featureGrid article,
.steps article,
.loginBox,
.adminSide,
.adminMain,
.clarityPanel,
.message.assistant,
.memoryBlock,
.questCard,
.emptyState,
.connectionBox,
.wizardCanvas,
.previewPersonaTop,
.previewPersonaGrid div,
.previewPersonaColumns section {
  box-shadow: 0 1px 0 rgba(23, 20, 26, 0.04);
}

.chatPreview {
  background: #fffdfb;
  box-shadow: 0 28px 72px rgba(27, 20, 32, 0.14);
}

.previewBubble.user,
.message.user {
  background: #17141a;
}

.stepsBand {
  background: #eef3f1;
}

.finalBand {
  background: #17141a;
}

.chatShell {
  background:
    linear-gradient(90deg, #f1ecef 0%, #f8f6f4 34%, #fffdfb 100%);
}

.leftPane {
  grid-template-rows: auto minmax(240px, min(46dvh, 470px)) auto;
  background: #efe8ed;
  border-right: 1px solid rgba(222, 214, 220, 0.86);
}

.portraitPanel {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 58px rgba(27, 20, 32, 0.16);
}

.portrait {
  object-position: 54% 24%;
}

.portraitPanel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 20, 26, 0) 48%, rgba(23, 20, 26, 0.34) 100%);
  pointer-events: none;
}

.portraitCaption {
  z-index: 1;
  background: rgba(255, 253, 251, 0.86);
  backdrop-filter: blur(16px);
}

.chatPane {
  background:
    linear-gradient(180deg, rgba(255, 253, 251, 0.96) 0%, rgba(252, 249, 248, 0.94) 100%);
}

.chatHeader {
  padding: 18px 28px;
  background: rgba(255, 253, 251, 0.86);
  backdrop-filter: blur(14px);
}

.messages {
  padding: 28px;
  gap: 14px;
}

.message {
  max-width: min(660px, 86%);
  padding: 13px 15px;
}

.composer {
  grid-row: 6;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  background: rgba(239, 232, 237, 0.82);
  backdrop-filter: blur(16px);
}

.composerHints {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.composerHints button {
  flex: 0 0 auto;
  border: 1px solid rgba(222, 214, 220, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.74);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.composerHints button:hover {
  border-color: rgba(22, 112, 95, 0.34);
  color: var(--sage);
}

textarea,
input,
select {
  background: rgba(255, 255, 255, 0.94);
}

#sendButton {
  background: #17141a;
}

.adminShell {
  --paper: #fffaf6;
  --paper-strong: #ffffff;
  --soft: #f2ecef;
  --line: rgba(31, 23, 38, 0.16);
  --ink: #1f1726;
  --muted: #63586d;
  --violet: #7c3aed;
  --violet-dark: #5b21b6;
  --sage: #16705f;
  background:
    linear-gradient(180deg, #fbf8f6 0%, #f3eef2 100%);
  color: var(--ink);
}

.adminTopbar {
  background: rgba(255, 253, 251, 0.84);
  backdrop-filter: blur(16px);
}

.adminLogin {
  min-height: calc(100dvh - 70px);
  background:
    linear-gradient(90deg, rgba(255, 253, 251, 0.98) 0%, rgba(255, 253, 251, 0.86) 48%, rgba(255, 253, 251, 0.55) 100%),
    url("/assets/emma.jpg?v=20260624-portrait-1") center / cover;
}

.loginBox {
  background: rgba(255, 253, 251, 0.9);
  backdrop-filter: blur(18px);
}

.adminLogin .loginBox {
  color: var(--ink);
}

.adminLogin .loginBox h1 {
  color: var(--ink);
}

.adminLogin .loginBox p {
  color: var(--muted);
}

.adminLogin .loginBox label {
  color: #34283f;
  font-weight: 720;
}

.adminLogin .loginBox input {
  background: #ffffff;
  border-color: rgba(31, 23, 38, 0.26);
  color: var(--ink);
  caret-color: var(--violet);
}

.adminLogin .loginBox input::placeholder {
  color: rgba(31, 23, 38, 0.42);
}

.adminLogin .loginBox input:focus {
  background: #ffffff;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.adminWorkspace {
  max-width: 1320px;
  margin: 0 auto;
}

.adminSide,
.adminMain {
  background: rgba(255, 253, 251, 0.9);
}

.adminNav button.active,
.promptTab.active,
.wizardMode .active,
.wizardSteps button.active {
  background: rgba(22, 112, 95, 0.1);
  border-color: rgba(22, 112, 95, 0.28);
  color: var(--sage);
}

@media (max-width: 980px) {
  .heroBand {
    min-height: 76dvh;
    padding: 78px 22px 74px;
  }

  .heroCopy {
    margin-left: 0;
  }

  .outcomeStrip {
    width: calc(100% - 40px);
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .chatHeader {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .siteNav {
    background: rgba(255, 253, 251, 0.88);
  }

  .heroBand {
    min-height: 78dvh;
    padding: 48px 18px 108px;
  }

  .heroBand::before {
    background:
      linear-gradient(180deg, rgba(18, 14, 20, 0.12) 0%, rgba(18, 14, 20, 0.32) 34%, rgba(18, 14, 20, 0.86) 100%);
  }

  .heroCopy h1 {
    font-size: 52px;
  }

  .heroText {
    font-size: 16px;
  }

  .heroSignal.bottom {
    bottom: 20px;
  }

  .outcomeStrip {
    margin-top: -18px;
  }

  .composerHints {
    display: none;
  }
}

/* Emma reference-inspired v2 */
.heroPortraitStack {
  display: none;
}

.themeChooser {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.themeOption {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 251, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.themeOption:hover,
.themeOption.active {
  border-color: rgba(22, 112, 95, 0.42);
  box-shadow: 0 14px 34px rgba(27, 20, 32, 0.1);
}

.themeOption.active {
  background: rgba(22, 112, 95, 0.08);
}

.themeOptionCopy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.themeOptionCopy b,
.themeOptionCopy small {
  overflow-wrap: anywhere;
}

.themeOptionCopy b {
  font-size: 13px;
  color: var(--ink);
}

.themeOptionCopy small {
  color: var(--muted);
  line-height: 1.35;
}

.themeSwatch {
  height: 78px;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  align-content: end;
  gap: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.themeSwatch i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.themeSwatch i:nth-child(1) {
  width: 62%;
}

.themeSwatch i:nth-child(2) {
  width: 86%;
}

.themeSwatch i:nth-child(3) {
  width: 46%;
}

.themeSwatch[data-theme="whisper"] {
  background:
    linear-gradient(135deg, #1e1c30 0%, #4c3471 52%, #ee8f3a 100%),
    #1e1c30;
}

.themeSwatch[data-theme="studio"] {
  background:
    linear-gradient(135deg, #eef4f2 0%, #ffffff 48%, #2d6cdf 100%),
    #f7f9fb;
}

.themeSwatch[data-theme="midnight"] {
  background:
    linear-gradient(135deg, #111215 0%, #242130 50%, #8b7cf6 100%),
    #111215;
}

.themeSwatch[data-theme="story"] {
  background:
    linear-gradient(135deg, #f4e8de 0%, #fff9f3 42%, #c14e69 100%),
    #f6f1ec;
}

body.theme-whisper {
  color-scheme: dark;
  --bg: #1d1b2c;
  --paper: rgba(255, 255, 255, 0.08);
  --paper-strong: rgba(255, 255, 255, 0.12);
  --soft: rgba(255, 255, 255, 0.07);
  --soft-2: #242136;
  --ink: #fffaf6;
  --muted: #cfc6d8;
  --line: rgba(255, 255, 255, 0.16);
  --violet: #c055f0;
  --violet-dark: #e875d2;
  --rose: #ff76ad;
  --sage: #7bd0bb;
  --amber: #f0a23c;
  --shadow: 0 28px 76px rgba(0, 0, 0, 0.32);
  background:
    linear-gradient(115deg, rgba(78, 56, 119, 0.5) 0%, rgba(78, 56, 119, 0) 42%),
    linear-gradient(245deg, rgba(238, 143, 58, 0.24) 0%, rgba(238, 143, 58, 0) 46%),
    #1d1b2c;
}

body.theme-whisper .landingApp {
  background:
    linear-gradient(180deg, #202033 0%, #1d1b2c 64%, #181724 100%);
  color: #fffaf6;
}

body.theme-whisper .siteNav {
  background: rgba(23, 22, 37, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #fffaf6;
}

body.theme-whisper .tagline,
body.theme-whisper .siteNav .tagline {
  color: rgba(255, 250, 246, 0.64);
}

body.theme-whisper .mark {
  background: linear-gradient(135deg, #fffaf6 0%, #f3c7ff 45%, #f0a23c 100%);
  color: #1d1b2c;
  box-shadow: 0 16px 38px rgba(192, 85, 240, 0.18);
}

body.theme-whisper .navLink,
body.theme-whisper .ghostButton,
body.theme-whisper .ghostLink,
body.theme-whisper .secondaryButton,
body.theme-whisper .iconButton {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fffaf6;
}

body.theme-whisper .navLink:hover,
body.theme-whisper .ghostButton:hover,
body.theme-whisper .ghostLink:hover,
body.theme-whisper .secondaryButton:hover {
  border-color: rgba(255, 118, 173, 0.42);
  color: #ffd6e4;
}

body.theme-whisper .primaryButton,
body.theme-whisper #sendButton {
  background: linear-gradient(90deg, #b655ee 0%, #f06aa5 56%, #f0a23c 100%);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(192, 85, 240, 0.24);
}

body.theme-whisper .primaryButton:hover,
body.theme-whisper #sendButton:hover {
  filter: brightness(1.08);
}

body.theme-whisper .heroBand {
  min-height: min(820px, calc(100dvh - 92px));
  place-items: center;
  align-items: center;
  padding: 92px 28px 116px;
  background:
    linear-gradient(120deg, rgba(79, 52, 119, 0.56) 0%, rgba(79, 52, 119, 0) 46%),
    linear-gradient(250deg, rgba(240, 162, 60, 0.22) 0%, rgba(240, 162, 60, 0) 46%),
    #1d1b2c;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-whisper .heroBg {
  inset: 0;
  width: 100%;
  opacity: 0.12;
  filter: saturate(0.82) contrast(1.08);
  object-position: center 24%;
}

body.theme-whisper .heroBand::before {
  background:
    linear-gradient(180deg, rgba(29, 27, 44, 0.18) 0%, rgba(29, 27, 44, 0.34) 44%, rgba(29, 27, 44, 0.82) 100%),
    linear-gradient(90deg, rgba(29, 27, 44, 0.98) 0%, rgba(29, 27, 44, 0.58) 48%, rgba(29, 27, 44, 0.9) 100%);
}

body.theme-whisper .heroCopy {
  width: min(1040px, 100%);
  margin: 0 auto;
  text-align: center;
  color: #fffaf6;
  text-shadow: none;
}

body.theme-whisper .heroPortraitStack {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  margin-bottom: 34px;
}

body.theme-whisper .portraitRing {
  width: clamp(86px, 10vw, 138px);
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #8f54db, #ff76ad);
  box-shadow: 0 22px 54px rgba(192, 85, 240, 0.24);
}

body.theme-whisper .portraitRing.main {
  width: clamp(118px, 13vw, 178px);
  background: linear-gradient(135deg, #fffaf6, #ff76ad 44%, #f0a23c 100%);
  box-shadow: 0 26px 72px rgba(255, 118, 173, 0.22);
}

body.theme-whisper .portraitRing.warm {
  background: linear-gradient(135deg, #f0a23c, #7bd0bb);
}

body.theme-whisper .portraitRing img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: 52% 26%;
  border: 1px solid rgba(29, 27, 44, 0.72);
}

body.theme-whisper .heroCopy .eyebrow {
  color: rgba(255, 250, 246, 0.7);
  text-transform: none;
  font-size: 15px;
  font-weight: 680;
}

body.theme-whisper .heroCopy h1 {
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 10.5vw, 152px);
  font-weight: 760;
  line-height: 0.82;
  letter-spacing: 0;
  background: linear-gradient(90deg, #fffaf6 0%, #fffaf6 44%, #d569ef 58%, #ff76ad 74%, #f0a23c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.theme-whisper .heroText {
  width: min(620px, 100%);
  margin: 34px auto 0;
  color: rgba(255, 250, 246, 0.72);
  font-size: 20px;
  line-height: 1.48;
}

body.theme-whisper .heroActions {
  justify-content: center;
  margin-top: 34px;
}

body.theme-whisper .heroActions .primaryButton {
  min-width: 244px;
}

body.theme-whisper .heroActions .secondaryButton {
  background: rgba(255, 255, 255, 0.07);
}

body.theme-whisper .heroSignal {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
  color: rgba(255, 250, 246, 0.74);
  box-shadow: none;
}

body.theme-whisper .heroSignal.top {
  top: auto;
  left: clamp(24px, 12vw, 240px);
  right: auto;
  bottom: 34px;
}

body.theme-whisper .heroSignal.bottom {
  right: clamp(24px, 10vw, 220px);
  bottom: 34px;
  color: rgba(255, 250, 246, 0.74);
}

body.theme-whisper .outcomeStrip {
  margin-top: -52px;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.22);
}

body.theme-whisper .outcomeStrip div {
  background: rgba(255, 255, 255, 0.07);
  color: #fffaf6;
  backdrop-filter: blur(18px);
}

body.theme-whisper .outcomeStrip span {
  color: rgba(255, 250, 246, 0.68);
}

body.theme-whisper .previewBand {
  background:
    linear-gradient(180deg, #201e31 0%, #262238 44%, #f7f4f1 100%);
  color: #fffaf6;
}

body.theme-whisper .previewCopy p {
  color: rgba(255, 250, 246, 0.72);
}

body.theme-whisper .featureGrid article,
body.theme-whisper .chatPreview {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fffaf6;
}

body.theme-whisper .previewBubble.assistant {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fffaf6;
}

body.theme-whisper .previewMetrics span {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 250, 246, 0.72);
}

body.theme-whisper .featureGrid span {
  color: rgba(255, 250, 246, 0.68);
}

body.theme-whisper .stepsBand {
  background: #eef3f1;
  color: #17141a;
}

body.theme-whisper .stepsBand .eyebrow {
  color: #8d4e1d;
}

body.theme-whisper .stepsBand p {
  color: #5c6460;
}

body.theme-whisper .steps article {
  background: rgba(255, 253, 251, 0.92);
}

body.theme-whisper .finalBand {
  background:
    linear-gradient(120deg, #181724 0%, #241e34 58%, #161521 100%);
}

body.theme-whisper .chatShell {
  background:
    linear-gradient(115deg, rgba(79, 52, 119, 0.46) 0%, rgba(79, 52, 119, 0) 44%),
    linear-gradient(250deg, rgba(240, 162, 60, 0.18) 0%, rgba(240, 162, 60, 0) 46%),
    #1d1b2c;
  color: #fffaf6;
}

body.theme-whisper .leftPane {
  background: rgba(24, 22, 37, 0.82);
  border-right-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

body.theme-whisper .portraitPanel,
body.theme-whisper .clarityPanel {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

body.theme-whisper .portraitCaption {
  background: rgba(24, 22, 37, 0.72);
  color: #fffaf6;
}

body.theme-whisper .portraitCaption span,
body.theme-whisper .meterTop,
body.theme-whisper .nextStep,
body.theme-whisper .nextStep p {
  color: rgba(255, 250, 246, 0.68);
}

body.theme-whisper .track {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-whisper .chatPane {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(41, 34, 62, 0.9) 0%, rgba(29, 27, 44, 0.94) 54%, rgba(24, 22, 37, 0.98) 100%);
}

body.theme-whisper .chatPane::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(29, 27, 44, 0.98) 0%, rgba(29, 27, 44, 0.84) 46%, rgba(29, 27, 44, 0.7) 100%),
    url("/assets/emma.jpg?v=20260624-portrait-1") center / cover no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

body.theme-whisper .chatPane > * {
  position: relative;
  z-index: 1;
}

body.theme-whisper .chatHeader {
  background: rgba(24, 22, 37, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-whisper .chatHeader p {
  color: rgba(255, 250, 246, 0.64);
}

body.theme-whisper .mobileStatus {
  background: rgba(24, 22, 37, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-whisper .mobileStatus span {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 250, 246, 0.72);
}

body.theme-whisper .messages {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 34px 28px 24px;
}

body.theme-whisper .message {
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

body.theme-whisper .message.assistant {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fffaf6;
  backdrop-filter: blur(18px);
}

body.theme-whisper .message.assistant:first-child {
  max-width: min(520px, 92%);
  font-size: 18px;
}

body.theme-whisper .message.user {
  background: linear-gradient(90deg, #b655ee 0%, #f06aa5 100%);
  color: #ffffff;
}

body.theme-whisper .composer {
  width: min(940px, calc(100% - 56px));
  margin: 0 auto 24px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(22px);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.22);
}

body.theme-whisper textarea,
body.theme-whisper input,
body.theme-whisper select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fffaf6;
}

body.theme-whisper textarea::placeholder,
body.theme-whisper input::placeholder {
  color: rgba(255, 250, 246, 0.52);
}

body.theme-whisper .composerHints button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 250, 246, 0.68);
}

body.theme-whisper .composerHints button:hover {
  border-color: rgba(255, 118, 173, 0.42);
  color: #ffd6e4;
}

.composerTools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.toolButton {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}

.toolButton:hover,
.toolButton.active {
  border-color: rgba(124, 58, 237, 0.45);
  color: var(--violet-dark);
}

#composerStatus {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imageMessage {
  display: grid;
  gap: 8px;
}

.imageMessage img,
.generatedImageMessage img {
  display: block;
  width: min(260px, 100%);
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.imageGroupGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: min(320px, 100%);
}

.imageGroupGrid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: none;
}

.generatedImageMessage {
  display: grid;
  gap: 8px;
}

.generatedImageMessage span {
  color: var(--muted);
  font-size: 12px;
}

body.theme-whisper .toolButton {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 250, 246, 0.84);
}

body.theme-whisper .toolButton:hover,
body.theme-whisper .toolButton.active {
  border-color: rgba(255, 118, 173, 0.42);
  color: #ffd6e4;
}

body.theme-whisper #composerStatus {
  color: rgba(255, 250, 246, 0.62);
}

body.theme-whisper .adminShell {
  background:
    linear-gradient(115deg, rgba(79, 52, 119, 0.4) 0%, rgba(79, 52, 119, 0) 44%),
    linear-gradient(250deg, rgba(240, 162, 60, 0.16) 0%, rgba(240, 162, 60, 0) 48%),
    #1d1b2c;
  color: #fffaf6;
}

body.theme-whisper .adminTopbar,
body.theme-whisper .adminSide,
body.theme-whisper .adminMain,
body.theme-whisper .loginBox,
body.theme-whisper .connectionBox,
body.theme-whisper .contentPackage,
body.theme-whisper .contentSlide,
body.theme-whisper .wizardCanvas,
body.theme-whisper .previewPersonaTop,
body.theme-whisper .previewPersonaGrid div,
body.theme-whisper .previewPersonaColumns section,
body.theme-whisper .questCard,
body.theme-whisper .emptyState,
body.theme-whisper .imageResult,
body.theme-whisper dialog,
body.theme-whisper .memoryBlock {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fffaf6;
  backdrop-filter: blur(18px);
}

body.theme-whisper .adminTopbar {
  background: rgba(24, 22, 37, 0.76);
}

body.theme-whisper .adminHero,
body.theme-whisper .dialogHeader {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-whisper .adminHero p,
body.theme-whisper .loginBox p,
body.theme-whisper .connectionBox p,
body.theme-whisper .adminForm label,
body.theme-whisper .promptEditor label,
body.theme-whisper .previewPersonaGrid span,
body.theme-whisper .personaPreview p,
body.theme-whisper .previewPersonaColumns li,
body.theme-whisper .questCard p,
body.theme-whisper .questCard span,
body.theme-whisper .integrationItem span,
body.theme-whisper .contentPackage p,
body.theme-whisper .contentPackage small,
body.theme-whisper .contentPackage figcaption,
body.theme-whisper .contentSlide span,
body.theme-whisper .emptyState,
body.theme-whisper #promptSaveStatus {
  color: rgba(255, 250, 246, 0.66);
}

body.theme-whisper .adminLogin .loginBox {
  background: #fffaf6;
  border-color: rgba(29, 27, 44, 0.16);
  color: #1f1726;
  box-shadow: 0 28px 80px rgba(5, 3, 18, 0.34);
  backdrop-filter: none;
}

body.theme-whisper .adminLogin .loginBox h1 {
  color: #1f1726;
}

body.theme-whisper .adminLogin .loginBox p {
  color: #63586d;
}

body.theme-whisper .adminLogin .loginBox label {
  color: #34283f;
  font-weight: 720;
}

body.theme-whisper .adminLogin .loginBox input {
  background: #ffffff;
  border-color: rgba(31, 23, 38, 0.26);
  color: #1f1726;
  caret-color: #7c3aed;
  -webkit-text-fill-color: #1f1726;
}

body.theme-whisper .adminLogin .loginBox input::placeholder {
  color: rgba(31, 23, 38, 0.42);
}

body.theme-whisper .adminLogin .loginBox input:focus {
  background: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

body.theme-whisper .adminLogin .loginBox input:-webkit-autofill,
body.theme-whisper .adminLogin .loginBox input:-webkit-autofill:hover,
body.theme-whisper .adminLogin .loginBox input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #1f1726;
}

body.theme-whisper .adminLogin .formError {
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
}

body.theme-whisper .adminSectionTitle {
  color: rgba(255, 250, 246, 0.48);
}

body.theme-whisper .adminNav button,
body.theme-whisper .promptTab,
body.theme-whisper .wizardSteps button,
body.theme-whisper .switchLine,
body.theme-whisper .integrationItem {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.13);
  color: #fffaf6 !important;
}

body.theme-whisper .adminNav button.active,
body.theme-whisper .promptTab.active,
body.theme-whisper .wizardMode .active,
body.theme-whisper .wizardSteps button.active,
body.theme-whisper .themeOption.active {
  background: rgba(123, 208, 187, 0.12);
  border-color: rgba(123, 208, 187, 0.38);
  color: #bff5e7 !important;
}

body.theme-whisper .themeOption {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fffaf6;
}

body.theme-whisper .themeOption:hover {
  border-color: rgba(255, 118, 173, 0.42);
}

body.theme-whisper .themeOptionCopy b {
  color: #fffaf6;
}

body.theme-whisper .themeOptionCopy small {
  color: rgba(255, 250, 246, 0.62);
}

body.theme-whisper .formError {
  color: #ff9ab7;
}

@media (max-width: 980px) {
  .themeChooser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.theme-whisper .heroBand {
    min-height: 74dvh;
    padding: 72px 22px 118px;
  }

  body.theme-whisper .heroSignal.top,
  body.theme-whisper .heroSignal.bottom {
    left: 22px;
    right: 22px;
    max-width: none;
  }

  body.theme-whisper .heroSignal.top {
    display: none;
  }
}

@media (max-width: 640px) {
  .themeChooser {
    grid-template-columns: 1fr;
  }

  .themeOption {
    min-height: 96px;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.theme-whisper .heroBand {
    min-height: 78dvh;
    padding: 54px 18px 116px;
  }

  body.theme-whisper .heroCopy h1 {
    font-size: clamp(48px, 14.5vw, 66px);
  }

  body.theme-whisper .heroText {
    margin-top: 24px;
    font-size: 16px;
  }

  body.theme-whisper .heroPortraitStack {
    gap: 8px;
    margin-bottom: 24px;
  }

  body.theme-whisper .portraitRing.side {
    width: 72px;
  }

  body.theme-whisper .portraitRing.main {
    width: 96px;
  }

  body.theme-whisper .outcomeStrip {
    margin-top: -36px;
  }

  body.theme-whisper .chatPane::before {
    background:
      linear-gradient(180deg, rgba(29, 27, 44, 0.88) 0%, rgba(29, 27, 44, 0.96) 100%),
      url("/assets/emma.jpg?v=20260624-portrait-1") center 16% / 100% auto no-repeat;
  }

  body.theme-whisper .messages {
    padding: 18px 16px 16px;
  }

  body.theme-whisper .composer {
    width: calc(100% - 28px);
    margin-bottom: 14px;
  }
}

/* Telegram-style input bar */
.composer {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.composerBar {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 46px;
  align-items: end;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(23, 19, 27, 0.06);
}

.composer.isRecording .composerBar {
  border-color: rgba(220, 75, 115, 0.48);
  box-shadow: 0 0 0 3px rgba(220, 75, 115, 0.12);
}

.attachButton,
.composerActionButton {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.attachButton {
  align-self: end;
  background: transparent;
  color: var(--muted);
}

.attachButton:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--violet-dark);
}

.attachButton svg,
.composerActionButton svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#messageInput {
  align-self: end;
  min-height: 42px;
  max-height: 156px;
  padding: 10px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.4;
  overflow-y: auto;
}

#messageInput:focus {
  border-color: transparent;
  box-shadow: none;
}

.composerActionButton#sendButton {
  align-self: end;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--violet);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.2);
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.composerActionButton#sendButton:hover {
  background: var(--violet-dark);
  transform: translateY(-1px);
}

.composerActionButton#sendButton.is-mic {
  background: rgba(23, 19, 27, 0.92);
  box-shadow: 0 10px 22px rgba(23, 19, 27, 0.16);
}

.composerActionButton#sendButton.is-recording {
  background: var(--rose);
  animation: recordPulse 1.1s ease-in-out infinite;
}

.composerActionButton .actionIconSend,
.composerActionButton .actionIconMic,
.composerActionButton .actionBusy {
  display: none;
}

.composerActionButton.is-send .actionIconSend,
.composerActionButton.is-mic .actionIconMic,
.composerActionButton.is-recording .actionIconMic {
  display: block;
}

.composerActionButton.is-busy .actionIconSend,
.composerActionButton.is-busy .actionIconMic {
  display: none;
}

.composerActionButton.is-busy .actionBusy {
  width: 18px;
  height: 18px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spinAction 0.72s linear infinite;
}

.recordingPill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(220, 75, 115, 0.28);
  border-radius: 999px;
  background: rgba(220, 75, 115, 0.1);
  color: var(--rose);
  font-size: 12px;
  font-weight: 760;
}

.recordDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  animation: recordBlink 1s ease-in-out infinite;
}

#recordingTimer {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#composerStatus {
  min-height: 16px;
  padding: 0 8px;
}

.fileMessage {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.fileMessageIcon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.fileMessageBody {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.fileMessageBody b,
.fileMessageBody small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fileMessageBody small {
  opacity: 0.82;
}

.voiceMessage {
  min-width: min(320px, 88%);
  display: grid;
  gap: 9px;
}

.voiceMessageHeader {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.voiceMessageIcon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.voiceMessageIcon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voiceMessageMeta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.voiceMessageMeta b,
.voiceMessageMeta small,
.voiceTranscript {
  min-width: 0;
  overflow-wrap: anywhere;
}

.voiceMessageMeta small,
.voiceTranscript {
  opacity: 0.82;
}

.voiceMessage audio {
  width: 100%;
  min-width: 220px;
  height: 36px;
  display: block;
}

.voiceTranscript {
  padding-top: 1px;
  line-height: 1.45;
}

.homeGreeting {
  margin: 0 0 2px;
  color: var(--violet-dark);
  font-size: 13px;
  font-weight: 850;
}

.mobileHomePanel {
  grid-row: 2;
  display: none;
  gap: 14px;
  padding: 10px 16px 14px;
}

.emmaHeroCard,
.thoughtCard {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(24, 16, 42, 0.22);
}

.emmaHeroCard {
  min-height: 132px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(145, 66, 232, 0.94) 0%, rgba(188, 74, 215, 0.9) 46%, rgba(65, 46, 154, 0.94) 100%),
    url("/assets/emma.jpg?v=20260624-portrait-1") center / cover;
  color: #fffaf6;
  overflow: hidden;
}

.emmaHeroCard img {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 28px rgba(24, 16, 42, 0.3);
}

.emmaHeroCard h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 23px;
  line-height: 1.05;
}

.emmaHeroCard p {
  margin: 5px 0 12px;
  color: rgba(255, 250, 246, 0.8);
  font-size: 13px;
}

.sparkleStatus {
  color: #ffd9ff;
  filter: drop-shadow(0 0 8px rgba(255, 217, 255, 0.8));
  animation: sparklePulse 1.35s ease-in-out infinite;
}

.continueChatButton,
.textLinkButton {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.continueChatButton {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fffaf6;
  font-weight: 850;
}

.thoughtCard {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.thoughtIcon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7, #f05ea8);
  color: #fffaf6;
}

.thoughtCard b {
  display: block;
  margin-bottom: 5px;
}

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

.textLinkButton {
  margin-top: 10px;
  padding: 0;
  color: var(--violet-dark);
  font-size: 13px;
  font-weight: 850;
}

.thoughtActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.thoughtActions .textLinkButton {
  margin-top: 10px;
}

.appTabbar {
  display: none;
}

.appTabbar button,
.appTabbar a {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-size: 18px;
  font-weight: 850;
  cursor: pointer;
}

.appTabbar span {
  font-size: 11px;
  line-height: 1;
}

.appTabbar .active {
  background: rgba(168, 85, 247, 0.14);
  color: var(--violet-dark);
}

@media (max-width: 980px) {
  .mobileHomePanel {
    display: grid;
  }

  .chatHeader {
    border-bottom: 0;
  }

  .headerActions {
    display: none;
  }

  .message,
  .clarityPanel,
  .followupBar,
  .composerBar,
  .memoryBlock,
  dialog,
  .loginBox {
    border-radius: 22px;
  }

  .appTabbar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 30;
    min-height: 66px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 48px rgba(24, 16, 42, 0.24);
    backdrop-filter: blur(18px);
  }

  .composer {
    margin: 0 14px calc(88px + env(safe-area-inset-bottom));
    padding: 10px 0 8px;
    border-top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  body.theme-whisper .composer,
  body.theme-midnight .composer {
    width: auto;
    margin: 0 14px calc(88px + env(safe-area-inset-bottom));
    padding: 10px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }
}

body.theme-whisper .homeGreeting,
body.theme-midnight .homeGreeting {
  color: #d9b8ff;
}

body.theme-whisper .thoughtCard,
body.theme-midnight .thoughtCard {
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf6;
}

body.theme-whisper .thoughtCard p,
body.theme-midnight .thoughtCard p {
  color: rgba(255, 250, 246, 0.72);
}

body.theme-whisper .appTabbar,
body.theme-midnight .appTabbar {
  background: rgba(32, 27, 47, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-whisper .composerBar {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}

body.theme-whisper #messageInput {
  background: transparent;
  color: #fffaf6;
}

body.theme-whisper .attachButton {
  color: rgba(255, 250, 246, 0.7);
}

body.theme-whisper .attachButton:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffd6e4;
}

body.theme-whisper .composerActionButton#sendButton {
  background: linear-gradient(135deg, #b655ee 0%, #f06aa5 100%);
  box-shadow: 0 12px 26px rgba(240, 106, 165, 0.24);
}

body.theme-whisper .composerActionButton#sendButton.is-mic {
  background: rgba(255, 255, 255, 0.16);
  color: #fffaf6;
}

body.theme-whisper #recordingTimer {
  color: #fffaf6;
}

body.theme-midnight .chatShell {
  background:
    linear-gradient(115deg, rgba(67, 51, 101, 0.22) 0%, rgba(67, 51, 101, 0) 46%),
    #111215;
  color: #f4f0ea;
}

body.theme-midnight .chatPane {
  background:
    linear-gradient(180deg, rgba(17, 18, 21, 0.94) 0%, rgba(20, 22, 28, 0.98) 100%);
  color: #f4f0ea;
}

body.theme-midnight .chatHeader {
  background: rgba(17, 18, 21, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-midnight .homeGreeting,
body.theme-midnight #homeGreetingTitle,
body.theme-midnight .thoughtCard b {
  color: #f4f0ea;
}

body.theme-midnight .thoughtCard {
  background: rgba(31, 34, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f4f0ea;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body.theme-midnight .thoughtCard p {
  color: #c9c2d3;
}

body.theme-midnight .textLinkButton {
  color: #d9b8ff;
}

body.theme-midnight .mobileStatus {
  background: rgba(17, 18, 21, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-midnight .mobileStatus span {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d9d2de;
}

body.theme-midnight .composerBar {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(244, 240, 234, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

body.theme-midnight #messageInput {
  background: transparent;
  color: #f4f0ea;
}

body.theme-midnight #messageInput::placeholder {
  color: #b8b0bf;
}

body.theme-midnight .attachButton {
  color: #c9c2d3;
}

body.theme-midnight .composerActionButton#sendButton.is-mic {
  background: rgba(255, 255, 255, 0.14);
  color: #f4f0ea;
}

@keyframes sparklePulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.18) rotate(12deg);
  }
}

@keyframes recordPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 75, 115, 0.28);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(220, 75, 115, 0);
  }
}

@keyframes recordBlink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

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

@media (max-width: 640px) {
  .composer {
    gap: 7px;
    padding: 10px 0 8px;
  }

  .composerBar {
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    min-height: 50px;
  }

  .attachButton,
  .composerActionButton {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
}
