/*
 * 前台 H5 样式（浏览器 / 微信公众号共用）
 *
 * 原生 CSS，不引任何外部库、不引 CDN —— 客户服务器离线也能正常显示。
 * 配色和圆角跟着 theme.json 走，后台改主题色全站一起变。
 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body.h5 {
    margin: 0;
    font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    color: #1c1f26;
    background: #f2f4f8;
    padding-bottom: 66px;
}

.h5 a { color: inherit; text-decoration: none; }
.h5 .muted { color: #8a93a3; }
.h5 .small { font-size: 12px; }
.h5 .mono { font-family: ui-monospace, Consolas, monospace; }
.h5 .break { word-break: break-all; }
.h5 .center { text-align: center; }
.h5 .required::after { content: ' *'; color: #e11d48; }

/* 顶部栏 */
.h5-top {
    position: sticky; top: 0; z-index: 20;
    background: linear-gradient(135deg, var(--primary), #4f9bf0);
    color: #fff; padding: 12px 14px env(safe-area-inset-top);
}
.h5-top-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h5-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.h5-logo {
    width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 34px;
}
.h5-brand-text { display: flex; flex-direction: column; min-width: 0; }
.h5-brand-text strong { font-size: 15px; }
.h5-slogan { font-size: 11px; opacity: .85; }
.h5-right { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.h5-quota { background: rgba(255,255,255,.2); padding: 3px 9px; border-radius: 999px; }
.h5-vip { background: #ffd666; color: #7a4b00; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.h5-me { background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; }

/* 公告条 */
.h5-ticker {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    background: #fff7e6; color: #b45309; font-size: 12.5px;
    border-bottom: 1px solid #ffe6b8;
}
.h5-ticker-tag { background: #ff9f43; color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.h5-ticker-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.h5-wrap { padding: 12px; }

.h5-flash { padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.h5-flash-success { background: #e8f7ee; color: #14663a; }
.h5-flash-error { background: #fdecec; color: #a11d1d; }
.h5-flash-info { background: #eef2ff; color: #3730a3; }
.h5-flash-warning { background: #fef3c7; color: #92400e; }

/* 首页宣传位 */
.hero {
    display: flex; align-items: center; gap: 12px; padding: 16px;
    border-radius: var(--radius); margin-bottom: 12px;
    background: linear-gradient(135deg, #ffe8e2, #ffd9cf 60%, #ffeef0);
    color: #8a2b1d;
}
.hero h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: 1px; }
.hero p { margin: 0; font-size: 12.5px; color: #a4503c; }
.hero-phone {
    width: 56px; height: 62px; border-radius: 10px; background: #fff;
    display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.hero-qr {
    width: 30px; height: 30px; border: 3px solid var(--primary); border-radius: 4px;
    background:
        linear-gradient(var(--primary), var(--primary)) center/12px 3px no-repeat;
}

/* 扫码卡片 */
.scan-card {
    background: #fff; border-radius: var(--radius); padding: 20px 16px 16px;
    margin-bottom: 12px; text-align: center; box-shadow: 0 2px 10px rgba(20,40,80,.06);
}
.scan-icon {
    width: 96px; height: 96px; margin: 0 auto 14px; position: relative;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px;
}
.scan-icon span {
    border: 5px solid #8ec2f5; border-radius: 6px;
}
.scan-icon span:nth-child(1) { border-right-color: transparent; border-bottom-color: transparent; }
.scan-icon span:nth-child(2) { border-left-color: transparent; border-bottom-color: transparent; }
.scan-icon span:nth-child(3) { border-right-color: transparent; border-top-color: transparent; }
.scan-icon span:nth-child(4) { border-left-color: transparent; border-top-color: transparent; }
.scan-tip { font-size: 12px; color: #8a93a3; margin: 10px 0; }
.scan-paste { display: flex; gap: 8px; }
.scan-paste input {
    flex: 1; padding: 9px 11px; border: 1px solid #dfe3e8; border-radius: 9px; font: inherit; font-size: 13px;
}

/* 三个快捷入口 */
.quick-row {
    display: flex; gap: 8px; background: #fff; border-radius: var(--radius);
    padding: 12px 6px; margin-bottom: 12px;
}
.quick-row a {
    flex: 1; text-align: center; font-size: 13.5px; color: #4a5568;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.qi {
    width: 22px; height: 22px; border-radius: 6px; display: inline-block;
    background: #eaf3ff; border: 2px solid var(--primary);
}
.qi-book { border-color: #9aa7b8; }
.qi-help { border-color: #9aa7b8; border-radius: 50%; }

/* 区块 */
.block {
    background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(20,40,80,.05);
}
.block-title { font-size: 14.5px; margin: 0 0 10px; display: flex; align-items: center; }
.block-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--primary); margin-right: 8px; }
.block-head { display: flex; align-items: center; justify-content: space-between; }
.block-head .block-title { margin-bottom: 10px; }
.more { font-size: 12.5px; color: var(--primary); }

/* 工具九宫格 */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool {
    background: #f7f9fc; border-radius: 10px; padding: 14px 6px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.tool-icon { font-size: 17px; font-weight: 700; }
.tool-name { font-size: 12.5px; color: #4a5568; }

/* 列表 */
.list { display: flex; flex-direction: column; }
.list-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 0; border-bottom: 1px solid #f0f2f5;
}
.list-item:last-child { border-bottom: none; }
.li-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.li-main strong { font-size: 14px; }
.li-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
.tag-row { display: flex; gap: 5px; flex-wrap: wrap; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: #f1f3f7; color: #5b6472; }
.tag-ok { background: #e4f8ec; color: #15803d; }
.tag-warn { background: #fef3c7; color: #b45309; }
.tag-danger { background: #fdecec; color: #b91c1c; }
.tag-info { background: #e0f2fe; color: #0369a1; }
.tag-muted { background: #f1f3f7; color: #6b7280; }
.empty { text-align: center; color: #a6adba; padding: 34px 0; font-size: 14px; }

/* 表单 */
.form label { display: block; margin-bottom: 12px; font-size: 13px; color: #4a5568; }
.form input, .form select, .form textarea {
    width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; font-size: 14px;
    border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; color: #1c1f26;
}
.form textarea { resize: vertical; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 16px; border-radius: 10px; border: 1px solid #dfe3e8; background: #fff;
    color: #374151; font: inherit; font-size: 14px; cursor: pointer;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-danger { background: #fdecec; border-color: #f8cfcf; color: #b91c1c; }
.btn-block { width: 100%; }

/* 票夹搜索 */
.search-bar { display: flex; gap: 8px; background: #fff; border-radius: var(--radius); padding: 10px; margin-bottom: 10px; }
.search-bar select, .search-bar input {
    padding: 9px 10px; border: 1px solid #dfe3e8; border-radius: 9px; font: inherit; font-size: 13.5px;
}
.search-bar select { flex: 0 0 34%; }
.search-bar input { flex: 1; min-width: 0; }
.search-bar button { border: none; background: none; color: var(--primary); font-size: 14px; padding: 0 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.chip {
    flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; background: #fff;
    color: #5b6472; font-size: 12.5px;
}
.chip.on { background: var(--primary); color: #fff; }

/* 结果页 */
.result-card {
    border-radius: var(--radius); padding: 18px 16px; margin-bottom: 12px;
    background: #fff; text-align: center; box-shadow: 0 2px 10px rgba(20,40,80,.05);
}
.result-badge { display: inline-block; padding: 6px 18px; border-radius: 999px; font-size: 16px; font-weight: 600; }
.result-ok .result-badge { background: #e4f8ec; color: #15803d; }
.result-danger .result-badge { background: #fdecec; color: #b91c1c; }
.result-warn .result-badge { background: #fef3c7; color: #b45309; }
.result-muted .result-badge { background: #f1f3f7; color: #5b6472; }
.result-msg { margin: 10px 0 6px; font-size: 14px; }

.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th { text-align: left; color: #8a93a3; font-weight: 400; padding: 7px 8px 7px 0; width: 34%; vertical-align: top; }
.kv td { padding: 7px 0; }

.risk-list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.risk-list li { margin-bottom: 4px; }
.risk-block.risk-danger { border-left: 3px solid #ef4444; }
.risk-block.risk-warn { border-left: 3px solid #f59e0b; }
.risk-block.risk-info { border-left: 3px solid #38bdf8; }
.risk-block.risk-ok { border-left: 3px solid #22c55e; }

.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* 我的 */
.me-head {
    display: flex; align-items: center; gap: 12px; color: #fff; padding: 18px 14px;
    border-radius: var(--radius); margin-bottom: 12px;
    background: linear-gradient(135deg, #7ec2f7, #b8e0fb);
}
.me-avatar {
    width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.55);
    display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #3272b3;
    flex: 0 0 52px;
}
.me-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.me-info strong { font-size: 15px; }
.me-account { display: flex; align-items: center; gap: 6px; font-size: 12px; word-break: break-all; }
.copy-btn { border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.25); color: #fff; border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.vip-btn {
    background: var(--primary); border: 1px solid rgba(255,255,255,.6); color: #fff;
    border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; flex: 0 0 auto;
}
.stat-card {
    display: flex; background: #fff; border-radius: var(--radius); padding: 16px 0;
    margin-bottom: 12px; box-shadow: 0 2px 10px rgba(20,40,80,.05);
}
.stat-card .stat { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat-card .stat strong { font-size: 20px; }
.stat-card .stat span { font-size: 12px; color: #8a93a3; }
.stat-card .stat + .stat { border-left: 1px solid #f0f2f5; }

.menu-list { background: #fff; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid #f4f6f9; }
.menu-item:last-child { border-bottom: none; }
.mi-icon { width: 34px; height: 34px; border-radius: 9px; background: #eef5ff; flex: 0 0 34px; }
.mi-buy { background: #ffeef0; }
.mi-order { background: #e8f3ff; }
.mi-gift { background: #fdeeee; }
.mi-service { background: #e9f6ff; }
.mi-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mi-arrow { color: #c2c8d2; font-size: 18px; }

/* 套餐 */
.pkg-list { display: flex; flex-direction: column; gap: 10px; }
.pkg { border: 1px solid #eaeef4; border-radius: 12px; padding: 13px; }
.pkg-head { display: flex; align-items: center; justify-content: space-between; }
.pkg-badge { background: #fff1e6; color: #c2410c; border-radius: 999px; padding: 1px 9px; font-size: 11.5px; }
.pkg-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pkg-price strong { color: #e11d48; font-size: 18px; }
.pkg-price del { color: #b6bcc7; font-size: 12px; margin-left: 4px; }
.pkg-strip { display: flex; gap: 8px; overflow-x: auto; }
.pkg-mini { flex: 0 0 auto; background: #f7f9fc; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.pkg-mini .price { color: #e11d48; font-size: 14px; }

/* 收银台 */
.pay-card { text-align: center; }
.pay-title { font-size: 16px; margin: 4px 0; }
.pay-amount { font-size: 30px; font-weight: 700; color: #e11d48; margin: 6px 0 14px; }
.pay-state { font-size: 20px; font-weight: 600; margin: 6px 0; }
.pay-state.ok { color: #15803d; }
.pay-state.wait { color: #b45309; }
.pay-card .kv { text-align: left; margin-bottom: 14px; }

/* 折叠问答 / 步骤 */
.faq { border-bottom: 1px solid #f0f2f5; padding: 10px 0; }
.faq summary { font-size: 14px; cursor: pointer; }
.faq p { margin: 8px 0 0; font-size: 13px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 12px; }
.steps strong { font-size: 14px; }
.steps p { margin: 4px 0 0; }

.foot-note { text-align: center; color: #a6adba; font-size: 12px; padding: 10px 0 20px; }

/* 底部 tabbar */
.h5-tab {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; background: #fff; border-top: 1px solid #eef0f4;
    padding-bottom: env(safe-area-inset-bottom);
}
.h5-tab a {
    flex: 1; text-align: center; padding: 9px 0 8px; font-size: 12px; color: #8a93a3;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.h5-tab-dot { width: 16px; height: 16px; border-radius: 5px; background: #d7dce5; }
.h5-tab a.on { color: var(--primary); }
.h5-tab a.on .h5-tab-dot { background: var(--primary); }

.h5-toast {
    position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
    background: rgba(28,31,38,.86); color: #fff; padding: 10px 16px; border-radius: 10px;
    font-size: 13.5px; z-index: 99; max-width: 76vw; text-align: center;
}

/* ═══════════════ 电脑端（≥900px）═══════════════
 *
 * 手机版是"整屏铺满"写的，到了电脑上就变成一条被拉长的纸带（客户 2026-10-01 截图：
 * 扫码框横跨 1900px、九宫格三个大格子、底栏横在屏幕最下方）。
 *
 * 这里只做三件事，**纯 CSS 覆盖、不动任何 HTML 结构**，手机端一个像素都不变：
 *   1. 内容收进 1080px 的画布并居中（顶栏文字、公告、底栏 tab 同宽对齐）；
 *   2. 首页做成左右两栏：左边宣传位、右边扫码卡片，下面工具/最近查验各占整行；
 *   3. 工具格子从 3 列变 4 列，底栏 tab 收成同宽的圆角条。
 */
@media (min-width: 900px) {
    /* 1. 同宽画布 */
    .h5-top-in,
    .h5-ticker,
    .h5-wrap,
    .h5-tab {
        max-width: 1080px;
        margin-left: auto;
        margin-right: auto;
    }

    body.h5 { padding-bottom: 82px; }
    .h5-ticker { margin-top: 12px; border-radius: 10px; }

    /* 2. 首页两栏：宣传位 + 扫码卡片并排，其余块各占整行 */
    .h5-wrap {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
        align-items: start;
        padding: 20px 0 32px;
    }
    .h5-wrap > * { margin-bottom: 0; }
    .h5-wrap > .block,
    .h5-wrap > .quick-row,
    .h5-wrap > .h5-flash,
    .h5-wrap > .foot-note { grid-column: 1 / -1; }

    .hero,
    .scan-card { margin-bottom: 0; height: 100%; }
    .scan-card { display: flex; flex-direction: column; justify-content: center; }

    /* 3. 格子多一列、底栏收成同宽的圆角条 */
    .tool-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .h5-tab { border-radius: 12px 12px 0 0; }
}
