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

/* ── Accessibility: Skip Link ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    transition: top 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
    top: 16px;
}

/* ── Accessibility: Screen Reader Only ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Accessibility: Focus Indicators ── */
:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

/* Ensure focus styles work on all interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

/* Remove default outline and use custom focus-visible */
button:focus,
a:focus,
input:focus {
    outline: none;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(148, 163, 184, 0.08), transparent 34%),
        linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e5e7eb;
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

/* Aurora background */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.orb-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 72%);
    top: -160px;
    left: -120px;
    animation: drift-1 22s ease-in-out infinite alternate;
}

.orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    bottom: -140px;
    right: -120px;
    animation: drift-2 24s ease-in-out infinite alternate;
}

.orb-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(148, 163, 184, 0.09) 0%, transparent 70%);
    top: 56%;
    left: 56%;
    transform: translate(-50%, -50%);
    animation: drift-3 26s ease-in-out infinite alternate;
}

.topbar {
    position: fixed;
    top: 22px;
    left: 22px;
    right: 22px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.topbar-btn,
.clock-chip {
    pointer-events: auto;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: rgba(229,231,235,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.topbar-btn:hover {
    transform: translateY(-1px);
    background: rgba(17, 24, 39, 0.84);
    border-color: rgba(255,255,255,0.14);
}

.clock-chip {
    min-width: 116px;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e5e7eb;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@keyframes drift-1 {
    to { transform: translate(200px, 220px) scale(1.3); }
}

@keyframes drift-2 {
    to { transform: translate(-180px, -160px) scale(1.2); }
}

@keyframes drift-3 {
    to { transform: translate(calc(-50% + 140px), calc(-50% - 100px)) scale(0.75); }
}

/* ── Card (two-column) ── */
.card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    width: 640px;
    padding: 36px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.28);
    will-change: transform, opacity;
    animation: card-enter 0.4s ease-out forwards;
}

@keyframes card-enter {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Card switch animations (performance optimized) ── */
.card-exit {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-enter {
    animation: card-switch-in 0.3s ease-out forwards;
}

@keyframes card-switch-in {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Left column ── */
.card-left {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-right: 40px;
}

/* ── Divider ── */
.divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

/* ── Right column ── */
.card-right {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 40px;
    min-width: 0;
}

/* ── Avatar + ring ── */
.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
    will-change: transform;
}

.ring-track {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 3;
}

.ring-fill {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 339.3;
    stroke-dashoffset: 0;
    will-change: stroke-dashoffset;
    transition: stroke-dashoffset 0.95s linear;
}

#avatar {
    position: absolute;
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

#avatar:not([src]),
#avatar[src=""] {
    visibility: hidden;
}

/* ── Countdown (under avatar) ── */
.countdown-display {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.countdown-num {
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1;
    color: #f8fafc;
    min-width: 1.4em;
    text-align: center;
    display: inline-block;
}

.countdown-label {
    font-size: 0.78em;
    color: rgba(229,231,235,0.54);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* ── Pause Button ── */
.pause-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(229,231,235,0.6);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
    flex-shrink: 0;
}

.pause-btn:hover {
    background: rgba(255,255,255,0.14);
    color: rgba(229,231,235,0.9);
    transform: scale(1.08);
}

.pause-btn.is-paused {
    background: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
}

.pause-btn.is-paused:hover {
    background: rgba(167, 139, 250, 0.3);
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e5e7eb;
    font-size: 0.88em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.24);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    white-space: nowrap;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast.toast-success {
    border-color: rgba(74, 222, 128, 0.3);
}

.toast.toast-error {
    border-color: rgba(248, 113, 113, 0.3);
}

.toast.toast-info {
    border-color: rgba(96, 165, 250, 0.3);
}

/* ── Name ── */
.vup-name {
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #f8fafc;
    line-height: 1.2;
}

/* ── Intro ── */
.vup-intro {
    color: rgba(229,231,235,0.68);
    font-size: 0.92em;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 5.6em;
}

/* ── Buttons ── */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 0.93em;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    /* 触摸优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.btn:hover {
    will-change: transform;
}

.btn:active {
    transform: scale(0.96) !important;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        background: var(--accent-primary);
    }
    
    .topbar-btn:hover,
    .topbar-icon-btn:hover,
    .tag-btn:hover,
    .vup-grid-item:hover {
        transform: none;
    }
}

.btn-primary {
    background: #f8fafc;
    color: #0f172a;
    box-shadow: none;
}

.btn-primary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: rgba(229,231,235,0.82);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.16);
    transform: translateY(-1px);
}

/* ── Button Row (for side-by-side buttons) ── */
.btn-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.btn-row .btn {
    flex: 1;
}

.all-vup-overlay {
    position: fixed;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    will-change: opacity;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.all-vup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.all-vup-panel {
    width: min(1040px, 100%);
    max-height: min(82vh, 920px);
    padding: 24px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 56px rgba(0,0,0,0.28);
    overflow: hidden;
    will-change: transform;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-title {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.panel-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: transparent;
    color: rgba(229,231,235,0.86);
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.panel-close:hover {
    transform: scale(1.02);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.16);
}

.vup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    max-height: calc(82vh - 108px);
    overflow: auto;
    padding-right: 6px;
    /* 性能优化：跳过视口外内容的渲染 */
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.vup-grid-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.vup-grid-item:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
}

.vup-grid-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.06);
}

.vup-grid-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
}

.vup-grid-intro {
    color: rgba(229,231,235,0.56);
    font-size: 0.82rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Responsive: 平板 ── */
@media (max-width: 768px) {
    .card {
        width: calc(100vw - 40px);
        max-width: 580px;
    }

    .topbar-btn span {
        display: none;
    }

    .topbar-right {
        gap: 8px;
    }

    .topbar-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .clock-chip {
        min-width: 100px;
        font-size: 0.88rem;
    }
}

/* ── Responsive: 手机 ── */
@media (max-width: 620px) {
    .topbar {
        top: 12px;
        left: 12px;
        right: 12px;
        gap: 8px;
    }

    .topbar-btn {
        padding: 0 12px;
        min-height: 40px;
        font-size: 0.85rem;
    }

    .topbar-btn span {
        display: none;
    }

    .topbar-right {
        gap: 6px;
    }

    .topbar-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .clock-chip {
        min-width: 88px;
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .card {
        flex-direction: column;
        width: calc(100vw - 24px);
        padding: 24px 18px 22px;
        border-radius: 20px;
        gap: 18px;
    }

    .card-left {
        padding-right: 0;
        padding-bottom: 0;
    }

    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }

    .divider {
        width: 100%;
        height: 1px;
        align-self: auto;
        margin: 4px 0;
    }

    .card-right {
        padding-left: 0;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .vup-name {
        font-size: 1.5em;
    }

    .vup-intro {
        font-size: 0.88em;
        -webkit-line-clamp: 3;
        min-height: 4em;
        line-height: 1.6;
    }

    .button-group {
        gap: 8px;
    }

    .btn {
        min-height: 44px;
        padding: 0 16px;
        font-size: 0.9em;
    }

    .all-vup-overlay {
        padding: 12px;
    }

    .all-vup-panel {
        padding: 16px;
        border-radius: 20px;
        max-height: 88vh;
    }

    .panel-header {
        margin-bottom: 14px;
        gap: 12px;
    }

    .panel-title {
        font-size: 1rem;
    }

    .panel-close {
        width: 38px;
        height: 38px;
    }

    .panel-toolbar {
        margin-bottom: 12px;
    }

    .vup-search {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .tag-filter {
        gap: 6px;
        margin-bottom: 12px;
    }

    .tag-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .vup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        max-height: calc(88vh - 140px);
    }

    .vup-grid-item {
        padding: 12px;
        border-radius: 14px;
        gap: 8px;
    }

    .vup-grid-avatar {
        width: 64px;
        height: 64px;
    }

    .vup-grid-name {
        font-size: 0.9rem;
    }

    .vup-grid-intro {
        font-size: 0.78rem;
        -webkit-line-clamp: 2;
    }
}

/* ── Responsive: 小屏手机 ── */
@media (max-width: 380px) {
    .card {
        padding: 20px 16px 18px;
        border-radius: 18px;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }

    .vup-name {
        font-size: 1.3em;
    }

    .vup-intro {
        font-size: 0.85em;
    }

    .vup-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .vup-grid-avatar {
        width: 56px;
        height: 56px;
    }
}

/* ── Reduced motion: 尊重用户系统偏好 ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ring-fill {
        transition: none !important;
    }
}

/* ── 自定义滚动条（弹窗内列表） ── */
.vup-grid::-webkit-scrollbar {
    width: 6px;
}

.vup-grid::-webkit-scrollbar-track {
    background: transparent;
}

.vup-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.vup-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── 主题变量 ── */
:root, [data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-hover: rgba(17, 24, 39, 0.84);
    --bg-input: rgba(15, 23, 42, 0.72);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.14);
    --text-primary: #e5e7eb;
    --text-secondary: rgba(229, 231, 235, 0.68);
    --text-muted: rgba(229, 231, 235, 0.54);
    --accent-primary: #f8fafc;
    --accent-secondary: rgba(229, 231, 235, 0.82);
    --shadow-color: rgba(0, 0, 0, 0.18);
    --orb-1: rgba(56, 189, 248, 0.12);
    --orb-2: rgba(255, 255, 255, 0.05);
    --orb-3: rgba(148, 163, 184, 0.09);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.14);
    --text-primary: #1e293b;
    --text-secondary: rgba(30, 41, 59, 0.7);
    --text-muted: rgba(30, 41, 59, 0.5);
    --accent-primary: #0f172a;
    --accent-secondary: rgba(30, 41, 59, 0.82);
    --shadow-color: rgba(0, 0, 0, 0.08);
    --orb-1: rgba(56, 189, 248, 0.15);
    --orb-2: rgba(148, 163, 184, 0.08);
    --orb-3: rgba(99, 102, 241, 0.1);
}

/* ── 主题应用 ── */
body {
    background:
        radial-gradient(circle at top, var(--orb-1), transparent 34%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
}

.orb-1 {
    background: radial-gradient(circle, var(--orb-1) 0%, transparent 72%);
}

.orb-2 {
    background: radial-gradient(circle, var(--orb-2) 0%, transparent 70%);
}

.orb-3 {
    background: radial-gradient(circle, var(--orb-3) 0%, transparent 70%);
}

.topbar-btn {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.topbar-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.clock-chip {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.card {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 18px 48px var(--shadow-color);
}

.vup-name {
    color: var(--text-primary);
}

.vup-intro {
    color: var(--text-secondary);
}

.countdown-num {
    color: var(--accent-primary);
}

.countdown-label {
    color: var(--text-muted);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--text-secondary);
}

.btn-ghost {
    background: transparent;
    color: var(--accent-secondary);
    border-color: var(--border-color);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.all-vup-overlay {
    background: rgba(2, 6, 23, 0.62);
}

[data-theme="light"] .all-vup-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.all-vup-panel {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 20px 56px var(--shadow-color);
}

.panel-title {
    color: var(--text-primary);
}

.panel-close {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.vup-grid-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

[data-theme="light"] .vup-grid-item {
    background: rgba(0, 0, 0, 0.02);
}

.vup-grid-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

[data-theme="light"] .vup-grid-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.vup-grid-name {
    color: var(--accent-primary);
}

.vup-grid-intro {
    color: var(--text-secondary);
}

/* ── 新增 UI 元素 ── */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.topbar-icon-btn:hover {
    transform: scale(1.05);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.panel-toolbar {
    margin-bottom: 16px;
}

.vup-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.vup-search::placeholder {
    color: var(--text-muted);
}

.vup-search:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag-btn {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.16s ease;
}

.tag-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.tag-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.vup-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── 卡片切换动画 ── */
.card {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
