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

:root {
  --accent: #6366F1;
  --accent-hover: #4F46E5;
  --accent-soft: rgba(99,102,241,0.1);
  --accent-glow: rgba(99,102,241,0.25);
  --bg: #E0E5EB;
  --glass-bg: rgba(255,255,255,0.45);
  --glass-bg-strong: rgba(255,255,255,0.62);
  --glass-border: rgba(255,255,255,0.5);
  --glass-blur: 20px;
  --glass-highlight: linear-gradient(135deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0) 60%);
  --content-bg: transparent;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: rgba(0,0,0,0.06);
  --radius: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --radius-pill: 50px;
}

html.dark {
  --accent: #818CF8;
  --accent-hover: #6366F1;
  --accent-soft: rgba(129,140,248,0.1);
  --accent-glow: rgba(129,140,248,0.2);
  --bg: #0F1117;
  --glass-bg: rgba(22,25,33,0.6);
  --glass-bg-strong: rgba(22,25,33,0.78);
  --glass-border: rgba(255,255,255,0.06);
  --glass-highlight: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 40%, rgba(255,255,255,0) 60%);
  --content-bg: transparent;
  --text: #E8EAED;
  --text-secondary: #9AA0AC;
  --text-light: #5F6570;
  --border: rgba(255,255,255,0.05);
}

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

html, body {
  height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text); font-size: 15px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg width='360' height='360' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M66 54 L54 24 L72 42 L84 24 L78 54' fill='none' stroke='%2394a3b8' stroke-width='1.2' opacity='0.4'/%3E%3Cellipse cx='72' cy='66' rx='15' ry='12' fill='none' stroke='%2394a3b8' stroke-width='1.2' opacity='0.4'/%3E%3Ccircle cx='66' cy='63' r='2' fill='%2394a3b8' opacity='0.35'/%3E%3Ccircle cx='78' cy='63' r='2' fill='%2394a3b8' opacity='0.35'/%3E%3Cpath d='M72 69 L72 70.5' stroke='%2394a3b8' stroke-width='1' opacity='0.35'/%3E%3Cpath d='M54 66 L42 63' stroke='%2394a3b8' stroke-width='0.8' opacity='0.25'/%3E%3Cpath d='M90 66 L102 63' stroke='%2394a3b8' stroke-width='0.8' opacity='0.25'/%3E%3Cpath d='M216 36 Q228 18 240 30 Q252 18 258 36' fill='none' stroke='%2394a3b8' stroke-width='1.2' opacity='0.35'/%3E%3Cellipse cx='180' cy='186' rx='21' ry='12' fill='none' stroke='%2394a3b8' stroke-width='1.2' opacity='0.35'/%3E%3Cpath d='M159 186 L144 174 L144 198Z' fill='none' stroke='%2394a3b8' stroke-width='1' opacity='0.3'/%3E%3Ccircle cx='192' cy='183' r='2' fill='%2394a3b8' opacity='0.3'/%3E%3Cellipse cx='300' cy='150' rx='15' ry='10.5' transform='rotate(-20 300 150)' fill='none' stroke='%2394a3b8' stroke-width='1' opacity='0.32'/%3E%3Cellipse cx='318' cy='150' rx='15' ry='10.5' transform='rotate(20 318 150)' fill='none' stroke='%2394a3b8' stroke-width='1' opacity='0.32'/%3E%3Cpath d='M309 144 L309 168' stroke='%2394a3b8' stroke-width='0.8' opacity='0.3'/%3E%3Cellipse cx='114' cy='276' rx='15' ry='18' fill='none' stroke='%2394a3b8' stroke-width='1.2' opacity='0.35'/%3E%3Cpath d='M105 258 Q99 234 105 246' stroke='%2394a3b8' stroke-width='1' opacity='0.3'/%3E%3Cpath d='M123 258 Q129 234 123 246' stroke='%2394a3b8' stroke-width='1' opacity='0.3'/%3E%3Ccircle cx='108' cy='273' r='2' fill='%2394a3b8' opacity='0.3'/%3E%3Ccircle cx='118' cy='273' r='2' fill='%2394a3b8' opacity='0.3'/%3E%3Cpath d='M240 270 Q255 252 285 264 Q300 252 312 270 Q300 288 270 285 Q255 288 240 270Z' fill='none' stroke='%2394a3b8' stroke-width='1.2' opacity='0.3'/%3E%3Cpath d='M312 264 L330 252 L324 270Z' fill='none' stroke='%2394a3b8' stroke-width='1' opacity='0.25'/%3E%3Ccircle cx='255' cy='267' r='2' fill='%2394a3b8' opacity='0.3'/%3E%3Cpath d='M30 300 L24 282 L36 294 L48 282 L42 300' fill='none' stroke='%2394a3b8' stroke-width='1' opacity='0.3'/%3E%3Cellipse cx='36' cy='312' rx='12' ry='10' fill='none' stroke='%2394a3b8' stroke-width='1' opacity='0.3'/%3E%3Cpath d='M42 318 L48 330' stroke='%2394a3b8' stroke-width='0.8' opacity='0.25'/%3E%3Ccircle cx='32' cy='310' r='1.5' fill='%2394a3b8' opacity='0.3'/%3E%3Ccircle cx='40' cy='310' r='1.5' fill='%2394a3b8' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 360px 360px;
}
html.dark body {
  background-image: url("data:image/svg+xml,%3Csvg width='360' height='360' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M66 54 L54 24 L72 42 L84 24 L78 54' fill='none' stroke='%233a4050' stroke-width='1.2' opacity='0.5'/%3E%3Cellipse cx='72' cy='66' rx='15' ry='12' fill='none' stroke='%233a4050' stroke-width='1.2' opacity='0.5'/%3E%3Ccircle cx='66' cy='63' r='2' fill='%233a4050' opacity='0.4'/%3E%3Ccircle cx='78' cy='63' r='2' fill='%233a4050' opacity='0.4'/%3E%3Cpath d='M72 69 L72 70.5' stroke='%233a4050' stroke-width='1' opacity='0.4'/%3E%3Cpath d='M54 66 L42 63' stroke='%233a4050' stroke-width='0.8' opacity='0.3'/%3E%3Cpath d='M90 66 L102 63' stroke='%233a4050' stroke-width='0.8' opacity='0.3'/%3E%3Cpath d='M216 36 Q228 18 240 30 Q252 18 258 36' fill='none' stroke='%233a4050' stroke-width='1.2' opacity='0.45'/%3E%3Cellipse cx='180' cy='186' rx='21' ry='12' fill='none' stroke='%233a4050' stroke-width='1.2' opacity='0.45'/%3E%3Cpath d='M159 186 L144 174 L144 198Z' fill='none' stroke='%233a4050' stroke-width='1' opacity='0.4'/%3E%3Ccircle cx='192' cy='183' r='2' fill='%233a4050' opacity='0.4'/%3E%3Cellipse cx='300' cy='150' rx='15' ry='10.5' transform='rotate(-20 300 150)' fill='none' stroke='%233a4050' stroke-width='1' opacity='0.4'/%3E%3Cellipse cx='318' cy='150' rx='15' ry='10.5' transform='rotate(20 318 150)' fill='none' stroke='%233a4050' stroke-width='1' opacity='0.4'/%3E%3Cpath d='M309 144 L309 168' stroke='%233a4050' stroke-width='0.8' opacity='0.35'/%3E%3Cellipse cx='114' cy='276' rx='15' ry='18' fill='none' stroke='%233a4050' stroke-width='1.2' opacity='0.45'/%3E%3Cpath d='M105 258 Q99 234 105 246' stroke='%233a4050' stroke-width='1' opacity='0.35'/%3E%3Cpath d='M123 258 Q129 234 123 246' stroke='%233a4050' stroke-width='1' opacity='0.35'/%3E%3Ccircle cx='108' cy='273' r='2' fill='%233a4050' opacity='0.35'/%3E%3Ccircle cx='118' cy='273' r='2' fill='%233a4050' opacity='0.35'/%3E%3Cpath d='M240 270 Q255 252 285 264 Q300 252 312 270 Q300 288 270 285 Q255 288 240 270Z' fill='none' stroke='%233a4050' stroke-width='1.2' opacity='0.4'/%3E%3Cpath d='M312 264 L330 252 L324 270Z' fill='none' stroke='%233a4050' stroke-width='1' opacity='0.3'/%3E%3Ccircle cx='255' cy='267' r='2' fill='%233a4050' opacity='0.35'/%3E%3Cpath d='M30 300 L24 282 L36 294 L48 282 L42 300' fill='none' stroke='%233a4050' stroke-width='1' opacity='0.4'/%3E%3Cellipse cx='36' cy='312' rx='12' ry='10' fill='none' stroke='%233a4050' stroke-width='1' opacity='0.4'/%3E%3Cpath d='M42 318 L48 330' stroke='%233a4050' stroke-width='0.8' opacity='0.3'/%3E%3Ccircle cx='32' cy='310' r='1.5' fill='%233a4050' opacity='0.35'/%3E%3Ccircle cx='40' cy='310' r='1.5' fill='%233a4050' opacity='0.35'/%3E%3C/svg%3E");
}

/* ============ Page Shell ============ */
.page {
  width: 920px; max-width: 100%; margin: 0 auto;
  height: 100vh; display: flex; flex-direction: column;
  padding: 20px 0;
}

/* ============ Glass highlight ============ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-border);
  position: relative;
}
.glass::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none; -webkit-tap-highlight-color: transparent;
  background: var(--glass-highlight); z-index: 0;
}

/* ============ Shell ============ */
.shell {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* ============ Top Bar ============ */
.topbar {
  height: 68px; min-height: 68px;
  display: flex; align-items: center;
  padding: 0 24px; gap: 0;
  position: relative; z-index: 5;
}
.topbar-brand {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  flex-shrink: 0;
}
.topbar-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 340px; max-width: calc(100% - 400px);
}
.topbar-center i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 13px; pointer-events: none; -webkit-tap-highlight-color: transparent; z-index: 2;
}
.topbar-search {
  width: 100%; height: 38px; border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border); padding: 0 16px 0 38px;
  font-size: 13px; color: var(--text);
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  outline: none; transition: all .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.topbar-search::placeholder { color: var(--text-secondary); }
.topbar-search:focus {
  border-color: rgba(99,102,241,0.4);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 2px 12px rgba(99,102,241,0.1);
}
html.dark .topbar-search {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.07);
}
html.dark .topbar-search:focus {
  border-color: rgba(129,140,248,0.4);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 2px 12px rgba(129,140,248,0.12);
}
.topbar-brand .brand-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
  box-shadow: 0 3px 12px var(--accent-glow);
}
.topbar-brand .brand-name { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.topbar-brand .brand-logo-img { height: 36px; width: auto; border-radius: 8px; object-fit: contain; }
.topbar-center .m-brand-icon, .topbar-center .m-brand-name { display: none; }
.topbar-center .m-brand-logo-img { display: none; }
.topbar-spacer { flex: 1; }

.topbar-actions { display: flex; align-items: center; gap: 6px; }
.topbar-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--text-secondary);
  transition: all .2s; font-size: 14px; position: relative;
}
.topbar-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }
html.dark .topbar-btn:hover { background: rgba(255,255,255,0.08); }
.topbar-btn .badge {
  position: absolute; top: 5px; right: 5px; width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%; border: 2px solid rgba(255,255,255,0.8);
}

/* Scroll progress button */
.scroll-progress-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.scroll-progress-ring {
  width: 34px; height: 34px; transform: rotate(-90deg);
  position: absolute; top: 0; left: 0;
}
.scroll-progress-bg {
  fill: none; stroke: var(--border); stroke-width: 2.5;
}
.scroll-progress-bar {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 87.96;
  stroke-dashoffset: 87.96;
  transition: stroke-dashoffset 0.15s ease;
}
.scroll-progress-text {
  font-size: 9px; font-weight: 700; color: var(--text-secondary);
  position: relative; z-index: 1; line-height: 1;
}
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; margin-left: 4px; border: 2px solid transparent;
  transition: all .2s;
}
.topbar-avatar:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.topbar-vip {
  background: linear-gradient(135deg, #D4A84B, #B8922E);
  color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: var(--radius-xs); cursor: pointer; letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(212,168,75,0.3);
}

/* ============ Main Body ============ */
.main-body { flex: 1; display: flex; overflow: hidden; }

/* ============ Sidebar ============ */
.sidebar {
  width: var(--sidebar-w, 230px); min-width: var(--sidebar-w, 230px);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  padding-top: 4px;
  position: relative; z-index: 2;
}
.sidebar::-webkit-scrollbar { width: 0; }

.nav-group { padding: 2px 14px; }
.nav-group-title {
  font-size: 11px; color: var(--text-light); padding: 12px 18px 5px;
  font-weight: 500; letter-spacing: .3px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 18px;
  cursor: pointer; position: relative; color: var(--text-secondary); font-size: 13px;
  transition: all .15s; border-radius: var(--radius-sm); margin: 1px 0;
  text-decoration: none;
}
.nav-item:hover { background: rgba(0,0,0,0.06); color: var(--text); }
html.dark .nav-item:hover { background: rgba(255,255,255,0.07); }
.nav-item.active {
  color: var(--accent); font-weight: 600;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px rgba(99,102,241,0.2);
}
html.dark .nav-item.active {
  box-shadow: inset 0 0 0 1.5px rgba(129,140,248,0.2);
}
.nav-item i { width: 17px; text-align: center; font-size: 14px; }
.nav-count {
  margin-left: auto; font-size: 11px; color: var(--text-light);
  background: rgba(0,0,0,0.04); padding: 1px 7px;
  border-radius: 10px; font-weight: 500;
}
html.dark .nav-count { background: rgba(255,255,255,0.06); }

.nav-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 8px 18px; }
html.dark .nav-divider { background: rgba(255,255,255,0.06); }

.sidebar-section-card {
  display: flex; align-items: center; gap: 11px; padding: 8px 18px;
  cursor: pointer; transition: all .15s; color: var(--text); font-size: 13px;
  border-radius: var(--radius-sm); margin: 1px 0;
  text-decoration: none;
}
.sidebar-section-card:hover { background: rgba(0,0,0,0.06); }
html.dark .sidebar-section-card:hover { background: rgba(255,255,255,0.07); }
.sidebar-section-card .card-icon {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.sidebar-section-card .card-icon.indigo { background: rgba(99,102,241,0.1); color: var(--accent); }
.sidebar-section-card .card-icon.teal { background: rgba(20,184,166,0.1); color: #0D9488; }
.sidebar-section-card .card-icon.amber { background: rgba(245,158,11,0.1); color: #D97706; }
.sidebar-section-card .card-icon.rose { background: rgba(244,63,94,0.1); color: #E11D48; }
html.dark .sidebar-section-card .card-icon.indigo { background: rgba(129,140,248,0.12); color: #818CF8; }
html.dark .sidebar-section-card .card-icon.teal { background: rgba(45,212,191,0.12); color: #2DD4BF; }
html.dark .sidebar-section-card .card-icon.amber { background: rgba(251,191,36,0.12); color: #FBBF24; }
html.dark .sidebar-section-card .card-icon.rose { background: rgba(251,113,133,0.12); color: #FB7185; }

.sidebar-fav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 18px;
  cursor: pointer; transition: all .15s; font-size: 13px; color: var(--text);
  border-radius: var(--radius-sm); margin: 1px 0;
}
.sidebar-fav-item:hover { background: rgba(0,0,0,0.06); }
html.dark .sidebar-fav-item:hover { background: rgba(255,255,255,0.07); }
.sidebar-fav-item .fav-thumb {
  width: 32px; height: 32px; border-radius: var(--radius-xs); object-fit: cover;
}

.sidebar-footer { display: none; }

/* ============ Lightbox ============ */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox-img-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  max-width: 90vw; max-height: 85vh;
}
.lightbox-img-wrap img {
  max-width: 90vw; max-height: 85vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  user-select: none; -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px; z-index: 10;
  width: 38px; height: 38px; border: none;
  background: rgba(255,255,255,0.15); color: #fff;
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border: none;
  background: rgba(255,255,255,0.15); color: #fff;
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 10;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 13px; z-index: 10;
  background: rgba(0,0,0,0.4); padding: 4px 14px; border-radius: 20px;
}

/* ============ Content Area ============ */
.mobile-search { display: none; }
.content-area {
  flex: 1; position: relative; display: flex; flex-direction: column;
  overflow: hidden; z-index: 2;
}
.content-inner {
  flex: 1; display: flex; flex-direction: column;
  background: transparent;
  border-left: 1px solid var(--glass-border);
  overflow: hidden;
}
.content-scroll {
  flex: 1; overflow-y: scroll; padding: 18px 24px 40px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.content-scroll::-webkit-scrollbar { display: none; }

.fade-top, .fade-bottom {
  position: absolute; left: 0; right: 0; height: 48px;
  pointer-events: none; -webkit-tap-highlight-color: transparent; z-index: 5; transition: opacity .3s;
}
.fade-top { top: 0; background: linear-gradient(to bottom, var(--bg), transparent); opacity: 0; }
.fade-bottom { bottom: 0; background: linear-gradient(to top, var(--bg), transparent); opacity: 1; }
.fade-top.visible, .fade-bottom.visible { opacity: 1; }

/* ============ Tabs ============ */
.content-tabs {
  display: flex; gap: 28px; margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.content-tab {
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 5px 0; position: relative; transition: color .2s;
}
.content-tab:hover { color: var(--text); }
.content-tab.active { color: var(--accent); font-weight: 600; }
.content-tab.active::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2.5px; background: var(--accent); border-radius: 2px;
}

/* ============ Hitokoto Banner ============ */
.hitokoto-banner {
  border-radius: var(--radius-sm);
  padding: 14px 18px; display: flex; align-items: center;
  margin-bottom: 18px; cursor: pointer; transition: all .2s;
  animation: cardFadeIn 0.4s ease both;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  position: relative;
}
.hitokoto-banner::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--glass-highlight); pointer-events: none; -webkit-tap-highlight-color: transparent;
}
.hitokoto-banner:hover { background: var(--glass-bg-strong); }
.hitokoto-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  position: relative; z-index: 2; font-style: italic;
}
.hitokoto-from {
  font-size: 12px; color: var(--text-light); margin-left: 8px;
  position: relative; z-index: 2; font-style: normal;
}

/* ============ Simple Card Style ============ */
.post-card-simple {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all .25s;
  position: relative; overflow: hidden;
  text-decoration: none; color: inherit;
  animation: cardFadeIn 0.4s ease both;
}
.post-card-simple::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight); z-index: 1;
}
.post-card-simple:hover {
  background: var(--glass-bg-strong);
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  border-color: rgba(255,255,255,0.7);
  transform: translateX(4px);
}
html.dark .post-card-simple { box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
html.dark .post-card-simple:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.1); }

.pcs-left {
  flex-shrink: 0; text-align: center; padding-top: 2px;
  position: relative; z-index: 2;
}
.pcs-date {
  display: flex; flex-direction: column; align-items: center;
  background: var(--accent-soft); border-radius: var(--radius-xs);
  padding: 8px 12px; min-width: 48px;
}
.pcs-day {
  font-size: 22px; font-weight: 800; color: var(--accent);
  line-height: 1;
}
.pcs-month {
  font-size: 11px; color: var(--accent); font-weight: 600;
  margin-top: 4px; text-transform: uppercase;
}
.pcs-body {
  flex: 1; min-width: 0; position: relative; z-index: 2;
}
.pcs-title {
  font-size: 16px; font-weight: 600; color: var(--text);
  line-height: 1.5; margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  transition: color .15s;
}
.post-card-simple:hover .pcs-title { color: var(--accent); }
.pcs-excerpt {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pcs-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--text-light);
}
.pcs-meta-item { display: flex; align-items: center; gap: 4px; }
.pcs-meta-item i { font-size: 11px; }
.pcs-meta .post-tags-link {
  display: inline-block; padding: 1px 8px; font-size: 11px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 20px; text-decoration: none;
}
.pcs-meta .post-tags-link:hover { background: var(--accent); color: #fff; }
.pcs-thumb {
  flex-shrink: 0; width: 100px; height: 72px;
  border-radius: var(--radius-xs); overflow: hidden;
  position: relative; z-index: 2;
}
.pcs-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ============ Post Card (social style) ============ */
.post-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: background .25s, box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
  animation: cardFadeIn 0.4s ease both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Waterfall Effect ============ */
.post-card, .friend-feed-card, .at-post, .link-card, .about-stat-card,
.leaderboard-item, .comment-list-box, .comment-body, .archive-stat-item,
.at-year, .photo-item, .gallery-item {
  animation: cardFadeIn 0.4s ease both;
}
.post-card:nth-child(1), .friend-feed-card:nth-child(1), .comment-body:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2), .friend-feed-card:nth-child(2), .comment-body:nth-child(2) { animation-delay: 0.04s; }
.post-card:nth-child(3), .friend-feed-card:nth-child(3), .comment-body:nth-child(3) { animation-delay: 0.08s; }
.post-card:nth-child(4), .friend-feed-card:nth-child(4), .comment-body:nth-child(4) { animation-delay: 0.12s; }
.post-card:nth-child(5), .friend-feed-card:nth-child(5), .comment-body:nth-child(5) { animation-delay: 0.16s; }
.post-card:nth-child(6), .friend-feed-card:nth-child(6), .comment-body:nth-child(6) { animation-delay: 0.2s; }
.post-card:nth-child(7), .friend-feed-card:nth-child(7), .comment-body:nth-child(7) { animation-delay: 0.24s; }
.post-card:nth-child(8), .friend-feed-card:nth-child(8), .comment-body:nth-child(8) { animation-delay: 0.28s; }
.post-card:nth-child(9), .friend-feed-card:nth-child(9), .comment-body:nth-child(9) { animation-delay: 0.32s; }
.post-card:nth-child(10), .friend-feed-card:nth-child(10), .comment-body:nth-child(10) { animation-delay: 0.36s; }
.at-post:nth-child(1) { animation-delay: 0.02s; }
.at-post:nth-child(2) { animation-delay: 0.06s; }
.at-post:nth-child(3) { animation-delay: 0.1s; }
.at-post:nth-child(4) { animation-delay: 0.14s; }
.at-post:nth-child(5) { animation-delay: 0.18s; }
.at-post:nth-child(6) { animation-delay: 0.22s; }
.about-stat-card:nth-child(1) { animation-delay: 0s; }
.about-stat-card:nth-child(2) { animation-delay: 0.06s; }
.about-stat-card:nth-child(3) { animation-delay: 0.12s; }
.about-stat-card:nth-child(4) { animation-delay: 0.18s; }
.leaderboard-item:nth-child(1) { animation-delay: 0s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.05s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.2s; }
.at-year:nth-child(1) { animation-delay: 0s; }
.at-year:nth-child(2) { animation-delay: 0.1s; }
.at-year:nth-child(3) { animation-delay: 0.2s; }
.archive-stat-item:nth-child(1) { animation-delay: 0s; }
.archive-stat-item:nth-child(2) { animation-delay: 0.08s; }
.archive-stat-item:nth-child(3) { animation-delay: 0.16s; }
.archive-stat-item:nth-child(4) { animation-delay: 0.24s; }
.link-card:nth-child(1) { animation-delay: 0s; }
.link-card:nth-child(2) { animation-delay: 0.04s; }
.link-card:nth-child(3) { animation-delay: 0.08s; }
.link-card:nth-child(4) { animation-delay: 0.12s; }
.link-card:nth-child(5) { animation-delay: 0.16s; }
.link-card:nth-child(6) { animation-delay: 0.2s; }
.post-card::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none; -webkit-tap-highlight-color: transparent;
  background: var(--glass-highlight); z-index: 1;
}
.post-card:hover {
  background: var(--glass-bg-strong);
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  border-color: rgba(255,255,255,0.7);
}
html.dark .post-card { box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
html.dark .post-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.1); }

.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; position: relative; z-index: 2; }
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.04); flex-shrink: 0;
  object-fit: cover;
}
.post-avatar-text {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-nickname {
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: color .15s;
}
.post-nickname:hover { color: var(--accent); }
.post-time { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.post-nickname a { color: var(--text); text-decoration: none; transition: color .15s; }
.post-nickname a:hover { color: var(--accent); }

.post-content {
  font-size: 14px; line-height: 1.75; color: var(--text-secondary);
  margin-bottom: 16px; word-break: break-word; overflow-wrap: break-word;
  position: relative; z-index: 2;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  text-overflow: ellipsis;
}

.img-grid {
  display: grid; gap: 5px; border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 16px; position: relative; z-index: 2;
}
.img-grid.g1 { grid-template-columns: 1fr; max-width: 360px; }
.img-grid.g2 { grid-template-columns: 1fr 1fr; max-width: 400px; }
.img-grid.g3 { grid-template-columns: 1fr 1fr 1fr; max-width: 440px; }
.img-grid.g4 { grid-template-columns: 1fr 1fr; max-width: 400px; }
.img-grid.g5, .img-grid.g6 { grid-template-columns: 1fr 1fr 1fr; max-width: 440px; }
.img-grid.g7, .img-grid.g8, .img-grid.g9 { grid-template-columns: 1fr 1fr 1fr; max-width: 440px; }
.img-grid .img-cell {
  aspect-ratio: 1; overflow: hidden; background: rgba(0,0,0,0.04);
  cursor: pointer; position: relative;
}
.img-grid .img-cell img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s;
}
html.dark .img-grid .img-cell { background: rgba(255,255,255,0.04); }
.img-grid .img-cell .img-more {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 600;
}

.post-actions {
  display: flex; align-items: center; gap: 0; padding-top: 14px;
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.action-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: none; border: none;
  cursor: pointer; color: var(--text-light); font-size: 12px;
  transition: all .2s; padding: 8px 0; border-radius: 0;
  text-decoration: none; position: relative;
}
.action-btn + .action-btn::before {
  content: ''; position: absolute; left: 0; top: 20%; height: 60%; width: 1px; background: var(--border);
}
.action-btn:hover { color: var(--accent); background: var(--accent-soft); }
html.dark .action-btn:hover { color: var(--accent); background: var(--accent-soft); }
.action-btn.liked { color: var(--accent); }
.action-btn.liked:hover { background: var(--accent-soft); }
.action-btn i { font-size: 13px; }

/* ============ Bottom Bar ============ */
.bottom-bar {
  height: 50px; min-height: 50px;
  display: flex; align-items: center; justify-content: center;
  gap: 28px; padding: 0 24px;
  color: var(--text-light); font-size: 12px; z-index: 2;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  position: relative;
}
.bottom-bar::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight);
}
.bottom-bar a { color: var(--text-secondary); text-decoration: none; transition: color .15s; }
.bottom-bar a:hover { color: var(--accent); }
.bottom-bar .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-light); }

/* ============ Orbs ============ */
.orb {
  position: fixed; border-radius: 50%; pointer-events: none; -webkit-tap-highlight-color: transparent;
  filter: blur(90px); opacity: 0.25; z-index: 0; transition: opacity .5s;
}
html.dark .orb { opacity: 0.12; }
.orb-1 { width: 420px; height: 420px; background: #8B9CF7; top: -100px; left: -100px; animation: f1 16s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; background: #C084FC; bottom: -80px; right: -80px; animation: f2 19s ease-in-out infinite; }
.orb-3 { width: 320px; height: 320px; background: #67E8F9; top: 40%; left: 55%; animation: f3 13s ease-in-out infinite; }
@keyframes f1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px,35px); } }
@keyframes f2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-45px,-30px); } }
@keyframes f3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-35px,45px); } }

/* ============ Hamburger (mobile) ============ */
.hamburger {
  display: none; width: 36px; height: 36px; border: none;
  background: transparent; cursor: pointer; align-items: center;
  justify-content: center; color: var(--text-secondary); font-size: 18px;
  border-radius: 8px; transition: all .15s; flex-shrink: 0;
  position: relative; z-index: 10;
}
.hamburger:hover { background: rgba(0,0,0,0.06); color: var(--text); }
html.dark .hamburger:hover { background: rgba(255,255,255,0.08); }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.3);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-mobile-header { display: none; }

/* ============ Mobile Bottom Nav ============ */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border-top: 1px solid var(--glass-border);
  align-items: center; justify-content: space-around;
  z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 10px; padding: 6px 12px;
  transition: color .15s; position: relative;
}
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item.active::after {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px;
}

/* ============ Links Page ============ */
.links-section { margin: 20px 0; }
.links-group { margin-bottom: 24px; }
.links-group-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.links-group-title i { color: var(--accent); font-size: 13px; }
.links-count { font-size: 12px; color: var(--text-light); font-weight: 400; }

.links-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.link-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-decoration: none; transition: all .2s;
  overflow: hidden;
}
.link-card:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.link-avatar {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 50%; overflow: hidden;
  background: var(--glass-bg-strong);
}
.link-avatar img {
  width: 40px; height: 40px;
  border-radius: 50%; object-fit: cover; display: block;
}
.link-avatar-text {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
}

.link-info { flex: 1; min-width: 0; }
.link-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-desc {
  font-size: 12px; color: var(--text-light); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.links-empty {
  text-align: center; color: var(--text-secondary);
  padding: 40px 20px; font-size: 14px;
}

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

/* Links info card */
.links-info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.links-info-card::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight); z-index: 0;
}
.links-info-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; position: relative; z-index: 1;
}
.links-info-avatar {
  width: 52px; height: 52px; border-radius: 16px;
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.links-info-avatar-text {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.links-info-meta { flex: 1; min-width: 0; }
.links-info-name {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin-bottom: 2px;
}
.links-info-desc {
  font-size: 13px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.links-info-stats {
  display: flex; gap: 0; margin-bottom: 18px;
  position: relative; z-index: 1;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.links-info-stat {
  flex: 1; text-align: center; padding: 14px 8px;
  background: var(--glass-bg);
  position: relative;
}
.links-info-stat + .links-info-stat {
  border-left: 1px solid var(--glass-border);
}
.links-info-stat-num {
  display: block; font-size: 22px; font-weight: 800;
  color: var(--accent); line-height: 1;
}
.links-info-stat-label {
  display: block; font-size: 11px; color: var(--text-light);
  margin-top: 6px;
}
.links-info-footer {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.links-info-url {
  font-size: 12px; color: var(--text-light);
  display: flex; align-items: center; gap: 5px;
}
.links-info-url i { font-size: 11px; color: var(--text-light); }
.links-apply-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; font-size: 13px; font-weight: 500;
  border: none; cursor: pointer; transition: all .2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.links-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ============ Apply Modal (single definition) ============ */
.apply-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
  overflow: hidden;
}
.apply-modal.show {
  display: flex;
  animation: modalIn .3s ease;
}

.apply-modal-box {
  width: 100%; max-width: 420px; padding: 28px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  position: relative;
  animation: modalIn .3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.apply-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border: none;
  background: rgba(0,0,0,0.06); border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 14px; transition: all .15s;
}
.apply-modal-close:hover { background: rgba(0,0,0,0.12); color: var(--text); }
html.dark .apply-modal-close { background: rgba(255,255,255,0.08); }
html.dark .apply-modal-close:hover { background: rgba(255,255,255,0.15); }

.apply-modal-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  text-align: center; margin-bottom: 20px;
}

.apply-form-group { margin-bottom: 12px; }
.apply-form-group input,
.apply-form-group textarea {
  width: 100%; padding: 11px 14px; font-size: 14px;
  border: 1px solid var(--glass-border); border-radius: 10px;
  background: rgba(255,255,255,0.4); color: var(--text);
  outline: none; transition: all .2s; font-family: inherit;
}
.apply-form-group input::placeholder,
.apply-form-group textarea::placeholder { color: var(--text-light); }
.apply-form-group input:focus,
.apply-form-group textarea:focus {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.06);
}
html.dark .apply-form-group input,
html.dark .apply-form-group textarea {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08);
}
.apply-form-group textarea { resize: vertical; min-height: 70px; }

.apply-submit-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .2s; margin-top: 4px;
}
.apply-submit-btn:hover {
  box-shadow: 0 4px 14px var(--accent-glow);
  transform: translateY(-1px);
}

.apply-success {
  display: none; text-align: center; padding: 20px 0;
}
.apply-success.show { display: block; }
.apply-success-icon {
  font-size: 48px; color: #10b981; margin-bottom: 16px;
}
.apply-success-title {
  font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.apply-success-desc {
  font-size: 14px; color: var(--text-secondary);
}

/* ============ Archive Page ============ */
.archive-stats {
  display: flex; gap: 12px; margin-bottom: 28px;
}
.archive-stat-item {
  flex: 1; text-align: center; padding: 16px 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  position: relative; overflow: hidden;
}
.archive-stat-item::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight);
}
.archive-stat-num {
  font-size: 28px; font-weight: 800; color: var(--accent);
  line-height: 1; position: relative; z-index: 1;
}
.archive-stat-label {
  font-size: 12px; color: var(--text-light); margin-top: 6px;
  position: relative; z-index: 1;
}

/* Archive filter */
.archive-filter {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin-bottom: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  position: relative;
}
.archive-filter i {
  color: var(--text-light); font-size: 13px; flex-shrink: 0;
}
.archive-filter input {
  flex: 1; border: none; background: transparent;
  font-size: 14px; color: var(--text); outline: none;
  font-family: inherit;
}
.archive-filter input::placeholder { color: var(--text-light); }
.archive-filter-count {
  font-size: 12px; color: var(--accent); font-weight: 600;
  flex-shrink: 0;
}

/* Archive timeline */
.archive-timeline { padding-left: 24px; }

.at-year { margin-bottom: 32px; }
.at-year:last-child { margin-bottom: 0; }
.at-year.collapsed .at-year-body { display: none; }
.at-year.collapsed .at-year-toggle { transform: rotate(-90deg); }

.at-year-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; position: relative;
  cursor: pointer; user-select: none;
}
.at-year-dot {
  position: absolute; left: -31px;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 12px var(--accent-glow);
}
.at-year-text {
  font-size: 22px; font-weight: 800; color: var(--text);
}
.at-year-count {
  font-size: 12px; color: var(--accent); font-weight: 600;
  background: var(--accent-soft);
  padding: 2px 10px; border-radius: 20px;
}
.at-year-toggle {
  margin-left: auto; font-size: 12px; color: var(--text-light);
  transition: transform .2s ease;
}

.at-year-body { display: flex; flex-direction: column; gap: 6px; }

.at-post {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-decoration: none; transition: all .2s;
  position: relative; overflow: hidden;
}
.at-post::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: var(--glass-highlight);
}
.at-post:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(99,102,241,0.3);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
html.dark .at-post:hover {
  border-color: rgba(129,140,248,0.3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.at-post-date {
  font-size: 12px; color: var(--text-light); flex-shrink: 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  position: relative; z-index: 1;
  min-width: 72px;
}
.at-post-title {
  flex: 1; min-width: 0; font-size: 14px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  position: relative; z-index: 1;
  transition: color .15s;
}
.at-post:hover .at-post-title { color: var(--accent); }
.at-post-meta {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; position: relative; z-index: 1;
  font-size: 12px; color: var(--text-light);
}
.at-post-meta i { font-size: 11px; margin-right: 3px; }
.at-post-views, .at-post-comments {
  display: flex; align-items: center; gap: 2px;
}

/* ============ About Page ============ */
.about-content { margin-bottom: 24px; }
.about-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 20px 0;
}
.about-stat-card {
  text-align: center; padding: 18px 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.about-stat-card:hover { background: var(--glass-bg-strong); transform: translateY(-2px); }
.about-stat-icon { font-size: 22px; color: var(--accent); margin-bottom: 8px; }
.about-stat-num { font-size: 24px; font-weight: 700; color: var(--text); }
.about-stat-label { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.about-section-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.about-section-title i { color: var(--accent); }

.about-recent-comments {
  margin-top: 24px; padding: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.about-comment-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.about-comment-item:last-child { border-bottom: none; }
.about-comment-avatar {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 50%; overflow: hidden;
}
.about-comment-avatar img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.about-comment-info { flex: 1; min-width: 0; }
.about-comment-name { font-size: 13px; font-weight: 600; color: var(--accent); display: block; }
.about-comment-text {
  font-size: 12px; color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 768px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Gallery Page ============ */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; border-radius: var(--radius-sm); overflow: hidden;
}
.gallery-item {
  aspect-ratio: 1; overflow: hidden; cursor: pointer;
  background: rgba(0,0,0,0.03); position: relative;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .3s;
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Friends Feed ============ */
.friends-feed { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.friends-loading { font-size: 13px; color: var(--text-light); text-align: center; padding: 24px; grid-column: 1 / -1; }
.friends-empty { text-align: center; padding: 40px 20px; grid-column: 1 / -1; }
.friends-empty i { font-size: 32px; display: block; margin-bottom: 12px; color: var(--text-light); }

.friend-feed-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 16px; transition: all .2s;
}
.friend-feed-card:hover { background: var(--glass-bg-strong); }

.friend-feed-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.friend-feed-avatar {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 50%; overflow: hidden;
  background: var(--glass-bg-strong);
}
.friend-feed-avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.friend-feed-avatar-text {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.friend-feed-info { flex: 1; min-width: 0; }
.friend-feed-name {
  font-size: 14px; font-weight: 600; color: var(--accent);
  text-decoration: none;
}
.friend-feed-name:hover { text-decoration: underline; }
.friend-feed-desc {
  font-size: 11px; color: var(--text-light); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.friend-feed-visit {
  flex-shrink: 0; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; color: var(--accent); text-decoration: none;
  border: 1px solid rgba(99,102,241,0.3); transition: all .15s;
}
.friend-feed-visit:hover { background: var(--accent); color: #fff; }

.friend-feed-posts { display: flex; flex-direction: column; }
.friend-feed-divider { height: 1px; background: var(--border); margin: 6px 0; }
.friend-feed-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; text-decoration: none; transition: all .15s;
}
.friend-feed-dot {
  flex-shrink: 0; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  opacity: 0.4; margin-top: 8px;
}
.friend-feed-item:hover .friend-feed-dot { opacity: 1; }
.friend-feed-item-content { flex: 1; min-width: 0; }
.friend-feed-item-title {
  font-size: 14px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.6; transition: color .15s;
}
.friend-feed-item:hover .friend-feed-item-title { color: var(--accent); }
.friend-feed-item-desc {
  font-size: 12px; color: var(--text-light); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5;
}
.friend-feed-item-date { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.friend-feed-no-posts { font-size: 13px; color: var(--text-light); text-align: center; padding: 12px; }

/* ============ Guestbook Leaderboard ============ */
.leaderboard {
  margin: 20px 0; padding: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.leaderboard-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.leaderboard-title i { color: var(--accent); }
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.leaderboard-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-xs);
  transition: background .15s;
}
.leaderboard-item:hover { background: rgba(0,0,0,0.03); }
html.dark .leaderboard-item:hover { background: rgba(255,255,255,0.04); }
.leaderboard-rank {
  flex-shrink: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border-radius: 6px;
}
.leaderboard-rank.top1 { background: rgba(234,179,8,0.15); color: #ca8a04; }
.leaderboard-rank.top2 { background: rgba(156,163,175,0.15); color: #6b7280; }
.leaderboard-rank.top3 { background: rgba(180,83,9,0.15); color: #b45309; }
.leaderboard-rank.topn { background: var(--glass-bg); color: var(--text-light); }
.leaderboard-avatar {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 50%; overflow: hidden;
  background: var(--glass-bg-strong);
}
.leaderboard-avatar img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.leaderboard-avatar-text {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
}
.leaderboard-name {
  flex: 1; font-size: 13px; color: var(--text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.leaderboard-count { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ============ Typecho Specific ============ */
.post-title {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin-bottom: 12px; line-height: 1.5;
}
.post-content-link { text-decoration: none; color: inherit; display: block; }
.post-full-content { font-size: 15px; line-height: 1.85; }
.post-full-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.post-full-content pre { background: rgba(0,0,0,0.04); border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 13px; }
html.dark .post-full-content pre { background: rgba(255,255,255,0.06); }
.post-full-content code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; }
.post-full-content blockquote { border-left: 3px solid var(--accent); padding: 12px 16px; margin: 16px 0; background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.post-full-content h1, .post-full-content h2, .post-full-content h3 { margin: 24px 0 12px; }
.post-full-content a { color: var(--accent); text-decoration: none; }

.post-tags { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags a {
  display: inline-block; padding: 3px 12px; font-size: 12px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 20px; text-decoration: none; transition: all .15s;
}
.post-tags a:hover { background: var(--accent); color: #fff; }

.post-nav { display: flex; gap: 12px; margin: 20px 0; }
.post-nav-item {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  text-decoration: none; transition: all .2s; cursor: pointer;
  overflow: hidden;
}
.post-nav-item:hover { background: var(--glass-bg-strong); border-color: var(--accent); box-shadow: 0 2px 12px var(--accent-glow); }
.post-nav-item i { font-size: 13px; color: var(--accent); flex-shrink: 0; }
.post-nav-content { flex: 1; min-width: 0; }
.post-nav-label { display: block; font-size: 11px; color: var(--text-light); margin-bottom: 3px; }
.post-nav-title { display: block; font-size: 14px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-nav-next { text-align: right; flex-direction: row-reverse; }
.post-nav-next .post-nav-content { text-align: right; }

/* ============ Article Detail ============ */
.article { margin-bottom: 16px; }

.article-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.article-back {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 13px;
  text-decoration: none; flex-shrink: 0;
  transition: all .2s;
}
.article-back:hover { background: var(--glass-bg-strong); color: var(--accent); }
.article-header-info { flex: 1; }
.article-title {
  font-size: 22px; font-weight: 700; color: var(--text);
  line-height: 1.4; margin-bottom: 10px;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
}
.article-meta-item {
  font-size: 13px; color: var(--text-light);
  display: flex; align-items: center; gap: 5px;
}
.article-meta-item i { font-size: 12px; }

.article-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.article-tags a {
  display: inline-block; padding: 4px 14px; font-size: 12px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 20px; text-decoration: none; transition: all .15s;
}
.article-tags a:hover { background: var(--accent); color: #fff; }

.article-content {
  font-size: 16px; line-height: 1.9; color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.article-content p { margin-bottom: 16px; }
.article-content .photo-grid p { margin: 0; }
.article-content > img, .article-content p img { max-width: 100%; border-radius: 10px; margin: 16px 0; cursor: pointer; }

.article-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.article-content h3 { font-size: 17px; font-weight: 600; margin: 22px 0 12px; }
.article-content h4 { font-size: 15px; font-weight: 600; margin: 18px 0 10px; }
.article-content pre {
  background: rgba(0,0,0,0.04); border-radius: 10px;
  padding: 16px 20px; overflow-x: auto;
  font-size: 13px; line-height: 1.6; margin: 16px 0;
  border: 1px solid var(--border);
}
html.dark .article-content pre { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.06); }
.article-content code { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 13px; }
.article-content :not(pre) > code {
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
}
.article-content blockquote {
  border-left: 3px solid var(--accent); padding: 14px 18px;
  margin: 16px 0; background: var(--accent-soft);
  border-radius: 0 10px 10px 0; color: var(--text-secondary);
}
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 6px; }
.article-content a {
  color: var(--accent); text-decoration: none;
  background: linear-gradient(to right, var(--accent), var(--accent)) no-repeat;
  background-size: 0% 1.5px;
  background-position: left bottom;
  transition: background-size .3s ease, color .2s;
  padding-bottom: 1px;
}
.article-content a:hover {
  background-size: 100% 1.5px;
  color: var(--accent-hover);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-content th, .article-content td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.article-content th { background: var(--glass-bg); font-weight: 600; }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* Photo shortcode */
.photo-grid {
  display: grid !important; gap: 4px; border-radius: 10px;
  overflow: hidden; margin: 20px 0; padding: 0;
}
.photo-grid.g1 { grid-template-columns: 1fr; max-width: 500px; }
.photo-grid.g2 { grid-template-columns: 1fr 1fr; }
.photo-grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.photo-grid.g4 { grid-template-columns: 1fr 1fr; }
.photo-grid.g5, .photo-grid.g6 { grid-template-columns: 1fr 1fr 1fr; }
.photo-grid.g7, .photo-grid.g8, .photo-grid.g9 { grid-template-columns: 1fr 1fr 1fr; }
.photo-item {
  aspect-ratio: 1 !important; overflow: hidden; cursor: pointer;
  background: rgba(0,0,0,0.03); position: relative;
  margin: 0 !important; padding: 0;
}
.photo-item img {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; display: block;
  margin: 0 !important; border-radius: 0 !important;
  transition: transform .3s;
}
.photo-single { margin: 20px 0; }
.photo-single img { width: 100%; border-radius: 10px; margin: 0; }

/* ============ Like Button (single definition) ============ */
.like-wrap {
  display: flex; justify-content: center;
  padding: 24px 0; margin: 8px 0;
}
.like-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 28px; border-radius: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  cursor: pointer; transition: all .3s;
  font-size: 14px; color: var(--text-secondary);
}
.like-btn i { font-size: 18px; transition: all .3s; }
.like-btn:hover {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}
.like-btn:hover i { color: #ef4444; transform: scale(1.15); }
.like-btn.liked {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}
.like-btn.liked i { color: #ef4444; font-weight: 900; }
.like-count {
  font-size: 13px; color: var(--text-light);
  padding-left: 8px; border-left: 1px solid var(--border);
}

/* Article author card */
.article-info-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; margin: 16px 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.article-info-left { display: flex; align-items: center; gap: 12px; }
.article-author-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
}
.article-author-name { font-size: 14px; font-weight: 600; color: var(--text); }
.article-author-desc { font-size: 12px; color: var(--text-light); }
.article-info-right { text-align: right; }
.article-info-date { font-size: 12px; color: var(--text-light); }

/* ============ Pagination (single definition) ============ */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 10px; padding: 32px 0 20px; flex-wrap: wrap;
}
.pagination li { list-style: none; display: inline-block; margin: 0 3px; }
.pagination a,
.pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 18px;
  border-radius: 12px; font-size: 14px; text-decoration: none;
  transition: all .25s ease; letter-spacing: .3px;
}
.pagination a {
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary); border: 1px solid var(--glass-border);
}
.pagination a:hover {
  background: var(--glass-bg-strong); color: var(--accent);
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.pagination .current {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
  font-weight: 600;
  transform: scale(1.05);
}
.pagination .prev, .pagination .next { margin: 0 4px; }
.pagination .prev a, .pagination .next a {
  font-size: 13px; gap: 6px; padding: 0 20px;
  background: transparent; border: 1px solid var(--glass-border);
}
.pagination .prev a:hover, .pagination .next a:hover {
  background: var(--glass-bg); color: var(--accent);
}

/* Archive header */
.archive-header { margin-bottom: 18px; }
.archive-title { font-size: 18px; font-weight: 700; color: var(--text); display: flex; align-items: center; }
.archive-count { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ============ Comment System (single definition) ============ */
.comments-section {
  margin-top: 16px;
}

.comments-title {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 2;
}
.comments-title i { color: var(--accent); }

.comment-list { list-style: none; padding: 0; margin: 0; position: relative; z-index: 2; }
.comment-body { list-style: none; }
.comment-child { margin-left: 20px; }
.comment-item { padding: 0; }

.comment-list-box {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.comment-body:last-child .comment-list-box { border-bottom: none; }

.comment-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.comment-avatar {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 50%; overflow: hidden;
}
.comment-avatar img {
  width: 36px; height: 36px;
  border-radius: 50%; object-fit: cover; display: block;
}
.comment-head-info { flex: 1; min-width: 0; }
.comment-author-name {
  font-size: 14px; font-weight: 600; color: var(--accent);
  line-height: 1.3;
}
.comment-author-name a { color: var(--accent); text-decoration: none; }
.comment-author-name a:hover { text-decoration: underline; }
.comment-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; font-size: 10px; border-radius: 4px; font-weight: 600;
  margin-left: 6px;
}
.comment-badge-admin { background: var(--accent-soft); color: var(--accent); }
.comment-badge-level { background: rgba(16,185,129,0.08); color: #059669; }
.comment-head-time {
  font-size: 12px; color: var(--text-light);
  margin-left: auto; flex-shrink: 0;
}

.comment-content {
  font-size: 14px; line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 8px;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  overflow: hidden;
}
.comment-content a { color: var(--accent); text-decoration: none; }
.comment-content img { max-width: 100%; height: auto; border-radius: 8px; }

.comment-foot {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-light);
}
.comment-device { opacity: 0.6; }
.comment-reply a {
  color: var(--accent); text-decoration: none; cursor: pointer;
}
.comment-reply a:hover { text-decoration: underline; }

.comment-children { margin-top: 0; }

.comment-pagination {
  display: flex; justify-content: center; padding: 16px 0;
  position: relative; z-index: 2;
}
.comment-pagination a, .comment-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 12px;
  border-radius: 8px; font-size: 13px; text-decoration: none;
  background: var(--glass-bg); color: var(--text-secondary);
  border: 1px solid var(--glass-border); transition: all .15s;
  margin: 0 2px;
}
.comment-pagination a:hover { background: var(--glass-bg-strong); color: var(--accent); }
.comment-pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Comment form */
.respond { position: relative; z-index: 2; }
.comment-form-wrap {
  padding: 20px; margin-top: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.comment-form-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.comment-form-title i { color: var(--accent); }
.comment-logged {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.comment-form-row { display: flex; gap: 8px; margin-bottom: 10px; }
.comment-form-row input { flex: 1; min-width: 0; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 10px 14px; font-size: 13px;
  border: 1px solid var(--glass-border); border-radius: 10px;
  background: rgba(255,255,255,0.4); color: var(--text);
  outline: none; transition: all .2s;
  font-family: inherit; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.comment-form input::placeholder, .comment-form textarea::placeholder { color: var(--text-light); }
.comment-form input:focus, .comment-form textarea:focus {
  border-color: rgba(99,102,241,0.4);
  background: rgba(255,255,255,0.6);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.06);
}
html.dark .comment-form input, html.dark .comment-form textarea {
  background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08);
}
html.dark .comment-form input:focus, html.dark .comment-form textarea:focus {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.08);
}
.comment-form textarea { resize: vertical; min-height: 90px; }
.comment-form-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.comment-form-hint { font-size: 12px; color: var(--text-light); }
.cancel-reply-btn {
  display: none; align-items: center; gap: 4px;
  background: none; border: none; color: var(--accent);
  font-size: 12px; cursor: pointer; margin-bottom: 10px;
}
.comment-form .btn-publish {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; border: none; border-radius: 50px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .25s;
  box-shadow: 0 2px 12px var(--accent-glow);
  position: relative; overflow: hidden;
}
.comment-form .btn-publish::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  border-radius: inherit; pointer-events: none;
}
.comment-form .btn-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.comment-form .btn-publish:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.comment-form .btn-publish i { font-size: 13px; }
.comment-closed { text-align: center; color: var(--text-secondary); padding: 20px; }

/* ============ PJAX Loading ============ */
.pjax-loading { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; background: transparent; }
.pjax-loading.active { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 50%, var(--accent) 100%); background-size: 200% 100%; animation: pjax-loading 1s linear infinite; }
@keyframes pjax-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ Responsive ============ */
@media (max-width: 920px) {
  .page { width: 100%; padding: 0; }
  .shell { border-radius: 0; }
  .content-inner { border-left: none; }
  .bottom-bar { display: none; }

  .sidebar {
    display: flex; position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; z-index: 200;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    padding-top: 16px;
    box-shadow: none;
    overflow-y: auto;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .hamburger { display: flex; }

  .sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,0.3);
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
    -webkit-tap-highlight-color: transparent;
  }
  .sidebar-overlay.active { opacity: 1; pointer-events: auto; }

  .sidebar-mobile-header {
    display: flex; align-items: center; justify-content: flex-end;
    padding: 14px 18px;
    min-height: 48px; position: relative;
  }
  .sidebar-close {
    display: flex; position: relative; top: auto; right: auto;
    width: 32px; height: 32px; border: none; background: rgba(0,0,0,0.06);
    border-radius: 50%; cursor: pointer; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 14px; transition: all .15s;
  }
  .sidebar-close:hover { background: rgba(0,0,0,0.12); color: var(--text); }
  html.dark .sidebar-close { background: rgba(255,255,255,0.08); }
  html.dark .sidebar-close:hover { background: rgba(255,255,255,0.15); }

  .sidebar-footer {
    display: flex; flex-wrap: wrap; gap: 4px 16px;
    margin-top: auto; padding: 16px 20px;
    font-size: 12px; color: var(--text-light);
    border-top: 1px solid var(--glass-border);
  }
  .sidebar-footer a { color: var(--text-secondary); text-decoration: none; }
  .sidebar-footer a:hover { color: var(--accent); }

  .topbar { height: 56px; min-height: 56px; padding: 0 12px; }
  .topbar-center { display: flex; position: absolute; left: 50%; transform: translateX(-50%); align-items: center; gap: 8px; }
  .topbar-center i, .topbar-search { display: none !important; }
  .topbar-center .m-brand-icon, .topbar-center .m-brand-name { display: flex !important; }
  .topbar-center .m-brand-logo-img { display: block !important; height: 28px; width: auto; border-radius: 6px; }
  .topbar-center .m-brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 10px;
    align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 700;
  }
  .topbar-center .m-brand-name { font-size: 15px; font-weight: 700; color: var(--text); }

  .mobile-search {
    display: flex; align-items: center; margin-bottom: 14px;
    position: relative; background: var(--glass-bg);
    border: 1px solid var(--glass-border); border-radius: var(--radius-pill);
    padding: 0 14px; height: 38px; gap: 8px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all .25s;
  }
  .mobile-search:focus-within {
    border-color: rgba(99,102,241,0.4);
    background: rgba(255,255,255,0.7);
    box-shadow: 0 2px 12px rgba(99,102,241,0.1);
  }
  html.dark .mobile-search {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
  }
  html.dark .mobile-search:focus-within {
    border-color: rgba(129,140,248,0.4);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 2px 12px rgba(129,140,248,0.12);
  }
  .mobile-search i {
    color: var(--text-light); font-size: 13px; flex-shrink: 0;
    pointer-events: none;
  }
  .mobile-search input {
    flex: 1; border: none; background: transparent;
    font-size: 13px; color: var(--text); outline: none;
    height: 100%;
  }
  .mobile-search input::placeholder { color: var(--text-secondary); }
  .topbar-brand .brand-name { display: none; }
  .topbar-brand .brand-icon { display: none; }
  .topbar-brand { display: none; }

  .content-scroll { padding: 12px 14px 80px; }
  .content-tabs { display: flex; gap: 18px; margin-bottom: 14px; padding-bottom: 10px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .content-tabs::-webkit-scrollbar { display: none; }
  .content-tab { flex-shrink: 0; font-size: 13px; }

  .post-card { padding: 16px; border-radius: var(--radius-sm); margin-bottom: 10px; }
  .post-card-simple { padding: 14px 16px; gap: 12px; margin-bottom: 8px; }
  .pcs-date { padding: 6px 10px; min-width: 42px; }
  .pcs-day { font-size: 18px; }
  .pcs-month { font-size: 10px; margin-top: 2px; }
  .pcs-title { font-size: 15px; }
  .pcs-excerpt { font-size: 12px; margin-bottom: 8px; }
  .pcs-thumb { width: 80px; height: 58px; }
  .post-avatar { width: 38px; height: 38px; }
  .post-nickname { font-size: 14px; }
  .post-content { font-size: 14px; line-height: 1.75; margin-bottom: 12px; }
  .post-actions { padding-top: 10px; }
  .action-btn { font-size: 11px; gap: 4px; }
  .action-btn i { font-size: 12px; }

  .img-grid.g1, .img-grid.g2, .img-grid.g3, .img-grid.g4,
  .img-grid.g5, .img-grid.g6, .img-grid.g7, .img-grid.g8, .img-grid.g9 { max-width: 100%; }

  .hitokoto-banner { padding: 12px 14px; margin-bottom: 14px; }
  .hitokoto-text { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .hitokoto-from { display: none; }

  .mobile-nav { display: none !important; }

  .bottom-bar { height: 44px; min-height: 44px; gap: 16px; font-size: 11px; }

  .archive-stats { gap: 8px; }
  .archive-stat-num { font-size: 22px; }
  .archive-stat-label { font-size: 11px; }
  .archive-timeline { padding-left: 18px; }
  .at-year-dot { left: -25px; width: 12px; height: 12px; }
  .at-year-text { font-size: 18px; }
  .at-post { padding: 8px 12px; gap: 10px; }
  .at-post-title { font-size: 13px; }
  .at-post-meta { display: none; }

  .friends-feed { grid-template-columns: 1fr; }

  .article-title { font-size: 19px; }
  .article-meta { gap: 12px; }
  .article-meta-item { font-size: 12px; }
  .article-content { font-size: 15px; line-height: 1.85; }
  .article-content h2 { font-size: 18px; }
  .article-content h3 { font-size: 16px; }
  .photo-grid.g3 { grid-template-columns: 1fr 1fr; }
  .photo-grid.g5, .photo-grid.g6 { grid-template-columns: 1fr 1fr; }

  .comment-child { margin-left: 20px; }
  .comment-avatar { width: 24px; height: 24px; }
  .comment-avatar img, .comment-avatar .avatar { width: 24px !important; height: 24px !important; }
  .comment-form-row { flex-direction: column; gap: 8px; }
  .post-nav { flex-direction: column; gap: 10px; }
  .post-nav-next { flex-direction: row; text-align: left; }
  .post-nav-next .post-nav-content { text-align: left; }
}

@media (max-width: 380px) {
  .topbar-center { margin: 0 4px; }
  .topbar-actions { gap: 2px; }
  .topbar-btn { width: 30px; height: 30px; font-size: 13px; }
  .scroll-progress-btn .scroll-progress-ring { width: 30px; height: 30px; }
  .scroll-progress-btn .scroll-progress-text { font-size: 8px; }
  .content-tabs { gap: 14px; }
}
