:root {
  color-scheme: light;
  --ink: #0c1824;
  --ink-2: rgba(12, 24, 36, 0.76);
  --muted: rgba(15, 28, 42, 0.60);
  --accent: #0066cc;
  --accent-2: #0a84ff;
  --accent-soft: rgba(0, 113, 227, 0.13);
  --sheet-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.34) 55%, rgba(240, 249, 255, 0.44) 100%);
  --sheet-border: rgba(255, 255, 255, 0.72);
  --rim-top: rgba(255, 255, 255, 0.94);
  --rim-bottom: rgba(255, 255, 255, 0.34);
  --rim-side: rgba(255, 255, 255, 0.52);
  --sheet-shadow: 0 22px 52px -14px rgba(8, 22, 38, 0.18), 0 4px 14px rgba(8, 22, 38, 0.06);
  --sheet-filter: blur(16px) saturate(175%);
  --card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.38));
  --card-bg-hover: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58));
  --card-border: rgba(255, 255, 255, 0.74);
  --card-border-hover: rgba(255, 255, 255, 0.96);
  --card-glare: rgba(255, 255, 255, 0.58);
  --pill-bg: rgba(255, 255, 255, 0.54);
  --pill-bg-hover: rgba(255, 255, 255, 0.78);
  --pill-active-bg: rgba(255, 255, 255, 0.94);
  --input-bg: rgba(255, 255, 255, 0.62);
  --divider: rgba(15, 28, 42, 0.09);
  --hero-ink: #ffffff;
  --hero-sub: rgba(255, 255, 255, 0.88);
  --wallpaper: url("../assets/theme-coast.webp");
  --scrim: linear-gradient(180deg, rgba(8, 24, 40, 0.28) 0%, rgba(12, 30, 44, 0.06) 40%, rgba(12, 28, 42, 0.18) 100%);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8fafc;
  --ink-2: rgba(241, 245, 249, 0.84);
  --muted: rgba(203, 213, 225, 0.68);
  --accent: #5ac8fa;
  --accent-2: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --sheet-bg: linear-gradient(135deg, rgba(28, 38, 58, 0.58) 0%, rgba(13, 19, 32, 0.42) 55%, rgba(22, 32, 52, 0.48) 100%);
  --sheet-border: rgba(255, 255, 255, 0.18);
  --rim-top: rgba(255, 255, 255, 0.28);
  --rim-bottom: rgba(125, 211, 252, 0.09);
  --rim-side: rgba(255, 255, 255, 0.12);
  --sheet-shadow: 0 26px 60px -12px rgba(0, 0, 0, 0.50), 0 6px 18px rgba(0, 0, 0, 0.28);
  --sheet-filter: blur(18px) saturate(175%);
  --card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  --card-bg-hover: linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.08));
  --card-border: rgba(255, 255, 255, 0.14);
  --card-border-hover: rgba(255, 255, 255, 0.30);
  --card-glare: rgba(186, 230, 253, 0.14);
  --pill-bg: rgba(255, 255, 255, 0.08);
  --pill-bg-hover: rgba(255, 255, 255, 0.15);
  --pill-active-bg: rgba(255, 255, 255, 0.22);
  --input-bg: rgba(15, 23, 42, 0.46);
  --divider: rgba(255, 255, 255, 0.10);
  --scrim: linear-gradient(180deg, rgba(4, 9, 18, 0.42) 0%, rgba(6, 12, 24, 0.24) 45%, rgba(4, 9, 18, 0.52) 100%);
}

body[data-wallpaper="alpine"] { --wallpaper: url("../assets/theme-alpine.webp"); }
body[data-wallpaper="coast"] { --wallpaper: url("../assets/theme-coast.webp"); }
body[data-wallpaper="stars"] { --wallpaper: url("../assets/theme-stars.webp"); }
body[data-wallpaper="neon"] { --wallpaper: url("../assets/theme-neon.webp"); }

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background-color: #0f1c2b;
  position: relative;
  overflow-x: hidden;
}

/* 固定光学壁纸舞台（单层 GPU 合成，零全屏多重混合，保证 120fps 顺滑滚动） */
.lg-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--scrim), var(--wallpaper) center / cover no-repeat;
  transform: translateZ(0);
  will-change: transform;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--accent-2);
  outline-offset: 2px;
}

/* 液态玻璃通用胶囊按钮（位于 .surface 内部时不重复叠加嵌套 backdrop-filter，大幅减轻 GPU 离屏合成） */
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--pill-bg);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 560;
  box-shadow: inset 0 1px 0.5px var(--rim-top), 0 4px 12px rgba(8, 22, 38, 0.06);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease, border-color 0.16s ease;
}
.glass-btn:hover:not(:disabled) {
  background: var(--pill-bg-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}
.glass-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.glass-btn:disabled {
  opacity: 0.42;
  cursor: default;
}
.glass-btn[aria-pressed="true"],
.glass-btn.is-active {
  background: var(--pill-active-bg);
  border-color: var(--card-border-hover);
  color: var(--accent);
  font-weight: 640;
}

/* 顶部英雄区玻璃胶囊（叠在实景图上） */
.masthead-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.24));
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.82), 0 6px 18px rgba(10, 18, 32, 0.14);
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 560;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease;
}
.masthead-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  transform: translateY(-1px);
}
body[data-theme="dark"] .masthead-btn {
  background: linear-gradient(135deg, rgba(38, 48, 68, 0.62), rgba(20, 27, 42, 0.46));
  border-color: rgba(255, 255, 255, 0.20);
  color: #f8fafc;
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.26), 0 8px 22px rgba(0, 0, 0, 0.32);
}
body[data-theme="dark"] .masthead-btn:hover {
  background: linear-gradient(135deg, rgba(52, 65, 90, 0.74), rgba(30, 40, 58, 0.58));
}
.btn-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.workspace {
  max-width: 1340px;
  margin: 0 auto;
  padding: 26px 32px 84px;
  display: grid;
  gap: 18px;
}

/* 顶部标题栏 + 玻璃控制中心 */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 2px 4px;
}
.masthead-brand {
  color: var(--hero-ink);
  text-shadow: 0 2px 16px rgba(8, 18, 32, 0.34);
}
.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  color: var(--hero-sub);
}
.live-clock {
  font-size: 11px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
h1 {
  font-size: 29px;
  font-weight: 700;
  margin: 4px 0 0;
  letter-spacing: -0.03em;
  line-height: 1.18;
}
h1 span {
  font-size: 13.5px;
  font-weight: 450;
  margin-left: 14px;
  letter-spacing: 0;
  color: var(--hero-sub);
}
.masthead-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* 外观与壁纸选择浮层 */
.appearance-wrap {
  position: relative;
}
.appearance-popover {
  position: fixed;
  width: 296px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(244, 249, 255, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, 0.92), 0 26px 64px rgba(10, 18, 32, 0.28);
  -webkit-backdrop-filter: blur(38px) saturate(190%);
  backdrop-filter: blur(38px) saturate(190%);
  color: #0f172a;
  z-index: 2147483646;
}
body[data-theme="dark"] .appearance-popover {
  background: linear-gradient(145deg, rgba(26, 34, 50, 0.84), rgba(16, 22, 35, 0.74));
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.24), 0 28px 68px rgba(0, 0, 0, 0.55);
  color: #f8fafc;
}
.appearance-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  opacity: 0.62;
  margin-bottom: 8px;
}
.theme-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.07);
  margin-bottom: 14px;
}
body[data-theme="dark"] .theme-seg {
  background: rgba(255, 255, 255, 0.08);
}
.theme-seg button {
  min-height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 560;
  opacity: 0.72;
  transition: all 0.16s ease;
}
.theme-seg button.active {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  opacity: 1;
  font-weight: 640;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}
body[data-theme="dark"] .theme-seg button.active {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
}
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.wp-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.wp-thumb {
  width: 44px;
  height: 34px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.wp-swatch:hover .wp-thumb {
  transform: scale(1.06);
}
.wp-swatch.active .wp-thumb {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 4px 12px rgba(0, 0, 0, 0.22);
}
.wp-swatch small {
  font-size: 10px;
  opacity: 0.78;
  white-space: nowrap;
}

/* 核心一级液态玻璃面板 */
.surface {
  position: relative;
  padding: 22px 24px;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
  border-radius: 26px;
  box-shadow:
    inset 0 1.5px 1px var(--rim-top),
    inset 0 -1px 1px var(--rim-bottom),
    inset 1px 0 0 var(--rim-side),
    var(--sheet-shadow);
  -webkit-backdrop-filter: var(--sheet-filter);
  backdrop-filter: var(--sheet-filter);
}

/* 顶部液态玻璃 Spotlight 搜索胶囊 */
.search-panel {
  padding: 12px 16px;
  border-radius: 999px;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 10px;
}
.search-icon {
  display: inline-flex;
  color: var(--accent);
  flex-shrink: 0;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  height: 38px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.search input::placeholder {
  color: var(--muted);
}
.search-panel:focus-within {
  border-color: var(--card-border-hover);
  box-shadow:
    inset 0 1.5px 1px var(--rim-top),
    0 0 0 3px var(--accent-soft),
    var(--sheet-shadow);
}
.spotlight-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--pill-bg);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 560;
  white-space: nowrap;
}
.spotlight-trigger:hover {
  background: var(--pill-bg-hover);
}

/* 区块标题 */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 16.5px;
  font-weight: 660;
  letter-spacing: -0.015em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0;
}
.count {
  font-size: 11.5px;
  font-weight: 560;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--card-border);
}

/* macOS Tahoe 悬浮 Dock 架 + 高频常开胶囊 */
.dock-shelf {
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.16));
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0.5px var(--rim-top);
}
body[data-theme="dark"] .dock-shelf {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}
.launch-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
.launch-item {
  min-width: 0;
}
.launch-link {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  padding: 14px 8px 12px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0.5px var(--rim-top), 0 6px 16px rgba(8, 22, 38, 0.06);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.28s ease;
}
.launch-link:hover {
  transform: translateY(-5px) scale(1.03);
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  box-shadow: inset 0 1.5px 1px var(--rim-top), 0 16px 30px -8px rgba(8, 22, 38, 0.18);
}
.launch-link:hover .app-icon {
  transform: scale(1.08);
}
.launch-link strong {
  font-size: 12.5px;
  font-weight: 620;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.launch-link small {
  font-size: 10px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* iOS Squircle 玻璃光泽应用图标 */
.app-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 24%;
  background: var(--icon-grad, linear-gradient(145deg, #0a84ff, #0055cc));
  color: #fff;
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.02em;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.52),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.18),
    0 8px 18px -4px rgba(8, 22, 38, 0.26);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.app-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.06) 44%, rgba(255, 255, 255, 0) 54%);
  pointer-events: none;
}
.app-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

/* 30 天高频常开紧凑玻璃胶囊条 */
.frequent-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.frequent-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.freq-empty {
  font-size: 11.5px;
  color: var(--muted);
}
.freq-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 var(--rim-top);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease;
}
.freq-chip:hover {
  transform: translateY(-2px);
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
}
.freq-chip .app-icon {
  width: 24px;
  height: 24px;
  font-size: 12px;
  border-radius: 7px;
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.45);
}
.freq-chip .app-icon svg {
  width: 13px;
  height: 13px;
}
.freq-chip strong {
  font-size: 12px;
  font-weight: 580;
}
.freq-chip small {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.reorder {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}
.reorder button {
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--pill-bg);
  color: var(--ink);
  font-size: 11px;
}
#edit-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}

/* iOS 26 胶囊分段筛选栏 */
#filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 5px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: rgba(15, 28, 42, 0.05);
  border: 1px solid var(--divider);
}
body[data-theme="dark"] #filters {
  background: rgba(255, 255, 255, 0.04);
}
#filters button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 550;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
#filters button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.34);
}
body[data-theme="dark"] #filters button:hover {
  background: rgba(255, 255, 255, 0.08);
}
#filters button[aria-pressed="true"] {
  background: var(--pill-active-bg);
  border-color: var(--card-border-hover);
  color: var(--ink);
  font-weight: 650;
  box-shadow: inset 0 1px 0.5px var(--rim-top), 0 3px 10px rgba(8, 22, 38, 0.10);
}
#filters button em {
  font-style: normal;
  font-size: 10.5px;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

/* 目录分组与指针追光液态玻璃卡片 */
.app-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 660;
  letter-spacing: -0.01em;
  margin: 20px 2px 11px;
}
.group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, #0a84ff);
  box-shadow: 0 0 8px var(--dot, #0a84ff);
}
.app-group h3 span.group-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.app-card {
  min-width: 0;
  display: flex;
  align-items: center;
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: inset 0 1px 0.5px var(--rim-top), 0 6px 14px rgba(8, 22, 38, 0.05);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.16s ease,
    box-shadow 0.22s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  background: var(--card-bg-hover);
  box-shadow: inset 0 1.5px 1px var(--rim-top), 0 14px 26px -8px rgba(8, 22, 38, 0.15);
}
.app-link {
  padding: 14px 8px 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.app-link .app-icon {
  width: 40px;
  height: 40px;
  font-size: 17px;
}
.app-link .app-icon svg {
  width: 19px;
  height: 19px;
}
.app-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}
.app-copy strong {
  font-size: 13.5px;
  font-weight: 630;
  letter-spacing: -0.01em;
}
.app-copy small {
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.app-copy > span {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.external {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.65;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.app-card:hover .external {
  transform: translate(2px, -2px);
  opacity: 1;
}
.star {
  padding: 6px;
  border: 0;
  background: transparent;
  min-width: 34px;
  height: 34px;
  margin-right: 6px;
  border-radius: 50%;
  font-size: 17px;
  color: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.star:hover {
  background: var(--pill-bg-hover);
  transform: scale(1.12);
}
.star.selected {
  color: #f59e0b;
}

/* 私有入口（默认折叠表单，保持首屏清爽） */
.private-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--pill-bg);
  border: 1px solid var(--card-border);
}
.private-form input {
  flex: 1 1 190px;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--card-border);
  border-radius: 11px;
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--ink);
  outline: none;
}
.private-form input:focus {
  border-color: var(--accent-2);
}
.private-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.private-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: inset 0 1px 0.5px var(--rim-top);
  border-radius: 15px;
  padding: 10px 12px;
  transition: transform 0.2s ease, background 0.18s ease;
}
.private-entry:hover {
  transform: translateY(-2px);
  background: var(--card-bg-hover);
}
.private-entry a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.private-entry a strong {
  font-size: 13px;
  font-weight: 600;
}
.private-entry a small {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.private-entry button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
}
.private-entry button:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

/* 仅当存在待核实告警时才展示的告警面板 */
.alert-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--divider);
  font-size: 12px;
}
.alert-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.alert-row p {
  margin: 3px 0;
  color: #d97706;
}
.alert-row small {
  color: var(--muted);
}
.verify {
  color: var(--accent);
  white-space: nowrap;
  font-weight: 600;
}

.empty {
  padding: 16px 14px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.unavailable {
  opacity: 0.68;
}

#feedback {
  background: linear-gradient(135deg, rgba(255, 248, 225, 0.86), rgba(255, 241, 204, 0.72));
  border: 1px solid rgba(245, 158, 11, 0.35);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 11px 18px;
  border-radius: 16px;
  color: #78350f;
  font-size: 12.5px;
  margin: 0;
}
body[data-theme="dark"] #feedback {
  background: rgba(120, 53, 15, 0.55);
  color: #fef3c7;
}

/* 精致底部玻璃状态条（合并原占屏的目录说明块） */
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
  box-shadow: inset 0 1px 0.5px var(--rim-top), 0 10px 28px rgba(8, 22, 38, 0.12);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  font-size: 12px;
  color: var(--ink-2);
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-dot {
  opacity: 0.4;
}
.footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

/* macOS Spotlight 液态玻璃居中命令唤起窗 (⌘K) */
.spotlight-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: rgba(6, 12, 22, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 16px 24px;
}
.spotlight-modal {
  width: 100%;
  max-width: 620px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(242, 248, 255, 0.66));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.95),
    0 32px 80px rgba(4, 10, 22, 0.38);
  -webkit-backdrop-filter: blur(42px) saturate(200%);
  backdrop-filter: blur(42px) saturate(200%);
  overflow: hidden;
  color: #0f172a;
}
body[data-theme="dark"] .spotlight-modal {
  background: linear-gradient(145deg, rgba(26, 35, 52, 0.86), rgba(15, 21, 34, 0.76));
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.26),
    0 34px 84px rgba(0, 0, 0, 0.62);
  color: #f8fafc;
}
.spotlight-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--divider);
}
.spotlight-input-row svg {
  color: var(--accent);
  flex-shrink: 0;
}
.spotlight-input-row input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 16.5px;
  color: inherit;
  outline: none;
}
.spotlight-input-row kbd {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.07);
  color: var(--muted);
}
body[data-theme="dark"] .spotlight-input-row kbd {
  background: rgba(255, 255, 255, 0.10);
}
.spotlight-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}
.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.spotlight-item.active,
.spotlight-item:hover {
  background: var(--accent-soft);
}
.spotlight-item .app-icon {
  width: 34px;
  height: 34px;
  font-size: 15px;
  border-radius: 9px;
}
.spotlight-item .app-icon svg {
  width: 16px;
  height: 16px;
}
.spotlight-item-copy {
  flex: 1;
  min-width: 0;
}
.spotlight-item-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 620;
}
.spotlight-item-copy small {
  display: block;
  font-size: 11.5px;
  opacity: 0.68;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotlight-item-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  opacity: 0.75;
  white-space: nowrap;
}
body[data-theme="dark"] .spotlight-item-tag {
  background: rgba(255, 255, 255, 0.10);
}
.spotlight-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--divider);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  background: #fff;
  color: #000;
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 100;
}

@media (max-width: 1100px) {
  .launch-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 18px 14px 86px;
    gap: 14px;
  }
  .surface {
    padding: 16px 14px;
    border-radius: 22px;
  }
  .search-panel {
    border-radius: 20px;
    padding: 10px 14px;
  }
  h1 {
    font-size: 24px;
  }
  h1 span {
    display: block;
    margin: 3px 0 0;
    font-size: 12px;
  }
  .masthead-btn span.btn-label,
  .spotlight-trigger {
    display: none;
  }
  .masthead-btn {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
  }
  .btn-badge {
    position: absolute;
    top: -4px;
    right: -4px;
  }
  .launch-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .launch-link {
    padding: 12px 4px 10px;
    border-radius: 15px;
  }
  .app-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .launch-link small {
    display: none;
  }
  .launch-link strong {
    font-size: 11.5px;
  }
  .app-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-bar {
    border-radius: 20px;
    padding: 14px 16px;
  }
}

@media (max-width: 400px) {
  .launch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
