:root {
  --bg-base: #060b14;
  --bg-layer: #101c2f;
  --surface: rgba(11, 26, 43, 0.84);
  --surface-strong: rgba(8, 19, 33, 0.94);
  --line: rgba(152, 199, 231, 0.28);
  --line-strong: rgba(167, 214, 245, 0.46);
  --text: #eaf4ff;
  --muted: #9fbfda;
  --brand: #53c0ff;
  --brand-strong: #2ea7e9;
  --warm: #ffb46a;
  --ok: #6bd5a4;
  --danger: #ff8d8d;
  --shadow-sm: 0 12px 28px rgba(2, 10, 19, 0.28);
  --shadow-lg: 0 24px 64px rgba(2, 10, 19, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(6, 11, 20, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(83, 192, 255, 0.26);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(83, 192, 255, 0.44);
}

::selection {
  background: rgba(83, 192, 255, 0.28);
  color: #eaf4ff;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(83, 192, 255, 0.22) 0%, transparent 34%),
    radial-gradient(circle at 91% 8%, rgba(255, 180, 106, 0.16) 0%, transparent 36%),
    radial-gradient(circle at 86% 88%, rgba(107, 213, 164, 0.12) 0%, transparent 38%),
    linear-gradient(158deg, #101f33 0%, #091424 45%, #060b14 100%);
  padding: 18px;
}

a {
  color: #99ddff;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.topbar {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(13, 33, 56, 0.92) 0%, rgba(9, 22, 38, 0.94) 100%),
    radial-gradient(circle at 90% -35%, rgba(153, 220, 255, 0.2) 0%, transparent 56%);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #53c0ff, #a78bfa, #ffb46a);
}

.branding {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border: 1px solid rgba(153, 220, 255, 0.48);
  border-radius: 10px;
  background: rgba(8, 20, 34, 0.72);
}

.branding h1,
.branding p {
  margin: 0;
}

.branding h1 {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: 1.02rem;
  line-height: 1.1;
}

.branding p {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 4px;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
}

.nav-links a {
  text-decoration: none;
  border: 1px solid rgba(153, 220, 255, 0.36);
  border-radius: 999px;
  padding: 6px 10px;
  color: #def1ff;
  font-size: 0.82rem;
  background: rgba(8, 20, 34, 0.68);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  border-color: rgba(153, 220, 255, 0.62);
  background: rgba(17, 43, 69, 0.84);
}

.nav-links a.active {
  border-color: rgba(83, 192, 255, 0.64);
  background: rgba(12, 36, 62, 0.94);
  color: #c4eaff;
  pointer-events: none;
  cursor: default;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-strong) 100%);
  padding: 56px 24px 48px;
  box-shadow: var(--shadow-lg);
}

.hero > * {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero h2 {
  margin: 0 0 10px;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  background: linear-gradient(135deg, #9ae4ff 0%, #53c0ff 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.66;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.main-grid {
  display: grid;
  gap: 14px;
}

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-strong) 100%);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(153, 220, 255, 0) 0%, rgba(153, 220, 255, 0.72) 50%, rgba(255, 180, 106, 0.52) 100%);
  pointer-events: none;
}

.card:hover {
  border-color: rgba(153, 220, 255, 0.48);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin: 0 0 10px;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: 1.1rem;
  border-left: 3px solid var(--brand);
  padding-left: 10px;
  margin-left: -10px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card ul,
.card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: #d8ebfa;
  line-height: 1.55;
}

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

.form-grid label,
.stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(157, 203, 233, 0.33);
  border-radius: 10px;
  background: rgba(6, 16, 28, 0.84);
  color: #e8f4ff;
  padding: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(83, 192, 255, 0.76);
  box-shadow: 0 0 0 3px rgba(83, 192, 255, 0.16);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.stack {
  display: grid;
  gap: 10px;
}

.stack > * + * {
  margin-top: 20px;
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid rgba(153, 220, 255, 0.42);
  border-radius: 10px;
  background: rgba(8, 20, 34, 0.82);
  color: #e8f4ff;
  padding: 12px 24px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(3, 12, 21, 0.34);
}

.btn-primary {
  color: #06243c;
  background: linear-gradient(130deg, #9ae4ff 0%, #53c0ff 45%, #37ace8 100%);
  border-color: rgba(153, 220, 255, 0.68);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(83, 192, 255, 0.35);
  transform: translateY(-1px);
}

.btn-warm {
  color: #44230d;
  background: linear-gradient(135deg, #ffc78f 0%, #ffb46a 46%, #f08b3b 100%);
  border-color: rgba(255, 180, 106, 0.74);
}

.muted {
  color: var(--muted);
}

.kv {
  display: grid;
  gap: 8px;
}

.kv-item {
  border: 1px solid rgba(157, 203, 233, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(8, 20, 33, 0.66);
}

.kv-item strong {
  display: block;
  margin-bottom: 4px;
  color: #ebf6ff;
  font-size: 0.9rem;
}

.kv-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.preview-stage {
  background: rgba(6, 16, 25, 0.84);
  border: 1px solid rgba(157, 203, 233, 0.33);
  border-radius: 14px;
  padding: 14px;
}

.card-canvas {
  width: min(100%, 520px);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.card-deco {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.card-canvas h4 {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.32;
}

.card-canvas p {
  margin: 0;
  line-height: 1.58;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  opacity: 0.88;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   CARD TEMPLATES — 18 designs (rich multi-layer)
   ═══════════════════════════════════════════ */

/* ── COLD PALETTE ── */

/* template-a | Aurora 极光蓝 — aurora borealis curtains */
.template-a {
  background:
    radial-gradient(ellipse 120% 40% at 20% 0%, rgba(0, 255, 180, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 90% 35% at 75% 5%, rgba(83, 192, 255, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 220, 255, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 30% at 85% 30%, rgba(120, 80, 255, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #020d1a 0%, #041526 30%, #071e38 60%, #0b2a50 100%);
}
.template-a .card-deco {
  background: linear-gradient(90deg, rgba(0, 255, 180, 0.9), rgba(83, 192, 255, 0.7), transparent);
  width: 60px;
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.5);
}

/* template-b | Void 深空 — star field + nebula glow */
.template-b {
  background:
    radial-gradient(circle 1.2px at 8%  9%,  rgba(255,255,255,0.9) 0%, transparent 1.2px),
    radial-gradient(circle 1px  at 18% 22%,  rgba(255,255,255,0.6) 0%, transparent 1px),
    radial-gradient(circle 1.5px at 31% 6%,  rgba(255,255,255,0.8) 0%, transparent 1.5px),
    radial-gradient(circle 1px  at 42% 38%,  rgba(255,255,255,0.5) 0%, transparent 1px),
    radial-gradient(circle 1px  at 55% 15%,  rgba(255,255,255,0.7) 0%, transparent 1px),
    radial-gradient(circle 1.2px at 63% 52%,  rgba(255,255,255,0.6) 0%, transparent 1.2px),
    radial-gradient(circle 1px  at 72% 28%,  rgba(255,255,255,0.45) 0%, transparent 1px),
    radial-gradient(circle 1.5px at 80% 8%,  rgba(255,255,255,0.85) 0%, transparent 1.5px),
    radial-gradient(circle 1px  at 88% 43%,  rgba(255,255,255,0.5) 0%, transparent 1px),
    radial-gradient(circle 1px  at 94% 72%,  rgba(255,255,255,0.6) 0%, transparent 1px),
    radial-gradient(circle 1px  at 12% 66%,  rgba(255,255,255,0.4) 0%, transparent 1px),
    radial-gradient(circle 1.2px at 25% 80%,  rgba(255,255,255,0.7) 0%, transparent 1.2px),
    radial-gradient(circle 1px  at 48% 70%,  rgba(255,255,255,0.35) 0%, transparent 1px),
    radial-gradient(circle 1px  at 67% 85%,  rgba(255,255,255,0.55) 0%, transparent 1px),
    radial-gradient(circle 1.5px at 92% 18%,  rgba(255,255,255,0.75) 0%, transparent 1.5px),
    radial-gradient(ellipse 55% 40% at 30% 55%, rgba(40, 80, 180, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 75% 25%, rgba(80, 30, 150, 0.16) 0%, transparent 60%),
    linear-gradient(155deg, #030610 0%, #080e20 35%, #0e1635 65%, #141e48 100%);
}
.template-b .card-deco {
  background: rgba(100, 149, 237, 0.75);
  width: 36px;
  box-shadow: 0 0 8px rgba(100, 149, 237, 0.5);
}

/* template-h | Abyss 深渊 — bioluminescent deep ocean */
.template-h {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 200, 255, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 15% 40%, rgba(0, 160, 220, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 30% 30% at 85% 20%, rgba(0, 180, 240, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 60% 80%, rgba(0, 140, 200, 0.08) 0%, transparent 55%),
    linear-gradient(200deg, #000c18 0%, #010f22 30%, #020f1f 55%, #030e1c 80%, #040d18 100%);
}
.template-h .card-deco {
  background: linear-gradient(90deg, #00e5ff, rgba(0, 229, 255, 0.3), transparent);
  width: 72px;
  height: 3px;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.7), 0 0 28px rgba(0, 229, 255, 0.3);
}

/* template-m | Aqua 海洋 — ocean surface caustics */
.template-m {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(160, 240, 255, 0.04) 0px, rgba(160, 240, 255, 0.04) 1px,
      transparent 1px, transparent 18px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(120, 220, 255, 0.03) 0px, rgba(120, 220, 255, 0.03) 1px,
      transparent 1px, transparent 24px
    ),
    radial-gradient(ellipse 70% 50% at 30% 20%, rgba(100, 220, 255, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(40, 180, 220, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(6, 60, 80, 0.5) 0%, transparent 55%),
    linear-gradient(170deg, #062a38 0%, #094055 30%, #0e5c72 60%, #159ab4 90%, #22b8d0 100%);
}
.template-m .card-deco {
  background: linear-gradient(90deg, rgba(160, 240, 255, 0.9), rgba(100, 210, 240, 0.5), transparent);
  width: 54px;
  box-shadow: 0 0 10px rgba(100, 220, 255, 0.45);
}

/* template-p | Midnight 子夜 — indigo bokeh night */
.template-p {
  background:
    radial-gradient(circle 2px at 15% 10%, rgba(200, 180, 255, 0.8) 0%, transparent 2px),
    radial-gradient(circle 1.5px at 38% 8%, rgba(180, 160, 255, 0.6) 0%, transparent 1.5px),
    radial-gradient(circle 2px at 60% 15%, rgba(220, 200, 255, 0.7) 0%, transparent 2px),
    radial-gradient(circle 1px at 82% 5%, rgba(200, 180, 255, 0.5) 0%, transparent 1px),
    radial-gradient(circle 1.5px at 90% 30%, rgba(160, 140, 230, 0.65) 0%, transparent 1.5px),
    radial-gradient(ellipse 70% 45% at 20% 25%, rgba(80, 50, 180, 0.3) 0%, transparent 65%),
    radial-gradient(ellipse 60% 55% at 80% 60%, rgba(50, 30, 140, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(20, 10, 60, 0.6) 0%, transparent 50%),
    linear-gradient(165deg, #06031a 0%, #0c0628 35%, #120a38 65%, #1c1050 100%);
}
.template-p .card-deco {
  background: linear-gradient(90deg, #818cf8, rgba(99, 102, 241, 0.4), transparent);
  width: 60px;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
}

/* template-r | Storm 风暴 — thunderstorm with lightning */
.template-r {
  background:
    radial-gradient(ellipse 30% 80% at 70% 10%, rgba(220, 235, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(180, 210, 240, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 20% 60%, rgba(140, 170, 210, 0.06) 0%, transparent 50%),
    linear-gradient(170deg,
      #0e1420 0%,
      #16202e 20%,
      #1e2c3e 40%,
      #26364e 60%,
      #2e4060 80%,
      #354a6e 100%
    );
}
.template-r .card-deco {
  background: linear-gradient(90deg, rgba(200, 220, 255, 0.9), rgba(180, 200, 240, 0.4), transparent);
  width: 68px;
  box-shadow: 0 0 8px rgba(200, 220, 255, 0.35);
}

/* ── WARM PALETTE ── */

/* template-d | Ember 琥珀橙 — multi-point fire glow */
.template-d {
  background:
    radial-gradient(ellipse 60% 40% at 25% 30%, rgba(255, 160, 40, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 70%, rgba(220, 80, 20, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 60% 10%, rgba(255, 200, 80, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 70% 30% at 40% 90%, rgba(180, 50, 10, 0.3) 0%, transparent 50%),
    linear-gradient(165deg, #3a1505 0%, #6a2a0c 25%, #a84820 50%, #d06a28 75%, #e88c42 100%);
}
.template-d .card-deco {
  background: linear-gradient(90deg, rgba(255, 230, 160, 0.9), rgba(255, 180, 80, 0.5), transparent);
  width: 48px;
  box-shadow: 0 0 10px rgba(255, 160, 40, 0.5);
}

/* template-e | Blossom 樱花 — petal light scatter */
.template-e {
  background:
    radial-gradient(ellipse 55% 45% at 75% 20%, rgba(255, 160, 220, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 20% 70%, rgba(240, 100, 180, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse 60% 35% at 50% 5%, rgba(255, 200, 240, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 75%, rgba(200, 60, 140, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, #3d0c30 0%, #6a1550 25%, #9e2878 50%, #c84498 75%, #e870b8 100%);
}
.template-e .card-deco {
  background: linear-gradient(90deg, rgba(255, 210, 240, 0.9), rgba(240, 160, 210, 0.5), transparent);
  width: 50px;
  box-shadow: 0 0 10px rgba(255, 160, 220, 0.5);
}

/* template-i | Dusk 暮色 — dramatic sunset layers */
.template-i {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 220, 120, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(255, 140, 60, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 15% 60%, rgba(180, 40, 80, 0.22) 0%, transparent 55%),
    linear-gradient(170deg,
      #2a0a30 0%,
      #5a1540 18%,
      #9a2855 32%,
      #c84860 46%,
      #d8705e 58%,
      #e89068 70%,
      #f2a878 82%,
      #f8be90 95%
    );
}
.template-i .card-deco {
  background: linear-gradient(90deg, rgba(255, 235, 200, 0.9), rgba(255, 200, 140, 0.5), transparent);
  width: 48px;
  box-shadow: 0 0 10px rgba(255, 180, 80, 0.4);
}

/* template-o | Coral 珊瑚红 — scattered warm light */
.template-o {
  background:
    radial-gradient(ellipse 55% 45% at 30% 25%, rgba(255, 120, 100, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 75% 70%, rgba(220, 60, 60, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse 60% 30% at 60% 5%, rgba(255, 160, 120, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at 85% 30%, rgba(200, 40, 40, 0.2) 0%, transparent 50%),
    linear-gradient(165deg, #4a0808 0%, #8a1818 25%, #c03030 50%, #e05050 75%, #f07878 100%);
}
.template-o .card-deco {
  background: linear-gradient(90deg, rgba(255, 210, 200, 0.9), rgba(255, 160, 140, 0.5), transparent);
  width: 50px;
  box-shadow: 0 0 10px rgba(255, 120, 100, 0.45);
}

/* ── NATURE PALETTE ── */

/* template-c | Sage 苍翠 — dappled forest light */
.template-c {
  background:
    radial-gradient(ellipse 50% 40% at 25% 15%, rgba(100, 240, 160, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 75% 30%, rgba(60, 200, 120, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 35% at 50% 85%, rgba(20, 120, 70, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 35% 45% at 90% 70%, rgba(80, 180, 100, 0.15) 0%, transparent 50%),
    linear-gradient(165deg, #081f12 0%, #10341c 25%, #185030 50%, #246644 75%, #328a5a 100%);
}
.template-c .card-deco {
  background: linear-gradient(90deg, rgba(160, 255, 200, 0.9), rgba(100, 220, 150, 0.5), transparent);
  width: 50px;
  box-shadow: 0 0 10px rgba(80, 220, 140, 0.4);
}

/* template-f | Nebula 星云紫 — cosmic gas cloud */
.template-f {
  background:
    radial-gradient(circle 1.5px at 20% 12%, rgba(255,255,255,0.85) 0%, transparent 1.5px),
    radial-gradient(circle 1px  at 55% 8%,  rgba(255,255,255,0.6) 0%, transparent 1px),
    radial-gradient(circle 2px  at 78% 22%, rgba(255,255,255,0.8) 0%, transparent 2px),
    radial-gradient(circle 1px  at 40% 35%, rgba(255,255,255,0.4) 0%, transparent 1px),
    radial-gradient(circle 1.5px at 88% 55%, rgba(255,255,255,0.7) 0%, transparent 1.5px),
    radial-gradient(circle 1px  at 10% 70%, rgba(255,255,255,0.5) 0%, transparent 1px),
    radial-gradient(ellipse 70% 55% at 35% 40%, rgba(180, 80, 255, 0.32) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 75% 30%, rgba(80, 120, 255, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 60% 75%, rgba(220, 80, 180, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 15% 65%, rgba(100, 60, 200, 0.25) 0%, transparent 60%),
    linear-gradient(165deg, #0a0520 0%, #160a38 30%, #200e50 60%, #2a1268 100%);
}
.template-f .card-deco {
  background: linear-gradient(90deg, #e040fb, #a78bfa, rgba(167, 139, 250, 0));
  width: 60px;
  height: 4px;
  box-shadow: 0 0 10px rgba(192, 80, 255, 0.5);
}

/* template-q | Matcha 抹茶 — washi paper with vertical rules */
.template-q {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 39px,
      rgba(100, 160, 80, 0.06) 39px, rgba(100, 160, 80, 0.06) 40px
    ),
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(140, 220, 100, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 80%, rgba(60, 120, 40, 0.18) 0%, transparent 55%),
    linear-gradient(165deg, #1a3018 0%, #2a4a28 28%, #3a6434 55%, #4e8040 78%, #609850 100%);
}
.template-q .card-deco {
  background: linear-gradient(90deg, rgba(200, 240, 160, 0.88), rgba(160, 210, 120, 0.4), transparent);
  width: 44px;
  box-shadow: 0 0 8px rgba(160, 220, 100, 0.35);
}
.template-q h4 {
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
  letter-spacing: 0.06em;
}

/* ── PROFESSIONAL PALETTE ── */

/* template-j | Cyber 赛博 — neon grid terminal */
.template-j {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 255, 157, 0.04) 0px, rgba(0, 255, 157, 0.04) 1px,
      transparent 1px, transparent 20px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 255, 157, 0.04) 0px, rgba(0, 255, 157, 0.04) 1px,
      transparent 1px, transparent 20px
    ),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0, 255, 100, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(0, 200, 120, 0.06) 0%, transparent 55%),
    linear-gradient(160deg, #010608 0%, #030e14 30%, #061a22 60%, #081e28 80%, #0a2230 100%);
}
.template-j .card-deco {
  background: #00ff9d;
  width: 60px;
  box-shadow: 0 0 12px #00ff9d, 0 0 28px rgba(0, 255, 157, 0.45), 0 0 50px rgba(0, 255, 157, 0.2);
}
.template-j h4 {
  color: #00ff9d;
  font-family: "Sora", sans-serif;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(0, 255, 157, 0.5);
}
.template-j .card-meta {
  color: rgba(0, 255, 157, 0.65);
}

/* template-l | Noir 碳黑 — velvet deep vignette */
.template-l {
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(40, 40, 40, 0.6) 0%, transparent 70%),
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(20, 20, 20, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 100% 100%, rgba(20, 20, 20, 0.5) 0%, transparent 55%),
    linear-gradient(165deg, #050505 0%, #0a0a0a 30%, #111111 65%, #181818 100%);
}
.template-l .card-deco {
  background: #ffffff;
  width: 32px;
  height: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.template-l h4 {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.01em;
}

/* template-n | Gold 烫金 — metallic shimmer foil */
.template-n {
  background:
    repeating-linear-gradient(
      112deg,
      transparent 0px, transparent 12px,
      rgba(245, 200, 66, 0.04) 12px, rgba(245, 200, 66, 0.04) 13px
    ),
    radial-gradient(ellipse 55% 40% at 30% 25%, rgba(255, 210, 80, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 65%, rgba(200, 140, 20, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 35% at 60% 5%, rgba(255, 230, 120, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(180, 110, 10, 0.18) 0%, transparent 50%),
    linear-gradient(165deg, #0e0a04 0%, #1e1608 25%, #2e2010 50%, #3e2c14 75%, #4e381a 100%);
}
.template-n .card-deco {
  background: linear-gradient(90deg, #f5c842, #fad95a, #e8a820, rgba(232, 168, 32, 0));
  width: 64px;
  height: 3px;
  box-shadow: 0 0 10px rgba(245, 200, 66, 0.55);
}
.template-n h4 {
  color: #f5c842;
  font-family: "Sora", sans-serif;
  text-shadow: 0 0 20px rgba(245, 200, 66, 0.4);
}
.template-n .card-meta {
  color: rgba(245, 200, 66, 0.7);
}

/* ── LIGHT PALETTE ── */

/* template-g | Paper 稿纸 — notebook ruled lines + margin */
.template-g {
  background:
    linear-gradient(
      90deg,
      rgba(200, 80, 60, 0.22) 40px, rgba(200, 80, 60, 0.22) 41px,
      transparent 41px
    ),
    repeating-linear-gradient(
      transparent 0px, transparent 27px,
      rgba(120, 160, 200, 0.18) 27px, rgba(120, 160, 200, 0.18) 28px
    ),
    linear-gradient(160deg, #fafbfc 0%, #f0f4f8 45%, #e6ecf2 100%);
  color: #1e293b;
}
.template-g .card-deco {
  background: #334155;
  width: 34px;
  height: 3px;
}
.template-g h4 {
  color: #1e293b;
}
.template-g p {
  color: #334155;
}
.template-g .card-meta {
  color: #64748b;
}

/* template-k | Latte 拿铁 — warm cream with coffee grain */
.template-k {
  background:
    radial-gradient(ellipse 60% 45% at 75% 25%, rgba(180, 120, 60, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 55% at 20% 75%, rgba(160, 100, 50, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 0%, rgba(220, 180, 120, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #f9f1e7 0%, #f0e4d0 35%, #e8d4b8 65%, #dfc8a4 100%);
  color: #3d2b1f;
}
.template-k .card-deco {
  background: #7a5c44;
  width: 38px;
  height: 3px;
  box-shadow: 0 0 6px rgba(122, 92, 68, 0.3);
}
.template-k h4 {
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
  color: #2a1c12;
}
.template-k p {
  color: #4a3828;
}
.template-k .card-meta {
  color: #7a5c44;
}

/* ═══════════════════════════════════════════
   MARKDOWN RENDER — card body rich text
   ═══════════════════════════════════════════ */

.card-canvas .md-render {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.58;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.card-canvas .md-render span {
  display: block;
  line-height: inherit;
}

.card-canvas .md-render .md-h1 {
  font-size: 1.22em;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.22;
}

.card-canvas .md-render .md-h2 {
  font-size: 1.08em;
  font-weight: 600;
  margin-bottom: 1px;
  line-height: 1.3;
}

.card-canvas .md-render .md-h3 {
  font-size: 0.98em;
  font-weight: 600;
  opacity: 0.88;
}

.card-canvas .md-render .md-li {
  padding-left: 4px;
}

.card-canvas .md-render .md-quote {
  border-left: 3px solid rgba(255, 255, 255, 0.38);
  padding-left: 8px;
  opacity: 0.78;
  font-style: italic;
}

.card-canvas .md-render .md-blank {
  height: 0.5em;
  opacity: 0;
  pointer-events: none;
}

.card-canvas .md-render strong {
  font-weight: 700;
}

.card-canvas .md-render em {
  font-style: italic;
  opacity: 0.88;
}

.card-canvas .md-render code {
  font-family: "Sora", monospace;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.86em;
}

/* Light-background template overrides */
.template-g .md-render,
.template-g .md-render span { color: #334155; }
.template-g .md-render .md-quote { border-left-color: rgba(51, 65, 85, 0.45); }
.template-g .md-render code { background: rgba(51, 65, 85, 0.1); color: #1e293b; }

.template-k .md-render,
.template-k .md-render span { color: #4a3828; }
.template-k .md-render .md-quote { border-left-color: rgba(74, 56, 40, 0.45); }
.template-k .md-render code { background: rgba(74, 56, 40, 0.1); color: #2a1c12; }

/* ═══════════════════════════════════════════
   TYPOGRAPHY CONTROLS
   ═══════════════════════════════════════════ */

.section-sub-title {
  margin: 6px 0 2px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

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

.typo-label-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.typo-label-row small {
  font-size: 0.75rem;
  color: var(--muted);
}

.val-badge {
  font-family: "Sora", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  min-width: 22px;
  display: inline-block;
}

.typo-presets {
  margin: 0;
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(83, 192, 255, 0.22);
  border: none;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

input[type="range"]:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 2px solid rgba(6, 15, 25, 0.9);
  box-shadow: 0 0 6px rgba(83, 192, 255, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 12px rgba(83, 192, 255, 0.7);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 2px solid rgba(6, 15, 25, 0.9);
  box-shadow: 0 0 6px rgba(83, 192, 255, 0.55);
}

.output-box {
  border: 1px solid rgba(157, 203, 233, 0.32);
  border-radius: 12px;
  background: rgba(6, 17, 27, 0.78);
  padding: 10px;
}

.output-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #dff0ff;
  font-size: 0.9rem;
  line-height: 1.55;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(157, 203, 233, 0.28);
  border-radius: 12px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid rgba(157, 203, 233, 0.2);
  padding: 9px 10px;
  text-align: left;
  font-size: 0.85rem;
  vertical-align: top;
}

.table-wrap th {
  color: #ecf6ff;
  background: rgba(10, 30, 47, 0.9);
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(157, 203, 233, 0.42);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: #d8edff;
}

.footer {
  margin-top: 24px;
  padding: 18px 16px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  justify-content: center;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.18s;
}

.footer-nav a:hover {
  color: var(--brand);
}

.footer-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin: 0;
  font-size: 0.79rem;
  color: var(--muted);
  opacity: 0.72;
}

.footer-dot {
  opacity: 0.45;
}

.footer-icon {
  width: 14px;
  height: 14px;
  color: var(--brand);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.footer a {
  color: var(--brand);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ─── btn-ok (green confirm) ─── */
.btn-ok {
  color: #063520;
  background: linear-gradient(130deg, #a8f0cc 0%, #6bd5a4 45%, #4ec48a 100%);
  border-color: rgba(107, 213, 164, 0.74);
}

/* ─── md-hint (textarea label hint) ─── */
.md-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.72;
  line-height: 1.4;
  margin-top: 2px;
}

.md-hint code {
  font-family: "Sora", monospace;
  background: rgba(83, 192, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.82em;
  color: var(--brand);
}

/* ─── Background customizer ─── */
.bg-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bg-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bg-swatch {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 2px solid rgba(157, 203, 233, 0.3);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}

.bg-swatch:hover {
  transform: scale(1.18);
  border-color: rgba(157, 203, 233, 0.72);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.bg-swatch-reset {
  background: rgba(8, 20, 34, 0.72);
  color: #9fbfda;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bg-color-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
}

.bg-color-label input[type="color"] {
  width: 32px;
  height: 28px;
  border-radius: 7px;
  padding: 2px;
  border: 2px solid rgba(157, 203, 233, 0.3);
  background: rgba(8, 20, 34, 0.6);
  cursor: pointer;
}

/* ─── Platform navigation grid ─── */
.platform-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.platform-card {
  border: 1px solid rgba(152, 199, 231, 0.26);
  border-radius: 14px;
  background: rgba(8, 20, 34, 0.72);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.platform-card::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(153, 220, 255, 0.6) 50%, transparent 100%);
}

.platform-card:hover {
  border-color: rgba(153, 220, 255, 0.56);
  background: rgba(14, 33, 56, 0.92);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(83, 192, 255, 0.15);
}

.platform-card.coming-soon {
  opacity: 0.52;
  cursor: default;
}

.platform-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.platform-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.platform-name {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e0f0ff;
  line-height: 1.2;
}

.platform-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.platform-tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(83, 192, 255, 0.18);
  color: var(--brand);
  border: 1px solid rgba(83, 192, 255, 0.28);
  font-weight: 500;
}

.platform-tag.tag-soon {
  background: rgba(255, 180, 106, 0.12);
  color: var(--warm);
  border-color: rgba(255, 180, 106, 0.28);
}

/* ═══════════════════════════════════════════
   NEW CARD TEMPLATES — 12 additional designs
   (template-s through template-ad)
   ═══════════════════════════════════════════ */

/* template-s | Crystal 水晶 — glass morphism ice */
.template-s {
  background:
    radial-gradient(ellipse 80% 50% at 30% 20%, rgba(200, 240, 255, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 70%, rgba(150, 220, 255, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 60% 5%, rgba(220, 245, 255, 0.18) 0%, transparent 50%),
    linear-gradient(155deg, #061828 0%, #0c2840 30%, #133658 55%, #1a4470 80%, #225290 100%);
}
.template-s .card-deco {
  background: linear-gradient(90deg, rgba(220, 245, 255, 0.95), rgba(170, 230, 255, 0.5), transparent);
  width: 56px;
  box-shadow: 0 0 12px rgba(180, 235, 255, 0.55);
}

/* template-t | Volcano 熔岩 — lava flow */
.template-t {
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255, 80, 0, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(200, 40, 0, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 80% 30%, rgba(255, 120, 20, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(80, 10, 0, 0.5) 0%, transparent 55%),
    linear-gradient(175deg, #1a0200 0%, #3a0800 25%, #6a1400 50%, #a02000 75%, #cc3c10 100%);
}
.template-t .card-deco {
  background: linear-gradient(90deg, #ff8040, rgba(255, 120, 40, 0.5), transparent);
  width: 56px;
  box-shadow: 0 0 14px rgba(255, 80, 0, 0.6);
}

/* template-u | Arctic 极地 — frost and ice shards */
.template-u {
  background:
    repeating-linear-gradient(
      65deg,
      rgba(200, 240, 255, 0.04) 0px, rgba(200, 240, 255, 0.04) 1px,
      transparent 1px, transparent 22px
    ),
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(220, 248, 255, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(180, 235, 255, 0.14) 0%, transparent 55%),
    linear-gradient(175deg, #d8eff8 0%, #b8e0f2 30%, #8ccae8 60%, #60b0da 100%);
  color: #0c2a40;
}
.template-u .card-deco {
  background: linear-gradient(90deg, rgba(8, 60, 100, 0.8), rgba(20, 80, 130, 0.4), transparent);
  width: 50px;
}
.template-u h4 { color: #0a2235; }
.template-u .md-render,
.template-u .md-render span { color: #163850; }
.template-u .card-meta { color: rgba(12, 42, 64, 0.7); }

/* template-v | Olive 橄榄 — warm olive earth */
.template-v {
  background:
    radial-gradient(ellipse 60% 45% at 25% 20%, rgba(180, 200, 80, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 55% at 80% 70%, rgba(120, 150, 40, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 90%, rgba(60, 80, 10, 0.3) 0%, transparent 50%),
    linear-gradient(165deg, #1a1e08 0%, #2c3410 25%, #3e4c18 50%, #526422 75%, #667c2c 100%);
}
.template-v .card-deco {
  background: linear-gradient(90deg, rgba(200, 230, 100, 0.9), rgba(160, 190, 70, 0.5), transparent);
  width: 50px;
  box-shadow: 0 0 8px rgba(180, 210, 80, 0.4);
}

/* template-w | Sakura Night 暗樱 — dark night with pink blossoms */
.template-w {
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(255, 140, 180, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 15% 60%, rgba(220, 80, 140, 0.16) 0%, transparent 55%),
    radial-gradient(circle 1.5px at 25% 15%, rgba(255, 180, 210, 0.8) 0%, transparent 1.5px),
    radial-gradient(circle 1px  at 65% 10%, rgba(255, 160, 200, 0.6) 0%, transparent 1px),
    radial-gradient(circle 2px  at 85% 35%, rgba(255, 200, 225, 0.75) 0%, transparent 2px),
    radial-gradient(circle 1px  at 45% 25%, rgba(255, 170, 210, 0.5) 0%, transparent 1px),
    linear-gradient(165deg, #0e0410 0%, #200a20 30%, #360d30 55%, #4a1040 80%, #601450 100%);
}
.template-w .card-deco {
  background: linear-gradient(90deg, #ffb8d8, rgba(255, 140, 200, 0.5), transparent);
  width: 56px;
  box-shadow: 0 0 12px rgba(255, 140, 200, 0.55);
}

/* template-x | Sand 沙漠 — warm sand dunes */
.template-x {
  background:
    repeating-linear-gradient(
      170deg,
      rgba(200, 160, 80, 0.04) 0px, rgba(200, 160, 80, 0.04) 1px,
      transparent 1px, transparent 20px
    ),
    radial-gradient(ellipse 70% 50% at 30% 30%, rgba(255, 220, 140, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(200, 150, 60, 0.22) 0%, transparent 55%),
    linear-gradient(165deg, #2a1a08 0%, #4a300e 25%, #6e4814 50%, #966826 75%, #bc8c40 100%);
}
.template-x .card-deco {
  background: linear-gradient(90deg, rgba(255, 230, 160, 0.9), rgba(220, 190, 110, 0.5), transparent);
  width: 48px;
  box-shadow: 0 0 8px rgba(255, 210, 100, 0.35);
}

/* template-y | Neon 霓虹 — cyberpunk multi-neon */
.template-y {
  background:
    radial-gradient(ellipse 55% 35% at 20% 15%, rgba(255, 0, 200, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 45% 45% at 80% 30%, rgba(0, 200, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 75%, rgba(200, 0, 255, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 70% 85%, rgba(255, 200, 0, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #030008 0%, #080010 28%, #0c0018 55%, #100020 78%, #140028 100%);
}
.template-y .card-deco {
  background: linear-gradient(90deg, #ff00cc, #00ccff, rgba(0, 200, 255, 0));
  width: 72px;
  height: 3px;
  box-shadow: 0 0 12px rgba(255, 0, 200, 0.6), 0 0 24px rgba(0, 200, 255, 0.35);
}
.template-y h4 {
  font-family: "Sora", sans-serif;
  text-shadow: 0 0 18px rgba(255, 0, 200, 0.5);
}

/* template-z | Cobalt 钴蓝 — deep cobalt */
.template-z {
  background:
    radial-gradient(ellipse 65% 45% at 25% 20%, rgba(60, 120, 255, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 50% 55% at 80% 70%, rgba(30, 80, 200, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(10, 30, 120, 0.45) 0%, transparent 50%),
    linear-gradient(165deg, #020520 0%, #060c38 25%, #0c1454 50%, #101c70 75%, #162490 100%);
}
.template-z .card-deco {
  background: linear-gradient(90deg, #6080ff, rgba(80, 120, 255, 0.5), transparent);
  width: 56px;
  box-shadow: 0 0 12px rgba(60, 100, 255, 0.55);
}

/* template-aa | Parchment 羊皮 — aged paper */
.template-aa {
  background:
    radial-gradient(ellipse 50% 40% at 20% 15%, rgba(180, 140, 80, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(160, 120, 60, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 60% 5%, rgba(220, 190, 140, 0.1) 0%, transparent 45%),
    linear-gradient(165deg, #f5e8c8 0%, #ecdbb0 30%, #e4cf9e 60%, #d8c08a 100%);
  color: #3a2c1a;
}
.template-aa .card-deco {
  background: #6a5030;
  width: 36px;
  height: 2px;
}
.template-aa h4 {
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
  color: #2a1e0c;
}
.template-aa .md-render,
.template-aa .md-render span { color: #3a2c1a; }
.template-aa .md-render code { background: rgba(58, 44, 26, 0.1); color: #2a1e0c; }
.template-aa .card-meta { color: #7a6040; }

/* template-ab | Ink 水墨 — ink wash painting */
.template-ab {
  background:
    radial-gradient(ellipse 70% 50% at 30% 30%, rgba(80, 80, 90, 0.2) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 75% 70%, rgba(40, 40, 50, 0.3) 0%, transparent 60%),
    repeating-linear-gradient(
      125deg,
      rgba(100, 100, 120, 0.03) 0px, rgba(100, 100, 120, 0.03) 1px,
      transparent 1px, transparent 18px
    ),
    linear-gradient(170deg, #0a0a10 0%, #10101a 30%, #161624 60%, #1c1c2e 100%);
}
.template-ab .card-deco {
  background: rgba(200, 200, 220, 0.7);
  width: 40px;
  height: 2px;
  box-shadow: 0 0 6px rgba(200, 200, 220, 0.4);
}
.template-ab h4 {
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
  letter-spacing: 0.04em;
}

/* template-ac | Vivid 橘霞 — vivid orange-pink sky */
.template-ac {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 240, 120, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 80% 40%, rgba(255, 160, 60, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 50% 55% at 20% 70%, rgba(255, 80, 120, 0.22) 0%, transparent 55%),
    linear-gradient(165deg, #4a1020 0%, #8a2820 25%, #cc5020 50%, #e87830 70%, #f8a840 90%, #ffd060 100%);
}
.template-ac .card-deco {
  background: linear-gradient(90deg, rgba(255, 240, 180, 0.95), rgba(255, 200, 100, 0.5), transparent);
  width: 56px;
  box-shadow: 0 0 12px rgba(255, 180, 60, 0.55);
}

/* template-ad | Mint 薄荷 — fresh mint spring */
.template-ad {
  background:
    radial-gradient(ellipse 60% 45% at 30% 20%, rgba(160, 255, 220, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 50% 55% at 75% 65%, rgba(80, 220, 180, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(20, 140, 110, 0.28) 0%, transparent 50%),
    linear-gradient(165deg, #061a14 0%, #0e2e22 25%, #164234 50%, #1e5844 75%, #266e56 100%);
}
.template-ad .card-deco {
  background: linear-gradient(90deg, rgba(160, 255, 220, 0.9), rgba(100, 230, 190, 0.5), transparent);
  width: 54px;
  box-shadow: 0 0 10px rgba(100, 230, 190, 0.45);
}

/* ═══════════════════════════════════════
   AI GATEWAY — modal + panel + streaming
   ═══════════════════════════════════════ */

/* Settings button in topbar */
.ai-settings-btn {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(99,200,255,0.1);
  border-color: rgba(99,200,255,0.28);
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ai-settings-btn:hover { background: rgba(99,200,255,0.18); }

/* Modal overlay */
.ai-modal-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,10,20,0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s;
}
.ai-modal-overlay.ai-modal-open { opacity: 1; pointer-events: all; }

/* Modal box */
.ai-modal {
  background: #071626;
  border: 1px solid rgba(99,200,255,0.28);
  border-radius: 16px;
  padding: 0;
  width: min(460px, 94vw);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: translateY(8px);
  transition: transform 0.18s;
}
.ai-modal-overlay.ai-modal-open .ai-modal { transform: translateY(0); }
.ai-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(99,200,255,0.14);
  font-weight: 600; font-size: 0.98rem; color: var(--txt);
}
.ai-modal-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 2px 6px; border-radius: 6px;
  transition: background 0.12s;
}
.ai-modal-close:hover { background: rgba(255,255,255,0.08); color: var(--txt); }
.ai-modal-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.ai-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.ai-field select, .ai-field input { margin-top: 2px; }
.ai-openai-section { display: flex; flex-direction: column; gap: 10px; }
.ai-hint { font-size: 0.78rem; color: var(--muted); opacity: 0.7; line-height: 1.5; margin: 0; }
.ai-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-test-result { font-size: 0.82rem; color: var(--accent); min-height: 1.2em; margin: 0; }

/* AI panel inside tools */
.ai-panel { border-color: rgba(99,200,255,0.24); background: rgba(0,20,40,0.4); }
.ai-panel h3::before { content: "🤖 "; }
.ai-label-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  background: rgba(99,200,255,0.15); color: var(--accent);
  border: 1px solid rgba(99,200,255,0.28); border-radius: 10px;
  padding: 1px 7px; vertical-align: middle; margin-left: 6px;
}

/* Streaming output */
.ai-streaming-box {
  background: rgba(0,10,22,0.7);
  border: 1px solid rgba(99,200,255,0.18);
  border-radius: 10px; padding: 12px;
  min-height: 80px; font-size: 0.88rem;
  color: var(--txt); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
  max-height: 260px; overflow-y: auto;
}
.ai-streaming-box .ai-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--accent); margin-left: 1px;
  animation: ai-blink 0.7s infinite;
  vertical-align: text-bottom;
}
@keyframes ai-blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Score bar */
.ai-score-wrap { display: flex; align-items: center; gap: 8px; }
.ai-score-bar { flex:1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.ai-score-fill { height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(.4,0,.2,1); background: linear-gradient(90deg, #4ec48a, #63c8ff); }
.ai-score-num { font-size: 0.82rem; font-weight: 700; color: var(--accent); min-width: 28px; text-align: right; }

/* URL import row */
.url-import-row { display: flex; gap: 6px; align-items: flex-end; }
.url-import-row input { flex: 1; }
.url-import-row .btn { white-space: nowrap; flex-shrink: 0; }

/* Thinking spinner */
.ai-thinking {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--accent); opacity: 0.8;
}
.ai-thinking::before {
  content: "";
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(99,200,255,0.3);
  border-top-color: var(--accent);
  animation: ai-spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

/* Version tabs */
.ai-ver-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-ver-tab {
  font-size: 0.78rem; padding: 3px 10px; border-radius: 14px;
  border: 1px solid rgba(99,200,255,0.22);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: all 0.12s;
}
.ai-ver-tab.active, .ai-ver-tab:hover {
  background: rgba(99,200,255,0.15); color: var(--accent);
  border-color: rgba(99,200,255,0.4);
}

/* Calendar grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  border: 1px solid rgba(99,200,255,0.14);
  border-radius: 8px;
  padding: 6px 8px;
  min-height: 64px;
  font-size: 0.75rem;
  background: rgba(0,20,40,0.3);
  cursor: pointer;
  transition: border-color 0.12s;
}
.cal-cell:hover { border-color: rgba(99,200,255,0.4); }
.cal-cell.posted { opacity: 0.5; }
.cal-cell.today { border-color: var(--accent); }
.cal-day-num { font-size: 0.68rem; opacity: 0.5; margin-bottom: 3px; }
.cal-topic { line-height: 1.35; }

/* Prompt cards */
.prompt-card {
  border: 1px solid rgba(99,200,255,0.18);
  border-radius: 12px;
  background: rgba(0,20,40,0.5);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.14s, transform 0.14s;
}
.prompt-card:hover { border-color: rgba(99,200,255,0.38); transform: translateY(-1px); }
.prompt-card-tag {
  font-size: 0.7rem; font-weight: 600;
  background: rgba(99,200,255,0.1); color: var(--accent);
  border-radius: 8px; padding: 1px 8px; display: inline-block; width: fit-content;
}
.prompt-card-text { font-size: 0.84rem; line-height: 1.55; color: var(--txt); flex: 1; }
.prompt-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Video script output */
.script-section {
  border-left: 3px solid rgba(99,200,255,0.4);
  padding: 10px 12px;
  background: rgba(0,10,22,0.4);
  border-radius: 0 10px 10px 0;
  font-size: 0.88rem; line-height: 1.6;
  white-space: pre-wrap;
}
.script-section-label {
  font-size: 0.72rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.05em;
  margin-bottom: 6px; display: block;
}

@media (max-width: 980px) {
  .grid-2,
  .grid-3,
  .form-grid {
    grid-template-columns: 1fr;
  }

  body {
    padding: 12px;
  }

  .card-canvas {
    width: 100%;
  }

  .actions .btn,
  .hero-actions .btn {
    width: 100%;
  }

  .cal-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0 4px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   平台品牌变量 & 仿真发帖窗口系统  Platform Brand Tokens & Mock Windows
   ═══════════════════════════════════════════════════════════════ */

/* ── 平台品牌色 Brand Color Tokens ── */
:root {
  --x-bg: #000000;
  --x-border: #2f3336;
  --x-text: #e7e9ea;
  --x-muted: #71767b;
  --x-blue: #1d9bf0;
  --x-post-btn: #1d9bf0;

  --xhs-bg: #ffffff;
  --xhs-border: #f0f0f0;
  --xhs-text: #333333;
  --xhs-muted: #999999;
  --xhs-red: #ff2442;
  --xhs-tag-bg: #fff0f2;

  --wechat-bg: #f7f7f7;
  --wechat-border: #e5e5e5;
  --wechat-text: #191919;
  --wechat-green: #07c160;
  --wechat-header-bg: #ededed;

  --zhihu-bg: #ffffff;
  --zhihu-border: #ebebeb;
  --zhihu-text: #1a1a1b;
  --zhihu-blue: #0084ff;
  --zhihu-header-bg: #0084ff;

  --bili-bg: #f5f5f5;
  --bili-border: #e3e5e7;
  --bili-text: #18191c;
  --bili-pink: #fb7299;
  --bili-blue: #00a1d6;

  --li-bg: #ffffff;
  --li-border: #e0e0e0;
  --li-text: #000000;
  --li-blue: #0a66c2;
  --li-muted: #666666;
}

/* ── 平台选项卡导航栏 Platform Tab Bar ── */
.ptab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ptab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(150, 206, 234, 0.2);
  background: rgba(7, 18, 30, 0.5);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.ptab:hover {
  border-color: rgba(150, 206, 234, 0.45);
  color: var(--fg);
}

.ptab-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* 各平台激活态颜色 */
.ptab.active[data-p="x"]           { border-color: #1d9bf0; background: rgba(29,155,240,0.12); color: #1d9bf0; }
.ptab.active[data-p="xiaohongshu"] { border-color: #ff2442; background: rgba(255,36,66,0.1);  color: #ff2442; }
.ptab.active[data-p="wechat"]      { border-color: #07c160; background: rgba(7,193,96,0.1);   color: #07c160; }
.ptab.active[data-p="zhihu"]       { border-color: #0084ff; background: rgba(0,132,255,0.1);  color: #0084ff; }
.ptab.active[data-p="bilibili"]    { border-color: #fb7299; background: rgba(251,114,153,0.1);color: #fb7299; }
.ptab.active[data-p="linkedin"]    { border-color: #0a66c2; background: rgba(10,102,194,0.1); color: #0a66c2; }

/* ── 平台仿真窗口外框 Platform Mock Window ── */
.platform-mock-window {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(150, 206, 234, 0.2);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s;
  margin-top: 6px;
  min-height: 320px;
}

/* ── X / Twitter 风格 ── */
.pmw-x {
  background: var(--x-bg);
  border-color: var(--x-border);
}

.pmw-x-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 0;
  background: var(--x-bg);
}

.pmw-x-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d9bf0 0%, #0d6bac 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.pmw-x-textarea-wrap {
  flex: 1;
  padding: 8px 0;
}

.pmw-x-textarea-wrap textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--x-text);
  font-size: 1.05rem;
  resize: none;
  outline: none;
  min-height: 120px;
}

.pmw-x-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  border-top: 1px solid var(--x-border);
  background: var(--x-bg);
}

.pmw-x-icons {
  display: flex;
  gap: 4px;
  color: var(--x-blue);
  font-size: 1.05rem;
}

.pmw-x-icons span {
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.15s;
}

.pmw-x-icons span:hover { background: rgba(29,155,240,0.1); }

.pmw-x-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pmw-char-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #2f3336;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--x-muted);
  transition: all 0.2s;
}
.pmw-char-ring.warning { border-color: #ffd400; color: #ffd400; }
.pmw-char-ring.danger  { border-color: #f4212e; color: #f4212e; font-size: 0.7rem; }

.pmw-post-btn-x {
  background: var(--x-post-btn);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.pmw-x-audience {
  padding: 4px 14px 6px;
  background: var(--x-bg);
  font-size: 0.78rem;
  color: var(--x-blue);
  font-weight: 600;
}

/* ── 小红书 风格 ── */
.pmw-xhs {
  background: var(--xhs-bg);
  border-color: var(--xhs-border);
}

.pmw-xhs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--xhs-border);
}

.pmw-xhs-header-left {
  font-size: 0.82rem;
  color: #999;
}

.pmw-xhs-header-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--xhs-text);
}

.pmw-xhs-publish-btn {
  background: var(--xhs-red);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.pmw-xhs-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px 14px;
  background: #fff;
}

.pmw-xhs-photo {
  aspect-ratio: 1;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1.5px dashed #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ccc;
}

.pmw-xhs-photo.main-photo {
  font-size: 1.8rem;
  background: #fafafa;
}

.pmw-xhs-title-input {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--xhs-border);
  background: #fff;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--xhs-text);
  outline: none;
  box-sizing: border-box;
}

.pmw-xhs-title-input::placeholder { color: #ccc; }

.pmw-xhs-textarea-wrap {
  padding: 8px 14px;
  background: #fff;
}

.pmw-xhs-textarea-wrap textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--xhs-text);
  font-size: 0.9rem;
  resize: none;
  outline: none;
  min-height: 100px;
}

.pmw-xhs-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border-top: 1px solid var(--xhs-border);
  flex-wrap: wrap;
}

.pmw-xhs-tag {
  background: var(--xhs-tag-bg);
  color: var(--xhs-red);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.pmw-xhs-charcount {
  margin-left: auto;
  font-size: 0.75rem;
  color: #ccc;
}

/* ── 微信公众号 风格 ── */
.pmw-wechat {
  background: var(--wechat-bg);
  border-color: var(--wechat-border);
}

.pmw-wechat-titlebar {
  background: var(--wechat-header-bg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--wechat-border);
}

.pmw-wechat-backbtn {
  font-size: 0.85rem;
  color: #555;
  cursor: pointer;
}

.pmw-wechat-pagetitle {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.pmw-wechat-publishbtn {
  background: var(--wechat-green);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.pmw-wechat-body {
  padding: 12px 14px;
  background: #fff;
  flex: 1;
}

.pmw-wechat-articletitle {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--wechat-green);
  background: transparent;
  padding: 6px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wechat-text);
  outline: none;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.pmw-wechat-toolbar {
  display: flex;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--wechat-border);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pmw-wechat-toolbtn {
  font-size: 0.82rem;
  color: #555;
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
}

.pmw-wechat-body textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--wechat-text);
  font-size: 0.9rem;
  resize: none;
  outline: none;
  min-height: 120px;
  box-sizing: border-box;
}

.pmw-wechat-footer {
  padding: 8px 14px;
  background: var(--wechat-header-bg);
  font-size: 0.75rem;
  color: #999;
  text-align: right;
  border-top: 1px solid var(--wechat-border);
}

/* ── 知乎 风格 ── */
.pmw-zhihu {
  background: var(--zhihu-bg);
  border-color: var(--zhihu-border);
}

.pmw-zhihu-header {
  background: var(--zhihu-header-bg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pmw-zhihu-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

.pmw-zhihu-publishbtn {
  background: #fff;
  color: var(--zhihu-blue);
  border: none;
  border-radius: 4px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.pmw-zhihu-type-tabs {
  display: flex;
  border-bottom: 1px solid var(--zhihu-border);
  background: #fff;
}

.pmw-zhihu-type-tab {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #999;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.pmw-zhihu-type-tab.active {
  color: var(--zhihu-blue);
  border-bottom-color: var(--zhihu-blue);
  font-weight: 600;
}

.pmw-zhihu-body {
  padding: 12px 14px;
  background: #fff;
  flex: 1;
}

.pmw-zhihu-question {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--zhihu-border);
  background: transparent;
  padding: 8px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--zhihu-text);
  outline: none;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.pmw-zhihu-body textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--zhihu-text);
  font-size: 0.9rem;
  resize: none;
  outline: none;
  min-height: 120px;
  box-sizing: border-box;
}

.pmw-zhihu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f6f6f6;
  border-top: 1px solid var(--zhihu-border);
  font-size: 0.75rem;
  color: #999;
}

/* ── B站 / Bilibili 风格 ── */
.pmw-bilibili {
  background: var(--bili-bg);
  border-color: var(--bili-border);
}

.pmw-bili-header {
  background: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bili-border);
}

.pmw-bili-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bili-pink);
}

.pmw-bili-submitbtn {
  background: var(--bili-pink);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.pmw-bili-type-row {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--bili-border);
}

.pmw-bili-type-chip {
  background: #f4f4f4;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #555;
  cursor: pointer;
}

.pmw-bili-type-chip.active {
  background: rgba(251,114,153,0.12);
  color: var(--bili-pink);
  font-weight: 600;
}

.pmw-bili-cover {
  padding: 8px 14px;
  background: #fafafa;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--bili-border);
}

.pmw-bili-cover-thumb {
  width: 60px;
  height: 40px;
  background: #efefef;
  border-radius: 6px;
  border: 1.5px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #ccc;
  flex-shrink: 0;
}

.pmw-bili-cover-hint {
  font-size: 0.78rem;
  color: #999;
}

.pmw-bili-body {
  padding: 12px 14px;
  background: #fff;
  flex: 1;
}

.pmw-bili-title-input {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--bili-border);
  background: transparent;
  padding: 6px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bili-text);
  outline: none;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.pmw-bili-body textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--bili-text);
  font-size: 0.88rem;
  resize: none;
  outline: none;
  min-height: 100px;
  box-sizing: border-box;
}

.pmw-bili-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fff;
  border-top: 1px solid var(--bili-border);
  font-size: 0.75rem;
  color: #999;
}

/* ── LinkedIn 风格 ── */
.pmw-linkedin {
  background: var(--li-bg);
  border-color: var(--li-border);
}

.pmw-li-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--li-border);
  background: #fff;
}

.pmw-li-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--li-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.pmw-li-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pmw-li-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--li-text);
}

.pmw-li-audience-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.72rem;
  color: #555;
  cursor: pointer;
}

.pmw-li-body {
  padding: 12px 14px;
  background: #fff;
  flex: 1;
}

.pmw-li-body textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--li-text);
  font-size: 0.93rem;
  resize: none;
  outline: none;
  min-height: 130px;
  box-sizing: border-box;
}

.pmw-li-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid var(--li-border);
  background: #fff;
}

.pmw-li-tool {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.15s;
}

.pmw-li-tool:hover { background: #f3f2ef; }

.pmw-li-post-btn {
  margin-left: auto;
  background: var(--li-blue);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.pmw-li-charcount {
  font-size: 0.75rem;
  color: #999;
  margin-right: 6px;
}

/* ── 通用 Mock 窗口内 textarea 样式 ── */
.platform-mock-window textarea {
  font-family: inherit;
  line-height: 1.6;
}

/* ── 平台品牌卡片升级（首页用） ── */
.platform-card[data-brand="x"]           { border-left: 3px solid #1d9bf0; }
.platform-card[data-brand="xiaohongshu"] { border-left: 3px solid #ff2442; }
.platform-card[data-brand="wechat"]      { border-left: 3px solid #07c160; }
.platform-card[data-brand="zhihu"]       { border-left: 3px solid #0084ff; }
.platform-card[data-brand="bilibili"]    { border-left: 3px solid #fb7299; }
.platform-card[data-brand="linkedin"]    { border-left: 3px solid #0a66c2; }
.platform-card[data-brand="instagram"]   { border-left: 3px solid #e1306c; }
.platform-card[data-brand="youtube"]     { border-left: 3px solid #ff0000; }
.platform-card[data-brand="tiktok"]      { border-left: 3px solid #010101; }
.platform-card[data-brand="weibo"]       { border-left: 3px solid #e6162d; }
.platform-card[data-brand="douyin"]      { border-left: 3px solid #161823; }
.platform-card[data-brand="kuaishou"]    { border-left: 3px solid #ff5500; }

.platform-card:hover[data-brand="x"]           { box-shadow: 0 8px 30px rgba(29,155,240,0.2); }
.platform-card:hover[data-brand="xiaohongshu"] { box-shadow: 0 8px 30px rgba(255,36,66,0.2); }
.platform-card:hover[data-brand="wechat"]      { box-shadow: 0 8px 30px rgba(7,193,96,0.2); }
.platform-card:hover[data-brand="zhihu"]       { box-shadow: 0 8px 30px rgba(0,132,255,0.2); }
.platform-card:hover[data-brand="bilibili"]    { box-shadow: 0 8px 30px rgba(251,114,153,0.2); }
.platform-card:hover[data-brand="linkedin"]    { box-shadow: 0 8px 30px rgba(10,102,194,0.2); }
