:root,
:root[data-theme="dark"] {
  --bg: #0c0f14;
  --fg: #f3f5f8;
  --fg-dim: rgba(228, 233, 242, 0.64);
  --fg-faint: rgba(228, 233, 242, 0.4);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #7aa2ff;
  --accent-cool: #5fd6ad;
  --accent-warm: #ffb86c;
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.085);
  --glass: rgba(18, 20, 27, 0.78);
  --glass-hover: rgba(18, 20, 27, 0.88);
  --glass-line: rgba(255, 255, 255, 0.11);
  --icon-tile: rgba(255, 255, 255, 0.92);
  --nav-bg: rgba(12, 15, 20, 0.72);
  --shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.45);
  --overlay: rgba(8, 9, 12, 0.55);
  --pill-active-bg: #f3f5f8;
  --pill-active-fg: #0c0f14;
  --grid-line: rgba(255, 255, 255, 0.035);
  --section-accent: #7aa2ff;
  /* Liquid glass */
  --glass-bg: rgba(18, 21, 30, 0.66);
  --glass-bg-strong: rgba(18, 21, 30, 0.8);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --muted: var(--fg-dim);
  --lg-cyan: rgba(120, 220, 255, 0.5);
  --lg-pink: rgba(255, 140, 205, 0.38);
  --lg-ring: rgba(255, 255, 255, 0.4);
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --fg: #182238;
  --fg-dim: rgba(35, 48, 70, 0.66);
  --fg-faint: rgba(35, 48, 70, 0.42);
  --line: rgba(92, 108, 132, 0.14);
  --accent: #2563eb;
  --accent-cool: #0f9f75;
  --accent-warm: #d97706;
  --card: rgba(255, 255, 255, 0.56);
  --card-hover: rgba(255, 255, 255, 0.84);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-hover: rgba(255, 255, 255, 0.9);
  --glass-line: rgba(92, 108, 132, 0.16);
  --icon-tile: rgba(255, 255, 255, 0.82);
  --nav-bg: rgba(244, 246, 250, 0.74);
  --shadow-hover: 0 16px 34px rgba(55, 73, 110, 0.13);
  --overlay: rgba(226, 233, 243, 0.62);
  --pill-active-bg: #182238;
  --pill-active-fg: #f6f7fb;
  --grid-line: rgba(24, 34, 56, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-bg-strong: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 8px 32px rgba(55, 73, 110, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --muted: var(--fg-dim);
  --lg-cyan: rgba(96, 178, 220, 0.42);
  --lg-pink: rgba(228, 132, 190, 0.32);
  --lg-ring: rgba(255, 255, 255, 0.9);
}

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "SF Pro Display", "Segoe UI", "Inter", "Noto Sans CJK SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Display", "SF Pro Text", "Inter", "Noto Sans CJK SC", "PingFang SC",
    "Microsoft YaHei UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--fg);
  overflow-x: hidden;
}

/* 环境光：给液态玻璃提供可折射的色彩，即使壁纸未加载也不至于死黑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 12% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(42% 36% at 88% 14%, color-mix(in srgb, var(--accent-cool) 18%, transparent), transparent 70%),
    radial-gradient(50% 45% at 72% 88%, color-mix(in srgb, var(--accent-warm) 12%, transparent), transparent 72%);
  opacity: 0.55;
}

/* Wallpaper Layer */
.wallpaper-layer,
.wallpaper-mask {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: none;
}

body.has-wallpaper .wallpaper-layer,
body.has-wallpaper .wallpaper-mask {
  display: block;
}

.wallpaper-layer {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
}

.wallpaper-mask {
  background: rgba(245, 248, 252, 0.2);
}
:root[data-theme="dark"] .wallpaper-mask {
  background: rgba(8, 10, 15, 0.45);
}

body.has-wallpaper .hero-bg {
  opacity: 0.25;
}

.hero,
main.container,
.sys-status-wrap,
.site-foot {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Container */
.container {
  width: min(1560px, 96vw);
  margin: 0 auto;
}

/* Fixed Translucent Navbar */
/* Floating liquid-glass action capsule (replaces the old top bar) */
.glass-actions {
  position: fixed;
  top: 18px;
  right: clamp(16px, 4vw, 40px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 顶部高光：模拟玻璃上缘的反光 */
.glass-actions::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 45%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--glass-highlight), transparent);
  pointer-events: none;
  opacity: 0.5;
}

.glass-actions .icon-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-dim);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.glass-actions .icon-btn:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--glass-highlight) 55%, transparent);
  transform: translateY(-1px);
}

.glass-actions .icon-btn:active {
  transform: scale(0.94);
}

/* 旧顶栏类名保留空壳，防止遗留 JS 引用报错 */
.nav, .nav-inner, .brand, .links, .actions { display: none !important; }

.link-mode-btn[aria-checked="true"] {
  color: var(--accent-cool);
  background: color-mix(in srgb, var(--accent-cool) 14%, transparent);
}

.net-mode-btn {
  padding: 0;
  width: 32px;
  color: var(--fg-dim);
}

.net-mode-btn svg[hidden] {
  display: none;
}

.net-mode-btn[aria-checked="true"] {
  color: var(--accent-cool);
  background: color-mix(in srgb, var(--accent-cool) 14%, transparent);
}

.edit-mode-btn {
  gap: 0.32rem;
  padding: 0 0.58rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg-dim);
  font-size: 0.78rem;
}

.edit-mode-btn[aria-checked="true"] {
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 48%, var(--line));
  background: color-mix(in srgb, var(--accent-warm) 14%, transparent);
}

/* Section Inline Action Icons (Sun-Panel Style: + and Edit next to title) */
.cat-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cat-head-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.cat-title-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cat-title-edit-badge {
  position: absolute;
  top: -10px;
  right: -22px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.cat-title-edit-badge:hover {
  color: var(--accent);
  transform: scale(1.15);
}

.cat.is-cat-editing .cat-inline-actions {
  margin-left: 22px;
}

.cat-left-order-tools {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-order-btn {
  width: 22px;
  height: 15px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cat-order-btn:hover:not(:disabled) {
  color: var(--fg);
  border-color: var(--accent);
}

.cat-order-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .cat-left-order-tools {
    position: static;
    transform: none;
    flex-direction: row;
    margin-right: 0.25rem;
  }
}

.cat-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.cat-head-main:hover .cat-inline-actions,
.cat.is-cat-editing .cat-inline-actions,
body.is-editing .cat-inline-actions {
  opacity: 1;
  pointer-events: auto;
}

.cat-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--fg-dim);
  transition: color 0.15s ease, background 0.15s ease;
}

.cat-inline-btn:hover {
  color: var(--fg);
  background: var(--card-hover);
}

.cat-inline-btn.is-active {
  color: var(--accent-warm);
  background: color-mix(in srgb, var(--accent-warm) 14%, transparent);
}

.cat-inline-btn.is-danger:hover {
  color: #f87171;
}

/* Card Inline Edit/Delete Controls */
a.card {
  position: relative;
}

.card-edit-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  display: none;
  align-items: center;
  gap: 4px;
}

.cat.is-cat-editing .card-edit-actions,
body.is-editing .card-edit-actions {
  display: inline-flex;
}

body.is-sorting #sections {
  transform: scale(0.86);
  transform-origin: top center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1.5px dashed rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  padding: 18px 22px;
  background: rgba(15, 23, 42, 0.14);
}

body.is-sorting #sections .cat {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
}

body.is-sorting .card:hover,
body.is-sorting .micro-widget-card:hover,
body.is-sorting .docker-monitor-card:hover,
body.is-sorting .mail-widget-card:hover {
  transform: none !important;
}

.cat.is-cat-editing .is-draggable,
body.is-sorting .is-draggable,
body.is-sorting .is-draggable * {
  cursor: move !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transition: opacity 0.22s ease, box-shadow 0.22s ease;
}

body.is-dragging-active,
body.is-dragging-active * {
  cursor: grabbing !important;
}

.cat.is-cat-editing .is-draggable img,
.cat.is-cat-editing .is-draggable a,
body.is-sorting .is-draggable img,
body.is-sorting .is-draggable a {
  -webkit-user-drag: none;
}

.cat.is-cat-editing .is-dragging,
body.is-sorting .is-dragging {
  opacity: 0.56 !important;
  outline: 1.5px dashed rgba(255, 255, 255, 0.62) !important;
  outline-offset: -2px;
  pointer-events: none;
  transition: opacity 0.18s ease !important;
}

.sort-mode-bar {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem 0.5rem 1.05rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
  font-size: 0.84rem;
}

.sort-mode-done,
.sort-mode-save {
  border: 0;
  border-radius: 10px;
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.sort-mode-done:hover,
.sort-mode-save:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sort-mode-cancel {
  border: 0;
  border-radius: 10px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.sort-mode-cancel:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sun-drag-clone {
  position: fixed;
  margin: 0 !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  opacity: 0.98 !important;
  background: rgba(30, 41, 59, 0.78) !important;
  backdrop-filter: blur(18px) saturate(175%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(175%) !important;
  border: 1px solid rgba(255, 255, 255, 0.48) !important;
  will-change: transform;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.35) inset !important;
}

.cat.is-drag-target-cat {
  outline: 1.5px dashed rgba(96, 165, 250, 0.55);
  outline-offset: 8px;
  border-radius: 16px;
}

.cat.is-cat-editing .is-drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

.cat.is-cat-editing a.card,
body.is-editing a.card {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent-warm) 40%, var(--line));
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.card-action-btn:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}

.card-action-btn.is-danger:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(248, 113, 113, 0.7);
}

.add-cat-bar {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.add-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--fg-dim);
  background: var(--card);
  border: 1px dashed var(--line);
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.add-cat-btn:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: var(--card-hover);
}

.quick-dialog {
  width: min(560px, 94vw);
}

.icon-editor {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.icon-editor-label {
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-bottom: 0.4rem;
}

.icon-editor-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-preview {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.icon-editor-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
}

.icon-editor-input:focus {
  border-color: var(--accent);
}

.icon-fetch-status {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--fg-dim);
  min-height: 1rem;
}

.icon-fetch-status.is-ok {
  color: var(--accent-cool);
}

.icon-fetch-status.is-err {
  color: #f87171;
}

/* Card Right-Click Context Menu (Sun-Panel Style) */
.ctx-menu {
  position: fixed;
  z-index: 200;
  min-width: 176px;
  padding: 0.45rem;
  border-radius: 10px;
  background: var(--glass-hover);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  box-shadow: var(--shadow-hover);
}

.ctx-menu[hidden] {
  display: none;
}

.ctx-head {
  padding: 0.28rem 0.45rem 0.4rem;
  font-size: 0.78rem;
  color: var(--fg-dim);
}

.ctx-quick-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0 0.2rem 0.35rem;
}

.ctx-quick-btn {
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg-dim);
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.ctx-quick-btn:hover:not(:disabled) {
  color: var(--fg);
  background: var(--card-hover);
  border-color: var(--accent);
}

.ctx-quick-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.ctx-sep {
  height: 1px;
  margin: 0.25rem 0;
  background: var(--line);
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.48rem 0.55rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--fg);
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.ctx-item:hover {
  background: var(--card-hover);
}

.ctx-item.is-danger:hover {
  color: #f87171;
}

/* System Applications Modal (Sun-Panel ⊞) */
.sysapp-dialog {
  width: min(860px, 95vw);
  height: min(620px, 86vh);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--glass-hover);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.sysapp-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 170px 1fr;
}

.sysapp-sidebar {
  padding: 0.75rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-y: auto;
}

.sysapp-tab {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  text-align: left;
  font-size: 0.86rem;
  color: var(--fg-dim);
  transition: background 0.14s ease, color 0.14s ease;
}

.sysapp-tab:hover {
  color: var(--fg);
  background: var(--card);
}

.sysapp-tab.is-active {
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-weight: 600;
}

.sysapp-content {
  padding: 1rem 1.25rem;
  overflow-y: auto;
}

.sysapp-pane[hidden] {
  display: none;
}

.sysapp-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fg);
  margin: 1rem 0 0.55rem;
}

.sysapp-form > .sysapp-section-title:first-child {
  margin-top: 0;
}

.sysapp-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.sysapp-hint {
  font-size: 0.84rem;
  color: var(--fg-dim);
  line-height: 1.55;
}

.switch-row {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.switch-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--fg);
  cursor: pointer;
}

.field textarea {
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.84rem;
  resize: vertical;
  outline: none;
}

.field textarea:focus {
  border-color: var(--accent);
}

.upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
}

.gallery-card {
  padding: 0.55rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.gallery-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--icon-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-name {
  width: 100%;
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-actions {
  display: flex;
  gap: 0.25rem;
}

.favicon-editor {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.favicon-preview {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.favicon-preview img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.favicon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (max-width: 640px) {
  .sysapp-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sysapp-sidebar {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sysapp-tab {
    width: auto;
    white-space: nowrap;
  }
}

.lan-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  color: var(--accent-cool);
  background: color-mix(in oklab, var(--accent-cool) 18%, transparent);
}

/* Admin Modal (Sun-Panel Style) */
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.admin-overlay[hidden] {
  display: none;
}

#catModal {
  z-index: 120;
}

#authModal {
  z-index: 250;
}

.admin-dialog {
  width: min(780px, 95vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--glass-hover);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.admin-title-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.admin-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-status {
  font-size: 0.74rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg-dim);
}

.admin-status.is-online {
  color: var(--accent-cool);
  border-color: color-mix(in srgb, var(--accent-cool) 40%, var(--line));
}

.admin-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  padding: 0.34rem 0.8rem;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--fg-dim);
}

.admin-tab.is-active {
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-weight: 600;
}

.admin-body {
  padding: 1rem 1.15rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.admin-body[hidden] {
  display: none;
}

.admin-form {
  padding: 0.9rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--fg-dim);
}

.field[hidden] {
  display: none;
}

.field input,
.field select,
.admin-filter {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
  outline: none;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  cursor: pointer;
}

.field input[type="color"] {
  padding: 2px 4px;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.admin-filter:focus {
  border-color: var(--accent);
}

.admin-form-actions {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn-primary {
  height: 34px;
  padding: 0 0.95rem;
  border-radius: 6px;
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-size: 0.84rem;
  font-weight: 600;
}

.btn-ghost {
  height: 34px;
  padding: 0 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 0.84rem;
}

.btn-ghost[hidden] {
  display: none;
}

.admin-list-head {
  display: flex;
}

.admin-filter {
  width: 100%;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}

.admin-row.is-hidden-row {
  opacity: 0.6;
}

.admin-row-info {
  min-width: 0;
  flex: 1;
}

.admin-row-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}

.admin-row-urls {
  margin-top: 0.16rem;
  font-size: 0.74rem;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-mini {
  padding: 0.24rem 0.55rem;
  border-radius: 5px;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  color: var(--fg-dim);
}

.btn-mini:hover {
  color: var(--fg);
  background: var(--card-hover);
}

.btn-mini.is-danger:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
}

@media (max-width: 640px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: auto;
  padding: 28px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* 顶栏已移除：三色线淡化为 Hero 顶部的柔和装饰，不再是"半拉子顶栏" */
.hero-hairline {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 60vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-cool) 50%,
    var(--accent-warm) 100%
  );
  opacity: 0.45;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(640px 300px at 22% 18%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(560px 280px at 78% 24%, color-mix(in srgb, var(--accent-cool) 11%, transparent), transparent 70%),
    radial-gradient(480px 260px at 52% 65%, color-mix(in srgb, var(--accent-warm) 7%, transparent), transparent 72%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 88%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(760px, 92vw);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  margin-bottom: 0.55rem;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-clock {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.hero-clock[hidden] {
  display: none;
}

.clock-time {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  font-size: 0.84rem;
  color: var(--fg-dim);
}

/* System Status Widget */
.sys-status-wrap {
  margin-bottom: 0.9rem;
}

.sys-status-wrap[hidden] {
  display: none;
}

.sys-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.sys-card {
  position: relative;
  overflow: hidden;
  padding: 0.85rem 1rem;
  border-radius: 13px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 4px 18px rgba(0, 0, 0, 0.1);
}

.sys-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--sys-pct, 0%);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.34), rgba(96, 165, 250, 0.16));
  border-right: 1px solid rgba(125, 211, 252, 0.52);
  box-shadow: inset 0 1px 0 rgba(186, 230, 253, 0.28);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}

.sys-card.is-warn::before {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.36), rgba(217, 70, 239, 0.24));
  border-right-color: rgba(232, 121, 249, 0.55);
  box-shadow: inset 0 1px 0 rgba(240, 171, 252, 0.28);
}

.sys-card.is-high::before {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.4), rgba(244, 114, 182, 0.3));
  border-right-color: rgba(244, 114, 182, 0.62);
  box-shadow: inset 0 1px 0 rgba(249, 168, 212, 0.32);
}

.sys-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0;
}

.sys-label {
  font-weight: 600;
  color: var(--fg);
}

.sys-val {
  font-variant-numeric: tabular-nums;
  color: var(--fg-dim);
}

.sys-val.is-warn,
.dm-stat-label.is-warn {
  color: #f0abfc;
}

.sys-val.is-high,
.dm-stat-label.is-high {
  color: #f9a8d4;
  font-weight: 600;
}

.sys-bar {
  display: none;
}

.sys-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.45), rgba(96, 165, 250, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}

.sys-bar-fill.is-warn,
.dm-bar-fill.is-warn {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.72), rgba(232, 121, 249, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.sys-bar-fill.is-high,
.dm-bar-fill.is-high {
  background: linear-gradient(90deg, rgba(192, 132, 252, 0.8), rgba(244, 114, 182, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@media (max-width: 720px) {
  .sys-status-grid {
    grid-template-columns: 1fr;
  }
}

/* Sun-Panel Style Docker Monitor Card inside Category Grid */
.docker-monitor-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 0.68rem;
  min-height: 76px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--section-accent) 3%, var(--card));
  border: 1px solid var(--line);
  border-left: 2px solid color-mix(in srgb, var(--section-accent) 34%, var(--line));
  cursor: default;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.docker-monitor-card:hover {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--section-accent) 42%, var(--line));
  border-left-color: color-mix(in srgb, var(--section-accent) 72%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.dm-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.dm-name {
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0.9rem;
}

.dm-stats {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
}

.dm-stat-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.dm-stat-label {
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.dm-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.45), rgba(96, 165, 250, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}

:root[data-theme="light"] .dm-bar-fill {
  background: #182238;
}

.dm-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fg-faint);
}

.dm-dot.is-running {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

/* Docker 2-Column Grid inside 系统应用 / Docker */
.docker-cat-select {
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.8rem;
  outline: none;
}

.docker-mgr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.docker-mgr-card {
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dmgr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.dmgr-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  word-break: break-all;
}

.dmgr-image {
  margin-top: 0.15rem;
  font-size: 0.74rem;
  color: var(--fg-dim);
  word-break: break-all;
}

.dmgr-info {
  font-size: 0.75rem;
  color: var(--fg-dim);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dmgr-ports {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dmgr-port-pill {
  padding: 0.08rem 0.42rem;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.dmgr-foot {
  margin-top: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.dmgr-foot-right {
  display: flex;
  gap: 0.35rem;
}

@media (max-width: 640px) {
  .docker-mgr-grid {
    grid-template-columns: 1fr;
  }
}

/* Mail Monitor Modal (Sun-Panel Style) */
.mail-nav-btn {
  position: relative;
}

.mail-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.mail-badge[hidden] {
  display: none;
}

.mail-dialog {
  width: min(880px, 95vw);
  height: min(620px, 86vh);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--glass-hover);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.mail-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #2563eb;
  color: #fff;
  font-size: 0.85rem;
}

.mail-head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mail-unseen-pill {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.mail-body {
  flex: 1;
  min-height: 0;
  padding: 0.9rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.mail-body[hidden] {
  display: none;
}

.mail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--accent-warm);
  background: color-mix(in srgb, var(--accent-warm) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-warm) 35%, transparent);
}

.mail-banner[hidden] {
  display: none;
}

.mail-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 0.85rem;
}

.mail-list-pane,
.mail-reader-pane {
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.mail-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
}

.mail-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem;
}

.mail-row {
  width: 100%;
  padding: 0.58rem 0.65rem;
  border-radius: 7px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background 0.14s ease;
}

.mail-row:hover,
.mail-row.is-active {
  background: var(--card-hover);
}

.mail-row-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mail-unseen-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

.mail-row-subj {
  font-size: 0.84rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-row.is-unread .mail-row-subj {
  font-weight: 700;
}

.mail-row-meta {
  font-size: 0.72rem;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-reader-pane {
  padding: 1rem;
  overflow-y: auto;
}

.mail-reader-empty {
  margin: auto;
  font-size: 0.86rem;
  color: var(--fg-faint);
}

.mail-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mail-reader-title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail-translate-btn {
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
}

.mail-translate-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.mail-reader-meta {
  font-size: 0.78rem;
  color: var(--fg-dim);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.75rem;
}

.mail-reader-body {
  font-size: 0.86rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.mail-reader-iframe {
  width: 100%;
  flex: 1;
  min-height: 360px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
}

/* Sun-Panel Style Mail Monitor Card */
.mail-widget-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.72rem 0.95rem;
  min-height: 76px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--section-accent) 4%, var(--card));
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.mail-widget-card.card-size-2x2 {
  min-height: 164px;
  padding: 0.95rem 1.05rem;
}

.mail-widget-card.card-size-1x2 {
  min-height: 76px;
  gap: 0.18rem;
  padding: 0.55rem 0.9rem;
}

.mail-widget-card.card-size-1x2 .mw-kpi {
  align-items: baseline;
}

.mail-widget-card.card-size-1x2 .mw-count {
  font-size: 1.25rem;
}

.mail-widget-card.card-size-1x2 .mw-foot {
  display: none;
}

.mail-widget-card.card-size-1x1 {
  min-height: 76px;
  padding: 0.45rem;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
}

.mail-widget-card.card-size-1x1 .mw-top {
  width: 100%;
}

.mail-widget-card.card-size-1x1 .mw-gear,
.mail-widget-card.card-size-1x1 .mw-preview,
.mail-widget-card.card-size-1x1 .mw-foot {
  display: none;
}

.mail-widget-card.card-size-1x1 .mw-count {
  font-size: 1.2rem;
}

.mail-widget-card:hover {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--section-accent) 42%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.mw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mw-left {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg);
}

.mw-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fg-faint);
}

.mw-dot.is-running {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.mw-gear {
  color: var(--fg-dim);
  padding: 2px;
  border-radius: 4px;
  display: inline-flex;
}

.mw-gear:hover {
  color: var(--fg);
  background: var(--card-hover);
}

.mw-kpi {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.mw-count {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.mw-unit {
  font-size: 0.84rem;
  color: var(--fg-dim);
}

.mw-preview {
  font-size: 0.78rem;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw-foot {
  font-size: 0.72rem;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Micro-App Store (Sun-Panel Style) */
.micro-banner {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: linear-gradient(120deg, #059669 0%, #10b981 55%, #0d9488 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.micro-banner-badge {
  font-size: 0.72rem;
  opacity: 0.9;
  margin-bottom: 0.2rem;
}

.micro-banner-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.micro-banner-sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  opacity: 0.88;
}

.micro-banner-stat {
  text-align: center;
  flex-shrink: 0;
}

.micro-banner-stat strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.1;
}

.micro-banner-stat span {
  font-size: 0.72rem;
  opacity: 0.85;
}

.micro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.micro-cats {
  display: flex;
  gap: 0.35rem;
}

.micro-cat-pill {
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--fg-dim);
  background: var(--card);
  border: 1px solid var(--line);
}

.micro-cat-pill.is-active {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  font-weight: 600;
}

.micro-search {
  height: 30px;
  width: 140px;
  padding: 0 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.8rem;
  outline: none;
}

.micro-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.micro-app-card {
  padding: 0.85rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.micro-app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.micro-app-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.micro-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.micro-app-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
}

.micro-app-author {
  font-size: 0.72rem;
  color: var(--fg-faint);
}

.micro-app-desc {
  font-size: 0.76rem;
  color: var(--fg-dim);
  line-height: 1.45;
}

.micro-install-btn {
  padding: 0.24rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #10b981;
  color: #fff;
  flex-shrink: 0;
}

.micro-install-btn:hover {
  opacity: 0.9;
}

/* Micro-App Cards inside Homepage Grid */
.micro-widget-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.8rem 0.95rem;
  min-height: 76px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--section-accent) 5%, var(--glass-bg));
  backdrop-filter: blur(16px) saturate(155%);
  -webkit-backdrop-filter: blur(16px) saturate(155%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 4px 18px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.micro-widget-card.card-size-2x2 {
  min-height: 164px;
}

.micro-widget-card:hover {
  background: color-mix(in srgb, var(--section-accent) 12%, var(--glass-bg-strong));
  border-color: color-mix(in srgb, var(--section-accent) 50%, var(--glass-border));
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-hover);
}

.micro-rss-list {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  overflow: hidden;
}

.micro-rss-link {
  font-size: 0.76rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.micro-rss-link:hover {
  color: var(--accent);
}

.micro-breath-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(in srgb, #a855f7 35%, transparent);
  border: 2px solid #a855f7;
  transition: transform 3.5s ease-in-out;
}

.micro-breath-circle.is-inhale {
  transform: scale(1.45);
}

.micro-trans-input {
  width: 100%;
  height: 28px;
  padding: 0 0.5rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.76rem;
  outline: none;
}

@media (max-width: 640px) {
  .micro-store-grid {
    grid-template-columns: 1fr;
  }
}

/* Widget Picker Modal (Sun-Panel 添加小部件) */
.widget-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.widget-app-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-app-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.widget-variant-title {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg);
}

.widget-variant-sub {
  text-align: center;
  font-size: 0.74rem;
  color: var(--fg-dim);
  margin-top: -0.45rem;
}

.widget-preview-stage {
  position: relative;
  padding: 2.2rem 1rem 1.25rem;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 35%, rgba(225, 29, 72, 0.35), transparent 60%),
    radial-gradient(circle at 75% 65%, rgba(37, 99, 235, 0.35), transparent 60%),
    #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.widget-preview-box {
  max-width: 100%;
  display: flex;
}

.widget-preview-box > * {
  width: 100%;
  height: 100%;
}

.widget-preview-box.preview-size-1x1 { width: 96px; height: 76px; }
.widget-preview-box.preview-size-1x2 { width: 204px; height: 76px; }
.widget-preview-box.preview-size-2x1 { width: 96px; height: 164px; }
.widget-preview-box.preview-size-2x2 { width: 204px; height: 164px; }
.widget-preview-box.preview-size-2x3 { width: 312px; height: 164px; }
.widget-preview-box.preview-size-2x4 { width: 420px; height: 164px; }
.widget-preview-box.preview-size-3x2 { width: 214px; height: 276px; }

.widget-size-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
}

.widget-add-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 0.25rem 0.72rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #10b981;
  color: #fff;
}

.widget-add-btn:hover {
  opacity: 0.92;
}

/* ===== MSM 代理监控卡片 ===== */
.msm-widget-card {
  padding: 0.72rem 0.9rem;
  gap: 0.4rem;
  height: 100%;
  overflow: hidden;
}
.msm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.msm-brand {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #b69cff;
}
.msm-gear {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  line-height: 1;
}
.msm-gear:hover { color: #8b5cf6; }
.msm-body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.msm-current {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.msm-cur-label {
  font-size: 0.72rem;
  color: var(--muted);
}
.msm-cur-name {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.msm-metrics {
  display: flex;
  gap: 1.1rem;
}
.msm-metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.msm-metric-label {
  font-size: 0.72rem;
  color: var(--muted);
}
.msm-metric b {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.msm-delay.is-good { color: #22c55e; }
.msm-delay.is-warn { color: #f59e0b; }
.msm-delay.is-bad { color: #ef4444; }
.msm-traffic {
  display: flex;
  gap: 0.9rem;
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.msm-tr-up { color: #38bdf8; }
.msm-tr-down { color: #34d399; }
.msm-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
  margin-top: 0.15rem;
  padding-right: 0.2rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}
.msm-group-list::-webkit-scrollbar {
  width: 4px;
}
.msm-group-list::-webkit-scrollbar-track {
  background: transparent;
}
.msm-group-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}
.msm-group-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.42);
}
.msm-group-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.msm-group-empty {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.35rem 0;
}
.msm-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.74rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.msm-node:hover {
  background: color-mix(in oklab, #8b5cf6 22%, rgba(255, 255, 255, 0.06));
  border-color: rgba(167, 139, 250, 0.45);
}
.msm-node.is-current {
  background: color-mix(in oklab, #8b5cf6 28%, rgba(255, 255, 255, 0.08));
  border-color: rgba(167, 139, 250, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
}
.msm-node.is-current {
  border-color: #8b5cf6;
  background: color-mix(in srgb, #8b5cf6 14%, transparent);
}
.msm-node.is-offline { opacity: 0.55; }
.msm-node-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.msm-node-delay {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.msm-node.is-current .msm-node-delay { color: #8b5cf6; }
.msm-status {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.9;
  margin-top: auto;
}
/* 多尺寸布局：1x1 / 1x2 / 2x1 / 2x2 / 2x3 / 2x4 */
.msm-online-pill {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.msm-body.is-1x1 {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
}
.msm-body.is-1x1 .msm-delay {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.msm-body.is-1x1 .msm-cur-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

.msm-body.is-1x2 {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.msm-1x2-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}
.msm-1x2-left .msm-cur-name {
  font-size: 0.88rem;
}
.msm-1x2-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}
.msm-1x2-right .msm-delay {
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.msm-body.is-2x1 {
  justify-content: space-between;
  gap: 0.35rem;
}
.msm-body.is-2x1 .msm-cur-name {
  font-size: 0.86rem;
}
.msm-2x1-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem;
}
.msm-body.is-2x1 .msm-traffic {
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.7rem;
}

.msm-body.is-wide {
  flex-direction: row;
  gap: 0.75rem;
  align-items: stretch;
  min-height: 0;
}
.msm-wide-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  width: 35%;
  min-width: 118px;
  flex-shrink: 0;
}
.msm-group-list.is-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.28rem;
  flex: 1;
  max-height: 100%;
  height: 100%;
  margin-top: 0;
}
.msm-group-list.is-grid .msm-node {
  padding: 0.3rem 0.55rem;
  gap: 0.45rem;
  font-size: 0.74rem;
  line-height: 1.25;
}

/* MSM 设置弹窗 */
.msm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.msm-modal {
  width: min(560px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.msm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.msm-modal-head h3 { margin: 0; font-size: 1rem; }
.msm-modal-close {
  border: 0; background: transparent; color: var(--muted);
  font-size: 1.1rem; cursor: pointer;
}
.msm-modal-close:hover { color: var(--text); }
.msm-modal-body {
  padding: 1.1rem 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.msm-field { display: flex; flex-direction: column; gap: 0.35rem; }
.msm-field > span { font-size: 0.82rem; font-weight: 600; }
.msm-field small { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }
.msm-field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--muted) 8%, var(--card));
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}
.msm-field input:focus { outline: 2px solid color-mix(in srgb, #8b5cf6 50%, transparent); border-color: #8b5cf6; }
.msm-field-row { display: flex; gap: 1rem; }
.msm-field-row .msm-field { flex: 1; min-width: 0; }
.msm-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
}
.msm-modal-foot button {
  padding: 0.48rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}
.msm-btn-test { margin-right: auto; border-color: #38bdf8 !important; color: #38bdf8 !important; }
.msm-btn-save { background: #8b5cf6 !important; border-color: #8b5cf6 !important; color: #fff !important; }
.msm-modal-foot button:hover { opacity: 0.85; }
.msm-test-result {
  padding: 0 1.2rem 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 0.5rem;
}

/* Circular Ring Gauge & Combo System Monitor Cards */
.sys-gauge-card {
  justify-content: space-between;
  min-height: 164px;
}

.sg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sg-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--fg);
}

.sg-ring {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0.2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sg-ring svg {
  transform: rotate(-90deg);
}

.sg-ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 6;
}

.sg-ring-fg {
  fill: none;
  stroke: #22c55e;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

.sg-ring-val {
  position: absolute;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.sg-meta {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  font-size: 0.72rem;
}

.sg-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--fg-dim);
}

.sg-meta-row b {
  color: var(--fg);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sys-combo-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0.85rem;
  height: 100%;
  align-items: center;
}

.sys-combo-left,
.sys-combo-right {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}

/* Dynamic Weather Micro-App Card & Detail Modal (Sun-Panel liteyais-weather parity) */
.weather-card {
  position: relative;
  display: block;
  padding: 0;
  min-height: 76px;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  border: none;
  background: linear-gradient(180deg, #6AB0FF 0%, #1C95FF 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.weather-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.weather-card.card-size-2x1,
.weather-card.card-size-2x2,
.weather-card.card-size-2x3,
.weather-card.card-size-2x4 {
  min-height: 164px;
}

.wt-card {
  width: 100%;
  height: 100%;
  min-height: inherit;
  font-family: "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.wt-card * {
  box-sizing: border-box;
}
.wt-card > * {
  position: relative;
  z-index: 1;
}
.wt-card-halo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.85;
  animation: wt-card-halo-sway 8s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes wt-card-halo-sway {
  from { transform: translateX(-20px); }
  to { transform: translateX(20px); }
}
.wt-card-halo-wide {
  object-fit: contain;
  object-position: left top;
}
.wt-card-weather-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat-x;
  background-position: 0 0;
  animation: wt-card-bg-move 30s linear infinite;
}
@keyframes wt-card-bg-move {
  from { background-position: 0 0; }
  to { background-position: 800px 0; }
}
.wt-card-snow {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat;
  background-position: 0 0;
  animation: wt-card-snow-fall 18s linear infinite;
}
@keyframes wt-card-snow-fall {
  from { background-position: 0 0; }
  to { background-position: 0 800px; }
}
.wt-card-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.4;
}
.wt-sunny { background: linear-gradient(180deg, #6AB0FF 0%, #1C95FF 100%); color: #fff; }
.wt-cloudy { background: linear-gradient(180deg, #5C7A9A 0%, #9BB5CE 100%); color: #fff; }
.wt-overcast { background: linear-gradient(180deg, #3C3E4A 0%, #767B87 100%); color: #fff; }
.wt-rain { background: rgb(53 69 85 / 95%); color: #fff; }
.wt-snow { background: linear-gradient(180deg, #A0AEC0 0%, #CBD5E0 100%); color: #fff; }
.wt-sand { background: linear-gradient(180deg, #9E6029 0%, #9B8B5C 100%); color: #fff; }
.wt-fog { background: linear-gradient(180deg, #8C8D90 0%, #A4A5A8 100%); color: #fff; }
.wt-default { background: linear-gradient(180deg, #3182ce 0%, #63b3ed 100%); color: #fff; }
.wt-card.wt-transparent {
  background: none !important;
}
.wt-card.wt-transparent .wt-card-halo,
.wt-card.wt-transparent .wt-card-weather-bg,
.wt-card.wt-transparent .wt-card-snow,
.wt-card.wt-transparent .wt-card-rain {
  display: none;
}

/* 1x1 */
.wt-1x1 {
  width: 100%;
  height: 100%;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 0 0 0;
}
.wt-1x1-city { font-size: 10px; opacity: 0.75; position: absolute; top: 6px; left: 8px; }
.wt-1x1-temp { font-size: 28px; font-weight: 700; line-height: 1.1; }
.wt-1x1-wx { font-size: 12px; opacity: 0.85; }

/* 1x2 */
.wt-1x2 {
  width: 100%;
  height: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 10px;
}
.wt-1x2-left { display: flex; flex-direction: column; flex: 1; }
.wt-1x2-city { font-size: 12px; font-weight: 600; opacity: 0.85; }
.wt-1x2-temp { font-size: 36px; font-weight: 200; letter-spacing: -2px; line-height: 1; }
.wt-1x2-right { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wt-1x2-wx-row { display: flex; align-items: center; gap: 4px; }
.wt-1x2-right .wx-svg { width: 28px; height: 28px; }
.wt-1x2-right .wx-svg img, .wt-1x2-right .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-1x2-wx { font-size: 14px; }
.wt-1x2-wind { font-size: 13px; opacity: 0.9; }

/* 2x1 */
.wt-2x1 {
  width: 100%;
  height: 100%;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 2px;
  gap: 28px;
}
.wt-2x1-top { display: flex; flex-direction: column; align-items: center; }
.wt-2x1-city { font-size: 13px; font-weight: 600; opacity: 0.85; }
.wt-2x1-temp { font-size: 38px; font-weight: 200; letter-spacing: -2px; line-height: 1; }
.wt-2x1-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wt-2x1-bottom .wx-svg { width: 28px; height: 28px; }
.wt-2x1-bottom .wx-svg img, .wt-2x1-bottom .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-2x1-wx { font-size: 14px; }

/* 2x2 */
.wt-2x2 {
  width: 100%;
  height: 100%;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
}
.wt-2x2-r1 { display: flex; align-items: center; gap: 6px; }
.wt-city { font-size: 12px; font-weight: 600; opacity: 0.9; white-space: nowrap; }
.wt-2x2-r2 { margin: 8px 0 14px 0; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.wt-2x2-temp { font-size: 48px; font-weight: 500; line-height: 1; }
.wt-2x2-wx-wrap { display: flex; flex-direction: column; align-items: center; }
.wt-2x2-wx-wrap .wx-svg { width: 32px; height: 32px; }
.wt-2x2-wx-wrap .wx-svg img, .wt-2x2-wx-wrap .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-2x2-wx { font-size: 14px; }
.wt-2x2-r3 { font-size: 12px; display: flex; }
.wt-hilo { font-size: 13px; }
.wt-2x2-r4 { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.wt-aqi { padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 600; background: #00000033 !important; }

/* 2x4 */
.wt-2x4 {
  width: 100%;
  height: 100%;
  min-height: 164px;
  display: flex;
  padding: 10px 14px;
  gap: 10px;
}
.wt-2x4-left { flex: 1; display: flex; gap: 4px; flex-direction: column; justify-content: space-around; min-width: 0; }
.wt-2x4-city { display: flex; align-items: center; gap: 4px; margin: 0 0 2px 4px; }
.wt-2x4-city span:first-child { font-size: 14px; font-weight: 800; margin-right: 8px; }
.wt-2x4-main { display: flex; align-items: center; gap: 12px; }
.wt-2x4-temp { font-size: 44px; font-weight: 600; letter-spacing: -3px; line-height: 1; }
.wt-2x4-wx-row { display: flex; align-items: center; gap: 4px; }
.wt-2x4-wx-row .wx-svg { width: 24px; height: 24px; flex-shrink: 0; }
.wt-2x4-wx-row .wx-svg img, .wt-2x4-wx-row .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-2x4-wx { font-size: 14px; opacity: 0.9; }
.wt-2x4-fc { display: flex; gap: 4px; justify-content: space-between; overflow-x: auto; }
.wt-2x4-fc::-webkit-scrollbar { height: 0; }
.wt-2x4-right {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.wt-2x4-r-row { display: flex; gap: 4px; }
.wt-info-card2 {
  width: 82px;
  height: 32px;
  border-radius: 200px;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  gap: 4px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px 0 4px;
  backdrop-filter: blur(2px);
}
span.wt-ic-icon2 {
  border-radius: 200px;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
span.wt-ic-value2 { color: rgba(255, 255, 255, 0.85); font-size: 12px; }
.wt-fc-item {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  flex-direction: column;
  border-radius: 8px;
}
.wt-fc-item .wx-svg { width: 20px; height: 20px; }
.wt-fc-item .wx-svg img, .wt-fc-item .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wx-svg { display: inline-flex; align-items: center; justify-content: center; }

.wc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wc-city {
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.95;
}

.wc-temp {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wc-extra {
  font-size: 0.76rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.weather-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weather-city-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.weather-city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.weather-city-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg-dim);
}

.weather-city-pill.is-active {
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-weight: 600;
}

.weather-hourly-strip {
  display: flex;
  flex-shrink: 0;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.65rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
}

.weather-hour-item {
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.75rem;
}

.weather-daily-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.weather-day-row {
  display: grid;
  grid-template-columns: 76px 1fr 90px 80px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.52rem 0.75rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.weather-idx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.weather-idx-box {
  padding: 0.65rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--fg-dim);
}

.weather-idx-box b {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.96rem;
  color: var(--fg);
}

@media (max-width: 640px) {
  .weather-idx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-size-2x4 {
    grid-column: span 2;
  }
  .sys-combo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mail-split {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
  }
}

.hero-sub {
  margin: 0.95rem 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--fg-dim);
}

.hero-stats {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.26rem 0.68rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--fg-dim);
  background: var(--glass);
  border: 1px solid var(--glass-line);
}

/* Search Engine Tabs */
.engine-tabs {
  margin-top: 0.95rem;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.engine-tab {
  padding: 0.34rem 0.74rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-dim);
  transition: color 0.15s ease, background 0.15s ease;
}

.engine-tab:hover {
  color: var(--fg);
  background: var(--card);
}

.engine-tab[data-engine="site"] {
  color: var(--accent);
}

.engine-tab.is-active {
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-weight: 600;
}

/* Search Box */
.search-wrap {
  position: relative;
  width: 100%;
  margin-top: 0.75rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  height: 50px;
  padding: 0 0.45rem 0 0.95rem;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.search-box:focus-within {
  background: var(--glass-hover);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-line));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.search-icon {
  color: var(--fg-dim);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
}

.search-input::placeholder {
  color: rgba(248, 250, 252, 0.72);
}

.search-go {
  height: 36px;
  padding: 0 1rem;
  border-radius: 8px;
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-size: 0.84rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.search-go:hover {
  opacity: 0.9;
}

.search-go:active {
  transform: scale(0.97);
}

/* Live Suggest Dropdown (Site search mode) */
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 296px;
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 8px;
  background: var(--glass-hover);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--shadow-hover);
  text-align: left;
}

.suggest[hidden] {
  display: none;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.72rem;
  border-radius: 6px;
  transition: background 0.12s ease;
}

.suggest-item:hover,
.suggest-item.is-active {
  background: var(--card-hover);
}

.suggest-main {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.suggest-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.suggest-desc {
  font-size: 0.78rem;
  color: var(--fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-cat {
  font-size: 0.72rem;
  color: var(--fg-faint);
  flex-shrink: 0;
}

.suggest-empty {
  padding: 0.85rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--fg-dim);
}

.hero-hint {
  margin: 0.8rem 0 0;
  font-size: 0.78rem;
  color: var(--fg-faint);
}

.scroll-cue {
  margin-top: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--fg-dim);
  animation: bob 2.2s ease-in-out infinite;
  transition: color 0.16s ease, background 0.16s ease;
}

.scroll-cue:hover {
  color: var(--fg);
  background: var(--card);
}

@keyframes bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* Category Sections */
main.container {
  padding-top: 0.65rem;
}

.cat {
  scroll-margin-top: 96px;
  margin-bottom: 1.85rem;
}

.cat-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  text-align: left;
  transition: opacity 0.16s ease;
}

.cat-head:hover {
  opacity: 0.92;
}

.cat-head-left {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.cat-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cat-bar {
  display: none;
}

.cat-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.cat-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  min-width: 48px;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--section-accent) 92%, #fff),
    color-mix(in oklab, var(--section-accent) 32%, transparent)
  );
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left center;
  transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cat-head-main:hover .cat-title::after {
  opacity: 0.92;
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .cat-title::after {
    transition: none;
  }
}

.cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--fg-dim);
  background: var(--card);
  border: 1px solid var(--line);
}

.cat-desc {
  margin: 0;
  padding-left: calc(4px + 0.65rem);
  font-size: 0.84rem;
  color: var(--fg-dim);
}

.cat-chevron {
  color: var(--fg-dim);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.cat-head[aria-expanded="false"] .cat-chevron {
  transform: rotate(-90deg);
}

/* Card Grid (Dense packing for 1x1 / 1x2 / 2x2 sizes) */
.grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 76px;
  grid-auto-flow: dense;
  gap: 1.15rem 1rem;
}

.grid[hidden] {
  display: none;
}

.card-size-1x1 {
  --cs: 1;
  --rs: 1;
  grid-column: span 1;
  grid-row: span 1;
}

.card-size-1x2 {
  --cs: 2;
  --rs: 1;
  grid-column: span 2;
  grid-row: span 1;
}

.card-size-2x1 {
  --cs: 1;
  --rs: 2;
  grid-column: span 1;
  grid-row: span 2;
}

.card-size-2x2 {
  --cs: 2;
  --rs: 2;
  grid-column: span 2;
  grid-row: span 2;
}

.card-size-2x3 {
  --cs: 3;
  --rs: 2;
  grid-column: span 3;
  grid-row: span 2;
}

.card-size-2x4 {
  --cs: 4;
  --rs: 2;
  grid-column: span 4;
  grid-row: span 2;
}

@media (min-width: 1001px) {
  .grid > [data-grid-pos="1"] {
    grid-column: var(--gc) / span var(--cs, 1);
    grid-row: var(--gr) / span var(--rs, 1);
  }
}

.cat.is-cat-editing .grid {
  padding-bottom: 18px;
}

.grid-drop-ghost {
  pointer-events: none;
  border-radius: var(--radius);
  border: 2px dashed rgba(96, 165, 250, 0.85);
  background: rgba(96, 165, 250, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
  z-index: 5;
  transition: grid-column 0.08s ease, grid-row 0.08s ease;
}

a.card.card-size-1x1 {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 0.32rem;
  padding: 0.5rem 0.35rem;
}

a.card.card-size-1x1 .icon {
  width: 34px;
  height: 34px;
}

a.card.card-size-1x1 .icon img,
a.card.card-size-1x1 .icon svg {
  width: 22px;
  height: 22px;
}

a.card.card-size-1x1 .text {
  width: 100%;
}

a.card.card-size-1x1 .title {
  font-size: 0.76rem;
}

a.card.card-size-1x1 .desc,
a.card.card-size-1x1 .lan-badge {
  display: none;
}

a.card.card-size-2x2 {
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.05rem 1.15rem;
}

a.card.card-size-2x2 .icon {
  width: 52px;
  height: 52px;
}

a.card.card-size-2x2 .title {
  font-size: 1.08rem;
}

a.card.card-size-2x2 .desc {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.docker-monitor-card.card-size-1x1 {
  flex-direction: column;
  justify-content: center;
  padding: 0.45rem;
  gap: 0.2rem;
}

.docker-monitor-card.card-size-1x1 .dm-name {
  max-width: 100%;
  font-size: 0.74rem;
}

.docker-monitor-card.card-size-1x1 .dm-stats {
  width: 100%;
  padding-right: 0;
}

.docker-monitor-card.card-size-1x1 .dm-bar {
  display: none;
}

/* Size Picker inside Edit Modal */
.size-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.size-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.size-opt:hover {
  border-color: var(--fg-dim);
}

.size-opt.is-active {
  border-color: var(--accent-cool);
  background: color-mix(in srgb, var(--accent-cool) 10%, var(--bg));
}

.size-box {
  width: 34px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-shape {
  display: block;
  border: 1.5px solid var(--fg-dim);
  background: var(--card-hover);
  border-radius: 2px;
}

.size-shape.s1x1 {
  width: 10px;
  height: 10px;
}

.size-shape.s1x2 {
  width: 18px;
  height: 10px;
}

.size-shape.s2x1 {
  width: 10px;
  height: 18px;
}

.size-shape.s2x2 {
  width: 18px;
  height: 18px;
}

.size-shape.s2x3 {
  width: 24px;
  height: 18px;
}

.size-shape.s2x4 {
  width: 30px;
  height: 18px;
}

.size-label {
  font-size: 0.72rem;
  color: var(--fg-dim);
  font-weight: 600;
}

a.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.75rem 0.68rem;
  min-height: 76px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--section-accent) 5%, var(--glass-bg));
  backdrop-filter: blur(16px) saturate(155%);
  -webkit-backdrop-filter: blur(16px) saturate(155%);
  border: 1px solid var(--glass-border);
  border-left: 2px solid color-mix(in srgb, var(--section-accent) 46%, var(--glass-border));
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 4px 18px rgba(0, 0, 0, 0.12);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

/* 玻璃上缘高光 */
a.card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 40%;
  border-radius: 13px 13px 0 0;
  background: linear-gradient(180deg, var(--glass-highlight), transparent);
  opacity: 0.35;
  pointer-events: none;
}

a.card:hover {
  background: color-mix(in srgb, var(--section-accent) 12%, var(--glass-bg-strong));
  border-color: color-mix(in srgb, var(--section-accent) 55%, var(--glass-border));
  border-left-color: color-mix(in srgb, var(--section-accent) 78%, var(--glass-border));
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-hover);
}

.icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--icon-tile);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.monogram {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #182238;
  user-select: none;
}

.text {
  min-width: 0;
  flex: 1;
}

.title {
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desc {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer */
.site-foot {
  margin-top: 4.5rem;
  border-top: 1px solid var(--line);
  min-height: 104px;
  display: flex;
  align-items: center;
}

.foot-inner {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--fg-dim);
}

.foot-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--fg);
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.84rem;
  color: var(--fg-dim);
}

.foot-links a:hover {
  color: var(--fg);
}

.foot-copy {
  text-align: right;
  font-size: 0.82rem;
  color: var(--fg-dim);
}

/* Command Palette (⌘K) */
.cmdk {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cmdk[hidden] {
  display: none;
}

.cmdk-dialog {
  width: min(540px, 92vw);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: var(--glass-hover);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.cmdk-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.cmdk-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.96rem;
}

.cmdk-input::placeholder {
  color: var(--fg-faint);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.42rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: inherit;
  color: var(--fg-dim);
  background: var(--card);
  border: 1px solid var(--line);
}

.cmdk-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem;
}

.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  text-align: left;
  transition: background 0.12s ease;
}

.cmdk-item:hover,
.cmdk-item.is-active {
  background: var(--card-hover);
}

.cmdk-item-left {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.cmdk-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.cmdk-item-desc {
  font-size: 0.78rem;
  color: var(--fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-item-meta {
  font-size: 0.72rem;
  color: var(--fg-faint);
  flex-shrink: 0;
}

.cmdk-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  color: var(--fg-faint);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .nav-link {
    font-size: 0.8rem;
    padding: 0.34rem 0.46rem;
  }
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .container,
  .foot-inner {
    width: min(100% - 40px, 820px);
  }
  .brand-text {
    display: none;
  }
  .hero-title {
    font-size: 4.2rem;
  }
}

@media (max-width: 720px) {
  .cat {
    scroll-margin-top: 96px;
  }
  .nav-link {
    font-size: 0.78rem;
    padding: 0.34rem 0.5rem;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .foot-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .foot-copy {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container,
  .foot-inner {
    width: calc(100% - 28px);
  }
  .hero-title {
    font-size: 3.2rem;
  }
  .search-go,
  .scroll-cue {
    display: none;
  }
  a.card {
    min-height: 70px;
    padding: 0.8rem 0.85rem;
  }
  .icon {
    width: 40px;
    height: 40px;
  }
  .cmdk {
    align-items: flex-end;
    padding-top: 0;
  }
  .cmdk-dialog {
    width: 100%;
    max-height: 74vh;
    border-radius: 14px 14px 0 0;
  }
}

/* Dynamic Weather Micro-App Card & Detail Modal (Sun-Panel liteyais-weather parity) */
.weather-card {
  position: relative;
  display: block;
  padding: 0;
  min-height: 76px;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  border: none;
  background: linear-gradient(180deg, #6AB0FF 0%, #1C95FF 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.weather-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.weather-card.card-size-2x1,
.weather-card.card-size-2x2,
.weather-card.card-size-2x3,
.weather-card.card-size-2x4 {
  min-height: 164px;
}

.wt-card {
  width: 100%;
  height: 100%;
  min-height: inherit;
  font-family: "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.wt-card * {
  box-sizing: border-box;
}
.wt-card > * {
  position: relative;
  z-index: 1;
}
.wt-card-halo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.85;
  animation: wt-card-halo-sway 8s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes wt-card-halo-sway {
  from { transform: translateX(-20px); }
  to { transform: translateX(20px); }
}
.wt-card-halo-wide {
  object-fit: contain;
  object-position: left top;
}
.wt-card-weather-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat-x;
  background-position: 0 0;
  animation: wt-card-bg-move 30s linear infinite;
}
@keyframes wt-card-bg-move {
  from { background-position: 0 0; }
  to { background-position: 800px 0; }
}
.wt-card-snow {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat;
  background-position: 0 0;
  animation: wt-card-snow-fall 18s linear infinite;
}
@keyframes wt-card-snow-fall {
  from { background-position: 0 0; }
  to { background-position: 0 800px; }
}
.wt-card-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.4;
}
.wt-sunny { background: linear-gradient(180deg, #6AB0FF 0%, #1C95FF 100%); color: #fff; }
.wt-cloudy { background: linear-gradient(180deg, #5C7A9A 0%, #9BB5CE 100%); color: #fff; }
.wt-overcast { background: linear-gradient(180deg, #3C3E4A 0%, #767B87 100%); color: #fff; }
.wt-rain { background: rgb(53 69 85 / 95%); color: #fff; }
.wt-snow { background: linear-gradient(180deg, #A0AEC0 0%, #CBD5E0 100%); color: #fff; }
.wt-sand { background: linear-gradient(180deg, #9E6029 0%, #9B8B5C 100%); color: #fff; }
.wt-fog { background: linear-gradient(180deg, #8C8D90 0%, #A4A5A8 100%); color: #fff; }
.wt-default { background: linear-gradient(180deg, #3182ce 0%, #63b3ed 100%); color: #fff; }
.wt-card.wt-transparent {
  background: none !important;
}
.wt-card.wt-transparent .wt-card-halo,
.wt-card.wt-transparent .wt-card-weather-bg,
.wt-card.wt-transparent .wt-card-snow,
.wt-card.wt-transparent .wt-card-rain {
  display: none;
}

/* 1x1 */
.wt-1x1 {
  width: 100%;
  height: 100%;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 0 0 0;
}
.wt-1x1-city { font-size: 10px; opacity: 0.75; position: absolute; top: 6px; left: 8px; }
.wt-1x1-temp { font-size: 28px; font-weight: 700; line-height: 1.1; }
.wt-1x1-wx { font-size: 12px; opacity: 0.85; }

/* 1x2 */
.wt-1x2 {
  width: 100%;
  height: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 10px;
}
.wt-1x2-left { display: flex; flex-direction: column; flex: 1; }
.wt-1x2-city { font-size: 12px; font-weight: 600; opacity: 0.85; }
.wt-1x2-temp { font-size: 36px; font-weight: 200; letter-spacing: -2px; line-height: 1; }
.wt-1x2-right { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wt-1x2-wx-row { display: flex; align-items: center; gap: 4px; }
.wt-1x2-right .wx-svg { width: 28px; height: 28px; }
.wt-1x2-right .wx-svg img, .wt-1x2-right .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-1x2-wx { font-size: 14px; }
.wt-1x2-wind { font-size: 13px; opacity: 0.9; }

/* 2x1 */
.wt-2x1 {
  width: 100%;
  height: 100%;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 2px;
  gap: 28px;
}
.wt-2x1-top { display: flex; flex-direction: column; align-items: center; }
.wt-2x1-city { font-size: 13px; font-weight: 600; opacity: 0.85; }
.wt-2x1-temp { font-size: 38px; font-weight: 200; letter-spacing: -2px; line-height: 1; }
.wt-2x1-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wt-2x1-bottom .wx-svg { width: 28px; height: 28px; }
.wt-2x1-bottom .wx-svg img, .wt-2x1-bottom .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-2x1-wx { font-size: 14px; }

/* 2x2 */
.wt-2x2 {
  width: 100%;
  height: 100%;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
}
.wt-2x2-r1 { display: flex; align-items: center; gap: 6px; }
.wt-city { font-size: 12px; font-weight: 600; opacity: 0.9; white-space: nowrap; }
.wt-2x2-r2 { margin: 8px 0 14px 0; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.wt-2x2-temp { font-size: 48px; font-weight: 500; line-height: 1; }
.wt-2x2-wx-wrap { display: flex; flex-direction: column; align-items: center; }
.wt-2x2-wx-wrap .wx-svg { width: 32px; height: 32px; }
.wt-2x2-wx-wrap .wx-svg img, .wt-2x2-wx-wrap .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-2x2-wx { font-size: 14px; }
.wt-2x2-r3 { font-size: 12px; display: flex; }
.wt-hilo { font-size: 13px; }
.wt-2x2-r4 { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.wt-aqi { padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 600; background: #00000033 !important; }

/* 2x4 */
.wt-2x4 {
  width: 100%;
  height: 100%;
  min-height: 164px;
  display: flex;
  padding: 10px 14px;
  gap: 10px;
}
.wt-2x4-left { flex: 1; display: flex; gap: 4px; flex-direction: column; justify-content: space-around; min-width: 0; }
.wt-2x4-city { display: flex; align-items: center; gap: 4px; margin: 0 0 2px 4px; }
.wt-2x4-city span:first-child { font-size: 14px; font-weight: 800; margin-right: 8px; }
.wt-2x4-main { display: flex; align-items: center; gap: 12px; }
.wt-2x4-temp { font-size: 44px; font-weight: 600; letter-spacing: -3px; line-height: 1; }
.wt-2x4-wx-row { display: flex; align-items: center; gap: 4px; }
.wt-2x4-wx-row .wx-svg { width: 24px; height: 24px; flex-shrink: 0; }
.wt-2x4-wx-row .wx-svg img, .wt-2x4-wx-row .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wt-2x4-wx { font-size: 14px; opacity: 0.9; }
.wt-2x4-fc { display: flex; gap: 4px; justify-content: space-between; overflow-x: auto; }
.wt-2x4-fc::-webkit-scrollbar { height: 0; }
.wt-2x4-right {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.wt-2x4-r-row { display: flex; gap: 4px; }
.wt-info-card2 {
  width: 82px;
  height: 32px;
  border-radius: 200px;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  gap: 4px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px 0 4px;
  backdrop-filter: blur(2px);
}
span.wt-ic-icon2 {
  border-radius: 200px;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
span.wt-ic-value2 { color: rgba(255, 255, 255, 0.85); font-size: 12px; }
.wt-fc-item {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  flex-direction: column;
  border-radius: 8px;
}
.wt-fc-item .wx-svg { width: 20px; height: 20px; }
.wt-fc-item .wx-svg img, .wt-fc-item .wx-svg svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.wx-svg { display: inline-flex; align-items: center; justify-content: center; }

.wc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wc-city {
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.95;
}

.wc-temp {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wc-extra {
  font-size: 0.76rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.weather-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weather-city-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.weather-city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.weather-city-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg-dim);
}

.weather-city-pill.is-active {
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  font-weight: 600;
}

.weather-hourly-strip {
  display: flex;
  flex-shrink: 0;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.65rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
}

.weather-hour-item {
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.75rem;
}

.weather-daily-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.weather-day-row {
  display: grid;
  grid-template-columns: 76px 1fr 90px 80px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.52rem 0.75rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.weather-idx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.weather-idx-box {
  padding: 0.65rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--fg-dim);
}

.weather-idx-box b {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.96rem;
  color: var(--fg);
}

@media (max-width: 640px) {
  .weather-idx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cat-title {
    font-size: 1.35rem;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .container,
  .foot-inner {
    width: calc(100% - 20px);
  }
  .hero-title {
    font-size: 2.8rem;
  }
}

/* Random / Bing Wallpaper Micro-App Card & Gallery Modal */
.wallpaper-card {
  position: relative;
  display: block;
  padding: 0;
  min-height: 76px;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wallpaper-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.wallpaper-card.card-size-2x1,
.wallpaper-card.card-size-2x2,
.wallpaper-card.card-size-2x3,
.wallpaper-card.card-size-2x4 {
  min-height: 164px;
}

.wp-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.wp-card-img.is-loaded {
  opacity: 1;
}

.wallpaper-card:hover .wp-card-img {
  transform: scale(1.04);
}

.wp-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  opacity: 0.65;
}

.wp-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 35%, rgba(15, 23, 42, 0.78) 100%);
  pointer-events: none;
}

.wp-card-refresh {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.88rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease, transform 0.3s ease;
}

.wallpaper-card:hover .wp-card-refresh,
.wp-card-refresh.is-spin {
  opacity: 1;
}

.wp-card-refresh:hover {
  background: rgba(15, 23, 42, 0.78);
}

.wp-card-refresh.is-spin {
  animation: wpSpin 0.8s linear infinite;
}

@keyframes wpSpin {
  to { transform: rotate(360deg); }
}

.wp-card-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.wp-card-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  color: #fff;
}

.wp-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallpaper-card.card-size-1x2 .wp-card-meta {
  left: 8px;
  right: 36px;
  bottom: 6px;
}

.wallpaper-card.card-size-1x2 .wp-card-badge {
  display: none;
}

.wallpaper-modal-body {
  padding: 1rem 1.2rem 1.3rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wp-hero {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.wp-hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

.wp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wp-hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}

.wp-hero-info {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.9rem;
  color: #fff;
}

.wp-hero-date {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 0.2rem;
}

.wp-hero-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.wp-hero-copy {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  opacity: 0.88;
}

.wp-hero-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.wp-dl-btn {
  text-decoration: none;
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
}

.wp-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.wp-gallery-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}

.wp-gallery-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wp-page-num {
  font-size: 0.8rem;
  color: var(--muted);
}

.wp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .wp-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wp-thumb-item {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
  background: #0f172a;
}

.wp-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.wp-thumb-item:hover img {
  transform: scale(1.06);
}

.wp-thumb-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Left Floating Category Directory */
section.cat {
  scroll-margin-top: 24px;
}

.side-cat-nav {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.side-cat-nav:hover {
  background: var(--glass-bg-strong);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  box-shadow: var(--glass-shadow);
}

.side-cat-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--fg);
  text-align: left;
  transition: gap 0.2s ease;
}

.side-cat-nav:hover .side-cat-item {
  gap: 10px;
}

.side-cat-pill {
  width: 18px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  flex-shrink: 0;
  transition: width 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

[data-theme="light"] .side-cat-pill {
  background: rgba(15, 23, 42, 0.26);
}

.side-cat-item.is-active .side-cat-pill {
  width: 26px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .side-cat-item.is-active .side-cat-pill {
  background: var(--accent, #2563eb);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

.side-cat-item:hover .side-cat-pill {
  background: #ffffff;
}

[data-theme="light"] .side-cat-item:hover .side-cat-pill {
  background: var(--accent, #2563eb);
}

.side-cat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.22s ease, opacity 0.18s ease, color 0.15s ease;
}

.side-cat-nav:hover .side-cat-label {
  max-width: 150px;
  opacity: 1;
}

.side-cat-item.is-active .side-cat-label,
.side-cat-item:hover .side-cat-label {
  color: var(--fg);
  font-weight: 600;
}

@media (max-width: 900px) {
  .side-cat-nav {
    display: none;
  }
}


/* ============================================================
   Liquid Glass 2.0 — iOS 26 镜头感增强层
   参考 QWEA0/Liquid-Glass-Android：边缘折射环 + RGB 色散
   + 指针跟随高光 + 按压鼓起。仅增强材质，不改布局。
   ============================================================ */
:root { --mx: 50%; --my: 8%; }

.glass-actions, a.card, .sys-card, .micro-widget-card, .side-cat-nav {
  isolation: isolate;
}

/* 镜面高光：叠在玻璃底色上（内容之下），随指针在该元素内移动 */
.glass-actions {
  background:
    radial-gradient(150% 130% at var(--mx) var(--my),
      color-mix(in srgb, var(--glass-highlight) 68%, transparent) 0%,
      transparent 48%),
    var(--glass-bg);
}
.sys-card {
  background:
    radial-gradient(150% 130% at var(--mx) var(--my),
      color-mix(in srgb, var(--glass-highlight) 54%, transparent) 0%,
      transparent 48%),
    var(--glass-bg);
}
a.card, .micro-widget-card {
  background:
    radial-gradient(150% 130% at var(--mx) var(--my),
      color-mix(in srgb, var(--glass-highlight) 54%, transparent) 0%,
      transparent 48%),
    color-mix(in srgb, var(--section-accent) 5%, var(--glass-bg));
}
a.card:hover, .micro-widget-card:hover {
  background:
    radial-gradient(150% 130% at var(--mx) var(--my),
      color-mix(in srgb, var(--glass-highlight) 66%, transparent) 0%,
      transparent 48%),
    color-mix(in srgb, var(--section-accent) 12%, var(--glass-bg-strong));
}

.card,
.docker-monitor-card,
.mail-widget-card,
.micro-widget-card,
.sys-card,
.glass-actions,
.engine-tabs,
.search-box {
  border-color: transparent !important;
}

.micro-widget-card::after,
.mail-widget-card::after,
.docker-monitor-card::after,
.side-cat-nav::after,
.sys-card::after,
.glass-actions::after,
.card::after,
.engine-tabs::after,
.search-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.62;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.12) 35%,
    rgba(255, 255, 255, 0.04) 65%,
    rgba(255, 255, 255, 0.26) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  box-shadow: none;
}

.glass-actions:hover::after,
.card:hover::after,
.docker-monitor-card:hover::after,
.mail-widget-card:hover::after,
.micro-widget-card:hover::after,
.side-cat-nav:hover::after {
  opacity: 0.95;
  box-shadow: none;
}

/* 按钮图标置于光学层之上 */
.glass-actions .icon-btn { z-index: 4; }

/* 按压：玻璃鼓起，折射环与高光集中 */
.glass-actions:active,
a.card:active,
.micro-widget-card:active {
  transform: scale(0.985);
  box-shadow:
    inset 0 0 0 2px var(--lg-ring),
    inset 0 0 22px -4px color-mix(in srgb, var(--lg-cyan) 60%, transparent),
    var(--shadow-hover);
}

@media (prefers-reduced-motion: reduce) {
  .glass-actions:active, a.card:active, .micro-widget-card:active { transform: none; }
}


/* ===== Liquid Glass 3.0 — SVG 真实折射层（移植 rdev/liquid-glass-react） =====
   只对右上角胶囊启用：feDisplacementMap 折射背景 + RGB 三通道色散，
   内容层保持清晰。全站卡片仍用 2.0 的 CSS 玻璃，避免昂贵滤镜拖慢滚动。 */
.lg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 仅当 SVG 折射滤镜真正注入成功时才透明化，否则保留 2.0 玻璃兜底 */
html.lg-svg-ready .glass-actions,
html.lg-svg-ready .micro-widget-card,
html.lg-svg-ready .mail-widget-card,
html.lg-svg-ready .card,
html.lg-svg-ready .docker-monitor-card,
html.lg-svg-ready .sys-card,
html.lg-svg-ready .search-box,
html.lg-svg-ready .engine-tabs,
html.lg-svg-ready .side-cat-nav {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
}

html.lg-svg-ready .micro-widget-card > :not(.lg-warp),
html.lg-svg-ready .mail-widget-card > :not(.lg-warp),
html.lg-svg-ready .card > :not(.lg-warp):not(.lan-badge):not(.card-edit-actions),
html.lg-svg-ready .docker-monitor-card > :not(.lg-warp):not(.dm-dot):not(.card-edit-actions),
html.lg-svg-ready .sys-card > :not(.lg-warp),
html.lg-svg-ready .search-box > :not(.lg-warp),
html.lg-svg-ready .engine-tabs > :not(.lg-warp) {
  position: relative;
  z-index: 2;
}

html.lg-svg-ready .card > .lan-badge,
html.lg-svg-ready .docker-monitor-card > .dm-dot {
  z-index: 3;
}

/* 书签卡片、Docker 卡片、邮箱卡片、搜索栏、状态栏、微应用统一使用一致的通透液态玻璃 + 立体斜切高光边 */
.card,
.docker-monitor-card,
.mail-widget-card,
.sys-card,
.engine-tabs,
.search-box {
  position: relative;
  background: rgba(15, 23, 42, 0.22) !important;
  backdrop-filter: blur(6px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(6px) saturate(165%) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26) !important;
}

.micro-widget-card,
.mail-widget-card {
  border-radius: 22px !important;
}

.card,
.docker-monitor-card {
  border-radius: 18px !important;
}

a.card:hover > :not(.lg-warp):not(.lan-badge):not(.card-edit-actions) {
  position: relative;
  z-index: 2;
}

.card:hover,
.docker-monitor-card:hover,
.mail-widget-card:hover,
.search-box:focus-within {
  background: rgba(15, 23, 42, 0.3) !important;
}

.lg-warp {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(4px) url(#lg-refract) saturate(150%) brightness(1.06);
  -webkit-backdrop-filter: blur(4px) url(#lg-refract) saturate(150%) brightness(1.06);
  z-index: 0;
  pointer-events: none;
}

.card .lg-warp,
.docker-monitor-card .lg-warp,
.sys-card .lg-warp,
.engine-tabs .lg-warp,
.side-cat-nav .lg-warp,
.glass-actions .lg-warp {
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(4px) url(#lg-refract-sm) saturate(155%) brightness(1.04);
  -webkit-backdrop-filter: blur(4px) url(#lg-refract-sm) saturate(155%) brightness(1.04);
}

.search-box {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24) !important;
}

.search-box .lg-warp {
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(14px) saturate(165%) brightness(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(165%) brightness(1.04);
}

.mail-widget-card .mw-preview,
.mail-widget-card .mw-foot,
.msm-status,
.msm-cur-label {
  color: rgba(241, 245, 249, 0.78) !important;
}

/* 浅色/深色主页面玻璃卡片与搜索栏、状态栏保持一致 */
:root[data-theme="light"] .card,
:root[data-theme="light"] .docker-monitor-card,
:root[data-theme="light"] .mail-widget-card,
:root[data-theme="light"] .sys-card,
:root[data-theme="light"] .engine-tabs,
:root[data-theme="light"] .search-box,
:root[data-theme="light"] .micro-widget-card:not(.weather-card):not(.wallpaper-card),
:root[data-theme="light"] .glass-actions {
  color: #f3f5f8;
  --fg: #f3f5f8;
  --muted: rgba(228, 233, 242, 0.72);
  --fg-dim: rgba(228, 233, 242, 0.72);
}

:root[data-theme="light"] .search-input {
  color: #f3f5f8;
}

:root[data-theme="light"] .search-input::placeholder {
  color: rgba(228, 233, 242, 0.65);
}

:root[data-theme="light"] .engine-tab {
  color: rgba(228, 233, 242, 0.78);
}

:root[data-theme="light"] .engine-tab.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .docker-monitor-card,
:root[data-theme="light"] .mail-widget-card,
:root[data-theme="light"] .sys-card,
:root[data-theme="light"] .engine-tabs,
:root[data-theme="light"] .search-box {
  background: rgba(15, 23, 42, 0.22) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .docker-monitor-card:hover,
:root[data-theme="light"] .mail-widget-card:hover,
:root[data-theme="light"] .search-box:focus-within {
  background: rgba(15, 23, 42, 0.3) !important;
}

:root[data-theme="light"] .lg-warp {
  background: rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(4px) url(#lg-refract) saturate(150%) brightness(1.06);
  -webkit-backdrop-filter: blur(4px) url(#lg-refract) saturate(150%) brightness(1.06);
}

:root[data-theme="light"] .glass-actions .lg-warp,
.glass-actions .lg-warp {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(6px) url(#lg-refract-sm) saturate(165%) brightness(1.06);
  -webkit-backdrop-filter: blur(6px) url(#lg-refract-sm) saturate(165%) brightness(1.06);
}

.glass-actions .icon-btn,
.glass-actions .net-mode-btn,
:root[data-theme="light"] .glass-actions .icon-btn,
:root[data-theme="light"] .glass-actions .net-mode-btn {
  position: relative;
  z-index: 4;
  color: #f3f5f8;
}

.glass-actions .net-mode-btn[aria-checked="true"],
:root[data-theme="light"] .glass-actions .net-mode-btn[aria-checked="true"] {
  color: #5fd6ad;
  background: color-mix(in srgb, #5fd6ad 18%, transparent);
}

.glass-actions::after { opacity: 0.55; }

/* ========== 小破站 (Bilibili Parallax Quick-Launch) ========== */
.bili-widget-card {
  padding: 0 !important;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border-radius: 18px;
  --px: 0;
  --py: 0;
  perspective: 800px;
}

.bili-card-stage {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
  background: #0f1322;
}

.bs-layer {
  position: absolute;
  inset: -5%;
  translate: 0px 0px;
  will-change: translate;
  transition: translate 0.14s ease-out;
  pointer-events: none;
}

.bs-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .bs-layer {
    transition: none;
  }
}

.bili-gear-btn {
  position: absolute !important;
  top: 8px;
  right: 8px;
  z-index: 6 !important;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.46);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.bili-widget-card:hover .bili-gear-btn,
.bili-gear-btn:focus-visible {
  opacity: 1;
}

.bili-gear-btn:hover {
  background: rgba(251, 114, 153, 0.88);
  border-color: rgba(255, 255, 255, 0.55);
}

.bili-widget-card .card-edit-actions {
  right: 38px;
  top: 8px;
}

/* Settings Modal */
.bili-modal-panel {
  width: min(720px, 92vw);
  height: auto !important;
  max-height: 88vh;
  padding: 20px 24px 22px;
  border-radius: 18px;
}

.bili-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bili-modal-head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
}

.bili-modal-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  opacity: 0.72;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.bili-modal-close:hover {
  opacity: 1;
  background: rgba(148, 163, 184, 0.18);
}

.bili-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bili-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bili-field-label {
  font-size: 0.92rem;
  font-weight: 600;
}

.bili-field-hint {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-bottom: 2px;
}

.bili-url-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.32);
  color: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

:root[data-theme="light"] .bili-url-input {
  background: rgba(255, 255, 255, 0.85);
}

.bili-url-input:focus {
  border-color: #fb7299;
  box-shadow: 0 0 0 3px rgba(251, 114, 153, 0.22);
}

.bili-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 600px) {
  .bili-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bili-style-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

:root[data-theme="light"] .bili-style-option {
  background: rgba(255, 255, 255, 0.72);
}

.bili-style-option:hover {
  border-color: rgba(251, 114, 153, 0.55);
}

.bili-style-option.is-selected {
  border-color: #fb7299;
  box-shadow: 0 0 0 2px rgba(251, 114, 153, 0.2);
}

.bili-style-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

.bili-style-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bili-style-name {
  font-size: 0.82rem;
  font-weight: 500;
}

.bili-modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.bili-save-btn {
  min-width: 96px;
  padding: 9px 22px;
  border: none;
  border-radius: 10px;
  background: #fb7299;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.bili-save-btn:hover:not(:disabled) {
  background: #f45a8d;
  box-shadow: 0 4px 14px rgba(251, 114, 153, 0.35);
}

.bili-save-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* ========== 音乐播放器微应用 (Apple/Frosted-Glass Music Card) ========== */
.card-size-3x2 {
  grid-column: span 2;
  grid-row: span 3;
}

.music-widget-card {
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  border-radius: 22px !important;
  color: #fff;
  user-select: none;
}

.mp-bg-blur {
  position: absolute !important;
  inset: -10% -10% 20% -10%;
  z-index: 1 !important;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(145%) brightness(0.8);
  opacity: 0.45;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  pointer-events: none;
}

.mp-cover-area {
  position: absolute !important;
  inset: 0 0 36% 0;
  z-index: 2 !important;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 54%, transparent 100%);
}

.music-widget-card.card-size-2x2 .mp-cover-area {
  inset: 0 0 22% 0;
  mask-image: linear-gradient(to bottom, #000 46%, transparent 100%);
}

.music-widget-card.card-size-2x4 .mp-cover-area {
  inset: 0 54% 0 0;
  -webkit-mask-image: linear-gradient(to right, #000 65%, transparent 100%);
  mask-image: linear-gradient(to right, #000 65%, transparent 100%);
}

.mp-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.35));
}

.mp-lyrics-drawer {
  position: absolute;
  inset: 0;
  padding: 16px 14px 30px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  scrollbar-width: none;
}

.mp-lyrics-drawer[hidden],
.mp-cover-fallback[hidden],
.mp-cover-img[hidden] {
  display: none !important;
}

.mp-lyrics-drawer::-webkit-scrollbar {
  display: none;
}

.mp-lrc-row {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.56);
  transition: color 0.2s ease, transform 0.2s ease;
}

.mp-lrc-row.is-cur {
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.mp-lrc-empty {
  margin: auto;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.mp-top-actions {
  position: absolute !important;
  top: 10px;
  right: 10px;
  z-index: 6 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-source-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.mp-source-badge.is-netease {
  background: #e60026;
}

.mp-source-badge.is-qq {
  background: #12b76a;
}

.mp-source-badge.is-local {
  background: #3b82f6;
}

.mp-gear-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.52);
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.music-widget-card:hover .mp-gear-btn,
.mp-gear-btn:focus-visible {
  opacity: 1;
}

.mp-gear-btn:hover {
  background: rgba(251, 114, 153, 0.85);
}

.music-widget-card .card-edit-actions {
  top: 10px;
  left: 10px;
  right: auto;
}

.mp-glass-dock {
  position: absolute !important;
  inset: auto 0 0 0;
  z-index: 4 !important;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.14) 100%);
}

.music-widget-card.card-size-2x2 .mp-glass-dock {
  padding: 6px 12px 6px;
  gap: 3px;
}

.music-widget-card.card-size-2x2 .mp-sub-line {
  margin-bottom: 0;
}

.music-widget-card.card-size-2x4 .mp-glass-dock {
  inset: 0 0 0 42%;
  justify-content: center;
  padding: 14px 18px;
}

.mp-title-line {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.mp-sub-line {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.mp-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mp-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3.5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.92) var(--val, 0%),
    rgba(255, 255, 255, 0.22) var(--val, 0%)
  );
  outline: none;
  cursor: pointer;
}

.mp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.65);
  transition: transform 0.12s ease;
}

.mp-range:hover::-webkit-slider-thumb {
  transform: scale(1.25);
}

.mp-preview-bar {
  width: 100%;
  height: 3.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.mp-preview-bar span {
  display: block;
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
}

.mp-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.56);
  font-variant-numeric: tabular-nums;
}

.mp-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  justify-items: center;
  padding: 2px 0;
}

.mp-ctl-spacer {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.mp-ctl-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.mp-ctl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.mp-ctl-btn:active {
  transform: scale(0.92);
}

.mp-btn-play {
  font-size: 1.05rem;
}

.mp-btn-like.is-liked {
  color: #fb7185;
}

.mp-btn-lrc {
  font-size: 0.82rem;
  font-weight: 600;
}

.mp-btn-lrc.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.mp-volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-widget-card.card-size-2x2 .mp-volume-row {
  display: none;
}

.mp-vol-ico {
  font-size: 0.72rem;
  opacity: 0.65;
  line-height: 1;
}

/* Music Manager Modal */
.music-modal-panel {
  width: min(740px, 94vw);
  height: auto !important;
  max-height: 88vh;
  padding: 20px 24px 22px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}

.mp-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mp-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.78;
}

.mp-tab.is-active {
  opacity: 1;
  background: #fb7299;
  border-color: #fb7299;
  color: #fff;
  font-weight: 600;
}

.mp-modal-body {
  overflow-y: auto;
  max-height: 54vh;
  padding-right: 4px;
}

.mp-url-add-row,
.mp-online-toolbar,
.mp-local-upload {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mp-track-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.mp-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.1);
}

.mp-tr-src {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.mp-tr-cov {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.mp-tr-info {
  flex: 1;
  min-width: 0;
}

.mp-tr-title {
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-tr-artist {
  font-size: 0.74rem;
  opacity: 0.68;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-empty-hint {
  padding: 24px 12px;
  text-align: center;
  font-size: 0.84rem;
  opacity: 0.65;
}

/* 实时新邮件右下角液态玻璃弹窗 */
.mail-toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}

.mail-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: #f8fafc;
}

.mail-toast-ico {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.mail-toast-body {
  flex: 1;
  min-width: 0;
}

.mail-toast-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-toast-sub {
  font-size: 0.76rem;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-toast-close {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 4px;
}

.mail-toast-close:hover {
  opacity: 1;
}



