@font-face {
  font-family: "Caveat Hello";
  src: url("../assets/fonts/caveat-hello.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* 与 Komari Horizon 背景保持一致 */
  --page: #eef1f7;
  --page-2: #e8edf7;
  --blob-a: rgba(90, 140, 255, 0.28);
  --blob-b: rgba(180, 120, 255, 0.18);
  --blob-c: rgba(100, 220, 255, 0.14);
  --text: #1c1c1e;
  --muted: #6b6f7b;
  --quiet: #9a9ea9;
  /* 更薄更中性的玻璃层，靠模糊和描边而非白色堆叠出层次 */
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.80);
  --glass-soft: rgba(255, 255, 255, 0.46);
  --stroke: rgba(255, 255, 255, 0.72);
  --stroke-soft: rgba(28, 28, 30, 0.06);
  --shadow: 0 4px 16px rgba(28, 32, 48, 0.06);
  --shadow-lg: 0 12px 36px rgba(28, 32, 48, 0.10);
  --accent: #0a84ff;
  --accent-2: #8e5cf0;
  --focus: rgba(10, 132, 255, 0.18);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --icon: 48px;
  --icon-box: 56px;
  --icon-pad: 5px;
  --tile-min: 112px;
  --blur: 30px;
  --sat: 150%;
}

html[data-theme="dark"],
body[data-theme="dark"] {
  color-scheme: dark;
  /* 与 Komari Horizon 深色背景保持一致 */
  --page: #05070f;
  --page-2: #04060c;
  --blob-a: rgba(88, 130, 255, 0.28);
  --blob-b: rgba(168, 85, 247, 0.18);
  --blob-c: rgba(34, 211, 238, 0.12);
  --text: #f2f2f7;
  --muted: #a1a1aa;
  --quiet: #7c7c85;
  --glass: rgba(44, 44, 48, 0.62);
  --glass-strong: rgba(54, 54, 59, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-soft: rgba(255, 255, 255, 0.07);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.44);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.56);
  --accent: #0a84ff;
  --accent-2: #bf5af2;
  --focus: rgba(10, 132, 255, 0.26);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
  background: var(--page);
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: scroll;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI Variable", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 560px at 8% -10%, var(--blob-a), transparent 58%),
    radial-gradient(760px 520px at 96% 4%, var(--blob-b), transparent 55%),
    radial-gradient(700px 480px at 50% 110%, var(--blob-c), transparent 55%),
    linear-gradient(180deg, var(--page), var(--page-2));
  transition: color .2s ease, background-color .2s ease;
  padding-bottom: calc(18px + var(--safe-bottom));
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ===== Header: floating glass island ===== */
.app-header {
  position: static;
  padding: calc(10px + var(--safe-top)) 16px 8px;
  background: transparent;
  border: 0;
  display: flex;
  justify-content: center;
}
.topbar {
  width: fit-content;
  max-width: calc(100% - 8px);
  min-height: 48px;
  margin: 0 auto;
  padding: 6px 6px 6px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 主题按钮是 42px 圆形按钮、内部图标仅 18px，本身已带约 12px 留白。
     这里再加 gap 会让「标题→按钮」的视觉间距是「图标→标题」的 2.5 倍，
     所以此处不加 gap，改由 .brand-block 的 gap 统一控制节奏。 */
  gap: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 250, 252, 0.88) 100%);
  border: 1px solid rgba(54, 72, 88, 0.075);
  box-shadow:
    0 1px 2px rgba(30, 45, 60, 0.055),
    0 6px 15px rgba(30, 45, 60, 0.075),
    inset 0 1px 0 rgba(255,255,255,0.96),
    inset 0 -1px 0 rgba(77, 105, 128, 0.055);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}
html[data-theme="dark"] .topbar,
body[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(54,54,59,.82), rgba(38,38,43,.72));
  border-color: rgba(255,255,255,.10);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,.20);
}

.brand-block, .brand-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-copy h1 {
  font-family: "Caveat Hello", "SF Pro Rounded", "Segoe Print", cursive;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(100deg, #ff453a 0 18%, #ff9f0a 18% 36%, #30d158 36% 54%, #0a84ff 54% 74%, #bf5af2 74% 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 2px 2px 0;
}

.icon-button, #back-to-top {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--glass-soft);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.icon-button:hover, #back-to-top:hover {
  color: var(--text);
  background: var(--glass-strong);
  transform: scale(1.03);
}
.icon-button:active, #back-to-top:active { transform: scale(0.96); }
.icon-button svg, #back-to-top svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun,
body[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon,
body[data-theme="dark"] .theme-icon-moon { display: block; }

/* Keep the handwritten wordmark and the theme control visually separated. */
.topbar .icon-button { margin-left: 0; }

#back-to-top {
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: var(--glass);
  box-shadow: var(--shadow);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ===== Workspace ===== */
.workspace {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 10px 0 24px;
}

/* ===== Search: iOS capsule ===== */
.search-container {
  position: relative;
  width: min(720px, 100%);
  margin: 6px auto 26px;
}
.search-label-row,
.search-label { display: none !important; }
.search-box {
  height: 54px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 48px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(54, 72, 88, 0.085);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(248, 251, 253, 0.91) 100%);
  box-shadow:
    0 1px 2px rgba(30, 45, 60, 0.06),
    0 8px 20px rgba(30, 45, 60, 0.085),
    inset 0 1px 0 rgba(255,255,255,0.98),
    inset 0 -1px 0 rgba(65, 96, 120, 0.065);
  backdrop-filter: blur(24px) saturate(138%);
  -webkit-backdrop-filter: blur(24px) saturate(138%);
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
html[data-theme="dark"] .search-box,
body[data-theme="dark"] .search-box {
  background: linear-gradient(180deg, rgba(54,54,59,.84), rgba(38,38,43,.76));
  border-color: rgba(255,255,255,.11);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,.22);
}
.search-box:focus-within {
  border-color: rgba(68, 139, 187, 0.22);
  box-shadow:
    0 2px 4px rgba(30,45,60,.055),
    0 10px 24px rgba(30,45,60,.11),
    0 0 0 3px rgba(72,154,207,.07),
    inset 0 1px 0 rgba(255,255,255,.98);
  transform: translateY(-1px);
}
.search-engine-trigger {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.search-engine-trigger:hover { color: var(--text); }
.search-engine-trigger-icon {
  width: 22px; height: 22px; background: center / contain no-repeat;
}
.search-engine-trigger-caret { opacity: .65; transition: transform .15s ease; }
.search-engine-trigger[aria-expanded="true"] .search-engine-trigger-caret { transform: rotate(180deg); }
.search-input-area {
  height: 100%; min-width: 0; position: relative; display: flex; align-items: center;
}
.search-input {
  width: 100%; height: 100%;
  padding: 0 40px 0 4px;
  border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 16px; /* iOS no-zoom */
}
.search-input::placeholder { color: var(--quiet); }
.search-clear {
  position: absolute; right: 4px;
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  cursor: pointer; opacity: 0; visibility: hidden;
}
.search-clear.visible { opacity: 1; visibility: visible; }
.search-clear:hover { background: var(--glass-soft); color: var(--text); }
.search-button {
  width: 48px; height: 54px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.search-button:hover { color: var(--text); }
.search-button svg { width: 19px; height: 19px; }
.search-results-count {
  display: none; margin-top: 10px; text-align: center; color: var(--muted); font-size: 12px;
}
.search-results-count.visible { display: block; }

.search-engine-dropdown {
  position: absolute;
  top: 60px; left: 50%; z-index: 60;
  width: min(520px, 100%);
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  transform: translate(-50%, -6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.search-engine-dropdown[hidden] { display: none; }
.search-engine-dropdown.visible {
  opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto;
}
.search-engine-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 6px;
}
.search-engine-item {
  min-height: 74px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 16px;
  background: transparent; color: var(--muted); font-size: 12px; cursor: pointer;
}
.search-engine-item:hover { background: var(--glass-soft); color: var(--text); }
.search-engine-item.active {
  border-color: var(--stroke);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.search-engine-item-icon { width: 26px; height: 26px; background: center / contain no-repeat; }
[data-theme="dark"] .search-engine-item-icon[data-engine="baidu"],
[data-theme="dark"] .search-engine-trigger-icon[data-engine="baidu"] {
  /* Keep shape like Google/Bing: no plate, just lift contrast on dark glass */
  filter: brightness(1.22) saturate(1.08) drop-shadow(0 0 0.6px rgba(255,255,255,0.35));
}
.search-engine-item-name {
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}

/* ===== Sections / tiles ===== */
main { min-height: 280px; }
section { margin: 0 0 28px; }
section h2 {
  margin: 0 0 14px 2px;
  display: flex; align-items: center; gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
section h2::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.category-count {
  min-width: 22px; height: 20px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--stroke-soft);
  background: var(--glass-soft);
  color: var(--muted);
  font-size: 11px; font-weight: 700;
}

/* App icon grid like iOS home screen */
ul {
  list-style: none;
  display: grid;
  /* 用固定最小列宽自动填充，短分组的卡片不会被拉伸，
     整页左右视觉重量也更均衡（原先 repeat(6,1fr) 会让 2~3 项的分组右侧留大片空白） */
  grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
  gap: 12px;
}
li {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  min-height: var(--tile-min);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.88);
  /* 淡蓝玻璃：左上高光、右下蓝色厚度 */
  background: linear-gradient(145deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(225, 244, 255, 0.70) 46%,
    rgba(181, 222, 249, 0.46) 100%);
  box-shadow:
    0 13px 26px rgba(57, 111, 151, 0.16),
    0 3px 8px rgba(43, 82, 118, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 2px rgba(92, 175, 226, 0.20);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.22,.9,.3,1),
              box-shadow .18s ease,
              border-color .18s ease,
              background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 玻璃表面的斜向柔光，pointer-events 防止遮挡链接 */
li::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: -42%;
  left: -28%;
  width: 112%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.68) 0%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 74%);
  transform: rotate(-12deg);
}
li:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.98);
  background: linear-gradient(145deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(220, 243, 255, 0.80) 46%,
    rgba(163, 216, 248, 0.55) 100%);
  box-shadow:
    0 19px 34px rgba(47, 105, 149, 0.22),
    0 6px 13px rgba(42, 84, 120, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 3px rgba(82, 168, 222, 0.23);
}
html[data-theme="dark"] li,
body[data-theme="dark"] li {
  /* 抬高卡片表面并加强描边，避免多张卡片在深色底上糊成一整条 */
  background: rgba(42, 51, 72, 0.66);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.07);
}
html[data-theme="dark"] li:hover,
body[data-theme="dark"] li:hover {
  background: rgba(52, 62, 86, 0.78);
}
li:active { transform: scale(0.97); }
li:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus), var(--shadow-lg);
}
li a {
  width: 100%;
  min-height: var(--tile-min);
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  text-align: center;
}

/* Compact glass icon plate (previous refined size) */
.favicon-container {
  width: var(--icon-box);
  height: var(--icon-box);
  flex: 0 0 var(--icon-box);
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke-soft);
  border-radius: 15px;
  background: var(--glass-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  overflow: hidden;
  position: relative;
  transition: transform .18s cubic-bezier(.22,.9,.3,1);
}
.favicon-container::before {
  content: "";
  width: 58%;
  height: 58%;
  border-radius: 12px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  opacity: .65;
  transition: opacity .18s ease;
}
.favicon-container:has(.favicon.loaded)::before { opacity: 0; }
li:hover .favicon-container { transform: translateY(-1px); }
/* 统一图标观感：不同来源的 logo 尺寸/比例差异很大（方形图标、宽扁文字图、
   带自带留白的透明 PNG 混在一起）。用固定内边距 + object-fit: contain 把它们
   压进同一个光学方框，宽图不再顶到边、方图不再显得过大。 */
.favicon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: var(--icon-pad);
  border-radius: 12px;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.favicon.loaded { opacity: 1; }
li:hover .favicon.loaded { transform: scale(1.05); }

.link-text {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--text);
}

.external-icon,
li .url { display: none; }

footer {
  margin: 0 auto;
  padding: 0 16px calc(10px + var(--safe-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
body.hide-favicon .favicon-container,
li.no-icon .favicon-container { display: none; }

.loading, .error-message, .empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.error-message { gap: 12px; align-content: center; }
.error-message button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
}
.empty-state {
  gap: 6px;
  border: 1px dashed var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--glass-soft);
}
.empty-state strong { color: var(--text); font-size: 15px; font-weight: 700; }
.empty-state span { font-size: 13px; }

:focus-visible { outline: none; }
button:focus-visible, a:focus-visible { box-shadow: 0 0 0 4px var(--focus); }

::-webkit-scrollbar { width: 0; height: 0; }

/* Responsive like iPhone home screen density */
/* 断点只调整最小列宽，由 auto-fill 决定列数。
   必须保持单调递减：窗口越窄，--tile-min 越小。
   以前 920px 设 118px（比 1180px 的 116px 更大）、380px 设 92px（比 520px 的 84px 更大），
   导致列数随窗口缩小不单调跳变（800px→5列，缩到 700px 反而→6列）。 */
@media (max-width: 1180px) { :root { --tile-min: 108px; } }
@media (max-width: 920px)  { :root { --tile-min: 104px; } }
@media (max-width: 720px) {
  .workspace { width: min(100% - 20px, 1180px); }
  ul { gap: 10px; }
  :root { --icon: 44px; --icon-box: 52px; --tile-min: 96px; }
}
@media (max-width: 520px) {
  .app-header { padding-left: 12px; padding-right: 12px; }
  .topbar { min-height: 46px; padding: 5px 5px 5px 15px; gap: 2px; }
  .brand-copy h1 { font-size: 27px; }
  .search-container { margin-bottom: 22px; }
  .search-box { height: 48px; grid-template-columns: 48px minmax(0,1fr) 44px; }
  .search-engine-trigger { width: 48px; height: 48px; }
  .search-button { width: 44px; height: 48px; }
  .search-engine-dropdown { top: 56px; }
  ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  :root { --icon: 42px; --icon-box: 50px; --tile-min: 0px; --radius-lg: 18px; }
  li, li a { min-height: 96px; }
  .link-text { font-size: 11.5px; }
  li a { padding: 12px 6px 10px; gap: 8px; }
}
@media (max-width: 380px) {
  :root { --icon: 38px; --icon-box: 46px; }
  ul { gap: 8px; }
  li, li a { min-height: 90px; }
}

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

/* iOS PWA / standalone polish */
@supports (-webkit-touch-callout: none) {
  body { min-height: -webkit-fill-available; }
  li, .search-box, .topbar, .icon-button, .favicon-container {
    /* stronger liquid glass on Safari */
    backdrop-filter: blur(34px) saturate(210%);
    -webkit-backdrop-filter: blur(34px) saturate(210%);
  }
}


/* ===== 首屏加载动画（原先内联在 index.html，移出以便缓存与统一维护） ===== */
    #loading-screen {
        position: fixed;
        inset: 0;
        z-index: 99999;
        display: flex;
        justify-content: center;
        align-items: center;
        background:
          radial-gradient(900px 560px at 12% -8%, rgba(90,150,255,.42), transparent 58%),
          radial-gradient(760px 520px at 92% 0%, rgba(190,120,255,.34), transparent 55%),
          linear-gradient(180deg, #e8eef8, #f4eefc);
        transition: opacity 0.18s ease;
    }
    .spinner-loader {
        position: relative;
        width: 54px;
        height: 54px;
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.28));
        border: 1px solid rgba(255,255,255,.72);
        box-shadow: 0 12px 36px rgba(30,45,80,.12), inset 0 1px 0 rgba(255,255,255,.55);
        backdrop-filter: blur(18px) saturate(180%);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        display: grid;
        place-items: center;
        animation: glass-pulse 1.2s ease-in-out infinite;
    }
    .spinner-loader::before {
        content: "";
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 2.5px solid rgba(10,132,255,.18);
        border-top-color: #0a84ff;
        border-right-color: #bf5af2;
        animation: spin-clockwise 0.75s linear infinite;
        box-shadow: none;
        background: transparent;
        inset: auto;
    }
    .spinner-loader::after {
        content: "";
        position: absolute;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: linear-gradient(135deg, #0a84ff, #bf5af2);
        box-shadow: 0 0 0 4px rgba(10,132,255,.12);
    }
    html[data-theme="dark"] #loading-screen,
    body[data-theme="dark"] #loading-screen {
        background:
          radial-gradient(900px 560px at 12% -8%, rgba(50,120,255,.28), transparent 58%),
          radial-gradient(760px 520px at 92% 0%, rgba(170,80,255,.22), transparent 55%),
          linear-gradient(180deg, #05070d, #0b1020);
    }
    html[data-theme="dark"] .spinner-loader,
    body[data-theme="dark"] .spinner-loader {
        background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
        border-color: rgba(255,255,255,.18);
        box-shadow: 0 14px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
    }
    html[data-theme="dark"] .spinner-loader::before,
    body[data-theme="dark"] .spinner-loader::before {
        border-color: rgba(100,181,255,.16);
        border-top-color: #64b5ff;
        border-right-color: #d78bff;
    }
    @media (prefers-color-scheme: dark) {
        html:not([data-theme]) #loading-screen {
            background:
              radial-gradient(900px 560px at 12% -8%, rgba(50,120,255,.28), transparent 58%),
              radial-gradient(760px 520px at 92% 0%, rgba(170,80,255,.22), transparent 55%),
              linear-gradient(180deg, #05070d, #0b1020);
        }
        html:not([data-theme]) .spinner-loader {
            background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
            border-color: rgba(255,255,255,.18);
            box-shadow: 0 14px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
        }
        html:not([data-theme]) .spinner-loader::before {
            border-color: rgba(100,181,255,.16);
            border-top-color: #64b5ff;
            border-right-color: #d78bff;
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .spinner-loader, .spinner-loader::before { animation-duration: 2.4s; }
    }
    @keyframes spin-clockwise { to { transform: rotate(360deg); } }
    @keyframes glass-pulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.04); }
    }

