/* ═══════════════════════════════════════════════════════════════════════════
   SocialV Theme · main.css
   A SocialV-inspired social network design for Quire
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Bootstrap 替代:本主题只用 13 个 bootstrap 类,这里手写覆盖,
      不再加载 232KB 的完整 bootstrap.min.css。
      grid/d-none/d-lg-flex/container/row 已在 base_dwith.html 内联 critical
      CSS 里,这里只补内联未覆盖的几个。 ────────────────────────────────── */
.col-lg-10 { flex: 0 0 100%; max-width: 100%; padding: 0 .75rem; }
.col-md-6 { flex: 0 0 100%; max-width: 100%; padding: 0 .75rem; }
@media (min-width: 768px) {
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .d-md-block { display: block !important; }
  .d-md-none { display: none !important; }
}
@media (min-width: 992px) {
  .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
}
.mt-4 { margin-top: 1.5rem !important; }
@media (min-width: 992px) { .mt-lg-0 { margin-top: 0 !important; } }
.rounded-circle { border-radius: 50% !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Font Face ──────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
  /* Colors · 100% SocialV original values */
  --sv-primary: #2f65b9;
  --sv-primary-dark: #2a5aa6;
  --sv-primary-light: #eaeff8;
  --sv-primary-rgb: 47, 101, 185;
  --sv-body-bg: #f8f9fa;           /* SocialV --global-body-bgcolor */
  --sv-surface: #ffffff;            /* SocialV --color-theme-white-box */
  --sv-surface-2: #f9fbff;          /* SocialV --global-body-lightcolor */
  --sv-text: #5a6675;              /* darkened from #6f7f92 for WCAG AA 4.5:1 on #f8f9fa */
  --sv-text-dark: #07142e;          /* SocialV --global-font-title */
  --sv-heading: #07142e;            /* SocialV --global-font-title */
  --sv-meta: #6a7286;              /* darkened from #8a92a6 for WCAG AA 4.5:1 on #f8f9fa */
  --sv-border: #f1f1f1;            /* SocialV --border-color-light */
  --sv-border-light: #f1f1f1;      /* SocialV --border-color-light */

  /* Layout */
  --sv-sidebar-width: 250px;
  --sv-mini-sidebar-width: 88px;
  --sv-header-height: 70px;

  /* Typography - SocialV values */
  --sv-font-sans: 'Plus Jakarta Sans', sans-serif;
  --sv-fs-body: 1em;
  --sv-fs-normal: 1em;
  --sv-fs-small: 0.813em;
  --sv-fs-h1: 2.5em;
  --sv-fs-h2: 2.074em;
  --sv-fs-h3: 1.728em;
  --sv-fs-h4: 1.44em;
  --sv-fs-h5: 1.2em;
  --sv-fs-h6: 1em;
  --sv-lh-body: 1.75;
  --sv-lh-heading: 1.3;
  --sv-fw-regular: 400;
  --sv-fw-medium: 500;
  --sv-fw-semibold: 600;
  --sv-fw-bold: 700;
  --sv-ls: 0.0625em;

  /* Border radius - exact SocialV values */
  --sv-radius: 0.313em;
  --sv-radius-lg: 0.375em;
  --sv-radius-pill: 50rem;

  /* Shadows - exact SocialV values */
  --sv-shadow: 0 14px 54px rgba(0, 0, 0, 0.03);
  --sv-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06);
  --sv-transition: 0.45s ease-in-out;
}

/* ── Dark Mode ─────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  /* 100% SocialV dark mode values */
  --sv-body-bg: #091025;            /* SocialV --global-body-bgcolor */
  --sv-surface: #080d1e;            /* SocialV --color-theme-white-box */
  --sv-surface-2: #0b1126;          /* SocialV --unread-message-color */
  --sv-text: #a5a8ab;              /* SocialV --global-font-color */
  --sv-text-dark: #ffffff;          /* SocialV --global-font-title */
  --sv-heading: #ffffff;            /* SocialV --global-font-title */
  --sv-meta: #566b8c;              /* SocialV --menu-label-color */
  --sv-border: #101421;            /* SocialV --border-color-light */
  --sv-border-light: #101421;      /* SocialV --border-color-light */
  --sv-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  --sv-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  /* Override legacy WP theme (dwith-source-inline.css) backgrounds */
  --cs-site-background: #080d1e;
  --cs-layout-background: #091025;
  --cs-color-primary: #2f65b9;
  --cs-color-border: #101421;
  --cs-header-background: #080d1e;
  --cs-footer-background: #080d1e;
  --cs-offcanvas-background: #080d1e;
  --cs-header-submenu-background: #080d1e;
  --cs-header-topbar-background: #080d1e;
  --cs-color-input: #080d1e;
}

/* Also override when legacy JS sets body[data-scheme=dark] */
body[data-scheme="dark"] {
  --cs-site-background: #080d1e;
  --cs-layout-background: #091025;
  --cs-color-border: #101421;
  --cs-header-background: #080d1e;
  --cs-footer-background: #080d1e;
  --cs-offcanvas-background: #080d1e;
  --cs-header-submenu-background: #080d1e;
  --cs-header-topbar-background: #080d1e;
  --cs-color-input: #080d1e;
}

/* Force dark backgrounds · legacy dwith-source-inline.css loads after
   main.css and sets body { background-color:#fff } / body { background:
   var(--cs-site-background) }.  We must win regardless of load order. */
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #091025 !important;
  background-color: #091025 !important;
  color: #a5a8ab !important;
  border-color: #101421 !important;
}

/* Pure CSS fallback: if JS is delayed by Cloudflare Rocket Loader,
   system dark-mode users still get dark background immediately */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]),
  html:not([data-theme="light"]) body {
    background: #091025 !important;
    background-color: #091025 !important;
    color: #a5a8ab !important;
  }
  html:not([data-theme="light"]) .card-main {
    background: #080d1e !important;
  }
}

[data-theme="dark"] .entry-content pre {
  background: #080d1e;
}

[data-theme="dark"] .sv-header__search input {
  color: var(--sv-text-dark);
}

[data-theme="dark"] .sv-comment-form input,
[data-theme="dark"] .sv-comment-form textarea {
  color: var(--sv-text-dark);
}

[data-theme="dark"] .sv-story-circle__img img {
  border-color: var(--sv-surface);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--sv-font-sans);
  font-size: var(--sv-fs-body);
  font-weight: var(--sv-fw-regular);
  line-height: var(--sv-lh-body);
  color: var(--sv-text);
  background-color: var(--sv-body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

::-moz-selection {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a,
a:visited {
  color: var(--sv-primary);
  text-decoration: none;
  transition: color var(--sv-transition), text-decoration-color var(--sv-transition);
}

a:hover {
  color: var(--sv-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sv-font-sans);
  color: var(--sv-heading);
  font-weight: var(--sv-fw-semibold);
  line-height: var(--sv-lh-heading);
  margin-top: 0;
}

h1 { font-size: var(--sv-fs-h1); }
h2 { font-size: var(--sv-fs-h2); }
h3 { font-size: var(--sv-fs-h3); }
h4 { font-size: var(--sv-fs-h4); }
h5 { font-size: var(--sv-fs-h5); }
h6 { font-size: var(--sv-fs-h6); }

p {
  margin-top: 0;
}

ul, ol {
  padding-left: 1.5rem;
}

button {
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--sv-meta);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT · Three-Panel Structure
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Left Sidebar ──────────────────────────────────────────────────────── */
.sv-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sv-sidebar-width);
  height: 100vh;
  background: var(--sv-surface);
  border-right: 1px solid var(--sv-border);
  z-index: 1030;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sv-sidebar::-webkit-scrollbar {
  width: 4px;
}

.sv-sidebar::-webkit-scrollbar-thumb {
  background: var(--sv-border);
  border-radius: 2px;
}

body.sidebar-mini .sv-sidebar {
  width: var(--sv-mini-sidebar-width);
}

/* Sidebar mobile close button · hidden on desktop */
.sv-sidebar__close-btn {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sv-surface-2);
  border: none;
  cursor: pointer;
  color: var(--sv-text);
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
}
.sv-sidebar__close-btn:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}
@media (max-width: 991.98px) {
  .sv-sidebar__close-btn { display: flex; }
}

/* Sidebar Header */
.sv-sidebar__header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sv-border);
  position: relative;
  flex-shrink: 0;
}

.sv-sidebar__header .logo {
  font-size: 1.25rem;
  font-weight: var(--sv-fw-semibold);
  color: var(--sv-heading);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
}

.sv-sidebar__header .logo img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

body.sidebar-mini .sv-sidebar__header .logo span {
  display: none;
}

/* Sidebar Toggle */
.sv-sidebar__toggle {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 44px;
  border-radius: 0 8px 8px 0;
  background: var(--sv-body-bg);
  color: var(--sv-meta);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.sv-sidebar__toggle:hover {
  color: var(--sv-primary);
}

body.sidebar-mini .sv-sidebar__toggle {
  transform: translateY(-50%) rotate(180deg);
}

body.sidebar-mini .sv-sidebar__toggle:hover {
  transform: translateY(-50%) rotate(180deg);
  color: var(--sv-primary);
}

/* Sidebar User Card */
.sv-sidebar__user {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--sv-border-light);
}

.sv-sidebar__user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sv-sidebar__user-info img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-sidebar__user-detail {
  min-width: 0;
}

.sv-sidebar__user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sv-heading);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-sidebar__user-handle {
  font-size: 0.8rem;
  color: var(--sv-meta);
  display: block;
}

body.sidebar-mini .sv-sidebar__user-info {
  display: none;
}

/* Sidebar Navigation */
.sv-sidebar__nav {
  padding: 0.5rem 0.75rem;
  flex: 1;
}

.sv-sidebar__nav .nav-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85rem 1.25rem;
  color: var(--sv-text);
  border-radius: var(--sv-radius);
  transition: all 0.45s ease-in-out;
  text-decoration: none;
  font-size: 1rem;
  font-weight: var(--sv-fw-semibold);
  white-space: nowrap;
  cursor: pointer;
}

.sv-sidebar__nav .nav-item:hover {
  background: var(--sv-primary-light);
  color: var(--sv-text-dark);
}

.sv-sidebar__nav .nav-item.active {
  background: var(--sv-primary-light);
  color: var(--sv-primary-dark);
  font-weight: var(--sv-fw-semibold);
  border-radius: var(--sv-radius);
  border-left: 3px solid var(--sv-primary);
}

.sv-sidebar__nav .nav-item .nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-sidebar__nav .nav-item .nav-icon svg {
  width: 20px;
  height: 20px;
}

.sv-sidebar__nav .nav-item .nav-text {
  transition: opacity 0.2s ease;
  overflow: hidden;
}

body.sidebar-mini .sv-sidebar .nav-text {
  display: none;
}

body.sidebar-mini .sv-sidebar__nav .nav-item {
  justify-content: center;
  padding: 0.75rem;
}

/* Sidebar Labels */
.sv-sidebar__label {
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  color: var(--sv-primary);
  padding: 1.5rem 1.25rem 0.5rem;
  font-weight: var(--sv-fw-semibold);
  white-space: nowrap;
  overflow: hidden;
}

body.sidebar-mini .sv-sidebar__label {
  text-align: center;
  padding: 1.5rem 0.25rem 0.5rem;
  font-size: 0;
}

body.sidebar-mini .sv-sidebar__label::after {
  content: '...';
  font-size: 0.75rem;
}

/* Sidebar Footer */
.sv-sidebar__footer {
  padding: 1rem;
  border-top: 1px solid var(--sv-border-light);
  flex-shrink: 0;
}

/* ── Main Wrapper ──────────────────────────────────────────────────────── */
.sv-main-wrapper {
  margin-left: var(--sv-sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  display: flex;
  flex-direction: column;
}

body.sidebar-mini .sv-main-wrapper {
  margin-left: var(--sv-mini-sidebar-width);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-header {
  position: sticky;
  top: 0;
  height: var(--sv-header-height);
  background: var(--sv-surface);
  border-bottom: 1px solid var(--sv-border);
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.sv-header__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sv-header__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--sv-radius);
  background: transparent;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--sv-text);
  font-size: 1.25rem;
  transition: background 0.2s ease;
}

.sv-header__hamburger:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

/* Mobile center logo */
.sv-header__mobile-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sv-header__mobile-logo img {
  height: 60px;
  width: auto;
}

.sv-header__mobile-logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sv-heading);
}

@media (min-width: 992px) {
  .sv-header__mobile-logo { display: none !important; }
}

.sv-header__logo {
  font-size: 1.25rem;
  font-weight: var(--sv-fw-semibold);
  color: var(--sv-heading);
  text-decoration: none;
  white-space: nowrap;
}

.sv-header__logo:hover {
  color: var(--sv-primary);
}

.sv-header__nav {
  display: flex;
  gap: 2rem;
  margin-left: 2rem;
  align-items: center;
}

.sv-header__nav a {
  padding: 0.5em 0;
  color: var(--sv-text);
  text-decoration: none;
  font-size: 1em;
  font-weight: var(--sv-fw-semibold);
  transition: color 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: var(--sv-ls);
}

.sv-header__nav a:hover,
.sv-header__nav a.active {
  color: var(--sv-primary);
}

/* Header Search */
.sv-header__search {
  flex: 1;
  max-width: 400px;
  margin: 0 1.5rem;
  position: relative;
}

.sv-header__search .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--sv-meta);
  pointer-events: none;
}

.sv-header__search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-pill);
  background: var(--sv-surface-2);
  font-size: var(--sv-fs-normal);
  color: var(--sv-text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.sv-header__search input::placeholder {
  color: var(--sv-meta);
}

.sv-header__search input:focus {
  border-color: var(--sv-primary);
  box-shadow: 0 0 0 3px rgba(var(--sv-primary-rgb), 0.1);
}

/* Header Right */
.sv-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* Header Social Icons */
.sv-header__social {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* show_floating_header 关 → 头部不再吸顶 (默认 .sv-header 为 position:sticky) */
.sv-header.sv-header--static {
  position: static;
}

.sv-header__social-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-text);
  background-color: rgba(128, 128, 128, 0.14);
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

.sv-header__social-icon:hover {
  color: #fff;
  transform: translateY(-2px);
}

/* idle: 统一柔灰底 + 中性 logo (color 显式设,不继承链接色) · hover: 浮现品牌色实心底 + 白 logo */
.sv-social--facebook:hover  { background-color: #1877F2; }
.sv-social--x:hover,
.sv-social--twitter:hover   { background-color: #000; }
.sv-social--pinterest:hover { background-color: #E60023; }
.sv-social--linkedin:hover  { background-color: #0A66C2; }
.sv-social--github:hover    { background-color: #24292F; }
.sv-social--reddit:hover    { background-color: #FF4500; }
.sv-social--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.sv-social--youtube:hover   { background-color: #FF0000; }

.sv-header__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--sv-text);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.sv-header__icon-btn:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

.sv-header__icon-btn svg {
  width: 20px;
  height: 20px;
}

.sv-header__icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e74c3c;
  border: 2px solid var(--sv-surface);
}

.sv-header__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--sv-border);
  transition: border-color 0.2s ease;
}

.sv-header__avatar:hover {
  border-color: var(--sv-primary);
}

/* Header Dropdown */
.sv-header__dropdown {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: -0.5rem;
}

.sv-header__dropdown-menu {
  position: fixed;
  top: var(--sv-header-height);
  left: var(--sv-sidebar-width);
  right: 0;
  background: var(--sv-surface);
  border-top: 1px solid var(--sv-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 1.5rem 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  z-index: 1040;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem 2rem;
}

body.sidebar-mini .sv-header__dropdown-menu {
  left: var(--sv-mini-sidebar-width);
}

/* Hover trigger (desktop) */
.sv-header__dropdown:hover .sv-header__dropdown-menu,
.sv-header__dropdown.open .sv-header__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sv-header__dropdown-menu .sv-header__dropdown-item {
  display: block;
  padding: 0.625rem 0.75rem;
  color: var(--sv-text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: var(--sv-fw-regular);
  text-transform: none;
  letter-spacing: 0;
  border-radius: var(--sv-radius);
  transition: all 0.15s ease;
}

.sv-header__dropdown-menu .sv-header__dropdown-item:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

.sv-header__dropdown-divider {
  border-top: 1px solid var(--sv-border-light);
  margin: 0.25rem 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-content {
  padding: 1.5rem 1.5rem 2rem;
  flex: 1;
}

/* Page header: H1 inline-baseline with muted lead, wraps on narrow viewports */
.sv-page-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35em 1.1rem;
  margin: 0;
}
.sv-page-header__title {
  margin: 0;
  line-height: 1.15;
}
.sv-page-header__lead {
  margin: 0;
  color: var(--sv-meta);
  font-size: 1rem;
  font-weight: var(--sv-fw-medium);
  line-height: 1.45;
}
/* Compact variant: H1 缩小,适合 breadcrumb 已经有页面名时减少视觉重复 */
.sv-page-header--compact .sv-page-header__title {
  font-size: 1.6rem;
  letter-spacing: -0.005em;
}
.sv-page-header--compact .sv-page-header__lead {
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.sv-content .container {
  max-width: 100%;
  padding: 0;
  width: 100%;
}

.sv-content-row {
  display: flex;
  gap: 1.5rem;
}

.sv-content-main {
  flex: 1;
  min-width: 0;
}

.sv-content-sidebar {
  width: 320px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARD SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */
.card-main {
  background: var(--sv-surface);
  border-radius: var(--sv-radius-lg);
  box-shadow: var(--sv-shadow);
  border: 1px solid var(--sv-border-light);
  overflow: hidden;
}
/* Activity card hover · 方案 7: 封面 Ken Burns 慢推 + 标题色彩 ease-in (卡片本身静止)
   BUG-10/11 fix: 图片缩放只在「悬停在图片本身」时触发,不蔓延到全卡;多图 grid 各自独立 */
.sv-activity-card .sv-activity__media img,
.sv-activity-card .sv-activity__media-grid__item img {
  transition: transform 0.8s ease-out;
}
.sv-activity-card .sv-activity__media:hover img,
.sv-activity-card .sv-activity__media-grid__item:hover img {
  transform: scale(1.03);
}
/* 标题色彩仍跟随整卡 hover (反馈整卡可点) */
.sv-activity-card .sv-activity__title a {
  transition: color 0.3s ease;
}
.sv-activity-card:hover .sv-activity__title a {
  color: var(--sv-primary);
}
/* a11y: 用户在系统/浏览器开启「减少动画」时,关闭 hover 动画 (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  .sv-activity-card .sv-activity__media img,
  .sv-activity-card .sv-activity__media-grid__item img,
  .sv-activity-card .sv-activity__title a {
    transition: none;
  }
  .sv-activity-card .sv-activity__media:hover img,
  .sv-activity-card .sv-activity__media-grid__item:hover img {
    transform: none;
  }
}
/* a11y · 尊重「减少动画」系统偏好 (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  .sv-activity-card .sv-activity__media img,
  .sv-activity-card .sv-activity__media-grid__item img,
  .sv-activity-card .sv-activity__title a {
    transition: none;
  }
  .sv-activity-card:hover .sv-activity__media img,
  .sv-activity-card:hover .sv-activity__media-grid__item img {
    transform: none;
  }
}

.card-inner {
  padding: 1.25rem;
}

.card-space-bottom {
  margin-bottom: 1.25rem;
}

.card-header-custom {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--sv-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-custom h4,
.card-header-custom h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sv-heading);
}

.card-body-custom {
  padding: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STORY CARDS (Facebook-style)
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-stories.card-main {
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.sv-stories__scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  padding: 1rem 1.25rem;
  transition: transform 0.4s ease;
}

.sv-stories__nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  color: #1a1a2e;
  transition: all 0.2s;
}

.sv-stories__nav svg {
  width: 20px;
  height: 20px;
  stroke-width: 3;
}

.sv-stories__nav:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.sv-stories__nav--next {
  right: 8px;
}

.sv-stories__nav--prev {
  left: 8px;
}

/* Story card: square image, name below */
.sv-story-card {
  flex-shrink: 0;
  width: 200px;
  text-decoration: none;
  display: block;
  transition: transform 0.25s ease;
}

.sv-story-card:hover {
  transform: scale(1.03);
}

.sv-story-card__visual {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #1a1a2e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.sv-story-card__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sv-story-card__bg--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
}

.sv-story-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,0.55) 75%,
    rgba(0,0,0,0.8) 100%);
  pointer-events: none;
}

.sv-story-card__name {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.sv-story-card__count {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITY FEED
   ═══════════════════════════════════════════════════════════════════════════ */
/* Activity Header - SocialV style */
.sv-activity__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sv-activity__header-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.sv-activity__header-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.sv-activity__avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-activity__avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--sv-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sv-activity__meta {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.sv-activity__action-line {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--sv-text);
}

.sv-activity__author {
  font-weight: var(--sv-fw-bold);
  font-size: 1rem;
  color: var(--sv-heading);
  text-decoration: none;
}

.sv-activity__author:hover {
  color: var(--sv-primary);
}

.sv-activity__action-text {
  color: var(--sv-meta);
  font-size: 1rem;
}

.sv-activity__group {
  font-weight: 600;
  color: var(--sv-primary);
  text-decoration: none;
}

.sv-activity__group:hover {
  text-decoration: underline;
}

.sv-activity__time {
  font-size: 0.875rem;
  font-weight: var(--sv-fw-medium);
  color: var(--sv-meta);
  display: block;
  margin-top: 2px;
}

.sv-activity__badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--sv-primary-light);
  color: var(--sv-primary);
  border-radius: var(--sv-radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}

.sv-activity__badge:hover {
  background: var(--sv-primary);
  color: #fff;
}

.sv-activity__menu-btn {
  background: none;
  border: none;
  color: var(--sv-meta);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--sv-radius);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-activity__menu-btn:hover {
  background: var(--sv-surface-2);
  color: var(--sv-heading);
}

/* Activity Content */
.sv-activity__content {
  margin-bottom: 0.75rem;
}

.sv-activity__content h3 {
  font-size: 1.25rem;
  font-weight: var(--sv-fw-bold);
  color: var(--sv-heading);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.sv-activity__content h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sv-activity__content h3 a:hover {
  color: var(--sv-primary);
}

.sv-activity__content p {
  color: var(--sv-text);
  font-size: var(--sv-fs-normal);
  line-height: var(--sv-lh-body);
  margin: 0;
}

.sv-activity__content p + p {
  margin-top: 0.5rem;
}

/* Activity Media */
.sv-activity__media {
  margin: 0 -1.25rem;
  overflow: hidden;
  border-radius: 0.5rem;
}

.sv-activity__media img {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
}

/* ── Multi-image grid ── */
/* aspect-ratio 必须设在 grid container 上 · 否则 grid item 高度为 0,
 * 图片加载完才撑开,触发主页 CLS 0.99 (实测 27 次 / 24h)。
 * 各布局的视觉比例不同,逐个声明 */
.sv-activity__media-grid {
  display: grid;
  gap: 4px;
}

.sv-activity__media-grid--2 {
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 2 / 1;
}

/* 3 images: 1 big top (full width) + 2 small bottom */
.sv-activity__media-grid--3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2fr 1fr;
  aspect-ratio: 4 / 3;
}

.sv-activity__media-grid--3 > :first-child {
  grid-column: 1 / -1;
}

/* 4 images: 2×2 */
.sv-activity__media-grid--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 1;
}

.sv-activity__media-grid__item {
  position: relative;
  overflow: hidden;
  display: block;
}

.sv-activity__media-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
}

/* 3-image top image: wider ratio */
.sv-activity__media-grid--3 > :first-child img {
  aspect-ratio: 16 / 9;
}

.sv-activity__media-grid__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  pointer-events: none;
}

/* Reaction summary bar */
.sv-activity__reactions-summary {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--sv-border-light);
  font-size: 0.85rem;
  color: var(--sv-meta);
  gap: 0.5rem;
}

.sv-activity__reaction-icons {
  display: flex;
  align-items: center;
  gap: -2px;
}

.sv-reaction-emoji {
  font-size: 1rem;
  line-height: 1;
}

.sv-activity__reaction-text {
  color: var(--sv-meta);
  font-size: 0.85rem;
}

.sv-activity__comment-count {
  margin-left: auto;
  color: var(--sv-meta);
  text-decoration: none;
  font-size: 0.85rem;
}

.sv-activity__comment-count:hover {
  color: var(--sv-primary);
  text-decoration: underline;
}

/* Action buttons bar (Read / Comment / Share) */
.sv-activity__actions-bar {
  display: flex;
  align-items: center;
  padding-top: 0.5rem;
  gap: 0;
}

.sv-activity__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1;
  padding: 0.6rem 0.5rem;
  background: transparent;
  border: none;
  color: var(--sv-text);
  font-size: var(--sv-fs-normal);
  font-weight: var(--sv-fw-medium);
  letter-spacing: var(--sv-ls);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--sv-radius);
  position: relative;
}

.sv-activity__action-btn:hover {
  background: var(--sv-surface-2);
  color: var(--sv-primary);
}

.sv-activity__action-btn svg {
  flex-shrink: 0;
}

/* Inline Comment Form */
.sv-inline-comment {
  padding: 1rem 0 0;
  border-top: 1px solid var(--sv-border-light);
  margin-top: 0.5rem;
}
.sv-inline-comment textarea {
  width: 100%;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  background: var(--sv-surface);
  color: var(--sv-text);
}
.sv-inline-comment textarea:focus {
  outline: none;
  border-color: var(--sv-primary);
}
.sv-inline-comment__fields {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.sv-inline-comment__fields input {
  flex: 1;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--sv-surface);
  color: var(--sv-text);
}
.sv-inline-comment__fields input:focus {
  outline: none;
  border-color: var(--sv-primary);
}
.sv-inline-comment__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}
.sv-btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}
.sv-inline-comment__status {
  padding: 0.75rem;
  border-radius: var(--sv-radius);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.sv-inline-comment__status--success {
  background: #d4edda;
  color: #155724;
}
.sv-inline-comment__status--error {
  background: #f8d7da;
  color: #721c24;
}

/* Activity Comment Preview */
.sv-activity__comments-preview {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.sv-activity__comment-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sv-activity__comment-item img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-activity__comment-bubble {
  background: var(--sv-surface-2);
  border-radius: var(--sv-radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--sv-text);
  flex: 1;
}

.sv-activity__comment-bubble strong {
  color: var(--sv-heading);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CREATE POST BOX
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-create-post {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.sv-create-post__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.sv-create-post__input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-pill);
  background: var(--sv-surface-2);
  color: var(--sv-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sv-create-post__input:hover {
  border-color: var(--sv-primary);
}

.sv-create-post__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--sv-border-light);
}

.sv-create-post__action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--sv-radius-pill);
  border: none;
  background: transparent;
  color: var(--sv-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sv-create-post__action-btn:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

.sv-create-post__action-btn svg {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RIGHT SIDEBAR / WIDGETS
   ═══════════════════════════════════════════════════════════════════════════ */
/* sticky containing block = .sv-right-sidebar; 拉伸右列让 sidebar 等于 row 高度 */
@media (min-width: 992px) {
  .sv-right-col {
    display: flex;
    flex-direction: column;
  }
  .sv-right-col .sv-right-sidebar {
    flex: 1 1 auto;
    min-height: 100%;
  }
  .sv-right-sidebar .sv-widget-sticky {
    position: sticky;
    top: calc(var(--sv-header-height, 70px) + 1rem);
    z-index: 5;
  }
}

.sv-right-sidebar .widget {
  margin-bottom: 1.25rem;
}

.sv-right-sidebar .widget-title {
  font-size: 1.125rem;
  font-weight: var(--sv-fw-bold);
  font-family: var(--sv-font-sans);
  color: var(--sv-heading);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--sv-border-light);
  margin: 0;
}

.sv-right-sidebar .widget-content {
  padding: 1rem 1.25rem;
}

/* Latest Items Widget */
.sv-latest-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  align-items: center;
}

.sv-latest-item + .sv-latest-item {
  border-top: 1px solid var(--sv-border-light);
}

.sv-latest-item__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--sv-primary-light);
}

.sv-latest-item__avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sv-primary-light);
  color: var(--sv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.sv-latest-item__text {
  flex: 1;
  font-size: 1rem;
  color: var(--sv-text);
  line-height: 1.5;
  min-width: 0;
}

.sv-latest-item__text a {
  color: var(--sv-heading);
  font-weight: var(--sv-fw-bold);
  text-decoration: none;
}

.sv-latest-item__text a:hover {
  color: var(--sv-primary);
}

.sv-latest-item__time {
  font-size: 0.875rem;
  color: var(--sv-meta);
  display: block;
  margin-top: 0.2rem;
}

/* Sidebar Gallery Widget (3x3 grid) */
.sv-sidebar-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.sv-sidebar-gallery__item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}
.sv-sidebar-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.sv-sidebar-gallery__item:hover img {
  transform: scale(1.1);
}

/* Sidebar Social Icons · 方案A 柔底 + hover 品牌色 (深浅自适应) */
.sv-social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.sv-social-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-text);
  background: rgba(128, 128, 128, 0.14);
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid transparent;
}
.sv-social-icon svg {
  width: 22px;
  height: 22px;
}
/* idle: 统一柔灰底 + 中性 logo · hover: 浮现各自品牌色实心底 + 白 logo */
.sv-social-icon--facebook:hover  { background: #1877F2; }
.sv-social-icon--x:hover,
.sv-social-icon--twitter:hover   { background: #000; }
.sv-social-icon--linkedin:hover  { background: #0A66C2; }
.sv-social-icon--youtube:hover   { background: #FF0000; }
.sv-social-icon--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.sv-social-icon--github:hover    { background: #24292F; }
.sv-social-icon--telegram:hover  { background: #26A5E4; }
.sv-social-icon--pinterest:hover { background: #E60023; }
.sv-social-icon--reddit:hover    { background: #FF4500; }
.sv-social-icon:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Activity card needs overflow visible for share dropdown */
.sv-activity-card.card-main {
  overflow: visible;
}
.sv-activity-card .sv-activity__media {
  overflow: hidden;
}

/* Promo Banner Widget */
.sv-promo-banner {
  position: relative;
  border-radius: var(--sv-radius-lg);
  overflow: hidden;
}

.sv-promo-banner img {
  width: 100%;
  display: block;
}

.sv-promo-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.sv-promo-banner__text {
  color: #ffffff;
}

.sv-promo-banner__text h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.sv-promo-banner__text p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Tags Widget */
.sv-widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Friend Suggestions Widget */
.sv-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.sv-suggestion-item + .sv-suggestion-item {
  border-top: 1px solid var(--sv-border-light);
}

.sv-suggestion-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-suggestion-item__info {
  flex: 1;
  min-width: 0;
}

.sv-suggestion-item__name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--sv-heading);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-suggestion-item__mutual {
  font-size: 0.75rem;
  color: var(--sv-meta);
}

.sv-suggestion-item__action {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--sv-radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
  line-height: 1.5;
}

.sv-btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

.sv-btn-lg {
  padding: 0.65rem 1.75rem;
  font-size: 1rem;
}

.sv-btn-primary,
.sv-btn-primary:visited {
  background: var(--sv-primary);
  color: #ffffff;
}

.sv-btn-primary:hover {
  background: var(--sv-primary-dark);
  color: #ffffff;
}

.sv-btn-outline {
  background: transparent;
  border: 1px solid var(--sv-border);
  color: var(--sv-text);
}

.sv-btn-outline:hover {
  border-color: var(--sv-primary);
  color: var(--sv-primary);
}

.sv-btn-ghost {
  background: transparent;
  border: none;
  color: var(--sv-text);
  padding: 0.4rem 0.75rem;
}

.sv-btn-ghost:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

.sv-btn-pill {
  border-radius: var(--sv-radius-pill);
}

.sv-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.sv-btn-block {
  display: flex;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE CONTENT TYPOGRAPHY (Record Detail)
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-article {
  padding: 0;
}

.sv-article__cover {
  margin: 0 -1.25rem 1.5rem;
  max-height: 500px;
  overflow: hidden;
}

.sv-article__cover img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.sv-article__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sv-heading);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.sv-article__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--sv-meta);
}

.sv-article__meta a {
  color: var(--sv-heading);
  font-weight: 500;
}

.sv-article__meta a:hover {
  color: var(--sv-primary);
}

.sv-article__meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sv-meta);
}

/* Entry Content */
.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--sv-text);
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sv-heading);
  margin: 2rem 0 1rem;
}

.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin: 1.5rem 0 0.75rem;
}

.entry-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin: 1.25rem 0 0.5rem;
}

.entry-content p {
  margin-bottom: 1.25rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--sv-radius);
  margin: 0.5rem 0;
}

.entry-content blockquote {
  border-left: 4px solid var(--sv-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--sv-surface-2);
  border-radius: 0 var(--sv-radius) var(--sv-radius) 0;
  font-style: italic;
  color: var(--sv-text-dark);
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.25rem;
  border-radius: var(--sv-radius);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.25rem 0;
}

.entry-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}

.entry-content p code,
.entry-content li code {
  background: var(--sv-surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--sv-primary);
  font-size: 0.85em;
  border: 1px solid var(--sv-border-light);
}

.entry-content a,
.entry-content a:visited,
.sv-comment__text a,
.sv-comment__text a:visited,
.sv-activity__text a,
.sv-activity__text a:visited {
  color: var(--sv-primary);
  text-decoration: underline;
  text-decoration-color: rgba(var(--sv-primary-rgb), 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--sv-transition), text-decoration-color var(--sv-transition);
}

.entry-content a:hover,
.sv-comment__text a:hover,
.sv-activity__text a:hover {
  color: var(--sv-primary-dark);
  text-decoration-color: var(--sv-primary);
}

/* 防御 WP 迁移内容里 inline 蓝色: 用 attribute selector 高 specificity 覆盖 */
.entry-content a[style*="color"],
.sv-comment__text a[style*="color"] {
  color: var(--sv-primary) !important;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--sv-border);
  margin: 2rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--sv-border);
  text-align: left;
}

.entry-content th {
  background: var(--sv-surface-2);
  font-weight: 600;
  color: var(--sv-heading);
}

.entry-content figure {
  margin: 1.5rem 0;
}

.entry-content figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--sv-meta);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMENTS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-comments {
  margin-top: 1.5rem;
}

.sv-comments__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sv-comments__title .count {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--sv-meta);
}

.sv-comment {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--sv-border-light);
}

.sv-comment:last-child {
  border-bottom: none;
}

.sv-comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sv-primary-light);
  color: var(--sv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sv-comment__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.sv-comment__body {
  flex: 1;
  min-width: 0;
}

.sv-comment__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.sv-comment__author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sv-heading);
}

.sv-comment__date {
  font-size: 0.8rem;
  color: var(--sv-meta);
  margin-left: 0.5rem;
}

.sv-comment__text {
  font-size: 0.9rem;
  color: var(--sv-text);
  line-height: 1.6;
  margin-top: 0.25rem;
}

.sv-comment__text p {
  margin: 0;
}

.sv-comment__text p + p {
  margin-top: 0.5rem;
}

.sv-comment__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.sv-comment__reply-btn {
  font-size: 0.8rem;
  color: var(--sv-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 0.25rem;
  font-weight: 500;
  font-family: inherit;
}

.sv-comment__reply-btn:hover {
  text-decoration: underline;
}

.sv-comment__like-btn {
  font-size: 0.8rem;
  color: var(--sv-meta);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.sv-comment__like-btn:hover {
  color: var(--sv-primary);
}

/* Reply Comment */
.sv-comment--reply {
  margin-left: 3rem;
  border-left: 2px solid var(--sv-border-light);
  padding-left: 1rem;
}

/* Comment Form */
.sv-comment-form {
  margin-top: 1.5rem;
}

.sv-comment-form__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin-bottom: 1rem;
}

.sv-comment-form__row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sv-comment-form__row > * {
  flex: 1;
}

.sv-comment-form input,
.sv-comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  background: var(--sv-surface);
  color: var(--sv-text-dark);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sv-comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.sv-comment-form input::placeholder,
.sv-comment-form textarea::placeholder {
  color: var(--sv-meta);
}

.sv-comment-form input:focus,
.sv-comment-form textarea:focus {
  outline: none;
  border-color: var(--sv-primary);
  box-shadow: 0 0 0 3px rgba(var(--sv-primary-rgb), 0.1);
}

.sv-comment-form__submit {
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TAGS & BADGES
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sv-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--sv-surface-2);
  color: var(--sv-text);
  border-radius: var(--sv-radius-pill);
  font-size: 0.8rem;
  text-decoration: none;
  border: 1px solid var(--sv-border);
  transition: all 0.2s ease;
}

.sv-tag:hover {
  border-color: var(--sv-primary);
  color: var(--sv-primary);
  background: var(--sv-primary-light);
}

.sv-tag--active {
  background: var(--sv-primary);
  color: #ffffff;
  border-color: var(--sv-primary);
}

.sv-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--sv-radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
}

.sv-badge--primary {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

.sv-badge--success {
  background: #d4edda;
  color: #155724;
}

.sv-badge--warning {
  background: #fff3cd;
  color: #856404;
}

.sv-badge--danger {
  background: #f8d7da;
  color: #721c24;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARE BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-share {
  display: flex;
  gap: 0.5rem;
}

.sv-share__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sv-heading);
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
}

.sv-share__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sv-surface-2);
  color: var(--sv-text);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.sv-share__btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sv-share__btn svg {
  width: 18px;
  height: 18px;
}

.sv-share__btn[data-share="facebook"]:hover { background: #1877f2; }
.sv-share__btn[data-share="twitter"]:hover  { background: #000000; }
.sv-share__btn[data-share="pinterest"]:hover { background: #e60023; }
.sv-share__btn[data-share="linkedin"]:hover { background: #0a66c2; }
.sv-share__btn[data-share="whatsapp"]:hover { background: #25d366; }

/* Share dropdown in activity card */
.sv-share-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--sv-surface);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  box-shadow: var(--sv-shadow-lg);
  padding: 0.5rem 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s;
  z-index: 20;
}

.sv-share-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-4px);
}

.sv-share-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--sv-text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.sv-share-dropdown a:hover {
  background: var(--sv-surface-2);
  color: var(--sv-primary);
}

.sv-share-dropdown a[data-share="facebook"]:hover { color: #1877f2; }
.sv-share-dropdown a[data-share="twitter"]:hover  { color: #000000; }
[data-theme="dark"] .sv-share-dropdown a[data-share="twitter"]:hover { color: #fff; }
.sv-share-dropdown a[data-share="pinterest"]:hover { color: #e60023; }
.sv-share-dropdown a[data-share="linkedin"]:hover { color: #0a66c2; }
.sv-share-dropdown a[data-share="whatsapp"]:hover { color: #25d366; }

/* Load-more spinner */
.sv-load-more {
  display: inline-block;
  width: 36px;
  height: 36px;
}

.sv-load-more__spinner {
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--sv-border);
  border-top-color: var(--sv-primary);
  border-radius: 50%;
  animation: sv-spin 0.8s linear infinite;
}

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

/* Like button */
.sv-like-btn .sv-like-icon {
  fill: none;
  transition: fill 0.2s, color 0.2s;
}
.sv-like-btn.liked .sv-like-icon {
  fill: var(--sv-primary);
  color: var(--sv-primary);
}
.sv-like-btn.liked span {
  color: var(--sv-primary);
}

/* Stats line under date */
.sv-activity__stats-line {
  display: block;
  font-size: 0.8rem;
  color: var(--sv-meta);
  margin-top: 0.15rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.sv-pagination a,
.sv-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--sv-radius);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sv-pagination a {
  color: var(--sv-text);
  background: var(--sv-surface);
  border: 1px solid var(--sv-border);
}

.sv-pagination a:hover {
  border-color: var(--sv-primary);
  color: var(--sv-primary);
}

.sv-pagination .current {
  background: var(--sv-primary);
  color: #ffffff;
  border-color: var(--sv-primary);
  border: 1px solid var(--sv-primary);
}

.sv-pagination .dots {
  color: var(--sv-meta);
  border: none;
  background: none;
}

.sv-pagination .prev,
.sv-pagination .next {
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POST CARD (Secondary Pages)
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-post-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--sv-surface);
  border-radius: var(--sv-radius-lg);
  border: 1px solid var(--sv-border-light);
  transition: all 0.2s ease;
  text-decoration: none;
}

.sv-post-card:hover {
  box-shadow: var(--sv-shadow-lg);
}

.sv-post-card__image {
  width: 200px;
  height: 150px;
  flex-shrink: 0;
  border-radius: var(--sv-radius);
  overflow: hidden;
}

.sv-post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.sv-post-card:hover .sv-post-card__image img {
  transform: scale(1.05);
}

.sv-post-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sv-post-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.sv-post-card__title a {
  color: inherit;
  text-decoration: none;
}

.sv-post-card__title a:hover {
  color: var(--sv-primary);
}

.sv-post-card__excerpt {
  font-size: 0.85rem;
  color: var(--sv-text);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sv-post-card__meta {
  font-size: 0.8rem;
  color: var(--sv-meta);
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.sv-post-card__meta a {
  color: var(--sv-meta);
}

.sv-post-card__meta a:hover {
  color: var(--sv-primary);
}

/* Grid variant */
.sv-post-card--grid {
  flex-direction: column;
}

.sv-post-card--grid .sv-post-card__image {
  width: 100%;
  height: 180px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREV/NEXT NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.sv-prev-next__item {
  padding: 1rem;
  background: var(--sv-surface-2);
  border-radius: var(--sv-radius);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sv-prev-next__item:hover {
  border-color: var(--sv-primary);
  background: var(--sv-primary-light);
}

.sv-prev-next__item--next {
  text-align: right;
}

.sv-prev-next__label {
  font-size: 0.8rem;
  color: var(--sv-meta);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.sv-prev-next__title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sv-heading);
  margin-top: 0.25rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOOKMARK BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sv-meta);
  padding: 0.25rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sv-bookmark-btn:hover {
  color: var(--sv-primary);
}

.sv-bookmark-btn.bookmarked {
  color: var(--sv-primary);
}

.sv-bookmark-btn.bookmarked svg {
  fill: var(--sv-primary);
  stroke: var(--sv-primary);
}

.sv-bookmark-btn svg {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTHOR BIO CARD
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}

.sv-author-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-author-card__avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--sv-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.sv-author-card__info {
  flex: 1;
  min-width: 0;
}

.sv-author-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin-bottom: 0.25rem;
}

.sv-author-card__name a {
  color: inherit;
  text-decoration: none;
}

.sv-author-card__name a:hover {
  color: var(--sv-primary);
}

.sv-author-card__bio {
  font-size: 0.9rem;
  color: var(--sv-text);
  line-height: 1.5;
}

.sv-author-card__social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sv-author-card__social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sv-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-text);
  transition: all 0.2s ease;
}

.sv-author-card__social a:hover {
  background: var(--sv-primary);
  color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLLECTION / BADGE CARDS (SocialV badge-box style)
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-badge-col {
  margin-bottom: 0;
}

.badge-box {
  width: 100%;
  padding: 3em 2em;
  background: var(--sv-surface);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-lg);
}

.badge-icon {
  margin-bottom: 2em;
}

.badge-icon img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--sv-border);
  transition: transform 0.3s ease;
}

.badge-box:hover .badge-icon img {
  transform: scale(1.08);
}

.badge-icon-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--sv-primary);
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
}

.badge-title {
  margin-bottom: 0.5em;
  font-size: 1rem;
}

.badge-title a {
  color: var(--sv-heading);
  text-decoration: none;
}

.badge-title a:hover {
  color: var(--sv-primary);
}

.badge-desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--sv-text-muted);
}

.badge-desc p {
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.sv-gallery-item {
  border-radius: var(--sv-radius);
  overflow: hidden;
  aspect-ratio: 1;
  position: relative;
  cursor: pointer;
}

.sv-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sv-gallery-item:hover img {
  transform: scale(1.05);
}

.sv-gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sv-gallery-item:hover .sv-gallery-item__overlay {
  opacity: 1;
}

.sv-gallery-item__overlay svg {
  width: 32px;
  height: 32px;
  color: #ffffff;
}

/* Gallery folder cards (year/month with preview thumbnails) */
.sv-gallery-item__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--sv-border-light);
}
.sv-gallery-item__images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sv-gallery-item__title {
  font-weight: var(--sv-fw-semibold);
  font-size: 1rem;
  color: var(--sv-heading);
}
.sv-gallery-item__count {
  font-size: 0.8rem;
  color: var(--sv-meta);
  margin-left: 0.5rem;
}
a.sv-gallery-item {
  text-decoration: none;
  aspect-ratio: auto;
}
a.sv-gallery-item .card-inner {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
}

/* Photo grid (individual images in month view) */
.sv-gallery-grid--photos {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* ── Capture-style gallery grid (index & month pages) ── */
.sv-capture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.sv-capture-item {
  position: relative;
  overflow: hidden;
  display: block;
  height: 280px;
  text-decoration: none;
  background: var(--sv-border-light);
}
.sv-capture-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.sv-capture-item:hover img {
  transform: scale(1.05);
}
.sv-capture-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  height: 100%;
  gap: 2px;
}
.sv-capture-preview-grid img {
  min-width: 0;
  min-height: 0;
}
.sv-capture-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.sv-capture-item:hover .sv-capture-overlay {
  background: rgba(0, 0, 0, 0.5);
}
.sv-capture-overlay__title {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sv-capture-overlay__cat {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.sv-capture-item:hover .sv-capture-overlay__title,
.sv-capture-item:hover .sv-capture-overlay__cat {
  opacity: 1;
  transform: translateY(0);
}

/* ── Masonry gallery grid (Newsy Trendy style) ── */
.ak-masonry-grid {
  columns: 4;
  column-gap: 20px;
}
.ak-masonry-card {
  break-inside: avoid;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
}
.ak-masonry-card__inner {
  background: var(--sv-surface);
  border: 1px solid var(--sv-border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.25s ease;
}
.ak-masonry-card__inner:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ── Thumbnail area ── */
.ak-masonry-card__thumb {
  position: relative;
  overflow: hidden;
}
.ak-masonry-card__link {
  display: block;
  overflow: hidden;
}
.ak-masonry-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.35s ease;
}
.ak-masonry-card__inner:hover .ak-masonry-card__thumb img {
  transform: scale(1.08);
  filter: brightness(1.05);
}
.ak-masonry-card__view-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1;
  padding: 2px 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}
.ak-masonry-card__view-count svg {
  flex-shrink: 0;
}

/* ── Details area ── */
.ak-masonry-card__details {
  padding: 15px 18px;
}
.ak-masonry-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.ak-masonry-card__title a {
  color: var(--sv-heading);
  text-decoration: none;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ak-masonry-card__title a:hover {
  color: var(--sv-primary);
}
.ak-masonry-card__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--sv-meta);
  line-height: 1.4;
}
.ak-masonry-card__date {
  color: var(--sv-meta);
}

/* ── Responsive: 3 columns ── */
@media (max-width: 1200px) {
  .ak-masonry-grid {
    columns: 3;
  }
}
/* ── Responsive: 2 columns ── */
@media (max-width: 768px) {
  .ak-masonry-grid {
    columns: 2;
    column-gap: 12px;
  }
  .ak-masonry-card {
    margin-bottom: 12px;
  }
  .ak-masonry-card__details {
    padding: 10px 14px;
  }
  .ak-masonry-card__title {
    font-size: 14px;
  }
}
/* ── Responsive: 2 columns tighter ── */
@media (max-width: 480px) {
  .ak-masonry-grid {
    columns: 2;
    column-gap: 8px;
  }
  .ak-masonry-card {
    margin-bottom: 8px;
  }
  .ak-masonry-card__details {
    padding: 8px 10px;
  }
  .ak-masonry-card__title {
    font-size: 13px;
  }
  .ak-masonry-card__meta {
    display: none;
  }
}

/* Lightbox custom zoom controls */
.sv-lightbox-zoom {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.35rem;
  z-index: 10;
}
.sv-lb-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.sv-lb-zoom-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}

.sv-search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sv-search-box {
  background: var(--sv-surface);
  padding: 2rem;
  border-radius: var(--sv-radius-lg);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--sv-shadow-lg);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.sv-search-overlay.active .sv-search-box {
  transform: translateY(0);
}

.sv-search-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.sv-search-box__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
}

.sv-search-box__close {
  background: none;
  border: none;
  color: var(--sv-meta);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  transition: color 0.2s ease;
}

.sv-search-box__close:hover {
  color: var(--sv-text-dark);
}

.sv-search-box__input-wrap {
  position: relative;
}

.sv-search-box__input-wrap .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--sv-meta);
  pointer-events: none;
}

.sv-search-box input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 3rem;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-pill);
  background: var(--sv-surface-2);
  font-size: 1rem;
  color: var(--sv-text-dark);
  outline: none;
  transition: border-color 0.2s ease;
}

.sv-search-box input:focus {
  border-color: var(--sv-primary);
  box-shadow: 0 0 0 3px rgba(var(--sv-primary-rgb), 0.1);
}

.sv-search-box button[type="submit"] {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.45rem 1.25rem;
  background: var(--sv-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--sv-radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sv-search-box button[type="submit"]:hover {
  background: var(--sv-primary-dark);
}

.sv-search-box__suggestions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sv-border-light);
}

.sv-search-box__suggestions h5 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sv-meta);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE SIDEBAR OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1025;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sv-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL TO TOP
   ═══════════════════════════════════════════════════════════════════════════ */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sv-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  border: none;
  cursor: pointer;
  box-shadow: var(--sv-shadow);
}

#scroll-top:hover {
  background: var(--sv-primary-dark);
  transform: translateY(-2px);
}

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-top svg {
  width: 20px;
  height: 20px;
}

/* 返回顶部按钮固定在右下角 (bottom/right 2rem + 40px) · 给侧栏底部留出空间,
   避免侧栏最高时 Follow Me 社交图标落到右下角被按钮挡住 */
.sv-right-sidebar {
  padding-bottom: 6rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-footer {
  background: #07142e;
  color: rgba(255,255,255,0.7);
  margin-top: 3rem;
  border-top: none;
}

[data-theme="dark"] .sv-footer {
  background: #050810;
}

.sv-footer__top {
  padding: 4rem 0 2rem;
  text-align: center;
}

/* Centered logo */
.sv-footer__logo-center {
  margin-bottom: 1rem;
}

.sv-footer__logo-center img {
  height: 80px;
  width: auto;
  opacity: 0.95;
  transition: opacity 0.3s;
}

.sv-footer__logo-center img:hover {
  opacity: 1;
}

.sv-footer__logo-center .sv-footer__logo-text {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Tagline */
.sv-footer__tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Collections section */
.sv-footer__collections {
  margin-bottom: 2.5rem;
}

.sv-footer__section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

.sv-footer__collection-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.sv-footer__collection-chip {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.sv-footer__collection-chip:hover {
  background: var(--sv-primary);
  border-color: var(--sv-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(47,101,185,0.3);
}

.sv-footer__collection-more {
  border-style: dashed;
  color: rgba(255,255,255,0.45);
  font-style: italic;
}

/* Action links row */
.sv-footer__actions {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.sv-footer__action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--sv-radius);
}

.sv-footer__action-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.sv-footer__action-link svg {
  opacity: 0.7;
}

/* Footer Social (centered variant) */
.sv-footer__social--center {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

.sv-footer__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sv-footer__social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255,0.06);
}

.sv-footer__social a svg {
  width: 16px;
  height: 16px;
}

/* 品牌色：深色页脚上，浅灰圆底 + 品牌彩色图标，hover 时品牌色实心 + 白 icon */
.sv-footer__social a.sv-social-icon--facebook  { color: #4a90f5; }
.sv-footer__social a.sv-social-icon--x,
.sv-footer__social a.sv-social-icon--twitter   { color: #fff; }
.sv-footer__social a.sv-social-icon--linkedin  { color: #4a9fe0; }
.sv-footer__social a.sv-social-icon--youtube   { color: #ff4d4d; }
.sv-footer__social a.sv-social-icon--instagram { color: #ec5a7a; }
.sv-footer__social a.sv-social-icon--github    { color: #fff; }
.sv-footer__social a.sv-social-icon--telegram  { color: #4ab8ec; }
.sv-footer__social a.sv-social-icon--whatsapp  { color: #25D366; }
.sv-footer__social a.sv-social-icon--pinterest { color: #ff3a54; }
.sv-footer__social a.sv-social-icon--reddit    { color: #ff6a33; }

.sv-footer__social a.sv-social-icon--facebook:hover  { background: #1877F2; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--x:hover,
.sv-footer__social a.sv-social-icon--twitter:hover   { background: #000; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--linkedin:hover  { background: #0A66C2; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--youtube:hover   { background: #FF0000; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--github:hover    { background: #fff; color: #000; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--telegram:hover  { background: #26A5E4; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--whatsapp:hover  { background: #25D366; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--pinterest:hover { background: #E60023; color: #fff; border-color: transparent; transform: translateY(-2px); }
.sv-footer__social a.sv-social-icon--reddit:hover    { background: #FF4500; color: #fff; border-color: transparent; transform: translateY(-2px); }

/* Footer Bottom */
.sv-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}

.sv-footer__bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.sv-footer__bottom a:hover {
  color: #fff;
}

.sv-footer__bottom .sv-footer__credit {
  color: rgba(255,255,255,0.65);
  font-weight: var(--sv-fw-medium);
  text-decoration: none;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.sv-footer__bottom .sv-footer__credit:hover {
  color: rgba(255,255,255,0.95);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
  text-underline-offset: 0.25em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-form-group {
  margin-bottom: 1rem;
}

.sv-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sv-heading);
  margin-bottom: 0.4rem;
}

.sv-form-control {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  background: var(--sv-surface);
  color: var(--sv-text-dark);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sv-form-control:focus {
  outline: none;
  border-color: var(--sv-primary);
  box-shadow: 0 0 0 3px rgba(var(--sv-primary-rgb), 0.1);
}

.sv-form-control::placeholder {
  color: var(--sv-meta);
}

.sv-form-text {
  font-size: 0.8rem;
  color: var(--sv-meta);
  margin-top: 0.25rem;
}

.sv-form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sv-form-check input[type="checkbox"],
.sv-form-check input[type="radio"] {
  accent-color: var(--sv-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS / NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--sv-radius);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sv-alert--info {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
  border: 1px solid rgba(var(--sv-primary-rgb), 0.2);
}

.sv-alert--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.sv-alert--warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.sv-alert--danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.sv-alert__close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  padding: 0.25rem;
}

.sv-alert__close:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-skeleton {
  background: linear-gradient(90deg, var(--sv-surface-2) 25%, var(--sv-border-light) 50%, var(--sv-surface-2) 75%);
  background-size: 200% 100%;
  animation: sv-shimmer 1.5s infinite;
  border-radius: var(--sv-radius);
}

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

.sv-skeleton--circle {
  border-radius: 50%;
}

.sv-skeleton--text {
  height: 0.875rem;
  margin-bottom: 0.5rem;
}

.sv-skeleton--text-sm {
  height: 0.75rem;
  width: 60%;
}

.sv-skeleton--avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

.sv-skeleton--img {
  height: 200px;
  width: 100%;
}

/* Spinner */
.sv-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--sv-border);
  border-top-color: var(--sv-primary);
  border-radius: 50%;
  animation: sv-spin 0.6s linear infinite;
}

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

.sv-spinner--sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.sv-spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1060;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.sv-modal {
  background: var(--sv-surface);
  border-radius: var(--sv-radius-lg);
  box-shadow: var(--sv-shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.3s ease;
}

.sv-modal-backdrop.show .sv-modal {
  transform: translateY(0) scale(1);
}

.sv-modal__header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--sv-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sv-modal__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
}

.sv-modal__close {
  background: none;
  border: none;
  color: var(--sv-meta);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
}

.sv-modal__body {
  padding: 1.25rem;
}

.sv-modal__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--sv-border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-tooltip {
  position: relative;
}

.sv-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.65rem;
  background: var(--sv-text-dark);
  color: #ffffff;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1070;
}

.sv-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--sv-border);
  margin-bottom: 1.5rem;
}

.sv-tabs__item {
  padding: 0.75rem 1.25rem;
  color: var(--sv-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.sv-tabs__item:hover {
  color: var(--sv-primary);
}

.sv-tabs__item.active {
  color: var(--sv-primary);
  border-bottom-color: var(--sv-primary);
  font-weight: 600;
}

.sv-tabs--pill {
  border-bottom: none;
  gap: 0.5rem;
}

.sv-tabs--pill .sv-tabs__item {
  border-bottom: none;
  margin-bottom: 0;
  border-radius: var(--sv-radius-pill);
  padding: 0.5rem 1rem;
}

.sv-tabs--pill .sv-tabs__item.active {
  background: var(--sv-primary);
  color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.sv-empty-state__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  background: var(--sv-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-primary);
}

.sv-empty-state__icon svg {
  width: 36px;
  height: 36px;
}

.sv-empty-state__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin-bottom: 0.5rem;
}

.sv-empty-state__text {
  font-size: 0.9rem;
  color: var(--sv-text);
  max-width: 400px;
  margin: 0 auto 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ONLINE STATUS INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #28a745;
  border: 2px solid var(--sv-surface);
  display: inline-block;
}

.sv-online-dot--offline {
  background: var(--sv-meta);
}

.sv-online-dot--busy {
  background: #ffc107;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION DROPDOWN
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-notification-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 360px;
  background: var(--sv-surface);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-lg);
  box-shadow: var(--sv-shadow-lg);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.sv-notification-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sv-notification-panel__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--sv-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sv-notification-panel__header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sv-heading);
}

.sv-notification-panel__list {
  max-height: 360px;
  overflow-y: auto;
}

.sv-notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  transition: background 0.15s ease;
  cursor: pointer;
}

.sv-notification-item:hover {
  background: var(--sv-surface-2);
}

.sv-notification-item--unread {
  background: var(--sv-primary-light);
}

.sv-notification-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.sv-notification-item__text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--sv-text);
  line-height: 1.4;
}

.sv-notification-item__text strong {
  color: var(--sv-heading);
}

.sv-notification-item__time {
  font-size: 0.75rem;
  color: var(--sv-meta);
  margin-top: 0.15rem;
  display: block;
}

.sv-notification-panel__footer {
  padding: 0.75rem;
  border-top: 1px solid var(--sv-border-light);
  text-align: center;
}

.sv-notification-panel__footer a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sv-primary);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-profile-header {
  position: relative;
  margin-bottom: 1.25rem;
}

.sv-profile-header__cover {
  height: 250px;
  border-radius: var(--sv-radius-lg) var(--sv-radius-lg) 0 0;
  overflow: hidden;
}

.sv-profile-header__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sv-profile-header__info {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 0 1.5rem;
  margin-top: -50px;
  position: relative;
}

.sv-profile-header__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--sv-surface);
  object-fit: cover;
  flex-shrink: 0;
}

.sv-profile-header__details {
  flex: 1;
  padding-bottom: 1rem;
}

.sv-profile-header__name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sv-heading);
  margin: 0;
}

.sv-profile-header__username {
  font-size: 0.9rem;
  color: var(--sv-meta);
}

.sv-profile-header__stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.sv-profile-header__stat {
  font-size: 0.85rem;
  color: var(--sv-text);
}

.sv-profile-header__stat strong {
  color: var(--sv-heading);
  font-weight: 600;
}

.sv-profile-header__actions {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--sv-meta);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sv-breadcrumbs a {
  color: var(--sv-text);
  text-decoration: none;
  transition: color 0.2s;
}

.sv-breadcrumbs a:hover {
  color: var(--sv-primary);
}

.sv-breadcrumbs__separator {
  color: var(--sv-meta);
  opacity: 0.45;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  user-select: none;
}

.sv-breadcrumbs__current {
  color: var(--sv-heading);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLE OF CONTENTS (Sticky sidebar)
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-toc {
  position: sticky;
  top: calc(var(--sv-header-height) + 1.5rem);
}

.sv-toc__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sv-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.sv-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sv-toc__list li {
  margin-bottom: 0.25rem;
}

.sv-toc__list a {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--sv-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.sv-toc__list a:hover {
  color: var(--sv-primary);
  border-left-color: var(--sv-primary);
}

.sv-toc__list a.active {
  color: var(--sv-primary);
  border-left-color: var(--sv-primary);
  font-weight: 500;
}

.sv-toc__list .toc-h3 {
  padding-left: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sv-primary-light);
  border: none;
  color: var(--sv-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sv-theme-toggle:hover {
  background: var(--sv-primary);
  color: #fff;
}

.sv-theme-toggle svg {
  width: 22px;
  height: 22px;
}

[data-theme="dark"] .sv-theme-toggle .sv-icon-sun {
  display: block;
}

[data-theme="dark"] .sv-theme-toggle .sv-icon-moon {
  display: none;
}

.sv-theme-toggle .sv-icon-sun {
  display: none;
}

.sv-theme-toggle .sv-icon-moon {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sv-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--sv-primary);
  z-index: 1100;
  transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes sv-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sv-slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sv-slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sv-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sv-animate-fadeIn {
  animation: sv-fadeIn 0.4s ease forwards;
}

.sv-animate-slideInLeft {
  animation: sv-slideInLeft 0.4s ease forwards;
}

.sv-animate-slideInRight {
  animation: sv-slideInRight 0.4s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Text */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-muted {
  color: var(--sv-meta);
}

.text-primary {
  color: var(--sv-primary);
}

.text-heading {
  color: var(--sv-heading);
}

.text-sm {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.25rem;
}

.fw-400 {
  font-weight: 400;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

/* Shapes */
.rounded-circle {
  border-radius: 50%;
}

.rounded {
  border-radius: var(--sv-radius);
}

.rounded-lg {
  border-radius: var(--sv-radius-lg);
}

.rounded-pill {
  border-radius: var(--sv-radius-pill);
}

/* Display */
.d-none {
  display: none;
}

.d-flex {
  display: flex;
}

.d-inline-flex {
  display: inline-flex;
}

.d-block {
  display: block;
}

.d-grid {
  display: grid;
}

.flex-column {
  flex-direction: column;
}

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

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

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.flex-1 {
  flex: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

/* Gap */
.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.gap-4 {
  gap: 1.5rem;
}

/* Margin top */
.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mt-5 {
  margin-top: 3rem;
}

/* Margin bottom */
.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

/* Padding */
.p-0 {
  padding: 0;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 1rem;
}

.p-4 {
  padding: 1.5rem;
}

/* Width */
.w-100 {
  width: 100%;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

/* Position */
.position-relative {
  position: relative;
}

.position-sticky {
  position: sticky;
  top: 0;
}

/* Sidebar body padding for fixed footer */
.sv-sidebar__body {
  padding-bottom: 60px;
}

/* Sidebar bottom icons bar */
.sv-sidebar__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.75rem 0;
  border-top: 1px solid var(--sv-border-light);
  background: var(--sv-surface);
}

.sv-sidebar__footer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--sv-meta);
  text-decoration: none;
  transition: all 0.2s;
}

.sv-sidebar__footer-icon:hover {
  background: var(--sv-primary-light);
  color: var(--sv-primary);
}

.sv-sidebar__footer-icon svg {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE · max-width: 1199.98px (Large tablets / small desktops)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
  .sv-sidebar {
    width: var(--sv-mini-sidebar-width);
  }

  .sv-sidebar .nav-text {
    display: none;
  }

  .sv-sidebar__label {
    text-align: center;
    font-size: 0;
  }

  .sv-sidebar__label::after {
    content: '...';
    font-size: 0.75rem;
  }

  .sv-sidebar__user-info {
    display: none;
  }

  .sv-sidebar__nav .nav-item {
    justify-content: center;
    padding: 0.75rem;
  }

  .sv-main-wrapper {
    margin-left: var(--sv-mini-sidebar-width);
  }

  .sv-content-sidebar {
    width: 280px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE · max-width: 991.98px (Tablets)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  :root {
    --sv-fs-h1: 2em;
    --sv-fs-h2: 1.8em;
    --sv-fs-h3: 1.6em;
    --sv-fs-h4: 1.4em;
  }

  .sv-sidebar {
    transform: translateX(-100%);
    width: var(--sv-sidebar-width);
    box-shadow: var(--sv-shadow-lg);
  }

  .sv-sidebar.show {
    transform: translateX(0);
  }

  .sv-sidebar .nav-text {
    display: inline;
  }

  .sv-sidebar__label {
    text-align: left;
    font-size: 0.75rem;
  }

  .sv-sidebar__label::after {
    content: none;
  }

  .sv-sidebar__user-info {
    display: block;
  }

  .sv-sidebar__nav .nav-item {
    justify-content: flex-start;
    padding: 0.75rem 1.25rem;
  }

  .sv-main-wrapper {
    margin-left: 0;
  }

  body.sidebar-mini .sv-main-wrapper {
    margin-left: 0;
  }

  .sv-header__hamburger {
    display: flex;
  }

  .sv-header__nav {
    display: none;
  }

  .sv-header__search {
    max-width: 300px;
  }

  .sv-content-row {
    flex-direction: column;
  }

  .sv-content-sidebar {
    width: 100%;
  }

  .sv-footer__collection-grid {
    gap: 0.4rem;
  }

  .sv-footer__brand {
    grid-column: 1 / -1;
  }

  .sv-profile-header__cover {
    height: 180px;
  }

  .sv-profile-header__avatar {
    width: 90px;
    height: 90px;
  }

  .sv-notification-panel {
    width: 320px;
    right: -50px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE · max-width: 767.98px (Mobile landscape / large phones)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
  :root {
    --sv-fs-body: 0.875em;
    --sv-fs-h1: 1.8em;
    --sv-fs-h2: 1.6em;
    --sv-fs-h3: 1.4em;
    --sv-fs-h4: 1.2em;
  }

  .sv-content {
    padding: 1rem;
  }

  .sv-footer__actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .sv-footer__top {
    padding: 2rem 0;
  }

  .sv-prev-next {
    grid-template-columns: 1fr;
  }

  .sv-post-card {
    flex-direction: column;
  }

  .sv-post-card__image {
    width: 100%;
    height: 200px;
  }

  .sv-story-circle__img {
    width: 55px;
    height: 55px;
  }

  .sv-story-circle__name {
    font-size: 0.7rem;
    max-width: 60px;
  }

  .sv-article__title {
    font-size: 1.5rem;
  }

  .sv-article__cover {
    margin: 0 -1rem 1.25rem;
  }

  .sv-activity__media {
    margin: 0 -1rem;
  }

  .card-inner {
    padding: 1rem;
  }

  .sv-profile-header__info {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    margin-top: -40px;
  }

  .sv-profile-header__avatar {
    width: 80px;
    height: 80px;
  }

  .sv-profile-header__actions {
    justify-content: center;
  }

  .sv-profile-header__stats {
    justify-content: center;
  }

  .badge-box {
    padding: 2em 1em;
  }

  .sv-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .sv-capture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sv-capture-item {
    height: 220px;
  }
  .sv-author-card {
    flex-direction: column;
    text-align: center;
  }

  .sv-author-card__social {
    justify-content: center;
  }

  .sv-comment--reply {
    margin-left: 1.5rem;
  }

  .sv-comment-form__row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .sv-header__search {
    display: none;
  }

  .sv-notification-panel {
    position: fixed;
    top: var(--sv-header-height);
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 0 0 var(--sv-radius-lg) var(--sv-radius-lg);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE TOUCH · coarse pointer / no hover
   ═══════════════════════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  /* Visual tap feedback for all interactive elements */
  .sv-activity__action-btn:active,
  .sv-header__icon-btn:active,
  .sv-bookmark-btn:active,
  .sv-header__hamburger:active,
  .sv-btn:active,
  .sv-scroll-top:active,
  .sv-sidebar__nav .nav-item:active {
    opacity: 0.7;
    transition: opacity 0s;
  }

  /* Ensure minimum 44px touch targets on buttons */
  .sv-activity__action-btn {
    min-height: 44px;
  }

  .sv-header__icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .sv-bookmark-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Disable hover styles that cause sticky-hover issues on touch */
  .sv-header__dropdown:hover .sv-header__dropdown-menu {
    opacity: 0;
    visibility: hidden;
  }
  .sv-header__dropdown.open .sv-header__dropdown-menu {
    opacity: 1;
    visibility: visible;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE · max-width: 575.98px (Small phones)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
  .sv-content {
    padding: 0.75rem;
  }

  .sv-header {
    padding: 0 1rem;
  }

  .sv-header__right {
    gap: 0.5rem;
  }

  .card-main {
    border-radius: var(--sv-radius);
  }

  .card-inner {
    padding: 0.875rem;
  }

  .sv-article__title {
    font-size: 1.3rem;
  }

  .entry-content {
    font-size: 0.95rem;
  }

  .entry-content h2 {
    font-size: 1.3rem;
  }

  .entry-content h3 {
    font-size: 1.1rem;
  }

  .sv-activity__footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .sv-activity__footer-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-height: 44px;
  }

  .sv-activity__action-btn {
    padding: 0.5rem;
    font-size: 0.85rem;
    min-height: 44px;
  }

  .sv-pagination {
    flex-wrap: wrap;
  }

  .sv-pagination a,
  .sv-pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .sv-stories__scroll {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .sv-story-circle__img {
    width: 50px;
    height: 50px;
  }

  .badge-box {
    padding: 2em 1em;
  }

  .sv-badge-col {
    margin-bottom: 0;
  }

  .sv-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }
  .sv-capture-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
  }
  .sv-capture-item {
    height: 160px;
  }
  .sv-share {
    flex-wrap: wrap;
  }

  .sv-footer__social {
    justify-content: center;
  }

  .sv-footer__brand {
    text-align: center;
  }

  .sv-search-box {
    padding: 1.5rem;
    width: 95%;
  }

  .sv-modal {
    width: 95%;
  }

  #scroll-top {
    bottom: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .sv-sidebar,
  .sv-header,
  .sv-footer,
  .sv-sidebar-overlay,
  .sv-search-overlay,
  #scroll-top,
  .sv-share,
  .sv-activity__footer,
  .sv-comment-form,
  .sv-reading-progress {
    display: none !important;
  }

  .sv-main-wrapper {
    margin-left: 0 !important;
  }

  .sv-content {
    padding: 0;
  }

  .card-main {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body {
    background: #ffffff;
    color: #333333;
  }

  .entry-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666666;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PULSE · public site stats (设计稿: 卡片容器 + italic 标题 + 13 行)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 卡片容器 */
.sv-pulse-card {
  margin: 1rem 0.75rem 1.25rem;
  padding: 1rem 0.5rem 0.5rem;
  background: var(--sv-surface, #fff);
  border: 1px solid var(--sv-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
[data-theme="dark"] .sv-pulse-card {
  background: var(--sv-surface, #1a1a1a);
  border-color: var(--sv-border, #2a2a2a);
}
.sv-pulse-card__hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem 0.75rem;
  border-bottom: 1px solid var(--sv-border, #e5e7eb);
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .sv-pulse-card__hdr {
  border-bottom-color: var(--sv-border, #2a2a2a);
}
.sv-pulse-card__title {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sv-heading, #111);
  letter-spacing: -0.01em;
}
.sv-pulse-card__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #4caf50;
  text-transform: uppercase;
}

/* LIVE 呼吸点 */
.sv-pulse__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf50;
  flex-shrink: 0;
  animation: sv-pulse-anim 1.6s ease-in-out infinite;
}
@keyframes sv-pulse-anim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, .45); }
  50%      { box-shadow: 0 0 0 4px rgba(76, 175, 80, 0); }
}

.sv-pulse {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sv-pulse__row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--sv-text);
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.sv-pulse__row:hover {
  background: var(--sv-primary-light, rgba(0, 0, 0, 0.03));
}
.sv-pulse__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.sv-pulse__icon svg { width: 18px; height: 18px; }

/* 13 个 icon 各自的品牌色 · 对齐设计稿 */
.sv-pulse__icon--live       { color: #4caf50; }
.sv-pulse__icon--visitors   { color: #8b5cf6; }
.sv-pulse__icon--reads      { color: #14b8a6; }
.sv-pulse__icon--likes      { color: #ef4444; }
.sv-pulse__icon--records    { color: #ec4899; }
.sv-pulse__icon--media      { color: #06b6d4; }
.sv-pulse__icon--words      { color: #6366f1; }
.sv-pulse__icon--comments   { color: #a855f7; }
.sv-pulse__icon--collections{ color: #f97316; }
.sv-pulse__icon--countries  { color: #10b981; }
.sv-pulse__icon--streak     { color: #ef4444; }
.sv-pulse__icon--updated    { color: #3b82f6; }
.sv-pulse__icon--online-for { color: #3b82f6; }
.sv-pulse__icon--uptime     { color: #f59e0b; }

.sv-pulse__lbl {
  color: var(--sv-text);
  font-weight: var(--sv-fw-medium, 500);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}
.sv-pulse__val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sv-heading, #111);
  text-align: right;
}
.sv-pulse__val--live { color: #4caf50; }
.sv-pulse__pill {
  display: inline-block;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sv-meta);
  background: var(--sv-primary-light, rgba(0, 0, 0, 0.05));
  border-radius: 3px;
  text-transform: uppercase;
}
[data-theme="dark"] .sv-pulse__pill {
  color: var(--sv-meta);
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .sv-pulse__pill {
  background: rgba(255, 255, 255, 0.06);
}

/* 折叠态 (sidebar-mini) · 卡片塌成只显 icon */
body.sidebar-mini .sv-pulse-card {
  margin: 0.5rem 0.25rem;
  padding: 0.5rem 0.25rem;
  border: none;
  background: transparent;
  box-shadow: none;
}
body.sidebar-mini .sv-pulse-card__hdr {
  border-bottom: none;
  padding: 0;
  margin-bottom: 0.25rem;
  justify-content: center;
}
body.sidebar-mini .sv-pulse__row {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 6px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Activity card meta · 第一/二排 time + collections (sv-activity-card 改造)
   ═══════════════════════════════════════════════════════════════════════════ */

.sv-activity__time-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--sv-meta);
  margin-bottom: 6px;
}
.sv-activity__time-line svg { color: var(--sv-meta); opacity: 0.75; flex-shrink: 0; }
.sv-activity__time-abs { color: var(--sv-heading); }
.sv-activity__time-sep { color: var(--sv-meta); opacity: 0.5; }
.sv-activity__time-rel { color: var(--sv-meta); }
.sv-activity__views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sv-meta);
}
.sv-activity__views svg { color: var(--sv-meta); flex-shrink: 0; }
.sv-activity__likes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ef4444;
}
.sv-activity__likes svg { color: #ef4444; flex-shrink: 0; }

.sv-activity__cols-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  margin-bottom: 6px;
}
.sv-activity__col {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sv-heading);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.sv-activity__col:hover { opacity: 0.7; }
.sv-activity__col-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sv-activity__col-name { color: var(--sv-heading); }

/* ═══════════════════════════════════════════════════════════════════════════
   Record detail · share row, prev/next thumbs, related strip
   ═══════════════════════════════════════════════════════════════════════════ */

/* Share row: prefix icon + 9 social buttons, all 36px round, aligned */
.sv-share {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sv-border-light);
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sv-share__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-meta);
  margin-right: 0.25rem;
  flex-shrink: 0;
}

/* Hover colors for newly added platforms */
.sv-share__btn[data-share="reddit"]:hover { background: #ff4500; }
.sv-share__btn[data-share="telegram"]:hover { background: #229ed9; }
.sv-share__btn[data-share="email"]:hover { background: #6b7280; }
.sv-share__btn[data-share="copy"]:hover { background: var(--sv-primary); }
.sv-share__btn[data-share="copy"].sv-share__btn--copied {
  background: #10b981;
  color: #fff;
}

/* Prev/Next strip with circular thumb */
.sv-prev-next__item .card-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.sv-prev-next__item--next .card-inner {
  justify-content: flex-end;
}
.sv-prev-next__item--next .sv-prev-next__text {
  text-align: right;
}
.sv-prev-next__thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}
.sv-prev-next__thumb img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.sv-prev-next__text {
  min-width: 0;
  flex: 1;
}

/* Related posts · narrow strip with square thumb */
.sv-related__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin-bottom: 1rem;
}
.sv-related-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.sv-related-strip {
  display: flex;
  gap: 1rem;
  padding: 0.85rem;
  background: var(--sv-surface);
  border: 1px solid var(--sv-border-light);
  border-radius: var(--sv-radius);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.sv-related-strip:hover {
  border-color: var(--sv-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.sv-related-strip__thumb {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}
.sv-related-strip__thumb img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.sv-related-strip__placeholder {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  font-size: 2rem;
}
.sv-related-strip__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv-related-strip__body .sv-activity__time-line,
.sv-related-strip__body .sv-activity__cols-line {
  margin-bottom: 0;
}
.sv-related-strip__title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--sv-heading);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sv-related-strip__preview {
  font-size: 0.85rem;
  color: var(--sv-meta);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .sv-related-strip { gap: 0.75rem; padding: 0.7rem; }
  .sv-related-strip__thumb,
  .sv-related-strip__thumb img { width: 72px; height: 72px; }
  .sv-related-strip__preview { -webkit-line-clamp: 1; }
}

/* Breadcrumbs home icon */
.sv-breadcrumbs__home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.sv-breadcrumbs__home svg {
  flex-shrink: 0;
  opacity: 0.75;
}

/* Author + GitHub contribution strip */
.sv-author-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.sv-author-strip__avatar {
  flex-shrink: 0;
}
.sv-author-strip__avatar img,
.sv-author-strip__avatar .sv-activity__avatar-placeholder {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.sv-author-strip__main {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.gh-contrib {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: #57606a;
  max-width: 100%;
  overflow-x: auto;
}
.gh-contrib__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}
.gh-contrib__title {
  font-weight: 600;
  color: #1f2328;
  font-size: 13px;
}
.gh-contrib__total {
  color: #656d76;
}
.gh-contrib__grid {
  display: inline-flex;
  gap: 3px;
  padding: 2px;
}
.gh-contrib__week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gh-contrib__day {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  display: inline-block;
  background-color: #ebedf0;
}
.gh-contrib__day--l0 { background-color: #ebedf0; }
.gh-contrib__day--l1 { background-color: #9be9a8; }
.gh-contrib__day--l2 { background-color: #40c463; }
.gh-contrib__day--l3 { background-color: #30a14e; }
.gh-contrib__day--l4 { background-color: #216e39; }
.gh-contrib__legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 6px;
  font-size: 11px;
}
.gh-contrib__legend .gh-contrib__day {
  width: 10px;
  height: 10px;
}
[data-theme="dark"] .gh-contrib__title { color: #e6edf3; }
[data-theme="dark"] .gh-contrib__total { color: #8b949e; }
[data-theme="dark"] .gh-contrib__day--l0 { background-color: #161b22; }
[data-theme="dark"] .gh-contrib__day--l1 { background-color: #0e4429; }
[data-theme="dark"] .gh-contrib__day--l2 { background-color: #006d32; }
[data-theme="dark"] .gh-contrib__day--l3 { background-color: #26a641; }
[data-theme="dark"] .gh-contrib__day--l4 { background-color: #39d353; }
@media (max-width: 640px) {
  .sv-author-strip { gap: 0.85rem; }
  .sv-author-strip__avatar img,
  .sv-author-strip__avatar .sv-activity__avatar-placeholder {
    width: 72px !important;
    height: 72px !important;
  }
}
