/* ============================================================
 * sylven-experiment.css  v1.26
 * 
 * 相对于 v1.22 的升级：
 * - Container Queries 替代部分 @media 断点（dashboard 自适应）
 * - :has() 选择器替代 JS 状态联动（直播中、音乐播放等）
 * - clamp() 流体间距 + 排版
 * - 精简动画（hero entrance 加速、hover 更克制）
 * - 清理无用样式
 *
 * Layer architecture: base < components < themes < utilities
 * ============================================================ */

@layer base, components, themes, utilities;

@layer base {
  :root {
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;
    --themeFadeDur: 220ms;

    --bg: #faf8f5;
    --bg-2: #f3f0ea;
    --surface: rgba(255, 255, 255, 0.70);
    --surface-solid: #ffffff;
    --text: #1c1c1e;
    --text-2: #4a4a4e;
    --muted: #6e6e73;
    --border: rgba(28, 28, 30, 0.08);
    --border-strong: rgba(28, 28, 30, 0.14);
    --accent: #6f7dff;
    --accent-text: #ffffff;
    --shadow: 0 1px 2px rgba(28, 28, 30, 0.04), 0 8px 24px rgba(28, 28, 30, 0.06);
    --radius: 24px;
    --radius-sm: 14px;
    --maxw: 1200px;
    --accent-rgb: 111, 125, 255;

    --loaderBg: #faf8f5;
    --loaderText: #4a4a4e;
    --loaderTrack: rgba(28, 28, 30, 0.08);
    --loaderBar: #6f7dff;
  }

  * { box-sizing: border-box; }
  html, body { overscroll-behavior: none; }
  /* 桌面端锁定根级滚动（横向 rail 布局），移动端放行让 body 自然滚动 */
  @media (min-width: 761px) {
    html, body { height: 100%; overflow: hidden; }
  }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
  }

  ::selection { background: rgba(var(--accent-rgb), 0.25); }

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
}

@layer themes {
  [data-theme="dark"] {
    --bg: #121318;
    --bg-2: #1a1b21;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-solid: #1c1d24;
    --text: #f5f2ed;
    --text-2: #b5b3ad;
    --muted: #7a7a7a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --accent: #ff6b9d;
    --accent-text: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.24);
    --accent-rgb: 255, 107, 157;

    --loaderBg: #121318;
    --loaderText: #b5b3ad;
    --loaderTrack: rgba(255, 255, 255, 0.08);
    --loaderBar: #ff6b9d;
  }
}

/* ── Loader ── */
.app-loader {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  background: var(--loaderBg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.app-loader.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loader-track {
  width: 200px; height: 3px; border-radius: 4px;
  background: var(--loaderTrack); overflow: hidden;
}
/* v1.28 — 不确定 shimmer：一段高光循环扫过轨道，不声称任何百分比 */
.loader-bar {
  height: 100%; width: 45%;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--loaderBar), transparent);
  animation: sylven-loader-shimmer 1.4s ease-in-out infinite;
  transition: width 0.35s ease;
}
.loader-bar.is-done {
  width: 100%;
  background: var(--loaderBar);
  animation: none;
}
@keyframes sylven-loader-shimmer {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
  .loader-bar {
    width: 60%;
    background: var(--loaderBar);
    animation: none;
    transition: none;
  }
  .loader-bar.is-done { width: 100%; }
}
.loader-text { font-size: 13px; color: var(--loaderText); letter-spacing: 0.04em; }

/* ── Background ── */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.bg-grad {
  position: absolute; inset: 0;
  filter: blur(20px);
  will-change: transform, filter;
  animation: bgShift 24s ease-in-out infinite alternate;
  transform: scale(1.3);
}
[data-theme="light"] .bg-grad {
  background: radial-gradient(circle at 30% 20%, rgba(111, 125, 255, 0.10), transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(255, 107, 157, 0.08), transparent 40%);
}
[data-theme="dark"] .bg-grad {
  background: radial-gradient(circle at 30% 20%, rgba(111, 125, 255, 0.12), transparent 35%),
              radial-gradient(circle at 80% 80%, rgba(255, 107, 157, 0.08), transparent 35%);
}
.bg-particles { position: absolute; inset: 0; opacity: 0.4; }
.bg-aurora {
  position: absolute; inset: 0;
  opacity: 0.12; pointer-events: none;
}
.aurora-orb {
  position: absolute; width: 40vmax; height: 40vmax; border-radius: 50%;
  filter: blur(30px); will-change: transform, opacity;
}
[data-theme="light"] .aurora-orb:nth-child(1) { background: #6f7dff; top: -20%; left: -10%; }
[data-theme="light"] .aurora-orb:nth-child(2) { background: #ff6b9d; bottom: -30%; right: -10%; }
[data-theme="light"] .aurora-orb:nth-child(3) { background: #6f7dff; top: 40%; right: -20%; opacity: 0.5; }
[data-theme="dark"] .aurora-orb:nth-child(1) { background: #6f7dff; top: -20%; left: -10%; }
[data-theme="dark"] .aurora-orb:nth-child(2) { background: #ff6b9d; bottom: -30%; right: -10%; }
[data-theme="dark"] .aurora-orb:nth-child(3) { background: #6f7dff; top: 40%; right: -20%; opacity: 0.5; }
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.04) 100%);
}
[data-theme="dark"] .bg-vignette {
  background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.06) 100%);
}
.bg-sigil {
  position: absolute; inset: 0;
  opacity: 0.02; background-repeat: no-repeat; background-position: center;
  background-size: min(60vmin, 300px);
}
[data-theme="light"] .bg-sigil { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='none' stroke='%236f7dff' stroke-width='2' d='M100 15L100 185M15 100L185 100M57 57L143 143M57 143L143 57'/%3E%3Ccircle cx='100' cy='100' r='85' fill='none' stroke='%236f7dff' stroke-width='1.5'/%3E%3C/svg%3E"); }
[data-theme="dark"] .bg-sigil { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='none' stroke='%23ff6b9d' stroke-width='2' d='M100 15L100 185M15 100L185 100M57 57L143 143M57 143L143 57'/%3E%3Ccircle cx='100' cy='100' r='85' fill='none' stroke='%23ff6b9d' stroke-width='1.5'/%3E%3C/svg%3E"); }
.bg-motes {
  position: absolute;
  width: calc(100% + 400px);
  height: calc(100% + 400px);
  top: -200px; left: -200px;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, var(--accent), transparent),
                    radial-gradient(1px 1px at 60% 70%, var(--muted), transparent);
  background-size: 200px 200px;
  background-repeat: repeat;
  opacity: 0.3;
  will-change: transform;
  animation: motes 20s linear infinite;
}
@keyframes motes {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-200px, -200px, 0); }
}
@keyframes bgShift {
  from { transform: translate(-2%, -2%) scale(1.02); }
  to { transform: translate(2%, 2%) scale(1); }
}

/* ── Hero entrance (v1.26: 更快更轻；hero-main/logo/chibi-glow 已改由 GSAP 接管，仅 .widget 仍用此曲线) ── */
@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ── Topbar ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px 24px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  gap: 24px;
  height: auto;
}
.brandmark {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--text); text-decoration: none;
  transition: color 0.2s;
}
.brandmark:hover { color: var(--accent); }
.navpills { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 620px) {
  .navpills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .navpills::-webkit-scrollbar { display: none; }
}
.pill {
  text-decoration: none; color: var(--text-2);
  font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 30px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  display: inline-flex; align-items: center;
  min-height: 40px;
}
.pill:hover, .pill.is-active { color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.pill:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill:focus:not(:focus-visible) { outline: none; }
.pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar-actions { display: flex; gap: 10px; margin-left: auto; }
.themebtn {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: 30px; padding: 6px 14px;
  cursor: pointer; font-family: inherit; font-size: 13px;
  color: var(--text-2); transition: border-color 0.2s ease, color 0.2s ease;
  min-height: 40px;
}
.themebtn:hover { border-color: var(--accent); color: var(--accent); }
.themebtn .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  transition: transform 0.3s ease;
}
[data-theme="dark"] .themebtn .dot { transform: scale(1.3); }
.iconbtn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: 30px; padding: 6px 14px;
  color: var(--text-2); cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 500; transition: border-color 0.2s ease, color 0.2s ease;
  min-height: 40px;
}
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Rail (Horizontal scroll) ── */
.rail {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  height: 100vh;
  min-height: 100%;
  padding-top: 64px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.panel {
  flex: 0 0 100%;
  height: calc(100vh - 64px);
  scroll-snap-align: start;
  overflow-y: auto;
  overflow-x: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
  /* Firefox 细滚动条 */
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
/* WebKit / Chromium 细滚动条，与品牌色统一 */
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  border: none;
  transition: background 0.25s ease;
}
.panel:hover::-webkit-scrollbar-thumb { background: var(--border-strong); }
.panel-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 30px) clamp(16px, 3vw, 24px) clamp(30px, 5vw, 40px);
  min-height: 100%;
}

/* ── Home Layout ── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.hero-main { padding-top: 20px; }
/* FOUC 预隐藏：首屏入场改由 GSAP 接管（见 sylven-gsap.js）。若 GSAP 未加载，html.gsap 不存在 → 元素正常显示，无闪烁 */
html.gsap .hero-main > * { opacity: 0; }
html.gsap .chibi-glow { opacity: 0; }
.chibi {
  position: relative; width: 128px; height: 128px; margin-bottom: 16px;
}
.chibi .avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chibi-face {
  width: 128px; height: 128px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  overflow: hidden; box-shadow: var(--shadow);
}
.chibi-face img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}
.chibi-glow {
  position: absolute; inset: -4px; border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.15), transparent 60%);
}
.logo {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.tagline { color: var(--text-2); font-size: clamp(15px, 2.2vw, 18px); margin: 0 0 8px; font-weight: 300; }
.notice-greeting { color: var(--accent); font-size: 14px; margin: 0 0 16px; font-weight: 400; min-height: 1.4em; }
.hero-actions { }
.cta--hero {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  padding: 12px 22px; border-radius: 30px;
  text-decoration: none; font-weight: 500; font-size: 15px;
  width: max-content; transition: transform 0.2s ease, opacity 0.2s ease;
  margin-bottom: 16px;
}
.cta--hero:hover { transform: translateY(-2px); opacity: 0.92; }
.cta-text { display: flex; flex-direction: column; }
.cta-primary { font-weight: 600; }
.cta-sub { font-size: 12px; opacity: 0.8; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.socials .icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.socials .icon:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.socials svg { width: 18px; height: 18px; }

/* ── Dashboard Bento Grid (v1.26: Container Queries) ── */
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(100px, auto);
  gap: 14px;
  container-type: inline-size;
  container-name: dashboard;
}
.widget {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
  animation: heroEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
/* v1.26: hero 最后一个元素 0.8s 结束，卡片从 0.45s 开始重叠进场，零间隙 */
.widget:nth-child(1) { animation-delay: 0.45s; }
.widget:nth-child(2) { animation-delay: 0.53s; }
.widget:nth-child(3) { animation-delay: 0.61s; }
.widget:nth-child(4) { animation-delay: 0.69s; }
.widget:nth-child(5) { animation-delay: 0.77s; }
.widget:nth-child(6) { animation-delay: 0.85s; }
.widget:nth-child(7) { animation-delay: 0.93s; }
.widget:nth-child(8) { animation-delay: 1.01s; }
.widget:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(28,28,30,0.08); }
@media (hover: none) {
  .widget:hover { transform: none; box-shadow: var(--shadow); }
}
[data-theme="dark"] .widget:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.widget-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
}
.widget-title { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.3; overflow-wrap: break-word; }
#voidPreview {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 3.9em;
  transition: opacity 0.4s ease;
}
.widget-sub { font-size: 13px; color: var(--text-2); }
.widget-icon { color: var(--accent); line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.widget-icon svg { width: 22px; height: 22px; }
.widget-action {
  margin-top: auto; align-self: flex-start;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--text); display: grid; place-items: center;
  cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; text-decoration: none;
  font-family: inherit; font-size: 16px;
}
.widget-action:hover { border-color: var(--accent); color: var(--accent); }
.widget-link { text-decoration: none; color: inherit; display: contents; }
.widget--schedule { grid-column: span 2; gap: 0; position: relative; }
.sched-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.sched-status {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
#scheduleCard.is-live .sched-status { color: #ff4d4d; }
.sched-detail {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.sched-week {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  position: relative;
  padding: 8px 0 2px;
}
.sched-week::before {
  content: '';
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 1px;
  background: var(--border);
  transform: translateY(-50%);
}
.sched-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 1;
}
.sched-day-letter {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;
}
.sched-day-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.35;
  transition: background 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.sched-day.is-rest .sched-day-dot {
  background: transparent;
  border: 1.5px solid var(--border);
  width: 6px;
  height: 6px;
  opacity: 1;
}
.sched-day.is-stream .sched-day-dot {
  background: var(--text);
  opacity: 0.35;
}
.sched-day.is-today .sched-day-dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  opacity: 1;
}
.sched-day.is-today .sched-day-letter {
  color: var(--accent);
  font-weight: 700;
}
.sched-day.is-today.is-rest .sched-day-dot {
  background: var(--surface-solid);
  border: 2px solid var(--accent);
  width: 12px;
  height: 12px;
}
/* v1.26: 直播中不再给卡片加外框（红/蓝框叠加）—— 框内已有红色文字 + 红点脉冲足够醒目 */
#scheduleCard.is-live .sched-day.is-today .sched-day-dot {
  background: #ff4d4d;
  animation: schedDotPulse 2s ease-in-out infinite;
}
#scheduleCard.is-live .sched-day.is-today .sched-day-letter {
  color: #ff4d4d;
}
@keyframes schedDotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) {
  #scheduleCard.is-live .sched-day.is-today .sched-day-dot {
    animation: none;
  }
  .sched-day-dot { transition: none; }
}
.widget--music { grid-column: span 2; flex-direction: row; align-items: center; }
.widget--music .widget-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.widget--music .widget-action { flex-shrink: 0; margin-left: auto; width: auto; height: 36px; border-radius: 30px; padding: 8px 14px; gap: 6px; display: flex; align-items: center; }
.music-progress { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.progress-bar {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  cursor: default;
  overflow: visible;
}
.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.1s linear;
}
.progress-thumb { display: none; }
.progress-time {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.widget--vod { grid-column: span 2; align-items: flex-start; }
.widget--followers { grid-column: span 1; justify-content: center; align-items: center; text-align: center; }
.widget--discord { grid-column: span 1; justify-content: center; }
.widget--chart { grid-column: span 4; }
.widget--void { grid-column: span 2; }
.widget--fanart {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
  min-height: 128px;
  padding: 16px 20px;
  gap: 16px;
}
.widget--fanart .widget-content { flex: 0 0 auto; min-width: 0; }
.widget--fanart .widget-title { font-size: 15px; line-height: 1.3; }
.widget--fanart .widget-sub { font-size: 12px; line-height: 1.3; margin-top: 2px; }
.widget--fanart .widget-action { flex-shrink: 0; margin-left: auto; align-self: center; }
.widget--fanart .widget-title,
.widget--fanart .widget-sub { transition: opacity 0.5s ease; }
/* GSAP 激活时由 Motion.fade 统一控制淡入淡出；关闭 CSS transition 避免与 GSAP 补间冲突导致文字闪变（图片无此 transition，故文字与图片动画不同步会扎眼） */
html.gsap .widget--fanart .widget-title,
html.gsap .widget--fanart .widget-sub { transition: none; }
.fanart-thumb {
  flex: 1 1 0;
  min-width: 0;
  min-height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.fanart-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s ease;
}
.fanart-info { flex: 0 0 28%; min-width: 0; max-width: 35%; text-align: right; align-self: center; }
.widget-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.widget-header > * { min-width: 0; }
.widget-header--switch { align-items: flex-start; }
.widget-header-main { flex: 1; min-width: 0; }

/* ── Stats switcher (Games / Growth) ── */
/* .widget--games 的列宽/行高由 inline style 接管（避免桌面 4 列布局过时） */
.stats-switch {
  display: flex; gap: 4px;
  background: var(--border);
  padding: 3px;
  border-radius: 8px;
  flex-shrink: 0;
}
.stats-switch-btn {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.stats-switch-btn:hover { color: var(--text); }
.stats-switch-btn.active {
  background: var(--surface-solid);
  color: var(--accent);
}
.stats-view { display: block; }

/* ── Games list ── */
.games-all { margin-top: 16px; }
.games-all-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; color: var(--text);
  margin: 0 2px 4px; letter-spacing: -0.01em;
}
.games-list {
  display: flex; flex-direction: column; gap: 4px; margin-top: 0;
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.games-sort-note {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.05em; text-transform: uppercase;
  margin: 0 2px 8px;
}

/* ── Stat cards (single accent, clean) ── */
.games-summary { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.games-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.games-stat-card {
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.games-stat-icon {
  width: 14px; height: 14px; color: var(--accent); opacity: 0.7;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 2px;
}
.games-stat-icon svg { width: 100%; height: 100%; display: block; }
.games-stat-value {
  font-size: 18px; font-weight: 650; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.games-stat-value.is-name { font-size: 14px; font-weight: 600; line-height: 1.2; word-break: break-word; }
.games-stat-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 500;
}

/* ── Recently played ── */
.games-recent {
  padding: 16px; border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.games-recent-header {
  margin-bottom: 8px;
}
.games-recent-title {
  font-size: 11px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.games-recent-list {
  display: flex; flex-direction: column; gap: 2px;
}
.games-recent-item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 4px; gap: 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.games-recent-item:hover { background: var(--surface-2, rgba(0,0,0,0.04)); }
.games-recent-name {
  font-size: 13px; color: var(--text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.games-recent-meta {
  font-size: 11px; color: var(--muted);
  display: inline-flex; align-items: baseline; gap: 4px;
  flex-shrink: 0;
}
.games-recent-hours { color: var(--text-2); font-weight: 500; }
.games-recent-sep { opacity: 0.5; }
.games-recent-ago { }

/* ── Game rows ── */
.game-row {
  display: flex; align-items: center; gap: 10px;
  border-radius: 6px; overflow: hidden;
  transition: background 0.15s ease;
  animation: gameRowEnter 0.35s ease both;
}
.game-cover {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 8px; overflow: hidden;
  background: var(--surface-2, rgba(0,0,0,0.05));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.game-cover-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.game-cover-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; animation: gameCoverIn 0.3s ease both;
}
@keyframes gameCoverIn { from { opacity: 0; } to { opacity: 1; } }
.game-stats {
  flex-shrink: 0; text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
}
.game-row:nth-child(2) { animation-delay: 0.025s; }
.game-row:nth-child(3) { animation-delay: 0.05s; }
.game-row:nth-child(4) { animation-delay: 0.075s; }
.game-row:nth-child(5) { animation-delay: 0.1s; }
.game-row:nth-child(n+6) { animation-delay: 0.12s; }

.game-row:hover { background: var(--surface-2, rgba(0,0,0,0.04)); }
.game-row-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  color: inherit; font: inherit;
  border-radius: 6px;
}
.game-row-toggle:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.game-row-toggle:focus:not(:focus-visible) { outline: none; }
.game-row-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.game-rank-pill {
  flex-shrink: 0; min-width: 30px;
  font-size: 11px; font-weight: 500; color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right; letter-spacing: 0.01em;
}
.game-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.game-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.005em;
}
.game-meta-line {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--muted);
}
.game-hours { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.game-meta-sep { opacity: 0.35; }
.game-streams { color: var(--muted); }
.game-expand-icon {
  flex-shrink: 0; width: 14px; height: 14px;
  color: var(--muted); opacity: 0.4;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.game-expand-icon svg { width: 100%; height: 100%; display: block; }
.game-row:hover .game-expand-icon { opacity: 0.7; }
.game-row--open .game-expand-icon { transform: rotate(180deg); opacity: 1; color: var(--accent); }

/* ── Expand detail ── */
.game-detail-wrap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.game-detail-wrap > .game-detail-inner {
  overflow: hidden; min-height: 0;
}
.game-row--open .game-detail-wrap { grid-template-rows: 1fr; }
/* 旧浏览器回退：不支持 grid-template-rows 过渡时用 max-height */
@supports not (grid-template-rows: 0fr) {
  .game-detail-wrap { display: block; max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
  .game-row--open .game-detail-wrap { max-height: 500px; }
}
.game-row--open .game-detail-inner {
  animation: gameDetailIn 0.35s 0.05s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.game-detail {
  padding: 0 12px 10px 52px;
  border-top: 1px solid transparent;
  transition: border-color 0.25s ease 0.05s;
}
.game-row--open .game-detail { border-top-color: var(--border); }
@keyframes gameDetailIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
@keyframes gameRowEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.game-detail-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding-top: 10px;
}
.game-detail-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 8px; border-radius: 6px;
  background: var(--surface-2, rgba(0,0,0,0.03));
}
.game-detail-icon {
  width: 12px; height: 12px; color: var(--accent); opacity: 0.5;
  display: inline-flex; align-items: center; justify-content: center;
}
.game-detail-icon svg { width: 100%; height: 100%; display: block; }
.game-detail-value {
  font-size: 13px; font-weight: 650; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.game-detail-label {
  font-size: 9px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em;
}
.game-detail-meta {
  margin-top: 6px; font-size: 10px; color: var(--muted);
  font-style: italic;
}

.games-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 16px auto 4px; padding: 9px 20px;
  border-radius: 999px; cursor: pointer;
  background: var(--surface-2, rgba(0,0,0,0.04));
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.games-more-btn:hover {
  background: var(--accent, #6f7dff); color: #fff;
  border-color: transparent; transform: translateY(-1px);
}
.games-more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.games-more-label { line-height: 1; }
.games-more-count { opacity: 0.55; font-variant-numeric: tabular-nums; line-height: 1; }
.games-more-chevron { width: 14px; height: 14px; transition: transform 0.2s ease; }
.games-more-btn:hover .games-more-chevron { transform: translateY(1px); }
.games-empty {
  padding: 24px 0; text-align: center; color: var(--muted);
  font-size: 13px; line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .game-row { animation: none; }
  .game-row--open .game-detail-inner { animation: none; }
  .game-detail-wrap { transition: none; }
  .bg-grad { animation: none; }
  .bg-motes { animation: none; }
  .shimmer-wrap { animation: none; }
  .shimmer-circ, .shimmer-bar, .shimmer-pill, .shimmer-card, .shimmer-icon { animation: none; }
  .widget { animation: none; }
  .widget:nth-child(n) { animation-delay: 0s; }
}

@media (max-width: 720px) {
  .games-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .game-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .game-detail { padding-left: 14px; }
}

/* ── Milestone Progress Card ── */
.chart-wrap { width: 100%; position: relative; overflow: hidden; padding: 4px 0; }
#followerChart { width: 100%; display: block; }

.milestone-progress { padding: 2px 0; }

/* 进度条 */
.milestone-bar-track {
  position: relative;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 10px;
}
.milestone-bar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%; width: 100%;
  background: var(--accent);
  border-radius: 11px;
  transform: scaleX(var(--milestone-pct, 0));
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  min-width: 4px;
}
.milestone-bar-pct {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

/* 当前→目标 数字行 */
.milestone-goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 0 2px;
}
.milestone-goal-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.milestone-goal-arrow {
  font-size: 13px;
  color: var(--accent);
  margin: 0 4px;
  opacity: 0.7;
}
.milestone-goal-target {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

/* 估算信息 */
.milestone-goal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  margin-bottom: 10px;
}
.milestone-goal-eta {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.milestone-goal-delta {
  font-size: 11px;
  color: var(--muted);
}

/* 历史里程碑 */
.milestone-history {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 2px 8px;
  background: var(--surface);
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 500;
}
.milestone-badge svg, .milestone-badge .check {
  color: var(--accent);
  font-size: 9px;
}

/* Tooltip */
.chart-tooltip {
  position: absolute; pointer-events: none; z-index: 10;
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--text);
  white-space: nowrap; opacity: 0; transition: opacity 0.15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translate(-50%, -100%);
}
.chart-tooltip[style*="display: block"] { opacity: 1; }
.chart-tip-date { font-size: 11px; color: var(--muted); }
.chart-tip-count { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Home info ── */
.home-info { grid-column: 1 / -1; }
.notice { margin-top: 24px; }
.notice-intro { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0 0 8px; }
.notice-atmosphere {
  font-family: var(--font-display); font-style: italic;
  color: var(--muted); font-size: 16px; margin: 0;
}

/* ── Shimmer ── */
.shimmer-wrap {
  display: flex; flex-direction: column; gap: 12px;
  padding: 40px 0;
  transition: opacity 0.3s ease;
}
.shimmer-wrap.fade-out { opacity: 0; pointer-events: none; }
.shimmer-circ, .shimmer-bar, .shimmer-pill, .shimmer-card, .shimmer-icon {
  background: var(--border); border-radius: 8px;
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--border) 25%, rgba(var(--accent-rgb), 0.06) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmerSlide 1.5s ease-in-out infinite;
}
@keyframes shimmerSlide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.shimmer-circ { width: 88px; height: 88px; border-radius: 50%; }
.shimmer-bar.wide { width: 80%; height: 24px; }
.shimmer-bar.medium { width: 60%; height: 20px; }
.shimmer-pill { width: 160px; height: 40px; border-radius: 30px; }
.shimmer-card.tall { width: 100%; height: 120px; border-radius: 14px; }
.shimmer-card.medium { width: 100%; height: 80px; border-radius: 14px; }
.shimmer-icons { display: flex; gap: 10px; }
.shimmer-icon { width: 38px; height: 38px; border-radius: 50%; }

/* ── Lorebox ── */
.lorebox-container { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.lorebox {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.lorebox:hover { box-shadow: var(--shadow); }
.lorebox-summary {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; cursor: pointer;
  font-weight: 600; font-size: 15px;
  user-select: none; outline: none;
}
.lorebox-summary:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.lorebox-summary:focus:not(:focus-visible) { box-shadow: none; }
.lorebox-summary:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.lore-chapter-num {
  font-family: var(--font-display);
  font-size: 20px; color: var(--accent);
  width: 32px; flex-shrink: 0;
}
.lorebox-body-wrapper {
  display: grid; grid-template-rows: 0fr;
}
.lorebox.is-open .lorebox-body-wrapper { grid-template-rows: 1fr; }
.lorebox-body-inner { overflow: hidden; }
/* 旧浏览器回退 */
@supports not (grid-template-rows: 0fr) {
  .lorebox-body-wrapper { display: block; max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
  .lorebox.is-open .lorebox-body-wrapper { max-height: 1000px; }
}
.lorebox-body { padding: 0 20px; }
.lorebox.is-open .lorebox-body { padding-bottom: 18px; }
.lorebox-body p { margin: 0 0 8px; color: var(--text-2); max-width: 70ch; line-height: 1.8; }
.lorebox-body p:last-child { margin-bottom: 0; }
.lorebox[data-chapter="scribe"] { border-left-color: rgba(111, 125, 255, 0.35); }
.lorebox[data-chapter="scythe"] { border-left-color: rgba(111, 125, 255, 0.75); }
.lorebox[data-chapter="fall"] { border-left-color: var(--muted); }
.lorebox[data-chapter="now"] { border-left-color: var(--text); }
[data-theme="dark"] .lorebox[data-chapter="scribe"] { border-left-color: rgba(122, 159, 212, 0.30); }
[data-theme="dark"] .lorebox[data-chapter="scythe"] { border-left-color: rgba(122, 159, 212, 0.70); }
[data-theme="dark"] .lorebox[data-chapter="fall"] { border-left-color: var(--muted); }
[data-theme="dark"] .lorebox[data-chapter="now"] { border-left-color: var(--text); }
.lorebox[data-chapter="scythe"] .lore-chapter-num { transform: rotate(1deg); opacity: 0.85; }
.lorebox[data-chapter="fall"] .lore-chapter-num { transform: rotate(-0.5deg); color: var(--muted); }
.lorebox[data-chapter="now"] .lore-chapter-num { font-size: 22px; transform: rotate(2deg); color: var(--text); opacity: 1; }

/* ── Tabs ── */
.tab-list {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 16px; border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  font-family: inherit; font-size: 14px; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.tab-btn:hover { color: var(--text); border-color: var(--border-strong); }
.tab-btn:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab-btn:focus:not(:focus-visible) { outline: none; }
.tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab-btn.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ── Card header ── */
.card-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px;
}
.card-title-serif {
  font-family: var(--font-display);
  font-size: 32px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600; margin: 0 0 8px; letter-spacing: -0.02em;
}
.lede { color: var(--text-2); max-width: 56ch; margin: 0; font-size: 15px; }

/* ── Toybox ── */
.void-input-row { display: flex; gap: 10px; margin-top: 12px; }
.void-input {
  flex: 1;
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 10px 14px; font-family: inherit; font-size: 14px;
  outline: none; resize: none;
}
.void-input:focus { border-color: var(--accent); }
.toy-btn {
  background: var(--text); color: var(--bg);
  border: none; border-radius: 12px;
  padding: 10px 18px; font-family: inherit; font-size: 14px;
  font-weight: 500; cursor: pointer; transition: opacity 0.2s ease;
  white-space: nowrap;
}
.toy-btn:hover { opacity: 0.9; }
.toy-btn:disabled { opacity: 0.4; cursor: default; }
.toy-btn.secondary { background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); }
.toy-desc { color: var(--text-2); font-size: 14px; margin: 0 0 8px; }
.toy-section { margin-top: 0; }
.void-error {
  color: #ff4d4d; font-size: 13px; min-height: 18px; margin-top: 6px;
  opacity: 0; transition: opacity 0.2s ease;
}
.void-error.is-visible { opacity: 1; }
.void-book {
  margin-top: 16px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.void-card-text { font-size: 15px; color: var(--text); min-height: 40px; white-space: pre-wrap; }
.void-card-time { font-size: 12px; color: var(--muted); margin-top: 6px; }
.void-card-time-abs { font-size: 11px; color: var(--muted); opacity: 0.7; }
.void-book-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.void-nav {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface-solid);
  color: var(--text-2); cursor: pointer; font-size: 16px;
  display: grid; place-items: center;
}
.void-nav:hover { color: var(--text); border-color: var(--text); }
.void-counter { font-size: 13px; color: var(--muted); }
.toy-oracle-display {
  min-height: 60px; padding: 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 12px;
  font-size: 18px; font-weight: 500; color: var(--text);
  display: grid; place-items: center;
}
.toy-result { margin-top: 12px; font-size: 15px; color: var(--text); word-break: break-all; }

/* ── Poll ── */
.poll-options { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.poll-option {
  padding: 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color 0.2s ease;
}
.poll-option:hover { border-color: var(--border-strong); }
.poll-option.is-readonly { cursor: default; pointer-events: none; }
.poll-option.is-mine { border-color: var(--accent); }
.poll-option-label { position: relative; z-index: 1; font-weight: 500; }
.poll-bar-wrap { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.poll-bar {
  height: 100%; background: var(--accent);
  opacity: 0.18; width: 100%;
  transform: scaleX(var(--poll-pct, 0));
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.poll-count {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--text-2); z-index: 1;
}
.poll-status { font-size: 13px; color: var(--muted); }

/* ── Void FLIP（翻页动画已改由 GSAP 接管，见 sylven-gsap.js Motion.voidFlip）── */

/* ── List ── */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li {
  padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 14px;
}
.list li .cmd {
  display: inline-block; background: var(--bg-2);
  padding: 2px 8px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 13px;
  color: var(--text); margin-right: 6px;
}
.list--compact { display: block; }
.list--compact li {
  padding: 0; background: none; border: none; border-radius: 0;
  line-height: 1.7; font-size: 14px; color: var(--text-2);
}
.list--compact li + li { margin-top: 4px; }
.list--compact li .cmd {
  display: inline-block; background: none; padding: 0;
  font-family: ui-monospace, monospace; font-size: 13px;
  font-weight: 600; color: var(--accent); margin-right: 6px; min-width: 8em;
}
.list-heading {
  list-style: none; margin-top: 14px !important; margin-bottom: 2px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.list-heading:first-child { margin-top: 0 !important; }

/* ── Credits ── */
.credit-section { margin-bottom: 16px; }
.credit-category {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px;
}
.credit-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.credit-label { color: var(--text-2); }
.credit-value { color: var(--text); font-weight: 500; }

/* ── Mini grid (Connect) ── */
.grid { display: grid; gap: 14px; }
.mini {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px;
}
.mini-title { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.cta.ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: 30px; padding: 8px 16px;
  color: var(--text); text-decoration: none; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease;
}
.cta.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Wishlist ── */
.wishlist-iframe-wrapper {
  position: relative; width: 100%; height: 800px;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-solid);
}
.wishlist-iframe-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ── Music playing ── */
.widget--music.is-playing { border-color: var(--accent); }

/* ── Footer ── */
.foot {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 20px 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}

/* ── Scroll to top ── */
.scroll-to-top-btn {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); right: calc(24px + env(safe-area-inset-right)); z-index: 50;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.scroll-to-top-btn.is-visible { opacity: 1; visibility: visible; }
.scroll-to-top-btn:hover { transform: translateY(-3px); }
.scroll-to-top-btn svg { width: 20px; height: 20px; }

/* ── Theme fade mask (fallback for browsers without View Transitions) ── */
.theme-fade-layer {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 9990;
  background: var(--bg); opacity: 1;
  pointer-events: none;
}
.theme-immediate * { transition: none !important; }

/* ── Chart axis lines ── */
.chart-axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-tip-date { font-size: 11px; color: var(--muted); }
.chart-tip-count { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 9999;
  background: var(--text); color: var(--bg);
  padding: 12px 24px; border-radius: 30px;
  font-size: 14px; font-weight: 500;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-4px); }

/* ── Sound effects（boop / +1 浮字已改由 GSAP 接管，见 sylven-gsap.js Motion.boop / Motion.plusOne）── */
.plus-one-float {
  position: fixed; pointer-events: none;
  font-size: 26px; font-weight: 700;
  color: var(--accent);
  white-space: nowrap; z-index: 10;
}

/* ── Muted ── */
.muted { color: var(--muted) !important; }

/* ── Responsive (v1.26: Container Queries for dashboard) ── */
/* 中等容器：2 列紧凑布局（>520px），适合 760-1100px 区间的平板/小桌面 */
@container dashboard (max-width: 700px) and (min-width: 521px) {
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .widget--music,
  .widget--schedule,
  .widget--vod,
  .widget--void,
  .widget--fanart { grid-column: span 2; }
  .widget--chart { grid-column: 1 / -1; }
  .widget--followers,
  .widget--discord { grid-column: span 1; }
}
/* 窄容器（含移动端 ≤760px）：单列垂直堆叠 — 避免 span 1/2 混用造成的"挤一团" */
@container dashboard (max-width: 520px) {
  .dashboard { grid-template-columns: 1fr; gap: 12px; }
  .widget { padding: 14px; grid-column: 1 / -1; }
}
/* v1.26: 直播中不再用 :has() 给 schedule 加外框 — 红字 + 红点已经足够醒目，框是多余装饰 */

@media (max-width: 980px) {
  .home-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .topbar { padding: 8px 16px; gap: 8px; }
  .navpills { display: none; }
  .rail {
    display: block; overflow: visible; height: auto;
    scroll-snap-type: none; scroll-behavior: auto;
    padding-top: 52px;
  }
  .panel {
    flex: none; height: auto; scroll-snap-align: none;
    overflow: visible;
  }
  .navpills { gap: 2px; }
  .pill { font-size: 13px; padding: 6px 12px; }
  /* hero 区紧凑化 */
  .hero-main { padding-top: 8px; }
  .chibi, .chibi-face { width: 96px; height: 96px; }
  .chibi-face img { width: 96px; height: 96px; }
  .logo { font-size: 40px; font-size: clamp(40px, 11vw, 56px); }
  .tagline { font-size: 15px; }
  .cta--hero { padding: 10px 18px; font-size: 14px; margin-bottom: 12px; }
  .socials { gap: 10px; }
  .socials .icon { width: 36px; height: 36px; }
  .socials svg { width: 16px; height: 16px; }
  .widget {
    padding: 16px;
    gap: 8px;
    min-height: 0;
  }
  .widget-title {
    font-size: 16px;
  }
  .widget-sub {
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .widget-action {
    width: 40px; height: 40px;
    min-width: 40px; min-height: 40px;
  }
  .widget-icon svg { width: 20px; height: 20px; }
  /* 移动端布局由 container query 接管（@container dashboard (max-width: 520px) 单列堆叠） */
  /* 这里只调对齐和细节，grid-column 一律交给容器查询 */
  .widget--followers,
  .widget--discord { justify-content: center; }
  .widget--schedule,
  .widget--vod { justify-content: flex-start; }
  .sched-status { font-size: 18px; }
  .sched-detail { font-size: 12px; }
  .sched-week { margin-top: 14px; }
  .sched-day-dot { width: 6px; height: 6px; }
  .sched-day.is-rest .sched-day-dot { width: 5px; height: 5px; }
  .sched-day.is-today .sched-day-dot { width: 10px; height: 10px; }
  .sched-day.is-today.is-rest .sched-day-dot { width: 10px; height: 10px; }
  .sched-day-letter { font-size: 8px; font-weight: 600; }
  .widget--chart { grid-column: 1 / -1; }
  .widget--music { flex-direction: column; align-items: stretch; gap: 10px; }
  .widget--music .widget-icon { display: none; }
  .widget--music .widget-content { order: 1; }
  .widget--music .widget-action { order: 2; margin-left: 0; align-self: flex-start; }
  .music-progress { margin-top: 8px; }
  .widget--fanart {
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
  }
  .fanart-info { flex: 1 1 0; min-width: 0; text-align: left; overflow: hidden; }
  .fanart-thumb { flex: 0 0 150px; min-width: 150px; max-width: 150px; }
  .widget--fanart .widget-title {
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .widget--fanart .widget-sub {
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  }
  .tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 16px;
  }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
  .wishlist-iframe-wrapper { height: 500px; }
  .void-input-row { flex-direction: column; }
  .void-input-row .void-input { width: 100%; }
  .void-input-row .toy-btn,
  .void-input-row .void-btn { width: 100%; justify-content: center; }
  /* 移动端触摸目标增大 */
  .game-row-toggle { padding: 12px 14px; }
  .poll-option { padding: 16px 14px; }
  .poll-count { right: 14px; }
  .lorebox-summary { padding: 14px 16px; min-height: 48px; }
}
@media (max-width: 620px) {
  .topbar { padding: 6px 12px; gap: 6px; }
  .brandmark { width: 28px; height: 28px; }
  .pill { font-size: 11px; padding: 4px 8px; }
  .panel-inner { padding: 12px 12px 30px; }
  .themebtn { padding: 4px 10px; font-size: 12px; }
  .iconbtn { padding: 4px 10px; font-size: 12px; }
  .themebtn .dot { width: 8px; height: 8px; }
  .navpills { gap: 2px; }
  .tab-list { gap: 6px; }
  .tab-btn { padding: 7px 12px; font-size: 13px; }
  .foot { flex-direction: column; gap: 6px; align-items: center; }
}

/* ── Mobile performance ── */
@media (max-width: 760px) {
  .bg-particles { display: none; }
  .bg-grad { animation: none; }
  .bg-motes { animation: none; }
  .aurora-orb { filter: blur(40px); }
  .scroll-to-top-btn { bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(16px + env(safe-area-inset-right)); }
}

/* ── Landscape phone (矮屏幕) ── */
@media (max-width: 760px) and (orientation: landscape) and (max-height: 480px) {
  .topbar { padding: 4px 16px; padding-top: max(4px, env(safe-area-inset-top)); }
  .rail { padding-top: 44px; }
  .panel-inner { padding: 10px 16px 30px; }
  .scroll-to-top-btn { bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* ── 超窄屏 (Galaxy Fold 外屏 / iPhone SE1) ── */
@media (max-width: 360px) {
  .topbar { padding: 4px 8px; gap: 4px; }
  .brandmark { width: 24px; height: 24px; }
  .brandmark svg { width: 16px; height: 16px; }
  .pill { font-size: 10px; padding: 3px 6px; }
  /* 超窄屏 themebtn 只保留 dot 作为图标，保证触摸目标 */
  .themebtn .label { display: none; }
  .themebtn { padding: 6px 10px; min-height: 36px; }
  .themebtn .dot { width: 10px; height: 10px; }
  .iconbtn { padding: 6px 8px; min-height: 36px; }
  .lang-btn #langLabel { display: none; }
  .panel-inner { padding: 10px 10px 24px; }
  .logo { font-size: 36px; font-size: clamp(36px, 12vw, 48px); }
  .chibi, .chibi-face { width: 96px; height: 96px; }
  .chibi-face img { width: 96px; height: 96px; }
}

/* ── 4K+ large screens ── */
@media (min-width: 1800px) {
  .panel-inner { padding-top: 50px; }
  .home-layout { gap: 60px; }
}

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 52px;
}
.lang-btn svg {
  flex-shrink: 0;
}
#langLabel {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.lang-menu {
  display: block;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 200;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 110px;
}
.lang-menu[hidden] {
  display: none;
}
.lang-option {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.lang-option:hover {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg-grad { animation: none; }
}

/* ── 主题切换：圆形揭幕过场（从点击点扩散）── */
/* 仅用户点击切换时（html[data-vt-circle]）启用；初始化/程序化切换走默认淡入 */
:root[data-vt-circle]::view-transition-image-pair(root) {
  animation: none;
}
:root[data-vt-circle]::view-transition-old(root) {
  animation: none;
}
:root[data-vt-circle]::view-transition-new(root) {
  animation: sylven-theme-reveal 1s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sylven-theme-reveal {
  from { clip-path: circle(0px at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to   { clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 50%)); }
}