/* 夜汀南舟~  — Refined Editorial
 * Meticulously crafted design system. Dark-first, purple accent, precise spacing.
 */

/* ========== Fonts ========== */
/* System font stacks — no external requests, works everywhere */

/* ========== Design Tokens ========== */
:root {
  --surface-primary: #0A0A0A;
  --surface-secondary: #141414;
  --surface-tertiary: #1A1A1E;
  --surface-elevated: #1E1E24;

  --foreground-primary: #FFFFFF;
  --foreground-secondary: #A1A1AA;
  --foreground-muted: #71717A;

  --border-subtle: #1A1A1A;
  --border-primary: #27272A;

  --accent-primary: #A855F7;
  --accent-soft: #9333EA;
  --accent-bg: rgba(168,85,247,0.08);
  --accent-border: rgba(168,85,247,0.2);

  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;

  --heading-font: Georgia, 'Noto Serif SC', 'Source Han Serif SC', serif;
  --body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --mono-font: 'Cascadia Code', 'Fira Code', 'Source Code Pro', Consolas, 'Courier New', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

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

  --container-max: 1400px;
  --content-max: 800px;
  --sidebar-width: 280px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* ========== Light Theme Overrides ========== */
.light-theme {
  --surface-primary: #FAFAFA;
  --surface-secondary: #F5F5F5;
  --surface-tertiary: #ECECEC;
  --surface-elevated: #FFFFFF;

  --foreground-primary: #18181B;
  --foreground-secondary: #52525B;
  --foreground-muted: #A1A1AA;

  --border-subtle: #E4E4E7;
  --border-primary: #D4D4D8;

  --accent-bg: rgba(168,85,247,0.06);
  --accent-border: rgba(168,85,247,0.25);
}

/* ========== Reset ========== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body{font-family:var(--body-font);font-size:15px;line-height:1.65;color:var(--foreground-secondary);background:var(--surface-primary);min-height:100vh}
a{color:inherit;text-decoration:none;transition:color var(--transition-fast)}
a:hover{color:var(--accent-primary)}
img{max-width:100%;display:block}
ul,ol{list-style:none}

/* ========== Layout ========== */
.container{max-width:var(--container-max);margin:0 auto}
.side-dots{display:none;position:fixed;inset:0;pointer-events:none;z-index:0}
.tech-overlay{display:none}

/* Side dot decorations on wide screens */
@media (min-width: 1520px) {
  .side-dots { display: block; }
  .side-dots::before,
  .side-dots::after {
    content: '';
    position: absolute;
    top: 0; height: 100%;
    width: calc((100vw - var(--container-max)) / 2 - 8px);
    opacity: 0.06;
    background-image: radial-gradient(circle at center, var(--accent-primary) 1.2px, transparent 1.2px);
    background-size: 30px 30px;
  }
  .side-dots::before { left: 0; }
  .side-dots::after  { right: 0; }
}

/* ========== Top Bar ========== */
.top-bar{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 60px;background:var(--surface-secondary);border-bottom:1px solid var(--border-subtle);font-size:11px;color:var(--foreground-muted)}
.top-bar-social{display:flex;gap:20px;align-items:center}
.top-bar-social a{font-size:11px;color:var(--foreground-muted);transition:color var(--transition-fast)}
.top-bar-social a:hover{color:var(--foreground-primary)}

/* ========== Main Header ========== */
.site-header{height:72px;display:flex;align-items:center;padding:0 60px;border-bottom:1px solid var(--border-subtle);background:var(--surface-primary)}
.header-inner{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:var(--container-max);margin:0 auto}
.site-logo{font-family:var(--heading-font);font-size:26px;font-weight:700;color:var(--foreground-primary)}
.header-tagline{font-size:10px;color:var(--foreground-muted);letter-spacing:3px;text-transform:uppercase;margin-left:var(--space-md)}
.site-nav{display:flex;align-items:center;gap:36px}
.nav-link{font-size:14px;color:var(--foreground-muted);font-weight:400;transition:color var(--transition-fast);position:relative}
.nav-link:hover,.nav-link.active{color:var(--foreground-primary)}
.nav-link.active{font-weight:600}
.mobile-menu-btn{display:none;background:none;border:none;color:var(--foreground-primary);font-size:22px;cursor:pointer}

/* Floating music bar — JS-injected, always visible when playlist loaded */
.floating-music {
  position: fixed; z-index: 250;
  right: 24px; bottom: 80px;
  width: auto; max-width: 260px; max-height: 42px; overflow: hidden;
  padding: 0;
  background: var(--surface-elevated); border: 1px solid var(--border-primary);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: max-height 250ms cubic-bezier(0.4, 0, 0.2, 1),
              width 250ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 150ms ease, box-shadow 150ms ease;
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: none;
  transform: translateZ(0); -webkit-backface-visibility: hidden;
}
.floating-music.dragging {
  cursor: grabbing; opacity: 0.92;
  transition: none;
}
body.music-playing .floating-music {
  border-color: rgba(168,85,247, 0.35);
  box-shadow: 0 4px 28px rgba(0,0,0,.3), 0 0 14px rgba(168,85,247, 0.12);
}

/* Collapsed / Expanded views — both always in layout, opacity-swapped */
.fm-collapsed {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 7px;
  opacity: 1; transition: opacity 180ms ease;
}
.fm-expanded {
  display: flex; flex-direction: column; gap: 8px;
  position: absolute; top: 0; left: 0; right: 0;
  padding: 12px 14px;
  opacity: 0; pointer-events: none;
  transition: opacity 180ms ease;
}
.floating-music.expanded {
  width: 220px; max-height: 145px;
  border-radius: var(--radius-md);
}
.floating-music.expanded .fm-collapsed { opacity: 0; pointer-events: none; position: absolute; }
.floating-music.expanded .fm-expanded {
  opacity: 1; pointer-events: auto;
  position: relative; top: auto; left: auto; right: auto;
  width: 100%; box-sizing: border-box;
}

/* Row 1: track name + close */
.fm-expanded-top { display: flex; align-items: center; gap: 8px; padding-right: 28px; }
.fm-expanded-top .fm-track-name-wrap { flex: 1; min-width: 0; }
.fm-expanded-top .fm-track-name { font-weight: 600; font-size: 13px; color: var(--foreground-primary); }

/* Row 2: controls */
.fm-expanded-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* Row 3: volume */
.fm-expanded-volume { display: flex; align-items: center; gap: 6px; }
.fm-expanded-volume .fm-volume-slider { flex: 1; }

.fm-play-btn {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--accent-primary); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; outline: none; overflow: hidden; pointer-events: auto;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.fm-play-btn:hover { background: var(--accent-soft); transform: scale(1.1); }
.fm-play-btn:focus-visible { box-shadow: 0 0 0 3px rgba(168,85,247,0.25); }
.fm-play-btn:focus { outline: none; }
.fm-play-btn svg { margin-left: 1px; }

.fm-prev-btn, .fm-next-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-subtle);
  background: var(--surface-tertiary); color: var(--foreground-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; outline: none; overflow: hidden; pointer-events: auto;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.fm-prev-btn:hover, .fm-next-btn:hover {
  border-color: var(--accent-primary); color: var(--accent-primary);
  background: var(--accent-bg);
}
.fm-prev-btn:focus-visible, .fm-next-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}

.fm-volume-icon {
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: transparent; color: var(--foreground-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; outline: none; pointer-events: auto;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.fm-volume-icon:hover { color: var(--foreground-primary); background: var(--surface-tertiary); }

.fm-volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 50px; height: 3px; background: var(--surface-tertiary);
  border-radius: 2px; outline: none; cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: auto;
}
.fm-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer;
}
.fm-volume-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer; border: none;
}

.fm-close-btn {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: transparent; color: var(--foreground-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; outline: none; pointer-events: auto;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.fm-close-btn:hover { color: var(--foreground-primary); background: var(--surface-tertiary); }

.fm-track-name-wrap {
  overflow: hidden; max-width: 170px; min-width: 0; pointer-events: none;
}
.fm-track-name {
  display: block; font-size: 12px; color: var(--foreground-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
body.music-playing .fm-track-name {
  color: var(--foreground-secondary);
  transition: color 100ms ease;
}

/* Mobile: smaller, positioned at bottom-left */
@media(max-width:768px){
  .floating-music {
    right: auto; left: 12px; bottom: 22px;
    max-width: 210px;
  }
  .floating-music.expanded { width: 200px; max-height: 160px; }
  .fm-collapsed { padding: 7px 12px 7px 7px; gap: 6px; }
  .fm-track-name-wrap { max-width: 120px; }
  .fm-volume-slider { width: auto; }
  .fm-track-name { font-size: 11px; }
}

/* ========== Floating Chat Widget ========== */
/* ========== Chat Overlay ========== */
.chat-overlay{
  position:fixed;inset:0;z-index:255;
  background:rgba(0,0,0,.5);backdrop-filter:blur(4px);
  opacity:0;pointer-events:none;transition:opacity .25s;
}
.chat-overlay.show{opacity:1;pointer-events:auto}

/* ========== Chat Bubble ========== */
.chat-bubble{
  position:fixed;z-index:249;
  right:24px;bottom:140px;
  width:48px;height:48px;border-radius:50%;
  background:linear-gradient(135deg,var(--accent-primary),var(--accent-soft));
  color:#fff;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 24px rgba(168,85,247,.3);
  transition:transform .25s cubic-bezier(0.34,1.56,0.64,1),box-shadow .25s;
}
.chat-bubble:hover{transform:scale(1.12);box-shadow:0 6px 32px rgba(168,85,247,.45)}
.chat-bubble svg{width:22px;height:22px}
.chat-bubble.unread::after{
  content:'';position:absolute;top:3px;right:3px;
  width:11px;height:11px;border-radius:50%;
  background:var(--danger);border:2px solid #0A0A0A;
  animation:chat-pulse 2s infinite;
}
@keyframes chat-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.4)}
  50%{box-shadow:0 0 0 6px rgba(239,68,68,0)}
}

/* ========== Chat Window ========== */
.chat-window{
  position:fixed;z-index:260;
  top:50%;left:50%;
  width:90vw;max-width:1100px;height:85vh;max-height:700px;
  background:var(--surface-elevated);border:1px solid var(--border-primary);
  border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.03) inset;
  display:flex;flex-direction:column;overflow:hidden;
  transform:translate(-50%,-50%) scale(0.92);opacity:0;pointer-events:none;
  transition:transform .3s cubic-bezier(0.34,1.56,0.64,1),opacity .25s;
}
.chat-window.open{transform:translate(-50%,-50%) scale(1);opacity:1;pointer-events:auto}
.chat-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 20px;
  background:linear-gradient(135deg,var(--accent-primary),var(--accent-soft));
  color:#fff;flex-shrink:0;
}
.chat-header-title{font-size:15px;font-weight:600;letter-spacing:.3px}
.chat-header-close{
  background:rgba(255,255,255,.1);border:none;color:#fff;cursor:pointer;
  width:28px;height:28px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;font-size:16px;transition:background .2s;line-height:1;
}
.chat-header-close:hover{background:rgba(255,255,255,.25)}

/* ========== Chat Body: Two Panels ========== */
.chat-body{display:flex;flex:1;overflow:hidden;background:var(--surface-secondary)}

/* Left: Session Panel */
.chat-session-panel{
  width:280px;flex-shrink:0;border-right:1px solid var(--border-primary);
  display:flex;flex-direction:column;overflow:hidden;background:var(--surface-primary);
}
.chat-session-header{padding:14px 14px 10px;flex-shrink:0;display:flex;gap:6px}
.chat-new-session-btn{
  flex:1;padding:10px 0;background:var(--accent-bg);color:var(--accent-primary);
  border:1px solid var(--accent-border);border-radius:8px;
  font-size:13px;font-weight:500;cursor:pointer;transition:all .2s;
}
.chat-new-session-btn:hover{background:var(--accent-primary);color:#fff}
.chat-join-session-btn{
  flex:1;padding:10px 0;background:transparent;color:var(--accent-primary);
  border:1px dashed var(--accent-border);border-radius:8px;
  font-size:13px;font-weight:500;cursor:pointer;transition:all .2s;
}
.chat-join-session-btn:hover{background:var(--accent-bg);border-style:solid}
.chat-recover-session-btn{
  flex:1;padding:10px 0;background:transparent;color:var(--foreground-muted);
  border:1px dashed var(--border-primary);border-radius:8px;
  font-size:13px;font-weight:500;cursor:pointer;transition:all .2s;
}
.chat-recover-session-btn:hover{background:var(--surface-elevated);color:var(--foreground-secondary);border-style:solid}
.chat-session-delete-btn{
  position:absolute;top:8px;right:8px;width:20px;height:20px;
  border:none;background:transparent;color:var(--foreground-muted);
  font-size:16px;line-height:20px;cursor:pointer;border-radius:50%;
  opacity:0;transition:all .15s;text-align:center;padding:0;
}
.chat-session-item:hover .chat-session-delete-btn{opacity:1}
.chat-session-delete-btn:hover{background:rgba(239,68,68,.15);color:var(--danger)}
.chat-session-recovery{
  font-size:10px;color:var(--foreground-muted);padding:2px 0 0;
  font-family:var(--mono-font);opacity:.7;user-select:all;
}
.chat-session-recovery-pending{opacity:.35;font-style:italic}

/* Session ID display in header */
.chat-session-id-display{
  font-size:11px;opacity:.7;cursor:pointer;padding:2px 8px;
  border-radius:4px;transition:all .15s;font-family:var(--mono-font);
  margin-left:auto;margin-right:12px;
}
.chat-session-id-display:hover{opacity:1;background:rgba(255,255,255,.15)}
.chat-recovery-display{
  font-size:11px;opacity:.7;cursor:pointer;padding:2px 8px;
  border-radius:4px;transition:all .15s;font-family:var(--mono-font);
  margin-right:12px;
}
.chat-recovery-display:hover{opacity:1;background:rgba(255,255,255,.15)}
.chat-session-list{flex:1;overflow-y:auto;padding:4px 8px}
.chat-session-list::-webkit-scrollbar{width:3px}
.chat-session-list::-webkit-scrollbar-thumb{background:var(--border-primary);border-radius:2px}
.chat-session-item{
  padding:12px 14px;cursor:pointer;border-radius:10px;margin-bottom:2px;
  transition:all .15s;position:relative;
}
.chat-session-item:hover{background:var(--surface-tertiary)}
.chat-session-item.active{background:var(--accent-bg)}
.chat-session-item-top{
  display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;
}
.chat-session-preview{
  font-size:13.5px;color:var(--foreground-primary);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;flex:1;font-weight:500;
}
.chat-session-item.active .chat-session-preview{color:var(--accent-primary)}
.chat-session-badge{
  background:var(--danger);color:#fff;font-size:10.5px;min-width:20px;height:18px;
  border-radius:9px;display:flex;align-items:center;justify-content:center;
  padding:0 5px;margin-left:8px;font-weight:600;
}
.chat-session-item-bottom{display:flex;align-items:center;justify-content:space-between}
.chat-session-nick{font-size:11.5px;color:var(--foreground-muted)}
.chat-session-time{font-size:11px;color:var(--foreground-muted)}

/* Right: Chat Panel */
.chat-main-panel{flex:1;display:flex;flex-direction:column;overflow:hidden;background:var(--surface-secondary)}
.chat-messages{
  flex:1;overflow-y:auto;padding:16px 20px;
  display:flex;flex-direction:column;gap:6px;
  background:
    radial-gradient(ellipse at 50% 0%,rgba(168,85,247,.03) 0%,transparent 60%);
}
.chat-messages::-webkit-scrollbar{width:4px}
.chat-messages::-webkit-scrollbar-thumb{background:var(--border-primary);border-radius:2px}

/* Message Bubbles */
.chat-msg{
  max-width:75%;padding:10px 14px;border-radius:16px;
  font-size:13.5px;line-height:1.55;word-break:break-word;
  position:relative;animation:chat-msg-in .2s ease-out;
}
@keyframes chat-msg-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.chat-msg.visitor{
  align-self:flex-end;background:linear-gradient(135deg,var(--accent-primary),var(--accent-soft));
  color:#fff;border-bottom-right-radius:4px;
  box-shadow:0 2px 8px rgba(168,85,247,.25);
}
.chat-msg.admin{
  align-self:flex-start;background:var(--surface-tertiary);color:var(--foreground-primary);
  border-bottom-left-radius:4px;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.chat-msg-time{font-size:10px;opacity:.55;margin-top:5px;text-align:right}
.chat-msg.admin .chat-msg-time{text-align:left}
.chat-msg-status{font-size:11px;margin-left:6px;display:inline-block}
.chat-msg-status.sending{opacity:.5}
.chat-msg-status.ok{opacity:0;font-size:0}
.chat-msg-status.fail{color:var(--danger);cursor:pointer;font-size:11px;opacity:1}
.chat-msg-failed{opacity:.55;cursor:pointer}
.chat-msg-failed:hover{opacity:.85}
.chat-date-separator{
  text-align:center;font-size:11px;color:var(--foreground-muted);
  padding:12px 0 8px;opacity:.65;user-select:none;
}

/* Input Area — WeChat-style vertical layout */
.chat-input-area{
  background:var(--surface-elevated);border-top:1px solid var(--border-primary);flex-shrink:0;
}
.chat-input-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 16px 0;
}
.chat-input-name-wrap{display:flex;align-items:center;gap:6px;}
.chat-input-name-label{font-size:11px;color:var(--foreground-muted);flex-shrink:0;}
.chat-input-name{
  width:200px;padding:4px 8px;
  border:1px solid transparent;border-radius:6px;
  background:transparent;color:var(--foreground-muted);
  font-size:11px;outline:none;transition:all .15s;text-align:right;
}
.chat-input-name:focus,.chat-input-name:hover{border-color:var(--border-primary);background:var(--surface-secondary);color:var(--foreground-primary)}
.chat-input-body{padding:4px 16px 0;}
.chat-input-text{
  width:100%;padding:10px 14px;min-height:72px;max-height:160px;
  border:1px solid var(--border-primary);border-radius:10px;
  background:var(--surface-secondary);color:var(--foreground-primary);
  font-size:13.5px;line-height:1.6;outline:none;resize:none;
  transition:border-color .15s;box-sizing:border-box;
}
.chat-input-text:hover{border-color:var(--border-primary)}
.chat-input-text:focus{border-color:var(--accent-border);background:var(--surface-secondary)}
.chat-input-footer{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:4px 16px 10px;}
.chat-input-hint{font-size:10px;color:var(--foreground-muted);opacity:.5;}
.chat-send-btn{
  padding:7px 28px;background:var(--accent-primary);color:#fff;border:none;
  border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;
  transition:all .15s;flex-shrink:0;
}
.chat-send-btn:hover{filter:brightness(1.1)}
.chat-send-btn:active{filter:brightness(.95)}
.chat-file-btn{
  padding:5px 12px;border:1px solid transparent;border-radius:6px;
  background:transparent;color:var(--foreground-muted);
  cursor:pointer;font-size:12px;transition:all .15s;flex-shrink:0;
}
.chat-file-btn:hover{background:var(--surface-tertiary);color:var(--foreground-primary)}

/* File upload & display */
.chat-file-uploading{font-size:12px;color:var(--foreground-secondary)}
.chat-upload-progress-bar{
  width:100%;height:4px;background:var(--surface-tertiary);border-radius:2px;margin-top:8px;overflow:hidden;
}
.chat-upload-progress-fill{
  height:100%;background:linear-gradient(90deg,var(--accent-primary),var(--accent-soft));
  border-radius:2px;transition:width .3s;
}
.chat-file-tag{
  display:inline-flex;align-items:center;gap:4px;padding:4px 10px;
  background:var(--accent-bg);color:var(--accent-primary);
  border-radius:6px;font-size:12.5px;
}
.chat-file-link{
  display:inline-block;margin-left:6px;padding:4px 12px;
  background:linear-gradient(135deg,var(--accent-primary),var(--accent-soft));
  color:#fff;border-radius:6px;font-size:12px;text-decoration:none;
  transition:all .2s;box-shadow:0 2px 6px rgba(168,85,247,.2);
}
.chat-file-link:hover{box-shadow:0 4px 12px rgba(168,85,247,.35);transform:translateY(-1px);color:#fff}
.chat-empty{
  flex:1;display:flex;align-items:center;justify-content:center;
  color:var(--foreground-muted);font-size:13.5px;
  flex-direction:column;gap:8px;opacity:.6;
}
.chat-encrypted-msg{
  display:inline-flex;align-items:center;gap:4px;
  padding:6px 12px;border-radius:var(--radius-md);
  background:var(--accent-bg);border:1px dashed var(--accent-border);
  color:var(--accent-primary);font-size:12px;font-style:italic;
  user-select:none;
}
.chat-unlock-btn{
  margin-top:6px;padding:8px 20px;
  border:none;border-radius:var(--radius-pill);
  background:linear-gradient(135deg,var(--accent-primary),var(--accent-soft));
  color:#fff;font-size:13px;cursor:pointer;
  transition:all .2s;box-shadow:0 2px 8px rgba(168,85,247,.3);
}
.chat-unlock-btn:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(168,85,247,.45)}

/* ========== Chat Responsive ========== */
@media(max-width:768px){
  .chat-bubble{right:12px;bottom:110px;width:44px;height:44px}
  .chat-bubble svg{width:20px;height:20px}
  .chat-window{
    top:0;left:0;right:0;bottom:0;transform:none;
    width:100vw;max-width:100vw;height:100vh;max-height:100vh;
    border-radius:0;
  }
  .chat-window.open{transform:none}
  .chat-session-panel{width:90px;flex-shrink:0}
  .chat-session-header{padding:8px 6px;gap:4px}
  .chat-new-session-btn{font-size:10px;padding:8px 2px;border-radius:6px}
  .chat-join-session-btn{font-size:10px;padding:8px 2px;border-radius:6px}
  .chat-recover-session-btn{font-size:10px;padding:8px 2px;border-radius:6px}
  .chat-session-recovery{font-size:9px}
  .chat-session-item{padding:10px 8px;border-radius:6px}
  .chat-session-preview{font-size:11px}
  .chat-session-badge{font-size:9px;min-width:16px;height:15px}
  .chat-session-nick,.chat-session-time{font-size:10px}
  .chat-messages{padding:12px}
  .chat-input-toolbar{padding:4px 10px 0}
  .chat-input-name{width:80px;font-size:10px}
  .chat-input-name-label{font-size:10px}
  .chat-input-body{padding:2px 10px 0}
  .chat-input-text{min-height:60px;font-size:12.5px}
  .chat-input-footer{padding:2px 10px 8px;gap:8px}
  .chat-send-btn{padding:6px 20px;font-size:12px}
  .chat-msg{max-width:88%}
}

/* ========== Hero ========== */
.hero-section{display:flex;min-height:480px;background:var(--surface-secondary);position:relative;overflow:hidden}
.hero-content{flex:0 0 540px;padding:56px 0 56px 60px;display:flex;flex-direction:column;justify-content:center;gap:var(--space-lg)}
.hero-label{font-family:var(--body-font);font-size:11px;font-weight:600;color:var(--accent-primary);letter-spacing:4px;text-transform:uppercase}
.hero-title{font-family:var(--heading-font);font-size:46px;font-weight:700;line-height:1.15;color:var(--foreground-primary);max-width:520px}
.hero-title a{color:inherit}
.hero-desc{font-size:15px;line-height:1.65;color:var(--foreground-secondary);max-width:440px}
.hero-cta-row{display:flex;align-items:center;gap:var(--space-md);margin-top:var(--space-xs)}
.hero-cta{display:inline-flex;padding:12px 28px;background:var(--accent-primary);color:#fff;border-radius:var(--radius-sm);font-size:14px;font-weight:600;transition:background var(--transition-fast)}
.hero-cta:hover{background:var(--accent-soft);color:#fff}
.hero-cta-secondary{font-size:14px;color:var(--foreground-muted);transition:color var(--transition-fast)}
.hero-cta-secondary:hover{color:var(--foreground-primary)}
.hero-visual{flex:1;display:flex;align-items:center;justify-content:center;background:#0F0F14;min-height:480px}
.hero-visual-inner{text-align:center}
.hero-visual-code{font-family:var(--mono-font);font-size:16px;line-height:1.8;color:#1E1E2E;white-space:pre}
.hero-visual-line{width:160px;height:2px;background:var(--accent-primary);margin:24px auto 0;border-radius:1px}

/* ========== Stats Strip ========== */
.stats-strip{display:flex;justify-content:space-around;align-items:center;padding:var(--space-xl) 60px;border-bottom:1px solid var(--border-subtle)}
.stat-item{text-align:center;display:flex;flex-direction:column;gap:var(--space-2xs)}
.stat-num{font-family:var(--heading-font);font-size:26px;font-weight:700;color:var(--foreground-primary)}
.stat-label{font-size:11px;color:var(--foreground-muted);letter-spacing:2px;text-transform:uppercase}

/* ========== Sensor Strip ========== */
.sensor-section{border-bottom:1px solid var(--border-subtle);padding-bottom:var(--space-xl)}
.sensor-section-header{text-align:center;padding:var(--space-xl) 60px var(--space-lg)}
.sensor-section-header .section-label{display:block;margin-bottom:6px}
.sensor-section-header .section-title{font-size:22px}
.sensor-strip{display:flex;justify-content:space-around;align-items:center;padding:0 60px var(--space-lg);opacity:.5;transition:opacity .4s}
.sensor-strip.has-data{opacity:1}
.sensor-item{text-align:center}
.sensor-item-label{font-size:14px;color:var(--foreground-primary);letter-spacing:2px;text-transform:uppercase;margin-bottom:6px;font-weight:500}
.sensor-item-value{display:flex;align-items:baseline;justify-content:center;gap:2px}
.sensor-item-value span{font-family:var(--heading-font);font-size:28px;font-weight:700;color:var(--foreground-primary)}
.sensor-unit{font-size:14px;color:var(--foreground-secondary)}

/* ========== Section Header ========== */
.section-header-row{display:flex;justify-content:space-between;align-items:center;padding:var(--space-2xl) 60px var(--space-lg)}
.section-label{font-size:11px;color:var(--foreground-muted);letter-spacing:3px;text-transform:uppercase}
.section-title{font-family:var(--heading-font);font-size:24px;font-weight:600;color:var(--foreground-primary)}
.section-link{font-size:13px;color:var(--accent-primary);font-weight:500}

/* ========== File Share Page ========== */
.file-share-page{max-width:700px;margin:0 auto;padding:var(--space-2xl) 24px}
.file-share-page h2{font-family:var(--heading-font);font-size:24px;margin-bottom:var(--space-lg);text-align:center}
.file-share-tabs{display:flex;justify-content:center;gap:var(--space-sm);margin-bottom:var(--space-xl)}
.file-share-tab{padding:8px 24px;border:1px solid var(--border-primary);border-radius:var(--radius-pill);background:transparent;color:var(--foreground-secondary);font-size:14px;cursor:pointer;transition:all .2s}
.file-share-tab.active{background:var(--accent-primary);color:#fff;border-color:var(--accent-primary)}
.file-share-tab:hover:not(.active){border-color:var(--accent-border);color:var(--foreground-primary)}

/* Drop zone */
.drop-zone{border:2px dashed var(--border-primary);border-radius:var(--radius-lg);padding:60px 24px;text-align:center;cursor:pointer;transition:border-color .2s,background .2s;margin-bottom:var(--space-lg)}
.drop-zone:hover,.drop-zone.drag-over{border-color:var(--accent-primary);background:var(--accent-bg)}
.drop-zone-icon{font-size:48px;margin-bottom:var(--space-md)}
.drop-zone-text{font-size:15px;color:var(--foreground-secondary);margin-bottom:var(--space-xs)}
.drop-zone-hint{font-size:12px;color:var(--foreground-muted)}

/* Progress */
.file-progress{margin-bottom:var(--space-lg)}
.file-progress-info{display:flex;justify-content:space-between;font-size:13px;color:var(--foreground-secondary);margin-bottom:6px}
.file-progress-bar{width:100%;height:6px;background:var(--surface-tertiary);border-radius:3px;overflow:hidden}
.file-progress-fill{height:100%;background:var(--accent-primary);border-radius:3px;transition:width .3s;width:0}

/* Result card */
.file-result{text-align:center;padding:var(--space-xl);background:var(--surface-secondary);border:1px solid var(--border-primary);border-radius:var(--radius-lg);margin-bottom:var(--space-lg)}
.file-result-code{font-family:var(--mono-font);font-size:36px;font-weight:700;color:var(--accent-primary);letter-spacing:6px;margin:var(--space-md) 0}
.file-result-name{font-size:14px;color:var(--foreground-secondary);word-break:break-all}
.file-result-size{font-size:12px;color:var(--foreground-muted);margin-top:4px}
.file-result-hint{font-size:12px;color:var(--foreground-muted);margin-top:var(--space-md)}

/* Download panel */
.download-panel{padding:var(--space-xl);background:var(--surface-secondary);border:1px solid var(--border-primary);border-radius:var(--radius-lg);text-align:center}
.download-input-group{display:flex;gap:var(--space-sm);max-width:400px;margin:var(--space-md) auto 0}
.download-code-input{flex:1;padding:10px 16px;border:1px solid var(--border-primary);border-radius:var(--radius-md);background:var(--surface-primary);color:var(--foreground-primary);font-size:18px;text-align:center;letter-spacing:4px;outline:none;font-family:var(--mono-font)}
.download-code-input:focus{border-color:var(--accent-primary)}
.download-btn{padding:10px 24px;background:var(--accent-primary);color:#fff;border:none;border-radius:var(--radius-md);font-size:14px;cursor:pointer;white-space:nowrap}
.download-btn:hover{background:var(--accent-soft)}
.download-btn:disabled{opacity:.5;cursor:not-allowed}
.file-info-preview{text-align:center;margin-top:var(--space-md);font-size:13px;color:var(--foreground-secondary)}

@media(max-width:768px){
  .file-share-tab{padding:6px 16px;font-size:13px}
  .drop-zone{padding:40px 16px}
  .file-result-code{font-size:28px;letter-spacing:4px}
  .download-input-group{flex-direction:column}
}

/* ========== Main Content Layout ========== */
.main-content{display:flex;gap:48px;align-items:flex-start;margin-top:10px}
.content-area{flex:1;min-width:0}

/* ========== Article Cards ========== */
.article-list{display:flex;flex-direction:column;gap:0}
.article-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-lg)}

.article-card{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--transition-fast),transform var(--transition-fast)}
.article-card:hover{border-color:var(--border-primary);transform:translateY(-1px)}
.article-card.featured{grid-column:1/-1;display:flex;min-height:220px}
.article-cover{height:200px;background:#12121A;display:flex;align-items:center;justify-content:center;overflow:hidden}
.article-card.featured .article-cover{flex:0 0 360px;min-height:240px;height:auto}
.article-cover img{width:100%;height:100%;object-fit:cover}
.article-cover-placeholder{font-size:11px;letter-spacing:3px;color:#2A2A3A}
.article-info{padding:24px;display:flex;flex-direction:column;gap:var(--space-sm);flex:1;justify-content:center}
.article-cat{font-size:11px;font-weight:600;color:var(--accent-primary);letter-spacing:2px;text-transform:uppercase}
.article-title{font-family:var(--heading-font);font-size:20px;font-weight:600;color:var(--foreground-primary);line-height:1.35}
.article-card.featured .article-title{font-size:22px}
.article-title a{color:inherit}
.article-title a:hover{color:var(--accent-primary)}
.article-summary{font-size:13px;line-height:1.6;color:var(--foreground-secondary)}
.article-meta-top{display:flex;align-items:center;gap:var(--space-xs);font-size:12px;color:var(--foreground-muted);margin-bottom:var(--space-xs)}
.article-meta-row{display:flex;align-items:center;gap:var(--space-md);font-size:12px;color:var(--foreground-muted)}
.article-meta-row span{display:flex;align-items:center}
.article-date{font-size:12px;color:var(--foreground-muted)}
.article-top-badge{display:inline-block;font-size:10px;font-weight:600;color:var(--accent-primary);letter-spacing:3px;background:var(--accent-bg);padding:2px 10px;border-radius:var(--radius-pill)}

/* Compact card variant */
.article-card.compact{padding:22px;display:flex;flex-direction:column;gap:var(--space-xs);justify-content:center}
.article-card.compact .article-title{font-size:17px}
.article-card.compact .article-cat{font-size:10px}
.article-card.compact .article-meta-row{font-size:11px}

/* ========== Article List Items ========== */
.article-list-divider{border-top:1px solid var(--border-subtle)}
.article-list-item{display:flex;align-items:center;justify-content:space-between;padding:22px 0;border-bottom:1px solid var(--border-subtle);transition:border-color var(--transition-fast)}
.article-list-item:hover{border-color:var(--border-primary)}
.article-list-content{flex:1;display:flex;flex-direction:column;gap:5px}
.article-list-meta{font-size:12px;color:var(--foreground-muted)}
.article-list-arrow{font-size:16px;color:var(--foreground-muted);flex-shrink:0;margin-left:var(--space-lg)}

/* ========== Sidebar ========== */
.sidebar{width:var(--sidebar-width);flex-shrink:0;display:flex;flex-direction:column;gap:var(--space-lg);position:sticky;top:24px;align-self:flex-start}
.widget{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:24px}
.widget h4{font-size:14px;font-weight:600;color:var(--foreground-primary);margin-bottom:var(--space-sm)}
.widget ul{display:flex;flex-direction:column;gap:var(--space-sm)}
.widget li a{font-size:13px;color:var(--foreground-secondary);display:flex;justify-content:space-between;align-items:center}
.widget li a:hover{color:var(--foreground-primary)}
.blogger-info{display:flex;flex-direction:column;align-items:center;gap:var(--space-md);text-align:center}
.avatar{width:72px;height:72px;border-radius:50%;border:3px solid var(--border-primary);object-fit:cover}
.blogger-info h3{font-family:var(--heading-font);font-size:18px;font-weight:600;color:var(--foreground-primary)}
.blogger-info p{font-size:13px;line-height:1.6;color:var(--foreground-secondary)}

.search-widget form{display:flex;gap:6px}
.search-widget input{flex:1;min-width:0;padding:8px 10px;background:var(--surface-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);font-family:var(--body-font);font-size:12px;color:var(--foreground-primary);outline:none;transition:border-color var(--transition-fast)}
.search-widget input:focus{border-color:var(--accent-primary)}
.search-widget button{flex-shrink:0;padding:8px 12px;background:var(--accent-primary);border:none;border-radius:var(--radius-sm);font-family:var(--body-font);font-size:12px;font-weight:600;color:#fff;cursor:pointer;white-space:nowrap;transition:background var(--transition-fast)}
.search-widget button:hover{background:var(--accent-soft)}

/* Tag Cloud */
.tag-cloud{display:flex;flex-wrap:wrap;gap:var(--space-xs)}
.tag-item{display:inline-block;padding:4px 12px;background:var(--surface-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-pill);font-size:12px;color:var(--foreground-secondary);transition:all var(--transition-fast)}
.tag-item:hover{border-color:var(--accent-primary);color:var(--accent-primary)}
.tag-sm{font-size:11px;padding:3px 10px;opacity:.7}
.tag-md{font-size:12px;padding:4px 13px}
.tag-lg{font-size:13px;padding:5px 15px;font-weight:600;border-color:var(--accent-border)}

/* Hot articles */
.hot-articles ul{gap:var(--space-sm)}
.hot-articles li a{flex-direction:column;gap:2px;padding:var(--space-sm) 0;border-bottom:1px solid var(--border-subtle)}
.hot-articles li:last-child a{border-bottom:none}
.hot-articles li a span:first-child{font-size:13px;font-weight:500;line-height:1.4}
.hot-articles li a small{font-size:11px;color:var(--foreground-muted)}

/* ========== Page Rhythm Effects (music playing) ========== */
body.music-playing::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.18 + var(--rhythm-beat, 0) * 0.1)), transparent 60%);
  transition: background 100ms ease;
}

body.music-playing::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border: 2px solid rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1 + var(--rhythm-beat, 0) * 0.15));
  border-radius: 0;
  transition: border-color 100ms ease;
}

/* Hero */
body.music-playing .hero-visual {
  background: #12121A;
  box-shadow: inset 0 0 calc(var(--rhythm-intensity, 0.5) * 80px + var(--rhythm-beat, 0) * 40px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.16 + var(--rhythm-beat, 0) * 0.1));
  transition: box-shadow 100ms ease;
}
body.music-playing .hero-title {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 30px + var(--rhythm-beat, 0) * 15px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.3 + var(--rhythm-beat, 0) * 0.2));
  transition: text-shadow 100ms ease;
}
body.music-playing .hero-label {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 15px + var(--rhythm-beat, 0) * 10px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.5 + var(--rhythm-beat, 0) * 0.2));
  transition: text-shadow 100ms ease;
}

/* Logo & Nav — driven by bass */
body.music-playing .site-logo {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 36px + var(--rhythm-bass, 0) * 30px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.65 + var(--rhythm-bass, 0) * 0.35));
  transition: text-shadow 100ms ease;
}
body.music-playing .nav-link:hover {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 16px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.35));
}
body.music-playing .nav-link.active {
  color: var(--accent-primary);
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 14px + var(--rhythm-beat, 0) * 8px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.4 + var(--rhythm-beat, 0) * 0.2));
  transition: color 100ms ease, text-shadow 100ms ease;
}

/* Top bar */
body.music-playing .top-bar {
  border-bottom-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.25 + var(--rhythm-bass, 0) * 0.1));
  transition: border-color 100ms ease;
}

/* Side dots */
body.music-playing .side-dots::before,
body.music-playing .side-dots::after {
  opacity: calc(0.06 + var(--rhythm-intensity, 0.5) * 0.18 + var(--rhythm-beat, 0) * 0.08) !important;
  transition: opacity 100ms ease;
}

/* Stats */
body.music-playing .stat-num {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 16px + var(--rhythm-beat, 0) * 8px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.3 + var(--rhythm-beat, 0) * 0.1));
  transition: text-shadow 100ms ease;
}

/* Section headers */
body.music-playing .section-title {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 12px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.15));
  transition: text-shadow 100ms ease;
}
body.music-playing .section-link {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 12px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.25));
  transition: text-shadow 100ms ease;
}

/* Article cards */
body.music-playing .article-card {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1 + var(--rhythm-beat, 0) * 0.06));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 18px + var(--rhythm-beat, 0) * 12px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.06 + var(--rhythm-beat, 0) * 0.04));
}
body.music-playing .article-item {
  transition: border-color 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1));
}
body.music-playing .article-list-item {
  transition: border-color 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.08));
}
body.music-playing .article-cat {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 10px + var(--rhythm-beat, 0) * 6px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.4 + var(--rhythm-beat, 0) * 0.1));
  transition: text-shadow 100ms ease;
}

/* Article detail */
body.music-playing .article-header h1 {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 26px + var(--rhythm-beat, 0) * 14px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.25 + var(--rhythm-beat, 0) * 0.1));
  transition: text-shadow 100ms ease;
}
body.music-playing .title-divider {
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 16px + var(--rhythm-beat, 0) * 10px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.6 + var(--rhythm-beat, 0) * 0.2));
  transition: box-shadow 100ms ease;
}
body.music-playing .article-content h2,
body.music-playing .article-content h3 {
  transition: text-shadow 100ms ease;
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 20px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.2));
}
body.music-playing .article-content blockquote {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.8 + var(--rhythm-beat, 0) * 0.2));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 14px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.08));
}

/* Reading progress */
body.music-playing .reading-progress {
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 24px + var(--rhythm-beat, 0) * 16px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.8 + var(--rhythm-beat, 0) * 0.2));
  height: 4px;
}

/* Sidebar widgets */
body.music-playing .widget {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1 + var(--rhythm-beat, 0) * 0.05));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 22px + var(--rhythm-beat, 0) * 12px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.08 + var(--rhythm-beat, 0) * 0.04));
}

/* Author card */
body.music-playing .author-card {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.13));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 20px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.07));
}

/* Tags */
body.music-playing .tag-link,
body.music-playing .tag-item {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.15));
}
body.music-playing .tag-link:hover,
body.music-playing .tag-item:hover {
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 14px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.25));
}

/* Pagination */
body.music-playing .pagination .current {
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 16px + var(--rhythm-beat, 0) * 10px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.55 + var(--rhythm-beat, 0) * 0.2));
  transition: box-shadow 100ms ease;
}

/* Like button */
body.music-playing .like-btn:hover {
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 18px) rgba(255,107,107, calc(var(--rhythm-intensity, 0.5) * 0.3));
}

/* Comments */
body.music-playing .comment-item {
  transition: border-color 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.08));
}
body.music-playing .comment-replies {
  transition: border-color 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.2));
}

/* Treehole */
body.music-playing .treehole-card {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 14px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.04));
}
body.music-playing .treehole-anon {
  text-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 12px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.35));
  transition: text-shadow 100ms ease;
}

/* Photo grid */
body.music-playing .photo-item {
  transition: box-shadow 120ms ease;
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 20px + var(--rhythm-beat, 0) * 10px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1 + var(--rhythm-beat, 0) * 0.05));
}

/* Links page */
body.music-playing .link-card,
body.music-playing .link-item {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.1));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 14px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.04));
}

/* Related articles */
body.music-playing .related-item {
  transition: border-color 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.09));
}

/* Footer */
body.music-playing .site-footer {
  transition: border-color 120ms ease;
  border-top: 1px solid rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.14 + var(--rhythm-beat, 0) * 0.06));
}

/* Buttons */
body.music-playing .theme-toggle,
body.music-playing .back-to-top {
  transition: box-shadow 100ms ease, border-color 100ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.25 + var(--rhythm-beat, 0) * 0.15));
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 16px + var(--rhythm-beat, 0) * 10px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.15 + var(--rhythm-beat, 0) * 0.05));
}

/* Code blocks */
body.music-playing .code-block-wrapper {
  transition: border-color 120ms ease;
  border-color: rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.14));
}

/* Search inputs */
body.music-playing input:focus,
body.music-playing textarea:focus {
  box-shadow: 0 0 calc(var(--rhythm-intensity, 0.5) * 16px) rgba(168,85,247, calc(var(--rhythm-intensity, 0.5) * 0.2));
  transition: box-shadow 100ms ease;
}

/* Music player — beat glow on the play button */
body.music-playing .mp-play-btn {
  box-shadow: 0 2px 12px rgba(168,85,247, calc(0.3 + var(--rhythm-beat, 0) * 0.5)),
              0 0 calc(var(--rhythm-beat, 0) * 24px) rgba(168,85,247, calc(var(--rhythm-beat, 0) * 0.6));
  transition: box-shadow 100ms ease;
}

/* Music player widget — bass-driven border pulse */
body.music-playing .music-player-widget {
  border-color: rgba(168,85,247, calc(0.1 + var(--rhythm-bass, 0) * 0.4 + var(--rhythm-beat, 0) * 0.3));
  box-shadow: 0 0 calc(var(--rhythm-bass, 0) * 20px + var(--rhythm-beat, 0) * 16px) rgba(168,85,247, calc(var(--rhythm-bass, 0) * 0.15 + var(--rhythm-beat, 0) * 0.12));
  transition: border-color 100ms ease, box-shadow 100ms ease;
}

/* ========== Text Rhythm Effects ========== */
/* Character wave spans — need inline-block for transform */
.rw-char {
  display: inline-block;
  transition: transform 60ms ease-out, color 100ms ease;
  will-change: transform;
}

/* ── Letter-spacing breathing ── */
/* Headings & display text: full range */
body.music-playing h1,
body.music-playing h2,
body.music-playing h3,
body.music-playing h4,
body.music-playing h5,
body.music-playing h6,
body.music-playing .site-logo,
body.music-playing .hero-title,
body.music-playing .hero-label,
body.music-playing .section-title,
body.music-playing .section-label,
body.music-playing .section-link,
body.music-playing .page-title,
body.music-playing .article-title,
body.music-playing .article-cat,
body.music-playing .nav-link,
body.music-playing .stat-num,
body.music-playing .stat-label {
  letter-spacing: calc(0 + var(--rhythm-letter-space, 0) * 1em);
  transition: letter-spacing 100ms ease;
}

/* Meta & small UI text: half range, so it doesn't get illegible */
body.music-playing .article-meta,
body.music-playing .article-date,
body.music-playing .article-meta-row,
body.music-playing .article-meta-top,
body.music-playing .article-list-meta,
body.music-playing .top-bar,
body.music-playing .top-bar-social a,
body.music-playing .header-tagline,
body.music-playing .widget h4,
body.music-playing .tag-item,
body.music-playing .tag-link,
body.music-playing .tags-label,
body.music-playing .archive-date,
body.music-playing .archive-title,
body.music-playing .comment-author,
body.music-playing .comment-time,
body.music-playing .message-author,
body.music-playing .message-time,
body.music-playing .treehole-anon,
body.music-playing .treehole-time,
body.music-playing .author-name,
body.music-playing .author-stat .stat-num,
body.music-playing .author-stat .stat-label,
body.music-playing .footer-brand .name,
body.music-playing .footer-link-group .group-title,
body.music-playing .footer-link-group a,
body.music-playing .related-title,
body.music-playing .related-date,
body.music-playing .photo-title,
body.music-playing .link-card-info h4,
body.music-playing .link-info h3,
body.music-playing .search-info,
body.music-playing .pagination a,
body.music-playing .pagination span,
body.music-playing .page-btn,
body.music-playing .mp-track-title,
body.music-playing .mp-track-artist,
body.music-playing .mp-pl-title,
body.music-playing .mp-pl-artist,
body.music-playing .mp-header h4,
body.music-playing .mp-pl-num,
body.music-playing .article-top-badge,
body.music-playing .code-block-header .lang-label,
body.music-playing .comment-form h4,
body.music-playing .message-form h4 {
  letter-spacing: calc(0 + var(--rhythm-letter-space, 0) * 0.5em);
  transition: letter-spacing 100ms ease;
}

/* Exclude all reading content areas from letter-spacing */
body.music-playing .article-content,
body.music-playing .article-content *,
body.music-playing .comment-content,
body.music-playing .comment-content *,
body.music-playing .message-content,
body.music-playing .message-content *,
body.music-playing .message-body,
body.music-playing .message-body *,
body.music-playing .treehole-card-body,
body.music-playing .treehole-card-body *,
body.music-playing .about-content,
body.music-playing .about-content *,
body.music-playing .hero-desc,
body.music-playing .page-desc,
body.music-playing .article-summary,
body.music-playing .author-bio,
body.music-playing .blogger-info p,
body.music-playing .footer-brand .desc,
body.music-playing .link-card-info p,
body.music-playing .link-info p {
  letter-spacing: normal !important;
  transition: none !important;
}

/* ── Word-spacing breathing (display headings only) ── */
body.music-playing .hero-title,
body.music-playing .site-logo {
  word-spacing: calc(0 + var(--rhythm-beat, 0) * 0.25em);
  transition: word-spacing 100ms ease;
}

/* ── Color temperature shift (accent/heading text) ── */
body.music-playing .site-logo {
  color: hsl(270, calc(80% + var(--rhythm-hue-shift, 0) * 20%), calc(60% + var(--rhythm-beat, 0) * 30%));
  transition: color 100ms ease;
}
body.music-playing .hero-title {
  color: hsl(270, calc(80% + var(--rhythm-hue-shift, 0) * 25%), calc(65% + var(--rhythm-beat, 0) * 25%));
  transition: color 100ms ease;
}
body.music-playing .article-title a {
  color: hsl(270, calc(40% + var(--rhythm-hue-shift, 0) * 15%), calc(65% + var(--rhythm-beat, 0) * 20%));
  transition: color 100ms ease;
}
body.music-playing .section-title {
  color: hsl(270, calc(25% + var(--rhythm-hue-shift, 0) * 12%), calc(70% + var(--rhythm-beat, 0) * 20%));
  transition: color 100ms ease;
}
body.music-playing .widget h4 {
  color: hsl(270, calc(20% + var(--rhythm-hue-shift, 0) * 10%), calc(65% + var(--rhythm-beat, 0) * 20%));
  transition: color 100ms ease;
}
body.music-playing .footer-brand .name {
  color: hsl(270, calc(15% + var(--rhythm-hue-shift, 0) * 10%), calc(65% + var(--rhythm-beat, 0) * 25%));
  transition: color 100ms ease;
}

/* ── Transform scale on beat ── */
body.music-playing .nav-link {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.035));
  transition: transform 100ms ease, letter-spacing 100ms ease;
}
body.music-playing .mp-track-title {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.04));
  transition: transform 80ms ease;
}
body.music-playing .stat-num {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.05));
  transition: transform 100ms ease;
}
body.music-playing .article-title {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.015));
  transition: transform 100ms ease;
}
body.music-playing .page-title {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.02));
  transition: transform 100ms ease;
}
body.music-playing .tag-item,
body.music-playing .tag-link {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.04));
  transition: transform 100ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
body.music-playing .pagination .current,
body.music-playing .page-btn.active {
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.06));
  transition: transform 100ms ease, box-shadow 100ms ease;
}
body.music-playing .section-label,
body.music-playing .hero-label,
body.music-playing .article-cat,
body.music-playing .article-top-badge {
  letter-spacing: calc(3px + var(--rhythm-beat, 0) * 2.5px);
  transition: letter-spacing 100ms ease, transform 100ms ease;
  transform: scale(calc(1 + var(--rhythm-beat, 0) * 0.03));
}

/* ── Reading progress bar ── */
body.music-playing .reading-progress {
  height: calc(3px + var(--rhythm-beat, 0) * 2px + var(--rhythm-bass, 0) * 1.5px);
  transition: height 80ms ease;
}

/* ========== Music Player ========== */
.music-player-widget { padding: 20px; overflow: visible; }
.mp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mp-header h4 { display: flex; align-items: center; gap: 6px; margin-bottom: 0; font-size: 13px; font-weight: 600; color: var(--foreground-primary); }
.mp-playlist-toggle {
  background: none; border: none; color: var(--foreground-muted); cursor: pointer;
  padding: 4px; border-radius: 50%; transition: all var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; outline: none;
}
.mp-playlist-toggle:hover, .mp-playlist-toggle.open { color: var(--accent-primary); background: var(--accent-bg); }
.mp-playlist-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(168,85,247,0.2); }

/* Visualizer */
.mp-visualizer {
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  height: 32px; margin-bottom: 12px; opacity: 0.3;
}
.music-player-widget.playing .mp-visualizer { opacity: 1; }
.mp-visualizer-bar {
  width: 3px; height: 4px; background: var(--accent-primary); border-radius: 2px;
  transition: height 120ms ease;
}
/* Bars driven by JS via Web Audio API — transition for smooth interpolation */
.mp-visualizer-bar {
  transition: height 80ms ease, opacity 80ms ease;
}

/* Track info */
.mp-track-info {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-bottom: 10px; min-height: 36px;
}
.mp-track-title {
  font-family: var(--heading-font); font-size: 14px; font-weight: 600;
  color: var(--foreground-primary); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.mp-track-artist {
  font-size: 11px; color: var(--foreground-muted); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* Progress bar */
.mp-progress-bar {
  width: 100%; height: 3px; background: var(--surface-tertiary); border-radius: 2px;
  cursor: pointer; position: relative; margin-bottom: 4px;
}
.mp-progress-bar:hover { height: 5px; }
.mp-progress-fill {
  height: 100%; background: var(--accent-primary); border-radius: 2px;
  width: 0%; transition: width 100ms linear; position: relative;
}
.mp-progress-fill::after {
  content: ''; position: absolute; right: -4px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; background: var(--accent-primary); border-radius: 50%;
  opacity: 0; transition: opacity var(--transition-fast);
}
.mp-progress-bar:hover .mp-progress-fill::after { opacity: 1; }

/* Time */
.mp-time-row {
  display: flex; justify-content: space-between; margin-bottom: 14px;
}
.mp-time-current, .mp-time-duration {
  font-size: 10px; color: var(--foreground-muted); font-family: var(--mono-font);
}

/* Controls */
.mp-controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.mp-prev-btn, .mp-next-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-subtle);
  background: var(--surface-tertiary); color: var(--foreground-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  outline: none; overflow: hidden; position: relative;
}
.mp-prev-btn:hover, .mp-next-btn:hover {
  border-color: var(--accent-primary); color: var(--accent-primary);
  background: var(--accent-bg);
  box-shadow: 0 0 0 4px rgba(168,85,247,0.12);
}
.mp-prev-btn:focus-visible, .mp-next-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(168,85,247,0.25);
}
.mp-play-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--accent-primary); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast); box-shadow: 0 2px 12px rgba(168,85,247,.3);
  outline: none; overflow: hidden; position: relative;
}
.mp-play-btn:hover {
  background: var(--accent-soft); transform: scale(1.08);
  box-shadow: 0 4px 24px rgba(168,85,247,.5);
}
.mp-play-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(168,85,247,0.3), 0 2px 12px rgba(168,85,247,.3);
}
.mp-play-btn:active {
  transform: scale(0.95);
  transition: transform 80ms ease;
}
.mp-play-btn svg { margin-left: 2px; }

/* Volume */
.mp-volume-control {
  display: flex; align-items: center; gap: 4px; margin-left: 2px;
}
.mp-volume-icon {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; color: var(--foreground-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color var(--transition-fast);
}
.mp-volume-icon:hover { color: var(--foreground-primary); }
.mp-volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 60px; height: 3px; background: var(--surface-tertiary); border-radius: 2px;
  outline: none; cursor: pointer;
}
.mp-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer;
}
.mp-volume-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent-primary);
  cursor: pointer; border: none;
}

/* Playlist */
.mp-playlist-wrap {
  margin-top: 12px; max-height: 200px; overflow-y: auto;
  border-top: 1px solid var(--border-subtle); padding-top: 8px;
}
.mp-playlist-wrap::-webkit-scrollbar { width: 3px; }
.mp-playlist-wrap::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 2px; }
.mp-playlist { display: flex; flex-direction: column; gap: 0; }
.mp-playlist-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition-fast); font-size: 12px;
}
.mp-playlist-item:hover { background: var(--surface-tertiary); }
.mp-playlist-item.active { background: var(--accent-bg); }
.mp-playlist-item.active .mp-pl-title { color: var(--accent-primary); }
.mp-pl-num { width: 18px; text-align: center; font-size: 10px; color: var(--foreground-muted); flex-shrink: 0; }
.mp-pl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mp-pl-title { font-size: 12px; color: var(--foreground-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-pl-artist { font-size: 10px; color: var(--foreground-muted); }
.mp-pl-duration { font-size: 10px; color: var(--foreground-muted); flex-shrink: 0; }

/* ========== Pagination ========== */
.pagination{display:flex;align-items:center;justify-content:center;gap:var(--space-sm);padding:var(--space-lg) 0;flex-wrap:wrap}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 var(--space-sm);font-size:13px;border-radius:var(--radius-sm);transition:all var(--transition-fast)}
.pagination a{color:var(--foreground-muted);background:transparent}
.pagination a:hover{background:var(--surface-secondary);color:var(--foreground-primary)}
.pagination .current{background:var(--accent-primary);color:#fff;font-weight:600}
.pagination .disabled{color:var(--foreground-muted);opacity:.4}

/* ========== Article Detail ========== */
.article-detail{max-width:var(--container-max);margin:0 auto}
.article-header{text-align:center;padding:var(--space-3xl) 60px var(--space-2xl);display:flex;flex-direction:column;align-items:center;gap:20px}
.article-header .article-cat{font-size:12px;letter-spacing:3px}
.article-header h1{font-family:var(--heading-font);font-size:42px;font-weight:700;line-height:1.2;color:var(--foreground-primary);max-width:760px}
.article-header .article-summary{font-size:16px;line-height:1.7;color:var(--foreground-secondary);max-width:600px;text-align:center}
.article-meta{display:flex;align-items:center;gap:var(--space-lg);font-size:13px;color:var(--foreground-muted)}
.title-divider{width:48px;height:2px;background:var(--foreground-primary);margin:0 auto}
.article-cover-full{height:400px;background:#0F0F14;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--space-md);margin-bottom:var(--space-2xl)}
.article-cover-full img{width:100%;height:100%;object-fit:cover}
.article-cover-label{font-size:12px;letter-spacing:4px;color:#2A2A3A}
.article-cover-accent{width:100px;height:1px;background:var(--accent-primary)}

/* Article content layout */
.article-content-area{display:flex;gap:56px;padding:0 60px var(--space-3xl);align-items:flex-start}
.article-left-toc{flex-shrink:0;width:200px;position:sticky;top:100px;align-self:flex-start}
.article-left-toc h4{font-size:13px;font-weight:600;color:var(--foreground-muted);letter-spacing:2px;text-transform:uppercase;margin-bottom:var(--space-md)}
.article-left-toc nav{display:flex;flex-direction:column;gap:10px}
.article-left-toc a{display:flex;align-items:center;gap:var(--space-xs);font-size:12px;color:var(--foreground-muted);line-height:1.5;transition:color var(--transition-fast)}
.article-left-toc a:hover,.article-left-toc a.active{color:var(--foreground-primary);font-weight:600}
.article-left-toc a.active::before{content:'';width:3px;height:16px;background:var(--accent-primary);border-radius:2px;flex-shrink:0}
.article-body{flex:1;min-width:0;max-width:var(--content-max)}
.article-content{font-size:15px;line-height:1.85;color:var(--foreground-secondary)}
.article-content p{margin-bottom:var(--space-lg);text-indent:2em}
.article-content h2{font-family:var(--heading-font);font-size:24px;font-weight:700;color:var(--foreground-primary);margin:var(--space-2xl) 0 var(--space-md);line-height:1.3}
.article-content h3{font-family:var(--heading-font);font-size:20px;font-weight:600;color:var(--foreground-primary);margin:var(--space-xl) 0 var(--space-sm);line-height:1.35}
.article-content blockquote{border-left:3px solid var(--accent-primary);padding:0 0 0 20px;margin:var(--space-lg) 0;font-family:var(--heading-font);font-style:italic;font-size:16px;line-height:1.7;color:var(--foreground-secondary)}
.article-content img{border-radius:var(--radius-sm);margin:var(--space-lg) auto}
.article-content .image-caption{text-align:center;font-size:11px;color:var(--foreground-muted);margin-top:var(--space-xs)}
.article-sidebar{flex-shrink:0;width:var(--sidebar-width);display:flex;flex-direction:column;gap:var(--space-lg);position:sticky;top:24px;align-self:flex-start}

/* Author Card */
.author-card{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:28px;display:flex;align-items:center;gap:20px}
.author-card .author-avatar{width:60px;height:60px;border-radius:50%;background:#1A1A2E;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.author-card .author-name{font-family:var(--heading-font);font-size:18px;font-weight:600;color:var(--foreground-primary)}
.author-card .author-bio{font-size:13px;line-height:1.6;color:var(--foreground-secondary);margin-top:6px}
.author-info{flex:1}
.author-stats{display:flex;gap:var(--space-xl);margin-top:var(--space-sm)}
.author-stat{text-align:center}
.author-stat .stat-num{font-size:20px}
.author-stat .stat-label{font-size:10px}

/* Tags & Actions */
.article-tags{display:flex;align-items:center;gap:10px;margin:var(--space-xl) 0;flex-wrap:wrap}
.tags-label{font-size:13px;color:var(--foreground-muted)}
.tag-link{display:inline-block;padding:4px 14px;background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-pill);font-size:12px;color:var(--foreground-secondary);transition:all var(--transition-fast)}
.tag-link:hover{border-color:var(--accent-primary);color:var(--accent-primary)}
.article-actions{display:flex;justify-content:center;gap:var(--space-xl);padding:20px 0;border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);margin:var(--space-lg) 0}
.article-actions button{background:none;border:none;font-family:var(--body-font);font-size:14px;font-weight:500;color:var(--foreground-muted);cursor:pointer;transition:color var(--transition-fast)}
.article-actions button:hover{color:var(--accent-primary)}
.article-like{display:flex;justify-content:center;margin:var(--space-lg) 0}
.like-btn{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:12px 32px;font-family:var(--body-font);font-size:14px;font-weight:500;color:var(--foreground-secondary);cursor:pointer;transition:all var(--transition-fast)}
.like-btn:hover{border-color:var(--accent-primary);color:var(--accent-primary)}
.like-btn.liked{background:rgba(255,107,107,0.12);border-color:#ff6b6b;color:#ff6b6b}

/* Related Articles */
.related-articles{margin:var(--space-2xl) 0}
.related-articles h3{font-family:var(--heading-font);font-size:20px;font-weight:600;color:var(--foreground-primary);margin-bottom:var(--space-md)}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-md)}
.related-item{display:flex;flex-direction:column;gap:4px;padding:20px;background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);transition:border-color var(--transition-fast)}
.related-item:hover{border-color:var(--border-primary)}
.related-title{font-size:13px;font-weight:500;color:var(--foreground-secondary);line-height:1.45}
.related-date{font-size:11px;color:var(--foreground-muted)}

/* ========== Code Blocks ========== */
.code-block-wrapper{border-radius:var(--radius-sm);overflow:hidden;background:#0C0C14;border:1px solid var(--border-subtle);margin:var(--space-lg) 0}
.code-block-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--border-subtle);font-size:11px;color:var(--foreground-muted)}
.code-block-header .lang-label{font-weight:500;letter-spacing:1px;text-transform:uppercase}
.copy-code-btn{padding:4px 12px;background:transparent;border:1px solid var(--border-subtle);border-radius:var(--radius-sm);font-family:var(--body-font);font-size:11px;color:var(--foreground-muted);cursor:pointer;transition:all var(--transition-fast)}
.copy-code-btn:hover{background:var(--surface-secondary);color:var(--foreground-primary);border-color:var(--border-primary)}
.code-block-wrapper pre{margin:0;padding:16px;overflow-x:auto}
.code-block-wrapper code{font-family:var(--mono-font);font-size:13px;line-height:1.7;color:#A1A1AA}

/* ========== Comments ========== */
.article-comments{max-width:var(--content-max);margin:0 auto;padding:var(--space-2xl) 0}
.article-comments h3{font-family:var(--heading-font);font-size:20px;font-weight:600;color:var(--foreground-primary);margin-bottom:var(--space-lg)}
.comment-list{display:flex;flex-direction:column;gap:0}
.comment-item{display:flex;gap:14px;padding:18px 0;border-bottom:1px solid var(--border-subtle)}
.comment-avatar{flex-shrink:0}
.comment-avatar img{width:38px;height:38px;border-radius:50%;background:#1A1A2E}
.comment-body{flex:1;display:flex;flex-direction:column;gap:6px}
.comment-meta{display:flex;align-items:center;gap:12px}
.comment-author{font-size:13px;font-weight:600;color:var(--foreground-primary)}
.comment-time{font-size:12px;color:var(--foreground-muted)}
.comment-content{font-size:13.5px;line-height:1.65;color:var(--foreground-secondary)}
.reply-btn{background:none;border:none;font-size:12px;color:var(--foreground-muted);cursor:pointer;text-align:left;transition:color var(--transition-fast)}
.reply-btn:hover{color:var(--accent-primary)}
.comment-replies{margin-top:var(--space-sm);padding-left:var(--space-xl);border-left:2px solid var(--border-subtle)}
.reply-item{padding:14px 0;border-bottom:none}
.reply-item:last-child{padding-bottom:0}

.comment-form{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-xl);padding:24px;background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md)}
.comment-form h4{font-size:14px;font-weight:600;color:var(--foreground-primary)}
.comment-form input,.comment-form textarea{padding:10px 14px;background:var(--surface-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);font-family:var(--body-font);font-size:13px;color:var(--foreground-primary);outline:none;resize:vertical;transition:border-color var(--transition-fast)}
.comment-form input:focus,.comment-form textarea:focus{border-color:var(--accent-primary)}
.submit-btn{padding:10px 24px;background:var(--accent-primary);border:none;border-radius:var(--radius-sm);font-family:var(--body-font);font-size:13px;font-weight:600;color:#fff;cursor:pointer;align-self:flex-start;transition:background var(--transition-fast)}
.submit-btn:hover{background:var(--accent-soft)}

/* ========== Tree Hole ========== */
.treehole-hero{text-align:center;padding:var(--space-3xl) 0 var(--space-xl)}
.treehole-hero h1{font-family:var(--heading-font);font-size:36px;font-weight:700;color:var(--foreground-primary);margin-bottom:var(--space-sm)}
.treehole-hero p{font-size:15px;color:var(--foreground-muted);max-width:480px;margin:0 auto}
.treehole-post-box{max-width:600px;margin:0 auto var(--space-2xl);background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:var(--space-lg)}
.treehole-post-box textarea{width:100%;padding:12px;font-family:var(--body-font);font-size:14px;background:var(--surface-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);color:var(--foreground-primary);outline:none;resize:vertical;min-height:80px;transition:border-color var(--transition-fast)}
.treehole-post-box textarea:focus{border-color:var(--accent-primary)}
.treehole-form-footer{display:flex;justify-content:space-between;align-items:center;margin-top:var(--space-sm)}
.char-count{font-size:11px;color:var(--foreground-muted)}
.treehole-timeline{max-width:600px;margin:0 auto;display:flex;flex-direction:column;gap:var(--space-md)}
.treehole-card{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:var(--space-lg);transition:border-color var(--transition-fast)}
.treehole-card:hover{border-color:var(--border-primary)}
.treehole-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space-sm)}
.treehole-anon{font-size:12px;font-weight:600;color:var(--accent-primary)}
.treehole-time{font-size:11px;color:var(--foreground-muted)}
.treehole-card-body p{font-size:14px;line-height:1.7;color:var(--foreground-secondary);word-break:break-word}
.treehole-card-footer{margin-top:var(--space-sm);padding-top:var(--space-sm);border-top:1px solid var(--border-subtle)}
.treehole-like-btn{background:none;border:1px solid var(--border-subtle);border-radius:var(--radius-pill);padding:4px 14px;font-size:11px;color:var(--foreground-muted);cursor:pointer;transition:all var(--transition-fast)}
.treehole-like-btn:hover{color:var(--accent-primary);border-color:var(--accent-primary)}
.treehole-empty{text-align:center;padding:var(--space-2xl);color:var(--foreground-muted)}

/* ========== Reading Progress ========== */
.reading-progress{position:fixed;top:0;left:0;height:3px;background:var(--accent-primary);z-index:9999;transition:width 100ms linear}

/* ========== Back to Top ========== */
.back-to-top{position:fixed;bottom:24px;right:24px;width:44px;height:44px;background:var(--surface-secondary);border:1px solid var(--border-primary);border-radius:50%;display:none;align-items:center;justify-content:center;font-size:18px;color:var(--foreground-muted);cursor:pointer;z-index:100;transition:all var(--transition-fast)}
.back-to-top.visible{display:flex}
.back-to-top:hover{background:var(--accent-primary);border-color:var(--accent-primary);color:#fff}

/* ========== Theme Toggle ========== */
.theme-toggle{position:fixed;bottom:24px;right:80px;width:44px;height:44px;background:var(--surface-secondary);border:1px solid var(--border-primary);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;cursor:pointer;z-index:100;transition:all var(--transition-fast)}
.theme-toggle:hover{background:var(--surface-elevated)}

/* ========== Left Side Toolbar ========== */
.left-toolbar { display: none; }
@media (min-width: 1520px) {
  .left-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: calc((100vw - var(--container-max)) / 2 - 56px);
    z-index: 100;
  }
  .toolbar-btn {
    width: 40px; height: 40px;
    background: var(--surface-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: var(--foreground-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
  }
  .toolbar-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 16px rgba(168,85,247,.25);
  }
  .toolbar-line {
    width: 1px; height: 28px;
    background: var(--border-primary);
    margin: 0;
  }
}

/* ========== Footer ========== */
.site-footer{background:var(--surface-secondary);padding:var(--space-2xl) 60px var(--space-xl);margin-top:var(--space-3xl)}
.footer-inner{max-width:var(--container-max);margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:var(--space-lg)}
.footer-top{display:flex;justify-content:space-between;width:100%;gap:var(--space-3xl)}
.footer-brand{display:flex;flex-direction:column;gap:6px}
.footer-brand .name{font-family:var(--heading-font);font-size:22px;font-weight:700;color:var(--foreground-primary)}
.footer-brand .desc{font-size:12px;color:var(--foreground-secondary)}
.footer-links{display:flex;gap:56px}
.footer-link-group{display:flex;flex-direction:column;gap:8px}
.footer-link-group .group-title{font-size:12px;font-weight:600;color:var(--foreground-primary);margin-bottom:2px}
.footer-link-group a{font-size:12px;color:var(--foreground-muted);transition:color var(--transition-fast)}
.footer-link-group a:hover{color:var(--foreground-primary)}
.footer-divider{width:100%;height:1px;background:var(--border-subtle)}
.footer-copyright{font-size:11px;color:var(--foreground-muted)}
.footer-copyright img{height:14px;width:auto;vertical-align:middle;display:inline;margin-right:3px}

/* ========== Other Pages ========== */
.about-page{text-align:center;padding:var(--space-3xl) 0}
.about-avatar{width:120px;height:120px;border-radius:50%;margin:0 auto var(--space-lg);border:3px solid var(--border-primary)}
.about-page h1{font-family:var(--heading-font);font-size:32px;color:var(--foreground-primary);margin-bottom:var(--space-sm)}
.about-content{max-width:var(--content-max);margin:0 auto;text-align:left;font-size:15px;line-height:1.85;color:var(--foreground-secondary);padding:0 var(--space-lg)}
.archive-list{display:flex;flex-direction:column;gap:0}
.archive-item{display:flex;justify-content:space-between;align-items:baseline;padding:var(--space-sm) 0;border-bottom:1px solid var(--border-subtle)}
.archive-date{font-size:12px;color:var(--foreground-muted);flex-shrink:0}
.archive-title{font-size:15px;font-weight:500;color:var(--foreground-primary);flex:1;margin-left:var(--space-md)}
.archive-item:hover .archive-title{color:var(--accent-primary)}
.search-form{margin-bottom:var(--space-xl)}
.search-form input{width:100%;padding:12px 16px;font-family:var(--body-font);font-size:15px;background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);color:var(--foreground-primary);outline:none;transition:border-color var(--transition-fast)}
.search-form input:focus{border-color:var(--accent-primary)}
.search-highlight{background:var(--accent-bg);color:var(--accent-primary);padding:1px 2px;border-radius:2px}
.message-item .message-header{display:flex;align-items:center;gap:var(--space-sm);font-size:12px;color:var(--foreground-muted);margin-bottom:var(--space-xs)}
.message-item .message-body{font-size:14px;line-height:1.65;color:var(--foreground-secondary)}
.links-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-md)}
.link-card{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:var(--space-lg);transition:border-color var(--transition-fast);display:flex;gap:var(--space-md);align-items:center}
.link-card:hover{border-color:var(--border-primary)}
.link-card-avatar{width:48px;height:48px;border-radius:50%;background:#1A1A2E;flex-shrink:0;overflow:hidden}
.link-card-avatar img{width:100%;height:100%;object-fit:cover}
.link-card-info h4{font-size:14px;font-weight:600;color:var(--foreground-primary);margin-bottom:2px}
.link-card-info p{font-size:12px;color:var(--foreground-muted);line-height:1.4}
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-md)}
.photo-item{border-radius:var(--radius-md);overflow:hidden;aspect-ratio:1;background:#0F0F14;cursor:pointer;transition:transform var(--transition-fast)}
.photo-item:hover{transform:scale(1.02)}
.photo-item img{width:100%;height:100%;object-fit:cover}
.image-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:1000;display:none;align-items:center;justify-content:center}
.image-lightbox.open{display:flex}
.lightbox-overlay{position:absolute;inset:0}
.lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;background:var(--surface-secondary);border:1px solid var(--border-primary);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;color:#fff;cursor:pointer;z-index:1;transition:background var(--transition-fast)}
.lightbox-nav:hover{background:var(--accent-primary);border-color:var(--accent-primary)}
.lightbox-prev{left:24px}
.lightbox-next{right:24px}
.login-page{display:flex;align-items:center;justify-content:center;min-height:100vh;background:var(--surface-primary)}
.login-container{width:380px;padding:var(--space-2xl) var(--space-xl);background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);text-align:center}
.login-container h1{font-family:var(--heading-font);font-size:26px;font-weight:600;margin-bottom:var(--space-lg);color:var(--foreground-primary)}
.login-container input{width:100%;padding:12px 16px;margin-bottom:var(--space-sm);font-family:var(--body-font);font-size:14px;background:var(--surface-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);color:var(--foreground-primary);outline:none;transition:border-color var(--transition-fast)}
.login-container input:focus{border-color:var(--accent-primary)}
.login-container button{width:100%;padding:12px;margin-top:var(--space-sm);background:var(--accent-primary);border:none;border-radius:var(--radius-sm);font-family:var(--body-font);font-size:14px;font-weight:600;color:#fff;cursor:pointer;transition:background var(--transition-fast)}
.login-container button:hover{background:var(--accent-soft)}
.article-private-notice{text-align:center;padding:var(--space-3xl);color:var(--foreground-muted)}
.article-private-notice form{margin-top:var(--space-md)}

/* ========== Template Compatibility Classes ========== */
/* Hero badge (alias for hero-label) */
.hero-badge{font-family:var(--body-font);font-size:11px;font-weight:600;color:var(--accent-primary);letter-spacing:4px;text-transform:uppercase}
.hero-meta-row{display:flex;align-items:center;gap:var(--space-md);font-size:13px;color:var(--foreground-muted)}
.hero-meta-row .meta-cat{color:var(--accent-primary)}
.section-divider{height:1px;background:var(--border-subtle);margin:0 60px}

/* Article item (list-item alias) */
.article-item{padding:24px 0;border-bottom:1px solid var(--border-subtle);transition:border-color var(--transition-fast)}
.article-item:hover{border-color:var(--border-primary)}
.article-item .article-title{font-family:var(--heading-font);font-size:20px;font-weight:600;color:var(--foreground-primary);line-height:1.35;margin-bottom:var(--space-xs)}
.article-item .article-title a{color:inherit}
.article-item .article-title a:hover{color:var(--accent-primary)}
.article-item .article-summary{font-size:13px;line-height:1.6;color:var(--foreground-secondary);margin-bottom:var(--space-sm)}
.article-item .article-meta{display:flex;align-items:center;gap:var(--space-md);font-size:12px;color:var(--foreground-muted)}

/* Page headings */
.page-title{font-family:var(--heading-font);font-size:28px;font-weight:700;color:var(--foreground-primary);margin-bottom:var(--space-xs)}
.page-desc{font-size:14px;color:var(--foreground-muted);margin-bottom:var(--space-xl)}
.empty-tip{text-align:center;padding:var(--space-2xl);color:var(--foreground-muted)}
.search-info{font-size:14px;color:var(--foreground-muted);margin-bottom:var(--space-lg)}

/* About page */
.avatar-large{width:120px;height:120px;border-radius:50%;margin:0 auto var(--space-lg);border:3px solid var(--border-primary);object-fit:cover}

/* Archive page */
.archive-year{margin-bottom:var(--space-xl)}
.archive-year h3{font-family:var(--heading-font);font-size:18px;font-weight:600;color:var(--foreground-primary);margin-bottom:var(--space-sm)}
.full-width{flex:1;width:100%}

/* Links page (compat) */
.link-list{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-md)}
.link-item{background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);transition:border-color var(--transition-fast)}
.link-item:hover{border-color:var(--border-primary)}
.link-item a{display:flex;gap:var(--space-md);align-items:center;padding:var(--space-lg);color:inherit}
.link-logo{width:48px;height:48px;border-radius:50%;background:#1A1A2E;flex-shrink:0;overflow:hidden;object-fit:cover}
.link-info h3{font-size:14px;font-weight:600;color:var(--foreground-primary);margin-bottom:2px}
.link-info p{font-size:12px;color:var(--foreground-muted);line-height:1.4}
.link-apply{margin-top:var(--space-2xl)}

/* Message page */
.message-list{display:flex;flex-direction:column;gap:0}
.message-item{padding:18px 0;border-bottom:1px solid var(--border-subtle)}
.message-avatar img{width:38px;height:38px;border-radius:50%;background:#1A1A2E}
.message-meta{display:flex;align-items:center;gap:12px;margin-bottom:4px}
.message-author{font-size:13px;font-weight:600;color:var(--foreground-primary)}
.message-time{font-size:12px;color:var(--foreground-muted)}
.message-content{font-size:13.5px;line-height:1.65;color:var(--foreground-secondary);margin-bottom:var(--space-xs)}
.message-replies{margin-top:var(--space-sm);padding-left:var(--space-xl);border-left:2px solid var(--border-subtle)}
.message-form{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-xl);padding:24px;background:var(--surface-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md)}
.message-form h4{font-size:14px;font-weight:600;color:var(--foreground-primary)}
.message-form input,.message-form textarea{padding:10px 14px;background:var(--surface-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);font-family:var(--body-font);font-size:13px;color:var(--foreground-primary);outline:none;resize:vertical;transition:border-color var(--transition-fast)}
.message-form input:focus,.message-form textarea:focus{border-color:var(--accent-primary)}

/* Photo page */
.photo-link{display:block;color:inherit}
.photo-img{width:100%;height:100%;object-fit:cover}
.photo-title{position:absolute;bottom:0;left:0;right:0;padding:8px 12px;font-size:12px;color:var(--foreground-primary);background:linear-gradient(transparent, rgba(0,0,0,.7))}

/* Pagination component */
.pagination-inner{display:flex;align-items:center;justify-content:center;gap:var(--space-sm)}
.page-btn{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 var(--space-sm);font-size:13px;border-radius:var(--radius-sm);transition:all var(--transition-fast);color:var(--foreground-muted);background:transparent}
.page-btn:hover{background:var(--surface-secondary);color:var(--foreground-primary)}
.page-btn.active{background:var(--accent-primary);color:#fff;font-weight:600}

/* Footer compat */
.footer-tagline{font-size:12px;color:var(--foreground-secondary);text-align:center;margin-top:4px}

/* ========== Responsive ========== */
@media(max-width:1200px){
  .hero-content{flex:0 0 480px;padding-left:40px}
  .hero-visual{display:none}
  .hero-title{font-size:38px}
  .article-content-area{padding:0 40px}
  .article-left-toc{display:none}
  .related-grid{grid-template-columns:1fr 1fr}
  .photo-grid{grid-template-columns:repeat(2,1fr)}
  .footer-top{flex-direction:column;gap:var(--space-xl)}
}
@media(max-width:1024px){
  .site-nav{gap:24px}
  .nav-link{font-size:13px}
  .hero-content{flex:1;padding:48px 40px}
  .hero-title{font-size:32px}
  .main-content{flex-direction:column;padding:0 40px}
  .sidebar{width:100%}
  .article-grid{grid-template-columns:1fr}
  .article-card.featured{flex-direction:column}
  .article-card.featured .article-cover{flex:auto;min-height:200px}
  .top-bar{padding:0 40px}
  .site-header{padding:0 40px}
  .stats-strip{padding:var(--space-lg) 40px;flex-wrap:wrap;gap:var(--space-md)}
  .sensor-section-header{padding-left:40px;padding-right:40px}
  .sensor-strip{padding:0 40px var(--space-lg)}
  .sensor-item-value span{font-size:22px}
  .sensor-item-label{font-size:12px}
  .section-header-row{padding-left:40px;padding-right:40px}
}
@media(max-width:768px){
  .top-bar{display:none}
  .header-music{
    position:fixed;bottom:22px;left:12px;right:auto;z-index:200;
    max-width:210px;padding:7px 14px 7px 7px;gap:8px;margin-left:0;
    background:var(--surface-elevated);border:1px solid var(--border-primary);
    border-radius:var(--radius-pill);
    box-shadow:0 4px 24px rgba(0,0,0,.35);
    backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  }
  .hm-track-name-wrap{max-width:120px}
  .hm-play-btn{width:28px;height:28px;flex-shrink:0}
  .hm-play-btn svg{width:13px;height:13px}
  .hm-track-name{font-size:11px}
  .site-nav{display:none;position:absolute;top:72px;left:0;right:0;background:var(--surface-primary);flex-direction:column;padding:var(--space-sm);gap:0;border-bottom:1px solid var(--border-subtle);z-index:200}
  .site-nav.open{display:flex}
  .site-nav .nav-link{padding:12px 16px;border-radius:var(--radius-sm);text-align:center}
  .site-nav .nav-link:hover{background:var(--surface-tertiary);color:var(--foreground-primary)}
  .site-nav .nav-link:active{background:var(--surface-elevated)}
  .mobile-menu-btn{display:block}
  .hero-section{flex-direction:column;min-height:auto}
  .hero-content{flex:auto;padding:40px 24px}
  .hero-title{font-size:28px;max-width:100%}
  .hero-desc{font-size:14px;max-width:100%}
  .container{padding:0}
  .stats-strip{padding:var(--space-md) 24px}
  .sensor-section-header{padding:var(--space-lg) 24px var(--space-md)}
  .sensor-section-header .section-title{font-size:18px}
  .sensor-strip{padding:0 12px var(--space-md);flex-wrap:nowrap;gap:8px}
  .sensor-item-label{font-size:12px;letter-spacing:1px}
  .sensor-item-value span{font-size:16px}
  .sensor-unit{font-size:10px}
  .section-header-row{padding-left:24px;padding-right:24px}
  .main-content{padding:0 24px}
  .article-content-area{flex-direction:column;padding:0 24px}
  .article-sidebar{width:100%}
  .article-header{padding:var(--space-xl) 24px}
  .article-header h1{font-size:28px}
  .related-grid{grid-template-columns:1fr}
  .footer-links{flex-wrap:wrap;gap:var(--space-xl)}
  .links-grid{grid-template-columns:1fr}
  .photo-grid{grid-template-columns:1fr 1fr}
  .author-card{flex-direction:column;text-align:center}
  .author-stats{justify-content:center}
}
@media(max-width:480px){
  .hero-title{font-size:24px}
  .hero-content{padding:32px 20px}
  .hero-cta-row{flex-direction:column;align-items:flex-start}
  .stat-num{font-size:22px}
  .article-header h1{font-size:24px}
  .article-header .article-summary{font-size:14px}
  .article-meta{flex-wrap:wrap;gap:var(--space-sm);justify-content:center}
  .article-content{font-size:14px}
  .pagination{gap:4px}
  .pagination a,.pagination span{min-width:32px;height:32px;font-size:12px}
  .comment-item{flex-direction:column}
  .photo-grid{grid-template-columns:1fr}
  .footer{padding:var(--space-xl) 20px}
}

/* ========== Wide Screen Decorations ========== */
@media (max-width: 1519px) {
  .side-dots,
  .left-toolbar { display: none !important; }
}

/* ========== Print ========== */
@media print{
  .site-header,.site-footer,.sidebar,.theme-toggle,.back-to-top,.reading-progress,.article-toc,.article-sidebar,.comment-section,.related-articles,.article-actions,.mobile-menu-btn,.top-bar,.hero-visual,.side-dots,.left-toolbar{display:none!important}
  body{background:#fff;color:#000;font-size:13px}
  .container{max-width:100%}
  .article-header h1{font-size:1.6em;color:#000}
  .article-content{max-width:100%}
  .markdown-body a{color:#000;text-decoration:underline}
  .markdown-body pre{border:1px solid #ccc;background:#f8f8f8}
  .markdown-body code{background:#f0f0f0;color:#333}
}
