/* ===========================================================
   颜文字图鉴 · 样式表
   还原 UI 设计稿：白底玻璃拟态 · 3 列网格 · 彩色特性卡
   =========================================================== */

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

html, body {
    background: #f6f7fb;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    color: #2a2f3c;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    padding: 20px 24px 40px;
}

/* ---------- 全局滚动条优化 ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: #c3c9d6 transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #c3c9d6;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: #9aa1b0;
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* ---------- 容器 ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ---------- 头部（Hero） ---------- */
.site-header {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
    padding: 26px 32px 28px;
    border-radius: 10px;
    background:
        radial-gradient(900px 360px at 88% -20%, rgba(74, 123, 255, 0.20), transparent 60%),
        radial-gradient(700px 320px at 0% 120%, rgba(120, 90, 255, 0.16), transparent 55%),
        linear-gradient(135deg, #fafbff 0%, #eef2ff 100%);
    box-shadow: 0 18px 50px rgba(31, 35, 48, 0.08);
}

/* 顶部品牌行：左 brand，右信息胶囊 */
.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 52px;
    padding: 0 14px;
    background: linear-gradient(135deg, #5b8bff 0%, #6a5bff 100%);
    color: #fff;
    font-family: 'Segoe UI', 'SF Mono', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 4px;
    box-shadow: 0 10px 24px rgba(74, 123, 255, 0.35);
    letter-spacing: 0.5px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1f2330;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6a5bff;
    background: rgba(106, 91, 255, 0.10);
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-top: 2px;
}

.header-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5b6478;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.78);
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(31, 35, 48, 0.04);
}

.info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a7bff;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    font-style: italic;
    font-family: 'Georgia', serif;
    flex-shrink: 0;
}

/* 右上角代码仓库参考图标（GitHub / Gitee） */
.repo-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

.repo-link {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(31, 35, 48, 0.08);
    box-shadow: 0 4px 14px rgba(31, 35, 48, 0.05);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.repo-link svg {
    width: 18px;
    height: 18px;
    fill: #4a5163;
}

.repo-link:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(31, 35, 48, 0.12);
}

.repo-link:hover svg {
    fill: #4a7bff;
}

/* 大标题区：左右装饰颜文字 + 主标题（居中） */
.hero-title-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 4px;
    z-index: 2;
}

.hero-deco {
    font-size: 1.3rem;
    color: #8a7dff;
    opacity: 0.85;
    user-select: none;
    flex-shrink: 0;
    font-family: 'Segoe UI', 'SF Mono', 'Courier New', monospace;
}

.hero-deco-left  { transform: rotate(-6deg); }
.hero-deco-right { transform: rotate(6deg); }

.hero-title {
    margin: 0;
    font-size: clamp(1.7rem, 3.8vw, 2.5rem);
    font-weight: 900;
    color: #1f2330;
    letter-spacing: 1.2px;
    line-height: 1.15;
    text-align: center;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4em;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-title-text {
    color: #1f2330;
}

.hero-title-accent {
    position: relative;
    color: #6a5bff;
    display: inline-block;
}

/* "灵感" 文字下方的紫色波浪下划线 */
.wavy-underline {
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -10px;
    height: 10px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'><path d='M0 5 Q 10 0 20 5 T 40 5 T 60 5 T 80 5 T 100 5 T 120 5' fill='none' stroke='%236a5bff' stroke-width='2.5' stroke-linecap='round'/></svg>");
    background-repeat: repeat-x;
    background-size: 24px 10px;
    pointer-events: none;
}

/* 描述行：居中 */
.hero-desc {
    margin: 0;
    text-align: center;
    color: #5b6478;
    font-size: 0.88rem;
    line-height: 1.8;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
}

/* 桌面端强制断行；移动端隐藏，改由自然折行 */
.hero-desc-br {
    display: block;
}

/* 分类 chip 行：纯展示，按 tone 着色 */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 999px;
    color: var(--chip-color, #4b5364);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px var(--chip-shadow, rgba(31, 35, 48, 0.05));
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    user-select: none;
    cursor: default;
}

.hero-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--chip-shadow, rgba(31, 35, 48, 0.08));
    background: var(--chip-bg-hover, rgba(255, 255, 255, 0.96));
}

.hero-chip-emoji {
    font-size: 0.9rem;
    line-height: 1;
    font-family: 'Segoe UI', 'SF Mono', 'Courier New', monospace;
}

/* 各色主题：背景 / 边框 / 文字 / 阴影 统一通过 CSS 变量驱动 */
.hero-chip-pink {
    --chip-bg-hover: #ffe9f0;
    --chip-border: #ffcfdf;
    --chip-color: #d63b6d;
    --chip-shadow: rgba(214, 59, 109, 0.12);
    background: #fff0f5;
}
.hero-chip-orange {
    --chip-bg-hover: #fff0e2;
    --chip-border: #ffd6b3;
    --chip-color: #d97127;
    --chip-shadow: rgba(217, 113, 39, 0.12);
    background: #fff4e8;
}
.hero-chip-rose {
    --chip-bg-hover: #ffe3eb;
    --chip-border: #ffc4d3;
    --chip-color: #c8395e;
    --chip-shadow: rgba(200, 57, 94, 0.12);
    background: #ffeaf0;
}
.hero-chip-blue {
    --chip-bg-hover: #e6efff;
    --chip-border: #c2d4ff;
    --chip-color: #2e5fd9;
    --chip-shadow: rgba(46, 95, 217, 0.12);
    background: #ecf3ff;
}
.hero-chip-indigo {
    --chip-bg-hover: #ebe9ff;
    --chip-border: #cfc8ff;
    --chip-color: #4a3fc9;
    --chip-shadow: rgba(74, 63, 201, 0.12);
    background: #f1efff;
}
.hero-chip-green {
    --chip-bg-hover: #e2f5ea;
    --chip-border: #b6e3c8;
    --chip-color: #1a8b5a;
    --chip-shadow: rgba(26, 139, 90, 0.12);
    background: #ebf8f1;
}
.hero-chip-lime {
    --chip-bg-hover: #f0f5dc;
    --chip-border: #d8e4a8;
    --chip-color: #6f8a1c;
    --chip-shadow: rgba(111, 138, 28, 0.12);
    background: #f4f8e2;
}
.hero-chip-purple {
    --chip-bg-hover: #f0e9ff;
    --chip-border: #d6c5ff;
    --chip-color: #6a4ec9;
    --chip-shadow: rgba(106, 78, 201, 0.12);
    background: #f4eeff;
}
.hero-chip-gray {
    --chip-bg-hover: #ecf0f5;
    --chip-border: #d6dde5;
    --chip-color: #5a6478;
    --chip-shadow: rgba(90, 100, 120, 0.10);
    background: #f2f4f8;
}

/* 搜索 + Tab 切换行：整组居中 */
.hero-search-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
    position: relative;
    z-index: 2;
}

.hero-search-box {
    flex: 0 1 360px;
    min-width: 0;
    max-width: 420px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    padding: 11px 16px;
    min-height: 46px;
    box-sizing: border-box;
    box-shadow: 0 6px 22px rgba(31, 35, 48, 0.06);
    transition: box-shadow 0.2s ease;
}

.hero-search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(74, 123, 255, 0.16), 0 2px 10px rgba(31, 35, 48, 0.05);
}

.hero-search-box .search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #2a2f3c;
    font-family: inherit;
    padding: 1px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.hero-search-box .search-input::placeholder {
    color: #9aa1b0;
}

.hero-search-box .search-icon {
    width: 18px;
    height: 18px;
    fill: #9aa1b0;
    flex-shrink: 0;
}

/* 清除按钮：圆形胶囊，输入时显示 */
.hero-search-box .search-clear {
    border: none;
    background: #eef1f6;
    color: #6b7280;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 2px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.hero-search-box .search-clear:hover {
    background: #4a7bff;
    color: #fff;
    transform: scale(1.05);
}

.hero-search-box .search-clear:active {
    transform: scale(0.92);
}

/* 头部内嵌 Tab 容器：透明背景，靠右 */
.tabs {
    flex-shrink: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: 6px;
    display: inline-flex;
    gap: 4px;
}

.tabs .tab-btn {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    color: #5b6372;
    box-shadow: 0 2px 8px rgba(31, 35, 48, 0.04);
    padding: 8px 14px;
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 2px;
}

.tabs .tab-btn:hover {
    background: rgba(74, 123, 255, 0.10);
    color: #2a2f3c;
}

.tabs .tab-btn.active {
    background: linear-gradient(135deg, #4a7bff 0%, #6a5bff 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(74, 123, 255, 0.32);
}

/* 数据统计行：4 张大卡片 */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 4px;
    position: relative;
    z-index: 2;
}

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(31, 35, 48, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, currentColor 200%);
    opacity: 0.08;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(31, 35, 48, 0.10);
}

.stat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stat-num {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2330;
    margin-top: 3px;
}

.stat-desc {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

.stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* 各色调：颜色由 currentColor 驱动，icon 背景为浅色块 */
.stat-purple { color: #6a5bff; }
.stat-purple .stat-num  { color: #6a5bff; }
.stat-purple .stat-icon { background: rgba(106, 91, 255, 0.14); }

.stat-blue   { color: #3a5bd9; }
.stat-blue .stat-num    { color: #3a5bd9; }
.stat-blue .stat-icon   { background: rgba(74, 123, 255, 0.14); }

.stat-green  { color: #19a974; }
.stat-green .stat-num   { color: #19a974; }
.stat-green .stat-icon  { background: rgba(25, 169, 116, 0.14); }

.stat-orange { color: #ff8a3d; }
.stat-orange .stat-num  { color: #ff8a3d; }
.stat-orange .stat-icon { background: rgba(255, 138, 61, 0.16); }

/* 头部内浮动装饰颜文字 / 表情：散落在背景层 */
.hero-float {
    position: absolute;
    z-index: 1;
    font-size: 1.4rem;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    opacity: 0.85;
    -webkit-animation: heroFloat 6s ease-in-out infinite;
    animation: heroFloat 6s ease-in-out infinite;
    font-family: 'Segoe UI', 'SF Mono', 'Courier New', monospace;
}

.float-2 { top: 88px;  left: 24%; color: #6a5bff; animation-delay: 0.6s; font-size: 1.2rem; }
.float-3 { top: 28px;  left: 38%; color: #ff8a3d; animation-delay: 1.1s; font-size: 1.4rem; }
.float-4 { top: 200px; left: 4%;  color: #f5b400; animation-delay: 1.6s; font-size: 1.5rem; }
.float-6 { top: 100px; right: 4%; color: #ff6b9d; animation-delay: 0.9s; font-size: 1.5rem; }
.float-7 { top: 56px;  right: 18%; color: #3a5bd9; animation-delay: 1.4s; font-size: 1.2rem; }
.float-8 { top: 195px; right: 10%; color: #5b8bff; animation-delay: 2.0s; font-size: 1.3rem; }

@-webkit-keyframes heroFloat {
    0%, 100% { -webkit-transform: translateY(0)    rotate(0deg);  transform: translateY(0)    rotate(0deg); }
    50%      { -webkit-transform: translateY(-8px) rotate(4deg);  transform: translateY(-8px) rotate(4deg); }
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0)    rotate(0deg);  }
    50%      { transform: translateY(-8px) rotate(4deg);  }
}

/* ---------- 移动端分类筛选按钮（桌面端默认隐藏，移动端见响应式） ---------- */
.mobile-filter-btn {
    display: none;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

/* ---------- Tab 切换 + 搜索框（已迁移到 site-header 内部） ----------
   .tabs / .tab-btn / .tab-icon / .search-* 样式见上方头部区域。
   保留 .tab-search-row 以兼容旧响应式断点的清理逻辑。 */
.tab-search-row { display: none; }

/* ---------- 主体布局：侧边栏 + 内容 ---------- */
.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* ---------- 侧边栏 ---------- */
/* JS 渲染前的容器占位骨架：全部隐藏避免出现"空卡片"闪烁（与 index.html critical CSS 冗余兜底） */
.site-header:empty,
#sidebar:empty,
#grid:empty,
#features:empty,
#footer-note:empty { display: none; }

.sidebar {
    position: sticky;
    top: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 16px 12px;
    box-shadow: 0 6px 24px rgba(31, 35, 48, 0.05);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-head {
    display: flex;
    align-items: center;
    padding: 0 8px 12px;
}

.sidebar-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #9aa1b0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-hint {
    font-size: 0.72rem;
    color: #a7adbb;
    margin-left: auto;
    margin-right: 8px;
}

.sidebar-clear {
    border: none;
    background: #f0f4ff;
    color: #4a7bff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    cursor: pointer;
    margin-right: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-clear:hover {
    background: #4a7bff;
    color: #fff;
}

.sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: opacity 0.2s ease;
}

/* 全局搜索期间：分类筛选停用的提示条 */
.sidebar-search-tip {
    margin: 0 8px 10px;
    padding: 7px 10px;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #4a7bff;
    background: rgba(74, 123, 255, 0.08);
    border: 1px dashed rgba(74, 123, 255, 0.35);
    border-radius: 8px;
}

/* 全局搜索期间：分类列表弱化并禁点 */
.sidebar-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.sidebar-item:hover {
    background: #f0f4ff;
}

.sidebar-item.active {
    background: #4a7bff;
    color: #fff;
}

.sidebar-emoji {
    width: 24px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-name {
    flex: 1;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-count {
    font-size: 0.72rem;
    color: #9aa1b0;
    background: rgba(0, 0, 0, 0.04);
    padding: 1px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}

.sidebar-item.active .sidebar-count {
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
}

/* ---------- 内容区 ---------- */
.content {
    min-width: 0;
}

/* ---------- 空结果 ---------- */
.empty-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    color: #6b7280;
}

.empty-icon {
    display: block;
    font-size: 2.4rem;
    margin-bottom: 12px;
    font-family: 'Segoe UI', 'SF Mono', monospace;
}

.empty-result p {
    margin-bottom: 16px;
}

.empty-reset {
    border: none;
    background: #4a7bff;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.empty-reset:hover {
    background: #1f5bff;
}

/* ---------- 全局搜索横幅 ---------- */
.global-search-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef2ff, #f6f3ff);
    border: 1px solid #dfe6ff;
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.gsb-label {
    font-weight: 700;
    color: #4a7bff;
    background: rgba(74, 123, 255, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.gsb-query {
    font-weight: 700;
    color: #1f2330;
    word-break: break-all;
}

.gsb-count {
    color: #6b7280;
    font-size: 0.85rem;
}

.gsb-clear {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #4a7bff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: inherit;
    transition: background 0.15s ease;
}

.gsb-clear:hover {
    background: rgba(74, 123, 255, 0.12);
}

/* ---------- 卡片网格 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

/* ---------- 单张卡片 ---------- */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 6px;
    padding: 14px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 24px rgba(31, 35, 48, 0.05),
                0 1px 2px rgba(31, 35, 48, 0.03);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* 分类/搜索切换时的卡片渐入动画 */
.card-enter {
    animation: cardFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--stagger, 0ms);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 列表条目渐入动画（用于「查看更多」展开） */
.item-enter {
    animation: itemFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--stagger, 0ms);
}

@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .card-enter,
    .item-enter {
        animation: none;
    }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(31, 35, 48, 0.08),
                0 2px 4px rgba(31, 35, 48, 0.04);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e8eaf0;
}

.card-emoji {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* 每张卡片的彩色圆形图标 */
.c-shock .card-emoji    { background: #e7f0ff; }
.c-mock .card-emoji     { background: #ffe7ee; }
.c-coquetry .card-emoji { background: #ffe7f0; }
.c-cry .card-emoji      { background: #e7eaff; }
.c-minimal .card-emoji  { background: #e6f8ee; }
.c-action .card-emoji   { background: #fff4e0; }
.c-animal .card-emoji    { background: #fde6f0; }
.c-cyber .card-emoji     { background: #e7eef9; }
.c-green .card-emoji     { background: #e8f5e9; }
.c-art .card-emoji       { background: #ffe9e9; }
.c-crash .card-emoji     { background: #fff0e0; }
.c-daily .card-emoji     { background: #e6f4ff; }
.c-dumb .card-emoji      { background: #fff4d6; }
.c-awkward .card-emoji   { background: #e8e7f5; }
.c-angry .card-emoji     { background: #ffdfdd; }
.c-happy .card-emoji     { background: #fff0b8; }
.c-supercute .card-emoji { background: #ffd9e8; }
.c-crazy .card-emoji     { background: #f3e8ff; }
.c-proud .card-emoji     { background: #fff3c4; }
.c-action2 .card-emoji   { background: #fff2cc; }
.c-sleepy .card-emoji    { background: #e0e7ff; }
.c-hungry .card-emoji    { background: #ffe9d6; }
.c-shy .card-emoji       { background: #ffd9e0; }
.c-cheer .card-emoji     { background: #ffe9d6; }
.c-heart .card-emoji     { background: #ffd9ec; }
.c-think .card-emoji     { background: #e6f0ff; }
.c-cool .card-emoji      { background: #e0e7ff; }
.c-dumb2 .card-emoji     { background: #f0e6d0; }
.c-gentle .card-emoji    { background: #ffe3ec; }
.c-exaggerate .card-emoji { background: #ffe0d6; }
.c-lazy .card-emoji      { background: #eae6e0; }
.c-craving .card-emoji   { background: #ffe9d6; }
.c-obedient .card-emoji  { background: #e0f0e6; }
.c-naughty .card-emoji   { background: #f0e8d0; }
.c-nervous .card-emoji   { background: #ffe0d0; }
.c-satisfied .card-emoji { background: #ffd9ec; }
.c-petrified .card-emoji { background: #e0e8f5; }
.c-expect .card-emoji    { background: #ffe9e6; }
.c-clingy .card-emoji    { background: #ffdceb; }
.c-drama .card-emoji     { background: #f3e0ff; }
.c-socialanxiety .card-emoji { background: #e4e0e8; }
.c-socialbutterfly .card-emoji { background: #ffe8e0; }
.c-hesitate .card-emoji  { background: #e8f0ff; }
.c-touched .card-emoji   { background: #ffe0ec; }
.c-perfunctory .card-emoji { background: #ece4dc; }
.c-focused .card-emoji   { background: #e8f2e8; }
.c-ruminate .card-emoji  { background: #e2e6ee; }
.c-fakework .card-emoji  { background: #f0e8d0; }
.c-breakdown .card-emoji { background: #ffe0d6; }
.c-neutral .card-emoji   { background: #e8e8e0; }
.c-stubborn .card-emoji  { background: #fff3c7; }
.c-sweetmouth .card-emoji { background: #ffd9ec; }
.c-sarcastic .card-emoji { background: #f0e8d0; }
.c-heartless .card-emoji { background: #dce8f2; }
.c-stoic .card-emoji     { background: #e0eee8; }
.c-pretenddead .card-emoji { background: #e8e0e0; }
.c-nagging .card-emoji   { background: #ffe8d0; }
.c-composure .card-emoji { background: #e6e8ee; }
.c-examstress .card-emoji { background: #ffdcdc; }
.c-marriagepressure .card-emoji { background: #f0e8d0; }
.c-rainyday .card-emoji  { background: #dce8f2; }
.c-binge .card-emoji     { background: #ffe0e6; }
.c-overtime .card-emoji  { background: #e2e6ee; }
.c-payday .card-emoji    { background: #fff0c8; }
.c-zen .card-emoji       { background: #e6f0e6; }
.c-grinder .card-emoji   { background: #ffe0d6; }
.c-bosslie .card-emoji   { background: #f0e8d0; }
.c-fridayoff .card-emoji { background: #fff0c8; }
.c-crush .card-emoji     { background: #ffd9ec; }
.c-leftread .card-emoji  { background: #e4e0e8; }
.c-reconcile .card-emoji { background: #ffd9ec; }
.c-emptyfridge .card-emoji { background: #ffe0e0; }
.c-package .card-emoji   { background: #e0e8f2; }
.c-cram .card-emoji      { background: #ffdcdc; }
.c-examdone .card-emoji  { background: #fff0c8; }
.c-forcedsocial .card-emoji { background: #ece4dc; }
.c-alonetime .card-emoji { background: #e0eee8; }
.c-rankup .card-emoji    { background: #e0e8f2; }
.c-rankdown .card-emoji  { background: #ffdcdc; }
.c-addicted .card-emoji  { background: #ffe0d6; }
.c-badteammate .card-emoji { background: #f0e8d0; }
.c-tripstart .card-emoji { background: #fff0c8; }
.c-triptired .card-emoji { background: #e4e0e8; }
.c-scenery .card-emoji   { background: #e0f0e6; }
.c-tripback .card-emoji  { background: #ece4dc; }
.c-workoutdone .card-emoji { background: #e0e8f2; }
.c-nolift .card-emoji    { background: #ece4dc; }
.c-sore .card-emoji      { background: #ffe0e0; }
.c-watchotherlift .card-emoji { background: #f0e8d0; }
.c-seeidol .card-emoji   { background: #fff0c8; }
.c-cheeridol .card-emoji { background: #ffe8e0; }
.c-noticket .card-emoji  { background: #e4e0e8; }
.c-concert .card-emoji   { background: #f3e0ff; }
.c-funnypost .card-emoji { background: #fff0c8; }
.c-exex .card-emoji      { background: #e8e8e0; }
.c-hastag .card-emoji    { background: #ffe8e0; }
.c-netfight .card-emoji  { background: #f3e0ff; }
.c-bigsale .card-emoji   { background: #ffdcdc; }
.c-buyregret .card-emoji { background: #ece4dc; }
.c-afternight .card-emoji { background: #e2e8ee; }
.c-sick .card-emoji      { background: #ffe0e0; }
.c-afterworkout .card-emoji { background: #e0f0e6; }
.c-insomnia .card-emoji  { background: #e4e0e8; }
.c-springfest .card-emoji { background: #ffdcdc; }
.c-midautumn .card-emoji { background: #fff0c8; }
.c-newyear .card-emoji  { background: #e0e8f2; }
.c-valentine .card-emoji { background: #ffd9ec; }
.c-moviesaw .card-emoji { background: #fff0c8; }
.c-moviesad .card-emoji { background: #ffdcdc; }
.c-movieboring .card-emoji { background: #ece4dc; }
.c-movietalk .card-emoji { background: #e0f0e6; }
.c-loopmusic .card-emoji { background: #e0e8f2; }
.c-musiccry .card-emoji { background: #ffdcdc; }
.c-musichype .card-emoji { background: #ffe0d6; }
.c-headphones .card-emoji { background: #e4e0e8; }
.c-petcuddle .card-emoji { background: #ffd9ec; }
.c-petignored .card-emoji { background: #ece4dc; }
.c-petmischief .card-emoji { background: #ffe0d6; }
.c-petsleep .card-emoji { background: #e2e8ee; }
.c-rushmetro .card-emoji { background: #e0e8f2; }
.c-latetime .card-emoji { background: #ffe0d6; }
.c-gohome .card-emoji   { background: #fff0c8; }
.c-trafficjam .card-emoji { background: #ece4dc; }
.c-graduate .card-emoji { background: #fff0c8; }
.c-firstyear .card-emoji { background: #f0e8d0; }
.c-thirty .card-emoji   { background: #e4e0e8; }
.c-retire .card-emoji   { background: #e0f0e6; }
.c-lowbattery .card-emoji { background: #ffe0d6; }
.c-slowinternet .card-emoji { background: #e4e0e8; }
.c-systemupdate .card-emoji { background: #f0e8d0; }
.c-freeresc .card-emoji  { background: #fff0c8; }
.c-schoolstart .card-emoji { background: #ffdcdc; }
.c-attentive .card-emoji { background: #e0e8f2; }
.c-daydream .card-emoji { background: #e0f0e6; }
.c-examweek .card-emoji { background: #ffdcdc; }
.c-scorching .card-emoji { background: #ffe0d6; }
.c-heavyrain .card-emoji { background: #dce8f2; }
.c-freezing .card-emoji { background: #e0e8f2; }
.c-wildanimal .card-emoji { background: #f0e8d0; }
.c-eyevariant .card-emoji { background: #e0e8f2; }
.c-mouthvariant .card-emoji { background: #ffdcdc; }
.c-bodyaction .card-emoji { background: #ffe8e0; }
.c-longcombo .card-emoji { background: #f3e0ff; }
.c-specialcombo .card-emoji { background: #fff0c8; }
.c-minimal .card-emoji  { background: #e8e8e0; }
.c-obscure .card-emoji  { background: #f0e8d0; }
.c-minimal3 .card-emoji { background: #eae6dc; }
.c-gaming .card-emoji   { background: #e0e8f2; }
.c-office .card-emoji   { background: #f0e8d0; }
.c-lovetheater .card-emoji { background: #ffd9ec; }
.c-minimal2 .card-emoji { background: #e8e8e0; }
.c-ultimate .card-emoji { background: #f3e0ff; }
.c-ascii .card-emoji    { background: #f5e8ff; }
.c-circled-alpha .card-emoji { background: #ffe7f0; }
.c-circled-num .card-emoji   { background: #fff0d6; }
.c-boxed-alpha .card-emoji   { background: #e7f0ff; }
.c-negative-boxed .card-emoji { background: #e6f8ee; }
.c-parenthesis .card-emoji   { background: #f3e8ff; }
.c-superscript .card-emoji   { background: #ffe8e0; }
.c-subscript .card-emoji     { background: #e4e0e8; }
.c-math-bold .card-emoji     { background: #e0e8f2; }
.c-math-script .card-emoji   { background: #ffd9ec; }
.c-fullwidth .card-emoji     { background: #e8e8e0; }
.c-zhuyin .card-emoji        { background: #e0f0e6; }
.c-symbol-num .card-emoji    { background: #fff0c8; }
.c-divider-line .card-emoji  { background: #e0e8f2; }
.c-star-line .card-emoji     { background: #fff0c8; }
.c-heart-line .card-emoji    { background: #ffd9ec; }
.c-flower-line .card-emoji   { background: #ffe8e0; }
.c-emoji-deco .card-emoji    { background: #f3e8ff; }
.c-deco-combo .card-emoji    { background: #ffe0d6; }
.c-arrow-line .card-emoji    { background: #e0e8f2; }
.c-box-deco .card-emoji      { background: #ece4dc; }
.c-text-deco .card-emoji     { background: #e6f8ee; }

.card-title {
    flex: 1;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1f2330;
    letter-spacing: 0.3px;
}

.card-badge {
    background: #f3f5fa;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    min-width: 26px;
    text-align: center;
}

/* 全局搜索时卡片头部的来源模块标签 */
.card-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(74, 123, 255, 0.08);
    color: #4a7bff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 2px;
    white-space: nowrap;
}

/* ---------- 颜文字列表 ---------- */
.emoji-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
    cursor: pointer;
    gap: 10px;
}

.emoji-item:hover {
    background: #f6f8fc;
}

.emoji-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.emoji-symbol {
    font-family: 'Segoe UI', 'SF Mono', 'PingFang SC', 'Courier New', monospace;
    font-size: 1.25rem;
    color: #1f2330;
    min-width: 90px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    font-weight: 500;
}

/* 特殊符号 Tab：字符更单薄，放大便于查看与点击 */
.symbol-card .emoji-symbol {
    font-size: 1.8rem;
    min-width: 60px;
    text-align: center;
    line-height: 1.2;
}

/* 汉字部首 Tab：单字展示，字号略小于符号 */
.radical-card .emoji-symbol {
    font-size: 1.25rem;
    min-width: 56px;
    text-align: center;
    line-height: 1.2;
}

/* 花字变体 Tab：单字符偏单薄，放大居中便于查看与点击 */
.fancy-card .emoji-symbol {
    font-size: 1.7rem;
    min-width: 56px;
    text-align: center;
    line-height: 1.2;
}

/* 装饰长串 Tab：整段长串独占一行，等宽字体自动换行 */
.deco-item {
    padding: 10px 8px;
    align-items: flex-start;
}

.deco-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.deco-symbol {
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Courier New', 'PingFang SC', monospace;
    font-size: 1.05rem;
    color: #1f2330;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-height: 1.5;
    font-weight: 500;
    user-select: all;
}

.deco-desc {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emoji-desc {
    font-size: 0.9rem;
    color: #6b7280;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 图标（Emoji）模式：放大符号展示 */
.icon-item {
    padding: 10px 8px;
}

.icon-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.icon-glyph {
    font-size: 1.9rem;
    line-height: 1;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
    transition: transform 0.18s ease;
}

.icon-item:hover .icon-glyph {
    transform: scale(1.15);
}

.icon-desc {
    font-size: 0.85rem;
    color: #6b7280;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    flex-shrink: 0;
    background: #f3f5fa;
    color: #6b7280;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.18s ease;
    padding: 0;
}

.copy-btn:hover {
    background: #4a7bff;
    color: white;
    transform: scale(1.08);
}

.copy-btn:active {
    transform: scale(0.92);
}

.copy-btn.copied {
    background: #22c55e;
    color: white;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ---------- 巨型文字画卡 ---------- */
.art-card .emoji-list {
    gap: 14px;
}

.art-block {
    background: #fafbfd;
    border: 1px solid #eef0f5;
    border-radius: 4px;
    padding: 14px 12px 10px;
    position: relative;
    transition: background 0.15s ease;
}

.art-block:hover {
    background: #f3f5fa;
}

.art-pre {
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #1f2330;
    white-space: pre;
    overflow-x: auto;
    margin: 0;
    padding-right: 36px;
}

.art-pre::-webkit-scrollbar { height: 4px; }
.art-pre::-webkit-scrollbar-thumb { background: #d6dae3; border-radius: 2px; }

.art-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.art-desc {
    color: #6b7280;
    font-size: 0.8rem;
}

/* ---------- 查看更多 ---------- */
.more-link {
    margin-top: 14px;
    text-align: center;
    color: #4a7bff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 0;
    transition: color 0.15s ease;
    user-select: none;
}

.more-link:hover {
    color: #1f5bff;
}

.more-link .arrow {
    transition: transform 0.2s ease;
    display: inline-flex;
    align-self: center;
    line-height: 1;
    font-size: 0.85rem;
}

.more-link.expanded .arrow {
    transform: rotate(180deg);
}

/* 折叠样式：默认只显示前 6 条 */
.emoji-list.collapsed .emoji-item:nth-child(n+7) {
    display: none;
}

.emoji-list.expanded .emoji-item {
    display: flex;
}

/* ---------- 底部特性区 ---------- */
.features {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 28px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 28px;
    box-shadow: 0 6px 24px rgba(31, 35, 48, 0.05);
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.feat-blue   { background: #e7f0ff; }
.feat-green  { background: #e6f8ee; }
.feat-purple { background: #f3e8ff; }
.feat-orange { background: #fff0e0; }

.feature-text {
    flex: 1;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2330;
    margin-bottom: 6px;
}

.feature-desc {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.55;
}

/* ---------- 页脚 ---------- */
.footer-note {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(31, 35, 48, 0.08);
    text-align: center;
    color: #6b7280;
    font-size: 0.88rem;
    padding: 20px 0 4px;
    letter-spacing: 0.4px;
}

.footer-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-brand {
    font-weight: 600;
    color: #4a5163;
}

.footer-sep {
    color: #c3c9d6;
}

.footer-copy {
    color: #8a90a0;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    color: #4a5163;
    text-decoration: none;
    font-weight: 600;
    background: rgba(74, 123, 255, 0.08);
    transition: background 0.15s ease, color 0.15s ease;
}

.footer-link svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.footer-link:hover {
    background: rgba(74, 123, 255, 0.16);
    color: #4a7bff;
}

.footer-note .heart {
    color: #ff5e7e;
    display: inline-block;
    margin-left: 4px;
}

.footer-note-tip {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #9aa0b0;
    letter-spacing: 0.2px;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translate(-50%, 16px);
    background: rgba(31, 35, 48, 0.92);
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 12px 32px rgba(31, 35, 48, 0.25);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    body {
        padding: 12px calc(12px + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
    }
    /* 抑制移动端点击高亮闪烁，提升手感 */
    .tab-btn, .hero-chip, .copy-btn, .mobile-filter-btn, .sidebar-item, .more-link {
        -webkit-tap-highlight-color: transparent;
    }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .brand-title { font-size: 1.3rem; }
    .brand-icon { font-size: 1.05rem; padding: 0 12px; min-width: 44px; height: 44px; }
    .features { grid-template-columns: 1fr; }
    .site-header { margin-bottom: 20px; padding: 12px; gap: 18px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-num { font-size: 1.5rem; }
    .stat-label { font-size: 0.85rem; }
    .stat-desc { font-size: 0.72rem; }
    .stat-icon { width: 38px; height: 38px; border-radius: 8px; }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-card { padding: 12px 14px; gap: 10px; }
    .header-hint { display: none; }

    /* 标题 / 装饰 / 描述：移动端收紧 */
    .hero-title { font-size: clamp(1.5rem, 6.5vw, 2rem); gap: 0.3em; }
    .hero-deco { font-size: 1.1rem; }
    .hero-desc { font-size: 0.86rem; line-height: 1.7; }
    /* 移动端取消强制断行，由窄屏自然折行 */
    .hero-desc-br { display: none; }

    /* 搜索 + Tab 改为两行 */
    .hero-search-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .hero-search-box { flex: none; padding: 11px 14px; min-height: 48px; max-width: none; width: 100%; }

    /* 移动端 Tab 栏：换行居中，彻底避免按钮被压扁或溢出切割 */
    .tabs {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 6px;
    }
    .tab-btn { flex: 0 1 auto; justify-content: center; white-space: nowrap; min-height: 42px; }

    /* 浮动装饰：移动端完全隐藏，避免遮挡内容 */
    .hero-float { display: none; }

    /* 统计卡：移动端内容居中，与上方标题/搜索保持同一对齐基准 */
    .stat-card { justify-content: center; text-align: center; }
    .stat-card .stat-text { align-items: center; }

    /* 布局变单列 */
    .layout { grid-template-columns: 1fr; gap: 0; }

    /* 移动端头部内容居中；子项保持整行拉伸，与下方卡片宽度对齐 */
    .hero-top { justify-content: center; margin-bottom: 10px; }
    .site-header { align-items: stretch; text-align: center; }
    .hero-title-wrap { justify-content: center; }
    /* 移动端隐藏灵感分类速览 chip 行，节省首屏空间 */
    .hero-chips { display: none; }

    /* 全局搜索横幅：移动端紧凑化 */
    .global-search-bar { padding: 10px 14px; gap: 6px 10px; font-size: 0.84rem; }
    .gsb-label { font-size: 0.74rem; padding: 2px 9px; }
    .gsb-count { font-size: 0.78rem; }
    .gsb-clear { font-size: 0.8rem; }

    /* 移动端筛选按钮：右下角圆形悬浮，滚动时始终可见 */
    .mobile-filter-btn {
        position: fixed;
        right: 16px;
        bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        margin: 0;
        border-radius: 50%;
        font-size: 0;
        z-index: 1000;
        box-shadow: 0 4px 16px rgba(74, 123, 255, 0.35);
        border: 1px solid rgba(74, 123, 255, 0.35);
        background: rgba(74, 123, 255, 0.96);
        color: #fff;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-filter-btn::before {
        content: '☰';
        font-size: 1.1rem;
        line-height: 1;
    }

    .mobile-filter-btn:hover {
        background: #3d6bff;
    }

    /* 两列时符号略收窄，避免拥挤；移动端字号 +1px */
    .emoji-symbol { min-width: 60px; font-size: 21px; }
    .symbol-card .emoji-symbol { min-width: 44px; font-size: 26px; }
    .radical-card .emoji-symbol { min-width: 44px; font-size: 19px; }
    .fancy-card .emoji-symbol { min-width: 44px; font-size: 23px; }
    .deco-symbol { font-size: 15px; }
    .emoji-desc { font-size: 15px; }

    /* 侧边栏改为左侧抽屉，默认滑出屏幕 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(340px, 88vw);
        max-height: 100vh;
        height: 100%;
        margin: 0;
        border-radius: 0 8px 8px 0;
        z-index: 1002;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 8px 0 32px rgba(31, 35, 48, 0.18);
        padding: 20px 12px;
        display: flex;
        flex-direction: column;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.drawer-open {
        transform: translateX(0);
    }

    /* 抽屉列表独立滚动 */
    .sidebar .sidebar-list {
        overflow-y: auto;
        flex: 1;
        min-height: 0;
        padding-right: 2px;
    }

    /* 抽屉触控目标加大 */
    .sidebar .sidebar-item {
        padding: 12px 10px;
        border-radius: 4px;
    }
    .sidebar .sidebar-name { font-size: 0.95rem; }
    .sidebar .sidebar-head { padding: 0 8px 14px; }
}

/* ---------- 移动端背景统一 ----------
   移动端性能较差，且半透明 + blur 玻璃拟态会让卡片/侧边栏/特性区
   底色深浅不一、有杂色。这里统一为不透明白色背景，
   并关闭 backdrop-filter，保证整体背景观感一致。 */
@media (max-width: 800px) {
    html, body {
        background: #f6f7fb;
    }
    .card,
    .sidebar,
    .features,
    .empty-result {
        background: #ffffff;
        border-color: rgba(226, 230, 240, 0.8);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .hero-search-box,
    .stat-card,
    .tabs .tab-btn {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .sidebar {
        background: #ffffff;
    }
}

/* ---------- 移动端抽屉遮罩 ---------- */
.sidebar-mask {
    position: fixed;
    inset: 0;
    background: rgba(31, 35, 48, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-mask.show {
    opacity: 1;
    visibility: visible;
}

/* 抽屉打开时锁定背景滚动 */
body.no-scroll {
    overflow: hidden;
}

@media (max-width: 520px) {
    body { padding: 12px; }
    .grid { grid-template-columns: 1fr; gap: 10px; }
    .site-header { flex-direction: column; gap: 14px; padding: 12px; align-items: stretch; text-align: center; }
    .brand-title { font-size: 1.2rem; }
    .brand { gap: 10px; }
    .brand-icon { height: 40px; min-width: 40px; font-size: 0.95rem; padding: 0 10px; }
    .hero-title { font-size: 1.6rem; letter-spacing: 1px; }
    .hero-title-wrap { gap: 10px; justify-content: center; }
    .hero-deco { font-size: 1rem; }
    .hero-desc { font-size: 0.86rem; line-height: 1.65; }
    .hero-chips { gap: 6px; justify-content: center; flex-wrap: wrap; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { padding: 10px 12px; gap: 8px; border-radius: 8px; }
    .stat-num { font-size: 1.2rem; }
    .stat-label { font-size: 0.78rem; }
    .stat-desc { font-size: 0.66rem; margin-top: 1px; }
    .stat-icon { width: 30px; height: 30px; border-radius: 6px; }
    .stat-icon svg { width: 15px; height: 15px; }
    .hero-chip { padding: 6px 12px; font-size: 0.78rem; gap: 5px; }
    .hero-search-box .search-clear { width: 20px; height: 20px; font-size: 0.7rem; }

    /* 极窄屏 Tab 按钮收紧，保证一行显示不换行 */
    .tab-btn { padding: 9px 8px; gap: 5px; font-size: 0.85rem; }
    .tab-icon { font-size: 0.95rem; }
    .emoji-symbol { min-width: 60px; font-size: 21px; }
    .symbol-card .emoji-symbol { min-width: 44px; font-size: 26px; }
    .radical-card .emoji-symbol { min-width: 44px; font-size: 19px; }
    .fancy-card .emoji-symbol { min-width: 44px; font-size: 23px; }
    .deco-symbol { font-size: 15px; }
    .emoji-desc { font-size: 15px; }

    /* 卡片：减小内边距，贴合小屏 */
    .card { padding: 14px; }
    .card-header { margin-bottom: 12px; padding-bottom: 10px; gap: 8px; justify-content: center; flex-wrap: wrap; }
    .card-title { font-size: 0.98rem; text-align: center; }
    /* 来源标签：窄屏更紧凑，避免挤压标题 */
    .card-source { font-size: 0.68rem; padding: 1px 6px; gap: 3px; }
    .emoji-item { padding: 7px 8px; gap: 8px; border-radius: 8px; justify-content: center; }
    .emoji-left { gap: 10px; justify-content: center; }

    /* 触控目标：放大复制按钮 */
    .copy-btn { width: 34px; height: 34px; border-radius: 5px; }
    .copy-btn svg { width: 16px; height: 16px; }

    /* 特性区 */
    .features { padding: 20px 18px; gap: 18px; border-radius: 8px; }
    .feature { gap: 12px; }
    .feature-icon { width: 38px; height: 38px; font-size: 1rem; }
    .feature-desc { font-size: 0.82rem; }

    /* 页脚 */
    .footer-note { font-size: 0.82rem; padding: 18px 0 2px; }
    .footer-inner { gap: 8px; }

    /* 搜索框触控放大（16px 避免 iOS Safari 聚焦自动缩放） */
    .hero-search-box .search-input { padding: 1px 0; font-size: 16px; }
    .hero-search-box { padding: 10px 14px; min-height: 44px; }
    .mobile-filter-btn { padding: 13px 16px; }

    /* 全局搜索横幅：窄屏紧凑 + 清除按钮胶囊化 */
    .global-search-bar { padding: 10px 12px; gap: 8px; border-radius: 10px; font-size: 0.82rem; }
    .gsb-label { font-size: 0.72rem; padding: 2px 8px; }
    .gsb-query { font-size: 0.88rem; }
    .gsb-count { font-size: 0.76rem; }
    .gsb-clear {
        margin-left: auto;
        padding: 5px 12px;
        background: rgba(74, 123, 255, 0.1);
        border-radius: 999px;
        font-size: 0.76rem;
    }
}

/* ---------- 超窄屏（≤380px）兼容 ---------- */
@media (max-width: 380px) {
    body { padding: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .site-header { padding: 12px; }
    .hero-title { font-size: 1.45rem; letter-spacing: 0.5px; }
    /* 隐藏两侧装饰颜文字，避免与标题重叠/溢出 */
    .hero-deco { display: none; }
    .hero-chips { gap: 5px; justify-content: center; }
    .hero-chip { padding: 5px 10px; font-size: 0.72rem; }
    /* 移动端筛选按钮缩小到合理触控尺寸 */
    .mobile-filter-btn { width: 42px; height: 42px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}
