/* ==========================================================================
   FiveM 资源站 — 前台设计系统
   方向：中性深色 + 单一强调色 + 内容优先排版（参考 voidframe / 内容站审美）
   ========================================================================== */

:root {
    --bg: #eef2f7;
    --bg-subtle: #e4eaf2;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --bg-inset: #f1f5f9;
    --border: #dde4ee;
    --border-strong: #c5d0de;
    --text: #1a2332;
    --text-muted: #5c6b7e;
    --text-faint: #8b99a8;
    --primary: #3b6cf4;
    --primary-hover: #2f5ce0;
    --primary-muted: #ebf1ff;
    --primary-border: #c3d4ff;
    --success: #0d9f6e;
    --success-muted: #e6f7f0;
    --warning: #c27803;
    --danger: #dc3545;
    --danger-muted: #fdeced;
    --vip: #b45309;
    --vip-muted: #fef6e7;
    --radius: 14px;
    --radius-sm: 10px;
    --header-h: 118px;
    --container: 1180px;
    --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.05), 0 2px 8px rgba(26, 35, 50, 0.04);
    --shadow-md: 0 8px 28px rgba(26, 35, 50, 0.08);
    --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html { scroll-behavior: smooth; }

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

::selection {
    background: var(--primary-muted);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
a.link { color: var(--primary); }
a.link:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

/* -------------------------------------------------------------------------- */
/* Login Generator — 在线创建登录器                                             */
/* -------------------------------------------------------------------------- */

.launcher-builder {
    padding: 22px 0 40px;
}

.launcher-back {
    margin-bottom: 8px;
    font-size: 0.86rem;
}

.launcher-back a {
    color: var(--text-muted);
    text-decoration: none;
}

.launcher-back a:hover {
    color: var(--primary);
}

.launcher-pay-note {
    margin-bottom: 16px;
}

.launcher-edition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.launcher-edition {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 18px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    min-height: 280px;
}

a.launcher-edition:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
}

.launcher-edition.is-locked {
    opacity: 0.72;
    background: var(--bg-hover);
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}

.launcher-edition.is-flagship {
    border-color: var(--primary-border);
    background: linear-gradient(180deg, #f7f9ff 0%, #fff 42%);
}

.launcher-edition.is-standard {
    border-color: var(--border);
    background: linear-gradient(180deg, #f4fbf7 0%, #fff 42%);
}

.launcher-edition h2 {
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.launcher-edition-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.launcher-edition ul {
    margin: 0;
    padding-left: 1.1em;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.7;
}

.launcher-edition-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-inset);
    color: var(--text-muted);
}

.launcher-edition-badge.is-live {
    background: var(--primary-muted);
    color: var(--primary);
}

.launcher-edition-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.launcher-edition-price {
    font-size: 1.15rem;
    font-weight: 700;
}

.launcher-mine-jump {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.launcher-mine-jump h2 {
    font-size: 1.15rem;
    margin: 0 0 4px;
}

.launcher-mine {
    margin: 0 0 28px;
}

.launcher-mine h2 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.launcher-mine-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.launcher-mine-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.launcher-mine-card.is-expired {
    border-color: #f3c6c6;
}

.launcher-mine-card h3 {
    font-size: 1.02rem;
    margin-bottom: 4px;
}

.launcher-mine-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-end;
}

.launcher-inline-form {
    display: inline;
}

.launcher-renew {
    position: relative;
}

.launcher-renew form {
    position: absolute;
    right: 0;
    top: 110%;
    z-index: 5;
    min-width: 220px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.launcher-cycle-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.launcher-cycle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-hover);
    cursor: pointer;
}

.launcher-cycle input {
    margin-right: 4px;
}

@media (max-width: 800px) {
    .launcher-mine-card,
    .launcher-mine-actions {
        flex-direction: column;
    }
    .launcher-cycle-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .launcher-edition-grid {
        grid-template-columns: 1fr;
    }
}

.launcher-pagehead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.launcher-pagehead h1 {
    font-size: 1.55rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 6px;
}

.launcher-pagehead p {
    color: var(--text-muted);
    max-width: 62ch;
    font-size: 0.92rem;
}

.launcher-ver-line {
    margin-top: 10px;
    max-width: none !important;
    color: var(--text) !important;
    font-size: 0.88rem !important;
}

.launcher-ver-line strong {
    font-variant-numeric: tabular-nums;
}

.launcher-pagehead code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-inset);
    padding: 1px 6px;
    border-radius: 6px;
}

.launcher-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--success-muted);
    border: 1px solid #b7e8d4;
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.launcher-live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.launcher-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr);
    gap: 14px;
    align-items: start;
}

.launcher-form-panel,
.launcher-preview-panel,
.launcher-tutorial {
    margin-bottom: 0;
}

.launcher-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.launcher-toolbar .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.launcher-editor-tabs {
    display: flex;
    flex: 1;
    gap: 6px;
    margin: 0;
    padding: 4px;
    background: var(--bg-inset);
    border-radius: 12px;
}

.launcher-editor-tabs button {
    appearance: none;
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    padding: 8px 10px;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    border-radius: 9px;
}

.launcher-editor-tabs button.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.launcher-panel { display: none; }
.launcher-panel.is-active { display: block; }

.launcher-group {
    margin-bottom: 22px;
    padding-bottom: 4px;
}

.launcher-group + .launcher-group {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.launcher-group h2 {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.launcher-group-note {
    margin: -4px 0 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.launcher-grid .form-field-wide { grid-column: 1 / -1; }

.launcher-form-panel .form-field label {
    margin-bottom: 0;
}

.launcher-form-panel .form-field small {
    display: block;
    margin-top: 6px;
    color: var(--text-faint);
    font-size: 0.78rem;
}

.launcher-form-panel .req { color: var(--danger); }

.launcher-form-panel input[type="color"] {
    height: 42px;
    padding: 4px;
    cursor: pointer;
}

.launcher-preview-panel {
    position: sticky;
    top: calc(var(--header-h) + 12px);
}

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

.launcher-preview-head h2 { margin-bottom: 0; }
.launcher-preview-head span {
    color: var(--text-faint);
    font-size: 0.78rem;
}

.launcher-preview-shell {
    border-radius: 12px;
    background: #070b10;
    padding: 8px;
}

.launcher-preview-window {
    --launcher-accent: #d9f24d;
    position: relative;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(420px 220px at 88% 22%, color-mix(in srgb, var(--launcher-accent) 22%, transparent), transparent 70%),
        linear-gradient(90deg, #04080c 0%, #101923 55%, #0c141c 100%);
    overflow: hidden;
    color: #edf1eb;
}

.lp-glow {
    position: absolute;
    right: -80px;
    top: 40px;
    width: 280px;
    height: 280px;
    pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--launcher-accent) 28%, transparent), transparent 68%);
}

.launcher-preview-topbar,
.launcher-preview-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    z-index: 1;
}

.launcher-preview-topbar {
    border-bottom: 3px solid var(--launcher-accent);
    background: linear-gradient(90deg, color-mix(in srgb, var(--launcher-accent) 18%, #080c12) 0%, #080c12 28%, rgba(8, 12, 18, 0.92) 100%);
    box-shadow: inset 4px 0 0 var(--launcher-accent);
    min-height: 64px;
}

.launcher-preview-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 8, 11, 0.62);
}

.launcher-branding { display: flex; align-items: center; gap: 10px; min-width: 0; }
.launcher-branding strong { display: block; color: #f7f8f4; font-size: 0.9rem; }
.launcher-branding span,
.launcher-preview-copy,
.launcher-endpoint span,
.mini-label {
    color: rgba(237, 241, 235, 0.55);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.launcher-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--launcher-accent);
    color: #11170c;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 0 22px color-mix(in srgb, var(--launcher-accent) 45%, transparent);
}

.launcher-online-chip {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--launcher-accent);
    color: #11170c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.launcher-preview-hero { grid-area: hero; min-width: 0; }
.launcher-preview-announcement { grid-area: news; min-width: 0; }

.launcher-preview-body {
    position: relative;
    z-index: 1;
    padding: 22px 20px 16px;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
    grid-template-areas: "hero news";
    gap: 22px;
    align-items: end;
    transition: grid-template-columns 0.5s cubic-bezier(0.22, 1, 0.36, 1), gap 0.45s ease, align-items 0.45s ease;
}

.launcher-preview-main h3,
.launcher-preview-body h3,
.launcher-preview-hero h3 {
    margin: 8px 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--launcher-accent);
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: #f7f8f4;
}

.launcher-online-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--launcher-accent);
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 10, 13, 0.4);
}

.launcher-online-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--launcher-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--launcher-accent) 18%, transparent), 0 0 12px var(--launcher-accent);
}

.launcher-preview-tag {
    color: var(--launcher-accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 4px;
}

.launcher-headline-sub {
    display: block;
    font-size: 0.32em;
    letter-spacing: 0.18em;
    color: var(--launcher-accent);
    margin-bottom: 4px;
    font-weight: 700;
}

.launcher-preview-copy {
    margin-bottom: 16px;
    max-width: 36em;
    line-height: 1.7;
    color: rgba(237, 241, 235, 0.62);
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0;
}

.launcher-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

.launcher-stats div {
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--launcher-accent);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.launcher-stats dt {
    font-size: 0.62rem;
    color: rgba(237, 241, 235, 0.42);
    margin-bottom: 4px;
    letter-spacing: 0.08em;
}

.launcher-stats dd { color: #f7f8f4; font-weight: 700; font-size: 0.92rem; }

.launcher-preview-announcement {
    padding: 18px 16px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(16, 22, 27, 0.92), rgba(8, 13, 17, 0.72));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.mini-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.launcher-preview-announcement h4 { color: #f7f8f4; margin: 0 0 8px; font-size: 1.05rem; }
.launcher-preview-announcement p {
    color: rgba(237, 241, 235, 0.62);
    font-size: 0.8rem;
    line-height: 1.7;
    margin: 0 0 12px;
}
.launcher-read-more {
    color: var(--launcher-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.launcher-endpoint { display: grid; gap: 2px; }
.launcher-endpoint strong { color: #f7f8f4; font-size: 0.92rem; }
.launcher-preview-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.launcher-preview-actions .btn { pointer-events: none; }
.launcher-preview-actions .btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(247, 248, 244, 0.75);
}
.launcher-preview-actions .btn-primary {
    background: var(--launcher-accent);
    color: #13180e;
    border: 0;
    font-weight: 800;
    min-width: 132px;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--launcher-accent) 28%, transparent);
}
.play-icon { display: inline-block; margin-right: 6px; }

.launcher-skin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.launcher-skin {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-inset);
    cursor: pointer;
    transition: border-color 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, background 0.35s ease;
}

.launcher-skin input { position: absolute; opacity: 0; pointer-events: none; }
.launcher-skin strong { font-size: 0.86rem; }
.launcher-skin em {
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.launcher-skin:hover { transform: translateY(-2px); }
.launcher-skin.is-active {
    border-color: var(--text);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
}

.launcher-skin-mini {
    display: block;
    height: 54px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.launcher-skin:hover .launcher-skin-mini { transform: scale(1.03); }
.launcher-skin-mini::after {
    content: "";
    position: absolute;
    inset: 10px 10px auto auto;
    width: 42%;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
}
.launcher-skin-mini--aurora {
    background: linear-gradient(135deg, #0b1016 0%, #1a2418 55%, #d9f24d 160%);
}
.launcher-skin-mini--obsidian {
    background: linear-gradient(135deg, #090908 0%, #1a1610 50%, #c9a36a 140%);
}
.launcher-skin-mini--neon {
    background: linear-gradient(135deg, #120616 0%, #2a0b3a 45%, #ff2e93 80%, #22f0ff 140%);
}
.launcher-skin-mini--glacier {
    background: linear-gradient(135deg, #0c1822 0%, #1b3a4a 55%, #7ec8e3 150%);
}
.launcher-skin-mini--ember {
    background: linear-gradient(135deg, #1a0808 0%, #4a1810 50%, #ff6b35 140%);
}
.launcher-skin-mini--atlas {
    background: linear-gradient(135deg, #081018 0%, #163056 50%, #4c8dff 140%);
}

.launcher-preview-window,
.launcher-preview-topbar,
.launcher-preview-footer,
.launcher-preview-announcement,
.launcher-stats div,
.launcher-brand-icon,
.launcher-online-chip,
.launcher-preview-actions .btn-primary,
.lp-glow {
    transition:
        background 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.45s ease,
        box-shadow 0.55s ease,
        color 0.4s ease,
        border-radius 0.45s ease,
        filter 0.55s ease;
}

.launcher-preview-window.is-skin-swap {
    animation: launcherSkinIn 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes launcherSkinIn {
    0% { filter: blur(8px) saturate(0.6); transform: scale(0.985); }
    100% { filter: none; transform: none; }
}

.launcher-preview-window[data-skin="obsidian"] {
    background:
        radial-gradient(420px 220px at 88% 18%, color-mix(in srgb, var(--launcher-accent) 18%, transparent), transparent 70%),
        linear-gradient(180deg, #0a0908 0%, #14110c 100%);
    border-color: color-mix(in srgb, var(--launcher-accent) 35%, #2a2418);
    color: #f4ecdc;
}
.launcher-preview-window[data-skin="obsidian"] .launcher-preview-topbar {
    border-bottom-width: 1px;
    background: linear-gradient(90deg, #100e0b, #0c0b09);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--launcher-accent) 55%, transparent);
}
.launcher-preview-window[data-skin="obsidian"] .launcher-preview-body h3 {
    border-left-width: 1px;
    letter-spacing: 0.12em;
}
.launcher-preview-window[data-skin="obsidian"] .launcher-preview-announcement {
    border-radius: 2px;
    background: linear-gradient(180deg, #16130f, #0e0c0a);
    border-color: color-mix(in srgb, var(--launcher-accent) 28%, transparent);
}
.launcher-preview-window[data-skin="obsidian"] .launcher-online-chip,
.launcher-preview-window[data-skin="obsidian"] .launcher-brand-icon,
.launcher-preview-window[data-skin="obsidian"] .launcher-preview-actions .btn-primary {
    border-radius: 2px;
    color: #1a140c;
}

.launcher-preview-window[data-skin="neon"] {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px),
        radial-gradient(380px 240px at 12% 80%, color-mix(in srgb, #22f0ff 22%, transparent), transparent 70%),
        radial-gradient(420px 220px at 92% 12%, color-mix(in srgb, var(--launcher-accent) 28%, transparent), transparent 68%),
        linear-gradient(135deg, #090412 0%, #1a0830 100%);
    border-color: color-mix(in srgb, #22f0ff 40%, var(--launcher-accent));
}
.launcher-preview-window[data-skin="neon"] .launcher-preview-topbar {
    border-bottom: 1px solid color-mix(in srgb, #22f0ff 55%, transparent);
    background: rgba(12, 4, 24, 0.72);
    box-shadow: inset 3px 0 0 var(--launcher-accent);
}
.launcher-preview-window[data-skin="neon"] .launcher-preview-body {
    align-items: stretch;
}
.launcher-preview-window[data-skin="neon"] .launcher-preview-announcement {
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    border-color: color-mix(in srgb, #22f0ff 40%, transparent);
    background: rgba(20, 8, 40, 0.78);
    box-shadow: 0 0 24px color-mix(in srgb, var(--launcher-accent) 18%, transparent);
}
.launcher-preview-window[data-skin="neon"] .launcher-online-chip {
    box-shadow: 0 0 16px color-mix(in srgb, var(--launcher-accent) 55%, transparent);
}

.launcher-preview-window[data-skin="glacier"] {
    background:
        radial-gradient(480px 260px at 80% 0%, color-mix(in srgb, var(--launcher-accent) 24%, transparent), transparent 72%),
        linear-gradient(180deg, #10202c 0%, #0b151e 100%);
    border-color: rgba(180, 220, 236, 0.22);
}
.launcher-preview-window[data-skin="glacier"] .launcher-preview-topbar {
    border-bottom: 1px solid rgba(180, 220, 236, 0.18);
    background: rgba(16, 32, 44, 0.78);
    box-shadow: none;
    backdrop-filter: blur(12px);
}
.launcher-preview-window[data-skin="glacier"] .launcher-preview-announcement,
.launcher-preview-window[data-skin="glacier"] .launcher-stats div {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(180, 220, 236, 0.16);
    backdrop-filter: blur(10px);
}
.launcher-preview-window[data-skin="glacier"] .launcher-preview-body h3 {
    border-left-width: 0;
    padding-left: 0;
}
.launcher-preview-window[data-skin="glacier"] .launcher-brand-icon,
.launcher-preview-window[data-skin="glacier"] .launcher-online-chip,
.launcher-preview-window[data-skin="glacier"] .launcher-preview-actions .btn-primary {
    border-radius: 999px;
}
.launcher-preview-window[data-skin="glacier"] .launcher-preview-body {
    grid-template-areas: "news hero";
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
}

.launcher-preview-window[data-skin="obsidian"] .launcher-preview-body {
    grid-template-areas: "hero" "news";
    grid-template-columns: 1fr;
    align-items: start;
}

.launcher-preview-window[data-skin="neon"] .launcher-preview-body {
    grid-template-areas: "hero" "news";
    grid-template-columns: 1fr;
    align-items: stretch;
}

.launcher-preview-window[data-skin="ember"] {
    background:
        radial-gradient(520px 240px at 50% 0%, color-mix(in srgb, var(--launcher-accent) 26%, transparent), transparent 70%),
        linear-gradient(180deg, #220c0a 0%, #120606 100%);
}
.launcher-preview-window[data-skin="ember"] .launcher-preview-topbar {
    display: none;
}
.launcher-preview-window[data-skin="ember"] .launcher-preview-body {
    grid-template-areas: "hero" "news";
    grid-template-columns: 1fr;
    padding-top: 28px;
}
.launcher-preview-window[data-skin="ember"] .launcher-preview-footer {
    background: rgba(20, 6, 6, 0.88);
    border-top: 2px solid var(--launcher-accent);
}

.launcher-preview-window[data-skin="atlas"] {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    background: linear-gradient(180deg, #0a1424 0%, #08101c 100%);
}
.launcher-preview-window[data-skin="atlas"] .lp-glow { display: none; }
.launcher-preview-window[data-skin="atlas"] .launcher-preview-topbar {
    grid-column: 1;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    border: 0;
    border-right: 1px solid color-mix(in srgb, var(--launcher-accent) 28%, transparent);
    box-shadow: none;
    min-height: 100%;
    background: rgba(8, 16, 32, 0.92);
}
.launcher-preview-window[data-skin="atlas"] .launcher-branding { flex-direction: column; align-items: flex-start; }
.launcher-preview-window[data-skin="atlas"] .launcher-preview-body {
    grid-column: 2;
    grid-row: 1;
    grid-template-areas: "hero" "news";
    grid-template-columns: 1fr;
    align-items: start;
}
.launcher-preview-window[data-skin="atlas"] .launcher-preview-footer {
    grid-column: 2;
    grid-row: 2;
}

.launcher-tutorial summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.launcher-tutorial summary::-webkit-details-marker { display: none; }
.launcher-tutorial summary::after {
    content: "展开";
    float: right;
    color: var(--text-faint);
    font-weight: 500;
    font-size: 0.8rem;
}
.launcher-tutorial[open] summary::after { content: "收起"; }
.launcher-tutorial summary { margin-bottom: 0; }
.launcher-tutorial[open] summary { margin-bottom: 12px; }
.launcher-tutorial p,
.launcher-tutorial h3 { color: var(--text-muted); }
.launcher-tutorial h3 { margin: 14px 0 8px; font-size: 0.9rem; }

.launcher-progress-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    background: rgba(10, 16, 28, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.launcher-progress-overlay.is-open {
    display: flex;
    animation: lp-veil-in 0.28s ease;
}

@keyframes lp-veil-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lp-dock {
    width: min(720px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px 20px 16px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--bg-card) 92%, #fff);
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.22);
    animation: lp-dock-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lp-dock-in {
    from { transform: translateY(28px) scale(0.98); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.lp-ring-wrap {
    position: relative;
    width: 96px;
    height: 96px;
}

.lp-ring { width: 96px; height: 96px; transform: rotate(-90deg); }

.lp-ring-track,
.lp-ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.lp-ring-track { stroke: var(--bg-inset); }
.lp-ring-fill {
    stroke: var(--primary);
    stroke-dasharray: 251.327;
    stroke-dashoffset: 251.327;
    transition: stroke-dashoffset 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--primary) 45%, transparent));
}

.lp-ring-wrap strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.launcher-progress-overlay.is-working .lp-ring-wrap::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--primary) 40%, transparent);
    animation: lp-spin 8s linear infinite;
}

@keyframes lp-spin { to { transform: rotate(360deg); } }

.lp-dock-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 2px;
}

.lp-dock-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.lp-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--bg-inset);
    overflow: hidden;
    margin-bottom: 14px;
    position: relative;
}

.lp-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #7aa2ff 55%, var(--primary));
    background-size: 200% 100%;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.launcher-progress-overlay.is-working .lp-bar i {
    animation: lp-shimmer 1.4s linear infinite;
}

@keyframes lp-shimmer {
    from { background-position: 0 0; }
    to { background-position: 200% 0; }
}

.lp-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    position: relative;
    margin: 0 0 12px;
    padding: 0;
}

.lp-steps li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.78rem;
    color: var(--text-faint);
}

.lp-steps li span {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-faint);
    font-weight: 700;
    font-size: 0.75rem;
}

.lp-steps li.is-active,
.lp-steps li.is-done { color: var(--primary); }
.lp-steps li.is-active span,
.lp-steps li.is-done span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.lp-steps li.is-active span {
    animation: lp-pulse 1.2s ease-in-out infinite;
}

@keyframes lp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 40%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

.lp-status {
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-inset);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.lp-status-text {
    margin: 0 0 4px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}

.lp-status-hint {
    margin: 0 0 10px;
    line-height: 1.45;
    font-size: 0.8rem;
}

.lp-status-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.lp-status-meta div {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.lp-status-meta span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-bottom: 2px;
}

.lp-status-meta strong {
    display: block;
    color: var(--text);
    font-size: 0.88rem;
}

.launcher-progress-overlay.is-done .lp-ring-fill { stroke: var(--success); }
.launcher-progress-overlay.is-done .lp-bar i { background: var(--success); animation: none; }

@media (max-width: 640px) {
    .launcher-progress-overlay { padding: 16px 10px; }
    .lp-dock { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .lp-dock-main { width: 100%; }
    .lp-status { text-align: center; }
    .lp-status-meta { grid-template-columns: 1fr; }
    .lp-steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
    .launcher-workbench { grid-template-columns: 1fr; }
    .launcher-preview-panel { position: static; }
    .launcher-preview-body { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .launcher-pagehead { flex-direction: column; align-items: flex-start; }
    .launcher-grid,
    .launcher-stats { grid-template-columns: 1fr; }
    .launcher-skin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .launcher-preview-footer,
    .launcher-preview-topbar { flex-direction: column; align-items: flex-start; }
    .launcher-toolbar { flex-wrap: wrap; }
    .launcher-toolbar .btn { width: 100%; }
}

/* -------------------------------------------------------------------------- */
/* Header v7 — 双层顶栏                                                        */
/* -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.header-top { border-bottom: 1px solid var(--border); }

.header-top-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 64px;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.site-logo {
    gap: 10px;
}

.site-logo-text {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text) 0%, #4b5563 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-logo-name {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.site-logo-img {
    display: block;
    height: 38px;
    width: auto;
    max-width: min(56px, 14vw);
    object-fit: contain;
    flex-shrink: 0;
}

.footer-logo .site-logo-img {
    height: 34px;
    max-width: min(48px, 12vw);
}

.footer-logo .site-logo-name {
    font-size: 1rem;
}

.logo-icon { display: none; }

.search-form-main {
    position: relative;
    width: min(100%, 480px);
    margin: 0 auto;
}

.search-form-main .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    pointer-events: none;
}

.search-form-main input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-inset);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.search-form-main input:focus {
    border-color: var(--primary-border);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.nav-strip { background: var(--bg-card); border-bottom: 1px solid var(--border); }

.nav-strip-inner { min-height: 48px; display: flex; align-items: center; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.main-nav a {
    position: relative;
    padding: 12px 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 0;
    background: transparent;
    transition: color 0.15s;
}

.main-nav a:hover {
    color: var(--primary);
    background: transparent;
}

.main-nav a.is-active {
    color: var(--primary);
    font-weight: 600;
}

.main-nav a.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.main-nav a.nav-vip {
    color: #64748b;
    background: transparent;
}

.main-nav a.nav-vip.is-active,
.main-nav a.nav-vip:hover {
    color: var(--vip);
    background: transparent;
}

.main-nav a.nav-vip.is-active::after {
    background: var(--vip);
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
}

.link-muted { color: var(--text-muted); }
.link-muted:hover { color: var(--text); }

.user-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-muted);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8125rem;
}

.admin-link { color: var(--warning) !important; font-weight: 600; }

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
}

/* 覆盖旧 header 布局 */
.header-inner, .header-brand, .header-tools { display: contents; }
.search-form:not(.search-form-main) { display: none; }
.logo-mark { display: none; }

.site-header.legacy { height: auto; background: var(--bg-card); border: none; backdrop-filter: none; }

.site-main { min-height: calc(100vh - var(--header-h) - 120px); }

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.site-footer {
    margin-top: 56px;
    background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
    border-top: 1px solid var(--border);
}

.footer-shell {
    padding: 0 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr);
    gap: 40px 48px;
    padding: 40px 0 28px;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
}

.footer-tagline {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-about {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-faint);
    line-height: 1.7;
}

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

.footer-col-title {
    margin: 0 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

.footer-col-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer-col-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-copy {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-faint);
}

.footer-icp {
    font-size: 0.8125rem;
    color: var(--text-faint);
}

.footer-icp:hover {
    color: var(--primary);
}

.footer-grid,
.footer-desc,
.footer-links {
    display: none;
}

/* Footer v2 — 三栏：品牌 | 导航/版权/社交 | 二维码 */
.footer-v2 {
    padding: 44px 0 36px;
}

.footer-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto;
    gap: 36px 48px;
    align-items: start;
}

.footer-v2-grid--no-qr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}

.footer-v2-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
}

.footer-site-url {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

.footer-site-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-brand-icp {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: var(--text-faint);
}

.footer-brand-icp a {
    color: inherit;
    transition: color 0.15s;
}

.footer-brand-icp a:hover {
    color: var(--primary);
}

.footer-v2-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 12px;
    padding-top: 4px;
}

.footer-dot-nav,
.footer-friends-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 6px;
}

.footer-dot-nav a,
.footer-friends-inline a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer-dot-nav a:hover,
.footer-friends-inline a:hover {
    color: var(--primary);
}

.footer-dot-sep {
    color: var(--text-faint);
    font-size: 0.75rem;
    user-select: none;
    padding: 0 2px;
}

.footer-meta-line {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-faint);
    line-height: 1.65;
}

.footer-meta-line a {
    color: inherit;
    transition: color 0.15s;
}

.footer-meta-line a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
}

.footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-faint);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.footer-social-btn:hover {
    background: var(--primary-muted);
    border-color: var(--primary-border);
    color: var(--primary);
}

.footer-social-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.footer-social-btn svg rect,
.footer-social-btn svg path[stroke] {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-v2-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer-v2-qr img {
    display: block;
    width: 118px;
    height: 118px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    border: 1px solid var(--border);
}

.footer-v2-qr span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/* Typography & sections                                                      */
/* -------------------------------------------------------------------------- */

.section { padding: 40px 0 12px; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-more {
    font-size: 0.8125rem;
    color: var(--text-faint);
    transition: color 0.15s;
}

.section-more:hover { color: var(--primary); }

.muted { color: var(--text-muted); font-size: 0.875rem; }

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.hero {
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 80% 60% at 0% -20%, rgba(249, 115, 22, 0.08), transparent 55%),
        var(--bg-subtle);
}

.hero-inner { max-width: 640px; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.hero-kicker::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--primary-border);
}

.hero h1 {
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 520px;
    margin-bottom: 24px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 108, 244, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-soft:hover {
    border-color: var(--primary-border);
    color: var(--primary);
    background: var(--primary-muted);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--text-faint);
}

.btn-danger {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.35);
}

.btn-danger:hover {
    background: rgba(220, 53, 69, 0.08);
    border-color: #dc3545;
    color: #dc3545;
}

.btn-disabled {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--text-faint);
    cursor: not-allowed;
}

.btn-sm { padding: 5px 11px; font-size: 0.8125rem; }
.btn-lg { padding: 12px 22px; font-size: 0.9375rem; }
.btn-block { width: 100%; }

/* -------------------------------------------------------------------------- */
/* Submit type choice                                                         */
/* -------------------------------------------------------------------------- */

.submit-choice-page {
    padding: 40px 0 56px;
}

.submit-choice-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 32px;
}

.submit-choice-head h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.submit-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.submit-choice-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.submit-choice-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
    color: inherit;
}

.submit-choice-card strong {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text);
}

.submit-choice-card .submit-choice-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.submit-choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
}

.submit-choice-icon-resource {
    background: var(--primary-muted);
    color: var(--primary);
}

.submit-choice-icon-report {
    background: #fdeced;
    color: #dc3545;
}

.submit-choice-card-danger:hover {
    border-color: rgba(220, 53, 69, 0.35);
}

.submit-choice-foot {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
}

.submit-choice-foot .link {
    color: var(--primary);
}

/* -------------------------------------------------------------------------- */
/* Categories (home)                                                          */
/* -------------------------------------------------------------------------- */

.category-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.category-grid::-webkit-scrollbar {
    height: 6px;
}

.category-grid::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
}

.category-card {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 72px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
    color: var(--text);
}

.category-body {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------- */
/* Resource cards                                                             */
/* -------------------------------------------------------------------------- */

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 14px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.resource-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
}

.resource-card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-hover);
    font-size: 0.75rem;
}

.resource-cover {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border);
}

.resource-cover img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.resource-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.resource-card-title-row h3 {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin: 0;
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-card-badge {
    flex-shrink: 0;
    margin-top: 2px;
}

.badge-free {
    background: var(--success-muted);
    color: var(--success);
    border-color: #b8ebd8;
}

.badge-vip {
    background: var(--vip-muted);
    color: var(--vip);
    border-color: #f5ddb0;
}

.badge-paid {
    background: #fff8eb;
    color: var(--warning);
    border-color: #f5ddb0;
}

.badge-coin {
    background: #fffbeb;
    color: #d97706;
    border-color: #fcd34d;
}

.resource-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--text-faint);
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.resource-meta-dot { opacity: 0.5; }

.framework-pill {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-transform: uppercase;
}

.resource-stats {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

.resource-author-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.resource-author-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/* List page sidebar                                                          */
/* -------------------------------------------------------------------------- */

.page-with-sidebar {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
    padding-top: 28px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.sidebar h3 {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.sidebar-list { list-style: none; }

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    border-left: 2px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.sidebar-list a span {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-faint);
}

.sidebar-list a.active,
.sidebar-list a:hover {
    background: var(--bg-card);
    color: var(--text);
    border-left-color: var(--primary);
}

.toolbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.toolbar h1 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.result-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-faint);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.filter-chip {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8125rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-chip.active {
    background: var(--primary-muted);
    border-color: var(--primary-border);
    color: var(--primary);
}

.filter-chip:hover:not(.active) {
    background: var(--bg-card);
    color: var(--text);
}

.pagination {
    display: flex;
    gap: 4px;
    margin-top: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination a {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pagination a.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.pagination a:hover:not(.active) {
    background: var(--bg-card);
    color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* Panels, forms, alerts                                                      */
/* -------------------------------------------------------------------------- */

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 16px;
}

.panel-card h2 {
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.panel-card label {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.panel-card label.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-bottom: 10px;
    margin-right: 14px;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.panel-card input:not([type="checkbox"]):not([type="radio"]),
.panel-card select,
.panel-card textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

.panel-card label.checkbox-label input[type="checkbox"],
.panel-card label.checkbox-label input[type="radio"] {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.panel-card input:focus,
.panel-card select:focus,
.panel-card textarea:focus {
    border-color: var(--border-strong);
}

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.alert-success {
    background: #d1fae5;
    color: #047857;
    border-color: #6ee7b7;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

/* -------------------------------------------------------------------------- */
/* Auth                                                                       */
/* -------------------------------------------------------------------------- */

.auth-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - var(--header-h) - 80px);
    padding: 40px 16px;
}

.auth-shell {
    width: min(100%, 880px);
    display: grid;
    grid-template-columns: 1fr 380px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.auth-aside {
    padding: 36px 32px;
    background: var(--bg-subtle);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.auth-aside h2 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-aside p { color: var(--text-muted); font-size: 0.875rem; }

.auth-aside-list {
    list-style: none;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-aside-list li {
    font-size: 0.8125rem;
    color: var(--text-faint);
    padding-left: 14px;
    position: relative;
}

.auth-aside-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 1px;
}

.auth-card {
    padding: 36px 32px;
}

.auth-card h1 {
    margin-bottom: 22px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-card label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.auth-card input {
    width: 100%;
    padding: 9px 11px;
    margin-bottom: 14px;
    font-family: inherit;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    outline: none;
}

.auth-card input:focus { border-color: var(--border-strong); }

.auth-email-code-wrap {
    margin-bottom: 14px;
}

.auth-email-code-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.auth-email-code-row input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.auth-email-code-row .btn {
    flex-shrink: 0;
    align-self: stretch;
    margin-bottom: 0;
    white-space: nowrap;
}

.auth-field-hint {
    margin: 6px 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
}

.auth-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 0.8125rem;
    color: var(--text-faint);
}

.auth-footer a { color: var(--primary); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--text-faint);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-qq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #12b7f5;
    color: #fff;
    border: none;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.btn-qq:hover {
    background: #0fa3db;
    color: #fff;
}

.btn-qq-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.auth-oauth-tip {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-faint);
}

/* legacy single-column auth fallback */
.auth-page > .auth-card {
    width: min(100%, 400px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

/* -------------------------------------------------------------------------- */
/* User center                                                                */
/* -------------------------------------------------------------------------- */

.user-page {
    padding: 24px 0 48px;
    max-width: var(--container);
}

.user-center-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.user-center-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-center-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.uc-sidebar-profile {
    padding-bottom: 14px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--border);
}

.uc-sidebar-profile .author-bio {
    border-top: none;
    padding-top: 0;
    margin-top: 2px;
}

.uc-nav-group-label {
    display: block;
    padding: 10px 12px 4px;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.uc-nav-group-label:first-child {
    padding-top: 0;
}

.uc-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}

.uc-nav-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-faint);
}

.uc-nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.uc-nav-link:hover {
    background: var(--bg-inset);
    color: var(--text);
}

.uc-nav-link:hover .uc-nav-icon { color: var(--text-muted); }

.uc-nav-link.active {
    background: var(--primary-muted);
    color: var(--primary);
    font-weight: 600;
}

.uc-nav-link.active .uc-nav-icon { color: var(--primary); }

.uc-dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(59, 108, 244, 0.08) 0%, rgba(59, 108, 244, 0.02) 100%);
    box-shadow: var(--shadow-sm);
}

.uc-dashboard-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 6px;
}

.uc-dashboard-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.uc-dashboard-hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.uc-dashboard-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
}

.uc-panel-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.uc-panel-link {
    font-size: 0.8125rem;
    color: var(--primary);
}

.uc-panel-link:hover { text-decoration: underline; }

.uc-stat-accent-blue { border-top: 3px solid #3b6cf4; }
.uc-stat-accent-green { border-top: 3px solid #16a34a; }
.uc-stat-accent-purple { border-top: 3px solid #7c3aed; }
.uc-stat-accent-orange { border-top: 3px solid #ea580c; }

.uc-recent-list {
    list-style: none;
}

.uc-recent-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.uc-recent-list li:last-child { border-bottom: none; }

.uc-recent-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.uc-recent-main a,
.uc-recent-main span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.uc-recent-main a:hover { color: var(--primary); }

.uc-recent-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.uc-recent-edit {
    font-size: 0.75rem;
    color: var(--primary);
}

.uc-recent-edit:hover { text-decoration: underline; }

.uc-table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
    text-align: right;
}

.uc-sidebar-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.uc-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.uc-pill span {
    font-size: 0.6875rem;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}

.uc-pill strong {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
}

.uc-pill:hover {
    border-color: var(--primary-border);
    background: var(--primary-muted);
}

.uc-pill-balance strong { color: var(--primary); }

.uc-pill-coin strong { color: #d97706; }

.uc-coin-banner {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.uc-coin-banner .wallet-balance {
    font-size: 2rem;
}

/* Check-in calendar */
.checkin-stat-grid {
    margin-bottom: 16px;
}

.checkin-stat-grid strong small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.checkin-stat-coin {
    border-color: rgba(217, 119, 6, 0.25);
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.checkin-stat-coin strong {
    color: #d97706;
}

.checkin-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
}

.checkin-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkin-panel {
    padding: 22px 24px 24px;
}

.checkin-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.checkin-panel-head h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.checkin-panel-head p {
    margin: 0;
    font-size: 0.8125rem;
}

.checkin-cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: var(--bg-subtle);
    border-radius: 999px;
    border: 1px solid var(--border);
}

.checkin-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1;
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.checkin-cal-nav-btn:hover:not(.is-disabled) {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.checkin-cal-nav-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
}

.checkin-cal-month {
    min-width: 48px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.checkin-cal-weekdays,
.checkin-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.checkin-cal-weekdays {
    margin-bottom: 10px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-faint);
}

.checkin-cal-grid {
    margin-bottom: 14px;
}

.checkin-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-subtle);
    transition: transform 0.12s;
}

.checkin-cal-day-num {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted);
}

.checkin-cal-day.is-empty {
    visibility: hidden;
    background: transparent;
}

.checkin-cal-day.is-checked {
    background: linear-gradient(145deg, #5b9cff 0%, #3b7cf6 100%);
    box-shadow: 0 4px 12px rgba(59, 124, 246, 0.28);
}

.checkin-cal-day.is-checked .checkin-cal-day-num {
    color: #fff;
}

.checkin-cal-day.is-today:not(.is-checked) {
    background: var(--bg-card);
    box-shadow: inset 0 0 0 2px var(--primary);
}

.checkin-cal-day.is-today:not(.is-checked) .checkin-cal-day-num {
    color: var(--primary);
}

.checkin-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.checkin-cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.checkin-cal-legend i {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    font-style: normal;
}

.checkin-cal-legend i.is-checked {
    background: linear-gradient(145deg, #5b9cff, #3b7cf6);
}

.checkin-cal-legend i.is-today {
    background: var(--bg-card);
    box-shadow: inset 0 0 0 2px var(--primary);
}

.checkin-cal-legend i.is-future {
    background: var(--bg-subtle);
}

.checkin-cal-action {
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.checkin-cal-action form {
    margin: 0;
}

.checkin-cal-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #5b9cff 0%, #3b7cf6 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(59, 124, 246, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

.checkin-cal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(59, 124, 246, 0.35);
}

.checkin-cal-done {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.9375rem;
    font-weight: 600;
}

.checkin-rules-list {
    margin: 0 0 16px;
    padding-left: 1.1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.checkin-rules-list li + li {
    margin-top: 6px;
}

.checkin-rules-list strong {
    color: var(--text);
}

.checkin-tx-list {
    max-height: 320px;
    overflow-y: auto;
}

.text-success { color: var(--success, #16a34a); }
.text-danger { color: var(--danger, #dc2626); }

.uc-pill-vip.is-active {
    border-color: rgba(180, 83, 9, 0.35);
    background: var(--vip-muted);
}

.uc-pill-vip.is-active strong { color: var(--vip); }

.uc-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uc-sidebar-foot {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.uc-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.uc-page-head h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.uc-page-head-inset {
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.uc-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.uc-stat-card {
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.uc-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.uc-stat-card strong {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
}

.uc-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
}

.uc-panel-form {
    max-width: 560px;
}

.uc-panel-head {
    margin-bottom: 16px;
}

.uc-panel-head h2 {
    font-size: 1rem;
    font-weight: 600;
}

.user-center-main .uc-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.user-center-main .uc-resource-grid .resource-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-inset);
}

.user-center-main .uc-resource-grid .resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uc-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.uc-action-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.uc-action-card strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.uc-action-card span {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.uc-action-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.uc-action-vip:hover { border-color: rgba(180, 83, 9, 0.4); }

.uc-action-accent {
    background: var(--primary-muted);
    border-color: var(--primary-border);
}

.uc-info-list {
    display: grid;
    gap: 0;
}

.uc-info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.uc-info-list div:last-child { border-bottom: none; }

.uc-info-list dt { color: var(--text-muted); }

.uc-info-list dd {
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.uc-form-subtitle {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 18px 0 12px;
}

.uc-form-subtitle:first-of-type { margin-top: 0; }

.uc-avatar-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
}

.uc-avatar-preview .muted {
    font-size: 0.75rem;
}

.uc-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
}

.uc-empty p { margin-bottom: 12px; }

.uc-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--bg-inset);
}

.uc-status-pending { color: var(--warning); background: #fef9ec; }
.uc-status-published { color: var(--success); background: var(--success-muted); }
.uc-status-rejected { color: var(--danger); background: var(--danger-muted); }

.uc-wallet-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 24px;
    background: linear-gradient(135deg, #3b6cf4 0%, #5b8cff 100%);
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.uc-wallet-banner .wallet-label,
.uc-wallet-banner .muted {
    color: rgba(255, 255, 255, 0.85);
}

.uc-wallet-banner .wallet-balance {
    color: #fff;
    font-size: 2rem;
}

.uc-wallet-banner .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: transparent;
}

.uc-wallet-banner .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.uc-wallet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
}

.uc-vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.uc-vip-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px 20px;
    box-shadow: var(--shadow-sm);
}

.submit-page,
.vip-page {
    padding-top: 28px;
    max-width: var(--container);
}

.form-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.user-meta-list { list-style: none; }

.user-meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.user-meta-list li span { color: var(--text-faint); }

.profile-form label { display: block; margin-bottom: 14px; font-size: 0.8125rem; color: var(--text-muted); }

.profile-form input[type=text],
.profile-form input[type=password],
.profile-form textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 11px;
    font-family: inherit;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

.profile-form input[disabled] { opacity: 0.6; cursor: not-allowed; }
.profile-form small { display: block; margin-top: 6px; font-size: 0.75rem; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text);
    font-size: 0.875rem;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.user-table th,
.user-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.user-table th {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-weight: 500;
}

.table-scroll { overflow-x: auto; }

/* -------------------------------------------------------------------------- */
/* Resource detail                                                            */
/* -------------------------------------------------------------------------- */

.resource-page { padding-top: 20px; max-width: var(--container); }

.resource-breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-faint);
}

.resource-breadcrumb a { color: var(--text-muted); }
.resource-breadcrumb a:hover { color: var(--primary); }

.resource-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.resource-main { min-width: 0; }

.resource-article {
    position: relative;
    padding: 24px 26px;
}

.resource-article-badge {
    position: absolute;
    top: 24px;
    right: 26px;
    left: auto;
    z-index: 2;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
}

.resource-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 96px 18px 0;
}

.resource-author-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}

.author-left { display: flex; gap: 12px; align-items: center; }

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.author-avatar.lg {
    width: 64px;
    height: 64px;
    font-size: 1.2rem;
}

.author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.author-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.author-stats {
    display: flex;
    gap: 16px;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-faint);
}

.author-stats strong { color: var(--text); font-weight: 500; }

.resource-hero-cover {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.resource-hero-cover img {
    width: 100%;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

.resource-access-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
}

.resource-access-box > div:first-child {
    flex: 1;
    min-width: min(100%, 220px);
}

.resource-access-box > div:first-child p {
    margin: 0;
}

.resource-access-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.resource-access-box.badge-vip { border-color: rgba(234, 179, 8, 0.3); }
.resource-access-box.badge-paid { border-color: rgba(251, 191, 36, 0.3); }
.resource-access-box.badge-free { border-color: rgba(74, 222, 128, 0.25); }

.resource-body-wrap { position: relative; }

.resource-body-wrap.is-locked .detail-content {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
    max-height: 240px;
    overflow: hidden;
    position: relative;
}

.resource-body-wrap.is-locked .detail-content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
}

.detail-content {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-muted);
}

.detail-content h2,
.detail-content h3 {
    color: var(--text);
    margin: 1.2em 0 0.5em;
    font-size: 1.05rem;
}

.prose img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.prose h2, .prose h3 { margin: 16px 0 8px; color: var(--text); }
.prose ul, .prose ol { margin-left: 20px; margin-bottom: 12px; }

.resource-meta-table { margin-top: 24px; }

.resource-meta-table h3,
.source-link-box h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.resource-meta-table table { width: 100%; border-collapse: collapse; }

.resource-meta-table th,
.resource-meta-table td {
    padding: 9px 12px;
    border: 1px solid var(--border);
    text-align: left;
    font-size: 0.8125rem;
}

.resource-meta-table th {
    width: 110px;
    background: var(--bg-inset);
    color: var(--text-faint);
    font-weight: 500;
}

.source-link-box {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.source-link-label {
    margin: 0 0 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.resource-hidden-box {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
}

.resource-hidden-box.is-locked {
    border-style: dotted;
    opacity: 0.92;
}

.resource-hidden-box h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 0 0 10px;
}

.resource-hidden-content {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.resource-hidden-lock {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.resource-action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.end-mark {
    color: var(--text-faint);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.copyright-box {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-inset);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.copyright-box strong {
    display: block;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.copyright-box .copyright-list {
    margin: 0;
    padding-left: 1.25em;
    line-height: 1.65;
}

.copyright-box .copyright-list li + li {
    margin-top: 6px;
}

.copyright-box .copyright-list a {
    color: var(--primary);
    word-break: break-all;
}

.related-section h2 {
    margin-bottom: 14px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.resource-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.sidebar-card h3 {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-author { text-align: center; }

.sidebar-author-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-faint);
}

.sidebar-post-list { display: flex; flex-direction: column; gap: 8px; }

.sidebar-post-item {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 8px;
    align-items: start;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-muted);
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-post-item:last-child { border-bottom: none; }

.sidebar-post-item:hover .title { color: var(--primary); }

.sidebar-post-item .rank {
    font-family: var(--font-mono);
    color: var(--text-faint);
    font-size: 0.6875rem;
}

.sidebar-post-item .views {
    font-family: var(--font-mono);
    color: var(--text-faint);
    font-size: 0.6875rem;
    white-space: nowrap;
}

/* Hot rank sidebar */
.sidebar-post-list-hot .sidebar-post-item .rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    font-weight: 700;
}

.hot-rank-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.2;
}

.hot-rank-icon-crown { fill: #f5b301; stroke: #d49200; }
.hot-rank-icon-silver { fill: #c0c8d4; stroke: #8b95a5; }
.hot-rank-icon-bronze { fill: #cd7f32; stroke: #a86428; }

.sidebar-post-list-hot .hot-rank-1 .title { color: #b8860b; font-weight: 600; }
.sidebar-post-list-hot .hot-rank-1 .views { color: #d4a017; }
.sidebar-post-list-hot .hot-rank-2 .title { color: #6b7280; font-weight: 600; }
.sidebar-post-list-hot .hot-rank-2 .rank { color: #9ca3af; }
.sidebar-post-list-hot .hot-rank-3 .title { color: #a86428; font-weight: 600; }
.sidebar-post-list-hot .hot-rank-3 .rank { color: #cd7f32; }
.sidebar-post-list-hot .hot-rank-4 .rank,
.sidebar-post-list-hot .hot-rank-4 .title { color: #6366f1; }
.sidebar-post-list-hot .hot-rank-5 .rank,
.sidebar-post-list-hot .hot-rank-5 .title { color: #8b5cf6; }
.sidebar-post-list-hot .hot-rank-6 .rank,
.sidebar-post-list-hot .hot-rank-6 .title { color: #ec4899; }
.sidebar-post-list-hot .hot-rank-7 .rank,
.sidebar-post-list-hot .hot-rank-7 .title { color: #14b8a6; }
.sidebar-post-list-hot .hot-rank-8 .rank,
.sidebar-post-list-hot .hot-rank-8 .title { color: #0ea5e9; }
.sidebar-post-list-hot .hot-rank-9 .rank,
.sidebar-post-list-hot .hot-rank-9 .title { color: #22c55e; }
.sidebar-post-list-hot .hot-rank-10 .rank,
.sidebar-post-list-hot .hot-rank-10 .title { color: #64748b; }

.resource-hero-cover img,
.detail-content.prose img {
    cursor: zoom-in;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.88);
    padding: 24px;
}

.image-lightbox[hidden] { display: none !important; }

body.image-lightbox-open { overflow: hidden; }

.image-lightbox-stage {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.image-lightbox-close,
.image-lightbox-nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.image-lightbox-close:hover,
.image-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.image-lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    line-height: 1;
}

.image-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
    line-height: 1;
}

.image-lightbox-prev { left: 16px; }
.image-lightbox-next { right: 16px; }

.image-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

/* Comments */
.comments-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.comments-section h2 {
    margin-bottom: 14px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.comment-form textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    margin-bottom: 10px;
    resize: vertical;
}

.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item p { margin-top: 6px; color: var(--text-muted); font-size: 0.875rem; }

.comment-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }

.comment-head-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.comment-login-tip,
.empty-comments { padding: 14px 0; color: var(--text-faint); font-size: 0.875rem; }

.comment-reply-btn {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-faint);
    font-size: 0.8125rem;
    cursor: pointer;
}

.comment-reply-btn:hover { color: var(--primary); }

.comment-reply-form {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    border: 1px solid var(--border);
}

.comment-reply-form textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
}

.comment-reply-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.comment-replies {
    margin-left: 42px;
    padding-left: 14px;
    border-left: 2px solid var(--border);
}

.comment-item--reply {
    padding: 10px 0;
    border-bottom: 0;
}

.comment-replies .comment-item:last-child {
    padding-bottom: 0;
}

.comment-list > .comment-replies:last-child,
.comment-list > .comment-item:last-child {
    border-bottom: 0;
}

/* Avatars & badges */
.avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.avatar-wrap .author-avatar { margin: 0; }
.avatar-wrap.avatar-sm .author-avatar { width: 28px; height: 28px; font-size: 0.7rem; border-radius: var(--radius-sm); }
.avatar-wrap.avatar-md .author-avatar { width: 44px; height: 44px; }
.avatar-wrap.avatar-lg .author-avatar { width: 64px; height: 64px; font-size: 1.2rem; }

.avatar-verified {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: var(--warning);
    border: 2px solid var(--bg-card);
    color: #0a0a0a;
    font-size: 8px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 1;
}

.user-badges-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.user-badge-official { background: rgba(251, 191, 36, 0.12); color: var(--warning); border-color: rgba(251, 191, 36, 0.25); }
.user-badge-partner { background: rgba(96, 165, 250, 0.1); color: #93c5fd; border-color: rgba(96, 165, 250, 0.2); }
.user-badge-creator { background: var(--vip-muted); color: var(--vip); border-color: rgba(234, 179, 8, 0.25); }
.user-badge-custom { background: var(--bg-hover); color: var(--text-muted); border-color: var(--border); }

.mini-badge.vip {
    background: var(--vip-muted);
    color: var(--vip);
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.user-inline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-inline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.user-inline-name { font-weight: 500; font-size: 0.875rem; }
.author-bio { font-size: 0.8125rem; margin-top: 6px; line-height: 1.55; color: var(--text-muted); }

.sidebar-author-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.sidebar-author-stack .sidebar-author-avatar { line-height: 0; }

.sidebar-author-stack .sidebar-author-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.sidebar-author-stack .sidebar-author-name strong { font-size: 0.9375rem; font-weight: 600; }
.sidebar-author-stack .user-badges-row { justify-content: center; }

.sidebar-author-stack .author-bio {
    width: 100%;
    margin: 0;
    padding-top: 10px;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* VIP & submit */
.vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-items: stretch;
    margin: 16px 0;
}

.vip-plan-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: left;
    border-left: 2px solid var(--border);
}

.vip-plan-card:hover { border-left-color: var(--vip); }
.vip-plan-card h3 { margin-bottom: 8px; font-size: 0.9375rem; }

.vip-plan-card > p.muted {
    flex: 1 1 auto;
    min-height: 2.75em;
    margin: 0;
    line-height: 1.45;
    font-size: 0.8125rem;
}

.vip-plan-card form,
.vip-plan-card > .btn.btn-block {
    margin-top: auto;
    padding-top: 18px;
}

.vip-plan-card form {
    margin-bottom: 0;
}

.vip-plan-card .btn-block {
    width: 100%;
}

.vip-price {
    font-family: var(--font-mono);
    font-size: 1.65rem;
    font-weight: 500;
    color: var(--vip);
    margin: 8px 0 10px;
    letter-spacing: -0.02em;
}

.vip-status { color: var(--success); font-size: 0.875rem; }
.vip-hero { margin-bottom: 12px; }

.payment-box {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.pay-form label { display: block; margin: 14px 0; font-size: 0.8125rem; color: var(--text-muted); }

.pay-form input {
    width: 100%;
    padding: 9px 11px;
    margin-top: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    font-family: inherit;
}

.pay-qr { max-width: 180px; margin-top: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.pay-method {
    margin: 16px 0;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
}

.pay-method-wechat {
    border-color: rgba(7, 193, 96, 0.35);
    background: rgba(7, 193, 96, 0.06);
}

.pay-method-alipay {
    border-color: rgba(22, 119, 255, 0.35);
    background: rgba(22, 119, 255, 0.06);
}

.pay-method-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.pay-method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.pay-method-icon-wechat { background: #07c160; }
.pay-method-icon-alipay { background: #1677ff; }

.wechat-pay-status.is-success {
    color: var(--success);
    font-weight: 600;
}

.wechat-pay-qr-wrap {
    display: inline-block;
    padding: 10px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.submit-form label:not(.checkbox-label) { display: block; margin-bottom: 14px; font-size: 0.8125rem; color: var(--text-muted); }

.submit-form label.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.submit-form label.checkbox-label input[type="checkbox"] {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.resource-items-section {
    margin: 18px 0 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.submit-engagement-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
}

.submit-engagement-toggle input[type="checkbox"] {
    margin-top: 0.15rem;
    accent-color: var(--primary);
}

.resource-engagement-lock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

.resource-engagement-lock p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
}

.resource-download-list--locked {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
}

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

.resource-items-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.resource-items-desc {
    margin: 0;
    font-size: 0.8125rem;
}

.resource-items-empty {
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--text-faint);
    font-size: 0.875rem;
}

.resource-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
}

.resource-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.resource-item-main strong {
    font-size: 0.9375rem;
}

.resource-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.resource-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--primary-muted);
    color: var(--primary);
}

.resource-item-badge.is-link {
    background: color-mix(in srgb, var(--success) 14%, transparent);
    color: var(--success);
}

.resource-item-meta,
.resource-item-remark {
    font-size: 0.8125rem;
    color: var(--text-muted);
    word-break: break-all;
}

.resource-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.resource-modal[hidden] {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

.resource-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.resource-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.resource-modal-panel {
    position: relative;
    z-index: 1;
    margin: auto;
    width: min(100%, 520px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.resource-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.resource-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-modal-title-wrap h3 {
    margin: 0;
    font-size: 1.0625rem;
}

.resource-modal-icon {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.resource-modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.resource-modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resource-modal-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-modal-field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.resource-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
}

.resource-url-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    padding: 8px 0;
    outline: none;
}

.resource-url-input::placeholder {
    color: var(--text-faint);
}

.resource-url-input-full {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    padding: 10px 12px;
}

.resource-upload-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.resource-modal-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.resource-remark-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text);
    font: inherit;
    resize: vertical;
    min-height: 96px;
}

.resource-remark-input:focus,
.resource-url-box:focus-within {
    border-color: var(--primary-border);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.resource-modal-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.resource-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.resource-url-row input[type="url"] {
    flex: 1;
    min-width: 0;
}

.resource-modal-label textarea,
.resource-modal-label input[type="url"] {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text);
    font: inherit;
}

.resource-modal-upload-status {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.resource-modal-upload-status.is-success { color: var(--success); }
.resource-modal-upload-status.is-error { color: var(--danger); }
.resource-modal-upload-status.is-loading { color: var(--primary); }

.resource-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--border);
}

.resource-modal-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    margin-bottom: 4px;
}

.resource-modal-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.resource-modal-tab.is-active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.resource-modal-panel-section[hidden] {
    display: none !important;
}

.resource-file-drop {
    position: relative;
    display: block;
    cursor: pointer;
}

.resource-file-drop > input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.resource-file-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 132px;
    padding: 20px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}

.resource-file-drop:hover .resource-file-drop-inner,
.resource-file-drop:focus-within .resource-file-drop-inner,
.resource-file-drop.is-dragover .resource-file-drop-inner {
    border-color: var(--primary-border);
    background: var(--primary-muted);
}

.resource-file-drop.is-dragover .resource-file-drop-inner {
    border-style: solid;
}

.resource-file-drop-inner svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.resource-file-drop-inner strong {
    font-size: 0.875rem;
    color: var(--text);
}

.resource-file-drop-inner small {
    font-size: 0.75rem;
    color: var(--text-faint);
}

.resource-modal-over-limit {
    margin: 0;
    color: var(--danger);
}

.resource-modal-upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-modal-upload-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.resource-modal-upload-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: inherit;
    transition: width 0.15s linear;
}

.resource-modal-upload-progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 36px;
}

.resource-download-list {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.resource-download-list h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.resource-download-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
}

.resource-download-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.resource-download-remark {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.pricing-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
}

.pricing-fieldset legend { padding: 0 6px; color: var(--text-faint); font-size: 0.75rem; }

.pricing-fieldset > label.checkbox-label {
    display: flex;
    margin-bottom: 0;
}

.paid-options { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }

.paid-options label:not(.checkbox-label) { margin-bottom: 12px; }

.tag-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
}

.tag-fieldset legend { padding: 0 6px; color: var(--text-faint); font-size: 0.75rem; }

.tag-fieldset .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.pricing-hint { font-size: 0.8125rem; margin-top: 10px; color: var(--text-faint); }

.post-type-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
}

.post-type-fieldset legend { padding: 0 6px; color: var(--text-faint); font-size: 0.75rem; }

.post-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.post-type-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.post-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.post-type-card {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post-type-card strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: var(--text);
}

.post-type-card small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-faint);
    line-height: 1.4;
}

.post-type-option input:checked + .post-type-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-inset));
}

.repost-fields {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.repost-fields label:not(.checkbox-label) { margin-bottom: 12px; }

.submit-section {
    margin: 18px 0;
}

.submit-section-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.submit-section-desc {
    margin: 0 0 12px;
    font-size: 0.8125rem;
}

.submit-pricing-fieldset {
    margin-top: 0;
}

.access-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.access-type-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.access-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.access-type-card {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.access-type-card strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: var(--text);
}

.access-type-card small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-faint);
    line-height: 1.4;
}

.access-type-option.is-active .access-type-card,
.access-type-option input:checked + .access-type-card {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-inset));
    box-shadow: 0 0 0 1px var(--primary);
}

.submit-pricing-fieldset .paid-options label:not(.checkbox-label) {
    margin-bottom: 12px;
}

.submit-pricing-fieldset .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.file-upload-field {
    margin-bottom: 16px;
}

.file-upload-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.file-upload-field .field-hint {
    display: block;
    margin: 6px 0 10px;
    font-size: 0.75rem;
    color: var(--text-faint);
}

.upload-progress {
    margin-top: 8px;
}

.upload-progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), hsl(221 83% 62%));
    border-radius: 999px;
    transition: width 0.15s ease;
}

.upload-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.upload-status {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.upload-status.is-loading { color: var(--primary); }
.upload-status.is-success { color: var(--success); }
.upload-status.is-error { color: var(--danger); }

.upload-preview {
    display: block;
    max-width: 240px;
    margin-top: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.file-upload-field input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 0.875rem;
}

.wallet-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.wallet-balance {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 600;
    margin: 6px 0;
}

.wallet-label {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.wallet-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wallet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
}

.wallet-tx-list,
.wallet-mini-list {
    list-style: none;
}

.wallet-tx-list li,
.wallet-mini-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.wallet-tx-list li span.muted,
.wallet-mini-list a {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.wallet-tx-meta {
    text-align: right;
    flex-shrink: 0;
}

/* 站内信 */
.uc-page-head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.uc-back-link {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.uc-back-link:hover {
    color: var(--primary);
}

.uc-nav-badge,
.header-message-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--danger, #e5484d);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
}

.header-auth-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-checkin-form {
    margin: 0;
}

.header-checkin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(59, 124, 246, 0.28);
    border-radius: 999px;
    background: var(--primary-muted);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.header-checkin-btn:hover {
    background: var(--primary-muted);
    border-color: var(--primary-border);
}

.header-checkin-btn.is-done {
    background: var(--success-muted);
    border-color: rgba(13, 159, 110, 0.35);
    color: var(--success);
    cursor: default;
}

.header-checkin-flash {
    position: fixed;
    top: calc(var(--header-h, 64px) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    padding: 10px 16px;
    border-radius: 999px;
    background: #047857;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    animation: headerFlashIn 0.25s ease-out;
}

@keyframes headerFlashIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.header-user-menu {
    position: relative;
}

/* 透明桥接：避免鼠标从头像移向卡片时经过间隙导致 hover 断开 */
.header-user-menu::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    height: 14px;
}

.header-user-trigger {
    display: inline-flex;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.12s;
}

.header-user-trigger:hover {
    transform: scale(1.04);
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px var(--border);
}

.header-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-user-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 200;
    pointer-events: none;
}

.header-user-menu.is-open .header-user-popover,
.header-user-menu.is-hover .header-user-popover,
.header-user-menu:hover .header-user-popover,
.header-user-menu:focus-within .header-user-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.header-user-popover-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.header-user-popover-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-muted);
    color: var(--primary);
    font-weight: 700;
}

.header-user-popover-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-user-popover-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-user-popover-meta strong {
    font-size: 0.9375rem;
}

.header-user-email {
    font-size: 0.75rem;
    word-break: break-all;
}

.header-user-popover-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 0;
}

.header-user-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.header-user-stat:hover {
    background: var(--primary-muted);
}

.header-user-stat span {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.header-user-stat strong {
    font-size: 0.875rem;
    color: var(--text);
}

.header-user-popover-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.header-user-popover-nav a {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.header-user-popover-nav a:hover {
    background: var(--bg-subtle);
    color: var(--primary);
}

.header-user-popover-nav a.is-muted {
    color: var(--text-muted);
}

.header-message-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.header-message-link:hover {
    background: var(--bg-inset);
    color: var(--text);
}

.header-message-link .header-message-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    margin-left: 0;
    font-size: 0.625rem;
}

.message-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.message-item {
    border-bottom: 1px solid var(--border);
}

.message-item:last-child {
    border-bottom: none;
}

.message-item-link {
    display: block;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
}

.message-item-link:hover {
    background: var(--bg-inset);
}

.message-item.is-unread .message-item-subject {
    font-weight: 600;
}

.message-item-subject {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.message-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.message-item-preview {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    font-size: 0.6875rem;
}

.message-tag-system {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-muted);
}

.message-detail .message-body {
    padding: 16px;
    line-height: 1.75;
    font-size: 0.9375rem;
    white-space: pre-wrap;
}

.message-link-row {
    padding: 0 16px 16px;
}

.message-detail-actions {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.pagination-summary {
    font-size: 0.8125rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
}

.pagination-page:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-page.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination-ellipsis {
    color: var(--text-faint);
    padding: 0 4px;
}

.btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.tx-plus { color: var(--success); font-family: var(--font-mono); }
.tx-minus { color: var(--danger); font-family: var(--font-mono); }

.wallet-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.wallet-form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text);
    font-family: inherit;
}

.wallet-form-card h2 {
    font-size: 1rem;
    margin: 20px 0 12px;
}

.wallet-bind-form {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.resource-buy-form {
    display: inline-flex;
    margin-right: 8px;
}

.wallet-balance-hint {
    font-size: 0.8125rem;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .wallet-grid { grid-template-columns: 1fr; }
}

/* Misc legacy */
.resource-detail { padding-top: 28px; max-width: 900px; }
.breadcrumb { color: var(--text-faint); font-size: 0.8125rem; margin-bottom: 16px; }
.detail-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-header h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 0.8125rem; align-items: center; }
.detail-summary { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9375rem; }
.detail-cover { margin-bottom: 18px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); max-height: 360px; }
.detail-cover img { width: 100%; object-fit: cover; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.inline-form { display: inline; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

a.tag:hover {
    color: var(--primary);
    border-color: var(--primary-border);
    background: var(--primary-muted);
}

.admin-page { padding-top: 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 20px 0; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card span { display: block; color: var(--text-faint); font-size: 0.75rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.8125rem; }
.admin-table th { color: var(--text-faint); font-weight: 500; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-table .actions { display: flex; gap: 6px; }
.admin-table form { display: inline; }

.status-pending { color: var(--warning); }
.status-published { color: var(--success); }
.status-rejected { color: var(--danger); }

.comment-result-panel {
    max-width: 420px;
}

.comment-result-message {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.comment-result-message--success { color: var(--success); }
.comment-result-message--warning { color: var(--warning); }
.comment-result-message--error { color: var(--danger); }

.comment-result-reason-wrap {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.comment-result-reason-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.comment-result-reason {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
    word-break: break-word;
}

.error-page,
.empty-state {
    text-align: center;
    padding: 72px 20px;
    color: var(--text-muted);
}

.error-page h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    color: var(--text);
}

.user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.section-subtitle { font-size: 0.9375rem; margin: 16px 0 10px; font-weight: 500; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 960px) {
    .resource-layout { grid-template-columns: 1fr; }
    .resource-sidebar { position: static; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .user-center-layout { grid-template-columns: 1fr; }
    .uc-dashboard-split { grid-template-columns: 1fr; }
    .uc-wallet-grid { grid-template-columns: 1fr; }
    .checkin-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-inner {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .nav-toggle { display: inline-flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px 14px;
        background: var(--bg-subtle);
        border-bottom: 1px solid var(--border);
        gap: 2px;
    }

    .main-nav.is-open { display: flex; }

    .main-nav a { padding: 10px 0; width: 100%; }

    .page-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }

    .user-center-layout { grid-template-columns: 1fr; gap: 14px; }
    .user-center-sidebar { position: static; }
    .uc-sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .uc-nav-group-label { display: none; }
    .uc-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uc-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uc-dashboard-split { grid-template-columns: 1fr; }
    .uc-wallet-grid { grid-template-columns: 1fr; }
    .checkin-content-grid { grid-template-columns: 1fr; }
    .user-grid { grid-template-columns: 1fr; }

    .hero { padding: 40px 0 32px; }

    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Home v2 — carousel, layout, ads, featured */
.home-carousel {
    padding: 12px 0 6px;
    background: var(--bg);
}

.carousel-shell {
    position: relative;
}

.carousel-viewport {
    width: 100%;
    height: clamp(160px, 28vw, 320px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-inset);
}

.carousel-track {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 0;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 16px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.15s, border-color 0.15s;
}

.carousel-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.carousel-dot {
    width: 24px;
    height: 3px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: var(--border-strong);
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-dot.is-active {
    width: 32px;
    background: var(--primary);
}
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; padding-top: 8px; align-items: start; }
.home-aside { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 14px; }
.section-tight { padding-top: 24px; }
.category-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.category-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text); white-space: nowrap; font-size: 0.8125rem; }
.category-pill em { font-style: normal; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-faint); }
.category-pill:hover { border-color: var(--primary-border); background: var(--primary-muted); }
.featured-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.featured-lead .resource-card { height: 100%; }
.featured-lead .resource-cover { aspect-ratio: 16 / 10; }
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.aside-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.aside-card h3 { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }
.aside-links { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.aside-links a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.875rem; }
.aside-links a:hover { background: var(--bg-hover); color: var(--primary); }
.ad-slot {
    margin-bottom: 16px;
}

.ad-slot-frame {
    width: 100%;
    aspect-ratio: var(--ad-ratio, 728 / 90);
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inset);
}

.ad-slot-frame-html {
    display: block;
    padding: 0;
    overflow: hidden;
}

.ad-html-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    overflow: hidden;
    background: transparent;
}

.ad-slot-frame .ad-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-slot-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--ad-fit, cover);
    object-position: center;
}

.ad-html {
    width: 100%;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ad-slot-home_top,
.ad-slot-list_top {
    width: min(100%, var(--container));
    max-width: var(--container);
    margin: 16px auto;
}

.ad-slot-home_mid { margin: 8px 0 20px; }

.ad-slot-home_sidebar,
.ad-slot-list_sidebar,
.ad-slot-resource_sidebar {
    max-width: 100%;
}

.ad-slot-resource_content {
    max-width: 100%;
    margin: 20px 0;
}

.ad-slot-footer {
    width: min(100%, 728px);
    margin: 0 auto;
    padding: 12px 0;
    text-align: center;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.ad-slot-footer .ad-slot-frame {
    margin-inline: auto;
}
.footer-friends {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
}
.footer-friends-label { color: var(--text-faint); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-friends-links { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer-friends-links a { color: var(--text-muted); }
.footer-friends-links a:hover { color: var(--primary); }
.footer-copy { margin: 0; }
.featured-lead .resource-card-title-row h3 { font-size: 1.05rem; }
@media (max-width: 960px) { .home-layout { grid-template-columns: 1fr; } .home-aside { position: static; } .featured-layout { grid-template-columns: 1fr; } .featured-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) {
    .featured-grid { grid-template-columns: 1fr; }
    .carousel-viewport { height: clamp(120px, 40vw, 180px); }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track { transition: none; }
}

/* -------------------------------------------------------------------------- */
/* Home v7                                                                    */
/* -------------------------------------------------------------------------- */

.page-home { padding: 24px 0 40px; }

.hero-banner {
    background: linear-gradient(120deg, #3b6cf4 0%, #5b8cff 55%, #7ba4ff 100%);
    color: #fff;
    padding: 36px 0;
}

.hero-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-banner h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin: 8px 0 10px;
    letter-spacing: -0.02em;
}

.hero-banner p {
    opacity: 0.92;
    font-size: 0.95rem;
    max-width: 520px;
}

.hero-banner .eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.hero-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-banner .btn-primary {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    box-shadow: none;
}

.hero-banner .btn-soft {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.block { margin-bottom: 32px; }

.block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.block-head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.block-head a {
    font-size: 0.8125rem;
    color: var(--text-faint);
}

.block-head a:hover { color: var(--primary); }

.home-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.home-side {
    position: sticky;
    top: calc(var(--header-h) + 12px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.side-panel h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.side-links { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.side-links a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.side-links a:hover {
    background: var(--primary-muted);
    color: var(--primary);
}

.resource-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.panel-card {
    box-shadow: var(--shadow-sm);
}

@media (max-width: 960px) {
    .home-columns { grid-template-columns: 1fr; }
    .home-side { position: static; }
}

@media (max-width: 640px) {
    .category-card {
        flex: 0 0 148px;
        min-height: 64px;
        padding: 12px 14px;
    }
}

@media (max-width: 768px) {
    .submit-choice-grid {
        grid-template-columns: 1fr;
    }

    .header-top-inner {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 12px 0;
    }

    .logo { grid-column: 1; }
    .nav-toggle { display: inline-flex; grid-column: 2; grid-row: 1; }
    .auth-links { grid-column: 2; grid-row: 1; justify-self: end; margin-right: 48px; }
    .search-form-main { grid-column: 1 / -1; width: 100%; }

    .nav-strip-inner { position: relative; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 8px;
        box-shadow: var(--shadow-md);
        z-index: 50;
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { width: 100%; border-radius: 0; padding: 10px 0; }

    .footer-main { grid-template-columns: 1fr; gap: 28px; }
    .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-bottom { flex-direction: column; align-items: flex-start; }

    .footer-v2 { padding: 32px 0 28px; }
    .footer-v2-grid,
    .footer-v2-grid--no-qr {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-v2-brand {
        max-width: none;
        align-items: center;
        text-align: center;
    }
    .footer-v2-qr {
        justify-self: center;
    }
}

.auth-inline-links {
    margin: -4px 0 12px;
    text-align: right;
    font-size: 0.8125rem;
}

.author-page .author-hero-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.author-page .author-hero-meta h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.author-page .author-bio {
    margin: 10px 0;
    line-height: 1.65;
}

.resource-author-bar .author-name-row a {
    color: inherit;
    text-decoration: none;
}

.resource-author-bar .author-name-row a:hover {
    color: var(--primary);
}

.author-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.author-follow-form {
    flex-shrink: 0;
}

.uc-purchase-list,
.uc-follow-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.uc-purchase-item,
.uc-follow-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.uc-purchase-item:last-child,
.uc-follow-item:last-child {
    border-bottom: 0;
}

.uc-follow-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.page-static-body {
    line-height: 1.7;
}

.page-static-body ul {
    padding-left: 1.2rem;
}

.resource-report-form .field {
    display: block;
    margin-bottom: 0.65rem;
}

.resource-report-form .field span {
    display: block;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    color: var(--muted-foreground);
}

.resource-report-panel {
    width: min(100%, 440px);
}

.resource-report-body {
    gap: 14px;
}

.resource-report-intro {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.resource-report-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.resource-report-select-wrap {
    position: relative;
}

.resource-report-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

.resource-report-select,
.resource-report-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    color: var(--text);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.resource-report-select {
    appearance: none;
    padding: 11px 40px 11px 12px;
    cursor: pointer;
}

.resource-report-textarea {
    padding: 12px 14px;
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.resource-report-select:focus,
.resource-report-textarea:focus {
    outline: none;
    border-color: var(--primary-border);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.resource-report-hint {
    font-size: 0.75rem;
    color: var(--text-faint);
    line-height: 1.5;
}

.resource-report-footer {
    background: var(--bg-inset);
}

.resource-report-guest {
    text-align: center;
    padding: 8px 4px 4px;
}

.resource-report-guest-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
}

.resource-report-login-tip {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    color: var(--text);
    font-weight: 500;
}

.copy-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.35s ease;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    max-width: min(92vw, 520px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------------------------------- */
/* Dark theme + polish                                                        */
/* -------------------------------------------------------------------------- */

html[data-theme="dark"] {
    --bg: #10151c;
    --bg-subtle: #161d27;
    --bg-card: #1a222e;
    --bg-hover: #222b38;
    --bg-inset: #141b24;
    --border: #2a3444;
    --border-strong: #3a465a;
    --text: #e8eef7;
    --text-muted: #9aa8bc;
    --text-faint: #6f7f94;
    --primary: #5b8cff;
    --primary-hover: #7aa2ff;
    --primary-muted: #1d2b45;
    --primary-border: #2f4a78;
    --success: #22c55e;
    --success-muted: #143328;
    --warning: #e0a23a;
    --danger: #f07178;
    --danger-muted: #3a1d22;
    --vip: #e0a23a;
    --vip-muted: #352714;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .nav-strip,
html[data-theme="dark"] .header-top {
    background: var(--bg-card);
}

html[data-theme="dark"] .site-logo-text {
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="dark"] .header-user-avatar {
    background: linear-gradient(135deg, #1d2b45, #243552);
}

html[data-theme="dark"] .carousel-btn {
    background: rgba(26, 34, 46, 0.92);
    color: var(--text);
}

html[data-theme="dark"] .uc-status-pending {
    background: var(--vip-muted);
    color: var(--warning);
}

html[data-theme="dark"] .user-table th,
html[data-theme="dark"] .user-table td,
html[data-theme="dark"] .resource-meta-table th,
html[data-theme="dark"] .resource-meta-table td {
    border-color: var(--border);
}

html[data-theme="dark"] .user-table thead th {
    background: var(--bg-inset);
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: var(--bg-inset);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--text-faint);
}

html[data-theme="dark"] .alert-error {
    background: #3a1d22;
    color: #fecaca;
    border-color: #7f1d1d;
}

html[data-theme="dark"] .alert-success {
    background: #143328;
    color: #a7f3d0;
    border-color: #065f46;
}

html[data-theme="dark"] .alert-warning {
    background: #352714;
    color: #fde68a;
    border-color: #854d0e;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-inset);
    color: var(--text-muted);
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

html[data-theme="light"] .theme-icon-dark,
html:not([data-theme]) .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: block; }

.alert.is-dismissible {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert.is-dismissible .alert-body { flex: 1; }
.alert-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

.vip-benefits {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.vip-benefits li {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
}
.vip-benefits strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
}
.vip-benefits span {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.welcome-steps {
    list-style: none;
    display: grid;
    gap: 14px;
    margin: 22px 0;
    counter-reset: welcome;
}
.welcome-steps li {
    position: relative;
    padding: 16px 16px 16px 52px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-inset);
}
.welcome-steps li::before {
    counter-increment: welcome;
    content: counter(welcome);
    position: absolute;
    left: 14px;
    top: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-muted);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
}
.welcome-steps p {
    margin: 6px 0 12px;
    color: var(--text-muted);
}
.welcome-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.welcome-extra a { color: var(--primary); }
.about-body h2 { margin: 22px 0 10px; font-size: 1.05rem; }
.about-body ul { padding-left: 1.2em; margin-bottom: 12px; color: var(--text-muted); }
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.empty-state {
    text-align: center;
    padding: 36px 18px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-inset);
}
.empty-state p { margin-bottom: 12px; }
.uc-empty {
    text-align: center;
    padding: 36px 18px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .vip-benefits { grid-template-columns: 1fr; }
}

.invite-promo-wrap { margin: 18px 0 8px; }
.invite-promo {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--primary-border);
    background: linear-gradient(135deg, rgba(59, 108, 244, 0.1) 0%, #fff 70%);
    box-shadow: var(--shadow-sm);
}
.invite-promo-mark { color: var(--primary); flex: 0 0 auto; }
.invite-promo-copy { flex: 1 1 220px; }
.invite-promo-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}
.invite-promo h2 { font-size: 1.15rem; margin: 0; }
.invite-promo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.invite-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.invite-stat {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.invite-stat span { display: block; color: var(--text-muted); font-size: 0.8125rem; }
.invite-stat strong { font-size: 1.6rem; }
.invite-stat em { font-style: normal; color: var(--text-faint); margin-left: 2px; }
.invite-link-panel { margin-top: 8px; }
.invite-link-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.invite-code-chip {
    font-size: 0.8125rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-muted);
    color: var(--primary);
}
.invite-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
}
.invite-link-box input {
    flex: 1;
    border: 0;
    background: transparent;
    min-width: 0;
    font-size: 0.875rem;
}
.invite-copy-btn {
    border: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}
.invite-copy-btn.is-copied { background: var(--success); }
.invite-rules {
    margin: 14px 0 0;
    padding-left: 1.2em;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.invite-rules li { margin: 4px 0; }
@media (max-width: 768px) {
    .invite-stats { grid-template-columns: 1fr; }
}

.fxap-page { padding-bottom: 40px; }
.fxap-card { max-width: 720px; }
.fxap-card .resource-file-drop.has-file .resource-file-drop-inner {
    border-style: solid;
    border-color: var(--primary-border);
}
.fxap-card .resource-file-drop.is-busy {
    pointer-events: none;
    opacity: 0.65;
}
.fxap-field { display: block; margin: 16px 0 0; }
.fxap-field span { display: block; margin-bottom: 6px; font-size: 0.8125rem; color: var(--text-muted); }
.fxap-field span em { font-style: normal; color: var(--text-faint); margin-left: 6px; }
.fxap-field input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: var(--bg-card);
    color: var(--text);
}
.fxap-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.fxap-card .resource-modal-upload-progress { margin-top: 2px; }
.fxap-card .resource-modal-upload-progress-bar span.is-working {
    width: 40% !important;
    background: linear-gradient(90deg, var(--primary), #7aa2ff 55%, var(--primary));
    background-size: 200% 100%;
    animation: lp-shimmer 1.4s linear infinite;
}
