/* ==========================================================
   夕阳果果 · 古沧龙系列茶品 —— 古风山水皮肤
   宣纸 · 远山青黛 · 墨线 · 朱砂印 · 宋体标题
   ----------------------------------------------------------
   ★ 远山为内联 SVG（data URI），零外部图片依赖，
     不受分享码网关影响，也不会因 CDN 丢失而破图。
   ★ 所有 class 名与布局骨架保持不变，仅换视觉层。
   ========================================================== */
:root{
  --paper:#f2ecdf;        /* 宣纸底 */
  --paper-2:#faf6ed;      /* 素笺白（卡片/输入） */
  --paper-3:#ebe3d2;      /* 淡宣（次级底/表头） */
  --ink:#2a2f2b;          /* 浓墨 */
  --ink-2:#5c665f;        /* 淡墨 */
  --ink-3:#939a91;        /* 远墨（弱说明） */
  --line:#d9cfbb;         /* 墨线 */
  --line-soft:#e8e0ce;    /* 淡墨线 */
  --tea:#4a6b62;          /* 远山青（主色） */
  --tea-deep:#2f4a43;     /* 深青墨（按钮/标题/链接） */
  --tea-soft:#7d9c90;     /* 远山淡青 */
  --amber:#a8833f;        /* 赭金（概率/数字） */
  --seal:#a0392c;         /* 朱砂印（点睛/警示） */
  --err:#a0392c;
  --ok:#3f6355;
  --radius:10px;
  --shadow:0 3px 18px rgba(42,47,43,.08);
  --serif:"Songti SC","STSong","SimSun","Noto Serif CJK SC","Source Han Serif SC",serif;
  /* 水墨远山：淡朱砂日 + 三层青黛山 + 水波 + 雾带 */
  --mountain:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201200%20460'%20preserveAspectRatio='xMidYMax%20slice'%3E%0A%3Ccircle%20cx='930'%20cy='120'%20r='54'%20fill='%23a0392c'%20opacity='.16'/%3E%0A%3Cpath%20d='M0%20300%20C%20120%20250%20200%20268%20300%20250%20C%20400%20232%20470%20270%20580%20258%20C%20690%20246%20760%20214%20870%20236%20C%20980%20258%201080%20232%201200%20250%20L1200%20460%20L0%20460%20Z'%20fill='%23a7b6ac'%20opacity='.50'/%3E%0A%3Cpath%20d='M0%20330%20C%20140%20300%20230%20320%20340%20306%20C%20450%20292%20520%20330%20640%20316%20C%20760%20302%20830%20280%20950%20300%20C%201060%20318%201140%20300%201200%20306%20L1200%20460%20L0%20460%20Z'%20fill='%237d9689'%20opacity='.48'/%3E%0A%3Cpath%20d='M0%20372%20C%20160%20350%20260%20372%20380%20360%20C%20500%20348%20580%20384%20700%20372%20C%20820%20360%20900%20344%201020%20362%20C%201110%20375%201160%20366%201200%20368%20L1200%20460%20L0%20460%20Z'%20fill='%23557167'%20opacity='.40'/%3E%0A%3Cg%20stroke='%23557167'%20fill='none'%20opacity='.18'%20stroke-width='2'%3E%0A%3Cpath%20d='M120%20410%20q%2040%20-8%2080%200%20t%2080%200%20t%2080%200'/%3E%0A%3Cpath%20d='M760%20424%20q%2050%20-9%20100%200%20t%20100%200%20t%20100%200'/%3E%0A%3C/g%3E%0A%3Crect%20x='0'%20y='332'%20width='1200'%20height='40'%20fill='%23f3ede1'%20opacity='.30'/%3E%0A%3C/svg%3E");
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB",
    "Microsoft YaHei",sans-serif;
  background:var(--paper);
  background-image:radial-gradient(140% 55% at 50% 0%,#f8f3e8 0%,rgba(248,243,232,0) 62%);
  background-repeat:no-repeat;
  color:var(--ink);line-height:1.8;font-size:16px;
  -webkit-font-smoothing:antialiased;
}
h1,h2{margin:0;font-weight:600;font-family:var(--serif)}
p{margin:0 0 .6em}
a{color:var(--tea-deep);text-decoration:none}

/* ---------- 顶栏：素笺 + 墨线 + 朱砂小印 ---------- */
.topbar{background:rgba(250,246,237,.94);border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:10;backdrop-filter:saturate(1.1) blur(6px)}
.topbar-inner{max-width:640px;margin:0 auto;padding:12px 20px;
  display:flex;align-items:center;gap:14px}
.logo{font-family:var(--serif);font-size:18px;font-weight:600;letter-spacing:.12em;
  color:var(--tea-deep);display:inline-flex;align-items:center;gap:9px}
.logo::before{
  content:"龍";display:inline-flex;align-items:center;justify-content:center;
  width:23px;height:23px;background:var(--seal);color:var(--paper-2);
  font-family:var(--serif);font-size:14px;line-height:1;border-radius:3px;
  letter-spacing:0;box-shadow:0 1px 3px rgba(160,57,44,.35);flex-shrink:0;
}
.logo-sub{font-size:13px;color:var(--ink-3);letter-spacing:.16em}
.back{font-size:14px;color:var(--ink-2)}
.ord-link{
  margin-left:auto;font-size:13px;color:var(--tea-deep);
  border:1px solid var(--line);border-radius:16px;padding:4px 13px;
  background:var(--paper-2);
}

/* ---------- Hero：开门见山 ---------- */
.hero{
  position:relative;overflow:hidden;text-align:center;
  padding:50px 22px 108px;border-bottom:1px solid var(--line);
  background:
    var(--mountain) center bottom / 100% auto no-repeat,
    linear-gradient(180deg,#f8f3e7 0%,#efe7d5 100%);
}
.hero::before{
  content:"";position:absolute;left:0;right:0;top:0;height:90px;pointer-events:none;
  background:radial-gradient(85% 100% at 50% 0%,rgba(74,107,98,.07),transparent 72%);
}
.brand{position:relative;font-family:var(--serif);font-size:13px;letter-spacing:.4em;
  color:var(--tea);text-indent:.4em;margin-bottom:18px}
.brand::before,.brand::after{content:"—";color:var(--line);margin:0 9px;letter-spacing:0}
.title{position:relative;font-family:var(--serif);font-size:30px;line-height:1.55;
  letter-spacing:.02em;font-weight:600;margin-bottom:14px}
.sub{position:relative;color:var(--ink-2);font-size:14.5px;line-height:1.95;margin-bottom:26px}
.price-row{position:relative;margin-bottom:26px}
.price{font-size:52px;font-weight:600;color:var(--tea-deep);letter-spacing:-.01em;
  font-family:Georgia,"Times New Roman",serif}
.price-note{color:var(--ink-3);font-size:14px;margin-left:4px}
.hero-tip{position:relative;margin-top:16px;font-size:12px;color:var(--ink-3);letter-spacing:.02em}

/* ---------- Section：素笺分段，墨线相隔 ---------- */
.section{padding:32px 20px;max-width:640px;margin:0 auto;
  border-bottom:1px solid var(--line)}
.section-title{font-family:var(--serif);font-size:20px;margin-bottom:9px;
  padding-left:14px;border-left:3px solid var(--tea)}
.section-desc{color:var(--ink-2);font-size:13.5px;margin-bottom:16px}
.section-desc b{color:var(--tea-deep)}

/* ---------- 品类分组 ---------- */
.cat-block{max-width:640px;margin:0 auto;padding:32px 20px;
  border-bottom:1px solid var(--line)}
.cat-head{margin-bottom:16px}
.cat-name{font-family:var(--serif);font-size:21px;font-weight:600;margin-bottom:4px;
  display:flex;align-items:center;gap:10px;letter-spacing:.02em}
.cat-dot{width:7px;height:7px;border-radius:50%;background:var(--seal);flex-shrink:0;
  box-shadow:0 0 0 3px rgba(160,57,44,.1)}
.cat-sub{color:var(--ink-3);font-size:13px;margin-left:18px}

/* ---------- 商品卡：素笺 + 墨线 ---------- */
.pcard{
  display:flex;gap:14px;align-items:flex-start;background:var(--paper-2);
  border:1px solid var(--line);border-radius:var(--radius);padding:16px;
  margin-bottom:12px;box-shadow:var(--shadow);transition:transform .12s;
}
.pcard:active{transform:translateY(1px)}
.pcard-thumb{
  width:62px;height:62px;border-radius:6px;flex-shrink:0;
  background:var(--paper-3);display:flex;align-items:center;justify-content:center;
  font-size:12px;color:var(--tea-deep);letter-spacing:.05em;text-align:center;
  line-height:1.3;padding:4px;font-family:var(--serif);border:1px solid var(--line-soft);
}
.pcard-thumb-img{
  width:62px;height:62px;border-radius:6px;flex-shrink:0;
  object-fit:cover;background:var(--paper-3);border:1px solid var(--line);
}
.pcard-body{flex:1;min-width:0}
.pcard-name{font-size:16px;font-weight:600;margin-bottom:3px;font-family:var(--serif)}
.pcard-sub{font-size:13px;color:var(--ink-2);margin-bottom:8px}
.pcard-foot{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.pcard-price{font-size:20px;font-weight:600;color:var(--tea-deep);
  font-family:Georgia,serif}
.pcard-price small{font-size:13px;color:var(--ink-3);font-weight:400;
  margin-left:3px;font-family:inherit}
.tag{font-size:11.5px;padding:2px 9px;border-radius:4px;white-space:nowrap;
  font-family:var(--serif);letter-spacing:.03em}
.tag-blind{background:#e6eeea;color:var(--tea-deep)}
.tag-plain{background:#eee7d7;color:var(--amber)}
.tag-custom{background:#f0e6db;color:#8a5a2b}
.tag-off{background:#ece8dc;color:var(--ink-3)}

/* ---------- 商品详情 ---------- */
.p-img-wrap{max-width:320px;margin:0 auto 18px}
.p-img{
  width:100%;border-radius:var(--radius);display:block;
  border:1px solid var(--line);background:var(--paper-3);
}
.pdetail{position:relative;overflow:hidden;max-width:640px;margin:0 auto;
  padding:28px 20px 20px;border-bottom:1px solid var(--line)}
/* 远山眉饰：淡淡山影自顶部向下淡出，不压商品图与文字 */
.pdetail::before{
  content:"";position:absolute;left:0;right:0;top:0;height:96px;pointer-events:none;
  background:var(--mountain) center bottom / 100% auto no-repeat;
  opacity:.28;
  -webkit-mask-image:linear-gradient(180deg,#000 0%,transparent 100%);
  mask-image:linear-gradient(180deg,#000 0%,transparent 100%);
}
.pdetail>*{position:relative;z-index:1}
.p-cat{font-size:12px;letter-spacing:.22em;color:var(--tea);margin-bottom:8px;
  font-family:var(--serif)}
.p-name{font-size:26px;line-height:1.4;margin-bottom:6px;letter-spacing:.01em}
.p-sub{color:var(--ink-2);font-size:14px;margin-bottom:18px}
.p-desc{color:var(--ink-2);font-size:14px;margin-top:16px}

/* ---------- 规格 ---------- */
.specs{display:flex;flex-wrap:wrap;gap:10px}
.spec{
  padding:9px 16px;border:1px solid var(--line);border-radius:6px;
  background:var(--paper-2);font-size:14px;cursor:pointer;color:var(--ink-2);
  font-family:inherit;
}
.spec.on{border-color:var(--tea);background:#e7efe9;color:var(--tea-deep);font-weight:600}

/* ---------- 概率表：宣纸表头 + 赭金概率 ---------- */
.prob-table{width:100%;border-collapse:collapse;font-size:14px;
  background:var(--paper-2);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.prob-table th{background:var(--paper-3);color:var(--tea-deep);font-weight:600;
  font-size:13px;padding:11px 8px;text-align:left;border-bottom:1px solid var(--line);
  font-family:var(--serif);letter-spacing:.02em}
.prob-table td{padding:11px 8px;border-bottom:1px solid var(--line-soft);vertical-align:top}
.prob-table tr:last-child td{border-bottom:none}
.prob-table .tier{font-weight:600;color:var(--tea-deep);white-space:nowrap;font-family:var(--serif)}
.prob-table .pct{font-family:Georgia,serif;font-weight:600;color:var(--amber);
  white-space:nowrap}
.prob-table .qty{color:var(--ink-2);font-size:13px;white-space:nowrap}
.prob-note{margin-top:14px;font-size:12.5px;color:var(--ink-3);line-height:1.75}
.prob-note b{color:var(--seal)}

/* ---------- 二级导航 ---------- */
.subnav{
  display:flex;gap:8px;padding:12px 20px;background:var(--paper-2);
  border-bottom:1px solid var(--line);overflow-x:auto;max-width:640px;margin:0 auto;
}
.subnav a{
  flex-shrink:0;padding:6px 14px;border-radius:16px;font-size:13.5px;
  background:var(--paper-3);color:var(--ink-2);border:1px solid transparent;
}

/* ---------- 智能识别：青黛提示（替掉荧绿） ---------- */
.smart-box{
  background:#edf2ec;border:1px solid #cadccd;border-radius:var(--radius);
  padding:14px;margin-bottom:18px;
}
.smart-label{display:block;font-size:13px;color:#3f6355;margin-bottom:6px}
.smart-box textarea{
  width:100%;padding:11px 12px;border:1px solid #cadccd;border-radius:8px;
  background:var(--paper-2);font-size:14px;font-family:inherit;color:var(--ink);resize:vertical;
}
.smart-box textarea:focus{outline:none;border-color:#5b8470}
.smart-row{display:flex;align-items:center;gap:12px;margin-top:10px;flex-wrap:wrap}
.btn-smart{
  padding:8px 16px;border:1px solid #3f6355;border-radius:6px;background:#3f6355;
  color:var(--paper-2);font-size:13.5px;cursor:pointer;font-family:inherit;flex-shrink:0;
}
.btn-smart:active{opacity:.85}
.smart-hint{font-size:12.5px;color:var(--ink-3)}
.smart-hint.ok{color:#3f6355}
.smart-hint.err{color:var(--err)}

/* ---------- 开盒规则 ---------- */
.rule-list{
  margin:0;padding-left:20px;font-size:13.5px;color:var(--ink-2);line-height:1.95;
}
.rule-list li{margin-bottom:9px}
.rule-list b{color:var(--ink)}
.agree-ship{
  margin:10px 0 0;padding:10px 12px;background:#edf2ec;border-radius:6px;
  font-size:12px;color:#3f6355;line-height:1.75;
}

/* ---------- 发货提示 ---------- */
.ship-note{
  margin-top:12px;padding:11px 13px;background:#edf2ec;border-left:3px solid #5b8470;
  border-radius:0 8px 8px 0;font-size:12.5px;color:#3f6355;line-height:1.75;
}

/* ---------- 表单 ---------- */
.field{margin-bottom:14px}
.field label{display:block;font-size:13px;color:var(--ink-2);margin-bottom:5px}
.field input,.field textarea{width:100%;padding:12px 13px;border:1px solid var(--line);
  border-radius:8px;background:var(--paper-2);font-size:15px;color:var(--ink);
  font-family:inherit;transition:border-color .15s}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--tea)}
.field textarea{resize:vertical}

.agree-box{background:var(--paper-2);border:1px solid var(--line);
  border-radius:var(--radius);padding:14px 14px 10px;margin:18px 0}
.agree{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;
  color:var(--ink-2);margin-bottom:9px;cursor:pointer;line-height:1.6}
.agree input{width:17px;height:17px;margin:2px 0 0;flex-shrink:0;
  accent-color:var(--tea);cursor:pointer}
.agree b{color:var(--seal)}

/* ---------- 按钮：深青墨 + 宋体 + 字距 ---------- */
.btn-primary{display:block;width:100%;padding:15px;border:1px solid var(--tea-deep);
  border-radius:8px;
  background:linear-gradient(135deg,#3c5a52 0%,#2f4a43 100%);color:var(--paper-2);
  font-size:16.5px;font-weight:600;cursor:pointer;font-family:var(--serif);
  letter-spacing:.14em;text-align:center;box-shadow:0 4px 14px rgba(47,74,67,.22)}
.btn-primary:active{transform:translateY(1px)}
.btn-primary:disabled{background:#c4c0b3;border-color:#c4c0b3;
  box-shadow:none;color:var(--paper-2);cursor:not-allowed}
.btn-ghost{display:block;width:100%;margin-top:14px;padding:12px;
  border:1px solid var(--line);border-radius:8px;background:transparent;
  color:var(--tea-deep);font-size:15px;cursor:pointer;font-family:var(--serif);
  letter-spacing:.08em}
.form-err{color:var(--err);font-size:13.5px;margin-top:10px;min-height:20px;
  text-align:center}

/* ---------- 开盒结果：揭晓卷轴 + 朱砂「開」印 + 山水收底 ---------- */
.result-card{
  position:relative;overflow:hidden;
  background:
    var(--mountain) center bottom / 100% auto no-repeat,
    linear-gradient(180deg,#faf6ed 0%,#f2ecdf 100%);
  border:1px solid var(--line);border-radius:var(--radius);
  padding:34px 20px 62px;text-align:center;
  box-shadow:var(--shadow);animation:pop .5s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop{from{opacity:0;transform:scale(.94) translateY(8px)}to{opacity:1;transform:none}}
/* 朱砂方印：默认品牌「茶」印；盲盒开奖由 JS 加 .is-draw 切换为「開」印 */
.result-card::before{
  content:"茶";position:absolute;top:16px;right:16px;
  width:38px;height:38px;display:flex;align-items:center;justify-content:center;
  background:var(--seal);color:var(--paper-2);font-family:var(--serif);font-size:21px;
  border-radius:4px;box-shadow:0 2px 8px rgba(160,57,44,.3);
  transform:rotate(-4deg);opacity:.92;line-height:1;
}
.result-card.is-draw::before{content:"開"}
.result-tier{position:relative;font-family:var(--serif);font-size:28px;font-weight:600;
  color:var(--tea-deep);margin-bottom:10px;letter-spacing:.04em}
.result-content{position:relative;font-size:15px;color:var(--ink-2);margin-bottom:14px}
.result-hash{position:relative;font-size:11px;color:var(--ink-3);
  font-family:ui-monospace,Menlo,Consolas,monospace;word-break:break-all;
  line-height:1.5;border-top:1px dashed var(--line);padding-top:12px;
  background:rgba(250,246,237,.55)}

/* ---------- 条款 ---------- */
.terms-body{font-size:14px;color:var(--ink-2);line-height:1.9}
.terms-body p{margin-bottom:12px}
.terms-body b{color:var(--ink)}

/* ---------- Footer：远山收尾 ---------- */
.foot{position:relative;overflow:hidden;padding:30px 20px 62px;text-align:center;
  font-size:12px;color:var(--ink-3);line-height:2}
.foot::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:78px;
  background:var(--mountain) center bottom / 100% auto no-repeat;
  opacity:.5;pointer-events:none;
}
.foot p{position:relative;z-index:1}
/* ★ 公众号名（注册名「夕阳果果6789」）与站内品牌「夕阳果果」要系上。
     账号名带着数字，用户从公众号点进来会愣一下——一行小字就够，不必改注册名。 */
.foot-wx{position:relative;z-index:1;opacity:.78;letter-spacing:.04em}

@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.fade-up{animation:fadeUp .4s ease-out}
@keyframes shake{
  0%,100%{transform:rotate(0)}
  15%{transform:rotate(-2.5deg)}30%{transform:rotate(2.5deg)}
  45%{transform:rotate(-1.8deg)}60%{transform:rotate(1.8deg)}
  75%{transform:rotate(-.8deg)}
}
.opening{animation:shake .5s ease-in-out}

/* ---------- 发货说明（详情页始终可见） ---------- */
.p-ship{
  font-size:13px;color:var(--tea-deep);background:var(--paper-3);
  border:1px solid var(--line);border-radius:8px;
  padding:9px 12px;margin-top:12px;line-height:1.6;
}

/* ---------- 详情图画廊 ---------- */
.p-gallery{
  display:flex;gap:10px;overflow-x:auto;padding:4px 2px 10px;
  margin-top:14px;-webkit-overflow-scrolling:touch;
}
.p-gallery .g-item{
  flex:0 0 auto;width:160px;height:160px;object-fit:cover;
  border-radius:10px;border:1px solid var(--line);background:var(--paper-3);
}

/* ---------- 备货中提示 ---------- */
.presale-note{
  font-size:13px;color:#7a5a2e;background:#fbf3e2;
  border:1px solid #ecd9b0;border-radius:8px;
  padding:10px 12px;margin-bottom:14px;line-height:1.7;
}

/* ---------- 轻提示 toast ---------- */
.x-toast{
  position:fixed;left:50%;bottom:34px;transform:translateX(-50%) translateY(8px);
  background:rgba(40,44,40,.94);color:#fff;padding:11px 20px;border-radius:22px;
  font-size:13.5px;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;
  z-index:999;max-width:84%;text-align:center;line-height:1.5;
}
.x-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
