:root {
  --ink: #17211f;
  --muted: #687471;
  --line: #dfe7e1;
  --paper: #fafcf9;
  --soft: #eef5f1;
  --mint: #2f8c73;
  --coral: #d9614b;
  --gold: #b88938;
  --blue: #3976b9;
  --shadow: 0 16px 38px rgba(24, 33, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial,
    sans-serif;
}

body.theme-id {
  --mint: #2f73bd;
  --coral: #c45748;
  --paper: #f8fafc;
}

body.theme-social {
  --mint: #b96f83;
  --coral: #dc7862;
  --paper: #fffafa;
  --soft: #fbefef;
}

body.theme-tech {
  --ink: #101720;
  --mint: #276bd8;
  --coral: #40b7a7;
  --paper: #f6f9fc;
}

body.theme-studio {
  --ink: #17211f;
  --mint: #2f8c73;
  --coral: #d9614b;
  --paper: #f7faf8;
}

body.theme-oriental,
body.theme-oriental-soft,
body.theme-oriental-ink {
  --ink: #16251f;
  --muted: #6e746c;
  --line: #ded7c7;
  --paper: #f7f2e8;
  --soft: #efe7d8;
  --mint: #21483c;
  --coral: #b24a37;
  --gold: #9b6a22;
  --blue: #315f86;
  --shadow: 0 18px 42px rgba(36, 31, 21, 0.12);
}

body.theme-oriental-soft {
  --mint: #5d6f58;
  --coral: #b95d4c;
  --paper: #fbf4ec;
}

body.theme-oriental-ink {
  --mint: #17251f;
  --coral: #9f3f32;
  --paper: #f4efe3;
}

button,
input {
  font: inherit;
}

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

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 88px;
  background:
    linear-gradient(180deg, rgba(247, 242, 232, 0.94), rgba(247, 242, 232, 0)),
    var(--paper);
}

.hero {
  position: relative;
  min-height: min(82vh, 720px);
  display: grid;
  align-content: end;
  padding: 18px 18px 26px;
  overflow: hidden;
  background: #111816;
}

.hero-v2 {
  min-height: auto;
  align-content: start;
  gap: 16px;
  padding: 18px 18px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 8%, rgba(155, 106, 34, 0.24), transparent 28%),
    linear-gradient(145deg, #13231d 0%, #20392f 52%, #f7f2e8 52%, #f7f2e8 100%);
}

.studio-console {
  min-height: auto;
  align-content: start;
  gap: 14px;
  padding: 18px 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 10%, rgba(178, 74, 55, 0.18), transparent 26%),
    linear-gradient(160deg, #12211c 0%, #203a31 48%, #f7f2e8 48%, #f7f2e8 100%);
}

.console-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.console-head h1 {
  font-size: 31px;
  line-height: 1.1;
}

.console-head .primary-action {
  width: 100%;
}

.console-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
}

.console-panel {
  padding: 12px;
  border: 1px solid rgba(155, 106, 34, 0.18);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.92);
  box-shadow: 0 14px 30px rgba(36, 31, 21, 0.1);
}

.panel-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.photo-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.photo-slots span,
.music-row button,
.persona-card {
  border-radius: 8px;
}

.photo-slots span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: #fff;
}

.upload-console p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 12px;
}

.preview-console {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
}

.preview-phone {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(155, 106, 34, 0.2);
  border-radius: 10px;
  background: #12211c;
}

.preview-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.preview-phone span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: rgba(18, 33, 28, 0.78);
}

.preview-meta span,
.preview-meta strong {
  display: block;
}

.preview-meta span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.preview-meta strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.topbar strong {
  font-size: 18px;
}

.topbar span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.topbar strong::after {
  content: "· 东方影像";
  margin-left: 6px;
  color: rgba(239, 231, 216, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.hero-v2-copy {
  position: relative;
  z-index: 2;
  max-width: 318px;
  padding-top: 10px;
}

.hero-v2-copy h1 {
  margin: 0 0 12px;
  font-size: 35px;
  line-height: 1.08;
}

.hero-v2-copy p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  line-height: 1.65;
}

.hero-showcase {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 12px;
  align-items: end;
  margin-top: 0;
}

.main-sample,
.mini-sample {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(155, 106, 34, 0.28);
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: 0 20px 45px rgba(36, 31, 21, 0.22);
}

.main-sample::before,
.mini-sample::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.main-sample {
  aspect-ratio: 4 / 5;
}

.mini-sample {
  aspect-ratio: 3 / 4.2;
}

.main-sample img,
.mini-sample img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.main-sample::after,
.mini-sample::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(10, 16, 15, 0.78));
}

.main-sample div,
.mini-sample span {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #fff;
}

.main-sample span,
.main-sample strong {
  display: block;
}

.main-sample span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.main-sample strong {
  margin-top: 4px;
  font-size: 15px;
}

.mini-sample span {
  font-size: 12px;
  font-weight: 900;
}

.hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: var(--ink);
}

.hero-metrics div {
  min-height: 62px;
  padding: 10px 8px;
  border: 1px solid rgba(155, 106, 34, 0.18);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.82);
  box-shadow: 0 10px 28px rgba(36, 31, 21, 0.08);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: 18px;
}

.hero-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.9;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 20, 18, 0.04),
    rgba(12, 20, 18, 0.16) 42%,
    rgba(12, 20, 18, 0.68)
  );
}

.hero-card {
  position: absolute;
  right: 18px;
  top: 42px;
  z-index: 1;
  width: 164px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  color: #fff;
  background: rgba(20, 28, 26, 0.36);
  backdrop-filter: blur(14px);
}

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

.hero-card span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.hero-card strong {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
}

.hero-copy {
  position: relative;
  z-index: 1;
  color: #fff;
  padding-bottom: 22px;
}

.hero-proof {
  position: absolute;
  right: 0;
  bottom: 18px;
  width: 132px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: #111816;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.hero-proof img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-proof span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: rgba(23, 33, 31, 0.72);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #ffd5c9;
}

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

h1 {
  margin-bottom: 10px;
  font-size: 50px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 258px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.6;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.trust-row span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 24, 22, 0.28);
  backdrop-filter: blur(12px);
}

.primary-action,
.generate-btn,
.outline-btn,
.segment {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 164px;
  margin-top: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(135deg, #b24a37, #8f3328);
  box-shadow: 0 14px 28px rgba(178, 74, 55, 0.24);
}

.workflow,
.scene-board,
.style-board,
.templates,
.backgrounds,
.result-panel,
.library,
.profile {
  padding: 24px 18px 8px;
}

.scene-grid {
  display: grid;
  gap: 10px;
}

.scene-card {
  min-height: 84px;
  padding: 16px;
  border: 1px solid rgba(155, 106, 34, 0.2);
  border-radius: 10px;
  text-align: left;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(239, 231, 216, 0.72));
  box-shadow: 0 12px 28px rgba(36, 31, 21, 0.08);
}

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

.scene-card strong {
  font-size: 18px;
}

.scene-card span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.scene-card.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(33, 72, 60, 0.98), rgba(19, 35, 29, 0.98));
  box-shadow: 0 18px 34px rgba(33, 72, 60, 0.2);
}

.scene-card.active span {
  color: rgba(255, 255, 255, 0.72);
}

.persona-board {
  padding: 24px 18px 8px;
}

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

.persona-card {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
  background: linear-gradient(135deg, #fff, #f4efe3);
  box-shadow: 0 10px 24px rgba(24, 33, 31, 0.06);
}

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

.persona-card strong {
  font-size: 16px;
}

.persona-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.persona-card.active {
  border-color: rgba(47, 140, 115, 0.32);
  background: linear-gradient(135deg, #21483c, #163028);
  color: #fff;
}

.persona-card.active span {
  color: rgba(255, 255, 255, 0.75);
}

.style-board {
  margin-top: 0;
  padding-top: 26px;
}

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

.style-card {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 252px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  background: #17211f;
  box-shadow: 0 10px 28px rgba(24, 33, 31, 0.1);
}

.style-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.style-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 16, 15, 0.02),
    rgba(10, 16, 15, 0.05) 44%,
    rgba(10, 16, 15, 0.82)
  );
}

.style-card strong,
.style-card span {
  position: relative;
  z-index: 1;
  display: block;
}

.style-card strong {
  margin-top: calc(100% + 28px);
  font-size: 15px;
}

.style-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.style-card.active {
  border-color: var(--coral);
  box-shadow:
    0 0 0 3px rgba(178, 74, 55, 0.18),
    0 14px 30px rgba(36, 31, 21, 0.12);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading .eyebrow {
  margin-bottom: 2px;
  min-width: 34px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: 0 10px 26px rgba(24, 33, 31, 0.06);
}

.segment {
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.segment.active {
  color: #fff;
  background: var(--mint);
}

.upload-panel,
.result-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: var(--shadow);
}

.upload-drop {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  background: var(--mint);
}

.upload-icon::before {
  content: "";
  width: 25px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 6px;
}

.upload-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.upload-drop strong {
  font-size: 18px;
}

.upload-drop small {
  display: block;
  max-width: 280px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.quality-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
}

.quality-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.35;
}

.dot,
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot.ok {
  background: var(--mint);
}

.dot.wait,
.status-dot {
  background: var(--gold);
}

.preview-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76px;
  gap: 8px;
  min-height: 0;
  margin-top: 12px;
  overflow-x: auto;
}

.preview-strip img {
  width: 76px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(24, 33, 31, 0.14);
}

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

.template-card {
  min-height: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #fff;
  text-align: left;
  background: #1f2d2a;
  background-position: center top;
  background-size: cover;
  overflow: hidden;
  position: relative;
}

.template-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 23, 21, 0.02),
    rgba(14, 23, 21, 0.12) 45%,
    rgba(14, 23, 21, 0.82)
  );
}

.template-card > * {
  position: relative;
  z-index: 1;
}

.template-card em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  background: rgba(33, 72, 60, 0.78);
}

.template-card strong {
  display: block;
  margin-top: 100px;
  font-size: 16px;
}

.template-card span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.template-card.active {
  border-color: var(--coral);
  box-shadow:
    0 0 0 3px rgba(178, 74, 55, 0.18),
    0 14px 30px rgba(36, 31, 21, 0.12);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.swatch {
  display: grid;
  align-items: end;
  justify-items: start;
  min-height: 72px;
  padding: 8px;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(24, 33, 31, 0.1);
}

.swatch span {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: rgba(23, 33, 31, 0.58);
}

.swatch.active {
  outline: 3px solid rgba(23, 33, 31, 0.9);
  outline-offset: 1px;
}

.result-card {
  padding: 12px;
}

.result-preview {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: #101816;
}

.result-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
}

.result-preview span {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(24, 33, 31, 0.72);
}

.result-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.result-specs div {
  min-height: 58px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.result-specs span,
.result-specs strong {
  display: block;
}

.result-specs span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.result-specs strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.task-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
}

.step-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.step-strip span {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  background: #fffaf1;
}

.output-options {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.output-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  background: #fffdf8;
}

.output-options input {
  accent-color: var(--mint);
}

.music-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0 10px;
}

.music-row button {
  min-height: 40px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.music-row button.active {
  color: #fff;
  border-color: transparent;
  background: var(--mint);
}

.status-dot {
  animation: pulse 1.6s infinite;
}

.generate-btn {
  width: 100%;
  color: #fff;
  font-weight: 900;
  background: var(--mint);
  box-shadow: 0 12px 24px rgba(47, 140, 115, 0.22);
}

.generate-btn:disabled {
  cursor: progress;
  opacity: 0.8;
}

.purchase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.outline-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.outline-btn:first-child {
  border-color: rgba(47, 140, 115, 0.28);
  color: var(--mint);
  background: #f4fbf8;
}

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

.library-list article {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.library-list img {
  width: 68px;
  height: 84px;
  object-fit: contain;
  border-radius: 8px;
}

.library-list strong,
.library-list span {
  display: block;
}

.library-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.profile-grid div {
  min-height: 86px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: #fff;
}

.profile-grid strong,
.profile-grid span {
  display: block;
}

.profile-grid strong {
  font-size: 22px;
}

.profile-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 480px);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-bar a {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
}

.bottom-bar a.active {
  color: #fff;
  background: var(--mint);
}

@media (max-width: 360px) {
  h1 {
    font-size: 44px;
  }

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

  .purchase-row {
    grid-template-columns: 1fr;
  }

  .hero-proof {
    width: 112px;
  }

  .hero-copy p:not(.eyebrow) {
    max-width: 226px;
  }

  .hero-v2-copy h1 {
    font-size: 34px;
  }

  .console-head h1 {
    font-size: 28px;
  }

  .compact-scenes,
  .persona-grid {
    grid-template-columns: 1fr;
  }

  .photo-slots,
  .music-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-console {
    grid-template-columns: 1fr;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (min-width: 800px) {
  body {
    background: #e7eee9;
  }

  .app-shell {
    box-shadow: 0 0 0 1px rgba(24, 33, 31, 0.08);
  }
}

/* Template cards keep the sample subordinate to the actual template choice. */
.template-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  background: #fffaf1;
  box-shadow: 0 10px 24px rgba(36, 31, 21, 0.07);
  overflow: hidden;
  position: relative;
}

.template-card::before {
  display: none;
}

.template-card > * {
  position: static;
  z-index: auto;
}

.template-thumb {
  display: block;
  width: 86px;
  height: 110px;
  overflow: hidden;
  border-radius: 7px;
  background: #e6ece6;
}

.template-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
}

.template-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.template-card em {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--mint);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  background: var(--soft);
}

.template-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.template-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.template-card small {
  display: block;
  margin-top: 8px;
  color: #8b9188;
  font-size: 11px;
  line-height: 1.3;
}

.template-check {
  position: absolute !important;
  top: 10px;
  right: 10px;
  display: grid !important;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0 !important;
  border-radius: 50%;
  color: transparent !important;
  font-size: 12px !important;
  background: #e8eee8;
}

.template-card.active {
  border-color: var(--coral);
  box-shadow:
    0 0 0 3px rgba(178, 74, 55, 0.14),
    0 14px 30px rgba(36, 31, 21, 0.1);
}

.template-card.active .template-check {
  color: #fff !important;
  background: var(--coral);
}

@media (max-width: 360px) {
  .template-card {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 118px;
    gap: 10px;
  }

  .template-thumb {
    width: 72px;
    height: 96px;
  }

  .template-card strong {
    margin-top: 7px;
    font-size: 14px;
  }
}

/* c-12 polish: simpler mobile studio flow */
:root {
  --radius-sm: 8px;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink-soft: #26342f;
}

body {
  background:
    linear-gradient(180deg, #f7f2e8 0%, #fbfaf6 42%, #eef5f1 100%);
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

.app-shell {
  max-width: 480px;
  overflow-x: hidden;
  background: transparent;
}

.studio-console {
  padding: 16px 16px 18px;
  background:
    linear-gradient(160deg, rgba(18, 33, 28, 0.98) 0%, rgba(31, 58, 49, 0.96) 54%, rgba(248, 243, 234, 0.98) 54%),
    #12211c;
}

.topbar {
  min-height: 42px;
}

.topbar strong {
  letter-spacing: 0;
}

.topbar span {
  border-color: rgba(239, 231, 216, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.console-head {
  gap: 12px;
}

.console-head h1 {
  max-width: 12em;
  margin: 4px 0 0;
  font-size: 30px;
  letter-spacing: 0;
}

.primary-action,
.generate-btn {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #21483c, #b24a37);
  box-shadow: 0 14px 28px rgba(24, 33, 31, 0.18);
}

.console-panel,
.style-card,
.upload-panel,
.result-card,
.library-list article,
.profile-grid div {
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 12px 28px rgba(36, 31, 21, 0.08);
}

.console-grid,
.console-panel,
.scene-grid,
.style-grid,
.template-grid,
.result-card {
  min-width: 0;
}

.scene-card,
.segment,
.swatch,
.music-row button,
.outline-btn,
.output-options label {
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.scene-card.active,
.segment.active {
  border-color: rgba(178, 74, 55, 0.35);
  background: #fff8ef;
  box-shadow: inset 0 0 0 1px rgba(178, 74, 55, 0.18);
}

.scene-card strong {
  color: var(--ink);
}

.scene-card span {
  color: var(--muted);
}

.scene-card.active strong,
.scene-card.active span {
  color: var(--ink);
}

.compact-scenes {
  gap: 10px;
}

.compact-scenes .scene-card {
  min-width: 0;
  padding: 14px;
}

.photo-slots span {
  min-height: 40px;
  color: var(--ink-soft);
  background: linear-gradient(180deg, #ffffff, #f5f1e8);
}

.hero-metrics {
  margin-top: 2px;
}

.hero-metrics div {
  border-color: rgba(155, 106, 34, 0.16);
}

.section-heading {
  align-items: end;
}

.section-heading h2 {
  letter-spacing: 0;
}

.section-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.style-card {
  padding: 8px;
  text-align: left;
}

.style-card img {
  border-radius: 6px;
}

.style-card.active {
  border-color: var(--coral);
  box-shadow:
    inset 0 0 0 1px rgba(178, 74, 55, 0.16),
    0 16px 30px rgba(36, 31, 21, 0.1);
}

.segmented {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 6px;
  border: 1px solid rgba(222, 215, 199, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(16px);
}

.segment {
  min-height: 40px;
  border-radius: 6px;
}

.step-strip {
  gap: 8px;
}

.step-strip span {
  min-height: 36px;
  border-radius: var(--radius-sm);
}

.step-strip b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  background: var(--mint);
}

.upload-drop {
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 245, 236, 0.96)),
    var(--surface);
}

.quality-list div {
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.template-card {
  border-color: rgba(222, 215, 199, 0.9);
  background: rgba(255, 253, 248, 0.98);
}

.template-card.active {
  border-color: rgba(178, 74, 55, 0.5);
  background: #fff9f1;
}

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

.swatch {
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.86);
}

.swatch.active {
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(178, 74, 55, 0.22),
    0 12px 26px rgba(24, 33, 31, 0.12);
}

.result-card {
  padding: 10px;
  background:
    linear-gradient(180deg, #16251f, #233b32 46%, #fffdf8 46%),
    var(--surface);
}

.result-preview {
  border: 1px solid rgba(239, 231, 216, 0.22);
  box-shadow: 0 18px 34px rgba(13, 22, 19, 0.18);
}

.task-status {
  color: var(--ink-soft);
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.trust-row span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  background: #f5fbf7;
}

.output-options label {
  min-height: 42px;
}

.output-options label:has(input:checked) {
  border-color: rgba(33, 72, 60, 0.24);
  color: var(--ink);
  background: #f4fbf7;
}

.music-label {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.music-row button {
  border-radius: var(--radius-sm);
}

.music-row button.active {
  background: linear-gradient(135deg, #21483c, #315f86);
}

.bottom-bar {
  border-top-color: rgba(222, 215, 199, 0.88);
  background: rgba(255, 253, 248, 0.94);
}

.bottom-bar a.active {
  background: #21483c;
}

button,
a {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(57, 118, 185, 0.35);
  outline-offset: 2px;
}

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

/* editorial-ac-10: A+C 写真杂志转化风 + UX 主流程 */
body.theme-editorial {
  --ink: #171a17;
  --muted: #8c837d;
  --line: #efe5dc;
  --paper: #fffaf6;
  --soft: #f8eee8;
  --mint: #435c34;
  --coral: #d36b58;
  --gold: #c28c5b;
  --blue: #3a7edc;
  --shadow: 0 18px 46px rgba(92, 64, 46, 0.12);
  background:
    linear-gradient(180deg, #fff6ef 0, #fffaf6 35%, #ffffff 100%);
}

body.theme-editorial .app-shell {
  width: min(100%, 480px);
  background: #fffaf6;
  padding-bottom: 148px;
}

.editorial-hero {
  min-height: 430px;
  align-content: start;
  padding: 22px 22px 0;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(26, 21, 18, 0.78), rgba(26, 21, 18, 0.42) 36%, rgba(26, 21, 18, 0.04) 68%),
    url("./assets/photos/premium-fast/editorial-hero-woman.jpg?v=editorial-ac-21");
  background-size: cover;
  background-position: 58% 22%;
}

.editorial-hero .topbar {
  align-items: flex-start;
}

.editorial-hero .topbar strong {
  font-size: 30px;
  font-weight: 900;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.editorial-hero .topbar strong::after {
  content: "";
}

.editorial-hero .topbar span {
  min-height: 34px;
  padding: 8px 12px;
  border: 0;
  color: #fff;
  background: rgba(67, 92, 52, 0.78);
  box-shadow: 0 12px 26px rgba(24, 23, 18, 0.18);
}

.editorial-hero-copy {
  position: relative;
  z-index: 2;
  width: 56%;
  margin-top: 44px;
}

.editorial-hero-copy p,
.editorial-hero-copy span {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.55;
}

.editorial-hero-copy h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: 31px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.editorial-mode-sheet {
  position: relative;
  z-index: 3;
  margin-top: -28px;
  padding: 0 18px 14px;
}

.editorial-mode-sheet .scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 34px rgba(45, 33, 24, 0.12);
}

.editorial-mode-sheet .scene-grid::-webkit-scrollbar {
  display: none;
}

.editorial-mode-sheet .scene-card {
  display: grid;
  grid-template-columns: 34px max-content;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: #f8f0eb;
  box-shadow: none;
}

.editorial-mode-sheet .scene-card img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  object-position: center top;
}

.editorial-mode-sheet .scene-card strong {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.editorial-mode-sheet .scene-card.active {
  color: #fff;
  background: var(--mint);
  box-shadow: 0 12px 24px rgba(67, 92, 52, 0.2);
}

.editorial-mode-sheet .scene-card.active strong {
  color: #fff;
}

body.theme-editorial .workflow,
body.theme-editorial .style-board,
body.theme-editorial .templates,
body.theme-editorial .backgrounds,
body.theme-editorial .result-panel,
body.theme-editorial .library,
body.theme-editorial .profile {
  padding: 18px 20px 8px;
}

body.theme-editorial .section-heading {
  display: block;
  margin-bottom: 14px;
}

body.theme-editorial .section-heading .eyebrow {
  color: var(--coral);
  font-size: 13px;
}

body.theme-editorial .section-heading h2 {
  color: var(--ink);
  font-size: 23px;
  letter-spacing: 0;
}

body.theme-editorial .section-note {
  color: var(--muted);
}

body.theme-editorial .style-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

body.theme-editorial .style-board {
  display: none;
}

body.theme-editorial .style-card {
  flex: 0 0 142px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(92, 64, 46, 0.08);
}

body.theme-editorial .style-card img {
  height: 118px;
  border-radius: 14px;
}

body.theme-editorial .style-card strong {
  color: var(--ink);
}

body.theme-editorial .style-card span {
  color: var(--muted);
}

body.theme-editorial .style-card.active {
  box-shadow:
    0 0 0 2px rgba(67, 92, 52, 0.18),
    0 18px 32px rgba(92, 64, 46, 0.12);
}

body.theme-editorial .segmented {
  display: none;
}

body.theme-editorial .step-strip {
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 12px;
}

body.theme-editorial .step-strip span {
  border: 0;
  border-radius: 999px;
  background: #fbf0eb;
}

body.theme-editorial .step-strip b {
  background: var(--coral);
}

body.theme-editorial .upload-panel,
body.theme-editorial .result-card {
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

body.theme-editorial .upload-drop {
  min-height: 150px;
  border: 1px dashed rgba(211, 107, 88, 0.38);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 245, 239, 0.96), rgba(255, 255, 255, 0.96));
}

body.theme-editorial .quality-list div,
body.theme-editorial .output-options label,
body.theme-editorial .result-specs div,
body.theme-editorial .trust-row span {
  border: 0;
  border-radius: 16px;
  background: #fbf2ed;
}

body.theme-editorial .motion-addon {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  margin: 12px 0 10px;
  padding: 13px 14px;
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff5ef, #f7eee8);
  box-shadow: inset 0 0 0 1px rgba(211, 107, 88, 0.12);
}

body.theme-editorial .motion-addon.active,
body.motion-addon-selected .motion-addon {
  background: linear-gradient(135deg, #fff0e8, #fbe5dc);
  box-shadow:
    inset 0 0 0 1px rgba(211, 107, 88, 0.28),
    0 12px 24px rgba(211, 107, 88, 0.1);
}

body.theme-editorial .motion-addon strong {
  font-size: 14px;
}

body.theme-editorial .motion-addon span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.theme-editorial .motion-addon em {
  color: var(--coral);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

body.theme-editorial .ops-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

body.theme-editorial .ops-meta div {
  min-height: 58px;
  padding: 10px;
  border-radius: 16px;
  background: #fbf2ed;
}

body.theme-editorial .ops-meta span,
body.theme-editorial .ops-meta strong {
  display: block;
}

body.theme-editorial .ops-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

body.theme-editorial .ops-meta strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  word-break: break-all;
}

body.theme-editorial .music-row {
  opacity: 0.56;
}

body.motion-addon-selected .music-row {
  opacity: 1;
}

body.theme-editorial .pricing-section {
  margin: 12px 0;
  padding: 13px;
  border-radius: 20px;
  background: #fffaf6;
  box-shadow: inset 0 0 0 1px rgba(239, 229, 220, 0.9);
}

body.theme-editorial .pricing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.theme-editorial .pricing-head strong {
  color: var(--ink);
  font-size: 15px;
}

body.theme-editorial .pricing-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body.theme-editorial .pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

body.theme-editorial .pricing-card {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 11px;
  border: 0;
  border-radius: 16px;
  text-align: left;
  background: #fbf2ed;
}

body.theme-editorial .pricing-card strong,
body.theme-editorial .pricing-card span,
body.theme-editorial .pricing-card em {
  display: block;
}

body.theme-editorial .pricing-card strong {
  color: var(--ink);
  font-size: 14px;
}

body.theme-editorial .pricing-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

body.theme-editorial .pricing-card em {
  color: var(--coral);
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
}

body.theme-editorial .pricing-card.active {
  background: #fff0e8;
  box-shadow: inset 0 0 0 2px rgba(211, 107, 88, 0.26);
}

body.theme-editorial .benefit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff8e9, #fff1e9);
  box-shadow: inset 0 0 0 1px rgba(194, 140, 91, 0.18);
}

body.theme-editorial .benefit-panel > div {
  min-width: 0;
}

body.theme-editorial .benefit-panel span,
body.theme-editorial .benefit-panel strong,
body.theme-editorial .benefit-panel small {
  display: block;
}

body.theme-editorial .benefit-panel span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

body.theme-editorial .benefit-panel strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

body.theme-editorial .benefit-panel small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

body.theme-editorial .benefit-panel button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .benefit-panel button:disabled {
  color: var(--muted);
  background: #eee6df;
  cursor: default;
}

body.theme-editorial .share-reward {
  background: linear-gradient(135deg, #f3f8f4, #eef5f7);
  box-shadow: inset 0 0 0 1px rgba(67, 92, 52, 0.14);
}

body.theme-editorial .share-reward button {
  background: var(--mint);
}

body.theme-editorial .reward-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0 12px;
}

body.theme-editorial .reward-steps span {
  min-height: 30px;
  padding: 7px 4px;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  background: #fbf2ed;
}

body.theme-editorial .order-status {
  min-height: 40px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  background: #fbf2ed;
}

body.theme-editorial .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 8px 0 10px;
  padding: 11px 12px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  background: #fffaf6;
  box-shadow: inset 0 0 0 1px rgba(239, 229, 220, 0.9);
}

body.theme-editorial .consent-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--mint);
}

body.theme-editorial .consent-row a {
  color: var(--gallery-primary);
  font-weight: 900;
  text-decoration: none;
}

body.theme-editorial .pay-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #435c34, #d36b58);
  box-shadow: 0 16px 28px rgba(67, 92, 52, 0.18);
}

body.theme-editorial .pay-btn:disabled {
  cursor: progress;
  opacity: 0.72;
}

body.theme-editorial .trust-center {
  padding: 18px 20px 96px;
}

body.theme-editorial .trust-list {
  display: grid;
  gap: 10px;
}

body.theme-editorial .trust-list article {
  padding: 13px 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(92, 64, 46, 0.08);
}

body.theme-editorial .trust-list strong,
body.theme-editorial .trust-list span {
  display: block;
}

body.theme-editorial .trust-list strong {
  color: var(--ink);
  font-size: 14px;
}

body.theme-editorial .trust-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.theme-editorial .template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.theme-editorial .template-card {
  display: block;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 28px rgba(92, 64, 46, 0.1);
}

body.theme-editorial .template-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.08;
  border-radius: 0;
  background: #f8eee8;
}

body.theme-editorial .template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

body.theme-editorial .template-info {
  display: block;
  padding: 11px 12px 13px;
}

body.theme-editorial .template-info em {
  color: var(--coral);
  background: #fff0e9;
}

body.theme-editorial .template-card strong {
  margin-top: 8px;
  font-size: 15px;
}

body.theme-editorial .template-card small {
  display: none;
}

body.theme-editorial .template-card.active {
  box-shadow:
    0 0 0 2px rgba(67, 92, 52, 0.22),
    0 18px 34px rgba(92, 64, 46, 0.15);
}

body.theme-editorial .template-check {
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.86);
}

body.theme-editorial .template-card.active .template-check {
  background: var(--mint);
}

body.theme-editorial .swatches {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

body.theme-editorial .advanced-backgrounds {
  padding-top: 8px;
}

body.theme-editorial .advanced-backgrounds details {
  border: 1px solid rgba(38, 49, 45, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

body.theme-editorial .advanced-backgrounds summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

body.theme-editorial .advanced-backgrounds summary::-webkit-details-marker {
  display: none;
}

body.theme-editorial .advanced-backgrounds summary span {
  display: grid;
  gap: 3px;
}

body.theme-editorial .advanced-backgrounds summary b {
  font-size: 15px;
}

body.theme-editorial .advanced-backgrounds summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

body.theme-editorial .advanced-backgrounds summary strong {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--mint);
  font-size: 13px;
  background: rgba(47, 74, 64, 0.08);
}

body.theme-editorial .advanced-backgrounds details[open] {
  padding-bottom: 12px;
}

body.theme-editorial .advanced-backgrounds details[open] .section-heading,
body.theme-editorial .advanced-backgrounds details[open] .swatches {
  margin-inline: 14px;
}

body.theme-editorial .purchase-drawer {
  border: 1px solid rgba(38, 49, 45, 0.08);
  border-radius: 18px;
  background: rgba(247, 248, 246, 0.92);
}

body.theme-editorial .purchase-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

body.theme-editorial .purchase-drawer summary::-webkit-details-marker {
  display: none;
}

body.theme-editorial .purchase-drawer summary span {
  display: grid;
  gap: 3px;
}

body.theme-editorial .purchase-drawer summary b {
  font-size: 15px;
}

body.theme-editorial .purchase-drawer summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

body.theme-editorial .purchase-drawer summary strong {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  background: var(--gallery-accent);
}

body.theme-editorial .purchase-drawer[open] {
  padding-bottom: 12px;
}

body.theme-editorial .purchase-drawer .pricing-grid,
body.theme-editorial .purchase-drawer .final-trust-row,
body.theme-editorial .purchase-drawer .pay-btn,
body.theme-editorial .purchase-drawer .order-status {
  margin-inline: 14px;
}

body.theme-editorial .purchase-drawer .pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

body.theme-editorial .purchase-drawer .pricing-card {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 10px;
  border: 1px solid rgba(38, 49, 45, 0.08);
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

body.theme-editorial .purchase-drawer .pricing-card.active {
  border-color: rgba(184, 91, 77, 0.45);
  box-shadow: 0 0 0 3px rgba(184, 91, 77, 0.1);
}

body.theme-editorial .purchase-drawer .pricing-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

body.theme-editorial .purchase-drawer .pricing-card em {
  color: var(--gallery-accent);
  font-style: normal;
  font-weight: 900;
}

body.theme-editorial .final-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

body.theme-editorial .final-trust-row span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  background: rgba(36, 60, 50, 0.06);
}

body.theme-editorial .purchase-drawer .pay-btn {
  width: calc(100% - 28px);
  margin-top: 10px;
}

body.theme-editorial .purchase-drawer .order-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.theme-editorial .swatch {
  flex: 0 0 102px;
  min-height: 58px;
  border-radius: 18px;
}

body.theme-editorial .result-card {
  background: #fff;
}

body.theme-editorial .result-preview {
  border: 0;
  border-radius: 22px;
  background: #f8eee8;
  box-shadow: none;
}

body.theme-editorial .result-preview img {
  object-position: center top;
}

body.theme-editorial .result-preview span {
  background: rgba(67, 92, 52, 0.82);
}

body.theme-editorial .generate-btn,
body.theme-editorial .primary-action {
  border-radius: 999px;
  background: linear-gradient(135deg, #d36b58, #c65d4f);
  box-shadow: 0 16px 28px rgba(211, 107, 88, 0.25);
}

body.theme-editorial .outline-btn:first-child,
body.theme-editorial .music-row button.active,
body.theme-editorial .bottom-bar a.active {
  color: #fff;
  background: var(--coral);
}

body.theme-editorial .bottom-bar {
  border-top: 1px solid rgba(239, 229, 220, 0.86);
  background: rgba(255, 250, 246, 0.94);
}

body.theme-editorial .bottom-bar a {
  color: var(--muted);
}

/* editorial-ac-4 refinements */
body.theme-editorial .result-stage {
  margin-top: 10px;
  padding: 12px;
  border-radius: 20px;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgba(239, 229, 220, 0.72);
}

body.theme-editorial .preview-stage {
  background: linear-gradient(180deg, #fffdf9, #fff7f1);
}

body.theme-editorial .output-stage,
body.theme-editorial .checkout-stage {
  background: #fffaf6;
}

body.theme-editorial .stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.theme-editorial .stage-head strong {
  color: var(--ink);
  font-size: 15px;
}

body.theme-editorial .stage-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body.theme-editorial .ops-meta {
  margin: 8px 0;
}

body.theme-editorial .ops-meta div {
  min-height: 50px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(251, 242, 237, 0.72);
}

body.theme-editorial .ops-meta strong {
  color: #6c625c;
  font-size: 11px;
}

body.theme-editorial .pricing-section {
  margin: 10px 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.theme-editorial .benefit-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff8ef, #fffdf9);
  box-shadow: inset 0 0 0 1px rgba(239, 229, 220, 0.88);
}

body.theme-editorial .benefit-panel {
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: #fff7ec;
}

body.theme-editorial .share-reward {
  background: #f4f8f2;
}

body.theme-editorial .reward-steps {
  margin: 0;
}

body.theme-editorial .action-stack {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

body.theme-editorial .action-stack .generate-btn {
  min-height: 50px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 14px 24px rgba(67, 92, 52, 0.18);
}

body.theme-editorial .action-stack .pay-btn {
  min-height: 46px;
  margin-top: 0;
  background: linear-gradient(135deg, #d36b58, #b75b4a);
  box-shadow: 0 14px 24px rgba(211, 107, 88, 0.16);
}

body.theme-editorial .library-list article {
  grid-template-columns: 72px 1fr;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(92, 64, 46, 0.08);
}

body.theme-editorial .library-list img {
  width: 72px;
  height: 92px;
  object-fit: cover;
}

body.theme-editorial .library-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--mint);
  background: #f1f6ef;
  font-size: 11px;
  font-weight: 900;
}

/* editorial-ac-10 UX flow */
body.theme-editorial .primary-flow-card {
  padding: 12px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

body.theme-editorial .primary-flow-card .step-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

body.theme-editorial .primary-flow-card .step-strip span.active {
  color: #fff;
  background: var(--mint);
}

body.theme-editorial .primary-flow-card .step-strip span {
  min-height: 52px;
  padding: 6px 2px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

body.theme-editorial .primary-flow-card .step-strip b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 3px;
  border-radius: 50%;
}

body.theme-editorial .primary-flow-card .upload-panel {
  margin-top: 0;
  box-shadow: none;
  background: transparent;
}

body.theme-editorial .smart-recommendation {
  margin-top: 10px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5f8f1, #fff8ef);
  box-shadow: inset 0 0 0 1px rgba(67, 92, 52, 0.12);
}

body.theme-editorial .smart-recommendation span,
body.theme-editorial .smart-recommendation strong {
  display: block;
}

body.theme-editorial .smart-recommendation span {
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
}

body.theme-editorial .smart-recommendation strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

body.theme-editorial .coupon-strip {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 18px;
  background: #fff3e8;
  box-shadow: inset 0 0 0 1px rgba(211, 107, 88, 0.16);
}

body.theme-editorial .coupon-strip span {
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
}

body.theme-editorial .coupon-strip strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

body.theme-editorial .addon-drawer {
  margin-top: 10px;
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgba(239, 229, 220, 0.88);
  overflow: hidden;
}

body.theme-editorial .addon-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 13px;
  list-style: none;
  cursor: pointer;
}

body.theme-editorial .addon-drawer summary::-webkit-details-marker {
  display: none;
}

body.theme-editorial .addon-drawer summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .addon-drawer summary strong {
  color: var(--coral);
  font-size: 13px;
}

body.theme-editorial .addon-drawer .motion-addon {
  margin: 0 10px 8px;
}

body.theme-editorial .addon-drawer .music-label,
body.theme-editorial .addon-drawer .music-row {
  margin-left: 10px;
  margin-right: 10px;
}

body.theme-editorial .sticky-action-bar {
  position: fixed;
  left: 50%;
  bottom: calc(58px + env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  width: min(calc(100% - 24px), 456px);
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 16px 40px rgba(92, 64, 46, 0.2);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

body.theme-editorial .sticky-action-bar span,
body.theme-editorial .sticky-action-bar strong {
  display: block;
}

body.theme-editorial .sticky-action-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

body.theme-editorial .sticky-action-bar strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

body.theme-editorial .sticky-action-bar button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

/* editorial-ac-10 cool gallery palette */
body.palette-cool-gallery {
  --gallery-bg: #F7F8F6;
  --gallery-surface: #FFFFFF;
  --gallery-primary: #243C32;
  --gallery-accent: #B85B4D;
  --gallery-subtle: #E8E6E1;
  --ink: #111411;
  --muted: #6F746F;
  --line: #E1E4DF;
  --paper: #F7F8F6;
  --soft: #EEF1ED;
  --mint: #243C32;
  --coral: #B85B4D;
  --gold: #8C7A5E;
  background:
    linear-gradient(180deg, #F7F8F6 0%, #FFFFFF 42%, #F2F4F1 100%);
}

body.palette-cool-gallery .app-shell {
  background: var(--gallery-bg);
}

body.palette-cool-gallery .editorial-mode-sheet .scene-grid,
body.palette-cool-gallery .primary-flow-card,
body.palette-cool-gallery .result-card,
body.palette-cool-gallery .library-list article,
body.palette-cool-gallery .profile-grid div,
body.palette-cool-gallery .trust-list article {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(28, 36, 31, 0.08);
}

body.palette-cool-gallery .section-heading .eyebrow,
body.palette-cool-gallery .template-info em,
body.palette-cool-gallery .coupon-strip span,
body.palette-cool-gallery .addon-drawer summary strong,
body.palette-cool-gallery .pricing-card em,
body.palette-cool-gallery .motion-addon em {
  color: var(--gallery-accent);
}

body.palette-cool-gallery .editorial-mode-sheet .scene-card,
body.palette-cool-gallery .step-strip span,
body.palette-cool-gallery .quality-list div,
body.palette-cool-gallery .output-options label,
body.palette-cool-gallery .result-specs div,
body.palette-cool-gallery .trust-row span,
body.palette-cool-gallery .reward-steps span {
  background: #F1F3F0;
}

body.palette-cool-gallery .editorial-mode-sheet .scene-card.active,
body.palette-cool-gallery .primary-flow-card .step-strip span.active,
body.palette-cool-gallery .action-stack .generate-btn,
body.palette-cool-gallery .bottom-bar a.active {
  background: var(--gallery-primary);
}

body.palette-cool-gallery .upload-drop {
  border-color: rgba(36, 60, 50, 0.2);
  background:
    linear-gradient(135deg, rgba(247, 248, 246, 0.98), rgba(255, 255, 255, 0.96));
}

body.palette-cool-gallery .smart-recommendation {
  background: linear-gradient(135deg, #EEF3EF, #FAFBF8);
  box-shadow: inset 0 0 0 1px rgba(36, 60, 50, 0.1);
}

body.palette-cool-gallery .coupon-strip {
  background: #FAF7F5;
  box-shadow: inset 0 0 0 1px rgba(184, 91, 77, 0.14);
}

body.palette-cool-gallery .benefit-stack,
body.palette-cool-gallery .result-stage,
body.palette-cool-gallery .addon-drawer,
body.palette-cool-gallery .consent-row {
  background: #FBFCFA;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.92);
}

body.palette-cool-gallery .benefit-panel {
  background: #F7F8F6;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.86);
}

body.palette-cool-gallery .benefit-panel button,
body.palette-cool-gallery .action-stack .pay-btn,
body.palette-cool-gallery .sticky-action-bar button,
body.palette-cool-gallery .generate-btn,
body.palette-cool-gallery .primary-action {
  background: var(--gallery-accent);
  box-shadow: 0 14px 28px rgba(184, 91, 77, 0.18);
}

body.palette-cool-gallery .share-reward button,
body.palette-cool-gallery .music-row button.active,
body.palette-cool-gallery .template-card.active .template-check {
  background: var(--gallery-primary);
}

body.palette-cool-gallery .pricing-card {
  background: #F4F5F2;
}

body.palette-cool-gallery .pricing-card.active {
  background: #FFFFFF;
  box-shadow:
    inset 0 0 0 2px rgba(36, 60, 50, 0.22),
    0 12px 26px rgba(28, 36, 31, 0.08);
}

body.palette-cool-gallery .sticky-action-bar {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(28, 36, 31, 0.16);
}

body.palette-cool-gallery .bottom-bar {
  border-top-color: rgba(225, 228, 223, 0.9);
  background: rgba(255, 255, 255, 0.94);
}

/* editorial-ac-10 launch-readiness polish */
body.theme-editorial .quality-gate {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #FBFCFA;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.92);
}

body.theme-editorial .quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.theme-editorial .quality-head span,
body.theme-editorial .quality-head strong {
  display: block;
}

body.theme-editorial .quality-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .quality-head strong {
  color: var(--ink);
  font-size: 14px;
}

body.theme-editorial .quality-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body.theme-editorial .quality-checks span {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--mint);
  background: #F1F3F0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.theme-editorial .retry-action {
  justify-self: start;
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

body.theme-editorial .payment-methods label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--ink);
  background: #F4F5F2;
  font-size: 13px;
  font-weight: 900;
}

body.theme-editorial .payment-methods input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint);
}

body.theme-editorial .after-sale-promise {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  padding: 11px 12px;
  border-radius: 16px;
  background: #F7F8F6;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.86);
}

body.theme-editorial .after-sale-promise strong {
  color: var(--ink);
  font-size: 13px;
}

body.theme-editorial .after-sale-promise span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.theme-editorial .privacy-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

body.theme-editorial .privacy-actions button,
body.theme-editorial .privacy-link,
body.theme-editorial .support-entry {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #F1F3F0;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

body.theme-editorial .support-entry {
  color: #fff;
  background: var(--mint);
}

body.palette-cool-gallery .quality-gate,
body.palette-cool-gallery .after-sale-promise {
  background: #FBFCFA;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.92);
}

body.palette-cool-gallery .quality-checks span,
body.palette-cool-gallery .payment-methods label,
body.palette-cool-gallery .privacy-actions button {
  background: #F1F3F0;
}

body.palette-cool-gallery .retry-action,
body.palette-cool-gallery .support-entry {
  background: var(--gallery-primary);
}

/* editorial-ac-10 refined background swatches */
body.palette-cool-gallery {
  --id-blue: #5F83B7;
  --id-red: #B7645E;
  --id-gray: #C9D0CB;
}

body.palette-cool-gallery .swatches {
  gap: 12px;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

body.palette-cool-gallery .swatches::-webkit-scrollbar {
  display: none;
}

body.palette-cool-gallery .swatch {
  position: relative;
  flex: 0 0 116px;
  min-height: 66px;
  padding: 9px;
  border: 1px solid rgba(225, 228, 223, 0.92);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(28, 36, 31, 0.06);
}

body.palette-cool-gallery .swatch::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 14px;
  pointer-events: none;
}

body.palette-cool-gallery .swatch span {
  position: relative;
  z-index: 1;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  color: #fff;
  background: rgba(17, 20, 17, 0.48);
  font-size: 12px;
  letter-spacing: 0;
}

body.palette-cool-gallery .swatch[style*="#FCFCFA"] span,
body.palette-cool-gallery .swatch[style*="#D7DDD9"] span {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

body.palette-cool-gallery .swatch.active {
  outline: 0;
  border-color: rgba(36, 60, 50, 0.3);
  box-shadow:
    0 0 0 3px rgba(36, 60, 50, 0.12),
    0 14px 28px rgba(28, 36, 31, 0.1);
}

/* editorial-ac-10: keep standard background swatches complete and unclipped */
body.palette-cool-gallery .backgrounds .swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
  scrollbar-width: none;
}

body.palette-cool-gallery .backgrounds .swatch {
  min-width: 0;
  width: 100%;
  min-height: 62px;
  padding: 8px;
}

body.palette-cool-gallery .swatch::after {
  content: none;
}

body.palette-cool-gallery .backgrounds .swatch span {
  min-height: 25px;
  padding: 0 8px;
  font-size: 12px;
}

/* editorial-ac-11: launch-grade feedback, recovery, and checkout trust */
body.theme-editorial .toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 80;
  width: min(calc(100% - 32px), 420px);
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 11px 16px;
  border: 1px solid rgba(225, 228, 223, 0.92);
  border-radius: 999px;
  color: #FFFFFF;
  background: rgba(36, 60, 50, 0.96);
  box-shadow: 0 18px 36px rgba(28, 36, 31, 0.22);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

body.theme-editorial .toast-region.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.theme-editorial .toast-region[data-tone="success"] {
  background: rgba(36, 91, 73, 0.96);
}

body.theme-editorial .toast-region[data-tone="warning"] {
  color: #FFF8F4;
  background: rgba(159, 67, 55, 0.96);
}

body.theme-editorial .confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(23, 33, 31, 0.34);
  backdrop-filter: blur(8px);
}

body.theme-editorial .confirm-dialog[hidden] {
  display: none;
}

body.theme-editorial .confirm-card {
  width: min(100%, 420px);
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 24px 52px rgba(23, 33, 31, 0.26);
}

body.theme-editorial .confirm-card span {
  color: var(--gallery-accent);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .confirm-card strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

body.theme-editorial .confirm-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

body.theme-editorial .dialog-link {
  color: var(--gallery-accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

body.theme-editorial .confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
  margin-top: 4px;
}

body.theme-editorial .confirm-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

body.theme-editorial .confirm-actions button:first-child {
  color: var(--ink);
  background: #F1F3F0;
}

body.theme-editorial .confirm-actions button:last-child {
  color: #FFFFFF;
  background: var(--gallery-accent);
}

body.theme-editorial .failure-recovery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #FFF8F4;
  box-shadow: inset 0 0 0 1px rgba(184, 91, 77, 0.18);
}

body.theme-editorial .failure-recovery[hidden] {
  display: none;
}

body.theme-editorial .failure-recovery div {
  display: grid;
  gap: 4px;
}

body.theme-editorial .failure-recovery strong {
  color: #8E3F35;
  font-size: 13px;
}

body.theme-editorial .failure-recovery span {
  color: #7A625D;
  font-size: 12px;
  line-height: 1.45;
}

body.theme-editorial .failure-recovery button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #FFFFFF;
  background: var(--gallery-accent);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.theme-editorial .security-note {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  padding: 12px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(36, 60, 50, 0.12);
}

body.theme-editorial .security-note strong {
  color: var(--gallery-primary);
  font-size: 13px;
}

body.theme-editorial .security-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

body.theme-editorial button:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

/* editorial-ac-12: operational readiness and production handoff states */
body.theme-editorial .queue-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--ink);
  background: #F4F6F2;
  box-shadow: inset 0 0 0 1px rgba(36, 60, 50, 0.08);
}

body.theme-editorial .queue-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.theme-editorial .queue-status strong {
  color: var(--gallery-primary);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

body.theme-editorial .queue-status[data-state="running"] strong {
  color: #8D6731;
}

body.theme-editorial .queue-status[data-state="failed"] {
  background: #FFF8F4;
  box-shadow: inset 0 0 0 1px rgba(184, 91, 77, 0.18);
}

body.theme-editorial .queue-status[data-state="failed"] strong {
  color: #8E3F35;
}

body.theme-editorial .ops-timeline {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

body.theme-editorial .ops-timeline div {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 12px 12px 12px 34px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.92);
}

body.theme-editorial .ops-timeline div::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gallery-accent);
  box-shadow: 0 0 0 4px rgba(184, 91, 77, 0.12);
}

body.theme-editorial .ops-timeline span,
body.theme-editorial .ops-timeline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

body.theme-editorial .ops-timeline strong {
  color: var(--ink);
  font-size: 14px;
}

body.theme-editorial .launch-readiness {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 14px 28px rgba(28, 36, 31, 0.08);
}

body.theme-editorial .readiness-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

body.theme-editorial .readiness-head span {
  color: var(--gallery-accent);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .readiness-head strong {
  color: var(--gallery-primary);
  font-size: 34px;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

body.theme-editorial .readiness-head strong::after {
  content: "分";
  margin-left: 2px;
  color: var(--muted);
  font-size: 12px;
}

body.theme-editorial .readiness-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #EDF0EC;
}

body.theme-editorial .readiness-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gallery-primary), var(--gallery-accent));
  transition: width 220ms ease;
}

body.theme-editorial .integration-checklist {
  display: grid;
  gap: 8px;
}

body.theme-editorial .integration-checklist div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F7F8F6;
}

body.theme-editorial .integration-checklist div[data-status="ready"] {
  background: #F1F6F3;
  box-shadow: inset 0 0 0 1px rgba(36, 60, 50, 0.1);
}

body.theme-editorial .integration-checklist div[data-status="pending"] {
  background: #FFF8F4;
  box-shadow: inset 0 0 0 1px rgba(184, 91, 77, 0.14);
}

body.theme-editorial .integration-checklist strong {
  color: var(--ink);
  font-size: 13px;
}

body.theme-editorial .integration-checklist span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.theme-editorial .privacy-receipt {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.92);
}

body.theme-editorial .privacy-receipt span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

body.theme-editorial .privacy-receipt strong {
  color: var(--gallery-primary);
  font-size: 13px;
  line-height: 1.45;
}

/* editorial-ac-13: local API bridge state */
body.theme-editorial .api-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F7F8F6;
  box-shadow: inset 0 0 0 1px rgba(225, 228, 223, 0.92);
}

body.theme-editorial .api-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.theme-editorial .api-status strong {
  color: var(--gallery-primary);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

body.theme-editorial .api-status[data-state="fallback"] strong {
  color: #8E3F35;
}

@media (max-width: 380px) {
  .editorial-hero {
    min-height: 410px;
    padding-inline: 18px;
  }

  .editorial-hero-copy {
    width: 58%;
  }

  .editorial-hero-copy h1 {
    font-size: 30px;
  }

  body.theme-editorial .template-grid {
    gap: 12px;
  }
}

body.admin-console {
  min-height: 100vh;
  background: #f5f6f4;
  color: #17211f;
}

.admin-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px;
}

.admin-topbar,
.admin-status,
.admin-panel {
  border: 1px solid #dde3de;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.06);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 8px;
}

.admin-topbar span,
.admin-section-head p,
.admin-status span,
.balance-form span,
.admin-row span {
  color: #687471;
  font-size: 12px;
}

.admin-topbar strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.admin-topbar a {
  color: #243c32;
  font-weight: 800;
  text-decoration: none;
}

.admin-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 8px;
}

.admin-status article {
  padding: 18px;
  background: #fbfcfa;
}

.admin-status strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.admin-panel {
  margin-top: 16px;
  padding: 20px;
  border-radius: 8px;
}

.admin-section-head h1,
.admin-section-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.balance-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr 1.5fr auto;
  gap: 12px;
  margin-top: 18px;
  align-items: end;
}

.admin-token-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #edf1ee;
  border-radius: 6px;
  background: #fbfcfa;
}

.admin-token-form label {
  display: grid;
  gap: 6px;
}

.balance-form label {
  display: grid;
  gap: 6px;
}

.balance-form input,
.admin-token-form input {
  width: 100%;
  border: 1px solid #d9e0dc;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fbfcfa;
  color: #17211f;
}

.balance-form button,
.admin-token-form button {
  min-height: 43px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: #243c32;
  color: #fff;
  font-weight: 800;
}

.admin-message {
  margin: 14px 0 0;
  color: #687471;
}

.admin-table {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf1ee;
  border-radius: 6px;
  background: #fbfcfa;
}

.admin-row strong,
.admin-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row em {
  color: #b85b4d;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 760px) {
  .admin-shell {
    padding: 14px;
  }

  .admin-topbar,
  .admin-status,
  .admin-grid,
  .admin-token-form,
  .balance-form {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: flex-start;
  }
}

body.legal-page {
  min-height: 100vh;
  background: #f7f8f6;
  color: #17211f;
}

.legal-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px;
}

.legal-hero,
.legal-shell section {
  border: 1px solid #dde3de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.06);
}

.legal-hero {
  padding: 24px;
}

.legal-hero a {
  color: #243c32;
  font-weight: 900;
  text-decoration: none;
}

.legal-hero span {
  display: block;
  margin-top: 22px;
  color: #687471;
  font-size: 13px;
  font-weight: 900;
}

.legal-hero h1 {
  margin: 8px 0 10px;
  font-size: 30px;
}

.legal-hero p,
.legal-shell section p {
  color: #687471;
  line-height: 1.75;
}

.legal-shell section {
  margin-top: 14px;
  padding: 20px 24px;
}

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