/* ============================================================
 * Desktop · 我的桌面
 * 三栏布局：日历(左) | 时钟+搜索(中) | 天气(右)，一屏完整显示
 * ============================================================ */

:root {
    /* 主题色（可被右上角主题切换按钮覆盖） */
    --accent-rgb: 251, 191, 36;
    --accent: rgb(var(--accent-rgb));
    --accent-2: #f59e0b;
    --accent-soft: rgba(var(--accent-rgb), 0.14);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-bg: rgba(28, 30, 46, 0.42);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.72);
    --text-faint: rgba(255, 255, 255, 0.46);
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    color: var(--text);
    background-color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- 壁纸 ---------- */
.wallpaper {
    position: fixed; inset: 0; z-index: -2;
    background-color: #1a1a2e;
    background-size: cover; background-position: center; background-attachment: fixed;
    opacity: 0; transition: opacity 0.8s ease;
}
.wallpaper.loaded { opacity: 1; }
.wallpaper-overlay {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(160deg, rgba(10,12,30,.34) 0%, rgba(12,18,38,.5) 55%, rgba(8,10,26,.66) 100%);
}

/* ---------- 淡出图层 / 主体 ---------- */
#fadeLayer { transition: opacity 0.9s ease; }
.page-content {
    width: 100%; max-width: 1760px; margin: 0 auto;
    padding: clamp(60px, 6.5vh, 76px) clamp(10px, 1.5vw, 22px) clamp(10px, 1.5vh, 18px);
    display: flex; flex-direction: column; justify-content: flex-start;
    min-height: 100vh;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hidden { display: none !important; }

/* ============ 顶部三栏布局：左右卡片等宽对称 ============ */
.stage {
    display: grid;
    grid-template-columns: minmax(0, 330px) minmax(380px, 1fr) minmax(0, 330px);
    align-items: stretch;
    gap: clamp(16px, 2.6vw, 44px);
    margin-bottom: clamp(14px, 2.2vh, 24px);
}
.stage-col { display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; }
.stage-left { justify-content: stretch; }
/* 中间列上移，使"晚上好"与右上角工具按钮处于同一高度（按钮中心约 36px） */
.stage-center {
    justify-content: flex-start;
    transform: translateY(calc(23px - clamp(60px, 6.5vh, 76px)));
}
.stage-right { gap: 12px; }
.stage-right .weather-card { flex: 1 1 auto; }

/* ---------- 模拟表盘 + 数字时钟（公历在左、农历在右） ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.clock-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.6vw, 26px); }
.clock-side {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 118px; text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.side-label {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px;
}
.side-label iconify-icon { opacity: .9; }
.side-main { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.35; white-space: nowrap; }
.side-sub { margin-top: 6px; font-size: 12px; color: var(--text-dim); line-height: 1.3; max-width: 150px; }
.clock-widget {
    position: relative; width: 196px; height: 196px;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
.clock-dial {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.09) 0%, rgba(255,255,255,.03) 62%, rgba(255,255,255,.06) 100%);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: inset 0 0 26px rgba(255,255,255,.06), 0 0 0 5px rgba(255,255,255,.03);
}
.dial-tick {
    position: absolute; left: 50%; top: 50%; width: 2px; height: 7px; margin-left: -1px;
    background: rgba(255,255,255,.5); border-radius: 2px; transform-origin: 50% 0;
}
.dial-tick.major {
    width: 3px; height: 12px; margin-left: -1.5px; background: var(--accent);
    box-shadow: 0 0 6px rgba(var(--accent-rgb),.7);
}
.dial-hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 4px; will-change: transform; }
.dial-hand.hour { width: 5px; height: 46px; margin-left: -2.5px; background: linear-gradient(180deg,#6fd0f5,#28A9E0); box-shadow: 0 0 8px rgba(40,169,224,.6); }
.dial-hand.minute { width: 3.5px; height: 64px; margin-left: -1.75px; background: rgba(255,255,255,.94); box-shadow: 0 0 6px rgba(255,255,255,.4); }
.dial-hand.second { width: 1.6px; height: 72px; margin-left: -.8px; background: #F9A2A8; box-shadow: 0 0 6px rgba(249,162,168,.7); }
.dial-center {
    position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.8); z-index: 2;
}
.clock-digital {
    position: relative; z-index: 3; width: 130px; height: 130px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle, rgba(20,24,44,.86) 0%, rgba(20,24,44,.72) 70%, rgba(20,24,44,0) 100%);
}
.clock-time {
    font-size: 30px; font-weight: 700; letter-spacing: 1px; line-height: 1.05;
    font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0,0,0,.6);
    cursor: pointer; transition: color .2s;
}
.clock-time:hover { color: #9FDCF7; }
.clock-ampm { margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--accent); min-height: 15px; }

.greet-line {
    margin-bottom: 14px; font-size: 19px; font-weight: 600; letter-spacing: 3px;
    color: var(--text); text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.date-line, .lunar-line { text-shadow: 0 2px 10px rgba(0,0,0,.5); }

/* ---------- 搜索框 ---------- */
.search-section { display: flex; justify-content: center; margin-top: 16px; width: 100%; }
.search-box {
    position: relative; display: flex; align-items: center;
    width: 100%; max-width: 520px; height: 48px; padding: 0 6px 0 4px;
    border-radius: 15px; background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow); transition: all .3s ease;
}
.search-box:focus-within {
    background: rgba(255,255,255,.14); border-color: rgba(var(--accent-rgb),.45);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1), var(--shadow);
}
.engine-wrap { position: relative; flex: none; }
.engine-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--text-dim);
    cursor: pointer; border-radius: 11px; transition: background .2s;
}
.engine-btn:hover { background: rgba(255,255,255,.1); }
.engine-dropdown {
    position: absolute; top: calc(100% + 10px); left: 0; min-width: 150px; padding: 6px;
    background: rgba(30,32,48,.96); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: var(--shadow); z-index: 50;
}
.engine-option {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border: none; border-radius: 8px; background: transparent;
    color: var(--text-dim); font-size: 14px; cursor: pointer; text-align: left; transition: all .15s;
}
.engine-option:hover, .engine-option.active { background: rgba(255,255,255,.1); color: #fff; }
.engine-option.active { color: var(--accent); }
.search-input {
    flex: 1; min-width: 0; height: 100%; border: none; outline: none;
    background: transparent; color: #fff; font-size: 14px; padding: 0 8px;
}
.search-input::placeholder { color: var(--text-faint); }
.search-btn {
    flex: none; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 11px; background: var(--accent-soft); color: var(--accent);
    cursor: pointer; transition: all .2s;
}
.search-btn:hover { background: rgba(var(--accent-rgb),.26); transform: translateX(2px); }

/* ---------- 日历 ---------- */
.calendar-card { width: 100%; max-width: 330px; height: 100%; padding: 14px 16px 12px; display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-nav, .cal-today {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 8px; background: rgba(255,255,255,.07);
    color: var(--text-dim); cursor: pointer; transition: all .15s;
}
.cal-nav:hover, .cal-today:hover { background: rgba(255,255,255,.16); color: #fff; }
.cal-today { color: var(--accent); }
.cal-title-wrap { flex: 1; text-align: center; }
.cal-title { font-size: 15px; font-weight: 700; }
.cal-week { font-size: 10.5px; color: var(--text-faint); margin-top: 1px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid { flex: 1; align-content: center; }
.cal-weekdays { margin-bottom: 5px; font-size: 10.5px; color: var(--text-faint); text-align: center; }
.cal-weekdays .weekend { color: #f6a5a5; }
.cal-cell {
    min-height: 38px; padding: 2px 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; border-radius: 8px; transition: background .15s;
}
.cal-cell:hover { background: rgba(255,255,255,.07); }
.cal-cell.other { opacity: .3; }
.cal-cell.weekend .cal-num { color: #f6a5a5; }
.cal-cell.festival .cal-num { color: var(--accent); }
.cal-num { font-size: 13px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cal-lunar {
    margin-top: 1px; font-size: 8.5px; color: var(--text-faint); line-height: 1.1;
    white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.cal-cell.festival .cal-lunar { color: var(--accent); }
.cal-cell.today { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.45); }
.cal-cell.today .cal-num {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #2a2000; font-weight: 800;
}
.cal-footer {
    margin-top: 9px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.14);
    font-size: 10.5px; color: var(--text-dim); text-align: center; line-height: 1.45;
}

/* ---------- 天气（两地） ---------- */
.weather-card { width: 100%; max-width: 330px; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; }
.wx-block-head { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-dim); }
.wx-block-head iconify-icon { color: var(--accent); }
.wx-tag {
    margin-left: auto; font-size: 9.5px; padding: 1px 7px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),.3);
}
.wx-block-body { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.wx-icon { display: flex; align-items: center; justify-content: center; flex: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,.3)); }
.wx-temp { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.wx-temp small { font-size: 20px; font-weight: 500; vertical-align: top; color: var(--text-dim); }
.wx-block:not(.primary) .wx-temp { font-size: 30px; }
.wx-block:not(.primary) .wx-temp small { font-size: 15px; }
.wx-meta { margin-left: 2px; min-width: 0; }
.wx-desc { font-size: 12.5px; color: var(--text-dim); }
.wx-range { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.wx-aqi { margin-top: 6px; font-size: 10.5px; color: var(--text-faint); }
.wx-divider { height: 1px; background: rgba(255,255,255,.14); margin: 12px 0; }

/* ---------- 网站 dock（下移贴近页脚，中间留空） ---------- */
.dock-section { margin-top: auto; margin-bottom: 0; padding-top: clamp(20px, 4vh, 40px); }
.site-dock { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.site-card {
    width: 76px; min-height: 82px; padding: 11px 6px 9px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    border-radius: 14px; background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    text-decoration: none; color: var(--text);
    transition: transform .25s, background .25s, border-color .25s, box-shadow .25s;
}
.site-card:hover {
    transform: translateY(-5px); background: rgba(60,62,82,.6);
    border-color: rgba(var(--accent-rgb),.4); box-shadow: 0 12px 26px rgba(0,0,0,.34);
}
.site-icon {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: rgba(255,255,255,.08); margin-bottom: 7px;
    flex: none; transition: background .25s;
}
.site-card:hover .site-icon { background: rgba(255,255,255,.16); }
.site-icon .fallback-letter { font-size: 17px; font-weight: 700; color: var(--text-dim); }
.site-title { font-size: 11px; line-height: 1.25; color: var(--text); word-break: break-all; }
.site-desc { font-size: 9.5px; color: var(--text-faint); margin-top: 2px; }

/* ---------- 页脚（一排：左 / 中 / 右，始终贴在页面底端） ---------- */
.footer { margin-top: 0; padding-top: clamp(12px, 2vh, 20px); }
.footer-card {
    max-width: 100%; margin: 0 auto; padding: 12px 22px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
    border-color: rgba(var(--accent-rgb),.25);
    background: rgba(28,30,46,.5);
}
.footer-left { justify-self: start; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
.footer-left iconify-icon { color: var(--accent); }
.footer-center { justify-self: center; text-align: center; font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.footer-center a { color: var(--accent); text-decoration: none; }
.footer-center a:hover { color: #fde68a; }
.footer-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.footer-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px;
    background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb),.25);
    font-size: 11.5px; color: var(--text-dim); white-space: nowrap;
}
.footer-badge iconify-icon { color: var(--accent); }
.stat-num { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 2px; }

/* ---------- 壁纸工具 ---------- */
.wallpaper-tools { position: fixed; right: 16px; top: 16px; z-index: 60; display: flex; align-items: flex-start; gap: 8px; }
.tool-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid var(--glass-border);
    background: rgba(30,32,48,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--text-dim); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: all .2s;
}
.tool-btn:hover { background: rgba(60,62,82,.72); color: #fff; transform: translateY(-2px); }
.tool-btn.loading iconify-icon { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* 主题色下拉 */
.theme-wrap { position: relative; }
.theme-menu {
    position: absolute; right: 0; top: calc(100% + 10px); width: 150px; padding: 8px;
    border-radius: 12px; background: rgba(30,32,48,.96); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.theme-option {
    width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 9px;
    border: none; border-radius: 8px; background: transparent; color: var(--text-dim);
    font-size: 12.5px; cursor: pointer; text-align: left; transition: background .15s;
}
.theme-option:hover { background: rgba(255,255,255,.1); color: #fff; }
.theme-swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.theme-check { color: var(--accent); visibility: hidden; margin-left: auto; }
.theme-option.active .theme-check { visibility: visible; }

.wp-source-wrap { position: relative; }
.wp-source-menu {
    position: absolute; right: 0; top: calc(100% + 10px); width: 200px; padding: 8px;
    border-radius: 12px; background: rgba(30,32,48,.96); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.wp-menu-title { padding: 4px 8px 8px; font-size: 11px; color: var(--text-faint); }
.wp-source-option {
    width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px;
    border: none; border-radius: 8px; background: transparent; color: var(--text-dim);
    font-size: 13px; cursor: pointer; text-align: left; transition: background .15s;
}
.wp-source-option:hover { background: rgba(255,255,255,.1); color: #fff; }
.wp-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); flex: none; }
.wp-source-name { flex: 1; }
.wp-check { color: var(--accent); visibility: hidden; }
.wp-source-option.active .wp-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.wp-source-option.active .wp-check { visibility: visible; }

/* ---------- 音乐播放器（左下角） ---------- */
.music-player {
    position: relative; z-index: 20;
    width: 100%; max-width: 330px; padding: 12px 14px 11px;
    border-color: rgba(var(--accent-rgb),.22);
    background: rgba(28,30,46,.6);
}
.mp-head { display: flex; align-items: center; gap: 10px; }
.mp-cover-wrap {
    position: relative; width: 44px; height: 44px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; overflow: hidden;
    background: rgba(var(--accent-rgb),.12); color: var(--accent);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.28), 0 3px 10px rgba(0,0,0,.3);
}
.mp-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.mp-cover.show { opacity: 1; }
.mp-cover-wrap.playing .mp-cover { animation: mp-spin 9s linear infinite; }
.mp-cover-ph { position: relative; z-index: 0; }
.mp-cover.show ~ .mp-cover-ph, .mp-cover-wrap.has-cover .mp-cover-ph { opacity: 0; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-info { flex: 1; min-width: 0; }
.mp-title { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { margin-top: 2px; font-size: 10.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-playlist-btn {
    flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--text-dim); cursor: pointer; transition: all .2s;
}
.mp-playlist-btn:hover { background: rgba(var(--accent-rgb),.2); color: var(--accent); }
.mp-time { display: flex; align-items: center; gap: 7px; margin: 9px 0 8px; font-size: 9.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.mp-progress { position: relative; flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); cursor: pointer; overflow: hidden; }
.mp-progress-bar { position: absolute; left: 0; top: 0; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg,var(--accent),var(--accent-2)); }
.mp-controls { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.mp-controls button { border: none; background: transparent; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all .18s; }
.mp-controls button:hover { color: var(--accent); background: rgba(255,255,255,.08); }
.mp-ctrl { width: 30px; height: 30px; }
.mp-play {
    width: 38px; height: 38px; color: #2a2000 !important;
    background: linear-gradient(135deg,var(--accent),var(--accent-2)) !important;
    box-shadow: 0 3px 12px rgba(var(--accent-rgb),.3);
}
.mp-play:hover { transform: scale(1.07); }
.mp-mode, .mp-vol-btn { width: 26px; height: 26px; }
.mp-mode.on { color: var(--accent); }
.mp-volume { width: 48px; height: 3px; accent-color: var(--accent); cursor: pointer; padding: 0; }
/* 播放列表抽屉 */
.mp-playlist {
    position: absolute; left: 0; bottom: calc(100% + 8px); width: 100%; max-height: 260px;
    overflow-y: auto; padding: 6px; border-radius: 12px;
    background: rgba(30,32,48,.98); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.mp-playlist-item {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px;
    border: none; border-radius: 8px; background: transparent; color: var(--text-dim);
    cursor: pointer; text-align: left; transition: background .15s;
}
.mp-playlist-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.mp-playlist-item.active { background: var(--accent-soft); color: var(--accent); }
.mp-playlist-item .mpl-num { width: 16px; flex: none; font-size: 10px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.mp-playlist-item .mpl-name { flex: 1; min-width: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

/* ---------- 响应式 ---------- */
/* 宽屏：强制 23 个图标收缩排在同一行（≥1280px） */
@media (min-width: 1280px) {
    .site-dock { flex-wrap: nowrap; gap: clamp(2px, 0.35vw, 6px); }
    .site-card { flex: 1 1 0; width: auto; min-width: 0; max-width: 82px; min-height: 76px; padding: 9px 2px 7px; }
    .site-icon { width: 30px; height: 30px; margin-bottom: 5px; }
    .site-card iconify-icon { width: 22px; height: 22px; }
    .site-title { font-size: 10px; }
}
/* 中等宽度：三栏收紧 */
@media (max-width: 1180px) {
    .stage { grid-template-columns: minmax(260px,320px) minmax(300px,1fr) minmax(260px,320px); gap: 14px; }
    .clock-side { min-width: 96px; }
    .side-main { font-size: 14px; }
    .footer-card { grid-template-columns: 1fr auto; row-gap: 8px; }
    .footer-left { grid-column: 1; }
    .footer-right { grid-column: 2; grid-row: 1; }
    .footer-center { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
/* 窄屏：改为纵向堆叠（时钟搜索优先，其次日历、天气） */
@media (max-width: 900px) {
    .page-content { justify-content: flex-start; min-height: auto; padding-top: 62px; }
    .stage { display: flex; flex-direction: column; gap: 18px; }
    .stage-center { order: 1; width: 100%; transform: none; }
    .stage-left { order: 2; width: 100%; }
    .stage-right { order: 3; width: 100%; }
    .weather-card, .calendar-card { max-width: 460px; }
    .footer-card { grid-template-columns: 1fr; text-align: center; row-gap: 10px; }
    .footer-left, .footer-right, .footer-center { grid-column: 1; grid-row: auto; justify-self: center; }
    .music-player { max-width: 420px; }
    .wallpaper-tools { top: 12px; right: 12px; }
}
@media (max-width: 640px) {
    /* 手机上把公历/农历移到时钟两侧但整体收紧，避免左右裁切 */
    .page-content { padding-top: 76px; padding-left: 12px; padding-right: 12px; }
    .clock-row { width: 100%; gap: 4px; justify-content: space-between; }
    .clock-side { min-width: 0; flex: 1 1 0; }
    .side-label { font-size: 10px; letter-spacing: 1px; gap: 2px; margin-bottom: 5px; }
    .side-main { font-size: 12px; white-space: normal; line-height: 1.25; }
    .side-sub { font-size: 10.5px; margin-top: 4px; max-width: none; }
    .clock-widget { width: 150px; height: 150px; flex: none; }
    .clock-digital { width: 100px; height: 100px; }
    .clock-time { font-size: 23px; }
    .clock-ampm { font-size: 10px; }
    .dial-tick { transform-origin: 50% 0; }
    .dial-hand.hour { height: 36px; }
    .dial-hand.minute { height: 50px; }
    .dial-hand.second { height: 58px; }
    .greet-line { font-size: 17px; margin-bottom: 12px; }
    .search-box { height: 46px; }
    .site-dock { gap: 8px; }
    .site-card { width: 68px; min-height: 78px; }
    .footer-center { white-space: normal; }
    /* 工具按钮下移并缩紧，避免遮挡日期 */
    .wallpaper-tools { top: 10px; right: 10px; gap: 6px; }
    .tool-btn { width: 36px; height: 36px; }
}
@media (max-width: 420px) {
    .clock-widget { width: 132px; height: 132px; }
    .clock-digital { width: 88px; height: 88px; }
    .clock-time { font-size: 20px; }
    .dial-hand.hour { height: 30px; }
    .dial-hand.minute { height: 42px; }
    .dial-hand.second { height: 50px; }
    .side-main { font-size: 11px; }
    .side-label { font-size: 9.5px; }
    .side-sub { font-size: 10px; }
}
@media (max-width: 380px) {
    .footer-badge { font-size: 10.5px; padding: 4px 8px; }
    .cal-cell { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
