:root {
  --bg0: #140f1c;
  --bg1: #24182d;
  --ink: #f7f1e8;
  --muted: rgba(247, 241, 232, 0.68);
  --accent: #e7a35a;
  --accent2: #ff6f91;
  --line: rgba(255, 255, 255, 0.12);
  --ok: #7ddea8;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg0);
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(255, 111, 145, 0.22), transparent 60%),
    radial-gradient(800px 480px at 90% 10%, rgba(231, 163, 90, 0.18), transparent 55%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 50%, #1a2238);
}
.top {
  max-width: 1100px; margin: 0 auto;
  padding: 20px 22px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 1.6rem; color: var(--ink); text-decoration: none;
}
.top nav a {
  color: var(--muted); text-decoration: none; margin-left: 18px; font-size: .95rem;
}
#app { max-width: 1100px; margin: 0 auto; padding: 0 22px 80px; }
.hero {
  min-height: calc(100vh - 88px);
  display: grid; align-content: center; gap: 14px; padding: 4vh 0 8vh;
}
.hero .brand {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: clamp(3rem, 9vw, 5.2rem);
  margin: 0; animation: rise .8s ease both;
}
.hero h1 {
  margin: 0; font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  font-weight: 500; color: var(--muted); max-width: 30ch;
  animation: rise .9s .08s ease both;
}
.hero .sub {
  color: var(--muted); max-width: 42ch; line-height: 1.7;
  animation: rise .9s .16s ease both;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; animation: rise .9s .24s ease both; }
.btn {
  border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.25rem; border-radius: 999px; font: inherit; font-weight: 700;
}
.btn.primary { background: linear-gradient(120deg, var(--accent), var(--accent2)); color: #1a1014; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.section-title {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 .4rem;
}
.muted { color: var(--muted); line-height: 1.7; }
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-top: 18px;
}
.tpl {
  text-align: left; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); border-radius: 16px;
  padding: 0; color: inherit; cursor: pointer; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.tpl:hover, .tpl.active { transform: translateY(-3px); border-color: rgba(231,163,90,.55); }
.tpl .cover {
  display: grid; place-items: center; width: 100%; aspect-ratio: 16/10;
  font-family: "ZCOOL XiaoWei", serif; font-size: 1.35rem;
}
.tpl .body { padding: 12px 14px 14px; }
.tpl h3 { margin: 0 0 6px; font-size: 1.05rem; }
.tpl p { margin: 0; color: var(--muted); font-size: .88rem; }
.tone { display: inline-block; margin-top: 8px; font-size: .75rem; opacity: .7; }
.wizard {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; margin-top: 18px;
}
@media (max-width: 900px) { .wizard { grid-template-columns: 1fr; } }
.panel {
  border: 1px solid var(--line); border-radius: 20px;
  padding: 18px; background: rgba(0,0,0,.18);
}
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: .9rem; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--ink);
  border-radius: 12px; padding: .75rem .9rem; font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
.upload-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.upload-row input[type="file"] {
  flex: 1; min-width: 180px; padding: .65rem .8rem;
}
.upload-box {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.upload-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  z-index: -1;
}
.upload-tip {
  margin: 8px 0 0; color: var(--muted); font-size: .88rem; word-break: break-all;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.slug-row {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,.04);
}
.slug-prefix, .slug-suffix {
  color: var(--muted); font-size: .82rem; white-space: nowrap; padding: 0 .6rem;
}
.slug-row input {
  border: 0; border-radius: 0; background: transparent; min-width: 0; flex: 1;
}
.pay-label { margin: 16px 0 8px; color: var(--muted); font-size: .9rem; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.pay-wx {
  flex: 1; min-width: 140px;
  background: linear-gradient(120deg, #07c160, #06ad56);
  color: #fff;
}
.btn.pay-ali {
  flex: 1; min-width: 140px;
  background: linear-gradient(120deg, #1677ff, #0f5fdc);
  color: #fff;
}
.price { margin-top: 10px; font-size: 1.2rem; color: var(--accent); }
.preview-frame { width: 100%; min-height: 520px; border: 0; border-radius: 14px; background: #000; }
.steps { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 18px; color: var(--muted); font-size: .9rem; }
.steps span.on { color: var(--accent); }
.success-box { margin-top: 10vh; max-width: 560px; animation: rise .7s ease both; }
.success-box a.link { color: var(--ok); word-break: break-all; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.cover.c-moonlight { background: linear-gradient(135deg,#1a2744,#0b1020); color:#f4efe6; }
.cover.c-letter { background: linear-gradient(135deg,#f3e6d2,#c9b08a); color:#2b2118; }
.cover.c-stars { background: linear-gradient(135deg,#050816,#1a2a55); color:#eef3ff; }
.cover.c-sakura { background: linear-gradient(135deg,#ffe8ef,#ff9bb8); color:#5a3040; }
.cover.c-ocean { background: linear-gradient(135deg,#ff8a4c,#2b5876); color:#fff8f0; }
.cover.c-film { background: linear-gradient(135deg,#1a1410,#3a2a1c); color:#f2e8d5; }
.cover.c-typewriter { background: linear-gradient(135deg,#efe7d8,#b8a88c); color:#222; }
.cover.c-balloon { background: linear-gradient(135deg,#ffe8f3,#7bdff2); color:#3b2a45; }
.cover.c-rain { background: linear-gradient(135deg,#1b2430,#0f141c); color:#dce6f2; }
.cover.c-snow { background: linear-gradient(135deg,#1e2a44,#9ecbff); color:#eef4ff; }
.cover.c-comic { background: linear-gradient(135deg,#fff6a8,#ffd6e8); color:#222; }
.cover.c-neon { background: linear-gradient(135deg,#07070f,#ff00a8 120%); color:#67f6ff; }

.upload-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.upload-row input[type="file"] {
  flex: 1; min-width: 180px; padding: .65rem .75rem;
}
.upload-tip {
  margin: 8px 0 0; color: var(--muted); font-size: .88rem;
}
