/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== 主题变量 ===== */
:root {
  --glass-blur: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.14);
  --accent: rgba(255, 255, 255, 0.5);
}

/* 深色主题（默认） */
html.theme-dark, body.theme-dark {
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-bg-strong: rgba(255, 255, 255, 0.12);
  --glass-bg-hover: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-strong: rgba(255, 255, 255, 0.26);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.5);
  --accent-bg: rgba(255, 255, 255, 0.1);
  --vignette: rgba(0, 0, 0, 0.4);
  --bg-brightness: 0.85;
  --bg-blur: blur(0px);
  --bg-blur-active: blur(22px) brightness(0.5);
  --note-bg: rgba(255, 255, 255, 0.1);
  --note-border: rgba(255, 255, 255, 0.2);
  --note-text: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.06);
  --time-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.45);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --glass-highlight-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

/* 浅色主题 */
html.theme-light, body.theme-light {
  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-strong: rgba(255, 255, 255, 0.6);
  --glass-bg-hover: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.62);
  --glass-border-strong: rgba(255, 255, 255, 0.82);
  --text: #1a2332;
  --text-soft: rgba(26, 35, 50, 0.7);
  --text-faint: rgba(26, 35, 50, 0.45);
  --accent-bg: rgba(26, 35, 50, 0.06);
  --vignette: rgba(0, 0, 0, 0.1);
  --bg-brightness: 1;
  --bg-blur: blur(0px);
  --bg-blur-active: blur(20px) brightness(0.9);
  --note-bg: rgba(255, 255, 255, 0.78);
  --note-border: rgba(255, 255, 255, 0.85);
  --note-text: #2a2a2a;
  --input-bg: rgba(255, 255, 255, 0.4);
  --time-shadow: 0 1px 2px rgba(255,255,255,0.6), 0 4px 16px rgba(0,0,0,0.15);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  --glass-highlight-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

/* ============================================================
   壁纸亮度自适应（覆盖主题变量）
   data-bg-brightness="dark" → 文字白色，玻璃偏暗
   data-bg-brightness="light" → 文字深色，玻璃偏亮
   优先级：壁纸亮度 > 用户主题
   ============================================================ */
html[data-bg-brightness='dark'] {
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-faint: rgba(255, 255, 255, 0.55);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.11);
  --glass-bg-hover: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-strong: rgba(255, 255, 255, 0.26);
  --accent-bg: rgba(255, 255, 255, 0.08);
  --vignette: rgba(0, 0, 0, 0.4);
  --note-bg: rgba(30, 30, 35, 0.5);
  --note-border: rgba(255, 255, 255, 0.18);
  --note-text: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.05);
  --time-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.55), 0 0 1px rgba(0,0,0,0.9);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --glass-highlight-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

html[data-bg-brightness='light'] {
  --text: #1a2332;
  --text-soft: rgba(26, 35, 50, 0.78);
  --text-faint: rgba(26, 35, 50, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.32);
  --glass-bg-strong: rgba(255, 255, 255, 0.5);
  --glass-bg-hover: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-border-strong: rgba(255, 255, 255, 0.8);
  --accent-bg: rgba(26, 35, 50, 0.05);
  --vignette: rgba(0, 0, 0, 0.08);
  --note-bg: rgba(255, 255, 255, 0.7);
  --note-border: rgba(255, 255, 255, 0.85);
  --note-text: #1a2332;
  --input-bg: rgba(255, 255, 255, 0.4);
  --time-shadow: 0 1px 2px rgba(255,255,255,0.7), 0 4px 16px rgba(0,0,0,0.18), 0 0 1px rgba(255,255,255,0.9);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  --glass-highlight-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  user-select: none;
}

body { position: relative; }

/* ===== 背景层 ===== */
.bg-layer {
  position: fixed;
  inset: -20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  filter: var(--bg-blur) brightness(var(--bg-brightness));
  transform: scale(1.05);
  transition: filter 0.7s var(--ease), background-image 0.6s var(--ease);
  z-index: 0;
}

.bg-layer.blurred {
  filter: var(--bg-blur-active);
}

.bg-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--vignette) 100%);
  z-index: 1;
  pointer-events: none;
  transition: background 0.4s var(--ease);
}

/* ===== 玻璃通用 ===== */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), var(--glass-highlight), var(--glass-highlight-bottom);
}

/* 鼠标接近时的实时光晕（位于子元素下方，背景之上） */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    140px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.08) 40%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
  z-index: -1;
}

.glass.cursor-near::after { opacity: 1; }

/* 玻璃质感小按钮 */
.glass-btn-mini {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
  box-shadow: var(--glass-highlight), var(--glass-highlight-bottom);
}

.glass-btn-mini:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-strong);
}

/* ===== 顶部栏 ===== */
.top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 32px;
  gap: 16px;
}

/* ===== 天气模块 ===== */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: default;
  position: relative;
  transition: all 0.25s var(--ease);
}

.weather-widget:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-strong);
}

.weather-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--text);
}

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

.weather-info { display: flex; flex-direction: column; line-height: 1.1; }

.weather-temp {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.weather-loc {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 1px;
}

.weather-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  padding: 14px 16px;
  margin-top: 6px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.9;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.25s var(--ease);
  z-index: 200;
}

/* 透明桥接：让鼠标从 widget 移到 tooltip 时不丢失 hover */
.weather-tooltip::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.weather-widget:hover .weather-tooltip,
.weather-tooltip:hover,
.weather-widget:focus-within .weather-tooltip,
.weather-tooltip:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wt-row { display: flex; justify-content: space-between; gap: 14px; }
.wt-row span { color: var(--text-soft); }
.wt-row b { font-weight: 500; }

.wt-change {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.wt-change input {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  font-size: 12px;
  outline: none;
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-change input::placeholder { color: var(--text-faint); }
.wt-change input:focus { border-color: var(--glass-border-strong); }

.wt-change button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* ===== 顶部操作按钮 ===== */
.top-actions { display: flex; gap: 10px; align-items: center; }

.action-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.action-btn.icon-only { padding: 10px; }

.action-btn:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  border-color: var(--glass-border-strong);
}

.action-btn svg { opacity: 0.85; flex-shrink: 0; }

/* 长按进度环：贴合胶囊按钮边框的红色进度条
   原理：conic-gradient 做圆形进度，外层 padding 撑出描边宽度，
   mask 用圆角矩形镂空中心，只留边框环 */
.progress-ring {
  position: absolute;
  inset: -3px;
  padding: 3px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 3;
  /* 用 padding+border-radius 让内部 fill 圆角贴合，再 mask 镂空中心 */
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
          mask-composite: exclude;
}

.action-btn.long-pressing .progress-ring { opacity: 1; }

.progress-ring-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    conic-gradient(#ff5a5a var(--progress, 0deg), rgba(255, 80, 80, 0.16) 0deg);
  filter: drop-shadow(0 0 6px rgba(255, 90, 90, 0.7));
}

.action-btn.long-pressing {
  background: rgba(255, 90, 90, 0.14) !important;
  border-color: rgba(255, 90, 90, 0.5) !important;
}

/* ===== 时间浮层 tooltip（独立定位避免遮挡） ===== */
.time-tooltip-floating {
  position: fixed;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.9;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.3s var(--ease);
  z-index: 250;
}

.time-tooltip-floating.show {
  opacity: 1;
  transform: translateY(0);
}

.tt-row { display: flex; justify-content: space-between; gap: 14px; }
.tt-row span, .tt-row b { color: var(--text); }
.tt-row b { font-weight: 500; opacity: 0.95; }
#ttFestival { color: #ffd66e; font-weight: 500; }

/* ===== 主体 ===== */
.main {
  position: relative;
  z-index: 5;
  height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

/* ===== 时间 ===== */
.time-container {
  position: relative;
  cursor: pointer;
  margin-bottom: 38px;
  text-align: center;
}

/* 液态玻璃数字：深色基调 */
.time-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s var(--ease);
}

.time-container:hover .time-glass { transform: scale(1.03); }
.time-container.active .time-glass { transform: scale(1.05); }

/* 单个玻璃数字 */
.time-digit {
  width: 84px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-size: 72px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  /* 深色基调：深色半透明玻璃 + 浅色文字 */
  background: rgba(20, 22, 28, 0.48) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.55);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 冒号 */
.time-colon {
  font-size: 54px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 4px 14px rgba(0,0,0,0.5);
  line-height: 1;
  padding: 0 2px;
  animation: timeColonBlink 1s steps(2, start) infinite;
}

@keyframes timeColonBlink {
  50% { opacity: 0.35; }
}

/* ========== 壁纸亮度自适应（深色基调数字不受亮度影响，始终保持深色玻璃质感） ==========
   但浅色极亮壁纸下，略微增强边框和阴影对比度 */
html[data-bg-brightness='light'] .time-digit {
  background: rgba(18, 20, 28, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32);
}

html[data-bg-brightness='light'] .time-colon {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.55);
}

/* 浅色主题用户选择下，数字也保持深色玻璃质感 */
html.theme-light .time-digit,
body.theme-light .time-digit {
  background: rgba(20, 22, 28, 0.46) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

html.theme-light .time-colon,
body.theme-light .time-colon {
  color: rgba(255, 255, 255, 0.9);
}

/* ===== 搜索框 ===== */
.search-wrapper {
  width: 100%;
  max-width: 620px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  height: 52px;
  border-radius: 999px;
  padding: 0 8px 0 10px;
  transition: all 0.45s var(--ease);
}

.search-bar.expanded {
  height: 62px;
  border-radius: 18px;
  padding: 0 6px 0 8px;
}

.search-engine-selector,
.translate-hint,
.search-btn,
.search-input {
  transition: opacity 0.35s var(--ease), width 0.45s var(--ease);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  padding: 0 14px;
  height: 100%;
  min-width: 0;
  font-family: inherit;
}

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

.search-engine-selector {
  position: relative;
  opacity: 0;
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.search-bar.expanded .search-engine-selector {
  opacity: 1;
  width: 110px;
}

.engine-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  height: 42px;
  padding: 0 10px;
  background: var(--accent-bg);
  border: none;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s;
}

.engine-btn:hover { background: var(--glass-bg-hover); }
.engine-btn img { width: 18px; height: 18px; border-radius: 5px; }
.engine-btn span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }

.engine-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 220px;
  border-radius: 14px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.25s var(--ease);
  z-index: 60;
}

.engine-dropdown.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.engine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.engine-item:hover { background: var(--glass-bg-hover); }
.engine-item.active { background: var(--glass-bg-strong); }
.engine-item img { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; }
.engine-item .e-name { flex: 1; }
.engine-item .e-del { opacity: 0.5; font-size: 16px; cursor: pointer; }
.engine-item .e-del:hover { opacity: 1; color: #ff8a8a; }

.engine-add {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  background: transparent;
  border: 1px dashed var(--glass-border-strong);
  border-radius: 10px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  font-family: inherit;
}
.engine-add:hover { background: var(--glass-bg-hover); color: var(--text); }

/* 翻译提示 */
.translate-hint {
  position: absolute;
  top: calc(100% + 8px);
  right: 70px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.25s var(--ease);
  z-index: 55;
}

.translate-hint.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.translate-hint:hover { background: var(--glass-bg-hover); }
.translate-hint b { color: #ffd66e; font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 专注提醒（搜索时显示在搜索框下方） */
.focus-reminder {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.25s var(--ease);
  z-index: 54;
  max-width: calc(100% - 110px);
}

.focus-reminder.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.focus-reminder svg { color: #ff9a3c; flex-shrink: 0; }
.focus-reminder b {
  color: #ff9a3c;
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 搜索按钮 */
.search-btn {
  flex-shrink: 0;
  width: 0;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  border: 1px solid var(--glass-border-strong);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  overflow: hidden;
  transition: all 0.45s var(--ease);
}

.search-bar.expanded .search-btn {
  width: 46px;
  opacity: 1;
}

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

/* 搜索建议 */
.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  border-radius: 16px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.25s var(--ease);
  z-index: 50;
  max-height: 360px;
  overflow-y: auto;
}

/* 专注提醒显示时，搜索建议下移避免重叠 */
.focus-reminder.show ~ .search-suggestions {
  top: calc(100% + 48px);
}

.search-suggestions.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

.suggestion-item:hover, .suggestion-item.highlight {
  background: var(--glass-bg-hover);
}

.suggestion-item .s-icon { opacity: 0.6; flex-shrink: 0; }
.suggestion-item .s-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 收藏网站 ===== */
.favorites {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 40px;
  max-width: 720px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.5s var(--ease);
}

.favorites.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s var(--ease);
}

.fav-item:hover { transform: translateY(-4px); }

/* 统一液态玻璃图标容器 */
.fav-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.25s var(--ease);
  position: relative;
}

/* 玻璃高光层（伪元素叠加液态玻璃质感） */
.fav-icon-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%, rgba(255,255,255,0.08) 100%);
  pointer-events: none;
}

.fav-item:hover .fav-icon-wrap {
  box-shadow: var(--shadow);
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

.fav-icon-wrap img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.fav-name {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-del {
  position: absolute;
  top: -6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-item:hover .fav-del { opacity: 1; }

.fav-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px dashed var(--glass-border-strong);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  color: var(--text-soft);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.fav-add:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  transform: translateY(-4px);
}

/* ===== 底部提示 ===== */
.footer-hint {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-soft);
  z-index: 5;
  opacity: 0.7;
  transition: opacity 0.3s;
  pointer-events: none;
}

.footer-hint.hide { opacity: 0; }

/* footer 内部布局 */
.footer-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
.footer-text { pointer-events: none; }
.footer-help-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.footer-help-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  transform: scale(1.1);
}

/* ===== 时间 tooltip 内的单击/长按说明 ===== */
.tt-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 14px;
  justify-content: center;
  font-size: 11px;
  color: var(--text-soft);
}
.tt-hint-item b {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

/* ===== 计时器模式 ===== */
/* 默认隐藏计时器视图和控制按钮 */
.time-timer { display: none; }
.timer-controls { display: none; }

/* 计时器模式激活 */
.time-glass[data-mode="timer"] .time-clock { display: none; }
.time-glass[data-mode="timer"] .time-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.time-container.timer-active .timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

/* 计时器数字块可交互 */
.time-glass[data-mode="timer"] .time-digit {
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.15s, transform 0.1s;
}
.time-glass[data-mode="timer"] .time-digit:hover {
  background: rgba(255, 255, 255, 0.22);
}
.time-glass[data-mode="timer"] .time-digit.adjusting {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0.95);
}
.time-glass[data-mode="timer"] .time-digit.running {
  cursor: default;
  pointer-events: none;
}

/* 计时器控制按钮 */
.timer-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}
.timer-btn:hover {
  background: var(--glass-bg-hover);
  transform: scale(1.08);
}
.timer-btn:active { transform: scale(0.92); }
.timer-btn#timerStart.running svg path {
  /* 暂停状态图标由 JS 切换 */
}

/* 倒计时最后 5 秒红色脉冲 */
.time-container.timer-warning .time-glass {
  animation: timerPulse 1s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); filter: none; }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 12px rgba(255, 80, 80, 0.6)); }
}

/* ===== 底部 Dock 栏 ===== */
.dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 8px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  max-width: calc(100vw - 24px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.dock-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  max-width: 100%;
}
.dock-inner::-webkit-scrollbar { display: none; }

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
  position: relative;
}
.dock-item:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-4px) scale(1.08);
}
.dock-item:active { transform: translateY(-2px) scale(1.02); }
.dock-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  transition: all 0.2s var(--ease);
}
.dock-name {
  font-size: 10px;
  color: var(--text-soft);
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.dock-item:hover .dock-name { opacity: 1; color: var(--text); }

/* 收藏展开时隐藏 dock（避免重复） */
body.fav-shown .dock { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }
/* 搜索展开时也隐藏 */
body.search-expanded .dock { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }

/* ===== 功能说明面板 ===== */
.help-panel {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 520px;
  max-width: calc(100vw - 24px);
  max-height: 70vh;
  border-radius: 20px;
  z-index: 90;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.help-panel.show {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.help-body {
  padding: 20px 24px;
  overflow-y: auto;
}
.help-section { margin-bottom: 18px; }
.help-section:last-child { margin-bottom: 0; }
.help-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.help-icon { font-size: 16px; }
.help-section ul {
  list-style: none;
  padding-left: 28px;
  margin: 0;
}
.help-section li {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.8;
  position: relative;
}
.help-section li::before {
  content: '·';
  position: absolute;
  left: -12px;
  color: var(--text-faint);
}
.help-section li b {
  color: var(--text);
  font-weight: 600;
}

/* ===== 设置面板 ===== */
.settings-panel {
  position: fixed;
  top: 90px;
  right: 32px;
  width: 380px;
  border-radius: 22px;
  z-index: 80;
  display: none;
  flex-direction: column;
  max-height: 78vh;
  overflow: hidden;
}

.settings-panel.show {
  display: flex;
  animation: panelIn 0.3s var(--ease);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.panel-title { font-size: 16px; font-weight: 500; }
.panel-controls { display: flex; gap: 6px; }

/* 品牌标识（析光起始页 logo + 名称） */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.brand-name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.panel-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s;
  font-family: inherit;
}
.panel-btn:hover { background: var(--glass-bg-hover); }

.settings-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

.settings-section { margin-bottom: 26px; }
.settings-section:last-child { margin-bottom: 0; }

.settings-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 主题切换 */
.theme-switcher {
  display: flex;
  gap: 12px;
}

.theme-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s;
  font-family: inherit;
}

.theme-option:hover { background: var(--glass-bg-hover); }
.theme-option.active { border-color: var(--glass-border-strong); background: var(--glass-bg-strong); }

.theme-preview {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.theme-preview.dark { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.theme-preview.light { background: linear-gradient(135deg, #f0f4f8, #d8e3f0); }

/* 壁纸来源 */
.wallpaper-switcher {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.wallpaper-option {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}

.wallpaper-option:hover { background: var(--glass-bg-hover); }
.wallpaper-option.active { border-color: var(--glass-border-strong); background: var(--glass-bg-strong); }

.wallpaper-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

#wallpaperFile { display: none; }

.upload-label {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

.upload-label:hover { background: var(--glass-bg-hover); }

.upload-hint {
  font-size: 13px;
  color: var(--text-soft);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallpaper-preview {
  width: 100%;
  height: 140px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-color: var(--accent-bg);
}

/* ===== 计划面板 ===== */
.plans-panel {
  position: fixed;
  top: 90px;
  right: 32px;
  width: 280px;
  border-radius: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  transition: height 0.3s var(--ease);
  overflow: hidden;
}

/* 当设置面板打开时隐藏计划面板 */
body.settings-open .plans-panel { opacity: 0; pointer-events: none; transform: translateX(20px); }
.plans-panel { transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), height 0.3s var(--ease); }

.plans-panel.collapsed { height: 46px; }

.plans-panel .panel-header {
  border-bottom: none;
  cursor: move;
}

.panel-body {
  padding: 0 14px 14px;
  overflow-y: auto;
  flex: 1;
}

/* 今日专注输入区（独立面板） */
.focus-panel {
  position: fixed;
  top: 90px;
  right: 32px;
  width: 300px;
  border-radius: 18px;
  z-index: 80;
  display: none;
  flex-direction: column;
  max-height: 75vh;
  overflow: hidden;
}

.focus-panel.show {
  display: flex;
  animation: panelIn 0.3s var(--ease);
}

/* 专注面板打开时隐藏计划面板 */
body.focus-open .plans-panel { opacity: 0; pointer-events: none; transform: translateX(20px); }

.focus-panel-body {
  padding: 18px;
}

.focus-input {
  width: 100%;
  height: 42px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.focus-input::placeholder { color: var(--text-faint); }
.focus-input:focus {
  border-color: #ff9a3c;
  box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.15);
}

.focus-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.focus-tip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff9a3c;
  box-shadow: 0 0 6px rgba(255, 154, 60, 0.7);
  flex-shrink: 0;
}

/* 专注按钮有任务时高亮 */
.action-btn.has-focus#focusBtn {
  border-color: rgba(255, 154, 60, 0.45);
}
.action-btn.has-focus#focusBtn svg { color: #ff9a3c; opacity: 1; }

.plan-add {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.plan-add input {
  flex: 1;
  height: 34px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.plan-add input::placeholder { color: var(--text-faint); }
.plan-add input:focus { border-color: var(--glass-border-strong); }

.plan-add button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
}

.plan-list { display: flex; flex-direction: column; gap: 6px; }

.plan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--accent-bg);
  border-radius: 10px;
  font-size: 13px;
  transition: background 0.2s;
}

.plan-item:hover { background: var(--glass-bg-hover); }

.plan-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--glass-border-strong);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.plan-item.done .plan-check { background: var(--text); border-color: var(--text); }
.plan-item.done .plan-check::after { content: "✓"; color: var(--bg-color, #1a1a2e); font-size: 11px; }
.theme-light .plan-item.done .plan-check::after { color: #fff; }
.plan-item.done .plan-text { text-decoration: line-through; opacity: 0.5; }

.plan-text { flex: 1; cursor: pointer; }
.plan-del { opacity: 0.4; cursor: pointer; font-size: 14px; }
.plan-del:hover { opacity: 1; color: #ff8a8a; }

.resize-handle {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  opacity: 0.3;
  transition: opacity 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10.5 5.5L5.5 10.5'/%3E%3Cpath d='M13 8L8 13'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.resize-handle:hover { opacity: 0.75; }

/* ===== 便签（统一玻璃质感） ===== */
.notes-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 18;
}

.sticky-note {
  position: absolute;
  width: 200px;
  min-height: 180px;
  padding: 16px 14px 14px;
  border-radius: 14px;
  background: var(--note-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
  border: 1px solid var(--note-border);
  color: var(--note-text);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.6;
  pointer-events: auto;
  transform: rotate(-1.5deg);
  transition: box-shadow 0.2s, transform 0.2s;
}

.sticky-note:nth-child(2n) { transform: rotate(1deg); }
.sticky-note:nth-child(3n) { transform: rotate(-0.8deg); }
.sticky-note:nth-child(4n) { transform: rotate(1.2deg); }

.sticky-note.dragging { box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36); transition: none; cursor: grabbing; }
.sticky-note.pinned { transform: rotate(0deg); }

.sticky-toolbar {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}

.sticky-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.1);
  color: var(--note-text);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s, background 0.2s;
}

.sticky-note:hover .sticky-btn { opacity: 1; }
.sticky-btn:hover { background: rgba(0, 0, 0, 0.2); }
.sticky-btn.pin-btn.active { background: rgba(0,0,0,0.3); opacity: 1; }

.sticky-content {
  width: 100%;
  height: 100%;
  min-height: 130px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.sticky-content::placeholder { color: rgba(128,128,128,0.5); }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-mask.show { opacity: 1; pointer-events: auto; }

.modal {
  width: 360px;
  border-radius: 20px;
  padding: 24px;
  transform: scale(0.95);
  transition: transform 0.25s var(--ease);
}

.modal-mask.show .modal { transform: scale(1); }

.modal h3 { font-size: 18px; margin-bottom: 18px; }

.modal label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.modal input {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 38px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.modal input:focus { border-color: var(--glass-border-strong); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.btn-ghost, .btn-primary {
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-ghost { background: var(--accent-bg); color: var(--text); }
.btn-ghost:hover { background: var(--glass-bg-hover); }

.btn-primary {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-strong);
  color: var(--text);
}
.btn-primary:hover { background: var(--glass-bg-hover); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border-strong); border-radius: 3px; }

/* ===== 响应式 ===== */

/* 平板及以下 */
@media (max-width: 1024px) {
  .settings-panel { width: 360px; right: 24px; }
  .plans-panel { width: 280px; right: 24px; }
  .focus-panel { width: 300px; right: 24px; }
  .top-bar { padding: 20px 24px; }
}

/* 手机 */
@media (max-width: 640px) {
  /* 顶栏：缩小内边距，按钮只显示图标 */
  .top-bar {
    padding: 12px 14px;
    gap: 8px;
  }
  .action-btn {
    padding: 8px 10px;
    font-size: 13px;
    gap: 4px;
  }
  /* 移动端隐藏按钮文字，只保留图标（专注按钮有任务时保留文字标识） */
  .action-btn > span { display: none !important; }
  .action-btn#focusBtn.has-focus > span#focusBtnLabel { display: inline !important; font-size: 11px; max-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 天气组件紧凑化 */
  .weather-widget { padding: 6px 10px; gap: 6px; }
  .weather-icon { width: 22px; height: 22px; }
  .weather-icon svg { width: 18px; height: 18px; }
  .weather-temp { font-size: 14px; }
  .weather-loc { font-size: 10px; }
  .weather-tooltip {
    position: fixed;
    left: 12px !important;
    right: 12px;
    min-width: 0;
    width: auto;
    top: 56px;
    margin-top: 0;
  }

  /* 时间数字卡片缩小 */
  .time-digit {
    width: 48px;
    height: 68px;
    border-radius: 12px;
    font-size: 40px;
  }
  .time-colon { font-size: 32px; }
  .time-glass { gap: 6px; }
  .time-container { margin-bottom: 24px; }

  /* 搜索框 */
  .search-wrapper { max-width: 92%; }
  .search-bar { height: 46px; padding: 0 6px 0 8px; }
  .search-bar.expanded { height: 54px; border-radius: 14px; }
  .engine-btn { padding: 0 8px; }
  .engine-btn #engineName { display: none; }
  .search-bar.expanded .engine-btn #engineName { display: inline; }
  .search-input { font-size: 15px; }

  /* 面板全宽化 */
  .settings-panel {
    width: auto;
    left: 12px;
    right: 12px;
    top: 76px;
    max-height: 80vh;
    border-radius: 18px;
  }
  .plans-panel {
    width: auto;
    left: 12px;
    right: 12px;
    top: 76px;
    max-height: 70vh;
    border-radius: 18px;
  }
  .focus-panel {
    width: auto;
    left: 12px;
    right: 12px;
    top: 76px;
    border-radius: 18px;
  }
  .settings-body { padding: 16px; }
  .settings-section { margin-bottom: 20px; }
  .theme-option { padding: 12px; gap: 8px; font-size: 13px; }
  .theme-preview { width: 38px; height: 38px; }
  .wallpaper-option { padding: 10px 4px; font-size: 12px; }
  .wallpaper-preview { height: 100px; }
  .panel-header { padding: 14px 16px; }

  /* 收藏按钮缩小 */
  .fav-item {
    min-width: 64px;
    padding: 10px 8px;
  }
  .fav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
  }
  .fav-name { font-size: 11px; }

  /* 搜索建议和翻译提示全宽 */
  .search-suggestions,
  .translate-hint,
  .focus-reminder {
    left: 0 !important;
    right: 0 !important;
    max-width: 100%;
  }
  .translate-hint { right: 0 !important; }

  /* 弹窗全宽 */
  .modal {
    width: auto;
    left: 16px;
    right: 16px;
    padding: 20px;
    border-radius: 18px;
  }

  /* 便签字体放大（移动端可读性） */
  .sticky-note {
    min-width: 160px;
    max-width: 220px;
  }

  /* 搜索引擎下拉全宽 */
  .engine-dropdown {
    left: 0;
    right: 0;
  }

  /* 时间 tooltip 全宽 */
  .time-tooltip-floating {
    left: 12px !important;
    right: 12px;
    min-width: 0;
    width: auto;
  }
}

/* 超小屏（< 380px） */
@media (max-width: 380px) {
  .time-digit {
    width: 40px;
    height: 58px;
    border-radius: 10px;
    font-size: 34px;
  }
  .time-colon { font-size: 26px; }
  .time-glass { gap: 4px; }
  .top-bar { padding: 10px 10px; }
  .weather-temp { font-size: 13px; }
  .weather-loc { display: none; }
  .search-input { font-size: 14px; }
}
