:root {
  --primary: #D97757;
  --primary-dark: #C2603F;
  --primary-soft: #FBEEE8;
  --bg: #F5F4F1;
  --card: #FFFFFF;
  --border: #E8E5DF;
  --text: #2B2A27;
  --muted: #77736B;
  --success: #3E8E5E;
  --success-soft: #E7F3EC;
  --danger: #C2473B;
  --danger-soft: #FBEAE8;
  --warn: #B7791F;
  --warn-soft: #FDF3E1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .04), 0 4px 16px rgba(40, 30, 20, .05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; height: 62px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--primary);
  color: #fff; display: grid; place-items: center; font-size: 16px;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text); padding: 8px 14px; border-radius: 9px; font-size: 14.5px; }
.nav-links a:hover, .nav-links a.active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--text); }

.notice {
  background: var(--primary-soft); color: #8A4A32; font-size: 14px;
  border-bottom: 1px solid #F3D9CD;
}
.notice .container { padding-top: 9px; padding-bottom: 9px; display: flex; gap: 8px; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s;
  background: var(--primary); color: #fff; font-family: inherit; white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); color: var(--text); border-color: #D6D2CA; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #33774E; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #A63B30; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-block { width: 100%; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 24px; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
}
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); border-color: #F3D9CD; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: #CBE5D5; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #F2CFCA; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #F3DDB3; }

.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-title { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.section-sub { color: var(--muted); margin: 4px 0 0; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(217, 119, 87, .15); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 44px; line-height: 1.15; margin: 10px 0 14px; letter-spacing: -.02em; }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 0 0 26px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  border-radius: 22px; padding: 26px; min-height: 300px; position: relative; overflow: hidden;
  background: linear-gradient(145deg, #E58A6B 0%, #D97757 45%, #B95E40 100%); color: #fff;
  box-shadow: 0 20px 50px rgba(185, 94, 64, .25);
}
.hero-visual .window {
  background: rgba(255, 255, 255, .95); border-radius: 12px; color: var(--text); padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}
.window-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: #E8E5DF; display: block; }
.window-dots i:first-child { background: #F0938A; } .window-dots i:nth-child(2) { background: #F3C55E; } .window-dots i:nth-child(3) { background: #7FC690; }
.window-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.window-row.on { background: var(--primary-soft); }
.window-row .dot { width: 26px; height: 26px; border-radius: 7px; background: var(--bg); display: grid; place-items: center; font-size: 14px; }
.hero-visual .ver { position: absolute; right: 22px; bottom: 18px; font-size: 13px; opacity: .85; }

/* ---------- 特性卡片 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft);
  display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; overflow: hidden;
}
.feature-icon img { width: 28px; height: 28px; object-fit: contain; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- 套餐 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { padding: 24px; display: flex; flex-direction: column; position: relative; transition: transform .15s, box-shadow .15s; }
.plan:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(40, 30, 20, .08); }
.plan.hot { border: 2px solid var(--primary); }
.plan .ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}
.plan h3 { margin: 0; font-size: 17px; }
.plan .plan-tag { color: var(--muted); font-size: 13.5px; margin: 4px 0 16px; min-height: 21px; }
.price { font-size: 32px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.price small { font-size: 16px; font-weight: 700; margin-right: 2px; }
.plan .stock { font-size: 13px; margin: 6px 0 18px; }
.plan .btn { margin-top: auto; }

/* ---------- 商品网格 ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font-size: 14px; cursor: pointer; color: var(--text); font-family: inherit;
}
.tab:hover { border-color: #D6D2CA; }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.goods { padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform .15s, box-shadow .15s; }
.goods:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(40, 30, 20, .08); }
.goods-top { display: flex; gap: 12px; align-items: center; }
.goods-icon {
  width: 52px; height: 52px; border-radius: 13px; flex: none; overflow: hidden;
  background: var(--primary-soft); display: grid; place-items: center; font-size: 24px; font-weight: 700; color: var(--primary);
}
.goods-icon img { width: 100%; height: 100%; object-fit: cover; }
.goods h3 { margin: 0; font-size: 15.5px; line-height: 1.35; }
.goods .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.goods-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); }
.goods .price { font-size: 22px; color: var(--primary-dark); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

/* ---------- 详情页 ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 18px 44px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 14.5px; top: 30px; bottom: 2px; width: 1px; background: #F0CFC1; }
.download-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.download { display: flex; align-items: center; gap: 16px; padding: 22px; }
.download .os { width: 54px; height: 54px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; font-size: 26px; flex: none; }
.download .grow { flex: 1; }
.download h3 { margin: 0; font-size: 16.5px; }

/* ---------- 订单 ---------- */
.narrow { max-width: 760px; margin: 0 auto; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.status-hero { text-align: center; padding: 28px 20px 20px; }
.status-hero .icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-size: 30px; }
.status-hero h2 { margin: 0 0 6px; }
.amount-big { font-size: 40px; font-weight: 800; color: var(--primary-dark); letter-spacing: -.02em; }
.code-list { display: flex; flex-direction: column; gap: 10px; }
.code-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: #FBFAF8; border: 1px dashed #DCC8BE;
}
.code-item code { flex: 1; font-size: 15px; word-break: break-all; font-family: ui-monospace, Consolas, monospace; }
.tip-box { background: var(--primary-soft); border-radius: 10px; padding: 14px 16px; font-size: 14px; color: #7A4430; white-space: pre-line; }
.order-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.order-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 弹窗 / Toast ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 24, 20, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s;
}
.modal { width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; padding: 26px; animation: pop .18s; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.buy-summary { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--bg); border-radius: 12px; margin-bottom: 18px; }
.qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; width: max-content; overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: #fff; font-size: 18px; cursor: pointer; }
.qty input { width: 56px; height: 38px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-size: 15px; }
.total-row { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 18px; }
.total-row .price { color: var(--primary-dark); font-size: 26px; }

.toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2B2A27; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); animation: pop .18s; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }

.footer { border-top: 1px solid var(--border); padding: 30px 0 40px; margin-top: 30px; color: var(--muted); font-size: 13.5px; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.skeleton { background: linear-gradient(90deg, #EEECE8 25%, #F6F5F2 50%, #EEECE8 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 160px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero-visual { min-height: auto; }
  .feature-grid, .plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .info-grid, .download-row { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  .kv { grid-template-columns: 90px 1fr; }
  /* 手机上装饰窗口与下方特性卡片内容重复，隐藏以缩短首屏 */
  .hero-visual { display: none; }
  .footer .container > div { text-align: left !important; }
}
@media (max-width: 480px) {
  .plan-grid { grid-template-columns: 1fr; }
  .feature { padding: 16px; }
  .feature-icon { width: 40px; height: 40px; font-size: 19px; margin-bottom: 10px; }
  .feature h3 { font-size: 15px; }
  .feature p { font-size: 13px; }
  .hero h1 { font-size: 30px; }
}
