:root {
  color-scheme: light;
  --text: #241f22;
  --text-strong: #151013;
  --muted: #6f666a;
  --subtle: #9a8f94;
  --line: #eadfe3;
  --line-strong: #dccbd1;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --panel-soft: #fff8fa;
  --page: #fff9fb;
  --page-warm: #fff3f5;
  --brand: #ff2442;
  --brand-deep: #d91432;
  --brand-soft: #fff1f4;
  --brand-tint: #fff7f9;
  --brand-faint: rgba(255, 36, 66, 0.08);
  --ok: #24744c;
  --ok-bg: #eefaf4;
  --error: #b42318;
  --error-bg: #fff0ee;
  --shadow: 0 22px 60px rgba(125, 48, 63, 0.12);
  --shadow-soft: 0 14px 34px rgba(125, 48, 63, 0.08);
  --shadow-lift: 0 18px 40px rgba(255, 36, 66, 0.16);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --ring: 0 0 0 4px rgba(255, 36, 66, 0.12);
}

.admin-page {
  min-height: 100vh;
}

.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.admin-header,
.admin-header-actions,
.admin-panel-head,
.admin-form-row {
  display: flex;
  align-items: center;
}

.admin-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.admin-header-actions form {
  margin: 0;
}

.admin-hero {
  border: 1px solid rgba(255, 36, 66, 0.14);
  border-radius: var(--radius-lg);
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 244, 0.88)),
    var(--panel-solid);
  box-shadow: var(--shadow-soft);
}

.admin-hero h1 {
  margin: 8px 0 10px;
  color: var(--text-strong);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.admin-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.admin-panel {
  min-width: 0;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.admin-wide-panel {
  grid-column: 1 / -1;
}

.admin-panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-panel h2 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 22px;
  line-height: 1.2;
}

.admin-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.admin-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 900;
}

.admin-invite-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
}

.admin-form-row {
  gap: 10px;
}

.admin-form-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 13px 12px;
  color: var(--text);
  background: #ffffff;
}

.new-invite-panel {
  margin-top: 16px;
  border: 1px solid rgba(36, 116, 76, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--ok-bg);
}

.new-invite-panel span {
  display: block;
  margin-bottom: 8px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 900;
}

.new-invite-panel strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
  line-height: 1.35;
}

.new-invite-panel p {
  margin: 10px 0 14px;
}

.temporary-password-panel {
  border-color: rgba(255, 36, 66, 0.22);
  background: #fff7f9;
}

.temporary-password-panel span {
  color: var(--brand-deep);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.admin-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.invite-table {
  min-width: 900px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.45;
}

.admin-table th {
  color: var(--muted);
  background: var(--brand-tint);
  font-size: 12px;
  font-weight: 900;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table code {
  display: inline-block;
  max-width: 320px;
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-confirm-overlay {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(44, 30, 36, 0.42);
  backdrop-filter: blur(12px);
}

.admin-confirm-overlay[hidden] {
  display: none;
}

.has-admin-confirm-modal {
  overflow: hidden;
}

.admin-confirm-dialog {
  width: min(480px, 100%);
  overflow: hidden;
  border: 1px solid rgba(234, 223, 227, 0.98);
  border-radius: var(--radius-md);
  background: #fffafb;
  box-shadow: 0 28px 80px rgba(68, 34, 44, 0.28);
}

.admin-confirm-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(234, 223, 227, 0.94);
  padding: 16px 16px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.admin-confirm-title-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-confirm-eyebrow {
  margin: 0;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.admin-confirm-title-wrap h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
  line-height: 1.25;
}

.admin-confirm-close {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 36, 66, 0.14);
  border-radius: 999px;
  color: var(--brand-deep);
  background: #fff0f3;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.admin-confirm-body {
  display: grid;
  gap: 14px;
  padding: 18px 16px 8px;
}

.admin-confirm-message {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
}

.admin-confirm-input-wrap {
  display: grid;
  gap: 8px;
}

.admin-confirm-input-wrap[hidden] {
  display: none;
}

.admin-confirm-input-wrap label {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.admin-confirm-input-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 13px 12px;
  color: var(--text);
  background: #ffffff;
}

.admin-confirm-hint {
  margin: 0;
  color: var(--error);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.admin-confirm-hint.is-ready {
  color: var(--ok);
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px;
}

.invite-status {
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.invite-status.is-unused {
  color: var(--ok);
  background: var(--ok-bg);
}

.invite-status.is-used {
  color: var(--muted);
  background: #f3eef0;
}

@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .admin-header,
  .admin-header-actions,
  .admin-panel-head,
  .admin-form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-header-actions,
  .admin-header-actions .secondary-button,
  .admin-form-row .primary-button {
    width: 100%;
  }

  .admin-confirm-overlay {
    padding: 14px;
  }

  .admin-confirm-actions {
    flex-direction: column-reverse;
  }

  .admin-confirm-actions .primary-button,
  .admin-confirm-actions .secondary-button {
    width: 100%;
  }

  .admin-hero,
  .admin-panel {
    border-radius: var(--radius-sm);
    padding: 18px;
  }

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

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 36, 66, 0.11), transparent 28rem),
    radial-gradient(circle at 84% 18%, rgba(255, 141, 116, 0.16), transparent 24rem),
    linear-gradient(180deg, var(--page) 0%, #ffffff 58%, #fff8fa 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", Arial, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(255, 36, 66, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 36, 66, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(36, 31, 34, 0.04) 0.7px, transparent 0.7px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.32));
  background-size: 18px 18px, 100% 100%;
  content: "";
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
.title-card:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  transform: translateY(-160%);
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--brand);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.account-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(125, 48, 63, 0.08);
  backdrop-filter: blur(16px);
}

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

.account-bar form {
  margin: 0;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.password-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(280px, 1.22fr);
  gap: 18px;
  align-items: start;
  margin: -4px 0 16px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: var(--radius-md);
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.password-panel[hidden] {
  display: none;
}

.password-panel h2 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: 22px;
  line-height: 1.2;
}

.password-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}

.password-form {
  display: grid;
  gap: 9px;
}

.password-form label {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
}

.password-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 12px;
  color: var(--text);
  background: #ffffff;
}

.password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.step-nav {
  position: sticky;
  top: 10px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-md);
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 250, 0.82)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(125, 48, 63, 0.1);
  backdrop-filter: blur(18px);
  scrollbar-width: thin;
}

.step-nav-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  min-width: 156px;
  min-height: 54px;
  align-items: center;
  border: 1px solid rgba(255, 36, 66, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.step-nav-item:hover {
  border-color: rgba(255, 36, 66, 0.2);
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.86);
}

.step-nav-item.is-current {
  border-color: rgba(255, 36, 66, 0.34);
  color: var(--brand-deep);
  background:
    linear-gradient(180deg, rgba(255, 247, 249, 0.98), rgba(255, 240, 243, 0.92));
  box-shadow: 0 10px 24px rgba(255, 36, 66, 0.12);
}

.step-nav-item.is-complete {
  border-color: rgba(36, 116, 76, 0.16);
  color: var(--ok);
  background: rgba(238, 250, 244, 0.88);
}

.step-nav-item.is-complete.is-current {
  border-color: rgba(255, 36, 66, 0.42);
  background:
    linear-gradient(180deg, rgba(238, 250, 244, 0.94), rgba(255, 241, 244, 0.86));
  box-shadow:
    inset 0 0 0 2px rgba(255, 36, 66, 0.16),
    0 10px 22px rgba(36, 116, 76, 0.12);
}

.step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: currentColor;
  background: rgba(255, 36, 66, 0.08);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.step-nav-item.is-complete .step-number {
  color: #ffffff;
  background: var(--ok);
  font-size: 0;
}

.step-nav-item.is-complete .step-number::before {
  content: "✓";
  font-size: 14px;
}

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

.step-title,
.step-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-title {
  color: currentColor;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.step-detail {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.step-nav-item:not(.is-current):not(.is-complete) {
  opacity: 0.66;
}

#topicStep,
#copyStep,
#imageStep,
#publishPanel {
  outline: 2px solid transparent;
  outline-offset: 4px;
  scroll-margin-top: 104px;
  transition: background-color 0.42s ease, border-color 0.42s ease, box-shadow 0.42s ease, outline-color 1.1s ease;
}

.step-landing-flash {
  border-color: rgba(255, 36, 66, 0.42) !important;
  outline: 2px solid rgba(255, 36, 66, 0.74) !important;
  outline-color: rgba(255, 36, 66, 0.74) !important;
  background-color: rgba(255, 36, 66, 0.07) !important;
  box-shadow:
    0 0 0 6px rgba(255, 36, 66, 0.1),
    var(--shadow-lift) !important;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(360px, 1fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4.4vw, 46px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 249, 0.84)),
    radial-gradient(circle at 78% 18%, rgba(255, 36, 66, 0.16), transparent 18rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card::before {
  position: absolute;
  top: -68px;
  right: -42px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 36, 66, 0.18);
  border-radius: 44px;
  background: rgba(255, 255, 255, 0.36);
  content: "";
  transform: rotate(16deg);
}

.hero-card::after {
  position: absolute;
  right: 36%;
  bottom: 0;
  width: 1px;
  height: 72%;
  background: linear-gradient(180deg, transparent, rgba(255, 36, 66, 0.16), transparent);
  content: "";
}

.hero-copy,
.input-panel,
.content-card {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0 12px;
}

.brand-lockup {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 999px;
  padding: 7px 12px 7px 8px;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 22px rgba(255, 36, 66, 0.07);
}

.brand-logo {
  display: block;
  flex: 0 0 28px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(255, 36, 66, 0.18);
}

.brand-logo-mark {
  overflow: visible;
}

.brand-logo-mark-top,
.brand-logo-mark-bottom {
  transform-box: fill-box;
  transform-origin: center;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 8.4em;
  margin-bottom: 16px;
  color: var(--text-strong);
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 22em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  text-wrap: pretty;
}

.input-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2.8vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 251, 0.96)),
    var(--panel-solid);
  box-shadow: var(--shadow-soft);
}

label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 800;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 241, 244, 0.58);
}

.mode-tab {
  min-height: 38px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mode-tab:hover {
  color: var(--brand-deep);
}

.mode-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(255, 36, 66, 0.2);
}

.mode-panel {
  display: grid;
  gap: 12px;
}

.mode-panel[hidden] {
  display: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  vertical-align: -0.18em;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-accent {
  color: var(--brand);
}

#topic,
#assetTopic,
#cardTopic,
#cardContent,
#toneExtra,
#personaIdentity,
#personaStyle {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 17px 18px;
  color: var(--text);
  background: #fffdfe;
  outline: none;
  line-height: 1.72;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

#topic {
  min-height: 152px;
}

#assetTopic {
  min-height: 76px;
}

#cardTopic {
  min-height: 112px;
}

#cardContent {
  min-height: 132px;
}

#toneExtra {
  min-height: 42px;
  resize: none;
  padding: 0 14px;
  font-size: 13px;
  line-height: 42px;
}

#personaIdentity,
#personaStyle {
  min-height: 72px;
  padding: 12px 14px;
  font-size: 13px;
}

#topic::placeholder,
#assetTopic::placeholder,
#cardTopic::placeholder,
#cardContent::placeholder,
#toneExtra::placeholder,
#personaIdentity::placeholder,
#personaStyle::placeholder {
  color: var(--subtle);
}

#topic:focus,
#assetTopic:focus,
#cardTopic:focus,
#cardContent:focus,
#toneExtra:focus,
#personaIdentity:focus,
#personaStyle:focus {
  border-color: rgba(255, 36, 66, 0.58);
  background: #ffffff;
  box-shadow: var(--ring);
}

.persona-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 36, 66, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.persona-panel.is-enabled {
  border-color: rgba(255, 36, 66, 0.18);
  background: rgba(255, 247, 249, 0.86);
}

.persona-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.persona-panel-head label,
.persona-settings label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.persona-settings {
  display: grid;
  grid-template-columns: minmax(118px, 0.45fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 36, 66, 0.08);
  padding-top: 12px;
}

.persona-settings[hidden] {
  display: none;
}

.persona-switch {
  grid-column: 1 / -1;
  width: fit-content;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.persona-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.tone-panel {
  display: grid;
  grid-template-columns: minmax(118px, 0.45fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border: 1px solid rgba(255, 36, 66, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.tone-panel label:first-child,
.tone-panel .optional-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tone-guide {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

#toneSelect,
#personaDefaultTone {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 36px 0 14px;
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, var(--brand-deep) 50%) right 15px center / 6px 6px no-repeat,
    linear-gradient(135deg, var(--brand-deep) 50%, transparent 50%) right 10px center / 6px 6px no-repeat,
    #fffdfe;
  outline: none;
  appearance: none;
  font-size: 13px;
  font-weight: 800;
}

#toneSelect:focus,
#personaDefaultTone:focus {
  border-color: rgba(255, 36, 66, 0.58);
  background-color: #ffffff;
  box-shadow: var(--ring);
}

.upload-box {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(255, 36, 66, 0.22);
  border-radius: var(--radius-sm);
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.06), rgba(255, 255, 255, 0.72)),
    var(--brand-tint);
}

.required-note {
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--brand-deep);
  background: #fff0f3;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.optional-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.optional-note-input {
  padding: 12px 14px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.74);
}

.file-input {
  width: 100%;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.file-input::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  border: 1px solid rgba(255, 36, 66, 0.14);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--brand-deep);
  background: #fff0f3;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.asset-preview-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.asset-preview-list:empty::before {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 36, 66, 0.18);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.6;
  content: "上传后可预览、删除，并选择其中一张做封面底图。";
}

.asset-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 223, 227, 0.92);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(125, 48, 63, 0.06);
}

.asset-thumb.is-cover {
  border-color: var(--brand);
  box-shadow: 0 14px 28px rgba(255, 36, 66, 0.14);
}

.asset-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: #fff2f5;
}

.asset-thumb-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 6px;
}

.asset-thumb button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--brand-deep);
  background: #fff0f3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.asset-thumb .asset-delete-button {
  width: 32px;
  padding: 0;
  color: var(--muted);
  background: #ffffff;
}

.input-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mode-tip {
  width: fit-content;
  max-width: 100%;
  margin: -2px 0 0;
  border: 1px solid rgba(255, 36, 66, 0.14);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.88);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.example-chip-row,
.image-edit-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.example-chip {
  min-height: 30px;
  border: 1px solid rgba(255, 36, 66, 0.13);
  border-radius: 999px;
  padding: 0 11px;
  color: #8e2436;
  background: #fff0f3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.example-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 36, 66, 0.32);
  color: var(--brand-deep);
  background: #ffffff;
}

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

.primary-button,
.secondary-button,
.title-action,
.download-link {
  display: inline-flex;
  gap: 7px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.primary-button {
  min-width: 142px;
  padding: 0 23px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff3150 0%, var(--brand) 100%);
  box-shadow: 0 14px 28px rgba(255, 36, 66, 0.26);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff4260 0%, var(--brand-deep) 100%);
  box-shadow: 0 18px 34px rgba(255, 36, 66, 0.3);
}

.primary-button.danger {
  background: linear-gradient(180deg, #d92d20 0%, var(--error) 100%);
  box-shadow: 0 14px 28px rgba(180, 35, 24, 0.24);
}

.primary-button.danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #e43c30 0%, #8f1d14 100%);
  box-shadow: 0 18px 34px rgba(180, 35, 24, 0.3);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.title-action:hover:not(:disabled),
.download-link:hover {
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.title-action:active:not(:disabled),
.download-link:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button:disabled,
.secondary-button:disabled,
.title-action:disabled {
  opacity: 0.48;
  box-shadow: none;
}

.secondary-button,
.title-action,
.download-link {
  min-height: 36px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  padding: 0 14px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.94);
}

.secondary-button:hover:not(:disabled),
.title-action:hover:not(:disabled) {
  border-color: rgba(255, 36, 66, 0.26);
  background: #ffe7ec;
}

.secondary-button.danger {
  border-color: rgba(180, 35, 24, 0.18);
  color: var(--error);
  background: var(--error-bg);
}

.secondary-button.danger:hover:not(:disabled) {
  border-color: rgba(180, 35, 24, 0.34);
  background: #ffffff;
}

.secondary-button.warm,
.title-action.warm {
  color: #8e2436;
  background: #fff0f3;
}

.download-link {
  width: 100%;
  margin-top: 10px;
  color: var(--ok);
  background: var(--ok-bg);
  border-color: rgba(36, 116, 76, 0.12);
  font-size: 13px;
}

.status-pill {
  display: none;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 36, 66, 0.08);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.4;
}

.status-pill:not(:empty) {
  display: inline-flex;
}

.status-pill.is-loading::before {
  width: 28px;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 36, 66, 0.16), transparent),
    #ffe8ed;
  background-size: 200% 100%, 100% 100%;
  content: "";
  animation: loadingBar 1.05s ease-in-out infinite;
}

.status-pill.is-error {
  border-color: rgba(180, 35, 24, 0.12);
  color: var(--error);
  background: var(--error-bg);
}

.task-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.task-status[hidden] {
  display: none;
}

.task-status.is-loading::before {
  width: 24px;
  height: 9px;
  flex: 0 0 24px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 36, 66, 0.18), transparent),
    #ffe8ed;
  background-size: 200% 100%, 100% 100%;
  content: "";
  animation: loadingBar 1.05s ease-in-out infinite;
}

.task-status.is-success {
  border-color: rgba(36, 116, 76, 0.14);
  color: var(--ok);
  background: var(--ok-bg);
}

.task-status.is-success::before {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--ok);
  content: "✓";
  font-size: 11px;
  line-height: 1;
}

.task-status.is-error {
  border-color: rgba(180, 35, 24, 0.14);
  color: var(--error);
  background: var(--error-bg);
}

.task-status.is-error::before {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--error);
  content: "!";
  font-size: 12px;
  line-height: 1;
}

.history-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 36, 66, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.history-panel label {
  color: var(--muted);
  font-size: 13px;
}

.library-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.backup-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 36, 66, 0.16);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 247, 249, 0.78);
}

.backup-copy {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

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

.backup-import-button {
  cursor: pointer;
}

.backup-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.backup-status.is-error {
  color: var(--error);
}

.library-manager {
  display: grid;
  gap: 14px;
}

.library-manager[hidden],
.legacy-history-controls[hidden] {
  display: none;
}

.library-section {
  display: grid;
  gap: 9px;
  border-top: 1px solid rgba(255, 36, 66, 0.08);
  padding-top: 12px;
}

.library-section h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.library-list {
  display: grid;
  gap: 8px;
}

.library-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.library-item.is-current {
  border-color: rgba(255, 36, 66, 0.28);
  background: rgba(255, 241, 244, 0.8);
}

.library-thumb {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: var(--radius-xs);
  color: var(--brand-deep);
  background: #fff0f3;
  font-size: 15px;
  font-weight: 900;
}

.library-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-meta {
  min-width: 0;
}

.library-meta h4 {
  overflow: hidden;
  margin: 0 0 5px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-meta p,
.library-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.library-empty {
  border: 1px dashed rgba(255, 36, 66, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.library-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.library-action-button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.library-action-button.danger {
  color: var(--error);
  background: var(--error-bg);
  border-color: rgba(180, 35, 24, 0.12);
}

.history-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

#historySelect {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 38px 0 14px;
  color: var(--text);
  background: #fffdfe;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
}

#historySelect:focus {
  border-color: rgba(255, 36, 66, 0.46);
  box-shadow: var(--ring);
}

#historySelect:disabled {
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.48);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 22px;
  margin-top: 24px;
}

.content-card {
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2.8vw, 26px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.copy-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 251, 0.78)),
    var(--panel);
}

.media-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 36, 66, 0.08), transparent 14rem),
    rgba(255, 255, 255, 0.82);
}

.media-card.is-card-mode > .section-heading:first-of-type,
.media-card.is-card-mode > #coverResult,
.media-card.is-card-mode > .image-heading,
.media-card.is-card-mode > .append-image-tools,
.media-card.is-card-mode > #imagesResult {
  display: none;
}

.section-heading {
  margin-bottom: 15px;
}

.heading-line {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
}

.section-heading h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-kicker {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.compact-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.publish-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 16px;
  margin: 2px 0 0;
  border: 1px solid rgba(255, 36, 66, 0.22);
  border-radius: var(--radius-md);
  padding: clamp(16px, 2.5vw, 24px);
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 36, 66, 0.13), transparent 17rem),
    linear-gradient(135deg, rgba(255, 36, 66, 0.1), rgba(255, 255, 255, 0.9)),
    #fffafb;
  box-shadow: var(--shadow-lift);
}

.publish-panel-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.publish-panel-head h3 {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
}

.export-actions .primary-button,
.export-actions .secondary-button {
  min-height: 42px;
}

.export-primary {
  min-width: 136px;
}

.export-download {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: rgba(36, 116, 76, 0.16);
}

.publish-checkup {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.checkup-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.checkup-title strong {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
}

.checkup-stats,
.risk-chip-list,
.risk-term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.checkup-badge,
.risk-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(36, 116, 76, 0.13);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--ok);
  background: var(--ok-bg);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.checkup-badge.is-warning,
.risk-chip {
  border-color: rgba(255, 36, 66, 0.16);
  color: #9b3242;
  background: #fff0f3;
}

.checkup-badge.is-error {
  border-color: rgba(180, 35, 24, 0.16);
  color: var(--error);
  background: var(--error-bg);
}

.checkup-messages {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.checkup-note,
.checkup-ok,
.checkup-risk-title,
.checkup-risk-summary {
  margin: 0;
}

.checkup-ok {
  color: var(--ok);
  font-weight: 800;
}

.checkup-risk-alert {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--error);
  background:
    linear-gradient(90deg, rgba(180, 35, 24, 0.12), rgba(255, 240, 238, 0.9)),
    var(--error-bg);
}

.checkup-risk-title {
  color: var(--error);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.checkup-risk-summary {
  color: #7d241f;
  font-size: 13px;
  font-weight: 700;
}

.risk-term-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-term {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 999px;
  padding: 0 11px;
  color: #7d1d17;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.title-list {
  display: grid;
  gap: 12px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.title-list:empty::before,
.media-dropzone:empty::before,
.media-grid:empty::before,
.body-result:empty::before {
  display: block;
  color: var(--subtle);
  line-height: 1.75;
}

.title-list:empty::before {
  padding: 18px;
  border: 1px dashed rgba(255, 36, 66, 0.22);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.07), rgba(255, 255, 255, 0.72)),
    var(--brand-tint);
  content: "生成后这里会出现 3 个标题，点选标题会保留红边和对勾。";
}

.title-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  border: 1px solid rgba(234, 223, 227, 0.92);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  background:
    linear-gradient(180deg, #ffffff, #fffbfc);
  box-shadow: 0 10px 24px rgba(125, 48, 63, 0.055);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.title-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 36, 66, 0.36);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(255, 36, 66, 0.1);
}

.title-card.is-selected {
  border-color: var(--brand);
  background:
    linear-gradient(180deg, #fff7f9, #fff0f3);
  box-shadow: var(--shadow-lift);
}

.title-card.is-selected::after {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 9px 18px rgba(255, 36, 66, 0.32);
  content: "✓";
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.title-text {
  min-width: 0;
  border-radius: var(--radius-xs);
  padding-right: 18px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.58;
  text-wrap: pretty;
  outline: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.title-text:focus {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--ring);
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.title-action {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.body-block {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.body-title-hint {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  margin: 10px 0 0;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.78);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.body-title-hint[hidden] {
  display: none;
}

.result-hint {
  margin: 2px 0 0;
}

.body-result {
  min-height: 230px;
  max-height: 620px;
  margin: 15px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(234, 223, 227, 0.96);
  border-radius: var(--radius-sm);
  padding: 20px;
  color: #332b2f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 252, 253, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.88;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.body-result:focus {
  border-color: rgba(255, 36, 66, 0.48);
  background: #ffffff;
  box-shadow: var(--ring);
}

.body-result.is-loading,
.cover-result.is-loading,
.image-card.is-loading {
  opacity: 0.72;
}

.body-result:empty::before {
  content: "正文生成后会显示在这里，方便复制和继续生成配图。";
}

.cover-result,
.images-result {
  min-width: 0;
}

.image-usage-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  border: 1px solid rgba(234, 223, 227, 0.96);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 252, 0.88));
  box-shadow: 0 10px 22px rgba(125, 48, 63, 0.06);
}

.image-usage-panel.is-economy {
  border-color: rgba(85, 122, 91, 0.28);
  background: linear-gradient(180deg, rgba(252, 255, 249, 0.95), rgba(246, 248, 241, 0.9));
}

.image-usage-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.usage-count {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 900;
}

.usage-cost {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--brand-deep);
  background: rgba(255, 36, 66, 0.09);
  font-size: 13px;
  font-weight: 900;
}

.usage-note {
  margin: 0;
}

.economy-switch {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.economy-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.economy-state {
  min-width: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.cost-action-hint {
  margin: 0;
  border-radius: var(--radius-xs);
  padding: 9px 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.cost-action-hint.is-active {
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.82);
}

.media-dropzone:empty::before,
.media-grid:empty::before {
  border: 1px dashed rgba(255, 36, 66, 0.2);
  border-radius: var(--radius-sm);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.065), rgba(255, 255, 255, 0.7)),
    var(--brand-tint);
}

.media-dropzone:empty::before {
  min-height: 180px;
  content: "先选一个标题，封面成品会出现在这里。";
}

.media-grid:empty::before {
  content: "生成配图后，这里会整齐展示正文图。";
}

.cover-figure,
.image-card {
  overflow: hidden;
  border: 1px solid rgba(234, 223, 227, 0.98);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(125, 48, 63, 0.085);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.cover-figure:hover,
.image-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 36, 66, 0.26);
  box-shadow: 0 18px 34px rgba(255, 36, 66, 0.13);
}

.cover-figure {
  padding: 10px;
}

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

.media-actions .download-link {
  margin-top: 0;
  min-width: 0;
  padding: 0 10px;
  font-size: 12px;
}

.image-card .media-actions {
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.image-card .download-link {
  min-height: 34px;
  justify-content: flex-start;
  padding: 0 11px;
  line-height: 1.2;
}

.image-card .download-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-regenerate {
  color: #8e2436;
  background: #fff0f3;
  border-color: rgba(255, 36, 66, 0.12);
}

.image-edit-panel {
  margin-top: 8px;
  container-type: inline-size;
}

.image-edit-entry {
  cursor: pointer;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.image-edit-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(44, 30, 36, 0.42);
  backdrop-filter: blur(12px);
}

.image-edit-overlay[hidden] {
  display: none;
}

.has-image-edit-modal {
  overflow: hidden;
}

.image-edit-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 100%);
  max-height: min(880px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid rgba(234, 223, 227, 0.98);
  border-radius: var(--radius-md);
  background: #fffafb;
  box-shadow: 0 28px 80px rgba(68, 34, 44, 0.28);
}

.image-edit-dialog-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(234, 223, 227, 0.94);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.76);
}

.image-edit-title-wrap {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.image-edit-dialog-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.image-edit-position {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.image-edit-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.image-edit-nav-button {
  min-width: 72px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.image-edit-batch-generate,
.image-edit-batch-apply {
  min-width: 88px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.image-edit-batch-hint {
  flex: 0 1 220px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.image-edit-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 36, 66, 0.14);
  border-radius: 999px;
  color: var(--brand-deep);
  background: #fff0f3;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.image-edit-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  grid-template-areas:
    "stage prompt"
    "stage outpaint"
    "stage preview";
  gap: 14px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.image-edit-stage,
.image-edit-section {
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.image-edit-stage {
  grid-area: stage;
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

.image-edit-section {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
}

.image-edit-section h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.image-edit-section:nth-of-type(1) {
  grid-area: prompt;
}

.image-edit-outpaint-section {
  grid-area: outpaint;
}

.image-edit-preview-section {
  grid-area: preview;
}

.image-edit-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.image-edit-prompt {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 10px 11px;
  color: var(--text);
  background: #ffffff;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}

.image-edit-prompt:focus {
  border-color: rgba(255, 36, 66, 0.52);
  box-shadow: var(--ring);
}

.image-edit-canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  overflow: auto;
  border: 1px solid rgba(255, 36, 66, 0.16);
  border-radius: var(--radius-xs);
  padding: 12px;
  background: #ffffff;
  touch-action: none;
}

.image-edit-canvas-frame {
  position: relative;
  width: min(100%, calc((100vh - 190px) * var(--image-edit-frame-ratio, 1)));
  max-height: calc(100vh - 190px);
  aspect-ratio: var(--image-edit-frame-aspect, 1 / 1);
  overflow: hidden;
  background: #ffffff;
}

.image-edit-canvas-frame.is-outpaint-targeted {
  background:
    linear-gradient(45deg, rgba(255, 240, 243, 0.8) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 240, 243, 0.8) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 240, 243, 0.8) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 240, 243, 0.8) 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.image-edit-outpaint-fill-note {
  position: absolute;
  left: var(--image-edit-fill-note-left, 50%);
  top: var(--image-edit-fill-note-top, 50%);
  z-index: 2;
  display: none;
  max-width: min(86%, 320px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 36, 66, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  color: #8e2436;
  background: rgba(255, 250, 251, 0.94);
  box-shadow: 0 10px 22px rgba(68, 34, 44, 0.12);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  pointer-events: none;
  text-align: center;
}

.image-edit-canvas-frame.has-outpaint-fill .image-edit-outpaint-fill-note {
  display: block;
}

.image-edit-canvas[hidden] {
  display: none;
}

.image-edit-source,
.image-edit-mask,
.image-edit-preview img {
  display: block;
  object-fit: contain;
}

.image-edit-source,
.image-edit-mask {
  position: absolute;
  top: var(--image-edit-source-top, 0%);
  left: var(--image-edit-source-left, 0%);
  width: var(--image-edit-source-width, 100%);
  height: var(--image-edit-source-height, 100%);
  max-width: none;
  max-height: none;
  object-fit: fill;
}

.image-edit-preview img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
}

.image-edit-mask {
  cursor: crosshair;
}

.image-edit-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.image-edit-tools .secondary-button {
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
}

.image-edit-example {
  min-height: 28px;
  padding: 0 9px;
}

.image-edit-aspect-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.image-edit-aspect-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 36px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  color: #8e2436;
  background: #fff7f8;
  font-size: 13px;
  font-weight: 900;
}

.image-edit-aspect-option input {
  margin-top: 3px;
  accent-color: var(--brand);
}

.image-edit-aspect-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.image-edit-aspect-label,
.image-edit-aspect-usage {
  line-height: 1.3;
}

.image-edit-aspect-usage {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.image-edit-preview {
  overflow: hidden;
  border: 1px solid rgba(36, 116, 76, 0.16);
  border-radius: var(--radius-xs);
  background: var(--ok-bg);
}

.image-edit-preview img {
  width: 100%;
}

.image-edit-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.image-edit-state-list {
  display: grid;
  gap: 7px;
}

.image-edit-state-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: var(--radius-xs);
  padding: 0 9px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.image-edit-state-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-edit-state-item.is-active {
  border-color: rgba(255, 36, 66, 0.32);
  box-shadow: var(--ring);
}

.image-edit-state-item.is-generating {
  border-color: rgba(210, 119, 24, 0.24);
  background: #fff8ed;
}

.image-edit-state-item.is-preview,
.image-edit-state-item.is-applied {
  border-color: rgba(36, 116, 76, 0.2);
  background: var(--ok-bg);
}

.image-edit-state-badge {
  border-radius: 999px;
  padding: 3px 7px;
  color: #8e2436;
  background: #fff0f3;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.image-edit-state-item.is-preview .image-edit-state-badge,
.image-edit-state-item.is-applied .image-edit-state-badge {
  color: #24744c;
  background: rgba(36, 116, 76, 0.1);
}

.image-edit-preview[hidden],
.image-edit-cancel[hidden] {
  display: none;
}

.image-edit-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.image-edit-status.is-error {
  color: var(--error);
}

.image-edit-reload {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.image-edit-reload[hidden] {
  display: none;
}

.image-edit-panel.is-loading {
  opacity: 0.78;
}

.media-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: #fff2f5;
}

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

.card-workspace {
  display: grid;
  gap: 14px;
}

.card-workspace[hidden] {
  display: none;
}

.card-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.card-toolbar h3 {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.card-template-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.card-template-button {
  display: grid;
  gap: 7px;
  min-height: 92px;
  border: 1px solid rgba(36, 31, 34, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 250, 0.76)),
    rgba(255, 255, 255, 0.74);
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.card-template-button:hover {
  border-color: rgba(255, 36, 66, 0.24);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(125, 48, 63, 0.08);
}

.card-template-button.is-active {
  border-color: rgba(255, 36, 66, 0.36);
  color: var(--brand-deep);
  background: #fff4f6;
  box-shadow:
    inset 0 0 0 2px rgba(255, 36, 66, 0.1),
    0 12px 24px rgba(255, 36, 66, 0.1);
}

.card-template-swatch {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 4px;
  height: 18px;
}

.card-template-swatch span {
  border: 1px solid rgba(36, 31, 34, 0.12);
  border-radius: 999px;
}

.card-template-name {
  color: currentColor;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.card-template-desc {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.card-preview-list,
.card-pair-list {
  display: grid;
  gap: 12px;
  align-items: start;
}

.card-preview-list:empty::before {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 36, 66, 0.2);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: var(--subtle);
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.065), rgba(255, 255, 255, 0.7)),
    var(--brand-tint);
  line-height: 1.75;
  content: "生成卡片后，这里会展示封面卡和内容卡 PNG。";
}

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

.card-pair-item {
  display: grid;
  grid-template-columns: minmax(154px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(234, 223, 227, 0.98);
  border-radius: var(--radius-sm);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 250, 0.82)),
    #ffffff;
  box-shadow: 0 14px 30px rgba(125, 48, 63, 0.085);
}

.card-pair-preview,
.card-pair-editor {
  min-width: 0;
}

.card-pair-preview {
  display: grid;
  align-content: start;
}

.card-pair-editor {
  display: grid;
  gap: 9px;
  align-content: start;
}

.card-pair-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-pair-actions .secondary-button {
  min-height: 34px;
  padding: 8px 11px;
  font-size: 12px;
}

.card-preview-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 0;
  overflow: hidden;
  background: #fff7f8;
  box-shadow: inset 0 0 0 1px rgba(36, 31, 34, 0.06);
  cursor: zoom-in;
}

.card-preview-scale {
  width: 900px;
  height: 1200px;
  transform-origin: left top;
  pointer-events: none;
}

.card-preview-frame:hover {
  box-shadow:
    inset 0 0 0 2px rgba(255, 36, 66, 0.24),
    0 14px 28px rgba(125, 48, 63, 0.14);
}

.card-preview-item .download-link {
  margin-top: 0;
  min-height: 34px;
  justify-content: center;
  font-size: 12px;
}

.card-editor-list {
  display: grid;
  gap: 9px;
}

.card-editor-list[hidden] {
  display: none;
}

.card-editor-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.card-editor-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.card-editor-text {
  min-height: 42px;
  border: 1px solid rgba(234, 223, 227, 0.96);
  border-radius: var(--radius-xs);
  padding: 10px 11px;
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
  white-space: pre-wrap;
}

.card-editor-text:focus {
  border-color: rgba(255, 36, 66, 0.46);
  box-shadow: var(--ring);
}

.card-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(24, 16, 20, 0.62);
  backdrop-filter: blur(10px);
}

.card-lightbox-overlay[hidden] {
  display: none;
}

.has-card-lightbox {
  overflow: hidden;
}

.card-lightbox-dialog {
  display: grid;
  width: min(760px, 100%);
  max-height: calc(100vh - 44px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-md);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 250, 0.95)),
    #ffffff;
  box-shadow: 0 28px 70px rgba(20, 10, 14, 0.32);
}

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

.card-lightbox-title-wrap {
  display: grid;
  gap: 4px;
}

.card-lightbox-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
}

.card-lightbox-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.card-lightbox-status {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.card-lightbox-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 999px;
  color: var(--text-strong);
  background: rgba(255, 241, 244, 0.9);
  font-size: 26px;
  line-height: 1;
}

.card-lightbox-stage {
  display: grid;
  min-height: 0;
  align-items: center;
  justify-items: center;
  gap: 10px;
  overflow: auto;
  border-radius: var(--radius-sm);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.08), rgba(255, 255, 255, 0.74)),
    #fff7f8;
}

.card-lightbox-image {
  display: block;
  width: min(100%, calc((100vh - 210px) * 0.75));
  max-width: 100%;
  max-height: min(100%, calc(100vh - 240px));
  min-height: 0;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(125, 48, 63, 0.18);
}

.card-lightbox-status.is-error {
  color: var(--error);
}

.card-lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.card-lightbox-download {
  flex: 0 0 auto;
  margin-left: auto;
}

.image-card {
  padding: 8px;
}

.image-card .task-status {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: var(--radius-xs);
  padding: 8px 9px;
  text-align: center;
}

.image-placeholder {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed rgba(255, 36, 66, 0.22);
  border-radius: var(--radius-xs);
  padding: 16px;
  color: var(--subtle);
  background: var(--brand-tint);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.image-heading {
  margin-bottom: -2px;
}

.append-image-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 12px;
}

.append-image-tools .input-hint {
  flex: 1 1 220px;
  margin: 0;
}

.append-image-tools .secondary-button {
  flex: 0 0 auto;
}

.append-image-tools[hidden] {
  display: none;
}

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

@keyframes loadingBar {
  0% {
    background-position: 180% 0, 0 0;
  }
  100% {
    background-position: -80% 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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

  .hero-card::after {
    display: none;
  }

  .hero-copy {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1160px);
    padding: 18px 0 32px;
  }

  .password-panel {
    grid-template-columns: 1fr;
    border-radius: var(--radius-sm);
    padding: 16px;
  }

  .step-nav {
    top: 8px;
    grid-template-columns: repeat(4, minmax(124px, 1fr));
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    padding: 6px;
  }

  .step-nav-item {
    min-width: 124px;
    min-height: 46px;
    gap: 7px;
    padding: 7px 8px;
  }

  .step-number {
    width: 26px;
    height: 26px;
  }

  .step-title {
    font-size: 13px;
  }

  .step-detail {
    font-size: 11px;
  }

  #topicStep,
  #copyStep,
  #imageStep,
  #publishPanel {
    scroll-margin-top: 86px;
  }

  .hero-card,
  .content-card {
    border-radius: var(--radius-md);
    padding: 16px;
  }

  .input-panel {
    padding: 14px;
  }

  .brand-lockup {
    margin-bottom: 14px;
  }

  h1 {
    max-width: none;
    font-size: 36px;
  }

  .action-row,
  .inline-actions,
  .heading-line,
  .compact-heading,
  .publish-panel-head,
  .title-card {
    align-items: stretch;
    flex-direction: column;
  }

  .title-card {
    display: flex;
  }

  .title-card.is-selected::after {
    top: 10px;
    right: 10px;
  }

  .title-actions,
  .inline-actions,
  .export-actions {
    justify-content: stretch;
  }

  .primary-button,
  .secondary-button,
  .title-action,
  .export-actions .primary-button,
  .export-actions .secondary-button {
    width: 100%;
  }

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

  .image-edit-overlay {
    padding: 0;
  }

  .image-edit-dialog {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    border-radius: 0;
  }

  .image-edit-dialog-head {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .image-edit-title-wrap {
    flex: 1 1 calc(100% - 48px);
  }

  .image-edit-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .image-edit-nav-button,
  .image-edit-batch-generate,
  .image-edit-batch-apply {
    flex: 1 1 0;
  }

  .image-edit-batch-hint {
    flex: 1 1 100%;
    order: 5;
  }

  .image-edit-dialog-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "prompt"
      "outpaint"
      "preview";
    padding: 12px;
  }

  .image-edit-stage {
    grid-template-rows: auto minmax(58vh, 1fr);
  }

  .image-edit-canvas {
    min-height: 58vh;
  }

  .image-edit-canvas-frame {
    width: min(100%, calc(58vh * var(--image-edit-frame-ratio, 1)));
    max-height: 58vh;
  }

  .history-controls {
    grid-template-columns: 1fr;
  }

  .tone-panel {
    grid-template-columns: 1fr;
  }

  .persona-settings {
    grid-template-columns: 1fr;
  }

  .library-panel-head,
  .persona-panel-head,
  .library-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .library-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .library-thumb {
    width: 48px;
    height: 48px;
  }

  .library-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .library-action-button {
    width: 100%;
  }

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

  .status-pill {
    width: 100%;
    justify-content: center;
  }

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

  .mode-switch,
  .card-template-picker,
  .card-preview-list {
    grid-template-columns: 1fr;
  }

  .card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .card-lightbox-overlay {
    padding: 12px;
  }

  .card-lightbox-dialog {
    max-height: calc(100vh - 24px);
    padding: 12px;
  }

  .card-lightbox-image {
    width: min(100%, calc((100vh - 230px) * 0.75));
    max-height: min(100%, calc(100vh - 230px));
  }
}

/* M39 landing page */
body.landing-page {
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 154, 125, 0.2), transparent 22rem),
    radial-gradient(circle at 12% 24%, rgba(255, 36, 66, 0.11), transparent 28rem),
    linear-gradient(180deg, #fffafb 0%, #ffffff 46%, #fff7f9 100%);
}

.landing-page::before {
  opacity: 0.62;
}

.landing-nav,
.landing-main,
.landing-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-nav {
  position: sticky;
  top: 12px;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  min-height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 46px rgba(125, 48, 63, 0.1);
  backdrop-filter: blur(18px);
}

.landing-brand,
.landing-links,
.landing-cta-row,
.landing-auth-links,
.landing-footer {
  display: flex;
  align-items: center;
}

.landing-brand {
  min-width: 0;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 900;
  text-decoration: none;
}

.landing-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.landing-brand-name,
.landing-brand-tagline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-brand-tagline {
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.landing-links {
  gap: 20px;
}

.landing-auth-links {
  gap: 10px;
}

.landing-links a,
.landing-footer a,
.landing-inline-link,
.landing-login-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.18s ease;
}

.landing-links a:hover,
.landing-footer a:hover,
.landing-inline-link:hover,
.landing-login-link:hover {
  color: var(--brand-deep);
}

.landing-nav-cta,
.landing-primary-cta,
.landing-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.landing-nav-cta,
.landing-primary-cta {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 16px 34px rgba(255, 36, 66, 0.22);
}

.landing-nav-cta:hover,
.landing-primary-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(255, 36, 66, 0.26);
}

.landing-nav-cta:active,
.landing-primary-cta:active,
.landing-secondary-cta:active {
  transform: translateY(1px);
}

.landing-main {
  padding: 26px 0 58px;
}

.auth-page {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  width: min(440px, calc(100% - 40px));
  min-height: 100vh;
  place-content: center;
  gap: 18px;
  margin: 0 auto;
  padding: 40px 0;
}

.auth-brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-self: start;
  color: var(--text-strong);
  font-weight: 900;
  text-decoration: none;
}

.auth-card {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 34px;
  line-height: 1.08;
}

.auth-subtitle,
.auth-switch {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 13px;
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.94);
}

.auth-form .primary-button {
  width: 100%;
  margin-top: 8px;
}

.auth-alert {
  margin: 0;
  border: 1px solid rgba(180, 35, 24, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--error);
  background: var(--error-bg);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.auth-switch a {
  color: var(--brand-deep);
  font-weight: 900;
  text-decoration: none;
}

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  min-height: calc(92dvh - 112px);
  padding: 24px 0 30px;
}

.landing-hero-copy {
  display: grid;
  gap: 22px;
  align-content: center;
}

.landing-eyebrow {
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(255, 36, 66, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.landing-hero h1,
.landing-section-heading h2,
.landing-demo-copy h2,
.landing-final-cta h2 {
  margin: 0;
  color: var(--text-strong);
  letter-spacing: 0;
}

.landing-hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 1.03;
  font-weight: 950;
}

.landing-subtitle {
  max-width: 27rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 700;
  line-height: 1.7;
}

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

.landing-secondary-cta {
  border: 1px solid rgba(255, 36, 66, 0.16);
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.74);
}

.landing-secondary-cta:hover {
  border-color: rgba(255, 36, 66, 0.32);
  background: var(--brand-soft);
}

.landing-trust-stack {
  display: grid;
  gap: 10px;
  max-width: 34rem;
}

.landing-privacy-note,
.landing-model-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(125, 48, 63, 0.07);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.landing-privacy-note span,
.landing-model-trust span {
  color: var(--muted);
  font-weight: 800;
}

.landing-model-trust {
  border-color: rgba(36, 116, 76, 0.14);
  background: rgba(248, 255, 251, 0.78);
}

.landing-model-trust strong {
  min-width: 0;
  color: var(--brand-deep);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.landing-product-visual {
  position: relative;
}

.landing-product-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 249, 0.88)),
    var(--panel-solid);
  box-shadow: 0 34px 86px rgba(125, 48, 63, 0.17);
}

.landing-window-bar {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 42px;
  border-bottom: 1px solid rgba(255, 36, 66, 0.08);
  padding: 0 18px;
}

.landing-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 36, 66, 0.3);
}

.landing-window-bar span:nth-child(2) {
  background: rgba(255, 159, 128, 0.42);
}

.landing-window-bar span:nth-child(3) {
  background: rgba(36, 116, 76, 0.28);
}

.landing-product-grid {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 14px;
  padding: 18px;
}

.landing-preview-panel,
.landing-preview-phone {
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(125, 48, 63, 0.08);
}

.landing-preview-panel {
  display: grid;
  gap: 10px;
  min-height: 138px;
  padding: 18px;
}

.landing-preview-panel strong,
.landing-preview-phone strong {
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.35;
}

.landing-preview-panel p,
.landing-preview-phone p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.landing-preview-label {
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
}

.landing-preview-panel.is-result {
  background: linear-gradient(135deg, #fff8fa, #ffffff);
}

.landing-preview-panel.is-export {
  grid-column: 1 / -1;
  min-height: 108px;
  background: linear-gradient(135deg, rgba(238, 250, 244, 0.9), rgba(255, 255, 255, 0.9));
}

.landing-preview-phone {
  grid-row: span 2;
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 16px;
  background: #241f22;
}

.landing-phone-cover {
  display: grid;
  gap: 8px;
  aspect-ratio: 3 / 4;
  align-content: end;
  border-radius: 16px;
  padding: 18px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(36, 31, 34, 0), rgba(36, 31, 34, 0.78)),
    radial-gradient(circle at 38% 22%, rgba(255, 219, 183, 0.88), transparent 28%),
    linear-gradient(135deg, #ffb199, #ff2442 58%, #8e2437);
}

.landing-phone-cover span {
  font-size: 13px;
  font-weight: 900;
}

.landing-phone-cover strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1.15;
}

.landing-preview-phone p {
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.landing-section {
  padding: 72px 0;
  scroll-margin-top: 104px;
}

.landing-section-heading {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin: 0 0 28px;
}

.landing-section-heading h2,
.landing-demo-copy h2,
.landing-final-cta h2 {
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
}

.landing-section-heading p,
.landing-demo-copy p,
.landing-final-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}

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

.landing-feature-card {
  display: grid;
  gap: 12px;
  min-height: 214px;
  align-content: start;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 38px rgba(125, 48, 63, 0.08);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
}

.landing-feature-card.feature-wide {
  min-height: 214px;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 36, 66, 0.15), transparent 13rem),
    linear-gradient(180deg, #ffffff, #fff5f7);
}

.landing-feature-card.feature-tint {
  background: linear-gradient(135deg, #fff4f1, #ffffff);
}

.landing-feature-card.feature-check {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(238, 250, 244, 0.9), rgba(255, 255, 255, 0.92));
}

.feature-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 18px;
  font-weight: 950;
}

.landing-feature-card h3,
.landing-step-list h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.3;
}

.landing-feature-card p,
.landing-step-list p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.landing-demo {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  padding-top: 28px;
  padding-bottom: 78px;
}

.landing-demo-copy,
.landing-demo-stage {
  border: 1px solid rgba(255, 36, 66, 0.11);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 48px rgba(125, 48, 63, 0.09);
}

.landing-demo-copy {
  display: grid;
  gap: 20px;
  align-content: center;
  padding: clamp(24px, 3.4vw, 38px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 249, 0.72)),
    rgba(255, 255, 255, 0.78);
}

.landing-demo-stage {
  overflow: hidden;
  padding: clamp(12px, 1.8vw, 18px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 243, 246, 0.78)),
    rgba(255, 255, 255, 0.8);
}

.landing-demo-browser {
  overflow: hidden;
  border: 1px solid rgba(36, 31, 34, 0.1);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(125, 48, 63, 0.12);
}

.landing-demo-browser-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid rgba(36, 31, 34, 0.08);
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff, #fff8fa);
}

.landing-demo-window-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.landing-demo-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.landing-demo-window-dots span:nth-child(2) {
  background: #ffbd2e;
}

.landing-demo-window-dots span:nth-child(3) {
  background: #28c840;
}

.landing-demo-address {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(36, 31, 34, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(36, 31, 34, 0.58);
  background: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-demo-screen {
  overflow: hidden;
  height: clamp(320px, 40vw, 510px);
  background: #fff7f9;
}

.landing-demo-screen img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: top center;
}

.landing-demo-poster {
  position: relative;
  display: grid;
  min-height: clamp(390px, 44vw, 540px);
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.82), rgba(255, 153, 117, 0.72)),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.9), transparent 12rem),
    radial-gradient(circle at 78% 72%, rgba(36, 31, 34, 0.22), transparent 18rem);
}

.landing-demo-poster::before {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.17) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 58px 58px;
  content: "";
}

.landing-play-button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 56px rgba(125, 48, 63, 0.22);
  cursor: default;
}

.landing-demo-play {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.landing-demo-duration {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(36, 31, 34, 0.2);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.landing-play-button span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid var(--brand-deep);
}

.landing-demo-track {
  position: absolute;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  left: clamp(18px, 3vw, 34px);
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.landing-demo-track span {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(36, 31, 34, 0.2);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

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

.landing-step-list article {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 36, 66, 0.1);
  border-top: 3px solid rgba(255, 36, 66, 0.3);
  border-radius: 20px;
  padding: 22px 20px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 250, 0.7)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(125, 48, 63, 0.07);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-step-list span {
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 950;
}

.landing-final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-top: 42px;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 28px;
  padding: clamp(26px, 5vw, 54px);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 36, 66, 0.16), transparent 18rem),
    linear-gradient(135deg, #ffffff, #fff3f6);
  box-shadow: 0 24px 64px rgba(125, 48, 63, 0.12);
}

.landing-final-cta div {
  display: grid;
  gap: 14px;
}

.landing-final-cta h2 {
  font-size: clamp(54px, 9vw, 112px);
  line-height: 0.96;
}

.landing-footer {
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 36, 66, 0.12);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.landing-footer-tagline {
  color: var(--brand-deep);
  font-weight: 950;
}

.landing-hero-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.78fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  min-height: 560px;
  padding: clamp(16px, 2.5vw, 26px);
}

.landing-hero-showcase::before {
  position: absolute;
  inset: 18px auto auto 46%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 36, 66, 0.28), transparent);
  content: "";
}

.landing-hero-showcase-phone {
  position: relative;
  overflow: hidden;
  border: 10px solid #231f22;
  border-radius: 34px;
  background: #231f22;
  box-shadow:
    0 34px 72px rgba(36, 31, 34, 0.18),
    0 18px 36px rgba(255, 36, 66, 0.14);
  transform: rotate(-2.6deg);
}

.landing-hero-showcase-phone img,
.landing-mini-cover-row img,
.showcase-cover img,
.after-note img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-hero-showcase-phone img {
  aspect-ratio: 3 / 4;
  border-radius: 23px;
}

.landing-cover-caption,
.showcase-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 7px;
  padding: 38px 18px 18px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(20, 15, 18, 0.78));
}

.landing-cover-caption span,
.showcase-overlay span {
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.landing-cover-caption strong,
.showcase-overlay strong {
  max-width: 11em;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 950;
  line-height: 1.08;
}

.landing-hero-showcase-copy {
  display: grid;
  gap: 18px;
  align-content: center;
}

.landing-hero-showcase-copy h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 950;
  line-height: 1.08;
  text-wrap: balance;
}

.landing-hero-showcase-copy p {
  max-width: 25rem;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.landing-mini-cover-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 310px;
}

.landing-mini-cover-row img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 16px;
  background: var(--brand-soft);
  box-shadow: 0 16px 30px rgba(125, 48, 63, 0.1);
}

.landing-proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-proof-list span {
  min-height: 34px;
  border: 1px solid rgba(255, 36, 66, 0.13);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.9);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

.landing-before-after {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(18px, 4vw, 46px);
  align-items: center;
}

.before-after-copy {
  display: grid;
  gap: 14px;
}

.before-after-copy h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 950;
  line-height: 1.04;
  text-wrap: balance;
}

.before-after-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.7;
}

.before-after-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) auto minmax(0, 1.06fr);
  gap: 14px;
  align-items: stretch;
}

.before-card,
.after-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 36, 66, 0.11);
  border-radius: 24px;
  padding: clamp(20px, 2.5vw, 28px);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(125, 48, 63, 0.08);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.before-card {
  align-content: space-between;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 249, 0.74)),
    rgba(255, 255, 255, 0.78);
}

.after-card {
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 36, 66, 0.12), transparent 13rem),
    rgba(255, 255, 255, 0.82);
}

.landing-before-after:hover .after-card {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(125, 48, 63, 0.12);
}

.before-after-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(255, 36, 66, 0.16);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 16px 32px rgba(255, 36, 66, 0.2);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.before-card span,
.after-card > span,
.showcase-sample-card span {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 950;
}

.before-card h3,
.after-note h3,
.showcase-sample-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.18;
}

.before-card h3 {
  font-size: clamp(20px, 2vw, 26px);
}

.before-card p,
.after-note p,
.showcase-sample-card p,
.showcase-sample-card li {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.after-note {
  display: grid;
  gap: 12px;
}

.before-card img,
.after-note img {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(36, 31, 34, 0.14);
}

.before-card img {
  width: min(132px, 58%);
  height: auto;
  object-fit: cover;
  justify-self: end;
}

.after-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #241f22;
  box-shadow: 0 18px 42px rgba(36, 31, 34, 0.16);
}

.after-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: none;
}

.after-cover::after {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(180deg, transparent, rgba(20, 15, 18, 0.84));
  content: "";
}

.after-cover h3 {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1;
  color: #ffffff;
  font-size: clamp(25px, 2.7vw, 34px);
  line-height: 1.08;
}

.after-note p {
  border-left: 3px solid rgba(255, 36, 66, 0.32);
  padding-left: 12px;
}

.after-note div {
  display: grid;
  gap: 10px;
}

.landing-showcase .landing-section-heading {
  margin-bottom: 34px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 112px;
  gap: 14px;
  align-items: stretch;
}

.showcase-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 36, 66, 0.11);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(125, 48, 63, 0.09);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.32s ease;
}

.showcase-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 36, 66, 0.25);
  box-shadow: 0 26px 62px rgba(125, 48, 63, 0.13);
}

.showcase-cover {
  grid-row: span 3;
  background: var(--brand-soft);
}

.showcase-cover.is-tall {
  grid-row: span 4;
}

.showcase-cover.is-offset {
  grid-row: span 3;
  margin-top: 24px;
}

.showcase-sample-card {
  display: grid;
  grid-row: span 2;
  gap: 14px;
  align-content: end;
  padding: 22px;
}

.showcase-sample-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.showcase-sample-card.sample-red {
  color: var(--text-strong);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.52), transparent 10rem),
    linear-gradient(135deg, rgba(255, 36, 66, 0.18), rgba(255, 247, 249, 0.9));
}

.showcase-sample-card.sample-dark {
  grid-column: span 2;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 36, 66, 0.42), transparent 12rem),
    linear-gradient(135deg, #2d272a, #151113);
}

.showcase-sample-card.sample-dark span,
.showcase-sample-card.sample-dark h3,
.showcase-sample-card.sample-dark p {
  color: #ffffff;
}

.landing-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1), transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .landing-brand .brand-logo-mark-top {
    animation: logo-mark-top-settle 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
  }

  .landing-brand .brand-logo-mark-bottom {
    animation: logo-mark-bottom-settle 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
  }

  .landing-product-card,
  .landing-demo-poster,
  .before-card,
  .after-card,
  .showcase-item,
  .landing-primary-cta,
  .landing-secondary-cta,
  .landing-nav-cta {
    will-change: transform;
  }

  .landing-feature-card:hover,
  .landing-step-list article:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(125, 48, 63, 0.1);
  }
}

@keyframes logo-mark-top-settle {
  from {
    transform: translateY(-2px);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes logo-mark-bottom-settle {
  from {
    transform: translateY(2px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .landing-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .landing-nav-cta,
  .landing-primary-cta,
  .landing-secondary-cta,
  .landing-feature-card,
  .landing-step-list article,
  .showcase-item,
  .before-card,
  .after-card {
    transition: none;
  }
}

@media (max-width: 940px) {
  .landing-nav {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .landing-links {
    display: none;
  }

  .landing-hero,
  .landing-demo,
  .landing-final-cta {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 42px;
  }

  .landing-product-grid,
  .landing-feature-grid,
  .landing-step-list {
    grid-template-columns: 1fr;
  }

  .landing-feature-card.feature-wide,
  .landing-feature-card.feature-check {
    grid-column: auto;
    grid-row: auto;
    min-height: 214px;
  }

  .landing-hero-showcase,
  .landing-before-after,
  .before-after-grid {
    grid-template-columns: 1fr;
  }

  .before-after-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .landing-hero-showcase {
    min-height: auto;
  }

  .landing-hero-showcase-phone {
    width: min(330px, 100%);
    justify-self: center;
  }

  .landing-hero-showcase-copy {
    justify-items: start;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 104px;
  }

  .showcase-sample-card.sample-dark {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .landing-nav,
  .landing-main,
  .landing-footer {
    width: min(100% - 24px, 1180px);
  }

  .landing-nav {
    top: 8px;
    min-height: 60px;
    gap: 10px;
    border-radius: 18px;
    padding: 8px 8px 8px 12px;
  }

  .landing-brand-name {
    max-width: 9.5rem;
  }

  .landing-brand-tagline {
    max-width: 9.5rem;
  }

  .landing-auth-links {
    gap: 8px;
  }

  .landing-login-link {
    font-size: 13px;
  }

  .landing-nav-cta {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .landing-main {
    padding-top: 20px;
  }

  .landing-hero {
    gap: 28px;
    padding: 24px 0 44px;
  }

  .landing-hero-copy {
    gap: 18px;
  }

  .landing-hero h1 {
    font-size: clamp(38px, 13vw, 52px);
    line-height: 1.08;
  }

  .landing-subtitle {
    font-size: 16px;
  }

  .landing-primary-cta,
  .landing-secondary-cta {
    width: 100%;
  }

  .landing-privacy-note,
  .landing-model-trust {
    width: 100%;
    border-radius: 16px;
  }

  .landing-product-card,
  .landing-demo-copy,
  .landing-demo-stage,
  .landing-final-cta {
    border-radius: 20px;
  }

  .landing-preview-phone {
    grid-row: auto;
  }

  .landing-preview-panel.is-export {
    grid-column: auto;
  }

  .landing-section {
    padding: 46px 0;
  }

  .landing-demo-track {
    grid-template-columns: 1fr 1fr;
  }

  .landing-demo-screen {
    height: clamp(280px, 74vw, 420px);
  }

  .landing-demo-poster {
    min-height: 300px;
  }

  .landing-hero-showcase {
    gap: 18px;
    padding: 14px;
  }

  .landing-hero-showcase-phone {
    border-width: 8px;
    border-radius: 28px;
    transform: rotate(-1.2deg);
  }

  .landing-cover-caption strong,
  .showcase-overlay strong {
    font-size: 22px;
  }

  .landing-mini-cover-row {
    max-width: 100%;
  }

  .before-card,
  .after-card,
  .showcase-item {
    border-radius: 20px;
  }

  .before-card img {
    width: min(150px, 52%);
  }

  .after-note {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .showcase-cover,
  .showcase-cover.is-tall,
  .showcase-cover.is-offset,
  .showcase-sample-card {
    grid-row: auto;
    min-height: auto;
    margin-top: 0;
  }

  .showcase-cover img {
    aspect-ratio: 3 / 4;
    height: auto;
  }

  .showcase-sample-card {
    min-height: 260px;
  }

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

/* M46 docs page */
body.docs-page {
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 10%, rgba(255, 154, 125, 0.17), transparent 21rem),
    radial-gradient(circle at 12% 16%, rgba(255, 36, 66, 0.09), transparent 27rem),
    linear-gradient(180deg, #fffafb 0%, #ffffff 52%, #fff7f9 100%);
}

.docs-page::before {
  opacity: 0.54;
}

.docs-nav,
.docs-main,
.docs-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.docs-nav {
  position: sticky;
  top: 12px;
  z-index: 9;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 46px rgba(125, 48, 63, 0.1);
  backdrop-filter: blur(18px);
}

.docs-nav-links,
.docs-hero-actions,
.docs-footer {
  display: flex;
  align-items: center;
}

.docs-nav-links {
  gap: 10px;
}

.docs-nav-links a,
.docs-footer a,
.auth-docs-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.docs-nav-links a:hover,
.docs-footer a:hover,
.auth-docs-link:hover {
  color: var(--brand-deep);
}

.docs-nav-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 17px;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 14px 28px rgba(255, 36, 66, 0.2);
}

.docs-nav-cta:hover {
  transform: translateY(-1px);
}

.docs-main {
  scroll-margin-top: 140px;
  padding: 96px 0 74px;
}

.docs-hero {
  display: grid;
  max-width: 780px;
  gap: 20px;
  padding: 12px 0 64px;
}

.docs-hero h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(48px, 8vw, 86px);
  font-weight: 950;
  line-height: 0.98;
  text-wrap: balance;
}

.docs-hero p:not(.landing-eyebrow) {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 800;
  line-height: 1.75;
}

.docs-hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
  min-width: 0;
}

.docs-toc {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 6px;
  border-left: 1px solid rgba(255, 36, 66, 0.14);
  padding-left: 18px;
}

.docs-toc span {
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 950;
}

.docs-toc a {
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.docs-toc a:hover {
  transform: translateX(2px);
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.84);
}

.docs-step-list {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.docs-step {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 28px);
  min-width: 0;
  scroll-margin-top: 148px;
}

.docs-step-marker {
  display: grid;
  align-self: start;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-top: 34px;
  border: 1px solid rgba(255, 36, 66, 0.16);
  border-radius: 50%;
  color: var(--brand-deep);
  background: #fff0f3;
  box-shadow: 0 12px 26px rgba(255, 36, 66, 0.12);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.docs-step-body {
  display: grid;
  min-width: 0;
  gap: 18px;
  border-top: 1px solid rgba(255, 36, 66, 0.12);
  padding: 34px 0 54px;
}

.docs-kicker {
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.82);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.docs-step h2 {
  max-width: 13em;
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 950;
  line-height: 1.08;
  text-wrap: balance;
}

.docs-step-body > p:not(.docs-kicker) {
  max-width: 46rem;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.85;
}

.docs-step strong,
.docs-step b {
  color: var(--text-strong);
  font-weight: 950;
}

.docs-tip-box {
  display: grid;
  width: 100%;
  max-width: 680px;
  min-width: 0;
  gap: 10px;
  border: 1px solid rgba(255, 36, 66, 0.13);
  border-radius: 18px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(255, 36, 66, 0.07), rgba(255, 255, 255, 0.78)),
    rgba(255, 248, 250, 0.86);
  box-shadow: 0 12px 30px rgba(125, 48, 63, 0.07);
}

.docs-tip-box-strong {
  border-color: rgba(36, 116, 76, 0.15);
  background:
    linear-gradient(135deg, rgba(36, 116, 76, 0.08), rgba(255, 255, 255, 0.8)),
    var(--ok-bg);
}

.docs-tip-box > strong {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
}

.docs-tip-box-strong > strong {
  color: var(--ok);
}

.docs-tip-box ul {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-tip-box li {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  white-space: normal;
  word-break: normal;
}

.docs-tip-box li span {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.docs-tip-box-strong li span {
  background: var(--ok);
}

.docs-visual {
  overflow: hidden;
  width: min(100%, 720px);
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 36, 66, 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(125, 48, 63, 0.08);
}

.docs-screenshot-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.docs-screenshot-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  border: 1px solid rgba(36, 31, 34, 0.08);
  border-radius: 16px;
  background: #fff8fa;
  object-fit: contain;
  object-position: top center;
}

.docs-screenshot-card figcaption {
  margin: 0;
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.65;
}

.docs-screenshot-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.docs-screenshot-pair figcaption {
  grid-column: 1 / -1;
}

.docs-ui-visual,
.docs-edit-visual,
.docs-export-visual {
  display: grid;
  min-height: 220px;
  align-content: center;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(255, 36, 66, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 36, 66, 0.035) 1px, transparent 1px),
    #fffdfe;
  background-size: 28px 28px;
}

.docs-ui-visual > span,
.docs-edit-visual > span,
.docs-export-visual > span {
  width: fit-content;
  border: 1px dashed rgba(255, 36, 66, 0.24);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.82);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.docs-ui-visual div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.docs-ui-visual i {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 16px;
  color: var(--brand-deep);
  background: rgba(255, 241, 244, 0.9);
  font-style: normal;
  font-weight: 950;
}

.docs-ui-visual.is-tone p,
.docs-edit-visual p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.6;
}

.docs-showcase {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 16px;
}

.docs-showcase img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(36, 31, 34, 0.12);
}

.docs-showcase figcaption,
.docs-card-visual figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.65;
}

.docs-showcase-row {
  grid-template-columns: repeat(2, minmax(130px, 210px)) minmax(0, 1fr);
}

.docs-edit-visual {
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1fr);
  align-items: center;
}

.docs-edit-visual > span {
  grid-column: 1 / -1;
}

.docs-canvas-mock {
  min-height: 180px;
  border: 2px dashed rgba(255, 36, 66, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 54% 48%, rgba(255, 36, 66, 0.18), transparent 3.6rem),
    linear-gradient(135deg, rgba(255, 241, 244, 0.9), rgba(255, 255, 255, 0.92));
}

.docs-card-visual {
  display: grid;
  grid-template-columns: minmax(190px, 310px) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 16px;
}

.docs-card-visual div {
  display: grid;
  min-height: 300px;
  align-content: end;
  gap: 14px;
  border-radius: 18px;
  padding: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 36, 66, 0.46), transparent 11rem),
    linear-gradient(135deg, #2d272a, #151113);
}

.docs-card-visual span,
.docs-card-visual h3,
.docs-card-visual p {
  margin: 0;
  color: #ffffff;
}

.docs-card-visual span {
  font-size: 13px;
  font-weight: 950;
}

.docs-card-visual h3 {
  font-size: 28px;
  font-weight: 950;
  line-height: 1.12;
}

.docs-card-visual p {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

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

.docs-export-visual span {
  grid-column: 1 / -1;
}

.docs-export-visual b {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px solid rgba(36, 116, 76, 0.12);
  border-radius: 16px;
  color: var(--ok);
  background: var(--ok-bg);
  font-size: 14px;
  line-height: 1.35;
}

.docs-footer {
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 36, 66, 0.12);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.auth-topline {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.auth-docs-link {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 36, 66, 0.12);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 241, 244, 0.78);
}

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

  .docs-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid rgba(255, 36, 66, 0.12);
    border-bottom: 1px solid rgba(255, 36, 66, 0.12);
    padding: 14px 0;
  }

  .docs-toc span {
    grid-column: 1 / -1;
  }

  .docs-step-marker {
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  .docs-nav,
  .docs-main,
  .docs-footer {
    width: min(100% - 24px, 1120px);
  }

  .docs-nav {
    top: 8px;
    min-height: 60px;
    border-radius: 18px;
    padding: 8px 8px 8px 12px;
  }

  .docs-nav .landing-brand span {
    max-width: 8.8rem;
  }

  .docs-nav-links a:first-child {
    display: none;
  }

  .docs-nav-cta {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .docs-main {
    scroll-margin-top: 116px;
    padding: 62px 0 56px;
  }

  .docs-hero {
    padding-bottom: 42px;
  }

  .docs-hero h1 {
    font-size: clamp(42px, 15vw, 60px);
  }

  .docs-hero-actions .landing-primary-cta,
  .docs-hero-actions .landing-secondary-cta {
    width: 100%;
  }

  .docs-toc {
    grid-template-columns: 1fr;
  }

  .docs-step {
    grid-template-columns: 1fr;
    gap: 10px;
    scroll-margin-top: 126px;
  }

  .docs-step-body {
    padding: 24px 0 42px;
  }

  .docs-step h2 {
    font-size: clamp(27px, 9vw, 38px);
  }

  .docs-tip-box {
    border-radius: 16px;
    padding: 14px;
  }

  .docs-ui-visual,
  .docs-edit-visual,
  .docs-export-visual,
  .docs-showcase,
  .docs-showcase-row,
  .docs-card-visual,
  .docs-screenshot-pair {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .docs-ui-visual div,
  .docs-export-visual {
    grid-template-columns: 1fr 1fr;
  }

  .docs-showcase img {
    max-width: 230px;
    max-height: 360px;
  }

  .docs-showcase-row img,
  .docs-card-visual div {
    max-width: 260px;
  }

  .docs-screenshot-card {
    padding: 9px;
  }

  .docs-footer,
  .auth-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
