:root {
  --bg: #07080c;
  --fg: #e9ecf3;
  --muted: #8b93a7;
  --line: rgba(255, 255, 255, .10);
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .08);
  --accent: #7c5cff;
  --accent-rgb: 124, 92, 255;
  --accent-2: #22d3ee;
  --accent-2-rgb: 34, 211, 238;
  --accent-3: #ff7ac1;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .65);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Mono", monospace;
}

html[data-theme="light"] {
  --bg: #f4f5fa;
  --fg: #14161d;
  --muted: #616a80;
  --line: rgba(10, 12, 22, .10);
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .86);
  --shadow: 0 24px 50px -24px rgba(20, 24, 60, .30);
}

/* ---------- 主色调（主题设置面板可选） ---------- */
html[data-color="violet"]  { --accent: #7c5cff; --accent-rgb: 124, 92, 255;  --accent-2: #22d3ee; --accent-2-rgb: 34, 211, 238; --accent-3: #ff7ac1; }
html[data-color="indigo"]  { --accent: #6366f1; --accent-rgb: 99, 102, 241;  --accent-2: #22d3ee; --accent-2-rgb: 34, 211, 238; --accent-3: #a78bfa; }
html[data-color="blue"]    { --accent: #3b82f6; --accent-rgb: 59, 130, 246;  --accent-2: #60a5fa; --accent-2-rgb: 96, 165, 250; --accent-3: #22d3ee; }
html[data-color="sky"]     { --accent: #0ea5e9; --accent-rgb: 14, 165, 233;  --accent-2: #38bdf8; --accent-2-rgb: 56, 189, 248; --accent-3: #7c5cff; }
html[data-color="cyan"]    { --accent: #06b6d4; --accent-rgb: 6, 182, 212;   --accent-2: #7c5cff; --accent-2-rgb: 124, 92, 255; --accent-3: #38bdf8; }
html[data-color="teal"]    { --accent: #14b8a6; --accent-rgb: 20, 184, 166;  --accent-2: #2dd4bf; --accent-2-rgb: 45, 212, 191; --accent-3: #7c5cff; }
html[data-color="green"]   { --accent: #22c55e; --accent-rgb: 34, 197, 94;   --accent-2: #a3e635; --accent-2-rgb: 163, 230, 53; --accent-3: #14b8a6; }
html[data-color="emerald"] { --accent: #10b981; --accent-rgb: 16, 185, 129;  --accent-2: #34d399; --accent-2-rgb: 52, 211, 153; --accent-3: #22d3ee; }
html[data-color="amber"]   { --accent: #f59e0b; --accent-rgb: 245, 158, 11;  --accent-2: #fbbf24; --accent-2-rgb: 251, 191, 36; --accent-3: #f97316; }
html[data-color="orange"]  { --accent: #f97316; --accent-rgb: 249, 115, 22;  --accent-2: #fbbf24; --accent-2-rgb: 251, 191, 36; --accent-3: #ef4444; }
html[data-color="rose"]    { --accent: #f43f5e; --accent-rgb: 244, 63, 94;   --accent-2: #fb7185; --accent-2-rgb: 251, 113, 133; --accent-3: #d946ef; }
html[data-color="pink"]    { --accent: #ec4899; --accent-rgb: 236, 72, 153;  --accent-2: #f472b6; --accent-2-rgb: 244, 114, 182; --accent-3: #7c5cff; }
html[data-color="fuchsia"] { --accent: #d946ef; --accent-rgb: 217, 70, 239;  --accent-2: #e879f9; --accent-2-rgb: 232, 121, 249; --accent-3: #7c5cff; }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

/* ---------- 背景：流动渐变 ---------- */
.aurora {
  position: fixed;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px) saturate(140%);
  opacity: .78;
}
html[data-theme="light"] .aurora { opacity: .55; filter: blur(100px) saturate(120%); }

.aurora span {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: drift 34s ease-in-out infinite;
  will-change: transform;
}
html[data-theme="light"] .aurora span { mix-blend-mode: multiply; }
.aurora span:nth-child(1) { background: var(--accent); top: -12%; left: -6%; }
.aurora span:nth-child(2) { background: var(--accent-2); top: 22%; right: -10%; animation-duration: 42s; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--accent-3); bottom: -18%; left: 26%; animation-duration: 38s; animation-delay: -16s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(8%, -6%, 0) scale(1.12); }
  66% { transform: translate3d(-6%, 7%, 0) scale(.92); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

body[data-motion="off"] .aurora span { animation: none; }
body[data-motion="off"] .aurora { opacity: .42; }

/* ---------- 骨架 ---------- */
.shell {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 18px clamp(16px, 4vw, 46px) 26px;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(20px, 5vh, 54px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  user-select: none;
}
/* Logo 本体是红色圆角方块，给它一圈细高光 + 主色光晕，让它"长"在玻璃顶栏上 */
.brand-logo {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .16),
    0 0 0 5px rgba(var(--accent-rgb), .10),
    0 8px 20px -8px rgba(var(--accent-rgb), .75);
  transition: transform .22s cubic-bezier(.3, .8, .3, 1), box-shadow .22s ease;
}
.brand:hover .brand-logo {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .26),
    0 0 0 6px rgba(var(--accent-rgb), .16),
    0 12px 26px -8px rgba(var(--accent-rgb), .9);
}
/* Logo 与文字之间的竖向细线，两端渐隐 */
.brand-div {
  width: 1px; height: 26px; flex-shrink: 0;
  background: linear-gradient(180deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}
/* 两行共用一个列宽（由站名决定），网址行两端对齐到站名的左右边缘 */
.brand-txt { display: grid; row-gap: 3px; line-height: 1.15; }
/* 站名：白 → 主色 → 辅色的渐变字，跟随主题设置里的 13 个主色调变化 */
.brand-name {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: .02em;
  background: linear-gradient(96deg, var(--fg) 0%, var(--fg) 34%, var(--accent) 74%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@supports not (-webkit-background-clip: text) {
  .brand-name { background: none; color: var(--fg); }
}
/* 站名中间的圆点：左右留空，比正文略小，跟着一起被渐变裁色 */
.brand-dot { margin: 0 3.5px; font-size: .92em; font-weight: 900; }
/* 网址：逐字 space-between（js 里 brandJustify 拆字），宽度被站名撑满，两行左右边缘齐平 */
.brand-url {
  display: flex;
  justify-content: space-between;
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", var(--font);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  transition: color .18s ease;
}
.brand:hover .brand-url { color: var(--fg); }

/* 时间日期 + 天气：顶栏正中（左右两列等宽，不受两侧内容宽度影响） */
.hud {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.tools { display: flex; align-items: center; gap: 8px; justify-self: end; }

.tbtn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--glass);
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  backdrop-filter: blur(14px);
  transition: .18s ease;
  white-space: nowrap;
}
.tbtn:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), .55); transform: translateY(-1px); }
.tbtn[aria-pressed="true"] { color: var(--fg); background: var(--glass-strong); border-color: rgba(var(--accent-rgb), .6); }
.tbtn-ico { width: 34px; padding: 0; font-size: 15px; line-height: 1; }

.clock {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .06em;
}

/* ---------- 命令面板 ---------- */
.stage { width: min(1080px, 100%); margin: 0 auto; }

.omni {
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(150%);
  box-shadow: var(--shadow);
  padding: 14px 16px 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.omni.is-focus {
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .10), var(--shadow);
}

.omni-row { display: flex; align-items: center; gap: 12px; }

.omni-caret {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 7px;
  background: rgba(var(--accent-2-rgb), .08);
  white-space: nowrap;
  cursor: pointer;
  transition: .16s ease;
}
.omni-caret:hover { border-color: rgba(var(--accent-2-rgb), .6); background: rgba(var(--accent-2-rgb), .16); }

#q {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 500;
  letter-spacing: -.01em;
}
#q::placeholder { color: var(--muted); opacity: .75; }

.kbd {
  display: inline-flex; gap: 4px; flex-shrink: 0;
}
.kbd b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--glass);
}

/* 分类 chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: .16s ease;
}
.chip:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), .5); }
.chip[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #5b8cff);
  border-color: transparent;
  box-shadow: 0 6px 16px -8px var(--accent);
}
html[data-theme="light"] .chip[aria-pressed="true"] { color: #fff; }
.chip s { text-decoration: none; opacity: .7; font-size: 11px; font-family: var(--mono); }

/* ---------- 结果面板 ---------- */
.panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: min(46vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.panel[hidden] { display: none; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(var(--accent-rgb), .06);
  position: sticky; top: 0; z-index: 1;
}

.res {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: background .12s ease;
}
.res:last-child { border-bottom: 0; }
.res:hover, .res.is-active { background: rgba(var(--accent-rgb), .14); }
html[data-theme="light"] .res { border-bottom-color: rgba(10, 12, 22, .05); }
.res.is-active { box-shadow: inset 3px 0 0 var(--accent); }

.res .logo {
  width: 30px; height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
  overflow: hidden;
}
.res .logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.res-main { flex: 1; min-width: 0; }
.res-name {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-name mark { background: rgba(255, 222, 89, .28); color: inherit; border-radius: 3px; padding: 0 1px; }
html[data-theme="light"] .res-name mark { background: rgba(255, 200, 0, .35); }
.res-url {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.res .tag {
  font-size: 11.5px;
  color: var(--muted);
  flex-shrink: 0;
  max-width: 34%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res .cat {
  font-size: 11px;
  color: var(--accent-2);
  border: 1px solid rgba(var(--accent-2-rgb), .3);
  border-radius: 7px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.res .go { color: var(--muted); font-size: 13px; flex-shrink: 0; opacity: 0; transition: .15s; }
.res:hover .go, .res.is-active .go { opacity: 1; }

.res.is-engine .logo { background: linear-gradient(135deg, #2b2f45, #4a5378); }
.res.is-engine .res-name { color: var(--muted); font-weight: 500; }
.res.is-engine .res-name b { color: var(--fg); font-weight: 600; }

.panel-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------- 快捷格 ---------- */
.section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 12px;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-title em { font-style: normal; color: var(--accent-2); font-family: var(--mono); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px;
}

.tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), border-color .18s, background .18s;
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(var(--accent-rgb), .22), transparent 60%);
  opacity: 0;
  transition: opacity .2s;
}
.tile:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .5); background: var(--glass-strong); }
.tile:hover::before { opacity: 1; }

.tile .logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
  position: relative;
}
.tile .logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.logo.noimg { font-size: 16px; }

.tile-body { min-width: 0; position: relative; }
.tile-name {
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-desc {
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tile .pin {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border: 0; border-radius: 7px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  opacity: 0;
  transition: .15s;
  display: grid; place-items: center;
}
.tile:hover .pin { opacity: 1; }
.tile .pin:hover { background: var(--accent); }
.tile.is-pinned .pin { opacity: 1; color: var(--accent-2); background: transparent; }

/* ---------- 页脚提示 ---------- */
.hints {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}
.hints span { display: inline-flex; align-items: center; gap: 6px; }

/* 备案号：独占一行，压在快捷键提示下面 */
.hints .beian { flex-basis: 100%; text-align: center; margin-top: 4px; }
.hints .beian a {
  color: var(--muted);
  text-decoration: none;
  transition: color .16s ease;
}
.hints .beian a:hover { color: var(--accent); text-decoration: underline; }

.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 20;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 天气 ---------- */
.wx {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: .18s ease;
  white-space: nowrap;
}
.wx:hover { color: var(--fg); border-color: rgba(var(--accent-2-rgb), .5); transform: translateY(-1px); }
.wx.is-open { color: var(--fg); border-color: rgba(var(--accent-rgb), .6); }
.wx-ico { font-size: 14px; line-height: 1; }
.wx b { color: var(--fg); font-weight: 700; font-size: 13.5px; }

.wxpop {
  position: fixed;
  top: 60px; right: clamp(16px, 4vw, 46px);
  z-index: 15;
  width: min(300px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow);
}
.wxpop[hidden] { display: none; }

.wx-main { display: flex; align-items: center; gap: 12px; }
.wx-icon { font-size: 32px; line-height: 1; }
.wx-nums b { font-size: 26px; font-weight: 700; }
.wx-nums s { text-decoration: none; display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.wx-nums em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); display: block; }

.wx-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.wx-list li { display: flex; justify-content: space-between; gap: 12px; }
.wx-list li i { font-style: normal; color: var(--fg); }

.wx-search { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
#wxCityInput {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 10px;
  padding: 8px 10px;
  outline: 0;
  font-size: 13px;
}
#wxCityInput:focus { border-color: rgba(var(--accent-rgb), .55); }

.wx-res { margin-top: 8px; display: grid; gap: 2px; }
.wx-res .wxc {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12.5px;
  cursor: pointer;
}
.wx-res .wxc:hover { background: rgba(var(--accent-rgb), .16); color: var(--fg); }
.wx-res .wxc i { font-style: normal; opacity: .65; font-size: 11.5px; }

.wx-locate {
  width: 100%;
  margin-top: 8px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: .16s ease;
}
.wx-locate:hover { color: var(--fg); border-color: rgba(var(--accent-2-rgb), .55); border-style: solid; }
.wx-locate:disabled { opacity: .55; cursor: progress; }

.wxhero {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.wxhero b { color: var(--fg); font-weight: 700; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), .35); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 主题设置面板 ---------- */
.setmask {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 5, 10, .55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
html[data-theme="light"] .setmask { background: rgba(20, 24, 60, .22); }
.setmask.is-open { opacity: 1; visibility: visible; }

.setpop {
  position: fixed;
  top: 50%; left: 50%;
  z-index: 41;
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 620px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow);
  transform: translate(-50%, -46%) scale(.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.setpop.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.set-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.set-head b { font-size: 14px; letter-spacing: .04em; }
.set-head .spacer { flex: 1; }
.set-x {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer; transition: .16s ease;
}
.set-x:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), .55); }

.set-sec { margin-bottom: 16px; }
/* 面板小标题右侧的计数用 <s>，默认带删除线，这里当普通弱文字用 */
.set-title s { text-decoration: none; opacity: .7; }
.set-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.set-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.set-opt {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--glass);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: .16s ease;
}
.set-opt:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), .55); }
.set-opt.is-on {
  color: var(--fg);
  border-color: rgba(var(--accent-rgb), .75);
  background: rgba(var(--accent-rgb), .16);
}

.set-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 9px; }
.set-color {
  width: 100%; aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.set-color:hover { transform: scale(1.12); }
.set-color.is-on {
  border-color: var(--fg);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

/* ---------- 我的网站面板 ---------- */
.favpop { width: min(460px, calc(100vw - 32px)); }
.fav-form { display: grid; gap: 8px; }
.fav-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--fg);
  border-radius: 10px;
  padding: 8px 10px;
  outline: 0;
  font-size: 13px;
  transition: border-color .16s ease;
}
.fav-form input:focus { border-color: rgba(var(--accent-rgb), .55); }
.fav-form input::placeholder { color: var(--muted); opacity: .8; }

.fav-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--glass);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: .16s ease;
  white-space: nowrap;
}
.fav-btn:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), .55); }
.fav-btn:disabled { opacity: .5; cursor: progress; }
.fav-btn.fav-primary {
  color: var(--fg);
  border-color: rgba(var(--accent-rgb), .6);
  background: rgba(var(--accent-rgb), .16);
}
.fav-add { justify-self: start; }
.fav-actions { margin-top: 8px; }

.fav-list {
  display: grid;
  gap: 2px;
  max-height: 190px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
.fav-empty { padding: 14px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.fav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 7px;
  border-radius: 8px;
}
.fav-item:hover { background: rgba(var(--accent-rgb), .12); }
.fav-item .logo {
  width: 20px; height: 20px;
  border-radius: 6px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff;
  overflow: hidden;
}
.fav-item .logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.fav-txt { flex: 1; min-width: 0; }
.fav-txt b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-txt i {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-open, .fav-del {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: .16s ease;
}
.fav-open { text-decoration: none; line-height: 22px; text-align: center; }
.fav-open:hover, .fav-del:hover { color: var(--fg); border-color: rgba(var(--accent-rgb), .55); background: rgba(var(--accent-rgb), .14); }

.fav-note { margin: 0 0 9px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.fav-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fav-row + .fav-row { margin-top: 8px; }
.fav-code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--fg);
  background: rgba(var(--accent-rgb), .10);
  border: 1px solid rgba(var(--accent-rgb), .4);
  border-radius: 9px;
  padding: 7px 10px;
  outline: 0;
}
.fav-in {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--fg);
  border-radius: 9px;
  padding: 7px 10px;
  outline: 0;
  font-size: 12.5px;
  letter-spacing: .04em;
}
.fav-in:focus { border-color: rgba(var(--accent-rgb), .55); }
.fav-stat {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}
.fav-stat.is-ok { color: var(--accent-2); }
.fav-stat.is-bad { color: #ff7b7b; }
html[data-theme="light"] .fav-stat.is-bad { color: #d64545; }


@media (max-width: 720px) {
  .res .tag, .res .cat { display: none; }
  .clock { display: none; }
  /* 16 个分类在小屏换行会撑很高，改成横向滑动 */
  .chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .wx { display: none; }
  .wxhero { display: flex; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .topbar { margin-bottom: 18px; }
  /* 小屏只留 logo，分隔线和站名/网址两行收起 */
  .brand-div, .brand-txt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora span { animation: none; }
  * { transition-duration: .01ms !important; }
}
