/* ========== josiano小店 · 手绘纸面风 ========== */
:root {
  --paper: #faf9f5; --ink: #141413; --ink-2: #b0aea5; --hairline: #e8e6dc;
  --coral: #d97757; --coral-dark: #c5634a; --blue: #6a9bcc; --olive: #788c5d; --red: #c0392b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  font-family: Georgia, "PingFang SC", "Microsoft YaHei", serif;
  background: var(--paper);
  background-image: radial-gradient(var(--hairline) 1px, transparent 1px);
  background-size: 28px 28px;
}
h1,h2,h3,.btn,.nav-links button { font-family: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif; }
button { cursor: pointer; font: inherit; }
a { color: var(--blue); }
[hidden] { display: none !important; }

/* ── 进站闸门 ── */
.gate { position: fixed; inset: 0; background: var(--paper); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.gate-box { border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 0 var(--hairline); background: #fff; padding: 28px; max-width: 360px; width: 100%; text-align: center; }
.gate-check { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid var(--ink); border-radius: 8px; padding: 12px; margin: 14px 0; }
.gate-check input { width: 20px; height: 20px; accent-color: var(--coral); }

/* ── 导航 ── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250,249,245,.92); backdrop-filter: blur(6px); border-bottom: 2px solid var(--ink); }
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; }
.brand .name { font-family: "Trebuchet MS", "PingFang SC", sans-serif; font-size: 19px; font-weight: 700; }
.avatar-link img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; display: block; transition: transform .15s; }
.avatar-link img:hover { transform: scale(1.08) rotate(-3deg); }
.nav-links { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.nav-links button { background: none; border: none; padding: 8px 10px; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid transparent; }
.nav-links button.active { color: var(--ink); border-bottom-color: var(--coral); font-weight: 700; }
.lang-btn { border: 1.5px solid var(--ink) !important; border-radius: 6px; margin-left: 6px; padding: 3px 8px !important; font-size: 12px !important; }
.lang-btn.active { background: var(--ink); color: var(--paper) !important; border-bottom-color: var(--ink) !important; }

/* 公告区（导航正下方） */
.notice { background: #fff; border-bottom: 1.5px dashed var(--ink); }
.notice-inner { max-width: 1080px; margin: 0 auto; padding: 9px 16px; font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.notice-inner .pin { color: var(--coral-dark); flex: 0 0 auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 16px 70px; }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(20,20,19,.45); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 90; }
.modal { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 0 var(--hairline); max-width: 420px; width: 100%; max-height: 82vh; overflow: auto; padding: 22px; }
.modal h3 { margin: 0 0 10px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed var(--hairline); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-2); }
.kv .v { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.copy-btn { border: 1px solid var(--ink); background: #fff; border-radius: 6px; font-size: 11px; padding: 2px 8px; margin-left: 6px; }

/* 商品区 */
.goods { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 0 var(--hairline); padding: 16px; cursor: pointer; transition: transform .12s ease-out; }
.card:hover { transform: translateY(-3px); }
.card .tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--coral-dark); border: 1.5px solid var(--coral); border-radius: 999px; padding: 1px 8px; margin-bottom: 8px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card .desc { font-size: 12px; color: var(--ink-2); min-height: 30px; }
.card .price { font-size: 20px; font-weight: 700; color: var(--coral); margin: 8px 0; font-family: "Trebuchet MS", sans-serif; }
.card .price small { font-size: 12px; color: var(--ink-2); font-weight: 400; }

.panel { border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 0 var(--hairline); padding: 20px; }
.panel h3 { margin-top: 0; }
.btn { padding: 11px 18px; border-radius: 8px; border: 2px solid var(--ink); font-size: 14px; font-weight: 700; background: #fff; color: var(--ink); text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.primary:hover { background: var(--coral-dark); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.linklike { background: none; border: none; color: var(--blue); text-decoration: underline; padding: 10px 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 700; font-family: "Trebuchet MS", "PingFang SC", sans-serif; }
input[type=text], input[type=email], textarea {
  width: 100%; border: 1.5px solid var(--ink); border-radius: 8px; min-height: 44px; padding: 0 12px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 150px; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.5; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(217,119,87,.18); }
.note { font-size: 12px; color: var(--ink-2); font-style: italic; margin-top: 6px; }
.qty { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.qty button { width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-size: 18px; }
.total { font-size: 22px; font-weight: 700; color: var(--coral); font-family: "Trebuchet MS", sans-serif; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* 收款码区 */
.qr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.qr-box { border: 1.5px dashed var(--ink); border-radius: 10px; padding: 12px 8px; text-align: center; font-size: 13px; background: #fff; }
.qr-box img { width: 100%; max-width: 140px; border-radius: 6px; display: block; margin: 6px auto 0; }
.qr-box .pending { color: var(--ink-2); font-size: 11px; padding: 26px 4px; }
.pay-warn { border: 2px solid var(--coral); background: rgba(217,119,87,.08); color: var(--coral-dark); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 700; margin: 12px 0; }
.other-pay { border: 1.5px dashed var(--ink-2); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); margin-top: 12px; }
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-row input[type=file] { font-size: 12px; }

/* 进度侧栏 */
.tracking { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; }
.steps { border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 0 var(--hairline); padding: 14px 12px; position: sticky; top: 96px; }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 13px; color: var(--ink-2); position: relative; }
.step::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink-2); background: #fff; flex: 0 0 auto; }
.step.current { color: var(--ink); font-weight: 700; }
.step.current::before { border-color: var(--coral); background: var(--coral); box-shadow: 0 0 0 3px rgba(217,119,87,.25); }
.step.done { color: var(--olive); }
.step.done::before { border-color: var(--olive); background: var(--olive); }
.pulse { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(20,20,19,.2); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.msg { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; display: none; border: 1.5px dashed var(--ink); }
.msg.show { display: block; }
.msg.ok { border-color: var(--olive); color: var(--olive); background: rgba(120,140,93,.08); }
.msg.error { border-color: var(--red); color: var(--red); background: rgba(192,57,43,.06); }
.msg.info { border-color: var(--blue); color: #4a76a3; background: rgba(106,155,204,.08); }

.status-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1.5px solid currentColor; }
.st-created, .st-paid_reported { color: #b07d2a; }
.st-session_unlocked, .st-session_submitted, .st-processing { color: #4a76a3; }
.st-done { color: var(--olive); }
.st-cancelled { color: var(--red); }

/* FAQ */
.faq-item { border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.faq-item summary { padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: "Trebuchet MS", "PingFang SC", sans-serif; }
.faq-item p { margin: 0; padding: 0 14px 12px; font-size: 13px; color: #4b5563; line-height: 1.7; }

/* 客服胶囊（固定不随滚动消失，移动端同样适用） */
.cs-capsule { position: fixed; right: 18px; bottom: 18px; z-index: 80; }
.cs-fab { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--ink); background: var(--coral); color: #fff; font-size: 20px; box-shadow: 3px 3px 0 0 rgba(20,20,19,.25); }
.cs-card {
  position: absolute; right: 0; bottom: 64px; width: 250px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 0 rgba(20,20,19,.2);
  padding: 16px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: all .18s ease-out;
}
.cs-capsule:hover .cs-card, .cs-capsule.open .cs-card { opacity: 1; pointer-events: auto; transform: translateY(0); }
.cs-card .hd { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cs-card .hd img { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--ink); object-fit: cover; }
.cs-card .hd b { font-size: 15px; }
.cs-card .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 5px 0; border-top: 1px dashed var(--hairline); }
.cs-card .row b { font-family: ui-monospace, Consolas, monospace; }
.cs-card .qr { width: 130px; display: block; margin: 10px auto 2px; border: 1.5px solid var(--ink); border-radius: 8px; }

footer { border-top: 2px solid var(--ink); margin-top: 30px; padding: 22px 16px 30px; text-align: center; font-size: 13px; line-height: 2; color: var(--ink-2); }
footer b { color: var(--ink); }

@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  .tracking { grid-template-columns: 1fr; }
  .steps { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .step { padding: 6px 8px; }
  .qr-grid { grid-template-columns: 1fr; }
  .nav-links button { padding: 8px 6px; font-size: 12px; }
  .brand .name { font-size: 16px; }
}

/* ═══ v1.1 新增：公告弹窗 / 深色 hero / 分类卡 / 图6商品卡 / 登录 ═══ */
/* 公告弹窗（图5：白卡 + NOTICE + 条文 + 我已阅读） */
.announce-modal { max-width: 560px; }
.announce-label { font-size: 11px; letter-spacing: .18em; color: var(--ink-2); font-family: ui-monospace, Consolas, monospace; }
.announce-title { margin: 6px 0 12px; font-size: 20px; }
.announce-body { font-size: 13px; line-height: 1.9; }
.announce-body p { margin: 10px 0; }
.announce-body .sec { font-weight: 700; color: var(--coral-dark); }
.announce-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.announce-note { margin: 10px 0 0; font-size: 11px; color: var(--ink-2); text-align: right; }

/* 深色 hero 公告面板（图7） */
.hero-dark { background: linear-gradient(135deg, #0d1626, #111c30); color: #e2e8f0; border-radius: 18px; padding: 26px 28px; margin-bottom: 22px; border: 1px solid #1e293b; position: relative; overflow: hidden; }
.hero-dark .hero-label { font-size: 11px; letter-spacing: .18em; color: #7dd3fc; font-family: ui-monospace, Consolas, monospace; }
.hero-dark h2 { margin: 6px 0 8px; font-size: 22px; color: #fff; }
.hero-dark p { margin: 0; font-size: 13px; line-height: 1.8; color: #b6c2d2; max-width: 720px; }
.hero-more { margin-top: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #e2e8f0; border-radius: 999px; padding: 7px 16px; font-size: 13px; }
.hero-more:hover { background: rgba(255,255,255,.16); }

/* 左侧分类卡（图8） */
.shop-grid { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.cat-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 16px; padding: 16px 14px; position: sticky; top: 96px; box-shadow: 0 2px 12px rgba(15,23,42,.05); }
.cat-label { font-size: 11px; letter-spacing: .18em; color: var(--ink-2); font-family: ui-monospace, Consolas, monospace; }
.cat-card h3 { margin: 6px 0 12px; font-size: 17px; }
.cat-item { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; padding: 10px 10px; border-radius: 999px; font-size: 14px; text-align: left; color: var(--ink); }
.cat-item img, .cat-item svg { width: 22px; height: 22px; flex: 0 0 auto; }
.cat-item .cnt { margin-left: auto; font-size: 12px; color: var(--ink-2); background: var(--hairline); border-radius: 999px; padding: 1px 9px; }
.cat-item:hover { background: #f6f6f4; }
.cat-item.active { background: var(--hairline); font-weight: 700; }
.cat-item .hot { font-size: 12px; }

/* 图6 商品卡：编辑部衬线大标题 + 黑胶囊按钮 */
.card { display: flex; flex-direction: column; }
.card .icon-chip { width: 36px; height: 36px; border-radius: 10px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.card .icon-chip img, .card .icon-chip svg { width: 22px; height: 22px; }
.card .brand-label { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.card h3.card-title { font-family: "Noto Serif SC", "Songti SC", Georgia, serif; font-size: 17px; font-weight: 700; line-height: 1.45; margin: 0 0 8px; letter-spacing: -0.01em; }
.card .tags { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 8px 0 12px; }
.card .tags .tag-pill { background: #fdf1ec; color: var(--coral-dark); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.card .card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.card .card-foot .price { margin: 0; font-size: 22px; }
.btn.dark { background: #0f172a; border-color: #0f172a; color: #fff; }
.btn.dark:hover { background: #1e293b; }
.btn.pill { border-radius: 999px; padding: 11px 22px; }
.btn.ghost { background: #fff; }
.login-btn { background: #0f172a; color: #fff !important; border: none; border-radius: 999px; padding: 8px 18px !important; font-size: 13px !important; margin-right: 4px; }
.bsc-addr { font-size: 11px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; overflow-wrap: anywhere; }
.bsc-addr code { font-family: ui-monospace, Consolas, monospace; font-size: 10px; }
.notice { cursor: pointer; }
.notice-more { margin-left: auto; color: var(--blue); font-size: 12px; white-space: nowrap; }

@media (max-width: 640px) {
  .shop-grid { grid-template-columns: 1fr; }
  .cat-card { position: static; }
  .hero-dark { padding: 20px 18px; }
}

/* ═══ v1.2 新增 ═══ */
/* 导航外链客服（与菜单项同款） */
.nav-ext { display: inline-flex; align-items: center; padding: 8px 10px; font-size: 13px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; font-family: "Trebuchet MS", "PingFang SC", sans-serif; }
.nav-ext:hover { color: var(--ink); }

/* 公告栏下的极简 hero（v1.2.3 rows.gg 风要素） */
.hero-band { padding: 26px 4px 18px; }
.hero-band h1 { font-family: "Noto Serif SC", "Songti SC", Georgia, serif; font-size: clamp(26px, 4.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 600; }
.hero-band p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 480px; line-height: 1.7; }

/* 订单跟踪页 mini hero（路线规划提示） */
.hero-mini { border-bottom: 1.5px dashed var(--hairline); padding-bottom: 12px; margin-bottom: 12px; }
.hero-mini-title { font-family: "Noto Serif SC", "Songti SC", Georgia, serif; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.hero-mini-sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

@media (max-width: 640px) {
  .hero-band { padding: 18px 2px 12px; }
}

/* 验证码行 + 账户页 */
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-q { font-family: ui-monospace, Consolas, monospace; font-weight: 700; background: var(--hairline); border: 1.5px solid var(--ink); border-radius: 8px; padding: 10px 14px; white-space: nowrap; user-select: none; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tabs button { flex: 1; padding: 10px; border: 1.5px solid var(--ink); background: #fff; border-radius: 8px; font-weight: 700; }
.auth-tabs button.active { background: #0f172a; border-color: #0f172a; color: #fff; }

/* 休息/缺货状态 */
.closed-banner { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 14px 18px; font-size: 14px; margin-bottom: 18px; }
.closed-banner a { color: #a3e635; }
.card-off { position: relative; opacity: .72; cursor: not-allowed; }
.card-off:hover { transform: none; }
.card-off-tag { position: absolute; top: 12px; right: 12px; background: #0f172a; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; z-index: 2; text-align: center; }
.card-off-sub { font-size: 10px; font-weight: 400; color: #a3e635; }

/* ═══ v1.4 收款页重设计 ═══ */
.pay-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--hairline); margin-bottom: 14px; font-size: 13px; }
.pay-head code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.pay-layout { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: stretch; }
.pay-side { display: flex; flex-direction: column; gap: 8px; }
.pay-method { border: 1.5px solid var(--ink); background: #fff; border-radius: 10px; padding: 12px 12px; font-size: 13px; font-weight: 700; text-align: left; }
.pay-method.active { background: #0f172a; border-color: #0f172a; color: #fff; }
.pay-method.test { border-style: dashed; color: var(--ink-2); }
.pay-stage { border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 380px; }
.pay-amount { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.pay-amount b { font-size: 26px; color: var(--coral); font-family: "Trebuchet MS", sans-serif; margin-left: 6px; }
.qr-big { max-width: 340px; width: 100%; border-radius: 12px; border: 1.5px solid var(--ink); }
.stage-pane { display: none; width: 100%; flex-direction: column; align-items: center; }
.stage-pane.active { display: flex; }
.stage-hint { font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.qr-pending { color: var(--ink-2); font-size: 13px; padding: 40px 10px; border: 1.5px dashed var(--ink-2); border-radius: 10px; width: 100%; }
.stage-note { margin-top: 16px; font-size: 12px; color: var(--olive); }
.test-box { max-width: 320px; width: 100%; text-align: left; }
.pay-actions { border-top: 1.5px dashed var(--hairline); margin-top: 16px; padding-top: 14px; }
.pay-actions .upload-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pay-actions .upload-row label { white-space: nowrap; margin: 0; }
.pay-actions .upload-row input[type=text] { flex: 1; }

/* 拍前须知卡片 */
.prep-note { border: 1.5px solid var(--ink); border-radius: 12px; background: #f6f6f4; padding: 0; }
.prep-note summary { padding: 12px 16px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: "Trebuchet MS", "PingFang SC", sans-serif; }
.prep-note > div { padding: 0 16px 14px; font-size: 13px; line-height: 1.85; }
.prep-note p { margin: 8px 0; }
.prep-note .warn { color: var(--red); font-weight: 700; }

@media (max-width: 640px) {
  .pay-layout { grid-template-columns: 1fr; }
  .pay-side { flex-direction: row; flex-wrap: wrap; }
  .pay-method { flex: 1 1 45%; text-align: center; }
}
