:root {
  --ink: #151b2c;
  --nocturne: #222a43;
  --porcelain: #edf1f8;
  --paper: #f8f9fc;
  --iris: #7568ee;
  --coral: #ff7d78;
  --sage: #8ed9b5;
  --muted: #747d95;
  --line: #d9dfeb;
  --shadow: 0 24px 64px rgba(22, 29, 48, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--iris), white 25%);
  outline-offset: 3px;
}

.cache-sync {
  border: 1px solid rgba(142, 217, 181, .55);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(142, 217, 181, .1);
  color: var(--sage);
  cursor: pointer;
  font: 700 10px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cache-sync:hover:not(:disabled) { background: rgba(142, 217, 181, .2); }
.cache-sync:disabled { cursor: progress; opacity: .65; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 42px 24px; overflow: hidden; position: relative; background: var(--ink); }
.login-bloom { top: 50%; right: -10vw; transform: translateY(-50%); opacity: .9; }
.login-card { position: relative; z-index: 1; width: min(464px, 100%); padding: 48px; color: white; background: linear-gradient(145deg, rgba(34,42,67,.96), rgba(21,27,44,.9)); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 32px 100px rgba(0,0,0,.32); }
.login-card .eyebrow { margin-bottom: 30px; }.login-card h1 { font-size: clamp(64px, 12vw, 94px); }.login-rule { width: 44px; height: 2px; margin: 34px 0 20px; background: var(--coral); }.login-intro { max-width: 310px; margin: 0; color: #c7cede; font-size: 16px; line-height: 1.65; }
.login-card form { display:grid; gap:17px; margin-top:34px; }.login-card label { display:grid; gap:8px; color:var(--sage); font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing:.12em; text-transform:uppercase; }.login-card input { padding:13px 0; border:0; border-bottom:1px solid rgba(255,255,255,.28); outline:0; background:transparent; color:white; font-size:16px; }.login-card input:focus { border-color:var(--sage); }.login-card input::placeholder { color:rgba(199,206,222,.5); }.login-card button { display:flex; justify-content:space-between; align-items:center; margin-top:10px; padding:14px 17px; border:0; background:var(--coral); color:var(--ink); cursor:pointer; font-weight:800; }.login-card button:hover { background:#ff9995; }.login-card button i { font-style:normal; font-size:18px; }#login-error { min-height:1.2em; margin:0; color:#ffaaa6; font-size:13px; }.login-help { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:26px; padding-top:18px; border-top:1px solid rgba(255,255,255,.14); color:#c7cede; font-size:12px; text-decoration:none; }.login-help:hover { color:var(--sage); }.login-help span { color:var(--sage); font-size:18px; }
@media (max-width: 560px) { .login-page { padding: 20px; align-items: end; }.login-card { padding: 32px 26px; }.login-bloom { top: 12%; right: -44vw; transform:none; opacity:.5; } }

.masthead {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: white;
  isolation: isolate;
}

.masthead::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
}

.masthead__inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 78px 0 64px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--sage);
  font: 600 12px/1.3 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: clamp(72px, 10vw, 142px);
  font-weight: 400;
  line-height: .76;
  letter-spacing: -.065em;
}

h1 em {
  color: var(--coral);
  font-weight: 400;
}

.intro {
  width: min(490px, 100%);
  margin: 44px 0 0;
  color: #c7cede;
  font-size: 17px;
  line-height: 1.7;
}

.counts {
  display: flex;
  flex-wrap: wrap;
  column-gap: 40px;
  row-gap: 18px;
  margin: 44px 0 0;
}

.counts div { display: grid; gap: 3px; }
.counts dt { font: 500 28px/1 "Iowan Old Style", Georgia, serif; color: white; }
.counts dd { margin: 0; color: #929bb2; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.counts__carousel-start { padding-left: 27px; border-left: 1px solid rgba(255,255,255,.22); }

.workspace-links { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 0; }
.workspace-links a { padding: 10px 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: white; background: rgba(255,255,255,.07); font-size: 11px; font-weight: 700; text-decoration: none; }
.workspace-links a:hover { border-color: var(--sage); color: var(--sage); }
.generator-control { display:flex; align-items:center; gap:9px; padding:4px 4px 4px 12px; border:1px solid rgba(255,255,255,.16); border-radius:999px; background:rgba(255,255,255,.07); color:#c7cede; font:700 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing:.035em; }
.generator-status::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:#929bb2; box-shadow:0 0 0 3px rgba(146,155,178,.13); vertical-align:baseline; }
.generator-control.is-running { border-color:rgba(142,217,181,.55); color:#d9f7e9; }.generator-control.is-running .generator-status::before { background:var(--sage); box-shadow:0 0 0 3px rgba(142,217,181,.16); animation:generator-pulse 1.5s ease-in-out infinite; }
.generator-control.is-stopping { border-color:rgba(255,125,120,.55); color:#ffe0de; }.generator-control.is-stopping .generator-status::before { background:var(--coral); box-shadow:0 0 0 3px rgba(255,125,120,.14); }
.generator-control button { border:0; border-radius:999px; padding:7px 11px; background:var(--sage); color:#173427; cursor:pointer; font:800 10px/1 "Avenir Next", Avenir, sans-serif; }.generator-control.is-running button { background:#ffebe9; color:#9a373d; }.generator-control button:hover:not(:disabled) { filter:brightness(1.05); }.generator-control button:disabled { cursor:wait; opacity:.6; }
@keyframes generator-pulse { 50% { box-shadow:0 0 0 6px rgba(142,217,181,0); } }

.settings-page { min-height:100vh; background:var(--porcelain); }.settings-shell { width:min(760px,calc(100% - 48px)); margin:0 auto; padding:64px 0 100px; }.settings-shell h1 { color:var(--ink); font-size:clamp(64px,10vw,112px); }.settings-back { color:var(--iris); font-weight:700; text-decoration:none; }.settings-intro { max-width:460px; font-size:17px; line-height:1.6; }.token-form { display:grid; gap:14px; padding:28px; margin:36px 0; background:white; box-shadow:var(--shadow); }.token-form label { display:grid; gap:7px; font-weight:700; }.token-form input[type="text"],.token-form input:not([type]) { padding:11px; border:1px solid var(--line); }.token-form button,.token-list button { justify-self:start; border:0; padding:11px 15px; background:var(--ink); color:white; font-weight:800; cursor:pointer; }.token-form button i { font-style:normal; margin-left:18px; }.token-list { display:grid; gap:1px; background:var(--line); }.token-list > div { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:16px; background:white; }.token-list span { display:block; color:var(--muted); font-size:13px; margin-top:4px; }#new-token { padding:18px; margin:22px 0; border-left:4px solid var(--sage); background:#eaf8f0; }#new-token code { display:block; overflow-wrap:anywhere; margin-top:8px; }

.faq-page { min-height:100vh; background:var(--porcelain); }.faq-hero { position:relative; overflow:hidden; padding:70px 0 90px; color:white; background:var(--ink); }.faq-hero__inner,.faq-shell { width:min(820px,calc(100% - 48px)); margin:0 auto; position:relative; z-index:1; }.faq-hero .eyebrow { margin-bottom:23px; }.faq-hero h1 { max-width:650px; font-size:clamp(58px,10vw,112px); }.faq-hero h1 em { display:block; margin-top:12px; }.faq-hero p:not(.eyebrow) { max-width:550px; margin:34px 0 0; color:#c7cede; font-size:17px; line-height:1.65; }.faq-nav { position:absolute; z-index:2; top:28px; right:calc((100% - min(820px,calc(100% - 48px)))/2); color:white; font-size:12px; font-weight:700; text-decoration:none; }.faq-nav:hover { color:var(--sage); }.faq-bloom { width:min(45vw,580px); top:44%; right:-14vw; opacity:.55; }.faq-shell { padding:54px 0 100px; }.faq-lede { margin:0 0 34px; color:var(--muted); font-size:15px; line-height:1.7; }.faq-list { display:grid; gap:12px; }.faq-list details { border:1px solid var(--line); background:white; box-shadow:0 10px 24px rgba(22,29,48,.045); }.faq-list summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:21px 23px; color:var(--ink); cursor:pointer; font:500 24px/1.1 "Iowan Old Style", Baskerville, Georgia, serif; list-style:none; }.faq-list summary::-webkit-details-marker { display:none; }.faq-list summary::after { content:"+"; color:var(--iris); font:400 28px/1 "Avenir Next", sans-serif; }.faq-list details[open] summary::after { content:"−"; }.faq-answer { padding:0 23px 24px; color:#4c566f; font-size:14px; line-height:1.7; }.faq-answer p:first-child { margin-top:0; }.faq-answer h3 { margin:22px 0 8px; color:var(--ink); font-size:12px; letter-spacing:.12em; text-transform:uppercase; }.faq-answer ol,.faq-answer ul { padding-left:20px; }.faq-answer li + li { margin-top:7px; }.faq-answer code { padding:2px 5px; border-radius:3px; background:#edf1f8; color:#313b58; font:12px/1.4 "SFMono-Regular", Consolas, monospace; }.faq-answer pre { overflow:auto; padding:14px; background:#1b2236; color:#e3e8f3; font:12px/1.6 "SFMono-Regular", Consolas, monospace; white-space:pre-wrap; }.faq-answer a { color:#6255d7; font-weight:700; }.faq-callout { padding:13px 15px; border-left:4px solid var(--sage); background:#eaf8f0; color:#315e4e; }.faq-footer { margin-top:36px; color:var(--muted); font-size:13px; }.faq-footer a { color:var(--iris); font-weight:700; }

.psyche-bloom {
  position: absolute;
  width: min(52vw, 720px);
  aspect-ratio: 1;
  right: -4vw;
  top: 50%;
  transform: translateY(-50%);
  opacity: .9;
  filter: saturate(1.15);
}

.psyche-bloom::before,
.psyche-bloom::after,
.psyche-bloom span::before,
.psyche-bloom span::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 80%;
  top: 10%;
  border-radius: 68% 32% 56% 44% / 42% 62% 38% 58%;
  background:
    radial-gradient(circle at 65% 32%, rgba(255,125,120,.95), transparent 28%),
    radial-gradient(circle at 54% 70%, rgba(117,104,238,.9), transparent 45%),
    linear-gradient(145deg, rgba(142,217,181,.5), rgba(117,104,238,.08));
  mix-blend-mode: screen;
  filter: blur(2px);
}

.psyche-bloom::before { left: 0; transform: rotate(-13deg); }
.psyche-bloom::after { right: 0; transform: scaleX(-1) rotate(-13deg); }
.psyche-bloom span::before { left: 10%; transform: scale(.72) rotate(24deg); opacity: .6; }
.psyche-bloom span::after { right: 10%; transform: scaleX(-1) scale(.72) rotate(24deg); opacity: .6; }

main {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 90px;
}

.sync-report {
  margin: 0 0 30px;
  border: 1px solid #c5d8ce;
  border-left: 5px solid var(--sage);
  background: linear-gradient(120deg, #f7fbf9, #fff);
  box-shadow: 0 14px 34px rgba(22, 29, 48, .07);
}
.sync-report.is-error { border-color: #e4b9b6; border-left-color: var(--coral); background: linear-gradient(120deg, #fff8f7, #fff); }
.sync-report__header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 20px 22px 0; }
.sync-report__eyebrow { margin: 0 0 7px; color: #4c856a; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .13em; text-transform: uppercase; }
.sync-report.is-error .sync-report__eyebrow { color: #b04d4a; }
.sync-report h2 { margin: 0; color: var(--ink); font: 500 29px/1 "Iowan Old Style", Georgia, serif; }
.sync-report__dismiss { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: white; color: var(--ink); cursor: pointer; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.sync-report__dismiss:hover { border-color: var(--ink); }
.sync-report__summary { margin: 17px 22px; color: #4c566f; font-size: 14px; line-height: 1.5; }
.sync-report__detail { max-height: min(48vh, 430px); margin: 0; padding: 17px 22px 19px; overflow: auto; border-top: 1px solid #dce6e1; background: rgba(21, 27, 44, .035); color: #2d3a55; font: 12px/1.6 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.sync-report.is-error .sync-report__detail { border-color: #efd6d4; background: rgba(255, 125, 120, .055); }

/* The creation switcher is set inside the workspace bounds, so it clearly
   introduces the card without trying to become part of its curved edge. */
.creation-tabs {
  position: relative;
  z-index: 4;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  width: min(760px, calc(100% - 56px));
  overflow: hidden;
  margin: -116px 28px 16px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 14px;
  background: rgba(21,27,44,.92);
  box-shadow: 0 10px 26px rgba(15,21,39,.14);
}
.creation-tab {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 84px;
  padding: 14px 20px 15px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.15);
  color: #b9c2d6;
  background: transparent;
  cursor: pointer;
  font: 700 15px/1.08 "Avenir Next", Avenir, sans-serif;
  letter-spacing: -.02em;
  text-align: left;
  transition: color .18s ease, background .18s ease;
}
.creation-tab:last-child { border-right: 0; }
.creation-tab__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #8995b1; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.creation-tab__state { display: none; padding: 4px 6px; border-radius: 999px; background: #e4f8ed; color: #21694b; font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.creation-tab em { color: inherit; font-family: "Iowan Old Style", Baskerville, Georgia, serif; font-size: 19px; font-weight: 400; }
.creation-tab[aria-selected="true"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 4px 0 var(--iris); }
.creation-tab[aria-selected="true"] .creation-tab__meta > span:first-child { color: var(--iris); }
.creation-tab[aria-selected="true"] .creation-tab__state { display: inline-flex; }
.creation-tab:hover:not([aria-selected="true"]), .creation-tab:focus-visible:not([aria-selected="true"]) { color: white; background: rgba(255,255,255,.08); }
.creation-tab:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--sage); outline-offset: -3px; }
.creation-workspace[hidden] { display: none; }
.creation-workspace--quote .entry-station { margin-top: 0; }
.creation-workspace--carousel .carousel-station { margin-top: 0; }

.station-toggle {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 3px 0 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.station-toggle__state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--iris);
  font: 700 9px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.station-toggle__state::after { content: "↗"; font: 400 15px/1 "Iowan Old Style", Baskerville, Georgia, serif; }
.station-toggle[aria-expanded="true"] .station-toggle__state::after { content: "−"; }
.station-toggle:focus-visible { outline: 3px solid var(--sage); outline-offset: 8px; }
.station-title,
.station-description { display: block; }
.station-toggle .entry-kicker { display: block; }
.entry-station.is-collapsed,
.carousel-station.is-collapsed {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 23px clamp(24px, 4vw, 38px);
}
.entry-station.is-collapsed .station-toggle,
.carousel-station.is-collapsed .station-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 0;
}
.entry-station.is-collapsed .station-description,
.carousel-station.is-collapsed .station-description { display: none; }
.entry-station.is-collapsed .entry-kicker,
.carousel-station.is-collapsed .entry-kicker { margin-bottom: 9px; }
.entry-station.is-collapsed .station-title { font-size: clamp(33px, 3.1vw, 46px); }
.carousel-station.is-collapsed .station-title { font-size: clamp(31px, 2.9vw, 42px); }
.carousel-station.is-collapsed::before { display: none; }
.entry-station.is-collapsed::before { opacity: .5; }

.entry-station {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(210px, .68fr) minmax(0, 1.7fr);
  gap: clamp(30px, 5vw, 72px);
  margin: -88px 0 42px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(21,27,44,.08);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(18,24,42,.18);
}

.entry-station::before {
  content: "";
  position: absolute;
  width: 245px;
  height: 245px;
  right: -88px;
  bottom: -126px;
  border: 48px solid rgba(117,104,238,.055);
  border-radius: 50%;
  pointer-events: none;
}

.entry-station::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--iris) 0 44%, var(--coral) 44% 74%, var(--sage) 74%);
}

.entry-station__intro { padding-top: 3px; }
.entry-kicker {
  margin: 0 0 17px;
  color: var(--iris);
  font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.entry-station .station-title {
  margin: 0;
  max-width: 280px;
  font: 400 clamp(42px, 4vw, 64px)/.92 "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -.055em;
}

.entry-station .station-description {
  margin: 23px 0 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.quote-entry-form { position: relative; z-index: 1; min-width: 0; }
.entry-field { display: grid; gap: 8px; min-width: 0; }
.entry-field label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .095em;
  text-transform: uppercase;
}
.entry-field label span { color: var(--muted); font-weight: 500; letter-spacing: .04em; text-transform: lowercase; }
.entry-field input,
.entry-field textarea,
.entry-field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #bfc7d8;
  border-radius: 0;
  padding: 11px 1px 12px;
  outline: none;
  background: transparent;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.entry-field input { font-size: 15px; }
.entry-field select { font-size: 15px; min-height: 39px; background: transparent; }
.entry-field textarea {
  min-height: 126px;
  resize: vertical;
  font: 400 clamp(24px, 2.2vw, 34px)/1.2 "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -.025em;
}
.entry-field input::placeholder,
.entry-field textarea::placeholder { color: #a2aabc; opacity: 1; }
.entry-field textarea::placeholder { color: #969fb3; }
.entry-field input:focus,
.entry-field textarea:focus {
  border-color: var(--iris);
  box-shadow: 0 2px 0 var(--iris);
}
.entry-field small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.entry-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 23px; }

.classification-details {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.classification-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .095em;
  list-style: none;
  text-transform: uppercase;
}
.classification-details summary::-webkit-details-marker { display: none; }
.classification-details summary span { color: var(--muted); font-size: 9px; font-weight: 500; }
.classification-details[open] summary span { color: var(--iris); }
.classification-details[open] .entry-meta { padding-bottom: 21px; }

.entry-actions { min-height: 54px; display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-top: 20px; }
.entry-status { color: var(--muted); font-size: 11px; line-height: 1.4; }
.entry-status.success { color: #287253; }
.entry-status.error { color: #bd3d48; }
.save-quote {
  min-width: 165px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px 13px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  box-shadow: 0 10px 24px rgba(21,27,44,.19);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.save-quote i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  font-style: normal;
  font-weight: 400;
}
.save-quote:hover { background: var(--iris); transform: translateY(-2px); }
.save-quote:disabled { opacity: .55; cursor: wait; transform: none; }

/* A carousel is not just another quote: its editor reads like a small storyboard.
   The numbered rail gives slide order real meaning while the rest stays quiet. */
.carousel-station {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, .58fr) minmax(0, 1.42fr);
  gap: clamp(30px, 5vw, 78px);
  margin: 30px 0 72px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid #cbd2ef;
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(117,104,238,.22), transparent 29%),
    linear-gradient(115deg, #f7f8ff, #eef1ff 54%, #fbfbfe);
}
.carousel-station::before {
  content: "01—10";
  position: absolute;
  right: 37px;
  bottom: -26px;
  color: rgba(84,73,185,.09);
  font: 700 clamp(60px, 10vw, 150px)/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: -.13em;
  pointer-events: none;
}
.carousel-station__toggle,
.carousel-entry-form { position: relative; z-index: 1; min-width: 0; }
.carousel-station .station-title,
.carousel-review h2,
.quote-review h2 {
  margin: 0;
  color: #27244d;
  font: 400 clamp(38px, 3.6vw, 57px)/.93 "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -.05em;
}
.carousel-station .station-title em { color: var(--iris); }
.carousel-station .station-description {
  max-width: 305px;
  margin: 21px 0 0;
  color: #59627d;
  font-size: 13px;
  line-height: 1.65;
}
.entry-field--caption textarea { min-height: 104px; font-size: clamp(20px, 1.8vw, 29px); }
.carousel-slides-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 27px 0 10px;
  padding-top: 18px;
  border-top: 1px solid #cbd2ef;
}
.carousel-slides-heading > div { display: grid; gap: 4px; }
.carousel-slides-heading span,
.carousel-background-choice legend {
  color: #403881;
  font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.carousel-slides-heading small { color: var(--muted); font-size: 10px; }
.carousel-slides-heading button,
.remove-carousel-slide {
  border: 1px solid #c6c3ef;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #494184;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.carousel-slides-heading button { padding: 8px 11px; white-space: nowrap; }
.carousel-slides-heading button span { margin-left: 4px; color: var(--iris); font-size: 15px; vertical-align: -1px; }
.carousel-slides-heading button:hover,
.remove-carousel-slide:hover { border-color: var(--iris); background: white; }
.carousel-slides-heading button:disabled { cursor: not-allowed; opacity: .45; }
.carousel-slide-fields { display: grid; gap: 9px; }
.carousel-slide-field {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(190,196,225,.72);
}
.carousel-slide-number {
  padding-top: 8px;
  color: var(--iris);
  font: 700 11px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .06em;
}
.carousel-slide-field > div { display: grid; gap: 6px; }
.carousel-slide-field label { color: #515971; font-size: 10px; font-weight: 700; letter-spacing: .085em; text-transform: uppercase; }
.carousel-slide-field textarea {
  width: 100%;
  min-height: 70px;
  padding: 0 0 7px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1.25 "Iowan Old Style", Baskerville, Georgia, serif;
}
.carousel-slide-field textarea::placeholder { color: #a0a7bc; }
.carousel-slide-field textarea:focus { border-color: var(--iris); }
.remove-carousel-slide { align-self: center; padding: 6px 8px; }
.carousel-background-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}
.carousel-background-choice legend { grid-column: 1 / -1; margin-bottom: 2px; }
.carousel-background-choice label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d0d4ec;
  border-radius: 13px;
  background: rgba(255,255,255,.54);
  cursor: pointer;
}
.carousel-background-choice input { margin: 3px 0 0; accent-color: var(--iris); }
.carousel-background-choice span { display: grid; gap: 3px; }
.carousel-background-choice strong { color: #343151; font-size: 11px; }
.carousel-background-choice small { color: #687189; font-size: 10px; line-height: 1.42; }
.create-carousel { min-width: 185px; background: #4940a6; }
.create-carousel:hover { background: #35307e; }

.carousel-review,
.quote-review { margin: 0 0 68px; }
.carousel-review__heading,
.quote-review__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 21px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.carousel-review h2,
.quote-review h2 { color: var(--ink); font-size: clamp(33px, 3vw, 46px); }
.carousel-review__heading > p,
.quote-review__heading > p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.carousel-review__summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 11px;
}
.carousel-review__summary > p { margin: 0; color: var(--muted); font-size: 12px; }
.carousel-page-approval {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--sage);
  color: #123d2d;
  box-shadow: 0 6px 16px rgba(50, 130, 94, .14);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .035em;
  white-space: nowrap;
}
.carousel-page-approval:hover { background: #76c89f; }
.carousel-page-approval:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.carousel-grid { display: grid; gap: 24px; }
.carousel-card {
  overflow: hidden;
  padding: 23px;
  border: 1px solid #d6dce8;
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(22,29,48,.035);
  transition: opacity .2s ease, transform .25s ease, box-shadow .25s ease;
}
.carousel-card.is-generating { border-color: rgba(117,104,238,.45); box-shadow: 0 10px 32px rgba(86,73,194,.1); }
.carousel-card.is-deleting { opacity: 0; transform: scale(.98); pointer-events: none; }
.carousel-card > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.carousel-card > header > span { color: var(--muted); font: 700 9px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.carousel-state { padding: 6px 9px; border-radius: 999px; background: #edf0f6; color: #657087; font-size: 10px; }
.carousel-state.ready { background: #fff5df; color: #89631e; }
.carousel-state.generating { background: #ece9ff; color: #5648c3; animation: generation-pulse 1.6s ease-in-out infinite; }
.carousel-post-caption { max-width: 800px; margin: 18px 0 20px; color: var(--ink); font: 400 clamp(20px, 2vw, 29px)/1.22 "Iowan Old Style", Baskerville, Georgia, serif; letter-spacing: -.02em; }
.carousel-taxonomy {
  display: grid;
  gap: 8px;
  margin: -5px 0 20px;
}
.carousel-taxonomy__group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.carousel-taxonomy__group > span:first-child {
  min-width: 57px;
  color: #687189;
  font: 700 9px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.carousel-taxonomy__chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.1;
}
.carousel-taxonomy__chip--subject { background: #eaf6ef; color: #257151; }
.carousel-taxonomy__chip--hashtag { background: #eef0ff; color: #5346b7; }
.carousel-slides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 11px;
}
.carousel-slide-review { position: relative; min-width: 0; overflow: hidden; padding: 8px; border: 1px solid #e0e4ed; border-radius: 13px; background: #fafbfe; }
.carousel-slide-review__number { position: absolute; z-index: 1; top: 15px; left: 15px; padding: 5px 6px; border-radius: 999px; background: rgba(12,16,28,.72); color: white; font: 700 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.carousel-slide-review__art { position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(145deg, #29314e, #151a2b); color: #b9c1d5; text-align: center; font-size: 10px; }
.carousel-slide-review__art button { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.carousel-slide-review__art img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .2s ease; }
.carousel-slide-review__art button:hover img { transform: scale(1.025); }
.carousel-slide-review__regenerating { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: white; background: rgba(21, 27, 44, .76); font-size: 10px; font-weight: 700; line-height: 1.3; text-align: center; }
.carousel-slide-review > p { min-height: 44px; margin: 9px 2px 8px; color: #343a4e; font: 400 14px/1.25 "Iowan Old Style", Baskerville, Georgia, serif; }
.carousel-slide-approval,
.carousel-slide-regenerate,
.carousel-generate { width: 100%; border: 0; border-radius: 8px; padding: 8px 9px; cursor: pointer; font-size: 10px; font-weight: 700; }
.carousel-slide-review__actions { display: grid; gap: 6px; }
.carousel-slide-approval { background: #ebf7f0; color: #1e7250; }
.carousel-slide-approval:hover { background: #cdeedc; }
.carousel-slide-approval.is-approved { background: #d7f0e1; color: #257151; cursor: default; }
.carousel-slide-approval:disabled:not(.is-approved) { background: #edf0f5; color: #8992a4; cursor: default; }
.carousel-slide-regenerate { color: #5346b7; background: #eef0ff; border: 1px solid #d7dcfa; }
.carousel-slide-regenerate:hover:not(:disabled) { background: #dedcff; }
.carousel-slide-regenerate:disabled { color: #8992a4; background: #edf0f5; border-color: transparent; cursor: wait; }
.carousel-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 17px; padding-top: 15px; border-top: 1px solid #e2e5ed; }
.carousel-card > footer > p { max-width: 580px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.carousel-card__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.carousel-generate { width: auto; background: var(--iris); color: white; }
.carousel-generate:hover { background: #5d51ce; }
.carousel-generate:disabled { opacity: .5; cursor: wait; }
.carousel-empty {
  min-height: 170px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed #b9c1d2;
  border-radius: 20px;
  color: var(--muted);
}
.carousel-empty strong { color: var(--ink); font: 400 26px/1.2 "Iowan Old Style", Georgia, serif; }
.carousel-empty span { margin-top: 7px; font-size: 11px; }

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  background: color-mix(in srgb, var(--porcelain), transparent 8%);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.view-tabs { display: flex; gap: 8px; }

.quote-search { display: flex; min-width: min(100%, 300px); border-bottom: 1px solid var(--line); }
.quote-search input { min-width: 0; flex: 1; border: 0; padding: 9px 5px; outline: none; background: transparent; color: var(--ink); font-size: 12px; }
.quote-search input:focus { box-shadow: 0 2px 0 var(--iris); }
.quote-search button { border: 0; padding: 0 5px; background: transparent; color: var(--iris); cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.view-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 17px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.view-tab[aria-selected="true"] {
  background: var(--ink);
  color: white;
  box-shadow: 0 7px 18px rgba(21,27,44,.17);
}

.result-label { margin: 0; color: var(--muted); font-size: 13px; }

.approve-all,
.load-more,
.reject-artwork {
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.approve-all {
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--sage);
  color: #123d2d;
  box-shadow: 0 6px 16px rgba(50, 130, 94, .16);
}
.approve-all:hover { background: #76c89f; }
.approve-all:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.review-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}
.review-actions--bottom { margin-bottom: -18px; }
.load-more {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
.load-more:hover { border-color: var(--iris); color: var(--iris); }

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

.quote-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(21,27,44,.08);
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(22,29,48,.04);
  transition: opacity .2s ease, transform .25s ease, box-shadow .25s ease;
}

.quote-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quote-card.is-deleting { opacity: 0; transform: scale(.97); pointer-events: none; }
.quote-card.is-generating { border-color: rgba(117,104,238,.34); box-shadow: 0 10px 35px rgba(86,73,194,.12); }

.artwork {
  height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  position: relative;
  background: linear-gradient(145deg, #171e32, #0d1220);
  overflow: hidden;
}

.artwork.has-pair { grid-template-columns: minmax(0, 1fr) minmax(0, .62fr); }

.artwork figure {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: #090d18;
}

.image-open {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: filter .25s ease, transform .25s ease;
}

.image-open:hover img { filter: brightness(1.08); transform: scale(.985); }

.format-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  background: rgba(11,15,26,.66);
  backdrop-filter: blur(8px);
  font: 600 9px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.artwork-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 26px;
  text-align: center;
  color: #aeb7cd;
  background:
    radial-gradient(circle at 25% 25%, rgba(117,104,238,.55), transparent 26%),
    radial-gradient(circle at 72% 68%, rgba(255,125,120,.34), transparent 30%),
    linear-gradient(145deg, #232d4a, #171d30);
}

.artwork-empty::before {
  content: "“";
  color: rgba(255,255,255,.12);
  font: 400 156px/.5 "Iowan Old Style", Georgia, serif;
}

.artwork-empty strong { margin-top: 18px; color: white; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.artwork-empty span { margin-top: 5px; font-size: 12px; }
.artwork-empty.is-generating::before { display: none; }
.artwork-empty.is-generating i {
  width: 38px;
  height: 38px;
  justify-self: center;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: white;
  border-radius: 50%;
  animation: artwork-spin .9s linear infinite;
}
.artwork-empty.is-generating strong { margin-top: 20px; }
@keyframes artwork-spin { to { transform: rotate(360deg); } }

.quote-card__body { min-width: 0; min-height: 500px; display: flex; flex-direction: column; padding: 27px 28px 24px; }

.record-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.record-id { color: var(--muted); font: 600 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.record-backend { margin-left: auto; color: var(--iris); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.record-state { padding: 5px 8px; border-radius: 999px; background: #e5e9f3; color: #68728b; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.record-state.ready { background: color-mix(in srgb, var(--sage), white 65%); color: #266c50; }
.record-state.generating { background: #ece9ff; color: #5749bd; animation: generation-pulse 1.6s ease-in-out infinite; }
@keyframes generation-pulse { 50% { background: #dcd6ff; } }

blockquote {
  margin: 28px 0 15px;
  color: var(--ink);
  font: 400 clamp(24px, 2.1vw, 34px)/1.18 "Iowan Old Style", Baskerville, Georgia, serif;
  letter-spacing: -.025em;
}

.author { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.post-caption { margin: 18px 0 0; padding: 12px 14px; color: var(--ink); background: color-mix(in srgb, var(--iris), white 93%); border-left: 3px solid var(--iris); }
.post-caption > span { display: block; margin-bottom: 5px; color: var(--muted); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.post-caption p { margin: 0; font-size: 12px; line-height: 1.55; }
.record-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0 0;
  padding: 13px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.record-dates div { min-width: 0; }
.record-dates dt {
  margin: 0 0 5px;
  color: var(--muted);
  font: 600 8px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.record-dates dd {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.4;
}
.categories, .subjects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.taxonomy-label { flex: 0 0 100%; margin-bottom: 2px; color: var(--ink); font: 700 9px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .09em; text-transform: uppercase; }
.taxonomy-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: #667087; background: #fff; font-size: 10px; letter-spacing: .025em; text-transform: capitalize; }
.taxonomy-pill.subject { border-color: #d8d2f4; background: #f7f5ff; color: #60568e; }
.tag-remove { display: grid; width: 18px; height: 18px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #edf0f5; color: #7b8394; cursor: pointer; font: 700 14px/1 Arial, sans-serif; }
.tag-remove:hover { background: #252938; color: #fff; }
.tag-remove:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; }
.tag-remove:disabled { cursor: wait; opacity: .48; }
.taxonomy-empty { padding: 6px 9px; border: 1px dashed #ccd2de; border-radius: 8px; color: var(--muted); font-size: 10px; }
.taxonomy-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.taxonomy-add { min-width: 0; }
.taxonomy-add > label { display: block; margin-bottom: 5px; color: var(--muted); font: 700 8px/1.2 "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .09em; }
.taxonomy-add__control { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.taxonomy-add input { min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: #fff; font: 11px/1.2 inherit; }
.taxonomy-add input:focus { position: relative; outline: 2px solid var(--iris); outline-offset: -1px; }
.taxonomy-add button { padding: 8px 10px; border: 0; border-radius: 0 8px 8px 0; background: var(--ink); color: white; font: 700 9px/1 inherit; cursor: pointer; }
.taxonomy-add button:hover { background: var(--iris); }
.taxonomy-add input:disabled, .taxonomy-add button:disabled { cursor: not-allowed; opacity: .5; }
.taxonomy-save-state { grid-column: 1 / -1; min-height: 12px; color: var(--muted); font-size: 9px; }
@media (max-width: 680px) { .taxonomy-editor { grid-template-columns: 1fr; } }

.quote-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.delete-quote {
  justify-self: start;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #ae3d43;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: underline;
  text-decoration-color: rgba(174, 61, 67, .38);
  text-underline-offset: 4px;
  text-transform: uppercase;
}
.delete-quote:hover:not(:disabled) { color: #7f272d; text-decoration-color: currentColor; }
.delete-quote:disabled { cursor: wait; opacity: .55; }
.reject-artwork {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff0ef;
  color: #ae3d43;
}
.generate-artwork {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #7568ee;
  border-radius: 10px;
  background: #7568ee;
  color: white;
  font-weight: 700;
}
.generate-artwork:hover { background: #6255d4; }
.generate-artwork:disabled { opacity: .56; cursor: wait; }
.reject-artwork:hover { background: #ffdeda; }
.reject-artwork:disabled { opacity: .48; cursor: not-allowed; }

.artwork-decision {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 14px;
  margin-top: 12px;
  padding: 14px 15px;
  border: 1px solid #f3d4d1;
  border-radius: 16px;
  background: #fff7f5;
}
.artwork-decision-label { color: #9f504c; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.artwork-decision-state { color: #9f504c; font-size: 11px; font-weight: 700; }
.artwork-decision .generate-artwork,
.artwork-decision .reject-artwork { grid-column: 1 / -1; }
.artwork-decision.is-signed-off { border-color: #b6e3cd; background: #f0faf5; }
.artwork-decision.is-signed-off .artwork-decision-label,
.artwork-decision.is-signed-off .artwork-decision-state { color: #267050; }
.artwork-decision.is-unavailable { border-color: var(--line); background: #f1f4f9; }
.artwork-decision.is-unavailable .artwork-decision-label,
.artwork-decision.is-unavailable .artwork-decision-state { color: var(--muted); }

.image-viewer {
  width: min(96vw, 1480px);
  height: 94vh;
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: #0b101d;
  color: white;
  box-shadow: 0 40px 120px rgba(5,8,16,.58);
}

.image-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.image-viewer::backdrop { background: rgba(9,13,24,.86); backdrop-filter: blur(12px); }
.image-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.image-viewer__bar div { min-width: 0; display: grid; gap: 3px; }
.image-viewer__bar strong { font: 600 11px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.image-viewer__bar span { overflow: hidden; color: #9da8bd; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.image-viewer__bar button { padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.08); color: white; cursor: pointer; font-size: 11px; }
.image-viewer__stage { min-height: 0; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 45%, #202b48, #090d17 66%); }
.image-viewer__stage img {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  display: block;
  object-fit: contain;
}
.viewer-open { overflow: hidden; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 42px; }
.page-button {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
}
.page-button[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: white; }
.page-button:disabled { opacity: .35; cursor: not-allowed; }
.page-gap { color: var(--muted); }

.empty-state {
  grid-column: 1 / -1;
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed #b9c1d2;
  border-radius: 24px;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); font: 400 32px/1.2 "Iowan Old Style", Georgia, serif; }
.empty-state span { margin-top: 8px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .entry-station { grid-template-columns: 1fr; gap: 30px; }
  .entry-station .station-title, .entry-station .station-description { max-width: 680px; }
  .carousel-station { grid-template-columns: 1fr; gap: 28px; }
  .carousel-station .station-description { max-width: 680px; }
  .quote-grid { grid-template-columns: 1fr; }
  .psyche-bloom { right: -20vw; opacity: .7; }
}

@media (max-width: 650px) {
  .masthead { min-height: auto; }
  .masthead__inner { width: min(100% - 32px, 1180px); padding: 54px 0 44px; }
  .generator-control { width: 100%; justify-content: space-between; border-radius: 14px; }
  .generator-status { min-width: 0; }
  h1 { font-size: clamp(64px, 24vw, 104px); }
  .intro { margin-top: 34px; font-size: 15px; }
  .counts { column-gap: 22px; row-gap: 16px; }
  .counts__carousel-start { padding-left: 0; border-left: 0; }
  .psyche-bloom { width: 92vw; right: -52vw; top: 28%; opacity: .48; }
  main { width: min(100% - 24px, 1320px); padding-top: 18px; }
  .creation-tabs { display: grid; width: calc(100% - 28px); margin: -64px 14px 14px; }
  .creation-tab { min-height: 76px; padding: 11px 12px 12px; font-size: 12px; }
  .creation-tab__meta { font-size: 8px; letter-spacing: .1em; }
  .creation-tab__state { padding: 3px 5px; font-size: 7px; }
  .creation-tab em { font-size: 15px; }
  .entry-station { margin: -42px 0 22px; padding: 25px 20px 22px; border-radius: 22px; }
  .entry-station::before { right: -105px; bottom: -142px; }
  .entry-station .station-title { font-size: 46px; }
  .carousel-station { margin: 24px 0 48px; padding: 26px 20px; border-radius: 22px; }
  .carousel-station::before { right: 25px; bottom: -8px; font-size: 74px; }
  .carousel-station .station-title { font-size: 44px; }
  .entry-station .station-description { margin-top: 16px; }
  .entry-station.is-collapsed,
  .carousel-station.is-collapsed { padding: 20px; }
  .entry-station.is-collapsed .station-title { font-size: 37px; }
  .carousel-station.is-collapsed .station-title { font-size: 35px; }
  .entry-field textarea { min-height: 112px; font-size: 27px; }
  .entry-meta { grid-template-columns: 1fr; gap: 20px; }
  .carousel-background-choice { grid-template-columns: 1fr; }
  .carousel-slide-field { grid-template-columns: 28px minmax(0, 1fr); }
  .remove-carousel-slide { grid-column: 2; justify-self: start; }
  .carousel-review__heading,
  .quote-review__heading,
  .carousel-card > footer { align-items: flex-start; flex-direction: column; }
  .carousel-review__summary { width: 100%; justify-content: space-between; }
  .carousel-page-approval { margin-left: auto; }
  .carousel-card__actions { width: 100%; justify-content: stretch; }
  .carousel-card__actions > * { flex: 1; }
  .entry-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .save-quote { width: 100%; }
  .toolbar { min-height: 70px; margin-bottom: 18px; }
  .toolbar { align-items: flex-start; flex-wrap: wrap; padding: 12px 0; }
  .view-tabs { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .quote-search { width: 100%; }
  .approve-all { margin-left: auto; }
  .result-label { display: none; }
  .quote-card { border-radius: 20px; }
  .artwork { height: 390px; gap: 8px; padding: 10px; }
  .artwork.has-pair { grid-template-columns: minmax(0, 1fr) minmax(0, .6fr); }
  .quote-card__body { min-height: 0; padding: 24px 21px 20px; }
  blockquote { font-size: 28px; }
  .quote-actions { grid-template-columns: 1fr; margin-top: 28px; padding-top: 0; }
  .image-viewer { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
  .image-viewer__bar { padding: 13px 14px; }
  .image-viewer__stage img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
}

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

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 18px 32px;
  border-radius: 12px;
  background: #151b2c;
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateY(200%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
}

.toast.success { background: #4CAF50; }
.toast.error { background: #f44336; }

/* Modal styles for approve dialog */
dialog {
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0;
  width: min(500px, calc(100% - 32px));
}

dialog::backdrop {
  background: rgba(21, 27, 44, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  padding: 32px;
  text-align: center;
}

.modal-content h3 {
  margin: 0 0 16px 0;
  font-size: 24px;
  color: var(--ink);
}

.modal-content p {
  color: #666;
  line-height: 1.5;
}

.classification-area label {
  display: block;
  text-align: left;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.classification-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-family: "Avenir Next", sans-serif;
  margin-bottom: 20px;
}

/* Preview quotes page specific styles */
.preview-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 50px 20px;
  text-align: center;
}

.preview-header h1 {
  margin: 0 0 12px 0;
  font-size: clamp(32px, 8vw, 64px);
  font-family: "Iowan Old Style", Georgia, serif;
}

.preview-stats dt {
  font-size: clamp(24px, 6vw, 48px);
  font-family: "Iowan Old Style", Georgia, serif;
}

.generate-quotes-section {
  background: white;
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  text-align: center;
}

.generate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px 45px;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.filter-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 30px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--iris);
  color: white;
  border-color: var(--iris);
}

.quote-card {
  position: relative;
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.quote-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.quote-text {
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 25px;
  font-style: italic;
}

.quote-card .card-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Character studio — a private casting board rather than another content list. */
.girlfriend-page { background:#e6e8f0; color:#171827; }
.girlfriend-page button:disabled { cursor:not-allowed; opacity:.5; }
.girlfriend-hero { position:relative; overflow:hidden; min-height:500px; color:#fbf8f2; background:#171827; isolation:isolate; }
.girlfriend-hero::before { content:""; position:absolute; z-index:-2; inset:0; background:radial-gradient(circle at 79% 28%,rgba(248,132,94,.38),transparent 0 23%),radial-gradient(circle at 68% 82%,rgba(140,121,255,.36),transparent 0 36%),linear-gradient(122deg,#161624 0%,#202039 55%,#121523 100%); }
.girlfriend-hero__grain { position:absolute; z-index:-1; inset:0; opacity:.32; background-image:radial-gradient(rgba(255,255,255,.5) .55px,transparent .6px); background-size:5px 5px; mix-blend-mode:soft-light; }
.girlfriend-hero__inner { width:min(1240px,calc(100% - 48px)); margin:0 auto; padding:30px 0 68px; }
.girlfriend-back { display:inline-flex; padding:8px 0; color:#d4d7e9; font:700 11px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.08em; text-decoration:none; text-transform:uppercase; }.girlfriend-back:hover { color:#ffbd9a; }
.girlfriend-hero .eyebrow { margin-top:78px; margin-bottom:22px; color:#ffbd9a; }
.girlfriend-hero__headline { display:grid; grid-template-columns:minmax(0,690px) minmax(260px,365px); align-items:end; gap:clamp(28px,8vw,130px); }
.girlfriend-hero h1 { max-width:none; color:#fdf8ef; font-size:clamp(72px,10.5vw,152px); line-height:.73; letter-spacing:-.077em; }.girlfriend-hero h1 em { color:#ff9e79; }
.girlfriend-hero__headline > p { max-width:350px; margin:0 0 4px; color:#d8d8e5; font-size:16px; line-height:1.72; }
.girlfriend-hero__note { display:flex; align-items:baseline; gap:13px; max-width:580px; margin:66px 0 0 auto; padding-top:14px; border-top:1px solid rgba(255,255,255,.24); color:#bdc1d5; font-size:12px; line-height:1.55; }.girlfriend-hero__note span { color:#ffad84; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; }
.girlfriend-shell { width:min(1240px,calc(100% - 48px)); margin:0 auto; padding:48px 0 100px; }
.profile-intake { display:grid; grid-template-columns:minmax(230px,.72fr) minmax(0,1.28fr); gap:clamp(36px,7vw,116px); padding:44px clamp(26px,5vw,70px) 48px; background:#fcfbf8; box-shadow:0 24px 56px rgba(24,25,40,.1); }
.profile-intake__lead .entry-kicker,.character-header .entry-kicker { margin:0 0 12px; color:#7a66df; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.13em; text-transform:uppercase; }
.profile-intake h2,.character-header h2 { margin:0; font:400 clamp(42px,5vw,68px)/.85 "Iowan Old Style",Baskerville,Georgia,serif; letter-spacing:-.06em; }.profile-intake h2 em { color:#826eda; }
.profile-intake__lead > p:last-child { max-width:295px; margin:28px 0 0; color:#666b7a; font-size:14px; line-height:1.7; }
.profile-intake__form,.character-editor__form,.scene-form,.bulk-form { display:grid; gap:17px; }.profile-intake__form { grid-template-columns:1fr 1fr; align-content:start; }
.profile-intake label,.character-editor label,.scene-form label,.bulk-form label,.reference-form label { display:grid; gap:8px; color:#434657; font-size:12px; font-weight:800; letter-spacing:.025em; }.profile-intake input,.profile-intake textarea,.character-editor input,.character-editor textarea,.scene-form input,.scene-form textarea,.bulk-form input,.bulk-form textarea { width:100%; padding:12px 0; border:0; border-bottom:1px solid #c9cad1; border-radius:0; outline:0; background:transparent; color:#171827; font:400 15px/1.45 "Avenir Next",Avenir,"Helvetica Neue",sans-serif; }.profile-intake textarea,.character-editor textarea,.scene-form textarea,.bulk-form textarea { resize:vertical; }.profile-intake input:focus,.profile-intake textarea:focus,.character-editor input:focus,.character-editor textarea:focus,.scene-form input:focus,.scene-form textarea:focus,.bulk-form input:focus,.bulk-form textarea:focus { border-color:#806adf; box-shadow:0 1px #806adf; }
.profile-intake__prompt,.profile-intake__personality,.file-input,.profile-intake__action { grid-column:1 / -1; }.file-input { padding:13px 15px; border:1px dashed #bcb8d2; background:#f6f4ff; }.file-input small,.scene-form small,.section-line small { color:#74758a; font-size:10px; font-weight:600; letter-spacing:0; }
.profile-intake__action,.scene-form__footer,.bulk-form__footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:7px; }.profile-intake__action span,.scene-form__footer span,.bulk-form__footer span,.reference-form span,.character-editor__form > div span { min-height:1.2em; color:#5c5f6d; font-size:12px; }.profile-intake__action span.is-error,.scene-form__footer span.is-error,.bulk-form__footer span.is-error,.reference-form span.is-error,.character-editor__form > div span.is-error { color:#a93d4c; }
.profile-intake__action button,.scene-form__footer button { display:inline-flex; align-items:center; justify-content:space-between; gap:34px; border:0; padding:14px 17px; background:#171827; color:white; cursor:pointer; font-weight:800; }.profile-intake__action button:hover,.scene-form__footer button:hover { background:#7862d2; }.profile-intake__action i,.scene-form__footer i { color:#ffad84; font-size:18px; font-style:normal; }
.character-workspace { display:grid; grid-template-columns:280px minmax(0,1fr); align-items:start; margin-top:42px; border:1px solid #d0d1db; background:#fbfbfd; }
.character-rail { position:sticky; top:16px; min-height:480px; border-right:1px solid #d0d1db; background:#ececf4; }.character-rail__heading { display:flex; align-items:center; justify-content:space-between; padding:18px 19px; border-bottom:1px solid #d0d1db; color:#55576a; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; text-transform:uppercase; }.character-rail__heading strong { display:grid; width:23px; aspect-ratio:1; place-items:center; border-radius:50%; background:#171827; color:#fff; font-size:10px; }
.character-list { display:grid; }.character-list__empty { padding:22px 19px; color:#77798b; font-size:13px; }.character-item { display:grid; grid-template-columns:32px 1fr auto; align-items:center; gap:10px; width:100%; padding:14px 15px; border:0; border-bottom:1px solid #d8d8e1; background:transparent; color:#252735; cursor:pointer; text-align:left; }.character-item:hover { background:#e1e0ed; }.character-item.is-selected { background:#171827; color:#fff; }.character-item__initial { display:grid; width:32px; aspect-ratio:1; place-items:center; border-radius:50%; background:#c0b5fa; color:#251f4d; font:400 17px/1 "Iowan Old Style",Georgia,serif; }.character-item.is-selected .character-item__initial { background:#ffad84; }.character-item__copy { display:grid; min-width:0; gap:3px; }.character-item strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }.character-item small,.character-item__counts { overflow:hidden; color:#77798b; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }.character-item.is-selected small,.character-item.is-selected .character-item__counts { color:#c6c7d5; }.character-item__counts { max-width:54px; text-align:right; }
.character-studio { min-height:650px; background:#fbfbfd; }.character-empty { display:grid; max-width:350px; place-items:start; gap:12px; padding:140px clamp(34px,8vw,110px); }.character-empty__mark { display:grid; width:34px; aspect-ratio:1; place-items:center; border:1px solid #bfb7ec; color:#705bd1; font-size:17px; }.character-empty h2 { margin:0; font:400 36px/.95 "Iowan Old Style",Georgia,serif; letter-spacing:-.04em; }.character-empty p { margin:0; color:#696b7b; font-size:14px; line-height:1.65; }
.character-header { display:flex; align-items:end; justify-content:space-between; gap:25px; padding:47px clamp(28px,6vw,72px) 31px; background:#f6f5fa; }.character-header h2 { font-size:clamp(46px,6vw,78px); }.character-social { display:inline-block; margin-top:13px; color:#7a66df; font:700 11px/1 "SFMono-Regular",Consolas,monospace; text-decoration:none; }.character-social:hover { color:#ef7e5c; }.character-header__index { display:grid; gap:4px; color:#77798b; text-align:right; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.09em; text-transform:uppercase; }.character-header__index strong { color:#272737; font:400 28px/1 "Iowan Old Style",Georgia,serif; letter-spacing:0; }
.identity-strip { display:flex; align-items:start; justify-content:space-between; gap:24px; padding:23px clamp(28px,6vw,72px); background:#1d1d2e; color:#f4f2f8; }.identity-strip__label { display:block; margin-bottom:8px; color:#ffad84; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.13em; text-transform:uppercase; }.identity-strip p { max-width:640px; margin:0; color:#dadbe6; font:13px/1.6 "Avenir Next",Avenir,sans-serif; }.reference-state { flex:none; padding:7px 9px; border:1px solid #6f7083; color:#bcbecd; font:700 10px/1 "SFMono-Regular",Consolas,monospace; }.reference-state.is-ready { border-color:#79cfa4; color:#9de1bc; }
.character-editor { margin:0; border-bottom:1px solid #d9d9e1; background:#f0eff5; }.character-editor summary { display:flex; justify-content:space-between; padding:14px clamp(28px,6vw,72px); color:#4e4f61; cursor:pointer; font:700 11px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.08em; text-transform:uppercase; }.character-editor summary::marker { content:""; }.character-editor__form { grid-template-columns:1fr 1fr; padding:9px clamp(28px,6vw,72px) 29px; }.character-editor__form label:nth-child(3),.character-editor__personality,.character-editor__form > div { grid-column:1 / -1; }.toggle-label { display:flex !important; align-items:center; gap:9px; }.toggle-label input { width:auto; }.character-editor__form > div { display:flex; align-items:center; justify-content:space-between; gap:12px; }.character-editor button,.reference-form button,.bulk-form__footer button { border:1px solid #282938; padding:10px 13px; background:#fff; color:#282938; cursor:pointer; font-size:12px; font-weight:800; }.character-editor button:hover,.reference-form button:hover,.bulk-form__footer button:hover { border-color:#806adf; color:#6e5acd; }
.reference-panel,.scene-desk,.bulk-desk,.gallery-panel { padding:35px clamp(28px,6vw,72px); border-bottom:1px solid #d9d9e1; }.section-line { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:21px; }.section-line span { display:block; margin-bottom:7px; color:#806bd8; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; text-transform:uppercase; }.section-line h3 { margin:0; font:400 31px/.9 "Iowan Old Style",Georgia,serif; letter-spacing:-.045em; }.section-line small { max-width:170px; text-align:right; }
.reference-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.reference-card { position:relative; min-height:185px; margin:0; overflow:hidden; background:#dddde5; }.reference-card img { display:block; width:100%; height:100%; min-height:185px; object-fit:cover; }.reference-card figcaption { position:absolute; right:0; bottom:0; padding:6px 8px; background:rgba(24,24,39,.8); color:#fff; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.06em; text-transform:uppercase; }.reference-form { display:flex; align-items:center; flex-wrap:wrap; gap:11px; margin-top:14px; }.reference-form label { display:flex; align-items:center; gap:12px; color:#555767; }.reference-form input { max-width:230px; font-size:11px; }
.scene-desk { background:#f9f4ef; }.scene-form { grid-template-columns:1fr 1fr; }.scene-form__wide,.scene-form__footer { grid-column:1 / -1; }.scene-form__footer { padding-top:0; }.scene-form__footer button { background:#ef7e5c; color:#241a20; }.scene-form__footer button:hover { background:#ff9f7c; }
.bulk-desk { background:#f4f3f9; }.bulk-form__options { display:grid; grid-template-columns:1fr 1fr; gap:17px; }.bulk-form__footer { padding-top:0; }.bulk-form__footer button { background:#28293a; color:#fff; }.bulk-form__footer button:hover { background:#806bd8; color:#fff; }
.gallery-panel { border-bottom:0; }.gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }.gallery-card { overflow:hidden; background:#e7e6ed; }.gallery-card > img { display:block; width:100%; aspect-ratio:4 / 5; object-fit:cover; }.gallery-card__state { display:flex; align-items:center; justify-content:space-between; width:100%; aspect-ratio:4 / 5; padding:14px; color:#666879; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.07em; text-transform:uppercase; }.gallery-card--generating .gallery-card__state { color:#755fda; background:linear-gradient(135deg,#ebe9f9,#dfdaf7); }.gallery-card--failed .gallery-card__state { color:#a93d4c; background:#f7e7e7; }.gallery-card__state i { color:currentColor; font:400 24px/1 "Iowan Old Style",Georgia,serif; }.gallery-card__copy { padding:11px; background:#fff; }.gallery-card__copy p { display:-webkit-box; margin:0; overflow:hidden; color:#343544; font-size:12px; line-height:1.45; -webkit-box-orient:vertical; -webkit-line-clamp:3; }.gallery-card__tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:10px; }.gallery-card__tags span { color:#7764ce; font:700 9px/1 "SFMono-Regular",Consolas,monospace; }.gallery-card__error { display:block; margin-top:8px; color:#a93d4c; font-size:10px; line-height:1.35; }.gallery-empty { grid-column:1 / -1; margin:0; padding:38px 0; color:#77798a; font:14px/1.6 "Avenir Next",Avenir,sans-serif; }
@media (max-width:820px) { .girlfriend-hero__headline,.profile-intake,.character-workspace { grid-template-columns:1fr; }.girlfriend-hero__headline > p { max-width:460px; }.girlfriend-hero__note { margin-left:0; }.profile-intake { gap:35px; }.character-rail { position:static; min-height:0; border-right:0; border-bottom:1px solid #d0d1db; }.character-list { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); }.character-item { border-right:1px solid #d8d8e1; }.character-header { padding-top:38px; }.gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:540px) { .girlfriend-hero__inner,.girlfriend-shell { width:min(100% - 30px,1240px); }.girlfriend-hero__inner { padding-bottom:42px; }.girlfriend-hero .eyebrow { margin-top:60px; }.girlfriend-hero h1 { font-size:clamp(65px,20vw,96px); }.profile-intake { padding:32px 22px; }.profile-intake__form,.character-editor__form,.scene-form,.bulk-form__options { grid-template-columns:1fr; }.profile-intake__action,.scene-form__footer,.bulk-form__footer { align-items:flex-start; flex-direction:column; }.character-header,.identity-strip,.section-line { align-items:flex-start; flex-direction:column; }.character-header__index,.section-line small { text-align:left; }.reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.gallery-grid { grid-template-columns:1fr; }.character-editor__form { padding-left:28px; padding-right:28px; } }

/* Character studio v2 — a compact private production desk. */
.girlfriend-page {
  min-width:0;
  background:#edf0f3;
  color:#17211e;
  font-family:"Avenir Next",Avenir,"Helvetica Neue",sans-serif;
}
.girlfriend-page button:focus-visible,
.girlfriend-page a:focus-visible,
.girlfriend-page input:focus-visible,
.girlfriend-page textarea:focus-visible,
.girlfriend-page summary:focus-visible {
  outline:3px solid rgba(108,150,93,.5);
  outline-offset:3px;
}
.studio-bar {
  border-bottom:1px solid rgba(218,224,220,.72);
  background:#fafbf8;
}
.studio-bar__inner {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  width:min(1360px,calc(100% - 48px));
  min-height:92px;
  margin:0 auto;
}
.studio-back {
  justify-self:start;
  color:#64726d;
  font:700 11px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.08em;
  text-decoration:none;
  text-transform:uppercase;
}
.studio-back:hover { color:#1d4c3a; }
.studio-brand { text-align:center; }
.studio-brand p,
.studio-brand h1 { margin:0; }
.studio-brand p {
  margin-bottom:5px;
  color:#7a8c74;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.studio-brand h1 {
  color:#1a2923;
  font:600 29px/.95 "Iowan Old Style",Baskerville,Georgia,serif;
  letter-spacing:-.045em;
}
.studio-bar__status {
  display:grid;
  justify-items:end;
  gap:6px;
  color:#65726e;
}
.studio-bar__status span {
  padding:7px 10px;
  border:1px solid #d8e4cf;
  border-radius:999px;
  background:#f4f8ef;
  color:#466d45;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.04em;
}
.studio-bar__status small { font-size:11px; }
.girlfriend-shell {
  width:min(1360px,calc(100% - 48px));
  margin:0 auto;
  padding:30px 0 80px;
}
.profile-intake {
  display:block;
  margin:0 0 24px;
  padding:0;
  overflow:hidden;
  border:1px solid #dce3dd;
  border-radius:14px;
  background:#fbfcfa;
  box-shadow:none;
}
.profile-intake > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:82px;
  padding:17px 25px;
  cursor:pointer;
  list-style:none;
}
.profile-intake > summary::-webkit-details-marker { display:none; }
.profile-intake__summary-copy { display:grid; gap:4px; }
.profile-intake__summary-copy small,
.profile-intake__summary-copy em {
  color:#78837e;
  font-style:normal;
  font-size:12px;
}
.profile-intake__summary-copy small {
  color:#739168;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.profile-intake__summary-copy strong {
  color:#1a2923;
  font:600 20px/1.1 "Iowan Old Style",Baskerville,Georgia,serif;
  letter-spacing:-.025em;
}
.profile-intake__summary-action {
  display:inline-flex;
  align-items:center;
  gap:12px;
  flex:none;
  padding:10px 13px;
  border:1px solid #cfdbca;
  border-radius:8px;
  color:#234938;
  font:700 11px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.03em;
}
.profile-intake__summary-action b { font-size:18px; font-weight:400; transition:transform .2s ease; }
.profile-intake[open] .profile-intake__summary-action b { transform:rotate(45deg); }
.profile-intake__content {
  display:grid;
  grid-template-columns:minmax(235px,.68fr) minmax(0,1.32fr);
  gap:clamp(38px,7vw,112px);
  padding:38px clamp(25px,5vw,70px) 42px;
  border-top:1px solid #e1e7e1;
  background:linear-gradient(105deg,#f5f8f1 0%,#fbfcfa 55%);
}
.profile-intake__lead .entry-kicker,
.character-header .entry-kicker {
  margin:0 0 11px;
  color:#709067;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.profile-intake h2,
.character-header h2 {
  color:#1a2923;
  font:500 clamp(38px,4.2vw,59px)/.88 "Iowan Old Style",Baskerville,Georgia,serif;
  letter-spacing:-.058em;
}
.profile-intake h2 em { color:#5e8f58; }
.profile-intake__lead > p:last-child {
  max-width:300px;
  margin:22px 0 0;
  color:#62716b;
  font-size:13px;
  line-height:1.65;
}
.profile-intake__form,
.character-editor__form,
.scene-form,
.bulk-form { gap:16px; }
.profile-intake__form { display:grid; grid-template-columns:1fr 1fr; align-content:start; }
.platform-roster {
  display:grid;
  grid-column:1 / -1;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px 17px;
  margin:0;
  padding:14px 15px 15px;
  border:1px solid #d6e2d1;
  border-radius:8px;
  background:#f6faf3;
}
.platform-roster legend {
  width:100%;
  padding:0 0 3px;
  color:#52775b;
  font:700 10px/1.3 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.platform-roster legend small {
  margin-left:8px;
  color:#738379;
  font:400 10px/1.3 "Avenir Next",Avenir,sans-serif;
  letter-spacing:0;
  text-transform:none;
}
.platform-roster label { min-width:0; }
.character-socials { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.character-socials .character-social {
  margin:0;
  padding:6px 8px;
  border:1px solid #c8dcc4;
  border-radius:999px;
  background:#f5faef;
  color:#397545;
  font-size:9px;
}
.profile-intake label,
.character-editor label,
.scene-form label,
.bulk-form label,
.reference-form label {
  gap:7px;
  color:#45554e;
  font-size:11px;
  font-weight:800;
  letter-spacing:.03em;
}
.profile-intake input,
.profile-intake textarea,
.character-editor input,
.character-editor textarea,
.scene-form input,
.scene-form textarea,
.bulk-form input,
.bulk-form textarea {
  padding:10px 0;
  border-color:#c9d3cc;
  color:#182520;
  font-size:14px;
}
.profile-intake input:focus,
.profile-intake textarea:focus,
.character-editor input:focus,
.character-editor textarea:focus,
.scene-form input:focus,
.scene-form textarea:focus,
.bulk-form input:focus,
.bulk-form textarea:focus {
  border-color:#5b9959;
  box-shadow:0 1px #5b9959;
}
.file-input {
  border-color:#c6d8c3;
  background:#f2f7ef;
}
.file-input small,
.scene-form small,
.section-line small { color:#75807a; }
.profile-intake__action button,
.scene-form__footer button {
  background:#224839;
  color:#fff;
}
.profile-intake__action button:hover,
.scene-form__footer button:hover { background:#31644d; }
.profile-intake__action i,
.scene-form__footer i { color:#c5ec8c; }
.character-workspace {
  grid-template-columns:258px minmax(0,1fr);
  margin-top:0;
  overflow:hidden;
  border:1px solid #d7dfd9;
  border-radius:16px;
  background:#fbfcfa;
  box-shadow:0 16px 40px rgba(36,59,48,.06);
}
.character-rail {
  min-height:640px;
  border-right:1px solid #dce4de;
  background:#f3f6f2;
}
.character-rail__heading {
  padding:20px 18px;
  border-bottom:1px solid #dce4de;
  color:#728078;
}
.character-rail__heading strong {
  background:#294e3d;
  color:#eaf5df;
}
.character-list__empty { color:#77827d; }
.character-item {
  position:relative;
  grid-template-columns:30px 1fr;
  gap:10px;
  padding:15px 14px;
  border-bottom-color:#dce4de;
  color:#304239;
}
.character-item:hover { background:#e7eee6; }
.character-item.is-selected { background:#214536; }
.character-item__initial {
  width:30px;
  background:#d0e8a4;
  color:#254535;
}
.character-item.is-selected .character-item__initial { background:#f0a17d; }
.character-item__portrait {
  position:relative;
  overflow:hidden;
  border:1px solid rgba(40,78,53,.14);
}
.character-item__portrait.has-reference { background:#dce8d8; }
.character-item__portrait.has-reference img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.character-item.is-selected .character-item__portrait.has-reference { border-color:rgba(244,249,240,.55); background:#dce8d8; }
.character-item__portrait-preview {
  position:absolute;
  z-index:30;
  top:calc(100% - 10px);
  left:52px;
  width:148px;
  aspect-ratio:4 / 5;
  overflow:hidden;
  border:2px solid #e6f2df;
  border-radius:8px;
  background:#1c2d23;
  box-shadow:0 14px 30px rgba(18,32,23,.28);
  opacity:0;
  pointer-events:none;
  transform:translateY(5px) scale(.97);
  transition:opacity .14s ease, transform .14s ease;
}
.character-item__portrait-preview img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
}
.character-item:hover .character-item__portrait-preview,
.character-item:focus-visible .character-item__portrait-preview {
  opacity:1;
  transform:translateY(0) scale(1);
}
.character-item__counts { display:none; }
.character-item small { color:#89958d; }
.character-item.is-selected small { color:#bed0c1; }
.character-studio { min-height:640px; background:#fbfcfa; }
#studio-empty[hidden],
#studio-detail[hidden] { display:none !important; }
.character-empty { max-width:430px; padding:145px clamp(34px,8vw,110px); }
.character-empty__mark { border-color:#bed9b4; color:#5b925b; }
.character-empty h2 { color:#22342c; }
.character-empty p { color:#6c7c74; }
.character-header {
  align-items:center;
  padding:42px clamp(28px,5vw,70px) 29px;
  background:#fbfcfa;
}
.character-header h2 { margin:0; font-size:clamp(45px,5vw,70px); }
.character-social { color:#4b8150; }
.character-social:hover { color:#c85f49; }
.character-header__meta { display:flex; align-items:center; gap:22px; }
.character-header__index { color:#7a867f; }
.character-header__index strong { color:#31463c; }
.reference-state {
  padding:8px 10px;
  border-color:#ccd9ce;
  color:#738178;
  white-space:nowrap;
}
.reference-state.is-ready { border-color:#8fc083; color:#397242; background:#f2f8ed; }
.identity-strip {
  align-items:center;
  padding:20px clamp(28px,5vw,70px);
  background:#264537;
}
.identity-strip__label { color:#c6e591; }
.identity-strip p { max-width:690px; color:#e1eee0; }
.identity-strip__hint {
  max-width:155px;
  color:#b6c8b7;
  font:600 10px/1.5 "SFMono-Regular",Consolas,monospace;
  text-align:right;
}
.character-editor { background:#f3f7f0; border-bottom-color:#dce4de; }
.character-editor summary { padding:14px clamp(28px,5vw,70px); color:#57705f; }
.character-editor__form { padding:9px clamp(28px,5vw,70px) 27px; }
.character-editor button,
.reference-form button,
.bulk-form__footer button {
  border-color:#8caf86;
  background:#fbfcfa;
  color:#315d3b;
}
.character-editor button:hover,
.reference-form button:hover,
.bulk-form__footer button:hover { border-color:#477d4c; background:#edf6e8; color:#224e2f; }
.reference-panel,
.scene-desk,
.bulk-desk,
.gallery-panel {
  padding:31px clamp(28px,5vw,70px);
  border-bottom-color:#dce4de;
}
.section-line { margin-bottom:20px; }
.section-line span { color:#608e58; }
.section-line h3 { color:#22342c; font-size:30px; }
.reference-panel { background:#f7faf5; }
.reference-grid { grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; max-width:820px; }
.reference-card { min-height:92px; border-radius:8px; background:#dce6db; }
.reference-card img { min-height:92px; }
.reference-form { margin-top:16px; }
.reference-form label { color:#61736a; }
.directing-grid { display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid #dce4de; }
.scene-desk,
.bulk-desk { border-bottom:0; }
.scene-desk { background:#fff9f1; }
.bulk-desk { background:#f3f7f0; border-left:1px solid #dce4de; }
.scene-form { grid-template-columns:1fr 1fr; }
.scene-form__footer,
.bulk-form__footer { margin-top:auto; }
.scene-form__footer button { background:#dd7254; color:#251b1b; }
.scene-form__footer button:hover { background:#ee8c6b; }
.bulk-form { height:100%; }
.bulk-form textarea { min-height:126px; }
.bulk-form__footer button { background:#315b3d; border-color:#315b3d; color:#fff; }
.bulk-form__footer button:hover { background:#477a4b; border-color:#477a4b; color:#fff; }
.gallery-panel { border-bottom:0; background:#fbfcfa; }
.gallery-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.gallery-card { border:1px solid #dce4de; border-radius:9px; background:#eef3ed; }
.gallery-card > img { aspect-ratio:4/5; }
.gallery-card__state { color:#64756b; }
.generation-elapsed { font-variant-numeric:tabular-nums; white-space:nowrap; }
.gallery-card--generating .gallery-card__state { color:#477d4c; background:linear-gradient(135deg,#eef7e8,#e0efd7); }
.gallery-card--failed .gallery-card__state { color:#a94e40; background:#f9ebe7; }
.gallery-card__copy { background:#fff; }
.gallery-card__copy p { color:#35453d; }
.gallery-card__wardrobe {
  display:flex;
  align-items:baseline;
  gap:7px;
  margin-top:9px;
}
.gallery-card__wardrobe span {
  color:#748278;
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.gallery-card__wardrobe strong {
  color:#315b3d;
  font:700 11px/1.3 "Avenir Next",Avenir,"Helvetica Neue",sans-serif;
  text-transform:capitalize;
}
.gallery-card__tags span { color:#4f8652; }
.gallery-card__references {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  margin-top:11px;
  padding-top:9px;
  border-top:1px solid #e6eee4;
}
.gallery-card__references-label {
  color:#718078;
  font:700 8px/1.2 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.gallery-card__reference-thumbs { display:flex; align-items:center; padding-left:5px; }
.gallery-card__reference-thumb.image-preview-trigger {
  width:29px;
  height:29px;
  margin-left:-5px;
  overflow:hidden;
  border:2px solid #fff;
  border-radius:50%;
  box-shadow:0 1px 3px rgba(27,56,40,.16);
}
.gallery-card__reference-thumb.image-preview-trigger:first-child { margin-left:0; }
.gallery-card__reference-thumb.image-preview-trigger:hover { position:relative; z-index:1; transform:translateY(-2px) scale(1.08); }
.gallery-card__reference-thumb.image-preview-trigger:focus-visible { position:relative; z-index:2; outline-color:#477d4c; outline-offset:2px; }
.gallery-card__delete {
  display:inline-flex;
  margin-top:11px;
  border:0;
  padding:0;
  background:transparent;
  color:#9c4a40;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  text-decoration:underline;
  text-underline-offset:3px;
}
.gallery-card__delete:hover { color:#712f2b; }
.gallery-card__delete:disabled { color:#9a9c99; cursor:wait; }
.gallery-empty { color:#6d7c75; }

@media (max-width:960px) {
  .studio-bar__inner { grid-template-columns:1fr auto; }
  .studio-brand { order:-1; text-align:left; }
  .studio-back { display:none; }
  .directing-grid { grid-template-columns:1fr; }
  .bulk-desk { border-top:1px solid #dce4de; border-left:0; }
  .gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .studio-bar__inner,
  .girlfriend-shell { width:min(100% - 30px,1360px); }
  .studio-bar__inner { min-height:78px; }
  .studio-bar__status small { display:none; }
  .profile-intake > summary { align-items:flex-start; min-height:auto; padding:18px; }
  .profile-intake__summary-copy em { max-width:290px; line-height:1.45; }
  .profile-intake__content,
  .character-workspace { grid-template-columns:1fr; }
  .profile-intake__content { gap:28px; padding:29px 22px 32px; }
  .character-rail { position:static; min-height:0; border-right:0; border-bottom:1px solid #dce4de; }
  .character-list { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
  .character-item { border-right:1px solid #dce4de; }
  .character-header { padding-top:34px; }
  .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:540px) {
  .studio-bar__status { display:none; }
  .studio-bar__inner { display:block; min-height:0; padding:19px 0; }
  .studio-brand { text-align:left; }
  .profile-intake__summary-copy em { display:none; }
  .profile-intake__summary-action { padding:9px 10px; font-size:10px; }
  .profile-intake__form,
  .character-editor__form,
  .scene-form,
  .bulk-form__options { grid-template-columns:1fr; }
  .profile-intake__action,
  .scene-form__footer,
  .bulk-form__footer { align-items:flex-start; flex-direction:column; }
  .character-header,
  .identity-strip,
  .section-line { align-items:flex-start; flex-direction:column; }
  .character-header__meta { align-items:flex-start; }
  .identity-strip__hint,
  .section-line small { text-align:left; }
  .reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gallery-grid { grid-template-columns:1fr; }
  .character-editor__form { padding-left:28px; padding-right:28px; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-intake__summary-action b { transition:none; }
}

/* Sequence planning and reference choice. */
.reference-selection {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin:-2px 0 15px;
  padding:12px 14px;
  border:1px solid #d8e3d4;
  border-radius:8px;
  background:#eff6eb;
}
.reference-selection span {
  display:block;
  margin-bottom:4px;
  color:#578052;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.reference-selection p { margin:0; color:#63736a; font-size:11px; line-height:1.45; }
.reference-selection strong {
  flex:none;
  color:#274f35;
  font:700 10px/1.35 "SFMono-Regular",Consolas,monospace;
  text-align:right;
}
.reference-card {
  display:block;
  min-height:92px;
  cursor:pointer;
  outline:1px solid transparent;
  outline-offset:3px;
  transition:transform .18s ease, outline-color .18s ease, box-shadow .18s ease;
}
.reference-card:hover { transform:translateY(-2px); }
.reference-card.is-selected { outline-color:#5d995a; box-shadow:0 7px 15px rgba(58,103,57,.15); }
.reference-card:has(.reference-card__toggle:focus-visible) { outline:3px solid rgba(108,150,93,.5); }
.reference-card__choose {
  position:absolute;
  z-index:2;
  top:8px;
  left:8px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:5px 7px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:4px;
  background:rgba(31,46,36,.78);
  color:#fff;
  cursor:pointer;
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.reference-card.is-selected .reference-card__choose { background:#386f42; }
.reference-card.is-source-reference { outline-color:#8ab36e; box-shadow:0 0 0 2px rgba(125,176,102,.18),0 8px 18px rgba(58,103,57,.18); }
.reference-card__toggle {
  width:14px;
  height:14px;
  margin:0;
  accent-color:#396f43;
  cursor:pointer;
}
.reference-card__caption {
  position:absolute;
  right:0;
  bottom:0;
  padding:6px 8px;
  background:rgba(24,47,35,.86);
  color:#fff;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.reference-card.is-selected .reference-card__caption { display:none; }
.reference-card__delete {
  position:absolute;
  z-index:2;
  top:8px;
  right:8px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:4px;
  padding:5px 7px;
  background:rgba(31,46,36,.78);
  color:#fff;
  cursor:pointer;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.04em;
  text-transform:uppercase;
  opacity:0;
  transition:opacity .16s ease, background .16s ease;
}
.reference-card:hover .reference-card__delete,
.reference-card:focus-within .reference-card__delete { opacity:1; }
.reference-card__delete:hover { background:#a54042; }
.reference-card__delete:disabled { cursor:wait; opacity:.65; }
.reference-card__order {
  position:absolute;
  z-index:2;
  bottom:8px;
  left:8px;
  display:flex;
  align-items:center;
  gap:3px;
  min-height:24px;
  padding:3px 4px 3px 7px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:4px;
  background:rgba(31,46,36,.82);
  color:#fff;
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.reference-card__move {
  display:grid;
  width:18px;
  height:18px;
  place-items:center;
  border:0;
  border-radius:3px;
  padding:0;
  background:rgba(255,255,255,.16);
  color:#fff;
  cursor:pointer;
  font-size:12px;
  line-height:1;
}
.reference-card__move:hover:not(:disabled) { background:#60935f; }
.reference-card__move:disabled { cursor:default; opacity:.32; }
.reference-card__move:focus-visible { outline:2px solid #c5ec8c; outline-offset:1px; }
.character-public-profile {
  margin:0;
  padding:14px;
  border:1px solid #cfe0ca;
  border-radius:8px;
  background:#fbfdf9;
}
.character-public-profile legend {
  max-width:100%;
  padding:0 5px;
  color:#335940;
  font:700 10px/1.2 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.character-public-profile legend small {
  margin-left:7px;
  color:#728275;
  font:600 10px/1.4 "Avenir Next",Avenir,sans-serif;
  letter-spacing:0;
  text-transform:none;
}
.character-public-profile__fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px 18px;
}
.character-public-profile__fields > label { grid-column:auto !important; }
.character-public-profile__bio,
.character-public-profile__labels { grid-column:1 / -1 !important; }
.communication-traits {
  margin:16px 0 0;
  border-top:1px dashed #c7d7c5;
  padding-top:12px;
}
.communication-traits summary {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  color:#385344;
  font:700 11px/1.2 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.communication-traits summary::marker { color:#65946c; }
.communication-traits summary small {
  max-width:440px;
  color:#718274;
  font:500 11px/1.35 "Avenir Next",Avenir,sans-serif;
  letter-spacing:0;
  text-align:right;
  text-transform:none;
}
.communication-traits__fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 14px;
  margin-top:14px;
}
.communication-traits__fields label {
  display:grid;
  grid-template-columns:minmax(0,1fr) 46px;
  align-items:end;
  gap:3px 10px;
  color:#405846;
  font-weight:700;
}
.communication-traits__fields label small {
  grid-column:1;
  color:#7c8d7e;
  font-size:10px;
  font-weight:500;
  line-height:1.25;
}
.communication-traits__fields input { grid-column:2; grid-row:1 / span 2; min-width:0; text-align:center; }
.chat-image-library {
  overflow:hidden;
  border:1px solid #bed2bc;
  border-radius:10px;
  background:#f7fbf5;
}
.chat-image-library > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  cursor:pointer;
  color:#294b38;
  font:700 11px/1.2 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.chat-image-library > summary small { color:#6e856f; font:600 10px/1.2 "Avenir Next",Avenir,sans-serif; letter-spacing:0; text-transform:none; }
.chat-image-library__body { display:grid; gap:14px; border-top:1px solid #d5e2d1; padding:14px; }
.chat-image-library__body > p { margin:0; color:#627762; font-size:12px; line-height:1.5; }
.chat-image-form { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; }
.chat-image-form label { display:grid; gap:5px; color:#405846; font-size:11px; font-weight:700; }
.chat-image-form label small { color:#768978; font-size:10px; font-weight:500; }
.chat-image-form label code { color:#476a4b; font-family:"SFMono-Regular",Consolas,monospace; }
.chat-image-form__footer { grid-column:1 / -1; }
.chat-image-form__footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.chat-image-form__footer span { color:#617763; font-size:11px; }
.chat-image-form__footer span.is-error { color:#a24f44; }
.chat-image-form__footer button,
.chat-image-list__edit,
.chat-image-list__remove { border:1px solid #8db386; border-radius:6px; padding:8px 10px; background:#315f3c; color:#fff; cursor:pointer; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.05em; text-transform:uppercase; }
.chat-image-form__footer button:disabled { cursor:wait; opacity:.55; }
.chat-image-list { display:grid; gap:8px; }
.chat-image-list__empty { margin:0; color:#6d806f; font-size:12px; }
.chat-image-list__item { display:grid; grid-template-columns:52px minmax(0,1fr) auto; gap:10px; align-items:center; border-top:1px solid #d9e5d6; padding-top:9px; }
.chat-image-list__item img { width:52px; height:62px; border-radius:4px; object-fit:cover; }
.chat-image-list__item p { margin:0 0 3px; color:#334b3a; font-size:12px; line-height:1.35; }
.chat-image-list__item small { display:block; color:#6e836f; font:600 10px/1.3 "SFMono-Regular",Consolas,monospace; }
.chat-image-list__actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.chat-image-list__remove { border-color:#d3a49d; background:transparent; color:#8b4942; }
.gallery-card__chat-image { border-color:#80a99a; color:#315f50; }
.profile-intake__public-profile { grid-column:1 / -1; }
.profile-photo-selection {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin:-2px 0 11px;
  padding:12px 14px;
  border:1px solid #d7e2d3;
  border-radius:8px;
  background:#fbfdf8;
}
.profile-photo-selection span {
  display:block;
  margin-bottom:4px;
  color:#578052;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.profile-photo-selection p { margin:0; color:#63736a; font-size:11px; line-height:1.45; }
.profile-photo-selection strong {
  flex:none;
  color:#274f35;
  font:700 10px/1.35 "SFMono-Regular",Consolas,monospace;
  text-align:right;
}
.reference-card__profile-photo {
  position:absolute;
  z-index:2;
  right:8px;
  bottom:8px;
  border:1px solid rgba(255,255,255,.8);
  border-radius:4px;
  padding:5px 7px;
  background:rgba(31,46,36,.78);
  color:#fff;
  cursor:pointer;
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.reference-card__profile-photo:hover { background:#497d48; }
.reference-card.is-profile-photo .reference-card__profile-photo { background:#386f42; }
.reference-card.is-profile-photo:not(.is-selected) .reference-card__caption { display:none; }
.reference-card.is-profile-photo { outline-color:#8ab36e; }
@media (max-width:540px) {
  .character-public-profile__fields { grid-template-columns:1fr; }
  .communication-traits summary { align-items:flex-start; flex-direction:column; }
  .communication-traits summary small { max-width:none; text-align:left; }
  .communication-traits__fields { grid-template-columns:1fr; }
  .chat-image-form { grid-template-columns:1fr; }
  .chat-image-list__item { grid-template-columns:44px minmax(0,1fr); }
  .chat-image-list__item img { width:44px; height:54px; }
  .chat-image-list__remove { grid-column:2; justify-self:start; }
  .profile-photo-selection { align-items:flex-start; flex-direction:column; }
  .profile-photo-selection strong { text-align:left; }
}
.render-reference-brief {
  display:flex;
  align-items:center;
  gap:8px;
  margin:-7px 0 17px;
  padding:9px 10px;
  border:1px solid #d7e3d2;
  border-radius:7px;
  background:rgba(244,249,240,.72);
  color:#66766d;
}
.render-reference-brief > span {
  color:#67835e;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.render-reference-brief strong { color:#284e35; font:700 10px/1 "SFMono-Regular",Consolas,monospace; }
.render-reference-brief button {
  margin-left:auto;
  border:0;
  padding:0;
  background:transparent;
  color:#315f3c;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  text-decoration:underline;
  text-underline-offset:3px;
}
.render-reference-brief button:hover { color:#9e493e; }
.render-reference-brief--nested { margin:17px 0 -2px; }
.sequence-form { display:grid; gap:16px; }
.sequence-form label { display:grid; gap:7px; color:#45554e; font-size:11px; font-weight:800; letter-spacing:.03em; }
.sequence-form textarea,
.sequence-form input,
.sequence-form select {
  width:100%;
  padding:10px 0;
  border:0;
  border-bottom:1px solid #c9d3cc;
  border-radius:0;
  outline:0;
  background:transparent;
  color:#182520;
  font:400 14px/1.45 "Avenir Next",Avenir,"Helvetica Neue",sans-serif;
}
.sequence-form textarea { min-height:106px; resize:vertical; }
.sequence-form select { cursor:pointer; }
.sequence-form textarea:focus,
.sequence-form input:focus,
.sequence-form select:focus { border-color:#5b9959; box-shadow:0 1px #5b9959; }
.sequence-form__wide { grid-column:1 / -1; }
.sequence-form__options { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.sequence-form__footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top:3px;
}
.sequence-form__footer > span {
  min-height:1.2em;
  color:#5c6d63;
  font-size:11px;
  line-height:1.45;
}
.sequence-form__footer > span.is-error { color:#a93d4c; }
.sequence-form__footer button {
  flex:none;
  border:1px solid #315b3d;
  padding:12px 14px;
  background:#315b3d;
  color:#fff;
  cursor:pointer;
  font-weight:800;
}
.sequence-form__footer button:hover { border-color:#477a4b; background:#477a4b; }
.manual-bulk {
  margin-top:22px;
  border-top:1px solid #d7e1d5;
}
.manual-bulk summary {
  display:flex;
  justify-content:space-between;
  padding:16px 0 0;
  color:#52725a;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.07em;
  list-style:none;
  text-transform:uppercase;
}
.manual-bulk summary::-webkit-details-marker { display:none; }
.manual-bulk summary span { font-size:14px; transition:transform .2s ease; }
.manual-bulk[open] summary span { transform:rotate(180deg); }
.manual-bulk .bulk-form { margin-top:18px; }

@media (max-width:540px) {
  .reference-selection,
  .sequence-form__footer { align-items:flex-start; flex-direction:column; }
  .reference-selection strong { text-align:left; }
  .sequence-form__options { grid-template-columns:1fr; }
  .platform-roster { grid-template-columns:1fr; }
  .platform-roster legend small { display:block; margin:5px 0 0; }
  .render-reference-brief { flex-wrap:wrap; }
  .render-reference-brief button { margin-left:0; }
}
@media (prefers-reduced-motion: reduce) {
  .reference-card,
  .manual-bulk summary span { transition:none; }
}

/* Carousel posts share the same compact visual rhythm as one-image posts. */
.gallery-card__slide {
  display:block;
  margin-bottom:6px;
  color:#61875f;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.carousel-gallery {
  overflow:hidden;
}
.carousel-gallery__cover {
  position:relative;
  width:100%;
  aspect-ratio:4/5;
  overflow:hidden;
}
.carousel-gallery__cover > .image-preview-trigger { height:100%; }
.carousel-gallery__cover .gallery-card__state { height:100%; aspect-ratio:auto; }
.carousel-gallery__previous,
.carousel-gallery__next {
  position:absolute;
  z-index:2;
  top:50%;
  width:31px;
  height:37px;
  transform:translateY(-50%);
  border:1px solid rgba(237,245,233,.7);
  border-radius:6px;
  background:rgba(24,47,35,.78);
  color:#fff;
  cursor:pointer;
  font:400 29px/.8 "Iowan Old Style", Georgia, serif;
}
.carousel-gallery__previous { left:8px; }
.carousel-gallery__next { right:8px; }
.carousel-gallery__previous:hover,
.carousel-gallery__next:hover { background:#315f3c; }
.carousel-gallery__previous:focus-visible,
.carousel-gallery__next:focus-visible {
  outline:2px solid #c5ec8c;
  outline-offset:2px;
}
.carousel-gallery__badge {
  position:absolute;
  right:9px;
  bottom:9px;
  padding:6px 8px;
  border:1px solid rgba(237,245,233,.48);
  border-radius:999px;
  background:rgba(27,56,40,.86);
  color:#fff;
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.04em;
  text-transform:uppercase;
}

/* Gallery actions keep long prompt details available without turning the
   contact sheet into a wall of metadata. */
.gallery-panel__toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:-4px 0 22px;
  padding-bottom:12px;
  border-bottom:1px solid #dce7db;
}
.gallery-tabs { display:flex; align-items:stretch; gap:5px; }
.gallery-tab {
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid transparent;
  border-radius:999px;
  padding:7px 9px 7px 11px;
  background:transparent;
  color:#607168;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.gallery-tab:hover { color:#315b3d; background:#f0f7ed; }
.gallery-tab.is-active { border-color:#a9c9a1; background:#e8f3e3; color:#294f34; }
.gallery-tab:focus-visible { outline:3px solid rgba(93,153,90,.42); outline-offset:2px; }
.gallery-tab span {
  display:grid;
  min-width:18px;
  height:18px;
  place-items:center;
  border-radius:50%;
  background:#dce8d8;
  color:#547453;
  font-size:9px;
}
.gallery-tab.is-active span { background:#477d4c; color:#fff; }
.gallery-panel__actions { display:flex; align-items:center; gap:10px; }
.gallery-panel__footer {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
  padding-top:15px;
  border-top:1px solid #dce7db;
}
.gallery-panel__selection {
  color:#607168;
  font:700 9px/1.35 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.035em;
  text-transform:uppercase;
  white-space:nowrap;
}
.gallery-panel__actions > button,
.gallery-panel__footer > button,
.gallery-card__actions button {
  border:0;
  padding:0;
  background:transparent;
  color:#426b47;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  text-decoration:underline;
  text-underline-offset:3px;
}
.gallery-panel__actions > button,
.gallery-panel__footer > button { color:#315b3d; white-space:nowrap; }
.gallery-panel__actions > button:disabled,
.gallery-panel__footer > button:disabled { color:#9aa49b; cursor:not-allowed; text-decoration:none; }
.gallery-card__actions { display:flex; flex-wrap:wrap; gap:9px 12px; margin-top:11px; }
.gallery-card__actions .gallery-card__delete { margin-top:0; }
.gallery-card__prompt { color:#52625a !important; }
.gallery-card__regenerate { color:#315b3d !important; }
.gallery-card__stop,
.carousel-gallery__stop { color:#a94e40 !important; }
.gallery-card__tag-more {
  border:0;
  padding:0;
  background:transparent;
  color:#315b3d;
  cursor:help;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  text-decoration:underline;
  text-underline-offset:2px;
}
.gallery-panel__actions #gallery-approve-all,
.gallery-panel__actions #gallery-create-carousel,
.gallery-panel__footer #gallery-create-carousel-bottom,
.gallery-card__approval,
.carousel-gallery__approval {
  color:#255b34;
}
.gallery-panel__actions #gallery-approve-all:not(:disabled),
.gallery-panel__actions #gallery-create-carousel:not(:disabled),
.gallery-panel__footer #gallery-create-carousel-bottom:not(:disabled) {
  padding:7px 9px;
  border:1px solid #6eaa6e;
  border-radius:999px;
  background:#eff8e9;
  text-decoration:none;
}
.gallery-panel__actions #gallery-approve-all:not(:disabled):hover,
.gallery-panel__actions #gallery-create-carousel:not(:disabled):hover,
.gallery-panel__footer #gallery-create-carousel-bottom:not(:disabled):hover { background:#dff0d6; }
.gallery-card__select {
  padding:6px 8px !important;
  border:1px solid #89b783 !important;
  border-radius:999px !important;
  background:#f1f8ed !important;
  color:#315b3d !important;
  text-decoration:none !important;
}
.gallery-card__select:hover { border-color:#528c54 !important; background:#e0f0da !important; }
.gallery-card__select.is-selected {
  border-color:#356f42 !important;
  background:#356f42 !important;
  color:#fff !important;
}
.gallery-card--selected-for-carousel {
  border-color:#4f8a53 !important;
  box-shadow:0 0 0 2px rgba(79,138,83,.2);
}
.gallery-card--selected-for-carousel { position:relative; }
.gallery-card__selection-badge {
  position:absolute;
  top:9px;
  left:9px;
  z-index:2;
  padding:5px 7px;
  border:1px solid rgba(237,245,233,.55);
  border-radius:999px;
  background:rgba(36,91,52,.92);
  color:#fff;
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.04em;
  text-transform:uppercase;
  pointer-events:none;
}
.gallery-card--approved { border-color:#8fbc82; }
.gallery-card__approval.is-approved,
.carousel-gallery__approval.is-approved { color:#477b4a !important; }
.carousel-gallery--approved { border-color:#8cba82; }

@media (max-width:540px) {
  .gallery-panel__toolbar { align-items:flex-start; flex-direction:column; gap:11px; }
  .gallery-panel__actions { align-items:flex-start; flex-direction:column; gap:7px; }
  .gallery-panel__footer { align-items:flex-start; flex-direction:column; }
}

/* Every studio image opens in the same focused, full-size viewer. */
.image-preview-trigger {
  display:block;
  width:100%;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  cursor:zoom-in;
}
.image-preview-trigger > img { display:block; width:100%; height:100%; object-fit:cover; }
.reference-card > .image-preview-trigger { height:100%; min-height:92px; }
.gallery-card > .image-preview-trigger { aspect-ratio:4/5; }
.image-preview-trigger:focus-visible { outline:3px solid #c5ec8c; outline-offset:-3px; }
.image-viewer {
  width:min(1280px,calc(100vw - 36px));
  max-width:none;
  max-height:calc(100vh - 36px);
  margin:auto;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:0 24px 90px rgba(0,0,0,.5);
}
.image-viewer::backdrop { background:rgba(15,24,20,.86); backdrop-filter:blur(5px); }
.image-viewer__frame {
  position:relative;
  display:grid;
  place-items:center;
  max-height:calc(100vh - 36px);
  padding:14px;
  border:1px solid rgba(220,236,216,.32);
  border-radius:12px;
  background:#1b2921;
}
.image-viewer__frame img {
  display:block;
  max-width:100%;
  max-height:calc(100vh - 92px);
  object-fit:contain;
  border-radius:6px;
}
.image-viewer__close {
  position:absolute;
  z-index:1;
  top:24px;
  right:24px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.65);
  border-radius:6px;
  background:rgba(20,32,26,.86);
  color:#fff;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.image-viewer__close:hover { background:#315f3c; }
.image-viewer__caption {
  position:absolute;
  right:20px;
  bottom:20px;
  left:20px;
  max-width:760px;
  margin:0;
  padding:8px 10px;
  border-radius:5px;
  background:rgba(20,32,26,.82);
  color:#edf5e9;
  font-size:12px;
  line-height:1.4;
}
.comfy-prompt-viewer {
  width:min(760px,calc(100vw - 36px));
  max-height:calc(100vh - 36px);
  margin:auto;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:0 24px 90px rgba(0,0,0,.5);
}
.comfy-prompt-viewer::backdrop { background:rgba(15,24,20,.86); backdrop-filter:blur(5px); }
.comfy-prompt-viewer__panel {
  display:grid;
  max-height:calc(100vh - 36px);
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(220,236,216,.32);
  border-radius:12px;
  background:#1b2921;
  color:#edf5e9;
}
.comfy-prompt-viewer__header,
.comfy-prompt-viewer__footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 18px;
  background:#203228;
}
.comfy-prompt-viewer__header { border-bottom:1px solid rgba(220,236,216,.2); }
.comfy-prompt-viewer__footer { border-top:1px solid rgba(220,236,216,.2); }
.comfy-prompt-viewer__eyebrow {
  display:block;
  margin-bottom:5px;
  color:#a9cf9f;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.comfy-prompt-viewer h2 { margin:0; color:#fff; font:400 27px/.95 "Iowan Old Style",Georgia,serif; letter-spacing:-.035em; }
.comfy-prompt-viewer__text {
  min-height:160px;
  margin:0;
  padding:19px;
  overflow:auto;
  background:#18241d;
  color:#dcebd7;
  font:400 12px/1.65 "SFMono-Regular",Consolas,monospace;
  text-align:left;
  white-space:pre-wrap;
  word-break:break-word;
}
.comfy-prompt-viewer__footer span { color:#b8c9b7; font-size:11px; }
.comfy-prompt-viewer__close,
.comfy-prompt-viewer__copy {
  flex:none;
  border:1px solid rgba(220,236,216,.45);
  border-radius:6px;
  padding:8px 10px;
  background:transparent;
  color:#fff;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.comfy-prompt-viewer__copy { border-color:#86b67e; background:#315f3c; }
.comfy-prompt-viewer__close:hover { background:#315f3c; }
.comfy-prompt-viewer__copy:hover { background:#477d4c; }
.caption-editor {
  width:min(610px,calc(100vw - 36px));
  margin:auto;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:0 24px 90px rgba(0,0,0,.5);
}
.caption-editor::backdrop { background:rgba(15,24,20,.86); backdrop-filter:blur(5px); }
.caption-editor__panel { overflow:hidden; border:1px solid rgba(220,236,216,.32); border-radius:12px; background:#1b2921; color:#edf5e9; }
.caption-editor__header,
.caption-editor__footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 18px; background:#203228; }
.caption-editor__header { border-bottom:1px solid rgba(220,236,216,.2); }
.caption-editor__eyebrow { display:block; margin-bottom:5px; color:#a9cf9f; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; text-transform:uppercase; }
.caption-editor h2 { margin:0; color:#fff; font:400 27px/.95 "Iowan Old Style",Georgia,serif; letter-spacing:-.035em; }
.caption-editor__form { display:grid; gap:10px; padding:18px; background:#18241d; }
.caption-editor__form label { display:grid; gap:8px; color:#dcebd7; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.08em; text-transform:uppercase; }
.caption-editor__form textarea { width:100%; min-height:122px; resize:vertical; border:1px solid rgba(220,236,216,.28); border-radius:7px; padding:11px; outline:0; background:#233128; color:#f4f9ef; font:400 14px/1.55 "Avenir Next",Avenir,sans-serif; }
.caption-editor__form textarea:focus { border-color:#a9cf9f; box-shadow:0 0 0 3px rgba(169,207,159,.16); }
.caption-editor__help { margin:0; color:#b8c9b7; font-size:11px; line-height:1.45; }
.caption-editor__footer { margin:7px -18px -18px; border-top:1px solid rgba(220,236,216,.2); }
.caption-editor__footer > span { margin-right:auto; color:#b8c9b7; font-size:11px; }
.caption-editor__footer > span.is-error { color:#f4b1a8; }
.caption-editor__close,
.caption-editor__cancel,
.caption-editor__save { flex:none; border:1px solid rgba(220,236,216,.45); border-radius:6px; padding:8px 10px; background:transparent; color:#fff; cursor:pointer; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.05em; text-transform:uppercase; }
.caption-editor__save { border-color:#86b67e; background:#315f3c; }
.caption-editor__close:hover,
.caption-editor__cancel:hover { background:#315f3c; }
.caption-editor__save:hover { background:#477d4c; }
.caption-editor__cancel:disabled,
.caption-editor__save:disabled { cursor:wait; opacity:.55; }
.wardrobe-editor { width:min(500px,calc(100% - 32px)); border:0; padding:0; background:transparent; }
.wardrobe-editor::backdrop { background:rgba(15,24,20,.86); backdrop-filter:blur(5px); }
.wardrobe-editor__panel { overflow:hidden; border:1px solid rgba(220,236,216,.32); border-radius:12px; background:#1b2921; color:#edf5e9; }
.wardrobe-editor__header,
.wardrobe-editor__footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 18px; background:#203228; }
.wardrobe-editor__header { border-bottom:1px solid rgba(220,236,216,.2); }
.wardrobe-editor__eyebrow { display:block; margin-bottom:5px; color:#a9cf9f; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; text-transform:uppercase; }
.wardrobe-editor h2 { margin:0; color:#fff; font:400 27px/.95 "Iowan Old Style",Georgia,serif; letter-spacing:-.035em; }
.wardrobe-editor__form { display:grid; gap:10px; padding:18px; background:#18241d; }
.wardrobe-editor__form label { display:grid; gap:8px; color:#dcebd7; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.08em; text-transform:uppercase; }
.wardrobe-editor__form select { width:100%; border:1px solid rgba(220,236,216,.28); border-radius:7px; padding:11px; outline:0; background:#233128; color:#f4f9ef; font:600 14px/1.35 "Avenir Next",Avenir,sans-serif; }
.wardrobe-editor__form select:focus { border-color:#a9cf9f; box-shadow:0 0 0 3px rgba(169,207,159,.16); }
.wardrobe-editor__help { margin:0; color:#b8c9b7; font-size:11px; line-height:1.45; }
.wardrobe-editor__footer { margin:7px -18px -18px; border-top:1px solid rgba(220,236,216,.2); }
.wardrobe-editor__footer > span { margin-right:auto; color:#b8c9b7; font-size:11px; }
.wardrobe-editor__footer > span.is-error { color:#f4b1a8; }
.wardrobe-editor__close,
.wardrobe-editor__cancel,
.wardrobe-editor__save { flex:none; border:1px solid rgba(220,236,216,.45); border-radius:6px; padding:8px 10px; background:transparent; color:#fff; cursor:pointer; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.05em; text-transform:uppercase; }
.wardrobe-editor__save { border-color:#86b67e; background:#315f3c; }
.wardrobe-editor__close:hover,
.wardrobe-editor__cancel:hover { background:#315f3c; }
.wardrobe-editor__save:hover { background:#477d4c; }
.wardrobe-editor__cancel:disabled,
.wardrobe-editor__save:disabled { cursor:wait; opacity:.55; }
.topaz-image-editor {
  width:min(680px,calc(100vw - 36px));
  margin:auto;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:0 24px 90px rgba(0,0,0,.5);
}
.topaz-image-editor::backdrop { background:rgba(15,24,20,.86); backdrop-filter:blur(5px); }
.topaz-image-editor__panel {
  overflow:hidden;
  border:1px solid rgba(220,236,216,.32);
  border-radius:12px;
  background:#1b2921;
  color:#edf5e9;
}
.topaz-image-editor__header,
.topaz-image-editor__footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 18px;
  background:#203228;
}
.topaz-image-editor__header { border-bottom:1px solid rgba(220,236,216,.2); }
.topaz-image-editor__footer { border-top:1px solid rgba(220,236,216,.2); }
.topaz-image-editor__eyebrow {
  display:block;
  margin-bottom:5px;
  color:#a9cf9f;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.topaz-image-editor h2 { margin:0; color:#fff; font:400 27px/.95 "Iowan Old Style",Georgia,serif; letter-spacing:-.035em; }
.topaz-image-editor__form { display:grid; gap:0; }
.topaz-image-editor__settings {
  display:grid;
  gap:13px;
  margin:0;
  padding:18px;
  border:0;
  border-radius:0;
  background:#17271e;
}
.topaz-image-editor__settings legend {
  padding:0;
  color:#a9cf9f;
  font:700 9px/1.2 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.topaz-image-editor__choices {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.topaz-image-editor__choices label {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:9px 10px;
  border:1px solid rgba(220,236,216,.2);
  border-radius:6px;
  background:rgba(255,255,255,.05);
  color:#dcebd7 !important;
  font:600 10px/1.25 "Avenir Next",Avenir,sans-serif;
  letter-spacing:0;
}
.topaz-image-editor__choices label:nth-child(2) {
  display:grid;
  grid-template-columns:1fr;
  align-content:center;
  gap:3px;
}
.topaz-image-editor__choices input[type="checkbox"] {
  width:auto;
  margin:0;
  accent-color:#77b66f;
}
.topaz-image-editor__choices select {
  width:100%;
  min-width:0;
  padding:0 0 2px;
  border:0;
  border-bottom:1px solid rgba(220,236,216,.35);
  outline:0;
  background:transparent;
  color:#dcebd7;
  font:600 10px/1.25 "Avenir Next",Avenir,sans-serif;
}
.topaz-image-editor__choices select:focus { border-bottom-color:#a9cf9f; }
.topaz-image-editor__settings > p { margin:0; color:#b8c9b7; font-size:10px; line-height:1.45; }
.topaz-image-editor__footer span { color:#b8c9b7; font-size:11px; line-height:1.4; }
.topaz-image-editor__footer span.is-error { color:#f4b1a8; }
.topaz-image-editor__close,
.topaz-image-editor__run {
  flex:none;
  border:1px solid rgba(220,236,216,.45);
  border-radius:6px;
  padding:8px 10px;
  background:transparent;
  color:#fff;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.topaz-image-editor__run { border-color:#86b67e; background:#315f3c; }
.topaz-image-editor__close:hover { background:#315f3c; }
.topaz-image-editor__run:hover { background:#477d4c; }
.topaz-image-editor__close:disabled,
.topaz-image-editor__run:disabled { cursor:wait; opacity:.55; }
.topaz-comparison {
  width:min(1080px,calc(100vw - 36px));
  max-height:calc(100vh - 28px);
  margin:auto;
  padding:0;
  overflow:auto;
  border:0;
  border-radius:13px;
  background:transparent;
  box-shadow:0 24px 90px rgba(0,0,0,.58);
}
.topaz-comparison::backdrop { background:rgba(12,22,17,.88); backdrop-filter:blur(5px); }
.topaz-comparison__panel {
  overflow:hidden;
  border:1px solid rgba(220,236,216,.32);
  border-radius:13px;
  background:#132018;
  color:#edf5e9;
}
.topaz-comparison__header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:17px 20px;
  border-bottom:1px solid rgba(220,236,216,.2);
  background:#1c3024;
}
.topaz-comparison__eyebrow {
  display:block;
  margin-bottom:6px;
  color:#b3d9a9;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.topaz-comparison h2 {
  margin:0;
  color:#fff;
  font:400 30px/.98 "Iowan Old Style",Georgia,serif;
  letter-spacing:-.035em;
}
.topaz-comparison__header p {
  margin:6px 0 0;
  color:#b8c9b7;
  font-size:11px;
}
.topaz-comparison__close,
.topaz-comparison__choose {
  flex:none;
  border:1px solid rgba(220,236,216,.45);
  border-radius:6px;
  padding:9px 11px;
  background:transparent;
  color:#fff;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.topaz-comparison__close:hover { background:#315f3c; }
.topaz-comparison__options {
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  padding:18px;
  background:linear-gradient(90deg,#15231a 0,#15231a 49.8%,#a8ce94 49.8%,#a8ce94 50.2%,#15231a 50.2%,#15231a 100%);
}
.topaz-comparison__option {
  display:grid;
  grid-template-rows:auto minmax(240px,1fr) auto;
  gap:0;
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(220,236,216,.27);
  background:#0d1711;
}
.topaz-comparison__option--before { margin-right:10px; border-radius:8px 0 0 8px; }
.topaz-comparison__option--after { margin-left:10px; border-radius:0 8px 8px 0; border-color:#8fbc82; }
.topaz-comparison__option-header {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(220,236,216,.16);
  background:#1a2a20;
}
.topaz-comparison__option-header span {
  color:#a9cf9f;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.topaz-comparison__option-header strong { color:#fff; font-size:12px; }
.topaz-comparison__option img {
  display:block;
  width:100%;
  min-height:0;
  max-height:min(62vh,720px);
  background:#09100c;
  object-fit:contain;
}
.topaz-comparison__choose {
  margin:11px;
  border-color:#6d9870;
  background:transparent;
}
.topaz-comparison__choose:hover { background:#294e33; }
.topaz-comparison__option--after .topaz-comparison__choose { border-color:#a5d297; background:#356c40; }
.topaz-comparison__option--after .topaz-comparison__choose:hover { background:#4b8752; }
.topaz-comparison__close:disabled,
.topaz-comparison__choose:disabled { cursor:wait; opacity:.55; }
.topaz-comparison__footer {
  padding:12px 20px;
  border-top:1px solid rgba(220,236,216,.2);
  background:#1c3024;
  color:#b8c9b7;
  font-size:11px;
  line-height:1.4;
}
.topaz-comparison__footer .is-error { color:#f4b1a8; }
@media (max-width:700px) {
  .topaz-comparison { width:min(600px,calc(100vw - 24px)); }
  .topaz-comparison__options { grid-template-columns:1fr; gap:12px; padding:12px; background:#15231a; }
  .topaz-comparison__option--before,
  .topaz-comparison__option--after { margin:0; border-radius:8px; }
  .topaz-comparison__header { padding:15px; }
  .topaz-comparison h2 { font-size:27px; }
}
.profile-intake label small,
.character-editor label small { color:#75807a; font-size:10px; font-weight:600; letter-spacing:0; }
.character-editor[open] summary { border-bottom:1px solid #dce4de; background:#edf4e9; }
.profile-intake__form > .topaz-settings,
.character-editor__form > .topaz-settings,
.character-editor__form > .character-bible,
.character-editor__form > .scene-planner { grid-column:1 / -1; }
.character-bible { margin:0; padding:12px 13px 14px; border:1px solid #cdddc9; border-radius:9px; background:#f9fcf7; }
.character-bible summary { color:#416c47; cursor:pointer; font:700 10px/1.3 "SFMono-Regular",Consolas,monospace; letter-spacing:.08em; text-transform:uppercase; }
.character-bible summary small { margin-left:8px; color:#6f8173; font:400 10px/1.35 "Avenir Next",Avenir,sans-serif; letter-spacing:0; text-transform:none; }
.character-bible__fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:13px; }
.character-bible__fields label { color:#416c47; font-size:10px; }
.character-bible__fields textarea { min-height:70px; }
.scene-planner { margin:0; padding:13px; border:1px solid #a8c3aa; border-radius:9px; background:linear-gradient(135deg,#e8f1e5,#f8fbf5 60%); }
.character-editor .scene-planner > summary { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:0; color:#28533a; cursor:pointer; font:700 10px/1.3 "SFMono-Regular",Consolas,monospace; letter-spacing:.08em; text-transform:uppercase; }
.scene-planner > summary small { max-width:390px; color:#64766a; font:400 10px/1.4 "Avenir Next",Avenir,sans-serif; letter-spacing:0; text-align:right; text-transform:none; }
.scene-planner__body { display:grid; gap:12px; margin-top:13px; }
.scene-planner__body > label { color:#315f3c; font-size:10px; }
.scene-planner__body textarea { min-height:124px; padding:10px 11px; border:1px solid #c8d9c5; border-radius:5px; background:rgba(255,255,255,.62); }
.scene-planner__actions,.scene-planner__preview-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.scene-planner__actions > span { color:#58705d; font-size:10px; }
.scene-planner__actions button,.scene-planner__preview-actions button { border-color:#719d74; background:#f9fcf7; color:#315f3c; }
.scene-planner__preview { border-top:1px solid #c8d9c5; padding-top:12px; }
.character-editor .scene-planner__preview > summary { display:flex; align-items:center; justify-content:space-between; padding:0; color:#315f3c; cursor:pointer; font:700 10px/1.3 "SFMono-Regular",Consolas,monospace; letter-spacing:.07em; text-transform:uppercase; }
.scene-planner__preview > div { display:grid; gap:10px; margin-top:12px; }
.scene-planner__preview p { margin:0; color:#65766a; font-size:11px; line-height:1.5; }
.scene-planner__preview-actions { justify-content:flex-start; }
.scene-planner__preview-status { min-height:1.2em; color:#52735a; font-size:10px; }
.scene-planner__preview-status.is-error { color:#a93d4c; }
.scene-planner__preview pre { max-height:460px; margin:0; overflow:auto; padding:14px; border:1px solid #2f5540; border-radius:5px; background:repeating-linear-gradient(0deg,#183426,#183426 26px,#1a392a 27px); color:#dcebd4; font:11px/1.55 "SFMono-Regular",Consolas,monospace; white-space:pre-wrap; word-break:break-word; }
.topaz-settings {
  display:grid;
  gap:12px;
  margin:0;
  padding:15px;
  border:1px solid #d3e0cd;
  border-radius:9px;
  background:linear-gradient(115deg,#eff6eb,#f9fbf7 68%);
}
.topaz-settings legend {
  padding:0;
  color:#416c47;
  font:700 10px/1.3 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.topaz-settings legend small {
  margin-left:8px;
  color:#6f8173;
  font:400 10px/1.35 "Avenir Next",Avenir,sans-serif;
  letter-spacing:0;
  text-transform:none;
}
.topaz-settings__enable { color:#234b31 !important; }
.topaz-settings__choices {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
  transition:opacity .16s ease;
}
.topaz-settings__choices label {
  display:flex !important;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:8px 9px;
  border:1px solid #d8e3d5;
  border-radius:6px;
  background:rgba(255,255,255,.66);
  color:#45614b !important;
  font-size:10px !important;
  letter-spacing:0 !important;
}
.topaz-settings input[type="checkbox"] {
  width:auto !important;
  margin:0;
  padding:0 !important;
  border:0 !important;
  box-shadow:none !important;
  accent-color:#437f47;
}
.topaz-settings select {
  min-width:0;
  width:100%;
  margin-top:3px;
  border:0;
  border-bottom:1px solid #bed0bd;
  outline:0;
  background:transparent;
  color:#31573a;
  font:600 10px/1.35 "Avenir Next",Avenir,sans-serif;
}
.topaz-settings select:focus { border-color:#538e55; }
.topaz-settings__choices.is-disabled { opacity:.48; }
.topaz-settings > p { margin:0; color:#708079; font-size:10px; line-height:1.45; }
.gallery-card__finish {
  display:block;
  margin-top:8px;
  color:#487849;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.045em;
  text-transform:uppercase;
}
@media (max-width:1000px) { .topaz-settings__choices { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:620px) {
  .topaz-settings__choices { grid-template-columns:1fr 1fr; }
  .topaz-settings legend small { display:block; margin:5px 0 0; }
  .character-bible__fields { grid-template-columns:1fr; }
  .character-bible summary small { display:block; margin:5px 0 0; }
  .scene-planner > summary small { display:block; text-align:left; }
  .scene-planner__actions,.scene-planner__preview-actions { align-items:flex-start; flex-direction:column; }
}
.carousel-gallery__view {
  border:0;
  padding:0;
  background:transparent;
  color:#315b3d;
  cursor:pointer;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  text-decoration:underline;
  text-underline-offset:3px;
}
.carousel-viewer {
  width:min(1080px,calc(100vw - 36px));
  max-height:calc(100vh - 36px);
  margin:auto;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:0 24px 90px rgba(0,0,0,.5);
}
.carousel-viewer::backdrop { background:rgba(15,24,20,.86); backdrop-filter:blur(5px); }
.carousel-viewer__panel {
  display:grid;
  max-height:calc(100vh - 36px);
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(220,236,216,.32);
  border-radius:12px;
  background:#1b2921;
  color:#edf5e9;
}
.carousel-viewer__header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid rgba(220,236,216,.2);
  background:#203228;
}
.carousel-viewer__heading { min-width:0; }
.carousel-viewer__position {
  display:block;
  margin-bottom:4px;
  color:#a9cf9f;
  font:700 9px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.carousel-viewer__title {
  overflow:hidden;
  max-width:min(720px,calc(100vw - 200px));
  margin:0;
  color:#fff;
  font-size:13px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.carousel-viewer__close,
.carousel-viewer__previous,
.carousel-viewer__next {
  border:1px solid rgba(220,236,216,.45);
  border-radius:6px;
  background:rgba(24,36,29,.82);
  color:#fff;
  cursor:pointer;
}
.carousel-viewer__close { padding:8px 10px; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.05em; text-transform:uppercase; }
.carousel-viewer__close:hover { background:#315f3c; }
.carousel-viewer__stage { position:relative; display:grid; min-height:0; place-items:center; overflow:hidden; background:#152219; }
.carousel-viewer__stage img { display:block; max-width:100%; max-height:calc(100vh - 260px); object-fit:contain; }
.carousel-viewer__previous,
.carousel-viewer__next {
  position:absolute;
  z-index:1;
  top:50%;
  width:38px;
  height:38px;
  transform:translateY(-50%);
  font:400 34px/.8 "Iowan Old Style",Georgia,serif;
}
.carousel-viewer__previous { left:16px; }
.carousel-viewer__next { right:16px; }
.carousel-viewer__previous:hover:not(:disabled),
.carousel-viewer__next:hover:not(:disabled) { background:#315f3c; }
.carousel-viewer__previous:disabled,
.carousel-viewer__next:disabled { opacity:.35; cursor:default; }
.carousel-viewer__footer { display:grid; gap:11px; padding:13px 18px 16px; border-top:1px solid rgba(220,236,216,.2); background:#203228; }
.carousel-viewer__caption { margin:0; color:#dcebd7; font-size:12px; line-height:1.45; }
.carousel-viewer__actions { display:flex; flex-wrap:wrap; gap:8px 12px; }
.carousel-viewer__action {
  border:0;
  padding:0;
  background:transparent;
  color:#dcebd7;
  cursor:pointer;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  text-decoration:underline;
  text-underline-offset:3px;
}
.carousel-viewer__action:hover { color:#b8dfaa; }
.carousel-viewer__delete:hover { color:#f2a59a; }
.carousel-viewer__thumbnails { display:flex; gap:7px; overflow:auto; padding-bottom:1px; }
.carousel-viewer__thumbnail { flex:0 0 43px; height:54px; overflow:hidden; padding:0; border:2px solid transparent; border-radius:4px; background:#152219; cursor:pointer; }
.carousel-viewer__thumbnail.is-active { border-color:#a9cf9f; }
.carousel-viewer__thumbnail img { display:block; width:100%; height:100%; object-fit:cover; }

/* Wardrobe routing turns a visual choice into an explicit publishing rule. */
.wardrobe-routing {
  margin:0 0 24px;
  overflow:hidden;
  border:1px solid #d4e0d3;
  border-radius:14px;
  background:#fbfcfa;
  box-shadow:0 14px 34px rgba(34,65,45,.045);
}
.wardrobe-routing__header {
  position:relative;
  display:grid;
  grid-template-columns:minmax(230px,.62fr) minmax(280px,1fr);
  align-items:end;
  gap:clamp(30px,7vw,112px);
  padding:32px clamp(72px,8vw,112px) 29px clamp(24px,5vw,60px);
  background:linear-gradient(110deg,#f2f8ec 0%,#fbfcfa 61%);
  cursor:pointer;
  list-style:none;
}
.wardrobe-routing__header::-webkit-details-marker { display:none; }
.wardrobe-routing__header::after {
  position:absolute;
  top:25px;
  right:clamp(20px,3vw,36px);
  padding:7px 8px;
  border:1px solid #c7dac4;
  border-radius:999px;
  color:#426844;
  content:"Hide rules  −";
  font:700 8px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.wardrobe-routing:not([open]) .wardrobe-routing__header::after { content:"Show rules  +"; }
.wardrobe-routing[open] .wardrobe-routing__header { border-bottom:1px solid #dce7da; }
.wardrobe-routing__header:hover::after { border-color:#89af85; background:#eef6e9; }
.wardrobe-routing__header:focus-visible { outline:3px solid rgba(91,153,89,.38); outline-offset:-3px; }
.wardrobe-routing .entry-kicker { margin:0 0 10px; color:#709067; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; text-transform:uppercase; }
.wardrobe-routing h2 { margin:0; color:#1d3027; font:500 clamp(34px,4vw,54px)/.87 "Iowan Old Style",Baskerville,Georgia,serif; letter-spacing:-.06em; }
.wardrobe-routing h2 em { color:#5e8f58; }
.wardrobe-routing__header > p { max-width:510px; margin:0 0 3px; color:#62746a; font-size:13px; line-height:1.65; }
.wardrobe-routing__body { display:grid; grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr); }
.wardrobe-form { display:grid; align-content:start; gap:15px; padding:25px clamp(24px,4vw,44px) 28px; border-right:1px solid #dce7da; background:#f7faf4; }
.wardrobe-form__intro { display:grid; gap:4px; }
.wardrobe-form__intro span,
.wardrobe-library__heading > span { color:#668b5e; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.12em; text-transform:uppercase; }
.wardrobe-form__intro strong { color:#244634; font:600 21px/1.08 "Iowan Old Style",Baskerville,Georgia,serif; letter-spacing:-.025em; }
.wardrobe-form > label,
.wardrobe-rule__field { display:grid; gap:7px; color:#46594f; font-size:10px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.wardrobe-form input[type="text"],
.wardrobe-form input:not([type]),
.wardrobe-form select,
.wardrobe-rule__field input { width:100%; padding:9px 0; border:0; border-bottom:1px solid #c8d7c7; border-radius:0; outline:0; background:transparent; color:#1a2a22; font:400 14px/1.45 "Avenir Next",Avenir,"Helvetica Neue",sans-serif; letter-spacing:0; text-transform:none; }
.wardrobe-form input:focus,
.wardrobe-form select:focus,
.wardrobe-rule__field input:focus { border-color:#5b9959; box-shadow:0 1px #5b9959; }
.wardrobe-platforms,
.wardrobe-rule__platforms { display:flex; flex-wrap:wrap; gap:8px; margin:1px 0 0; padding:0; border:0; }
.wardrobe-platforms legend,
.wardrobe-rule__platforms legend { width:100%; margin-bottom:1px; color:#506758; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.09em; text-transform:uppercase; }
.wardrobe-platforms label,
.wardrobe-rule__platforms label { display:inline-flex; align-items:center; gap:6px; padding:7px 8px; border:1px solid #cbddc8; border-radius:999px; background:#fdfefc; color:#385b42; cursor:pointer; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.02em; text-transform:none; }
.wardrobe-platforms input,
.wardrobe-rule__platforms input { width:13px; height:13px; margin:0; accent-color:#477d4c; }
.wardrobe-form__footer,
.wardrobe-rule__controls { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:4px; }
.wardrobe-form__footer > span,
.wardrobe-rule__status { min-height:1.2em; color:#62746a; font-size:11px; line-height:1.35; }
.wardrobe-form__footer > span.is-error,
.wardrobe-rule__status.is-error { color:#a94e40; }
.wardrobe-form button,
.wardrobe-rule__controls button { flex:none; border:1px solid #315b3d; border-radius:5px; padding:9px 10px; background:#315b3d; color:#fff; cursor:pointer; font:700 10px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.02em; }
.wardrobe-form button:hover,
.wardrobe-rule__controls button:hover { border-color:#477a4b; background:#477a4b; }
.wardrobe-form button i { margin-left:9px; color:#c8ed96; font-size:14px; font-style:normal; }
.wardrobe-library { padding:25px clamp(24px,4vw,44px) 28px; }
.wardrobe-library__heading { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:14px; }
.wardrobe-library__heading small { max-width:320px; color:#748279; font-size:10px; line-height:1.45; text-align:right; }
.wardrobe-list { display:grid; gap:10px; }
.wardrobe-list__empty { margin:8px 0; color:#718077; font-size:12px; }
.wardrobe-rule { border:1px solid #d8e4d6; border-radius:8px; background:#fff; }
.wardrobe-rule.is-retired { opacity:.63; background:#f4f5f2; }
.wardrobe-rule form { display:grid; grid-template-columns:minmax(130px,.55fr) minmax(190px,1fr) minmax(160px,.6fr) auto; align-items:end; gap:12px; padding:13px; }
.wardrobe-rule__meta { grid-column:1 / -1; display:flex; align-items:baseline; justify-content:space-between; gap:18px; }
.wardrobe-rule__meta span { color:#406f43; font:700 9px/1 "SFMono-Regular",Consolas,monospace; letter-spacing:.1em; text-transform:uppercase; }
.wardrobe-rule.is-retired .wardrobe-rule__meta span { color:#7c817d; }
.wardrobe-rule__meta small { color:#718077; font-size:10px; line-height:1.35; text-align:right; }
.wardrobe-rule__controls { align-self:end; justify-content:flex-end; padding:0; }
.wardrobe-rule__controls .wardrobe-rule__status { max-width:180px; }
.wardrobe-rule__controls .wardrobe-rule__retire { border-color:transparent; background:transparent; color:#8b5148; text-decoration:underline; text-underline-offset:3px; }
.wardrobe-rule__controls .wardrobe-rule__retire:hover { border-color:transparent; background:transparent; color:#713b34; }

@media (max-width:540px) {
  .image-viewer { width:calc(100vw - 20px); max-height:calc(100vh - 20px); }
  .image-viewer__frame { max-height:calc(100vh - 20px); padding:8px; }
  .image-viewer__frame img { max-height:calc(100vh - 72px); }
  .image-viewer__close { top:15px; right:15px; }
  .image-viewer__caption { right:12px; bottom:12px; left:12px; font-size:11px; }
  .comfy-prompt-viewer { width:calc(100vw - 20px); max-height:calc(100vh - 20px); }
  .comfy-prompt-viewer__panel { max-height:calc(100vh - 20px); }
  .comfy-prompt-viewer__header,
  .comfy-prompt-viewer__footer { padding:13px; }
  .comfy-prompt-viewer h2 { font-size:24px; }
  .comfy-prompt-viewer__text { padding:14px; font-size:11px; }
  .carousel-viewer { width:calc(100vw - 20px); max-height:calc(100vh - 20px); }
  .carousel-viewer__panel { max-height:calc(100vh - 20px); }
  .carousel-viewer__header { padding:12px; }
  .carousel-viewer__footer { padding:11px 12px 13px; }
  .carousel-viewer__stage img { max-height:calc(100vh - 242px); }
  .carousel-viewer__previous { left:8px; }
  .carousel-viewer__next { right:8px; }
  .wardrobe-routing__header,
  .wardrobe-routing__body { grid-template-columns:1fr; }
  .wardrobe-routing__header { align-items:start; }
  .wardrobe-form { border-right:0; border-bottom:1px solid #dce7da; }
  .wardrobe-rule form { grid-template-columns:1fr; }
  .wardrobe-rule__meta,
  .wardrobe-library__heading,
  .wardrobe-form__footer,
  .wardrobe-rule__controls { align-items:flex-start; flex-direction:column; }
  .wardrobe-library__heading small,
  .wardrobe-rule__meta small { text-align:left; }
}

/* Reference controls live below the thumbnail: the photo remains an unobstructed identity anchor. */
.reference-grid { grid-template-columns:repeat(auto-fill,minmax(176px,1fr)); gap:14px; max-width:960px; }
.reference-card {
  display:flex;
  min-height:0;
  overflow:hidden;
  flex-direction:column;
  border:1px solid #d1ded0;
  border-radius:8px;
  background:#fbfdf9;
  cursor:default;
}
.reference-card > .image-preview-trigger {
  height:auto;
  min-height:0;
  aspect-ratio:1 / 1;
  cursor:zoom-in;
}
.reference-card img { min-height:0; }
.reference-card__caption {
  position:static;
  display:block;
  padding:9px 10px 6px;
  background:transparent;
  color:#6b7d70;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.075em;
}
.reference-card.is-selected .reference-card__caption,
.reference-card.is-profile-photo:not(.is-selected) .reference-card__caption { display:block; }
.reference-card__controls {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  padding:0 10px 10px;
}
.reference-card__choose,
.reference-card__profile-photo,
.reference-card__delete,
.reference-card__order {
  position:static;
  min-height:0;
  margin:0;
  border:1px solid #c7d8c4;
  border-radius:4px;
  box-shadow:none;
  background:#f5f9f3;
  color:#315b3d;
  font:700 10px/1 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.reference-card__choose {
  display:flex;
  flex:none;
  align-items:center;
  gap:4px;
  padding:8px 7px;
  cursor:pointer;
}
.reference-card.is-selected .reference-card__choose { background:#386f42; color:#fff; }
.reference-card__toggle { width:14px; height:14px; }
.reference-card__profile-photo {
  flex:0 0 auto;
  padding:8px 7px;
  white-space:nowrap;
}
.reference-card.is-profile-photo .reference-card__profile-photo { background:#e2f0de; color:#295d37; }
.reference-card__delete {
  width:32px;
  padding:6px 0 7px;
  color:#8b5148;
  font-size:15px;
  line-height:.7;
  opacity:1;
}
.reference-card__delete:hover { background:#f8e5e1; color:#913b39; }
.reference-card__order {
  display:flex;
  align-items:center;
  gap:4px;
  align-self:flex-start;
  margin:0 10px 10px;
  padding:6px 5px 6px 8px;
}
.reference-card__move {
  width:22px;
  height:22px;
  background:#e2eee0;
  color:#315b3d;
}
.reference-card__profile-photo:hover { background:#dcebd9; color:#214d2e; }
@media (max-width:540px) {
  .reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:420px; }
}

/* Character studio: a quiet workbench. Only the active decision surface stays open. */
.character-editor__form { gap:10px; padding-top:12px; }
.character-settings-section {
  grid-column:1 / -1;
  overflow:hidden;
  margin:0;
  border:1px solid #d4e1d1;
  border-radius:10px;
  background:#fbfdf9;
}
.character-settings-section > summary {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:18px;
  min-height:48px;
  padding:0 15px;
  cursor:pointer;
  color:#31553c;
  font:700 10px/1.25 "SFMono-Regular",Consolas,monospace;
  letter-spacing:.08em;
  list-style:none;
  text-transform:uppercase;
}
.character-settings-section > summary::-webkit-details-marker,
.reference-panel > summary::-webkit-details-marker { display:none; }
.character-settings-section > summary::before {
  width:16px;
  color:#73956b;
  content:"+";
  font:500 19px/1 "Iowan Old Style",Baskerville,Georgia,serif;
}
.character-settings-section[open] > summary { border-bottom:1px solid #dce8d9; background:#eff6eb; }
.character-settings-section[open] > summary::before { content:"−"; }
.character-settings-section > summary span { margin-right:auto; }
.character-settings-section > summary small { max-width:52%; color:#728176; font:500 10px/1.35 "Avenir Next",Avenir,sans-serif; letter-spacing:0; text-align:right; text-transform:none; }
.character-settings-section__body {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px 20px;
  padding:17px;
}
.character-settings-section__body > label { min-width:0; }
.character-settings-section__body > .platform-roster,
.character-settings-section__body > .character-public-profile,
.character-settings-section__body > .character-editor__identity,
.character-settings-section__body > .character-editor__personality,
.character-settings-section__body > .character-bible,
.character-settings-section__body > .scene-planner,
.character-settings-section__body > .topaz-settings,
.character-settings-section__body > .toggle-label { grid-column:1 / -1; }
.character-settings-section__body--two-columns > label { grid-column:1 / -1; }
.character-settings-section .platform-roster { margin:0; }
.character-settings-section .platform-roster legend { grid-column:1 / -1; }
.character-settings-section .character-public-profile { margin:0; }
.character-settings-section .character-bible,
.character-settings-section .scene-planner { margin:0; }
.character-settings-section .character-bible:not([open]),
.character-settings-section .scene-planner:not([open]) { background:#f7faf5; }
.character-editor__save {
  position:sticky;
  bottom:0;
  z-index:2;
  margin:6px -1px -1px;
  padding:12px 1px 1px;
  border-top:1px solid #d3e0d0;
  background:linear-gradient(to bottom,rgba(243,247,240,.86),#f3f7f0 32%);
}
.chat-image-library { margin-top:10px; }
.reference-panel { overflow:hidden; padding-top:0; padding-bottom:0; }
.reference-panel > summary.section-line {
  align-items:center;
  min-height:82px;
  margin:0;
  padding:0;
  cursor:pointer;
  list-style:none;
}
.reference-panel[open] > summary.section-line { margin-bottom:18px; }
.section-line--foldout small { display:inline-flex; align-items:center; gap:9px; }
.section-line--foldout small b { color:#608e58; font-size:14px; font-weight:400; transition:transform .18s ease; }
.reference-panel[open] .section-line--foldout small b { transform:rotate(180deg); }
.reference-panel > :not(summary) { margin-left:0; margin-right:0; }
.reference-panel > .profile-photo-selection,
.reference-panel > .reference-selection,
.reference-panel > .reference-grid,
.reference-panel > .reference-form { margin-left:0; margin-right:0; }
.reference-panel[open] { padding-top:31px; padding-bottom:31px; }
.reference-panel:not([open]) { min-height:0; }
@media (max-width:620px) {
  .character-settings-section__body { grid-template-columns:1fr; }
  .character-settings-section > summary { position:relative; align-items:flex-start; flex-direction:column; justify-content:center; gap:3px; padding:10px 14px 10px 34px; }
  .character-settings-section > summary::before { position:absolute; margin-left:-20px; }
  .character-settings-section > summary small { max-width:none; text-align:left; }
  .reference-panel > summary.section-line { min-height:72px; }
}
@media (prefers-reduced-motion:reduce) {
  .section-line--foldout small b { transition:none; }
}
