/* ===========================================================
   Home page
   =========================================================== */

/* Top tab strip — 真实站 #square-nav: 60px 高, 居中, 项间距 60px, 字号 18px
   静止时紧贴 hero 下方(透明白底), 滚到自身位置时随 sticky 自然吸附, 转为毛玻璃
   (bg-white/40 + blur 6px + 1px #F3F4F6, 由 下滑.png 拟合得出) */
.square-nav {
  position: sticky; top: 0; z-index: 20;
  height: 60px; width: 100%; background: var(--c-panel);
  border-bottom: 1px solid transparent;
  transition: background-color .22s ease, border-color .22s ease;
}
/* 吸顶态：整条 60px 变为毛玻璃吸顶导航的底，位于 header 内容层(z:1000)之下，
   因此 LOGO / 右簇 / 栏目标签都绘制在毛玻璃之上。
   仍保持 sticky（不切 fixed）—— 元素留在文档流里，内容不会产生 60px 跳动。 */
.square-nav.is-stuck {
  background: rgba(255, 255, 255, .4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom-color: #F3F4F6;
}
.square-nav__warp {
  height: 100%; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.square-tabs { display: flex; align-items: center; height: 100%; gap: 60px; }
.sq-tab {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 100%; font-size: 18px; color: var(--color-text-strong);
  border-bottom: 2px solid transparent; text-decoration: none;
  transition: color .15s ease;
}
.sq-tab:hover { color: var(--color-primary); }
.sq-tab.is-active { color: var(--color-primary); font-weight: var(--fw-semibold); border-bottom-color: var(--color-primary); }
.sq-tab--laurel { gap: 0; }
.sq-tab--aigc { width: 56px; }
.laurel-svg { width: 9px; height: 24px; fill: #9CA3AF; flex: none; }
.laurel-svg--l { margin-right: 4px; }
.laurel-svg--r { margin-left: 4px; transform: scaleX(-1); }
.sq-tab.is-active .laurel-svg { fill: var(--color-primary); }

/* Hero banner carousel — full-bleed, 1920x496 on the live site */
.hero { position: relative; width: 100%; aspect-ratio: 1920 / 496; min-height: 320px; max-height: 620px; overflow: hidden; background: #111; }
.hero-track { display: flex; height: 100%; transition: transform .5s ease; }
.hero-slide { min-width: 100%; height: 100%; position: relative; display: block; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0; color: #fff;
  padding: 90px 80px 44px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.62));
}
.hero-cap .cap-cat { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 10px; letter-spacing: .5px; }
.hero-cap h2 { font-size: clamp(22px, 2.1vw, 40px); font-weight: 700; line-height: 1.25; margin-bottom: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.hero-cap .cap-author { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,.92); }
.hero-cap .cap-author img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.25); }
.hero-cap .cap-author .vip-tag { font-size: 10px; }
/* pagination dots — centered near bottom */
.hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; z-index: 3; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.45); padding: 0; border: none; cursor: pointer; transition: all .25s; }
.hero-dot.on { background: var(--c-panel); width: 26px; border-radius: 4px; }

/* feed loading pill (infinite scroll indicator) */
.feed-loading {
  margin: 30px auto 8px; width: 460px; max-width: 90%; height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--color-surface); border-radius: var(--radius-lg); color: #9aa0a6; font-size: 13px;
}
.feed-loading .spin {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d9dce0; border-top-color: #9aa0a6;
  animation: xpcSpin 1s linear infinite;
}
@keyframes xpcSpin { to { transform: rotate(360deg); } }

/* floating right toolbar (back-to-top / share / app / service) */
.float-bar {
  position: fixed; right: 20px; bottom: 120px; z-index: var(--z-dropdown, 90);
  display: flex; flex-direction: column; gap: 10px;
}
.float-bar button, .float-bar a {
  width: 40px; height: 40px; border-radius: 50%; background: var(--c-panel); color: #555;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.1); border: none; font-size: 16px; transition: all .15s;
}
.float-bar button:hover, .float-bar a:hover { color: var(--color-primary); transform: translateY(-2px); }
.float-bar .fb-hot { border-radius: 10px; background: var(--color-primary); color: #fff; }
.float-bar .fb-hot:hover { color: #fff; background: #d63e2f; }

/* (legacy sections kept for other pages that may reference them) */
.section-head { margin: 36px 0 18px; }

/* Start creating CTA */
.start-cta { margin: 40px 0 8px; border-radius: var(--radius-xl); background: linear-gradient(120deg,#2b2b35,#3a2b2b); color: #fff; padding: 40px; text-align: center; }
.start-cta h3 { font-size: var(--fs-2xl); margin-bottom: 8px; }
.start-cta p { opacity: .8; margin-bottom: 22px; }
.start-cta__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* VIP promo */
.vip-promo { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0 8px; border-radius: var(--radius-xl); padding: 28px 34px; background: linear-gradient(120deg,#b8291f,#e74b3b); color: #fff; flex-wrap: wrap; }
.vip-promo__text h3 { font-size: var(--fs-xl); margin: 8px 0 6px; }
.vip-promo__text p { opacity: .9; font-size: var(--fs-sm); }

/* ---- Bookmark / Activity / Note / Article card extras ---- */
.count-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.status-badge { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.status-badge.live { background: var(--color-primary); }

.activity-card { display: block; }
.activity-card .a-body { padding: 12px 2px 0; }
.activity-card .a-title { font-size: var(--fs-md); font-weight: var(--fw-medium); }
.activity-card .a-desc { font-size: var(--fs-sm); color: var(--color-text-muted); margin-top: 6px; line-height: 1.5; }
.activity-card .a-meta { font-size: var(--fs-xs); color: var(--color-text-light); margin-top: 10px; }

.note-card { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); transition: box-shadow .15s, border-color .15s; }
.note-card:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.note-card .n-cover { width: 130px; height: 84px; border-radius: var(--radius-md); flex: none; overflow: hidden; position: relative; }
.note-card .n-cover img { width: 100%; height: 100%; object-fit: cover; }
.note-card .n-body { flex: 1; min-width: 0; }
.note-card .n-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.note-card .n-sum { font-size: var(--fs-sm); color: var(--color-text-muted); margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-card .n-meta { font-size: var(--fs-xs); color: var(--color-text-light); margin-top: 10px; }

.article-card { display: flex; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--color-border); }
.article-card .a-cover { width: 150px; height: 96px; border-radius: var(--radius-md); flex: none; overflow: hidden; position: relative; }
.article-card .a-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card .a-info { flex: 1; min-width: 0; }
.article-card .a-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: 1.4; }
.article-card .a-sub { font-size: var(--fs-sm); color: var(--color-text-muted); margin-top: 10px; }

@media (max-width: 640px) {
  .hero { aspect-ratio: 16 / 9; }
  .note-card { flex-direction: column; }
  .note-card .n-cover { width: 100%; height: 160px; }
  .article-card .a-cover { width: 110px; height: 72px; }
}

/* ---------- 首页信息流：作者模块与作品模块的区隔 ----------
   仅作用于首页（body.page-home），发现页等其它列表页不受影响。 ---------- */
/* 作者模块上下留白：与上下方的作品网格拉开距离，避免两块内容糊在一起 */
.page-home .creator-strip { margin: 44px 0 52px; }
/* 下拉加载是逐个 .work-grid 追加的，而行间距只在单个网格内部生效，
   翻页接缝处间距为 0，反而比行距还窄 —— 这里补成与行距一致 */
.page-home #feed > .work-grid + .work-grid { margin-top: 26px; }
@media (max-width: 768px) {
  .page-home #feed > .work-grid + .work-grid { margin-top: 18px; }
}

/* ---------- 内页横幅 Banner（后台 /admin/r/page_blocks 配置） ----------
   与首页 .hero 同构：单图直接铺满，多条轮播；只是高度更矮，适合内页顶部。 */
.banner-inner {
  position: relative; width: 100%; max-width: var(--page-max, 1240px);
  margin: 20px auto 0; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 1240 / 300; min-height: 160px; max-height: 360px; background: var(--color-surface-2);
}
.banner-track { display: flex; height: 100%; transition: transform .5s ease; }
.banner-slide { min-width: 100%; height: 100%; position: relative; display: block; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-cap {
  position: absolute; left: 0; right: 0; bottom: 0; color: #fff;
  padding: 60px 44px 28px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
}
.banner-cap .cap-cat { font-size: 12px; color: rgba(255,255,255,.78); margin-bottom: 8px; }
.banner-cap h2 { font-size: clamp(18px, 1.6vw, 30px); font-weight: 700; line-height: 1.25; margin-bottom: 10px; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.banner-cta {
  display: inline-block; font-size: 12px; padding: 5px 14px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32);
}
/* 单图横幅不需要圆点，也不做位移 */
.banner-inner.is-single .banner-track,
.hero.is-single .hero-track { transition: none; }
@media (max-width: 768px) {
  .banner-inner { margin-top: 12px; aspect-ratio: 16 / 7; max-height: 220px; }
  .banner-cap { padding: 28px 20px 16px; }
}
