/* ============================================================
   草稿纸 ScratchPad 官方商店 · 品牌视觉
   暖纸底色 · 墨色文字 · 品牌蓝点缀 · 圆角卡片 · 柔和阴影
   ============================================================ */

:root {
  --paper: #FAF6EE;          /* 暖纸底 */
  --paper-2: #F3ECDD;        /* 深一档纸 */
  --ink: #2B2925;            /* 墨色文字 */
  --ink-soft: #6E675C;       /* 次级文字 */
  --ink-faint: #A49E91;      /* 弱文字 */
  --line: #E6DED0;           /* 分隔线 */
  --blue: #4F86F7;           /* 品牌蓝 */
  --blue-deep: #3D74E0;
  --blue-soft: #EAF1FE;
  --warm: #F6C945;           /* 暖黄点缀（Pro 徽章） */
  --card: #FFFFFF;
  --ok: #2F855A;
  --danger: #C53030;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(43, 41, 37, 0.08);
  --shadow-lg: 0 18px 50px rgba(43, 41, 37, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 85% -10%, #F3E7D2 0%, transparent 55%),
    radial-gradient(900px 400px at -10% 20%, #E9EFFD 0%, transparent 50%),
    var(--paper);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

/* 纸张网格质感（极淡） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(43, 41, 37, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  z-index: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
  box-shadow: 0 4px 12px rgba(79, 134, 247, 0.35);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  transition: color .15s;
}
.nav-links a:hover { color: var(--blue); }
.btn-buy {
  background: var(--blue);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(79, 134, 247, 0.35);
}
.btn-buy:hover { background: var(--blue-deep); }

/* ---------------- Hero ---------------- */
.hero { padding: 84px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.hero h1 .hl {
  color: var(--blue);
  position: relative;
}
.hero .sub {
  margin-top: 18px;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 480px;
}
.hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 16px; font-weight: 700;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 20px rgba(79,134,247,.4); }
.btn-primary:hover { background: var(--blue-deep); box-shadow: 0 8px 26px rgba(79,134,247,.5); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-warm { background: var(--warm); color: #5B4A00; box-shadow: 0 6px 18px rgba(246,201,69,.35); }
.btn-warm:hover { filter: brightness(1.04); }

/* Hero 右侧：草稿纸演示卡片 */
.demo {
  position: relative;
  height: 420px;
}
.demo-card {
  position: absolute;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 18px;
  animation: float 6s ease-in-out infinite;
}
.demo-card.dc1 {
  top: 10px; left: 20px; width: 300px; transform: rotate(-3deg);
}
.demo-card.dc2 {
  top: 150px; right: 0; width: 250px; transform: rotate(2deg);
  animation-delay: 1.5s;
}
.demo-card.dc3 {
  bottom: 10px; left: 80px; width: 200px; transform: rotate(-1deg);
  animation-delay: 3s;
}
@keyframes float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}
.demo-note {
  background: #FFF59D;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(43,41,37,.1);
  border: 2px dashed #B7791F;
  position: relative;
}
.demo-note::after {
  content: "";
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: #B7791F;
}
.demo-note.blue { background: #DBEAFE; border-color: #3B82F6; }
.demo-note.blue::after { background: #3B82F6; }
.demo-stroke {
  margin-top: 12px;
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
}
.demo-stroke.s2 { margin-top: 7px; background: linear-gradient(90deg, #8B5CF6, #6D28D9); }
.demo-title {
  font-weight: 800; font-size: 15px;
  margin-bottom: 6px;
  color: var(--ink);
}
.demo-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: #B7791F;
  background: rgba(255,245,157,.6);
  padding: 2px 8px; border-radius: 999px;
}

/* ---------------- 区块通用 ---------------- */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .kicker {
  display: inline-block;
  font-size: 13px; font-weight: 800;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 34px; font-weight: 900; }
.section-head p { margin-top: 12px; color: var(--ink-soft); }

/* ---------------- 功能网格 ---------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .15s, box-shadow .2s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--blue-soft);
  margin-bottom: 16px;
}
.feat h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.feat p { font-size: 14px; color: var(--ink-soft); }

/* ---------------- 商店区 ---------------- */
.shop { background: var(--paper-2); border-radius: 28px; padding: 56px 40px; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 10px;
}
.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .2s;
  position: relative;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product .badge {
  position: absolute; top: -12px; right: 20px;
  background: var(--warm);
  color: #5B4A00;
  font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(246,201,69,.4);
}
.product .p-name { font-size: 20px; font-weight: 900; }
.product .p-price {
  margin: 14px 0 4px;
  font-size: 34px; font-weight: 900;
  color: var(--ink);
}
.product .p-price .unit { font-size: 16px; font-weight: 600; color: var(--ink-faint); margin-right: 2px; }
.product .p-desc { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.product .p-feats { margin: 18px 0 22px; list-style: none; flex: 1; }
.product .p-feats li {
  font-size: 14px; color: var(--ink-soft);
  padding: 5px 0 5px 26px;
  position: relative;
}
.product .p-feats li::before {
  content: "✓";
  position: absolute; left: 2px; top: 5px;
  color: var(--ok); font-weight: 800;
}
.product .p-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.product .p-btns .btn { padding: 10px 18px; font-size: 14px; }

/* ---------------- 购买流程 ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff; font-weight: 800;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.step h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--ink-soft); }

/* ---------------- 通知条 ---------------- */
.notice {
  background: var(--blue-soft);
  border: 1px solid #CFE0FC;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--blue-deep);
  display: flex; gap: 10px; align-items: flex-start;
}

/* ---------------- FAQ ---------------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-q {
  padding: 18px 22px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-q .arrow { transition: transform .2s; color: var(--ink-faint); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 22px 20px; }

/* ---------------- 页脚 ---------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--ink-faint);
  font-size: 13px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}

/* ---------------- 模态 ---------------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(30, 27, 22, 0.5);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow: auto;
}
.modal h3 { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.modal .m-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px; font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #FDFBF6;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  background: #fff;
}
.field textarea { min-height: 70px; resize: vertical; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.btn-close {
  background: transparent; color: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.btn-close:hover { border-color: var(--ink-faint); }
.msg { font-size: 14px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; }
.msg.ok { background: #E6F6EC; color: var(--ok); }
.msg.err { background: #FDE8E8; color: var(--danger); }
.msg.info { background: var(--blue-soft); color: var(--blue-deep); }
.code-display {
  background: #1E1B16; color: #F6C945;
  font-family: Consolas, monospace;
  font-size: 15px;
  padding: 14px;
  border-radius: 10px;
  word-break: break-all;
  margin-top: 8px;
  user-select: all;
}

/* ---------------- 后台 ---------------- */
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
}
.order-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #FDFBF6;
}
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-head .st {
  font-size: 12px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}
.st-pending { background: #FEF3C7; color: #92400E; }
.st-shipped { background: #E6F6EC; color: var(--ok); }
.order-meta { color: var(--ink-soft); font-size: 13px; margin-top: 8px; }
.order-meta span { margin-right: 16px; }
.order-code { margin-top: 10px; font-family: Consolas, monospace; font-size: 14px; color: var(--ok); word-break: break-all; }
.order-actions { margin-top: 12px; }
.gen-tool { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 18px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 34px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .demo { height: 340px; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .shop { padding: 36px 20px; }
  .nav-links a:not(.btn-buy) { display: none; }
}
