/* ===== 千舟下载器 · 全局样式 ===== */
:root {
    --bg: #060910;
    --bg-soft: #0a1019;
    --panel: #0e1622;
    --panel-2: #121c2b;
    --line: rgba(147, 170, 210, .13);
    --line-strong: rgba(147, 170, 210, .26);
    --text: #e9eef9;
    --muted: #94a3bd;
    --dim: #6d7d99;
    /* 主题色（data-accent 可切换） */
    --accent: #f2c879;
    --accent-2: #dfa54b;
    --accent-soft: #ffe4ac;
    --accent-hover: #ffe0a1;
    --on-accent: #241a08;
    --accent-deep: #a8721c;
    --accent-rgb: 242, 200, 121;
    --gold: var(--accent);
    --gold-2: var(--accent-2);
    --red: #ff6f61;
    --green: #58dfa6;
    --blue: #6fb0ff;
    /* 主题化表面色（浅色主题下重写） */
    --topbar-bg: rgba(6, 9, 16, .72);
    --pop-bg: rgba(12, 18, 28, .97);
    --toast-bg: rgba(20, 28, 42, .96);
    --card-grad: linear-gradient(180deg, rgba(22, 31, 46, .88), rgba(12, 18, 29, .92));
    --demo-bg: linear-gradient(180deg, #111a28, #0b121d);
    --sunken: rgba(5, 9, 15, .5);
    --surface-1: rgba(255, 255, 255, .02);
    --surface-2: rgba(255, 255, 255, .03);
    --surface-3: rgba(255, 255, 255, .04);
    --surface-4: rgba(255, 255, 255, .06);
    --input-bg-focus: rgba(8, 13, 21, .85);
    --option-bg: #0d1522;
    --placeholder: #4f5f79;
    --blue-hover: #a8cdff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 50px rgba(0, 0, 0, .38);
    --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ===== 主题色 ===== */
:root[data-accent="blue"] {
    --accent: #7ab8ff;
    --accent-2: #4a8fe8;
    --accent-soft: #cfe4ff;
    --accent-hover: #a8cdff;
    --on-accent: #08182b;
    --accent-deep: #1c5eb8;
    --accent-rgb: 122, 184, 255;
}
:root[data-accent="green"] {
    --accent: #58dfa6;
    --accent-2: #2fae79;
    --accent-soft: #bff5df;
    --accent-hover: #8ff0c8;
    --on-accent: #06170f;
    --accent-deep: #157a50;
    --accent-rgb: 88, 223, 166;
}
:root[data-accent="purple"] {
    --accent: #b18cff;
    --accent-2: #7d5be0;
    --accent-soft: #ded0ff;
    --accent-hover: #cbb0ff;
    --on-accent: #150a2b;
    --accent-deep: #5b3fb0;
    --accent-rgb: 177, 140, 255;
}

/* ===== 浅色主题（暖灰米色） ===== */
:root[data-theme="light"] {
    --bg: #d2cdc3;
    --bg-soft: #cbc5ba;
    --panel: #ece7dd;
    --panel-2: #e2ddd2;
    --line: rgba(72, 60, 44, .13);
    --line-strong: rgba(72, 60, 44, .24);
    --text: #2a241b;
    --muted: #675d4e;
    --dim: #857b6b;
    --shadow: 0 18px 44px rgba(60, 45, 25, .10);
    --topbar-bg: rgba(236, 231, 221, .92);
    --pop-bg: #ece7dd;
    --toast-bg: #ece7dd;
    --card-grad: linear-gradient(180deg, #f0ebe1, #e7e2d7);
    --demo-bg: linear-gradient(180deg, #e7e2d7, #ddd7cb);
    --sunken: rgba(70, 56, 36, .07);
    --surface-1: rgba(70, 56, 36, .03);
    --surface-2: rgba(70, 56, 36, .045);
    --surface-3: rgba(70, 56, 36, .06);
    --surface-4: rgba(70, 56, 36, .08);
    --input-bg-focus: #f5f0e6;
    --option-bg: #ece7dd;
    --placeholder: #9c917e;
    --blue-hover: #2f6fd0;
    --blue: #2f6fd0;
    color-scheme: light;
}
:root[data-theme="light"] body { background: var(--bg); }
:root[data-theme="light"] .bg-deco {
    background:
        radial-gradient(900px 520px at 82% -8%, rgba(var(--accent-rgb), .10), transparent 60%),
        radial-gradient(760px 460px at 8% 4%, rgba(196, 164, 116, .06), transparent 62%),
        radial-gradient(900px 620px at 50% 110%, rgba(255, 111, 97, .03), transparent 60%),
        var(--bg);
}
:root[data-theme="light"] .bg-deco::after {
    background-image:
        linear-gradient(rgba(72, 60, 44, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(72, 60, 44, .05) 1px, transparent 1px);
}
:root[data-theme="light"] select { color-scheme: light; }
:root[data-theme="light"] .user-menu-card { box-shadow: 0 16px 36px rgba(60, 45, 25, .14); }
:root[data-theme="light"] .toast { box-shadow: 0 18px 40px rgba(60, 45, 25, .16); }
:root[data-theme="light"] .alert-ok { color: #0f6b46; }
:root[data-theme="light"] .alert-err { color: #a6301f; }
:root[data-theme="light"] .notice-strip { color: #6a4a12; }
:root[data-theme="light"] .plan-expire.is-warn { color: #a06a00; }
:root[data-theme="light"] .tag-free { color: var(--muted); }
:root[data-theme="light"] .community-tag { color: var(--muted); }
:root[data-theme="light"] .footer, :root[data-theme="light"] .foot { color: var(--muted); }
:root[data-theme="light"] .code-block,
:root[data-theme="light"] .canvas-stage,
:root[data-theme="light"] .uidl-preview { color: #e9eef9; }
:root[data-theme="light"] .code-block { background: rgba(30, 26, 20, .94); }
:root[data-theme="light"] .code-block code { color: #e6ddcb; }
:root[data-theme="light"] .live-chart { background: var(--surface-1); }
:root[data-theme="light"] a { color: var(--accent-deep); }
:root[data-theme="light"] a:hover { color: var(--accent-2); }
:root[data-theme="light"] .auth-foot a,
:root[data-theme="light"] .legal-body a,
:root[data-theme="light"] .check-line a,
:root[data-theme="light"] .foot-links a:hover { color: var(--accent-deep); }
:root[data-theme="light"] .hero h1 em {
    background: linear-gradient(100deg, var(--accent-deep) 5%, var(--accent-2) 55%, var(--accent-deep) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* 浅色下的界面预览卡片：浅底深字，阴影与分隔线同步减弱 */
:root[data-theme="light"] .demo {
    color: var(--text);
    box-shadow: 0 18px 44px rgba(60, 45, 25, .14);
}
/* 浅色下的小号强调文字改用深一档的主题色，保证可读性 */
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .step-no,
:root[data-theme="light"] .pill.warn { color: var(--accent-deep); }
:root[data-theme="light"] .hero-points li::before { background: var(--accent-deep); }
:root[data-theme="light"] .pill.ok { color: #0f8a5b; }
:root[data-theme="light"] .pill.err { color: #c23a2c; }
:root[data-theme="light"] .pill.live { color: #2f6fd0; border-color: rgba(47, 111, 208, .28); }
:root[data-theme="light"] .btn-danger { color: #a6301f; }
:root[data-theme="light"] .url-check-state.is-ok,
:root[data-theme="light"] .api-method { color: #0f8a5b; }
:root[data-theme="light"] .url-check-state.is-error { color: #c23a2c; }
:root[data-theme="light"] .api-item code,
:root[data-theme="light"] .endpoint input { color: #4a3b26; }
:root[data-theme="light"] .community-like:hover,
:root[data-theme="light"] .community-tag.is-featured,
:root[data-theme="light"] .notify-badge.is-like,
:root[data-theme="light"] .notify-badge.is-tip { color: #b5382b; }
:root[data-theme="light"] .notify-badge.is-report { color: #9a6413; }
:root[data-theme="light"] .notify-badge.is-coin { color: #1f7a43; }
:root[data-theme="light"] .token-box code { color: var(--accent-2); }

/* ===== 外观 / 语言切换器 ===== */
.pref-tools { position: relative; display: inline-flex; align-items: center; }
.pref-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.pref-btn:hover { color: var(--text); border-color: var(--line-strong); }
.pref-btn-icon { display: inline-flex; color: var(--accent); }
.pref-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: 236px;
    padding: 14px;
    display: grid;
    gap: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--pop-bg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.pref-pop[hidden] { display: none; }
.pref-group { display: grid; gap: 8px; }
.pref-title { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pref-seg {
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-1);
}
.pref-opt {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.pref-opt:hover { color: var(--text); background: var(--surface-2); }
.pref-opt.is-active { color: var(--on-accent); background: linear-gradient(140deg, var(--accent-soft), var(--accent)); font-weight: 600; }
.pref-swatches { display: flex; gap: 10px; }
.pref-swatch {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
    transition: transform .15s, border-color .15s;
}
.pref-swatch:hover { transform: scale(1.08); }
.pref-swatch.is-active { border-color: var(--text); }
.swatch-gold { background: linear-gradient(145deg, #ffe2a6, #f2c879 50%, #dfa54b); }
.swatch-blue { background: linear-gradient(145deg, #cfe4ff, #7ab8ff 50%, #4a8fe8); }
.swatch-green { background: linear-gradient(145deg, #bff5df, #58dfa6 50%, #2fae79); }
.swatch-purple { background: linear-gradient(145deg, #ded0ff, #b18cff 50%, #7d5be0); }
@media (max-width: 720px) {
    .pref-btn-label { display: none; }
    .pref-btn { padding: 0 9px; }
    .pref-pop { right: auto; left: 0; width: 220px; }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); }

::selection { background: rgba(var(--accent-rgb), .3); }

/* 背景装饰 */
.bg-deco {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 82% -8%, rgba(var(--accent-rgb), .12), transparent 60%),
        radial-gradient(760px 460px at 8% 4%, rgba(90, 140, 255, .11), transparent 62%),
        radial-gradient(900px 620px at 50% 110%, rgba(255, 111, 97, .06), transparent 60%),
        var(--bg);
}
.bg-deco::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(147, 170, 210, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 170, 210, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
}

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ===== 顶栏 ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: var(--topbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--on-accent);
    background: linear-gradient(145deg, var(--accent-soft), var(--gold) 45%, var(--gold-2));
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255, 255, 255, .7);
    flex: none;
}
.brand-mark.lg { width: 54px; height: 54px; border-radius: 16px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 16px; letter-spacing: .01em; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--dim); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav-link {
    color: var(--muted);
    font-size: 14px;
    padding: 7px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-3); }
.nav-link.active { color: var(--text); background: rgba(var(--accent-rgb), .1); }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-chip {
    font-size: 13px;
    color: var(--muted);
    border: 1px solid var(--line);
    background: var(--surface-2);
    padding: 5px 11px;
    border-radius: 999px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu { position: relative; }
.user-menu > .user-chip { display: block; cursor: pointer; transition: color .15s, border-color .15s; }
.user-menu > .user-chip:hover { color: var(--text); border-color: var(--line-strong); }
.user-menu-pop {
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 60;
}
.user-menu:hover .user-menu-pop,
.user-menu:focus-within .user-menu-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-menu-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 190px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--pop-bg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
}
.user-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 13px; color: var(--muted); }
.user-menu-row b { color: var(--gold); font-size: 14px; font-weight: 600; }
.user-menu-row b.is-muted { color: var(--dim); font-weight: 500; }
.user-menu-link {
    display: block;
    padding-top: 9px;
    border-top: 1px dashed var(--line);
    font-size: 13px;
    color: var(--blue);
}
.user-menu-link:hover { color: var(--blue-hover); }
.user-menu-upgrade { width: 100%; }
.user-menu-notify { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff6f61;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
}

/* ===== 个人中心 ===== */
.me-stack { display: grid; gap: 16px; }
.me-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.me-profile { display: flex; align-items: center; gap: 14px; min-width: 0; }
.me-avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    box-shadow: 0 8px 20px rgba(var(--accent-rgb), .25);
}
.me-profile-info h2 { margin: 0 0 6px; font-size: 20px; }
.me-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--dim); }
.me-tags a { font-size: 12px; }
.me-points { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.me-points-num { display: flex; flex-direction: column; gap: 4px; }
.me-points-num > span:first-child { font-size: 12px; color: var(--dim); }
.me-points-num b { font-size: 30px; line-height: 1; color: var(--gold); font-weight: 650; }
.me-points-num .muted { font-size: 11px; }
.me-checkin { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 900px) {
    .me-grid { grid-template-columns: 1fr; }
    .me-points { width: 100%; justify-content: space-between; }
}

/* ===== 后台用户趋势 ===== */
.user-trend { margin-bottom: 18px; }
.trend-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trend-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.trend-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.trend-legend-dot { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.trend-legend-item b { color: var(--text); font-size: 14px; font-weight: 650; }
.trend-chart svg { display: block; width: 100%; height: auto; }
.trend-grid-line { stroke: rgba(147, 170, 210, .12); stroke-width: 1; }
.trend-axis { fill: var(--dim); font-size: 10px; }
.trend-empty { fill: var(--dim); font-size: 12px; }
.trend-tip { margin: 10px 0 0; font-size: 12px; }

/* ===== 实时动态 ===== */
.live-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.live-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}
.live-stat span { font-size: 12px; color: var(--dim); }
.live-stat b { font-size: 22px; font-weight: 650; color: var(--gold); line-height: 1.2; }
.live-stat small { font-size: 11px; color: var(--dim); }
.live-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.live-dot-dl { background: var(--gold); }
.live-dot-cfg { background: var(--blue); }
.live-chart {
    width: 100%;
    padding: 10px 8px 2px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--sunken);
}
.live-svg { display: block; width: 100%; height: auto; }
.lc-grid { stroke: rgba(147, 170, 210, .12); stroke-width: 1; }
.lc-axis { fill: var(--dim); font-size: 11px; }
.lc-line-dl { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc-line-cfg { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 4 3; stroke-linejoin: round; }
.lc-dot-dl { fill: var(--gold); }
.lc-dot-cfg { fill: var(--blue); }
.lc-empty { fill: var(--muted); font-size: 14px; }
.lc-empty-sub { fill: var(--dim); font-size: 11px; }
.live-tip { margin: 10px 0 0; font-size: 12px; }
@media (max-width: 760px) {
    .live-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface-3);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: transform .15s, box-shadow .15s, background .15s, border-color .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(var(--accent-rgb), .45); color: var(--text); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
    border-color: transparent;
    color: var(--on-accent);
    background: linear-gradient(140deg, var(--accent-soft), var(--gold) 48%, var(--gold-2));
    box-shadow: 0 10px 26px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255, 255, 255, .65);
}
.btn-primary:hover { color: var(--on-accent); box-shadow: 0 14px 32px rgba(var(--accent-rgb), .32); }
.btn-ghost { background: var(--surface-2); }
.btn-danger { color: #ffd5d0; border-color: rgba(255, 111, 97, .35); background: rgba(255, 111, 97, .1); }
.btn-danger:hover { border-color: rgba(255, 111, 97, .6); box-shadow: 0 10px 24px rgba(255, 111, 97, .16); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }

/* ===== 通用元素 ===== */
.card {
    background: var(--card-grad);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 26px;
}
.card-head { margin-bottom: 18px; }
.card-head h2 { font-size: 18px; margin-bottom: 4px; }
.card-head p { color: var(--muted); font-size: 13px; margin: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    background: var(--surface-2);
    white-space: nowrap;
}
.pill.ok { color: var(--green); border-color: rgba(88, 223, 166, .3); background: rgba(88, 223, 166, .08); }
.pill.err { color: var(--red); border-color: rgba(255, 111, 97, .3); background: rgba(255, 111, 97, .08); }
.pill.warn { color: var(--gold); border-color: rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .08); }
.pill.live { color: var(--blue); border-color: rgba(111, 176, 255, .3); background: rgba(111, 176, 255, .08); }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 14px;
    margin: 18px 0;
}
.alert-ok { border-color: rgba(88, 223, 166, .3); background: rgba(88, 223, 166, .07); color: #c9f7e3; }
.alert-err { border-color: rgba(255, 111, 97, .32); background: rgba(255, 111, 97, .08); color: #ffd6d1; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; margin-top: 8px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: .12em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 14px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .5); animation: pulse 2.4s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); }
    70% { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* ===== 首页 ===== */
.hero { padding: 74px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 18px; }
.hero h1 em {
    font-style: normal;
    display: block;
    background: linear-gradient(100deg, var(--accent-soft) 10%, var(--gold) 50%, var(--accent-2) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub { font-size: 16px; color: var(--muted); max-width: 540px; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; margin: 0; color: var(--dim); font-size: 13px; }
.hero-points li { display: flex; align-items: center; gap: 7px; }
.hero-points li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .8; }

.hero-visual { position: relative; }
.hero-visual::before {
    content: "";
    position: absolute;
    inset: -30px -20px;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), .16), transparent 75%);
    filter: blur(10px);
    z-index: -1;
}
.demo {
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: var(--demo-bg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}
.demo-top {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-1);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.demo-title { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.demo-top .pill { margin-left: auto; }
.demo-body { padding: 8px 16px; }
.demo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}
.demo-row:last-child { border-bottom: 0; }
.demo-row span { color: var(--muted); }
.demo-row b { font-weight: 550; font-family: var(--mono); font-size: 12.5px; }
.demo-row b.blue { color: var(--blue); }
.demo-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: var(--sunken);
    font-size: 12px;
}
.demo-foot code { color: var(--dim); letter-spacing: .06em; }
.demo-foot .pill { margin-left: auto; }

.notice-strip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    border: 1px solid rgba(var(--accent-rgb), .24);
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(var(--accent-rgb), .1), rgba(var(--accent-rgb), .02));
    color: #f6e3bd;
    font-size: 14px;
    margin-top: 10px;
}
.notice-tag {
    flex: none;
    font-size: 12px;
    color: var(--on-accent);
    background: linear-gradient(140deg, var(--accent-soft), var(--gold));
    border-radius: 999px;
    padding: 2px 10px;
    margin-top: 2px;
}

.section { padding: 56px 0; }
.section-alt { background: linear-gradient(180deg, var(--surface-1), transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 34px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.section-head p { color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature:hover { border-color: rgba(var(--accent-rgb), .28); }
.ficon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--gold);
    border: 1px solid rgba(var(--accent-rgb), .22);
    background: rgba(var(--accent-rgb), .08);
    margin-bottom: 16px;
}
.feature h3 { font-size: 16px; }
.feature p { color: var(--muted); font-size: 13.5px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); }
.step-no { font-family: var(--mono); font-size: 13px; color: var(--gold); letter-spacing: .08em; }
.steps h3 { font-size: 17px; margin: 10px 0 6px; }
.steps p { color: var(--muted); font-size: 13.5px; margin: 0; }

.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.api-list { display: grid; gap: 14px; }
.api-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-1); }
.api-item code { display: block; color: #cfe1ff; font-size: 12.5px; word-break: break-all; margin: 8px 0 6px; }
.api-item p { margin: 0; color: var(--dim); font-size: 13px; }
.api-method {
    display: inline-block;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    color: var(--green);
    border: 1px solid rgba(88, 223, 166, .3);
    background: rgba(88, 223, 166, .08);
    padding: 2px 8px;
    border-radius: 6px;
}

.code-block {
    margin: 0;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(4, 8, 14, .75);
    color: #cfe0f7;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.75;
    overflow: auto;
    tab-size: 2;
}
.code-block .cmt { color: #5d7392; }
.code-block .key { color: var(--gold); }
.code-block .str { color: #8fe0b8; }

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 38px;
    border: 1px solid rgba(var(--accent-rgb), .26);
    border-radius: 20px;
    background:
        radial-gradient(600px 200px at 90% 0%, rgba(var(--accent-rgb), .16), transparent 70%),
        var(--card-grad);
    box-shadow: var(--shadow);
}
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 6px; }
.cta-band p { margin: 0; color: var(--muted); }

/* ===== 表单 ===== */
.stack { display: grid; gap: 16px; }
.stack.narrow { max-width: 440px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 13px; color: var(--muted); }
.field small { color: var(--dim); font-size: 12px; }
.field-help { display: grid; gap: 6px; margin-top: 2px; }
.field-help p { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.6; }
.field-help .tier-pro { color: var(--gold); }
.field-help .tier-free { color: var(--muted); }
.disk-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.disk-links-label { font-size: 12px; color: var(--dim); }
.disk-lock { opacity: .5; cursor: not-allowed; }
.disk-lock em { font-style: normal; margin-left: 3px; font-size: 11px; color: var(--gold); }
.url-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.url-check-state { font-size: 12px; line-height: 1.6; color: var(--dim); min-width: 0; }
.url-check-state.is-busy { color: var(--muted); }
.url-check-state.is-ok { color: #58dfa6; }
.url-check-state.is-warn { color: var(--gold); }
.url-check-state.is-error { color: #ff6f61; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field-wide { grid-column: 1 / -1; }
.field-actions { justify-content: flex-end; }

input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--sunken);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus {
    border-color: rgba(var(--accent-rgb), .6);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
    background: var(--input-bg-focus);
}
input:disabled { opacity: .6; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; color-scheme: dark; }
select option, select optgroup { background-color: var(--option-bg); color: var(--text); }
textarea { resize: vertical; min-height: 92px; }

/* ===== 登录 / 注册 ===== */
.auth-wrap { display: grid; place-items: center; padding: 56px 20px 70px; min-height: calc(100vh - 300px); }
.auth-card { width: min(440px, 100%); padding: 32px; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand-mark { margin-bottom: 14px; }
.auth-head h1 { font-size: 24px; margin-bottom: 4px; }
.auth-head p { color: var(--muted); font-size: 13px; margin: 0; }
.auth-card .alert { margin-top: 0; }
.auth-foot { text-align: center; color: var(--dim); font-size: 13px; margin: 18px 0 0; }
.auth-foot a { color: var(--gold); }

/* ===== 用户面板 ===== */
.page { min-height: 60vh; }
.app-wrap { padding-top: 34px; padding-bottom: 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.head-actions { display: flex; gap: 10px; flex-shrink: 0; }

.tabs { display: inline-flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-1); margin-bottom: 22px; }
.tab { padding: 8px 18px; border-radius: 999px; color: var(--muted); font-size: 13.5px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--on-accent); background: linear-gradient(140deg, var(--accent-soft), var(--gold)); font-weight: 600; }

.config-form { display: grid; gap: 18px; }
.form-card { padding: 24px 26px; }
.save-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--pop-bg);
    position: sticky;
    bottom: 16px;
    backdrop-filter: blur(10px);
    z-index: 5;
}
.save-bar .muted { font-size: 13px; }

.token-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--sunken); }
.token-box code { color: var(--gold); font-size: 13px; letter-spacing: .03em; word-break: break-all; }
.token-box .btn:first-of-type { margin-left: auto; }

.endpoint-list { display: grid; gap: 10px; margin-top: 14px; }
.endpoint { display: flex; align-items: center; gap: 10px; }
.endpoint input { flex: 1; font-family: var(--mono); font-size: 12.5px; color: #cfe0f7; }
.split-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.split-actions .muted { font-size: 13px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed rgba(147, 170, 210, .1); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 550; }

/* ===== 管理后台 ===== */
.admin-grid { display: grid; grid-template-columns: 218px 1fr; gap: 22px; padding-top: 30px; padding-bottom: 60px; align-items: start; }
.side { position: sticky; top: 92px; padding: 18px 14px; }
.side-head { font-size: 12px; letter-spacing: .12em; color: var(--dim); padding: 4px 10px 12px; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.side-link { display: block; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; }
.side-link:hover { color: var(--text); background: var(--surface-3); }
.side-link.active { color: var(--gold); background: rgba(var(--accent-rgb), .1); }
.admin-main { min-width: 0; display: grid; gap: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.stat b { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }

.create-box { padding: 0; overflow: hidden; }
.create-box summary { list-style: none; cursor: pointer; padding: 16px 22px; display: flex; align-items: center; gap: 12px; }
.create-box summary::-webkit-details-marker { display: none; }
.create-box summary span { font-weight: 600; }
.create-box summary i { font-style: normal; color: var(--dim); font-size: 12.5px; }
.create-box summary::after { content: "+"; margin-left: auto; color: var(--gold); font-size: 18px; transition: transform .2s; }
.create-box[open] summary::after { transform: rotate(45deg); }
.create-box form { padding: 4px 22px 22px; border-top: 1px solid var(--line); padding-top: 20px; }

.list-card { padding: 22px 0 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0 24px 16px; }
.list-head h2 { font-size: 17px; margin: 0; }
.search { display: flex; gap: 8px; }
.search input { width: 190px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    font-weight: 550;
    font-size: 12px;
    letter-spacing: .05em;
    color: var(--dim);
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    background: var(--surface-1);
}
.table td { padding: 13px 14px; border-bottom: 1px solid rgba(147, 170, 210, .08); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-1); }
.table td small { display: block; font-size: 12px; }
.ta-r { text-align: right; }
.empty { text-align: center; color: var(--dim); padding: 30px 0 !important; }
.actions { white-space: nowrap; }
.actions > * { vertical-align: middle; }
.actions .btn { margin-left: 4px; }
form.inline { display: inline; }

.danger-zone { border-color: rgba(255, 111, 97, .25); }

/* ===== 下载器生成 ===== */
.quota-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--sunken);
    margin-bottom: 18px;
    font-size: 13.5px;
}
.quota-line b { font-size: 20px; color: var(--gold); font-weight: 650; line-height: 1.2; }
.builder-form .split-actions { margin-top: 18px; }
.url-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dim);
    font-size: 12.5px;
}
.tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; }
.stat-text { font-size: 18px !important; }
.plan-hint { margin-top: 14px; font-size: 13px; }

/* ===== 专业版会员 ===== */
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }
.plan-title { font-size: 22px; margin: 8px 0 4px; }
.plan-expire {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-1);
    min-width: 180px;
}
.plan-expire b { color: var(--gold); font-size: 15px; font-weight: 600; }
.plan-expire span:first-child { font-size: 12px; color: var(--dim); }
.plan-expire span.muted { font-size: 12px; }
.member-actions { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.member-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-form label { font-size: 13px; color: var(--muted); }
.member-form input { width: 110px; }

/* ===== 页脚 / 提示 ===== */
.foot { border-top: 1px solid var(--line); margin-top: 20px; padding: 22px 0; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: 12.5px; }
.foot-dim { opacity: .7; }

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    padding: 11px 18px;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb), .35);
    background: var(--toast-bg);
    color: var(--text);
    font-size: 13.5px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { border-color: rgba(255, 111, 97, .4); }

/* ===== 响应式 ===== */
@media (max-width: 1020px) {
    .hero-grid { grid-template-columns: 1fr; gap: 38px; }
    .hero { padding-top: 50px; }
    .demo { transform: none; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .api-grid { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .side { position: static; }
    .side-nav { display: flex; flex-wrap: wrap; }
    .side-link { padding: 7px 12px; }
    .side-head { padding-bottom: 8px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .topbar-inner { gap: 12px; flex-wrap: wrap; padding: 10px 0; }
    .nav { display: none; }
    .brand-text i { display: none; }
    .user-chip { display: none; }
    .hero h1 { font-size: 34px; }
    .hero-points { gap: 14px; }
    .feature-grid, .steps, .field-grid { grid-template-columns: 1fr; }
    .section { padding: 42px 0; }
    .card, .form-card { padding: 20px; }
    .create-box { padding: 0; }
    .list-head { padding: 0 18px 14px; }
    .search { width: 100%; }
    .search input { flex: 1; width: auto; }
    .table th, .table td { padding: 10px 12px; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 26px; }
    .auth-card { padding: 24px; }
    .tabs { width: 100%; overflow-x: auto; }
    .tab { flex: 1; text-align: center; white-space: nowrap; }
    .save-bar { position: static; }
    .endpoint { flex-wrap: wrap; }
    .endpoint input { flex-basis: 100%; order: 3; }
    .page-head { flex-direction: column; }
    .url-cell { max-width: 150px; }
    .plan-expire { text-align: left; width: 100%; }
}

/* ===== 在线支付 ===== */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 4px;
}
.plan-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}
.plan-card-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.plan-card-head p { margin: 0; font-size: 13px; }
.plan-price {
    font-size: 30px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--gold);
}
.plan-price small { font-size: 15px; font-weight: 500; margin-right: 2px; }
.plan-buy { display: grid; gap: 10px; margin-top: auto; }
.plan-buy .btn { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

.filter-links { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { color: var(--gold); border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .08); }
.plan-form-wrap { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.plan-form-wrap h3 { font-size: 15px; margin-bottom: 14px; }
.trade-no { display: block; margin-top: 6px; font-size: 11.5px; }

/* 收银台 */
.pay-wrap { max-width: 780px; }
.pay-card { padding: 30px 26px; text-align: center; }
.pay-order-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pay-amount {
    font-size: 36px;
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--gold);
}
.pay-qr-box {
    display: grid;
    place-items: center;
    width: 260px;
    height: 260px;
    margin: 20px auto 14px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.pay-qr-box img,
.pay-qr-box canvas { display: block; width: 240px; height: 240px; }
.pay-tip { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.pay-tip b { color: var(--gold); font-family: var(--mono); }
.pay-done { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; }
.pay-done-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 700;
    color: #0d1a13;
    background: linear-gradient(145deg, #7bf0bf, var(--green));
    box-shadow: 0 14px 34px rgba(88, 223, 166, .28);
}
.pay-done-icon.warn {
    color: var(--on-accent);
    background: linear-gradient(145deg, var(--accent-soft), var(--gold));
    box-shadow: 0 14px 34px rgba(var(--accent-rgb), .26);
}
.pay-card .kv { max-width: 420px; margin: 0 auto; text-align: left; }
.pay-card .split-actions { justify-content: center; }

@media (max-width: 640px) {
    .plan-grid { grid-template-columns: 1fr; }
    .pay-wrap { max-width: none; }
    .pay-qr-box { width: 236px; height: 236px; }
    .pay-qr-box img,
    .pay-qr-box canvas { width: 216px; height: 216px; }
}

/* ===== 下载中心 ===== */
.dl-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 24px 26px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(130% 180% at 0% 0%, rgba(var(--accent-rgb), .1), transparent 58%),
        var(--panel);
}
.dl-hero h2 { font-size: 24px; margin: 10px 0 6px; }
.dl-hero p { margin: 0; font-size: 13.5px; }
.dl-hero-stat {
    display: grid;
    gap: 4px;
    text-align: right;
    min-width: 170px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-1);
}
.dl-hero-stat span { font-size: 12px; color: var(--dim); }
.dl-hero-stat b { font-size: 20px; font-weight: 650; color: var(--gold); line-height: 1.3; }

/* 下载器设计器 */
.dl-design {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 30px 34px;
    align-items: stretch;
    margin-bottom: 22px;
    padding: 26px 28px;
}
.dl-preview {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--sunken);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
}
.dl-preview-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}
.dl-preview-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}
.dl-preview-bar i:first-child { background: rgba(255, 111, 97, .55); }
.dl-preview-bar i:nth-child(2) { background: rgba(var(--accent-rgb), .55); }
.dl-preview-bar i:nth-child(3) { background: rgba(88, 223, 166, .55); }
.dl-preview-bar span {
    margin-left: 6px;
    font-size: 12px;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-preview-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 24px;
    text-align: center;
}
.dl-preview-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(var(--accent-rgb), .3);
    background: rgba(var(--accent-rgb), .1);
    color: var(--gold);
}
.dl-preview-name { font-size: 16px; }
.dl-preview-url {
    max-width: 100%;
    margin: 0;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-preview-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12.5px;
    color: var(--muted);
}
.dl-preview-stats b { color: var(--text); font-weight: 600; }
.dl-preview-track {
    width: 100%;
    height: 6px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--surface-4);
    overflow: hidden;
}
.dl-preview-track i {
    display: block;
    width: 68%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(111, 176, 255, .8), var(--gold));
}
.dl-preview-stage { margin: 0; font-size: 12px; color: var(--dim); }
.dl-design-main { min-width: 0; display: flex; flex-direction: column; }
.dl-design-main .card-head { margin-bottom: 16px; }
.dl-design-main .split-actions { margin-top: 16px; }
.dl-gen-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.dl-generate-btn { width: 100%; justify-content: center; }
.dl-gen-wrap p { margin: 0; font-size: 12px; line-height: 1.6; }

@media (max-width: 860px) {
    .dl-design { grid-template-columns: 1fr; gap: 24px; }
    .dl-preview { min-height: 220px; }
}
@media (max-width: 680px) {
    .dl-hero { padding: 20px; }
    .dl-hero-stat { width: 100%; text-align: left; }
    .dl-design { padding: 20px; }
}

/* 下载器外观设计器 */
.uidl-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    gap: 22px;
    align-items: start;
}
.uidl-stage {
    position: sticky;
    top: 24px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--sunken);
}
.uidl-stage-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.uidl-stage-head b { font-size: 14px; }
.uidl-stage-head span { font-size: 12px; color: var(--dim); }
.uidl-stage-head .uidl-state {
    margin-left: auto;
    padding: 5px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface-3);
    color: var(--text);
    font-size: 12px;
}
.uidl-win {
    --dl-accent: #caa02d;
    --dl-accent-dark: #a68022;
    --dl-bar1: #16baa4;
    --dl-bar2: #0f76dc;
    --dl-banner1: #0e4c8a;
    --dl-banner2: #123b6b;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafc;
    color: #20242c;
    font-size: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.uidl-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 16px;
    background: linear-gradient(118deg, var(--dl-banner1), var(--dl-banner2));
}
.uidl-badge {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: 1px solid var(--dl-accent-dark);
    border-radius: 9px;
    background: var(--dl-accent);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}
.uidl-headtext { min-width: 0; }
.uidl-headtext b {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uidl-headtext i {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uidl-body { padding: 12px 16px 16px; }
.uidl-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.uidl-row > span:first-child { color: #5c6676; flex: none; }
.uidl-fake-input {
    flex: 1;
    min-width: 0;
    padding: 4px 7px;
    overflow: hidden;
    border: 1px solid #cdd4e0;
    border-radius: 3px;
    background: #fff;
    color: #333a45;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uidl-fake-btn {
    flex: none;
    padding: 4px 10px;
    border: 1px solid #cdd4e0;
    border-radius: 3px;
    background: #f4f6fa;
    color: #20242c;
}
.uidl-status { margin-bottom: 8px; color: #6e737d; }
.uidl-track {
    position: relative;
    height: 22px;
    overflow: hidden;
    border: 1px solid #cdd4e0;
    border-radius: 11px;
    background: linear-gradient(#f0f3f8, #e1e6ee);
}
.uidl-track i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 68%;
    background: linear-gradient(90deg, var(--dl-bar1), var(--dl-bar2));
}
.uidl-track b {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.uidl-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 10px; }
.uidl-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.uidl-btns label { display: flex; align-items: center; gap: 5px; }
.uidl-btn {
    padding: 6px 12px;
    border: 1px solid #cdd4e0;
    border-radius: 4px;
    background: #f4f6fa;
    color: #20242c;
}
.uidl-btn.primary {
    border-color: var(--dl-accent-dark);
    background: var(--dl-accent);
    color: #fff;
    font-weight: 600;
}
.uidl-hint { margin: 14px 0 0; color: var(--dim); font-size: 12px; line-height: 1.6; }
.uidl-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.uidl-form .form-card { padding: 20px 22px; }
.uidl-form .save-bar { margin-top: 0; }

@media (max-width: 1180px) {
    .uidl-layout { grid-template-columns: 1fr; }
    .uidl-stage { position: static; }
}
@media (max-width: 680px) {
    .uidl-stage { padding: 14px; }
    .uidl-form .form-card { padding: 18px; }
}

/* 画板设计 */
.uidl-canvas { margin-top: 22px; padding: 22px; position: relative; }
.uidl-canvas .card-head { margin-bottom: 16px; }
.canvas-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}
.canvas-main { min-width: 0; }
.canvas-size-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}
.canvas-size-row .canvas-field { flex: 0 0 110px; }
.canvas-size-row .muted { padding-bottom: 8px; font-size: 11px; }
.canvas-chrome-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    font-size: 12px;
    color: var(--dim);
    cursor: pointer;
    white-space: nowrap;
}
.canvas-chrome-toggle input { accent-color: var(--accent); }
.canvas-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.canvas-spacer { flex: 1; }
.canvas-state { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.canvas-state select {
    padding: 5px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface-3);
    color: var(--text);
}
.canvas-viewport {
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0, 0, 0, .18);
}
.canvas-stage-wrap { position: relative; display: inline-block; line-height: 0; }
.canvas-stage {
    position: relative;
    width: 1053px;
    height: 680px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
    user-select: none;
    touch-action: none;
}
.canvas-stage.is-transparent {
    background-color: #0f131b;
    background-image: repeating-conic-gradient(rgba(255, 255, 255, .08) 0% 25%, transparent 0% 50%);
    background-size: 18px 18px;
}
.canvas-el {
    position: absolute;
    display: flex;
    box-sizing: border-box;
    padding: 0 4px;
    overflow: hidden;
    line-height: 1.2;
    white-space: nowrap;
    cursor: move;
}
.canvas-el.is-selected { outline: 1px dashed rgba(255, 255, 255, .9); outline-offset: 1px; }
.canvas-stage-resizer {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    z-index: 40;
    cursor: nwse-resize;
    border-right: 2px solid rgba(var(--accent-rgb), .9);
    border-bottom: 2px solid rgba(var(--accent-rgb), .9);
    border-radius: 0 0 4px 0;
    background: linear-gradient(135deg, transparent 52%, rgba(var(--accent-rgb), .55) 52%, rgba(var(--accent-rgb), .55) 62%, transparent 62%);
    touch-action: none;
}
.canvas-el-title, .canvas-el-subtitle, .canvas-el-text { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.canvas-el-notice { white-space: pre-wrap; overflow: hidden; line-height: 1.5; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.canvas-el-progress { padding: 0; overflow: hidden; background: rgba(255, 255, 255, .22); }
.canvas-el-progress i { position: absolute; top: 0; bottom: 0; left: 0; }
.canvas-el-progress b {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.canvas-el-image { padding: 0; }
.canvas-el-image.is-empty {
    background: var(--surface-3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.canvas-el-image .canvas-el-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
}
.canvas-handle {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #3b82f6;
    cursor: nwse-resize;
}
.canvas-bg-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 14px;
}
.canvas-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); }
.canvas-field select,
.canvas-field input[type="text"],
.canvas-field input[type="number"] {
    padding: 6px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface-3);
    color: var(--text);
    font-size: 13px;
}
.canvas-field input[type="number"] { width: 100%; }
.canvas-inline { display: flex; align-items: center; gap: 6px; }
.canvas-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.canvas-editing-name {
    margin: 0;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    font-size: 12px;
    color: var(--muted);
    word-break: break-all;
}
.canvas-editing-name b { display: block; margin-top: 4px; font-size: 13px; color: var(--text); }
.canvas-editing-name span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.canvas-inspector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--pop-bg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
    position: fixed;
    top: 96px;
    right: 16px;
    width: 280px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 80;
    line-height: 1.45;
}
.canvas-inspector .muted { margin: 0; font-size: 12px; }
@keyframes canvasInspectorIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}
.canvas-img-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    background: var(--surface-2);
}
.canvas-img-upload input[type="file"] { font-size: 12px; color: var(--dim); }
.canvas-img-upload .muted { font-size: 11px; }
.canvas-prop-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.canvas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.canvas-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.canvas-check { flex-direction: row; align-items: center; gap: 6px; padding-top: 16px; }
.canvas-form { display: flex; flex-direction: column; gap: 8px; }
.canvas-import { padding-top: 10px; border-top: 1px dashed var(--line); }
.canvas-share-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.canvas-share-code { letter-spacing: 1px; color: var(--gold); font-family: monospace; }
.scheme-list { display: flex; flex-direction: column; gap: 8px; }
.scheme-item { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.scheme-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.scheme-meta b { font-size: 13px; }
.scheme-meta .muted { font-size: 11px; }
.scheme-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.scheme-actions form { margin: 0; }
.scheme-float {
    position: fixed;
    top: 96px;
    left: 16px;
    width: 250px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--pop-bg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
    line-height: 1.45;
    animation: canvasInspectorIn .16s ease-out;
}
.scheme-float.is-collapsed { display: none; }
.scheme-float-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scheme-float-toggle { padding: 2px 4px; border: 0; background: none; color: var(--dim); font-size: 12px; cursor: pointer; }
.scheme-float-toggle:hover { color: var(--text); }
.scheme-float-open {
    position: fixed;
    top: 96px;
    left: 8px;
    z-index: 80;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--pop-bg);
    color: var(--gold);
    font-size: 12px;
    line-height: 1;
    writing-mode: vertical-rl;
    letter-spacing: 2px;
    cursor: pointer;
}

/* ===== UI 社区 ===== */
.community-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.community-balance {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(var(--accent-rgb), .05);
}
.community-balance span { font-size: 12px; color: var(--dim); }
.community-balance b { font-size: 20px; color: var(--gold); font-weight: 650; }
.community-balance .wallet-cell { display: flex; align-items: baseline; gap: 6px; }
.community-tip { border-top: 1px dashed var(--line); padding-top: 8px; }
.community-tip > summary { cursor: pointer; list-style: none; font-size: 12.5px; color: var(--muted); }
.community-tip > summary::-webkit-details-marker { display: none; }
.community-tip > summary:hover { color: var(--text); }
.community-tip form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.community-tip-row { display: flex; gap: 8px; }
.community-tip-row input[type="number"] { width: 100px; padding: 7px 10px; font-size: 12.5px; }
.community-tip p { margin: 0; font-size: 12px; line-height: 1.6; }
.community-tip p a { color: var(--gold); }
.community-agent-note { margin: 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; }
.coin-pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.coin-pack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}
.coin-pack-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.coin-pack-head b { font-size: 16px; color: var(--gold); }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.community-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}
.community-preview {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 8px;
    background: #0d1016;
    box-shadow: inset 0 0 0 1px var(--line);
}
.community-stage {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    border-radius: 8px;
    transform-origin: top left;
    background-color: #191C22;
}
.community-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.community-meta .muted { font-size: 11.5px; }
.community-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.community-title b { font-size: 13.5px; }
.community-tag {
    padding: 1px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}
.community-tag.is-pro { border-color: transparent; background: linear-gradient(140deg, var(--accent-soft), var(--gold)); color: var(--on-accent); font-weight: 600; }
.community-tag.is-own { border-color: rgba(88, 160, 255, .4); background: rgba(88, 160, 255, .12); color: var(--blue-hover); }
.community-import { margin: 0; }
.community-import .btn { width: 100%; }

/* 方案点赞 */
.community-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.community-sub .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-like {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 5px;
    padding: 3px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.community-like svg { width: 13px; height: 13px; }
.community-like:hover { border-color: rgba(255, 111, 97, .5); color: #ffb0a8; }
.community-like.is-liked {
    border-color: rgba(255, 111, 97, .55);
    background: rgba(255, 111, 97, .14);
    color: #ff8a80;
    font-weight: 600;
}
.community-like.is-static { cursor: default; }
.community-like.is-static:hover { border-color: var(--line-strong); color: var(--muted); }
.community-like:disabled { opacity: .6; cursor: default; }

/* 社区工具栏：搜索 + 排序 */
.community-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
}
.community-search { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 0; }
.community-search input[type="search"] { max-width: 260px; padding: 8px 12px; font-size: 13px; }
.community-sort {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
}
.community-sort a {
    padding: 5px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    transition: color .15s, background .15s;
}
.community-sort a:hover { color: var(--text); }
.community-sort a.active { background: rgba(var(--accent-rgb), .16); color: var(--gold); font-weight: 600; }

/* 精选标签 */
.community-tag.is-featured {
    border-color: rgba(255, 111, 97, .45);
    background: rgba(255, 111, 97, .12);
    color: #ffb0a8;
}

/* 举报折叠面板 */
.community-report { border-top: 1px dashed var(--line); padding-top: 8px; }
.community-report > summary {
    cursor: pointer;
    color: var(--dim);
    font-size: 12px;
    list-style: none;
    user-select: none;
}
.community-report > summary::-webkit-details-marker { display: none; }
.community-report > summary:hover { color: var(--muted); }
.community-report form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.community-report select,
.community-report input[type="text"] { padding: 7px 10px; font-size: 12.5px; }

/* 分页 */
.community-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.community-pager .muted { font-size: 12.5px; }
.community-pager-links { display: flex; gap: 8px; }

/* 导航未读角标 */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    margin-left: 5px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff6f61;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    vertical-align: 1px;
}
.tab.active .tab-badge { background: var(--on-accent); color: var(--accent-soft); }

/* 社区「我点赞的」筛选 */
.community-liked-filter.active {
    border-color: rgba(255, 111, 97, .45);
    background: rgba(255, 111, 97, .12);
    color: #ffb0a8;
}

/* 站内通知列表 */
.notify-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notify-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-1);
}
.notify-item.is-unread { border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .05); }
.notify-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}
.notify-badge.is-like { border-color: rgba(255, 111, 97, .45); color: #ffb0a8; }
.notify-badge.is-import { border-color: rgba(88, 160, 255, .4); color: var(--blue-hover); }
.notify-badge.is-report { border-color: rgba(255, 190, 92, .45); color: #ffd08a; }
.notify-badge.is-feature { border-color: transparent; background: linear-gradient(140deg, var(--accent-soft), var(--gold)); color: var(--on-accent); font-weight: 600; }
.notify-badge.is-tip { border-color: rgba(255, 111, 97, .45); color: #ffb0a8; }
.notify-badge.is-creation { border-color: rgba(var(--accent-rgb), .45); color: var(--gold); }
.notify-badge.is-coin { border-color: rgba(120, 200, 140, .45); color: #9ee0b3; }
.notify-body { flex: 1; min-width: 0; }
.notify-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.notify-title b { font-size: 13.5px; }
.notify-title time { font-size: 12px; white-space: nowrap; }
.notify-body p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; word-break: break-word; }
.notify-item > .btn { align-self: center; flex: none; }
@media (max-width: 680px) {
    .notify-item { flex-wrap: wrap; }
    .notify-item > .btn { margin-left: 54px; }
}

@media (max-width: 1180px) {
    .canvas-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .uidl-canvas { padding: 16px; }
}



/* ===== 法律文本与侵权投诉 ===== */
.legal { max-width: 900px; }
.legal-card { padding: 34px 38px; }
.legal-card h1 { font-size: 26px; margin-bottom: 6px; }
.legal-meta { color: var(--dim); font-size: 12.5px; margin: 0 0 22px; }
.legal-body h2 { font-size: 15.5px; margin: 26px 0 8px; color: var(--text); }
.legal-body p { color: var(--muted); font-size: 13.5px; line-height: 1.95; margin: 0 0 8px; }
.legal-body ul { color: var(--muted); font-size: 13.5px; line-height: 1.95; margin: 4px 0 10px; padding-left: 22px; }
.legal-body a { color: var(--gold); }
.legal-tip { color: var(--dim); font-size: 12.5px; line-height: 1.9; margin-top: 18px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.7; }
.check-line input { margin-top: 3px; accent-color: var(--gold); }
.check-line a { color: var(--gold); }
.foot-links { display: inline-flex; gap: 14px; }
.foot-links a { color: var(--dim); }
.foot-links a:hover { color: var(--gold); }
@media (max-width: 680px) {
    .legal-card { padding: 22px 18px; }
}

/* ===== 开发者工具遮罩 ===== */
.devtools-guard {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 9, 16, .94);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    text-align: center;
}
.devtools-guard[hidden] { display: none; }
.devtools-guard-box {
    max-width: 420px;
    padding: 28px 32px;
    border-radius: var(--radius);
    border: 1px solid rgba(147, 170, 210, .22);
    background: rgba(20, 28, 42, .97);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.devtools-guard-box b {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--accent);
}
.devtools-guard-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #94a3bd;
}
