:root {
  --ink-black: #0b1117;
  --forge-navy: #122a35;
  --charcoal-panel: #18242b;
  --parchment: #f4efe5;
  --aged-paper: #e8d8b8;
  --forged-gold: #c99a45;
  --ember-orange: #e07a1f;
  --soft-ivory: #f8f3e8;
  --muted-steel: #8fa0a8;
  --ink: #18242b;
  --ink-soft: #52636b;
  --paper: var(--parchment);
  --paper-deep: var(--aged-paper);
  --card: rgba(244, 239, 229, 0.9);
  --line: rgba(201, 154, 69, 0.24);
  --red: #b95c2c;
  --blue: var(--forge-navy);
  --green: #6f845f;
  --gold: var(--forged-gold);
  --mint: #c9d7c4;
  --copper: #9f5b43;
  --plum: #4f3e56;
  --shadow: 0 28px 90px rgba(5, 9, 13, 0.38);
  --glow: 0 0 0 1px rgba(201, 154, 69, 0.16), 0 24px 80px rgba(224, 122, 31, 0.16);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Aptos", "Bahnschrift", "Trebuchet MS", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
}

/* Guided page layout: the default experience should feel like one clear page per step. */
.editor-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.reader-close-button {
  display: none;
}

.beginner-mode {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(255, 247, 226, 0.86), transparent 34rem),
    radial-gradient(ellipse at 90% 10%, rgba(207, 226, 212, 0.7), transparent 28rem),
    linear-gradient(180deg, #fbf6e9 0%, #eef3eb 100%);
}

.beginner-mode .shell {
  display: block;
  min-height: 100vh;
  padding: clamp(0.9rem, 2.5vw, 2rem);
  background: transparent;
}

.beginner-mode .rail,
.beginner-mode .assistant-card,
.beginner-mode .metric-grid,
.beginner-mode .action-panel,
.beginner-mode .status-details,
.beginner-mode .workflow-card-hidden,
.beginner-mode .workflow-card-collapsed,
.beginner-mode .advanced-details.file-tools {
  display: none !important;
}

.beginner-mode .stage {
  width: min(78rem, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.beginner-mode .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  min-height: auto;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid rgba(24, 33, 43, 0.12);
  border-radius: 1.25rem;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 253, 246, 0.96), rgba(240, 232, 210, 0.84));
  box-shadow: 0 18px 50px rgba(24, 33, 43, 0.12);
}

.beginner-mode .hero::after {
  display: none;
}

.beginner-mode .hero .eyebrow,
.beginner-mode .hero-copy {
  color: var(--ink-soft);
}

.beginner-mode .hero h2 {
  max-width: 15ch;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.beginner-mode .hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: min(18rem, 100%);
}

.beginner-mode .hero-actions .ghost-button {
  color: var(--ink);
  background: rgba(255, 253, 246, 0.82);
}

.beginner-mode .wizard-banner {
  max-width: 70rem;
  margin: 1rem auto 0;
  padding: clamp(1rem, 2.4vw, 1.7rem);
  grid-template-columns: auto minmax(0, 1fr) minmax(12rem, auto);
  border-radius: 1.1rem;
}

.beginner-mode .wizard-title {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.beginner-mode .wizard-actions {
  margin-top: 0.85rem;
}

.beginner-mode .pipeline-card {
  max-width: 70rem;
  margin: 1rem auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.beginner-mode .pipeline-card .section-title {
  margin-bottom: 0.65rem;
  color: var(--ink);
}

.beginner-mode .pipeline-card .section-title > span:first-child {
  font-size: 0.95rem;
}

.beginner-mode .pipeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.beginner-mode .step.guided-step {
  display: grid;
  gap: 0.35rem;
  min-height: 6.4rem;
  padding: 0.7rem;
  border-radius: 0.9rem;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.72);
}

.beginner-mode .step.guided-step.current {
  border-color: rgba(224, 122, 31, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 247, 226, 0.98), rgba(224, 122, 31, 0.16));
  box-shadow: 0 12px 30px rgba(224, 122, 31, 0.14);
}

.beginner-mode .step.guided-step.done {
  border-color: rgba(88, 126, 87, 0.36);
  background: rgba(230, 241, 224, 0.78);
}

.beginner-mode .step.guided-step .step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(201, 154, 69, 0.22);
}

.beginner-mode .step.guided-step .step-name {
  color: var(--ink);
  font-size: 0.9rem;
}

.beginner-mode .step.guided-step small {
  color: var(--ink-soft) !important;
  font-size: 0.72rem;
  line-height: 1.25;
}

.beginner-mode .workspace-grid {
  display: block;
  max-width: 70rem;
  margin: 1rem auto 0;
}

.beginner-mode .inspector {
  display: block;
}

.beginner-mode .editor-card {
  display: none;
  margin-bottom: 1rem;
}

.beginner-mode.reader-open .editor-card,
.admin-mode .editor-card {
  display: grid;
}

.beginner-mode.reader-open .reader-close-button {
  display: inline-flex;
}

.beginner-mode .tabs,
.beginner-mode .lane-switcher {
  display: none;
}

.beginner-mode.reader-open .tabs {
  display: flex;
}

.beginner-mode .panel.workflow-card-active,
.beginner-mode .active-gate-panel.workflow-card-active {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto 1rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid rgba(24, 33, 43, 0.12);
  border-left: 0;
  border-radius: 1.25rem;
  background:
    linear-gradient(145deg, rgba(255, 253, 246, 0.98), rgba(244, 239, 229, 0.92)) !important;
  box-shadow: 0 18px 54px rgba(24, 33, 43, 0.12);
}

.beginner-mode .active-gate-panel .section-title {
  margin-bottom: 1rem;
}

.beginner-mode .active-gate-panel .section-title span:first-child::after {
  content: " Page";
}

.beginner-mode .panel-heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.beginner-mode .panel-copy {
  max-width: 62ch;
  font-size: 1rem;
}

.beginner-mode .review-form,
.beginner-mode .guided-form-section,
.beginner-mode .workflow-notice,
.beginner-mode .first-time-guide,
.beginner-mode .advance-box,
.beginner-mode .image-queue-panel,
.beginner-mode .visual-substep-card {
  border-radius: 1rem;
}

.beginner-mode .action-row,
.beginner-mode .publish-cta,
.beginner-mode .visual-substep-actions {
  gap: 0.65rem;
}

.beginner-mode .primary-button.full,
.beginner-mode .wizard-button {
  min-height: 3.25rem;
  font-size: 1rem;
}

@media (max-width: 960px) {
  .beginner-mode .hero,
  .beginner-mode .wizard-banner {
    grid-template-columns: 1fr;
  }

  .beginner-mode .hero-actions,
  .beginner-mode .wizard-cta {
    width: 100%;
  }

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

@media (max-width: 560px) {
  .beginner-mode .shell {
    padding: 0.65rem;
  }

  .beginner-mode .hero,
  .beginner-mode .wizard-banner,
  .beginner-mode .panel.workflow-card-active,
  .beginner-mode .active-gate-panel.workflow-card-active {
    border-radius: 0.9rem;
  }

  .beginner-mode .pipeline {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--soft-ivory);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(224, 122, 31, 0.26), transparent 34rem),
    radial-gradient(ellipse at 82% 8%, rgba(201, 154, 69, 0.18), transparent 30rem),
    linear-gradient(135deg, var(--ink-black) 0%, var(--forge-navy) 45%, #081016 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(248, 243, 232, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(248, 243, 232, 0.018) 1px, transparent 1px),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.46) 100%);
  background-size: 42px 42px, 42px 42px, auto;
  z-index: 0;
}

[hidden] {
  display: none !important;
}

.app-home {
  position: relative;
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2.4rem);
}

.auth-panel,
.launcher,
.setup-view {
  width: min(72rem, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 250, 238, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.78fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  min-height: calc(100vh - 4.8rem);
  overflow: hidden;
  padding: clamp(1.2rem, 4vw, 3.4rem);
  background:
    linear-gradient(120deg, rgba(24, 33, 43, 0.92) 0%, rgba(35, 95, 114, 0.86) 48%, rgba(247, 241, 231, 0.94) 48.2%, rgba(255, 252, 246, 0.96) 100%);
}

.auth-story {
  display: grid;
  align-content: center;
  min-height: 31rem;
  color: #fffaf0;
}

.auth-story .eyebrow,
.auth-story .home-copy {
  color: rgba(255, 250, 240, 0.8);
}

.auth-panel h1,
.launcher-header h1,
.setup-header h2 {
  margin: 0;
  font-family: var(--serif);
  line-height: 0.96;
  letter-spacing: 0;
}

.auth-panel h1,
.launcher-header h1 {
  font-size: clamp(2.7rem, 8vw, 6.5rem);
}

.auth-form h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1;
}

.auth-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 2rem;
  max-width: 39rem;
}

.auth-proof-grid span {
  min-height: 5.4rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 0.85rem;
  background: rgba(255, 250, 240, 0.1);
  color: rgba(255, 250, 240, 0.88);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-copy {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

.auth-form,
.setup-grid {
  display: grid;
  gap: 0.8rem;
}

.auth-form {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(24, 33, 43, 0.12);
  border-radius: 1rem;
  background: rgba(255, 252, 246, 0.86);
  box-shadow: 0 18px 42px rgba(24, 33, 43, 0.12);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-note {
  margin: 0.3rem 0 0;
  padding: 0.7rem;
  border: 1px solid rgba(35, 95, 114, 0.18);
  border-radius: 0.8rem;
  color: var(--ink-soft);
  background: rgba(207, 226, 212, 0.24);
  font-size: 0.82rem;
  line-height: 1.42;
}

.auth-beta-note {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-beta-note a {
  color: #7a4f12;
  font-weight: 900;
}

.ghost-light-button {
  padding: 0.82rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.7);
  font-weight: 800;
}

.launcher {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  background: rgba(255, 252, 246, 0.9);
}

.launcher-header,
.setup-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.profile-strip {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.68);
  font-size: 0.86rem;
  font-weight: 800;
}

.account-dock {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 80;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  max-width: calc(100vw - 1.7rem);
  padding: 0.45rem;
  border: 1px solid rgba(201, 154, 69, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(11, 17, 23, 0.92), rgba(18, 42, 53, 0.88));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.account-dock[hidden] {
  display: none;
}

.account-dock span {
  max-width: 12rem;
  overflow: hidden;
  padding: 0 0.45rem;
  color: var(--ivory);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dock .small-button {
  border-color: rgba(201, 154, 69, 0.34);
  color: var(--ivory);
  background: rgba(244, 239, 229, 0.08);
}

.account-dock .small-button:hover {
  border-color: rgba(224, 122, 31, 0.58);
  background: rgba(224, 122, 31, 0.16);
}

.claim-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(35, 95, 114, 0.22);
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(207, 226, 212, 0.42), rgba(255, 252, 246, 0.86));
}

.claim-workspace h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1;
}

.claim-workspace p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.mode-toggle {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--blue);
}

.workspace-source {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-supabase {
  color: #fffaf0;
  background: var(--green);
}

.source-local {
  color: var(--ink);
  background: rgba(200, 145, 59, 0.24);
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.creator-home-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-section {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.35rem;
}

.publishing-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 253, 246, 0.58);
}

.publishing-steps span {
  display: grid;
  min-height: 3rem;
  place-items: center;
  padding: 0.45rem;
  border-radius: 0.6rem;
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
  background: rgba(22, 32, 42, 0.06);
}

.prepare-upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 48rem;
}

.upload-focus-card,
.upload-next-note {
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(255, 250, 238, 0.92), rgba(232, 216, 184, 0.42));
}

.upload-focus-card {
  padding: 1rem;
}

.upload-focus-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
}

.upload-focus-card p:not(.eyebrow),
.upload-next-note {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.upload-next-note {
  margin: 0;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 253, 246, 0.72);
}

.locked-card,
.locked-choice {
  opacity: 0.78;
}

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

.locked-card:hover,
.locked-choice:hover {
  transform: none;
}

.launcher-card {
  display: grid;
  align-content: space-between;
  min-height: 16rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 253, 246, 0.78);
  box-shadow: 0 14px 32px rgba(22, 32, 42, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.launcher-card:hover {
  transform: translateY(-3px);
  background: #fffdf6;
  box-shadow: 0 20px 46px rgba(22, 32, 42, 0.16);
}

.launcher-card span {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
}

.launcher-card strong {
  display: block;
  margin-top: 3.8rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 2.05rem);
  line-height: 1;
}

.launcher-card small {
  display: block;
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
}

.primary-launch {
  color: #fff8e8;
  background: linear-gradient(145deg, var(--ink), var(--blue));
}

.primary-launch span,
.primary-launch small {
  color: rgba(255, 248, 232, 0.82);
}

.setup-view {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1rem, 3vw, 2rem);
}

.setup-header h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

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

.setup-grid .wide {
  grid-column: 1 / -1;
}

.field-label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.text-input,
select,
.review-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.9);
}

.text-input,
select {
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
}

.review-input {
  min-height: 7rem;
  padding: 0.8rem;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.choice-list {
  display: grid;
  gap: 0.75rem;
}

.choice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 253, 246, 0.78);
}

.featured-choice {
  border-color: rgba(88, 126, 87, 0.36);
  background:
    linear-gradient(135deg, rgba(207, 226, 212, 0.5), rgba(255, 252, 246, 0.9));
}

.choice-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1;
}

.choice-card p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.project-choice-card {
  align-items: stretch;
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.project-card-actions a {
  text-decoration: none;
}

.live-kdp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.75rem;
}

.live-kdp-meta span {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: var(--ink-black);
  background: linear-gradient(145deg, var(--forged-gold), var(--ember-orange));
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-kdp-meta small {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

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

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

.beginner-mode .active-gate-panel,
.beginner-mode .inspector > .panel:not(.action-panel):not(.status-details):not(.art-panel) {
  max-width: 52rem;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

select:disabled,
textarea:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(0deg, rgba(248, 243, 232, 0.04) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(201, 154, 69, 0.035) 0 1px, transparent 1px 7px);
  background-size: 160px 160px, 190px 190px;
  mix-blend-mode: overlay;
}

.shell {
  position: relative;
  display: grid;
  grid-template-columns: 22rem minmax(0, 1fr);
  gap: 1.1rem;
  min-height: 100vh;
  padding: 1.1rem;
}

.rail,
.stage,
.panel,
.pipeline-card,
.editor-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.rail {
  position: sticky;
  top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  height: calc(100vh - 2.2rem);
  padding: 1rem;
  overflow: auto;
  border-radius: 2rem;
  background: rgba(244, 236, 216, 0.72);
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 1rem;
  color: #fff8e8;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--red);
  transform: rotate(-4deg);
  box-shadow: 0 8px 0 rgba(22, 32, 42, 0.14);
}

.brand h1,
.hero h2,
.file-title,
#fileTitle {
  margin: 0;
  font-family: var(--serif);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.brand h1 {
  font-size: 1.7rem;
}

.eyebrow,
.muted,
.panel-copy,
.book-meta,
.metric-label {
  color: var(--ink-soft);
}

.eyebrow {
  margin: 0 0 0.24rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.series-card,
.book-button,
.metric,
.brief-output {
  border: 1px solid var(--line);
  background: rgba(255, 248, 232, 0.72);
}

.series-card {
  padding: 1rem;
  border-radius: 1.35rem;
}

.series-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
}

.series-card p {
  margin: 0;
  line-height: 1.45;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-list {
  display: grid;
  gap: 0.72rem;
}

.book-button {
  width: 100%;
  padding: 0.9rem;
  border-radius: 1.2rem;
  color: inherit;
  text-align: left;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.book-button:hover,
.book-button.active {
  background: #fff7e5;
  box-shadow: 0 14px 30px rgba(22, 32, 42, 0.14);
  transform: translateY(-2px);
}

.book-button.active {
  border-color: rgba(194, 71, 63, 0.55);
}

.book-title {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  font-size: 0.76rem;
}

.stage {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border-radius: 2rem;
  background: rgba(255, 250, 238, 0.52);
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 11rem;
  padding: 1.25rem;
  overflow: hidden;
  border-radius: 1.65rem;
  background:
    linear-gradient(105deg, rgba(22, 32, 42, 0.92) 0%, rgba(29, 92, 115, 0.86) 52%, rgba(105, 139, 69, 0.78) 100%),
    radial-gradient(circle at 70% 12%, rgba(244, 236, 216, 0.34), transparent 18rem);
  color: #fff8e8;
}

.hero .eyebrow,
.hero .hero-copy {
  color: rgba(255, 248, 232, 0.78);
}

.hero h2 {
  max-width: 52rem;
  font-size: clamp(2.4rem, 6vw, 5.9rem);
}

.hero-copy {
  max-width: 47rem;
  margin: 0.9rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.small-button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  padding: 0.82rem 1.05rem;
  color: #fff8e8;
  background: var(--red);
  box-shadow: 0 12px 26px rgba(129, 37, 31, 0.32);
}

.primary-button.compact {
  padding: 0.62rem 0.85rem;
  font-size: 0.82rem;
}

.primary-button.full {
  width: 100%;
}

.ghost-button {
  padding: 0.82rem 1.05rem;
  color: #fff8e8;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 248, 232, 0.34);
}

.small-button {
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  background: rgba(22, 32, 42, 0.08);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.assistant-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 2px solid rgba(29, 92, 115, 0.24);
  border-radius: 1.35rem;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.96), rgba(199, 223, 202, 0.42));
  box-shadow: 0 18px 44px rgba(22, 32, 42, 0.08);
}

.assistant-card h3 {
  margin: 0.2rem 0 0.4rem;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1;
}

.assistant-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.assistant-after {
  margin-top: 0.55rem !important;
  color: var(--blue) !important;
  font-size: 0.84rem;
  font-weight: 800;
}

.assistant-cta {
  display: grid;
  gap: 0.5rem;
}

.assistant-button {
  min-height: 4rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  color: #fff8e8;
  background: var(--red);
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 14px 30px rgba(194, 71, 63, 0.28);
  cursor: pointer;
}

.assistant-ready .assistant-button {
  background: var(--green);
  box-shadow: 0 14px 30px rgba(105, 139, 69, 0.3);
}

.metric {
  min-height: 6.2rem;
  padding: 0.9rem;
  border-radius: 1.25rem;
}

.metric-value {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.metric-label {
  font-size: 0.75rem;
}

.pipeline-card {
  padding: 0.95rem;
  border-radius: 1.35rem;
  background: var(--card);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(10, minmax(6rem, 1fr));
  gap: 0.45rem;
  overflow-x: auto;
}

.step {
  min-height: 4.7rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: rgba(22, 32, 42, 0.56);
  background: rgba(255, 248, 232, 0.54);
  text-align: left;
  cursor: pointer;
}

.step.done {
  color: var(--ink);
  background: rgba(199, 223, 202, 0.62);
}

.step.current {
  color: #fff8e8;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(29, 92, 115, 0.22);
}

.step-number {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--mono);
  font-size: 0.7rem;
}

.step-name {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: capitalize;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 1rem;
  min-height: 32rem;
}

.editor-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-width: 0;
  overflow: hidden;
  border-radius: 1.45rem;
  background: rgba(255, 248, 232, 0.82);
  transition: box-shadow 0.3s;
}

.editor-card.file-loaded-flash {
  animation: fileFlash 1.2s ease-out;
}

@keyframes fileFlash {
  0% { box-shadow: 0 0 0 4px rgba(215, 154, 43, 0.9), 0 0 30px rgba(215, 154, 43, 0.4); }
  40% { box-shadow: 0 0 0 4px rgba(215, 154, 43, 0.6), 0 0 20px rgba(215, 154, 43, 0.2); }
  100% { box-shadow: none; }
}

.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 0.75rem 0;
  overflow-x: auto;
}

.lane-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.75rem 0.75rem 0;
}

.lane-tab {
  min-height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
}

.lane-tab.active,
.lane-tab:hover {
  color: #fff8e8;
  background: var(--blue);
}

.tab {
  flex: 0 0 auto;
  padding: 0.55rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.tab.active {
  color: #fff8e8;
  background: var(--ink);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
}

#fileTitle {
  font-size: 1.6rem;
}

#editor {
  width: calc(100% - 1.5rem);
  height: calc(100% - 0.75rem);
  min-height: 27rem;
  margin: 0 0.75rem 0.75rem;
  padding: 1rem;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 1rem;
  outline: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  background: rgba(255, 253, 246, 0.9);
}

#editor:focus,
.scene-input:focus,
.review-input:focus,
.text-input:focus,
select:focus {
  border-color: rgba(194, 71, 63, 0.55);
  box-shadow: 0 0 0 4px rgba(194, 71, 63, 0.1);
}

.inspector {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.panel {
  padding: 1rem;
  border-radius: 1.35rem;
  background: var(--card);
}

.panel.workflow-card-active {
  box-shadow:
    0 16px 42px rgba(11, 17, 23, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.workflow-card-hidden {
  display: none !important;
}

.panel.workflow-card-collapsed {
  padding: 0.78rem 0.9rem;
  opacity: 0.78;
}

.panel.workflow-card-collapsed > :not(.section-title):not(summary) {
  display: none;
}

.panel.workflow-card-collapsed::after,
.status-details.workflow-card-collapsed::after {
  content: attr(data-collapsed-summary);
  display: block;
  margin-top: 0.42rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.panel.workflow-card-collapsed .status-pill,
.panel.workflow-card-collapsed .dot {
  opacity: 0.62;
}

.active-gate-panel {
  border-left: 4px solid var(--gold);
}

.beginner-mode .assistant-card {
  display: none;
}

.beginner-mode .active-gate-panel.workflow-card-active {
  border-left-width: 6px;
  box-shadow:
    0 20px 52px rgba(11, 17, 23, 0.16),
    0 0 0 1px rgba(201, 154, 69, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.active-gate-panel.gate-highlight {
  animation: gateFlash 0.6s ease-in-out 3;
}

@keyframes gateFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(215, 154, 43, 0); }
  50% { box-shadow: 0 0 0 6px rgba(215, 154, 43, 0.35), 0 8px 24px rgba(215, 154, 43, 0.2); }
}

.status-details {
  padding: 0;
  overflow: hidden;
}

.status-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-details #uiStatus {
  padding: 0 1rem 1rem;
}

.panel-heading {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.microcopy {
  margin: 0.72rem 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.4;
}

.workflow-brief {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 253, 246, 0.78);
}

.workflow-notice {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(201, 154, 69, 0.42);
  border-left: 4px solid var(--gold);
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(255, 248, 232, 0.96), rgba(232, 216, 184, 0.72));
  box-shadow: 0 14px 32px rgba(56, 40, 18, 0.12);
}

.workflow-notice strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.workflow-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

.workflow-notice.success {
  border-color: rgba(105, 139, 69, 0.42);
  border-left-color: var(--green);
  background: linear-gradient(135deg, rgba(239, 247, 231, 0.96), rgba(215, 229, 200, 0.72));
}

.workflow-brief ol {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-brief li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.25rem 0.55rem;
  padding: 0.5rem;
  border-radius: 0.7rem;
  background: rgba(22, 32, 42, 0.045);
}

.workflow-brief li.current {
  border: 1px solid rgba(29, 92, 115, 0.22);
  background: rgba(29, 92, 115, 0.08);
}

.workflow-brief span {
  grid-row: span 2;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-brief strong {
  font-size: 0.84rem;
}

.workflow-brief small,
.image-timing,
.workflow-blocker {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.image-timing {
  padding: 0.55rem;
  border-left: 3px solid var(--gold);
  background: rgba(215, 154, 43, 0.09);
}

.workflow-blocker {
  padding: 0.55rem;
  border-left: 3px solid var(--red);
  background: rgba(194, 71, 63, 0.08);
}

.first-time-guide {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.78rem;
  border: 1px solid rgba(29, 92, 115, 0.2);
  border-radius: 0.85rem;
  background: rgba(29, 92, 115, 0.06);
}

.first-time-guide h4 {
  margin: 0;
  font-size: 0.86rem;
}

.first-time-guide ol {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding-left: 1.1rem;
}

.first-time-guide li,
.first-time-guide p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.art-guide {
  border-color: rgba(105, 139, 69, 0.28);
  background: rgba(199, 223, 202, 0.26);
}

.advance-box {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 248, 232, 0.68);
}

.advance-box.ready {
  border-color: rgba(105, 139, 69, 0.38);
  background: rgba(199, 223, 202, 0.48);
}

.advance-box.blocked {
  border-color: rgba(194, 71, 63, 0.28);
  background: rgba(194, 71, 63, 0.08);
}

.advance-box p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.primary-next-step {
  margin-top: 1rem;
  border-width: 2px;
}

.publish-package-loading {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--ink-soft);
  background: rgba(22, 32, 42, 0.045);
  font-size: 0.85rem;
}

.export-center-panel {
  border-left: 4px solid var(--green);
}

.import-panel {
  border-left: 4px solid var(--blue);
}

.export-confidence {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(88, 126, 87, 0.26);
  border-radius: 0.9rem;
  background: rgba(207, 226, 212, 0.38);
}

.export-confidence strong,
.export-confidence > span {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.readiness-card {
  min-height: 7.25rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 253, 246, 0.82);
}

.readiness-card span {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.readiness-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.05;
}

.readiness-card p,
.readiness-card li {
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.34;
}

.readiness-card.ready {
  border-color: rgba(88, 126, 87, 0.36);
  background: rgba(207, 226, 212, 0.34);
}

.readiness-card.needs-attention,
.readiness-card.review-recommended {
  border-color: rgba(184, 71, 62, 0.26);
  background: rgba(184, 71, 62, 0.08);
}

.readiness-action-hint {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  font-style: italic;
  color: #7a4040;
}

.export-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.publish-cta {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.publish-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.publish-artifact-card {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-height: 9rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 253, 246, 0.82);
}

.publish-artifact-card.missing {
  border-color: rgba(194, 71, 63, 0.28);
  background: rgba(194, 71, 63, 0.08);
}

.publish-artifact-card strong {
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.05;
}

.publish-artifact-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.35;
}

.publish-warning-box,
.package-details {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(22, 32, 42, 0.045);
}

.publish-warning-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}

.compact-warning-list {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding-left: 1.05rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.package-details summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.package-download-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.package-download-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 0.7rem;
  background: rgba(255, 253, 246, 0.76);
}

.package-download-list span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.package-download-list code {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.art-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.art-summary-card {
  min-height: 4.5rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 248, 232, 0.92), rgba(199, 223, 202, 0.35));
}

.art-summary-card strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
  text-transform: capitalize;
}

.secondary-gate {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(22, 32, 42, 0.045);
}

.secondary-gate summary {
  padding: 0.78rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secondary-gate .advance-box,
.secondary-gate .package-list {
  margin: 0.75rem;
}

.generated-plan {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.8rem;
  border: 1px solid rgba(29, 92, 115, 0.22);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 8% 0%, rgba(215, 154, 43, 0.2), transparent 9rem),
    rgba(255, 253, 246, 0.78);
}

.generated-plan p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.45;
}

.generated-plan ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.generated-plan li {
  padding: 0.58rem;
  border-radius: 0.78rem;
  background: rgba(22, 32, 42, 0.055);
  font-size: 0.8rem;
  line-height: 1.4;
}

.single-generate-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.78rem;
  border: 1px solid rgba(29, 92, 115, 0.22);
  border-radius: 0.9rem;
  background: rgba(29, 92, 115, 0.08);
}

.single-generate-box.complete {
  border-color: rgba(105, 139, 69, 0.32);
  background: rgba(199, 223, 202, 0.32);
}

.single-generate-box strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: 1.1rem;
}

.single-generate-box p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.asset-grid {
  display: grid;
  gap: 0.7rem;
}

.asset-card {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 248, 232, 0.72);
}

.asset-card.asset-done {
  border-color: rgba(105, 139, 69, 0.34);
  background: rgba(199, 223, 202, 0.24);
}

.asset-card h4 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
}

.asset-card p {
  margin: 0 0 0.55rem;
}

.asset-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(22, 32, 42, 0.08);
}

.prompt-details {
  margin: 0.4rem 0 0.55rem;
}

.prompt-details summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
}

.prompt-details p {
  margin-top: 0.35rem;
  padding: 0.5rem;
  border-radius: 0.65rem;
  background: rgba(255, 253, 246, 0.72);
  font-size: 0.74rem;
}

.check-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.62rem;
  border-radius: 0.85rem;
  background: rgba(22, 32, 42, 0.055);
  font-size: 0.85rem;
  line-height: 1.35;
}

.check-list li::before {
  content: "";
  flex: 0 0 0.62rem;
  width: 0.62rem;
  height: 0.62rem;
  margin-top: 0.22rem;
  border-radius: 50%;
  background: var(--red);
}

.check-list .ok::before {
  background: var(--green);
}

.book-button.published {
  border-color: rgba(105, 139, 69, 0.42);
  background: rgba(199, 223, 202, 0.32);
}

.published-badge {
  display: inline-flex;
  margin-left: 0.35rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.publish-status-form {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.publish-status-form h4 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
}

.published-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.published-summary div {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 253, 246, 0.82);
}

.published-summary strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 1rem;
}

.live-kdp-banner {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 69, 0.34);
  border-radius: 0.85rem;
  color: var(--soft-ivory);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(224, 122, 31, 0.18), transparent 18rem),
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.52)),
    rgba(11, 17, 23, 0.42);
}

.live-kdp-banner span {
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: var(--ink-black);
  background: linear-gradient(145deg, var(--forged-gold), var(--ember-orange));
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-kdp-banner strong {
  color: var(--soft-ivory);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  line-height: 1;
}

.live-kdp-banner p {
  margin: 0;
  color: rgba(248, 243, 232, 0.72);
  line-height: 1.45;
}

.status-list {
  display: grid;
  gap: 0.58rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  padding: 0.65rem;
  border-radius: 0.85rem;
  background: rgba(22, 32, 42, 0.055);
  font-size: 0.82rem;
  line-height: 1.4;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: #fff8e8;
  background: var(--blue);
  font-size: 0.68rem;
  font-family: var(--mono);
}

.status-pill.amber {
  background: var(--gold);
}

.dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(105, 139, 69, 0.16);
}

.field-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.scene-input,
.review-input,
.text-input,
select {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  outline: none;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.86);
}

.scene-input {
  min-height: 6.5rem;
  resize: vertical;
}

.review-input {
  min-height: 4.7rem;
  resize: vertical;
}

.review-form {
  margin-top: 0.85rem;
}

.simple-approval-form {
  display: grid;
  gap: 0.75rem;
}

.approval-button-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.compact-guide {
  margin: 1rem 0;
}

.brief-output {
  min-height: 6rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 1rem;
  font-size: 0.83rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

  .rail {
    position: relative;
    top: auto;
    height: auto;
  }

  .workspace-grid,
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .art-summary {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Wizard Banner ─────────────────────────────────── */

.wizard-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.4rem;
  align-items: start;
  padding: 1.35rem 1.5rem;
  border-radius: 1.5rem;
  border: 2px solid rgba(215, 154, 43, 0.35);
  background:
    radial-gradient(circle at 0% 50%, rgba(215, 154, 43, 0.18), transparent 22rem),
    radial-gradient(circle at 100% 0%, rgba(29, 92, 115, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(255, 250, 238, 0.95), rgba(255, 248, 232, 0.88));
  box-shadow:
    0 8px 32px rgba(215, 154, 43, 0.15),
    0 2px 8px rgba(22, 32, 42, 0.08);
  animation: wizardSlideIn 0.4s ease-out;
}

@keyframes wizardSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-banner.wizard-ready {
  border-color: rgba(105, 139, 69, 0.55);
  background:
    radial-gradient(circle at 0% 50%, rgba(105, 139, 69, 0.22), transparent 22rem),
    radial-gradient(circle at 100% 0%, rgba(199, 223, 202, 0.3), transparent 18rem),
    linear-gradient(135deg, rgba(240, 255, 240, 0.95), rgba(230, 248, 230, 0.88));
  box-shadow:
    0 8px 32px rgba(105, 139, 69, 0.2),
    0 2px 8px rgba(22, 32, 42, 0.08);
}

.wizard-banner.wizard-complete {
  border-color: rgba(215, 154, 43, 0.6);
  background:
    radial-gradient(circle at 20% 50%, rgba(215, 154, 43, 0.25), transparent 18rem),
    radial-gradient(circle at 80% 50%, rgba(194, 71, 63, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(255, 252, 240, 0.98), rgba(255, 245, 220, 0.92));
  box-shadow:
    0 8px 32px rgba(215, 154, 43, 0.25),
    0 2px 8px rgba(22, 32, 42, 0.1);
}

.wizard-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 4rem;
  padding-top: 0.2rem;
}

.wizard-step-number {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--gold);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 800;
  background:
    radial-gradient(circle, rgba(255, 250, 238, 1) 0%, rgba(215, 154, 43, 0.12) 100%);
  box-shadow:
    0 4px 14px rgba(215, 154, 43, 0.2),
    inset 0 0 12px rgba(215, 154, 43, 0.08);
}

.wizard-ready .wizard-step-number {
  border-color: var(--green);
  background:
    radial-gradient(circle, rgba(240, 255, 240, 1) 0%, rgba(105, 139, 69, 0.15) 100%);
  box-shadow:
    0 4px 14px rgba(105, 139, 69, 0.25),
    inset 0 0 12px rgba(105, 139, 69, 0.1);
}

.wizard-step-of {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.wizard-content {
  min-width: 0;
}

.wizard-eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.wizard-ready .wizard-eyebrow {
  color: var(--green);
}

.wizard-title {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.wizard-description {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 55rem;
}

.wizard-actions {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0 0 0 1.35rem;
  counter-reset: wizard-step;
}

.wizard-actions li {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink);
  padding: 0.3rem 0;
}

.wizard-actions li::marker {
  color: var(--gold);
  font-weight: 800;
  font-family: var(--mono);
}

.wizard-ready .wizard-actions li::marker {
  color: var(--green);
}

.wizard-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-width: 10rem;
  padding-top: 0.5rem;
}

.wizard-button {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 0;
  border-radius: 999px;
  color: #fff8e8;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--red);
  box-shadow:
    0 8px 22px rgba(194, 71, 63, 0.3),
    0 2px 6px rgba(22, 32, 42, 0.1);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  animation: wizardPulse 2.5s ease-in-out infinite;
}

.wizard-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 12px 30px rgba(194, 71, 63, 0.38),
    0 3px 8px rgba(22, 32, 42, 0.12);
}

.wizard-ready .wizard-button {
  background: var(--green);
  box-shadow:
    0 8px 22px rgba(105, 139, 69, 0.35),
    0 2px 6px rgba(22, 32, 42, 0.1);
  animation: wizardPulseGreen 2s ease-in-out infinite;
}

.wizard-ready .wizard-button:hover {
  box-shadow:
    0 12px 30px rgba(105, 139, 69, 0.42),
    0 3px 8px rgba(22, 32, 42, 0.12);
}

@keyframes wizardPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(194, 71, 63, 0.3), 0 2px 6px rgba(22, 32, 42, 0.1); }
  50% { box-shadow: 0 8px 30px rgba(194, 71, 63, 0.45), 0 2px 8px rgba(22, 32, 42, 0.14); }
}

@keyframes wizardPulseGreen {
  0%, 100% { box-shadow: 0 8px 22px rgba(105, 139, 69, 0.35), 0 2px 6px rgba(22, 32, 42, 0.1); }
  50% { box-shadow: 0 8px 30px rgba(105, 139, 69, 0.5), 0 2px 8px rgba(22, 32, 42, 0.14); }
}

.wizard-hint {
  margin: 0;
  font-size: 0.74rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.35;
}

.wizard-preview-button {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.82rem;
  background: rgba(29, 92, 115, 0.06);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.wizard-preview-button:hover {
  background: rgba(29, 92, 115, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 92, 115, 0.18);
}

@media (max-width: 760px) {
  .auth-panel,
  .launcher-grid,
  .setup-grid,
  .choice-card {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: auto;
  }

  .launcher-header,
  .setup-header {
    display: grid;
  }

  .launcher-card {
    min-height: 10rem;
  }

  .launcher-card strong {
    margin-top: 1.8rem;
  }

  .shell,
  .stage {
    padding: 0.65rem;
  }

  .hero,
  .assistant-card,
  .workspace-grid,
  .metric-grid,
  .publish-grid,
  .readiness-grid,
  .published-summary {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

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

  .workspace-grid,
  .metric-grid,
  .art-summary {
    display: grid;
  }

  .art-summary {
    grid-template-columns: 1fr;
  }

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

  .wizard-banner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .wizard-step-indicator {
    flex-direction: row;
    gap: 0.6rem;
  }

  .wizard-step-number {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.3rem;
  }

  .wizard-cta {
    min-width: auto;
  }
}

/* Publishing readiness gate */
.gate-checklist {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 253, 246, 0.6);
}

.gate-checklist h4 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.gate-checklist .status-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gate-checklist .status-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  line-height: 1.5;
}

.gate-checklist .status-list li:last-child {
  border-bottom: none;
}

.check-pass {
  color: #2a6e3f;
}

.check-fail {
  color: #a63d2f;
}

.blocker-hint {
  font-size: 0.78rem;
  color: #a63d2f;
  font-style: italic;
  opacity: 0.85;
}

/* InkForge premium theme layer */
.app-home,
.shell {
  position: relative;
  z-index: 1;
}

.app-home {
  display: grid;
  align-items: center;
}

.auth-panel,
.launcher,
.setup-view,
.stage {
  border-color: rgba(201, 154, 69, 0.26);
  background: rgba(11, 17, 23, 0.58);
  box-shadow:
    0 34px 110px rgba(2, 6, 10, 0.5),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.auth-panel {
  position: relative;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.74fr);
  isolation: isolate;
  border-radius: 0.9rem;
  background:
    radial-gradient(ellipse at 78% 50%, rgba(244, 239, 229, 0.22), transparent 22rem),
    radial-gradient(ellipse at 18% 16%, rgba(224, 122, 31, 0.24), transparent 24rem),
    linear-gradient(130deg, rgba(11, 17, 23, 0.98) 0%, rgba(18, 42, 53, 0.94) 58%, rgba(24, 36, 43, 0.9) 100%);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 52%, rgba(201, 154, 69, 0.2) 64%, transparent 78%),
    linear-gradient(180deg, rgba(248, 243, 232, 0.06), transparent 38%);
  z-index: -1;
}

.auth-story {
  position: relative;
  min-height: 34rem;
  padding: clamp(0.4rem, 2vw, 1.6rem);
}

.auth-story::before {
  content: "IF";
  position: absolute;
  right: clamp(0rem, 3vw, 1.2rem);
  bottom: -1.2rem;
  color: rgba(201, 154, 69, 0.08);
  font-family: var(--serif);
  font-size: clamp(8rem, 19vw, 17rem);
  font-weight: 800;
  line-height: 0.75;
  pointer-events: none;
}

.auth-story::after {
  content: "";
  width: min(22rem, 62%);
  height: 2px;
  margin-top: 2rem;
  display: block;
  background: linear-gradient(90deg, var(--forged-gold), rgba(224, 122, 31, 0.1));
  box-shadow: 0 0 24px rgba(224, 122, 31, 0.34);
}

.auth-story .eyebrow,
.hero .eyebrow,
.wizard-eyebrow,
.section-title,
.metric-label,
.readiness-card span {
  color: var(--forged-gold);
  letter-spacing: 0.1em;
}

.auth-panel h1,
.launcher-header h1,
.setup-header h2,
.hero h2 {
  color: var(--soft-ivory);
  letter-spacing: 0;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.auth-story .home-copy {
  max-width: 36rem;
  color: rgba(248, 243, 232, 0.8);
}

.auth-proof-grid span {
  border-radius: 0.55rem;
  border-color: rgba(201, 154, 69, 0.3);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.09), rgba(18, 42, 53, 0.44));
  color: rgba(248, 243, 232, 0.88);
  box-shadow: inset 0 1px 0 rgba(248, 243, 232, 0.09);
}

.auth-form {
  position: relative;
  gap: 0.9rem;
  padding: clamp(1.15rem, 2.6vw, 1.8rem);
  border-radius: 0.75rem;
  border-color: rgba(85, 55, 24, 0.2);
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 251, 242, 0.96), rgba(232, 216, 184, 0.9));
  box-shadow:
    0 28px 80px rgba(4, 8, 12, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-form .field-label,
.auth-form .microcopy,
.auth-form .auth-note {
  color: var(--ink-soft);
}

.auth-form::before,
.panel::before,
.launcher-card::before,
.choice-card::before,
.editor-card::before {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 154, 69, 0.62), transparent);
}

.auth-form h2,
.choice-card h3,
.series-card h2,
.panel-heading,
.assistant-card h3,
.wizard-title,
.file-title,
#fileTitle {
  color: var(--ink);
  letter-spacing: 0;
}

.auth-note,
.microcopy,
.home-copy,
.panel-copy,
.muted,
.book-meta,
.readiness-card p,
.readiness-card li,
.publish-artifact-card p,
.compact-warning-list,
.package-download-list code,
.first-time-guide li,
.first-time-guide p {
  color: var(--ink-soft);
}

.launcher,
.setup-view {
  border-radius: 0.9rem;
  background:
    linear-gradient(145deg, rgba(18, 36, 43, 0.82), rgba(11, 17, 23, 0.7)),
    radial-gradient(ellipse at top left, rgba(224, 122, 31, 0.15), transparent 26rem);
}

.launcher-header,
.setup-header {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(201, 154, 69, 0.22);
}

.launcher-header .home-copy {
  color: rgba(248, 243, 232, 0.76);
}

.profile-strip {
  border-color: rgba(201, 154, 69, 0.28);
  color: var(--soft-ivory);
  background: rgba(11, 17, 23, 0.45);
}

.mode-toggle,
.workspace-source {
  color: rgba(248, 243, 232, 0.82);
}

.claim-workspace,
.choice-card,
.panel,
.pipeline-card,
.editor-card,
.assistant-card,
.series-card,
.metric,
.brief-output,
.book-button,
.publish-artifact-card,
.gate-checklist,
.package-details,
.publish-warning-box,
.generated-plan,
.asset-card,
.secondary-gate,
.first-time-guide,
.advance-box {
  position: relative;
  border-color: rgba(74, 54, 30, 0.18);
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.96), rgba(232, 216, 184, 0.82));
  box-shadow:
    0 18px 44px rgba(3, 7, 10, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.launcher-grid {
  gap: 1rem;
}

.creator-home-actions {
  gap: 1rem;
}

.launcher-card {
  position: relative;
  min-height: 16.75rem;
  overflow: hidden;
  border-radius: 0.7rem;
  border-color: rgba(201, 154, 69, 0.25);
  background:
    linear-gradient(150deg, rgba(244, 239, 229, 0.96), rgba(232, 216, 184, 0.86));
}

.launcher-card::after {
  content: "";
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  height: 3px;
  background: linear-gradient(90deg, rgba(201, 154, 69, 0.92), rgba(224, 122, 31, 0.1));
}

.launcher-card:hover,
.choice-card:hover,
.book-button:hover {
  border-color: rgba(201, 154, 69, 0.52);
  transform: translateY(-3px);
  box-shadow:
    0 24px 70px rgba(3, 7, 10, 0.26),
    0 0 0 1px rgba(201, 154, 69, 0.14);
}

.launcher-card:hover {
  color: var(--soft-ivory);
  background:
    radial-gradient(ellipse at 18% 12%, rgba(224, 122, 31, 0.26), transparent 17rem),
    linear-gradient(145deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94));
}

.launcher-card span {
  color: var(--copper);
  font-family: var(--mono);
}

.launcher-card strong {
  margin-top: 3.4rem;
  color: var(--ink);
}

.launcher-card small {
  color: var(--ink-soft);
}

.launcher-card:hover span,
.launcher-card:hover strong,
.launcher-card:hover small {
  color: var(--soft-ivory);
}

.launcher-card:hover small {
  opacity: 0.82;
}

.primary-launch {
  border-color: rgba(201, 154, 69, 0.48);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94)),
    radial-gradient(ellipse at 18% 12%, rgba(224, 122, 31, 0.34), transparent 18rem);
}

.primary-launch:hover {
  color: var(--soft-ivory);
  background:
    radial-gradient(ellipse at 82% 10%, rgba(201, 154, 69, 0.18), transparent 18rem),
    radial-gradient(ellipse at 18% 12%, rgba(224, 122, 31, 0.34), transparent 18rem),
    linear-gradient(145deg, rgba(11, 17, 23, 0.99), rgba(18, 42, 53, 0.96));
}

.primary-launch strong,
.primary-launch span,
.primary-launch small {
  color: var(--soft-ivory);
}

.primary-launch::after {
  background: linear-gradient(90deg, var(--forged-gold), var(--ember-orange));
}

.project-section {
  border-top: 1px solid rgba(201, 154, 69, 0.2);
}

.publishing-steps {
  border-color: rgba(201, 154, 69, 0.24);
  background: rgba(11, 17, 23, 0.08);
}

.publishing-steps span {
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.9), rgba(232, 216, 184, 0.58));
}

.locked-card,
.locked-choice {
  border-color: rgba(143, 160, 168, 0.28);
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.72), rgba(143, 160, 168, 0.14));
}

.setup-view .eyebrow,
.launcher .eyebrow {
  color: var(--forged-gold);
}

.setup-view .field-label {
  color: rgba(248, 243, 232, 0.78);
}

.shell {
  background:
    linear-gradient(90deg, rgba(11, 17, 23, 0.8), transparent 34%),
    radial-gradient(ellipse at 84% 0%, rgba(201, 154, 69, 0.12), transparent 32rem);
}

.rail {
  border-radius: 0.9rem;
  border-color: rgba(201, 154, 69, 0.24);
  color: var(--soft-ivory);
  background:
    linear-gradient(180deg, rgba(24, 36, 43, 0.94), rgba(11, 17, 23, 0.92));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(248, 243, 232, 0.06);
}

.brand-mark {
  border-color: rgba(201, 154, 69, 0.7);
  border-radius: 0.55rem;
  color: var(--ink-black);
  background: linear-gradient(145deg, var(--forged-gold), var(--ember-orange));
  box-shadow:
    0 10px 24px rgba(224, 122, 31, 0.24),
    inset 0 1px 0 rgba(248, 243, 232, 0.42);
}

.brand h1 {
  color: var(--soft-ivory);
}

.rail .eyebrow,
.rail .muted,
.rail .book-meta,
.rail .section-title {
  color: rgba(248, 243, 232, 0.68);
}

.rail .series-card,
.rail .book-button {
  border-color: rgba(201, 154, 69, 0.22);
  color: var(--soft-ivory);
  background: rgba(248, 243, 232, 0.065);
  box-shadow: inset 0 1px 0 rgba(248, 243, 232, 0.05);
}

.rail .series-card h2,
.rail .book-title {
  color: var(--soft-ivory);
}

.rail .book-button.active {
  border-color: rgba(201, 154, 69, 0.6);
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.2), rgba(248, 243, 232, 0.08));
}

.stage {
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(248, 243, 232, 0.08), rgba(11, 17, 23, 0.18)),
    rgba(18, 42, 53, 0.52);
}

.hero {
  position: relative;
  min-height: 12.5rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 0.8rem;
  background:
    linear-gradient(112deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94) 62%, rgba(24, 36, 43, 0.88)),
    radial-gradient(ellipse at 76% 8%, rgba(224, 122, 31, 0.24), transparent 20rem);
  box-shadow:
    0 24px 76px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(248, 243, 232, 0.07);
}

.hero::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--forged-gold), rgba(224, 122, 31, 0.1));
}

.hero-copy,
.hero .eyebrow {
  color: rgba(248, 243, 232, 0.74);
}

.primary-button,
.assistant-button,
.wizard-button {
  border: 1px solid rgba(255, 224, 157, 0.25);
  color: var(--ink-black);
  background: linear-gradient(145deg, var(--forged-gold), var(--ember-orange));
  box-shadow:
    0 14px 34px rgba(224, 122, 31, 0.28),
    inset 0 1px 0 rgba(255, 244, 216, 0.38);
}

.primary-button:hover,
.assistant-button:hover,
.wizard-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 46px rgba(224, 122, 31, 0.38),
    0 0 0 1px rgba(201, 154, 69, 0.22);
}

.ghost-button,
.ghost-light-button,
.small-button,
.wizard-preview-button {
  border: 1px solid rgba(201, 154, 69, 0.28);
  color: var(--soft-ivory);
  background: rgba(248, 243, 232, 0.08);
  box-shadow: inset 0 1px 0 rgba(248, 243, 232, 0.05);
}

.auth-form .small-button,
.auth-form .ghost-light-button,
.panel .small-button,
.editor-card .small-button,
.pipeline-card .small-button,
.choice-card .small-button,
.setup-view .small-button,
.publish-artifact-card .small-button,
.package-download-list .small-button,
.advance-box .small-button,
.wizard-preview-button {
  color: var(--ink);
  background: rgba(244, 239, 229, 0.78);
}

.ghost-button:hover,
.ghost-light-button:hover,
.small-button:hover,
.wizard-preview-button:hover {
  border-color: rgba(201, 154, 69, 0.56);
  background: rgba(201, 154, 69, 0.14);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(201, 154, 69, 0.12);
}

.field-label {
  color: #5f665f;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
}

.text-input,
.scene-input,
.review-input,
select,
input[type="email"],
input[type="password"] {
  border-color: rgba(74, 54, 30, 0.2);
  color: var(--ink);
  background: rgba(255, 252, 244, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.text-input:focus,
.scene-input:focus,
.review-input:focus,
select:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: 2px solid rgba(201, 154, 69, 0.28);
  border-color: rgba(201, 154, 69, 0.72);
  box-shadow:
    0 0 0 4px rgba(201, 154, 69, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.assistant-card,
.wizard-banner {
  border-radius: 0.75rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
}

.assistant-card {
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.96), rgba(232, 216, 184, 0.86));
}

.assistant-after {
  color: #6f4d20 !important;
}

.wizard-banner {
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.97), rgba(232, 216, 184, 0.88));
  box-shadow:
    0 22px 62px rgba(3, 7, 10, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.wizard-step-number {
  border-color: rgba(201, 154, 69, 0.5);
  color: var(--ink-black);
  background: linear-gradient(145deg, var(--forged-gold), #f0c067);
}

.wizard-ready {
  border-color: rgba(111, 132, 95, 0.5);
}

.wizard-complete {
  border-color: rgba(201, 154, 69, 0.6);
}

.metric {
  border-radius: 0.7rem;
}

.metric-value {
  color: var(--ink);
}

.pipeline-card,
.editor-card,
.panel {
  border-radius: 0.75rem;
}

.pipeline-step {
  border-color: rgba(74, 54, 30, 0.16);
  background: rgba(255, 252, 244, 0.7);
}

.pipeline-step.done {
  border-color: rgba(111, 132, 95, 0.34);
  background: rgba(207, 216, 194, 0.56);
}

.pipeline-step.current {
  border-color: rgba(201, 154, 69, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 248, 232, 0.92), rgba(201, 154, 69, 0.18));
  box-shadow: 0 12px 34px rgba(201, 154, 69, 0.16);
}

.lane-switcher {
  border-color: rgba(201, 154, 69, 0.24);
  background: rgba(11, 17, 23, 0.06);
}

.lane-button.active,
.tab-button.active {
  color: var(--ink-black);
  background: linear-gradient(145deg, rgba(201, 154, 69, 0.95), rgba(224, 122, 31, 0.82));
}

.export-center-panel {
  border-left: 5px solid var(--forged-gold);
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.97), rgba(232, 216, 184, 0.86));
}

.export-center-panel .panel-heading {
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
}

.import-panel {
  border-left: 5px solid var(--forge-navy);
}

.import-panel.import-collapsed .panel-copy,
.import-panel.import-collapsed .field-label,
.import-panel.import-collapsed #importButton,
.import-panel.import-collapsed #importStatus {
  display: none;
}

.import-panel.import-collapsed::after {
  content: attr(data-import-summary);
  display: block;
  margin-top: 0.65rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(111, 132, 95, 0.32);
  border-radius: 0.75rem;
  background: rgba(239, 247, 231, 0.52);
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.export-confidence {
  border-color: rgba(201, 154, 69, 0.35);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(11, 17, 23, 0.96), rgba(18, 42, 53, 0.92)),
    radial-gradient(ellipse at 80% 0%, rgba(224, 122, 31, 0.22), transparent 14rem);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.export-confidence strong,
.export-confidence > span {
  color: var(--forged-gold);
}

.readiness-card {
  border-radius: 0.65rem;
  background: rgba(255, 252, 244, 0.76);
}

.readiness-card.ready {
  border-color: rgba(111, 132, 95, 0.4);
  background:
    linear-gradient(145deg, rgba(238, 240, 221, 0.94), rgba(207, 216, 194, 0.72));
}

.readiness-card.needs-attention,
.readiness-card.review-recommended {
  border-color: rgba(224, 122, 31, 0.36);
  background:
    linear-gradient(145deg, rgba(255, 244, 225, 0.92), rgba(224, 122, 31, 0.12));
}

.advance-box.ready {
  border-color: rgba(111, 132, 95, 0.42);
  background:
    linear-gradient(145deg, rgba(238, 240, 221, 0.95), rgba(207, 216, 194, 0.7));
}

.advance-box.blocked {
  border-color: rgba(224, 122, 31, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 244, 225, 0.94), rgba(224, 122, 31, 0.1));
}

.check-pass {
  color: #49683d;
}

.check-fail,
.blocker-hint {
  color: #9f4c24;
}

.source-supabase {
  background: #6f845f;
}

.source-local {
  color: var(--ink);
  background: rgba(201, 154, 69, 0.28);
}

.toast {
  border-color: rgba(201, 154, 69, 0.34);
  color: var(--soft-ivory);
  background: rgba(11, 17, 23, 0.94);
  box-shadow: 0 20px 62px rgba(0, 0, 0, 0.38);
}

.live-celebration {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
}

.live-celebration-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.35rem;
  min-width: min(24rem, calc(100vw - 2rem));
  padding: 1rem 1.2rem;
  border: 1px solid rgba(201, 154, 69, 0.5);
  border-radius: 0.85rem;
  color: var(--soft-ivory);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(224, 122, 31, 0.24), transparent 18rem),
    linear-gradient(145deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(201, 154, 69, 0.16);
  animation: liveCelebrationCard 2.2s ease both;
}

.live-celebration-card span {
  color: var(--forged-gold);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-celebration-card strong {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1;
}

.live-celebration i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--forged-gold), var(--ember-orange));
  box-shadow: 0 0 18px rgba(224, 122, 31, 0.55);
  transform: rotate(calc(var(--i) * 20deg)) translateY(0);
  animation: forgeSpark 1.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * 18ms);
}

@keyframes liveCelebrationCard {
  0% {
    opacity: 0;
    transform: translateY(0.8rem) scale(0.96);
  }
  14%,
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-0.35rem) scale(0.98);
  }
}

@keyframes forgeSpark {
  0% {
    opacity: 0;
    transform: rotate(calc(var(--i) * 20deg)) translateY(0) scale(0.5);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(calc(var(--i) * 20deg)) translateY(-12rem) scale(1);
  }
}

code,
pre {
  color: #5b3e17;
}

.profile-view,
.profile-settings-view {
  max-width: 76rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 16%, rgba(244, 239, 229, 0.12), transparent 24rem),
    radial-gradient(ellipse at 18% 10%, rgba(224, 122, 31, 0.2), transparent 24rem),
    linear-gradient(130deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94) 58%, rgba(24, 36, 43, 0.9));
}

.profile-view,
.profile-settings-view,
.profile-panel,
.profile-settings-form {
  color: var(--soft-ivory);
}

.profile-view .setup-header .home-copy,
.profile-settings-view .setup-header .home-copy {
  color: rgba(248, 243, 232, 0.76);
}

.profile-panel {
  display: grid;
  gap: 1rem;
}

.profile-hero-card,
.profile-detail-card,
.profile-metric {
  border: 1px solid rgba(201, 154, 69, 0.24);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.5)),
    rgba(11, 17, 23, 0.38);
  box-shadow:
    0 24px 70px rgba(2, 6, 10, 0.34),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.profile-hero-card {
  overflow: hidden;
  color: var(--soft-ivory);
}

.profile-banner {
  min-height: 10rem;
  background:
    radial-gradient(circle at 18% 24%, rgba(224, 122, 31, 0.32), transparent 18rem),
    radial-gradient(ellipse at 82% 0%, rgba(244, 239, 229, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(18, 42, 53, 0.98), rgba(11, 17, 23, 0.96));
  background-size: cover;
  background-position: center;
}

.profile-identity {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem 0.2rem;
  margin-top: -2.25rem;
}

.profile-identity h3 {
  margin: 0;
  color: var(--soft-ivory);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
}

.profile-identity p:not(.eyebrow),
.profile-bio,
.profile-detail-card p,
.profile-project-row strong {
  color: rgba(248, 243, 232, 0.78);
}

.profile-identity .eyebrow,
.profile-detail-card .eyebrow,
.profile-view .section-title,
.profile-settings-view .section-title {
  color: var(--forged-gold);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border: 3px solid rgba(201, 154, 69, 0.72);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ink-black), var(--forge-navy));
  color: var(--soft-ivory);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(11, 17, 23, 0.24);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-bio,
.profile-link-row {
  padding: 0 1.2rem 1rem;
}

.profile-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.profile-link-row a {
  color: var(--forged-gold);
  font-weight: 800;
}

.profile-metrics-grid,
.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

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

.profile-metric,
.profile-detail-card {
  padding: 1rem;
  color: var(--soft-ivory);
}

.profile-detail-card h3 {
  margin: 0.2rem 0 0.7rem;
  color: var(--soft-ivory);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.05;
}

.profile-metric span {
  display: block;
  color: rgba(248, 243, 232, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-metric strong {
  display: block;
  color: var(--soft-ivory);
  font-family: var(--font-serif);
  font-size: 2rem;
}

.profile-project-list {
  display: grid;
  gap: 0.55rem;
}

.profile-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(201, 154, 69, 0.2);
  background: rgba(248, 243, 232, 0.07);
}

.profile-project-row span {
  display: block;
  color: rgba(248, 243, 232, 0.62);
  font-size: 0.85rem;
}

.profile-settings-form {
  align-items: start;
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.5)),
    rgba(11, 17, 23, 0.38);
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 0.85rem;
  padding: clamp(1rem, 2.4vw, 1.4rem);
  box-shadow:
    0 24px 70px rgba(2, 6, 10, 0.34),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.profile-settings-view .field-label,
.profile-settings-form .field-label,
.profile-settings-form .checkbox-row,
.profile-settings-form .microcopy {
  color: rgba(248, 243, 232, 0.78);
}

.profile-settings-form .text-input,
.profile-settings-form .review-input,
.profile-settings-form select {
  color: var(--ink);
  background: rgba(255, 253, 246, 0.94);
}

.admin-view,
.feedback-view {
  max-width: 82rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 16%, rgba(244, 239, 229, 0.12), transparent 24rem),
    radial-gradient(ellipse at 18% 10%, rgba(224, 122, 31, 0.2), transparent 24rem),
    linear-gradient(130deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94) 58%, rgba(24, 36, 43, 0.9));
}

.feedback-view {
  max-width: 64rem;
}

.admin-panel,
.admin-user-list,
.admin-health-grid {
  display: grid;
  gap: 0.85rem;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.8rem;
}

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

.admin-card,
.admin-user-card {
  border: 1px solid rgba(201, 154, 69, 0.24);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.5)),
    rgba(11, 17, 23, 0.38);
  box-shadow:
    0 20px 60px rgba(2, 6, 10, 0.26),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.admin-card {
  padding: 1rem;
  border-radius: 0.85rem;
}

.admin-card h3,
.admin-user-card h3 {
  margin: 0;
  color: var(--soft-ivory);
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1;
}

.admin-card p,
.admin-user-card p {
  color: rgba(248, 243, 232, 0.72);
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border-radius: 0.85rem;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.admin-user-meta span {
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(201, 154, 69, 0.22);
  border-radius: 999px;
  color: rgba(248, 243, 232, 0.74);
  font-size: 0.76rem;
}

.admin-user-controls {
  display: grid;
  gap: 0.65rem;
}

.admin-invite-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
  gap: 1rem;
  align-items: start;
}

.admin-invite-form {
  display: grid;
  gap: 0.65rem;
}

.feedback-form {
  align-items: start;
  padding: clamp(1rem, 2.4vw, 1.4rem);
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 0.85rem;
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.5)),
    rgba(11, 17, 23, 0.38);
  box-shadow:
    0 24px 70px rgba(2, 6, 10, 0.34),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.feedback-card p {
  white-space: pre-wrap;
}

.invite-card.inactive {
  opacity: 0.7;
}

.warning-text {
  color: #f0a15c !important;
}

.admin-user-controls .field-label,
.admin-invite-form .field-label,
.feedback-form .field-label,
.admin-user-controls .checkbox-row,
.admin-user-controls .microcopy,
.admin-invite-form .microcopy,
.feedback-form .microcopy {
  color: rgba(248, 243, 232, 0.78);
}

.feedback-view .setup-header .home-copy {
  color: rgba(248, 243, 232, 0.76);
}

.beta-pending-view {
  max-width: 58rem;
}

.beta-pending-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.3rem;
  border: 1px solid rgba(201, 154, 69, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.86), rgba(232, 216, 184, 0.52)),
    var(--parchment);
  box-shadow: 0 22px 58px rgba(11, 17, 23, 0.18);
}

.beta-pending-card h3 {
  margin: 0;
  color: #3f2b12;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.beta-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.lifecycle-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.lifecycle-summary > div,
.lifecycle-event {
  padding: 0.75rem;
  border: 1px solid rgba(91, 62, 23, 0.14);
  background: rgba(248, 243, 232, 0.55);
}

.lifecycle-summary strong {
  display: block;
  color: #3f2b12;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.lifecycle-form {
  margin-top: 0.75rem;
}

.lifecycle-timeline {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lifecycle-event strong,
.lifecycle-event span {
  display: block;
}

.lifecycle-event span {
  color: #6b5a42;
  font-size: 0.84rem;
}

.lifecycle-event p {
  margin: 0.4rem 0 0;
}

.prepare-step-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0 1.2rem;
}

.prepare-step {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid rgba(91, 62, 23, 0.16);
  background: rgba(248, 243, 232, 0.52);
  color: #6b5a42;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.prepare-step span {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: rgba(11, 17, 23, 0.08);
  color: #5b3e17;
  font-weight: 800;
  font-size: 0.78rem;
}

.prepare-step strong {
  font-size: 0.78rem;
  line-height: 1.15;
}

.prepare-step.done {
  border-color: rgba(201, 154, 69, 0.42);
  background: rgba(201, 154, 69, 0.13);
}

.prepare-step.current {
  border-color: rgba(224, 122, 31, 0.62);
  background: rgba(224, 122, 31, 0.13);
  box-shadow: 0 12px 30px rgba(91, 62, 23, 0.1);
}

.visual-subflow {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.visual-substep-card {
  border: 1px solid rgba(91, 62, 23, 0.14);
  border-radius: 8px;
  background: rgba(248, 243, 232, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.visual-substep-card.current {
  border-color: rgba(224, 122, 31, 0.56);
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.9), rgba(232, 216, 184, 0.42)),
    var(--parchment);
  box-shadow:
    0 18px 42px rgba(91, 62, 23, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.visual-substep-card.done {
  border-color: rgba(201, 154, 69, 0.32);
}

.visual-substep-card.locked {
  opacity: 0.7;
}

.visual-substep-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
}

.visual-substep-index {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(91, 62, 23, 0.18);
  border-radius: 50%;
  background: rgba(11, 17, 23, 0.08);
  color: #5b3e17;
  font-weight: 900;
}

.visual-substep-card.current .visual-substep-index {
  border-color: rgba(224, 122, 31, 0.5);
  background: rgba(224, 122, 31, 0.14);
}

.visual-substep-header h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1;
}

.visual-substep-header p {
  margin: 0.25rem 0 0;
  color: #6b5a42;
  font-size: 0.92rem;
  line-height: 1.35;
}

.visual-substep-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.visual-substep-content {
  border-top: 1px solid rgba(91, 62, 23, 0.12);
  padding: 0 0.85rem 0.85rem;
}

.visual-next-box {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.72);
}

.visual-next-box strong {
  display: block;
  color: #3f2b12;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.visual-next-box p {
  margin: 0.25rem 0 0;
  color: #6b5a42;
}

.visual-plan-form,
.image-queue-panel {
  margin-top: 1rem;
  border: 1px solid rgba(91, 62, 23, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.78), rgba(232, 216, 184, 0.42)),
    var(--parchment);
  box-shadow: 0 18px 44px rgba(11, 17, 23, 0.12);
}

.visual-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.7rem 0 1rem;
}

.visual-choice {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid rgba(91, 62, 23, 0.18);
  background: rgba(248, 243, 232, 0.62);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.visual-choice:hover,
.visual-choice.selected {
  border-color: rgba(201, 154, 69, 0.72);
  box-shadow: 0 14px 34px rgba(201, 154, 69, 0.17);
  transform: translateY(-1px);
}

.visual-choice input {
  width: fit-content;
}

.visual-choice strong {
  color: #3f2b12;
}

.visual-choice span {
  color: #6b5a42;
  font-size: 0.9rem;
}

.visual-style-lock,
.cover-wizard,
.visual-reference-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(91, 62, 23, 0.14);
}

.reference-strip.empty {
  margin-top: 0.85rem;
  border: 1px dashed rgba(91, 62, 23, 0.24);
  border-radius: 8px;
  padding: 0.85rem;
  color: #6b5a42;
  background: rgba(244, 239, 229, 0.56);
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.reference-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  border: 1px solid rgba(91, 62, 23, 0.16);
  border-radius: 8px;
  padding: 0.65rem;
  background: rgba(248, 243, 232, 0.74);
}

.reference-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(11, 17, 23, 0.14);
}

.reference-card strong,
.reference-card span,
.reference-card p {
  display: block;
}

.reference-card span,
.reference-card p {
  margin: 0.1rem 0 0;
  color: #6b5a42;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metadata-guided-form {
  gap: 1rem;
}

.safety-guided-form,
.final-review-form {
  gap: 1rem;
}

.guided-form-section {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(91, 62, 23, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.56);
}

.guided-form-section h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
}

.review-input.tall {
  min-height: 9rem;
}

.advanced-details summary,
.visual-advanced-details summary {
  cursor: pointer;
  color: #5b3e17;
  font-weight: 800;
}

.visual-advanced-details {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(91, 62, 23, 0.14);
  border-radius: 0.7rem;
}

.visual-advanced-details > div,
.visual-advanced-details .cover-wizard,
.visual-advanced-details .visual-reference-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(91, 62, 23, 0.1);
}

.field-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: #7a6545;
  margin-left: 0.2rem;
}

.safety-checklist {
  display: grid;
  gap: 0.65rem;
}

.safety-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid rgba(91, 62, 23, 0.14);
  border-radius: 8px;
  background: rgba(248, 243, 232, 0.68);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.safety-check:hover {
  border-color: rgba(201, 154, 69, 0.42);
  background: rgba(255, 253, 246, 0.78);
}

.safety-check:has(input:checked) {
  border-color: rgba(201, 154, 69, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.86), rgba(232, 216, 184, 0.42));
  box-shadow: inset 0 0 0 1px rgba(201, 154, 69, 0.08);
}

.safety-check input {
  margin-top: 0.18rem;
  accent-color: var(--gold);
}

.safety-check strong,
.safety-check small {
  display: block;
}

.safety-check small {
  margin-top: 0.18rem;
  color: #6b5a42;
  line-height: 1.4;
}

.file-tools {
  margin-top: 1rem;
}

.final-review-artifacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.final-review-artifacts .readiness-card {
  min-height: auto;
}

.final-review-check {
  background: rgba(255, 253, 246, 0.64);
}

.publishing-handoff-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
}

.handoff-step {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid rgba(91, 62, 23, 0.16);
  border-radius: 8px;
  background: rgba(248, 243, 232, 0.55);
  color: #6b5a42;
}

.handoff-step span {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(11, 17, 23, 0.08);
  color: #5b3e17;
  font-weight: 900;
  font-size: 0.78rem;
}

.handoff-step strong {
  font-size: 0.82rem;
  line-height: 1.15;
}

.handoff-step.done {
  border-color: rgba(201, 154, 69, 0.4);
  background: rgba(201, 154, 69, 0.13);
}

.handoff-step.current {
  border-color: rgba(224, 122, 31, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.86), rgba(224, 122, 31, 0.12));
  box-shadow: 0 12px 30px rgba(91, 62, 23, 0.1);
}

.publish-handoff-section {
  margin-top: 0.85rem;
}

.handoff-readiness-grid {
  margin-top: 0;
}

.handoff-next-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.handoff-next-list > div {
  padding: 0.75rem;
  border: 1px solid rgba(91, 62, 23, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.58);
}

.handoff-next-list strong {
  display: block;
  color: #3f2b12;
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1;
}

.handoff-next-list p {
  margin: 0.35rem 0 0;
  color: #6b5a42;
  font-size: 0.86rem;
  line-height: 1.36;
}

.publishing-handoff-check {
  background: rgba(255, 253, 246, 0.66);
}

.field-stack {
  display: grid;
  gap: 0.35rem;
  color: #5b3e17;
  font-weight: 700;
}

.queue-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.prepare-asset-card {
  border-color: rgba(91, 62, 23, 0.16);
}

.prepare-asset-card.next {
  border-color: rgba(224, 122, 31, 0.62);
  box-shadow: 0 16px 38px rgba(224, 122, 31, 0.16);
}

.prepare-asset-card.waiting {
  opacity: 0.72;
}

.image-queue-panel.inline-panel {
  margin-top: 0.85rem;
}

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

.asset-preview.placeholder {
  display: grid;
  place-items: center;
  min-height: 10rem;
  background: rgba(18, 42, 53, 0.1);
  color: #6b5a42;
  font-weight: 800;
}

.compact-prompt {
  min-height: 7rem;
  font-size: 0.88rem;
}

.asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
  align-items: center;
}

.asset-delete-btn {
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.55;
  border-radius: 50%;
  transition: opacity 0.15s;
}

.asset-delete-btn:hover {
  opacity: 1;
}

.waiting-notice {
  font-size: 0.78rem;
  color: var(--amber, #c99a45);
  background: rgba(201, 154, 69, 0.1);
  border: 1px solid rgba(201, 154, 69, 0.3);
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.manual-image-help {
  border-color: rgba(201, 154, 69, 0.42);
  background:
    linear-gradient(135deg, rgba(201, 154, 69, 0.14), rgba(244, 239, 229, 0.06));
}

.manual-asset-upload {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0;
  padding: 0.8rem;
  border: 1px solid rgba(201, 154, 69, 0.26);
  border-radius: 0.72rem;
  background: rgba(244, 239, 229, 0.08);
}

.manual-asset-upload .small-button {
  justify-self: start;
}

.placement-control {
  display: grid;
  gap: 0.4rem;
  margin: 0.8rem 0;
  padding: 0.75rem;
  border: 1px solid rgba(143, 160, 168, 0.22);
  border-radius: 0.72rem;
  background: rgba(11, 17, 23, 0.18);
}

.placement-control code {
  padding: 0.12rem 0.34rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 0.36rem;
  color: var(--forged-gold);
  background: rgba(0, 0, 0, 0.24);
}

/* Dark forge treatment for guided beta publishing surfaces */
.wizard-banner,
.export-center-panel,
.visual-substep-card,
.visual-plan-form,
.image-queue-panel,
.guided-form-section,
.handoff-next-list > div,
.prepare-asset-card,
.reference-card,
.reference-strip.empty,
.lifecycle-summary > div,
.lifecycle-event {
  border-color: rgba(201, 154, 69, 0.24);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.5)),
    rgba(11, 17, 23, 0.38);
  box-shadow:
    0 20px 60px rgba(2, 6, 10, 0.26),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.wizard-title,
.guided-form-section h4,
.visual-substep-header h4,
.visual-next-box strong,
.handoff-next-list strong,
.lifecycle-summary strong,
.metric-value,
.reference-card strong,
.visual-choice strong,
.field-stack,
.queue-heading h4,
.prepare-asset-card strong {
  color: var(--soft-ivory);
}

.wizard-description,
.wizard-actions,
.wizard-hint,
.visual-substep-header p,
.visual-next-box p,
.visual-choice span,
.reference-card span,
.reference-card p,
.reference-strip.empty,
.safety-check small,
.handoff-next-list p,
.lifecycle-event span,
.panel-copy,
.final-review-check,
.publishing-handoff-check {
  color: rgba(248, 243, 232, 0.72);
}

.wizard-eyebrow,
.wizard-step-of,
.advanced-details summary,
.readiness-card span {
  color: var(--forged-gold);
}

.wizard-banner .wizard-actions li {
  color: rgba(248, 243, 232, 0.82);
}

.wizard-banner .wizard-actions li::marker {
  color: var(--forged-gold);
}

.metric .metric-value {
  color: #2d2114;
}

.metric .metric-label {
  color: #5f513d;
}

.prepare-step,
.handoff-step,
.pipeline-step {
  border-color: rgba(201, 154, 69, 0.2);
  color: rgba(248, 243, 232, 0.72);
  background: rgba(248, 243, 232, 0.07);
  box-shadow: inset 0 1px 0 rgba(248, 243, 232, 0.06);
}

.prepare-step span,
.handoff-step span,
.visual-substep-index {
  border-color: rgba(201, 154, 69, 0.28);
  color: var(--forged-gold);
  background: rgba(11, 17, 23, 0.35);
}

.prepare-step.done,
.handoff-step.done,
.pipeline-step.done,
.visual-substep-card.done {
  border-color: rgba(201, 154, 69, 0.42);
  background: rgba(201, 154, 69, 0.12);
}

.prepare-step.current,
.handoff-step.current,
.pipeline-step.current,
.visual-substep-card.current {
  border-color: rgba(224, 122, 31, 0.58);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(224, 122, 31, 0.18), transparent 16rem),
    linear-gradient(145deg, rgba(248, 243, 232, 0.1), rgba(18, 42, 53, 0.56)),
    rgba(11, 17, 23, 0.48);
  box-shadow:
    0 18px 48px rgba(224, 122, 31, 0.14),
    inset 0 1px 0 rgba(248, 243, 232, 0.1);
}

.visual-substep-card.current .visual-substep-index {
  border-color: rgba(224, 122, 31, 0.62);
  background: rgba(224, 122, 31, 0.16);
}

.visual-substep-content,
.visual-style-lock,
.cover-wizard,
.visual-reference-panel {
  border-color: rgba(201, 154, 69, 0.18);
}

.visual-next-box,
.safety-check,
.final-review-check,
.publishing-handoff-check {
  border-color: rgba(201, 154, 69, 0.2);
  color: var(--soft-ivory);
  background: rgba(248, 243, 232, 0.07);
}

.visual-choice {
  border-color: rgba(201, 154, 69, 0.2);
  color: var(--soft-ivory);
  background: rgba(248, 243, 232, 0.07);
}

.visual-choice:hover,
.visual-choice.selected,
.safety-check:hover,
.safety-check:has(input:checked) {
  border-color: rgba(201, 154, 69, 0.62);
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.14), rgba(248, 243, 232, 0.08));
  box-shadow: 0 14px 34px rgba(201, 154, 69, 0.14);
}

.readiness-card,
.advance-box {
  border-color: rgba(201, 154, 69, 0.22);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.48)),
    rgba(11, 17, 23, 0.36);
}

.readiness-card.ready,
.advance-box.ready {
  border-color: rgba(201, 154, 69, 0.48);
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.16), rgba(248, 243, 232, 0.08)),
    rgba(11, 17, 23, 0.38);
}

.readiness-card.needs-attention,
.readiness-card.review-recommended,
.advance-box.blocked {
  border-color: rgba(224, 122, 31, 0.48);
  background:
    linear-gradient(145deg, rgba(224, 122, 31, 0.14), rgba(248, 243, 232, 0.07)),
    rgba(11, 17, 23, 0.38);
}

.readiness-card strong,
.advance-box strong {
  color: var(--soft-ivory);
}

.readiness-card p,
.readiness-card li,
.advance-box p,
.package-download-list code {
  color: rgba(248, 243, 232, 0.72);
}

.check-pass {
  color: #d5b56a;
}

.check-fail,
.blocker-hint {
  color: #f0a15c;
}

.asset-preview.placeholder {
  color: rgba(248, 243, 232, 0.72);
  background: rgba(248, 243, 232, 0.07);
}

.published-project-card,
.live-kdp-card {
  border-color: rgba(201, 154, 69, 0.42);
  color: var(--soft-ivory);
  background:
    radial-gradient(ellipse at 92% 0%, rgba(224, 122, 31, 0.18), transparent 18rem),
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.52)),
    rgba(11, 17, 23, 0.42);
  box-shadow:
    0 20px 62px rgba(2, 6, 10, 0.3),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.published-project-card h3,
.published-project-card p,
.published-project-card .eyebrow,
.published-project-card .live-kdp-meta small,
.live-kdp-card h3,
.live-kdp-card p,
.live-kdp-card .eyebrow,
.live-kdp-card .live-kdp-meta small {
  color: var(--soft-ivory);
}

.published-project-card p,
.published-project-card .live-kdp-meta small,
.live-kdp-card p,
.live-kdp-card .live-kdp-meta small {
  opacity: 0.76;
}

/* Contrast hardening for beta guided steps. Keep light cards dark-text and forge cards light-text. */
.choice-card:not(.published-project-card):not(.live-kdp-card),
.launcher-card:not(.primary-launch),
.auth-form,
.profile-detail-card,
.profile-metric,
.profile-project-row {
  color: var(--ink);
}

.choice-card:not(.published-project-card):not(.live-kdp-card) h3,
.choice-card:not(.published-project-card):not(.live-kdp-card) p,
.choice-card:not(.published-project-card):not(.live-kdp-card) small,
.choice-card:not(.published-project-card):not(.live-kdp-card) .eyebrow,
.launcher-card:not(.primary-launch) strong,
.launcher-card:not(.primary-launch) small,
.launcher-card:not(.primary-launch) span,
.auth-form h2,
.auth-form p,
.auth-form .field-label,
.profile-detail-card h3,
.profile-detail-card p,
.profile-metric span,
.profile-metric strong,
.profile-project-row strong,
.profile-project-row span {
  color: var(--ink) !important;
}

.choice-card:not(.published-project-card):not(.live-kdp-card) p,
.choice-card:not(.published-project-card):not(.live-kdp-card) small,
.auth-form .microcopy,
.profile-detail-card p,
.profile-project-row span {
  color: var(--ink-soft) !important;
}

.wizard-banner,
.export-center-panel,
.visual-substep-card,
.visual-plan-form,
.image-queue-panel,
.guided-form-section,
.handoff-next-list > div,
.prepare-asset-card,
.reference-card,
.reference-strip.empty,
.lifecycle-summary > div,
.lifecycle-event,
.readiness-card,
.advance-box,
.workflow-notice,
.visual-next-box,
.safety-check,
.final-review-check,
.publishing-handoff-check {
  color: var(--soft-ivory);
}

.wizard-banner h3,
.export-center-panel h3,
.visual-substep-card h4,
.visual-plan-form h4,
.image-queue-panel h4,
.guided-form-section h4,
.handoff-next-list strong,
.prepare-asset-card h4,
.prepare-asset-card strong,
.reference-card strong,
.lifecycle-summary strong,
.lifecycle-event strong,
.readiness-card strong,
.advance-box strong,
.workflow-notice strong,
.visual-next-box strong,
.safety-check strong,
.final-review-check strong,
.publishing-handoff-check strong,
.visual-choice strong {
  color: var(--soft-ivory) !important;
}

.wizard-banner p,
.wizard-banner li,
.export-center-panel p,
.visual-substep-card p,
.visual-plan-form p,
.image-queue-panel p,
.guided-form-section p,
.handoff-next-list p,
.prepare-asset-card p,
.reference-card p,
.reference-card span,
.reference-strip.empty,
.lifecycle-event span,
.readiness-card p,
.readiness-card li,
.advance-box p,
.workflow-notice p,
.visual-next-box p,
.safety-check small,
.final-review-check small,
.publishing-handoff-check small,
.visual-choice span,
.guided-form-section .microcopy,
.prepare-asset-card .microcopy {
  color: rgba(248, 243, 232, 0.78) !important;
}

.guided-form-section .field-label,
.guided-form-section .field-stack,
.visual-plan-form .field-label,
.visual-plan-form .field-stack,
.prepare-asset-card .field-label,
.workflow-notice .field-label {
  color: rgba(248, 243, 232, 0.86) !important;
}

.guided-form-section input,
.guided-form-section textarea,
.guided-form-section select,
.visual-plan-form input,
.visual-plan-form textarea,
.visual-plan-form select,
.prepare-asset-card input,
.prepare-asset-card textarea,
.prepare-asset-card select {
  color: var(--ink) !important;
  background: rgba(255, 252, 244, 0.96) !important;
}

.published-summary div {
  border-color: rgba(201, 154, 69, 0.24);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.48)),
    rgba(11, 17, 23, 0.36);
}

.published-summary strong,
.published-summary a {
  color: var(--soft-ivory);
}

.publishing-steps,
.upload-focus-card,
.upload-next-note {
  border-color: rgba(201, 154, 69, 0.24);
  color: var(--soft-ivory);
  background:
    linear-gradient(145deg, rgba(248, 243, 232, 0.08), rgba(18, 42, 53, 0.5)),
    rgba(11, 17, 23, 0.38);
  box-shadow:
    0 18px 46px rgba(2, 6, 10, 0.22),
    inset 0 1px 0 rgba(248, 243, 232, 0.08);
}

.publishing-steps span {
  color: rgba(248, 243, 232, 0.74);
  background: rgba(248, 243, 232, 0.07);
}

.upload-focus-card h3,
.upload-next-note strong {
  color: var(--soft-ivory);
}

.upload-focus-card p:not(.eyebrow),
.upload-next-note {
  color: rgba(248, 243, 232, 0.76);
}

/* Final contrast guardrails: parchment cards must never inherit ivory text. */
.claim-workspace,
.choice-card:not(.published-project-card):not(.live-kdp-card),
.launcher-card:not(.primary-launch),
.auth-form,
.profile-detail-card,
.profile-metric,
.profile-project-row,
.workflow-notice,
.advance-box,
.readiness-card,
.publish-artifact-card,
.publish-warning-box,
.package-details,
.generated-plan,
.first-time-guide,
.safety-check,
.final-review-check,
.publishing-handoff-check,
.upload-choice-card,
.asset-card,
.secondary-gate,
.brief-output,
.editor-card,
.pipeline-card,
.assistant-card,
.panel:not(.export-center-panel) {
  color: var(--ink) !important;
}

.workflow-notice,
.advance-box,
.readiness-card,
.safety-check,
.final-review-check,
.publishing-handoff-check {
  border-color: rgba(74, 54, 30, 0.18) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.96), rgba(232, 216, 184, 0.78)) !important;
  box-shadow:
    0 16px 38px rgba(3, 7, 10, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
}

.workflow-notice.success,
.advance-box.ready,
.readiness-card.ready {
  border-color: rgba(111, 132, 95, 0.42) !important;
  background:
    linear-gradient(145deg, rgba(238, 240, 221, 0.96), rgba(207, 216, 194, 0.72)) !important;
}

.workflow-notice.blocked,
.advance-box.blocked,
.readiness-card.needs-attention,
.readiness-card.review-recommended {
  border-color: rgba(224, 122, 31, 0.34) !important;
  background:
    linear-gradient(145deg, rgba(255, 244, 225, 0.96), rgba(224, 122, 31, 0.12)) !important;
}

.claim-workspace h1,
.claim-workspace h2,
.claim-workspace h3,
.choice-card:not(.published-project-card):not(.live-kdp-card) h3,
.launcher-card:not(.primary-launch) strong,
.auth-form h2,
.profile-detail-card h3,
.profile-metric strong,
.profile-project-row strong,
.workflow-notice strong,
.advance-box strong,
.readiness-card strong,
.publish-artifact-card strong,
.publish-warning-box h4,
.package-details summary,
.generated-plan strong,
.first-time-guide strong,
.safety-check strong,
.final-review-check strong,
.publishing-handoff-check strong,
.asset-card strong,
.secondary-gate strong,
.brief-output strong,
.editor-card strong,
.pipeline-card strong,
.assistant-card h3,
.panel:not(.export-center-panel) strong,
.panel:not(.export-center-panel) h3,
.panel:not(.export-center-panel) h4 {
  color: var(--ink) !important;
}

.claim-workspace p,
.claim-workspace small,
.choice-card:not(.published-project-card):not(.live-kdp-card) p,
.choice-card:not(.published-project-card):not(.live-kdp-card) small,
.launcher-card:not(.primary-launch) small,
.launcher-card:not(.primary-launch) span,
.auth-form p,
.auth-form .microcopy,
.profile-detail-card p,
.profile-project-row span,
.workflow-notice p,
.advance-box p,
.readiness-card p,
.readiness-card li,
.publish-artifact-card p,
.publish-warning-box p,
.package-details p,
.generated-plan p,
.first-time-guide p,
.first-time-guide li,
.safety-check small,
.final-review-check small,
.publishing-handoff-check small,
.asset-card p,
.secondary-gate p,
.brief-output p,
.editor-card p,
.pipeline-card p,
.assistant-card p,
.panel:not(.export-center-panel) p,
.panel:not(.export-center-panel) li,
.panel:not(.export-center-panel) small {
  color: var(--ink-soft) !important;
}

.workflow-notice .field-label,
.advance-box .field-label,
.readiness-card .field-label,
.safety-check .field-label,
.final-review-check .field-label,
.publishing-handoff-check .field-label,
.publish-artifact-card .field-label,
.package-details .field-label,
.panel:not(.export-center-panel) .field-label {
  color: #5b3e17 !important;
}

@media (max-width: 1180px) {
  .auth-panel {
    grid-template-columns: 1fr;
    background:
      radial-gradient(ellipse at 74% 70%, rgba(244, 239, 229, 0.2), transparent 20rem),
      radial-gradient(ellipse at 20% 10%, rgba(224, 122, 31, 0.24), transparent 22rem),
      linear-gradient(160deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.92) 62%, rgba(24, 36, 43, 0.9));
  }

  .auth-panel::before {
    background:
      linear-gradient(180deg, transparent 0 46%, rgba(201, 154, 69, 0.16) 62%, transparent 86%);
  }

  .auth-story {
    min-height: 24rem;
  }

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

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

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

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

@media (max-width: 760px) {
  .app-home {
    padding: 0.75rem;
  }

  .account-dock {
    right: 0.5rem;
    left: 0.5rem;
    justify-content: center;
    border-radius: 0.9rem;
  }

  .account-dock span {
    display: none;
  }

  .auth-panel,
  .launcher,
  .setup-view,
  .stage,
  .rail,
  .hero,
  .assistant-card,
  .wizard-banner,
  .panel,
  .editor-card,
  .pipeline-card {
    border-radius: 0.72rem;
  }

  .auth-panel {
    padding: 0.9rem;
    background:
      radial-gradient(ellipse at 70% 76%, rgba(244, 239, 229, 0.2), transparent 17rem),
      radial-gradient(ellipse at 18% 8%, rgba(224, 122, 31, 0.22), transparent 18rem),
      linear-gradient(165deg, rgba(11, 17, 23, 0.98), rgba(18, 42, 53, 0.94) 64%, rgba(24, 36, 43, 0.92));
  }

  .auth-story {
    min-height: 18rem;
    padding: 0.5rem;
  }

  .auth-proof-grid {
    grid-template-columns: 1fr;
  }

  .auth-form {
    padding: 1rem;
  }

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

  .creator-home-actions,
  .publishing-steps,
  .publishing-handoff-steps,
  .admin-metrics,
  .admin-health-grid,
  .visual-choice-grid,
  .form-grid.two,
  .final-review-artifacts,
  .handoff-next-list,
  .prepare-step-rail,
  .profile-metrics-grid,
  .profile-detail-grid,
  .admin-invite-panel,
  .admin-user-card {
    grid-template-columns: 1fr;
  }

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

  .visual-substep-actions {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .launcher-card {
    min-height: 11rem;
  }

  .launcher-card strong {
    margin-top: 2rem;
  }

  .hero {
    min-height: auto;
  }

  .hero h2 {
    font-size: clamp(2.1rem, 13vw, 3.7rem);
  }

  .hero-actions,
  .auth-actions {
    display: grid;
    width: 100%;
  }

  .primary-button,
  .ghost-button,
  .small-button,
  .ghost-light-button {
    min-height: 2.8rem;
  }

  .export-confidence {
    display: grid;
  }
}

/* Workspace V2: normal-user publishing workspace. Admin mode keeps the legacy tools. */
.admin-mode .workspace-v2,
.workspace-v2[hidden] {
  display: none !important;
}

.beginner-mode.production-view .account-dock,
.beginner-mode.production-view .rail,
.beginner-mode.production-view .stage {
  display: none !important;
}

.beginner-mode.production-view .shell {
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(31, 90, 97, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(31, 90, 97, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 12% 8%, rgba(231, 178, 88, 0.2), transparent 24rem),
    radial-gradient(ellipse at 88% 18%, rgba(106, 145, 125, 0.18), transparent 26rem),
    linear-gradient(180deg, #fbf7ed 0%, #eef3ee 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.beginner-mode.production-view .workspace-v2 {
  --v2-ink: #24333a;
  --v2-muted: #627178;
  --v2-line: rgba(36, 51, 58, 0.14);
  --v2-paper: #fffdf7;
  --v2-soft: #f3f7f1;
  --v2-accent: #1f5a61;
  --v2-accent-2: #b56828;
  display: block;
  min-height: 100vh;
  width: min(94rem, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 2.6vw, 2.6rem);
  color: var(--v2-ink);
}

.v2-topbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(1rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--v2-line);
}

.v2-brand-lockup {
  display: flex;
  min-width: 0;
  gap: 0.9rem;
  align-items: center;
}

.v2-brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 0.55rem;
  color: #fff9e8;
  background: linear-gradient(145deg, #143a43, #1f5a61);
  box-shadow: 0 14px 34px rgba(31, 90, 97, 0.22);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 900;
}

.v2-eyebrow {
  margin: 0 0 0.25rem;
  color: var(--v2-accent-2) !important;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v2-topbar h1,
.v2-step-intro h2,
.v2-file-toolbar h3 {
  margin: 0;
  color: var(--v2-ink) !important;
  letter-spacing: 0;
}

.v2-topbar h1 {
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
  line-height: 1.05;
}

.v2-topbar p,
.v2-step-intro p,
.v2-support-card p,
.v2-support-card dd,
.v2-file-toolbar p {
  color: var(--v2-muted) !important;
}

.v2-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.v2-quiet-button,
.v2-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--v2-line);
  font-weight: 900;
  line-height: 1;
}

.v2-quiet-button {
  color: var(--v2-ink);
  background: rgba(255, 253, 247, 0.72);
}

.v2-primary-button {
  color: #fffdf7 !important;
  border-color: transparent;
  background: linear-gradient(145deg, #1f5a61, #143a43);
  box-shadow: 0 14px 26px rgba(31, 90, 97, 0.18);
}

.v2-quiet-button.full,
.v2-primary-button.full {
  width: 100%;
}

.v2-step-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  color: #143a43;
  background: #e8f2eb;
  border: 1px solid rgba(31, 90, 97, 0.16);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-progress {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
  margin: clamp(1rem, 2vw, 1.4rem) 0 clamp(1.2rem, 2.6vw, 2rem);
}

.v2-progress-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-height: 4.9rem;
  padding: 0.75rem;
  border: 1px solid var(--v2-line);
  border-radius: 0.55rem;
  background: rgba(255, 253, 247, 0.74);
  cursor: pointer;
  text-align: left;
}

.v2-progress-step > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--v2-ink);
  background: #ead9b9;
  font-family: var(--mono);
  font-weight: 900;
}

.v2-progress-step strong {
  display: block;
  color: var(--v2-ink) !important;
  font-size: 0.86rem;
  line-height: 1.15;
}

.v2-progress-step small {
  color: var(--v2-muted) !important;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-progress-step.done {
  background: rgba(232, 242, 235, 0.86);
}

.v2-progress-step.done > span {
  color: #fffdf7;
  background: #6f845f;
}

.v2-progress-step.current {
  border-color: rgba(181, 104, 40, 0.42);
  background: linear-gradient(145deg, #fffaf0, #f3ead8);
  box-shadow: 0 18px 42px rgba(181, 104, 40, 0.14);
}

.v2-progress-step.current > span {
  color: #fffdf7;
  background: #b56828;
}

.v2-progress-step:focus-visible {
  outline: 3px solid rgba(240, 189, 99, 0.72);
  outline-offset: 3px;
}

.v2-progress-step:hover {
  transform: translateY(-1px);
}

.v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 23rem);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: start;
}

.v2-step-page {
  min-width: 0;
}

.v2-step-intro {
  display: grid;
  gap: 0.45rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--v2-line);
}

.v2-step-intro h2 {
  max-width: 16ch;
  font-size: clamp(2.15rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.v2-step-intro p {
  max-width: 62rem;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.55;
}

.v2-gate-mount {
  margin-top: 1rem;
}

.workspace-v2 .active-gate-panel,
.workspace-v2 .active-gate-panel.workflow-card-active {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  border: 1px solid rgba(36, 51, 58, 0.12);
  border-left: 0;
  border-radius: 0.7rem;
  color: var(--v2-ink);
  background: rgba(255, 253, 247, 0.95);
  box-shadow:
    0 22px 58px rgba(36, 51, 58, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.workspace-v2 .active-gate-panel > .section-title {
  display: none;
}

.workspace-v2 #activeGatePanel {
  display: grid;
  gap: 1rem;
}

.workspace-v2 .panel-heading {
  margin: 0;
  color: var(--v2-ink) !important;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.05;
}

.workspace-v2 .panel-copy,
.workspace-v2 .microcopy,
.workspace-v2 .workflow-notice p,
.workspace-v2 .advance-box p,
.workspace-v2 .first-time-guide li,
.workspace-v2 .review-form p,
.workspace-v2 .guided-form-section p,
.workspace-v2 .visual-substep-card p,
.workspace-v2 .asset-card p {
  color: var(--v2-muted) !important;
  line-height: 1.55;
}

.workspace-v2 .workflow-notice,
.workspace-v2 .advance-box,
.workspace-v2 .first-time-guide,
.workspace-v2 .review-form,
.workspace-v2 .guided-form-section,
.workspace-v2 .visual-substep-card,
.workspace-v2 .asset-card,
.workspace-v2 .secondary-gate,
.workspace-v2 .readiness-card {
  border: 1px solid rgba(36, 51, 58, 0.12);
  border-radius: 0.65rem;
  background: #f8faf5;
  box-shadow: none;
}

.workspace-v2 .workflow-notice.success,
.workspace-v2 .advance-box.ready {
  border-color: rgba(111, 132, 95, 0.34);
  background: #eef6ec;
}

.workspace-v2 .advance-box.blocked {
  border-color: rgba(181, 104, 40, 0.28);
  background: #fff5e8;
}

.workspace-v2 .action-row,
.workspace-v2 .publish-cta,
.workspace-v2 .visual-substep-actions,
.workspace-v2 .export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.workspace-v2 .primary-button,
.workspace-v2 .wizard-button {
  min-height: 3rem;
  border-radius: 0.5rem;
  color: #fffdf7 !important;
  background: linear-gradient(145deg, #1f5a61, #143a43);
  box-shadow: 0 12px 28px rgba(31, 90, 97, 0.18);
}

.workspace-v2 .small-button,
.workspace-v2 .ghost-button {
  min-height: 2.8rem;
  border-radius: 0.5rem;
  color: var(--v2-ink) !important;
  background: #fffdf7;
  border: 1px solid var(--v2-line);
}

.workspace-v2 textarea,
.workspace-v2 input,
.workspace-v2 select {
  border-radius: 0.45rem;
  border-color: rgba(36, 51, 58, 0.18);
  color: var(--v2-ink);
  background: #fffefa;
}

.v2-image-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(31, 90, 97, 0.16);
  border-radius: 0.7rem;
  background: linear-gradient(145deg, #eef7f2, #fffaf0);
}

.v2-image-copy h3 {
  margin: 0 0 0.4rem;
  color: var(--v2-ink) !important;
  font-size: 1.25rem;
}

.v2-image-copy p:last-child {
  margin: 0;
  color: var(--v2-muted) !important;
}

.v2-image-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.v2-image-step {
  display: grid;
  gap: 0.25rem;
  min-height: 4.2rem;
  padding: 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(31, 90, 97, 0.14);
  color: var(--v2-ink);
  background: rgba(255, 253, 247, 0.78);
  text-align: left;
}

.v2-image-step.active {
  color: #fffdf7;
  background: #1f5a61;
}

.v2-image-step.active small,
.v2-image-step.active span {
  color: #fffdf7 !important;
}

.v2-image-step span {
  color: var(--v2-ink) !important;
  font-weight: 900;
}

.v2-image-step small {
  color: var(--v2-muted) !important;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-support-panel {
  display: grid;
  gap: 0.9rem;
  position: sticky;
  top: 1rem;
}

.v2-support-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(36, 51, 58, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 16px 38px rgba(36, 51, 58, 0.08);
}

.v2-support-card > span {
  color: var(--v2-accent-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v2-support-card > strong {
  color: var(--v2-ink) !important;
  font-size: 1.08rem;
  line-height: 1.25;
}

.v2-support-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.v2-support-card dl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.v2-support-card dl div {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(36, 51, 58, 0.08);
}

.v2-support-card dt {
  color: var(--v2-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-support-card dd {
  margin: 0;
  color: var(--v2-ink) !important;
  font-weight: 900;
  text-align: right;
}

.v2-help-card {
  border-color: rgba(31, 90, 97, 0.2);
  background: #eef7f2;
}

.v2-readiness-list {
  display: grid;
  gap: 0.45rem;
}

.v2-readiness-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.1rem;
}

.v2-readiness-line span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #b56828;
}

.v2-readiness-line.ready span {
  background: #6f845f;
}

.v2-readiness-line p {
  overflow: hidden;
  color: var(--v2-ink) !important;
  font-size: 0.85rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-readiness-line small {
  color: var(--v2-muted) !important;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-support-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.v2-support-actions .v2-primary-button {
  grid-column: 1 / -1;
}

.v2-file-drawer {
  margin-top: 1rem;
  border: 1px solid rgba(36, 51, 58, 0.14);
  border-radius: 0.7rem;
  background: #fffdf7;
  box-shadow: 0 22px 58px rgba(36, 51, 58, 0.13);
  overflow: hidden;
}

.v2-file-drawer[hidden] {
  display: none !important;
}

.v2-file-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(36, 51, 58, 0.1);
  background: #f6f2e7;
}

.v2-file-actions {
  display: flex;
  gap: 0.55rem;
}

#v2Editor {
  display: block;
  width: 100%;
  min-height: min(62vh, 46rem);
  padding: clamp(1rem, 2.2vw, 1.7rem);
  border: 0;
  border-radius: 0;
  color: #24333a;
  background: #fffefa;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.72;
  resize: vertical;
}

.v2-file-drawer.file-loaded-flash {
  animation: gateFlash 0.6s ease-in-out 2;
}

@media (max-width: 1120px) {
  .v2-layout {
    grid-template-columns: 1fr;
  }

  .v2-support-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-progress {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .beginner-mode.production-view .workspace-v2 {
    padding: 0.8rem;
  }

  .v2-topbar,
  .v2-file-toolbar {
    display: grid;
  }

  .v2-top-actions,
  .v2-file-actions {
    justify-content: start;
  }

  .v2-progress {
    grid-auto-flow: column;
    grid-auto-columns: minmax(10rem, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .v2-step-intro h2 {
    max-width: 12ch;
  }

  .v2-image-actions,
  .v2-support-panel {
    grid-template-columns: 1fr;
  }

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

  .v2-support-actions {
    grid-template-columns: 1fr;
  }
}

/* Contrast lock: keep text readable when older theme blocks collide. */
:root {
  --readable-ink: #18242b;
  --readable-muted: #465961;
  --readable-soft: #fff9ec;
  --readable-soft-muted: rgba(255, 249, 236, 0.82);
  --readable-light-surface: #fffdf7;
  --readable-light-panel: #f7f2e6;
  --readable-dark-surface: #101922;
  --readable-dark-panel: #182a32;
  --readable-accent: #1f5a61;
}

.beginner-mode.production-view .workspace-v2,
.beginner-mode.production-view .workspace-v2 :is(
  .active-gate-panel,
  .workflow-notice,
  .advance-box,
  .readiness-card,
  .review-form,
  .guided-form-section,
  .visual-substep-card,
  .visual-plan-form,
  .image-queue-panel,
  .prepare-asset-card,
  .reference-card,
  .visual-choice,
  .visual-reference-panel,
  .reference-strip,
  .asset-card,
  .secondary-gate,
  .first-time-guide,
  .safety-check,
  .final-review-check,
  .publishing-handoff-check,
  .publish-artifact-card,
  .package-details,
  .generated-plan,
  .v2-support-card,
  .v2-file-drawer,
  .v2-file-toolbar,
  .v2-image-actions,
  .v2-image-step:not(.active)
) {
  color: var(--readable-ink) !important;
  background: var(--readable-light-surface) !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  strong,
  summary,
  label,
  dt,
  dd,
  span,
  li,
  code,
  .panel-heading,
  .field-label,
  .metric-value
) {
  color: var(--readable-ink) !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  p,
  small,
  .panel-copy,
  .microcopy,
  .wizard-description,
  .wizard-hint,
  .readiness-action-hint,
  .metric-label,
  .field-hint
) {
  color: var(--readable-muted) !important;
}

.beginner-mode.production-view .workspace-v2 :is(input, textarea, select, option) {
  color: var(--readable-ink) !important;
  background: #fffefa !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  .primary-button,
  .assistant-button,
  .wizard-button,
  .v2-primary-button,
  [data-visual-action="generate"],
  [data-build-package]
) {
  color: var(--readable-soft) !important;
  background: linear-gradient(145deg, #1f5a61, #143a43) !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  .primary-button,
  .assistant-button,
  .wizard-button,
  .v2-primary-button,
  [data-visual-action="generate"],
  [data-build-package]
) * {
  color: inherit !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  .small-button,
  .ghost-button,
  .v2-quiet-button,
  .visual-substep-actions button:not(.primary-button):not(.v2-primary-button)
) {
  color: var(--readable-ink) !important;
  background: #fffdf7 !important;
}

.beginner-mode.production-view .workspace-v2 .v2-image-step.active {
  color: var(--readable-soft) !important;
  background: var(--readable-accent) !important;
}

.beginner-mode.production-view .workspace-v2 .v2-image-step.active * {
  color: var(--readable-soft) !important;
}

.beginner-mode.production-view .workspace-v2 :is(.status-pill, .published-badge) {
  color: var(--readable-soft) !important;
  background: var(--readable-accent) !important;
}

.beginner-mode.production-view .workspace-v2 :is(.status-pill.amber, .v2-step-badge) {
  color: var(--readable-ink) !important;
  background: #ead9b9 !important;
}

:is(
  .auth-form,
  .launcher,
  .setup-view,
  .claim-workspace,
  .choice-card:not(.published-project-card):not(.live-kdp-card),
  .launcher-card:not(.primary-launch),
  .panel:not(.export-center-panel),
  .workflow-notice,
  .advance-box,
  .readiness-card,
  .publish-artifact-card,
  .publish-warning-box,
  .package-details,
  .generated-plan,
  .first-time-guide,
  .safety-check,
  .final-review-check,
  .publishing-handoff-check,
  .upload-choice-card,
  .asset-card,
  .secondary-gate,
  .brief-output,
  .editor-card,
  .pipeline-card,
  .assistant-card,
  .admin-invite-panel,
  .admin-user-card,
  .admin-role-form
) {
  color: var(--readable-ink) !important;
}

:is(
  .auth-form,
  .launcher,
  .setup-view,
  .claim-workspace,
  .choice-card:not(.published-project-card):not(.live-kdp-card),
  .launcher-card:not(.primary-launch),
  .panel:not(.export-center-panel),
  .workflow-notice,
  .advance-box,
  .readiness-card,
  .publish-artifact-card,
  .publish-warning-box,
  .package-details,
  .generated-plan,
  .first-time-guide,
  .safety-check,
  .final-review-check,
  .publishing-handoff-check,
  .upload-choice-card,
  .asset-card,
  .secondary-gate,
  .brief-output,
  .editor-card,
  .pipeline-card,
  .assistant-card,
  .admin-invite-panel,
  .admin-user-card,
  .admin-role-form
) :is(h1, h2, h3, h4, h5, h6, strong, summary, label, dt, dd, code) {
  color: var(--readable-ink) !important;
}

:is(
  .auth-form,
  .launcher,
  .setup-view,
  .claim-workspace,
  .choice-card:not(.published-project-card):not(.live-kdp-card),
  .launcher-card:not(.primary-launch),
  .panel:not(.export-center-panel),
  .workflow-notice,
  .advance-box,
  .readiness-card,
  .publish-artifact-card,
  .publish-warning-box,
  .package-details,
  .generated-plan,
  .first-time-guide,
  .safety-check,
  .final-review-check,
  .publishing-handoff-check,
  .upload-choice-card,
  .asset-card,
  .secondary-gate,
  .brief-output,
  .editor-card,
  .pipeline-card,
  .assistant-card,
  .admin-invite-panel,
  .admin-user-card,
  .admin-role-form
) :is(p, li, small, span, .panel-copy, .microcopy, .metric-label, .field-hint) {
  color: var(--readable-muted) !important;
}

:is(
  .auth-story,
  .primary-launch,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) {
  color: var(--readable-soft) !important;
}

:is(
  .auth-story,
  .primary-launch,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) :is(h1, h2, h3, h4, h5, h6, strong, summary, label, dt, dd, code, .panel-heading) {
  color: var(--readable-soft) !important;
}

:is(
  .auth-story,
  .primary-launch,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) :is(p, li, small, span, .panel-copy, .microcopy, .metric-label, .field-hint) {
  color: var(--readable-soft-muted) !important;
}

:is(.primary-button, .assistant-button, .wizard-button, .v2-primary-button) {
  color: var(--readable-soft) !important;
  border-color: transparent !important;
  background: linear-gradient(145deg, #1f5a61, #143a43) !important;
}

:is(.primary-button, .assistant-button, .wizard-button, .v2-primary-button) * {
  color: inherit !important;
}

:is(.small-button, .ghost-light-button) {
  color: var(--readable-ink) !important;
}

:is(
  .auth-form,
  .launcher,
  .setup-view,
  .claim-workspace,
  .choice-card:not(.published-project-card):not(.live-kdp-card),
  .launcher-card:not(.primary-launch),
  .panel:not(.export-center-panel),
  .workflow-notice,
  .advance-box,
  .readiness-card,
  .publish-artifact-card,
  .publish-warning-box,
  .package-details,
  .generated-plan,
  .first-time-guide,
  .safety-check,
  .final-review-check,
  .publishing-handoff-check,
  .upload-choice-card,
  .asset-card,
  .secondary-gate,
  .brief-output,
  .editor-card,
  .pipeline-card,
  .assistant-card
) :is(.small-button, .ghost-button, .ghost-light-button, .v2-quiet-button) {
  color: var(--readable-ink) !important;
  background: var(--readable-light-surface) !important;
}

.account-dock :is(.small-button, .ghost-light-button),
.hero :is(.ghost-button, .small-button),
.admin-panel :is(.small-button, .ghost-button) {
  color: var(--readable-soft) !important;
}

:is(.status-pill, .published-badge, .source-supabase) {
  color: var(--readable-soft) !important;
  background: var(--readable-accent) !important;
}

:is(.status-pill.amber, .source-local, .live-kdp-meta span) {
  color: var(--readable-ink) !important;
  background: #ead9b9 !important;
}

:is(.text-input, .review-input, .scene-input, input, textarea, select, option) {
  color: var(--readable-ink) !important;
  background-color: #fffefa !important;
}

/* Launcher readability reset: cards stay light in every state. */
.launcher .creator-home-actions {
  align-items: stretch;
}

.launcher .launcher-card,
.launcher .launcher-card.primary-launch,
.launcher .launcher-card.locked-card,
.launcher .launcher-card:hover,
.launcher .launcher-card.primary-launch:hover,
.launcher .launcher-card.locked-card:hover {
  color: #17232a !important;
  border: 2px solid rgba(31, 90, 97, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(244, 238, 224, 0.96)) !important;
  box-shadow:
    0 16px 34px rgba(23, 35, 42, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  opacity: 1 !important;
}

.launcher .launcher-card.primary-launch {
  border-color: rgba(181, 104, 40, 0.55) !important;
  background:
    linear-gradient(180deg, #fffaf0, #efdcb9) !important;
}

.launcher .launcher-card:hover,
.launcher .launcher-card.primary-launch:hover,
.launcher .launcher-card.locked-card:hover {
  transform: translateY(-2px) !important;
  color: #17232a !important;
  border-color: rgba(31, 90, 97, 0.52) !important;
  background:
    linear-gradient(180deg, #ffffff, #f5ead5) !important;
  box-shadow:
    0 20px 44px rgba(23, 35, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

.launcher .launcher-card > span,
.launcher .launcher-card:hover > span,
.launcher .launcher-card.primary-launch > span,
.launcher .launcher-card.primary-launch:hover > span {
  color: #8a451e !important;
  opacity: 1 !important;
}

.launcher .launcher-card strong,
.launcher .launcher-card:hover strong,
.launcher .launcher-card.primary-launch strong,
.launcher .launcher-card.primary-launch:hover strong {
  color: #17232a !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.launcher .launcher-card small,
.launcher .launcher-card:hover small,
.launcher .launcher-card.primary-launch small,
.launcher .launcher-card.primary-launch:hover small {
  color: #43545c !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.launcher .launcher-card::after,
.launcher .launcher-card.primary-launch::after {
  background: linear-gradient(90deg, #1f5a61, rgba(181, 104, 40, 0.28)) !important;
  opacity: 1 !important;
}

/* Dark surface text lift: dark panels use brighter, easier-to-read text. */
:is(
  .auth-story,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) {
  color: #fffaf0 !important;
}

:is(
  .auth-story,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) :is(h1, h2, h3, h4, h5, h6, strong, summary, label, dt, dd, code, .panel-heading, .wizard-title) {
  color: #fffdf7 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

:is(
  .auth-story,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) :is(p, li, small, span, .panel-copy, .microcopy, .wizard-description, .wizard-actions, .wizard-hint, .metric-label, .field-hint) {
  color: #fff1d7 !important;
  opacity: 1 !important;
}

:is(
  .auth-story,
  .account-dock,
  .hero,
  .wizard-banner,
  .export-center-panel,
  .published-project-card,
  .live-kdp-card,
  .profile-panel,
  .profile-metric-card,
  .profile-project-row.live-project,
  .admin-panel,
  .admin-card
) :is(.eyebrow, .wizard-eyebrow, .wizard-step-of, .status-pill.amber) {
  color: #ffd88a !important;
  opacity: 1 !important;
}

/* Light cards nested inside dark panels keep dark readable text. */
:is(
  .wizard-banner,
  .export-center-panel,
  .profile-panel,
  .admin-panel,
  .admin-card
) :is(
  .readiness-card,
  .workflow-notice,
  .advance-box,
  .publish-artifact-card,
  .package-details,
  .admin-user-card,
  .admin-invite-panel,
  .profile-detail-card,
  .profile-project-row:not(.live-project),
  .profile-metric,
  .review-form,
  .guided-form-section,
  .visual-substep-card,
  .asset-card,
  .secondary-gate
) {
  color: #18242b !important;
  background: #fffdf7 !important;
}

:is(
  .wizard-banner,
  .export-center-panel,
  .profile-panel,
  .admin-panel,
  .admin-card
) :is(
  .readiness-card,
  .workflow-notice,
  .advance-box,
  .publish-artifact-card,
  .package-details,
  .admin-user-card,
  .admin-invite-panel,
  .profile-detail-card,
  .profile-project-row:not(.live-project),
  .profile-metric,
  .review-form,
  .guided-form-section,
  .visual-substep-card,
  .asset-card,
  .secondary-gate
) :is(h1, h2, h3, h4, h5, h6, strong, summary, label, dt, dd, code, span) {
  color: #18242b !important;
}

:is(
  .wizard-banner,
  .export-center-panel,
  .profile-panel,
  .admin-panel,
  .admin-card
) :is(
  .readiness-card,
  .workflow-notice,
  .advance-box,
  .publish-artifact-card,
  .package-details,
  .admin-user-card,
  .admin-invite-panel,
  .profile-detail-card,
  .profile-project-row:not(.live-project),
  .profile-metric,
  .review-form,
  .guided-form-section,
  .visual-substep-card,
  .asset-card,
  .secondary-gate
) :is(p, li, small, .panel-copy, .microcopy, .metric-label, .field-hint) {
  color: #465961 !important;
}

/* Home page contrast: launcher is a dark surface, so its labels stay light. */
.launcher,
.launcher#launcherView {
  color: #fffaf0 !important;
}

.launcher .launcher-header,
.launcher .project-section {
  color: #fffaf0 !important;
}

.launcher .launcher-header .eyebrow,
.launcher .project-section .section-title,
.launcher .project-section .section-title > span:first-child {
  color: #ffd98d !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.launcher .launcher-header h1 {
  color: #fffdf7 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.launcher .launcher-header .home-copy {
  color: #fff1d7 !important;
  opacity: 1 !important;
}

.launcher .profile-strip {
  color: #fffaf0 !important;
  border-color: rgba(255, 216, 138, 0.42) !important;
  background: rgba(7, 14, 18, 0.62) !important;
}

.launcher .profile-strip > span:not(.workspace-source),
.launcher .mode-toggle,
.launcher .mode-toggle span {
  color: #fff1d7 !important;
  opacity: 1 !important;
}

.launcher .workspace-source,
.launcher .workspace-source.source-supabase,
.launcher .workspace-source.source-local {
  color: #17232a !important;
  background: #ffe2a3 !important;
  border: 1px solid rgba(255, 242, 210, 0.75) !important;
}

.launcher #creativeAccessPill,
.launcher .project-section .status-pill {
  color: #17232a !important;
  background: #ffe2a3 !important;
  border: 1px solid rgba(255, 242, 210, 0.75) !important;
  opacity: 1 !important;
}

.launcher .project-section .small-button {
  color: #17232a !important;
  background: #fffaf0 !important;
  border-color: rgba(255, 216, 138, 0.46) !important;
}

/* InkForge brand layer: anvil-feather dark forge style. */
:root {
  --brand-obsidian: #0b1117;
  --brand-navy: #122a35;
  --brand-charcoal: #18242b;
  --brand-gold: #c99a45;
  --brand-ember: #e07a1f;
  --brand-ivory: #f4efe5;
  --brand-steel: #8fa0a8;
  --brand-cream: #fff7e6;
  --brand-card: rgba(11, 17, 23, 0.9);
  --brand-card-soft: rgba(18, 42, 53, 0.78);
  --serif: "Cinzel Display", "Cinzel", "Trajan Pro", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Inter", "Aptos", "Trebuchet MS", sans-serif;
}

body {
  color: var(--brand-ivory) !important;
  background:
    radial-gradient(ellipse at 14% 4%, rgba(224, 122, 31, 0.2), transparent 26rem),
    radial-gradient(ellipse at 86% 9%, rgba(201, 154, 69, 0.14), transparent 28rem),
    linear-gradient(135deg, #05080b 0%, var(--brand-obsidian) 42%, var(--brand-navy) 100%) !important;
}

body::before {
  background:
    linear-gradient(90deg, rgba(244, 239, 229, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(244, 239, 229, 0.018) 1px, transparent 1px),
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.62) 100%) !important;
}

.grain {
  opacity: 0.28;
  mix-blend-mode: screen;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid rgba(201, 154, 69, 0.5);
  border-radius: 0.75rem;
  background: #05080b;
  box-shadow:
    0 0 0 1px rgba(244, 239, 229, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(224, 122, 31, 0.18);
}

.auth-logo {
  width: clamp(5.5rem, 11vw, 8.5rem);
  height: clamp(5.5rem, 11vw, 8.5rem);
  margin-bottom: 1rem;
}

.launcher-title-lockup {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
}

.launcher-logo {
  width: clamp(4rem, 7vw, 5.7rem);
  height: clamp(4rem, 7vw, 5.7rem);
}

.v2-brand-logo,
.rail-brand-logo {
  width: 3.55rem;
  height: 3.55rem;
}

.auth-panel,
.launcher,
.setup-view,
.beginner-mode.production-view .shell,
.beginner-mode.production-view .workspace-v2,
.rail,
.stage {
  color: var(--brand-ivory) !important;
  background:
    radial-gradient(ellipse at 18% 7%, rgba(224, 122, 31, 0.13), transparent 24rem),
    linear-gradient(145deg, rgba(11, 17, 23, 0.96), rgba(18, 42, 53, 0.9)) !important;
  border-color: rgba(201, 154, 69, 0.28) !important;
}

.auth-story,
.launcher-header,
.setup-header,
.project-section,
.v2-topbar,
.v2-step-intro,
.brand {
  color: var(--brand-ivory) !important;
}

.auth-story h1,
.launcher-header h1,
.setup-header h2,
.v2-topbar h1,
.v2-step-intro h2,
.hero h2,
.brand h1 {
  color: var(--brand-cream) !important;
  letter-spacing: 0;
  text-shadow: 0 3px 20px rgba(224, 122, 31, 0.24) !important;
}

.auth-story .home-copy,
.launcher-header .home-copy,
.setup-header .home-copy,
.v2-step-intro p,
.hero-copy {
  color: #f6e7c9 !important;
}

.eyebrow,
.launcher .launcher-header .eyebrow,
.launcher .project-section .section-title,
.launcher .project-section .section-title > span:first-child,
.section-title,
.v2-eyebrow,
.wizard-eyebrow,
.metric-label {
  color: #f0bd63 !important;
  opacity: 1 !important;
}

.profile-strip,
.account-dock,
.v2-step-badge,
.workspace-source,
.status-pill {
  border-color: rgba(201, 154, 69, 0.42) !important;
}

.launcher .profile-strip,
.profile-strip,
.account-dock {
  background: rgba(5, 8, 11, 0.72) !important;
}

.launcher .profile-strip > span:not(.workspace-source),
.profile-strip,
.mode-toggle,
.mode-toggle span,
.account-dock span {
  color: #f6e7c9 !important;
}

.workspace-source,
.workspace-source.source-supabase,
.workspace-source.source-local,
.launcher #creativeAccessPill,
.launcher .project-section .status-pill,
.status-pill.amber,
.source-local,
.source-supabase {
  color: #10100d !important;
  background: linear-gradient(145deg, #f4d488, var(--brand-gold)) !important;
  border: 1px solid rgba(244, 239, 229, 0.42) !important;
}

.launcher .launcher-card,
.launcher .launcher-card.primary-launch,
.launcher .launcher-card.locked-card,
.launcher .launcher-card:hover,
.launcher .launcher-card.primary-launch:hover,
.launcher .launcher-card.locked-card:hover,
.choice-card,
.panel,
.pipeline-card,
.editor-card,
.assistant-card,
.v2-support-card,
.workspace-v2 .active-gate-panel,
.workspace-v2 .active-gate-panel.workflow-card-active,
.workflow-notice,
.advance-box,
.readiness-card,
.review-form,
.guided-form-section,
.visual-substep-card,
.visual-plan-form,
.image-queue-panel,
.prepare-asset-card,
.reference-card,
.asset-card,
.secondary-gate,
.brief-output,
.admin-card,
.profile-detail-card {
  color: var(--brand-ivory) !important;
  border: 1px solid rgba(201, 154, 69, 0.3) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.055), rgba(18, 42, 53, 0.5)),
    rgba(7, 10, 14, 0.82) !important;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.launcher .launcher-card:hover,
.choice-card:hover,
.book-button:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(224, 122, 31, 0.58) !important;
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(201, 154, 69, 0.16),
    0 0 36px rgba(224, 122, 31, 0.16) !important;
}

.launcher .launcher-card > span,
.launcher .launcher-card:hover > span,
.launcher .launcher-card.primary-launch > span,
.launcher .launcher-card.primary-launch:hover > span,
.choice-card .eyebrow,
.book-meta,
.status-list strong {
  color: #f0bd63 !important;
}

.launcher .launcher-card strong,
.launcher .launcher-card:hover strong,
.launcher .launcher-card.primary-launch strong,
.launcher .launcher-card.primary-launch:hover strong,
.choice-card h3,
.panel-heading,
.panel h3,
.panel h4,
.panel strong,
.v2-support-card > strong,
.workspace-v2 .panel-heading,
.wizard-title,
.assistant-card h3 {
  color: #fff7e6 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.launcher .launcher-card small,
.launcher .launcher-card:hover small,
.launcher .launcher-card.primary-launch small,
.launcher .launcher-card.primary-launch:hover small,
.choice-card p,
.choice-card small,
.panel p,
.panel li,
.panel small,
.panel-copy,
.microcopy,
.v2-support-card p,
.v2-support-card dd,
.workspace-v2 .panel-copy,
.workspace-v2 .microcopy,
.workflow-notice p,
.advance-box p,
.readiness-card p,
.readiness-card li {
  color: #f1dfbd !important;
  opacity: 1 !important;
}

.launcher .launcher-card::after,
.launcher .launcher-card.primary-launch::after,
.panel::before,
.launcher-card::before,
.choice-card::before,
.editor-card::before {
  background: linear-gradient(90deg, transparent, var(--brand-gold), var(--brand-ember), transparent) !important;
  opacity: 0.95 !important;
}

.primary-button,
.assistant-button,
.wizard-button,
.v2-primary-button,
.launcher .project-section .small-button {
  color: #10100d !important;
  border-color: rgba(244, 239, 229, 0.34) !important;
  background: linear-gradient(145deg, #f0bd63, var(--brand-ember)) !important;
  box-shadow: 0 14px 30px rgba(224, 122, 31, 0.24) !important;
}

.primary-button *,
.assistant-button *,
.wizard-button *,
.v2-primary-button * {
  color: inherit !important;
}

.small-button,
.ghost-button,
.ghost-light-button,
.v2-quiet-button,
.account-dock .small-button,
.hero .ghost-button,
.admin-panel .small-button {
  color: var(--brand-ivory) !important;
  border-color: rgba(201, 154, 69, 0.36) !important;
  background: rgba(244, 239, 229, 0.075) !important;
}

.small-button:hover,
.ghost-button:hover,
.ghost-light-button:hover,
.v2-quiet-button:hover {
  color: #fff7e6 !important;
  background: rgba(224, 122, 31, 0.16) !important;
}

.text-input,
.review-input,
.scene-input,
input,
textarea,
select,
option,
#v2Editor {
  color: #fff7e6 !important;
  background: rgba(5, 8, 11, 0.72) !important;
  border-color: rgba(201, 154, 69, 0.34) !important;
}

.text-input::placeholder,
.review-input::placeholder,
.scene-input::placeholder,
textarea::placeholder,
input::placeholder {
  color: rgba(244, 239, 229, 0.58) !important;
}

.v2-image-step,
.v2-image-step:not(.active),
.v2-progress-step {
  color: var(--brand-ivory) !important;
  background: rgba(7, 10, 14, 0.74) !important;
  border-color: rgba(201, 154, 69, 0.28) !important;
}

.v2-image-step.active,
.v2-progress-step.current {
  color: #10100d !important;
  background: linear-gradient(145deg, #f0bd63, var(--brand-ember)) !important;
}

.v2-image-step.active *,
.v2-progress-step.current * {
  color: #10100d !important;
}

@media (max-width: 760px) {
  .launcher-title-lockup {
    display: grid;
  }
}

/* Home gold type rule: no dark/cream type for the main Home title block. */
.launcher#launcherView .launcher-header h1,
.launcher#launcherView .launcher-header .home-copy {
  color: #c99a45 !important;
  background: linear-gradient(90deg, #c99a45 0%, #e07a1f 62%, #c99a45 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.launcher#launcherView .launcher-header .eyebrow,
.launcher#launcherView .project-section .section-title,
.launcher#launcherView .project-section .section-title > span:first-child {
  color: #e07a1f !important;
  background: none !important;
  -webkit-text-fill-color: #e07a1f !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Home project cards: match the brand reference palette and override older dark title rules. */
.launcher#launcherView .project-section .choice-card {
  background: linear-gradient(145deg, rgba(11, 17, 23, 0.96) 0%, rgba(18, 42, 53, 0.9) 100%) !important;
  border-color: rgba(201, 154, 69, 0.42) !important;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.launcher#launcherView #importedProjectList .choice-card h3,
.launcher#launcherView #seriesProjectList .choice-card h3,
.launcher#launcherView .project-section .choice-card.project-choice-card h3,
.launcher#launcherView .project-section .choice-card h3 {
  color: #c99a45 !important;
  background: linear-gradient(90deg, #c99a45 0%, #e07a1f 68%, #c99a45 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.launcher#launcherView .project-section .choice-card .eyebrow {
  color: #e07a1f !important;
  background: none !important;
  -webkit-text-fill-color: #e07a1f !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.launcher#launcherView .project-section .choice-card p:not(.eyebrow),
.launcher#launcherView .project-section .choice-card small,
.launcher#launcherView .project-section .choice-card .status-dot,
.launcher#launcherView .project-section .choice-card .live-kdp-meta {
  color: #f4efe5 !important;
  -webkit-text-fill-color: #f4efe5 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.launcher#launcherView .project-section .choice-card .live-kdp-meta span {
  color: #10100d !important;
  -webkit-text-fill-color: #10100d !important;
  background: linear-gradient(145deg, #f0bd63, var(--brand-ember)) !important;
  border: 1px solid rgba(244, 239, 229, 0.34) !important;
  box-shadow: 0 14px 30px rgba(224, 122, 31, 0.24) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.launcher#launcherView .creator-home-actions .launcher-card strong,
.launcher#launcherView .creator-home-actions .launcher-card:hover strong,
.launcher#launcherView .creator-home-actions .launcher-card.primary-launch strong,
.launcher#launcherView .creator-home-actions .launcher-card.primary-launch:hover strong {
  color: #c99a45 !important;
  background: linear-gradient(90deg, #c99a45 0%, #e07a1f 68%, #c99a45 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Site-wide InkForge brand consistency layer.
   Keep this at the end so generated workflow panels inherit the same forge palette. */
:root {
  --inkforge-bg: #0b1117;
  --inkforge-panel: rgba(7, 10, 14, 0.86);
  --inkforge-panel-strong: rgba(11, 17, 23, 0.96);
  --inkforge-panel-soft: rgba(18, 42, 53, 0.9);
  --inkforge-line: rgba(201, 154, 69, 0.34);
  --inkforge-line-strong: rgba(224, 122, 31, 0.58);
  --inkforge-heading-gradient: linear-gradient(90deg, #c99a45 0%, #e07a1f 68%, #c99a45 100%);
  --inkforge-button-gradient: linear-gradient(145deg, #f0bd63 0%, #e07a1f 100%);
  --inkforge-ivory: #f4efe5;
  --inkforge-cream: #fff7e6;
  --inkforge-body: #f1dfbd;
  --inkforge-muted: #cdbf9f;
  --inkforge-dark-text: #10100d;
}

body,
.beginner-mode,
.beginner-mode.production-view .shell {
  color: var(--inkforge-ivory) !important;
  background:
    radial-gradient(ellipse at 14% 4%, rgba(224, 122, 31, 0.2), transparent 28rem),
    radial-gradient(ellipse at 86% 9%, rgba(201, 154, 69, 0.14), transparent 30rem),
    linear-gradient(135deg, #05080b 0%, var(--inkforge-bg) 42%, #122a35 100%) !important;
}

.auth-panel,
.auth-form,
.launcher,
.setup-view,
.beta-pending-card,
.claim-workspace,
.upload-focus-card,
.upload-next-note,
.choice-card,
.launcher-card,
.panel,
.pipeline-card,
.editor-card,
.assistant-card,
.wizard-banner,
.hero,
.workspace-v2,
.v2-file-drawer,
.v2-support-card,
.workspace-v2 .active-gate-panel,
.workspace-v2 .active-gate-panel.workflow-card-active,
.v2-image-actions,
.v2-progress-step,
.workflow-notice,
.advance-box,
.readiness-card,
.review-form,
.guided-form-section,
.visual-substep-card,
.visual-plan-form,
.image-queue-panel,
.prepare-asset-card,
.reference-card,
.asset-card,
.secondary-gate,
.brief-output,
.publish-artifact-card,
.package-details,
.publish-warning-box,
.live-kdp-banner,
.published-summary > div,
.profile-hero-card,
.profile-metric,
.profile-detail-card,
.profile-project-row,
.admin-card,
.admin-user-card,
.admin-invite-panel,
.rail,
.stage {
  color: var(--inkforge-ivory) !important;
  border-color: var(--inkforge-line) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.055), rgba(18, 42, 53, 0.5)),
    var(--inkforge-panel) !important;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.launcher-card:hover,
.choice-card:hover,
.book-button:hover,
.v2-progress-step:hover,
.asset-card.next,
.prepare-asset-card.next {
  border-color: var(--inkforge-line-strong) !important;
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(201, 154, 69, 0.16),
    0 0 36px rgba(224, 122, 31, 0.16) !important;
}

.auth-story h1,
.auth-form h2,
.launcher-header h1,
.setup-header h2,
.upload-focus-card h3,
.beta-pending-card h3,
.choice-card h3,
.launcher-card strong,
.panel-heading,
.panel h3,
.panel h4,
.assistant-card h3,
.wizard-title,
.hero h2,
.brand h1,
.v2-topbar h1,
.v2-step-intro h2,
.v2-file-toolbar h3,
.v2-image-copy h3,
.v2-support-card > strong,
.workspace-v2 .panel-heading,
.workflow-notice h3,
.advance-box h3,
.readiness-card h3,
.review-form h4,
.guided-form-section h4,
.visual-substep-card h3,
.visual-substep-card h4,
.asset-card h3,
.publish-artifact-card strong,
.package-details summary,
.live-kdp-banner strong,
.published-summary strong,
.profile-identity h2,
.profile-detail-card h3,
.profile-metric strong,
.admin-card h3,
.admin-user-card h3 {
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.eyebrow,
.v2-eyebrow,
.wizard-eyebrow,
.section-title,
.section-title > span:first-child,
.metric-label,
.field-label,
.book-meta,
.status-list strong,
.visual-substep-index,
.launcher-card > span,
.v2-progress-step > span,
.v2-image-step span,
.profile-link-row a {
  color: #e07a1f !important;
  -webkit-text-fill-color: #e07a1f !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.home-copy,
.hero-copy,
.panel-copy,
.microcopy,
.muted,
.choice-card p,
.choice-card small,
.launcher-card small,
.panel p,
.panel li,
.panel small,
.workflow-notice p,
.advance-box p,
.readiness-card p,
.readiness-card li,
.review-form p,
.guided-form-section p,
.visual-substep-card p,
.asset-card p,
.publish-artifact-card p,
.package-details li,
.live-kdp-banner p,
.published-summary span,
.v2-topbar p,
.v2-step-intro p,
.v2-support-card p,
.v2-support-card dd,
.v2-file-toolbar p,
.v2-progress-step small,
.v2-image-step small,
.profile-bio,
.profile-detail-card p,
.profile-project-row p,
.admin-user-card p {
  color: var(--inkforge-body) !important;
  -webkit-text-fill-color: var(--inkforge-body) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.primary-button,
.assistant-button,
.wizard-button,
.v2-primary-button,
.launcher .project-section .small-button,
.publish-cta .primary-button,
.review-form .primary-button {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 14px 30px rgba(224, 122, 31, 0.24) !important;
}

.primary-button *,
.assistant-button *,
.wizard-button *,
.v2-primary-button * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.small-button,
.ghost-button,
.ghost-light-button,
.v2-quiet-button,
.lane-tab,
.tabs button,
.wizard-preview-button,
.asset-delete-btn {
  color: var(--inkforge-ivory) !important;
  -webkit-text-fill-color: var(--inkforge-ivory) !important;
  border-color: rgba(201, 154, 69, 0.38) !important;
  background: rgba(244, 239, 229, 0.075) !important;
  box-shadow: none !important;
}

.small-button:hover,
.ghost-button:hover,
.ghost-light-button:hover,
.v2-quiet-button:hover,
.lane-tab:hover,
.tabs button:hover,
.wizard-preview-button:hover {
  color: var(--inkforge-cream) !important;
  -webkit-text-fill-color: var(--inkforge-cream) !important;
  border-color: var(--inkforge-line-strong) !important;
  background: rgba(224, 122, 31, 0.16) !important;
}

.status-pill,
.published-badge,
.workspace-source,
.source-supabase,
.source-local,
.v2-step-badge,
.wizard-step-number,
.live-kdp-meta span,
.live-kdp-banner span {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border: 1px solid rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 10px 24px rgba(224, 122, 31, 0.2) !important;
  text-shadow: none !important;
}

.status-pill.amber,
.advance-box.ready,
.readiness-card.ready,
.workflow-notice.success,
.asset-card.asset-done,
.prepare-asset-card.asset-done,
.v2-progress-step.done {
  border-color: rgba(201, 154, 69, 0.5) !important;
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.16), rgba(18, 42, 53, 0.74)),
    var(--inkforge-panel-strong) !important;
}

.advance-box.blocked,
.readiness-card.needs-attention,
.publish-artifact-card.missing,
.admin-user-card.inactive {
  border-color: rgba(224, 122, 31, 0.58) !important;
  background:
    linear-gradient(145deg, rgba(224, 122, 31, 0.16), rgba(18, 42, 53, 0.78)),
    var(--inkforge-panel-strong) !important;
}

.v2-progress-step.current,
.v2-image-step.active,
.lane-tab.active,
.tabs button.active {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 14px 30px rgba(224, 122, 31, 0.24) !important;
}

.v2-progress-step.current *,
.v2-image-step.active *,
.lane-tab.active *,
.tabs button.active * {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
}

.v2-progress-step.current strong,
.v2-progress-step.current small,
.v2-progress-step.current > span,
.v2-image-step.active span,
.v2-image-step.active small {
  background: none !important;
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
}

.text-input,
.review-input,
.scene-input,
.review-select,
input,
textarea,
select,
option,
#editor,
#v2Editor {
  color: var(--inkforge-cream) !important;
  -webkit-text-fill-color: var(--inkforge-cream) !important;
  background: rgba(5, 8, 11, 0.72) !important;
  border-color: rgba(201, 154, 69, 0.38) !important;
  box-shadow: inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.text-input::placeholder,
.review-input::placeholder,
.scene-input::placeholder,
textarea::placeholder,
input::placeholder {
  color: rgba(244, 239, 229, 0.58) !important;
  -webkit-text-fill-color: rgba(244, 239, 229, 0.58) !important;
}

a,
.published-summary a {
  color: #f0bd63 !important;
  -webkit-text-fill-color: #f0bd63 !important;
}

.profile-avatar,
.brand-logo {
  border-color: rgba(201, 154, 69, 0.5) !important;
  background: #05080b !important;
}

.auth-proof-grid span,
.publishing-steps,
.publishing-steps span,
.profile-panel,
.admin-panel,
.feedback-form,
.profile-settings-form,
.series-card,
.book-button,
.step,
.step.guided-step,
.status-list,
.export-confidence,
.package-download-list,
.published-summary {
  color: var(--inkforge-ivory) !important;
  border-color: var(--inkforge-line) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.05), rgba(18, 42, 53, 0.48)),
    rgba(7, 10, 14, 0.72) !important;
}

.book-button strong,
.step-name,
.status-list strong {
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.auth-note,
.auth-beta-note,
.checkbox-row,
.profile-strip,
.mode-toggle,
.mode-toggle span,
.account-dock span,
.auth-proof-grid span,
.publishing-steps span,
.wizard-description,
.wizard-actions,
.wizard-hint,
.assistant-after,
.status-list li,
.step small,
.book-button p,
.book-button small,
.field-hint,
.readiness-action-hint {
  color: var(--inkforge-body) !important;
  -webkit-text-fill-color: var(--inkforge-body) !important;
  opacity: 1 !important;
}

.step.current,
.step.guided-step.current {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
}

.step.current *,
.step.guided-step.current * {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: none !important;
}

.step.done,
.step.guided-step.done {
  border-color: rgba(201, 154, 69, 0.5) !important;
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.16), rgba(18, 42, 53, 0.74)),
    var(--inkforge-panel-strong) !important;
}

/* Final Home-match overrides: cream buttons use dark text; Workspace V2 stays dark like Home. */
.account-dock :is(.small-button, .ghost-button, .ghost-light-button),
.profile-strip :is(.small-button, .ghost-button, .ghost-light-button),
.setup-header > .small-button,
.setup-view .setup-header .small-button,
.choice-card .project-card-actions .small-button,
.project-card-actions .small-button,
.auth-form .small-button,
.auth-form .ghost-light-button,
.panel .small-button,
.editor-card .small-button,
.pipeline-card .small-button,
.choice-card .small-button,
.setup-view .small-button,
.publish-artifact-card .small-button,
.package-download-list .small-button,
.advance-box .small-button,
.wizard-preview-button,
.beginner-mode.production-view .workspace-v2 :is(
  .small-button,
  .ghost-button,
  .ghost-light-button,
  .v2-quiet-button,
  .wizard-preview-button,
  .visual-substep-actions button:not(.primary-button):not(.v2-primary-button)
) {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(201, 154, 69, 0.46) !important;
  background: linear-gradient(180deg, #fff7e6 0%, #ead9b9 100%) !important;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  text-shadow: none !important;
}

.account-dock :is(.small-button, .ghost-button, .ghost-light-button):hover,
.profile-strip :is(.small-button, .ghost-button, .ghost-light-button):hover,
.setup-header > .small-button:hover,
.setup-view .setup-header .small-button:hover,
.choice-card .project-card-actions .small-button:hover,
.project-card-actions .small-button:hover,
.beginner-mode.production-view .workspace-v2 :is(.small-button, .ghost-button, .ghost-light-button, .v2-quiet-button, .wizard-preview-button):hover {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(224, 122, 31, 0.66) !important;
  background: linear-gradient(180deg, #fffaf0 0%, #f0bd63 100%) !important;
}

.beginner-mode.production-view .workspace-v2,
.beginner-mode.production-view .workspace-v2 :is(
  .active-gate-panel,
  .workflow-notice,
  .advance-box,
  .readiness-card,
  .review-form,
  .publish-status-form,
  .guided-form-section,
  .visual-substep-card,
  .visual-plan-form,
  .image-queue-panel,
  .prepare-asset-card,
  .reference-card,
  .visual-choice,
  .visual-reference-panel,
  .reference-strip,
  .asset-card,
  .secondary-gate,
  .first-time-guide,
  .safety-check,
  .final-review-check,
  .publishing-handoff-check,
  .publish-artifact-card,
  .package-details,
  .publish-warning-box,
  .generated-plan,
  .v2-support-card,
  .v2-file-drawer,
  .v2-file-toolbar,
  .v2-image-actions,
  .v2-image-step:not(.active),
  .live-kdp-banner,
  .published-summary,
  .published-summary > div
) {
  color: var(--inkforge-ivory) !important;
  border-color: var(--inkforge-line) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.055), rgba(18, 42, 53, 0.5)),
    var(--inkforge-panel) !important;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  strong,
  summary,
  .panel-heading,
  .wizard-title,
  .v2-file-toolbar h3,
  .live-kdp-banner strong,
  .published-summary strong
) {
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  .v2-eyebrow,
  .wizard-eyebrow,
  .field-label,
  .metric-label,
  .section-title,
  .section-title > span:first-child
) {
  color: #e07a1f !important;
  -webkit-text-fill-color: #e07a1f !important;
  background: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  p,
  small,
  li,
  dd,
  code,
  .panel-copy,
  .microcopy,
  .wizard-description,
  .wizard-hint,
  .readiness-action-hint,
  .field-hint,
  .live-kdp-banner p,
  .published-summary span,
  .v2-topbar p,
  .v2-step-intro p,
  .v2-support-card p,
  .v2-support-card dd,
  .v2-file-toolbar p
) {
  color: var(--inkforge-body) !important;
  -webkit-text-fill-color: var(--inkforge-body) !important;
  background: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.beginner-mode.production-view .workspace-v2 :is(input, textarea, select, option, .review-input, .review-select, .text-input, .scene-input, #v2Editor) {
  color: var(--inkforge-cream) !important;
  -webkit-text-fill-color: var(--inkforge-cream) !important;
  background: rgba(5, 8, 11, 0.72) !important;
  border-color: rgba(201, 154, 69, 0.38) !important;
  box-shadow: inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.beginner-mode.production-view .workspace-v2 :is(
  .primary-button,
  .assistant-button,
  .wizard-button,
  .v2-primary-button,
  [data-visual-action="generate"],
  [data-build-package]
) {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 14px 30px rgba(224, 122, 31, 0.24) !important;
}

.beginner-mode.production-view .workspace-v2 :is(.primary-button, .assistant-button, .wizard-button, .v2-primary-button, [data-visual-action="generate"], [data-build-package]) * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  background: none !important;
}

.beginner-mode.production-view .workspace-v2 :is(.status-pill, .published-badge, .v2-step-badge, .live-kdp-banner span) {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border: 1px solid rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 10px 24px rgba(224, 122, 31, 0.2) !important;
}

.beginner-mode.production-view .workspace-v2 :is(.v2-progress-step.current, .v2-image-step.active) {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(244, 239, 229, 0.34) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 14px 30px rgba(224, 122, 31, 0.24) !important;
}

.beginner-mode.production-view .workspace-v2 :is(.v2-progress-step.current, .v2-image-step.active) * {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: none !important;
}

.beginner-mode.production-view .workspace-v2 a,
.beginner-mode.production-view .workspace-v2 .published-summary a {
  color: #f0bd63 !important;
  -webkit-text-fill-color: #f0bd63 !important;
}

/* Final contrast sweep: native file buttons, sign-in fields, and V2 support labels. */
input[type="file"] {
  color: var(--inkforge-cream) !important;
  -webkit-text-fill-color: var(--inkforge-cream) !important;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  margin-right: 0.75rem;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(244, 239, 229, 0.34);
  border-radius: 0.55rem;
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient) !important;
  box-shadow: 0 10px 24px rgba(224, 122, 31, 0.2);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

/* Beta feedback and storybook usability layer */
.feedback-tab {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 1200;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  padding: 1rem 0.72rem;
  border: 1px solid rgba(244, 239, 229, 0.3);
  border-right: 0;
  border-radius: 0.7rem 0 0 0.7rem;
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.feedback-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1199;
  width: min(26rem, calc(100vw - 1rem));
  padding: 1rem;
  display: grid;
  align-items: center;
  background: linear-gradient(90deg, rgba(5, 8, 11, 0), rgba(5, 8, 11, 0.72));
}

.feedback-drawer[hidden] {
  display: none !important;
}

.feedback-drawer-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 69, 0.35);
  border-radius: 0.9rem;
  color: var(--brand-ivory) !important;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(224, 122, 31, 0.16), transparent 18rem),
    linear-gradient(145deg, rgba(11, 17, 23, 0.98), rgba(24, 36, 43, 0.98));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.46);
}

.feedback-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.feedback-drawer-card h2,
.feedback-drawer-card .field-label,
.feedback-drawer-card .microcopy {
  color: var(--brand-gold) !important;
  -webkit-text-fill-color: var(--brand-gold) !important;
}

.feedback-drawer-card .review-input,
.feedback-drawer-card select {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: #fffdf7 !important;
}

/* Feather Guide: optional contextual assistant, separate from feedback. */
.feather-guide {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1180;
  display: grid;
  justify-items: end;
  gap: 0.75rem;
  pointer-events: none;
}

.feather-guide[hidden] {
  display: none !important;
}

.feather-guide-button,
.feather-guide-panel {
  pointer-events: auto;
}

.feather-guide-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border: 1px solid rgba(244, 239, 229, 0.38);
  border-radius: 999px;
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(201, 154, 69, 0.18);
  font-weight: 950;
  cursor: pointer;
}

.feather-guide-button img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(11, 17, 23, 0.9);
}

.feather-guide-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(224, 122, 31, 0.22);
}

.feather-guide-panel {
  width: min(22rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 69, 0.38);
  border-radius: 0.9rem;
  color: var(--brand-ivory) !important;
  background:
    radial-gradient(ellipse at 92% 0%, rgba(224, 122, 31, 0.16), transparent 18rem),
    linear-gradient(145deg, rgba(9, 14, 18, 0.98), rgba(24, 36, 43, 0.98));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
}

.feather-guide-panel[hidden] {
  display: none !important;
}

.feather-guide-header {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: start;
}

.feather-guide-header h2 {
  margin: 0.1rem 0 0;
  color: var(--brand-gold) !important;
  -webkit-text-fill-color: var(--brand-gold) !important;
  font-size: 1.1rem;
  line-height: 1.2;
}

.feather-guide-body {
  display: grid;
  gap: 0.8rem;
}

.feather-guide-body p {
  margin: 0;
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
  line-height: 1.48;
}

.feather-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.feather-guide-actions .primary-button,
.feather-guide-actions .small-button {
  flex: 1 1 auto;
  min-width: 8rem;
}

.feather-guide .ghost-light-button {
  color: var(--brand-ivory) !important;
  -webkit-text-fill-color: var(--brand-ivory) !important;
  border-color: rgba(201, 154, 69, 0.3) !important;
  background: rgba(244, 239, 229, 0.07) !important;
}

.feather-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.feather-progress span {
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(244, 239, 229, 0.18);
}

.feather-progress span.done,
.feather-progress span.current {
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-ember));
}

@media (max-width: 760px) {
  .feather-guide {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .feather-guide-button span {
    display: none;
  }

  .feather-guide-button {
    padding: 0.45rem;
  }
}

.storybook-builder {
  margin-top: 1rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 1px solid rgba(201, 154, 69, 0.32);
  border-radius: 0.9rem;
  color: var(--brand-ivory) !important;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(224, 122, 31, 0.14), transparent 20rem),
    linear-gradient(145deg, rgba(9, 14, 18, 0.95), rgba(24, 36, 43, 0.95));
}

.storybook-builder h4,
.storybook-builder .panel-copy,
.storybook-builder .field-label,
.storybook-builder .microcopy {
  color: var(--brand-gold) !important;
  -webkit-text-fill-color: var(--brand-gold) !important;
}

.storybook-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin: 1rem 0;
}

.storybook-upload-control {
  min-width: min(100%, 17rem);
}

.storybook-layout {
  display: grid;
  grid-template-columns: minmax(9rem, 0.45fr) minmax(14rem, 0.9fr) minmax(16rem, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.storybook-page-list {
  display: grid;
  gap: 0.45rem;
  max-height: 34rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.storybook-page-list button {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid rgba(201, 154, 69, 0.26);
  border-radius: 0.65rem;
  color: var(--brand-ivory) !important;
  text-align: left;
  background: rgba(5, 8, 11, 0.64);
  cursor: pointer;
}

.storybook-page-list button.active {
  color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient);
}

.storybook-page-list button.active * {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
}

.storybook-page-list span {
  font-weight: 900;
}

.storybook-page-list small {
  color: var(--brand-gold) !important;
  font-weight: 800;
}

.storybook-preview {
  min-width: 0;
}

.storybook-preview-page {
  display: grid;
  gap: 0.8rem;
  min-height: 30rem;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 69, 0.38);
  border-radius: 0.7rem;
  color: var(--inkforge-dark-text) !important;
  background: #fff9ec;
  box-shadow: inset 0 0 0 0.45rem rgba(201, 154, 69, 0.16);
}

.storybook-preview-page span {
  color: #9f5b43 !important;
  font-weight: 900;
}

.storybook-preview-page img,
.storybook-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.55rem;
  object-fit: cover;
  border: 1px solid rgba(159, 91, 67, 0.22);
  background: linear-gradient(145deg, rgba(201, 154, 69, 0.18), rgba(224, 122, 31, 0.12));
}

.storybook-image-placeholder {
  display: grid;
  place-items: center;
  color: #9f5b43 !important;
  font-weight: 900;
}

.storybook-preview-page p {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.55;
}

.storybook-page-form {
  display: grid;
  gap: 0.75rem;
}

.storybook-page-form .review-input,
.storybook-page-form .text-input {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: #fffdf7 !important;
}

.storybook-builder.simple-board {
  display: grid;
  gap: 1rem;
  border-color: rgba(201, 154, 69, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(244, 239, 229, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.storybook-builder.simple-board h4,
.storybook-publish-strip strong,
.storybook-tray-heading h5 {
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.storybook-builder.simple-board .panel-copy,
.storybook-builder.simple-board .field-label,
.storybook-tray-heading span,
.storybook-empty-tray span,
.storybook-publish-strip span {
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
}

.storybook-board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.storybook-board-toolbar .small-button,
.storybook-board-toolbar .primary-button {
  min-height: 2.9rem;
}

.storybook-board-layout {
  grid-template-columns: minmax(8.5rem, 0.42fr) minmax(18rem, 1.05fr) minmax(15rem, 0.68fr);
}

.storybook-page-stage,
.storybook-image-tray {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 0.8rem;
  background: rgba(5, 8, 11, 0.42);
}

.storybook-page-stage {
  display: grid;
  gap: 0.9rem;
}

.storybook-builder.simple-board .storybook-preview-page {
  min-height: 24rem;
  background:
    linear-gradient(145deg, rgba(255, 249, 236, 0.96), rgba(232, 216, 184, 0.94)) !important;
}

.storybook-builder.simple-board .storybook-preview-page img,
.storybook-builder.simple-board .storybook-image-placeholder {
  aspect-ratio: 1.18 / 1;
}

.storybook-page-form {
  padding-top: 0.2rem;
}

.storybook-page-form .review-input,
.storybook-upload-control .text-input {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)),
    var(--inkforge-button-gradient) !important;
  border-color: rgba(201, 154, 69, 0.46) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 247, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.14) !important;
}

.storybook-page-form .review-input::placeholder {
  color: rgba(16, 16, 13, 0.7) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.7) !important;
}

.storybook-upload-control input[type="file"]::file-selector-button,
.storybook-upload-control input[type="file"]::-webkit-file-upload-button {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient) !important;
  border: 1px solid rgba(16, 16, 13, 0.2) !important;
  border-radius: 0.55rem;
  font-weight: 900;
}

.storybook-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.storybook-tray-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.storybook-tray-heading h5 {
  margin: 0;
  font-size: 1rem;
}

.storybook-image-grid {
  display: grid;
  gap: 0.75rem;
  max-height: 38rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.storybook-image-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid rgba(201, 154, 69, 0.3);
  border-radius: 0.75rem;
  background: rgba(9, 14, 18, 0.68);
}

.storybook-image-card img,
.storybook-image-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.55rem;
  object-fit: cover;
  border: 1px solid rgba(201, 154, 69, 0.3);
  background: linear-gradient(145deg, rgba(201, 154, 69, 0.2), rgba(224, 122, 31, 0.16));
}

.storybook-image-thumb {
  display: grid;
  place-items: center;
  color: #f1dfbd !important;
  font-weight: 900;
}

.storybook-image-card strong,
.storybook-empty-tray strong {
  color: #f4efe5 !important;
  -webkit-text-fill-color: #f4efe5 !important;
  overflow-wrap: anywhere;
}

.storybook-empty-tray {
  display: grid;
  gap: 0.35rem;
  min-height: 12rem;
  place-content: center;
  padding: 1rem;
  border: 1px dashed rgba(201, 154, 69, 0.36);
  border-radius: 0.75rem;
  text-align: center;
  background: rgba(5, 8, 11, 0.36);
}

.storybook-publish-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(201, 154, 69, 0.32);
  border-radius: 0.85rem;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(201, 154, 69, 0.12), transparent 18rem),
    rgba(5, 8, 11, 0.52);
}

.storybook-publish-strip > div:first-child {
  display: grid;
  gap: 0.2rem;
}

.storybook-start-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.upload-own-flow {
  display: grid;
  gap: 1rem;
}

.upload-cover-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 1px solid rgba(201, 154, 69, 0.34);
  border-radius: 0.9rem;
  background:
    radial-gradient(ellipse at 92% 0%, rgba(224, 122, 31, 0.12), transparent 20rem),
    linear-gradient(145deg, rgba(9, 14, 18, 0.94), rgba(24, 36, 43, 0.94));
}

.upload-cover-panel h4 {
  margin: 0 0 0.25rem;
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.upload-cover-panel .panel-copy,
.upload-cover-panel .field-label {
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
}

.upload-cover-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(16rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.upload-cover-preview {
  display: grid;
  gap: 0.7rem;
}

.upload-cover-preview img {
  width: 100%;
  max-height: 28rem;
  object-fit: contain;
  border: 1px solid rgba(201, 154, 69, 0.32);
  border-radius: 0.8rem;
  background: rgba(5, 8, 11, 0.44);
}

.upload-cover-preview .asset-preview.placeholder {
  min-height: 18rem;
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
  background: rgba(5, 8, 11, 0.44) !important;
  border-color: rgba(201, 154, 69, 0.32) !important;
}

.upload-cover-actions {
  display: grid;
  gap: 0.8rem;
  max-width: 28rem;
}

.upload-cover-actions .text-input {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)),
    var(--inkforge-button-gradient) !important;
}

.upload-cover-actions input[type="file"]::file-selector-button,
.upload-cover-actions input[type="file"]::-webkit-file-upload-button {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient) !important;
  border: 1px solid rgba(16, 16, 13, 0.2) !important;
  border-radius: 0.55rem;
  font-weight: 900;
}

.asset-preview-frame {
  display: grid;
  gap: 0.55rem;
}

.image-preview-button {
  justify-self: start;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2rem);
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 8, 0.78);
  backdrop-filter: blur(8px);
}

.image-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(96vw, 70rem);
  max-height: 94vh;
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 1px solid rgba(201, 154, 69, 0.42);
  border-radius: 0.95rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201, 154, 69, 0.14), transparent 22rem),
    linear-gradient(145deg, rgba(9, 14, 18, 0.98), rgba(24, 36, 43, 0.98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
}

.image-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.image-preview-header h3 {
  margin: 0;
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.image-preview-header p,
.image-preview-actions {
  margin: 0.25rem 0 0;
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
}

.image-preview-stage {
  display: grid;
  place-items: center;
  min-height: 18rem;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 0.8rem;
  background: rgba(5, 8, 11, 0.62);
}

.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.image-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
}

.image-preview-actions button:disabled {
  color: rgba(16, 16, 13, 0.72) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.72) !important;
  opacity: 0.78;
}

@media (max-width: 760px) {
  .upload-cover-layout {
    grid-template-columns: 1fr;
  }

  .image-preview-header,
  .image-preview-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.workspace-v2 :is(.field-hint, .panel-copy, .manual-image-help p, .visual-substep-header p, .image-queue-panel p) {
  color: var(--brand-gold) !important;
  -webkit-text-fill-color: var(--brand-gold) !important;
}

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

  .storybook-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

.auth-form #authEmail,
.auth-form #authPassword,
.auth-form #authPasswordConfirm,
#authEmail,
#authPassword,
#authPasswordConfirm {
  color: var(--inkforge-cream) !important;
  -webkit-text-fill-color: var(--inkforge-cream) !important;
  caret-color: #f0bd63 !important;
  background: rgba(5, 8, 11, 0.82) !important;
  border-color: rgba(201, 154, 69, 0.44) !important;
}

.auth-form #authEmail::placeholder,
.auth-form #authPassword::placeholder,
.auth-form #authPasswordConfirm::placeholder,
#authEmail::placeholder,
#authPassword::placeholder,
#authPasswordConfirm::placeholder {
  color: rgba(244, 239, 229, 0.72) !important;
  -webkit-text-fill-color: rgba(244, 239, 229, 0.72) !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--inkforge-cream) !important;
  caret-color: #f0bd63 !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(5, 8, 11, 0.92) inset !important;
  box-shadow: 0 0 0 1000px rgba(5, 8, 11, 0.92) inset !important;
  border-color: rgba(201, 154, 69, 0.44) !important;
}

.v2-support-card > span,
.v2-support-card dt,
.beginner-mode.production-view .workspace-v2 .v2-support-card > span,
.beginner-mode.production-view .workspace-v2 .v2-support-card dt {
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Home account strip is admin-only; normal users use the floating account dock. */
.launcher#launcherView .profile-strip {
  display: none !important;
}

body.admin-user .launcher#launcherView .profile-strip {
  display: flex !important;
}

.upload-focus-card p:not(.eyebrow),
.upload-next-note,
.upload-next-note strong {
  color: #c99a45 !important;
  -webkit-text-fill-color: #c99a45 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.prepare-upload-grid select,
.prepare-upload-grid .text-input,
.prepare-upload-grid input[type="file"] {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)),
    var(--inkforge-button-gradient) !important;
  border-color: rgba(201, 154, 69, 0.46) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 247, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.16) !important;
}

.prepare-upload-grid select option {
  color: var(--inkforge-dark-text) !important;
  background: #f0bd63 !important;
}

.prepare-upload-grid .field-label {
  color: #c99a45 !important;
  -webkit-text-fill-color: #c99a45 !important;
}

.prepare-upload-grid .text-input::placeholder {
  color: rgba(16, 16, 13, 0.72) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.72) !important;
}

.prepare-upload-grid input[type="file"]::file-selector-button,
.prepare-upload-grid input[type="file"]::-webkit-file-upload-button {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: var(--inkforge-button-gradient) !important;
  border-color: rgba(201, 154, 69, 0.54) !important;
}

.danger-button {
  color: #f4efe5 !important;
  -webkit-text-fill-color: #f4efe5 !important;
  border-color: rgba(185, 92, 44, 0.6) !important;
  background:
    linear-gradient(145deg, rgba(185, 92, 44, 0.92), rgba(122, 43, 30, 0.9)) !important;
}

.danger-button:hover {
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
  border-color: rgba(244, 239, 229, 0.42) !important;
}

/* Phase 8 genre guide controls: keep creator-facing skill guidance readable. */
.field-help {
  display: block;
  margin-top: 0.35rem;
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
  font-size: 0.86rem;
  line-height: 1.35;
}

.prepare-upload-grid .field-help {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
}

.genre-guide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.genre-guide-apply {
  min-height: 44px;
}

.genre-skill-card {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 1rem;
  color: #fff7e6 !important;
  -webkit-text-fill-color: #fff7e6 !important;
  border: 1px solid rgba(201, 154, 69, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.12), rgba(18, 42, 53, 0.44)),
    rgba(5, 8, 11, 0.74);
}

.v2-support-panel .genre-skill-card {
  margin: 0;
}

.genre-skill-card span {
  color: #f0bd63 !important;
  -webkit-text-fill-color: #f0bd63 !important;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.genre-skill-card strong {
  color: #fff7e6 !important;
  -webkit-text-fill-color: #fff7e6 !important;
  font-size: 1.05rem;
}

.genre-skill-card p,
.genre-skill-card li {
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
  line-height: 1.5;
}

.genre-skill-card ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
}

.genre-skill-card.empty {
  border-style: dashed;
}

.creator-studio-form .review-input {
  min-height: 7rem;
}

.creator-studio-form select {
  min-height: 2.9rem;
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  border-color: rgba(201, 154, 69, 0.54) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)),
    var(--inkforge-button-gradient) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 247, 0.52),
    0 10px 24px rgba(0, 0, 0, 0.16) !important;
  font-weight: 850;
}

.creator-studio-form select option {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: #f0bd63 !important;
}

.creator-quota-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 69, 0.34);
  border-radius: 0.9rem;
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.12), rgba(18, 42, 53, 0.48)),
    rgba(5, 8, 11, 0.74);
}

.creator-quota-card h3 {
  margin: 0;
  color: #fff7e6 !important;
  -webkit-text-fill-color: #fff7e6 !important;
}

.creator-quota-card p {
  margin: 0;
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
}

.creator-quota-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.creator-quota-card dl div {
  padding: 0.7rem;
  border-radius: 0.7rem;
  background: rgba(244, 239, 229, 0.07);
}

.creator-quota-card dt {
  color: #f0bd63 !important;
  -webkit-text-fill-color: #f0bd63 !important;
  font-weight: 900;
}

.creator-quota-card dd {
  margin: 0.25rem 0 0;
  color: #fff7e6 !important;
  -webkit-text-fill-color: #fff7e6 !important;
  font-weight: 900;
}

@media (max-width: 760px) {
  .genre-guide-row {
    grid-template-columns: 1fr;
  }
}

/* Admin Console V1 */
.admin-view {
  max-width: min(96rem, 100%);
}

.admin-console-shell {
  display: grid;
  grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.4rem);
  align-items: start;
}

.admin-console-nav {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid var(--inkforge-line);
  border-radius: 0.9rem;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.065), rgba(18, 42, 53, 0.58)),
    var(--inkforge-panel);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(244, 239, 229, 0.08);
}

.admin-nav-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.8rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 0.7rem;
  color: var(--inkforge-ivory);
  -webkit-text-fill-color: var(--inkforge-ivory);
  background: rgba(244, 239, 229, 0.07);
  font: 700 0.88rem/1.1 var(--sans);
  text-align: left;
  cursor: pointer;
}

.admin-nav-button strong {
  min-width: 1.45rem;
  padding: 0.16rem 0.38rem;
  border-radius: 999px;
  color: var(--inkforge-dark-text);
  -webkit-text-fill-color: var(--inkforge-dark-text);
  background: var(--inkforge-button-gradient);
  text-align: center;
  font-size: 0.76rem;
}

.admin-nav-button.active,
.admin-nav-button:hover {
  color: var(--inkforge-dark-text);
  -webkit-text-fill-color: var(--inkforge-dark-text);
  border-color: rgba(244, 239, 229, 0.45);
  background: var(--inkforge-button-gradient);
}

.admin-console-main,
.admin-section-stack {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.admin-section-heading {
  display: grid;
  gap: 0.25rem;
}

.admin-section-heading h3,
.admin-project-card h3,
.admin-usage-row h3 {
  margin: 0;
  color: #c99a45;
  background: var(--inkforge-heading-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.admin-section-heading p,
.admin-card p,
.admin-user-card p,
.admin-feedback-form p {
  color: var(--inkforge-body) !important;
  -webkit-text-fill-color: var(--inkforge-body) !important;
}

.admin-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.85rem;
}

.admin-limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.7rem;
}

.admin-limit-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(6.8rem, 1fr));
}

.admin-settings-form,
.admin-feedback-form,
.admin-usage-row,
.admin-project-card {
  display: grid;
  gap: 0.85rem;
}

.admin-feedback-form {
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  align-items: start;
}

.admin-usage-row,
.admin-project-card {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 32rem);
  align-items: center;
}

.admin-usage-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.admin-usage-pills span {
  padding: 0.24rem 0.55rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 999px;
  color: var(--inkforge-body);
  -webkit-text-fill-color: var(--inkforge-body);
  background: rgba(244, 239, 229, 0.06);
  font-size: 0.78rem;
}

.admin-settings-form .checkbox-row,
.admin-feedback-form .field-label,
.admin-settings-form .field-label,
.admin-limit-grid .field-label {
  color: #e07a1f !important;
  -webkit-text-fill-color: #e07a1f !important;
}

.admin-settings-form .text-input,
.admin-settings-form .review-input,
.admin-feedback-form .text-input,
.admin-feedback-form .review-input,
.admin-user-controls .text-input,
.admin-user-controls .review-input {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  background: linear-gradient(135deg, rgba(244, 239, 229, 0.96), rgba(201, 154, 69, 0.28)) !important;
  border-color: rgba(201, 154, 69, 0.48) !important;
}

.admin-console-main .admin-card,
.admin-console-main .admin-user-card,
.admin-console-main .admin-settings-form,
.admin-console-main .admin-project-card,
.admin-console-main .admin-usage-row {
  color: var(--inkforge-ivory) !important;
  border: 1px solid var(--inkforge-line) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.055), rgba(18, 42, 53, 0.5)),
    var(--inkforge-panel) !important;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.admin-console-main .admin-user-controls,
.admin-console-main .admin-settings-form {
  padding: 0.9rem;
  border: 1px solid rgba(201, 154, 69, 0.18);
  border-radius: 0.8rem;
  background: rgba(5, 8, 11, 0.28);
}

.admin-console-main .admin-settings-form {
  padding: 1rem;
}

.admin-console-main .admin-card h3,
.admin-console-main .admin-user-card h3,
.admin-console-main .admin-project-card h3,
.admin-console-main .admin-usage-row h3 {
  color: #c99a45 !important;
  background: var(--inkforge-heading-gradient) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.admin-console-main .admin-card p,
.admin-console-main .admin-user-card p,
.admin-console-main .admin-project-card p,
.admin-console-main .admin-settings-form p,
.admin-console-main .admin-feedback-form p {
  color: var(--inkforge-body) !important;
  -webkit-text-fill-color: var(--inkforge-body) !important;
}

.admin-console-main .field-label,
.admin-console-main .checkbox-row,
.admin-console-main .microcopy {
  color: #f0bd63 !important;
  -webkit-text-fill-color: #f0bd63 !important;
}

.admin-console-main .text-input,
.admin-console-main select.text-input,
.admin-console-main .review-input {
  color: var(--inkforge-ivory) !important;
  -webkit-text-fill-color: var(--inkforge-ivory) !important;
  border-color: rgba(201, 154, 69, 0.34) !important;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.08), rgba(18, 42, 53, 0.72)),
    rgba(5, 8, 11, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(244, 239, 229, 0.08) !important;
}

.admin-console-main .text-input::placeholder,
.admin-console-main .review-input::placeholder {
  color: rgba(241, 223, 189, 0.68) !important;
  -webkit-text-fill-color: rgba(241, 223, 189, 0.68) !important;
}

.admin-console-main select.text-input option {
  color: #122a35;
  background: #f4efe5;
}

.admin-console-main .checkbox-row {
  min-height: 2.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 0.65rem;
  background: rgba(244, 239, 229, 0.055);
}

.admin-console-main .admin-user-meta span,
.admin-console-main .admin-usage-pills span {
  color: var(--inkforge-body) !important;
  -webkit-text-fill-color: var(--inkforge-body) !important;
  border-color: rgba(201, 154, 69, 0.28) !important;
  background: rgba(244, 239, 229, 0.06) !important;
}

/* Final readability guard: field titles on dark workspace panels must never inherit the old dark brown form-label color. */
.workspace-v2 :is(
  .review-form,
  .guided-form-section,
  .visual-plan-form,
  .visual-substep-card,
  .prepare-asset-card,
  .image-queue-panel,
  .workflow-notice,
  .advance-box,
  .upload-own-flow,
  .upload-cover-panel,
  .storybook-builder,
  .storybook-page-stage,
  .storybook-image-tray
) :is(.field-label, .field-stack),
.beginner-mode.production-view .workspace-v2 :is(.field-label, .field-stack, label) {
  color: #f0bd63 !important;
  -webkit-text-fill-color: #f0bd63 !important;
  background: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.workspace-v2 :is(
  .review-form,
  .guided-form-section,
  .visual-plan-form,
  .visual-substep-card,
  .prepare-asset-card,
  .image-queue-panel,
  .workflow-notice,
  .advance-box,
  .upload-own-flow,
  .upload-cover-panel,
  .storybook-builder,
  .storybook-page-stage,
  .storybook-image-tray
) :is(.field-label, .field-stack) > :is(span, small, .field-hint) {
  color: #f1dfbd !important;
  -webkit-text-fill-color: #f1dfbd !important;
  background: none !important;
}

.workspace-v2 :is(
  .review-form,
  .guided-form-section,
  .visual-plan-form,
  .visual-substep-card,
  .prepare-asset-card,
  .image-queue-panel,
  .workflow-notice,
  .advance-box,
  .upload-own-flow,
  .upload-cover-panel,
  .storybook-builder,
  .storybook-page-stage
) :is(.text-input, .review-input, input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  caret-color: var(--inkforge-dark-text) !important;
  border-color: rgba(201, 154, 69, 0.46) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)),
    var(--inkforge-button-gradient) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 247, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.14) !important;
}

.workspace-v2 :is(
  .review-form,
  .guided-form-section,
  .visual-plan-form,
  .visual-substep-card,
  .prepare-asset-card,
  .image-queue-panel,
  .workflow-notice,
  .advance-box,
  .upload-own-flow,
  .upload-cover-panel,
  .storybook-builder,
  .storybook-page-stage
) :is(.text-input, .review-input, input, textarea)::placeholder {
  color: rgba(16, 16, 13, 0.68) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.68) !important;
}

.workspace-v2 :is(
  .review-form,
  .guided-form-section,
  .visual-plan-form,
  .visual-substep-card,
  .prepare-asset-card,
  .image-queue-panel,
  .workflow-notice,
  .advance-box,
  .upload-own-flow,
  .upload-cover-panel,
  .storybook-builder,
  .storybook-page-stage
) select option {
  color: var(--inkforge-dark-text) !important;
  background: #f0bd63 !important;
}

#activeGatePanel .review-form :is(.text-input, .review-input, input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  color: var(--inkforge-dark-text) !important;
  -webkit-text-fill-color: var(--inkforge-dark-text) !important;
  caret-color: var(--inkforge-dark-text) !important;
  border-color: rgba(201, 154, 69, 0.46) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)),
    var(--inkforge-button-gradient) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 247, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.14) !important;
}

#activeGatePanel .review-form :is(.text-input, .review-input, input, textarea)::placeholder {
  color: rgba(16, 16, 13, 0.68) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.68) !important;
}

@media (max-width: 860px) {
  .admin-console-shell,
  .admin-feedback-form,
  .admin-usage-row,
  .admin-project-card {
    grid-template-columns: 1fr;
  }

  .admin-console-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-console-nav .eyebrow {
    grid-column: 1 / -1;
  }

  .admin-usage-pills {
    justify-content: flex-start;
  }
}

/* Public trust and policy pages */
.site-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
  justify-content: center;
  padding: 1.1rem clamp(1rem, 3vw, 2rem) 1.4rem;
  color: var(--aged-paper);
  background:
    linear-gradient(180deg, rgba(8, 14, 19, 0.96), rgba(18, 42, 53, 0.98));
  border-top: 1px solid rgba(201, 154, 69, 0.28);
}

.site-footer a {
  color: var(--forged-gold);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ember-orange);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.policy-body {
  min-height: 100vh;
  color: var(--soft-ivory);
  background:
    radial-gradient(circle at 12% 0%, rgba(201, 154, 69, 0.2), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(224, 122, 31, 0.18), transparent 22rem),
    linear-gradient(135deg, #071015 0%, #122a35 46%, #0b1117 100%);
}

.policy-page {
  position: relative;
  z-index: 2;
  width: min(58rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 0;
}

.policy-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: 1rem;
  padding: 0.7rem 1rem;
  color: #122a35;
  font-weight: 900;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(244, 239, 229, 0.98), rgba(201, 154, 69, 0.82));
  border: 1px solid rgba(201, 154, 69, 0.55);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.policy-back-link:hover,
.policy-back-link:focus-visible {
  background:
    linear-gradient(135deg, rgba(201, 154, 69, 0.98), rgba(224, 122, 31, 0.88));
}

.policy-card {
  overflow: hidden;
  border: 1px solid rgba(201, 154, 69, 0.32);
  border-radius: 1rem;
  background:
    linear-gradient(150deg, rgba(18, 42, 53, 0.94), rgba(11, 17, 23, 0.96));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.policy-hero {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(201, 154, 69, 0.22);
  background:
    radial-gradient(circle at 12% 18%, rgba(201, 154, 69, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(9, 18, 24, 0.92), rgba(18, 42, 53, 0.72));
}

.policy-logo {
  width: 4.2rem;
  height: 4.2rem;
  margin-bottom: 1rem;
}

.policy-hero .eyebrow,
.policy-updated {
  color: var(--forged-gold);
}

.policy-hero h1 {
  max-width: 11ch;
  margin: 0.25rem 0 0.55rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 7vw, 4.8rem);
  line-height: 0.95;
  color: var(--forged-gold);
  background: linear-gradient(135deg, #f0c66e 0%, #c99a45 42%, #e07a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.policy-updated {
  margin: 0 0 1rem;
  font-weight: 900;
}

.policy-intro {
  max-width: 45rem;
  margin: 0;
  color: var(--soft-ivory);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.policy-section {
  padding: clamp(1.15rem, 3vw, 1.75rem) clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid rgba(201, 154, 69, 0.14);
}

.policy-section:first-of-type {
  border-top: 0;
}

.policy-section h2 {
  margin: 0 0 0.65rem;
  color: var(--forged-gold);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.policy-section p {
  max-width: 48rem;
  margin: 0.65rem 0 0;
  color: var(--aged-paper);
  font-size: 1rem;
  line-height: 1.72;
}

.policy-section a {
  color: var(--forged-gold);
  font-weight: 900;
}

.policy-note {
  background: rgba(201, 154, 69, 0.08);
}

@media (max-width: 640px) {
  .policy-page {
    width: min(100% - 1rem, 58rem);
    padding-top: 0.75rem;
  }

  .policy-card {
    border-radius: 0.85rem;
  }

  .site-footer {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}

/* Password reset pages */
.auth-page-body {
  display: flex;
  flex-direction: column;
}

.auth-page {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 1;
  place-items: center;
  width: min(68rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 0;
}

.auth-page-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(19rem, 0.7fr);
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(201, 154, 69, 0.34);
  border-radius: 1rem;
  background:
    linear-gradient(150deg, rgba(18, 42, 53, 0.96), rgba(11, 17, 23, 0.98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.auth-page-story,
.auth-page-form {
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.auth-page-story {
  background:
    radial-gradient(circle at 16% 20%, rgba(201, 154, 69, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(9, 18, 24, 0.94), rgba(18, 42, 53, 0.76));
}

.auth-page-story h1 {
  max-width: 11ch;
  margin: 0.25rem 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4.9rem);
  line-height: 0.95;
  color: var(--forged-gold);
  background: linear-gradient(135deg, #f0c66e 0%, #c99a45 42%, #e07a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-page-story .home-copy {
  color: var(--aged-paper);
}

.auth-page-form {
  display: grid;
  align-content: center;
  gap: 0.8rem;
  border-left: 1px solid rgba(201, 154, 69, 0.22);
  background: rgba(11, 17, 23, 0.36);
}

.auth-inline-link {
  display: inline-flex;
  width: fit-content;
  color: var(--forged-gold);
  font-weight: 900;
  text-decoration: none;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible {
  color: var(--ember-orange);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.auth-page-form .field-label,
.auth-form .auth-inline-link {
  color: var(--forged-gold) !important;
}

.auth-page-form :is(.text-input, input[type="email"], input[type="password"]) {
  color: #10100d !important;
  -webkit-text-fill-color: #10100d !important;
  caret-color: #10100d !important;
  border-color: rgba(201, 154, 69, 0.48) !important;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92)) !important;
}

.auth-page-form :is(.text-input, input)::placeholder {
  color: rgba(16, 16, 13, 0.68) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.68) !important;
}

.auth-page-form .microcopy {
  color: var(--aged-paper);
}

.auth-page-form .microcopy a {
  color: var(--forged-gold);
  font-weight: 900;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.password-field .text-input {
  min-width: 0;
}

.password-reveal-button {
  min-height: 2.75rem;
  padding: 0 0.85rem;
  color: #10100d;
  font: 900 0.82rem var(--sans);
  background:
    linear-gradient(135deg, rgba(244, 239, 229, 0.98), rgba(201, 154, 69, 0.86));
  border: 1px solid rgba(201, 154, 69, 0.58);
  border-radius: 0.75rem;
  cursor: pointer;
}

.password-reveal-button:hover,
.password-reveal-button:focus-visible {
  background:
    linear-gradient(135deg, rgba(201, 154, 69, 0.98), rgba(224, 122, 31, 0.9));
}

.confirm-password-group {
  display: grid;
  gap: 0.55rem;
}

.confirm-password-group[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .auth-page-card {
    grid-template-columns: 1fr;
  }

  .auth-page-form {
    border-left: 0;
    border-top: 1px solid rgba(201, 154, 69, 0.22);
  }
}

/* Writer Workspace */
.writer-mode {
  background:
    radial-gradient(circle at 10% 0%, rgba(201, 154, 69, 0.18), transparent 24rem),
    linear-gradient(135deg, #071015 0%, #122a35 52%, #0b1117 100%);
}

.writer-view {
  width: min(96rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) 0 2rem;
}

.writer-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border: 1px solid rgba(201, 154, 69, 0.32);
  border-radius: 1rem;
  background:
    linear-gradient(150deg, rgba(18, 42, 53, 0.94), rgba(11, 17, 23, 0.96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.writer-header h2 {
  margin: 0.15rem 0 0.35rem;
  color: var(--forged-gold);
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.98;
  background: linear-gradient(135deg, #f0c66e 0%, #c99a45 42%, #e07a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.writer-save-cluster {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.writer-save-status {
  color: var(--forged-gold);
  font-size: 0.85rem;
  font-weight: 900;
}

.writer-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: start;
}

.writer-outline-panel,
.writer-editor-panel,
.writer-helper-panel {
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 1rem;
  background:
    linear-gradient(160deg, rgba(18, 42, 53, 0.94), rgba(11, 17, 23, 0.96));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.writer-outline-panel,
.writer-helper-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.writer-helper-panel h3 {
  margin: 0;
  color: var(--forged-gold);
  font-family: var(--serif);
  font-size: 1.45rem;
}

.writer-helper-panel p,
.writer-outline-panel .microcopy,
.writer-suggestion p {
  color: var(--aged-paper);
  line-height: 1.55;
}

.writer-stats {
  display: grid;
  gap: 0.55rem;
}

.writer-stats div {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem;
  border: 1px solid rgba(201, 154, 69, 0.24);
  border-radius: 0.75rem;
  background: rgba(5, 8, 11, 0.42);
}

.writer-stats strong {
  color: var(--forged-gold);
  font-size: 1.1rem;
}

.writer-stats span {
  color: var(--aged-paper);
  font-size: 0.78rem;
  font-weight: 800;
}

.writer-outline-list {
  display: grid;
  gap: 0.45rem;
  max-height: 48vh;
  overflow: auto;
}

.writer-outline-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem;
  color: var(--aged-paper);
  text-align: left;
  background: rgba(5, 8, 11, 0.36);
  border: 1px solid rgba(201, 154, 69, 0.22);
  border-radius: 0.75rem;
  cursor: pointer;
}

.writer-outline-list span,
.writer-outline-list strong {
  color: var(--forged-gold);
}

.writer-editor-panel {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 210, 152, 0.98), rgba(214, 168, 89, 0.94));
}

.writer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(18, 42, 53, 0.16);
  background: rgba(18, 42, 53, 0.08);
}

.writer-toolbar button {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  color: #10100d;
  font: 900 0.82rem var(--sans);
  background:
    linear-gradient(135deg, rgba(244, 239, 229, 0.98), rgba(201, 154, 69, 0.82));
  border: 1px solid rgba(18, 42, 53, 0.18);
  border-radius: 0.65rem;
  cursor: pointer;
}

#writerEditor {
  width: 100%;
  min-height: min(70vh, 52rem);
  padding: clamp(1rem, 3vw, 2rem);
  color: #10100d !important;
  -webkit-text-fill-color: #10100d !important;
  caret-color: #10100d !important;
  font: 1.08rem/1.78 Georgia, "Times New Roman", serif;
  background:
    linear-gradient(180deg, rgba(248, 237, 211, 0.98), rgba(232, 199, 133, 0.96)) !important;
  border: 0;
  outline: none;
  resize: vertical;
}

#writerEditor::placeholder {
  color: rgba(16, 16, 13, 0.64) !important;
  -webkit-text-fill-color: rgba(16, 16, 13, 0.64) !important;
}

.writer-helper-actions {
  display: grid;
  gap: 0.5rem;
}

.writer-helper-actions .small-button {
  justify-content: flex-start;
  width: 100%;
}

.writer-suggestion {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(201, 154, 69, 0.22);
}

.writer-suggestion-text {
  max-height: 16rem;
  overflow: auto;
  padding: 0.85rem;
  color: #10100d;
  line-height: 1.6;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.95), rgba(232, 216, 184, 0.92));
  border: 1px solid rgba(201, 154, 69, 0.44);
  border-radius: 0.75rem;
}

.writer-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

  .writer-outline-list {
    max-height: 16rem;
  }
}

@media (max-width: 720px) {
  .writer-header {
    grid-template-columns: 1fr;
  }

  .writer-save-cluster {
    justify-items: stretch;
  }
}

/* Global navigation consolidation: one branded menu replaces account/profile/workspace nav bars. */
.global-nav {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 1200;
}

.global-nav[hidden],
.global-nav-panel[hidden] {
  display: none !important;
}

.global-nav-trigger {
  display: inline-grid;
  gap: 0.25rem;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  color: #10100d;
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.96), rgba(224, 122, 31, 0.9));
  border: 1px solid rgba(244, 239, 229, 0.38);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.global-nav-trigger span {
  display: block;
  width: 1.25rem;
  height: 0.15rem;
  background: #10100d;
  border-radius: 999px;
}

.global-nav-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.85rem;
  width: min(20rem, calc(100vw - 2rem));
  min-height: 26rem;
  max-height: calc(100vh - 6rem);
  padding: 1rem;
  overflow: auto;
  color: #f4efe5;
  background:
    linear-gradient(145deg, rgba(18, 42, 53, 0.98), rgba(5, 8, 11, 0.97)),
    #05080b;
  border: 1px solid rgba(201, 154, 69, 0.38);
  border-radius: 1rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.global-nav-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201, 154, 69, 0.24);
}

.global-nav-identity img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.global-nav-identity strong {
  display: block;
  color: #f0bd63;
  font: 900 1rem var(--serif);
}

.global-nav-identity span {
  display: block;
  margin-top: 0.15rem;
  color: #f1dfbd;
  font: 800 0.74rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.global-nav-links,
.global-nav-admin {
  display: grid;
  gap: 0.5rem;
}

.global-nav-links button,
.global-nav-admin button,
.global-nav-toggle {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.85rem;
  color: #10100d;
  -webkit-text-fill-color: #10100d;
  font: 900 0.9rem var(--sans);
  text-align: left;
  background:
    linear-gradient(145deg, rgba(244, 239, 229, 0.96), rgba(201, 154, 69, 0.9));
  border: 1px solid rgba(240, 189, 99, 0.38);
  border-radius: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 253, 247, 0.48);
  cursor: pointer;
}

.global-nav-links button:hover,
.global-nav-admin button:hover,
.global-nav-toggle:hover {
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.98), rgba(224, 122, 31, 0.92));
}

.global-nav-admin {
  align-self: end;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(201, 154, 69, 0.24);
}

.global-nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.global-nav-toggle input {
  accent-color: #e07a1f;
}

.feedback-tab {
  display: none !important;
}

.launcher#launcherView .profile-strip,
.profile-strip,
.account-dock {
  display: none !important;
}

.start-method-card {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 69, 0.38);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(201, 154, 69, 0.14), rgba(18, 42, 53, 0.54)),
    rgba(5, 8, 11, 0.62);
}

.start-method-card legend {
  padding: 0 0.35rem;
  color: #f0bd63;
  -webkit-text-fill-color: #f0bd63;
  font: 900 0.95rem var(--sans);
}

.start-method-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(201, 154, 69, 0.28);
  border-radius: 0.9rem;
  background: rgba(5, 8, 11, 0.38);
  cursor: pointer;
}

.start-method-option:has(input:checked) {
  border-color: rgba(240, 189, 99, 0.76);
  background:
    linear-gradient(145deg, rgba(240, 189, 99, 0.2), rgba(224, 122, 31, 0.14)),
    rgba(5, 8, 11, 0.48);
}

.start-method-option input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #e07a1f;
}

.start-method-option strong {
  display: block;
  color: #f0bd63;
  -webkit-text-fill-color: #f0bd63;
  font: 900 1rem var(--serif);
}

.start-method-option small {
  display: block;
  margin-top: 0.2rem;
  color: #f1dfbd;
  -webkit-text-fill-color: #f1dfbd;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .global-nav {
    top: 0.8rem;
    right: 0.8rem;
  }

  .global-nav-panel {
    width: calc(100vw - 1.6rem);
    max-height: calc(100vh - 5.5rem);
  }
}
