:root{
  --pix-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 15 7%22 shape-rendering=%22crispEdges%22%3E%3Cdefs%3E%3ClinearGradient id=%22pixg%22 x1=%220%22 y1=%220%22 x2=%2215%22 y2=%227%22 gradientUnits=%22userSpaceOnUse%22%3E%3Cstop offset=%220%22 stop-color=%22%238b5cf6%22/%3E%3Cstop offset=%221%22 stop-color=%22%233b82f6%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill=%22url(%23pixg)%22%3E%3Crect x=%220%22 y=%220%22 width=%224%22 height=%221%22/%3E%3Crect x=%226%22 y=%220%22 width=%223%22 height=%221%22/%3E%3Crect x=%2210%22 y=%220%22 width=%221%22 height=%221%22/%3E%3Crect x=%2214%22 y=%220%22 width=%221%22 height=%221%22/%3E%3Crect x=%220%22 y=%221%22 width=%221%22 height=%221%22/%3E%3Crect x=%224%22 y=%221%22 width=%221%22 height=%221%22/%3E%3Crect x=%227%22 y=%221%22 width=%221%22 height=%221%22/%3E%3Crect x=%2210%22 y=%221%22 width=%221%22 height=%221%22/%3E%3Crect x=%2214%22 y=%221%22 width=%221%22 height=%221%22/%3E%3Crect x=%220%22 y=%222%22 width=%221%22 height=%221%22/%3E%3Crect x=%224%22 y=%222%22 width=%221%22 height=%221%22/%3E%3Crect x=%227%22 y=%222%22 width=%221%22 height=%221%22/%3E%3Crect x=%2211%22 y=%222%22 width=%221%22 height=%221%22/%3E%3Crect x=%2213%22 y=%222%22 width=%221%22 height=%221%22/%3E%3Crect x=%220%22 y=%223%22 width=%224%22 height=%221%22/%3E%3Crect x=%227%22 y=%223%22 width=%221%22 height=%221%22/%3E%3Crect x=%2212%22 y=%223%22 width=%221%22 height=%221%22/%3E%3Crect x=%220%22 y=%224%22 width=%221%22 height=%221%22/%3E%3Crect x=%227%22 y=%224%22 width=%221%22 height=%221%22/%3E%3Crect x=%2211%22 y=%224%22 width=%221%22 height=%221%22/%3E%3Crect x=%2213%22 y=%224%22 width=%221%22 height=%221%22/%3E%3Crect x=%220%22 y=%225%22 width=%221%22 height=%221%22/%3E%3Crect x=%227%22 y=%225%22 width=%221%22 height=%221%22/%3E%3Crect x=%2210%22 y=%225%22 width=%221%22 height=%221%22/%3E%3Crect x=%2214%22 y=%225%22 width=%221%22 height=%221%22/%3E%3Crect x=%220%22 y=%226%22 width=%221%22 height=%221%22/%3E%3Crect x=%226%22 y=%226%22 width=%223%22 height=%221%22/%3E%3Crect x=%2210%22 y=%226%22 width=%221%22 height=%221%22/%3E%3Crect x=%2214%22 y=%226%22 width=%221%22 height=%221%22/%3E%3C/g%3E%3C/svg%3E");
  --primary: hsl(250 80% 60%);
  --primary-deep: hsl(250 70% 50%);
  --blue: hsl(220 90% 55%);
  --bg: hsl(245 40% 98%);
  --card: #fff;
  --text: hsl(240 20% 20%);
  --muted: hsl(240 10% 50%);
  --border: hsl(240 15% 91%);
  --warning: hsl(35 90% 50%);
  --success: hsl(155 60% 40%);
  --danger: hsl(0 70% 55%);
  --grad: linear-gradient(135deg, hsl(250 85% 60%), hsl(220 90% 52%));
  --shadow: 0 6px 24px hsl(250 40% 50% / .10);
  --radius: 18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;
  background:var(--bg);color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased;
}
.wrap{max-width:1040px;margin:0 auto;padding:0 16px 40px}
button{font-family:inherit}
a{color:var(--primary)}

/* hero */
.hero{
  position:relative;
  background:var(--grad);color:#fff;padding:46px 20px 26px;text-align:center;
  border-radius:0 0 24px 24px;box-shadow:0 10px 30px hsl(250 60% 50% / .25);
}
/* 公司名：左上角 */
.hero-brand{
  position:absolute;top:12px;left:18px;
  font-size:12px;font-weight:700;letter-spacing:.9px;opacity:.85;
}
/* PIX 字标 + 站名并排居中 */
.hero-title{display:flex;align-items:center;justify-content:center;gap:14px}
.hero h1{margin:0;font-size:29px;letter-spacing:.5px;font-weight:800;line-height:1.2}
.hero h1 .title{display:block}
.hero p{margin:8px 0 0;font-size:13.5px;opacity:.92}
.hero-actions{display:flex;gap:10px;justify-content:center;margin-top:16px}
.hero-btn{
  border:0;cursor:pointer;border-radius:999px;padding:9px 18px;font-size:13.5px;font-weight:700;
  background:#fff;color:hsl(250 70% 50%);box-shadow:0 4px 14px hsl(250 50% 30% / .18);white-space:nowrap;
}
.hero-btn.ghost{background:hsl(0 0% 100% / .18);color:#fff;box-shadow:none;border:1px solid hsl(0 0% 100% / .45)}
.hero-btn:active{transform:translateY(1px)}
.hero-btn .num{font-weight:800}

/* top back bar */
.subbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 4px}
.subbar h2{margin:0;font-size:18px;font-weight:800}
.back{
  border:0;background:transparent;color:var(--muted);font-size:13.5px;cursor:pointer;padding:6px 0;
}
.balance-chip{
  display:inline-flex;align-items:center;gap:6px;background:hsl(250 80% 60% / .1);color:var(--primary-deep);
  border-radius:999px;padding:6px 12px;font-size:13px;font-weight:700;
}

/* notice */
.notice{
  display:flex;gap:10px;align-items:flex-start;background:#fff7e8;border:1px solid hsl(35 90% 85%);
  color:hsl(30 70% 32%);border-radius:14px;padding:12px 14px;margin:18px 0 0;font-size:13px;
}
.notice b{font-weight:700}

section{margin-top:26px}
.sec-title{font-size:17px;font-weight:800;margin:0 0 12px;display:flex;align-items:center;gap:8px}
.sec-title .dot{width:8px;height:8px;border-radius:50%;background:var(--primary);display:inline-block}

/* products：宽屏一行更多卡片，随宽度自动换行 */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
@media(max-width:430px){
  .hero{padding:42px 16px 22px}
  .hero-title{gap:10px}
  .hero .logo{width:50px;height:40px;border-radius:11px}
  .hero .logo svg{width:32px}
  .hero h1{font-size:23px}
  .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .card{border-radius:14px}
  .card .body{padding:10px 10px 12px}
  .card .name{font-size:13.5px}
  .card .desc{font-size:12px}
  .card .cost{font-size:16px}
}
.card{background:var(--card);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}
.card img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#f3f3f7;margin:0}
.card.unavailable img{filter:grayscale(1);opacity:.62}
.stock-badge{align-self:flex-start;font-size:11.5px;font-weight:700;color:var(--primary-deep);background:hsl(250 70% 96%);border:1px solid hsl(250 60% 88%);border-radius:999px;padding:3px 10px;white-space:nowrap}
.stock-badge.off{color:#8a8a8a;background:#f4f4f6;border-color:#e3e3e8}
.card .body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:6px;flex:1}
.card .name{font-weight:700;font-size:15px}
.card .desc{font-size:12.5px;color:var(--muted)}
.card .cost{margin-top:auto;padding-top:4px;font-weight:800;font-size:18px;color:var(--primary)}
.card .cost small{font-weight:600;font-size:12px;color:var(--muted)}
.tip{
  display:flex;gap:6px;align-items:flex-start;background:hsl(35 90% 50% / .1);color:hsl(30 85% 34%);
  border-radius:10px;padding:7px 10px;font-size:12px;font-weight:600;
}
select,input,textarea{font-family:inherit;font-size:14px}
select{
  width:100%;padding:9px 10px;border-radius:10px;border:1px solid var(--border);
  background:var(--card);color:var(--text);
}
select:focus,input:focus,textarea:focus{outline:2px solid hsl(250 80% 60% / .35);outline-offset:0;border-color:var(--primary)}

/* buttons */
.btn{
  border:0;border-radius:12px;padding:11px 16px;font-size:14px;font-weight:700;cursor:pointer;
  background:var(--grad);color:#fff;box-shadow:0 4px 14px hsl(250 60% 50% / .25);
}
.btn:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.btn.block{width:100%}
.btn.soft{background:hsl(250 80% 60% / .1);color:var(--primary-deep);box-shadow:none}
.btn.outline{background:transparent;border:1px solid var(--border);color:var(--text);box-shadow:none}
.btn.danger{background:hsl(0 70% 55% / .1);color:hsl(0 70% 45%);box-shadow:none}
.btn.small{padding:7px 12px;font-size:12.5px;border-radius:10px}

/* panels */
.panel{background:var(--card);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}
.rules{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;font-size:14px}
.rules li{display:flex;gap:10px;align-items:flex-start}
.rules li::before{content:"";flex:none;display:inline-block;width:23px;height:10.5px;margin:4px 0 0;background:var(--pix-icon) no-repeat 0 0/100% 100%}

details{background:var(--card);border-radius:14px;box-shadow:var(--shadow);padding:0 16px;margin-bottom:10px}
details summary{cursor:pointer;list-style:none;padding:14px 0;font-size:14px;font-weight:600;display:flex;justify-content:space-between;align-items:center;gap:10px}
details summary::-webkit-details-marker{display:none}
details summary::after{content:"+";color:var(--muted);font-weight:700;font-size:18px}
details[open] summary::after{content:"−"}
details .a{padding:0 0 14px;font-size:13.5px;color:var(--muted)}

/* forms */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:12.5px;font-weight:700;color:var(--muted)}
.field input,.field textarea{
  width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:var(--card);color:var(--text);
}
.field textarea{resize:vertical;min-height:64px}
.form-error{background:hsl(0 70% 55% / .1);color:hsl(0 70% 42%);border-radius:10px;padding:9px 12px;font-size:13px}
.hint{font-size:12px;color:var(--muted)}

/* modal */
.overlay{
  position:fixed;inset:0;background:hsl(240 30% 12% / .55);z-index:100;display:flex;align-items:flex-end;justify-content:center;
}
@media(min-width:560px){.overlay{align-items:center}}
.sheet{
  background:var(--card);width:100%;max-width:480px;border-radius:20px 20px 0 0;max-height:92vh;overflow:auto;
  box-shadow:0 -10px 40px hsl(240 30% 10% / .25);
}
@media(min-width:560px){.sheet{border-radius:20px}}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--card);z-index:2}
.sheet-head h3{margin:0;font-size:16px}
.sheet-close{border:0;background:transparent;font-size:22px;line-height:1;color:var(--muted);cursor:pointer;padding:0 4px}
.sheet-body{padding:16px 18px 22px;display:flex;flex-direction:column;gap:14px}
.sheet-product{display:flex;gap:12px;align-items:center}
.sheet-product img{width:56px;height:56px;border-radius:10px;object-fit:cover;background:#f3f3f7}
.sheet-product .t{font-weight:700;font-size:14px}
.sheet-product .c{font-size:13px;color:var(--primary);font-weight:800}

/* account card */
.acct{background:var(--grad);color:#fff;border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.acct .label{font-size:13px;opacity:.9}
.acct .big{font-size:38px;font-weight:800;line-height:1.1;display:flex;align-items:baseline;gap:8px}
.acct .big span{font-size:20px}
.acct .meta{display:flex;gap:18px;margin-top:12px;font-size:12.5px;opacity:.9}
.acct .name{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin-bottom:10px}
.linkish{background:none;border:0;color:#fff;opacity:.85;text-decoration:underline;font-size:12.5px;cursor:pointer;padding:0}

/* orders */
.order-list{display:flex;flex-direction:column;gap:10px}
.order{background:var(--card);border-radius:16px;padding:14px 16px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:6px}
.order-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.order .title{font-weight:700;font-size:14.5px}
.order .sub{font-size:12.5px;color:var(--muted)}
.order .meta-row{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;color:var(--muted);flex-wrap:wrap}
/* 物流单号高亮块（用户端「我的订单」） */
.tracking-box{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:12px 0 4px;padding:12px 14px;border-radius:12px;
  background:hsl(220 90% 55% / .09);border:1px dashed hsl(220 90% 55% / .5);
}
.tracking-box .t-label{display:block;font-size:11.5px;font-weight:700;color:hsl(220 80% 45%)}
.tracking-box .t-num{
  display:block;margin-top:3px;font-size:17px;font-weight:800;color:var(--text);
  letter-spacing:.05em;font-variant-numeric:tabular-nums;word-break:break-all;
}
.tracking-box .btn{flex:none}
.badge{font-size:11.5px;font-weight:700;border-radius:999px;padding:3px 9px;white-space:nowrap}
.badge.pending{background:hsl(35 90% 50% / .14);color:hsl(30 85% 34%)}
.badge.shipped{background:hsl(220 90% 55% / .12);color:hsl(220 80% 42%)}
.badge.done{background:hsl(155 60% 40% / .13);color:hsl(155 55% 30%)}
.badge.cancelled{background:hsl(240 10% 50% / .12);color:var(--muted)}
.empty{background:var(--card);border-radius:16px;padding:28px 18px;text-align:center;color:var(--muted);font-size:13.5px;box-shadow:var(--shadow)}
.loading{text-align:center;color:var(--muted);font-size:13.5px;padding:24px 0}

/* admin */
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab{border:1px solid var(--border);background:var(--card);border-radius:999px;padding:6px 14px;font-size:12.5px;font-weight:600;color:var(--muted);cursor:pointer}
.tab.active{background:var(--primary);border-color:var(--primary);color:#fff}
/* 次级筛选（订单状态）：仅描边，与上方主 tab 拉开层级 */
.chips{margin:22px 0 14px;gap:7px}
.chip{background:transparent;border:1px solid hsl(250 22% 87%);color:var(--muted);font-size:12px;font-weight:600;padding:5px 13px}
.chip:hover{border-color:hsl(250 40% 78%);color:var(--text)}
.chip.active{background:transparent;border-color:var(--primary);color:var(--primary);font-weight:800;box-shadow:inset 0 0 0 1px var(--primary)}
.admin-grid{display:grid;grid-template-columns:1fr;gap:12px}
.account-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);font-size:13.5px}
.account-row:last-child{border-bottom:0}
.account-row .who{display:flex;flex-direction:column;min-width:0}
.account-row .who small{color:var(--muted);font-size:12px}
.account-row .bal{font-weight:800;color:var(--primary)}
.acct-right{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.copy-link{background:none;border:0;color:var(--primary-deep);font-size:11.5px;text-decoration:underline;cursor:pointer;padding:0;white-space:nowrap}
.copy-link.danger{color:#c0392b}
.account-row .bal.muted{color:var(--muted,#8a8a8a);font-weight:600;font-size:12px}
.account-row.roster-row{flex-wrap:wrap;row-gap:2px}
.roster-actions{display:flex;gap:12px;width:100%;justify-content:flex-end;margin-top:2px}
.order-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}

/* 订单「更多操作」菜单 */
.menu-list{display:flex;flex-direction:column;gap:8px}
.menu-row{
  display:flex;align-items:center;gap:10px;width:100%;text-align:left;
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  padding:12px 14px;font-size:14px;font-weight:600;color:var(--text);cursor:pointer;
}
.menu-row:hover{border-color:hsl(250 45% 80%);background:hsl(250 60% 98%)}
.menu-row .menu-label{flex:none}
.menu-row .menu-note{margin-left:auto;font-size:12px;font-weight:500;color:var(--muted);text-align:right}
.menu-row .menu-arrow{flex:none;color:var(--muted);font-weight:700;opacity:.6}
.menu-row.warn{color:var(--warning);border-color:hsl(35 90% 88%)}
.menu-row.warn .menu-note,.menu-row.warn .menu-arrow{color:var(--warning)}
.menu-row.danger{color:var(--danger);border-color:hsl(0 70% 92%)}
.menu-row.danger .menu-note,.menu-row.danger .menu-arrow{color:var(--danger)}

/* toast */
.toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:200;
  background:hsl(240 25% 18% / .94);color:#fff;border-radius:999px;padding:11px 20px;font-size:13.5px;
  box-shadow:0 8px 24px hsl(240 30% 10% / .28);max-width:86vw;text-align:center;
}
.toast.error{background:hsl(0 65% 45% / .96)}

footer{text-align:center;color:var(--muted);font-size:12px;margin-top:34px;line-height:1.9}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* 手机验证码登录 */
.code-row{display:flex;gap:8px;align-items:stretch}
.code-row input{flex:1;min-width:0}
.code-row .code-send{flex:none;white-space:nowrap;display:flex;align-items:center;justify-content:center;min-width:96px}


/* 像素块图标（PIX 像素字标） */
.px-pix{
  display:inline-block;width:1.59em;height:.74em;margin:0 .18em;
  background:var(--pix-icon) no-repeat 0 0/100% 100%;
  vertical-align:-.02em;
}
/* 个人中心大号余额：跟着 38px 数字的高度走 */
.acct .big span .px-pix{width:2.94em;height:1.37em;vertical-align:.02em}

/* 首屏 PIX 像素 logo */
.hero .logo{
  display:grid;place-items:center;flex:none;width:60px;height:48px;
  background:#fff;border-radius:13px;box-shadow:0 8px 20px hsl(250 60% 40% / .28);
}
.hero .logo svg{display:block;width:38px;height:auto}
