.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(420px 300px at var(--mx) var(--my), rgba(125, 211, 255, 0.32), transparent 55%),
    radial-gradient(180px 140px at var(--mx) var(--my), rgba(255, 255, 255, 0.12), transparent 45%);
}
@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to { transform: translate3d(5%, 4%, 0) scale(1.12); }
}
#fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.app-meta {
  position: fixed;
  left: 20px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-version {
  color: var(--text);
  font: 500 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  opacity: .22;
  pointer-events: none;
  user-select: none;
}
.bg-clock {
  position: fixed;
  right: 3vw;
  bottom: 1vh;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 24px);
  pointer-events: none;
  user-select: none;
  color: var(--text);
}
.bg-clock .bg-time {
  font-size: clamp(110px, 20vw, 300px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  opacity: 0.055;
}
html[data-fx="on"] .aurora::before {
  translate: calc((var(--mx) - 50vw) * 0.045) calc((var(--my) - 50vh) * 0.045);
  transition: translate 1.1s cubic-bezier(0.16, 0.84, 0.44, 1);
}
html[data-fx="on"] .aurora::after {
  translate: calc((var(--mx) - 50vw) * -0.02) calc((var(--my) - 50vh) * -0.02);
  transition: translate 1.4s cubic-bezier(0.16, 0.84, 0.2, 1);
}
html[data-fx="on"] .aurora,
html[data-fx="on"] #fx-canvas {
  transition: filter 0.45s ease, opacity 0.45s ease, transform 0.45s ease;
}
html[data-fx="on"] body.searching .aurora {
  filter: blur(7px) brightness(0.78) saturate(1.12);
  transform: scale(1.025);
}
html[data-fx="on"] body.searching #fx-canvas {
  opacity: 0.35;
}
header {
  --header-control-height: 54px;
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 22px 28px 10px;
}
.hello {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  height: var(--header-control-height);
}
.calendar-dates {
  display: grid;
  align-content: center;
  gap: 4px;
  flex: 0 0 auto;
  height: var(--header-control-height);
  padding-left: 14px;
  border-left: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.hello .time {
  flex: 0 0 auto;
  width: max-content;
  min-width: 7.1ch;
  white-space: nowrap;
  height: var(--header-control-height);
  font-size: 40px;
  font-weight: 720;
  letter-spacing: 0.025em;
  font-variant-numeric: tabular-nums;
  line-height: var(--header-control-height);
  background: linear-gradient(110deg, #f8fbff 10%, #7dd3fc 48%, #c084fc 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(125, 211, 252, 0.28));
}
.calendar-solar,
.calendar-lunar {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  column-gap: 7px;
  min-width: 0;
  white-space: nowrap;
}
.calendar-solar > :last-child,
.calendar-lunar > :last-child {
  text-align: justify;
  text-align-last: justify;
}
.calendar-solar {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}
.calendar-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
}
.hello .time .clock-seconds { font-size: 0.62em; }
.weather-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 240px;
  height: var(--header-control-height);
  padding-left: 20px;
  border-left: 1px solid var(--stroke);
}
.weather-refresh {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.weather-refresh svg { width: 14px; height: 14px; }
.weather-refresh:hover { color: var(--text); background: var(--glow); }
.weather-refresh:disabled { opacity: .45; cursor: wait; }
.weather-refresh[data-state="loading"] svg { animation: weather-refresh-spin .8s linear infinite; }
.weather-refresh[data-state="error"] { color: #fb7185; background: rgba(251, 113, 133, .12); }
.weather-refresh:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; }
@keyframes weather-refresh-spin { to { transform: rotate(360deg); } }
.weather {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
}
.weather:hover { color: var(--text); }
.weather .w-ico { display: inline-grid; place-items: center; flex: 0 0 auto; }
.weather .w-ico svg { width: 24px; height: 24px; }
.weather .w-txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.search::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(125,211,252,0.55), rgba(192,132,252,0.2), rgba(45,212,191,0.35));
  opacity: 0.35;
  z-index: -1;
  filter: blur(0.2px);
}
.search input {
  width: 100%;
  height: var(--header-control-height);
  border: 1px solid var(--stroke);
  border-radius: calc(var(--radius) - 2px);
  padding: 0 18px 0 48px;
  color: var(--text);
  background: rgba(12, 18, 36, 0.42);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.1);
  outline: none;
  font: inherit;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:focus {
  border-color: rgba(125, 211, 252, 0.7);
  box-shadow: 0 0 0 4px var(--glow), 0 16px 48px rgba(0, 0, 0, 0.35);
}
.search-kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.search input:focus ~ .search-kbd,
.search input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; }
/* Touch screens have no Ctrl/⌘ K to press. */
@media (hover: none) and (pointer: coarse) { .search-kbd { display: none; } }
.search-ico {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.update-notice {
  display: inline-flex;
}
.update-notice[hidden] { display: none; }
.update-action {
  display: block;
  width: 8px;
  height: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.85);
  cursor: pointer;
}
.update-action:hover { box-shadow: 0 0 16px rgba(94, 234, 212, 1); }
.update-action:disabled { cursor: wait; opacity: .65; }
.update-action[data-state="error"] { background: #fb7185; box-shadow: 0 0 12px rgba(251, 113, 133, 0.8); }
.update-action:focus-visible { outline: 2px solid rgba(125, 211, 252, 0.9); outline-offset: 3px; }
.update-progress {
  --update-accent: var(--skin-accent, #5eead4);
  position: fixed;
  left: 16px;
  bottom: 42px;
  z-index: 8;
  width: min(352px, calc(100vw - 32px));
  max-height: calc(100dvh - 64px);
  overflow: auto;
  padding: 18px;
  color: var(--text);
  background: var(--skin-panel, var(--bg));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
.update-progress[hidden], .update-progress button[hidden] { display: none; }
.update-progress-head { display: flex; gap: 12px; align-items: center; }
.update-progress-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--stroke); border-radius: 50%; color: var(--update-accent); font-size: 27px;
}
.update-progress-head strong { display: block; font-size: 15px; font-weight: 650; }
#updateProgressSource { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.update-progress-head button {
  margin-left: auto; padding: 3px 8px; border: 1px solid var(--stroke); border-radius: 8px;
  color: var(--muted); background: transparent; font: inherit; cursor: pointer;
}
.update-progress-head button:focus-visible { outline: 2px solid var(--update-accent); outline-offset: 3px; }
.update-progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; list-style: none; margin: 20px 0 14px; padding: 0; }
.update-progress-steps li { padding-top: 9px; border-top: 3px solid var(--stroke); color: var(--muted); font-size: 11px; }
.update-progress-steps li[data-state="done"], .update-progress-steps li[data-state="active"] { border-color: var(--update-accent); color: var(--text); }
.update-progress-steps li[data-state="active"] { font-weight: 700; }
#updateProgressMessage { margin: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#updateProgressHint { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.update-progress[data-stage="error"] { --update-accent: #c54c68; }
.update-progress[data-stage="error"] .update-progress-icon { color: var(--update-accent); }
.switch {
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.switch:hover { border-color: rgba(255,255,255,0.28); color: var(--text); }
.switch b { font-weight: 650; }
.switch i { font-style: normal; color: var(--muted); margin-right: 6px; font-size: 12px; }
