/* =============================================================
   中医问诊 · 医生端 App — Premium Design System
   Senior Developer (高级开发工程师)
   设计语言：温润蓝调 + 玻璃拟态 + 60fps 微交互
   主题：light / dark / system（跟随系统）
   ============================================================= */

:root {
    /* 品牌主色 */
    --brand-1: #378ADD;
    --brand-2: #185FA5;
    --brand-grad: linear-gradient(135deg, #378ADD 0%, #185FA5 100%);
    --female: #E8639B; /* 女性色（性别环形图，蓝=男 / 粉=女） */

    /* 状态色 */
    --ok: #2BB673;
    --warn: #F5A623;
    --danger: #E8553A;
    --info: #4A90D9;

    /* 语义色（light 默认） */
    --bg: #F4F6FA;
    --bg-soft: #ECF1F8;
    --surface: #FFFFFF;
    --surface-2: #F7FAFD;
    --text: #1F2D3D;
    --text-muted: #7488A0;
    --border: rgba(24, 95, 165, 0.10);
    --border-strong: rgba(24, 95, 165, 0.18);
    --shadow: 0 10px 30px -12px rgba(24, 95, 165, 0.22);
    --shadow-sm: 0 4px 14px -8px rgba(24, 95, 165, 0.30);
    --glass: rgba(255, 255, 255, 0.62);
    --glass-border: rgba(255, 255, 255, 0.65);
    --tabbar-bg: rgba(255, 255, 255, 0.82);
    --skeleton: linear-gradient(90deg, #eef2f7 25%, #e2e9f2 37%, #eef2f7 63%);

    /* 排版 */
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;

    /* 尺寸 */
    --appbar-h: 56px;
    --tabbar-h: 64px;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 暗色主题 ── */
html[data-theme="dark"] {
    --bg: #0E1620;
    --bg-soft: #121D2A;
    --surface: #18222F;
    --surface-2: #1E2A39;
    --text: #E8EEF6;
    --text-muted: #8AA0B8;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow: 0 14px 38px -14px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, 0.55);
    --glass: rgba(24, 34, 47, 0.66);
    --glass-border: rgba(255, 255, 255, 0.10);
    --tabbar-bg: rgba(16, 24, 35, 0.82);
    --skeleton: linear-gradient(90deg, #1a2532 25%, #223044 37%, #1a2532 63%);
}

/* ── system：跟随系统（在 JS 中解析为 light/dark，这里仅兜底）── */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 字体大小档位：只影响查询页具体内容文字，不影响 tab/搜索/分类标题/章节标题 */
.q-line__t, .q-recipe__item, .q-herb__item { transition: font-size .2s var(--ease), line-height .2s var(--ease); }
.q-view[data-fontsize="small"] .q-line__t { font-size: 13px; line-height: 1.7; }
.q-view[data-fontsize="normal"] .q-line__t { font-size: 14px; line-height: 1.75; }
.q-view[data-fontsize="large"] .q-line__t { font-size: 16px; line-height: 1.8; }
.q-view[data-fontsize="small"] .q-recipe__item { font-size: 13px; }
.q-view[data-fontsize="normal"] .q-recipe__item { font-size: 14px; }
.q-view[data-fontsize="large"] .q-recipe__item { font-size: 16px; }
.q-view[data-fontsize="small"] .q-herb__item { font-size: 13px; }
.q-view[data-fontsize="normal"] .q-herb__item { font-size: 14px; }
.q-view[data-fontsize="large"] .q-herb__item { font-size: 16px; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;                 /* App 外壳自身滚动 */
    transition: background-color .35s var(--ease), color .35s var(--ease);
    -webkit-font-smoothing: antialiased;
}

/* 适配刘海/灵动岛：安全区 */
.app-bar, .tabbar { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.tabbar { padding-bottom: env(safe-area-inset-bottom); }

/* =============================================================
   顶部 App Bar
   ============================================================= */
.app-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(var(--appbar-h) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 18px;
    padding-right: 14px;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.app-bar__title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 9px;
    overflow: hidden;              /* 防止图标向上溢出（Edge 兼容） */
}
.app-bar__title .logo-dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--brand-grad);
    box-shadow: 0 0 0 4px rgba(55, 138, 221, 0.18);
}
.app-bar__title .logo-img {
    width: 34px; height: 34px;
    object-fit: contain;
    display: none;
    vertical-align: middle;
    /* 固定高度，不依赖 env()（Edge 对 safe-area-inset-top 支持不一致）；
       34px 适配 56px 台头（上下各留 11px），不溢出 */
    max-height: 34px !important;
    max-width: 34px !important;
    flex-shrink: 0;
    overflow: hidden;
}
/* 统计详情页：台头左侧返回箭头（SVG data-URI，替换圆形图标） */
.stats-back-arrow {
    display: inline-block !important;
    width: 34px !important; height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    padding: 4px !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
    cursor: pointer;
    vertical-align: middle;
    clip-path: none !important;
    transition: background .15s, transform .1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.stats-back-arrow:active { transform: scale(.92); background: var(--border); }
.app-title__src {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 2px 7px; border-radius: 999px; margin-left: 8px;
    letter-spacing: 0; text-transform: none;
}
.app-bar__actions { display: flex; align-items: center; gap: 6px; }

.app-bar__action-btn {
    padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--brand-2);
    cursor: pointer; font-family: var(--font);
    transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.app-bar__action-btn:active { transform: scale(0.95); }

.icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    transition: transform .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn:hover { box-shadow: var(--shadow-sm); }

/* =============================================================
   主视图区（可滚动）
   ============================================================= */
.view {
    position: absolute;
    top: calc(var(--appbar-h) + env(safe-area-inset-top));
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    left: 0; right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.view::-webkit-scrollbar { width: 0; }

.section { padding: 16px 16px 28px; }

/* 进入动画 */
@keyframes viewIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.view > .section { animation: viewIn .4s var(--ease) both; }

/* =============================================================
   底部 Tab Bar（玻璃拟态 + 磁铁指示）
   ============================================================= */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    display: flex;
    background: var(--tabbar-bg);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border-top: 1px solid var(--border);
    z-index: 50;
    transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.tab-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: color .25s var(--ease), transform .2s var(--ease);
}
.tab-item .tab-ico {
    width: 23px; height: 23px;
    display: block;
    will-change: transform, width, height;
}
.tab-item.tab-item--img {
    justify-content: center;
    flex-direction: column;
    gap: 2px;
}
.tab-item.tab-item--img .tab-ico {
    width: 32px; height: 32px;
    object-fit: contain;
    background: transparent !important;
    /* 裁切边缘杂色 */
    clip-path: inset(3% 3% 3% 3%);
    will-change: transform, width, height;
    transition: width .22s cubic-bezier(.25,.46,.45,.94),
                height .22s cubic-bezier(.25,.46,.45,.94),
                transform .22s cubic-bezier(.25,.46,.45,.94);
    image-rendering: -webkit-optimize-contrast;
}
/* 未激活态：显示文字 */
.tab-item.tab-item--img span {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    will-change: opacity, transform;
    transition: opacity .18s cubic-bezier(.25,.46,.45,.94),
                transform .18s cubic-bezier(.25,.46,.45,.94);
}
/* 激活态：图标放大 + 隐藏文字（用 opacity 渐隐替代 display:none 避免硬切） */
.tab-item.active.tab-item--img {
    flex-direction: row;
    justify-content: center;
    gap: 0;
}
.tab-item.active.tab-item--img .tab-ico {
    width: 50px; height: 50px;
    clip-path: inset(2% 2% 2% 2%);
}
.tab-item.active.tab-item--img span {
    opacity: 0;
    transform: translateY(4px) scale(.9);
    pointer-events: none;
    position: absolute;
}
.tab-item.active { color: #0F5E4A; }
html[data-theme="dark"] .tab-item.active { color: #5BC0A0; }
.tab-item.active .tab-ico { transform: translateY(-1px); filter: none; }
.tab-item:active { transform: scale(0.94); }
/* 点击时图标微弹 */
.tab-item:active .tab-ico {
    transform: scale(.9) translateY(0);
}

/* 激活指示条（磁铁感） */
.tab-item::after {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    width: 22px; height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--brand-grad);
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.tab-item.active::after { transform: translateX(-50%) scaleX(1); opacity: 1; }

.tab-item .tab-badge {
    position: absolute;
    top: 5px; right: calc(50% - 23px);
    min-width: 18px; height: 18px;
    padding: 0 5px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 9px;
    box-shadow: 0 2px 6px rgba(232, 85, 58, .5);
}

/* =============================================================
   卡片 / 玻璃
   ============================================================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease);
}
.card.tap { cursor: pointer; }
.card.tap:active { transform: scale(0.98); }

.glass {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
}

/* 标题 */
.h-title {
    font-size: 22px; font-weight: 800; letter-spacing: .5px;
    margin-bottom: 4px;
}
.h-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* 工作台顶部栏（含手动开方按钮） */
.wb-header {
    display: flex; align-items: center; justify-content: space-between;
    margin: 4px 4px 14px;
}
.wb-header__title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.wb-header__action {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 13px; border-radius: 10px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--brand-2);
    cursor: pointer; font-family: var(--font);
    transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.wb-header__action:active { transform: scale(0.95); }

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: "";
    position: absolute; inset: 0;
    background: var(--brand-grad);
    opacity: 0; transition: opacity .3s var(--ease);
}
.stat:active { transform: translateY(-2px) scale(0.99); }
.stat .num {
    font-size: 26px; font-weight: 800;
    background: var(--brand-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}
.stat .lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; position: relative; }

/* =============================================================
   列表 / 病例卡片
   ============================================================= */
.list { display: flex; flex-direction: column; gap: 12px; }

.case-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 15px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
    position: relative;
}
.case-card:active { transform: scale(0.985); }
.case-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

.case-card__top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 14px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.avatar.f { background: linear-gradient(135deg, #F58FB0, #E8558A); }
.avatar.m { background: linear-gradient(135deg, #5AA9F0, #2E74D8); }
.avatar.u { background: linear-gradient(135deg, #9AA7B8, #6B7B90); }
.case-card__name { font-size: 16px; font-weight: 700; }
.case-card__meta { font-size: 12px; color: var(--text-muted); }
.case-card__main {
    font-size: 13.5px; color: var(--text);
    background: var(--surface-2);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.case-card__bottom {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; font-size: 12px; color: var(--text-muted);
}

/* ── 骨架屏（首屏加载占位，shimmer 扫光）── */
.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 15px;
    box-shadow: var(--shadow-sm);
}
.sk-avatar, .sk-line {
    background: var(--skeleton);
    background-size: 400px 100%;
    animation: sk-shimmer 1.3s infinite linear;
}
.sk-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.sk-line { height: 12px; border-radius: 6px; margin: 8px 0; }
@keyframes sk-shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

/* ── 列表淡入（数据到达轻微上浮）── */
.list-fade-in { animation: listFadeUp .30s var(--ease); }
@keyframes listFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 按钮 active 反馈（跟手触感）── */
.q-tab:active, .chip:active, .btn:active, .app-bar__action-btn:active { transform: scale(0.95); }
.q-tab, .chip, .btn, .app-bar__action-btn { transition: transform .12s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }

/* 标签 */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600;
    padding: 3px 9px; border-radius: 999px;
    border: 1px solid transparent;
}
.tag--visit { background: rgba(55,138,221,.12); color: var(--brand-2); }
.tag--src { background: rgba(116,136,160,.14); color: var(--text-muted); }
.tag--src.ext { background: rgba(232,85,58,.12); color: var(--danger); }
.wb-count { margin-left:6px;font-size:12px;font-weight:600;color:var(--brand-2);background:rgba(55,138,221,.10);padding:2px 8px;border-radius:10px;vertical-align:middle; }
/* 【v147】默认 cl-tab-count 恢复 v145 之前蓝字小标签（不红圆），
   需要红圆时加 .cl-tab-count--alert 修饰类（工作台待审批专用）。
   v146 改全红圆超出用户预期（用户只要"待审批"红圆，其他 3 个恢复原样式）。 */
.cl-tab-count { display:block; margin-left:0; margin-top:3px; font-size:11px; font-weight:600; color:var(--brand-2); background:rgba(55,138,221,.10); padding:1px 6px; border-radius:8px; min-width:18px; text-align:center; }
.cl-tab-count--alert { display:inline-block; margin-left:6px; font-size:10px; font-weight:700; color:#fff; background:var(--danger); padding:0 5px; min-width:16px; height:16px; line-height:16px; border-radius:8px; text-align:center; vertical-align:middle; margin-top:0; }
.tag--pending { background: rgba(232,85,58,.16); color: var(--danger); }
.tag--active  { background: rgba(245,166,35,.16); color: #C8821A; }
.tag--cured   { background: rgba(43,182,115,.16); color: var(--ok); }

/* =============================================================
   按钮
   ============================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: none; border-radius: 12px;
    padding: 11px 18px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .25s var(--ease), opacity .2s;
    font-family: var(--font);
}
.btn:active { transform: scale(0.96); }
.btn--primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(24,95,165,.6); }
.btn--primary:hover { box-shadow: 0 12px 26px -8px rgba(24,95,165,.7); }
.btn--ghost { background: var(--surface); color: var(--brand-2); border: 1px solid var(--border-strong); }
.btn--danger { background: linear-gradient(135deg,#F0735A,#E8553A); color:#fff; box-shadow:0 8px 20px -8px rgba(232,85,58,.6); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* =============================================================
   搜索 / 筛选条
   ============================================================= */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.search {
    flex: 1;
    display: flex; align-items: center; gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
}
.search input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 16px; color: var(--text); font-family: var(--font);
}
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row.cl-filter-row { gap: 10px; }
.chip-row.cl-filter-row .chip { flex: 1; text-align: center; padding: 8px 0; }
.chip {
    flex-shrink: 0;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text-muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .2s var(--ease);
}
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* =============================================================
   空态 / 加载
   ============================================================= */
.empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty .icon { font-size: 42px; margin-bottom: 10px; opacity: .8; }
.empty p { font-size: 14px; }
.empty small { font-size: 12px; opacity: .7; }

.loading { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }

.skeleton {
    background: var(--skeleton);
    background-size: 400% 100%;
    animation: shimmer 1.3s infinite linear;
    border-radius: 10px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* =============================================================
   登录遮罩
   ============================================================= */
#loginMask {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-grad);
    padding: 24px;
}
#loginMask.hidden { display: none; }
.login-card {
    width: 100%; max-width: 340px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.4);
    text-align: center;
    animation: viewIn .5s var(--ease) both;
}
.login-card .brand {
    width: 64px; height: 64px; border-radius: 20px;
    background: var(--brand-grad); margin: 0 auto 14px;
    display: grid; place-items: center; font-size: 30px; color: #fff;
    box-shadow: 0 12px 26px -8px rgba(24,95,165,.7);
}
.login-card h2 { font-size: 19px; margin-bottom: 4px; }
.login-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.login-card input {
    width: 100%; padding: 13px 14px; font-size: 16px;
    border: 1px solid var(--border-strong); border-radius: 12px;
    margin-bottom: 12px; outline: none; text-align: center;
    background: var(--surface-2); color: var(--text); font-family: var(--font);
    letter-spacing: 3px;
}
.login-card input:focus { border-color: var(--brand-1); }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* =============================================================
   设置项
   ============================================================= */
.setting-group { margin-bottom: 22px; }
.setting-group__title {
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .8px;
    margin: 0 4px 10px;
}
.setting-group__title--collapse {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none; padding: 4px;
    margin: 0 0 10px;
}
.collapse-arrow {
    display: inline-block; font-size: 12px;
    transform: rotate(-90deg); transition: transform .25s var(--ease);
    color: var(--text-muted);
}
.collapse-arrow.open { transform: rotate(0deg); }
.setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.setting-row:active { transform: scale(0.99); }
.setting-row .label { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.setting-row .label .ico { font-size: 18px; }
.setting-row .val { font-size: 14px; color: var(--text-muted); display:flex; align-items:center; gap:6px; }

/* 可折叠设置项：收起时像「账户」一样是一张独立卡片 */
.setting-row--collapse { margin-bottom: 10px; transition: border-radius .2s var(--ease), margin .2s var(--ease); }
.setting-row--collapse.expanded { margin-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.setting-row--collapse.expanded + .setting-group__body { padding-top: 10px; }
.setting-row--collapse .collapse-arrow { transform: rotate(-90deg); transition: transform .25s var(--ease); }
.setting-row--collapse .collapse-arrow.open { transform: rotate(0deg); }

/* 分段控件（后端切换） */
.segment {
    display: flex; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 4px; gap: 4px;
}
.segment button {
    flex: 1; border: none; background: none; cursor: pointer;
    padding: 9px 8px; border-radius: 9px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); font-family: var(--font);
    transition: all .25s var(--ease);
}
.segment button.active { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .segment button.active { color: #6FB0F2; }

/* =============================================================
   Toast
   ============================================================= */
#toast {
    position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px);
    transform: translateX(-50%) translateY(20px);
    background: rgba(31, 45, 61, .94);
    color: #fff; padding: 11px 20px; border-radius: 12px;
    font-size: 13.5px; font-weight: 500; z-index: 300;
    opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    max-width: 80%; text-align: center;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
html[data-theme="dark"] #toast { background: rgba(232,238,246,.96); color: #18222F; }

/* =============================================================
   查询模块占位（阶段 2 富化）
   ============================================================= */
.query-modules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qmod {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 16px;
    box-shadow: var(--shadow-sm); cursor: default;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.qmod:active { transform: scale(0.98); }
.qmod .ico { font-size: 26px; margin-bottom: 8px; }
.qmod .t { font-size: 15px; font-weight: 700; }
.qmod .s { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.qmod.soon .badge-soon {
    display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 600;
    color: var(--brand-2); background: rgba(55,138,221,.12);
    padding: 2px 8px; border-radius: 999px;
}

/* 关于 */
.about-hero {
    width: 100%; height: 160px; border-radius: var(--radius);
    overflow: hidden; position: relative;
    box-shadow: var(--shadow-sm);
    background: var(--bg);
    margin: 0;
}
/* 设置页：台头图区域吸顶，红框间距填充背景色，滚动时不透出下方内容 */
.section--settings { padding-top: 0; }
.about-hero-sticky {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);
    padding: 10px 16px 10px;
    margin: 0 -16px;
}
.about-hero img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 65%;
    display: block;
}
.about-hero__fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--text-muted);
    font-size: 14px; font-weight: 600; text-align: center;
}

/* =============================================================
   问诊单海报弹窗（从网页版 doctor_supabase 搬入，保持完全一致）
   ============================================================= */
.tcm-share-mask {
    position: fixed; inset: 0; z-index: 220; display: none;
    background: rgba(0,0,0,.55); align-items: center; justify-content: center; padding: 20px;
}
.tcm-share-mask.show { display: flex; }
.tcm-share-card {
    width: 300px; max-width: 86vw; background: #fff; border-radius: 16px;
    overflow: hidden; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.tcm-share-card img.poster { width: 100%; display: block; }
.tcm-share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.tcm-share-actions button {
    padding: 10px 0; border-radius: 10px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.tcm-share-copy { background: #185FA5; color: #fff; }
.tcm-share-copy:hover { background: #134a82; }
.tcm-share-actions .tcm-share-close { background: #fff; color: #185FA5; border-color: #185FA5; }
.tcm-share-actions .tcm-share-close:hover { background: #eef4fb; }
.tcm-share-hint { font-size: 12px; color: #888; padding: 0 14px 14px; line-height: 1.6; }

/* =============================================================
   查询 · 伤寒金匮原文（选择栏 + accordion + 标题吸附 + 搜索）
   ============================================================= */
.q-view { padding-top: 0; margin-top: 0; }

/* 统一粘性头：搜索栏 + tabs + 方剂/药物 toolbar 作为一个整体吸附 */
.q-header {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--bg);
    margin: 0 -16px;
    padding: 8px 16px 4px;
}

/* toolbar 已移入 header，body 顶部不再需要额外间距 */
#qBody { padding-top: 0; }

/* 顶部选择栏：原文 / 方剂 / 药物 */
.q-tabs {
    display: flex; gap: 8px; margin-bottom: 0;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 14px; padding: 5px;
}
.q-tab {
    flex: 1; border: none; background: none; cursor: pointer;
    padding: 10px 8px; border-radius: 10px; font-size: 14px; font-weight: 600;
    color: var(--text-muted); font-family: var(--font);
    transition: all .25s var(--ease);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    line-height: 1.25;
}
.q-tab.active { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .q-tab.active { color: #6FB0F2; }

/* 搜索栏（位于 tabs 上方，同为 .q-header 内容） */
.q-searchwrap {
    position: relative;
    background: transparent;
    margin: 0 0 8px;
    padding: 0;
}
.q-searchwrap .search { box-shadow: var(--shadow-sm); position: relative; }
.q-search-count {
    position: absolute; right: 34px; top: 50%; transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px; font-weight: 700; color: var(--danger);
    background: rgba(232, 85, 58, .10); border-radius: 999px;
    padding: 2px 8px; white-space: nowrap;
}

/* 书分组 */
.q-book { margin-bottom: 14px; }
.q-book > .q-ch.open { margin-bottom: 10px; }
.q-book__title {
    font-size: 15px; font-weight: 800; letter-spacing: .5px;
    color: var(--brand-2);
    margin: 0 4px 8px; padding-left: 10px;
    border-left: 3px solid var(--brand-1);
}
html[data-theme="dark"] .q-book__title { color: #6FB0F2; }
.q-chapters { display: flex; flex-direction: column; gap: 10px; }

/* 章节卡片（收起态） */
.q-ch {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.q-ch[data-ch] { cursor: pointer; }
.q-ch[data-ch]:active { transform: scale(0.985); }
.q-ch[data-ch]:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.q-ch__head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; }
.q-ch__name { font-size: 15.5px; font-weight: 700; }
.q-ch__count { font-size: 12px; color: var(--text-muted); flex-shrink: 0; margin-left: 10px; }

/* 展开态：标题吸附 */
.q-ch.open { overflow: visible; border-color: var(--border-strong); }
.q-ch.open .q-ch__head.sticky {
    position: sticky; top: var(--q-header-h, 110px); z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    padding: 12px 16px;
    box-shadow: 0 6px 14px -10px rgba(24, 95, 165, .4);
    border-radius: var(--radius) var(--radius) 0 0;
    margin: -1px -1px 0;
}
.q-ch.open .q-ch__head.sticky .q-ch__name { color: var(--brand-2); }
html[data-theme="dark"] .q-ch.open .q-ch__head.sticky .q-ch__name { color: #6FB0F2; }
/* 吸附头上方不留空：第一个展开章节的 head 与书标题之间保持正常间距 */
.q-chapters > .q-ch.open:first-child { margin-top: 0; }

/* 条文 */
.q-lines { padding: 4px 4px 8px; }
.q-line {
    display: grid; grid-template-columns: 34px 1fr; gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px; line-height: 1.75;
}
.q-line:last-child { border-bottom: none; }
.q-line__no {
    font-size: 12px; font-weight: 700; color: var(--brand-2);
    background: rgba(55, 138, 221, .10); border-radius: 8px;
    height: 22px; line-height: 22px; text-align: center; flex-shrink: 0;
}
.q-line__t { color: var(--text); }
/* 刘希彦逐条解读「释」按钮：仅宋本伤寒论中有映射的条显示，内联于条文末尾不换行 */
.liu-interp-btn {
    display: inline-block; vertical-align: baseline; margin-left: 6px;
    font-size: 12px; font-weight: 700; line-height: 1.2;
    color: #fff; background: linear-gradient(135deg, #e0a23a, #b86d18);
    border: none; border-radius: 10px; padding: 3px 9px; cursor: pointer;
    box-shadow: 0 2px 6px rgba(184, 109, 24, .3);
    transition: transform .15s var(--ease), filter .15s var(--ease);
}
.liu-interp-btn:hover { filter: brightness(1.08); }
.liu-interp-btn:active { transform: scale(.93); }
.liu-interp-modal__hd {
    font-size: 15px; font-weight: 700; color: #b86d18; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.liu-interp-modal__body {
    font-size: 14px; line-height: 1.9; color: var(--text);
    max-height: 62vh; overflow-y: auto; white-space: normal;
}
.q-line mark {
    background: rgba(232, 85, 58, .18);
    color: var(--danger); border-radius: 3px; padding: 0 1px; font-weight: 700;
}
.q-formula-tag.search-hit {
    color: var(--danger) !important;
    background: rgba(232, 85, 58, .18) !important;
}

/* 方剂 / 药物列表中搜索命中的文字同样标红 */
.q-recipe__item mark,
.q-herb__item mark {
    background: rgba(232, 85, 58, .18);
    color: var(--danger); border-radius: 3px; padding: 0 1px; font-weight: 700;
}

/* 药物弹框中的方剂名统一使用 .q-formula-tag 风格 */
.tcwp-hdetail__rel .q-formula-tag { cursor: pointer; user-select: none; }

/* 方剂名在原文中的醒目标记（可点击，后续接弹框释义） */
.q-formula-tag {
    display: inline;
    color: var(--brand-2);
    background: rgba(55, 138, 221, .12);
    border-radius: 5px;
    padding: 0 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s var(--ease);
}
.q-formula-tag:hover { background: rgba(55, 138, 221, .22); }
.q-formula-tag:active { background: var(--brand-2); color: #fff; }
html[data-theme="dark"] .q-formula-tag {
    color: #6FB0F2;
    background: rgba(111, 176, 242, .16);
}
html[data-theme="dark"] .q-formula-tag:hover { background: rgba(111, 176, 242, .26); }

/* =============================================================
   病例库 · 管理栏 / 批量栏 / 卡片操作
   ============================================================= */
.cl-managebar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cl-batchbar { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 13px; color: var(--text-muted); }
.mbtn {
    flex: 1 1 auto; min-width: 96px;
    padding: 10px 12px; border-radius: 11px;
    border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--brand-2); font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: var(--font); transition: all .2s var(--ease);
}
.mbtn:active { transform: scale(0.97); }
.mbtn.ghost { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.mbtn.primary { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(24, 95, 165, .6); }

.cc-acts { display: flex; gap: 6px; }
.cc-act {
    padding: 6px 12px; border-radius: 9px; border: 1px solid var(--border-strong);
    font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--font);
    transition: all .2s var(--ease);
}
.cc-act.sync { background: rgba(55, 138, 221, .10); color: var(--brand-2); border-color: transparent; }
.cc-act.del { background: rgba(232, 85, 58, .10); color: var(--danger); border-color: transparent; }
.cc-act:active { transform: scale(0.94); }

.cc-check {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--border-strong); background: var(--surface);
    cursor: pointer; position: relative; flex-shrink: 0; transition: all .2s var(--ease);
}
.cc-check.checked { background: var(--brand-grad); border-color: transparent; }
.cc-check.checked::after {
    content: "✓"; color: #fff; font-size: 14px; font-weight: 700;
    position: absolute; inset: 0; display: grid; place-items: center;
}
.case-card.batch { cursor: default; }

/* 查询页「内容设置」底部弹框 */
.qs-modal-mask {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(8, 14, 22, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
}
.qs-modal {
    width: 100%; max-width: 460px;
    background: var(--surface); color: var(--text);
    border-radius: 18px 18px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
    animation: qsUp .28s var(--ease);
    max-height: 86vh; overflow-y: auto;
}
@keyframes qsUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.qs-modal__hd { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.qs-modal__row { margin-bottom: 16px; }
.qs-modal__lbl { font-size: 13px; color: var(--text-muted); margin-bottom: 9px; }
.qs-modal__close {
    width: 100%; padding: 12px; border: none; border-radius: 12px;
    background: var(--brand-2); color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: var(--font); margin-top: 4px;
}
.qs-modal__close:active { transform: scale(0.98); }

/* 查询页「内容设置」就近弹框（简化版，锚定在按钮下方） */
.qs-pop-mask {
    position: fixed; inset: 0; z-index: 200;
    background: transparent;
}
.qs-pop {
    position: fixed; z-index: 201;
    width: 268px; max-width: calc(100vw - 24px);
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 14px; padding: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .28);
    animation: sfPop .16s var(--ease, ease);
}
.qs-pop__title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.qs-pop__row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 12px;
}
.qs-pop__row:last-child { margin-bottom: 0; }
.qs-pop__lbl { font-size: 13px; color: var(--text); flex: 0 0 auto; }
.qs-pop .segment { flex: 1 1 auto; min-width: 0; }
.qs-pop .segment button { padding: 8px 6px; font-size: 12.5px; }
/* 选中态统一为「金匮要略」开关的同款实底蓝（--brand-2），不再用浅底蓝字，避免与开关视觉不一致 */
.qs-pop .segment button.active { background: var(--brand-2); color: #fff; box-shadow: none; }
.qs-pop .segment button.active:hover { filter: brightness(1.06); }
html[data-theme="dark"] .qs-pop .segment button.active { background: var(--brand-2); color: #fff; }
/* 书籍开关：点亮 = 显示，未点亮 = 隐藏 */
.qs-toggle {
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text-muted); border-radius: 10px; padding: 8px 16px;
    font-size: 13px; font-weight: 600; font-family: var(--font); cursor: pointer;
    transition: all .22s var(--ease); min-width: 64px; flex: 0 0 auto;
}
.qs-toggle.on { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.qs-toggle:active { transform: scale(0.96); }
html[data-theme="dark"] .qs-pop { box-shadow: 0 12px 36px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .qs-toggle.on { color: #fff; }

/* ── 医案·状态筛选 弹出小框 ── */
.status-filter-mask {
    position: fixed; inset: 0; z-index: 200;
    background: transparent;
}
.status-filter-pop {
    position: fixed;
    min-width: 132px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 14px; padding: 6px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .28);
    animation: sfPop .16s var(--ease, ease);
}
@keyframes sfPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.status-filter-opt {
    display: block; width: 100%; text-align: left;
    padding: 10px 12px; border: none; background: transparent; color: var(--text);
    font-size: 14px; font-family: var(--font); border-radius: 9px; cursor: pointer;
}
.status-filter-opt:active { background: var(--surface-2); }
.status-filter-opt.active { background: var(--brand-2); color: #fff; font-weight: 600; }
html[data-theme="dark"] .status-filter-pop { box-shadow: 0 12px 36px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .status-filter-opt:active { background: rgba(255, 255, 255, .08); }

/* =============================================================
   查询 · 方剂列表（按首字拼音首字母分组）
   ============================================================= */
.q-recipe__cat { margin-bottom: 26px; }
.q-recipe__cat .q-book__title { margin-bottom: 14px; }
.q-recipe__letter {
    font-size: 13px; font-weight: 800; color: var(--brand-2);
    margin: 12px 0 8px; padding-left: 6px;
    display: flex; align-items: baseline; gap: 8px;
}
.q-recipe__letter small {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    background: rgba(55, 138, 221, .10); border-radius: 999px;
    padding: 1px 7px;
}
html[data-theme="dark"] .q-recipe__letter small {
    background: rgba(111, 176, 242, .12);
}
.q-recipe__list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.q-recipe__item {
    padding: 8px 12px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 14px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: all .2s var(--ease);
}
.q-recipe__item:active { transform: scale(0.96); background: var(--surface-2); }
html[data-theme="dark"] .q-recipe__item { background: rgba(255,255,255,.05); }

/* =============================================================
   查询 · 方剂（来源勾选 + 右侧字母锚点）
   ============================================================= */
.q-recipe__page { position: relative; }
.q-recipe__toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    background: transparent;
    padding: 6px 0;
    margin: 4px 0 0;
    min-height: 38px; box-sizing: border-box;
}
.q-recipe__src { display: flex; gap: 10px; flex: 1; }
.q-recipe__search { flex: 1 1 160px; min-width: 120px; }
.q-recipe__search input { font-size: 13px; }
.q-recipe__chk {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    cursor: pointer; transition: all .2s var(--ease);
    font-family: var(--font); position: relative;
}
.q-recipe__chk:active { transform: scale(0.96); }
.q-recipe__chk.active {
    border-color: var(--brand-2); background: rgba(55, 138, 221, .10); color: var(--brand-2);
}
html[data-theme="dark"] .q-recipe__chk.active {
    color: #6FB0F2; background: rgba(111, 176, 242, .16); border-color: rgba(111, 176, 242, .45);
}
.q-recipe__chk input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 100%; height: 100%;
}
.q-recipe__total {
    margin-left: auto;
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    padding: 6px 0;
}
html[data-theme="dark"] .q-recipe__total { color: #8ea4b8; }

/* 方剂列表项：收藏星标 + 名称（flex 一行） */
.q-recipe__item { display: flex; align-items: center; gap: 8px; }
.q-recipe__name { flex: 1; min-width: 0; }
.q-recipe__fav {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1; color: #c9a227;
    background: transparent; border: none; cursor: pointer; padding: 0;
    transition: transform .15s var(--ease), background .15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.q-recipe__fav:active { transform: scale(0.82); background: rgba(201, 162, 39, .14); }
.q-recipe__fav.on { color: #e8a900; }

/* v247⑤：医案列表卡片收藏星标（移植方剂收藏样式） */
.q-case__fav {
    flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1; color: #c9a227;
    background: transparent; border: none; cursor: pointer; padding: 0;
    transition: transform .15s var(--ease), background .15s var(--ease);
    -webkit-tap-highlight-color: transparent; margin-top: 1px; margin-left: 0;   /* v248②：去掉 margin-left:auto，置于名称前 */
}
.q-case__fav:active { transform: scale(0.82); background: rgba(201, 162, 39, .14); }
.q-case__fav.on { color: #e8a900; }

/* 方剂搜索历史 chips（空查询时展示于 toolbar 下方） */
.q-recipe__hist {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    width: 100%; margin-top: 2px;
}
.q-recipe__hist-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.q-recipe__hist-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.q-recipe__hist-chip {
    font-size: 12px; padding: 4px 12px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    cursor: pointer; transition: all .15s var(--ease); font-family: var(--font);
}
.q-recipe__hist-chip:active { transform: scale(0.95); border-color: var(--brand-2); color: var(--brand-2); }
.q-recipe__hist-clear {
    font-size: 12px; padding: 4px 10px; border-radius: 12px; border: none;
    background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: underline;
    font-family: var(--font);
}
.q-recipe__wrap { display: flex; gap: 10px; align-items: flex-start; }
.q-recipe__main { flex: 1; min-width: 0; }
.q-recipe__alpha {
    position: sticky;
    top: calc(var(--q-header-h, 110px) + 6px);
    align-self: flex-start;
    display: flex; flex-direction: column; align-items: center;
    width: 30px; max-height: calc(100vh - 140px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
    padding: 6px 2px; box-shadow: var(--shadow-sm);
}
.q-recipe__alpha::-webkit-scrollbar { display: none; }
.q-recipe__alpha button {
    width: 22px; height: 22px; border-radius: 7px; border: none; background: none;
    font-size: 11px; font-weight: 800; color: var(--brand-2);
    cursor: pointer; transition: all .2s var(--ease); flex-shrink: 0;
}
.q-recipe__alpha button:active { background: var(--brand-2); color: #fff; transform: scale(0.92); }
html[data-theme="dark"] .q-recipe__alpha button { color: #6FB0F2; }

/* =============================================================
   查询 · 药物列表（首字母 / 分类 + 筛选）
   ============================================================= */
.q-herb__page { position: relative; }
.q-herb__filterbar {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    background: transparent;
    margin: 4px 0 0;
    padding: 6px 0;
    min-height: 38px; box-sizing: border-box;
}
.q-herb__filter {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: all .2s var(--ease);
    font-family: var(--font);
}
.q-herb__filter.open {
    border-color: var(--brand-2);
    background: rgba(55, 138, 221, .10);
    color: var(--brand-2);
}
.q-herb__filter-badge {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    background: rgba(0,0,0,.05); border-radius: 999px;
    padding: 2px 7px;
}
.q-herb__filter.open .q-herb__filter-badge {
    background: rgba(55, 138, 221, .18); color: var(--brand-2);
}
html[data-theme="dark"] .q-herb__filter-badge { background: rgba(255,255,255,.10); }
html[data-theme="dark"] .q-herb__filter.open .q-herb__filter-badge { background: rgba(111, 176, 242, .25); }
.q-herb__result {
    margin-left: auto;
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    padding: 6px 0;
}
html[data-theme="dark"] .q-herb__result { color: #8ea4b8; }
.q-herb__dropdowns {
    position: absolute;
    top: calc(100% + 4px); left: 0;
    z-index: 20;
}
.q-herb__dropdown {
    position: static;
    min-width: 170px; max-width: calc(100vw - 32px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 8px; display: flex; flex-direction: column; gap: 2px;
}
.q-herb__dropdown--cols {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px 8px;
}
.q-herb__dropdown--cols .q-herb__opt:first-child {
    grid-column: 1 / -1;
}
@media (min-width: 400px) {
    .q-herb__dropdown--cols { grid-template-columns: repeat(3, 1fr); }
}
.q-herb__opt {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 10px;
    cursor: pointer; transition: background .15s;
    font-size: 13px; color: var(--text);
    white-space: nowrap;
}
.q-herb__opt:hover { background: var(--surface-2); }
.q-herb__opt input {
    width: 16px; height: 16px; flex-shrink: 0;
    accent-color: var(--brand-2); cursor: pointer;
}
.q-herb__wrap { display: flex; gap: 10px; align-items: flex-start; }
.q-herb__main { flex: 1; min-width: 0; }
.q-herb__letter {
    font-size: 13px; font-weight: 800; color: var(--brand-2);
    margin: 12px 0 8px; padding-left: 6px;
    display: flex; align-items: baseline; gap: 8px;
}
.q-herb__letter small {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    background: rgba(55, 138, 221, .10); border-radius: 999px;
    padding: 1px 7px;
}
html[data-theme="dark"] .q-herb__letter small { background: rgba(111, 176, 242, .12); }
.q-herb__list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.q-herb__item {
    padding: 8px 12px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 14px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: all .2s var(--ease);
}
.q-herb__item:active { transform: scale(0.96); background: var(--surface-2); }
html[data-theme="dark"] .q-herb__item { background: rgba(255,255,255,.05); }
.q-herb__alpha {
    position: sticky;
    top: calc(var(--q-header-h, 110px) + 6px);
    align-self: flex-start;
    display: flex; flex-direction: column; align-items: center;
    width: 30px; max-height: calc(100vh - 140px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
    padding: 6px 2px; box-shadow: var(--shadow-sm);
}
.q-herb__alpha::-webkit-scrollbar { display: none; }
.q-herb__alpha button {
    width: 22px; height: 22px; border-radius: 7px; border: none; background: none;
    font-size: 11px; font-weight: 800; color: var(--brand-2);
    cursor: pointer; transition: all .2s var(--ease); flex-shrink: 0;
}
.q-herb__alpha button:active { background: var(--brand-2); color: #fff; transform: scale(0.92); }
html[data-theme="dark"] .q-herb__alpha button { color: #6FB0F2; }

/* =============================================================
   查询 · 医案（分类筛选 + 内容区待上传）
   ============================================================= */
.q-case__page { position: relative; }
.q-case__filterbar {
    display: flex; align-items: center; gap: 10px;
    background: transparent; margin: 4px 0 0; padding: 6px 0;
    min-height: 38px; box-sizing: border-box;
}
.q-case__filter {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: all .2s var(--ease);
    font-family: var(--font);
}
.q-case__filter.active {
    border-color: var(--brand-2); background: rgba(55, 138, 221, .10); color: var(--brand-2);
}
.q-case__filter:active { transform: scale(0.96); }
html[data-theme="dark"] .q-case__filter.active { color: #6FB0F2; background: rgba(111, 176, 242, .16); }
.q-case__list { margin-top: 12px; }

/* 典经阁·现代医案卡片（每排一个） */
.q-case__item {
    padding: 14px 16px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--border);
    margin-bottom: 10px; cursor: pointer;
    display: flex; align-items: flex-start; gap: 8px;   /* v248②：五星前置，与名称同行省空间 */
    transition: all .2s var(--ease);
}
.q-case__item-body { flex: 1; min-width: 0; }
.q-case__item:hover { border-color: var(--brand-2); background: rgba(55, 138, 221, .06); transform: translateY(-1px); }
.q-case__item:active { transform: scale(.99); }
.q-case__item-name { font-size: 15.5px; font-weight: 800; color: var(--text); }
.q-case__item-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* 经方家：医生筛选条（横向滚动胶囊） */
.q-case__doctorbar {
    display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.q-case__doctorbar::-webkit-scrollbar { display: none; }
.q-case__doc {
    flex: 0 0 auto; padding: 5px 12px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 12.5px; font-weight: 600; color: var(--text-muted);
    cursor: pointer; white-space: nowrap; font-family: var(--font);
    transition: all .18s var(--ease);
}
.q-case__doc.active {
    border-color: var(--brand-2); background: rgba(55, 138, 221, .12); color: var(--brand-2);
}
.q-case__doc:active { transform: scale(.96); }
html[data-theme="dark"] .q-case__doc.active { color: #6FB0F2; background: rgba(111, 176, 242, .18); }
/* 搜索词命中医生名：标红（轻量提示，不与选中态冲突） */
.q-case__doc--hit { color: #e5392f !important; border-color: #e5392f !important; font-weight: 700; }
html[data-theme="dark"] .q-case__doc--hit { color: #ff6b6b !important; border-color: #ff6b6b !important; }

/* 医案详情内关键词高亮（搜索命中时） */
.q-hl { color: #e5392f; background: rgba(229, 57, 47, .12); border-radius: 3px; padding: 0 1px; font-weight: 700; }
html[data-theme="dark"] .q-hl { color: #ff6b6b; background: rgba(255, 107, 107, .16); }

/* 卡片上的医生 / 出处标签 */
.q-case__item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.q-case__tag {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 11.5px; font-weight: 600; line-height: 1.7;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.q-case__tag--doc {
    background: rgba(55, 138, 221, .10); border-color: rgba(55, 138, 221, .28); color: var(--brand-2);
}
html[data-theme="dark"] .q-case__tag--doc { color: #6FB0F2; background: rgba(111, 176, 242, .16); }

/* 加载更多 / 结尾提示 */
.q-case__more {
    width: 100%; padding: 11px; margin: 6px 0 10px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--text-muted);
    font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: var(--font);
    transition: all .2s var(--ease);
}
.q-case__more:active { transform: scale(.98); }
.q-case__endtip { text-align: center; font-size: 12px; color: var(--text-muted); padding: 10px 0 16px; }

/* 详情头部溯源标签 */
.q-case-detail__prov { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 14px; }

/* 医案详情弹框 */
.q-case-detail__hd { font-size: 19px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.q-case-detail__hd .tcwp-fdetail__fav { margin-left: auto; flex-shrink: 0; }
.q-case-detail__sec { margin-bottom: 14px; }
.q-case-detail__sechd {
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    margin-bottom: 6px; letter-spacing: .04em;
}
.q-case-detail__txt {
    font-size: 14px; line-height: 1.9; color: var(--text);
    white-space: pre-wrap; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
}
/* 主证突出：患者区中最关键的就诊主因，用品牌色 + 稍大字号强调 */
.q-case-detail__sec--chief .q-case-detail__sechd { color: var(--brand-2); }
.q-case-detail__sec--chief .q-case-detail__txt {
    font-size: 15px; font-weight: 600; line-height: 1.85;
    border-color: var(--brand-2); background: rgba(55, 138, 221, .06);
}
html[data-theme="dark"] .q-case-detail__sec--chief .q-case-detail__txt {
    border-color: rgba(111, 176, 242, .5); background: rgba(111, 176, 242, .10);
}
.q-case__resultbtn {
    width: 100%; padding: 11px; border: 1px dashed var(--brand-2);
    border-radius: 12px; background: rgba(55, 138, 221, .07); color: var(--brand-2);
    font-size: 14px; font-weight: 700; cursor: pointer; margin: 4px 0 14px;
    transition: all .2s var(--ease);
}
.q-case__resultbtn:active { transform: scale(.98); }
html[data-theme="dark"] .q-case__resultbtn { color: #6FB0F2; }

/* 病例库筛选栏复用 q-tabs 风格 */
.cl-tabs { margin-top: 4px; }
.wb-sort-hint { font-size: 11.5px; color: var(--text-muted); padding: 6px 4px 2px; line-height: 1.4; }

/* 组方用药中的药物高亮标签（绿色，区别于蓝色方剂名） */
.q-herb__tag {
    display: inline; cursor: pointer; font-weight: 700;
    color: #0f8a5f; background: rgba(31, 141, 95, .14);
    border-radius: 5px; padding: 0 4px;
    transition: all .2s var(--ease);
}
.q-herb__tag:hover { background: rgba(31, 141, 95, .26); }
.q-herb__tag:active { background: #0f8a5f; color: #fff; }
html[data-theme="dark"] .q-herb__tag { color: #4fd1a5; background: rgba(79, 209, 165, .16); }
html[data-theme="dark"] .q-herb__tag:hover { background: rgba(79, 209, 165, .28); }

/* =============================================================
   方剂 / 药物 详情弹框
   ============================================================= */
.tcwp-modal-mask {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(8, 14, 22, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tcwp-modal {
    width: 100%; max-width: 460px; max-height: 82vh; overflow-y: auto;
    background: var(--surface); color: var(--text);
    border-radius: 18px; padding: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
    animation: tcwpPop .26s var(--ease);
}
@keyframes tcwpPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.tcwp-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 14px 0; }

.tcwp-fdetail__hd {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.tcwp-fdetail__src {
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--brand-2); border-radius: 999px; padding: 3px 11px;
}
.tcwp-fdetail__name { font-size: 19px; font-weight: 800; }
.tcwp-fdetail__fav {
    flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1; color: #c9a227;
    background: transparent; border: 1px solid var(--border); cursor: pointer; padding: 0;
    transition: all .15s var(--ease); -webkit-tap-highlight-color: transparent; margin-right: 2px;   /* v248②：缩小，避免红框过大 */
}
.tcwp-fdetail__fav:active { transform: scale(0.9); }
.tcwp-fdetail__fav.on { color: #e8a900; border-color: rgba(201, 162, 39, .5); background: rgba(201, 162, 39, .12); }
.tcwp-fdetail__kp {
    margin-top: 4px; padding: 10px 12px; border-radius: 10px; line-height: 1.6;
    background: rgba(180, 83, 9, .10); color: #b45309; font-size: 13px;
    border: 1px solid rgba(180, 83, 9, .25);
}
html[data-theme="dark"] .tcwp-fdetail__kp { background: rgba(251, 191, 36, .10); color: #fbbf24; border-color: rgba(251, 191, 36, .28); }

/* 方剂弹框：伤寒论/金匮要略条文展示 */
.tcwp-cite-list { display: flex; flex-direction: column; gap: 10px; }
.tcwp-cite-item {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; font-size: 13.5px; line-height: 1.75;
}
.tcwp-cite-ch {
    display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--brand);
    background: rgba(24, 95, 165, .10); border-radius: 6px; padding: 2px 8px;
    margin-bottom: 4px;
}
html[data-theme="dark"] .tcwp-cite-ch { color: #6FB0F2; background: rgba(111, 176, 242, .12); }
.tcwp-cite-text { color: var(--text); margin: 0; }
html[data-theme="dark"] .tcwp-cite-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.tcwp-fdetail__count {
    font-size: 12px; font-weight: 700; color: var(--brand-2);
    background: rgba(55, 138, 221, .12); border-radius: 999px; padding: 3px 10px;
}
html[data-theme="dark"] .tcwp-fdetail__count { color: #6FB0F2; background: rgba(111, 176, 242, .14); }
.tcwp-fdetail__body { display: flex; flex-direction: column; gap: 16px; }
.tcwp-fdetail__sec { }
.tcwp-fdetail__sechd {
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    margin-bottom: 8px; letter-spacing: .04em;
}
.tcwp-fdetail__comp, .tcwp-fdetail__method {
    font-size: 14.5px; line-height: 2; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px;
}
.tcwp-fdetail__method { line-height: 1.9; color: var(--text-muted); }
/* 组方用药中的剂量/炮制说明等非药物文字缩小 */
.q-dose { font-size: 12.5px; color: var(--text-muted); }

/* 药物详情：神农本草经 / 名医别录 原文块（white-space:pre-wrap 保留换行） */
.tcwp-classic {
    font-size: 14.5px; line-height: 1.95; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px; white-space: pre-wrap;
}

.tcwp-hdetail__hd { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.tcwp-hdetail__info { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.tcwp-hdetail__info > div {
    font-size: 13px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; padding: 8px 12px;
}
.tcwp-hdetail__info > div span { color: var(--text-muted); margin-right: 6px; font-weight: 600; }
.tcwp-hdetail__note { text-align: left; padding: 6px 0 12px; }
.tcwp-hdetail__rel { display: flex; flex-wrap: wrap; gap: 8px; }
.tcwp-rel__item {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 10px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 13.5px; font-weight: 600; color: var(--text);
    transition: all .2s var(--ease);
}
.tcwp-rel__item small { font-size: 10.5px; color: var(--brand-2); font-weight: 700; }
.tcwp-rel__item:active { transform: scale(0.96); background: var(--surface-2); }
html[data-theme="dark"] .tcwp-rel__item small { color: #6FB0F2; }

.tcwp-modal__close {
    width: 100%; padding: 12px; border: none; border-radius: 12px; margin-top: 18px;
    background: var(--brand-2); color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: var(--font);
}
.tcwp-modal__close:active { transform: scale(0.98); }

/* 通用确认对话框（TCWP.ui.confirmDialog，替代 window.confirm） */
.tcwp-confirm { padding: 22px 20px 18px; text-align: center; }
.tcwp-confirm__msg { font-size: 15px; line-height: 1.65; color: var(--text); margin: 4px 4px 22px; white-space: pre-wrap; }
.tcwp-confirm__btns { display: flex; gap: 12px; }
.tcwp-confirm__btn {
    flex: 1; padding: 12px 10px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: var(--font); transition: transform .12s var(--ease);
}
.tcwp-confirm__btn:active { transform: scale(0.97); }
.tcwp-confirm__btn--cancel { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.tcwp-confirm__btn--ok { background: var(--brand-2); color: #fff; }
.tcwp-confirm__btn--danger { background: #dc2626; color: #fff; }
html[data-theme="dark"] .tcwp-confirm__btn--danger { background: #ef4444; }

/* ============================================================
   医案掌握度标记（掌握=绿 / 不熟=红），本地学习进度
   ============================================================ */
/* 详情页：医案名称上方左侧标签 */
.q-case-detail__mastery {
    display: inline-flex; align-items: center; align-self: flex-start;
    font-size: 12px; font-weight: 700; line-height: 1;
    padding: 4px 11px; border-radius: 999px; margin-bottom: 10px;
}
.q-case-detail__mastery--mastered { color: #047857; background: #d1fae5; }
.q-case-detail__mastery--unfamiliar { color: #b91c1c; background: #fee2e2; }
html[data-theme="dark"] .q-case-detail__mastery--mastered { color: #6ee7b7; background: rgba(16,185,129,.18); }
html[data-theme="dark"] .q-case-detail__mastery--unfamiliar { color: #fca5a5; background: rgba(239,68,68,.18); }

/* 详情页底部：状态按钮（左）+ 缩小关闭（右） */
.q-case-detail__footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.q-case-detail__statusbtns { display: flex; gap: 8px; }
.q-mastery-btn {
    font-size: 14px; font-weight: 700; padding: 7px 18px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
    cursor: pointer; font-family: var(--font); transition: all .18s var(--ease);
}
.q-mastery-btn:active { transform: scale(.96); }
.q-mastery-btn--mastered.active { color: #047857; background: #d1fae5; border-color: #6ee7b7; }
.q-mastery-btn--unfamiliar.active { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
html[data-theme="dark"] .q-mastery-btn--mastered.active { color: #6ee7b7; background: rgba(16,185,129,.18); border-color: rgba(16,185,129,.45); }
html[data-theme="dark"] .q-mastery-btn--unfamiliar.active { color: #fca5a5; background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.45); }
.tcwp-modal__close--sm { width: auto; margin-top: 0; padding: 8px 20px; font-size: 13px; }

/* 列表卡片状态图标（卡片首部） */
.q-case__mastery {
    display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; line-height: 1;
    padding: 3px 9px; border-radius: 999px; margin-bottom: 6px;
}
.q-case__mastery--mastered { color: #047857; background: #d1fae5; }
.q-case__mastery--unfamiliar { color: #b91c1c; background: #fee2e2; }
html[data-theme="dark"] .q-case__mastery--mastered { color: #6ee7b7; background: rgba(16,185,129,.18); }
html[data-theme="dark"] .q-case__mastery--unfamiliar { color: #fca5a5; background: rgba(239,68,68,.18); }

/* ============================================================
   康平本伤寒论 · 富文本样式（颜色刻意区别于搜索红 / 方剂蓝）
   - 注 图标：琥珀色（与搜索红、方剂蓝均不冲突）
   - 追文/准原文 标签：紫罗兰色（编辑批注语义）
   ============================================================ */
.q-book--kangping .q-book__title {
    color: #b45309;
}
.q-book--kangping .q-book__title::before {
    content: "康平本";
    display: inline-block;
    font-size: .62em;
    font-weight: 700;
    color: #b45309;
    background: #fff4e0;
    border: 1px solid #fcd9a5;
    border-radius: 6px;
    padding: 1px 6px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 注 图标：可点击、吸附弹窗；琥珀色避免与搜索红/方剂蓝混淆 */
.kp-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    height: 1.4em;
    padding: 0 .38em;
    margin: 0 .12em;
    border-radius: 6px;
    font-size: .74em;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    color: #b45309;
    background: #fff4e0;
    border: 1px solid #fcd9a5;
    transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.kp-note:hover {
    background: #ffe9c2;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(180, 83, 9, .22);
}
.kp-note:active { transform: translateY(0); }
.kp-note:focus-visible { outline: 2px solid #f59e0b; outline-offset: 1px; }

/* 康平本正文：普通正文/准原文加粗，与标签区分；追文正文不加粗以示区别（原书标注） */
.kp-normal { font-weight: 600; }
.kp-normal.kp-normal--zhuiwen { font-weight: 400; }
/* 嵌套在加粗正文里的方剂名保持常规字重，避免过粗 */
.kp-normal .q-formula-tag { font-weight: 500; }

/* 追文 / 准原文 编辑标签（追文改黑色，准原文保留紫罗兰以区分） */
.kp-label {
    font-weight: 600;
    background: rgba(124, 58, 237, .08);
    border-radius: 4px;
    padding: 0 .2em;
}
.kp-label--zhuiwen { color: #111827; background: rgba(17, 24, 39, .06); }
.kp-label--zhunwen { color: #7c3aed; }

/* 注解弹窗：吸附在「注」图标上下，点外部/滚动/Esc 关闭 */
.kp-popup {
    position: fixed;
    z-index: 200;
    max-width: min(86vw, 360px);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
    padding: 12px 14px 14px;
    font-size: 14px;
    line-height: 1.65;
    animation: kpPop .14s ease-out;
}
@keyframes kpPop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.kp-popup__hd {
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 6px;
    letter-spacing: .04em;
}
.kp-popup__body {
    white-space: pre-wrap;
    word-break: break-word;
}
.kp-popup__arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    top: -7px;
    background: var(--surface);
    border-left: 1px solid var(--border-strong, #e5e7eb);
    border-top: 1px solid var(--border-strong, #e5e7eb);
    transform: rotate(45deg);
}
.kp-popup__arrow--up {
    top: auto;
    bottom: -7px;
    border-left: none;
    border-top: none;
    border-right: 1px solid var(--border-strong, #e5e7eb);
    border-bottom: 1px solid var(--border-strong, #e5e7eb);
}

html[data-theme="dark"] .q-book--kangping .q-book__title { color: #fbbf24; }
html[data-theme="dark"] .q-book--kangping .q-book__title::before {
    color: #fbbf24;
    background: rgba(217, 119, 6, .22);
    border-color: rgba(251, 191, 36, .34);
}
html[data-theme="dark"] .kp-note {
    color: #fbbf24;
    background: rgba(217, 119, 6, .22);
    border-color: rgba(251, 191, 36, .34);
}
html[data-theme="dark"] .kp-note:hover { background: rgba(217, 119, 6, .34); }
html[data-theme="dark"] .kp-label--zhuiwen { color: #f3f4f6; background: rgba(243, 244, 246, .10); }
html[data-theme="dark"] .kp-label--zhunwen { color: #c4b5fd; background: rgba(167, 139, 250, .16); }
html[data-theme="dark"] .kp-popup {
    background: #1f2a38;
    color: #e8eef6;
    border-color: #33414f;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .kp-popup__hd { color: #fbbf24; }
html[data-theme="dark"] .kp-popup__arrow {
    background: #1f2a38;
    border-color: #33414f;
}

/* 医案详情内医生名 → 可点击弹简介小框 */
.q-case__doclink {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    transition: color .15s ease, background .15s ease;
}
.q-case__doclink:hover {
    color: var(--brand-2, #b8860b);
    background: rgba(184,134,11,.12);
}
.q-case__doclink:active { transform: translateY(1px); }

/* ══ 医家档案（典经阁·doctor 模块）══ */
.q-doc__page { position: relative; }
.q-doc__list { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 40px; }
.q-doc__list.empty { display: block; }
.q-doc__item {
    background: var(--card, #fff);
    border: 1px solid var(--border, rgba(24, 95, 165, 0.10));
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .12s;
}
.q-doc__item:hover { border-color: var(--brand-2); background: rgba(55, 138, 221, .06); transform: translateY(-1px); }
.q-doc__item:active { transform: scale(.99); }
.q-doc__item-name { font-size: 17px; font-weight: 800; color: var(--text); }
.q-doc__item-alias { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.q-doc__item-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.q-doc__item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.q-doc__tag { font-size: 11.5px; color: var(--text-muted); background: var(--chip-bg, rgba(0, 0, 0, .05)); border-radius: 8px; padding: 2px 8px; }
.q-doc__tag--school { color: var(--brand-2); background: rgba(55, 138, 221, .1); }
.q-doc__item-bio { font-size: 13px; color: var(--text-muted); margin-top: 8px; line-height: 1.7; }
.q-doc__item-cases { font-size: 12.5px; color: var(--brand-2); margin-top: 8px; font-weight: 600; }

/* 医家详情弹框 */
.q-doctor-detail__hd { margin-bottom: 12px; }
.q-doctor-detail__name { font-size: 21px; font-weight: 800; color: var(--text); }
.q-doctor-detail__alias { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.q-doctor-detail__sub { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.q-doctor-detail__prov { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.q-doctor-detail__sec { margin-bottom: 14px; }
.q-doctor-detail__sechd { font-size: 13px; font-weight: 700; color: var(--brand-2); margin-bottom: 6px; letter-spacing: .04em; }
.q-doctor-detail__txt { font-size: 14px; color: var(--text); line-height: 1.8; white-space: pre-wrap; }
.q-doctor-detail__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.q-doctor__chip { font-size: 12.5px; color: var(--text); background: var(--chip-bg, rgba(0, 0, 0, .05)); border: 1px solid var(--border, rgba(24, 95, 165, 0.10)); border-radius: 999px; padding: 4px 11px; }
.q-doctor__chip--t { color: #0369a1; background: rgba(3, 105, 161, .08); }
.q-doctor__chip--s { color: #047857; background: rgba(4, 120, 87, .08); }
.q-doctor-detail__works { display: flex; flex-direction: column; gap: 6px; }
.q-doctor__work { font-size: 13.5px; color: var(--text); padding: 7px 11px; background: var(--chip-bg, rgba(0, 0, 0, .04)); border-radius: 9px; border-left: 3px solid var(--brand-2); }
.q-doctor-detail__linrow { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.q-doctor-detail__linlbl { font-size: 12.5px; font-weight: 700; color: var(--text-muted); min-width: 36px; }
.q-doctor-detail__lintxt { font-size: 13.5px; color: var(--text); flex: 1; }
.q-doctor-detail__linnote { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.q-doctor-detail__caselist { display: flex; flex-direction: column; gap: 8px; }
.q-doc-case { background: var(--chip-bg, rgba(0, 0, 0, .04)); border: 1px solid var(--border, rgba(24, 95, 165, 0.10)); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.q-doc-case:hover { border-color: var(--brand-2); background: rgba(55, 138, 221, .06); }
.q-doc-case__name { font-size: 14px; font-weight: 700; color: var(--text); }
.q-doc-case__meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* 深色模式适配 */
html[data-theme="dark"] .q-doc__item,
html[data-theme="dark"] .q-doc-case { background: rgba(255, 255, 255, .04); }
html[data-theme="dark"] .q-doc__item { border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .q-doc__tag,
html[data-theme="dark"] .q-doctor__chip,
html[data-theme="dark"] .q-doctor__work,
html[data-theme="dark"] .q-doc-case { border-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .q-doc__tag { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .q-doctor__chip { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .q-doctor__work,
html[data-theme="dark"] .q-doc-case { background: rgba(255, 255, 255, .04); }


/* ── 刘希彦书块书籍式排版（h2/h3/h4 章节标题、表格、手绘图、📝批注弹框）── */
.liu-h2 {
    font-size: 17px; font-weight: 800; color: #b86d18; text-align: center;
    letter-spacing: 2px; margin: 22px 0 12px; line-height: 1.5;
    position: relative; padding-bottom: 8px;
}
.liu-h2::after {
    content: ''; display: block; width: 46px; height: 2.5px;
    background: linear-gradient(90deg, #e0a23a, #b86d18);
    border-radius: 2px; margin: 9px auto 0;
}
.liu-h3 {
    font-size: 15.5px; font-weight: 800; color: var(--brand-2, #1d6fb8);
    margin: 18px 0 9px; line-height: 1.5; letter-spacing: 1px;
    padding-left: 10px; border-left: 4px solid var(--brand-2, #1d6fb8);
}
.liu-h4 {
    font-size: 14px; font-weight: 800; color: #3f6b3a;
    margin: 14px 0 7px; line-height: 1.5; letter-spacing: 1px;
    display: inline-block; background: rgba(63, 107, 58, .08);
    border-radius: 6px; padding: 3px 10px;
}
.liu-line {
    font-size: 14.5px; line-height: 2; color: var(--text);
    margin: 8px 0; text-align: justify; text-indent: 2em;
}
.liu-note-btn {
    display: inline-flex; align-items: center; justify-content: center;
    vertical-align: middle; margin-left: 7px;
    font-size: 12px; width: 22px; height: 22px; line-height: 1;
    background: rgba(240, 170, 40, .16); border: 1px solid rgba(214, 140, 18, .45);
    border-radius: 50%; cursor: pointer; transition: transform .15s var(--ease), background .15s;
    padding: 0;
}
.liu-note-btn:hover { background: rgba(240, 170, 40, .3); transform: scale(1.12); }
.liu-note-btn:active { transform: scale(.92); }

/* 表格（脉象对照表 / 三阳病主方表 / 瘀堵表） */
.liu-table {
    width: 100%; border-collapse: collapse; margin: 12px 0 16px;
    font-size: 13px; line-height: 1.7;
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(24, 95, 165, .18); border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(24, 95, 165, .07);
}
.liu-table thead th {
    background: linear-gradient(135deg, rgba(224, 162, 58, .18), rgba(184, 109, 24, .14));
    color: #8a5412; font-weight: 800; text-align: left;
    padding: 8px 11px; border-bottom: 2px solid rgba(184, 109, 24, .35);
    font-size: 13px; white-space: nowrap;
}
.liu-table tbody td {
    padding: 8px 11px; vertical-align: top;
    border-bottom: 1px solid rgba(24, 95, 165, .09); color: var(--text);
}
.liu-table tbody tr:nth-child(even) { background: rgba(24, 95, 165, .035); }
.liu-table tbody tr:last-child td { border-bottom: none; }

/* 手绘图 */
.liu-fig { margin: 12px 0 16px; text-align: center; }
.liu-fig svg { max-width: 100%; height: auto; }
.liu-fig figcaption { font-size: 12px; color: var(--text-muted); margin-top: 6px; letter-spacing: 1px; }

/* 📝 批注弹框（仿康平本注弹框，吸附在按钮旁） */
.liu-note-pop {
    position: fixed; z-index: 9999; max-width: 300px; width: max-content;
    background: #fffdf6; color: #4a3620; border: 1px solid rgba(184, 109, 24, .35);
    border-radius: 12px; box-shadow: 0 10px 30px rgba(120, 80, 20, .22);
    padding: 12px 14px; font-size: 13px; line-height: 1.8; text-align: left;
}
.liu-note-pop__arrow {
    position: absolute; width: 11px; height: 11px; transform: rotate(45deg);
    background: #fffdf6; border: 1px solid rgba(184, 109, 24, .35); border-top: none; border-left: none;
}
.liu-note-pop__arrow--up { transform: rotate(225deg); }
.liu-note-pop__hd { font-size: 13px; font-weight: 800; color: #b86d18; margin-bottom: 5px; }
.liu-note-pop__body { max-height: 46vh; overflow-y: auto; white-space: normal; }

html[data-theme="dark"] .liu-h2 { color: #f0b45a; }
html[data-theme="dark"] .liu-h2::after { background: linear-gradient(90deg, #f0b45a, #d98e2b); }
html[data-theme="dark"] .liu-h4 { color: #8fd08a; background: rgba(143, 208, 138, .1); }
html[data-theme="dark"] .liu-table { background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .liu-table thead th { background: rgba(240, 180, 90, .13); color: #f0b45a; border-bottom-color: rgba(240, 180, 90, .4); }
html[data-theme="dark"] .liu-table tbody td { border-bottom-color: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .liu-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .liu-note-btn { background: rgba(240, 180, 90, .14); border-color: rgba(240, 180, 90, .5); }
html[data-theme="dark"] .liu-note-pop { background: #2a2418; color: #f3e7cf; border-color: rgba(240, 180, 90, .4); }
html[data-theme="dark"] .liu-note-pop__arrow { background: #2a2418; border-color: rgba(240, 180, 90, .4); }
html[data-theme="dark"] .liu-note-pop__hd { color: #f0b45a; }

/* =============================================================
   工作台 v143：合并病例库
   - 统计卡可点击（a 标签）
   - sticky 置顶：统计卡 + 搜索 + 分类栏 + 管理工具栏（如有）
   - 管理模式单行工具栏（删除/同步/全同/恢复，不占两排）
   ============================================================= */
.stat--link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}
.stat--link:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

/* sticky 容器：贴在 app-bar 下方，滚动时统计卡/搜索/分类/管理栏不随列表滚动 */
.wb-sticky {
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--bg);
    padding: 4px 0 8px;
    margin: -4px 0 0;
}
.wb-sticky .stats-grid { margin-bottom: 10px; }
.wb-sticky .toolbar { margin-bottom: 8px; }

/* 管理模式单行工具栏：4 按钮一排均分，不换行 */
.wb-managebar {
    display: flex;
    gap: 8px;
    margin: 10px 0 0;
}
.wb-managebar .mbtn {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 4px;
    white-space: nowrap;
}

/* 长按选择：禁用系统长按菜单 / 文本选择（配合 JS 长按进入管理模式） */
.wb-section .case-card {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* ═══ 统计详情视图 ═══ */
.stats-view { padding-top: 4px; }
.stats-view .card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 16px; margin-bottom: 14px;
}
.stats-view .card-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700; margin-bottom: 12px; letter-spacing: .3px;
}
.stats-view .card-title .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--brand-grad); flex-shrink: 0; }
.stats-view .card-title .hint { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.stats-view .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-view .stat-grid.loading .num { animation: statsPulse 1.1s ease-in-out infinite; -webkit-text-fill-color: var(--text-muted); background: none; color: var(--text-muted); }
@keyframes statsPulse { 0%,100% { opacity: .35; } 50% { opacity: .85; } }
.stats-view .stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 6px; text-align: center;
    box-shadow: var(--shadow-sm);
}
.stats-view .stat-card .num {
    font-size: 25px; font-weight: 800; line-height: 1.1;
    background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stats-view .stat-card .num.ok { background: linear-gradient(135deg,#43C98B,#2BB673); -webkit-background-clip: text; background-clip: text; }
.stats-view .stat-card .lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
/* 环形图（v168：viewBox高度精确匹配环内容，彻底消除底部空白） */
.stats-view .card.gender-card { padding: 6px 12px 0; }
.stats-view .donut-row { display: flex; gap: 14px; justify-content: center; margin: 0; overflow: hidden; }
.stats-view .donut-col { flex: 0 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.stats-view .donut { width: 100%; max-width: 124px; height: auto; max-height: 124px; overflow: visible; display: block; margin: 0 auto; }
.stats-view .donut .ring { fill: none; }
.stats-view .donut .lead { stroke: var(--border-strong); stroke-width: 1; }
.stats-view .donut .lbl-name { font-size: 11px; font-weight: 800; fill: var(--text); }
.stats-view .donut .lbl-val { font-size: 10px; font-weight: 700; fill: var(--text); }
.stats-view .donut .center-top { font-size: 19px; font-weight: 800; fill: var(--text); text-anchor: middle; }
.stats-view .donut .center-sub { font-size: 9.5px; fill: var(--text-muted); text-anchor: middle; }
/* 折线图 */
.stats-view .chart { width: 100%; }
.stats-view .chart svg { display: block; width: 100%; height: auto; }
.stats-view .chart .axis { stroke: var(--border-strong); stroke-width: 1; }
.stats-view .chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.stats-view .chart .line { fill: none; stroke: var(--brand-1); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.stats-view .chart .area { fill: url(#gradArea); }
.stats-view .chart .dot { fill: var(--surface); stroke: var(--brand-1); stroke-width: 2.5; }
.stats-view .chart .dot-val { font-size: 10px; fill: var(--text-muted); text-anchor: middle; }
.stats-view .chart .x-label { font-size: 10px; fill: var(--text-muted); text-anchor: middle; }
/* 高频症状 */
.stats-view .bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.stats-view .bar-lbl { width: 52px; font-size: 12.5px; font-weight: 600; flex-shrink: 0; text-align: right; }
.stats-view .bar-track { flex: 1; height: 16px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.stats-view .bar-fill { height: 100%; border-radius: 8px; display: flex; align-items: center; justify-content: flex-end; }
.stats-view .bar-fill span { font-size: 10px; font-weight: 700; color: #fff; padding-right: 7px; }
.stats-view .bar-cnt { width: 26px; font-size: 12px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; text-align: left; }
/* 医案学习 */
.stats-view .study-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stats-view .study-card { border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; border: 1px solid var(--border); }
.stats-view .study-card.mastered { background: var(--ok-soft); border-color: rgba(43,182,115,.25); }
.stats-view .study-card.unfamiliar { background: var(--danger-soft); border-color: rgba(232,85,58,.25); }
.stats-view .study-card.unmarked { background: var(--surface-2); border-color: var(--border); }
.stats-view .study-card .n { font-size: 24px; font-weight: 800; }
.stats-view .study-card .lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.stats-view .study-card.mastered .n { color: var(--ok); }
.stats-view .study-card.unfamiliar .n { color: var(--danger); }
.stats-view .study-card.unmarked .n { color: var(--text-muted); }
.stats-view .study-progress { display: flex; align-items: center; gap: 14px; }
.stats-view .ring-sm { width: 84px; height: 84px; flex-shrink: 0; position: relative; border-radius: 50%; margin: 0 auto; }
.stats-view .ring-sm::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.stats-view .ring-sm .c { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; font-size: 12px; font-weight: 800; flex-direction: column; line-height: 1.15; }
.stats-view .ring-sm .c b { font-size: 15px; }
.stats-view .ring-sm .c span { font-size: 9px; color: var(--text-muted); }
.stats-view .note { flex: 1; font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.stats-view .note b { color: var(--danger); }
.stats-view .empty-note { font-size: 11px; color: var(--text-muted); margin-top: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; line-height: 1.6; }
.stats-view .study-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 12px; width: 100%; padding: 11px; border: none; border-radius: var(--radius-sm);
    background: var(--brand-grad); color: #fff; font-size: 14px; font-weight: 700;
    cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm); -webkit-tap-highlight-color: transparent;
}
.stats-view .study-btn:active { transform: scale(.985); }
.stats-view .sample-note { font-size: 10.5px; color: var(--text-muted); margin-top: 8px; text-align: center; }
/* 窄屏：双环图纵向堆叠，图外标注不顶出卡片 */
@media (max-width: 480px) {
    .stats-view .donut-row { flex-direction: column; gap: 18px; }
    .stats-view .donut-col { width: 100%; }
    .stats-view .donut { max-width: 260px; }
}

/* ── v283：隐藏 EdgeOne 预览域名注入的底部演示声明水印 ──
   EdgeOne 默认域名（*.edgeone.cool）会在运行时向页面注入 div#edgeone-watermark
   （"For demonstration and testing purposes only..."）。绑自有域名后注入会自动消失，
   这条规则届时保留也无副作用。 */
#edgeone-watermark{display:none !important;visibility:hidden !important;opacity:0 !important;pointer-events:none !important;}
