/* ==========================================================================
   ALPHA GAME v7.0.0 · CLAUDE.DEV RETRO-MODERN PIXEL TECH DESIGN SYSTEM
   Standard: Benchmark claude.dev (Anthropic Claude Code Blog/Terminal) + Cursor
   Palette: Warm Obsidian Charcoal (#121211, #181816, #20201d) & Ivory White (#faf9f5)
   Aesthetic: Subtle Pixel Art Accents, Crisp-Edges Pixelgrams, Tactile Animations
   Updated: 2026-10-10 - v7.0 production ready with error handling and enhanced health monitoring
   ========================================================================== */

/* 字体由各页 <head> 的 preconnect + link 加载，禁止在此使用 @import：
   CSS @import 会形成 HTML → CSS → 字体 CSS → 字体文件 的四级阻塞瀑布。 */

:root {
  /* Typography - Old Money & Quiet Luxury Serif System */
  --font-old-money: 'Cinzel', 'Playfair Display', 'Noto Serif SC', serif;
  --font-serif-luxury: 'Noto Serif SC', 'Playfair Display', 'Lora', 'Songti SC', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-serif: 'Noto Serif SC', 'Playfair Display', 'Lora', 'Songti SC', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-pixel: 'Press Start 2P', monospace;
  --font-pixel-clean: 'Silkscreen', monospace;

  /* Surfaces - claude.dev Warm Obsidian Charcoal Scale */
  --bg-canvas: #141413;
  --bg-rail: #10100f;
  --bg-sidebar: #181816;
  --bg-surface: #1d1c1a;
  --bg-surface-elevated: #242320;
  --bg-surface-hover: #2b2a26;
  --bg-surface-active: #34332e;

  /* Subtle Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.25);

  /* Typography Colors - claude.dev Ivory & Warm Slate */
  --text-primary: #faf9f5;
  --text-secondary: #b4b2a9;
  --text-muted: #7c7a72;
  --text-subtle: #55534c;

  /* Accents - High-contrast Monochrome Black & White */
  --accent-white: #ffffff;
  --accent-emerald: #ffffff;
  --accent-amber: #ffffff;
  --accent-terracotta: #ffffff;
  --accent-purple: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg-canvas);
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.045) 0%, transparent 55%);
  background-size: 100% 100%;
  background-attachment: fixed;
  color: var(--text-primary);
  position: relative;
}

/* 微胶片沉浸噪点颗粒（消除塑料数码感，呈现老钱雅致质感） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  z-index: 9999;
  opacity: 0.55;
}

.font-old-money {
  font-family: var(--font-old-money) !important;
  letter-spacing: 0.07em;
}

.font-serif-luxury {
  font-family: var(--font-serif-luxury) !important;
}

.brand-wordmark-inline {
  display: inline-block;
  height: 1.25rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 6px rgba(255, 255, 255, 0.25));
  transition: all 0.25s ease;
  vertical-align: middle;
}

.brand-wordmark-stacked {
  display: inline-block;
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.3));
  transition: all 0.25s ease;
}

.font-mono {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #282824;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a34;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   1. CLAUDE.DEV KEYBOARD NAVIGATION & RETRO PIXEL ELEMENTS
   ========================================================================== */

.nav-key-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  padding: 4px 9px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.nav-key-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-key-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 2px solid var(--accent-emerald);
}

.nav-key-item .k {
  color: var(--accent-emerald);
  font-size: 10px;
  opacity: 0.9;
  letter-spacing: -0.5px;
}

/* 2. Pixel Mascot & Sprites (shape-rendering: crispEdges) */
.pixel-sprite {
  shape-rendering: crispEdges;
}

.pixel-mascot {
  shape-rendering: crispEdges;
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.15));
  animation: pixelFloat 3.6s ease-in-out infinite;
  display: inline-block;
}

@keyframes pixelFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.pixel-glint {
  animation: visorGlint 3.8s ease-in-out infinite;
}

@keyframes visorGlint {
  0%, 88%, 100% {
    opacity: 0.3;
  }
  92% {
    opacity: 1;
    filter: drop-shadow(0 0 4px #ffffff);
  }
  96% {
    opacity: 0.5;
  }
}

/* 3. Pixel Corner Badges & Reticles */
.pixel-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.2px;
}

.pixel-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-secondary);
  background: #1e1e1b;
  border: 1px solid rgba(255, 255, 255, 0.06);
}



/* Pixel Box Reticle */
.pixel-box {
  position: relative;
}

.pixel-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 4px;
  height: 4px;
  background: var(--accent-emerald);
}

.pixel-box::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 4px;
  height: 4px;
  background: var(--accent-emerald);
}

/* ==========================================================================
   PIXEL LOGO UI SYSTEM (Native Vector & 8-Bit Typography, No Blurry JPEGs)
   ========================================================================== */
.font-pixel-arcade {
  font-family: var(--font-pixel), monospace;
}

.font-pixel-clean {
  font-family: var(--font-pixel-clean), monospace;
}

.pixel-logo-emblem {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  image-rendering: pixelated;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.22),
    inset -1px -1px 0 rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  flex-shrink: 0;
}

.pixel-logo-emblem::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.35)
  );
  background-size: 100% 4px;
  opacity: 0.35;
  border-radius: inherit;
  z-index: 1;
}

.pixel-logo-emblem svg {
  position: relative;
  z-index: 2;
  shape-rendering: crispEdges;
}

.pixel-logo-emblem img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-logo-badge {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-logo-badge:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
}

.agent-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pixel-logo-emblem:hover,
.group:hover .pixel-logo-emblem {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset -1px -1px 0 rgba(0, 0, 0, 0.9),
    0 4px 14px rgba(204, 120, 92, 0.28);
}

.pixel-brand-title {
  font-family: var(--font-pixel), monospace;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 1.4px;
  color: #faf9f5;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.group:hover .pixel-brand-title {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 18px rgba(204, 120, 92, 0.5);
}

.pixel-tag-pill {
  font-family: var(--font-pixel), monospace;
  font-size: 7.5px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #a1a1aa;
  letter-spacing: 0.6px;
}

/* ==========================================================================
   2. SURFACES, CARDS & TACTILE ANIMATIONS
   ========================================================================= */

.card-charcoal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.card-charcoal:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6);
}

/* Tactile Primary Button */
.btn-primary {
  background: var(--accent-white);
  color: #121211;
  font-weight: 500;
  font-size: 12px;
  padding: 7px 15px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-primary:hover {
  background: #eae7df;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
}

.btn-secondary {
  background: #1a1a17;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 12px;
  padding: 7px 15px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(1.5px) scale(0.985);
}

/* Universal Tactile Mechanical Press State */
button:active, 
.btn-primary:active, 
.btn-secondary:active, 
.home-demo-pill:active, 
.nav-key-item:active, 
.palette-cat-pill:active, 
.palette-course-item:active {
  transform: translateY(1.5px) scale(0.985) !important;
}

/* Badges */
.badge-emerald,
.badge-mono {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Topbar Context Button */
.topbar-book-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-book-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
}

/* Hint Grid & Cards */
.hint-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .hint-grid {
    grid-template-columns: 1fr;
  }
}

.hint-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 11px 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.hint-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.5);
}

/* Chat Stream Messages */
.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.msg-row {
  display: flex;
  width: 100%;
}

.msg-row.user {
  justify-content: flex-end;
}

.msg-row.bot {
  justify-content: flex-start;
}

.user-bubble {
  max-width: 82%;
  background: #1f1f1b;
  color: #ffffff;
  padding: 11px 15px;
  border-radius: 13px;
  border-bottom-right-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.bot-card {
  max-width: 92%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(18, 18, 22, 0.88) 100%) !important;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  border-bottom-left-radius: 3px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: cardFadeUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.bot-card:hover {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.tactical-option-card {
  background: #141412;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.tactical-option-card:hover {
  background: #1a1a17;
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateX(1px);
}

/* Session History Items */
.hist-item {
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  transition: all 0.14s ease;
  font-size: 12px;
}

.hist-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.hist-item.active {
  background: #1e1e1b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

/* Knowledge Panel Rows */
.asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #141412;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.asset-row:hover {
  background: #1b1b18;
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateX(2px);
}

.chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  background: #141412;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chapter-row:hover {
  background: #1b1b18;
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   3. COMMAND PALETTE & MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-box {
  background-color: #0c0c10 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.palette-box {
  background: #151513;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .palette-box {
  transform: scale(1);
}

.palette-cat-pill {
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}

.palette-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.palette-cat-pill.active {
  background: #faf9f5;
  color: #121211;
  font-weight: 600;
  border-color: #faf9f5;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.palette-item:hover, .palette-item.focused {
  background: #1d1d19;
  border-color: rgba(255, 255, 255, 0.09);
}

.palette-item.is-mounted {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.2);
}

.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #2b2b26;
  border-radius: 999px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1a1a17;
  color: #faf9f5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Homepage Interactive Demo Pills */
.home-demo-pill {
  padding: 5px 12px;
  border-radius: 6px;
  background: #171714;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d1cfc7;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.14s ease;
}

.home-demo-pill:hover {
  background: #22221e;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.home-demo-pill:active {
  transform: translateY(1px);
}

/* Responsive Knowledge Panel Behavior */
@media (max-width: 1024px) {
  #knowledgePanel {
    position: fixed;
    right: 0;
    top: 45px;
    bottom: 0;
    z-index: 30;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  }
}

#knowledgePanel.panel-collapsed {
  display: none !important;
}

/* ==========================================================================
   4. CONSULTATION MODAL & CARDS (屿 ISLAND BENCHMARK)
   ========================================================================== */
.consult-card {
  background: #151513;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.consult-card:hover {
  background: #191916;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.qr-frame {
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.14s ease;
  cursor: pointer;
}
.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
.sidebar-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 500;
}

/* ==========================================================================
   5. SERIF TYPOGRAPHY & MULTI-PANE COCKPIT (CLAUDE DESIGN & KIRO/WEKNORA BENCHMARK)
   ========================================================================== */
.font-serif {
  font-family: var(--font-serif) !important;
}

.editorial-heading {
  font-family: var(--font-serif) !important;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #faf9f5;
}

.insight-prose {
  font-family: var(--font-serif) !important;
  font-size: 13px;
  line-height: 1.68;
  color: #eae8e1;
}

/* Multi-Pane Cockpit Architecture */
.cockpit-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-canvas);
}

/* ==========================================================================
   VIBECAFE-INSPIRED MINIMALIST SIDEBAR (240px Fixed, Flyouts & Floating Widget)
   ========================================================================== */
.vibe-sidebar-fixed {
  width: 240px;
  background-color: #000000 !important;
  border-right: none !important;
  border: none !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  z-index: 50;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.vibe-sidebar-fixed.collapsed {
  width: 64px !important;
}

.vibe-sidebar-fixed.collapsed .vibe-sidebar-text,
.vibe-sidebar-fixed.collapsed .vibe-sidebar-chevron,
.vibe-sidebar-fixed.collapsed .vibe-sidebar-badge,
.vibe-sidebar-fixed.collapsed .vibe-profile-info {
  display: none !important;
}

.vibe-sidebar-fixed.collapsed .vibe-nav-link {
  justify-content: center;
  padding: 8px 0;
}

.vibe-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
  text-decoration: none;
  transition: all 0.16s ease;
  position: relative;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
}

.vibe-nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.vibe-nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.vibe-badge-beta {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Floating Submenu Popover Card */
.vibe-flyout-menu {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  width: 196px;
  background: #0d0d11;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.88);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 60;
}

.vibe-flyout-trigger:hover .vibe-flyout-menu,
.vibe-flyout-trigger:focus-within .vibe-flyout-menu,
.vibe-flyout-menu:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.vibe-flyout-item {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #d4d4d8;
  font-family: var(--font-mono);
  text-decoration: none;
  transition: all 0.15s ease;
}

.vibe-flyout-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Main Container Adjustment when Vibe Sidebar is present */
.has-vibe-sidebar {
  padding-left: 240px;
  transition: padding-left 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.has-vibe-sidebar.sidebar-collapsed {
  padding-left: 64px !important;
}

@media (max-width: 767px) {
  .has-vibe-sidebar {
    padding-left: 0 !important;
  }
}

/* ==========================================================================
   AUTO-EXPANDING BLACK & WHITE SIDEBAR (Hover Reveal Text + SVG)
   ========================================================================== */
#globalLeftRail,
.global-rail,
.cockpit-rail {
  width: 56px;
  background-color: #08080a !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 7px;
  flex-shrink: 0;
  z-index: 60;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, background-color 0.22s ease;
  user-select: none;
}

#globalLeftRail:hover,
.global-rail:hover,
.cockpit-rail:hover {
  width: 204px !important;
  background-color: #0c0c0e !important;
  border-right-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 14px 0 36px rgba(0, 0, 0, 0.88);
}

.rail-nav-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rail-btn,
.rail-item {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  color: #a1a1aa;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  overflow: hidden !important;
  flex-shrink: 0;
}

#globalLeftRail:hover .rail-btn,
#globalLeftRail:hover .rail-item,
.global-rail:hover .rail-btn,
.global-rail:hover .rail-item,
.cockpit-rail:hover .rail-btn,
.cockpit-rail:hover .rail-item {
  width: 100%;
  padding: 0 10px;
}

.rail-icon {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  color: inherit;
}

.rail-icon svg,
.rail-btn svg,
.rail-item svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
  color: inherit;
  flex-shrink: 0;
}

/* 文字标签：默认收缩，hover 展开显示 */
.rail-label {
  display: inline-block !important;
  opacity: 0;
  max-width: 0px !important;
  width: 0px !important;
  margin-left: 0;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: inherit;
  transition: opacity 0.18s ease, max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.18s ease, width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#globalLeftRail:hover .rail-label,
.global-rail:hover .rail-label,
.cockpit-rail:hover .rail-label {
  opacity: 1;
  max-width: 135px !important;
  width: auto !important;
  margin-left: 6px;
  pointer-events: auto;
}

/* Hover 状态：极简黑白高光 */
.rail-btn:hover,
.rail-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

/* 激活态（Active）：纯白高光黑白反色，无任何绿色 */
.rail-btn.active,
.rail-item.active {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 600;
  border-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.18);
}

.rail-btn.active svg,
.rail-btn.active .rail-icon svg,
.rail-item.active svg,
.rail-item.active .rail-icon svg {
  color: #000000 !important;
  stroke: #000000 !important;
}

/* 隐藏旧 tooltip */
.rail-tooltip {
  display: none !important;
}

/* Logo 区展开文字 */
.rail-logo-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 3px;
  border-radius: 8px;
  text-decoration: none;
  overflow: hidden;
  color: #ffffff;
}

.rail-logo-text {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  opacity: 0;
  max-width: 0px !important;
  width: 0px !important;
  margin-left: 0;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-family: var(--font-old-money);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #ffffff;
  transition: opacity 0.18s ease, max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.18s ease, width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-logo-text .brand-wordmark-inline {
  height: 13px;
  width: auto;
  max-width: 105px;
  object-fit: contain;
}

#globalLeftRail:hover .rail-logo-text,
.global-rail:hover .rail-logo-text,
.cockpit-rail:hover .rail-logo-text {
  opacity: 1;
  max-width: 145px !important;
  width: auto !important;
  margin-left: 8px;
}

.cockpit-sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
}

.cockpit-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-canvas);
  overflow: hidden;
}

.metric-pill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  transition: all 0.15s ease;
}
.metric-pill-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
}

.pixel-mascot {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ==========================================================================
   ALPHA GAME · HACKERTRIP PORTAL & BLACK HOLE COSMIC SYSTEM
   ========================================================================== */

.blackhole-hero {
  position: relative;
  background-color: #000000;
  overflow: hidden;
}

.blackhole-image-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.blackhole-image-wrap picture,
.blackhole-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  transform: scale(1.0);
  filter: brightness(0.96) contrast(1.06);
  image-rendering: -webkit-optimize-contrast;
  will-change: transform;
}

.cosmic-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 45%, #000000 88%),
              linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 20%, transparent 70%, #000000 100%);
  z-index: 2;
}

/* Hackertrip-inspired Portal Cards */
.portal-card {
  position: relative;
  background: rgba(8, 8, 10, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portal-card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204, 120, 92, 0.6), transparent);
  opacity: 0.4;
  transition: opacity 0.25s ease;
}

.portal-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(204, 120, 92, 0.09);
}

.portal-card:hover::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.8), transparent);
}

.portal-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #b4b2a9;
}

.portal-badge-green {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.portal-badge-terracotta {
  background: rgba(204, 120, 92, 0.12);
  border-color: rgba(204, 120, 92, 0.3);
  color: #f59e0b;
}

.portal-badge-purple {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

/* Hackertrip Terminal Preview Box */
.terminal-preview-box {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
}

/* Stat Pill */
.hero-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #d4d4d8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}
.hero-stat-pill:hover {
  background: rgba(18, 18, 22, 0.9);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   LIQUID GLASS DESIGN SYSTEM (液态玻璃高奢拟物质感)
   ========================================================================== */
.liquid-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(12, 12, 16, 0.75) 100%);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 16px 40px -10px rgba(0, 0, 0, 0.85),
    0 4px 14px -2px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-glass:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 
    0 22px 50px -12px rgba(0, 0, 0, 0.92),
    0 8px 20px -2px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.45);
}

.liquid-glass-elevated {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.11) 0%, rgba(20, 20, 26, 0.82) 45%, rgba(8, 8, 10, 0.94) 100%);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 24px 60px -12px rgba(0, 0, 0, 0.9),
    0 8px 24px -4px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5);
}

.liquid-glass-pill {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.liquid-glass-input {
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}
.liquid-glass-input:focus {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   THINK 深度思考动效 (Thinking Engine Animation)
   ========================================================================== */
.think-container {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(14, 14, 18, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 10px 28px -6px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  margin-bottom: 12px;
  transition: all 0.22s ease;
}

.think-container:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.think-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid transparent;
  transition: background 0.18s ease;
}
.think-header:hover {
  background: rgba(255, 255, 255, 0.05);
}
.think-container.expanded .think-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.think-pulse-orb {
  position: relative;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.think-pulse-orb .core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
}
.think-pulse-orb.thinking .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  animation: think-ripple 1.6s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes think-ripple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

.think-shimmer-text {
  background: linear-gradient(90deg, #888888 0%, #ffffff 50%, #888888 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: think-shimmer 2.2s infinite linear;
  font-family: var(--font-mono);
  font-weight: 600;
}

@keyframes think-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.think-steps-list {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
}

.think-step-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  transition: all 0.2s ease;
}
.think-step-row.active {
  color: #ffffff;
  font-weight: 500;
}
.think-step-row.done {
  color: #d1d5db;
}

.think-step-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}
.think-step-row.active .think-step-dot {
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
  animation: pulse-dot 1s infinite alternate;
}
.think-step-row.done .think-step-dot {
  background: #ffffff;
}

@keyframes pulse-dot {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.think-body {
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.7;
  color: #c4c4c8;
  font-family: var(--font-mono);
  background: rgba(4, 4, 6, 0.6);
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.think-duration-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
}

/* ==========================================================================
   ADMIN SETTINGS & LOCAL API MODAL (后台管理员设置)
   ========================================================================== */
.admin-modal-box {
  background: linear-gradient(145deg, rgba(22, 22, 28, 0.95) 0%, rgba(10, 10, 14, 0.98) 100%);
  backdrop-filter: blur(36px) saturate(220%);
  -webkit-backdrop-filter: blur(36px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 28px 70px -15px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-radius: 20px;
}

.admin-mode-pill {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  transition: all 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #a1a1aa;
}
.admin-mode-pill.active {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.18);
}

.ping-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
}
.ping-status-badge.online {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}
.ping-status-badge.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
/* ==========================================================================
   MARKDOWN BODY & HIGH-END EDITORIAL TYPOGRAPHY (专栏长文与博客高奢排版)
   ========================================================================== */
.markdown-body {
  color: #d6d6dc;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.85;
  letter-spacing: 0.015em;
  word-break: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: #ffffff;
  font-family: var(--font-serif-luxury);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.8em;
  margin-bottom: 0.75em;
  letter-spacing: -0.01em;
}

.markdown-body h1 {
  font-size: 1.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.45em;
}

.markdown-body h2 {
  font-size: 1.35rem;
  border-left: 3px solid #ffffff;
  padding-left: 0.65rem;
  margin-top: 1.9em;
}

.markdown-body h3 {
  font-size: 1.15rem;
  color: #f4f4f5;
}

.markdown-body h4 {
  font-size: 1rem;
  color: #e4e4e7;
}

.markdown-body p {
  margin-bottom: 1.25em;
  color: #cfd0d6;
}

.markdown-body strong {
  color: #ffffff;
  font-weight: 700;
}

.markdown-body em {
  color: #e4e4e7;
  font-style: italic;
  font-family: var(--font-serif-luxury);
}

.markdown-body blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-left: 3px solid #ffffff;
  border-radius: 0 12px 12px 0;
  color: #e5e5eb;
  font-style: normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 1.1em 0;
  padding-left: 1.4rem;
}

.markdown-body ul {
  list-style-type: disc;
}

.markdown-body ol {
  list-style-type: decimal;
}

.markdown-body li {
  margin-bottom: 0.5em;
  color: #cfd0d6;
}

.markdown-body hr {
  margin: 2.2em 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.16) 50%, transparent 100%);
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.18em 0.45em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #ffffff;
}

.markdown-body pre {
  margin: 1.5em 0;
  padding: 1.1rem 1.25rem;
  background: #09090d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow-x: auto;
}

.markdown-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e4e4e7;
}

.markdown-body a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: all 0.2s ease;
}

.markdown-body a:hover {
  text-decoration-color: #ffffff;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.88rem;
  font-family: var(--font-mono);
}

.markdown-body th,
.markdown-body td {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.markdown-body th {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-weight: 600;
}

.markdown-body tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 1.6em auto;
  display: block;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   ARTICLE CARDS & HERO EDITORIAL STYLES
   ========================================================================== */
/* 首页/落地页文章卡（旧整宽封面版）：限定作用域，避免覆盖社区知乎式信息流 */
body:not(.with-vibe-sidebar) .article-card,
.page-home .article-card {
  background: linear-gradient(180deg, rgba(20, 20, 26, 0.8) 0%, rgba(11, 11, 15, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 20px 42px -12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.article-cover-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background-color: #0b0b0e;
}

.article-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(40%) contrast(108%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.article-card:hover .article-cover-img {
  transform: scale(1.04);
  filter: grayscale(15%) contrast(112%);
}

.article-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 6, 8, 0.1) 0%, rgba(10, 10, 14, 0.85) 100%);
}

/* Markdown Toolbar for Post Creator */
.md-toolbar-btn {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.16s ease;
}

.md-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}


/* 强制正方形 logo/avatar 容器 */

.logo-avatar-square {
  width: 56px !important;
  height: 56px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}
.logo-avatar-square img,
.logo-avatar-square svg {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* ==========================================================================
   SITE SHELL · 全站统一顶部导航栏（2026-10-22）
   目标：9 个页面共享同一套 shell，消除侧栏体系分裂与布局跳变
   规范：0 破折号 / 0 Emoji
   ========================================================================== */

:root {
  --shell-h: 72px;
  --shell-h-mobile: 64px;
  --shell-bg: rgba(8, 8, 10, 0.88);
  --shell-border: rgba(255, 255, 255, 0.07);
  --shell-container-max: 1280px;
  --shell-bg-canvas: #141413;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--shell-h);
  background: var(--shell-bg);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--shell-border);
  z-index: 50;
}

.site-nav-inner {
  max-width: var(--shell-container-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.site-nav-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #101014;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif-luxury);
  font-size: 15px;
  font-weight: 700;
  color: #faf9f5;
  line-height: 1;
}

.site-nav-brand-text {
  font-family: var(--font-serif-luxury);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #faf9f5;
  line-height: 1;
  white-space: nowrap;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 100%;
}

.site-nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  color: #9a9aa2;
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.site-nav-link:hover {
  color: #ffffff;
}

.site-nav-link.is-active {
  color: #ffffff;
  font-weight: 600;
}

.site-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.site-nav-link.is-utility {
  color: #5f5f66;
  font-size: 12px;
}

.site-nav-link.is-utility:hover {
  color: #b4b2a9;
}

.site-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 9999px;
  background: #faf9f5;
  color: #0a0a0c;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.site-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.14);
}

.site-nav-cta:active {
  transform: translateY(0);
}

/* 移动端汉堡 */
.site-nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #faf9f5;
  cursor: pointer;
}

/* 移动端下拉面板 */
.site-nav-mobile {
  display: none;
  position: fixed;
  top: var(--shell-h-mobile);
  left: 0;
  right: 0;
  background: rgba(8, 8, 10, 0.98);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--shell-border);
  z-index: 49;
  padding: 14px 20px 20px;
  flex-direction: column;
  gap: 4px;
}

.site-nav-mobile.is-open {
  display: flex;
}

.site-nav-mobile .site-nav-link {
  padding: 12px 4px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-nav-mobile .site-nav-link.is-active::after {
  display: none;
}

.site-nav-mobile .site-nav-link.is-active {
  color: #ffffff;
}

/* 主区让位（统一上内距） */
body.site-shell {
  padding-top: var(--shell-h);
  background-color: var(--shell-bg-canvas) !important;
  color: #faf9f5;
}

/* 小屏适配 */
@media (max-width: 1023px) {
  .site-nav-links {
    display: none;
  }
  .site-nav-burger {
    display: inline-flex;
  }
  .site-nav {
    height: var(--shell-h-mobile);
  }
  body.site-shell {
    padding-top: var(--shell-h-mobile);
  }
}

/* 页脚「更多」入口（软隐藏页面保持可发现，不进主导航） */
.site-more {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 20px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #5f5f66;
}

.site-more-label {
  color: #3f3f46;
  letter-spacing: 0.18em;
}

.site-more a {
  color: #9a9aa2;
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-more a:hover {
  color: #ffffff;
}

/* ==========================================================================
   LANDING · 独立落地页（与 app shell 完全分离）
   设计取向：编辑级排版 / 大留白 / 单色克制 / hero 独立成屏
   规范：0 破折号 / 0 Emoji
   ========================================================================== */

/* 极简浮动品牌条：不做全站导航 */
.landing-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  pointer-events: none;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  pointer-events: auto;
}

.landing-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 16, 20, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif-luxury);
  font-size: 14px;
  font-weight: 700;
  color: #faf9f5;
  line-height: 1;
}

.landing-brand-name {
  font-family: var(--font-serif-luxury);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #faf9f5;
}

.landing-topbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.landing-topbar-link {
  pointer-events: auto;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #8b8b93;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(12, 12, 15, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.landing-topbar-link:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* HERO · 独立整屏 */
.landing-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 104px 24px 72px;
  overflow: hidden;
}

.landing-hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.015) 32%,
    transparent 62%
  );
  pointer-events: none;
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  text-align: center;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: #6f6f78;
  margin: 0 0 20px;
}

.landing-eyebrow-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6f6f78;
  display: inline-block;
}

.landing-title {
  margin: 0 0 22px;
  font-family: var(--font-serif-luxury);
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: #faf9f5;
}

.landing-title em {
  font-style: italic;
  font-weight: 400;
  color: #cfcdc4;
}

.landing-lede {
  margin: 0 auto 38px;
  max-width: 640px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #8f8f98;
}

.landing-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 28px;
  border-radius: 9999px;
  background: #faf9f5;
  color: #0a0a0c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.13);
}

.landing-btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9a9aa2;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.landing-btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
}

.landing-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #63636b;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-note-sep {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-block;
}

/* 向下提示 */
.landing-hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.22), transparent);
  overflow: hidden;
}

.landing-hero-scroll span {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 16px;
  background: #ffffff;
  animation: landingScrollDot 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes landingScrollDot {
  0% { transform: translateY(-16px); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

/* 落地页后续板块：与 hero 明确分离 */
.landing-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 0 auto;
  max-width: 1100px;
}

@media (max-width: 767px) {
  .landing-topbar {
    padding: 16px 18px;
  }
  .landing-hero {
    padding: 104px 20px 72px;
    min-height: 92vh;
  }
  .landing-eyebrow {
    margin-bottom: 30px;
  }
  .landing-lede {
    font-size: 13.5px;
  }
  .landing-hero-scroll {
    display: none;
  }
}

/* LANDING · 与全站同一暖炭黑，去掉点阵与光斑 */
body.landing-page {
  background-color: var(--bg-canvas) !important;
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.045) 0%, transparent 55%) !important;
  background-size: 100% 100% !important;
}
body.landing-page::after {
  display: none !important;
}

/* LANDING · 标题二阶用字重与灰度做层次，绝不使用中文伪斜体 */
.landing-title em {
  font-style: normal !important;
  font-weight: 300;
  color: #9a978e;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   FORUM · 列表式论坛（对标 new.web.cafe 行式结构）
   规范：0 破折号 / 0 Emoji
   ========================================================================== */

.forum-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.forum-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.forum-row:hover {
  background-color: rgba(255, 255, 255, 0.026);
}

.forum-row-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #faf9f5;
  margin-top: 2px;
}

.forum-row-body {
  flex: 1;
  min-width: 0;
}

.forum-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #6f6f78;
  margin-bottom: 6px;
}

.forum-row-author {
  color: #b4b2a9;
  font-weight: 600;
}

.forum-row-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #4a4a51;
  display: inline-block;
}

.forum-row-title {
  margin: 0 0 6px;
  font-family: var(--font-serif-luxury);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #faf9f5;
  transition: color 0.16s ease;
}

.forum-row:hover .forum-row-title {
  color: #d9d7cf;
}

.forum-row-summary {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.75;
  color: #8a8a92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-row-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.forum-row-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #83838b;
}

.forum-row-stats {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #6f6f78;
  padding-top: 22px;
}

@media (max-width: 767px) {
  .forum-row {
    flex-wrap: wrap;
    padding: 16px 8px;
  }
  .forum-row-stats {
    width: 100%;
    padding-top: 0;
    padding-left: 48px;
    gap: 14px;
  }
  .forum-row-title {
    font-size: 14px;
  }
}

/* =========================================================================
   视觉规范：20261023
   1. 全站单色体系，强调一律为白，不引入彩色
   2. 焦点态统一为可感知的 hairline，不依赖浏览器默认蓝色
   3. 过渡统一 180ms，曲线一致，避免各组件节奏不一
   ========================================================================= */
:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 3px;
}

/* 全阶商业合辑：用更亮的边框与一级阶梯底色表达旗舰位，不使用彩色渐变 */
.skill-bundle {
  background: linear-gradient(180deg, #242320 0%, #1d1c1a 100%);
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.skill-card,
.skill-bundle {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================================
   导航右侧账号区：加入俱乐部 CTA + 用户状态
   ========================================================================= */
.site-nav-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

.site-user-slot[hidden] {
  display: none !important;
}

.site-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 4px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-user-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.site-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: #faf9f5;
  color: #0a0a0c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.site-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-user-menu {
  position: absolute;
  right: 16px;
  top: calc(var(--shell-h) - 6px);
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1d1c1a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 80;
}

.site-user-menu a,
.site-user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  text-decoration: none;
}

.site-user-menu a:hover,
.site-user-menu button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.site-user-menu .site-user-email {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 11px;
  word-break: break-all;
  cursor: default;
}

/* =========================================================================
   账号弹窗（登录 / 注册）
   ========================================================================= */
.alpha-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(6px);
}

.alpha-auth-overlay[hidden] {
  display: none !important;
}

.alpha-auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 30px 26px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1b1a18;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.alpha-auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #7c7a72;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.alpha-auth-close:hover { color: #faf9f5; }

.alpha-auth-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7c7a72;
}

.alpha-auth-title {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #faf9f5;
}

.alpha-auth-form { display: flex; flex-direction: column; gap: 14px; }

.alpha-auth-field { display: flex; flex-direction: column; gap: 6px; }

.alpha-auth-field > span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #7c7a72;
}

.alpha-auth-field input {
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141413;
  color: #faf9f5;
  font-size: 13px;
  outline: none;
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.alpha-auth-field input:focus { border-color: rgba(255, 255, 255, 0.34); }

.alpha-auth-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 120, 0.25);
  background: rgba(255, 80, 80, 0.08);
  color: #f0b4b4;
  font-size: 12px;
}

.alpha-auth-error[hidden] { display: none !important; }

.alpha-auth-submit {
  height: 40px;
  margin-top: 4px;
  border: 0;
  border-radius: 9999px;
  background: #faf9f5;
  color: #0a0a0c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.alpha-auth-submit:hover { opacity: 0.86; }
.alpha-auth-submit:disabled { opacity: 0.5; cursor: default; }

.alpha-auth-switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  color: #7c7a72;
}

.alpha-auth-switch button {
  border: 0;
  background: transparent;
  color: #faf9f5;
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   ALPHA GAME / ALPHA CLUB · GEMINI WORKSPACE RAIL & FLOATING DRAWER
   Pure Monochrome Dark Obsidian · Liquid Glass & Fluid Thinking Shimmer
   ========================================================================== */

/* 全局液态玻璃质感工具类 */
.liquid-glass {
  background: rgba(23, 23, 22, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) inset !important;
}

.liquid-glass-card {
  background: linear-gradient(135deg, rgba(29, 28, 26, 0.75) 0%, rgba(20, 20, 19, 0.65) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.liquid-glass-card:hover {
  background: linear-gradient(135deg, rgba(36, 35, 32, 0.85) 0%, rgba(24, 24, 22, 0.75) 100%) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  transform: translateY(-2px);
}

/* 顶级微光流动思考态 (Think / Fluid Wave Animation) */
@keyframes alphaLiquidFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes alphaPulseBreath {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.95; transform: scale(1.02); }
}

.alpha-thinking-stream {
  position: relative;
  overflow: hidden;
}

.alpha-thinking-stream::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06), transparent);
  background-size: 200% 100%;
  animation: alphaLiquidFlow 2.4s ease-in-out infinite;
  pointer-events: none;
}

/* 顶级极简全屏页面载入器 (Top Tier Loading) */
#alphaPageLoader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0d0d0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#alphaPageLoader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141413;
  animation: alphaPulseBreath 2.2s infinite ease-in-out;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.06);
}

.loader-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.loader-text {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #faf9f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loader-bar {
  width: 140px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.loader-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: #faf9f5;
  border-radius: 9999px;
  animation: alphaBarShift 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes alphaBarShift {
  0% { left: -50%; width: 30%; }
  50% { left: 40%; width: 60%; }
  100% { left: 105%; width: 20%; }
}

/* ==========================================================================
   VibeCafé 原生一致性左侧栏 (严禁巨大SVG、文字水平对齐、纯黑 #000000)
   ========================================================================== */
:root {
  --vibe-w: 240px;
}

body.with-vibe-sidebar {
  padding-left: var(--vibe-w) !important;
  background-color: #000000 !important;
  color: #ededed;
  transition: padding-left 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.with-vibe-sidebar.sidebar-collapsed {
  --vibe-w: 64px;
}

/* 手机端 (< 768px) 底部导航栏适配；桌面/平板 (>= 768px) 保持左侧栏且绝不覆盖内容 */
@media (max-width: 767px) {
  body.with-vibe-sidebar {
    padding-left: 0 !important;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .vibe-sidebar {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 4px env(safe-area-inset-bottom, 0px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(10, 10, 10, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 9999 !important;
    overflow: hidden !important;
  }

  .vibe-sidebar > div:first-child {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
  }

  .vibe-sidebar-header,
  .vibe-sidebar-footer {
    display: none !important;
  }

  .vibe-nav {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .vibe-nav-item {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
  }

  .vibe-nav-link {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 2px !important;
    gap: 3px !important;
    font-size: 10px !important;
    height: auto !important;
    border-radius: 8px !important;
  }

  .vibe-nav-link-left {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  .vibe-nav-link-left svg {
    width: 17px !important;
    height: 17px !important;
  }

  .vibe-nav-link-title {
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
  }
}

/* 侧边栏主体：固定 220px 极简纯黑 (收起时 64px) 无边线融于背景 */
.vibe-sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: var(--vibe-w) !important;
  background: #000000 !important;
  border-right: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 14px 10px !important;
  z-index: 90 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 顶部 Brand */
.vibe-sidebar-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 4px 10px 4px !important;
  border-bottom: none !important;
}

.vibe-brand {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
}

.vibe-brand-logo {
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000000 !important;
  font-family: monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.vibe-brand-text {
  font-family: var(--font-mono), monospace !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
}

.vibe-collapse-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: 0 !important;
  color: #71717a !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  padding: 0 !important;
}

.vibe-collapse-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Perplexity 风格快捷行动入口 */
.vibe-new-thread-wrap {
  margin: 10px 0 6px 0 !important;
}

.vibe-new-thread-btn {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 34px !important;
  padding: 0 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: var(--font-mono), monospace !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #ededed !important;
  text-decoration: none !important;
  transition: all 0.12s ease !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

.vibe-new-thread-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  color: #ffffff !important;
}

.vibe-new-thread-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.vibe-new-thread-left svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  color: #a1a1aa !important;
  flex-shrink: 0 !important;
}

.vibe-new-thread-btn:hover .vibe-new-thread-left svg {
  color: #ffffff !important;
}

.vibe-thread-badge {
  font-family: var(--font-mono), monospace !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #a1a1aa !important;
  border: none !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  line-height: 1.1 !important;
  flex-shrink: 0 !important;
}

.vibe-new-thread-btn:hover .vibe-thread-badge {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

/* 导航链接列表 */
.vibe-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin-top: 8px !important;
  flex: 1 !important;
}

.vibe-nav-item {
  position: relative !important;
  width: 100% !important;
}

/* 导航条目：必须强制 flex-direction: row，严禁换行变成大方块 */
.vibe-nav-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-family: var(--font-mono), monospace !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #a1a1aa !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: all 0.12s ease !important;
  white-space: nowrap !important;
}

.vibe-nav-link:hover,
.vibe-nav-item:hover > .vibe-nav-link {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.03) !important;
}

.vibe-nav-link.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.04) !important;
  font-weight: 600 !important;
}

/* 左侧图标与标题：必须横排 */
.vibe-nav-link-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

/* 强制锁死 SVG 图标尺寸为 16x16，绝不允许撑大 */
.vibe-sidebar svg {
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.vibe-nav-link-left svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  color: #71717a !important;
  transition: color 0.12s ease !important;
}

.vibe-nav-link:hover .vibe-nav-link-left svg,
.vibe-nav-item:hover > .vibe-nav-link .vibe-nav-link-left svg,
.vibe-nav-link.active .vibe-nav-link-left svg {
  color: #ffffff !important;
}

.vibe-nav-link-title {
  font-size: 13px !important;
  color: inherit !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
}

/* 右侧徽章与小箭头 */
.vibe-nav-link-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.vibe-badge-beta {
  font-family: var(--font-mono), monospace !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  background: #f59e0b !important;
  color: #000000 !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  line-height: 1.1 !important;
  flex-shrink: 0 !important;
}

.vibe-arrow-icon {
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-width: 10px !important;
  max-height: 10px !important;
  color: #52525b !important;
}

.vibe-nav-link:hover .vibe-arrow-icon,
.vibe-nav-link.active .vibe-arrow-icon {
  color: #a1a1aa !important;
}

/* 悬停二级下拉卡片 (Flyout Popover) */
.vibe-flyout-menu {
  position: absolute !important;
  top: 0 !important;
  left: 100% !important;
  margin-left: 8px !important;
  width: 200px !important;
  background: #090909 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85) !important;
  padding: 6px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-4px) !important;
  transition: opacity 0.1s ease, transform 0.1s ease, visibility 0.1s ease !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

.vibe-flyout-menu::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: -12px !important;
  width: 12px !important;
}

.vibe-nav-item:hover > .vibe-flyout-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

.vibe-flyout-title {
  font-family: var(--font-mono), monospace !important;
  font-size: 9px !important;
  letter-spacing: 0.08em !important;
  color: #71717a !important;
  padding: 4px 8px 6px !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin-bottom: 3px !important;
}

.vibe-flyout-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 7px 8px !important;
  border-radius: 6px !important;
  font-family: var(--font-mono), monospace !important;
  font-size: 12px !important;
  color: #d4d4d8 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background 0.1s ease !important;
}

.vibe-flyout-item:hover {
  color: #ffffff !important;
  background: #18181b !important;
}

.vibe-flyout-item-desc {
  font-size: 10px !important;
  color: #71717a !important;
}

/* 侧栏底部：反馈与用户主页卡槽 */
.vibe-sidebar-footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding-top: 10px !important;
  border-top: none !important;
}

.vibe-user-slot {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  text-align: left !important;
}

.vibe-user-slot.hidden,
.vibe-user-slot[hidden] {
  display: none !important;
}

.vibe-user-slot:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.vibe-user-menu-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* 侧栏折叠状态响应 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar {
  padding: 14px 6px !important;
}

body.with-vibe-sidebar.sidebar-collapsed .vibe-brand-text,
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link-title,
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link-right,
body.with-vibe-sidebar.sidebar-collapsed .vibe-new-thread-left span,
body.with-vibe-sidebar.sidebar-collapsed .vibe-thread-badge,
body.with-vibe-sidebar.sidebar-collapsed .vibe-user-name,
body.with-vibe-sidebar.sidebar-collapsed .vibe-user-slot > svg {
  display: none !important;
}

body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link,
body.with-vibe-sidebar.sidebar-collapsed .vibe-new-thread-btn,
body.with-vibe-sidebar.sidebar-collapsed .vibe-user-slot {
  justify-content: center !important;
  padding: 0 !important;
}

/* 折叠态下「导师」这类角标会溢出 64px 栏外（实测露在正文上），一并隐藏 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link > span:not(.vibe-nav-link-title) {
  display: none !important;
}

body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar-header {
  flex-direction: column !important;
  gap: 8px !important;
  padding: 0 0 10px 0 !important;
  justify-content: center !important;
}

.vibe-user-meta {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

.vibe-user-avatar {
  width: 22px !important;
  height: 22px !important;
  border-radius: 5px !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.vibe-user-name {
  font-family: var(--font-mono), monospace !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}

/* 想法/反馈弹窗 (Feedback Modal) */
.alpha-feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.alpha-feedback-overlay[hidden] {
  display: none !important;
}

.alpha-feedback-card {
  width: 100%;
  max-width: 480px;
  background: #181816;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  position: relative;
}

/* ============================================================
   登录弹窗品牌文字标志
   不用图片：一条细线 + 衬线字标 + 一行小字，与文章刊头同一套语言
   ============================================================ */
.acl-brandmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.acl-brandmark-rule {
  width: 26px;
  height: 1px;
  background: rgba(212, 20, 50, 0.55);
}

.acl-brandmark-word {
  font-family: var(--reader-font-serif, "Noto Serif SC", "Songti SC", Georgia, serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: #f4f3ee;
}

.acl-brandmark-sub {
  font-family: var(--font-mono, "JetBrains Mono", Menlo, monospace);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6b6962;
}

.alpha-feedback-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: #7c7a72;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alpha-feedback-close:hover {
  color: #faf9f5;
  background: rgba(255, 255, 255, 0.08);
}

.alpha-feedback-textarea {
  width: 100%;
  min-height: 110px;
  background: #121211;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #faf9f5;
  resize: vertical;
  margin-top: 14px;
  font-family: var(--font-sans);
}

.alpha-feedback-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.alpha-feedback-input {
  width: 100%;
  background: #121211;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #faf9f5;
  margin-top: 10px;
}

.alpha-feedback-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.alpha-feedback-submit {
  width: 100%;
  height: 38px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: #faf9f5;
  color: #0d0d0c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.alpha-feedback-submit:hover {
  opacity: 0.88;
}

/* 手机端底部导航栏适配 */
@media (max-width: 768px) {
  .workspace-sidebar-wrap {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    width: 100%;
    pointer-events: auto;
  }
  .workspace-rail {
    width: 100%;
    height: 100%;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: row;
    padding: 0 16px;
  }
  .workspace-rail-top {
    flex-direction: row;
    justify-content: space-around;
  }
  .workspace-rail-bottom {
    display: none;
  }
  .workspace-drawer {
    display: none;
  }
}

/* ==========================================================================
   哥飞 Web.Cafe 风格社区底栏矩阵 (Gefei Community Footer Matrix)
   ========================================================================== */
.gefei-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #10100f;
  padding: 56px 24px 36px;
  margin-top: 60px;
}

.gefei-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 36px;
}

@media (max-width: 768px) {
  .gefei-footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.gefei-footer-brand h4 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #faf9f5;
  letter-spacing: 0.05em;
}

.gefei-footer-brand p {
  font-size: 12px;
  color: #7c7a72;
  margin-top: 8px;
  line-height: 1.6;
}

.gefei-footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #65635b;
  margin-bottom: 14px;
}

.gefei-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gefei-footer-link {
  font-size: 12px;
  color: #a09d94;
  text-decoration: none;
  transition: color 0.16s ease;
}

.gefei-footer-link:hover {
  color: #faf9f5;
}

.gefei-footer-bottom {
  max-width: 1080px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #55534c;
  font-family: var(--font-mono);
}




/* ==========================================================================
   VIBE-SIDEBAR BORDERLESS & NATIVE MICRO-GLOW REFINEMENTS
   ========================================================================== */
.vibe-sidebar {
  border-right: none !important;
  border: none !important;
  background: #000000 !important;
  box-shadow: none !important;
  outline: none !important;
}

body.with-vibe-sidebar {
  background-color: #000000 !important;
}

.vibe-nav-link {
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
}

.vibe-nav-link:hover,
.vibe-nav-item:hover > .vibe-nav-link {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.03) !important;
  border-radius: 8px !important;
}

.vibe-nav-link.active {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.04) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.post-like-btn.liked {
  color: #ef4444 !important;
}
.post-like-btn.liked svg {
  fill: #ef4444 !important;
  stroke: #ef4444 !important;
}

/* ============================================================
   VibeCafé 排版基准统一：正文与控件对齐侧栏 .vibe-nav-link 尺度
   基准 = 13px / 500 / mono / #a1a1aa / 圆角 8px / 高 34px
   ============================================================ */
.vibe-typo-base,
.view-pane .post-cat-pill,
.view-pane .post-sort-btn,
.view-pane #headerNewPostBtn,
.view-pane #postSearchInput {
  font-family: var(--font-mono), monospace !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  border-radius: 8px !important;
}

/* 胶囊/按钮高度对齐导航条 34px 视觉节奏（内边距略收，因带边框） */
.view-pane .post-cat-pill,
.view-pane #headerNewPostBtn {
  min-height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.view-pane #postSearchInput {
  min-height: 30px !important;
  color: #faf9f5 !important;
}

/* 次级说明文字统一尺度（原 10-11px 杂色统一到 12px 层级）
   排除表单控件：input/select/textarea 在手机端必须 ≥16px，否则 iOS 聚焦会缩放页面，
   由 mobile-compat.css 负责，这里不能再压回去。 */
.view-pane :is(span, div, p, a, li).text-\[11px\],
.view-pane :is(span, div, p, a, li).text-\[10px\] {
  font-size: 12px !important;
}
.view-pane .text-xs {
  font-size: 13px !important;
}

/* 正文摘要：跟随基准，行高统一 1.6 */
.forum-row-summary {
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: #8a8a92 !important;
}

/* 帖子标题略高一档，保持 serif 质感 */
.forum-row-title {
  font-size: 15px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}

/* 统计/元信息数字统一 mono 基准色 */
.forum-row-stats span,
.forum-row-meta span {
  font-family: var(--font-mono), monospace !important;
  font-size: 12px !important;
  color: #a1a1aa !important;
}

/* ============================================================
   VibeCafé 侧栏复刻 (v2)：240px 宽 / 14px medium / px-3 py-2
   图标 18px 描边 1.6 / gap-2.5 / rounded-lg — 无下拉飞出
   注意：宽度必须跟随 --vibe-w，写死 240px 会让折叠态失效（实测点击后
   只留白变 64px、侧栏本身仍占 240px，形成 176px 空洞）。
   ============================================================ */
.vibe-sidebar {
  width: var(--vibe-w, 240px) !important;
}
.vibe-nav-link {
  height: auto !important;
  padding: 8px 12px !important;
  gap: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
}
.vibe-nav-link-left {
  gap: 10px !important;
  flex: 1 !important;
}
.vibe-nav-link-left svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  stroke-width: 1.6 !important;
}
.vibe-nav-link-title {
  font-size: 14px !important;
}
/* 侧栏条目间距：space-y-2 节奏 */
.vibe-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
/* 排行榜时间档按钮对齐基准 */
.view-pane .rank-period-btn {
  font-family: var(--font-mono), monospace !important;
  font-size: 13px !important;
  min-height: 30px !important;
}
/* 排行榜行网格兜底（Tailwind 任意值类不参与编译时仍保证四列布局） */
.view-pane .rank-row {
  display: grid !important;
}
/* 想法卡片支持按钮：即时缩放反馈 */
#ideasFeed .ideas-support {
  transition: transform 0.12s ease, color 0.15s ease;
}
#ideasFeed .ideas-support.scale-110 {
  transform: scale(1.18);
}

/* ============================================================
   侧栏折叠态修复 (64px)：logo 居中、图标居中、隐藏文字与箭头
   ============================================================ */
body.with-vibe-sidebar.sidebar-collapsed {
  --vibe-w: 64px;
}

/* 收起时侧栏内边距收紧、内容水平居中 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar {
  padding: 14px 8px !important;
  align-items: center !important;
}
body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar > div,
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav,
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-item {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* 头部：把 logo 和折叠按钮竖排居中 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar-header {
  width: 100% !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 0 0 12px 0 !important;
}
body.with-vibe-sidebar.sidebar-collapsed .vibe-brand {
  gap: 0 !important;
  justify-content: center !important;
  width: 100% !important;
}
/* logo 固定 32px 方形，不被压扁 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-brand-logo {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  font-size: 15px !important;
}

/* 隐藏文字、箭头、徽章 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-brand-text,
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link-title,
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link-right,
body.with-vibe-sidebar.sidebar-collapsed .vibe-user-name {
  display: none !important;
}

/* 导航项：40px 方形、图标居中 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
}
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link-left {
  gap: 0 !important;
  flex: none !important;
  justify-content: center !important;
  align-items: center !important;
}
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-link-left svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

/* 底部用户卡槽居中 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar-footer {
  align-items: center !important;
  padding: 0 !important;
}
body.with-vibe-sidebar.sidebar-collapsed .vibe-user-slot,
body.with-vibe-sidebar.sidebar-collapsed .vibe-sidebar-footer .vibe-nav-link {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  justify-content: center !important;
  margin: 0 auto !important;
}

/* 侧栏外部部署入口（参考 vibe42 模式：与导航项同构 + 右上箭头） */
.vibe-nav-external {
  width: 100%;
}
.vibe-nav-external .vibe-nav-link-left {
  flex: 1;
  min-width: 0;
}
.vibe-nav-external-arrow {
  flex-shrink: 0;
  opacity: 0.42;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.vibe-nav-external:hover .vibe-nav-external-arrow {
  opacity: 1;
  transform: translate(1px, -1px);
}
/* 折叠态隐藏箭头 */
body.with-vibe-sidebar.sidebar-collapsed .vibe-nav-external-arrow {
  display: none !important;
}

/* ============================================================
   黑曜石视觉打磨 (v14)：hover 反馈 / 原生控件统一 / 滚动条 / 切换过渡
   ============================================================ */

/* --- 1. 细滚动条（WebKit + Firefox） --- */
.with-vibe-sidebar *::-webkit-scrollbar { width: 8px; height: 8px; }
.with-vibe-sidebar *::-webkit-scrollbar-track { background: transparent; }
.with-vibe-sidebar *::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.with-vibe-sidebar *::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.20);
  background-clip: padding-box;
}
.with-vibe-sidebar * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }

/* --- 2. 帖子卡片：背景/边框分层 + hover 提亮 --- */
#ideasFeed > div,
.view-pane .rounded-xl.border {
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s cubic-bezier(0.16,1,0.3,1);
}
#ideasFeed > div:hover {
  border-color: rgba(255,255,255,0.14) !important;
  background-color: rgba(255,255,255,0.028) !important;
}

/* --- 3. 文章行 / 课程卡 / 展示面卡 hover：边框提亮 + 轻位移 --- */
#view-articles .rounded-xl.border:hover,
#view-courses .rounded-xl.border:hover,
#view-showcase .rounded-xl.border:hover,
#view-canvas .rounded-xl.border:hover {
  border-color: rgba(255,255,255,0.18) !important;
  transform: translateY(-1px);
}

/* --- 4. 课程卡「查看 →」箭头 hover 右移 --- */
#view-courses .rounded-xl.border:hover a,
#view-courses .rounded-xl.border:hover .text-neutral-400 {
  color: #fafafa !important;
}

/* --- 5. 原生 checkbox / radio 统一黑曜石风格 --- */
.view-pane input[type="checkbox"],
.view-pane input[type="radio"],
.alpha-feedback-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  position: relative;
  transition: all 0.14s ease;
  flex-shrink: 0;
  margin-top: 1px;
}
.view-pane input[type="checkbox"]:hover,
.view-pane input[type="radio"]:hover {
  border-color: rgba(255,255,255,0.45);
}
.view-pane input[type="checkbox"]:checked,
.view-pane input[type="radio"]:checked {
  background: #fafafa;
  border-color: #fafafa;
}
.view-pane input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px; top: 1.5px;
  width: 4px; height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- 6. 视图切换淡入（display 切换自动重放） --- */
.view-pane:not(.hidden) {
  animation: viewFadeIn 0.28s cubic-bezier(0.16,1,0.3,1);
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: viewFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
@media (prefers-reduced-motion: reduce) {
  .view-pane:not(.hidden),
  .animate-fade-in { animation: none !important; }
}

/* --- 7. 顶部标签胶囊（热门/关注/最新 与文章分类）hover 提亮 --- */
.ideas-tab-btn:hover,
.post-cat-pill:hover {
  border-color: rgba(255,255,255,0.25) !important;
}

/* --- 8. 发布按钮与主按钮 hover 微抬 --- */
.view-pane button.bg-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,255,255,0.10);
}

/* ============================================================
   黑曜石视觉打磨 (v15)：弹窗入场 / 原生 select / 操作按钮 / 焦点环
   ============================================================ */

/* --- 1. 反馈弹窗入场动画（缩放 + 淡入） --- */
.alpha-feedback-card {
  animation: feedbackPop 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}
@keyframes feedbackPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .alpha-feedback-card { animation: none; }
}

/* --- 2. 原生 select 黑曜石化：自定义箭头 + 暗色选项 --- */
.view-pane select,
.modal-box select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.view-pane select:hover,
.modal-box select:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
}
.view-pane select option,
.modal-box select option {
  background: #141418;
  color: #faf9f5;
}

/* --- 3. 帖子卡操作按钮（支持/评论/分享）hover 提亮 + 微抬 --- */
.ideas-support,
.ideas-comment,
.ideas-share {
  border-radius: 8px;
  padding: 4px 8px;
  margin: -4px -8px;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.ideas-support:hover,
.ideas-comment:hover,
.ideas-share:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

/* --- 4. 发布框头像描边轻环（聚焦时）--- */
#ideasComposerInput:focus ~ .flex .border-white\/10,
#ideasComposerAvatar {
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
#ideasComposer:focus-within #ideasComposerAvatar {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

/* --- 5. 标签胶囊激活态更鲜明 --- */
.ideas-tab-btn.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.04);
}

/* --- 6. Toast 左侧强调线 + 更顺滑 --- */
.toast {
  border-left: 2px solid rgba(255, 255, 255, 0.55);
}

/* --- 7. 全局焦点可见环（键盘可达 + 风格统一）--- */
.with-vibe-sidebar button:focus-visible,
.with-vibe-sidebar a:focus-visible,
.with-vibe-sidebar input:focus-visible,
.with-vibe-sidebar textarea:focus-visible,
.with-vibe-sidebar select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

/* ============================================================
   黑曜石视觉打磨 (v16)：Agent 卡片 / 文章阅读器排版 / 细节强调
   ============================================================ */

/* --- 1. Agent 拆解结果卡片：左侧细强调线 + hover 提亮 --- */
#agentResult > div {
  border-left: 2px solid rgba(255, 255, 255, 0.16) !important;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s cubic-bezier(0.16,1,0.3,1);
}
#agentResult > div:hover {
  border-left-color: rgba(255, 255, 255, 0.42) !important;
  background-color: rgba(255, 255, 255, 0.035) !important;
  transform: translateY(-1px);
}
#agentResult > div h4 {
  letter-spacing: 0.01em;
}

/* --- 2. Agent 输入区聚焦统一细环 --- */
#agentInput:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* --- 3. 文章阅读器排版节奏 --- */
#articleReaderContent {
  font-size: 14px;
  line-height: 1.75;
  color: #c9c9cf;
}
#articleReaderContent p {
  margin-bottom: 14px;
}
#articleReaderContent p:last-child {
  margin-bottom: 0;
}
#articleReaderContent p.font-semibold {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
  margin-top: 22px;
  margin-bottom: 10px;
}
#articleReaderContent p.font-semibold:first-child {
  margin-top: 0;
}
#articleReaderContent ul.list-disc {
  margin: 4px 0 16px;
  padding-left: 18px;
}
#articleReaderContent ul.list-disc li {
  margin-bottom: 8px;
  color: #c9c9cf;
}
#articleReaderContent ul.list-disc li::marker {
  color: rgba(255, 255, 255, 0.35);
}
#articleReaderContent strong {
  color: #ffffff;
  font-weight: 600;
}
#articleReaderContent blockquote {
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding-left: 14px;
  margin: 16px 0;
  color: #e5e5ea;
  font-style: normal;
}

/* --- 4. 展示面「看详细 →」hover 提亮 + 箭头位移 --- */
.showcase-card .text-neutral-500 {
  transition: color 0.15s ease, transform 0.15s ease;
}
.showcase-card:hover .text-neutral-500 {
  color: #fafafa !important;
}
.showcase-card:hover .text-neutral-500 {
  transform: translateX(2px);
}

/* --- 5. 卡片极淡内高光，脱离纯平面 --- */
.course-card,
.showcase-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ============================================================
   v17：文章封面 + 卡片交互补齐
   ============================================================ */

/* 文章列表卡片：封面容器与图片 */
/* (v17 整宽封面样式已由 v18 右图缩略图取代，保留结构兼容) */
.article-cover { position: relative; }
.article-cover img { display: block; }
/* 封面底部渐隐，与卡片内容自然衔接 */
.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(12,12,14,0.55) 100%);
  pointer-events: none;
}
/* hover 时封面轻微放大 */
.article-card:hover .article-cover img { transform: scale(1.04); }

/* 阅读器封面：顶部渐隐融入标题区 */
#articleReaderCoverWrap {
  position: relative;
  overflow: hidden;
}
#articleReaderCoverWrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(17,17,20,0.85) 100%);
  pointer-events: none;
}
#articleReaderCover { display: block; }

/* ============================================================
   v18：文章平台阅读体验（知乎式信息流）
   ============================================================ */

/* --- 列表卡片：左文右图 --- */
.article-card { display: block; }
.article-card:hover .article-title { color: #ffffff; }
.article-title {
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
/* 多行截断（标题 2 行 / 摘要 2 行） */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 右侧缩略封面：固定比例，hover 微亮 */
.article-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}
.article-thumb img { display: block; transition: transform 0.35s ease, opacity 0.2s ease; }
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-card:hover .article-thumb { border-color: rgba(255,255,255,0.14); }

/* 列表间距：信息流节奏（比原 space-y-3 略松） */
#articleList { display: flex; flex-direction: column; gap: 10px; }

/* --- 阅读器：知乎式正文排版 --- */
#articleReaderModal .modal-box { max-width: 760px; }
#articleReaderTitle {
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
/* 作者行 */
#articleReaderMeta {
  font-size: 12px;
  gap: 8px;
  margin-bottom: 4px;
}
/* 正文：段距与字号 */
#articleReaderContent { font-size: 15px; line-height: 1.8; }
#articleReaderContent p { margin-bottom: 16px; }
#articleReaderContent p.font-semibold {
  font-size: 16px;
  margin-top: 26px;
  padding-left: 10px;
  border-left: 3px solid rgba(255,255,255,0.25);
}
#articleReaderContent ul.list-disc { margin: 6px 0 18px; padding-left: 20px; }
#articleReaderContent ul.list-disc li { margin-bottom: 10px; line-height: 1.7; }
/* 阅读器封面：改为顶部横幅（比整屏柔和） */
#articleReaderCoverWrap { height: 200px; }
#articleReaderCover { height: 100%; }

/* --- 分类筛选：更像 tab 而非 pill 堆砌 --- */
.article-cat-pill {
  border-radius: 7px !important;
  transition: all 0.15s ease;
}
.article-cat-pill.active {
  box-shadow: 0 1px 8px rgba(255,255,255,0.10);
}

/* v18b：强制文章卡片左文右图（绕过 Tailwind flex-1 被覆盖导致宽度 0 的问题） */
.article-card > .flex.gap-4 { display: flex !important; flex-direction: row !important; align-items: stretch !important; }
.article-main { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
.article-thumb { flex: 0 0 auto !important; width: 120px !important; }
@media (min-width: 640px) { .article-thumb { width: 140px !important; } }

/* ==========================================================================
   移动端底部导航 · 最终修正 (Mobile bottom nav, final override)
   --------------------------------------------------------------------------
   文件末尾的基础 .vibe-sidebar 规则同样带 !important 且位置更靠后，会把上方
   的 @media (max-width:767px) 适配整段压掉：实测 375px 视口下侧栏仍是
   240×56 的方块浮在左上角、直接盖住正文（aszine 回归）。
   这里用 body.with-vibe-sidebar 前缀提升特异性，确保底部导航真正生效。
   ========================================================================== */
@media (max-width: 767px) {
  body.with-vibe-sidebar .vibe-sidebar {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 4px env(safe-area-inset-bottom, 0px) !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(10, 10, 10, 0.96) !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 90 !important;
    overflow: hidden !important;
    transition: none !important;
  }

  /* 手机端不显示品牌头与用户区，只保留主导航 */
  body.with-vibe-sidebar .vibe-sidebar-header,
  body.with-vibe-sidebar .vibe-sidebar-footer {
    display: none !important;
  }

  /* 「导师」这类角标在底部导航里会掉到第二行，手机端隐藏 */
  body.with-vibe-sidebar .vibe-nav-link > span:not(.vibe-nav-link-title) {
    display: none !important;
  }

  body.with-vibe-sidebar .vibe-sidebar > div:first-child {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.with-vibe-sidebar .vibe-nav {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body.with-vibe-sidebar .vibe-nav-item {
    flex: 1 1 0 !important;
    display: flex !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  body.with-vibe-sidebar .vibe-nav-link {
    width: 100% !important;
    height: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 2px !important;
    gap: 3px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  body.with-vibe-sidebar .vibe-nav-link-left {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  body.with-vibe-sidebar .vibe-nav-link-left svg {
    width: 18px !important;
    height: 18px !important;
  }

  body.with-vibe-sidebar .vibe-nav-link-title {
    font-size: 10px !important;
    line-height: 1.1 !important;
    font-weight: 500 !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* 超窄屏（<=359px）：6 个 tab 挤在一行时再降一档字号，避免长标签被截断 */
@media (max-width: 359px) {
  body.with-vibe-sidebar .vibe-nav-link {
    padding: 6px 0 !important;
    gap: 2px !important;
  }

  body.with-vibe-sidebar .vibe-nav-link-title {
    font-size: 9px !important;
    letter-spacing: -0.01em !important;
  }

  body.with-vibe-sidebar .vibe-nav-link-left svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* ==========================================================================
   社区频道 tab 条 · 窄屏适配
   --------------------------------------------------------------------------
   实测：768px 溢出 52px、1024px（右侧栏出现后正文只剩 428px）溢出 84px，
   被裁掉的正是「公告」，且桌面端会露出一条横向滚动条，观感很差。
   处理：隐藏该条的滚动条；768–1279px 收紧 pill 的内边距/字号/间距，
   保证一屏放得下；手机端保留滑动并加吸附。
   ========================================================================== */
#communityChannels {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#communityChannels::-webkit-scrollbar {
  display: none;
}

#communityChannels .community-ch-btn {
  flex: 0 0 auto;
}

@media (min-width: 768px) and (max-width: 1279px) {
  #communityChannels {
    gap: 4px !important;
  }

  #communityChannels .community-ch-btn {
    padding: 5px 8px !important;
    font-size: 12px !important;
  }

  #communityChannels .community-ch-btn > span {
    margin-left: 4px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 767px) {
  #communityChannels {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px !important;
  }

  #communityChannels .community-ch-btn {
    scroll-snap-align: start;
  }
}

/* ==========================================================================
   社区双栏 · 1024–1279px 改为单栏
   --------------------------------------------------------------------------
   该区间右侧栏固定占 264px，正文只剩 428px（比侧栏还窄），卡片与 tab 都被
   挤压。把右侧栏下移后正文恢复 ~780px，1280px 起再回到左右分栏。
   ========================================================================== */
@media (min-width: 1024px) and (max-width: 1279px) {
  .community-split {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* ==========================================================================
   可访问性与动效偏好
   ========================================================================== */
.vibe-nav-link:focus-visible,
.vibe-collapse-btn:focus-visible,
.vibe-user-slot:focus-visible,
#vibeSidebar button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55) !important;
  outline-offset: 2px !important;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  body.with-vibe-sidebar,
  .vibe-sidebar,
  .vibe-nav-link,
  #communityChannels {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 帖子详情正文：保留换行（内容里有段落结构，默认会被折叠成一整段） */
#ideaDetailBody {
  white-space: pre-wrap;
  word-break: break-word;
}
