/* ============================================================
   pages/play.html 样式（App Store 风格重写）
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* body 用 min-height（而非 height:100%）：让 body 高度随内容增长，
   否则 sticky 顶栏的约束范围被限制在首屏 100vh，滚动超出后失效 */
html { height: 100%; }
body { min-height: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

body {
  /* 浅色 radial-gradient：让顶部导航栏背后有色彩，凸显 Glassmorphism */
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(10, 132, 255, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 40%, rgba(175, 82, 222, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 70%, rgba(255, 45, 85, 0.06) 0%, transparent 55%),
    #fbfbfd;
  background-attachment: fixed;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:root {
  --bg-page:      #fbfbfd;
  --bg-card:      #ffffff;
  --text-primary:   #1d1d1f;
  --text-secondary: #424245;
  --text-muted:     #6e6e73;
  --text-hint:      #86868b;
  --border:        rgba(0,0,0,0.08);
  --border-soft:   rgba(0,0,0,0.04);
  --accent:        #0a84ff;
  --accent-soft:   rgba(10,132,255,0.12);
  --shadow-card:   0 1px 2px rgba(0,0,0,0.04), 0 6px 18px rgba(0,0,0,0.04);
  --shadow-hover:  0 1px 2px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.08);
  --shadow-icon:   0 1px 2px rgba(0,0,0,0.08), 0 6px 16px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.18);
  --shadow-icon-hover: 0 1px 2px rgba(0,0,0,0.10), 0 14px 30px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.22);
  --shadow-banner: 0 1px 2px rgba(0,0,0,0.04), 0 12px 40px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.02);
  --radius-card:   20px;
  --radius-banner: 28px;
  --radius-icon-squircle: 18px;
  --radius-icon-banner:   48px;
}

/* ============================================================
   主区
   ============================================================ */
main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  /* 对齐 course.html（course-page）main 内边距，保证 banner 位置/宽度一致 */
  padding: 32px 40px 80px;
}

/* eyebrow 小标 */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-hint);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ============================================================
   Banner 轮播（与 course.html 完全一致，样式源：course.04e47a3c.css）
   ============================================================ */
.carousel { margin-bottom: 56px; position: relative; }

.carousel-viewport {
  position: relative;
}

.carousel-track {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 340px;
}

/* 单个 banner：默认所有 banner 都是 absolute 叠加，由 current/peek-left/peek-right 控制可见性 */
.banner {
  flex: 0 0 auto;
  width: 100%;
  border-radius: var(--radius-banner, 28px);
  padding: 48px 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  box-shadow: var(--shadow-banner, 0 1px 2px rgba(0,0,0,0.04), 0 12px 40px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.02));
  opacity: 0;
  transform: translateX(60px) scale(0.96);
  transition: opacity .55s ease, transform .55s ease, filter .55s ease;
  pointer-events: none;
  cursor: pointer;
}
/* 占位骨架 banner：渲染前隐藏，避免 absolute 高度坍塌与闪烁（play 页自有，无视觉影响） */
.banner.is-placeholder { display: none; }
.banner.is-current {
  position: relative;
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 2;
  pointer-events: auto;
}
.banner.is-peek-left,
.banner.is-peek-right {
  opacity: 0.55;
  width: 80%;
  height: 92%;
  filter: saturate(0.85) brightness(0.98);
  z-index: 1;
  pointer-events: none;
}
.banner.is-peek-left  { left: -45%; transform: scale(0.94); }
.banner.is-peek-right { left: 65%;  transform: scale(0.94); }

/* Banner 内部 */
.banner-content {
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
  position: relative;
}
.banner-art {
  flex-shrink: 0;
  width: 200px; height: 200px;
  border-radius: var(--radius-icon-banner, 48px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.20);
  overflow: hidden;
  animation: floatY 6s ease-in-out infinite;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-art svg { width: 100%; height: 100%; display: block; }
.banner:hover .banner-art { animation-play-state: paused; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.banner-text { flex: 1; min-width: 0; position: relative; z-index: 2; }
.banner-eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary, #1d1d1f);
  opacity: 0.6;
}
.banner-title {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 12px;
  color: var(--text-primary, #1d1d1f);
}
.banner-sub {
  /* 字体钉 course.html 实际继承值（其 body 由 main.65225daa.css 设定），保证两端渲染一致 */
  font-family: "Noto Sans SC", "Open Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary, #1d1d1f);
  opacity: 0.65;
  max-width: 480px;
  margin-bottom: 22px;
}
.banner-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--text-primary, #1d1d1f);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background .2s ease, transform .2s ease;
}
.banner-cta:hover { background: var(--accent, #0a84ff); transform: translateY(-1px); }
/* course.html 经 main.65225daa.css 的 a:hover { color:#3b82f6 } 作用于 CTA（特异性 0-1-1 胜过类选择器），
   此处按其计算值等价复刻，且不外溢到页面其它链接 */
.banner-cta:hover { color: #3b82f6; }
.banner-cta::after { content: ' →'; transition: transform .2s ease; display: inline-block; }
.banner-cta:hover::after { transform: translateX(3px); }

/* ============================================================
   Banner 色板（与 course.html 完全一致）
   ============================================================ */
.tone-violet  { background: linear-gradient(135deg,#ede9fe 0%,#f3e8ff 100%); }
.tone-rose    { background: linear-gradient(135deg,#fce7f3 0%,#fff1f2 100%); }
.tone-cyan    { background: linear-gradient(135deg,#cffafe 0%,#e0f2fe 100%); }
.tone-amber   { background: linear-gradient(135deg,#fef3c7 0%,#fff7ed 100%); }
.tone-emerald { background: linear-gradient(135deg,#d1fae5 0%,#ecfdf5 100%); }
.tone-blue    { background: linear-gradient(135deg,#dbeafe 0%,#eff6ff 100%); }

/* ============================================================
   Carousel 控件（与 course.html 完全一致）
   ============================================================ */
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 22px; font-weight: 500;
  /* 字体钉 course.html 实际继承值（button{font:inherit} → main.65225daa.css body 字体） */
  font-family: "Noto Sans SC", "Open Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary, #1d1d1f);
  z-index: 10;
  opacity: 0;
  transition: opacity .2s ease, background .15s ease;
  line-height: 1;
}
.carousel:hover .carousel-nav { opacity: 1; }
.carousel-nav:hover { background: #fff; }
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
  border: 0; padding: 0;
}
.dot.active { width: 24px; border-radius: 999px; background: var(--text-primary, #1d1d1f); }

/* ============================================================
   Section 头
   ============================================================ */
.section-head { margin-bottom: 18px; }
.section-title {
  font-family: "PingFang SC", "Noto Sans SC", -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  line-height: 1.15;
}
.section-title .en {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-hint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-family: "Inter", -apple-system, sans-serif;
}

/* ============================================================
   所有应用区
   ============================================================ */
.grid-section { margin-bottom: 64px; }

/* Liquid Glass：分类筛选玻璃工具栏（控件层）
   P4 sticky：滚动时吸附在 topbar 下方，玻璃悬浮于内容之上 */
.cat-filter-row {
  position: sticky;
  top: 63px; /* topbar 高 55px + 8px 间隙 */
  z-index: 40; /* 低于 topbar 的 z-90，高于网格内容 */
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 10px 30px rgba(15, 23, 42, 0.08);
  transition: background .25s var(--lg-ease), box-shadow .25s var(--lg-ease);
}
/* 吸顶态：玻璃加浓 + 阴影加深（.is-stuck 由页面 JS IntersectionObserver 切换） */
.cat-filter-row.is-stuck {
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 14px 36px rgba(15, 23, 42, 0.14);
}
/* 吸顶后的滚动边缘渐隐（scroll edge effect 网页版）：内容从栏下穿出时向下淡出 */
.cat-filter-row.is-stuck::after {
  content: '';
  position: absolute;
  left: 6px; right: 6px;
  top: 100%;
  height: 16px;
  background: linear-gradient(to bottom, rgba(251, 251, 253, 0.55), transparent);
  pointer-events: none;
}
.cat-pill {
  position: relative;
  overflow: hidden;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border-radius: 999px;
  border: 0;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background .25s var(--lg-ease), color .25s var(--lg-ease),
              transform .25s var(--lg-ease), box-shadow .25s var(--lg-ease);
}
/* 指针跟随镜面高光（--lg-x/--lg-y 由页面 JS 写入） */
.cat-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--lg-x, 50%) var(--lg-y, 50%),
              rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 55%);
  opacity: 0;
  transition: opacity 220ms var(--lg-ease);
}
.cat-pill:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.5); }
.cat-pill:hover::before { opacity: .4; }
.cat-pill:active { transform: scale(.96); }
.cat-pill:active::before { opacity: 1; }
.cat-pill.active {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 3px 10px rgba(15, 23, 42, 0.12);
}
.cat-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.6;
}

/* 搜索 inline 工具行 */
.tools-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 28px;
}
/* Liquid Glass：行内搜索玻璃域 */
.search-inline {
  flex: 0 0 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 44px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(15, 23, 42, 0.05);
  transition: border-color .25s var(--lg-ease), box-shadow .25s var(--lg-ease), background .25s var(--lg-ease);
}
.search-inline:hover { border-color: rgba(0, 0, 0, 0.14); }
.search-inline:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px var(--accent-soft),
    0 6px 16px rgba(15, 23, 42, 0.06);
}
.search-icon { color: var(--text-hint); display: inline-flex; }
.search-input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  height: 100%;
}
.search-input::placeholder { color: var(--text-hint); }
.search-clear {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.search-clear:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
.search-clear[hidden] { display: none; }

/* ============================================================
   应用网格
   ============================================================ */
.app-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.app-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 24px 22px 22px;
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.app-card.disabled { opacity: 0.85; cursor: default; }
/* P3 禁用卡：hover 不上浮、图标不放大（未上线应用弱化交互反馈） */
.app-card.disabled:hover { transform: none; box-shadow: none; }
.app-card.disabled:hover .app-icon { transform: none; box-shadow: var(--shadow-icon); }

/* 图标 squircle（卡片） */
.app-icon {
  position: relative;
  width: 72px; height: 72px;
  border-radius: var(--radius-icon-squircle);
  box-shadow: var(--shadow-icon);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  flex-shrink: 0;
}
.app-card:hover .app-icon {
  transform: scale(1.05) translateY(-2px);
  box-shadow: var(--shadow-icon-hover);
}
.app-icon svg { width: 100%; height: 100%; display: block; }
/* P3 图标 sheen：hover 时高光带自左向右扫过（squircle overflow:hidden 裁切） */
.app-icon::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -30%;
  width: 45%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-18deg);
  pointer-events: none;
  z-index: 2;
}
.app-card:hover .app-icon::after { animation: lg-sheen .9s var(--lg-ease); }
.app-card.disabled:hover .app-icon::after { animation: none; }
@keyframes lg-sheen {
  0%        { transform: translateX(-160%) skewX(-18deg); }
  60%, 100% { transform: translateX(320%)  skewX(-18deg); }
}
/* P3 禁用卡磨砂：图标上叠一层轻磨砂（backdrop 模糊 + 白霜），弱化未上线应用 */
.app-card.disabled .app-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(3px) saturate(0.6);
  backdrop-filter: blur(3px) saturate(0.6);
  pointer-events: none;
  z-index: 1;
}

/* 卡片元信息 */
.app-meta { padding-top: 16px; }
.app-name {
  font-family: "PingFang SC", "Noto Sans SC", -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.app-cat-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-hint);
}
.app-cat-tag.cat-test    { color: #1e40af; }
.app-cat-tag.cat-train   { color: #166534; }
.app-cat-tag.cat-brain   { color: #5b21b6; }
.app-cat-tag.cat-club    { color: #92400e; }
.app-cat-tag.cat-tool    { color: #92400e; }
.app-cat-tag.cat-info    { color: #6b21a8; }
.app-cat-tag.cat-comm    { color: #be185d; }
.app-desc {
  font-size: 12px;
  color: var(--text-hint);
  line-height: 1.5;
  margin-top: 8px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   空状态
   ============================================================ */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: -0.01em;
}
.empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-hint);
}
.empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-hint {
  font-size: 12px;
  color: var(--text-hint);
}

/* ============================================================
   占位/骨架
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08), rgba(0,0,0,0.04));
  background-size: 200% 100%;
  animation: shine 1.4s ease-in-out infinite;
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08), rgba(0,0,0,0.04));
  background-size: 200% 100%;
  animation: shine 1.4s ease-in-out infinite;
  margin-bottom: 10px;
}
@keyframes shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   底栏 + Toast
   ============================================================ */
.footer {
  padding: 24px 40px;
  font-size: 11px;
  color: var(--text-hint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 1px solid #f2f2f4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer .right { display: inline-flex; gap: 24px; }
.footer .live::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Liquid Glass：Toast 深色玻璃胶囊（浮动控件层，内容在其下方穿行被折射） */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 24, 60, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: #fff;
  padding: 12px 24px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 12px 32px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transition: all .25s ease;
  z-index: 100;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .app-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .app-grid { grid-template-columns: repeat(3, 1fr); }
  .banner { padding: 32px 32px; }
  .banner-content { gap: 32px; padding: 0 8px; }
  .banner-art { width: 140px; height: 140px; border-radius: 32px; }
  .banner-title { font-size: 28px; }
  .carousel-track { height: 280px; }
  .search-inline { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .carousel-track { height: 240px; }
  .carousel-prev, .carousel-next { display: none; }
  .banner { padding: 24px 22px; }
  .banner-content { gap: 16px; }
  .banner-art { width: 84px; height: 84px; border-radius: 22px; }
  .banner-title { font-size: 22px; margin-bottom: 8px; }
  .banner-sub { font-size: 12px; margin-bottom: 14px; max-width: none; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .banner-eyebrow { margin-bottom: 8px; font-size: 10px; }
  .search-inline { flex: 0 0 100%; max-width: 100%; }
  .cat-pill { font-size: 12px; padding: 7px 14px; }
  .cat-filter-row { margin-bottom: 18px; }
  .tools-row { margin-bottom: 20px; }
}

/* ============================================================
   Liquid Glass（iOS 26 风格）· P0 基础设施
   原则：玻璃只属于「控件与导航」功能层，内容层保持不透明。
   设计令牌（--lg-blur / --lg-ease 等）复用 topbar.d37fed3d.css :root。
   ============================================================ */

/* 通用玻璃面（供后续 P3/P4 复用） */
.lg-glass {
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 10px 30px rgba(15, 23, 42, 0.08);
}
.lg-glass--thick { background: rgba(255, 255, 255, 0.62); }
.lg-glass--dark {
  background: rgba(20, 24, 60, 0.55);
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 10px 30px rgba(15, 23, 42, 0.22);
}

/* 指针跟随镜面高光（--lg-x/--lg-y 由页面 JS 写入） */
.lg-gloss { position: relative; }
.lg-gloss::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--lg-x, 50%) var(--lg-y, 50%),
              rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 55%);
  opacity: 0;
  transition: opacity 220ms var(--lg-ease);
}
.lg-gloss:hover::before { opacity: .45; }
.lg-gloss:active::before { opacity: 1; }

/* 兜底 1：不支持 backdrop-filter → 近实色，保对比度
   （banner 控件与 course.html 一致：course 无兜底，箭头 0.85 白底不降级，此处同样不列入） */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .cat-filter-row, .search-inline { background: rgba(255, 255, 255, 0.94); }
  .toast { background: rgba(20, 24, 60, 0.94); }
}

/* 兜底 2：用户偏好减少透明 → 收起玻璃（banner 控件同 course：不做处理） */
@media (prefers-reduced-transparency: reduce) {
  .cat-filter-row, .search-inline {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.96);
  }
  .toast {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(20, 24, 60, 0.96);
  }
  .app-card.disabled .app-icon::before { background: rgba(255, 255, 255, 0.55); }
}

/* 兜底 3：用户偏好减少动效 → 关闭过渡/镜面/sheen
   （banner 与 course.html 一致：course 无 reduced-motion 处理，floatY/过渡照常运行） */
@media (prefers-reduced-motion: reduce) {
  .cat-pill { transition: none; }
  .cat-pill::before { display: none; }
  .app-icon::after { display: none; }
}

/* ============================================================
   P4 深色模式（跟随系统；topbar 已支持 dark，此处补页面）
   深色玻璃令牌复用 topbar.d37fed3d.css 的 --lg-base-dark /
   --lg-bg-dark / --lg-stroke-dark / --lg-highlight-dark / --lg-shadow-dark
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:      #0a0e27;   /* 对齐 topbar --lg-base-dark */
    --bg-card:      #171b38;
    --text-primary:   #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted:     #94a3b8;
    --text-hint:      #64748b;
    --border:        rgba(255, 255, 255, 0.10);
    --border-soft:   rgba(255, 255, 255, 0.06);
    --accent:        #7db4ff;   /* 对齐 topbar 深色 accent */
    --accent-soft:   rgba(125, 180, 255, 0.16);
    --shadow-card:   0 1px 2px rgba(0,0,0,0.30), 0 6px 18px rgba(0,0,0,0.30);
    --shadow-hover:  0 1px 2px rgba(0,0,0,0.30), 0 12px 32px rgba(0,0,0,0.45);
    --shadow-icon:   0 1px 2px rgba(0,0,0,0.40), 0 6px 16px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
    --shadow-icon-hover: 0 1px 2px rgba(0,0,0,0.40), 0 14px 30px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.16);
  }

  body {
    background:
      radial-gradient(ellipse 90% 50% at 50% 0%, rgba(125, 180, 255, 0.10) 0%, transparent 55%),
      radial-gradient(ellipse 60% 40% at 0% 40%, rgba(147, 112, 219, 0.08) 0%, transparent 55%),
      radial-gradient(ellipse 60% 40% at 100% 70%, rgba(255, 90, 120, 0.05) 0%, transparent 55%),
      #0a0e27;
    color: #f1f5f9;
  }

  /* Banner 组件与 course.html 完全一致（course 页无深色 banner）：
     深色模式下 banner 保持浅色外观，钉住被全局深色令牌影响的颜色值 */
  .banner-eyebrow, .banner-title, .banner-sub { color: #1d1d1f; }
  .banner-cta { background: #1d1d1f; }
  .banner-cta:hover { background: #0a84ff; }
  .carousel-nav { color: #1d1d1f; }
  .dot.active { background: #1d1d1f; }

  /* 玻璃控件 → 深色玻璃（rgba(20,24,60,·) 系） */
  .cat-filter-row {
    background: rgba(20, 24, 60, 0.55);
    box-shadow:
      inset 0 1px .5px rgba(255, 255, 255, 0.22),
      inset 0 0 0 1px rgba(255, 255, 255, 0.12),
      0 10px 30px rgba(0, 0, 0, 0.35);
  }
  .cat-filter-row.is-stuck {
    background: rgba(20, 24, 60, 0.72);
    box-shadow:
      inset 0 1px .5px rgba(255, 255, 255, 0.26),
      inset 0 0 0 1px rgba(255, 255, 255, 0.14),
      0 14px 36px rgba(0, 0, 0, 0.45);
  }
  .cat-filter-row.is-stuck::after {
    background: linear-gradient(to bottom, rgba(10, 14, 39, 0.6), transparent);
  }
  .cat-pill:hover { background: rgba(255, 255, 255, 0.08); }
  .cat-pill.active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      inset 0 0 0 1px rgba(255, 255, 255, 0.14),
      0 3px 10px rgba(0, 0, 0, 0.30);
  }

  .search-inline {
    background: rgba(20, 24, 60, 0.5);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 4px 14px rgba(0, 0, 0, 0.25);
  }
  .search-inline:hover { border-color: rgba(255, 255, 255, 0.28); }
  .search-inline:focus-within {
    background: rgba(20, 24, 60, 0.72);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 0 0 3px var(--accent-soft),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  .search-clear:hover { background: rgba(255, 255, 255, 0.1); }

  /* 分类标签提亮 */
  .app-cat-tag.cat-test  { color: #93b8ff; }
  .app-cat-tag.cat-train { color: #7fd9a4; }
  .app-cat-tag.cat-brain { color: #b9a0ff; }
  .app-cat-tag.cat-club  { color: #f0bd6d; }
  .app-cat-tag.cat-tool  { color: #f0bd6d; }
  .app-cat-tag.cat-info  { color: #d3a6ff; }
  .app-cat-tag.cat-comm  { color: #ff9fc6; }

  /* 杂项 */
  .empty-icon { background: rgba(255, 255, 255, 0.06); }
  .footer { border-top-color: rgba(255, 255, 255, 0.08); }
  .skeleton, .skeleton-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    background-size: 200% 100%;
  }
  .toast {
    background: rgba(20, 24, 60, 0.78);
    box-shadow:
      inset 0 1px .5px rgba(255, 255, 255, 0.24),
      inset 0 0 0 1px rgba(255, 255, 255, 0.14),
      0 12px 32px rgba(0, 0, 0, 0.5);
  }

  /* 兜底（深色版） */
  @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .cat-filter-row, .search-inline { background: rgba(26, 30, 64, 0.96); }
    .toast { background: rgba(20, 24, 60, 0.96); }
  }
  @media (prefers-reduced-transparency: reduce) {
    .cat-filter-row, .search-inline { background: rgba(26, 30, 64, 0.98); }
    .toast { background: rgba(20, 24, 60, 0.98); }
  }
}
