* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
        "PingFang SC", Roboto, Helvetica, Arial, sans-serif;
    background: #f0f0f0;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}
.page {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- 顶栏：左 Logo + 站点名，右「更多 / 登录」 ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 70;
    background: rgba(240, 240, 240, .88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e4e4e4;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: #111;
}
.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: contain;
    flex-shrink: 0;
}
.brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topnav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* 右上角「极简模式」开关 */
.mini-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.mini-toggle:hover { background: #e6e6e6; color: #111; }
.mini-track {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 20px;
    background: #d6d6d6;
    transition: background .2s;
    flex-shrink: 0;
}
.mini-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .2s;
}
.mini-toggle.on .mini-track { background: #4bbf56; }
.mini-toggle.on .mini-dot { transform: translateX(14px); }
.mini-toggle.on { color: #2e9e3b; }
.nav-drop { position: relative; }
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: #444;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.nav-btn:hover, .nav-drop.open > .nav-btn { background: #e6e6e6; color: #111; }
.nav-btn .caret {
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #9a9a9a;
    transition: transform .18s;
}
.nav-drop.open .caret { transform: rotate(180deg); }
.nav-uname { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: #222; }
.user-ico {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #f5b301;
    box-shadow: 0 0 0 3px rgba(245, 179, 1, .22);
    flex-shrink: 0;
}
.nav-user .user-ico { margin-right: 1px; }
.drop-menu {
    position: absolute;
    top: 44px;
    left: 0;
    min-width: 148px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
    padding: 6px;
    z-index: 80;
    display: none;
}
.drop-menu.drop-right { left: auto; right: 0; }
.nav-drop.open .drop-menu { display: block; }
.drop-menu a {
    display: block;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14.5px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}
.drop-menu a:hover { background: #f4f4f4; color: #111; }

/* ---------- 标题（默认隐藏，见后台「首页显示居中大标题」） ---------- */
.site-header { text-align: center; margin-top: 44px; }
.site-title {
    font-size: 50px;
    font-weight: 800;
    color: #111;
    letter-spacing: .5px;
    line-height: 1.1;
}
.site-logo { max-height: 76px; }
.site-tagline {
    margin-top: 6px;
    font-size: 21px;
    font-weight: 700;
    color: #333;
    letter-spacing: .5px;
}

/* ---------- 问候语 + 时间 + 日期（搜索框上方，可在「个性化设置」里细调） ---------- */
.greet-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    min-height: 39px;
    line-height: 1.15;
    color: var(--greet-color, #1a1a1a);
}
.greet-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
}
.greet-text, .greet-time {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .5px;
}
.greet-bar[data-bold="0"] .greet-text,
.greet-bar[data-bold="0"] .greet-time { font-weight: 500; }
.greet-time { font-variant-numeric: tabular-nums; }
.greet-date {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .5px;
    opacity: .84;
    font-variant-numeric: tabular-nums;
}
.greet-bar[data-bold="1"] .greet-date { font-weight: 700; }
.greet-bar + .search-wrap { margin-top: 22px; }

/* ---------- 搜索框（左：引擎图标 · 中：输入 · 右：黄色放大镜） ---------- */
.search-wrap { position: relative; margin: 32px auto 0; max-width: 900px; width: 100%; }
.search-box {
    display: flex;
    align-items: center;
    height: 48px;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
}
.search-box:hover { border-color: #c9c9c9; }
.search-box:focus-within {
    border-color: #ffd400;
    box-shadow: 0 0 0 3px rgba(255, 225, 0, .35);
}
#searchInput {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    font-size: 16px;
    padding: 0 12px 0 4px;
    background: transparent;
    color: #222;
}
#searchInput::placeholder { color: #9e9e9e; }
.search-btn {
    flex-shrink: 0;
    width: 54px;
    height: 100%;
    border: 0;
    background: #ffe100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.search-btn:hover { background: #f3d500; }

/* ---------- 引擎切换（左侧展示当前引擎图标） ---------- */
.engine-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px 0 16px;
    cursor: pointer;
    flex-shrink: 0;
    height: 100%;
    user-select: none;
}
.engine-icon {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 5px;
}
.engine-select .arrow {
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #b5b5b5;
    opacity: 0;
    transition: transform .15s, opacity .15s;
}
.engine-select:hover .arrow, .engine-select.open .arrow { opacity: 1; }
.engine-select.open .arrow { transform: rotate(180deg); }
/* ---------- 引擎选择面板（卡片式：标题 + 搜索建议开关 + 引擎九宫格） ---------- */
.engine-menu {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
    padding: 16px 18px 18px;
    z-index: 60;
    display: none;
}
.engine-menu.open { display: block; }
/* 指向搜索框的小三角 */
.engine-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 25px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #ececec;
    border-top: 1px solid #ececec;
    border-radius: 2px 0 0 0;
    transform: rotate(45deg);
}
.ep-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.ep-title { font-size: 15px; font-weight: 600; color: #333; }
.ep-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 14px;
    color: #777;
    cursor: pointer;
    user-select: none;
}
.ep-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-switch {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #dcdcdc;
    transition: background .2s;
}
.ep-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.22);
    transition: transform .2s;
}
.ep-toggle input:checked + .ep-switch { background: #4bbf56; }
.ep-toggle input:checked + .ep-switch::after { transform: translateX(20px); }
.ep-toggle input:focus-visible + .ep-switch { box-shadow: 0 0 0 3px rgba(75, 191, 86, .25); }

.ep-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.ep-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    background: #f5f5f5;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.ep-card:hover { background: #ededed; }
.ep-card.active {
    background: #fff;
    border-color: #ffe100;
    box-shadow: 0 0 0 3px rgba(255, 225, 0, .2);
}
.ep-icon { width: 22px; height: 22px; flex-shrink: 0; object-fit: contain; border-radius: 5px; }
.ep-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 搜索建议 ---------- */
.search-suggest {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
    overflow: hidden;
    z-index: 50;
}
.suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}
.suggest-item:hover, .suggest-item.active { background: #f5f6f4; }
.suggest-item .s-icon { width: 20px; height: 20px; flex-shrink: 0; border-radius: 4px; }
.suggest-item .s-domain { margin-left: auto; color: #aaa; font-size: 12px; }
.suggest-empty { padding: 14px 18px; color: #999; font-size: 14px; }
mark { background: transparent; color: #4e6ef2; font-weight: 600; }

/* ---------- 最近访问 ---------- */
.recent-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 900px;
    margin: 16px auto 0;
    padding-top: 12px;
    border-top: 1px solid #e6e6e6;
}
.recent-label { color: #a3a3a3; font-size: 13px; display: block; margin-bottom: 4px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 20px; }
.recent-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    padding: 3px 12px;
    background: #eeeef0;
    border-radius: 14px;
}
.recent-item img { width: 16px; height: 16px; border-radius: 3px; }
.recent-clear { color: #999; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.recent-clear:hover { color: #666; }

/* ---------- 公告 ---------- */
.announce {
    margin: 14px auto 0;
    max-width: 920px;
    background: #fff8e6;
    border: 1px solid #ffe1a8;
    color: #a06d10;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}

/* ---------- 分类标签（胶囊按钮，前两个为会员相关） ---------- */
.tab-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 28px 0 4px;
}
.tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
    /* 与搜索框同宽居中，书签行两端与搜索框左右边缘对齐 */
    max-width: 900px;
    margin: 0 auto;
}
/* 每一行标签：书签行在上，分类行在下 */
.tab-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.tab-row-bm { justify-content: space-between; }
.tab-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 15px;
    color: #555;
    background: #e7e7e7;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.tab:hover { background: #dedede; color: #111; }
.tab.active { background: #ffd400; color: #1a1a1a; font-weight: 700; }
.tab-special { background: #eee9d3; color: #6b5a10; font-weight: 600; }
.tab-special:hover { background: #e7e0c4; color: #4d3f06; }
.tab-special.active { background: #ffd400; color: #1a1a1a; }
.tab-star {
    width: 10px; height: 10px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/></svg>") center/contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/></svg>") center/contain no-repeat;
}
.tab-count {
    font-style: normal;
    font-size: 12px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .08);
}
.tab-actions { flex-shrink: 0; }
.tab-add {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f7f7f7;
    font-family: inherit;
    font-size: 15px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.tab-add:hover { background: #fff; color: #111; border-color: #cfcfcf; }

/* ---------- 我的书签 / 网友收藏 ---------- */
.bm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto 12px;
    font-size: 13.5px;
    color: #8f8f8f;
}
.bm-title { font-size: 15px; color: #333; font-weight: 600; }
.bm-title b { color: #111; }
.bm-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.bm-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.bm-dot.is-pending { background: #f5a623; box-shadow: 0 0 0 3px rgba(245, 166, 35, .18); }
.grid-user { row-gap: 8px; }
.bm-card { position: relative; min-width: 0; }
.bm-card .tool-item { width: 100%; }
/* 审核中 / 未通过：用描边底色区分，避免遮挡图标 */
.bm-card.is-s0 .tool-item {
    background: #fff8e8;
    box-shadow: inset 0 0 0 1px #f4cd84;
}
.bm-card.is-s0 .tool-item:hover { background: #fff3dc; }
.bm-card.is-s2 .tool-item {
    background: #fff5f5;
    box-shadow: inset 0 0 0 1px #f0bcbc;
}
.bm-card.is-s2 .tool-item:hover { background: #ffecec; }
.bm-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    line-height: 1;
    border: 0;
    border-radius: 50%;
    background: #d9d9d9;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    opacity: 0;
    z-index: 3;
    transition: opacity .15s, background .15s;
}
.bm-card:hover .bm-del { opacity: 1; }
.bm-del:hover { background: #e5484d; }
.bm-empty {
    max-width: 900px;
    margin: 0 auto;
    padding: 46px 16px;
    text-align: center;
    color: #b0b0b0;
    font-size: 14.5px;
    background: #eaeaea;
    border-radius: 14px;
}
.bm-badge {
    display: inline-block;
    font-size: 11.5px;
    line-height: 1.6;
    padding: 0 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.bm-badge.bm-s0 { background: #fff4de; color: #a06d10; }
.bm-badge.bm-s1 { background: #e6f7ea; color: #1a7f37; }
.bm-badge.bm-s2 { background: #ffeaea; color: #c0392b; }

/* ---------- 面板 / 网格（PC 更饱满） ---------- */
.panel { display: none; margin-top: 14px; }
.panel.active { display: block; }
.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    row-gap: 6px;
    column-gap: 6px;
    max-width: 900px;
    margin: 0 auto;
}
.tool-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14.5px;
    transition: background .12s;
    min-width: 0;
}
.tool-item:hover { background: #e4e4e4; }
.tool-item img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
}
.tool-emoji { flex-shrink: 0; width: 22px; text-align: center; }
/* 名称：始终单行，放不下就显示省略号（横向列表与纵向磁贴都适用） */
.tool-name {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.empty { text-align: center; color: #bbb; padding: 60px 0; font-size: 15px; }

/* ---------- 置顶网站（搜索框下方，列数由后台设置控制，电脑/手机都生效） ---------- */
.top-grid {
    display: grid;
    grid-template-columns: repeat(var(--top-cols, 6), 1fr);
    row-gap: 10px;
    column-gap: 6px;
    margin: 22px auto 0;
    max-width: 900px;
}
.top-item {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 7px;
    padding: 8px 4px;
    font-size: 13px;
}
.top-item img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
}

/* ---------- 底部 ---------- */
.site-footer { margin-top: auto; padding: 70px 0 32px; text-align: center; }
.footer-links { font-size: 14px; margin-bottom: 14px; }
.footer-links a { color: #888; text-decoration: none; margin: 0 13px; }
.footer-links a:hover { color: #444; }
.footer-links .dot { color: #ccc; }
.footer-desc, .footer-copy, .footer-icp { color: #b0b0b0; font-size: 13px; margin-top: 8px; }
.footer-icp a { color: #b0b0b0; text-decoration: none; }
.footer-icp a:hover { color: #888; }

/* ---------- 通用按钮 ---------- */
.btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #ffe100;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.btn-main:hover { background: #f3d500; }
.btn-main:disabled { opacity: .6; cursor: default; }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #555;
    font-family: inherit;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-ghost:hover { background: #f5f5f5; color: #111; border-color: #cfcfcf; }
.btn-ghost.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-ghost.danger:hover { background: #ffeaea; border-color: #f5b5b5; color: #c0392b; }

/* ---------- 弹窗（添加书签） ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}
.modal.open { display: block; }
.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .38);
}
.modal-box {
    position: relative;
    width: 92%;
    max-width: 420px;
    margin: 12vh auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
    overflow: hidden;
    animation: modalIn .18s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-10px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    border-bottom: 1px solid #f0f0f0;
}
.modal-x {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
}
.modal-x:hover { color: #555; }
.modal-body { padding: 18px 20px 6px; }
.modal-body label {
    display: block;
    font-size: 13px;
    color: #777;
    margin: 0 0 6px;
}
.modal-body input {
    width: 100%;
    height: 42px;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}
.modal-body input:focus { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255, 225, 0, .3); }
.modal-msg {
    min-height: 18px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 6px;
}
.modal-msg.is-ok { color: #1a7f37; }
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px 18px;
}

/* ---------- 轻提示 ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    z-index: 300;
    max-width: 86%;
    padding: 11px 22px;
    border-radius: 10px;
    background: rgba(28, 28, 28, .92);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
    animation: toastIn .2s ease-out;
}
.toast.is-error { background: #c0392b; }
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 登录 / 注册页 ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
.auth-wrap { width: 100%; max-width: 400px; }
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    text-decoration: none;
    color: #111;
}
.auth-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; }
.auth-brand span { font-size: 22px; font-weight: 800; }
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 26px 24px 28px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .07);
}
.auth-tabs {
    display: flex;
    gap: 6px;
    background: #f1f1f1;
    border-radius: 11px;
    padding: 4px;
    margin-bottom: 20px;
}
.auth-tab {
    flex: 1;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.auth-tab.active { background: #fff; color: #111; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form label {
    display: block;
    font-size: 13px;
    color: #777;
    margin: 12px 0 6px;
}
.auth-form label .hint { color: #b0b0b0; font-size: 12px; }
.auth-form input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}
.auth-form input:focus { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255, 225, 0, .3); }
.auth-submit {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 22px;
    border: 0;
    border-radius: 11px;
    background: #ffe100;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    line-height: 46px;
    text-decoration: none;
    transition: background .15s;
}
.auth-submit:hover { background: #f3d500; }
.auth-tip { margin-top: 14px; font-size: 13px; color: #999; text-align: center; }
.auth-tip a { color: #b8860b; text-decoration: none; }
.auth-err, .auth-ok {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    margin-bottom: 14px;
}
.auth-err { background: #ffebe9; color: #c0392b; }
.auth-ok { background: #e6f7ea; color: #1a7f37; }
.auth-msg { text-align: center; color: #666; font-size: 14.5px; padding: 18px 0 4px; }
.auth-back { text-align: center; margin-top: 18px; font-size: 13px; }
.auth-back a { color: #999; text-decoration: none; }
.auth-back a:hover { color: #555; }

/* ---------- 我的书签页 ---------- */
.mine-head { margin: 34px 0 18px; }
.mine-head h1 { font-size: 26px; color: #111; }
.mine-sub { color: #8f8f8f; font-size: 13.5px; margin-top: 6px; }
.mine-sub b { color: #111; }
.mine-flash {
    max-width: 660px;
    margin: 0 0 16px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    background: #e6f7ea;
    color: #1a7f37;
}
.mine-flash.is-error { background: #ffebe9; color: #c0392b; }
.mine-card {
    max-width: 660px;
    background: #fff;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .05);
    margin-bottom: 18px;
}
.mine-card-title { font-size: 16px; font-weight: 700; color: #111; margin-bottom: 16px; }
.mine-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.mine-field { flex: 1; min-width: 180px; }
.mine-field label { display: block; font-size: 12.5px; color: #888; margin-bottom: 6px; }
.mine-field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}
.mine-field input:focus { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255, 225, 0, .3); }
.mine-actions { display: flex; gap: 8px; }
.mine-empty { color: #b0b0b0; font-size: 14px; padding: 26px 0; text-align: center; }
.mine-list { display: flex; flex-direction: column; }
.mine-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f2f2f2;
}
.mine-item:last-child { border-bottom: 0; }
.mine-item img { flex-shrink: 0; object-fit: contain; border-radius: 6px; }
.mine-info { flex: 1; min-width: 0; }
.mine-name {
    display: block;
    font-size: 15px;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mine-name:hover { color: #b8860b; }
.mine-url {
    display: block;
    font-size: 12.5px;
    color: #a5a5a5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mine-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mine-ops form { display: inline; }

/* ================= 背景图层（壁纸） ================= */
body.has-bg .topbar {
    background: #fff;               /* 不透明：贴了壁纸后顶栏纯白，不再透出背景 */
}
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.bg-img {
    position: absolute;
    inset: -48px;              /* 外扩一点，避免模糊后四周露白边 */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}
.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.bg-layer.is-video .bg-video { display: block; }
.bg-layer.is-video .bg-img { display: none; }
.bg-mask {
    position: absolute;
    inset: 0;
    background: #0b1220;
    opacity: 0;
    transition: opacity .25s;
}

/* ---------- 齿轮按钮 ---------- */
.gear-btn {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 1000;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: #ffd60a;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
    transition: transform .25s ease, box-shadow .25s ease, background .2s ease;
}
.gear-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
.gear-btn svg { transition: transform .35s ease; }
.gear-btn:hover svg { transform: rotate(60deg); }
.gear-btn.is-open { background: #ffd60a; }
.gear-btn.is-open svg { transform: rotate(90deg); }

/* ================= 右侧设置面板：左图标栏 + 内容 ================= */
.pane {
    position: fixed;
    right: 26px;
    bottom: 92px;
    z-index: 1001;
    width: 430px;
    height: 472px;
    display: flex;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .22), 0 2px 8px rgba(15, 23, 42, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .24s cubic-bezier(.22, .9, .3, 1), visibility .2s;
}
.pane.open { opacity: 1; visibility: visible; transform: none; }

.pane-rail {
    flex: 0 0 74px;
    width: 74px;
    background: #f4f5f7;
    border-right: 1px solid #eceef1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    overflow-y: auto;
}
.pane-rail::-webkit-scrollbar { width: 0; }
.rail-item {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    border-radius: 13px;
    color: #98a2ae;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s;
}
.rail-item:hover { background: #e9ebef; color: #5c6673; }
.rail-item.active { background: #ffeadd; color: #f0821e; }

.pane-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px 6px;
}
.pane-title { font-size: 15.5px; font-weight: 700; color: #111; }
.pane-x {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: #9aa3ad;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.pane-x:hover { background: #f2f3f5; color: #333; }

.pane-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.pane-sec { display: none; }
.pane-sec.active { display: block; }

.pane-sub-title { font-size: 12.5px; color: #98a2ae; font-weight: 600; margin: 16px 0 6px; }
.pane-sec .pane-sub-title:first-child { margin-top: 6px; }
.pane-hint { font-size: 12.5px; color: #98a2ae; line-height: 1.8; margin: 10px 0 0; }

.prow { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.prow-label { flex: 1; min-width: 0; font-size: 14px; color: #2b3138; }
.prow-val { font-size: 12px; color: #9aa3ad; min-width: 20px; text-align: right; }

.psw { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.psw input { position: absolute; opacity: 0; width: 0; height: 0; }
.pslider {
    position: absolute;
    inset: 0;
    background: #d9dee4;
    border-radius: 13px;
    transition: background .2s;
}
.pslider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s;
}
.psw input:checked + .pslider { background: #4bbf56; }
.psw input:checked + .pslider::before { transform: translateX(20px); }
.psw input:focus-visible + .pslider { box-shadow: 0 0 0 3px rgba(75, 191, 86, .25); }

.pcolor {
    width: 46px;
    height: 28px;
    padding: 0;
    border: 1px solid #e3e6ea;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.prow-slider { flex-wrap: wrap; }
.prow-slider .prow-label { flex: 0 0 100%; padding-bottom: 2px; }
.prow-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #e3e6ea;
    outline: none;
}
.prow-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #4a90e2;
    cursor: pointer;
}
.prow-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #4a90e2;
    cursor: pointer;
}

.bg-preview {
    height: 152px;
    border-radius: 14px;
    background: #e9eef4 center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eef1f4;
}
.bg-preview-tip { font-size: 12.5px; color: #8c99a8; }
.bg-preview.has-img .bg-preview-tip { display: none; }
.bg-preview.is-video { background: #10151c; color: #cfd8e3; }
.bg-preview.is-video .bg-preview-tip { display: block; color: #cfd8e3; }

.bg-btns { display: flex; gap: 10px; margin: 12px 0 2px; }
.pbtn {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    background: #f1f3f5;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s;
}
.pbtn:hover { background: #e9ecef; }
.pbtn-main { background: #4a90e2; color: #fff; }
.pbtn-main:hover { background: #3b7fd0; }

.pane-urlrow { display: flex; gap: 8px; }
.pane-urlrow input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    outline: none;
}
.pane-urlrow input:focus { border-color: #4a90e2; }
.pane-urlrow .pbtn { flex: 0 0 auto; height: 38px; padding: 0 14px; }

/* 上传区（点击选择文件） */
.wp-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 30px 16px;
    border-radius: 14px;
    background: #f5f6f8;
    color: #8c99a8;
    cursor: pointer;
    text-align: center;
    transition: background .18s;
}
.wp-drop:hover { background: #eef0f3; }
.wp-drop b { font-size: 16px; font-weight: 600; color: #3a424b; }
.wp-drop span { font-size: 12.5px; line-height: 1.6; }

/* 壁纸网格 */
.wp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.wp-grid:not(:first-child) { margin-top: 12px; }
.wp-item {
    position: relative;
    padding: 0;
    height: 104px;
    border: 0;
    border-radius: 12px;
    background: #eef1f4 center center / cover no-repeat;
    cursor: pointer;
    overflow: hidden;
    transition: transform .16s, box-shadow .16s;
}
.wp-item:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .16); }
.wp-item.active { box-shadow: 0 0 0 3px #2f7cf6; }
/* 缩略图底部的名称：白色字 + 底部渐变压暗，任何壁纸上都显眼 */
.wp-item .wp-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 20px 8px 6px;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .58));
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    pointer-events: none;
}
.wp-item.is-video::before {
    content: '▶';
    position: absolute;
    left: 8px;
    bottom: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.wp-item.is-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wp-del {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 15px;
    line-height: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity .18s;
}
.wp-item:hover .wp-del { opacity: 1; }
.wp-lock {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 11px;
}

.pane-empty { font-size: 13px; color: #98a2ae; line-height: 1.9; padding: 18px 4px; text-align: center; }
.pane-login {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 20px;
    border-radius: 10px;
    background: #4a90e2;
    color: #fff;
    text-decoration: none;
    font-size: 13.5px;
}
.pane-login:hover { background: #3b7fd0; }

/* 分享 / 关于 */
.share-row { display: flex; gap: 10px; margin-top: 12px; }
.share-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.share-item {
    height: 40px;
    border-radius: 11px;
    background: #f1f3f5;
    color: #4a5560;
    font-size: 13.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-item:hover { background: #e9ecef; }
.share-link {
    margin-top: 12px;
    font-size: 12px;
    color: #98a2ae;
    word-break: break-all;
    min-height: 16px;
}
.about-rows { margin-top: 12px; }
.about-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed #eef0f3;
    font-size: 13.5px;
    color: #5c6673;
}
.about-row b { color: #2b3138; font-weight: 600; text-align: right; }

.pane-foot {
    max-height: 0;
    overflow: hidden;
    font-size: 12.5px;
    color: #4bbf56;
    text-align: center;
    transition: max-height .2s, padding .2s, background .2s;
}
.pane-foot.is-show { max-height: 40px; padding: 9px 12px; background: #f4fff5; }
.pane-foot.is-err { color: #d9534f; }
.pane-foot.is-err.is-show { background: #fff6f6; }

/* ================= 全屏「壁纸」选择页 ================= */
.wpsheet { position: fixed; inset: 0; z-index: 1200; display: none; }
.wpsheet.open { display: block; }
.wpsheet-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .34);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.wpsheet-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 32px));
    height: min(790px, calc(100vh - 56px));
    background: #fff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .34);
}
.wpsheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.wptop-tabs {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 22px;
    overflow-x: auto;
}
.wptop-tabs::-webkit-scrollbar { height: 0; }
.wptop {
    border: 0;
    background: transparent;
    padding: 4px 0;
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    color: #5c6673;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.wptop.active { color: #2f7cf6; }
.wpsheet-x {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #ff5459;
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
.wpsheet-x:hover { background: #ef4444; }

.wpsub-tabs {
    display: flex;
    gap: 20px;
    padding: 4px 16px 0;
    overflow-x: auto;
    border-bottom: 1px solid #f0f1f3;
}
.wpsub-tabs::-webkit-scrollbar { height: 0; }
.wpsub {
    border: 0;
    background: transparent;
    padding: 8px 0 10px;
    font-size: 14.5px;
    font-family: inherit;
    color: #5c6673;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.wpsub.active { color: #2f7cf6; font-weight: 700; border-bottom-color: #2f7cf6; }

.wpsheet-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }
.wp-pane { display: none; }
.wp-pane.active { display: block; }
.wp-wrap { display: none; }
.wp-wrap.active { display: block; }

.bing-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bing-btn {
    height: 96px;
    border: 0;
    border-radius: 12px;
    background: #2f7cf6;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .18s;
}
.bing-btn:hover { background: #2a6fe0; }
.bing-btn b { font-size: 15px; font-weight: 600; }
.bing-btn span { font-size: 13.5px; opacity: .93; }

.wpsheet-foot {
    max-height: 0;
    overflow: hidden;
    font-size: 12.5px;
    color: #4bbf56;
    text-align: center;
    transition: max-height .2s, padding .2s, background .2s;
}
.wpsheet-foot.is-show { max-height: 40px; padding: 9px 12px; background: #f4fff5; }
.wpsheet-foot.is-err { color: #d9534f; }
.wpsheet-foot.is-err.is-show { background: #fff6f6; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
    .site-header { margin-top: 36px; }
}
@media (max-width: 640px) {
    .page { padding: 0 14px; }
    .site-header { margin-top: 26px; }
    .site-title { font-size: 36px; letter-spacing: 0; }
    .site-tagline { font-size: 15px; margin-top: 4px; letter-spacing: 0; }

    /* 手机端顶栏 */
    .topbar { height: 56px; }
    .brand-logo { width: 30px; height: 30px; border-radius: 8px; }
    .brand-name { font-size: 18px; letter-spacing: 0; }
    .nav-btn { height: 33px; padding: 0 9px; font-size: 14px; gap: 5px; }
    .nav-uname { max-width: 68px; }
    .drop-menu { top: 40px; min-width: 132px; }

    .greet-bar { margin-top: 26px; gap: 10px; min-height: 30px; }
    .greet-text, .greet-time { font-size: 24px; letter-spacing: 0; }
    .greet-bar + .search-wrap { margin-top: 18px; }

    /* 手机端搜索框：深色描边 + 小圆角（对齐手机参考图） */
    .search-wrap { margin-top: 24px; }
    .search-box { height: 46px; border-radius: 8px; border-color: #3a3a3a; }
    .search-box:hover { border-color: #3a3a3a; }
    .search-box:focus-within { border-color: #3a3a3a; box-shadow: 0 0 0 3px rgba(255, 225, 0, .55); }
    .engine-select { padding: 0 6px 0 12px; }
    .engine-icon { width: 20px; height: 20px; }
    .engine-select .arrow { display: none; }
    #searchInput { font-size: 15px; padding: 0 8px 0 4px; }
    .search-btn { width: 50px; }
    .search-suggest { top: 52px; }

    /* 手机端引擎面板：两列，避免长名字被截断 */
    .engine-menu { top: 56px; padding: 14px; border-radius: 12px; }
    .engine-menu::before { left: 17px; }
    .ep-head { margin-bottom: 12px; }
    .ep-title { font-size: 14px; }
    .ep-toggle { font-size: 13px; gap: 6px; }
    .ep-switch { width: 40px; height: 22px; }
    .ep-switch::after { width: 18px; height: 18px; }
    .ep-toggle input:checked + .ep-switch::after { transform: translateX(18px); }
    .ep-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .ep-card { height: 42px; padding: 0 10px; gap: 8px; font-size: 13px; }
    .ep-icon { width: 20px; height: 20px; }

    .recent-bar { margin-top: 12px; padding-top: 10px; }

    /* 手机端标签栏：横向滚动 + 右侧固定「添加书签」 */
    .tab-bar { margin-top: 20px; gap: 8px; }
    .tabs { gap: 8px; }
    .tab-row-cat {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tab-row-cat::-webkit-scrollbar { display: none; }
    .tab { font-size: 14px; padding: 8px 13px; border-radius: 9px; }
    .tab-add { height: 34px; padding: 0 12px; font-size: 13.5px; }

    .bm-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 12.5px;
        margin-bottom: 10px;
    }
    .bm-title { font-size: 14px; }
    .bm-legend { font-size: 11.5px; }
    .bm-empty { padding: 38px 14px; font-size: 13.5px; border-radius: 12px; }
    .bm-del { opacity: 1; background: rgba(0, 0, 0, .22); width: 18px; height: 18px; font-size: 14px; }

    .modal-box { margin-top: 8vh; }
    .mine-card { padding: 18px 16px; border-radius: 14px; }
    .mine-item { gap: 9px; }
    .mine-ops .btn-ghost.sm { padding: 0 9px; }

    /* 手机端网格：6 列 App 磁贴（图标在上、名称在下） */
    .grid { grid-template-columns: repeat(6, 1fr); row-gap: 14px; column-gap: 2px; }
    .tool-item {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 6px;
        padding: 6px 0;
        font-size: 12px;
    }
    .tool-item img { width: 40px; height: 40px; border-radius: 10px; }
    .tool-item .tool-emoji { width: auto; font-size: 30px !important; line-height: 40px !important; }
    .top-grid { column-gap: 2px; row-gap: 16px; margin-top: 20px; }
    .top-item { padding: 6px 0; font-size: 12px; gap: 6px; }
    .top-grid .top-item img { width: 40px; height: 40px; border-radius: 10px; }

    .footer-links a { margin: 0 9px; }

    /* 手机端：问候 / 日期 */
    .greet-date { font-size: 14px; }

    /* 手机端：齿轮按钮缩小，面板改为底部抽屉 */
    .gear-btn { right: 16px; bottom: 18px; width: 46px; height: 46px; }
    .gear-btn svg { width: 20px; height: 20px; }
    .pane {
        left: 10px;
        right: 10px;
        bottom: 76px;
        width: auto;
        height: min(72vh, 470px);
        border-radius: 16px;
        transform-origin: bottom center;
    }
    .pane-rail { flex: 0 0 62px; width: 62px; padding: 10px 0; gap: 4px; }
    .rail-item { width: 46px; height: 46px; border-radius: 11px; }
    .pane-body { padding: 4px 14px 14px; }
    .bg-preview { height: 128px; }
    .wp-item { height: 96px; }

    /* 手机端：壁纸页铺满整屏（与参考视频一致） */
    .wpsheet-box {
        position: absolute;
        inset: 0;
        left: 0;
        top: 0;
        width: auto;
        height: auto;
        transform: none;
        border-radius: 0;
    }
    .wpsheet-head { padding: 12px 14px 0; }
    .wptop { font-size: 15px; }
    .wpsub-tabs { gap: 18px; padding: 4px 14px 0; }
    .wpsheet-body { padding: 12px 14px 18px; }
    .share-list { grid-template-columns: repeat(2, 1fr); }
}

/* ================= 极简模式（右上角开关） =================
   只保留：搜索框、问候语/时间、登录用户的「我的书签」；
   其余（大标题、置顶、最近访问、公告、分类栏、网友收藏、分类面板、页脚）全部隐藏。 */
html.mini .site-header,
html.mini .top-grid,
html.mini .recent-bar,
html.mini .announce,
html.mini .tab-bar,
html.mini #panel-share,
html.mini .site-footer {
    display: none !important;
}
/* 分类工具面板（#panel-<id>）全部隐藏，仅保留 #panel-my */
html.mini .panel:not(#panel-my) { display: none !important; }
/* 极简下让搜索框与书签更居中、留白更舒展 */
html.mini .search-wrap { margin-top: 4px; }
html.mini .greet-bar { margin-bottom: 4px; }
html.mini #panel-my { margin-top: 20px; }
