/* ==========================================================================
   云帆民航词典 · cadict.net 首页样式（纯 CSS · Apple 风格）
   页面模型：无参数 = 官网首页；html.searching（?wd= 或发起检索）= 查词态。
   两态共用一套页面，无感切换。
   配色以 LOGO 为源：CA 蓝 #3460cb / Dict 黄 #ffcb1f；
   中性色沿用 Apple 规范（#1d1d1f / #86868b / #f5f5f7）。无任何贴图装饰。
   ========================================================================== */

:root {
    color-scheme: light;
    --blue: #3460cb;
    --blue-dark: #2950ac;
    --blue-tint: rgba(52, 96, 203, 0.08);
    --blue-ring: rgba(52, 96, 203, 0.14);
    --yellow: #ffcb1f;
    --wechat: #07c160;   /* 微信品牌绿：小程序 / 公众号悬浮钮悬停底色 */
    --ink: #1d1d1f;
    --ink-2: #4b4b50;
    --ink-3: #86868b;
    --line: rgba(0, 0, 0, 0.06);
    --card: #ffffff;
    --bubble: #f5f5f7;
    --bg: #f5f5f7;
    --radius: 18px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.06), 0 18px 44px rgba(0, 0, 0, 0.08);
    --track: rgba(120, 120, 128, 0.12);
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Reset ---------- */
html, body, div, span, h1, h2, h3, h4, p, a, img, ol, ul, li, svg {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    vertical-align: baseline;
}
*, *::before, *::after { box-sizing: border-box; }
ol, ul { list-style: none; }
img { max-width: 100%; }
body { line-height: 1; }

/* ---------- 基础 ---------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
                 "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.65;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

.clear { clear: both; }
.clearfix::after { content: ""; display: table; clear: both; }

a { color: var(--blue); text-decoration: none; transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; }
a:hover { color: var(--blue-dark); }

::selection { background: var(--blue); color: #fff; }

/* ==========================================================================
   吸顶导航（毛玻璃）
   ========================================================================== */
.topnav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
.topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}
.nav-brand { display: inline-flex; align-items: center; line-height: 0; }
.nav-brand img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 28px; transition: opacity 0.2s ease; }
.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
}
.nav-links a:hover { color: var(--ink); }

/* ==========================================================================
   Hero：标题 + tagline + 搜索舱
   ========================================================================== */
.hero { padding: 56px 0 12px; text-align: center; }

.hero-logo { margin: 0 0 18px; }
.hero-logo a { display: inline-block; line-height: 0; }
.hero-logo img { width: min(300px, 72vw); height: auto; vertical-align: bottom; transition: width 0.25s ease; }

.hero-tagline {
    font-size: 17px;
    color: var(--ink-3);
    letter-spacing: 0.02em;
    margin: 0 0 30px;
}
.hero-tagline b { font-weight: 600; color: var(--ink-2); }

/* 查词态：hero 收缩 */
html.searching .hero { padding-top: 30px; }
html.searching .hero-logo { margin-bottom: 12px; }
html.searching .hero-logo img { width: 150px; }
html.searching .hero-tagline { display: none; }
html.searching .search-capsule { max-width: 780px; }

/* ---------- 搜索舱 ---------- */
.search-capsule { max-width: 680px; margin: 0 auto; }
.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card);
    border-radius: 26px;
    box-shadow: var(--shadow);
    padding: 9px 9px 9px 4px;
    transition: box-shadow 0.2s ease, background-color 0.25s ease;
}
.search-box:has(.inputField:focus) { box-shadow: 0 0 0 4px var(--blue-ring), var(--shadow-hover); }

.inputField {
    order: 1;
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 16px 0 46px;
    font-size: 17px;
    font-family: inherit;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: none;
}
.btn { order: 2; display: flex; flex: none; }
.btn input#searchButton {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    height: 48px;
    padding: 0 28px;
    border-radius: 980px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    text-indent: 4px;
    font-family: inherit;
    color: #fff;
    background: var(--blue);
    transition: background 0.18s ease, transform 0.1s ease;
}
.btn input#searchButton:hover { background: var(--blue-dark); }
.btn input#searchButton:active { transform: scale(0.96); }

/* 纯 CSS 放大镜 */
.input_icon {
    order: 0;
    position: absolute; /* 仅作锚点容器，实际定位见下 */
}
.search-box { position: relative; }
.search-box .input_icon {
    position: absolute;
    left: 22px;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-top: -8px;
    border: 2px solid var(--ink-3);
    border-radius: 50%;
    pointer-events: none;
}
.search-box .input_icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -3px;
    width: 8px;
    height: 2px;
    background: var(--ink-3);
    border-radius: 1px;
    transform: rotate(45deg);
}

/* 热门查询 chips */
.quick-words {
    margin-top: 16px;
    font-size: 13px;
    color: var(--ink-3);
}
html.searching .quick-words { display: none; }
.quick-words a {
    display: inline-block;
    margin: 3px 3px;
    padding: 3px 14px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--blue);
    background: var(--blue-tint);
    border-radius: 980px;
}
.quick-words a:hover { background: var(--blue); color: #fff; }

/* ==========================================================================
   查词结果（仅查词态显示）
   ========================================================================== */
.results { display: none; }
html.searching .results {
    display: block;
    max-width: 780px;
    margin: 0 auto;
    padding-bottom: 40px;
}
/* 查询词标题：词典头词样式，检索开始即显示 */
.result-word {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    line-height: 3.25;
    word-break: break-all;
}
/* 结果统计行：统计居左，操作组（生成单词卡 / 发送到手机）居右 */
.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}
.bar-actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.results-stats {
    font-size: 13.5px;
    color: var(--ink-3);
}
.results-stats b {
    font-weight: 600;
    color: var(--ink-2);
}
.send-phone,
.card-gen {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-tint);
    border: 0;
    border-radius: 980px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.send-phone svg,
.card-gen svg { width: 15px; height: 15px; }
.send-phone:hover,
.card-gen:hover { color: #fff; background: var(--blue); }

/* 点击词条内容即复制：手型光标提示可点（仅指针设备；触屏不显示光标） */
@media (hover: hover) {
    .comment-entry { cursor: pointer; }
}

/* 复制成功/失败轻提示 */
#copyToast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    padding: 10px 22px;
    font-size: 13.5px;
    font-weight: 500;
    color: #fff;
    background: rgba(29, 29, 31, 0.88);
    border-radius: 980px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#copyToast.show { opacity: 1; transform: translateX(-50%); }
#copyToast.err { background: rgba(214, 69, 69, 0.92); }

/* ---------- 词条卡片 ---------- */
.comment-list ol { list-style: none; }
li.comment:hover{background:var(--blue-tint);}
li.comment:hover .comment-text{background:var(--card);}
li.comment:hover .comment-text::before{background:var(--card);}

li.comment {
    margin: 0 0 20px;
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: entryIn 0.25s both;
}
.comment-body { padding: 22px 24px; display: flex; gap: 16px; }

.comment-avatar { flex: none; }
.avatar img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: block;
}

.comment-text {
    flex: 1;
    min-width: 0;
    position: relative;
    background: var(--bubble);
    border-radius: 16px;
    padding: 14px 18px;
}
/* 纯 CSS 气泡尖角 */
.comment-text::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 22px;
    width: 11px;
    height: 11px;
    background: var(--bubble);
    transform: rotate(45deg);
}
.comment-arrow { display: none; }

/* 词典来源徽章（内容之后另有「来源：xxx」灰字） */
.comment-author { margin-bottom: 9px; }
.link-author {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0;
    background: var(--blue-tint);
    border-radius: 980px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-author::before {
    content: "";
    flex: none;
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--yellow);
    margin-right: 7px;
}
/* 来源：置于内容之后的灰度小字（与小程序单词卡规范一致） */
.comment-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--ink-3);
}
/* 词条序号（01/02/03…）：气泡右上角浅色编号，顶部让出空间避免与正文重叠 */
.entry-no {
    position: absolute;
    top: 6px;
    right: 14px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;
    color: rgba(52, 96, 203, 0.16);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}
.comment-text:has(.entry-no) { padding-top: 30px; }
/* 词条头像可点击：唤起小程序浮层（悬停效果只作用于圆形头像图，避免方形底） */
.comment-avatar { cursor: pointer; border-radius: 50%; }
.comment-avatar:hover .avatar img { border-color: var(--ink-2); box-shadow: 0 2px 8px rgba(52, 96, 203, 0.3); }
.cs-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 来源行右侧「复制」小按钮 */
.cs-copy {
    flex: none;
    padding: 3px 12px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink-3);
    background: var(--bubble);
    border-radius: 980px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.cs-copy:hover { color: #fff; background: var(--blue); }
.comment-entry { font-size: 14.5px; color: var(--ink-2); }
.comment-entry p { margin: 6px 0; }
.comment-entry p:empty { display: none; }
/* 核心释义段（紧跟占位空段的第一个实体段）：加重突出 */
.comment-entry p:empty + p {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.005em;
}
.comment-entry img { border-radius: 12px; margin: 10px 0; }
/* 无结果 / 出错的红字柔化（历史上是 <font color="#ff0000">） */
.comment-entry font[color="#ff0000"] { color: #d94f43; font-weight: 500; }

/* ==========================================================================
   官网内容（查词态隐藏）
   ========================================================================== */
#home { display: block; }
html.searching #home { display: none; }

/* ---------- 特性栏：纯排版不加卡 ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 56px 0 8px;
}
.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--blue-tint);
    color: var(--blue);
    margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}
.feature p { font-size: 14px; }

/* ---------- 区块标题 ---------- */
.block { padding: 48px 0 0; }
.section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.section-sub {
    text-align: center;
    font-size: 14.5px;
    color: var(--ink-3);
    margin: 8px 0 28px;
}

/* ---------- 卡片网格 ---------- */
.cards { display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 26px 26px 28px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}
.card p { margin: 6px 0; font-size: 13.5px; }

.card-image { text-align: center; margin: 0 0 16px; }
.card-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 6px;
}
#open-weapp-btn,
#gh-qr-btn { cursor: pointer; }
#open-weapp-btn img,
#gh-qr-btn img { max-width: 150px; transition: transform 0.18s ease; }
#open-weapp-btn:hover img,
#gh-qr-btn:hover img { transform: scale(1.03); }

/* 品牌重点卡：微信小程序（蓝渐变） */
.card.featured {
    background: linear-gradient(140deg, #2c53b4 0%, #3460cb 48%, #5d84d8 100%);
    box-shadow: 0 10px 30px rgba(52, 96, 203, 0.32);
}
.card.featured:hover { box-shadow: 0 16px 40px rgba(52, 96, 203, 0.4); }
.card.featured h4 { color: #fff; }
.card.featured p { color: rgba(255, 255, 255, 0.88); }
.card.featured .card-image img { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24); }

/* 品牌重点卡：公众号（品牌黄）——文字用暖墨色系与黄底协调 */
.card.featured-gold {
    background: linear-gradient(140deg, #ffc20e 0%, #ffcb1f 48%, #ffd75e 100%);
    box-shadow: 0 10px 30px rgba(224, 168, 0, 0.3);
}
.card.featured-gold:hover { box-shadow: 0 16px 40px rgba(224, 168, 0, 0.38); }
.card.featured-gold h4 { color: #211a02; }
.card.featured-gold p { color: rgba(62, 48, 8, 0.9); }
.card.featured-gold .card-image img { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16); }
.card.featured-gold .tcard-icon { color: #211a02; background: rgba(255, 255, 255, 0.45); }
.card.featured-gold .tcard-tag { color: rgba(62, 48, 8, 0.88); background: rgba(255, 255, 255, 0.42); }
.card.featured-gold .tcard-tag.tag-now { color: #211a02; background: rgba(255, 255, 255, 0.68); }
.card.featured-gold .tcard-pills span { color: rgba(62, 48, 8, 0.88); background: rgba(255, 255, 255, 0.42); }

/* ---------- 词典终端卡（对齐 2027 终端页口径） ---------- */
.cards-t { grid-template-columns: repeat(2, 1fr); gap: 22px; }
.tcard { text-align: left; padding: 22px 24px 24px; }
.tcard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.tcard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: var(--blue);
    background: var(--blue-tint);
    border-radius: 14px;
}
.tcard-icon svg { width: 24px; height: 24px; }
.tcard-icon img { width: 24px; height: 24px; display: block; }
/* 图片图标按卡片配色使用对应素材版本：蓝卡用 *_white、金卡用 *_dark（见 index.html） */
.tcard-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-3);
    background: var(--bubble);
    padding: 4px 12px;
    border-radius: 980px;
}
.tcard-tag.tag-now { color: var(--blue); background: var(--blue-tint); }
.tcard-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tcard-pills span {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    background: var(--bubble);
    padding: 4px 12px;
    border-radius: 980px;
}
/* 重点卡（蓝渐变）内的头图与 pills 反白 */
.card.featured .tcard-icon { color: #fff; background: rgba(255, 255, 255, 0.16); }
.card.featured .tcard-tag { color: rgba(255, 255, 255, 0.92); background: rgba(255, 255, 255, 0.18); }
.card.featured .tcard-pills span { color: #fff; background: rgba(255, 255, 255, 0.16); }
.tcard .card-image { margin-bottom: 12px; }
.tcard .card-image img { max-width: 150px; }
.tcard .see-more { margin-top: 14px; cursor: pointer; }
.tcard-tags { display: inline-flex; align-items: center; gap: 6px; }
.card.featured .tcard-tag.tag-now { background: rgba(255, 255, 255, 0.32); }
/* 已停运终端：紧凑灰卡（背景灰度处理，弱化视觉权重） */
.cards-stopped { margin-top: 16px; }
.tcard-stopped { padding: 18px 20px 20px; background: linear-gradient(180deg, #f5f6f8 0%, #edeff2 100%); }
.tcard-stopped:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05); }
.tcard-stopped .tcard-head { margin-bottom: 10px; }
.tcard-stopped .tcard-icon { width: 38px; height: 38px; border-radius: 11px; color: var(--ink-3); background: #e7e9ed; }
.tcard-stopped .tcard-icon svg { width: 19px; height: 19px; }
.tcard-stopped h4 { margin: 0 0 6px; color: var(--ink-2); }
.tcard-stopped p { margin: 0; color: var(--ink-3); }
/* 查词加载进度条 */
.load-track { height: 6px; margin: 12px 0 8px; background: var(--bubble); border-radius: 980px; overflow: hidden; }
.load-bar { width: 0; height: 100%; background: var(--blue); border-radius: 980px; transition: width 0.25s ease-out; }
.load-meta { display: flex; justify-content: flex-end; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 塞班 → 安卓 → iOS → 现役 4 端：历史演进注脚 */
.legacy-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--ink-3);
}
.legacy-strip svg { flex: none; width: 15px; height: 15px; color: var(--yellow); }

/* 「立即访问 / 网盘下载」：填充胶囊 */
.see-more {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 22px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-tint);
    border-radius: 980px;
    transition: background 0.18s ease, color 0.18s ease;
}
.see-more:hover { color: #fff; background: var(--blue); }

/* ==========================================================================
   页脚（两种状态常驻）
   ========================================================================== */
.site-foot {
    margin-top: 56px;
    border-top: 1px solid var(--line);
    padding: 44px 0 56px;
}
.foot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 48px;
}
.foot-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}
/* 品牌黄圆点（与词条卡一致） */
.foot-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow);
    margin-right: 9px;
    vertical-align: 1px;
}
.foot-block p { margin: 6px 0; font-size: 13.5px; }
.foot-block a { font-weight: 500; }
.foot-block a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 友情链接胶囊 */
.tag-link-1 {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 6px 15px;
    font-size: 13px;
    background: var(--track);
    color: var(--ink-2);
    border-radius: 980px;
    transition: background 0.18s ease, color 0.18s ease;
}
.tag-link-1:hover { background: var(--blue); color: #fff; }
.tag-link-1 span { pointer-events: none; }

/* 第三方访问统计 */
.foot-analytics {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 12px;
    overflow: hidden;
}
/* 版权 + 备案（页脚最后一行） */
.foot-copyright {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink-3);
}
.foot-copyright a { color: var(--ink-3); }
.foot-copyright a:hover { color: var(--blue); text-decoration: none; }
.foot-sep {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ink-3);
    margin: 0 10px 3px;
    vertical-align: middle;
}

/* ==========================================================================
   浮层（小程序推荐）
   ========================================================================== */
#mobile-popup,
#gh-modal,
#pc-modal,
#phone-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
}
.popup-content {
    position: relative;
    background: var(--card);
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    padding: 32px 34px 28px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    animation: popIn 0.22s ease-out both;
}
.popup-content img { width: 80%; max-width: 230px; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.popup-content p { margin: 6px 0; font-size: 14.5px; color: var(--ink-2); }
.popup-content p:first-of-type { margin-bottom: 12px; }
/* 「发送到手机」弹窗内的二维码与当前词 */
#phoneQrImg { width: 200px; }
.phone-word {
    margin-top: 14px !important;
    font-size: 16px !important;
    font-weight: 600;
    color: var(--ink) !important;
    word-break: break-all;
}
.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    line-height: 1;
    color: #c7c7cc;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}
.popup-close:hover { color: var(--ink); transform: scale(1.08); }

/* PC 单机版下载浮层：图标 + 说明 + 下载按钮 */
.pc-modal-ico {
    width: 74px;
    height: 74px;
    margin: 6px auto 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: var(--blue-tint);
    border-radius: 20px;
}
.pc-modal-ico svg { width: 34px; height: 34px; }

/* 浮层内的跳转按钮（仅移动端由 JS 显示：小程序蓝 / 公众号黄；PC 单机版仅桌面端可见） */
#open-weapp,
#open-gh { display: none; margin: 16px 0 2px; }
#open-pc { margin: 18px 0 2px; }
#open-weapp a,
#open-gh a,
#open-pc a {
    display: block;
    padding: 13px 0;
    border-radius: 980px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--blue);
}
#open-weapp a:active,
#open-gh a:active,
#open-pc a:active { transform: scale(0.97); }
#open-gh a { color: #3a2c00; background: var(--yellow); }

/* ==========================================================================
   右下悬浮入口（非移动端）：小程序 / 公众号 / 单机版 / 回顶端
   ========================================================================== */
.fab-dock {
    position: fixed;
    right: 22px;
    bottom: 30px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.fab {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    color: var(--blue);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease, opacity 0.2s ease;
}
.fab:hover,
.fab:focus-visible {
    color: #fff;
    background: var(--blue);
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(52, 96, 203, 0.32);
    transform: translateY(-2px);
    outline: none;
}
.fab svg { width: 21px; height: 21px; }
.fab img { width: 21px; height: 21px; display: block; transition: filter 0.18s ease; }
/* 图片图标随悬停底色反色：蓝底 / 黄底均用白色图标 */
.fab:hover img,
.fab:focus-visible img { filter: brightness(0) invert(1); }
/* 公众号：品牌黄（呼应 LOGO 双色与终端卡） */
.fab.is-gh { color: #a07908; }
/* 小程序 / 公众号：悬停统一微信绿底 + 白图标（#id 权重高于 .fab:hover，需显式覆盖底色） */
#fab-wx:hover, #fab-wx:focus-visible,
#fab-gh:hover, #fab-gh:focus-visible {
    color: #fff;
    background: var(--wechat);
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(7, 193, 96, 0.32);
}
/* PC 单机版：白底灰图标，与两端图片素材图标同灰度（#id 权重高于 .fab:hover，需显式补白） */
#fab-pc { color: #707070; }
#fab-pc:hover,
#fab-pc:focus-visible { color: #fff; }
/* 悬停气泡标签 */
.fab-tip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    padding: 5px 11px;
    font-size: 12.5px;
    line-height: 1.4;
    white-space: nowrap;
    color: #fff;
    background: rgba(29, 29, 31, 0.9);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}
.fab:hover .fab-tip,
.fab:focus-visible .fab-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
/* 「回顶端」：未滚动时收起 */
.fab.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
}

/* ---------- 动效 ---------- */
@keyframes entryIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#searchResult .comment { animation: entryIn 0.25s both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    li.comment, #searchResult .comment, .popup-content { animation: none; }
    .card, .nav-links { transition: none; }
}

/* ==========================================================================
   移动端专用「随身查词」入口（桌面端不显示；样式见文件末尾 ≤600px）
   ========================================================================== */
.m-entry { display: none; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 900px) {
    .topnav-inner { height: 50px; }
    .nav-brand img { height: 32px; }
    .nav-links { gap: 20px; }

    .hero { padding: 36px 0 8px; }
    .hero-tagline { font-size: 15px; margin-bottom: 24px; }
    html.searching .hero { padding-top: 22px; }
    html.searching .hero-logo img { width: 130px; }

    .search-box { border-radius: 22px; padding: 8px 8px 8px 4px; }
    .search-box .input_icon { left: 19px; }
    .inputField { height: 46px; font-size: 16px; padding-left: 42px; }
    .btn input#searchButton { height: 42px; padding: 0 18px; letter-spacing: 2px; text-indent: 2px; font-size: 15px; }

    .features { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
    .cards-3, .cards-2, .cards-t { grid-template-columns: 1fr; }
    .block { padding-top: 40px; }
    .section-title { font-size: 22px; }

    .foot-grid { grid-template-columns: 1fr; gap: 28px; }
    .site-foot { margin-top: 40px; padding-bottom: 44px; }

    .comment-body { padding: 16px; gap: 12px; }
    .avatar img { width: 46px; height: 46px; }
    .comment-entry p:empty + p { font-size: 15px; }
    .popup-content { padding: 26px 24px 22px; }

    /* 悬浮入口收小、贴边，避免遮挡内容 */
    .fab-dock { right: 14px; bottom: 20px; gap: 8px; }
    .fab { width: 42px; height: 42px; }
    .fab svg { width: 19px; height: 19px; }
    .fab img { width: 19px; height: 19px; display: block; }
}

/* 手机端（≤600px）：只留「查词 + 微信端入口」，其余内容隐藏 */
@media (max-width: 600px) {
    /* 结构：上=搜索直达查词；中=小程序/公众号入口；下=版权与备案 */
    .topnav,
    #home,
    .foot-grid,
    .foot-analytics,
    .send-phone,
    .fab-dock { display: none; }

    /* 统计行允许换行，避免操作按钮被挤压；移动端只留「生成单词卡」 */
    .results-bar { flex-wrap: wrap; row-gap: 8px; }
    .card-gen { padding: 8px 16px; }

    /* ---------- 首屏：品牌标识收小，把空间留给搜索 ---------- */
    .hero { padding: 18px 0 4px; }
    .hero-logo { margin-bottom: 10px; }
    .hero-logo img { width: 176px; }
    .hero-tagline { font-size: 13.5px; margin-bottom: 18px; }

    /* ---------- 随身查词入口（简洁两行式） ---------- */
    .m-entry { display: block; padding: 26px 0 6px; }
    .m-entry-title {
        font-size: 19px;
        font-weight: 700;
        color: var(--ink);
        letter-spacing: -0.01em;
        margin: 0 0 12px;
    }
    .m-row {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin-bottom: 10px;
        padding: 12px 14px;
        font-family: inherit;
        text-align: left;
        text-decoration: none;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 15px;
        box-shadow: var(--shadow);
        cursor: pointer;
    }
    .m-row:active { transform: scale(0.99); }
    .m-row-icon {
        flex: none;
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 11px;
    }
    .m-row-icon svg { width: 20px; height: 20px; }
    .m-row-icon img { width: 20px; height: 20px; display: block; }
    .m-row-icon.is-weapp { color: var(--blue); background: var(--blue-tint); }
    .m-row-icon.is-gh { color: #a07908; background: rgba(255, 203, 31, 0.22); }
    .m-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .m-row-name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
    .m-row-desc {
        font-size: 12px;
        color: var(--ink-3);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .m-row-go {
        flex: none;
        font-size: 12.5px;
        font-weight: 600;
        padding: 6px 13px;
        border-radius: 999px;
    }
    .m-row-go.is-weapp { color: var(--blue); background: var(--blue-tint); }
    .m-row-go.is-gh { color: #a07908; background: rgba(255, 203, 31, 0.28); }

    /* ---------- 页脚：只留版权（备案信息移动端不展示） ---------- */
    .site-foot { margin-top: 30px; padding-top: 26px; padding-bottom: 28px; }
    .foot-beian { display: none; }

    /* 词条卡更省空间 */
    .comment-body { padding: 14px 14px 14px 12px; gap: 10px; }
    .avatar img { width: 38px; height: 38px; }
    .comment-text { min-width: 0; }

    /* 搜索舱贴边留白更小，结果区左右留白收紧 */
    .container { padding-left: 16px; padding-right: 16px; }
    html.searching .results { max-width: 100%; }
}

/* 触屏：去掉点击高亮闪烁 */
@media (hover: none) {
    body { -webkit-tap-highlight-color: transparent; }
}

/* ==========================================================================
   亮 / 黑主题切换
   默认亮色；html[data-theme="dark"] 覆盖为深色变量。
   data-theme 由 <head> 内联脚本在首帧前按 localStorage / 系统偏好打上，
   切换无闪烁；品牌蓝/黄随主题微调明度以保持对比度。
   ========================================================================== */

/* ---------- 主题切换按钮（右下角浮层组内 + 移动端悬浮） ---------- */
/* 图标切换：亮色显示月亮（点击切黑），深色显示太阳（点击切亮）；
   以属性选择器统一约束，浮层组按钮与悬浮钮共用 */
[data-theme-toggle] .ico-sun { display: none; }
[data-theme-toggle] .ico-moon { display: block; }
html[data-theme="dark"] [data-theme-toggle] .ico-sun { display: block; }
html[data-theme="dark"] [data-theme-toggle] .ico-moon { display: none; }

/* 右下角浮层组内的主题钮：中性灰，与产品入口钮区分
   （#id 权重高于 .fab:hover，需显式补白，同 #fab-pc） */
#fab-theme { color: var(--ink-2); }
#fab-theme:hover,
#fab-theme:focus-visible { color: #fff; }

/* 移动端悬浮切换钮：≤600px 右下角浮层组不显示，主题切换由此钮承担 */
.theme-toggle {
    flex: none;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    color: var(--ink-2);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--blue);
    border-color: var(--blue);
    transform: scale(1.06);
    outline: none;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle-float { display: none; }

/* ---------- 深色主题变量 ---------- */
html[data-theme="dark"] {
    color-scheme: dark;
    --blue: #5e8bff;
    --blue-dark: #8db0ff;
    --blue-tint: rgba(94, 139, 255, 0.16);
    --blue-ring: rgba(94, 139, 255, 0.32);
    --ink: #f5f5f7;
    --ink-2: #c9c9ce;
    --ink-3: #98989d;
    --line: rgba(255, 255, 255, 0.12);
    --card: #1c1c1e;
    --bubble: #26262b;
    --bg: #0b0b0f;
    --track: rgba(255, 255, 255, 0.1);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.42);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.55), 0 18px 44px rgba(0, 0, 0, 0.5);
}

/* ---------- 深色局部修正（覆盖不到的写死颜色） ---------- */
/* 吸顶导航毛玻璃底 */
html[data-theme="dark"] .topnav { background: rgba(16, 16, 20, 0.82); }
/* LOGO 深灰字与黑底字标在深色页面里不可读：垫白色圆角小底，品牌原样保留 */
html[data-theme="dark"] .nav-brand img,
html[data-theme="dark"] .hero-logo img {
    background: none;
    border-radius: 10px;
    padding: 4px 10px;
}
/* 气泡右上角序号水印 */
html[data-theme="dark"] .entry-no { color: rgba(122, 162, 255, 0.22); }
/* 无结果 / 出错红字在深色下提亮 */
html[data-theme="dark"] .comment-entry font[color="#ff0000"] { color: #ff7a6b; }
/* 已停运终端灰卡 */
html[data-theme="dark"] .tcard-stopped { background: linear-gradient(180deg, #212126 0%, #19191d 100%); }
html[data-theme="dark"] .tcard-stopped .tcard-icon { background: #2b2b31; }
html[data-theme="dark"] .tcard-stopped:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
/* 公众号黄与单机版灰的悬浮钮：深色下提亮 */
html[data-theme="dark"] .fab.is-gh { color: #ffce4a; }
html[data-theme="dark"] #fab-pc { color: #c9c9ce; }
/* 悬浮气泡标签 / 复制轻提示：深色底上换深灰面，白字依旧 */
html[data-theme="dark"] .fab-tip { background: rgba(64, 64, 72, 0.96); }
html[data-theme="dark"] #copyToast { background: rgba(64, 64, 72, 0.95); }
/* 弹窗遮罩加深 */
html[data-theme="dark"] #mobile-popup,
html[data-theme="dark"] #gh-modal,
html[data-theme="dark"] #pc-modal,
html[data-theme="dark"] #phone-modal { background: rgba(0, 0, 0, 0.62); }
/* 移动端公众号入口的黄字在深色下提亮 */
html[data-theme="dark"] .m-row-icon.is-gh { color: #ffce4a; }
html[data-theme="dark"] .m-row-go.is-gh { color: #ffce4a; background: rgba(255, 203, 31, 0.2); }

/* 移动端悬浮切换钮本体 */
@media (max-width: 600px) {
    .theme-toggle-float {
        display: inline-flex;
        position: fixed;
        top: 10px;
        right: 14px;
        z-index: 60;
        background: var(--card);
        border-color: transparent;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    }
    html[data-theme="dark"] .theme-toggle-float { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
}
