/* ============================================================
   软糖应用铺 · 前台样式
   风格：iOS 圆角 + 渐变 + 毛玻璃
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, sans-serif;

  --bg-1: #fbf8ff;
  --bg-2: #eef2ff;
  --bg-3: #fff2f7;

  --ink: #2a2233;
  --ink-2: #665d74;
  --ink-3: #9a92a7;

  --line: rgba(255, 255, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.56);
  --glass-2: rgba(255, 255, 255, 0.76);
  --glass-3: rgba(255, 255, 255, 0.9);

  --shadow-sm: 0 6px 18px -10px rgba(92, 60, 140, 0.35);
  --shadow: 0 20px 45px -24px rgba(92, 60, 140, 0.45);

  --a1: #ff9ec4;
  --a2: #a78bfa;
  --a-ink: #8b5cf6;

  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

html[data-accent="ocean"] { --a1: #5eead4; --a2: #60a5fa; --a-ink: #0ea5e9; }
html[data-accent="peach"] { --a1: #fda4af; --a2: #fbbf24; --a-ink: #f97316; }
html[data-accent="grape"] { --a1: #c084fc; --a2: #818cf8; --a-ink: #7c3aed; }
html[data-accent="mint"]  { --a1: #86efac; --a2: #34d399; --a-ink: #10b981; }

html[data-theme="dark"] {
  --bg-1: #120f1c;
  --bg-2: #0d1524;
  --bg-3: #1c1024;

  --ink: #f5f1ff;
  --ink-2: #bcb3cb;
  --ink-3: #8b829c;

  --line: rgba(255, 255, 255, 0.11);
  --glass: rgba(38, 31, 52, 0.55);
  --glass-2: rgba(44, 36, 60, 0.78);
  --glass-3: rgba(50, 42, 68, 0.94);

  --shadow-sm: 0 8px 22px -12px rgba(0, 0, 0, 0.7);
  --shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg-1: #120f1c;
    --bg-2: #0d1524;
    --bg-3: #1c1024;
    --ink: #f5f1ff;
    --ink-2: #bcb3cb;
    --ink-3: #8b829c;
    --line: rgba(255, 255, 255, 0.11);
    --glass: rgba(38, 31, 52, 0.55);
    --glass-2: rgba(44, 36, 60, 0.78);
    --glass-3: rgba(50, 42, 68, 0.94);
    --shadow-sm: 0 8px 22px -12px rgba(0, 0, 0, 0.7);
    --shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.8);
  }
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background:
    radial-gradient(1100px 780px at 8% -8%, var(--bg-3) 0%, transparent 58%),
    radial-gradient(900px 700px at 102% 2%, var(--bg-2) 0%, transparent 55%),
    var(--bg-1);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }

::selection { background: color-mix(in srgb, var(--a2) 30%, transparent); }

:focus-visible {
  outline: 2px solid var(--a-ink);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 背景光斑 ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.blob-1 { width: 340px; height: 340px; top: -90px; left: -90px; background: #ffc2dd; }
.blob-2 { width: 400px; height: 400px; top: 10%; right: -150px; background: #c4b5fd; opacity: 0.45; }
.blob-3 { width: 320px; height: 320px; bottom: -80px; left: -50px; background: #a5f3fc; opacity: 0.4; }
.blob-4 { width: 260px; height: 260px; bottom: 18%; right: -70px; background: #fbcfe8; opacity: 0.42; }

html[data-theme="dark"] .blob { opacity: 0.3; }
html[data-theme="dark"] .blob-1 { background: #9d174d; }
html[data-theme="dark"] .blob-2 { background: #6d28d9; }
html[data-theme="dark"] .blob-3 { background: #155e75; }
html[data-theme="dark"] .blob-4 { background: #831843; }

@media (prefers-reduced-motion: no-preference) {
  .blob-1 { animation: float-a 22s ease-in-out infinite; }
  .blob-2 { animation: float-b 26s ease-in-out infinite; }
  .blob-3 { animation: float-b 30s ease-in-out infinite reverse; }
  .blob-4 { animation: float-a 24s ease-in-out infinite reverse; }
}

@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -22px, 0) scale(1.06); }
}
@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-22px, 18px, 0) scale(1.05); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 毛玻璃基类 ---------- */
.glass {
  background: linear-gradient(158deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .glass { box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.07); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-3); }
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: var(--safe-t);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  opacity: 0;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.topbar.is-scrolled::before { opacity: 1; border-bottom-color: var(--line); }

.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 752px;
  margin: 0 auto;
  padding: 9px 18px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 13px; box-shadow: 0 7px 16px -8px rgba(120, 70, 190, 0.65); }
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-copy strong { font-size: 16px; font-weight: 750; letter-spacing: -0.01em; }
.brand-copy small { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.round-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, color 0.2s ease;
}
.round-btn svg { width: 20px; height: 20px; }
.round-btn:active { transform: scale(0.92); }
.round-btn:hover { color: var(--a-ink); }

/* ---------- 页面容器 ---------- */
.page {
  width: 100%;
  max-width: 716px;
  margin: 0 auto;
  padding: 0 18px calc(118px + var(--safe-b));
}

.view[hidden] { display: none; }

/* ---------- 首页头图 ---------- */
.hero { padding-top: 16px; }

.hero-title {
  font-size: clamp(29px, 7.6vw, 36px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero-title .grad {
  background: linear-gradient(100deg, #ff6b9d 0%, #8b5cf6 52%, #4f8ff7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}

html[data-theme="dark"] .hero-title .grad {
  background: linear-gradient(100deg, #ff9ec4 0%, #c4b5fd 52%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  margin-top: 10px;
  max-width: 32em;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-top: 18px;
  padding: 0 13px;
  border-radius: var(--r-md);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.search > svg { width: 19px; height: 19px; flex: none; color: var(--ink-3); }

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
.search input::placeholder { color: var(--ink-3); font-size: 14px; }
.search input::-webkit-search-cancel-button { display: none; }

.search:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 26%, transparent), var(--shadow-sm);
}

.search-clear {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink-3) 18%, transparent);
  color: var(--ink-2);
}
.search-clear svg { width: 13px; height: 13px; }

/* ---------- 公告 ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(120deg, color-mix(in srgb, var(--a1) 16%, transparent), color-mix(in srgb, var(--a2) 14%, transparent));
  border: 1px solid color-mix(in srgb, var(--a2) 18%, transparent);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}
.notice-icon { font-size: 14px; line-height: 1.45; flex: none; }
.notice p { flex: 1; min-width: 0; }
.notice-close {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.35);
}
.notice-close svg { width: 12px; height: 12px; }

/* ---------- 区块标题 ---------- */
.block { margin-top: 26px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px 10px; }
.block-head h2 { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.block-hint, .block-count { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 推荐横滑 ---------- */
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 18px 6px;
  margin: 0 -18px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }

.feat {
  position: relative;
  flex: 0 0 77%;
  max-width: 306px;
  min-height: 164px;
  padding: 15px;
  border-radius: 26px;
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: #fff;
  background: linear-gradient(140deg, var(--f1, #ff9ec4), var(--f2, #a78bfa));
  box-shadow: 0 22px 38px -22px color-mix(in srgb, var(--f2, #a78bfa) 75%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.feat::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -60px;
  top: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  filter: blur(2px);
}
.feat::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  left: -50px;
  bottom: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}
.feat:active { transform: scale(0.975); }
@media (hover: hover) { .feat:hover { transform: translateY(-3px); } }

.feat-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 1; }
.feat-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.feat-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
}
.feat-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat-icon .icon-fallback { font-size: 20px; }
.feat-copy { position: relative; z-index: 1; display: flex; flex-direction: column; }
.feat-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.feat-text {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.88;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feat-go {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 650;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.feat-go svg { width: 12px; height: 12px; }

/* ---------- 分类胶囊 ---------- */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 18px 12px;
  margin: 0 -18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.chip:active { transform: scale(0.95); }
.chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--a2) 80%, transparent);
}
.chip small { margin-left: 5px; font-size: 10.5px; opacity: 0.7; font-weight: 500; }

/* ---------- 应用卡片 ---------- */
.app-list { display: flex; flex-direction: column; gap: 10px; }

.app-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px;
  border-radius: 22px;
  text-align: left;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.22s ease;
}
.app-card:active { transform: scale(0.985); }
@media (hover: hover) {
  .app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
}

.app-icon {
  position: relative;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 8px 16px -8px rgba(60, 30, 100, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  background: #ddd6fe;
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.icon-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(140deg, hsl(var(--h, 280) 82% 78%), hsl(calc(var(--h, 280) + 42) 78% 70%));
}

.app-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-title .pill-hot {
  flex: none;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--a-ink);
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--a2) 16%, transparent);
  letter-spacing: 0.02em;
}
.app-sub {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.app-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.45; }

.app-get {
  flex: none;
  height: 32px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 9px 18px -9px color-mix(in srgb, var(--a2) 85%, transparent);
}

/* ---------- 空状态 / 骨架屏 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 42px 20px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px dashed color-mix(in srgb, var(--ink-3) 35%, transparent);
  text-align: center;
  color: var(--ink-3);
}
.empty-emoji {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  font-size: 28px;
  border-radius: 22px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--a1) 26%, transparent), color-mix(in srgb, var(--a2) 22%, transparent));
}
.empty strong { font-size: 14.5px; color: var(--ink-2); font-weight: 650; }
.empty p { font-size: 12.5px; }

.skeleton {
  height: 84px;
  border-radius: 22px;
  background: linear-gradient(100deg, var(--glass) 28%, var(--glass-2) 46%, var(--glass) 64%);
  background-size: 220% 100%;
  border: 1px solid var(--line);
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

.home-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--ink-3); }

/* ---------- 内页 ---------- */
.page-head { padding: 18px 2px 4px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.page-head p { margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* 分类 */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 15px;
  border-radius: var(--r-lg);
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.cat-card:active { transform: scale(0.97); }
@media (hover: hover) { .cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); } }

.cat-emoji {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 21px;
  border-radius: 15px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--a1) 32%, transparent), color-mix(in srgb, var(--a2) 24%, transparent));
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.cat-name { font-size: 14.5px; font-weight: 700; }
.cat-count { font-size: 11.5px; color: var(--ink-3); margin-top: -7px; }

/* 关于 */
.about-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-top: 16px;
  padding: 26px 22px 22px;
  border-radius: var(--r-xl);
}
.about-logo { width: 64px; height: 64px; border-radius: 20px; box-shadow: 0 14px 26px -14px rgba(120, 70, 190, 0.7); }
.about-card h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.about-desc { font-size: 13px; line-height: 1.85; color: var(--ink-2); white-space: pre-line; max-width: 28em; }
.about-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-3) 12%, transparent);
  border: 1px solid var(--line);
}

.info-card { margin-top: 12px; padding: 18px; border-radius: var(--r-lg); }
.info-card h3 { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 700; }
.info-card p { margin-top: 8px; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }

.site-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--ink-3); line-height: 1.8; }
.site-foot a { color: var(--ink-2); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(12px + var(--safe-b));
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: min(calc(100% - 24px), 660px);
  margin: 0 auto;
  padding: 6px;
  border-radius: 24px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  box-shadow: 0 24px 50px -24px rgba(70, 40, 110, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar { background: var(--glass-3); }
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0 4px;
  border-radius: 18px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  transition: color 0.22s ease, background 0.3s ease;
}
.tab svg { width: 21px; height: 21px; }
.tab.is-active {
  color: var(--a-ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--a1) 22%, transparent), color-mix(in srgb, var(--a2) 14%, transparent));
}
.tab.is-active svg { stroke-width: 2.1; }

/* ---------- 详情半屏弹层 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(26, 18, 38, 0.34);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sheet-panel {
  position: relative;
  width: min(100%, 680px);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 20px calc(30px + var(--safe-b));
  border-radius: 32px 32px 0 0;
  background: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  border: 1px solid var(--line);
  border-bottom: none;
  -webkit-backdrop-filter: blur(34px) saturate(190%);
  backdrop-filter: blur(34px) saturate(190%);
  box-shadow: 0 -26px 70px -26px rgba(46, 20, 80, 0.55);
  transform: translateY(102%);
  transition: transform 0.46s cubic-bezier(0.32, 0.72, 0, 1);
  scrollbar-width: none;
}
.sheet-panel::-webkit-scrollbar { display: none; }

.sheet.is-open .sheet-mask { opacity: 1; }
.sheet.is-open .sheet-panel { transform: none; }

.sheet-grab {
  width: 40px;
  height: 5px;
  margin: 2px auto 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-3) 42%, transparent);
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--ink-3) 14%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sheet-close svg { width: 15px; height: 15px; }

.sheet-body { padding-top: 6px; }

.sheet-hero { display: flex; align-items: center; gap: 14px; padding-right: 34px; }
.sheet-icon {
  flex: none;
  width: 78px;
  height: 78px;
  border-radius: 23px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 16px 30px -14px rgba(50, 20, 90, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.sheet-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-icon .icon-fallback { font-size: 30px; }

.sheet-heads { min-width: 0; display: flex; flex-direction: column; }
.sheet-title { font-size: 21px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.3; }
.sheet-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }

.sheet-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.meta-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-3) 12%, transparent);
  border: 1px solid var(--line);
}

.sheet-actions { display: flex; gap: 9px; margin-top: 18px; }

.btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 50px;
  border-radius: 17px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--a2) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn-primary:active { transform: scale(0.98); filter: brightness(0.97); }
.btn-primary svg { width: 17px; height: 17px; }
.btn-primary.is-disabled { opacity: 0.45; pointer-events: none; }

.btn-icon {
  flex: none;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, color 0.2s ease;
}
.btn-icon svg { width: 21px; height: 21px; }
.btn-icon:active { transform: scale(0.94); }
.btn-icon.is-on { color: #ff5c8a; background: color-mix(in srgb, #ff5c8a 12%, var(--glass)); border-color: color-mix(in srgb, #ff5c8a 25%, transparent); }
.btn-icon.is-on svg { fill: currentColor; }

.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-size: 11px;
  color: var(--a-ink);
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--a2) 13%, transparent);
}

.sheet-h { margin: 22px 2px 8px; font-size: 14px; font-weight: 750; letter-spacing: -0.01em; }
.sheet-desc { font-size: 13px; line-height: 1.9; color: var(--ink-2); white-space: pre-line; }

.shots { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shots a { flex: none; }
.shots img {
  height: 196px;
  width: auto;
  max-width: 74vw;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.links { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink-3) 7%, transparent);
  border: 1px solid var(--line);
}
.link-badge {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, hsl(var(--h, 280) 76% 70%), hsl(calc(var(--h, 280) + 40) 72% 62%));
}
.link-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link-main strong { font-size: 13px; font-weight: 650; }
.link-main small { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-3); }
.copy-btn {
  font-size: 10px;
  font-weight: 700;
  color: var(--a-ink);
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--a2) 14%, transparent);
}
.link-open {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 7px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
}

.sheet-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink-3) 7%, transparent);
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-b));
  z-index: 200;
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(40, 32, 52, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translate(-50%, 12px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
  pointer-events: none;
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.noscript { padding: 18px; text-align: center; font-size: 13px; color: var(--ink-2); }

/* ---------- 桌面适配 ---------- */
@media (min-width: 760px) {
  .page { padding-left: 0; padding-right: 0; }
  .chips, .rail { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .rail { scroll-padding-inline: 0; }
  .hero { padding-top: 26px; }
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 14.5px; }
  .feat { flex: 0 0 calc(50% - 6px); max-width: none; }
  .app-card { padding: 13px 14px; }
  .app-icon { width: 60px; height: 60px; }
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel {
    max-height: 86vh;
    border-radius: 32px;
    border-bottom: 1px solid var(--line);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
  }
  .sheet.is-open .sheet-panel { transform: none; opacity: 1; }
}

@media (max-width: 360px) {
  .app-get { display: none; }
  .app-icon { width: 52px; height: 52px; border-radius: 15px; }
  .feat { flex-basis: 84%; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
