:root {
  color-scheme: light;
  --page: #f4f0e8;
  --paper: #fffdf8;
  --paper-deep: #fbf5eb;
  --panel: #f8f2e8;
  --ink: #211e1b;
  --muted: #756f68;
  --soft: #a49a90;
  --line: #e5ddd0;
  --line-strong: #d8cfc2;
  --red: #d9463f;
  --red-deep: #b8322c;
  --red-soft: #fff0ee;
  --green: #27766f;
  --green-soft: #e8f3ef;
  --gold: #bd8540;
  --shadow-sm: 0 10px 26px rgba(56, 43, 32, 0.07);
  --shadow-md: 0 22px 56px rgba(56, 43, 32, 0.1);
  --shadow-lg: 0 34px 90px rgba(56, 43, 32, 0.15);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52) 0 25%, transparent 25% 50%, rgba(255, 255, 255, 0.38) 50% 75%, transparent 75%) 0 0 / 28px 28px,
    radial-gradient(circle at 18% 10%, rgba(217, 70, 63, 0.08), transparent 30%),
    radial-gradient(circle at 84% 16%, rgba(39, 118, 111, 0.09), transparent 32%),
    linear-gradient(180deg, #f9f5ed 0%, var(--page) 52%, #eee7dc 100%);
  color: var(--ink);
  font-family:
    "Microsoft YaHei UI",
    "HarmonyOS Sans SC",
    "PingFang SC",
    "Source Han Sans SC",
    sans-serif;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(33, 30, 27, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(33, 30, 27, 0.028) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

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

.miniapp-page {
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 56px;
}

.miniapp-shell {
  overflow: hidden;
  border: 1px solid rgba(216, 207, 194, 0.92);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 242, 232, 0.96)),
    var(--paper);
  box-shadow: var(--shadow-lg);
}

.miniapp-header {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(253, 247, 238, 0.92)),
    var(--paper);
}

.mini-status-row,
.mini-title-row,
.product-intro,
.card-head,
.dock-head,
.note-author,
.note-metrics,
.result-card-head,
.bottom-action-bar,
.brand-chip,
.mini-window-tools,
.step-tabs,
.chips {
  display: flex;
  align-items: center;
}

.mini-status-row {
  justify-content: space-between;
  min-height: 34px;
  padding: 0 24px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.mini-window-tools {
  gap: 8px;
  min-width: 78px;
  min-height: 30px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.mini-window-tools span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.mini-title-row {
  justify-content: space-between;
  gap: 18px;
  padding: 8px 24px 10px;
}

.brand-chip {
  gap: 10px;
  min-height: 40px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.brand-chip span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.brand-chip strong {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.mini-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mini-nav a {
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.mini-nav a:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.product-intro {
  justify-content: space-between;
  gap: 28px;
  padding: 6px 28px 22px;
}

.product-intro > div:first-child {
  max-width: 760px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--red-deep);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.product-intro p,
.scenario-grid p,
.support-strip p,
.promo-copy p,
.faq-grid p,
.publish-preview p {
  color: var(--muted);
  line-height: 1.78;
}

.product-intro p {
  margin-bottom: 0;
  font-size: 15px;
}

.product-note {
  min-width: 260px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-sm);
}

.product-note span,
.save-state,
.scenario-grid span,
.support-strip span {
  display: inline-flex;
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.product-note strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.48;
}

.miniapp-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(248, 242, 232, 0.65), rgba(244, 238, 228, 0.72));
}

.input-card,
.result-dock,
.publish-preview,
.result-card,
.scenario-grid article,
.support-strip article,
.faq-grid article,
.promo-video-frame {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-md);
}

.input-card,
.result-dock {
  border-radius: var(--radius-lg);
}

.input-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.card-head,
.dock-head {
  justify-content: space-between;
  gap: 14px;
}

.card-head h2,
.dock-head h2 {
  margin-bottom: 0;
}

.save-state {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--red-soft);
}

.step-tabs {
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-deep);
}

.step-tabs span {
  flex: 1;
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.step-tabs span:first-child {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(56, 43, 32, 0.08);
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-grid-bottom {
  align-items: end;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.featured-field label::after {
  content: "  必填";
  color: var(--red);
  font-size: 11px;
  font-weight: 950;
}

select,
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fffaf2;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

select,
input[type="text"] {
  min-height: 48px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px;
  border-radius: 16px;
  line-height: 1.74;
}

.input-textarea {
  min-height: 92px;
}

.compact-output {
  min-height: 94px;
}

select:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: rgba(217, 70, 63, 0.66);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(217, 70, 63, 0.09);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--ink);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.bottom-action-bar {
  z-index: 5;
  gap: 8px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(229, 221, 208, 0.92);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 16px 34px rgba(56, 43, 32, 0.12);
  backdrop-filter: blur(18px);
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.primary-button {
  flex: 1;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(33, 30, 27, 0.18);
}

.secondary-button {
  gap: 7px;
  min-height: 48px;
  padding: 0 16px;
  border-color: rgba(39, 118, 111, 0.26);
  background: #edf7f3;
  color: var(--green);
  font-weight: 950;
}

.icon-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-color: var(--line);
  background: #fffaf2;
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(56, 43, 32, 0.12);
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.primary-button svg,
.secondary-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 14px 0 0 currentColor;
  animation: pulse-dot 0.8s ease-in-out infinite alternate;
}

@keyframes pulse-dot {
  from {
    opacity: 0.4;
    transform: translateX(-2px);
  }

  to {
    opacity: 1;
    transform: translateX(2px);
  }
}

.result-dock {
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(251, 245, 235, 0.92)),
    var(--paper);
}

.publish-preview {
  overflow: hidden;
  margin: 14px 0;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.preview-cover {
  min-height: 152px;
  padding: 22px;
  display: grid;
  align-content: end;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(217, 70, 63, 0.92), rgba(189, 133, 64, 0.86)),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.42), transparent 28%);
  color: #fff;
}

.preview-cover span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 950;
}

.preview-cover strong {
  max-width: 680px;
  font-size: clamp(24px, 2.55vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.note-author {
  gap: 12px;
  padding: 15px 18px 0;
}

.avatar-dot {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 32% 25%, #fff 0 10%, transparent 11%),
    linear-gradient(135deg, var(--red), var(--gold));
}

.note-author strong,
.note-author small {
  display: block;
}

.note-author small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.publish-preview p {
  margin: 13px 18px 0;
}

.note-metrics {
  justify-content: space-between;
  gap: 10px;
  margin: 14px 18px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
}

.result-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  box-shadow: none;
  background: rgba(255, 253, 248, 0.78);
}

.result-card:nth-child(2) {
  grid-row: span 2;
}

.result-card:nth-child(2) textarea {
  min-height: 304px;
}

.result-card-head {
  justify-content: space-between;
  gap: 12px;
}

.result-card-head span {
  color: var(--red);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.result-card textarea {
  border: 0;
  background: #f8f2e9;
  box-shadow: inset 0 0 0 1px rgba(229, 221, 208, 0.68);
}

.chips {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.support-strip,
.scenario-section,
.promo-video-section,
.faq-section {
  margin-top: 18px;
}

.support-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.support-strip article,
.scenario-grid article,
.faq-grid article {
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.support-strip span,
.scenario-grid span {
  margin-bottom: 12px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.scenario-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.promo-video-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow-md);
}

.promo-copy h2 {
  font-size: clamp(24px, 2.8vw, 38px);
}

.promo-video-frame {
  padding: 10px;
  border-radius: 22px;
  background: #fff;
}

.promo-video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #1e1b18;
  object-fit: cover;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(33, 30, 27, 0.2);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 1060px) {
  .product-intro,
  .miniapp-layout,
  .promo-video-section {
    grid-template-columns: 1fr;
  }

  .product-intro {
    align-items: stretch;
  }

  .product-note {
    min-width: 0;
  }

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

  .result-card:nth-child(2) {
    grid-row: auto;
  }

  .result-card:nth-child(2) textarea {
    min-height: 230px;
  }
}

@media (max-width: 760px) {
  .miniapp-page {
    width: min(100% - 16px, 1280px);
    padding-top: 8px;
  }

  .miniapp-shell {
    border-radius: 26px;
  }

  .mini-status-row,
  .mini-title-row,
  .product-intro {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mini-title-row,
  .product-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .miniapp-layout {
    padding: 10px;
  }

  .input-card,
  .result-dock {
    padding: 14px;
    border-radius: 22px;
  }

  .step-tabs {
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
  }

  .step-tabs span {
    justify-content: flex-start;
    place-items: center start;
    padding-left: 12px;
  }

  .field-grid,
  .support-strip,
  .scenario-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .bottom-action-bar {
    position: sticky;
    bottom: 8px;
  }

  .primary-button,
  .secondary-button {
    padding: 0 12px;
  }

  .preview-cover {
    min-height: 150px;
    padding: 20px;
  }

  .preview-cover strong {
    font-size: 25px;
  }

  .note-metrics {
    align-items: flex-start;
    flex-direction: column;
  }

  .promo-video-section {
    padding: 14px;
    border-radius: 22px;
  }
}
