/* ============================================================
   LY云计算 - 前台样式
   设计基线：樱花粉 + 白，二次元柔光风（默认主题）
   1.7.11 起支持双主题：默认「樱花粉」+ 可切换「蓝白猫娘」
      · 访客切换入口在右上角，偏好写入 localStorage（键 ly_theme）
      · 主题落地方式：<html data-theme="bluecat"> 覆盖 :root 变量
      · 插画路径亦抽为变量，切换主题时一并替换
  约定：大圆角 / 柔光阴影 / 渐变点缀；数据仍用等宽字体保证可读
   ============================================================ */

:root {
    /* 底色：暖白到极浅粉 */
    --bg:           #fffafb;
    --bg-soft:      #fff4f7;
    --bg-pink:      #ffeeF3;
    --card:         #ffffff;
    --card-hover:   #fffafc;
    --border:       #ffe0e9;
    --border-soft:  #fff0f4;

    /* 文字 */
    --text:         #4a3a42;
    --text-sub:     #8d7680;
    --text-dim:     #b6a1aa;

    /* 品牌色：樱花粉 */
    --primary:      #ff8aa8;
    --primary-dark: #f56f92;
    --primary-deep: #e05a7e;
    --primary-soft: #ffb7c5;
    --primary-ink:  #ffffff;          /* 粉底上的文字 */
    --primary-glow: rgba(255, 138, 168, .22);

    /* 语义色 */
    --success:      #4cc79a;
    --warning:      #f0a95c;
    --danger:       #f4707c;
    --info:         #6fb2e8;
    --lavender:     #c9b6f0;

    --radius:       16px;
    --radius-sm:    10px;
    --radius-xs:    7px;
    --radius-pill:  999px;

    /* 柔光阴影：粉调而非黑调 */
    --shadow-sm:    0 2px 8px rgba(255, 138, 168, .08);
    --shadow:       0 8px 28px rgba(255, 138, 168, .16);
    --shadow-lg:    0 18px 48px rgba(255, 138, 168, .22);
    --shadow-glow:  0 6px 20px rgba(255, 138, 168, .38);

    /* 插画（主题可替换） */
    --img-hero:     url('../img/hero-sakura.webp');
    --img-pd:       url('../img/pd-maid.webp');
    --img-auth:     url('../img/auth-chibi.webp');
    --img-auth-side:url('../img/auth-cosmos.webp');
    --img-empty:    url('../img/empty-state.webp');
    --img-steps:    url('../img/bal-kotori.webp');
    --img-balance:  url('../img/bal-guitar.webp');
    --brand-emoji:  '\1F338';         /* 主题角标：樱花 */

    /* 全站背景光斑（主题可替换） */
    --glow-1:       rgba(255, 183, 197, .40);
    --glow-2:       rgba(201, 182, 240, .22);
    --glow-3:       rgba(255, 183, 197, .26);

    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "JetBrains Mono",
            Menlo, Consolas, "Liberation Mono", monospace;
}

/* ============================================================
   蓝白猫娘主题（1.7.11）
   触发：<html data-theme="bluecat">
   基调：白底 + 淡蓝渐变点缀，猫耳 / 猫爪 / 蝴蝶结作为轻装饰
   ============================================================ */
html[data-theme="bluecat"] {
    /* 底色：冷白到极浅蓝 */
    --bg:           #f8fbff;
    --bg-soft:      #eef6ff;
    --bg-pink:      #e6f2ff;          /* 变量名沿用（浅蓝强调底） */
    --card:         #ffffff;
    --card-hover:   #f6faff;
    --border:       #d8e9fb;
    --border-soft:  #eaf3fd;

    /* 文字：冷调深蓝灰 */
    --text:         #33414f;
    --text-sub:     #6a7f93;
    --text-dim:     #9db0c2;

    /* 品牌色：天青蓝 */
    --primary:      #6bb6ef;
    --primary-dark: #4d9ad8;
    --primary-deep: #3480bf;
    --primary-soft: #a9d5f5;
    --primary-ink:  #ffffff;
    --primary-glow: rgba(107, 182, 239, .24);

    /* 语义色：与蓝白基调协调 */
    --success:      #4cc79a;
    --warning:      #f0a95c;
    --danger:       #f4707c;
    --info:         #6bb6ef;
    --lavender:     #b3c7f0;

    /* 柔光阴影：蓝调 */
    --shadow-sm:    0 2px 8px rgba(107, 182, 239, .10);
    --shadow:       0 8px 28px rgba(107, 182, 239, .18);
    --shadow-lg:    0 18px 48px rgba(107, 182, 239, .24);
    --shadow-glow:  0 6px 20px rgba(107, 182, 239, .40);

    /* 蓝白猫娘插画 */
    --img-hero:     url('../img/bluecat/hero-cat.webp');
    --img-pd:       url('../img/bluecat/pd-cat.webp');
    --img-auth:     url('../img/bluecat/auth-chibi.webp');
    --img-auth-side:url('../img/bluecat/balance-cat.webp');
    --img-empty:    url('../img/bluecat/empty-cat.webp');
    --img-steps:    url('../img/bluecat/steps-cat.webp');
    --img-balance:  url('../img/bluecat/balance-cat.webp');
    --brand-emoji:  '\1F431';         /* 主题角标：猫脸 */

    /* 全站背景光斑：淡蓝 → 天青 → 极浅紫蓝 */
    --glow-1:       rgba(169, 213, 245, .50);
    --glow-2:       rgba(138, 196, 240, .26);
    --glow-3:       rgba(169, 213, 245, .34);
}

/* 主题切换时全局柔和过渡（避免刺眼跳变） */
body, .site-header, .card, .btn, .hero::after, .pd-card::after {
    transition: background-color .28s ease, border-color .28s ease, color .28s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* 全站柔光背景：三处光斑 + 极浅底色（色值随主题切换） */
    background:
        radial-gradient(900px 520px at 8% -6%,  var(--glow-1), transparent 62%),
        radial-gradient(760px 480px at 96% 4%,  var(--glow-2), transparent 60%),
        radial-gradient(880px 620px at 50% 104%, var(--glow-3), transparent 62%),
        var(--bg);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* 等宽仅用于「数据」：金额、单号、编号、地址、时间 */
.mono,
.pi-value input,
.kv-table td.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* 复用的区块眉标与小标签：中文不进等宽字体 */
.eyebrow,
.section-head small,
.site-footer h4,
.stat-box span,
.coupon-card-note,
.bal-card-note {
    font-size: 11.5px;
    letter-spacing: .06em;
    color: var(--text-dim);
}

/* 樱花花瓣装饰：纯 CSS，避免额外图片请求 */
.petal {
    position: absolute; pointer-events: none; z-index: 0;
    width: 14px; height: 14px; opacity: .55;
    background: var(--primary-soft);
    border-radius: 50% 0 50% 50%;
    transform: rotate(45deg);
}

/* ---------------- 头部 ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 250, 251, .88);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(255, 224, 233, .9);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 62px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
    width: 32px; height: 32px; border-radius: 50%;
    background: url('../img/logo-mark.png') center/contain no-repeat;
    display: flex; align-items: center; justify-content: center;
    font-size: 0; color: transparent;      /* 图片替代文字，保留无障碍回退 */
    box-shadow: 0 3px 10px rgba(255, 138, 168, .35);
}
.logo-text { font-weight: 700; font-size: 16px; letter-spacing: .2px; color: var(--text); }

.main-nav {
    display: flex; gap: 2px; margin-left: 8px;
    flex: 1 1 auto; min-width: 0; overflow: hidden;
}
.main-nav a {
    padding: 20px 14px; font-size: 14px; color: var(--text-sub);
    border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
    /* 关键：导航文字不换行，空间不足时整体压缩 padding 而非把字挤成竖排 */
    white-space: nowrap; flex: 0 0 auto;
}
.main-nav a:hover { color: var(--primary-deep); }
.main-nav a.active { color: var(--primary-deep); border-bottom-color: var(--primary); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* 主题切换按钮（1.7.11）：樱花 ⇄ 猫娘，图标随当前主题切换 */
.theme-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; cursor: pointer; line-height: 1;
    font-size: 13px; font-family: inherit; color: var(--primary-deep);
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    transition: all .18s;
}
.theme-toggle:hover {
    border-color: var(--primary-soft);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.theme-toggle .tt-ico { font-size: 15px; line-height: 1; }
.theme-toggle .tt-label { white-space: nowrap; }
/* 当前主题图标：默认（樱花）显示樱花，蓝白主题显示猫脸 */
.theme-toggle .tt-ico-cat { display: none; }
html[data-theme="bluecat"] .theme-toggle .tt-ico-sakura { display: none; }
html[data-theme="bluecat"] .theme-toggle .tt-ico-cat { display: inline; }
@media (max-width: 900px) {
    .theme-toggle .tt-label { display: none; }
    .theme-toggle { padding: 8px 10px; }
}

.user-chip {
    font-size: 12.5px; color: var(--text-sub); padding: 4px 12px;
    background: var(--bg-pink); border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-toggle {
    display: none; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--primary-deep); cursor: pointer; padding: 8px 10px; line-height: 0;
    box-shadow: var(--shadow-sm);
}
.nav-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-toggle .ico-close { display: none; }
body.nav-open .nav-toggle .ico-menu { display: none; }
body.nav-open .nav-toggle .ico-close { display: block; }

/* 顶栏余额 */
.balance-chip {
    font-size: 13px; color: var(--text-sub);
    padding: 5px 14px; border-radius: var(--radius-pill);
    background: var(--bg-pink); border: 1px solid var(--border);
    white-space: nowrap; transition: all .15s;
}
.balance-chip:hover { border-color: var(--primary-soft); box-shadow: var(--shadow-sm); }
.balance-chip b { color: var(--primary-deep); font-weight: 700; font-family: var(--mono); }

/* ---------------- 网站弹窗公告 ---------------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(74, 58, 66, .34);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.announce-modal {
    position: relative; width: 100%; max-width: 460px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px 22px;
    box-shadow: var(--shadow-lg);
    animation: annPop .24s cubic-bezier(.34, 1.4, .64, 1);
    overflow: hidden;
}
/* 顶部樱花渐变条 */
.announce-modal::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--primary-soft), var(--primary), var(--lavender));
}
@keyframes annPop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.announce-modal .am-head {
    font-size: 15.5px; font-weight: 700; color: var(--primary-deep); margin-bottom: 14px;
    padding-bottom: 12px; border-bottom: 1px dashed var(--border);
    padding-left: 26px; position: relative;
}
.announce-modal .am-head::before {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 16px; height: 16px; border-radius: 50% 0 50% 50%;
    background: var(--primary-soft); transform: rotate(45deg);
}
.announce-modal .am-body {
    font-size: 13.5px; line-height: 1.9; color: var(--text-sub);
    word-break: break-word; max-height: 52vh; overflow-y: auto;
}
.announce-modal .am-foot { margin-top: 20px; text-align: right; }
.announce-modal .am-close {
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; padding: 0; line-height: 26px; text-align: center;
    border: 1px solid var(--border); border-radius: 50%;
    background: var(--bg-soft); color: var(--text-dim);
    font-size: 15px; font-family: inherit; cursor: pointer; transition: all .15s;
}
.announce-modal .am-close:hover {
    color: #fff; background: var(--primary); border-color: var(--primary);
    transform: rotate(90deg);
}
@media (max-width: 768px) {
    .modal-mask { padding: 14px; }
    .announce-modal { padding: 22px 18px 18px; }
    .announce-modal .am-body { font-size: 13px; max-height: 56vh; }
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-pill); border: 1px solid transparent;
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: transform .16s cubic-bezier(.34, 1.4, .64, 1), box-shadow .16s, background .16s, color .16s, border-color .16s;
    font-family: inherit; white-space: nowrap; line-height: 1.4;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary {
    background: linear-gradient(135deg, #ffa3bb 0%, var(--primary) 50%, var(--primary-dark) 100%);
    color: var(--primary-ink);
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    box-shadow: 0 10px 28px rgba(255, 138, 168, .48);
    transform: translateY(-1.5px);
}
.btn-outline {
    background: var(--card); border-color: var(--border); color: var(--primary-deep);
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: var(--primary-soft); background: var(--bg-soft); transform: translateY(-1.5px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: var(--bg-pink); color: var(--primary-deep); }
.btn-danger { background: var(--card); color: var(--danger); border-color: #ffd6da; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: #fff1f2; border-color: var(--danger); }
.btn-warn { background: var(--card); color: var(--warning); border-color: #ffe4c6; box-shadow: var(--shadow-sm); }
.btn-warn:hover { background: #fff8ef; border-color: var(--warning); }
.btn-lg { padding: 13px 30px; font-size: 14.5px; }
.btn-sm { padding: 7px 15px; font-size: 12.5px; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.btn.disabled, .btn:disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn-copy {
    background: var(--card); color: var(--primary-deep); border-color: var(--border);
    padding: 8px 15px; font-size: 12.5px; box-shadow: var(--shadow-sm);
}
.btn-copy:hover { border-color: var(--primary-soft); background: var(--bg-soft); }

/* ---------------- Flash 提示 ---------------- */
.flash-wrap { margin-top: 16px; }
.flash {
    padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13.5px;
    margin-bottom: 12px;
    background: var(--card); border: 1px solid var(--border);
    border-left: 4px solid var(--text-dim);
    color: var(--text-sub);
    box-shadow: var(--shadow-sm);
}
.flash-success { border-left-color: var(--success); background: #f2fbf7; color: #2f9d75; }
.flash-danger  { border-left-color: var(--danger);  background: #fff5f6; color: #d95562; }
.flash-warning { border-left-color: var(--warning); background: #fffaf3; color: #c8823a; }
.flash-info    { border-left-color: var(--info);    background: #f4faff; color: #4d8fc7; }

/* ---------------- Hero ---------------- */
.site-main { flex: 1; padding-bottom: 64px; }

.hero {
    position: relative; padding: 60px 0 54px; overflow: hidden;
}
/* 竖构图插画需要更高的容器，否则人物会被裁成半身 */
@media (min-width: 1025px) {
    .hero { min-height: 520px; display: flex; align-items: center; }
    .hero > .wrap { width: 100%; }
}
/* Hero 插图：桌面端右侧铺开，透明度柔和融入底色 */
/* 1.7.7 起换用竖构图樱花插画：右侧留白多，用「左+上+下」三向遮罩让它从文字区淡淡浮现 */
.hero::after {
    content: ''; position: absolute; right: -2%; bottom: -4%;
    width: min(30vw, 430px); height: 118%;
    background: var(--img-hero) right bottom / contain no-repeat;
    -webkit-mask-image: linear-gradient(to left, #000 66%, transparent 100%);
    mask-image: linear-gradient(to left, #000 66%, transparent 100%);
    opacity: .97; pointer-events: none; z-index: 0;
}
/* 交付内容卡片浮在插画之上，保留毛玻璃质感 */
.hero-spec {
    position: relative; z-index: 2;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow), 0 0 0 6px rgba(255, 255, 255, .45);
}
/* Hero 左侧柔光晕：把插画的粉调向文字区晕开，避免硬边 */
.hero::before {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0;
    width: 62%; pointer-events: none; z-index: 0;
    background: linear-gradient(to left, rgba(255, 250, 251, 0) 30%, var(--bg) 78%);
}
.hero-inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
}
.hero-text { max-width: 620px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 15px; border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .82); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-size: 12px; letter-spacing: .04em;
    color: var(--primary-deep); margin-bottom: 22px;
}
.hero-badge::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: var(--primary); flex: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.hero h1 {
    font-size: 40px; line-height: 1.28; font-weight: 800; letter-spacing: -.6px;
    color: var(--text);
}
.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 60%, var(--lavender) 130%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--primary-deep);
}
.hero-sub { color: var(--text-sub); font-size: 14.5px; margin: 20px 0 32px; line-height: 1.95; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    margin-top: 44px; padding: 24px 0 0; border-top: 1px dashed var(--border);
}
.hero-stats div { display: flex; flex-direction: column; padding-right: 18px; }
.hero-stats div + div { padding-left: 20px; border-left: 1px dashed var(--border); }
.hero-stats strong {
    font-family: var(--mono); font-size: 23px; font-weight: 700;
    color: var(--primary-deep); letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* 交付内容卡：替代原先的假面板截图 */
.hero-spec {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.spec-head {
    display: flex; align-items: center; gap: 9px;
    padding: 15px 20px; border-bottom: 1px dashed var(--border);
    font-size: 12.5px; letter-spacing: .04em; font-weight: 600;
    color: var(--primary-deep); background: var(--bg-soft);
}
.spec-led {
    width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
    animation: specPulse 2s ease-in-out infinite;
}
@keyframes specPulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--primary-glow); }
    50%      { box-shadow: 0 0 0 7px rgba(255, 138, 168, .12); }
}
.spec-list { padding: 8px 20px 14px; }
.spec-list > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 12px 0; border-bottom: 1px dashed var(--border-soft);
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { font-size: 12.5px; color: var(--text-dim); flex: none; }
.spec-list dd {
    font-size: 12.5px; color: var(--text-sub);
    text-align: right; word-break: break-all;
}
.spec-list dd.is-key { color: var(--primary-deep); font-family: var(--mono); font-weight: 600; }
.spec-foot {
    padding: 13px 20px; border-top: 1px dashed var(--border);
    font-size: 12.5px; color: var(--text-dim); background: var(--bg-soft);
}

/* ---------------- 特性 ---------------- */
.features {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    margin: 8px auto 0;
}
.feature {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px 22px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s cubic-bezier(.34, 1.3, .64, 1), box-shadow .2s, border-color .2s;
}
.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-soft);
}
.f-icon {
    width: 42px; height: 42px; border-radius: 13px; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bg-pink), #fff);
    border: 1px solid var(--border); color: var(--primary-deep);
    box-shadow: var(--shadow-sm);
}
.f-icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.feature h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature p { font-size: 13px; color: var(--text-sub); line-height: 1.8; }

/* ---------------- 区块标题 ---------------- */
.section-head { text-align: center; margin: 64px 0 30px; }
.section-head.left { text-align: left; margin: 32px 0 22px; }
.section-head h2 {
    font-size: 25px; font-weight: 800; letter-spacing: -.3px; color: var(--text);
    position: relative; display: inline-block;
}
.section-head h2::after {
    content: ''; display: block; width: 42px; height: 4px; border-radius: 2px;
    margin: 10px auto 0;
    background: linear-gradient(90deg, var(--primary-soft), var(--primary), var(--lavender));
}
.section-head.left h2::after { margin-left: 0; }
.section-head p { color: var(--text-sub); font-size: 13.5px; margin-top: 8px; }
.section-head small { color: var(--text-dim); font-weight: 400; margin-left: 8px; }

/* ---------------- 商品卡片 ---------------- */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.product-card {
    position: relative; background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px 22px;
    transition: transform .2s cubic-bezier(.34, 1.3, .64, 1), box-shadow .2s, border-color .2s;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.product-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--primary-soft), var(--primary), var(--lavender));
    opacity: 0; transition: opacity .2s;
}
.product-card:hover {
    transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft);
}
.product-card:hover::before { opacity: 1; }
.discount-badge {
    position: absolute; top: 18px; right: 18px; padding: 3px 10px; border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #fff0f3, #ffe4ea);
    border: 1px solid var(--primary-soft);
    color: var(--primary-deep); font-size: 11px; font-family: var(--mono); font-weight: 700;
}
.product-head h3 { font-size: 16.5px; font-weight: 700; padding-right: 76px; line-height: 1.5; color: var(--text); }
.product-subtitle { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
    font-size: 11.5px; padding: 3px 10px; border-radius: var(--radius-pill);
    background: var(--bg-pink); color: var(--primary-deep); border: 1px solid var(--border);
}
/* 分类标签（1.7.8）：可点击跳回分类列表，强调色由行内 --cat-color 注入 */
a.tag-cat {
    color: var(--cat-color, var(--primary-deep));
    border-color: var(--cat-color, var(--border));
    background: color-mix(in srgb, var(--cat-color, #ffeeF3) 55%, #fff);
    transition: transform .15s, box-shadow .15s;
}
a.tag-cat:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cat-color, #ff8aa8) 30%, transparent);
}

/* ---------------- 分类筛选 Tab（全部商品页，1.7.8） ---------------- */
.cat-tabs {
    display: flex; flex-wrap: wrap; gap: 9px;
    margin: 0 0 26px;
}
.cat-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 17px; border-radius: var(--radius-pill);
    background: var(--card); border: 1.5px solid var(--border);
    font-size: 13px; color: var(--text-sub);
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, background .15s, color .15s, transform .15s;
    /* --cat-color 由行内样式注入（选中/悬停时生效） */
    --tab-color: var(--cat-color, var(--primary));
}
.cat-tab svg {
    width: 14.5px; height: 14.5px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.cat-tab i {
    font-style: normal; font-family: var(--mono); font-size: 11px;
    padding: 1px 7px; border-radius: var(--radius-pill);
    background: var(--bg-soft); color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}
.cat-tab:hover {
    transform: translateY(-2px);
    border-color: var(--tab-color);
    color: var(--tab-color);
}
.cat-tab.is-active {
    background: color-mix(in srgb, var(--tab-color) 9%, #fff);
    border-color: var(--tab-color);
    color: var(--tab-color);
    font-weight: 600;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--tab-color) 22%, transparent);
}
.cat-tab.is-active i { background: color-mix(in srgb, var(--tab-color) 14%, #fff); color: var(--tab-color); }

/* ---------------- 分类快捷入口（首页，1.7.8） ---------------- */
.cat-entry {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
    margin-bottom: 40px;
}
.cat-entry-card {
    display: flex; align-items: center; gap: 13px;
    padding: 17px 18px; border-radius: var(--radius);
    background: var(--card); border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform .2s cubic-bezier(.34, 1.3, .64, 1), box-shadow .2s, border-color .2s;
    --cat-c: var(--cat-color, var(--primary));
}
.cat-entry-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--cat-c);
}
.ce-ico {
    width: 44px; height: 44px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--cat-c) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--cat-c) 35%, transparent);
    color: var(--cat-c);
}
.ce-ico svg {
    width: 21px; height: 21px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.ce-body { flex: 1 1 auto; min-width: 0; }
.ce-body b {
    display: block; font-size: 14.5px; font-weight: 700; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce-body em {
    display: block; font-style: normal; font-size: 12px; color: var(--text-dim);
    margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce-count {
    flex: none; font-family: var(--mono); font-size: 11.5px;
    color: var(--cat-c); font-variant-numeric: tabular-nums;
    padding: 3px 9px; border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--cat-c) 9%, #fff);
}
.product-price {
    display: flex; align-items: baseline; gap: 3px; margin: 20px 0 10px; color: var(--text);
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.product-price .cur { font-size: 15px; font-weight: 600; color: var(--primary-deep); }
.product-price .num { font-size: 31px; font-weight: 800; letter-spacing: -1.2px; line-height: 1; color: var(--primary-deep); }
.product-price .origin {
    font-size: 12.5px; color: var(--text-dim); text-decoration: line-through; margin-left: 6px;
}
.product-spec { font-size: 12.5px; color: var(--text-sub); padding: 9px 0; }
.product-meta { list-style: none; margin: 6px 0 20px; flex: 1; }
.product-meta li {
    display: flex; justify-content: space-between; font-size: 12.5px;
    padding: 8px 0; border-bottom: 1px dashed var(--border-soft);
}
.product-meta li:last-child { border-bottom: 0; }
.product-meta span { color: var(--text-dim); }
.product-meta b { font-weight: 600; color: var(--text-sub); font-variant-numeric: tabular-nums; }

/* ---------------- 购买流程 ---------------- */
.steps-section {
    position: relative; margin-top: 72px; padding: 58px 0;
    background: linear-gradient(180deg, rgba(255, 244, 247, .7), rgba(255, 250, 251, .5));
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    overflow: hidden;
}
/* 开通流程区块背景：桌面/平板陪伴插画，向左右与上下渐隐，只留中部氛围 */
.steps-section::before {
    content: ''; position: absolute; right: -8%; top: -10%; bottom: -10%;
    width: min(38vw, 500px);
    background: var(--img-steps) right center / contain no-repeat;
    -webkit-mask-image: linear-gradient(to left, #000 30%, transparent 100%);
    mask-image: linear-gradient(to left, #000 30%, transparent 100%);
    opacity: .14; pointer-events: none;
}
.steps-section .wrap { position: relative; z-index: 1; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.flow-item { padding: 0; position: relative; }
.flow-item::before {
    content: ''; position: absolute; top: 19px; left: 46px; right: -32px; height: 2px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, var(--primary-soft) 0 8px, transparent 8px 16px);
}
.flow-item:last-child::before { display: none; }
.flow-num {
    position: relative; z-index: 1;
    width: 38px; height: 38px; margin-bottom: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #fff, var(--bg-pink));
    border: 2px solid var(--primary-soft); color: var(--primary-deep);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 12.5px; font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 138, 168, .2);
}
.flow-item h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.flow-item p { font-size: 12.5px; color: var(--text-sub); line-height: 1.8; }

/* ---------------- 须知 ---------------- */
.notice-section { margin-top: 52px; }
.notice-box {
    background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius);
    border-left: 5px solid var(--primary);
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
}
.notice-box h3, .notice-box h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--primary-deep); }
.notice-box p { font-size: 13.5px; color: var(--text-sub); line-height: 1.9; }
.notice-box ol, .notice-box ul { margin-left: 20px; font-size: 13px; color: var(--text-sub); line-height: 2; }
.notice-box.small { padding: 20px 22px; }
.notice-box code, .test-result code {
    background: var(--bg-pink); padding: 2px 7px; border-radius: var(--radius-xs);
    font-family: var(--mono); font-size: 12px; color: var(--primary-deep);
    border: 1px solid var(--border);
}

/* ---------------- 面包屑 ---------------- */
.breadcrumb {
    display: flex; align-items: center; gap: 9px; font-size: 12.5px;
    color: var(--text-dim); padding: 26px 24px 6px;
}
.breadcrumb span { color: var(--primary-soft); }
.breadcrumb a:hover { color: var(--primary-deep); }
.breadcrumb em { color: var(--text-sub); font-style: normal; }

/* ---------------- 商品详情 ---------------- */
.product-detail { display: grid; grid-template-columns: 1fr 344px; gap: 20px; margin-top: 18px; align-items: start; }
.pd-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 30px;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
/* 详情卡右上角陪衬插画：极低透明度，仅作氛围底纹，不干扰阅读 */
.pd-card::after {
    content: ''; position: absolute; top: 0; right: 0;
    width: 300px; height: 340px;
    background: var(--img-pd) right top / contain no-repeat;
    -webkit-mask-image:
        linear-gradient(to left, #000 22%, transparent 88%),
        linear-gradient(to bottom, #000 40%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to left, #000 22%, transparent 88%),
        linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-composite: intersect;
    opacity: .2; pointer-events: none;
}
.pd-head { position: relative; z-index: 1; }
.pd-head h1 { font-size: 23px; font-weight: 800; line-height: 1.45; color: var(--text); }
.pd-sub { color: var(--text-sub); font-size: 13.5px; margin-top: 10px; }
.pd-price-row {
    position: relative; z-index: 1;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
    margin: 26px 0 20px; padding: 22px 24px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--bg-pink), var(--bg-soft));
    border: 1px solid var(--border);
}
.pd-price {
    display: flex; align-items: baseline; gap: 3px; color: var(--primary-deep);
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.pd-price .cur { font-size: 17px; color: var(--primary); font-weight: 600; }
.pd-price .num { font-size: 39px; font-weight: 800; letter-spacing: -1.6px; line-height: 1; }
.pd-price .origin { font-size: 13.5px; color: var(--text-dim); text-decoration: line-through; margin-left: 8px; }
.pd-price-side { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-dim); text-align: right; }
.pd-price-side b { font-variant-numeric: tabular-nums; }
.pd-deliver-note {
    position: relative; z-index: 1;
    font-size: 13px; color: var(--text-sub);
    background: var(--bg-soft);
    border: 1px solid var(--border); border-left: 4px solid var(--primary-soft);
    border-radius: var(--radius-sm); padding: 15px 18px; line-height: 1.85;
}
.badge-auto {
    display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px;
    background: linear-gradient(135deg, #fff0f3, #ffe4ea); color: var(--primary-deep);
    border: 1px solid var(--primary-soft);
    margin-right: 8px; font-weight: 600;
}
.pd-section { position: relative; z-index: 1; margin-top: 32px; }
.pd-section h3 {
    font-size: 15px; font-weight: 700; margin-bottom: 14px; padding-left: 14px;
    border-left: 4px solid var(--primary); border-radius: 2px; line-height: 1.4; color: var(--text);
}
.pd-desc { font-size: 13.5px; color: var(--text-sub); line-height: 2; white-space: pre-wrap; word-break: break-word; }

.pd-aside { position: sticky; top: 84px; align-self: start; }
.buy-box {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow);
}
.buy-price {
    display: flex; align-items: baseline; gap: 3px; color: var(--primary-deep); margin-bottom: 20px;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.buy-price .cur { font-size: 16px; color: var(--primary); font-weight: 600; }
.buy-price .num { font-size: 33px; font-weight: 800; letter-spacing: -1.4px; line-height: 1; }
.pay-method-title {
    font-size: 12px; letter-spacing: .05em; font-weight: 600;
    color: var(--text-dim); margin-bottom: 10px;
}
.pay-methods { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.pay-method { display: block; cursor: pointer; }
.pay-method input { display: none; }
.pm-box {
    display: block; padding: 13px 16px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: var(--card); transition: all .16s;
}
.pay-method:hover .pm-box { border-color: var(--primary-soft); background: var(--bg-soft); }
.pay-method input:checked + .pm-box {
    border-color: var(--primary); background: linear-gradient(135deg, var(--bg-pink), #fff);
    box-shadow: var(--shadow-sm);
}
.pm-box b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; color: var(--text); }
.pm-box em { font-size: 12px; color: var(--text-dim); font-style: normal; }
.buy-guarantee {
    display: flex; flex-direction: column; gap: 8px; margin-top: 18px;
    padding-top: 18px; border-top: 1px dashed var(--border);
    font-size: 12.5px; color: var(--text-dim);
}
.buy-guarantee div::before { content: '✓'; color: var(--primary); margin-right: 8px; font-weight: 700; }
.other-products {
    margin-top: 16px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow-sm);
}
.other-products h4 {
    font-size: 12px; letter-spacing: .05em; font-weight: 600;
    margin-bottom: 12px; color: var(--text-dim);
}
.op-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px dashed var(--border-soft); font-size: 13px;
}
.op-item:last-child { border-bottom: 0; }
.op-item:hover .op-name { color: var(--primary-deep); }
.op-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-price { color: var(--primary-deep); font-family: var(--mono); flex-shrink: 0; font-weight: 600; }

/* ---------------- 表格 ---------------- */
.kv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv-table td { padding: 12px 14px; border-bottom: 1px dashed var(--border-soft); vertical-align: top; }
.kv-table tr:last-child td { border-bottom: 0; }
.kv-table td:first-child { color: var(--text-dim); width: 180px; }
.kv-table td:last-child { color: var(--text); word-break: break-word; }

/* ---------------- 支付页 ---------------- */
.pay-page { display: flex; justify-content: center; padding-top: 20px; }
.pay-card {
    width: 100%; max-width: 620px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
    box-shadow: var(--shadow);
}
.pay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pay-head h1 { font-size: 19px; font-weight: 800; color: var(--text); }
.order-no { font-size: 12.5px; color: var(--text-dim); }
.pay-amount {
    text-align: center; padding: 26px 0; margin: 22px 0;
    background: linear-gradient(135deg, var(--bg-pink), var(--bg-soft));
    border: 1px solid var(--border); border-radius: var(--radius);
}
.pay-amount .label {
    display: block; font-size: 12px; letter-spacing: .06em;
    color: var(--text-dim); margin-bottom: 10px;
}
.pay-amount .value {
    font-size: 42px; font-weight: 800; color: var(--primary-deep); letter-spacing: -1.6px;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.pay-amount .value i { font-size: 21px; font-style: normal; color: var(--primary); margin-right: 2px; }
.pay-info { display: flex; flex-direction: column; gap: 0; }
.pay-info > div {
    display: flex; justify-content: space-between; gap: 14px; font-size: 13px;
    padding: 11px 0; border-bottom: 1px dashed var(--border-soft);
}
.pay-info > div:last-child { border-bottom: 0; }
.pay-info span { color: var(--text-dim); }
.pay-info b { font-weight: 600; color: var(--text); }
.pay-channel-switch {
    display: flex; gap: 8px; margin: 22px 0; padding: 0;
    background: transparent; border: 0; flex-wrap: wrap;
}
.pay-channel-switch a {
    flex: 1; text-align: center; padding: 11px 6px;
    font-size: 13px; color: var(--text-sub); transition: all .16s;
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: var(--radius-pill); font-weight: 500;
}
.pay-channel-switch a:hover { color: var(--primary-deep); border-color: var(--primary-soft); }
.pay-channel-switch a.on {
    background: linear-gradient(135deg, #ffa3bb, var(--primary-dark));
    color: #fff; font-weight: 600; border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.qr-area { text-align: center; padding: 18px 0; }
.qr-box {
    display: inline-block; padding: 14px; background: #fff;
    border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.qr-tip { font-size: 13px; color: var(--text-sub); margin-top: 16px; }
.qr-status {
    font-size: 12.5px; color: var(--text-dim); margin-top: 10px;
}
.qr-placeholder {
    padding: 50px; border: 2px dashed var(--border); border-radius: var(--radius);
    color: var(--text-dim); font-size: 13px; background: var(--bg-soft);
}
.spin {
    display: inline-block; width: 11px; height: 11px; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--primary);
    animation: rotate .8s linear infinite; vertical-align: -2px; margin-right: 6px;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.ok-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); margin-right: 7px;
}
.page-pay-tip { text-align: center; padding: 30px 0; font-size: 13.5px; color: var(--text-sub); }
.page-pay-tip .btn { margin-top: 18px; }

.demo-pay-box {
    margin-top: 26px; padding: 20px; border-radius: var(--radius-sm);
    background: #fffaf3; border: 2px dashed #ffe0b8;
}
.demo-title {
    font-size: 12px; letter-spacing: .05em; font-weight: 600;
    color: var(--warning); margin-bottom: 10px;
}
.demo-pay-box p { font-size: 12.5px; color: var(--text-sub); line-height: 1.85; margin-bottom: 14px; }
.demo-pay-box strong { color: var(--text); font-weight: 600; }

.pay-footer {
    display: flex; justify-content: center; gap: 26px; margin-top: 26px;
    padding-top: 20px; border-top: 1px dashed var(--border);
    font-size: 13px; color: var(--text-sub);
}
.pay-footer a:hover { color: var(--primary-deep); }

/* ---------------- 认证页 ---------------- */
.auth-page {
    position: relative; display: flex; justify-content: center;
    padding: 56px 24px 64px;
}
/* 登录/注册页装饰：右上角樱花小精灵 */
.auth-page::before {
    content: ''; position: absolute; top: 6px; right: max(2%, calc(50% - 500px));
    width: 220px; height: 220px;
    background: var(--img-auth) center/contain no-repeat;
    opacity: .95; pointer-events: none; z-index: 0;
    filter: drop-shadow(0 12px 24px rgba(255, 138, 168, .28));
    animation: floatY 5s ease-in-out infinite;
}
/* 左侧竖版陪衬插画：只在宽屏出现，向内渐隐，不抢表单焦点 */
.auth-page::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: min(25vw, 340px); height: 100%;
    background: var(--img-auth-side) left bottom / contain no-repeat;
    -webkit-mask-image:
        linear-gradient(to right, #000 54%, transparent 100%),
        linear-gradient(to top, transparent 0%, #000 6%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, #000 54%, transparent 100%),
        linear-gradient(to top, transparent 0%, #000 6%);
    mask-composite: intersect;
    opacity: .46; pointer-events: none; z-index: 0;
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.auth-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 420px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 36px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.auth-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--primary-soft), var(--primary), var(--lavender));
}
.auth-head { margin-bottom: 28px; }
.auth-head h1 { font-size: 21px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.auth-head p { font-size: 13px; color: var(--text-dim); }
.form-item { margin-bottom: 18px; }
.form-item label {
    display: block; font-size: 12.5px; color: var(--text-sub); margin-bottom: 8px; font-weight: 500;
}
.form-item label em { color: var(--danger); font-style: normal; }
.form-item input, .form-item select, .form-item textarea {
    width: 100%; padding: 12px 15px; border-radius: var(--radius-sm);
    background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text);
    font-size: 13.5px; font-family: inherit; outline: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.form-item input::placeholder, .form-item textarea::placeholder { color: var(--text-dim); }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
    border-color: var(--primary); background: var(--card);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-item small { display: block; font-size: 12px; color: var(--text-dim); margin-top: 7px; line-height: 1.7; }
.form-item small strong { color: var(--text-sub); }

/* 输入框 + 按钮同行（验证码） */
.input-group { display: flex; gap: 10px; align-items: stretch; }
.input-group input {
    flex: 1 1 auto; min-width: 0; padding: 12px 15px; border-radius: var(--radius-sm);
    background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text);
    font-size: 13.5px; font-family: inherit; outline: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
    letter-spacing: 2px;
}
.input-group input:focus {
    border-color: var(--primary); background: var(--card);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.input-group .btn { flex: 0 0 auto; white-space: nowrap; padding: 12px 17px; font-size: 13px; }
.input-group .btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单内提示条 */
.notice {
    padding: 13px 16px; border-radius: var(--radius-sm); font-size: 12.5px;
    line-height: 1.75; margin-bottom: 18px;
    background: var(--bg-soft); border: 1px solid var(--border);
    border-left: 4px solid var(--text-dim);
    color: var(--text-sub);
}
.notice-warning {
    background: #fffaf3; border-color: #ffe8cf; border-left-color: var(--warning); color: #c8823a;
}
.notice-info {
    background: #f4faff; border-color: #dceefc; border-left-color: var(--info); color: #4d8fc7;
}
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--text-dim); }
.auth-foot a { color: var(--primary-deep); font-weight: 600; }
.auth-foot a:hover { color: var(--primary-dark); }

/* ---------------- 订单列表 ---------------- */
.order-page { padding-bottom: 30px; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-item {
    display: flex; justify-content: space-between; gap: 24px; align-items: center;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 24px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    box-shadow: var(--shadow-sm);
}
.order-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.oi-main { flex: 1; min-width: 0; }
.oi-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.oi-no { font-size: 12.5px; color: var(--text-dim); }
.oi-product { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.oi-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); }
.oi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.oi-amount {
    font-size: 21px; font-weight: 800; color: var(--primary-deep); letter-spacing: -.5px;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.oi-actions { display: flex; gap: 8px; }

.status-badge {
    display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill);
    font-size: 11.5px; font-weight: 600; border: 1px solid var(--border);
    background: var(--card); color: var(--text-sub);
}
.status-badge.big { padding: 6px 15px; font-size: 12.5px; }
.status-warn   { border-color: #ffe0b8; background: #fffaf3; color: #c8823a; }
.status-info   { border-color: #dceefc; background: #f4faff; color: #4d8fc7; }
.status-ok     { border-color: #c9eddd; background: #f2fbf7; color: #2f9d75; }
.status-muted  { border-color: var(--border); background: var(--bg-soft); color: var(--text-dim); }
.status-danger { border-color: #ffd6da; background: #fff5f6; color: #d95562; }

/* ---------------- 订单详情 ---------------- */
.detail-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 30px; }
.detail-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow-sm);
}
.detail-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: var(--text); }
.dc-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 18px; flex-wrap: wrap; margin-bottom: 8px;
}
.dc-head h1 { font-size: 20px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.dc-progress {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin: 26px 0 4px; padding-top: 24px; border-top: 1px dashed var(--border);
}
.dc-progress .step { display: flex; align-items: center; gap: 10px; }
.dc-progress .step i {
    width: 28px; height: 28px; border-radius: 50%; display: flex; flex: none;
    align-items: center; justify-content: center; font-size: 11.5px; font-style: normal;
    background: var(--bg-soft); border: 1.5px solid var(--border);
    color: var(--text-dim); font-weight: 700; font-family: var(--mono);
}
.dc-progress .step span { font-size: 12.5px; color: var(--text-dim); }
.dc-progress .step.done i {
    background: linear-gradient(135deg, #ffa3bb, var(--primary-dark));
    border-color: transparent; color: #fff;
    box-shadow: 0 3px 10px rgba(255, 138, 168, .35);
}
.dc-progress .step.done span { color: var(--primary-deep); font-weight: 600; }
.dc-pending {
    text-align: center; padding: 26px; margin-top: 20px; border-radius: var(--radius);
    background: #fffaf3; border: 2px dashed #ffe0b8;
}
.dc-pending p { font-size: 13.5px; color: #c8823a; margin-bottom: 18px; }

/* 面板信息卡 */
.panel-info-card { border-color: var(--primary-soft); box-shadow: 0 8px 28px rgba(255, 138, 168, .18); }
.panel-info-card h2 { color: var(--primary-deep); }
.pi-head {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 14px; flex-wrap: wrap; margin-bottom: 22px;
}
.pi-head h2 { font-size: 16.5px; margin: 0; }
.pi-note { font-size: 12px; color: var(--warning); font-weight: 600; }
.pi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pi-item.full { grid-column: 1 / -1; }
.pi-item label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 8px; }
.pi-value { display: flex; gap: 8px; align-items: center; }
.pi-value input {
    flex: 1; min-width: 0; padding: 12px 15px; border-radius: var(--radius-sm);
    background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text);
    font-family: var(--mono); font-size: 12.5px; outline: none;
    transition: border-color .16s, box-shadow .16s;
}
.pi-value input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.pi-actions {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border);
}
.pi-tip { font-size: 12.5px; color: var(--text-dim); }
/* MNBT 一键登录条 */
.mnbt-oneclick {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 16px 18px; margin-bottom: 22px;
    background: linear-gradient(135deg, var(--primary-glow), rgba(255, 255, 255, 0));
    border: 1.5px solid var(--primary-soft); border-radius: var(--radius-sm);
}
.mnbt-oneclick .btn-lg { flex: 0 0 auto; }
.mnbt-oneclick .pi-tip { flex: 1 1 200px; }
@media (max-width: 640px) {
    .mnbt-oneclick { flex-direction: column; align-items: stretch; }
    .mnbt-oneclick .btn-lg { width: 100%; text-align: center; }
}
.detail-actions {
    display: flex; gap: 10px; margin-top: 22px; padding-top: 20px;
    border-top: 1px dashed var(--border);
}
.help-card ol { margin-left: 22px; font-size: 13px; color: var(--text-sub); line-height: 2.1; }

/* ---------------- 空状态 / 错误页 ---------------- */
.empty-state, .empty-line {
    text-align: center; padding: 56px 20px 64px; color: var(--text-dim); font-size: 13.5px;
    background: var(--card); border: 2px dashed var(--border); border-radius: var(--radius);
}
.empty-state::before {
    content: ''; display: block; width: 168px; height: 168px; margin: 0 auto 18px;
    background: var(--img-empty) center/contain no-repeat;
    opacity: .92;
}
.empty-state { line-height: 1.9; }
.empty-line { padding: 40px 20px; border: 0; background: transparent; }
.empty-line::before { content: none; }
.error-page {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 40px;
}
.error-code {
    font-family: var(--mono); font-size: 84px; font-weight: 800; letter-spacing: -4px;
    background: linear-gradient(135deg, var(--primary-soft), var(--primary), var(--lavender));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--primary-soft);
    line-height: 1;
}
.error-page h1 { font-size: 21px; font-weight: 700; margin: 14px 0 10px; color: var(--text); }
.error-page p { color: var(--text-sub); font-size: 13.5px; margin-bottom: 26px; }
.error-actions { display: flex; gap: 12px; }

/* ---------------- 分页 ---------------- */
.pagination {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
    margin: 34px 0 10px; list-style: none;
}
.page-item .page-link {
    display: block; min-width: 36px; padding: 8px 12px; text-align: center;
    border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border);
    color: var(--text-sub); font-size: 12.5px; font-family: var(--mono);
    transition: all .16s; box-shadow: var(--shadow-sm);
}
.page-item .page-link:hover { border-color: var(--primary-soft); color: var(--primary-deep); transform: translateY(-2px); }
.page-item.active .page-link {
    background: linear-gradient(135deg, #ffa3bb, var(--primary-dark));
    border-color: transparent; color: #fff; font-weight: 700;
    box-shadow: var(--shadow-glow);
}
.page-item.disabled .page-link { opacity: .4; box-shadow: none; }

/* ---------------- 工具类 ---------------- */
.text-ok { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-dim) !important; }
.text-price {
    color: var(--primary-deep) !important; font-weight: 700;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------------- 页脚 ---------------- */
.site-footer {
    margin-top: auto; border-top: 1px dashed var(--border);
    background: linear-gradient(180deg, rgba(255, 244, 247, .55), rgba(255, 238, 243, .85));
}
.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
    gap: 40px; padding: 52px 24px 40px;
}
.site-footer h4 { font-size: 12px; font-weight: 700; margin-bottom: 16px; color: var(--primary-deep); }
.site-footer a, .site-footer .qa {
    display: block; font-size: 13px; color: var(--text-sub);
    margin-bottom: 9px; transition: color .15s, transform .15s;
}
.site-footer a:hover { color: var(--primary-deep); transform: translateX(3px); }
.footer-desc { font-size: 13px; color: var(--text-dim); line-height: 1.85; margin-top: 16px; max-width: 300px; }
.qa strong { color: var(--text-sub); font-weight: 600; }
.footer-bottom {
    border-top: 1px dashed var(--border); padding: 18px 0;
    font-size: 12.5px; color: var(--text-dim);
}
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 中等宽度（平板/小笔记本）：压缩导航内边距，避免文字被挤压换行 */
@media (min-width: 769px) and (max-width: 1180px) {
    .header-inner { gap: 16px; }
    .main-nav { margin-left: 0; gap: 0; }
    .main-nav a { padding: 20px 10px; font-size: 13.5px; }
    .header-actions { gap: 7px; }
    .header-actions .btn { padding: 9px 13px; font-size: 13px; }
    .user-chip { max-width: 96px; }
    .balance-chip { font-size: 12.5px; padding: 5px 11px; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero::after { width: 50%; right: -8%; bottom: -12%; height: 130%; opacity: .15; }
    .hero::before { width: 84%; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .flow { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .flow-item::before { display: none; }
    .product-detail { grid-template-columns: 1fr; }
    .pd-aside { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

/* ============================================================
   我的余额
   ============================================================ */
.balance-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 30px; }

/* 余额总览 */
.bal-hero {
    display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
    padding: 28px 30px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--bg-pink) 0%, #fff 55%, var(--bg-soft) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative; overflow: hidden;
}
/* 余额总览装饰：右侧竖版插画向内渐隐（替代原先的纯色光斑） */
.bal-hero::after {
    content: ''; position: absolute; right: -6px; top: 0; bottom: 0;
    width: 210px;
    background: var(--img-balance) right center / contain no-repeat;
    -webkit-mask-image: linear-gradient(to left, #000 26%, transparent 92%);
    mask-image: linear-gradient(to left, #000 26%, transparent 92%);
    opacity: .38; pointer-events: none;
}
.bal-hero > * { position: relative; z-index: 1; }
.bal-label {
    font-size: 12px; letter-spacing: .06em; color: var(--text-dim);
}
.bal-amount {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: 42px; font-weight: 800; color: var(--primary-deep); line-height: 1.15;
    margin: 10px 0 10px; letter-spacing: -1.6px;
}
.bal-amount i { font-size: 22px; font-style: normal; margin-right: 5px; color: var(--primary); }
.bal-tip { font-size: 12.5px; color: var(--text-dim); margin: 0; }
.bal-hero-stats { display: flex; gap: 0; margin-right: 150px; }
.bh-stat { display: flex; flex-direction: column; gap: 6px; text-align: right; padding-left: 26px; }
.bh-stat + .bh-stat { border-left: 1px dashed var(--border); }
.bh-stat span { font-size: 12px; color: var(--text-dim); }
.bh-stat b {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: 16px; color: var(--text); font-weight: 700;
}

/* 通用卡片 */
.bal-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 26px;
    box-shadow: var(--shadow-sm);
}
.bal-card-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.bal-card-head h2 { font-size: 16px; font-weight: 700; margin: 0; color: var(--text); }
.bal-card-note { font-size: 11.5px; color: var(--text-dim); }

/* 兑换表单 */
.redeem-form { display: flex; gap: 12px; flex-wrap: wrap; }
.redeem-input {
    flex: 1 1 300px; min-width: 0;
    padding: 13px 17px; font-size: 15px; font-family: var(--mono);
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--text); background: var(--bg-soft);
    border: 1.5px solid var(--border); border-radius: var(--radius-pill);
    outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
.redeem-input:focus { border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 4px var(--primary-glow); }
.redeem-input::placeholder { color: var(--text-dim); letter-spacing: 1px; text-transform: none; }
.redeem-result { margin-top: 14px; }
.redeem-help { font-size: 12.5px; color: var(--text-dim); margin: 14px 0 0; line-height: 1.75; }
.redeem-help b { color: var(--text-sub); font-weight: 600; }

/* 明细表格 */
.bal-table-wrap { overflow-x: auto; }
.bal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bal-table th {
    text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-dim);
    letter-spacing: .06em;
    padding: 0 14px 12px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.bal-table td { padding: 14px; border-bottom: 1px dashed var(--border-soft); vertical-align: middle; }
.bal-table tr:last-child td { border-bottom: 0; }
.bal-table tbody tr:hover td { background: var(--bg-soft); }
.bal-table .ta-r { text-align: right; }
.bal-time { color: var(--text-sub); white-space: nowrap; font-size: 12.5px; font-family: var(--mono); }
.bal-remark { color: var(--text-sub); max-width: 340px; word-break: break-word; }
.bal-after {
    color: var(--text); font-weight: 600;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.txt-in  { color: var(--success); font-weight: 700; font-family: var(--mono); }
.txt-out { color: var(--danger); font-weight: 700; font-family: var(--mono); }

.bal-tag {
    display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill);
    font-size: 11.5px; white-space: nowrap; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text-sub);
}
.bal-tag-in  { border-color: #c9eddd; background: #f2fbf7; color: #2f9d75; }
.bal-tag-out { border-color: #ffd6da; background: #fff5f6; color: #d95562; }

/* 空态 */
.bal-empty { text-align: center; padding: 46px 20px; }
.bal-empty-icon {
    width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
    background: var(--bg-pink); border: 1px dashed var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.bal-empty-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.bal-empty p { font-size: 14px; color: var(--text-sub); margin: 0 0 6px; }
.bal-empty span { font-size: 12.5px; color: var(--text-dim); }

/* 分页 */
.bal-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border);
}
.bal-pager-info { font-size: 12.5px; color: var(--text-dim); font-family: var(--mono); }

.bal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 商品页：余额抵扣勾选 */
.balance-deduct {
    margin: 4px 0 16px; padding: 14px 16px;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .16s;
}
.balance-deduct:hover { border-color: var(--primary-soft); }
.bd-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.bd-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; }
.bd-box { display: flex; flex-direction: column; gap: 4px; }
.bd-box b { font-size: 13px; color: var(--text); font-weight: 600; }
.bd-box em { font-size: 12px; color: var(--text-dim); font-style: normal; line-height: 1.6; }
.bd-note { margin-top: 9px; padding-left: 26px; }
.bd-note a { font-size: 12.5px; color: var(--primary-deep); text-decoration: none; }
.bd-note a:hover { color: var(--primary-dark); }

@media (max-width: 768px) {
    .bal-hero { grid-template-columns: 1fr; padding: 24px 20px; }
    .bal-hero::after { width: 170px; opacity: .26; }
    .bal-amount { font-size: 34px; }
    .bal-hero-stats { flex-wrap: wrap; gap: 18px; margin-right: 96px; }
    .bh-stat { text-align: left; padding-left: 0; }
    .bh-stat + .bh-stat { border-left: 0; }
    .bal-card { padding: 20px 18px; }
    .bal-remark { max-width: 160px; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .wrap { padding: 0 18px; }
    .main-nav {
        display: flex; position: absolute; top: 62px; left: 0; right: 0;
        background: var(--card); border-bottom: 1px solid var(--border);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow);
        flex-direction: column; padding: 6px 14px 14px; gap: 0;
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
        max-height: calc(100vh - 62px); overflow-y: auto; z-index: 99;
    }
    body.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
    .main-nav a { padding: 13px 6px; border-bottom: 1px dashed var(--border-soft); }
    .main-nav a.active { border-bottom-color: var(--primary); }
    .nav-toggle { display: block; }
    .nav-mask {
        display: none; position: fixed; inset: 0; z-index: 98;
        background: rgba(74, 58, 66, .32);
        backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    }
    body.nav-open .nav-mask { display: block; }
    /* 抽屉内用户区块 */
    .nav-user-name {
        display: block; margin-top: 10px; padding: 12px 6px 8px;
        font-size: 12.5px; color: var(--text-dim);
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .nav-register-wrap { display: block; padding: 12px 0 4px; }
    .nav-register-wrap .btn { width: 100%; }
    /* 头部按钮收纳：次要入口进抽屉 */
    .hide-m { display: none !important; }
    .header-inner { gap: 12px; }
    .header-actions { margin-left: auto; gap: 8px; }
    .user-chip { display: none; }
    .header-actions .btn { padding: 9px 14px; }
    .balance-chip { font-size: 12.5px; padding: 6px 12px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
    .hero { padding: 42px 0 36px; }
    .hero::after { width: 86%; right: -14%; opacity: .17; }
    .hero::before { width: 96%; background: linear-gradient(to left, rgba(255, 250, 251, 0) 22%, var(--bg) 72%); }
    /* 分类 Tab 与快捷入口：小屏收紧 */
    .cat-tabs { gap: 7px; margin-bottom: 20px; }
    .cat-tab { padding: 7px 13px; font-size: 12.5px; }
    .cat-entry { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 30px; }
    .cat-entry-card { padding: 13px 14px; gap: 10px; }
    .ce-ico { width: 38px; height: 38px; border-radius: 11px; }
    .ce-ico svg { width: 18px; height: 18px; }
    .ce-body b { font-size: 13.5px; }
    .ce-body em { display: none; }
    .hero h1 { font-size: 28px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
    .hero-stats div:nth-child(odd) { padding-left: 0; border-left: 0; }
    .features { grid-template-columns: 1fr; }
    .flow { grid-template-columns: 1fr; gap: 26px; }
    .section-head { margin: 46px 0 22px; }
    .section-head h2 { font-size: 21px; }
    .pd-card { padding: 22px; }
    .pd-price-row { flex-direction: column; align-items: flex-start; }
    .pd-price-side { text-align: left; }
    .order-item { flex-direction: column; align-items: flex-start; gap: 16px; }
    .oi-side { align-items: flex-start; width: 100%; flex-direction: row; justify-content: space-between; }
    .dc-progress { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .pi-grid { grid-template-columns: 1fr; }
    .pay-card, .auth-card { padding: 24px; }
    /* 认证页插图移到卡片上方（避免与表单重叠） */
    .auth-page { flex-direction: column; align-items: center; padding-top: 24px; }
    .auth-page::before {
        position: static; order: -1; width: 130px; height: 130px; margin-bottom: 18px;
    }
    /* 窄屏：左侧陪衬插画会让表单显拥挤，直接隐藏 */
    .auth-page::after { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; padding: 36px 18px 26px; }
}

/* ============================================================
   优惠券
   ============================================================ */

/* ---- 商品页：用券选择 ---- */
.coupon-deduct {
    margin: 14px 0 10px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    transition: border-color .16s;
}
.coupon-deduct:hover { border-color: var(--primary-soft); }
.coupon-deduct .cd-label {
    display: block; font-size: 12px; letter-spacing: .05em; font-weight: 600;
    color: var(--text-dim); margin-bottom: 9px;
}
.coupon-deduct select {
    width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
    background: var(--card); border: 1.5px solid var(--border);
    color: var(--text); font-size: 13px; font-family: inherit; outline: none;
    transition: border-color .16s, box-shadow .16s; cursor: pointer;
}
.coupon-deduct select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.coupon-deduct .cd-note {
    margin-top: 9px; font-size: 12px; color: var(--text-dim); line-height: 1.75;
}
.coupon-deduct .cd-note b { color: var(--primary-deep); font-weight: 700; }
.coupon-deduct .cd-note a { color: var(--primary-deep); }
.coupon-deduct .cd-note a:hover { color: var(--primary-dark); }

/* ---- 我的优惠券页 ---- */
.coupon-page { padding: 26px 0 60px; }

.coupon-summary {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    margin-bottom: 20px;
}
.cs-item {
    background: var(--card); padding: 20px 22px;
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 6px;
}
.cs-item > span { font-size: 11.5px; color: var(--text-dim); }
.cs-item > b {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: 23px; font-weight: 800; color: var(--text);
}
.cs-main > b { color: var(--primary-deep); }
.cs-saved > b { color: var(--text); }

.coupon-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.coupon-card-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    padding: 18px 22px; border-bottom: 1px dashed var(--border);
    background: var(--bg-soft);
}
.coupon-card-head h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.coupon-card-note { font-size: 11.5px; color: var(--text-dim); }

.coupon-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px; padding: 16px;
}
.coupon-ticket {
    display: flex; align-items: stretch; gap: 0;
    background: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: transform .18s, box-shadow .18s, border-color .18s;
    overflow: hidden;
}
.coupon-ticket:hover {
    transform: translateY(-3px); box-shadow: var(--shadow);
    border-color: var(--primary-soft);
}
.coupon-ticket.is-disabled { opacity: .55; }
.coupon-ticket.is-used, .coupon-ticket.is-expired { opacity: .65; }
.coupon-ticket.is-used:hover, .coupon-ticket.is-expired:hover { transform: none; }

.ct-left {
    flex: 0 0 112px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
    padding: 18px 10px; text-align: center;
    background: linear-gradient(160deg, var(--bg-pink), #fff);
    border-right: 1.5px dashed var(--primary-soft);
    position: relative;
}
/* 票据半圆缺口 */
.ct-left::before, .ct-left::after {
    content: ''; position: absolute; right: -8px;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--card); border: 1.5px solid var(--border);
}
.ct-left::before { top: -9px; }
.ct-left::after  { bottom: -9px; }
.ct-amount {
    display: flex; align-items: baseline; justify-content: center; gap: 2px;
    color: var(--primary-deep); font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.ct-num { font-size: 26px; font-weight: 800; letter-spacing: -1.2px; line-height: 1; }
.ct-unit { font-size: 13px; font-weight: 700; }
.ct-cond { font-size: 11px; color: var(--text-dim); }

.ct-right { flex: 1 1 auto; min-width: 0; padding: 15px 16px; display: flex; flex-direction: column; gap: 7px; }
.ct-name { font-size: 14px; font-weight: 700; color: var(--text); }
.ct-state {
    display: inline-block; margin-left: 7px; padding: 2px 9px;
    border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 600;
    vertical-align: middle; border: 1px solid var(--border); color: var(--text-sub);
}
.ct-state-unused  { border-color: #c9eddd; background: #f2fbf7; color: #2f9d75; }
.ct-state-used    { border-color: #dceefc; background: #f4faff; color: #4d8fc7; }
.ct-state-expired { border-color: var(--border); background: var(--bg-soft); color: var(--text-dim); }
.ct-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-sub); }
.ct-expire { color: var(--text-dim); font-size: 11.5px; }
.ct-foot { margin-top: auto; padding-top: 6px; }
.ct-usedat { font-size: 12px; color: var(--text-dim); }

.coupon-empty { padding: 46px 22px; text-align: center; }
.coupon-empty .ce-icon {
    width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
    background: var(--bg-pink); border: 1px dashed var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.coupon-empty .ce-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.coupon-empty p { font-size: 14px; color: var(--text-sub); margin-bottom: 6px; }
.coupon-empty span { font-size: 12.5px; color: var(--text-dim); }

.coupon-pager {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 18px 22px; border-top: 1px dashed var(--border);
}
.coupon-pager-info { font-size: 12.5px; color: var(--text-dim); font-family: var(--mono); }

/* 领券反馈浮层 */
.coupon-toast {
    position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
    z-index: 999; max-width: min(560px, 92vw); text-align: center;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 900px) {
    .coupon-summary { grid-template-columns: repeat(2, 1fr); }
    .coupon-grid { grid-template-columns: 1fr; }
    .ct-left { flex-basis: 100px; }
}

/* ============================================================
   移动端体验
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
body, a, button, .btn, input, select, textarea { -webkit-tap-highlight-color: transparent; }

/* 商品页快捷购买锚点：桌面隐藏，小屏显示 */
.pd-quick-buy { display: none; position: relative; z-index: 1; }

/* 手机付款提示 */
.qr-tip-m { display: none; margin-top: 10px; font-size: 12.5px; color: var(--text-dim); line-height: 1.8; padding: 0 8px; }

/* 触屏设备与小屏：触控目标、iOS 防聚焦缩放 */
@media (pointer: coarse), (max-width: 768px) {
    .form-item input, .form-item select, .form-item textarea,
    .input-group input, .redeem-input, .coupon-deduct select {
        font-size: 16px;
    }
    .btn { min-height: 42px; }
    .btn-lg, .btn-block { min-height: 48px; }
    .input-group .btn { min-height: 46px; }
    .bd-check input, .pick-item input[type=checkbox] { width: 18px; height: 18px; }
}

@media (max-width: 768px) {
    /* 二维码自适应 */
    .qr-box { padding: 12px; }
    .qr-box canvas { width: min(58vw, 220px) !important; height: auto !important; }
    .qr-tip-m { display: block; }
    /* 通道切换按钮加大触控 */
    .pay-channel-switch { margin: 18px 0; }
    .pay-channel-switch a { padding: 12px 10px; font-size: 12.5px; min-width: calc(50% - 4px); }
    /* 键值表块状化 */
    .kv-table { display: block; width: 100%; }
    .kv-table tr { display: block; padding: 9px 0; border-bottom: 1px dashed var(--border-soft); }
    .kv-table tr:last-child { border-bottom: 0; }
    .kv-table td { display: block; width: 100% !important; padding: 3px 0; border-bottom: 0; }
    .kv-table td:first-child { color: var(--text-dim); font-size: 12px; }
    /* 面板信息复制按钮整行 */
    .pi-value { gap: 6px; }
    .pi-actions .btn { flex: 1 1 auto; }
    /* 分页触控面积 */
    .page-item .page-link { min-width: 38px; padding: 11px 13px; }
    /* 优惠券票据间距 */
    .ct-left { flex-basis: 100px; padding: 15px 8px; }
    .coupon-card-head { padding: 15px 16px; }
    .coupon-grid { padding: 12px; gap: 12px; }
    /* 表单间距 */
    .form-item { margin-bottom: 20px; }
    /* 底部安全区 */
    .site-footer { padding-bottom: env(safe-area-inset-bottom); }
    .coupon-toast { max-width: 88vw; }
}

@media (max-width: 480px) {
    .wrap { padding: 0 14px; }
    .breadcrumb { padding: 20px 14px 4px; font-size: 12px; flex-wrap: wrap; }
    /* 分类：极窄屏单列入口 + Tab 横向滚动 */
    .cat-entry { grid-template-columns: 1fr; }
    .cat-tabs {
        flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .cat-tabs::-webkit-scrollbar { display: none; }
    .cat-tab { flex: 0 0 auto; }
    .hero { padding: 34px 0 30px; }
    .hero h1 { font-size: 25px; }
    .hero-sub { font-size: 13.5px; margin: 16px 0 24px; }
    .hero-stats strong { font-size: 20px; }
    .product-price .num { font-size: 28px; }
    .pd-price .num { font-size: 33px; }
    .pd-price-row { padding: 18px; }
    .pd-card { padding: 18px 16px; }
    .buy-box { padding: 20px 16px; }
    .pay-amount .value { font-size: 34px; }
    .pay-card { padding: 20px 16px; }
    .auth-card { padding: 28px 20px; }
    .auth-page::before { width: 108px; height: 108px; margin-bottom: 14px; }
    .auth-page::after { display: none; }
    .order-item { padding: 18px 16px; }
    .oi-amount { font-size: 19px; }
    .detail-card { padding: 20px 16px; }
    .bal-amount { font-size: 32px; }
    .footer-grid { padding: 30px 14px 22px; }
    .footer-bottom { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    /* 快捷购买锚点显示 */
    .pd-quick-buy { display: inline-flex; margin-top: 14px; }
    .section-head { margin: 38px 0 20px; }
    .empty-state { padding: 40px 16px 48px; }
    .empty-state::before { width: 130px; height: 130px; }
}

/* ============================================================
   图形验证码
   ============================================================ */
.input-group .captcha-img {
    height: 48px;
    flex: none;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    transition: border-color .16s, opacity .16s;
}
.input-group .captcha-img:active { opacity: .75; }
.input-group .captcha-img:hover { border-color: var(--primary); }

/* ============================================================
   捐赠支付（1.7.9）：收款码弹窗 + 支付页声明区
   ============================================================ */
.donate-modal { position: fixed; inset: 0; z-index: 999; }
.donate-modal[hidden] { display: none; }
.donate-modal .dm-mask {
    position: absolute; inset: 0;
    background: rgba(64, 34, 46, .45);
    backdrop-filter: blur(3px);
}
.donate-modal .dm-box {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 460px);
    max-height: 88vh; overflow-y: auto;
    background: #fff;
    border-radius: var(--radius-lg, 22px);
    padding: 26px 24px 22px;
    box-shadow: 0 18px 60px rgba(219, 112, 147, .35);
    text-align: center;
}
.donate-modal .dm-close {
    position: absolute; right: 12px; top: 10px;
    width: 34px; height: 34px;
    border: none; background: var(--bg-soft, #fdf3f6);
    border-radius: 50%;
    font-size: 20px; line-height: 1;
    color: var(--text-sub, #b48a99);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.donate-modal .dm-close:hover { background: #ffe4ea; color: var(--primary-deep, #c2527c); }
.donate-modal h3 {
    margin: 0 0 8px;
    font-size: 19px; color: var(--text, #40222e);
}
.donate-modal .dm-desc {
    font-size: 13.5px; color: var(--text-sub, #8d6472);
    line-height: 1.8; margin: 0 0 14px;
}
.donate-modal .dm-qr-grid {
    display: flex; justify-content: center; gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.dm-qr {
    margin: 0;
    width: min(42vw, 178px);
}
.dm-qr img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
    background: #fff;
    border: 2px solid var(--border, #f3dbe3);
    border-radius: 14px;
    padding: 6px;
}
.dm-qr figcaption {
    margin-top: 6px;
    font-size: 13px; font-weight: 600;
    color: var(--primary-deep, #c2527c);
}
.donate-modal .dm-note {
    font-size: 12.5px; color: var(--text-sub, #8d6472);
    line-height: 1.9;
    background: var(--bg-soft, #fdf3f6);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 14px;
    text-align: left;
}
.donate-modal .dm-note strong { color: var(--primary-deep, #c2527c); }

/* 支付页：捐赠声明区 */
.donate-pay-area .dm-qr-grid { margin: 6px 0 10px; }
.donate-claimed {
    margin: 16px auto 0;
    max-width: 420px;
    padding: 14px 16px;
    background: #f0fbf4;
    border: 1.5px solid #bfe8cd;
    border-radius: 14px;
    text-align: left;
}
.donate-claimed b { color: #1d7a43; font-size: 14.5px; }
.donate-claimed span { margin-left: 8px; font-size: 12.5px; color: #6b9e7d; }
.donate-claimed p {
    margin: 6px 0 0;
    font-size: 12.5px; color: #4f7d5f; line-height: 1.8;
}
