@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&family=JetBrains+Mono:wght@400;500&family=Dancing+Script:wght@500;600;700&family=Playfair+Display:wght@200;300&display=swap');


/* ============================================
   Pigeon.log — Design System
   Clean, minimal, content-first
   ============================================ */

:root {
  /* Colors */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-primary1: #ffffff;
  --text-secondary: #555555;
  --text-muted: #999999;
  --accent: #ada5a5;
  --accent-hover: #E64400;
  --border: #EAEAEA;
  --border-light: #F3F3F3;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.12);

  /* Radius */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
}

/* Base input background: not pure white */
input,
textarea,
select {
  background-color: #f4f4f5;
  border-radius: 0 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: #18181b;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  dynamic-range-limit: standard;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---- Layout ---- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 140px;
  z-index: 99;
  pointer-events: none;
}

.header-blur-layer {
  position: absolute;
  inset: 0;
}

.header-blur-layer:nth-child(1) {
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 100%, transparent 100%);
  mask: linear-gradient(to bottom, black 0%, black 100%, transparent 100%);
}

.header-blur-layer:nth-child(2) {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 75%, transparent 90%);
  mask: linear-gradient(to bottom, black 0%, black 75%, transparent 90%);
}

.header-blur-layer:nth-child(3) {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 60%, transparent 75%);
  mask: linear-gradient(to bottom, black 0%, black 60%, transparent 75%);
}

.header-blur-layer:nth-child(4) {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 45%, transparent 60%);
  mask: linear-gradient(to bottom, black 0%, black 45%, transparent 60%);
}

.header-blur-layer:nth-child(5) {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 30%, transparent 45%);
  mask: linear-gradient(to bottom, black 0%, black 30%, transparent 45%);
}

.header-blur-layer:nth-child(6) {
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 15%, transparent 30%);
  mask: linear-gradient(to bottom, black 0%, black 15%, transparent 30%);
}

.header-blur-layer:nth-child(7) {
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 5%, transparent 15%);
  mask: linear-gradient(to bottom, black 0%, black 5%, transparent 15%);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 52px clamp(24px, 5vw, 64px) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 101;
}

.header-member,
.header-auth-link {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.header-member {
  position: absolute;
  top: 20px;
  left: clamp(24px, 5vw, 64px);
  white-space: nowrap;
}

.header-member:hover,
.header-auth-link:hover {
  color: var(--text-primary);
  text-decoration-color: transparent;
}

.header-auth {
  position: absolute;
  top: 20px;
  right: clamp(24px, 5vw, 64px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-auth-sep {
  color: var(--text-muted);
  font-size: 10px;
}

.header-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: clamp(16px, 2.5vw, 24px);
  cursor: pointer;
  user-select: none;
  transition: transform 0.45s ease, opacity 0.4s ease;
}

.header-logo.hidden {
  transform: translateY(-200px);
  opacity: 0;
  pointer-events: none;
}

.header-logo-name {
  display: block;
  height: clamp(20px, 6.5vw, 48px);
  width: auto;
  object-fit: contain;
  object-position: left center;
  filter: invert(1);
  user-select: none;
  transition: filter 0.3s ease;
}

html[data-theme="dark"] .header-logo-name {
  filter: invert(0);
}

.header-logo-sub {
  display: none;
}

.header-menu-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  padding: 4px 2px;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.header-menu-btn:hover {
  color: var(--text-primary);
  text-decoration-color: transparent;
}


/* ---- Hero ---- */
.hero-section {
  position: relative;
  overflow: visible;
  z-index: 20;
}

/* ---- Hero Boundary Blur (Optical Blur Transition at Junction) ---- */
.hero-boundary-blur {
  position: relative;
  height: 0;
  z-index: 10;
  pointer-events: none;
}

.hero-boundary-blur .header-blur-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: -80px;
  height: 110px;
}

@media (max-width: 768px) {
  .hero-boundary-blur .header-blur-layer {
    top: -45px;
    height: 80px;
    /* Shorter rectangle on mobile to prevent text blurring */
  }
}

/* Symmetric progressive triangular masks (0px blur at ends, max at center) */
.hero-boundary-blur .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.hero-boundary-blur .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
}

.hero-boundary-blur .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
}

.hero-boundary-blur .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
}

.hero-boundary-blur .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to bottom, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to bottom, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.hero-boundary-blur .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to bottom, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to bottom, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.hero-boundary-blur .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to bottom, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to bottom, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Progressive blur — bottom to top, fades image into white background */
.hero-blur {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;
  z-index: 2;
  pointer-events: none;
}

.hero-blur-layer {
  position: absolute;
  inset: 0;
}

.hero-blur-layer:nth-child(1) {
  -webkit-backdrop-filter: blur(0.5px);
  backdrop-filter: blur(0.5px);
  -webkit-mask: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%, transparent 100%);
  mask: linear-gradient(to top, rgba(0, 0, rgba(0, 0, 0, 0)) 0%, black 100%, transparent 100%);
}

.hero-blur-layer:nth-child(2) {
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  -webkit-mask: linear-gradient(to top, black 0%, black 70%, transparent 85%);
  mask: linear-gradient(to top, rgba(0, 0, rgba(0, 0, 0, 0)) 0%, black 70%, transparent 85%);
}

.hero-blur-layer:nth-child(3) {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-mask: linear-gradient(to top, black 0%, black 55%, transparent 70%);
  mask: linear-gradient(to top, black 0%, black 55%, transparent 70%);
}

.hero-blur-layer:nth-child(4) {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  -webkit-mask: linear-gradient(to top, black 0%, black 40%, transparent 55%);
  mask: linear-gradient(to top, black 0%, black 40%, transparent 55%);
}

.hero-blur-layer:nth-child(5) {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask: linear-gradient(to top, black 0%, black 28%, transparent 42%);
  mask: linear-gradient(to top, black 0%, black 28%, transparent 42%);
}

.hero-blur-layer:nth-child(6) {
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  -webkit-mask: linear-gradient(to top, black 0%, black 15%, transparent 28%);
  mask: linear-gradient(to top, black 0%, black 15%, transparent 28%);
}

.hero-blur-layer:nth-child(7) {
  -webkit-backdrop-filter: blur(60px);
  backdrop-filter: blur(60px);
  -webkit-mask: linear-gradient(to top, black 0%, black 5%, transparent 15%);
  mask: linear-gradient(to top, black 0%, black 5%, transparent 15%);
}

.hero {
  position: relative;
  z-index: 20;
  padding-top: 210px;
  padding-bottom: clamp(24px, 3vw, 44px);
  text-align: left;
}

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.hero-title-accent {
  color: var(--accent);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 340px;
  margin: 0;
  line-height: 1.6;
}

.hero-slogan-wrap {
  position: relative;
  display: block;
  max-width: min(340px, 75vw);
  width: 100%;
  margin: 0;
}

.hero-slogan-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* Slogan Decor: Computer (Lower Right Circle) */
.hero-slogan-decor-computer {
  position: absolute;
  left: calc(100% + clamp(2px, 1.5vw, 12px));
  top: clamp(50px, 6.2vw, 68px);
  width: clamp(34px, 4.2vw, 44px);
  height: auto;
  aspect-ratio: 624 / 532;
  z-index: 2;
  overflow: visible;
}

/* Slogan Decor: Flower (Upper Right Circle) */
.hero-slogan-decor-flower {
  position: absolute;
  left: calc(100% + clamp(56px, 7.5vw, 92px));
  top: clamp(2px, 1.2vw, 10px);
  width: clamp(24px, 2.8vw, 30px);
  height: auto;
  aspect-ratio: 225 / 400;
  z-index: 2;
  overflow: visible;
}

/* 摆动动画：等 1 秒在结尾瞬间向左旋转 10 度，再等 1 秒向右旋转 10 度，循环交替 */
@keyframes sloganTickWobble {
  0%, 47.5% {
    transform: rotate(-10deg);
  }
  50%, 97.5% {
    transform: rotate(10deg);
  }
  100% {
    transform: rotate(-10deg);
  }
}

.hero-decor-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  animation: sloganTickWobble 2s cubic-bezier(0.2, 1.2, 0.3, 1) infinite;
  user-select: none;
  pointer-events: auto;
  transition: filter 0.2s ease;
  overflow: visible;
  /* 留出旋转包围盒空间，防止边缘被切 */
  padding: 4px;
  box-sizing: content-box;
  margin: -4px;
}

.hero-decor-img:hover {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

@media (max-width: 900px) {
  .hero-slogan-decor-computer {
    left: calc(100% - clamp(12px, 2.5vw, 22px));
    top: 56px;
    width: clamp(28px, 4.5vw, 36px);
  }

  .hero-slogan-decor-flower {
    left: calc(100% + clamp(46px, 7.5vw, 68px));
    top: 2px;
    width: clamp(20px, 3.2vw, 26px);
  }
}

@media (max-width: 600px) {
  .hero-slogan-decor-computer {
    left: calc(100% - 40px);
    top: 58px;
    width: 28px;
  }

  .hero-slogan-decor-flower {
    left: calc(100% + 36px);
    top: 0px;
    width: 20px;
  }
}

.hero-quote {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 400px;
  margin: var(--space-xl) auto 0;
  line-height: 2;
  text-align: left;
  letter-spacing: 0.02em;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-stat-value.hero-stat-date {
  font-size: 16px;
  font-weight: 600;
}

.hero-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ---- Post Grid ---- */
.post-grid-section {
  margin-top: clamp(64px, 7vw, 96px);
  padding-top: 0;
}

/* 提高特异性，避免被 media query 里 .container 的 padding 简写覆盖 */
.post-grid-section.container {
  padding-bottom: 150px;
}

.post-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.post-grid-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.post-grid-tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.tag-btn {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s ease;
}

.tag-btn:hover,
.tag-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 77, 0, 0.04);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

/* 置顶文章若为单数，单出来的最后一张卡片跨两列居中 */
.pinned-post-grid > :nth-child(2n + 1):last-child {
  grid-column: 1 / -1;
}

/* ---- Post Card ---- */
.post-card {
  width: 100%;
  max-width: min(80%, 240px);
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), background-color 0.35s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  background: var(--border-light);
}

.post-card:active {
  transform: scale(0.985);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--border-light);
}

.post-card-video-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d0d0d;
  border-bottom: 1px solid var(--border-light);
}

.post-card-video-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.post-card-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #232328 0%, #0e0e11 100%);
  gap: 10px;
  color: var(--text-muted);
  transition: background 0.3s ease;
}

.post-card:hover .post-card-video-placeholder {
  background: radial-gradient(circle at center, #2e2e36 0%, #121216 100%);
}

.post-card-video-center-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
}

.post-card:hover .post-card-video-center-icon {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.18);
}

.post-card-video-center-icon svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  fill: currentColor;
}

.post-card-video-hint {
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.post-card-video-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.post-card-video-badge svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  fill: currentColor;
}

.post-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--border-light), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 32px;
}

.post-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-tags {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.post-card-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.post-card-title {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 9.5px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.post-card-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.post-card-read {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}

.post-card:hover .post-card-read {
  color: var(--accent);
  transform: translateX(2px);
}

/* ---- Article Viewer (Sheet Modal) ---- */
.article-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(2px);
}

.article-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.article-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: translateY(105%);
  width: 100%;
  max-width: 680px;
  height: 92vh;
  height: 92dvh;
  z-index: 210;
  transition: transform 0.5s var(--ease-spring);
  pointer-events: none;
}

.article-wrapper.open {
  transform: translateY(0);
}

.article-panel {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
}

/* ---- Article Boundary Blur (Optical Blur Transition at Drawer Junctions) ---- */
.article-boundary-blur {
  position: absolute;
  pointer-events: none;
  z-index: 220;
}

.article-boundary-blur .header-blur-layer {
  position: absolute;
  inset: 0;
}

/* --- TOP BOUNDARY BLUR --- */
.article-boundary-blur-top {
  top: -60px;
  left: -120px;
  right: -120px;
  height: 120px;
}

@media (max-width: 768px) {
  .article-boundary-blur-top {
    top: -40px;
    height: 80px;
  }
}

.article-boundary-blur-top .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.article-boundary-blur-top .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
}

.article-boundary-blur-top .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
}

.article-boundary-blur-top .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
}

.article-boundary-blur-top .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to bottom, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to bottom, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.article-boundary-blur-top .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to bottom, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to bottom, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.article-boundary-blur-top .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to bottom, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to bottom, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

/* --- LEFT BOUNDARY BLUR --- */
.article-boundary-blur-left {
  left: -120px;
  top: -60px;
  bottom: 0;
  width: 200px;
}

.article-boundary-blur-left .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.article-boundary-blur-left .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to right, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to right, transparent 10%, black 30%, black 70%, transparent 90%);
}

.article-boundary-blur-left .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
}

.article-boundary-blur-left .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
}

.article-boundary-blur-left .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to right, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to right, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.article-boundary-blur-left .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to right, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to right, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.article-boundary-blur-left .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to right, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to right, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

/* --- RIGHT BOUNDARY BLUR --- */
.article-boundary-blur-right {
  right: -230px;
  top: -60px;
  bottom: 0;
  width: 360px;
}

.article-boundary-blur-right .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.article-boundary-blur-right .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to right, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to right, transparent 10%, black 30%, black 70%, transparent 90%);
}

.article-boundary-blur-right .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
}

.article-boundary-blur-right .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
}

.article-boundary-blur-right .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to right, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to right, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.article-boundary-blur-right .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to right, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to right, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.article-boundary-blur-right .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to right, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to right, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

@media (max-width: 768px) {

  .article-boundary-blur-left,
  .article-boundary-blur-right {
    display: none;
  }
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  flex-shrink: 0;
}

.article-header-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.article-header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.article-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all 0.2s ease;
}

.article-close-btn:hover {
  background: var(--text-primary);
  color: white;
}

.article-header-blur {
  position: absolute;
  top: 0px;
  left: -60px;
  right: -60px;
  height: 100px;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
  /* border-radius: var(--radius-xl) var(--radius-xl) 0 0; */
}

@media (max-width: 768px) {
  .article-header-blur {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    height: 70px;
  }
}

.article-scroll {
  flex: 1;
  overflow-y: auto;
  margin-top: -64px;
  padding: calc(64px + var(--space-xl)) var(--space-xl) var(--space-xl);
  overscroll-behavior: contain;
}

.article-progress {
  height: 2px;
  background: var(--border-light);
  flex-shrink: 0;
}

.article-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* ---- Article Content ---- */
.article-meta {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
}

.article-meta-tags {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.article-meta-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(255, 77, 0, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
}

.article-meta-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.article-meta-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Prose Styles (Markdown rendered content) */
.prose h2 {
  font-size: 1.35em;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.15em;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
  color: var(--text-primary);
}

.prose p {
  margin-bottom: 1.2em;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 15px;
}

.prose pre {
  background: var(--text-primary);
  color: #F5F5F7;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: 1.5em 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
  background: rgba(255, 77, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.prose pre code {
  color: inherit;
  background: none;
  padding: 0;
}

.prose img {
  border-radius: var(--radius-md);
  margin: 1.5em 0;
  width: 100%;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-lg);
  color: var(--text-secondary);
  font-style: italic;
  margin: 1.5em 0;
}

.prose ul,
.prose ol {
  margin: 1em 0;
  padding-left: 1.5em;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 0.4em;
  line-height: 1.7;
  font-size: 15px;
}

.prose h1 {
  font-size: 1.5em;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.prose h4,
.prose h5,
.prose h6 {
  font-size: 1.05em;
  font-weight: 600;
  margin: 1.3em 0 0.4em;
  color: var(--text-primary);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.prose a:hover {
  opacity: 0.8;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}

.prose th,
.prose td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.prose th {
  background: rgba(128, 128, 128, 0.08);
  font-weight: 600;
  color: var(--text-primary);
}

.prose td {
  color: var(--text-secondary);
}

@keyframes mdPulseDot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.markdown-loading-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  animation: mdPulseDot 1.2s infinite ease-in-out;
}

/* ---- Markdown File Presentation in Drawer & Cards ---- */
.article-meta-tag-md {
  background: rgba(128, 128, 128, 0.12) !important;
  color: var(--text-secondary) !important;
  border: none !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
}

.post-card-tag-md {
  background: rgba(128, 128, 128, 0.12);
  color: var(--text-secondary);
  padding: 1px 5px;
  border-radius: 0;
  font-weight: 700;
}

.article-markdown-doc {
  margin-top: var(--space-xl);
}

.article-markdown-file-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.article-markdown-file-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-markdown-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: rgba(128, 128, 128, 0.12);
  border: none;
  padding: 3px 8px;
  border-radius: 0;
  white-space: nowrap;
}

.article-images {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.article-images img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.post-card-images {
  display: grid;
  gap: 4px;
  overflow: hidden;
  border-radius: 0;
  border-bottom: 1px solid var(--border-light);
}

.post-card-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
  transition: opacity 0.2s ease;
}

.post-card-images img:hover {
  opacity: 0.95;
}

/* 1 Image */
.grid-count-1 {
  grid-template-columns: 1fr;
}

.grid-count-1 img {
  aspect-ratio: auto;
  max-height: 600px;
  border-radius: var(--radius-sm);
}

/* 2 Images */
.grid-count-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* 3 Images */
.grid-count-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-count-3 img:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* 4 Images */
.grid-count-4 {
  grid-template-columns: repeat(2, 1fr);
}

/* 5 Images */
.grid-count-5 {
  grid-template-columns: repeat(6, 1fr);
}

.grid-count-5 img:nth-child(1),
.grid-count-5 img:nth-child(2) {
  grid-column: span 3;
}

.grid-count-5 img:nth-child(n+3) {
  grid-column: span 2;
}

/* 6+ Images (Bento layout) */
.grid-bento {
  grid-template-columns: repeat(3, 1fr);
}

.grid-bento img:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.article-end {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px dashed var(--border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--border);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- Video Player ---- */
.video-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  margin: var(--space-lg) auto;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Video Center Play Icon (pause state) ---- */
.video-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0; /* 没有圆角 */
  transition: opacity 0.25s ease;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.video-center-icon.hidden {
  opacity: 0;
}

/* ---- Video Loading Hint ---- */
.video-loading-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #f5f5f5;
  font-size: 13px;
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 4;
  user-select: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.9);
}

/* Web Fullscreen (网页全屏) */
body.has-web-fullscreen {
  overflow: hidden !important;
}

body.has-web-fullscreen .article-wrapper {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  transition: none !important;
}

body.has-web-fullscreen .article-panel {
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.has-web-fullscreen .article-boundary-blur,
body.has-web-fullscreen .article-header-blur,
body.has-web-fullscreen .article-header,
body.has-web-fullscreen .article-progress {
  display: none !important;
}

.video-container.web-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 100000 !important;
  background: #000 !important;
  aspect-ratio: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: none !important;
}

.video-container.web-fullscreen video {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* ---- Video Controls Bar (Apple-style) ---- */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.video-controls.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Progress Bar ---- */
.video-progress {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  margin-bottom: 10px;
  transition: height 0.15s ease;
}

.video-progress:hover {
  height: 5px;
}

.video-progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.video-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #fff;
  pointer-events: none;
}

/* ---- Controls Row ---- */
.video-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-ctrl-btn {
  background: none;
  border: none;
  padding: 6px;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.video-ctrl-btn:hover {
  opacity: 1;
}

/* Fullscreen container styling */
.video-container:fullscreen,
.video-container:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container:fullscreen video,
.video-container:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-time-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
  user-select: none;
  white-space: nowrap;
}

.video-time-sep {
  margin: 0 2px;
  opacity: 0.5;
}

/* ---- Sidebar ---- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-wrapper {
  position: fixed;
  top: 4px;
  right: 4px;
  bottom: 4px;
  width: 310px;
  z-index: 310;
  transform: translateX(120%);
  transition: transform 0.4s var(--ease-spring);
  pointer-events: none;
}

.sidebar-wrapper.open {
  transform: translateX(0);
}

.sidebar {
  position: relative;
  z-index: 325;
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- Sidebar Boundary Blur (Optical Blur Transition at Menu Junctions) ---- */
.sidebar-boundary-blur {
  position: absolute;
  pointer-events: none;
  z-index: 330;
}

.sidebar-boundary-blur .header-blur-layer {
  position: absolute;
  inset: 0;
}

/* --- LEFT BOUNDARY BLUR --- */
.sidebar-boundary-blur-left {
  left: -120px;
  top: -60px;
  bottom: -60px;
  width: 200px;
}

/* Masks for layers 1-3 are tightened so the edge blur fades out before the
   sidebar content (padding-left 24px) — previously they reached past it and
   wrongly fuzzed the left edge of the Topics tags. */
.sidebar-boundary-blur-left .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to right, transparent 0%, black 25%, black 60%, transparent 70%);
  mask: linear-gradient(to right, transparent 0%, black 25%, black 60%, transparent 70%);
}

.sidebar-boundary-blur-left .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to right, transparent 10%, black 30%, black 58%, transparent 68%);
  mask: linear-gradient(to right, transparent 10%, black 30%, black 58%, transparent 68%);
}

.sidebar-boundary-blur-left .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to right, transparent 20%, black 40%, black 56%, transparent 66%);
  mask: linear-gradient(to right, transparent 20%, black 40%, black 56%, transparent 66%);
}

.sidebar-boundary-blur-left .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
}

.sidebar-boundary-blur-left .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to right, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to right, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.sidebar-boundary-blur-left .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to right, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to right, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.sidebar-boundary-blur-left .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to right, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to right, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

/* --- RIGHT BOUNDARY BLUR --- */
.sidebar-boundary-blur-right {
  right: -60px;
  top: -60px;
  bottom: -60px;
  width: 120px;
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to right, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to right, transparent 10%, black 30%, black 70%, transparent 90%);
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to right, transparent 30%, black 45%, black 55%, transparent 70%);
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to right, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to right, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to right, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to right, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.sidebar-boundary-blur-right .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to right, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to right, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

/* --- TOP BOUNDARY BLUR --- */
.sidebar-boundary-blur-top {
  top: -100px;
  left: -60px;
  right: -60px;
  height: 120px;
  z-index: 0;
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to bottom, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to bottom, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to bottom, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to bottom, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.sidebar-boundary-blur-top .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to bottom, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to bottom, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

/* --- BOTTOM BOUNDARY BLUR --- */
.sidebar-boundary-blur-bottom {
  bottom: -60px;
  left: -70px;
  right: -60px;
  height: 120px;
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(1) {
  -webkit-mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  mask: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(2) {
  -webkit-mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
  mask: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(3) {
  -webkit-mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
  mask: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%);
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(4) {
  -webkit-mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
  mask: linear-gradient(to bottom, transparent 30%, black 45%, black 55%, transparent 70%);
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(5) {
  -webkit-mask: linear-gradient(to bottom, transparent 38%, black 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
  mask: linear-gradient(to bottom, transparent 38%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 52%, transparent 62%);
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(6) {
  -webkit-mask: linear-gradient(to bottom, transparent 43%, black 50%, black 50%, transparent 57%);
  mask: linear-gradient(to bottom, transparent 43%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 57%);
}

.sidebar-boundary-blur-bottom .header-blur-layer:nth-child(7) {
  -webkit-mask: linear-gradient(to bottom, transparent 46%, black 50%, black 50%, transparent 54%);
  mask: linear-gradient(to bottom, transparent 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 50%, transparent 54%);
}

.sidebar-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 340;
  pointer-events: auto;
}

.sidebar-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.sidebar-close-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
  text-decoration-color: transparent;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--space-lg) + 56px) var(--space-lg) var(--space-lg);
  position: relative;
}

.sidebar-nav {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.sidebar-nav li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.sidebar-nav li a:hover {
  color: var(--text-primary);
  text-decoration-color: transparent;
}

.sidebar-nav li a.active {
  color: var(--text-primary);
  font-weight: 700;
}

.sidebar-tags-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.sidebar-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.sidebar-tag {
  padding: 2px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border-radius: 0;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.sidebar-tag:hover {
  color: var(--accent);
  text-decoration-color: transparent;
}

/* ---- Footer ---- */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s var(--ease-out) both;
}

/* Staggered delays for post cards */
.post-card:nth-child(1) {
  animation-delay: 0.05s;
}

.post-card:nth-child(2) {
  animation-delay: 0.1s;
}

.post-card:nth-child(3) {
  animation-delay: 0.15s;
}

.post-card:nth-child(4) {
  animation-delay: 0.2s;
}

.post-card:nth-child(5) {
  animation-delay: 0.25s;
}

.post-card:nth-child(6) {
  animation-delay: 0.3s;
}

.post-card:nth-child(7) {
  animation-delay: 0.35s;
}

.post-card:nth-child(8) {
  animation-delay: 0.4s;
}

.post-card:nth-child(9) {
  animation-delay: 0.45s;
}

.post-card:nth-child(10) {
  animation-delay: 0.5s;
}

.post-card:nth-child(11) {
  animation-delay: 0.55s;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .header-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-member {
    left: 20px;
  }

  .header-auth {
    right: 20px;
  }

  .hero {
    padding-top: 190px;
    padding-bottom: var(--space-2xl);
  }

  .post-grid-section {
    margin-top: 60px;
    padding-top: var(--space-lg);
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .post-grid-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .hero-meta {
    flex-wrap: wrap;
  }

  .article-scroll {
    padding: calc(64px + var(--space-lg)) var(--space-lg) var(--space-lg);
  }

  .article-wrapper {
    max-width: 100%;
  }

  .article-panel {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .sidebar-wrapper {
    width: calc(100% - 16px);
    max-width: 320px;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-info {
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Image Grid & Gallery ---- */
.image-grid-section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  margin-top: 80px;
}

.image-grid-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  opacity: 0.8;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.image-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-card:hover img {
  transform: scale(1.05);
}

.image-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
  transition: opacity 0.3s ease;
}

.image-card:hover .image-card-overlay {
  opacity: 1;
}

.image-card-name {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Lightbox Modal ---- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin-top: var(--space-md);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.lightbox-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 2020;
}

.lightbox-close-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Custom range slider styling (black sliders) */
.black-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 120px;
}

.black-slider:focus {
  outline: none;
}

/* Webkit browser slider track */
.black-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: #000000;
  border-radius: 2px;
}

/* Webkit browser slider thumb (handle) */
.black-slider::-webkit-slider-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -5px; /* center it vertically */
  border: 1px solid #000000;
  transition: transform 0.1s ease;
}

.black-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Firefox slider track */
.black-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: #000000;
  border-radius: 2px;
}

/* Firefox slider thumb */
.black-slider::-moz-range-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  border: 1px solid #000000;
  transition: transform 0.1s ease;
}

.black-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Cross-browser safe line clamp utility */
.clamp-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Dark theme (follows system; toggle from the sidebar menu) ---- */
:root {
  --bg-rgb: 250, 250, 250;
  --surface-rgb: 255, 255, 255;
}

html[data-theme="dark"] {
  --bg: #121212;
  --surface: #1c1c1c;
  --text-primary: #ededed;
  --text-secondary: #b6b6b6;
  --text-muted: #8a8a8a;
  --accent: #c9bdb4;
  --accent-hover: #ff6a3d;
  --border: #333333;
  --border-light: #2a2a2a;
  --bg-rgb: 18, 18, 18;
  --surface-rgb: 28, 28, 28;
}

/* Header/article buttons: keep a dark-appropriate hover state in dark mode */
html[data-theme="dark"] .article-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

html[data-theme="dark"] .sidebar-close-btn:hover {
  color: #ffffff;
  text-decoration-color: transparent;
}

/* Code blocks keep a dark background in dark mode */
html[data-theme="dark"] .prose pre {
  background: #1b1b1b;
}

.sidebar-theme-row {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-xl);
}

.sidebar-theme-btn {
  flex: 1;
  display: block;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.sidebar-theme-btn:hover {
  color: var(--text-primary);
  text-decoration-color: transparent;
}

.sidebar-system-btn {
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-system-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.sidebar-system-btn.active {
  background: var(--text-primary);
  color: var(--surface);
  border-color: var(--text-primary);
}

.sidebar-logout-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--space-lg) var(--space-lg);
}

.sidebar-logout-btn {
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-logout-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.sidebar-logout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Expand/collapse button under the post list (was using the browser default
   black text, which became invisible in dark mode) */
.expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.expand-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* Gentle vertical bobbing animation for the handwritten expand button */
.expand-float {
  animation: expandFloat 3s ease-in-out infinite;
}

@keyframes expandFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ---- Progressive image loading (X-style blur-up) ---- */
.progressive-img {
  position: relative;
  overflow: hidden;
}

.progressive-img .progressive-img-thumb,
.progressive-img .progressive-img-full {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progressive-img .progressive-img-thumb {
  position: absolute;
  inset: 0;
  filter: blur(20px);
  transform: scale(1.15);
  opacity: 1;
  transition: opacity 0.5s ease;
}

.progressive-img .progressive-img-full {
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.progressive-img.is-loaded .progressive-img-thumb {
  opacity: 0;
}

.progressive-img.is-loaded .progressive-img-full {
  opacity: 1;
}

.progressive-img.full-failed .progressive-img-thumb {
  filter: blur(2px);
  transform: scale(1.02);
  transition: filter 0.5s ease, transform 0.5s ease;
}

/* Image grid card: placeholder fills the whole cell */
.image-card > .progressive-img {
  position: absolute;
  inset: 0;
}

/* Multi-image grids keep the plain <img> layout, blur sharpens on load */
.progressive-blur {
  filter: blur(16px);
  transform: scale(1.06);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.progressive-blur.is-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* Keep existing hover transitions when progressive classes are applied */
.image-card .progressive-img-full {
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card-images .progressive-blur {
  transition: filter 0.5s ease, transform 0.5s ease, opacity 0.2s ease;
}

/* 右栏（菜单侧栏）全部文字用白色（放在末尾以覆盖前面所有颜色规则） */
.sidebar-header h2,
.sidebar-close-btn,
.sidebar-close-btn:hover,
.sidebar-nav li a,
.sidebar-nav li a:hover,
.sidebar-nav li a.active,
.sidebar-theme-btn,
.sidebar-theme-btn:hover,
.sidebar-tags-title,
.sidebar-tag,
.sidebar-tag:hover {
  color: #ffffff;
}

/* TOPICS 标签：每行最多两个、去掉下划线；颜色恢复白色（修复深色下变黑不可见的 bug） */
.sidebar-tags-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.sidebar-tag,
.sidebar-tag:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ============================================
   Auth Pages — CableApp Style (Login / Register / User)
   ============================================ */

/* ---- Shared CSS variables ---- */
.login-page {
  --lp-bg: #ffffff;
  --lp-text: #1a1a1a;
  --lp-muted: #666;
  --lp-input-bg: #f4f4f5;
  --lp-input-border: #e0e0e0;
  --lp-divider: #e0e0e0;
  --lp-placeholder: #999;
  --lp-error-bg: rgba(248, 81, 73, 0.08);
  --lp-error-border: rgba(248, 81, 73, 0.3);
  --lp-error-text: #d32f2f;
  --lp-success-bg: rgba(46, 204, 113, 0.08);
  --lp-success-border: rgba(46, 204, 113, 0.3);
  --lp-success-text: #27ae60;
  --lp-accent: #dc2626;
  --lp-radius: 0px;
  --lp-logo-opacity: 0.08;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--lp-bg);
  position: relative;
  padding-top: 20px;
}

html[data-theme="dark"] .login-page {
  --lp-bg: #121212;
  --lp-text: #ededed;
  --lp-muted: #8a8a8a;
  --lp-input-bg: #18181b;
  --lp-input-border: #333333;
  --lp-divider: #333333;
  --lp-placeholder: #8a8a8a;
  --lp-error-bg: rgba(248, 81, 73, 0.1);
  --lp-error-border: rgba(248, 81, 73, 0.3);
  --lp-error-text: #f85149;
  --lp-success-bg: rgba(46, 204, 113, 0.1);
  --lp-success-border: rgba(46, 204, 113, 0.3);
  --lp-success-text: #2ecc71;
  --lp-accent: #c9bdb4;
  --lp-radius: 0px;
  --lp-logo-opacity: 0.05;
}

/* ---- Bottom logos (decorative) ---- */
.bottom-logos {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 280px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bottom-logo { display: none; }

/* ---- Login card (no outer frame) ---- */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.register-card {
  max-width: 420px;
}

.login-heading {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lp-text);
  margin-bottom: 28px;
}

.login-heading-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  user-select: none;
  pointer-events: none;
}

/* 图片笔画是白色；浅色模式下反色成黑字，保持可见 */
.login-heading-img.invert {
  filter: invert(1);
}

.reg-heading {
  font-size: 1.15rem;
  margin-bottom: 20px;
}

/* ---- Form ---- */
.login-card form {
  width: 100%;
}

.form-group {
  margin-bottom: 18px;
  width: 100%;
}

.form-input {
  width: 100%;
  background: var(--lp-input-bg);
  border: 3px solid var(--lp-input-border);
  border-radius: 0;
  padding: 12px 14px;
  color: var(--lp-text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-input::placeholder {
  color: var(--lp-placeholder);
  opacity: 0.7;
}

.form-input:focus,
.form-input:focus-visible {
  outline: none;
  border-color: var(--lp-text);
  box-shadow: none;
}

.auth-input-row {
  display: flex;
  gap: 8px;
}

.auth-input-flex {
  flex: 1;
}

/* ---- Login button (primary) ---- */
.login-btn {
  width: 100%;
  background: #000000;
  color: #ffffff;
  border: 3px solid #000000;
  border-radius: 0;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 6px;
}

.login-btn:hover:not(:disabled) {
  opacity: 0.85;
}

.login-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.login-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

html[data-theme="dark"] .login-btn {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

html[data-theme="dark"] .login-btn:hover:not(:disabled) {
  opacity: 0.85;
}

/* ---- Divider: line — icons — line ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  width: 100%;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--lp-divider);
}

.divider-logos {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.divider-icon-text {
  color: #FFB400;
  font-size: 14px;
  line-height: 1;
}

/* ---- Signup area (register link) ---- */
.signup-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.signup-btn {
  width: 100%;
  background: transparent;
  color: var(--lp-text);
  border: 3px solid var(--lp-text);
  border-radius: 0;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: block;
}

.signup-btn:hover {
  background: var(--lp-text);
  color: var(--lp-bg);
}

.signup-btn:active {
  transform: scale(0.98);
}

/* ---- Error / Success ---- */
.login-error {
  background: var(--lp-error-bg);
  border: 3px solid var(--lp-error-border);
  border-radius: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--lp-error-text);
  margin-bottom: 16px;
  text-align: center;
}

.login-success {
  background: var(--lp-success-bg);
  border: 3px solid var(--lp-success-border);
  border-radius: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--lp-success-text);
  margin-bottom: 16px;
  text-align: center;
}

/* ---- Gray button (disabled state) ---- */
.login-btn.login-btn--gray {
  background: var(--lp-input-border);
  color: var(--lp-muted);
  border-color: var(--lp-input-border);
  opacity: 1;
  cursor: not-allowed;
  pointer-events: auto;
}

.login-btn.login-btn--gray:disabled {
  cursor: not-allowed;
}

/* ---- Turnstile widget ---- */
.login-turnstile {
  min-height: 65px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.login-turnstile:empty {
  display: none;
}

/* ---- Login footer links ---- */
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.82rem;
}

.login-footer a {
  color: var(--lp-muted);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  color: var(--lp-text);
}

/* ---- Auth pages: card centered, footer full-bleed at bottom ---- */
.login-page {
  align-items: stretch;
}

.login-page > .login-card,
.login-page > .register-card {
  margin: auto;
  margin-bottom: 60px;
  padding-top: 80px;
  max-width: 380px;
  width: 100%;
}

.login-page > .footer {
  flex-shrink: 0;
}

.auth-loading {
  color: var(--lp-muted);
  font-size: 0.85rem;
  padding: 40px 0;
  text-align: center;
}

/* ---- Register subtitle ---- */
.reg-subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--lp-muted);
  margin-bottom: 24px;
}

.reg-subtitle strong {
  color: var(--lp-text);
}

.reg-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--lp-muted);
  line-height: 1.5;
  cursor: default;
  margin-bottom: 8px;
}

/* ---- Progress indicator ---- */
.reg-progress {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 28px;
  width: 100%;
}

.reg-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.reg-bar-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lp-muted);
  transition: color 0.2s;
}

.reg-bar-track {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--lp-input-border);
  overflow: hidden;
}

.reg-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--lp-input-border);
  border-radius: 2px;
  transition: width 0.3s, background 0.2s;
}

.reg-bar-item.active .reg-bar-num { color: var(--lp-text); }
.reg-bar-item.active .reg-bar-fill { width: 100%; background: var(--lp-text); }
.reg-bar-item.done .reg-bar-num { color: var(--lp-text); }
.reg-bar-item.done .reg-bar-fill { width: 100%; background: var(--lp-text); }



/* ---- Code input boxes ---- */
.reg-code-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.reg-code-input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--lp-input-bg);
  border: 3px solid var(--lp-input-border);
  border-radius: 0;
  color: var(--lp-text);
  outline: none;
  font-family: inherit;
}

.reg-code-input:focus,
.reg-code-input:focus-visible {
  outline: none;
  border-color: var(--lp-input-border);
  box-shadow: none;
}

.reg-code-input.error {
  border-color: #e74c3c;
  color: #e74c3c;
}

.reg-verifying {
  text-align: center;
  font-size: 0.82rem;
  color: var(--lp-muted);
}

/* ---- Hint text ---- */
.reg-hint {
  font-size: 0.78rem;
  margin: 4px 0 0 2px;
}

.reg-hint.ok { color: #2ecc71; }
.reg-hint.err { color: var(--lp-error-text); }

/* ---- Step switch animation ---- */
.reg-step-content {
  animation-duration: 0.32s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reg-step-out {
  animation-name: regStepOut;
}

.reg-step-in {
  animation-name: regStepIn;
}

@keyframes regStepOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-16px); }
}

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

@media (prefers-reduced-motion: reduce) {
  .reg-step-content { animation-duration: 0.15s; }
  .reg-step-out, .reg-step-in { animation-name: regFadeOnly; }
  @keyframes regFadeOnly {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ---- Loading center ---- */
.reg-loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 0;
}

.reg-loading-center p {
  font-size: 0.85rem;
  color: var(--lp-muted);
}

/* ============================================
   User Profile
   ============================================ */

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
}

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

.user-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lp-text);
  color: var(--lp-bg);
  font-size: 2rem;
  font-weight: 700;
}

.user-info-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.user-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--lp-input-bg);
  border: 3px solid var(--lp-input-border);
  border-radius: 0;
}

.user-info-label {
  font-size: 0.82rem;
  color: var(--lp-muted);
}

.user-info-value {
  font-size: 0.9rem;
  color: var(--lp-text);
}

.user-logout-btn {
  border-color: var(--lp-error-border);
  color: var(--lp-error-text);
  background: transparent;
  transition: all 0.2s ease;
}

.user-logout-btn:hover {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #ffffff !important;
}

html[data-theme="dark"] .user-logout-btn:hover {
  background: #f85149;
  border-color: #f85149;
  color: #ffffff !important;
}

.user-nickname-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-edit-btn {
  background: transparent;
  border: 1px solid var(--lp-muted);
  color: var(--lp-muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 0;
  font-family: inherit;
  transition: all 0.15s ease;
}

.user-edit-btn:hover {
  color: var(--lp-text);
  border-color: var(--lp-text);
}

.user-nickname-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.user-nickname-input {
  background: var(--lp-card-bg);
  border: 2px solid var(--lp-text);
  color: var(--lp-text);
  padding: 4px 8px;
  font-size: 0.85rem;
  font-family: inherit;
  width: 120px;
  max-width: 100%;
  border-radius: 0;
  outline: none;
}

.user-nickname-input:focus {
  border-color: #dc2626;
}

.user-nickname-action-btn {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 0;
  transition: opacity 0.15s;
}

.user-nickname-btn-save {
  background: var(--lp-text);
  color: var(--lp-bg);
  border: 2px solid var(--lp-text);
}

.user-nickname-btn-save:hover {
  opacity: 0.85;
}

.user-nickname-btn-cancel {
  background: transparent;
  color: var(--lp-muted);
  border: 2px solid var(--lp-input-border);
}

.user-nickname-btn-cancel:hover {
  color: var(--lp-text);
  border-color: var(--lp-text);
}

.user-nickname-error {
  font-size: 0.8rem;
  color: var(--lp-error-text);
  background: var(--lp-error-bg);
  border: 2px solid var(--lp-error-border);
  padding: 6px 10px;
  margin-top: -6px;
  margin-bottom: 6px;
  text-align: right;
}

/* ============================================
   User Dashboard & PIGEON WORLD Server Section
   ============================================ */

.user-dashboard-container {
  margin: 0 auto;
  padding-top: 40px;
  padding-bottom: 60px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-sizing: border-box;
  padding-left: 16px;
  padding-right: 16px;
}

.user-dashboard-container > .login-card {
  margin: 0 !important;
  padding: 32px 28px 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.user-profile-card {
  border: 3px solid var(--lp-input-border);
  background: var(--lp-input-bg);
}

.pigeon-world-card {
  width: 100%;
  box-sizing: border-box;
  border: 3px solid var(--lp-input-border);
  background: var(--lp-input-bg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.pw-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pw-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pw-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #dc2626;
  text-transform: uppercase;
}

.pw-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: var(--lp-text);
  letter-spacing: -0.01em;
}

.pw-header-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.pw-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 0;
  background: rgba(239, 68, 68, 0.08);
  border: 2px solid rgba(239, 68, 68, 0.5);
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

html[data-theme="dark"] .pw-status-badge {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(239, 68, 68, 0.12);
}

.pw-status-badge.pw-status-running {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.5);
  color: var(--lp-success-text);
}

.pw-power-btn,
.pw-shutdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 0;
  background: transparent;
  border: 2px solid var(--lp-input-border);
  color: var(--lp-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pw-power-btn.is-power-off:hover {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.6);
  color: var(--lp-success-text);
}

.pw-power-btn.is-running:hover,
.pw-shutdown-btn:hover {
  background: var(--lp-error-bg);
  border-color: var(--lp-error-border);
  color: var(--lp-error-text);
}

.pw-footer-actions {
  margin-top: 6px;
  display: flex;
  justify-content: stretch;
}

.pw-reset-btn {
  width: 100%;
  padding: 8px 16px;
  border-radius: 0;
  background: transparent;
  border: 2px solid var(--lp-input-border);
  color: var(--lp-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pw-reset-btn:hover {
  border-color: var(--lp-text);
  color: var(--lp-text);
  background: var(--lp-bg);
}

.pw-tip-msg {
  font-size: 0.72rem;
  color: var(--lp-muted);
  background: var(--lp-bg);
  border: 1px dashed var(--lp-input-border);
  padding: 3px 8px;
  white-space: nowrap;
  animation: fadeIn 0.2s ease;
}

.pw-desc {
  font-size: 0.82rem;
  color: var(--lp-muted);
  line-height: 1.45;
  margin: 0;
}

.pw-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.pw-spec-item {
  border: 2px solid var(--lp-input-border);
  background: var(--lp-bg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.pw-spec-label {
  font-size: 0.75rem;
  color: var(--lp-muted);
  font-weight: 500;
}

.pw-spec-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--lp-text);
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pw-spec-sub {
  font-size: 0.7rem;
  color: var(--lp-muted);
  opacity: 0.85;
}

.pw-traffic-box {
  border: 2px solid var(--lp-input-border);
  background: var(--lp-bg);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.pw-traffic-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.pw-traffic-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lp-text);
}

.pw-traffic-highlight {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lp-success-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pw-progress-track {
  width: 100%;
  height: 8px;
  background: var(--lp-input-border);
  overflow: hidden;
  position: relative;
}

.pw-progress-fill {
  height: 100%;
  background: #2ecc71;
  transition: width 0.3s ease;
}

.pw-traffic-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--lp-muted);
}

.pw-traffic-stats strong {
  color: var(--lp-text);
}

.pw-details-list {
  border-top: 1px dashed var(--lp-input-border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.pw-detail-label {
  color: var(--lp-muted);
}

.pw-detail-val {
  color: var(--lp-text);
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pw-footer-tip {
  font-size: 0.72rem;
  color: var(--lp-muted);
  text-align: center;
  margin-top: 4px;
  opacity: 0.85;
}

.user-dashboard-actions {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 380px) {
  .user-dashboard-container {
    padding-top: 24px;
    padding-bottom: 40px;
    gap: 16px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .pw-specs-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Floating back to home button (like /m) ---- */
.page-back-home-btn {
  position: fixed;
  top: 40px;
  left: 40px;
  background: transparent;
  border: none;
  color: var(--lp-text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  font-family: inherit;
}

.page-back-home-btn:hover {
  opacity: 0.7;
  transform: translateX(-2px);
}

@media (max-width: 600px) {
  .page-back-home-btn {
    top: 20px;
    left: 16px;
    font-size: 0.95rem;
  }
}

/* ============================================
   PIGEON WORLD Web Terminal & OS Modal Styles
   ============================================ */

.pw-terminal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 0;
  background: var(--lp-text);
  color: var(--lp-bg);
  border: 2px solid var(--lp-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pw-terminal-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ---- Terminal Modal Window ---- */
.pw-terminal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.pw-terminal-window {
  width: 100%;
  max-width: 820px;
  height: 560px;
  max-height: 90vh;
  background: #0d1117;
  color: #c9d1d9;
  border: 2px solid #30363d;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.pw-term-titlebar {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.pw-term-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-term-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
}

.pw-term-dot.dot-close { background: #ff5f56; }
.pw-term-dot.dot-min { background: #ffbd2e; }
.pw-term-dot.dot-max { background: #27c93f; }

.pw-term-title {
  font-size: 0.8rem;
  color: #8b949e;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 440px;
}

.pw-term-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pw-term-act-btn {
  background: #21262d;
  border: 1px solid #30363d;
  color: #c9d1d9;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pw-term-act-btn:hover {
  background: #30363d;
  color: #ffffff;
}

.pw-term-body {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  font-size: 0.84rem;
  line-height: 1.5;
  background: #090d13;
  cursor: text;
}

.pw-term-body::-webkit-scrollbar {
  width: 8px;
}

.pw-term-body::-webkit-scrollbar-thumb {
  background: #30363d;
}

.pw-term-connecting {
  color: #58a6ff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}

.pw-term-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #58a6ff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pw-term-line pre {
  margin: 0;
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-all;
}

.pw-term-line.pw-term-prompt {
  color: #58a6ff;
  font-weight: 600;
  margin-top: 6px;
}

.pw-term-line.pw-term-output {
  color: #c9d1d9;
}

.pw-term-line.pw-term-error {
  color: #ff7b72;
}

.pw-term-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.pw-term-prompt {
  color: #58a6ff;
  font-weight: 600;
  white-space: nowrap;
}

.pw-term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f0f6fc;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin: 0;
  caret-color: #58a6ff;
}

.pw-term-statusbar {
  background: #161b22;
  border-top: 1px solid #30363d;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #8b949e;
}

/* ---- OS Select Modal Window ---- */
.os-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.os-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--lp-bg);
  border: 3px solid var(--lp-input-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.os-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.os-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lp-text);
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}

.os-modal-close {
  background: transparent;
  border: none;
  color: var(--lp-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.os-modal-close:hover {
  color: var(--lp-text);
}

.os-modal-desc {
  font-size: 0.84rem;
  color: var(--lp-muted);
  line-height: 1.5;
  margin: 0;
}

.os-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--lp-input-border);
  padding-bottom: 8px;
}

.os-tab-btn {
  background: transparent;
  border: 2px solid transparent;
  color: var(--lp-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.15s ease;
}

.os-tab-btn.active {
  background: var(--lp-input-bg);
  border-color: var(--lp-input-border);
  color: var(--lp-text);
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.os-item {
  border: 2px solid var(--lp-input-border);
  background: var(--lp-input-bg);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.os-item:hover {
  border-color: var(--lp-text);
  transform: translateY(-1px);
}

.os-item.selected {
  border-color: var(--lp-text);
  outline: 2px solid var(--lp-accent);
  background: var(--lp-bg);
}

.os-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.os-icon {
  font-size: 1.4rem;
}

.os-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border: 1.5px solid;
  color: var(--lp-text);
}

.os-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lp-text);
}

.os-fullname {
  font-size: 0.75rem;
  color: var(--lp-muted);
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.os-desc {
  font-size: 0.78rem;
  color: var(--lp-muted);
  line-height: 1.4;
  margin: 4px 0;
}

.os-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--lp-muted);
  border-top: 1px dashed var(--lp-input-border);
  padding-top: 6px;
  margin-top: auto;
}

.os-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 2px solid var(--lp-input-border);
  padding-top: 16px;
}

.os-cancel-btn {
  padding: 10px 18px;
  background: transparent;
  border: 2px solid var(--lp-input-border);
  color: var(--lp-muted);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.os-cancel-btn:hover {
  border-color: var(--lp-text);
  color: var(--lp-text);
}

.os-confirm-btn {
  padding: 10px 22px;
  background: var(--lp-text);
  color: var(--lp-bg);
  border: 2px solid var(--lp-text);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.os-confirm-btn:hover {
  opacity: 0.85;
}

.os-confirm-btn:disabled,
.os-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   ServerPage (/server) & ServerTaskDrawer Styles
   ========================================================================== */

.server-page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #090a0f;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  position: relative;
  overflow-x: hidden;
}

.server-top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: #111319;
  border-bottom: 2px solid #262933;
  gap: 12px;
  z-index: 100;
  box-sizing: border-box;
}

.server-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.server-back-link {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border: 1px solid #374151;
  background: #1f2937;
  transition: all 0.15s ease;
}

.server-back-link:hover {
  color: #ffffff;
  border-color: #60a5fa;
  background: #2563eb;
}

.server-brand-badge {
  background: #ffffff;
  color: #000000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  letter-spacing: 0.05em;
}

.server-meta-chip {
  font-size: 0.75rem;
  color: #9ca3af;
  background: #181b22;
  padding: 3px 8px;
  border: 1px solid #2d313d;
}

.server-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-banner-tip {
  font-size: 0.78rem;
  color: #e5e7eb;
  background: #1c1d22;
  border: 1px solid #374151;
  padding: 4px 10px;
}

.server-terminal-stage {
  flex: 1;
  display: flex;
  padding: 12px;
  box-sizing: border-box;
  background: #090a0f;
}

.server-terminal-stage .web-terminal-container {
  width: 100%;
  max-width: 100%;
  height: calc(100vh - 65px);
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: 2px solid #262933;
  display: flex;
  flex-direction: column;
}

.server-terminal-stage .web-terminal-screen {
  flex: 1;
  height: auto;
  max-height: none;
}

.server-page-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #090a0f;
  color: #ffffff;
  font-family: monospace;
}

/* Web Terminal Special Log Line Colors */
.terminal-line.install-log {
  color: #f3f4f6;
  line-height: 1.45;
}

.terminal-line.warn,
.terminal-line.install-warn {
  color: #fbbf24;
  line-height: 1.45;
}

.terminal-line.error,
.terminal-line.install-error {
  color: #f87171;
  line-height: 1.45;
}

.terminal-line.prompt-banner {
  color: #ffffff;
  font-weight: bold;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* ==========================================================================
   Server Task Drawer Styles
   ========================================================================== */

.pw-drawer-trigger-wrap {
  display: inline-flex;
}

.pw-drawer-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #181b22;
  border: 1px solid #374151;
  color: #e5e7eb;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  /* Strictly no animations, no transitions on hover, pure highlight */
  transition: none;
}

.pw-drawer-trigger-btn:hover {
  border-color: #ffffff;
  background: #27272a;
  color: #ffffff;
  transform: none;
  animation: none;
}

.pw-drawer-trigger-btn.is-installing {
  border-color: #71717a;
  background: #18181b;
  color: #ffffff;
}

.pw-drawer-trigger-btn.is-installing:hover {
  background: #27272a;
  border-color: #ffffff;
  color: #ffffff;
}

.pw-drawer-toggle-arrow {
  font-size: 0.65rem;
  color: #9ca3af;
}

/* Drawer Container */
.pw-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  backdrop-filter: blur(2px);
}

.pw-task-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #12141a;
  border-left: 2px solid #2d313d;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.pw-task-drawer.is-open {
  right: 0;
}

.pw-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #181b22;
  border-bottom: 2px solid #262933;
}

.pw-drawer-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-drawer-header-title h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: 0.02em;
}

.pw-drawer-close-btn {
  background: transparent;
  border: 1px solid #374151;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.pw-drawer-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Tabs */
.pw-drawer-tabs {
  display: flex;
  border-bottom: 2px solid #262933;
  background: #0f1015;
}

.pw-drawer-tab-btn {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #9ca3af;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.pw-drawer-tab-btn:hover {
  color: #ffffff;
}

.pw-drawer-tab-btn.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  background: #27272a;
}

.pw-drawer-badge {
  font-size: 0.65rem;
  background: #ffffff;
  color: #000000;
  padding: 1px 5px;
  font-weight: 800;
}

/* Drawer Body */
.pw-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Active Install Task Card */
.pw-task-card.active-install {
  border: 2px solid #ffffff;
  background: #18181b;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pw-task-badge.installing {
  font-size: 0.7rem;
  font-weight: 800;
  background: #ffffff;
  color: #000000;
  padding: 2px 6px;
}

.pw-task-time {
  font-size: 0.75rem;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.pw-task-card-title {
  margin: 0;
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 700;
}

.pw-task-card-sub {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.4;
}

.pw-task-progress-wrap {
  width: 100%;
  height: 8px;
  background: #27272a;
  overflow: hidden;
  margin-top: 4px;
}

.pw-task-progress-bar {
  height: 100%;
  background: #ffffff;
  transition: width 0.3s ease;
}

.pw-task-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #d1d5db;
}

.pw-task-detail-list {
  margin-top: 6px;
  border-top: 1px solid #282c37;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pw-task-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
}

.pw-task-detail-row span {
  color: #9ca3af;
}

.pw-task-detail-row strong {
  color: #e5e7eb;
}

/* Background Daemon List */
.pw-daemon-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-daemon-group-title {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.pw-daemon-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: #151820;
  border: 1px solid #262a36;
}

.pw-daemon-icon {
  font-size: 1.1rem;
}

.pw-daemon-content {
  flex: 1;
}

.pw-daemon-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f3f4f6;
}

.pw-daemon-desc {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 2px;
}

.pw-daemon-status {
  font-size: 0.68rem;
  padding: 1px 5px;
  font-weight: 700;
}

.pw-daemon-status.online {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pw-daemon-status.stand-by {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Resource Metrics Card */
.pw-metrics-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pw-metrics-item {
  background: #151820;
  border: 1px solid #262a36;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pw-metrics-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #d1d5db;
}

.pw-metrics-header strong {
  color: #ffffff;
}

.pw-metrics-sub {
  font-size: 0.72rem;
  color: #9ca3af;
}

.pw-metrics-track {
  width: 100%;
  height: 6px;
  background: #282c37;
  overflow: hidden;
  margin: 3px 0;
}

.pw-metrics-fill {
  height: 100%;
  background: #ffffff;
  transition: width 0.3s ease;
}

/* Drawer Footer */
.pw-drawer-footer {
  padding: 14px 18px;
  background: #181b22;
  border-top: 2px solid #262933;
}

.pw-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-drawer-act-btn {
  width: 100%;
  padding: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid;
  border-radius: 0;
  transition: all 0.15s ease;
}

.pw-drawer-act-btn.primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.pw-drawer-act-btn.primary:hover {
  background: #e4e4e7;
}

.pw-drawer-act-btn.warn {
  background: transparent;
  border-color: #71717a;
  color: #a1a1aa;
}

.pw-drawer-act-btn.warn:hover {
  background: #27272a;
  color: #ffffff;
}

.pw-drawer-act-btn.danger {
  background: transparent;
  border-color: #ef4444;
  color: #ef4444;
}

.pw-drawer-act-btn.danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.pw-drawer-nav-btn {
  display: block;
  text-align: center;
  padding: 6px;
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: none;
  border: 1px solid #374151;
  border-radius: 0;
  transition: all 0.15s ease;
}

.pw-drawer-nav-btn:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: #27272a;
}

@media (max-width: 640px) {
  .hidden-mobile {
    display: none !important;
  }

  .pw-task-drawer {
    width: 100vw;
    right: -100vw;
  }
}

/* PIGEON WORLD Task Center & Context Menu Styles */
.pw-task-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #9ca3af;
  margin-bottom: 8px;
}

.pw-task-list-hint {
  font-size: 0.7rem;
  color: #71717a;
}

.pw-task-list-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.pw-task-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pw-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-task-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #16181f;
  border: 1px solid #27272a;
  border-radius: 0;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pw-task-item:hover {
  background: #22252e;
  border-color: #52525b;
}

.pw-task-item.clickable {
  cursor: pointer;
}

.pw-task-item.clickable:hover {
  border-color: #ffffff;
}

.pw-task-item.is-completed {
  border-left: 3px solid #ffffff;
}

.pw-task-item.is-pending {
  border-left: 3px solid #71717a;
}

.pw-task-item.is-world {
  border-left: 3px solid #ffffff;
}

.pw-task-item-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}

.pw-task-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 0;
  white-space: nowrap;
}

.pw-task-status-pill.completed {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.pw-task-status-pill.pending {
  background: #27272a;
  color: #a1a1aa;
  border: 1px solid #3f3f46;
}

.pw-task-status-pill.world {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.pw-task-status-pill.locked {
  background: #18181b;
  color: #71717a;
  border: 1px solid #27272a;
}

.pw-task-item-main {
  flex: 1;
}

.pw-task-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f3f4f6;
  line-height: 1.3;
}

.pw-task-protocol-hint {
  font-size: 0.72rem;
  color: #a1a1aa;
  font-weight: 500;
}

.pw-task-item-desc {
  font-size: 0.74rem;
  color: #9ca3af;
  margin-top: 2px;
  line-height: 1.35;
}

.pw-task-item-reward {
  font-size: 0.69rem;
  color: #e4e4e7;
  margin-top: 3px;
}

.pw-task-item-right {
  display: flex;
  align-items: center;
}

.pw-task-tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  background: #27272a;
  color: #ffffff;
  border: 1px solid #3f3f46;
  border-radius: 0;
}

.pw-task-track-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 0;
}

.pw-task-track-badge.on {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.pw-task-track-badge.off {
  background: #18181b;
  color: #71717a;
  border: 1px solid #27272a;
}

.pw-task-empty {
  text-align: center;
  padding: 36px 16px;
  background: #141720;
  border: 1px dashed #27272a;
  border-radius: 0;
}

.pw-task-empty p {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.86rem;
  font-weight: 600;
}

.pw-task-empty-sub {
  margin-top: 6px !important;
  color: #9ca3af !important;
  font-size: 0.76rem !important;
  line-height: 1.4;
}

/* Right-click Context Menu */
.pw-task-context-menu {
  position: fixed;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.7);
  z-index: 10005;
  min-width: 140px;
  padding: 4px;
}

.pw-context-menu-title {
  padding: 6px 10px;
  font-size: 0.72rem;
  color: #a1a1aa;
  font-weight: 700;
  border-bottom: 1px solid #27272a;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.pw-context-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.12s ease, color 0.12s ease;
}

.pw-context-menu-item:hover {
  background: #ffffff;
  color: #000000;
}

/* ---- Hero Music Player Area (Right Bottom / 右下角) ---- */
.hero-player-area {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: clamp(80px, 12vh, 160px);
  position: relative;
  z-index: 25;
}

@media (max-width: 680px) {
  .hero-player-area {
    justify-content: flex-start;
    margin-top: 32px;
  }
}

/* ---- Home Music Player ---- */
.home-music-player {
  position: relative;
  width: 350px;
  height: 114px;
  max-width: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.home-music-player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transition: filter 0.25s ease;
}

html[data-theme="dark"] .home-music-player-frame,
.home-music-player.is-dark .home-music-player-frame {
  filter: invert(1);
}

.home-music-player-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 12px 18px 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}

.home-music-player-cover-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  background-color: var(--border, #e8e8e8);
}

.home-music-player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-music-player-cover.is-playing {
  animation: coverGentlePulse 3s ease-in-out infinite;
}

@keyframes coverGentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.home-music-player-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.home-music-player-cover-wrap:hover .home-music-player-cover-overlay {
  opacity: 1;
}

.home-music-player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-music-player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 5px;
}

.home-music-player-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.home-music-player-artist {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* 进度条 */
.home-music-player-progress {
  width: 100%;
  height: 3px;
  background-color: var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  margin-bottom: 8px;
  overflow: hidden;
}

.home-music-player-progress-fill {
  height: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.home-music-player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-music-player-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-music-btn {
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
  user-select: none;
}

.home-music-play-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--text-primary);
  color: var(--bg, #ffffff);
}

html[data-theme="dark"] .home-music-play-btn,
.home-music-player.is-dark .home-music-play-btn {
  color: #111111;
  background-color: #ffffff;
}

.home-music-play-btn:hover {
  transform: scale(1.08);
}

.home-music-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}

.home-music-next-btn:hover {
  background-color: var(--card-bg, rgba(0, 0, 0, 0.04));
  border-color: var(--text-secondary);
}

.home-music-spotify-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
  user-select: none;
}

.home-music-spotify-link .spotify-icon {
  flex-shrink: 0;
  color: inherit;
}

.home-music-spotify-link:hover {
  color: #1ed760;
  text-decoration: underline;
}

.home-music-spotify-link:hover .spotify-icon {
  color: #1ed760;
}






