/* ============================================================
   MiniZone Design System — Home (Layer 5)
   发现页（首页）：大标题头部 / Hero 特写卡 / 快捷入口 / 热门话题 / 讨论流
   节奏参考 App Store「Today」：内容主体，控制层玻璃，大留白。
   ============================================================ */


/* ===== MiniTopBar（大标题头部，随内容滚动） ===== */
.home-header { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px 20px; }
.home-header-brand { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.home-logo {
  width: 58px; height: 50px; border-radius: 0; object-fit: contain;
  background: transparent; flex: 0 0 auto;
}
/* 两种顶栏的品牌资源共用尺寸与透明轮廓；深色显示浅色版本，不切换布局或裁切。 */
html[data-theme='dark'] :is(.home-header .home-logo, .mini-topbar .mt-logo, .mini-topbar .mt-wordmark) {
  filter: brightness(0) invert(1);
}
.home-header-copy { min-width: 0; }
.home-campus {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: 12.5px; font-weight: var(--fw-semibold);
  margin-bottom: 5px;
}
.home-campus .campus-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(47, 191, 154, .14); }
.home-title {
  font-size: var(--fs-large-title); line-height: 1;
  font-weight: var(--fw-black); letter-spacing: var(--ls-tighter);
  color: var(--text-primary);
}
.home-header-actions { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
/* MiniSearchBar：圆形玻璃搜索钮 */
.search-orb {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-primary);
  background: var(--glass-float-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-float-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: transform var(--dur-normal) var(--ease-spring);
}
.search-orb:active { transform: scale(.86); }

/* ===== Hero 特写卡（内容优先：真实置顶内容，非玻璃） ===== */
.hero {
  position: relative;
  min-height: 196px;
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: 24px 22px 20px;
  color: #fff;
  display: flex; flex-direction: column;
  background: linear-gradient(150deg, #1c3fae 0%, #2b63e4 46%, #4d6ff0 72%, #6a55e0 100%);
  box-shadow: 0 20px 44px rgba(30, 70, 190, .26);
  margin-bottom: 2px;
  transition: transform var(--dur-fast) var(--ease);
}
.hero:active { transform: scale(.985); }
.hero::before {
  content: "";
  position: absolute; width: 220px; height: 220px;
  right: -70px; bottom: -110px;
  background: radial-gradient(circle, rgba(82, 214, 239, .32), transparent 68%);
  border-radius: 50%;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 30%);
  pointer-events: none;
}
.hero-kicker {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: .05em;
}
.hero-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7df0d3; box-shadow: 0 0 8px rgba(125, 240, 211, .8); }
.hero h1 {
  position: relative; z-index: 1;
  margin: 14px 0 8px;
  font-size: 23px; line-height: 1.28; letter-spacing: -.02em; font-weight: var(--fw-black);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero p {
  position: relative; z-index: 1;
  margin: 0; font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, .78);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-foot {
  position: relative; z-index: 1;
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: var(--fw-semibold); color: rgba(255, 255, 255, .68);
}
.hero-foot .hf-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .5); }

/* ===== 公告轮播（发现页 Hero 区，横滑多色卡片） ===== */
.announce-carousel {
  position: relative;
  margin-bottom: 2px;
}
.ac-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-xl);
}
.ac-track::-webkit-scrollbar { display: none; }
.ac-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  min-height: 180px;
  border-radius: var(--r-xl);
  padding: 22px 22px 18px;
  color: #fff;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}
.ac-card:active { transform: scale(.98); }
.ac-card[role='button']:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.announce-update-detail { white-space: pre-line; font-size: var(--fs-body); line-height: 1.75; color: var(--text-primary); }
.ac-card::before {
  content: "";
  position: absolute; width: 180px; height: 180px;
  right: -50px; bottom: -90px;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}
.ac-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 30%);
  pointer-events: none;
}
/* 5 种配色 */
.ac-color-blue   { background: linear-gradient(150deg, #1c3fae 0%, #2b63e4 46%, #4d6ff0 72%, #6a55e0 100%); box-shadow: 0 16px 36px rgba(30, 70, 190, .24); }
.ac-color-purple { background: linear-gradient(150deg, #5b21b6 0%, #7c3aed 46%, #8b5cf6 72%, #a78bfa 100%); box-shadow: 0 16px 36px rgba(109, 40, 217, .24); }
.ac-color-orange { background: linear-gradient(150deg, #9a3412 0%, #c2410c 46%, #ea580c 72%, #f97316 100%); box-shadow: 0 16px 36px rgba(194, 65, 12, .24); }
.ac-color-green  { background: linear-gradient(150deg, #065f46 0%, #047857 46%, #10b981 72%, #34d399 100%); box-shadow: 0 16px 36px rgba(6, 95, 70, .24); }
.ac-color-pink   { background: linear-gradient(150deg, #9d174d 0%, #be185d 46%, #db2777 72%, #ec4899 100%); box-shadow: 0 16px 36px rgba(190, 24, 93, .24); }
.ac-placeholder { background: linear-gradient(150deg, #475569 0%, #64748b 100%); }

.ac-tag {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: .04em;
}
.ac-title {
  position: relative; z-index: 1;
  margin: 12px 0 6px;
  font-size: 20px; line-height: 1.3; letter-spacing: -.01em; font-weight: var(--fw-black);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-content {
  position: relative; z-index: 1;
  margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, .8);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-foot {
  position: relative; z-index: 1;
  margin-top: auto; padding-top: 12px;
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: var(--fw-semibold); color: rgba(255, 255, 255, .7);
}
.ac-foot .ac-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.ac-foot svg { width: 12px; height: 12px; vertical-align: -1px; }

/* 圆点指示器 */
.ac-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 10px;
  min-height: 6px;
}
.ac-dot-item {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border, #e2e8f0);
  transition: all var(--dur-fast) ease;
  cursor: pointer;
}
.ac-dot-item.active {
  width: 18px; border-radius: 3px;
  background: var(--accent, #3b82f6);
}
[data-theme="dark"] .ac-dot-item { background: rgba(255, 255, 255, .18); }
[data-theme="dark"] .ac-dot-item.active { background: #60a5fa; }

/* ===== 快捷入口：横滑卡组 ===== */
.quick-row {
  display: flex; gap: 10px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--page-h));
  padding: 4px var(--page-h) 6px;
  scroll-snap-type: x proximity;
  /* 吸附基准内缩到留白处：初始/回切时首卡停在 20px，不被吸到贴边 */
  scroll-padding-inline: var(--page-h);
}
.quick-row::-webkit-scrollbar { display: none; }
.quick {
  scroll-snap-align: start;
  min-width: 128px; height: 104px;
  border: 0; border-radius: var(--r-lg);
  padding: 14px;
  text-align: left;
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}
.quick:active { transform: scale(.94); box-shadow: var(--shadow-soft); }
.quick-icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-deep);
}
.quick.tint-mint .quick-icon { background: rgba(47, 191, 154, .12); color: #1d9a78; }
.quick.tint-peach .quick-icon { background: rgba(255, 156, 120, .14); color: #e07843; }
.quick strong { display: block; font-size: 13.5px; font-weight: var(--fw-semibold); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 热门话题：真实数据 pills ===== */
.hot-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
  font-size: 12.5px; font-weight: var(--fw-semibold);
  max-width: 100%;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast);
}
.hot-chip:active { transform: scale(.93); background: var(--bg-card-soft); }
.hot-chip .hot-rank {
  font-size: 10.5px; font-weight: var(--fw-black); font-style: normal;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
.hot-chip .hot-rank.top { color: var(--danger); }
.hot-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 分段控制（推荐 / 最新） ===== */
.seg {
  display: flex; align-items: center; gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(24, 32, 48, .05);
}
html[data-theme='dark'] .seg { background: rgba(200, 212, 235, .08); }
.seg button {
  position: relative;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  transition: color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.seg button.active {
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(18, 26, 40, .1), 0 0 0 .5px rgba(18, 26, 40, .03);
}

