/* ============================================================
   大呲花 AI 资源分享 — 前台样式
   风格参考：白底 / 蓝色主色 / 左侧导航 / 卡片网格
   ============================================================ */

:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eff6ff;
    --blue-line: #bfdbfe;
    --ink: #1f2937;
    --ink-2: #4b5563;
    --muted: #8b93a1;
    --line: #e9ecf2;
    --bg: #ffffff;
    --soft: #f7f9fc;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(31, 41, 55, .07);
    --ease: cubic-bezier(.22, .8, .3, 1);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font: 14px/1.7 Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------- 页面骨架 ---------- */

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    flex: 0 0 218px;
    width: 218px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--line);
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 66px;
    padding: 0 14px 0 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    flex: none;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
}

.side-toggle-btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    padding: 6px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9aa3b0;
    transition: all .2s var(--ease);
}

.side-toggle-btn:hover {
    background: var(--soft);
    color: var(--blue);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 9px;
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .28);
}

.brand-text {
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -.02em;
}

.brand-text b {
    color: var(--blue);
}

.side-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 10px;
    scrollbar-width: thin;
}

.side-scroll::-webkit-scrollbar {
    width: 5px;
}

.side-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #dbe1ea;
}

.side-cap {
    margin: 0 0 8px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .12em;
    color: var(--muted);
}

.side-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}


.chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-width: 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-2);
    font-size: 12.5px;
    text-align: left;
    transition: all .2s var(--ease);
}

.chip-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 25px;
    height: 25px;
    padding: 5px;
    border-radius: 7px;
    background: var(--soft);
    color: #94a3b8;
    transition: all .2s var(--ease);
}

.chip .chip-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-count {
    flex: none;
    min-width: 20px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 650;
    text-align: center;
    line-height: 1.6;
}

.chip:hover {
    background: var(--soft);
    color: var(--ink);
}

.chip:hover .chip-ico {
    background: var(--blue-soft);
    color: var(--blue);
}

.chip.on {
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 620;
}

.chip.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--blue);
}

.chip.on .chip-ico {
    background: var(--blue);
    color: #fff;
}

.chip.on .chip-count {
    background: rgba(37, 99, 235, .12);
    color: var(--blue);
}

.side-links {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-links a,
.side-links button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-2);
    font-size: 13px;
    text-align: left;
}

.side-links a:hover,
.side-links button:hover {
    background: var(--soft);
    color: var(--blue);
}

.side-links svg {
    width: 17px;
    height: 17px;
    flex: none;
}

.side-links .side-ico {
    display: flex;
    flex: none;
}

.side-foot {
    flex: none;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

.mainwrap {
    flex: 1;
    min-width: 0;
}

/* ---------- 顶部栏 ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 66px;
    padding: 0 30px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 8px;
    flex: none;
    white-space: nowrap;
    color: var(--ink);
    font-size: 15px;
}

.mobile-brand .brand-mark {
    width: 26px;
    height: 26px;
    padding: 6px;
    border-radius: 8px;
}

.searchbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    max-width: 560px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f3f5f9;
    color: var(--muted);
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.searchbox:focus-within {
    background: #fff;
    border-color: var(--blue-line);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

/* 搜索即时建议 */
.suggest {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 340px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}

.suggest-head {
    padding: 6px 10px 4px;
    font-size: 10.5px;
    color: var(--muted);
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}

.suggest-item:hover,
.suggest-item.active {
    background: var(--soft);
    color: var(--ink);
}

.suggest-item .sg-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-item .sg-badge {
    flex: none;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 10px;
}

.suggest-empty {
    padding: 14px 10px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.card.is-flash {
    animation: card-flash 1.4s ease;
}

@keyframes card-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    20%, 60% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .28); }
}

.searchbox svg {
    width: 17px;
    height: 17px;
    flex: none;
}

.searchbox input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
}

.searchbox input::placeholder {
    color: #a3abb8;
}

.searchbox kbd {
    flex: none;
    padding: 1px 6px;
    border: 1px solid #dfe3ea;
    border-radius: 5px;
    background: #fff;
    color: #9aa3b0;
    font: 11px/1.5 inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 550;
    white-space: nowrap;
    transition: all .2s var(--ease);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 3px 8px rgba(37, 99, 235, .18);
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-ghost {
    border-color: var(--line);
    background: #fff;
    color: var(--ink-2);
}

.btn-ghost:hover {
    border-color: var(--blue-line);
    color: var(--blue);
}

.btn-plain {
    border-color: var(--line);
    background: #fff;
    color: var(--ink-2);
}

.btn-plain:hover {
    background: var(--soft);
}


.mobile-announce {
    display: none;
    flex: none;
    width: 30px;
    height: 30px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-2);
}

.mobile-announce:hover {
    border-color: var(--blue-line);
    color: var(--blue);
}

/* ---------- 主内容 ---------- */

.content {
    max-width: 1480px;
    margin: 0 auto;
    padding: 30px 30px 60px;
}

.hero {
    margin-bottom: 26px;
}

.hero h1 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.3;
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.notice {
    margin-top: 14px !important;
    padding: 9px 14px;
    border: 1px solid #fde68a;
    border-radius: 9px;
    background: #fffbeb;
    color: #92400e !important;
    font-size: 12.5px !important;
}

/* 三张推荐卡 */
.spotlight {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.spot {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 16px 18px;
    border-radius: 14px;
    overflow: hidden;
    color: #fff;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.spot:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .18);
    color: #fff;
}

.spot-1 {
    background:
        radial-gradient(65px 65px at calc(100% - 39px) 25px, rgba(255, 255, 255, .12), transparent 72%),
        linear-gradient(120deg, #3b82f6, #2563eb 65%, #1e40af);
}

.spot-2 {
    background:
        radial-gradient(65px 65px at calc(100% - 39px) 25px, rgba(255, 255, 255, .12), transparent 72%),
        linear-gradient(120deg, #6366f1, #4f46e5 65%, #4338ca);
}

.spot-3 {
    background:
        radial-gradient(65px 65px at calc(100% - 39px) 25px, rgba(255, 255, 255, .12), transparent 72%),
        linear-gradient(120deg, #06b6d4, #0891b2 65%, #0e7490);
}

/* 装饰圆点已改为各 .spot-N 的背景层，见下方 background 定义 */

.spot-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .18);
}

.spot-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    z-index: 1;
}

.spot-txt b {
    font-size: 15px;
    font-weight: 650;
}

.spot-txt small {
    margin-top: 3px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .78);
}

.spot-arrow {
    margin-left: auto;
    z-index: 1;
    font-size: 19px;
    opacity: .85;
}

/* 应用广场 */











/* 筛选栏 */
.filterbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    background: var(--soft);
}

.tab {
    padding: 6px 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-2);
    font-size: 12.5px;
    transition: all .2s var(--ease);
}

.tab:hover {
    color: var(--blue);
}

.tab.on {
    background: #fff;
    color: var(--blue);
    font-weight: 650;
    box-shadow: 0 1px 4px rgba(31, 41, 55, .08);
}

.tab-today::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 5px;
    vertical-align: 2px;
    border-radius: 50%;
    background: #f97316;
}

.fav-chip,
.recent-chip {
    margin-bottom: 6px;
}

.recent-chip .chip-text {
    font-weight: 650;
}

.fav-chip .chip-text {
    font-weight: 650;
}

.tab-fav {
    color: #b45309;
}

.no-result {
    margin: 18px 0;
    padding: 30px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--soft);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.filter-note {
    color: var(--muted);
    font-size: 12px;
}

/* ---------- 分类与卡片 ---------- */

.sec {
    margin-bottom: 36px;
    scroll-margin-top: 84px;
}

.sec-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.sec-idx {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.sec-title {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 680;
}

.sec-desc {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.card {
    /* 流光默认色，任何卡片（含无角标卡）hover 都有明显渐变边框 */
    --tone: #3b82f6;
    --tone-soft: #dbeafe;
    --tone-deep: #1d4ed8;
    --card-fill: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 112px;
    padding: 14px 15px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    transition: border-color .22s var(--ease), transform .22s var(--ease),
        box-shadow .22s var(--ease);
}

a.card:hover,
.card.is-button:hover {
    border-color: var(--blue-line);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card.is-flat {
    background: var(--soft);
}

.card.is-button {
    cursor: pointer;
}

.card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 9px;
    background: var(--blue-soft);
    color: var(--blue);
}

.badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.is-site,
.badge.is-blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.card-title {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 620;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 11.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-more {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    opacity: 0;
    transform: translateY(-2px);
    transition: all .2s var(--ease);
    z-index: 2;
}

.card:hover .card-more,
.card-more:focus-visible {
    opacity: 1;
    transform: none;
}

/* 本地收藏星标 */
.card-fav {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 38px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 3px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    opacity: .55;
    cursor: pointer;
    transition: opacity .2s, color .2s, transform .2s;
}

.card-fav svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.card-fav:hover {
    opacity: 1;
    color: #f59e0b;
    transform: scale(1.1);
}

.card-fav.on {
    opacity: 1;
    color: #f59e0b;
}

.card-fav.on svg {
    fill: #f59e0b;
}

.card-more:hover {
    border-color: var(--blue-line);
    color: var(--blue);
}

.code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 7px 10px;
    border: 1px dashed var(--blue-line);
    border-radius: 8px;
    background: var(--blue-soft);
}

.code-val {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 650;
}

.code-hint {
    flex: none;
    color: var(--blue);
    font-size: 11px;
}

.card.is-copied .code-box {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.card.is-copied .code-val,
.card.is-copied .code-hint {
    color: #059669;
}

.state {
    padding: 60px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.foot a {
    color: var(--blue);
}

.foot a:hover {
    text-decoration: underline;
}

/* ---------- 弹窗 ---------- */

.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fade-in .2s var(--ease);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    width: min(460px, 100%);
    max-height: min(86vh, 720px);
    overflow-y: auto;
    padding: 22px 24px 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    animation: pop-in .24s var(--ease);
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}


.modal-close {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 6px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
}

.modal-close:hover {
    background: var(--soft);
    color: var(--ink);
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 11px;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 5px 12px rgba(37, 99, 235, .25);
}

.modal-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 680;
}

.modal-body {
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.8;
    word-break: break-word;
}

.modal-body p {
    margin: 0 0 10px;
}

.modal-body ul {
    margin: 4px 0 12px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 4px;
}

.modal-body .modal-url {
    display: block;
    margin: 10px 0 4px;
    padding: 9px 11px;
    border-radius: 8px;
    background: var(--soft);
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.modal-body .modal-code {
    padding: 10px 12px;
    border: 1px dashed var(--blue-line);
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
    height: 42px;
    border-radius: 10px;
    font-size: 14px;
}

/* ---------- 提示条 ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    z-index: 200;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(31, 41, 55, .93);
    color: #fff;
    font-size: 13px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: all .25s var(--ease);
}

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


/* ---------- 侧栏折叠（窄图标栏） ---------- */

.app.side-collapsed .sidebar {
    flex-basis: 68px;
    width: 68px;
}

.app.side-collapsed .brand {
    justify-content: center;
    padding: 0;
}

.app.side-collapsed .brand-link {
    display: none;
}

.app.side-collapsed .side-toggle-btn {
    width: 36px;
    height: 36px;
    padding: 9px;
}

.app.side-collapsed .side-scroll {
    padding: 14px 10px 10px;
}

.app.side-collapsed .side-cap {
    text-align: center;
    padding: 0;
    font-size: 0;
}

.app.side-collapsed .side-cap::after {
    content: ;
    display: block;
    width: 26px;
    height: 1px;
    margin: 6px auto 8px;
    background: var(--line);
}

.app.side-collapsed .chip {
    justify-content: center;
    padding: 7px 0;
}

.app.side-collapsed .chip .chip-text,
.app.side-collapsed .chip .chip-count {
    display: none;
}

.app.side-collapsed .chip-ico {
    width: 30px;
    height: 30px;
    padding: 7px;
}

.app.side-collapsed .side-links a,
.app.side-collapsed .side-links button {
    justify-content: center;
    padding: 9px 0;
}

.app.side-collapsed .side-links a span,
.app.side-collapsed .side-links button span {
    display: none;
}

.app.side-collapsed .side-links svg {
    width: 20px;
    height: 20px;
    padding: 3px;
    border-radius: 7px;
    background: var(--soft);
    box-sizing: content-box;
}

.app.side-collapsed .side-foot {
    font-size: 0;
    padding: 16px 0;
}

.app.side-collapsed .side-foot::after {
    content: ;
    display: block;
    width: 20px;
    height: 1px;
    margin: 0 auto;
    background: var(--line);
}

/* 折叠时 tooltip 更明显 */
.app.side-collapsed .chip,
.app.side-collapsed .side-links a,
.app.side-collapsed .side-links button {
    cursor: help;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1199px) {
}

@media (max-width: 959px) {
    .app {
        display: block;
    }

    .sidebar {
        position: sticky;
        top: 0;
        width: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .sidebar .brand,
    .side-toggle-btn,
    .side-foot,
    .side-cap,
    .side-links {
        display: none;
    }

    /* 手机端彻底忽略折叠态，始终用顶部横滑条 */
    .app.side-collapsed .sidebar {
        width: auto;
        flex-basis: auto;
    }

    .app.side-collapsed .side-scroll {
        padding: 0;
    }

    .app.side-collapsed .side-cap {
        font-size: 11px;
        text-align: left;
        padding: 0 10px;
    }

    .app.side-collapsed .side-cap::after,
    .app.side-collapsed .side-foot::after {
        display: none;
    }

    .app.side-collapsed .chip {
        justify-content: flex-start;
        padding: 5px 11px;
        width: auto;
    }

    .app.side-collapsed .chip-ico,
    .app.side-collapsed .chip .chip-text,
    .app.side-collapsed .chip .chip-count {
        display: none;
    }

    .side-scroll {
        padding: 0;
        overflow: visible;
    }

    .side-list {
        flex-direction: row;
        gap: 6px;
        padding: 9px 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .side-list::-webkit-scrollbar {
        display: none;
    }

    .chip {
        flex: none;
        width: auto;
        padding: 5px 11px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        font-size: 12px;
        white-space: nowrap;
    }

    .chip::before {
        display: none;
    }

    .chip-ico,
    .chip-count {
        display: none;
    }

    .chip.on {
        border-color: var(--blue);
        background: var(--blue);
        color: #fff;
    }

    .mobile-brand {
        display: flex;
    }

    .mobile-announce {
        display: grid;
        place-items: center;
    }

    .topbar {
        top: 51px;
        height: 58px;
        padding: 0 16px;
        gap: 12px;
    }

    .content {
        padding: 22px 16px 44px;
    }

    .spotlight {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .spot {
        min-height: 72px;
        padding: 12px 15px;
    }

    .sec {
        scroll-margin-top: 120px;
    }

    /* 折叠态残留时，手机端强制恢复横滑条完整高度 */
    .app.side-collapsed .sidebar .side-scroll {
        display: block;
    }

    .app.side-collapsed .side-list {
        display: flex;
        padding: 9px 16px;
        min-height: 50px;
    }

    .app.side-collapsed .side-list .chip {
        display: flex;
        align-items: center;
        min-height: 32px;
        padding: 5px 11px;
    }

    .app.side-collapsed .side-list .chip .chip-text {
        display: block;
    }
}

@media (max-width: 640px) {
    .searchbox kbd {
        display: none;
    }

    .hero h1 {
        font-size: 23px;
    }


    .tabs {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .tab {
        flex: none;
        padding: 6px 11px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card-more {
        opacity: 1;
        transform: none;
    }

    .modal {
        padding: 18px 18px 20px;
    }
}

/* ============================================================
   卡片按来源角标分色：边框 + 顶部色条 + 角标同色系
   ============================================================ */

.card.tone-quark   { --tone: #3b82f6; --tone-soft: #eff6ff; --tone-line: #bfdbfe; --tone-deep: #1d4ed8; }
.card.tone-runhub  { --tone: #8b5cf6; --tone-soft: #f5f3ff; --tone-line: #ddd6fe; --tone-deep: #6d28d9; }
.card.tone-site    { --tone: #0891b2; --tone-soft: #ecfeff; --tone-line: #a5f3fc; --tone-deep: #0e7490; }
.card.tone-bili    { --tone: #ec4899; --tone-soft: #fdf2f8; --tone-line: #fbcfe8; --tone-deep: #be185d; }
.card.tone-github  { --tone: #334155; --tone-soft: #f1f5f9; --tone-line: #cbd5e1; --tone-deep: #0f172a; }
.card.tone-other   { --tone: #64748b; --tone-soft: #f1f5f9; --tone-line: #dbe2ea; --tone-deep: #334155; }

/* 顶部色条（左侧一小段渐变，精致不张扬） */
.card[class*="tone-"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--tone-soft);
    overflow: hidden;
}

.card[class*="tone-"]::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 34px;
    height: 3px;
    border-radius: var(--radius) 0 8px 0;
    background: var(--tone);
}

/* 边框按色调走，默认淡、悬停加深 */
.card[class*="tone-"] {
    border-color: var(--tone-line);
}

a.card[class*="tone-"]:hover,
.card[class*="tone-"].is-button:hover {
    border-color: var(--tone);
}

/* 角标同色系 */
.card[class*="tone-"] .badge {
    background: var(--tone-soft);
    color: var(--tone);
}

/* 图标底色也跟着走（没图标时不生效） */
.card[class*="tone-"] .icon {
    background: var(--tone-soft);
    color: var(--tone);
}

/* 详情按钮：圆形 + 眼睛，跟随卡片色调，悬停填实色 */
.card-more {
    width: 26px;
    height: 26px;
    padding: 6px;
    border-radius: 50%;
    border-color: var(--tone-line, var(--line));
    background: var(--tone-soft, #fff);
    color: var(--tone, var(--muted));
}

.card-more:hover {
    background: var(--tone, var(--blue));
    border-color: var(--tone, var(--blue));
    color: #fff;
    box-shadow: 0 3px 8px rgba(30, 41, 55, .16);
}

/* ============================================================
   文档全文搜索：搜索模式按钮 + 结果列表
   ============================================================ */

.search-mode {
    flex: none;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s var(--ease);
}

.search-mode:hover {
    border-color: var(--blue-line);
    color: var(--blue);
}

.search-mode.on {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.docsearch {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    z-index: 40;
    width: min(720px, calc(100vw - 44px));
    max-height: min(72vh, 640px);
    overflow-y: auto;
    padding: 15px 17px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 26px 64px -26px rgba(15, 23, 42, .45);
    -webkit-overflow-scrolling: touch;
}

.docsearch::-webkit-scrollbar {
    width: 8px;
}

.docsearch::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: var(--line-strong, #d7dde7);
}

.docsearch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.docsearch-head > span {
    font-size: 13px;
    color: var(--ink-2);
    font-weight: 600;
}

.docsearch-back {
    flex: none;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    cursor: pointer;
}

.docsearch-back:hover {
    color: var(--blue);
    border-color: var(--blue-line);
}

.docsearch-list {
    display: grid;
    gap: 8px;
}

.docsearch-item {
    display: block;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.docsearch-item:hover {
    border-color: var(--blue-line);
    transform: translateX(2px);
}

.docsearch-title {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 620;
}

.docsearch-snippet {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.docsearch-snippet mark {
    padding: 0 2px;
    border-radius: 3px;
    background: #fde68a;
    color: #92400e;
}

.docsearch-empty {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

/* 深色模式下文档搜索区 */
html.dark .docsearch,
html.dark .docsearch-item,
html.dark .search-mode {
    background: var(--soft);
}

html.dark .docsearch-snippet mark {
    background: #78500c;
    color: #fde68a;
}

@media (max-width: 620px) {
    .search-mode {
        padding: 4px 7px;
        font-size: 10.5px;
    }
}

/* ============================================================
   失效卡片状态
   ============================================================ */

.card.is-dead {
    background: var(--soft);
    border-style: dashed;
    border-color: var(--line-strong);
    cursor: pointer;
}

.card.is-dead .card-title,
.card.is-dead .card-desc {
    color: var(--muted);
}

.card.is-dead .icon,
.card.is-dead .badge {
    opacity: .55;
}

.dead-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 10px;
    font-weight: 700;
}

/* 当天更新标记 */
.new-badge {
    position: absolute;
    z-index: 3;
    top: 9px;
    right: 10px;
    padding: 1px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.7;
    box-shadow: 0 2px 8px rgba(239, 68, 68, .3);
    pointer-events: none;
}

/* 有新角标时，详情按钮下移避免遮挡 */
.card.is-new:hover .card-more,
.card.is-new .card-more:focus-visible {
    top: 34px;
}

.card.is-dead .new-badge {
    top: 38px;
}

.dead-tip {
    margin: 6px 0 0;
    color: #c2410c;
    font-size: 11px;
}

html.dark .dead-badge {
    background: #7f1d1d;
    color: #fecaca;
}

html.dark .card.is-dead {
    border-color: #4b5563;
}

/* 无角标卡：统一淡蓝 */
.card.tone-none    { --tone: #3b82f6; --tone-soft: #dbeafe; --tone-line: #bfdbfe; --tone-deep: #1d4ed8; }
/* 单例角标各占一色 */
.card.tone-cyun    { --tone: #0d9488; --tone-soft: #f0fdfa; --tone-line: #99f6e4; --tone-deep: #0f766e; }
.card.tone-pan     { --tone: #4f46e5; --tone-soft: #eef2ff; --tone-line: #c7d2fe; --tone-deep: #4338ca; }
.card.tone-model   { --tone: #ea580c; --tone-soft: #fff7ed; --tone-line: #fed7aa; --tone-deep: #c2410c; }

/* 覆盖旧的纯色 hover 边框规则，让渐变边框可见 */
a.card[class*="tone-"]:not(.is-dead):hover,
.card[class*="tone-"].is-button:not(.is-dead):hover,
.card[class*="tone-"].is-flat:not(.is-dead):hover {
    border-color: transparent;
}

/* 悬停：显示当前卡片自身的色调渐变（静态渐变，不跑动画） */
.card:not(.is-dead):hover {
    border-color: transparent;
    /* 底色用 tone-line（比 tone-soft 深一档）起头，边框走 tone-deep */
    background:
        linear-gradient(140deg, var(--tone-line) 0%, var(--tone-soft) 42%, var(--card-fill) 88%) padding-box,
        linear-gradient(135deg, var(--tone-deep) 0%, var(--tone) 45%, var(--tone-deep) 100%) border-box;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

html.dark .card:not(.is-dead):hover {
    background:
        linear-gradient(140deg, rgba(255, 255, 255, .05) 0%, var(--card-fill) 46%, var(--card-fill) 100%) padding-box,
        linear-gradient(135deg, var(--tone) 0%, rgba(255, 255, 255, .18) 55%, var(--tone) 100%) border-box;
}

/* 卡片底色变量：普通白、无链接卡浅灰、深色模式走 --soft */
.card[class*="tone-"] { --card-fill: #fff; }
.card.is-flat[class*="tone-"] { --card-fill: var(--soft); }
html.dark .card[class*="tone-"] { --card-fill: var(--soft); }

/* ============================================================
   顶部推荐卡：hover 交叉扫光（复刻 70666.cn 的 scanLeft/scanRight）
   两条 30% 宽光带、±30deg 倾斜、各 2s 反向对扫
   ============================================================ */

.spot::before,
.spot::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    width: 30%;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(to right,
        rgba(255, 255, 255, .34) 0%,
        rgba(255, 255, 255, .14) 45%,
        rgba(255, 255, 255, 0) 100%);
}

.spot::before {
    left: -30%;
    transform: skewX(-30deg);
}

.spot::after {
    right: -30%;
    transform: skewX(30deg);
}

.spot:hover::before,
.spot:hover::after {
    opacity: 1;
}

.spot:hover::before {
    animation: scanLeft 2s linear infinite;
}

.spot:hover::after {
    animation: scanRight 2s linear infinite;
}

@keyframes scanLeft {
    0%   { left: -30%; }
    100% { left: 100%; }
}

@keyframes scanRight {
    0%   { right: -30%; }
    100% { right: 100%; }
}

/* 保证图标、文字、箭头始终在光带之上，并加轻阴影提升可读性 */
.spot-ico,
.spot-txt,
.spot-arrow {
    position: relative;
    z-index: 2;
}

.spot-txt b,
.spot-txt small,
.spot-arrow {
    text-shadow: 0 1px 2px rgba(8, 20, 45, .22);
}

/* ============================================================
   侧栏一二级手风琴分组
   ============================================================ */

.nav-group {
    margin-bottom: 6px;
}

.nav-group-head {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--soft);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.nav-group-head:hover {
    border-color: var(--blue-line);
}

.nav-group-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    padding: 6px;
    border-radius: 7px;
    background: #fff;
    color: var(--blue);
}

.nav-group-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group-arrow {
    flex: none;
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
    transform: rotate(-90deg);
    transition: transform .22s var(--ease);
}

.nav-group.open .nav-group-arrow {
    transform: rotate(0deg);
}

.nav-group-sub {
    display: none;
    position: relative;
    margin: 4px 0 2px 12px;
    padding-left: 10px;
}

.nav-group.open .nav-group-sub {
    display: block;
}

.nav-group-sub::before {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 6px;
    left: 0;
    width: 1px;
    background: var(--line-strong);
}

.nav-group-sub .chip {
    padding-left: 9px;
    font-size: 12.5px;
}

/* 深色模式 */
html.dark .nav-group-head {
    background: var(--soft);
}

html.dark .nav-group-ico {
    background: var(--bg);
}

/* 侧栏折叠时：只显示一级图标块 */
.app.side-collapsed .nav-group-head {
    justify-content: center;
    padding: 8px 0;
}

.app.side-collapsed .nav-group-title,
.app.side-collapsed .nav-group-arrow,
.app.side-collapsed .nav-group-sub {
    display: none;
}

.app.side-collapsed .nav-group-ico {
    width: 30px;
    height: 30px;
    padding: 7px;
}

/* 手机端横滑条：一级组变成可点标题，二级平铺 */
@media (max-width: 959px) {
    .nav-group {
        display: flex;
        align-items: center;
        flex: none;
        margin: 0;
    }

    .nav-group-head {
        width: auto;
        min-height: 32px;
        padding: 5px 10px;
        background: transparent;
        border: 1px solid var(--line);
        border-radius: 999px;
        font-size: 12px;
        font-weight: 500;
    }

    .nav-group-ico,
    .nav-group-arrow {
        display: none;
    }

    .nav-group-sub {
        display: flex !important;
        position: static;
        margin: 0 0 0 4px;
        padding: 0;
        gap: 6px;
    }

    .nav-group-sub::before {
        display: none;
    }

    .nav-group-sub .chip {
        width: auto;
        padding: 5px 10px;
    }
}

/* ============================================================
   首页提示词图片预览展示区（横版 / 竖版 · 自动滚动）
   ============================================================ */
.showcase {
    margin: 2px 0 30px;
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--soft), var(--bg));
}

.showcase-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.showcase-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
    color: var(--ink);
}

.showcase-head p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.showcase-tip {
    flex: none;
    font-size: 11.5px;
    color: var(--muted);
}

.showcase-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sc-row {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.sc-track {
    display: flex;
    width: max-content;
    animation: sc-marquee var(--sc-duration, 45s) linear infinite;
    will-change: transform;
}

.sc-row.is-reverse .sc-track {
    animation-direction: reverse;
}

/* 鼠标进入整个展示区时，所有行一起暂停；键盘聚焦卡片时同理 */
.showcase:hover .sc-track,
.showcase:focus-within .sc-track {
    animation-play-state: paused;
}

.sc-group {
    display: flex;
    flex: none;
    align-items: flex-end;
    gap: 10px;
    padding-right: 10px;
}

@keyframes sc-marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

.sc-card {
    position: relative;
    flex: none;
    width: var(--sc-w, 268px);
    height: auto;
    min-height: 150px;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .14);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.sc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .26);
}

/* 全图显示：不裁切，宽度撑满卡片，高度按原图比例自适应 */
.sc-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.sc-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    max-height: 110px;
    background: linear-gradient(180deg, transparent, rgba(6, 10, 20, .18) 30%, rgba(6, 10, 20, .82));
    pointer-events: none;
}

.sc-badges {
    position: absolute;
    z-index: 2;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.sc-badges span {
    flex: none;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    line-height: 1.45;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(6px);
}

.sc-badge-1 { background: rgba(249, 115, 22, .92); }
.sc-badge-2 { background: rgba(124, 58, 237, .92); }

.sc-shade {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 10px 9px;
    color: #fff;
}

.sc-prompt {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

.sc-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 0;
    font-size: 11px;
}

.sc-author {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sc-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #7c3aed);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
}

.sc-stat {
    display: flex;
    flex: none;
    gap: 12px;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

.sc-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sc-like {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: transform .18s ease, color .18s ease;
}

.sc-like:hover {
    color: #fca5a5;
    transform: scale(1.12);
}

.sc-like.liked {
    color: #fecaca;
}

.sc-like.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.sc-stat-item svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.showcase.is-portrait .sc-card {
    --sc-w: 208px;
}

.showcase.is-portrait .sc-shade {
    padding: 8px 10px 9px;
}

.showcase-preview {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(6, 10, 20, .9);
}

.showcase-preview img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

.showcase-preview p {
    margin: 10px 0 0;
    color: #e5e7eb;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.showcase-preview small {
    display: block;
    margin-top: 8px;
    color: #9ca3af;
}

html.dark .showcase {
    background: var(--soft);
}

@media (max-width: 640px) {
    .showcase { padding: 14px 12px; }
    .showcase-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .showcase-tip { font-size: 10.5px; }
    .showcase.is-portrait .sc-card { --sc-w: 168px; }
    .showcase:not(.is-portrait) .sc-card { --sc-w: 220px; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-track { animation: none !important; }
    .sc-row { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* ============ 提示词图片专用弹窗（左整图 / 右提示词 + 一键同款） ============ */
.sc-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
}

.sc-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .64);
    backdrop-filter: blur(6px);
}

.sc-modal-box {
    position: relative;
    width: min(1120px, 100%);
    max-height: min(90vh, 900px);
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .34);
}

.sc-modal-close {
    position: absolute;
    z-index: 4;
    top: 9px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--soft);
    color: var(--ink-2);
    cursor: pointer;
    transition: color .2s, border-color .2s, transform .2s;
}

.sc-modal-close:hover {
    color: var(--blue);
    border-color: var(--blue);
    transform: rotate(90deg);
}

.sc-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr);
    gap: 18px;
    height: min(90vh, 900px);
    padding: 46px 18px 18px;
}

.sc-modal-visual {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    padding: 12px;
    border-radius: 15px;
    background: linear-gradient(135deg, #eaf2ff, #f3f0ff);
}

.sc-modal-imgwrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    background: #e2e8f0;
    overflow: hidden;
}

.sc-modal-imgwrap img {
    display: block;
    max-width: 100%;
    max-height: min(90vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.sc-modal-imgwrap .sc-badges {
    right: auto;
    justify-content: flex-start;
}

.sc-modal-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.sc-modal-card {
    flex: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--bg);
    box-shadow: 0 6px 20px rgba(31, 41, 55, .05);
}

.sc-modal-promptcard {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.sc-modal-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sc-modal-card-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 11px;
}

.sc-modal-card-ico.is-blue { background: #eff6ff; color: #2563eb; }
.sc-modal-card-ico.is-green { background: #ecfdf5; color: #059669; }

.sc-modal-card-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
}

.sc-modal-card-title p {
    margin: 1px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.sc-copy-btn {
    flex: none;
    margin-left: auto;
    padding: 7px 17px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .26);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.sc-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(37, 99, 235, .34);
}

.sc-modal-prompt {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-top: 12px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}

.sc-gen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 11px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}

.sc-gen-btn svg {
    width: 14px;
    height: 14px;
}

.sc-gen-btn:hover {
    transform: translateY(-1px);
    background: #dbeafe;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .14);
}

.sc-gen-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

html.dark .sc-modal-visual {
    background: linear-gradient(135deg, #1e293b, #25213d);
}

html.dark .sc-modal-card-ico.is-blue { background: #1e3a8a; color: #93c5fd; }
html.dark .sc-modal-card-ico.is-green { background: #064e3b; color: #6ee7b7; }
html.dark .sc-gen-btn { background: #1e293b; border-color: #3b4a63; color: #93c5fd; }
html.dark .sc-gen-btn:hover { background: #263449; }
html.dark .sc-modal-imgwrap { background: #0f172a; }

@media (max-width: 900px) {
    .sc-modal { padding: 10px; }
    .sc-modal-box { max-height: 94vh; overflow-y: auto; }
    .sc-modal-close {
        top: 10px;
        right: 10px;
        background: var(--soft);
        border-color: var(--line);
    }
    .sc-modal-grid {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 46px 12px 12px;
    }
    .sc-modal-visual { padding: 8px; }
    .sc-modal-imgwrap img { max-height: 46vh; }
    .sc-modal-promptcard { flex: none; }
    .sc-modal-prompt { max-height: 34vh; }
}

/* ============================================================
   首页广告位（提示词图片下方）
   ============================================================ */

.ads {
    margin: 22px 0 6px;
}

.ads-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ads-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
}

.ads-label i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f472b6;
    box-shadow: 0 0 0 3px rgba(244, 114, 182, .16);
}

.ads-note {
    font-size: 11.5px;
    color: var(--muted);
}

.ads-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ad-img {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}

.ad-img img {
    display: block;
    width: 100%;
    height: 104px;
    object-fit: cover;
    transition: transform .35s var(--ease);
}

.ad-img:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.ad-img:hover img {
    transform: scale(1.035);
}

.ad-tag {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(15, 23, 42, .55);
    color: #fff;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .02em;
}

.ads-texts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.ad-text {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}

.ad-text:hover {
    border-color: var(--blue-line);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.ad-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, #a78bfa);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.ad-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-right: 18px;
}

.ad-body b {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 620;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ad-body small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ad-tag-out {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: #f1f5f9;
    color: #94a3b8;
}

html.dark .ad-text {
    background: var(--soft);
}

html.dark .ad-tag-out {
    background: rgba(148, 163, 184, .16);
    color: #94a3b8;
}

@media (max-width: 960px) {
    .ads-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ads-texts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .ads-images, .ads-texts { grid-template-columns: 1fr; }
    .ad-img img { height: 92px; }
}

/* ---------- 统一搜索结果：资源分组 ---------- */

.sp-group {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}

.sp-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 9px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
}

.sp-label b {
    padding: 1px 7px;
    border-radius: 20px;
    background: var(--blue-soft, #eff6ff);
    color: var(--blue, #2563eb);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sp-res {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.sp-res-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .18s, background-color .18s, transform .18s;
}

.sp-res-item:hover {
    border-color: var(--blue-line, #c7d9fb);
    background: var(--blue-soft, #eff6ff);
    transform: translateY(-1px);
}

.sp-res-title {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-res-sec {
    flex: none;
    font-size: 10.5px;
    color: var(--muted);
    white-space: nowrap;
}

.sp-more {
    grid-column: 1 / -1;
    font-size: 11.5px;
    color: var(--muted);
    padding: 2px 2px 0;
}

html.dark .sp-res-item {
    background: var(--surface);
    border-color: var(--line);
}

html.dark .sp-label b {
    background: rgba(96, 165, 250, .14);
    color: #93c5fd;
}

/* ---------- 资源详情层 ---------- */

.dt-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 12px;
}

.dt-sec {
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--blue-soft, #eff6ff);
    color: var(--blue, #2563eb);
    font-size: 11px;
    font-weight: 600;
}

.dt-host {
    font-size: 11.5px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.dt-kind {
    margin-left: auto;
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: .04em;
}

.dt-desc {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.78;
    color: var(--ink-2, #4b5563);
}

.dt-dead {
    margin: 0 0 12px;
    padding: 10px 13px;
    border-radius: 10px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12.5px;
    line-height: 1.7;
}

.dt-muted {
    margin: 0 0 12px;
    font-size: 12.5px;
    color: var(--muted);
}

.dt-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.dt-url-row .modal-url {
    flex: 1;
    min-width: 0;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.dt-copy {
    flex: none;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: color .18s, border-color .18s, background-color .18s;
}

.dt-copy:hover {
    color: var(--blue, #2563eb);
    border-color: var(--blue-line, #c7d9fb);
    background: var(--blue-soft, #eff6ff);
}

.dt-rel {
    margin: 16px 0 0;
    padding-top: 13px;
    border-top: 1px dashed var(--line);
}

.dt-rel-title {
    margin: 0 0 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--muted);
}

.dt-rel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dt-rel-item {
    max-width: 100%;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-2, #4b5563);
    font-family: inherit;
    font-size: 11.5px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .18s, border-color .18s, background-color .18s;
}

.dt-rel-item:hover {
    color: var(--blue, #2563eb);
    border-color: var(--blue-line, #c7d9fb);
    background: var(--blue-soft, #eff6ff);
}

.dt-wish {
    margin: 15px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.dt-wish a {
    color: var(--blue, #2563eb);
    border-bottom: 1px solid rgba(37, 99, 235, .25);
}

html.dark .dt-desc,
html.dark .dt-rel-item {
    color: #cbd5e1;
}

html.dark .dt-rel-item,
html.dark .dt-copy {
    background: #1e293b;
    border-color: #3a4759;
}

html.dark .dt-dead {
    background: rgba(194, 65, 12, .14);
    color: #fdba74;
}

@media (max-width: 640px) {
    .docsearch {
        position: fixed;
        top: 60px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 66vh;
    }
}

html.dark .docsearch {
    background: var(--surface);
    border-color: var(--line);
}

/* ---------- 本周热门（胶囊榜，最多 5 个） ---------- */

.hotbar {
    margin: 0 0 16px;
}

.hotbar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.hotbar-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink);
}

.hotbar-label i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .12);
}

.hotbar-note {
    font-size: 11px;
    color: var(--muted);
}

.hot-list {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 1px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.hot-list::-webkit-scrollbar {
    display: none;
}

.hot-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 176px;
    max-width: 268px;
    padding: 7px 13px 7px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s var(--ease), background-color .18s var(--ease),
        box-shadow .18s var(--ease);
}

.hot-item:hover {
    border-color: var(--blue-line);
    background: var(--blue-soft);
    box-shadow: 0 8px 20px -16px rgba(37, 99, 235, .55);
}

.hot-rank {
    flex: none;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f1f4f9;
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: color .18s var(--ease);
}

.hot-item:nth-child(1) .hot-rank {
    background: linear-gradient(140deg, #fb923c, #ef4444);
    color: #fff;
    box-shadow: 0 4px 10px -6px rgba(239, 68, 68, .9);
}

.hot-item:nth-child(2) .hot-rank {
    background: linear-gradient(140deg, #9aa8ba, #64748b);
    color: #fff;
}

.hot-item:nth-child(3) .hot-rank {
    background: linear-gradient(140deg, #d9b48c, #b07d4f);
    color: #fff;
}

.hot-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-count {
    flex: none;
    font-size: 10.5px;
    font-weight: 600;
    color: #ea580c;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* 分类在胶囊里不显示（保留字段，便于后续开关） */
.hot-sec {
    display: none;
}

@media (max-width: 760px) {
    .hot-item {
        flex: 0 0 auto;
        width: 210px;
        min-width: 0;
        max-width: none;
    }
}

html.dark .hot-item {
    background: var(--surface);
    border-color: var(--line);
}

html.dark .hot-item:hover {
    background: rgba(96, 165, 250, .1);
    border-color: rgba(96, 165, 250, .4);
}

html.dark .hot-rank {
    background: #1e293b;
}

html.dark .hot-rank {
    background: #1e293b;
}

/* ============================================================
   在线可跑（RunningHub 等云端工作流）
   ============================================================ */

.card-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 9px;
    color: #047857;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: .01em;
}

.card-online i {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
    animation: onlinePulse 2.6s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(16, 185, 129, .06);
    }
}

.tab-online::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 5px;
    border-radius: 50%;
    background: #10b981;
    vertical-align: 1px;
}

.dt-online {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px 2px 8px;
    border-radius: 20px;
    background: #ecfdf5;
    color: #047857;
    font-size: 11px;
    font-weight: 650;
}

.dt-online i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

/* ---------- 手机扫码带走 ---------- */

.dt-qr {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.dt-qr-code {
    flex: none;
    width: 96px;
    height: 96px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.dt-qr-code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.dt-qr-text {
    min-width: 0;
}

.dt-qr-title {
    margin: 0 0 3px;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--ink);
}

.dt-qr-desc {
    margin: 0 0 5px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
}

.dt-qr-url {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .dt-qr {
    background: #131c2b;
    border-color: #2b3646;
}

html.dark .dt-qr-code {
    background: #fff;
    border-color: #3a4759;
}

html.dark .dt-online {
    background: rgba(16, 185, 129, .14);
    color: #6ee7b7;
}

@media (max-width: 520px) {
    .dt-qr {
        gap: 11px;
        padding: 10px 11px;
    }

    .dt-qr-code {
        width: 84px;
        height: 84px;
    }
}

/* ---------- 详情层：打开独立页面 ---------- */

.dt-page-slot {
    margin: 0 0 14px;
}

.dt-page-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid var(--blue-line);
    border-radius: 11px;
    background: var(--blue-soft);
    transition: border-color .18s var(--ease), background-color .18s var(--ease),
        transform .18s var(--ease);
}

.dt-page-link:hover {
    border-color: rgba(37, 99, 235, .5);
    background: #e6efff;
    transform: translateY(-1px);
}

.dt-page-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 10px -6px rgba(37, 99, 235, .7);
}

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

.dt-page-text b {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--blue);
}

.dt-page-text em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--muted);
}

html.dark .dt-page-link {
    background: rgba(96, 165, 250, .1);
    border-color: rgba(96, 165, 250, .35);
}

html.dark .dt-page-ico {
    background: rgba(96, 165, 250, .16);
    color: #93c5fd;
    box-shadow: none;
}

html.dark .dt-page-text b {
    color: #93c5fd;
}

/* ---------- 详情层：独立页 + 分享 ---------- */

.dt-page-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.dt-page-row .dt-page-link {
    flex: 1 1 auto;
    min-width: 0;
}

.dt-share {
    flex: none;
    width: 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 4px;
    border: 1px solid var(--blue-line);
    border-radius: 11px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: .4px;
    cursor: pointer;
    transition: border-color .18s var(--ease), background-color .18s var(--ease),
        transform .18s var(--ease);
}

.dt-share:hover {
    border-color: rgba(37, 99, 235, .5);
    background: #e6efff;
    transform: translateY(-1px);
}

.dt-share svg {
    width: 17px;
    height: 17px;
}

html.dark .dt-share {
    background: rgba(96, 165, 250, .1);
    border-color: rgba(96, 165, 250, .35);
    color: #93c5fd;
}

/* ---------- 分享面板 ---------- */

.sh-wrap {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.sh-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .4);
    opacity: 0;
    transition: opacity .18s var(--ease, ease);
}

.sh-mask.on {
    opacity: 1;
}

.sh-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(420px, calc(100vw - 24px));
    margin-bottom: 20px;
    padding: 17px 16px 11px;
    border: 1px solid #e6eaf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .45);
    opacity: 0;
    transform: translate(-50%, 14px);
    transition: opacity .18s var(--ease, ease), transform .22s cubic-bezier(.2, .8, .3, 1);
}

.sh-sheet.on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.sh-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 650;
    color: var(--text, #101828);
}

.sh-sub {
    margin: 3px 0 14px;
    font-size: 11.5px;
    color: var(--muted, #8b93a1);
}

.sh-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sh-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 11px 4px 9px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: #f7f9fc;
    font-size: 11.5px;
    color: #475467;
    cursor: pointer;
    transition: background-color .16s var(--ease, ease), border-color .16s var(--ease, ease);
}

.sh-item:hover {
    background: #eef4ff;
    border-color: #dbe8ff;
}

.sh-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.sh-ico-copy {
    background: #eef2f7;
    color: #475467;
}

.sh-ico-copy svg {
    width: 17px;
    height: 17px;
}

.sh-ico-wx {
    background: #22c55e;
}

.sh-ico-wb {
    background: #f59e0b;
}

.sh-ico-qq {
    background: #3b82f6;
}

.sh-qr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    padding: 11px 12px;
    border-radius: 13px;
    background: #f7f9fc;
}

.sh-qr-code {
    flex: none;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #eef2f7;
}

.sh-qr-code svg {
    width: 52px;
    height: 52px;
}

.sh-qr-tip {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--muted, #8b93a1);
}

.sh-cancel {
    width: 100%;
    margin-top: 10px;
    padding: 11px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 13px;
    color: #667085;
    cursor: pointer;
}

.sh-cancel:hover {
    background: #f4f6fa;
}

/* 微信内置浏览器的右上角提示 */
.wx-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    padding: 14px 16px;
    background: rgba(16, 24, 40, .92);
    color: #fff;
    font-size: 13px;
    animation: wxTipIn .22s ease;
}

.wx-tip b {
    padding: 0 3px;
    font-weight: 700;
    letter-spacing: 1px;
}

.wx-tip.out {
    opacity: 0;
    transition: opacity .28s ease;
}

.wx-tip-arrow {
    position: absolute;
    top: 6px;
    right: 18px;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-bottom-color: rgba(16, 24, 40, .92);
    transform: translateY(-100%);
}

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

/* 窄屏：面板贴底、去掉圆角下沿感 */
@media (max-width: 520px) {
    .sh-sheet {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        margin-bottom: 0;
        transform: translateY(16px);
        border-radius: 18px 18px 0 0;
        border-bottom: 0;
        padding-bottom: max(11px, env(safe-area-inset-bottom));
    }

    .sh-sheet.on {
        transform: translateY(0);
    }

    .dt-share {
        width: 58px;
    }
}
