/* ========== 主题变量 ========== */
:root {
    color-scheme: dark;
    --bg-deep: #0a0e17;
    --bg-surface: rgba(20, 25, 35, 0.65);
    --bg-surface-hover: rgba(30, 36, 48, 0.8);
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-tertiary: #6b7280;
    --glass-bg: rgba(20, 25, 35, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(30, 36, 48, 0.8);
    --accent: #8ab4f8;
    --accent-dim: rgba(138, 180, 248, 0.25);
    --accent-strong: rgba(138, 180, 248, 0.5);
    --danger: #f87171;
    --danger-dim: rgba(248, 113, 113, 0.2);
    --bookmark-bg: rgba(22, 27, 38, 0.7);
    --bookmark-hover: rgba(35, 42, 56, 0.85);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 50px;
    --transition-fast: 0.18s ease;
    --transition-smooth: 0.3s ease;

    --suggestions-bg: rgba(18, 23, 35, 0.85);
    --suggestions-border: rgba(255, 255, 255, 0.1);
    --suggestions-hover: rgba(138, 180, 248, 0.12);
    --suggestion-badge-bg: rgba(255, 255, 255, 0.06);

    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --btn-bg: rgba(255, 255, 255, 0.04);
    --btn-border: rgba(255, 255, 255, 0.15);
    --btn-hover-bg: rgba(255, 255, 255, 0.1);
    --btn-primary-bg: rgba(138, 180, 248, 0.2);
    --btn-primary-border: rgba(138, 180, 248, 0.4);
    --btn-danger-bg: rgba(248, 113, 113, 0.1);

    --engine-btn-bg: rgba(255, 255, 255, 0.03);
    --engine-btn-border: transparent;
    --engine-btn-hover-bg: rgba(255, 255, 255, 0.07);
    --engine-btn-hover-border: rgba(255, 255, 255, 0.1);
    --engine-btn-active-bg: rgba(138, 180, 248, 0.2);
    --engine-btn-active-border: rgba(138, 180, 248, 0.45);

    --toggle-bg: rgba(255, 255, 255, 0.1);
    --toggle-border: rgba(255, 255, 255, 0.1);
    --select-bg: rgba(255, 255, 255, 0.04);
    --select-border: rgba(255, 255, 255, 0.08);
    --select-hover-bg: rgba(255, 255, 255, 0.08);
    --select-option-bg: #1a1f2b;
    --scrollbar-thumb: rgba(255, 255, 255, 0.15);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);
    --toast-bg: rgba(30, 36, 50, 0.9);
    --overlay-bg: rgba(0, 0, 0, 0.55);
    --settings-panel-bg: rgba(20, 25, 38, 0.94);
    --settings-row-bg: rgba(255, 255, 255, 0.02);
    --settings-row-active-bg: rgba(255, 255, 255, 0.05);
    --history-clear-border: rgba(255, 255, 255, 0.06);
    --file-upload-label-bg: rgba(255, 255, 255, 0.04);
    --file-upload-label-border: rgba(255, 255, 255, 0.15);
    --file-upload-label-hover-bg: rgba(255, 255, 255, 0.1);

    /* 粒子颜色变量 */
    --particle-color: rgba(160, 190, 225, 0.28);
    --particle-glow-start: rgba(200, 215, 240, 0.7);
    --particle-glow-mid: rgba(170, 195, 225, 0.35);
    --particle-glow-end: rgba(140, 170, 210, 0);
    --particle-core: rgba(215, 225, 245, 0.6);

    /* 天气图表颜色变量 */
    --temp-color: #f87171;
    --feel-color: #8ab4f8;
    --precip-color: rgba(74, 108, 247, 0.5);
    --grid-color: rgba(128, 128, 128, 0.15);
}

:root[data-theme="light"] {
        --bg-deep: #f0f2f5;
        --bg-surface: rgba(255, 255, 255, 0.75);
        --bg-surface-hover: rgba(255, 255, 255, 0.9);
        --text-primary: #1a1a2e;
        --text-secondary: #555770;
        --text-tertiary: #8889a0;
        --glass-bg: rgba(255, 255, 255, 0.75);
        --glass-border: rgba(0, 0, 0, 0.06);
        --glass-hover: rgba(255, 255, 255, 0.9);
        --accent: #4a6cf7;
        --accent-dim: rgba(74, 108, 247, 0.2);
        --accent-strong: rgba(74, 108, 247, 0.4);
        --danger: #e53e3e;
        --danger-dim: rgba(229, 62, 62, 0.15);
        --bookmark-bg: rgba(255, 255, 255, 0.8);
        --bookmark-hover: rgba(255, 255, 255, 0.95);
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
        --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
        --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
        --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);

        --suggestions-bg: rgba(255, 255, 255, 0.9);
        --suggestions-border: rgba(0, 0, 0, 0.08);
        --suggestions-hover: rgba(74, 108, 247, 0.1);
        --suggestion-badge-bg: rgba(0, 0, 0, 0.06);

        --input-bg: rgba(0, 0, 0, 0.03);
        --input-border: rgba(0, 0, 0, 0.1);
        --btn-bg: rgba(0, 0, 0, 0.04);
        --btn-border: rgba(0, 0, 0, 0.12);
        --btn-hover-bg: rgba(0, 0, 0, 0.08);
        --btn-primary-bg: rgba(74, 108, 247, 0.15);
        --btn-primary-border: rgba(74, 108, 247, 0.35);
        --btn-danger-bg: rgba(229, 62, 62, 0.1);

        --engine-btn-bg: rgba(0, 0, 0, 0.03);
        --engine-btn-border: transparent;
        --engine-btn-hover-bg: rgba(0, 0, 0, 0.06);
        --engine-btn-hover-border: rgba(0, 0, 0, 0.1);
        --engine-btn-active-bg: rgba(74, 108, 247, 0.15);
        --engine-btn-active-border: rgba(74, 108, 247, 0.35);

        --toggle-bg: rgba(0, 0, 0, 0.1);
        --toggle-border: rgba(0, 0, 0, 0.1);
        --select-bg: rgba(0, 0, 0, 0.03);
        --select-border: rgba(0, 0, 0, 0.1);
        --select-hover-bg: rgba(0, 0, 0, 0.06);
        --select-option-bg: #ffffff;
        --scrollbar-thumb: rgba(0, 0, 0, 0.15);
        --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);
        --toast-bg: rgba(255, 255, 255, 0.9);
        --overlay-bg: rgba(0, 0, 0, 0.3);
        --settings-panel-bg: rgba(255, 255, 255, 0.95);
        --settings-row-bg: rgba(0, 0, 0, 0.02);
        --settings-row-active-bg: rgba(0, 0, 0, 0.05);
        --history-clear-border: rgba(0, 0, 0, 0.06);
        --file-upload-label-bg: rgba(0, 0, 0, 0.03);
        --file-upload-label-border: rgba(0, 0, 0, 0.12);
        --file-upload-label-hover-bg: rgba(0, 0, 0, 0.06);

        --particle-color: rgba(80, 100, 140, 0.25);
        --particle-glow-start: rgba(100, 120, 160, 0.7);
        --particle-glow-mid: rgba(120, 140, 180, 0.3);
        --particle-glow-end: rgba(140, 160, 200, 0);
        --particle-core: rgba(80, 100, 140, 0.5);

        --temp-color: #d44;
        --feel-color: #3b82f6;
        --precip-color: rgba(59, 130, 246, 0.4);
        --grid-color: rgba(0, 0, 0, 0.1);
}

/* ========== 全局 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-deep);
    transition: background-color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blinkColon {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 壁纸 */
#wallpaper-layer {
    position: fixed;
    /* 参与视差时：四周外扩 --parallax-pad（= data-parallax-max * depth）像素，
       背景 cover 居中裁切，视觉不变，但平移最远时不会露出页面背景 */
    top: calc(-1 * var(--parallax-pad, 0px));
    left: calc(-1 * var(--parallax-pad, 0px));
    width: calc(100% + 2 * var(--parallax-pad, 0px));
    height: calc(100% + 2 * var(--parallax-pad, 0px));
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
    opacity: 1;
    will-change: transform;
}

#wallpaper-layer.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 仓库壁纸固定提示（右上角） */
.wallpaper-hint {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-xl);
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease,
        border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 仅鼠标移到右上角（悬停）时才显示文字底部背景 */
.wallpaper-hint:hover,
.wallpaper-hint:focus-within {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.wallpaper-hint.hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.wallpaper-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--accent);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

/* 文字区：问题 + 推荐者（上下两行） */
.wallpaper-hint-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.wallpaper-hint-about {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.wallpaper-hint-about.hidden {
    display: none;
}

/* 固定后只保留图钉图标，推荐者也一并隐藏 */
.wallpaper-hint.pinned .wallpaper-hint-about {
    display: none;
}

.wallpaper-hint-label {
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.wallpaper-hint-btn:hover .wallpaper-hint-label {
    color: var(--text-primary);
}

/* 图钉图标：默认隐藏；固定后显示 */
.wallpaper-hint .wallpaper-hint-icon {
    display: none;
    width: 16px;
    height: 16px;
}

.wallpaper-hint.pinned .wallpaper-hint-icon {
    display: inline-block;
    color: var(--accent);
}

/* 固定后：只保留图钉图标，悬停时才展开“取消固定” */
.wallpaper-hint.pinned .wallpaper-hint-msg,
.wallpaper-hint.pinned .wallpaper-hint-label {
    display: none;
}

.wallpaper-hint.pinned:hover .wallpaper-hint-label,
.wallpaper-hint.pinned:focus-within .wallpaper-hint-label {
    display: inline;
}

.wallpaper-pin-status {
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 20px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 500;
    vertical-align: middle;
}

.wallpaper-pin-status.hidden {
    display: none;
}

.settings-hint {
    margin: 10px 2px 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-tertiary);
}

.settings-hint a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.settings-hint a:hover {
    color: var(--text-primary);
}

/* 设置面板中的壁纸推荐者信息 */
.wallpaper-about {
    color: var(--accent);
}

.wallpaper-about.hidden {
    display: none;
}

/* 粒子 */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: none;
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.main-container>* {
    pointer-events: auto;
}

/* 时间 */
.time-section {
    text-align: center;
    margin-bottom: 28px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    /* backwards（非 both）：入场结束后放行普通样式，否则 fill 钉住 opacity:1 使 :hover 失效 */
    animation: fadeInUp 0.8s ease-out backwards;
    animation-delay: 0.05s;
}

.time-section:hover {
    opacity: 0.8;
}

.clock {
    font-size: clamp(3.2rem, 8vw, 5.6rem);
    font-weight: 200;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    filter: drop-shadow(0 0 34px var(--accent-dim));
    font-variant-numeric: tabular-nums;
    font-family: 'SF Pro Display', 'Segoe UI', system-ui, monospace;
}

/* 渐变仅作用于数字片段，避免 background-clip:text 冻结 .colon 的偏移 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .clock-grad {
        background: linear-gradient(180deg, var(--text-primary) 38%, var(--accent) 155%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

.colon {
    /* 呼吸式冒号（原 2615 的 .clock .colon 重复定义合并至此，单一事实来源） */
    animation: blinkColon 1.4s ease-in-out infinite;
    display: inline-block;
    width: 0.5em;
    text-align: center;
    /* 冒号字形偏下（x 高度 vs 数字高度），向上微调使其与数字视觉居中 */
    position: relative;
    top: -0.1em;
}

.date-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* 搜索 */
.search-section {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease-out both;
    animation-delay: 0.15s;
}

.search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all var(--transition-smooth);
    z-index: 10;
}

.search-wrapper:focus-within {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 6px var(--accent-dim);
    background: var(--bg-surface-hover);
}

.search-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    opacity: 0.6;
}

.search-wrapper:focus-within .search-icon {
    opacity: 0.9;
}

.search-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.search-input {
    flex: 1;
    height: 50px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.05rem;
    padding: 0 16px 0 6px;
    font-family: inherit;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-clear {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--btn-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    opacity: 0;
    transform: scale(0.7);
    transition: all var(--transition-fast);
    pointer-events: none;
    font-size: 1.1rem;
}

.search-clear.visible {
    opacity: 0.7;
    transform: scale(1);
    pointer-events: auto;
}

.search-clear:hover {
    opacity: 1;
    background: var(--btn-hover-bg);
    color: var(--text-primary);
}

/* 建议下拉 */
.suggestions-dropdown {
    width: 100%;
    background: var(--suggestions-bg);
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    border: 1px solid var(--suggestions-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    z-index: 15;
    overflow-y: auto;
    transition: max-height 0.25s ease, padding 0.25s ease;
    display: flex;
    flex-direction: column;
    max-height: 0;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    animation: dropdownIn 0.25s ease-out;
}

.suggestions-dropdown::-webkit-scrollbar {
    display: none;
}

.suggestions-dropdown.active {
    padding: 6px 0;
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
    margin: 2px 6px;
    border-radius: 10px;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--suggestions-hover);
    color: var(--text-primary);
}

.suggestion-item .sug-icon {
    width: 18px;
    height: 18px;
    opacity: 0.45;
    flex-shrink: 0;
}

.suggestion-item .sug-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-item .sug-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--suggestion-badge-bg);
    color: var(--text-tertiary);
}

.suggestion-item.no-results {
    justify-content: center;
    color: var(--text-tertiary);
    pointer-events: none;
}

.btn-delete-history {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 6px;
    opacity: 0.5;
}

.btn-delete-history:hover {
    opacity: 1;
    color: var(--danger);
    background: var(--danger-dim);
}

.history-clear-all {
    display: block;
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--history-clear-border);
    padding: 10px 18px;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
}

.history-clear-all:hover {
    color: var(--danger);
    background: var(--danger-dim);
}

.bookmarks-section.hidden-by-suggestions {
    display: none !important;
}

/* 搜索引擎按钮 */
.engine-switcher {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.engine-btn {
    padding: 9px 18px;
    border-radius: 20px;
    border: 1.5px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    font-family: inherit;
    transition: all var(--transition-fast);
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--shadow-sm);
}

.engine-btn:hover {
    background: var(--glass-hover);
    border-color: var(--accent-strong);
    color: var(--text-primary);
    box-shadow: var(--shadow-md), 0 0 20px var(--accent-dim);
    transform: translateY(-1px);
}

.engine-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.engine-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent-strong);
    color: var(--accent);
    font-weight: 500;
    box-shadow: 0 0 16px var(--accent-dim);
}

/* 书签 */
.bookmarks-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(10px, 2vw, 18px);
    margin-top: 30px;
    max-width: 620px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out both;
    animation-delay: 0.28s;
}

.bookmark-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 6px;
    border-radius: var(--radius-md);
    min-width: 66px;
    transition: all var(--transition-smooth);
}

.bookmark-item:hover {
    color: var(--text-primary);
    transform: translateY(-5px);
}

.bookmark-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bookmark-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

/* .bookmark-item:hover .bookmark-icon-wrapper 完整定义已合并至文末「美化增强」区（M8 去重） */

.bookmark-icon-wrapper img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    z-index: 1;
}

.bookmark-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.55;
    z-index: 0;
}

.bookmark-name {
    font-size: 0.75rem;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 无书签时的“添加书签”入口 */
.bookmark-add .bookmark-icon-wrapper {
    border-style: dashed;
    background: transparent;
}

.bookmark-add-icon .svg-icon {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.bookmark-add:hover .bookmark-add-icon .svg-icon {
    color: var(--accent);
    opacity: 1;
}

/* 设置按钮 */
.settings-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 30;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 1.2rem;
}

/* FAB 光晕（原美化增强区规则，已归位） */
.settings-fab:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    transform: rotate(30deg) scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 26px var(--accent-dim);
}

/* 设置面板 */
.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.settings-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.settings-panel {
    background: var(--settings-panel-bg);
    backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    max-width: 860px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.3s;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
}

.settings-overlay.open .settings-panel {
    transform: translateY(0) scale(1);
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
}

.settings-panel-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.settings-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: var(--btn-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

/* 关闭按钮悬停旋转（原美化增强区规则，已归位） */
.settings-close-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.settings-panel-main {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.settings-sidebar {
    flex-shrink: 0;
    width: 176px;
    padding: 16px 10px;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    scrollbar-width: none;
}

.settings-sidebar::-webkit-scrollbar {
    display: none;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    text-align: left;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.settings-nav-item:hover {
    background: var(--btn-hover-bg);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: var(--btn-primary-bg);
    color: var(--accent);
}

/* 侧栏式左侧激活指示条（窄屏 chip 态在媒体查询里隐藏） */
.settings-nav-item {
    position: relative;
}

.settings-nav-item::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 3px;
    background: var(--accent);
    transform: translateY(-50%);
    transition: height 0.25s ease;
}

.settings-nav-item.active::before {
    height: 55%;
}

.settings-nav-item .svg-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.settings-panel-body {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.settings-panel-body::-webkit-scrollbar {
    width: 6px;
}

.settings-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.settings-panel-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
}

.settings-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

/* 跳转定位时的分区高亮闪烁。
   inset 首值 -10px 须与 js/settings.js 的 SECTION_HIGHLIGHT_OVERHANG 对应，
   跳转定位让出上外扩距离（另有 SLACK 余量），避免高亮框顶部被滚动口裁掉。 */
.settings-group.section-highlight::before {
    content: '';
    position: absolute;
    inset: -10px -12px;
    border-radius: var(--radius-md);
    border: 2px solid var(--accent-strong);
    background: var(--accent-dim);
    pointer-events: none;
    animation: section-highlight 1.6s var(--transition-smooth) forwards;
}

/* 设置项：默认仅显示标题+摘要，聚焦/悬浮/激活时展开详情 */
.settings-item {
    display: flex;
    flex-direction: column;
    background: var(--settings-row-bg);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    cursor: pointer;
}

.settings-item:focus-visible {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.settings-item:hover {
    /* hover 与主题变量统一，避免明暗主题下手写色值不一致 */
    background: var(--btn-hover-bg);
}

.settings-item[data-active="true"] {
    background: var(--settings-row-active-bg);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.settings-item-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
}

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

.settings-item-title {
    font-size: 0.92rem;
    color: var(--text-primary);
    font-weight: 500;
}

.settings-item-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    transition: opacity var(--transition-fast);
}

.settings-item[data-active="true"] .settings-item-hint {
    -webkit-line-clamp: 3;
    opacity: 1;
}

.settings-item-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 60%;
}

.settings-item-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth), opacity var(--transition-smooth), padding var(--transition-smooth);
}

.settings-item[data-active="true"] .settings-item-details {
    max-height: 480px;
    opacity: 1;
}

@keyframes section-highlight {
    0% {
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.settings-group-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 600;
}

/* 设置行统一使用 .settings-item（含摘要/控件/可展开详情的完整结构） */

/* 宽控件位变体：控件区占满剩余宽度（档案选择、输入框行等） */
.settings-item--wide .settings-item-control {
    flex: 1;
    max-width: none;
}

/* 只读信息行变体：「关于」等同为卡片框视觉，但无交互/无激活态 */
.settings-item--info {
    cursor: default;
}

.settings-item--info:hover {
    /* 只读行不做 hover 变色，与可交互设置行区分 */
    background: var(--settings-row-bg);
}

/* 子分区小标题：主分区下的次级分组（默认引擎 / 自定义引擎 / 设置备份等） */
.settings-subheading {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 分组标题的辅助说明文字 */
.settings-group-note,
.settings-subheading-note {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* 无标题的纯布局组合行（输入+按钮、双按钮组等），替换原 .settings-row */
.settings-inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    transition: background var(--transition-fast);
}

.settings-inline-row:hover {
    background: var(--btn-hover-bg);
}

.settings-footer-spacer {
    flex: 1 1 0;
}

/* 仅供读屏的隐藏文本（不改变视觉布局） */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.about-value {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: right;
    word-break: break-word;
}

.about-value .about-sub {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.about-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

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

/* 数据源相关的条件显示分组（UAPI 定位 / Open-Meteo 坐标） */
.settings-subgroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-subgroup[hidden] {
    display: none;
}

/* 开关 */
.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--toggle-bg);
    border-radius: 26px;
    border: 1px solid var(--toggle-border);
    transition: all var(--transition-smooth);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: all var(--transition-smooth);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    /* 开启态微光（原美化增强区规则，已归位） */
    box-shadow: 0 0 12px var(--accent-dim);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
    background: var(--accent);
}

/* 下拉选择 */
.settings-select {
    padding: 10px 36px 10px 14px;
    border-radius: 12px;
    background: var(--select-bg);
    border: 1px solid var(--select-border);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    min-width: 140px;
    box-shadow: var(--shadow-sm);
}

.settings-select:hover {
    background-color: var(--select-hover-bg);
    border-color: var(--accent-strong);
}

.settings-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.settings-select option {
    background: var(--select-option-bg);
    color: var(--text-primary);
}

/* 输入 */
.settings-input {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    flex: 1;
    min-width: 80px;
}

.settings-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* 弹性占宽：消内联 flex 的类化写法（需位于 .settings-input 之后以覆盖其默认 flex） */
.settings-stretch {
    /* flex: 1 = 1 1 0%：基准 0 方可均匀分配（auto 会让输入框固有宽度参与分配，导致同行宽度不一致） */
    flex: 1 1 0;
    min-width: 0;
}

.settings-stretch-2 {
    flex: 2 1 0;
    min-width: 0;
}

/* 滑块（雨效透明度等） */
.settings-range-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.settings-range {
    -webkit-appearance: none;
    appearance: none;
    width: 130px;
    height: 4px;
    border-radius: 2px;
    background: var(--input-border);
    outline: none;
    cursor: pointer;
}

.settings-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid var(--accent-strong);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.settings-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.settings-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 1px solid var(--accent-strong);
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.settings-range-value {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 颜色选择（雨效颜色等） */
.settings-color-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.settings-color-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    cursor: pointer;
}

.settings-color {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.settings-color::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.settings-color::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.settings-color::-moz-color-swatch {
    border: none;
    border-radius: 5px;
}

/* 按钮 */
.btn {
    padding: 9px 18px;
    border-radius: 20px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

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

.btn.primary {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-border);
    color: var(--accent);
    font-weight: 500;
}

.btn.primary:hover {
    background: var(--accent-strong);
}

.btn.danger {
    color: var(--danger);
}

.btn.danger:hover {
    background: var(--btn-danger-bg);
}

.btn-icon-danger {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--btn-danger-bg);
    color: var(--danger);
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-danger:hover {
    background: var(--danger-dim);
}

/* 书签编辑 */
.bookmark-edit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bookmark-edit-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
}

/* 上移/下移按钮：拖拽排序的触屏与键盘替代 */
.item-move-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
}

.btn-move {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn-move:hover {
    color: var(--accent);
    border-color: var(--accent-strong);
    background: var(--accent-dim);
}

.btn-move .svg-icon {
    width: 13px;
    height: 13px;
}

.btn-add-bookmark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed var(--btn-border);
    background: var(--btn-bg);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-add-bookmark:hover {
    border-color: var(--accent-strong);
    background: var(--accent-dim);
    color: var(--accent);
}

.settings-clear-btn {
    margin-top: 8px;
    justify-content: center;
}

.bookmark-io-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.bookmark-io-actions .btn {
    flex: 1;
    justify-content: center;
}

.settings-panel-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 壁纸 */
.wallpaper-preview {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--glass-border);
    margin-top: 6px;
}

.wallpaper-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--file-upload-label-border);
    background: var(--file-upload-label-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.file-upload-label:hover {
    background: var(--file-upload-label-hover-bg);
    color: var(--text-primary);
}

.file-upload-input {
    display: none;
}

/* 世界时钟 */
.world-clock-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.world-clock-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.world-clock-panel {
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(138, 180, 248, 0.08), transparent 60%),
        var(--settings-panel-bg);
    backdrop-filter: blur(30px) saturate(1.1);
    -webkit-backdrop-filter: blur(30px) saturate(1.1);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.3s;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.world-clock-overlay.open .world-clock-panel {
    transform: translateY(0) scale(1);
}

.world-clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
}

.world-clock-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* 头部右侧操作组：12/24 切换 + 关闭 */
.wc-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-hour-btn {
    height: 32px;
    min-width: 48px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--btn-bg);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wc-hour-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--text-primary);
    border-color: var(--accent-dim);
}

.wc-hour-btn[aria-pressed="true"] {
    color: var(--accent);
    border-color: var(--accent-strong);
    background: var(--btn-primary-bg);
}

.world-clock-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 控件排版行：外层 .wc-add-panel 已有边框/底色，此处不再套盒，避免双层包裹 */
.world-clock-add {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 列表滚动容器：纵向 padding 预留 hover 上浮(-2px)与外阴影(26px blur)的空间，避免被 overflow 裁切 */
.timezone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 6px 6px 16px;
}

.timezone-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.timezone-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-strong);
    /* 外阴影在滚动容器内容易被裁切，仅保留边框高亮 */
}

/* 当前本地时区：强调边框 + 左侧光条 */
.timezone-item.is-local {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 1px var(--accent-dim);
}

.timezone-item.is-local::after {
    content: '';
    position: absolute;
    left: 0;
    top: 14%;
    bottom: 14%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.tz-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.tz-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
}

.tz-name:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tz-time {
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    text-shadow: 0 8px 30px var(--accent-dim);
}

.tz-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* 昼夜 / 时差 / 冬夏令时 小标签 */
.tz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.tz-tag {
    font-size: 0.7rem;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    color: var(--text-tertiary);
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.tz-tag.tz-dn {
    color: var(--text-secondary);
}

.tz-tag.tz-dst {
    color: var(--accent-strong);
    border-color: var(--accent-dim);
}

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

/* 自定义时区的冬夏令时选项行 */
.wc-dst-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.wc-dst-row[hidden] {
    display: none;
}

.wc-dst-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.wc-dst-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
}

.wc-dst-field .settings-input {
    flex: none;
    width: 72px;
    min-width: 60px;
    padding: 6px 8px;
    font-size: 0.8rem;
    text-align: center;
}

.wc-dst-field .settings-select {
    min-width: 96px;
    padding: 6px 28px 6px 10px;
    font-size: 0.8rem;
    background-position: right 8px center;
}

.wc-dst-field .settings-input:disabled,
.wc-dst-field .settings-select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 世界时钟 - 添加时钟折叠 */
.wc-add-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--glass-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    color: var(--text-secondary);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wc-add-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-strong);
    background: var(--accent-dim);
}

.wc-add-toggle[aria-expanded="true"] {
    color: var(--accent);
    border-style: solid;
    border-color: var(--accent-strong);
}

.wc-add-toggle .svg-icon {
    width: 16px;
    height: 16px;
}

.wc-add-toggle-caret {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--transition-fast);
    margin-left: 4px;
}

.wc-add-toggle[aria-expanded="true"] .wc-add-toggle-caret {
    transform: rotate(-135deg);
}

.wc-add-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: dropdownIn 0.25s ease-out;
}

.wc-add-panel[hidden] {
    display: none !important;
}

.wc-add-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

/* 旧的重复 .timezone-list 定义已合并至上方滚动容器规则 */

.wc-empty {
    text-align: center;
    padding: 16px 12px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--glass-border);
    background: rgba(255, 255, 255, 0.01);
    margin: auto 0;
}

/* Toast */
/* .toast 完整定义已合并至文末「美化增强」区（M8 去重） */

.toast.show {
    opacity: 1;
}

/* 拖拽相关样式统一见上方 .drag-handle / .dragging / .drag-over（App.Sortable） */

/* 自定义引擎列表 */
.custom-engines-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 默认引擎显示/隐藏 */
.default-engine-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.default-engine-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    background: var(--settings-row-bg);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), opacity var(--transition-fast);
}

.default-engine-item:hover {
    background: var(--btn-hover-bg);
}

.default-engine-item.is-hidden {
    opacity: 0.55;
}

.default-engine-item.is-hidden .default-engine-name {
    text-decoration: line-through;
}

.default-engine-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.engine-visibility-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex: 0 0 auto;
}

.engine-visibility-btn:hover:not([disabled]) {
    background: var(--btn-hover-bg);
    color: var(--accent);
}

.engine-visibility-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.engine-visibility-btn .svg-icon {
    width: 16px;
    height: 16px;
}

/* 拖拽手柄 + 拖拽态（书签/自定义引擎共用，App.Sortable） */
.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 32px;
    color: var(--text-tertiary);
    cursor: grab;
    border-radius: 6px;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.drag-handle:hover {
    color: var(--accent);
    background: var(--btn-hover-bg);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle .svg-icon {
    width: 16px;
    height: 16px;
}

.bookmark-edit-item.dragging,
.custom-engine-item.dragging {
    opacity: 0.4;
}

.bookmark-edit-item.drag-over,
.custom-engine-item.drag-over {
    box-shadow: 0 -2px 0 var(--accent);
}

.custom-engine-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
}

.custom-engine-item .settings-input {
    flex: 1;
}

/* 天气按钮 */
.weather-fab {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 30;
    padding: 12px 18px;
    border-radius: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 0.9rem;
    white-space: nowrap;
}

.weather-fab:hover {
    background: var(--glass-hover);
    border-color: var(--accent-strong);
    box-shadow: var(--shadow-lg), 0 0 20px var(--accent-dim);
    transform: translateY(-2px);
}

.weather-fab-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 天气详情面板 */
.weather-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.weather-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.weather-panel {
    background: var(--settings-panel-bg);
    backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.3s;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
}

.weather-overlay.open .weather-panel {
    transform: translateY(0) scale(1);
}

.weather-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
}

.weather-panel-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.weather-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weather-main-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 天气主区（Hero） */
.weather-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background:
        radial-gradient(circle at 12% 20%, var(--accent-dim), transparent 55%),
        var(--settings-row-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.weather-hero-primary {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.weather-hero-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-strong);
    box-shadow: 0 0 24px var(--accent-dim);
}

.weather-hero-icon .svg-icon {
    width: 34px;
    height: 34px;
}

.weather-hero-temp {
    font-size: 3rem;
    line-height: 1;
    font-weight: 300;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.weather-hero-temp .unit {
    font-size: 1.4rem;
    vertical-align: super;
    color: var(--text-secondary);
}

.weather-hero-desc {
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.weather-hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    text-align: right;
}

.weather-hero-city {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.weather-hero-city .svg-icon {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

.weather-hero-stats {
    display: flex;
    gap: 18px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hero-stat-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.hero-stat-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* 天气详情网格 */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}

.weather-detail-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--settings-row-bg);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.weather-detail-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-strong);
    background: var(--btn-hover-bg);
}

.weather-detail-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
}

.weather-detail-head .svg-icon {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.weather-detail-value {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.weather-detail-unit {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

/* 图表区块 */
.weather-chart-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weather-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.weather-section-title .svg-icon {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

/* 生活指数（UAPI） */
.weather-life-indices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weather-life-indices[hidden] {
    display: none;
}

.weather-life-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.weather-life-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--settings-row-bg);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    cursor: default;
}

.weather-life-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-strong);
    background: var(--btn-hover-bg);
}

.weather-life-name {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
}

.weather-life-level {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* 图例 */
.weather-chart-legend {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: var(--settings-row-bg);
    border-radius: 20px;
    align-items: center;
    margin-bottom: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* 图表容器（禁止滚动） */
.weather-chart-scroll {
    background: var(--settings-row-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.weather-chart-container {
    overflow: hidden !important;
    /* 彻底禁止任何滚动条 */
    position: relative;
}

#weatherChartCanvas {
    display: block;
}

/* Tooltip */
.chart-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--toast-bg);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--text-primary);
    display: none;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 20;
    /* 不使用 transform，避免位置偏移 */
}

/* 雨滴画布置于粒子层之上，内容层之下 */
#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* 与主容器同级，但 DOM 中先于主容器，故被主容器覆盖，实际介于粒子(1) 和 主容器之间 */
    pointer-events: none;
}

/* ========== 扁平 SVG 图标（内联注入，本地 file:// 可用） ========== */
.svg-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    line-height: 0;
}

.svg-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* 图标尺寸与间距（按使用场景微调） */
.settings-group-label .svg-icon,
.file-upload-label .svg-icon,
.suggestion-item.no-results .svg-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.settings-panel-header h2 .svg-icon,
.world-clock-header h2 .svg-icon,
.weather-panel-header h2 .svg-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.settings-fab .svg-icon {
    width: 24px;
    height: 24px;
}

.weather-fab #weatherFabIcon .svg-icon {
    width: 20px;
    height: 20px;
}

.weather-main-info .svg-icon {
    vertical-align: middle;
}

.search-clear .svg-icon,
.settings-close-btn .svg-icon {
    width: 16px;
    height: 16px;
}

.btn-delete-history .svg-icon,
.btn-icon-danger .svg-icon {
    width: 13px;
    height: 13px;
}

.chart-tooltip .svg-icon {
    width: 14px;
    height: 14px;
    margin-right: 3px;
}

/* ========== 美化增强（全局通用；设置面板相关规则已归位回各自区块） ========== */
::selection {
    background: var(--accent-strong);
    color: var(--text-primary);
}

/* 全局滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: content-box;
}

/* 键盘焦点可见性 */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 仅撤销 outline：搜索框聚焦高光由 .search-wrapper:focus-within（6px 光环）
   与 .settings-*:focus 各自的规则提供，input 本身不得带 box-shadow（矩形高光） */
.search-wrapper:focus-within,
.search-input:focus-visible,
.settings-input:focus,
.settings-select:focus {
    outline: none;
}

/* 玻璃面板高光与描边 */
.settings-panel,
.world-clock-panel,
.weather-panel {
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.settings-panel-header,
.world-clock-header,
.weather-panel-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
    backdrop-filter: blur(4px);
}

/* 书签入场与悬停 */
@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bookmark-item {
    animation: popIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bookmark-item:nth-child(1) { animation-delay: 0.28s; }
.bookmark-item:nth-child(2) { animation-delay: 0.33s; }
.bookmark-item:nth-child(3) { animation-delay: 0.38s; }
.bookmark-item:nth-child(4) { animation-delay: 0.43s; }
.bookmark-item:nth-child(5) { animation-delay: 0.48s; }
.bookmark-item:nth-child(6) { animation-delay: 0.53s; }
.bookmark-item:nth-child(7) { animation-delay: 0.58s; }
.bookmark-item:nth-child(8) { animation-delay: 0.63s; }
.bookmark-item:nth-child(9) { animation-delay: 0.68s; }
.bookmark-item:nth-child(10) { animation-delay: 0.73s; }
.bookmark-item:nth-child(n+11) { animation-delay: 0.78s; }

.bookmark-icon-wrapper {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.bookmark-item:hover .bookmark-icon-wrapper {
    border-color: var(--accent-strong);
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 24px var(--accent-dim);
    background: var(--accent-dim);
}

.bookmark-item:hover .bookmark-fallback {
    color: var(--accent);
    opacity: 0.9;
}

/* 引擎按钮激活脉冲 */
@keyframes enginePulse {

    0%,
    100% {
        box-shadow: 0 0 12px var(--accent-dim);
    }

    50% {
        box-shadow: 0 0 22px 2px var(--accent-dim);
    }
}

.engine-btn.active {
    animation: enginePulse 3.2s ease-in-out infinite;
}

/* 设置相关增强已归位回各自定义处（本区保留全局通用增强） */

/* 按钮轻微上浮 */
.btn,
.file-upload-label,
.settings-clear-btn {
    transition: all var(--transition-fast);
}

.btn:hover,
.file-upload-label:hover {
    transform: translateY(-1px);
}

.btn:active,
.file-upload-label:active {
    transform: translateY(0) scale(0.97);
}

/* Toast 位移过渡 */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    z-index: 60;
    padding: 10px 22px;
    border-radius: 24px;
    background: var(--toast-bg);
    backdrop-filter: blur(16px);
    color: var(--text-primary);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
    .settings-overlay {
        padding: 10px;
    }

    /* 窄屏：侧栏改为顶部横向滚动的分类 chip 导航（不再整体隐藏） */
    .settings-panel-main {
        flex-direction: column;
    }

    .settings-sidebar {
        flex-direction: row;
        width: auto;
        padding: 10px;
        gap: 6px;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        overflow-x: auto;
        overflow-y: hidden;
        flex-shrink: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .settings-nav-item {
        padding: 7px 12px;
        border-radius: 999px;
        border: 1px solid var(--glass-border);
        background: var(--btn-bg);
        font-size: 0.82rem;
        gap: 6px;
    }

    .settings-nav-item.active {
        border-color: var(--accent-strong);
        background: var(--btn-primary-bg);
        color: var(--accent);
    }

    /* chip 态用边框/底色表示激活，隐藏侧栏式左侧指示条 */
    .settings-nav-item::before {
        display: none;
    }

    .settings-nav-item .svg-icon {
        width: 14px;
        height: 14px;
    }

    /* 窄屏：排序编辑行改为堆叠，输入框不再被挤没 */
    .bookmark-edit-item,
    .custom-engine-item {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .bookmark-edit-item .settings-input,
    .custom-engine-item .settings-input {
        flex-basis: 100% !important;
        min-width: 0;
    }

    .bookmark-edit-item .item-move-btns,
    .custom-engine-item .item-move-btns {
        flex-direction: row;
    }

    .bookmark-edit-item .btn-icon-danger,
    .custom-engine-item .btn-icon-danger {
        margin-left: auto;
    }

    .settings-panel {
        max-height: 92vh;
    }

    .settings-panel-body {
        padding: 16px;
    }

    .weather-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 18px;
    }

    .weather-hero-meta {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    .weather-hero-icon {
        width: 54px;
        height: 54px;
    }

    .weather-hero-icon .svg-icon {
        width: 28px;
        height: 28px;
    }

    .weather-hero-temp {
        font-size: 2.4rem;
    }

    .weather-details {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }
}

/* ========== 轻量 Dialog（L4，替换 confirm/prompt） ========== */
.app-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
}

.app-dialog-overlay[hidden] {
    display: none;
}

.app-dialog {
    width: min(420px, 100%);
    background: var(--bg-secondary, #fff);
    color: var(--text-primary, #222);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.app-dialog-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-dialog-msg {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary, #555);
    margin-bottom: 12px;
}

.app-dialog-input {
    width: 100%;
    margin-bottom: 12px;
}

.app-dialog-textarea {
    width: 100%;
    margin-bottom: 12px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.8rem;
    resize: vertical;
    background: var(--bg-primary, #fafafa);
    color: var(--text-primary, #222);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
    border-radius: 8px;
    padding: 8px;
}

.app-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 世界时钟空状态（L7） */
.wc-empty {
    text-align: center;
    color: var(--text-tertiary, #999);
    font-size: 0.9rem;
    padding: 28px 12px;
}

/* 壁纸预载淡入（L5） */
#wallpaper-layer.wp-preload-fade {
    animation: wp-fade-in 0.45s ease;
}

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