/* Last dark-mode pass for TOC, search, and book/movie lightboxes. */

html body.theme-force-dark .sidebar:has(.post-toc-wrap) {
  align-self: flex-start !important;
  height: max-content !important;
  max-height: calc(100vh - 96px) !important;
  overflow: visible !important;
  position: sticky !important;
  top: 88px !important;
  z-index: 6 !important;
}

/* Books category menu: retain the light-theme hierarchy in dark mode. */
html body:is(.theme-force-dark, .dark-mode) .main-category-selector,
html.dark-mode body .main-category-selector {
  background: rgba(255, 250, 241, .10) !important;
  border: 1px solid rgba(255, 250, 241, .20) !important;
  border-radius: 50px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .main-category-selector *,
html.dark-mode body .main-category-selector * {
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .sub-category-dropdown,
html.dark-mode body .sub-category-dropdown {
  background: #27231f !important;
  border: 1px solid rgba(255, 250, 241, .14) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
  padding: 8px 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option),
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option) {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 250, 241, .10) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option):last-child,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option):last-child {
  border-bottom: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option):hover,
html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option).active,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option):hover,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option).active {
  background: rgba(255, 250, 241, .12) !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .main-category-option::after,
html.dark-mode body .main-category-option::after {
  color: #fffaf1 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .main-category-selector {
    background: rgba(255, 250, 241, .10) !important;
    border: 1px solid rgba(255, 250, 241, .20) !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .main-category-selector * {
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .sub-category-dropdown {
    background: #27231f !important;
    border: 1px solid rgba(255, 250, 241, .14) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
    padding: 8px 0 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option) {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 250, 241, .10) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option):last-child {
    border-bottom: 0 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option):hover,
  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option).active {
    background: rgba(255, 250, 241, .12) !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .main-category-option::after {
    color: #fffaf1 !important;
  }
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .32)) !important;
  flex-direction: column !important;
  gap: 0 !important;
  height: auto !important;
  max-height: calc(100vh - 96px) !important;
  min-height: 0 !important;
  overflow: visible !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-nav,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  background-clip: padding-box !important;
  box-shadow: none !important;
  position: relative !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-nav {
  border-radius: 26px 26px 0 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  border-radius: 0 0 26px 26px !important;
  margin: -1px 0 0 !important;
  max-height: calc(100vh - 158px) !important;
  overflow: hidden !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc .nav {
  max-height: calc(100vh - 186px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
}

html body.theme-force-dark .search-pop-overlay.search-active,
html body.theme-force-dark .local-search-pop-overlay.search-active {
  background: rgba(8, 8, 8, .58) !important;
  backdrop-filter: blur(10px) !important;
}

html body.theme-force-dark .popup.search-popup,
html body.theme-force-dark .search-popup {
  background: rgba(31, 29, 26, .98) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .14) !important;
  border-radius: 26px !important;
  box-shadow: 0 28px 78px rgba(0, 0, 0, .52) !important;
  color: #f4efe7 !important;
  overflow: hidden !important;
}

html body.theme-force-dark .search-header {
  background: rgba(31, 29, 26, .98) !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 248, 234, .1) !important;
}

html body.theme-force-dark .search-input-container {
  background: rgba(255, 248, 234, .075) !important;
  border: 1px solid rgba(255, 248, 234, .15) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

html body.theme-force-dark input.search-input,
html body.theme-force-dark .search-popup input.search-input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #f4efe7 !important;
  -webkit-text-fill-color: #f4efe7 !important;
}

html body.theme-force-dark .search-icon,
html body.theme-force-dark .popup-btn-close {
  color: rgba(244, 239, 231, .76) !important;
  -webkit-text-fill-color: rgba(244, 239, 231, .76) !important;
}

html body.theme-force-dark .popup-btn-close:hover,
html body.theme-force-dark .popup-btn-close:hover .fa {
  color: #fff8ea !important;
  -webkit-text-fill-color: #fff8ea !important;
}

html body.theme-force-dark #search-result,
html body.theme-force-dark .search-result-list {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body.theme-force-dark #search-result,
html body.theme-force-dark #search-result::-webkit-scrollbar {
  scrollbar-width: none !important;
}

html body.theme-force-dark #search-result::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

html body.theme-force-dark .search-result-list {
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.theme-force-dark .search-result-list li {
  background: rgba(255, 248, 234, .065) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .13) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  color: #f4efe7 !important;
  overflow: hidden !important;
  padding: 14px 16px !important;
}

html body.theme-force-dark .search-result-list li::before,
html body.theme-force-dark .search-result-list li::after,
html body.theme-force-dark .search-result-title::before,
html body.theme-force-dark .search-result-title::after,
html body.theme-force-dark .search-result::before,
html body.theme-force-dark .search-result::after {
  display: none !important;
}

html body.theme-force-dark .search-result-title,
html body.theme-force-dark a.search-result-title,
html body.theme-force-dark .search-result-title a {
  background: transparent !important;
  border: 0 !important;
  color: #fff8ea !important;
  display: block !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #fff8ea !important;
}

html body.theme-force-dark .search-result,
html body.theme-force-dark p.search-result {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: rgba(244, 239, 231, .84) !important;
  line-height: 1.65 !important;
  margin: 0 !important;
  overflow-wrap: anywhere !important;
  padding: 0 !important;
  -webkit-text-fill-color: rgba(244, 239, 231, .84) !important;
}

html body.theme-force-dark .search-keyword,
html body.theme-force-dark mark.search-keyword {
  background: rgba(255, 217, 126, .26) !important;
  border: 0 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  color: #fff3d2 !important;
  font-weight: 800 !important;
  padding: 0 3px !important;
  -webkit-text-fill-color: #fff3d2 !important;
}

html body.theme-force-dark :is(#bookLightbox, #movieLightbox) .lightbox-content {
  background: rgba(31, 29, 26, .98) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .12) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52) !important;
  overflow: hidden !important;
}

html body.theme-force-dark :is(#bookLightbox, #movieLightbox) :is(.book-detail, .movie-detail, .book-detail-header, .movie-detail-header, .book-info-container, .movie-info-container, .book-meta, .movie-meta, .book-detail-footer, .movie-detail-footer, .book-actions, .movie-actions, .movie-buttons),
html body.theme-force-dark :is(#bookLightbox, #movieLightbox) :is(.book-detail, .movie-detail, .book-detail-header, .movie-detail-header, .book-info-container, .movie-info-container, .book-meta, .movie-meta, .book-detail-footer, .movie-detail-footer, .book-actions, .movie-actions, .movie-buttons)::before,
html body.theme-force-dark :is(#bookLightbox, #movieLightbox) :is(.book-detail, .movie-detail, .book-detail-header, .movie-detail-header, .book-info-container, .movie-info-container, .book-meta, .movie-meta, .book-detail-footer, .movie-detail-footer, .book-actions, .movie-actions, .movie-buttons)::after {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body.theme-force-dark :is(#bookLightbox, #movieLightbox) :is(.book-summary, .movie-summary) {
  background: rgba(255, 248, 234, .055) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  color: #f0e9dc !important;
  -webkit-text-fill-color: #f0e9dc !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) {
    align-self: flex-start !important;
    height: max-content !important;
    max-height: calc(100vh - 96px) !important;
    overflow: visible !important;
    position: sticky !important;
    top: 88px !important;
    z-index: 6 !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .32)) !important;
    flex-direction: column !important;
    gap: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 96px) !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: static !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-nav,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc-wrap {
    background-clip: padding-box !important;
    box-shadow: none !important;
    position: relative !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-nav {
    border-radius: 26px 26px 0 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc-wrap {
    border-radius: 0 0 26px 26px !important;
    margin: -1px 0 0 !important;
    max-height: calc(100vh - 158px) !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc .nav {
    max-height: calc(100vh - 186px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
  }

  html body:not(.theme-force-light) .search-pop-overlay.search-active,
  html body:not(.theme-force-light) .local-search-pop-overlay.search-active {
    background: rgba(8, 8, 8, .58) !important;
    backdrop-filter: blur(10px) !important;
  }

  html body:not(.theme-force-light) .popup.search-popup,
  html body:not(.theme-force-light) .search-popup {
    background: rgba(31, 29, 26, .98) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .14) !important;
    border-radius: 26px !important;
    box-shadow: 0 28px 78px rgba(0, 0, 0, .52) !important;
    color: #f4efe7 !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) .search-header {
    background: rgba(31, 29, 26, .98) !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 248, 234, .1) !important;
  }

  html body:not(.theme-force-light) .search-input-container {
    background: rgba(255, 248, 234, .075) !important;
    border: 1px solid rgba(255, 248, 234, .15) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) input.search-input,
  html body:not(.theme-force-light) .search-popup input.search-input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #f4efe7 !important;
    -webkit-text-fill-color: #f4efe7 !important;
  }

  html body:not(.theme-force-light) #search-result,
  html body:not(.theme-force-light) .search-result-list {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) .search-result-list li {
    background: rgba(255, 248, 234, .065) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .13) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    color: #f4efe7 !important;
    overflow: hidden !important;
    padding: 14px 16px !important;
  }

  html body:not(.theme-force-light) .search-result,
  html body:not(.theme-force-light) p.search-result {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: rgba(244, 239, 231, .84) !important;
    line-height: 1.65 !important;
    margin: 0 !important;
    overflow-wrap: anywhere !important;
    padding: 0 !important;
    -webkit-text-fill-color: rgba(244, 239, 231, .84) !important;
  }

  html body:not(.theme-force-light) .search-result-title,
  html body:not(.theme-force-light) a.search-result-title,
  html body:not(.theme-force-light) .search-result-title a {
    background: transparent !important;
    border: 0 !important;
    color: #fff8ea !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
    text-decoration: none !important;
    -webkit-text-fill-color: #fff8ea !important;
  }

  html body:not(.theme-force-light) .search-keyword,
  html body:not(.theme-force-light) mark.search-keyword {
    background: rgba(255, 217, 126, .26) !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: #fff3d2 !important;
    font-weight: 800 !important;
    padding: 0 3px !important;
    -webkit-text-fill-color: #fff3d2 !important;
  }

  html body:not(.theme-force-light) :is(#bookLightbox, #movieLightbox) .lightbox-content {
    background: rgba(31, 29, 26, .98) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .12) !important;
    border-radius: 24px !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .52) !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) :is(#bookLightbox, #movieLightbox) :is(.book-detail, .movie-detail, .book-detail-header, .movie-detail-header, .book-info-container, .movie-info-container, .book-meta, .movie-meta, .book-detail-footer, .movie-detail-footer, .book-actions, .movie-actions, .movie-buttons),
  html body:not(.theme-force-light) :is(#bookLightbox, #movieLightbox) :is(.book-detail, .movie-detail, .book-detail-header, .movie-detail-header, .book-info-container, .movie-info-container, .book-meta, .movie-meta, .book-detail-footer, .movie-detail-footer, .book-actions, .movie-actions, .movie-buttons)::before,
  html body:not(.theme-force-light) :is(#bookLightbox, #movieLightbox) :is(.book-detail, .movie-detail, .book-detail-header, .movie-detail-header, .book-info-container, .movie-info-container, .book-meta, .movie-meta, .book-detail-footer, .movie-detail-footer, .book-actions, .movie-actions, .movie-buttons)::after {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) :is(#bookLightbox, #movieLightbox) :is(.book-summary, .movie-summary) {
    background: rgba(255, 248, 234, .055) !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    color: #f0e9dc !important;
    -webkit-text-fill-color: #f0e9dc !important;
  }
}

/* The profile counters are always part of the parent card, never a nested panel. */
html body .sidebar-profile-card .site-state-wrap,
html body .sidebar-profile-card .site-state-wrap > .site-state,
html body .sidebar-profile-card .site-state > .site-state-item,
html body .sidebar-profile-card .site-state > .site-state-item > a,
html body .sidebar-profile-card .site-state > .site-state-item > span,
html body .sidebar-profile-card .site-state > .site-state-item > a > span {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  isolation: auto !important;
  mask: none !important;
  opacity: 1 !important;
  outline: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body .sidebar-profile-card .site-state-wrap::before,
html body .sidebar-profile-card .site-state-wrap::after,
html body .sidebar-profile-card .site-state::before,
html body .sidebar-profile-card .site-state::after,
html body .sidebar-profile-card .site-state-item::before,
html body .sidebar-profile-card .site-state-item::after,
html body .sidebar-profile-card .site-state-item > a::before,
html body .sidebar-profile-card .site-state-item > a::after,
html body .sidebar-profile-card .site-state-item > span::before,
html body .sidebar-profile-card .site-state-item > span::after {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
  display: none !important;
}

/* Absolute final HBE pass: placed after the broad component overrides. */
html body.theme-force-dark .hbe.hbe-input,
html body.dark-mode .hbe.hbe-input,
html.dark-mode body .hbe.hbe-input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

html body.theme-force-dark .hbe.hbe-input-field,
html body.theme-force-dark .hbe.hbe-input-field-default,
html body.dark-mode .hbe.hbe-input-field,
html body.dark-mode .hbe.hbe-input-field-default,
html.dark-mode body .hbe.hbe-input-field,
html.dark-mode body .hbe.hbe-input-field-default {
  background: #1a1815 !important;
  border: 1px solid rgba(255, 250, 241, .24) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 250, 241, .05) !important;
  color: #fffaf1 !important;
  caret-color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body.theme-force-dark .hbe.hbe-input-label,
html body.theme-force-dark .hbe.hbe-input-label-default,
html body.dark-mode .hbe.hbe-input-label,
html body.dark-mode .hbe.hbe-input-label-default,
html.dark-mode body .hbe.hbe-input-label,
html.dark-mode body .hbe.hbe-input-label-default {
  background: transparent !important;
  border: 0 !important;
  color: #d7cfc2 !important;
  display: block !important;
  line-height: 1.5 !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  position: static !important;
}

html body.theme-force-dark .hbe.hbe-input-label-content,
html body.theme-force-dark .hbe.hbe-input-label-content-default,
html body.dark-mode .hbe.hbe-input-label-content,
html body.dark-mode .hbe.hbe-input-label-content-default,
html.dark-mode body .hbe.hbe-input-label-content,
html.dark-mode body .hbe.hbe-input-label-content-default {
  color: #d7cfc2 !important;
  -webkit-text-fill-color: #d7cfc2 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .hbe.hbe-input {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-field,
  html body:not(.theme-force-light) .hbe.hbe-input-field-default {
    background: #1a1815 !important;
    border: 1px solid rgba(255, 250, 241, .24) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 250, 241, .05) !important;
    color: #fffaf1 !important;
    caret-color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-label,
  html body:not(.theme-force-light) .hbe.hbe-input-label-default {
    background: transparent !important;
    border: 0 !important;
    color: #d7cfc2 !important;
    display: block !important;
    line-height: 1.5 !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    position: static !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-label-content,
  html body:not(.theme-force-light) .hbe.hbe-input-label-content-default {
    color: #d7cfc2 !important;
    -webkit-text-fill-color: #d7cfc2 !important;
  }
}

/* Keep the password field itself readable. The base HBE skin targets these
   exact classes, so the dark override deliberately mirrors that specificity. */
html body.theme-force-dark .hbe.hbe-input,
html body.dark-mode .hbe.hbe-input,
html.dark-mode body .hbe.hbe-input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

html body.theme-force-dark .hbe.hbe-input-field,
html body.theme-force-dark .hbe.hbe-input-field-default,
html body.dark-mode .hbe.hbe-input-field,
html body.dark-mode .hbe.hbe-input-field-default,
html.dark-mode body .hbe.hbe-input-field,
html.dark-mode body .hbe.hbe-input-field-default {
  background: #1a1815 !important;
  border: 1px solid rgba(255, 250, 241, .24) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 250, 241, .05) !important;
  color: #fffaf1 !important;
  caret-color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body.theme-force-dark .hbe.hbe-input-field:focus,
html body.theme-force-dark .hbe.hbe-input-field-default:focus,
html body.dark-mode .hbe.hbe-input-field:focus,
html body.dark-mode .hbe.hbe-input-field-default:focus,
html.dark-mode body .hbe.hbe-input-field:focus,
html.dark-mode body .hbe.hbe-input-field-default:focus {
  background: #1a1815 !important;
  border-color: #fffaf1 !important;
  box-shadow: 0 0 0 4px rgba(255, 250, 241, .10) !important;
}

html body.theme-force-dark .hbe.hbe-input-label,
html body.theme-force-dark .hbe.hbe-input-label-default,
html body.dark-mode .hbe.hbe-input-label,
html body.dark-mode .hbe.hbe-input-label-default,
html.dark-mode body .hbe.hbe-input-label,
html.dark-mode body .hbe.hbe-input-label-default {
  background: transparent !important;
  border: 0 !important;
  color: #d7cfc2 !important;
  display: block !important;
  line-height: 1.5 !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  position: static !important;
}

html body.theme-force-dark .hbe.hbe-input-label-content,
html body.theme-force-dark .hbe.hbe-input-label-content-default,
html body.dark-mode .hbe.hbe-input-label-content,
html body.dark-mode .hbe.hbe-input-label-content-default,
html.dark-mode body .hbe.hbe-input-label-content,
html.dark-mode body .hbe.hbe-input-label-content-default {
  color: #d7cfc2 !important;
  -webkit-text-fill-color: #d7cfc2 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .hbe.hbe-input {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-field,
  html body:not(.theme-force-light) .hbe.hbe-input-field-default {
    background: #1a1815 !important;
    border: 1px solid rgba(255, 250, 241, .24) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 250, 241, .05) !important;
    color: #fffaf1 !important;
    caret-color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-field:focus,
  html body:not(.theme-force-light) .hbe.hbe-input-field-default:focus {
    background: #1a1815 !important;
    border-color: #fffaf1 !important;
    box-shadow: 0 0 0 4px rgba(255, 250, 241, .10) !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-label,
  html body:not(.theme-force-light) .hbe.hbe-input-label-default {
    background: transparent !important;
    border: 0 !important;
    color: #d7cfc2 !important;
    display: block !important;
    line-height: 1.5 !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    position: static !important;
  }

  html body:not(.theme-force-light) .hbe.hbe-input-label-content,
  html body:not(.theme-force-light) .hbe.hbe-input-label-content-default {
    color: #d7cfc2 !important;
    -webkit-text-fill-color: #d7cfc2 !important;
  }
}

/* Final override for the books category selector. */
html body:is(.theme-force-dark, .dark-mode) .main-category-selector,
html.dark-mode body .main-category-selector {
  background: rgba(255, 250, 241, .10) !important;
  border: 1px solid rgba(255, 250, 241, .20) !important;
  border-radius: 50px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .main-category-selector *,
html.dark-mode body .main-category-selector * {
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .sub-category-dropdown,
html.dark-mode body .sub-category-dropdown {
  background: #27231f !important;
  border: 1px solid rgba(255, 250, 241, .14) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
  padding: 8px 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option),
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option) {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 250, 241, .10) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option):last-child,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option):last-child {
  border-bottom: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option):hover,
html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option).active,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option):hover,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option).active {
  background: rgba(255, 250, 241, .12) !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .main-category-option::after,
html.dark-mode body .main-category-option::after {
  color: #fffaf1 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .main-category-selector {
    background: rgba(255, 250, 241, .10) !important;
    border: 1px solid rgba(255, 250, 241, .20) !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .main-category-selector * {
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .sub-category-dropdown {
    background: #27231f !important;
    border: 1px solid rgba(255, 250, 241, .14) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
    padding: 8px 0 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option) {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 250, 241, .10) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option):last-child {
    border-bottom: 0 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option):hover,
  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option).active {
    background: rgba(255, 250, 241, .12) !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .main-category-option::after {
    color: #fffaf1 !important;
  }
}

/* 2026-07-31: centered desktop navigation and icon-only utility controls. */
@media (min-width: 981px) {
  html body .container .header .header-inner {
    display: grid !important;
    gap: 18px !important;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) !important;
  }

  html body .site-brand-container {
    justify-self: start !important;
    min-width: 0 !important;
  }

  html body .header-inner .site-nav {
    flex: none !important;
    justify-content: center !important;
    justify-self: center !important;
    margin: 0 !important;
    max-width: calc(100vw - 420px) !important;
    min-width: 0 !important;
    width: max-content !important;
  }

  html body .header-inner .main-menu {
    justify-content: center !important;
    margin: 0 !important;
    width: max-content !important;
  }
}

html body .site-nav-tools {
  align-items: center !important;
  display: flex !important;
  gap: 6px !important;
  justify-self: end !important;
}

html body .site-nav-tool {
  align-items: center !important;
  appearance: none !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  color: #202938 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  flex: 0 0 38px !important;
  font-size: .95rem !important;
  height: 38px !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease !important;
  width: 38px !important;
}

html body .site-nav-tool:is(:hover, :focus-visible) {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  outline: 0 !important;
  transform: translateY(-1px) !important;
}

html body .site-nav-tool i {
  color: currentColor !important;
  line-height: 1 !important;
  margin: 0 !important;
}

@media (max-width: 980px) {
  html body .header-inner {
    position: relative !important;
  }

  html body .site-brand-container {
    box-sizing: border-box !important;
    padding-right: 92px !important;
  }

  html body .site-nav-tools {
    position: absolute !important;
    right: 12px !important;
    top: 10px !important;
    z-index: 4 !important;
  }

  html body .site-nav-tool {
    flex-basis: 34px !important;
    height: 34px !important;
    width: 34px !important;
  }
}

html body.theme-force-dark .site-nav-tool,
html body.dark-mode .site-nav-tool,
html.dark-mode body .site-nav-tool {
  color: #f4efe6 !important;
}

html body.theme-force-dark .site-nav-tool:is(:hover, :focus-visible),
html body.dark-mode .site-nav-tool:is(:hover, :focus-visible),
html.dark-mode body .site-nav-tool:is(:hover, :focus-visible) {
  background: #f4efe6 !important;
  border-color: #f4efe6 !important;
  color: #111 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .site-nav-tool {
    color: #f4efe6 !important;
  }

  html body:not(.theme-force-light) .site-nav-tool:is(:hover, :focus-visible) {
    background: #f4efe6 !important;
    border-color: #f4efe6 !important;
    color: #111 !important;
  }
}

/* Keep dark code tables flush with their full-width window. */
html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight,
html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight table,
html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight tbody,
html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight tr,
html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight td,
html.dark-mode body .post-body figure.highlight,
html.dark-mode body .post-body figure.highlight table,
html.dark-mode body .post-body figure.highlight tbody,
html.dark-mode body .post-body figure.highlight tr,
html.dark-mode body .post-body figure.highlight td {
  background: #171615 !important;
  background-image: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight,
html.dark-mode body .post-body figure.highlight {
  box-sizing: border-box !important;
  overflow: hidden !important;
  width: 100% !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight table,
html.dark-mode body .post-body figure.highlight table {
  table-layout: auto !important;
  width: 100% !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight td.code,
html.dark-mode body .post-body figure.highlight td.code {
  min-width: 0 !important;
  width: 100% !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight td.gutter,
html.dark-mode body .post-body figure.highlight td.gutter {
  width: 1% !important;
  white-space: nowrap !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight pre,
html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight code,
html.dark-mode body .post-body figure.highlight pre,
html.dark-mode body .post-body figure.highlight code {
  background: #171615 !important;
  color: #f3efe9 !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight .gutter pre,
html.dark-mode body .post-body figure.highlight .gutter pre {
  background: #211f1c !important;
  color: #aaa196 !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight::before,
html.dark-mode body .post-body figure.highlight::before {
  background: #2b2926 !important;
  border-bottom-color: rgba(255, 248, 234, .1) !important;
}

html body:is(.theme-force-dark, .dark-mode) .post-body figure.highlight :is(.code_copy, .code-expand, .code_lang),
html.dark-mode body .post-body figure.highlight :is(.code_copy, .code-expand, .code_lang) {
  color: #d4cbc0 !important;
  -webkit-text-fill-color: #d4cbc0 !important;
}

/* One scroll owner prevents long dark TOCs from being clipped. */
html body:is(.theme-force-dark, .dark-mode) .sidebar:has(.post-toc-wrap) .post-toc-wrap,
html.dark-mode body .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar:has(.post-toc-wrap) .post-toc,
html.dark-mode body .sidebar:has(.post-toc-wrap) .post-toc {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding-bottom: 16px !important;
  scroll-padding-block: 12px 20px !important;
  scrollbar-width: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar:has(.post-toc-wrap) .post-toc > .nav,
html.dark-mode body .sidebar:has(.post-toc-wrap) .post-toc > .nav {
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 8px !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar:has(.post-toc-wrap) .post-toc::-webkit-scrollbar,
html.dark-mode body .sidebar:has(.post-toc-wrap) .post-toc::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .post-body figure.highlight,
  html body:not(.theme-force-light) .post-body figure.highlight table,
  html body:not(.theme-force-light) .post-body figure.highlight tbody,
  html body:not(.theme-force-light) .post-body figure.highlight tr,
  html body:not(.theme-force-light) .post-body figure.highlight td {
    background: #171615 !important;
    background-image: none !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight {
    box-sizing: border-box !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight table {
    table-layout: auto !important;
    width: 100% !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight td.code {
    min-width: 0 !important;
    width: 100% !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight td.gutter {
    width: 1% !important;
    white-space: nowrap !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight pre,
  html body:not(.theme-force-light) .post-body figure.highlight code {
    background: #171615 !important;
    color: #f3efe9 !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight .gutter pre {
    background: #211f1c !important;
    color: #aaa196 !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight::before {
    background: #2b2926 !important;
    border-bottom-color: rgba(255, 248, 234, .1) !important;
  }

  html body:not(.theme-force-light) .post-body figure.highlight :is(.code_copy, .code-expand, .code_lang) {
    color: #d4cbc0 !important;
    -webkit-text-fill-color: #d4cbc0 !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc-wrap {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding-bottom: 16px !important;
    scroll-padding-block: 12px 20px !important;
    scrollbar-width: none !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc > .nav {
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 8px !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
  }
}

/* Keep article lists neutral in dark mode instead of inheriting the link blue. */
html body.theme-force-dark .post-body :is(ol, ul, li),
html body.dark-mode .post-body :is(ol, ul, li),
html.dark-mode body .post-body :is(ol, ul, li) {
  color: var(--kylo-dark-muted, #d7cfc2) !important;
  -webkit-text-fill-color: var(--kylo-dark-muted, #d7cfc2) !important;
}

html body.theme-force-dark .post-body li::marker,
html body.dark-mode .post-body li::marker,
html.dark-mode body .post-body li::marker {
  color: #a9a195 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .post-body :is(ol, ul, li) {
    color: var(--kylo-dark-muted, #d7cfc2) !important;
    -webkit-text-fill-color: var(--kylo-dark-muted, #d7cfc2) !important;
  }

  html body:not(.theme-force-light) .post-body li::marker {
    color: #a9a195 !important;
  }
}

/* Keep dark TOC top spacing identical to the repaired light TOC. */
html body.theme-force-dark .sidebar:has(.post-toc-wrap) {
  max-height: calc(100vh - 28px) !important;
  top: 14px !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
  max-height: calc(100vh - 28px) !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  max-height: calc(100vh - 90px) !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc .nav {
  max-height: calc(100vh - 118px) !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) {
    max-height: calc(100vh - 28px) !important;
    top: 14px !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
    max-height: calc(100vh - 28px) !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc-wrap {
    max-height: calc(100vh - 90px) !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc .nav {
    max-height: calc(100vh - 118px) !important;
  }
}

/* Final dark cleanup: keep one background layer and remove hard inner blocks. */
html body.theme-force-dark {
  background-color: #151411 !important;
  background-image: none !important;
}

html body.theme-force-dark :is(.container, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container),
html body.theme-force-dark :is(.container, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::before,
html body.theme-force-dark :is(.container, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body.theme-force-dark canvas.fireworks,
html body.theme-force-dark #canvas-nest,
html body.theme-force-dark .canvas-nest {
  inset: 0 !important;
  opacity: .9 !important;
  pointer-events: none !important;
  position: fixed !important;
  z-index: 0 !important;
}

html body.theme-force-dark .container {
  position: relative !important;
  z-index: 1 !important;
}

html body.theme-force-dark .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span),
html body.theme-force-dark .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span)::before,
html body.theme-force-dark .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span)::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body.theme-force-dark .sidebar-profile-card .site-state-wrap {
  margin-top: 8px !important;
  padding-top: 8px !important;
}

html body.theme-force-dark .sidebar-profile-card .site-state {
  gap: 10px !important;
  overflow: visible !important;
}

html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-card.card,
html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-card {
  background: rgba(31, 29, 26, .82) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .1) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28) !important;
  overflow: hidden !important;
}

html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-card::before,
html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-card::after,
html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-buttons::before,
html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-buttons::after {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
  display: none !important;
}

html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-buttons {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  min-height: 0 !important;
  outline: 0 !important;
  padding: 10px 8px 12px !important;
  width: 100% !important;
}

html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-buttons .btn {
  background: rgba(255, 248, 234, .08) !important;
  border: 1px solid rgba(255, 248, 234, .18) !important;
  box-shadow: none !important;
  color: #f4efe7 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #f4efe7 !important;
}

html body.theme-force-dark :is(.movies-container, .movies-wrapper) .movie-buttons .btn:is(:hover, :focus-visible) {
  background: #fff8ea !important;
  border-color: #fff8ea !important;
  color: #111 !important;
  transform: translateY(-1px) !important;
  -webkit-text-fill-color: #111 !important;
}

html body.theme-force-dark :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption),
html body.theme-force-dark :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::before,
html body.theme-force-dark :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body.theme-force-dark :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-frame {
  border-radius: 18px !important;
  overflow: hidden !important;
  padding: 0 !important;
}

html body.theme-force-dark :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-image {
  background: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
  display: block !important;
}

html body.theme-force-dark :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-caption {
  color: #f4efe7 !important;
  line-height: 1.45 !important;
  margin: 10px 0 0 !important;
  padding: 0 4px !important;
  -webkit-text-fill-color: #f4efe7 !important;
}

html body.theme-force-dark :is(.diary-wrapper, .diary-container) .diary-card,
html body.theme-force-dark :is(.diary-wrapper, .diary-container) .diary-card::before,
html body.theme-force-dark :is(.diary-wrapper, .diary-container) .diary-card::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body.theme-force-dark :is(.diary-wrapper, .diary-container) .diary-content {
  background: rgba(31, 29, 26, .9) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28) !important;
  outline: 0 !important;
  overflow: hidden !important;
}

html body.theme-force-dark :is(.diary-wrapper, .diary-container) .diary-content::after {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
  display: none !important;
}

html body.theme-force-dark :is(.diary-wrapper, .diary-container) .diary-card:hover .diary-content {
  box-shadow: 0 20px 48px rgba(0, 0, 0, .36) !important;
  transform: translateY(-8px) !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) {
  max-height: calc(100vh - 16px) !important;
  top: 8px !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
  max-height: calc(100vh - 16px) !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  max-height: calc(100vh - 78px) !important;
}

html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc,
html body.theme-force-dark .sidebar:has(.post-toc-wrap) .post-toc .nav {
  max-height: calc(100vh - 106px) !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) {
    background-color: #151411 !important;
    background-image: none !important;
  }

  html body:not(.theme-force-light) :is(.container, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container),
  html body:not(.theme-force-light) :is(.container, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::before,
  html body:not(.theme-force-light) :is(.container, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) canvas.fireworks,
  html body:not(.theme-force-light) #canvas-nest,
  html body:not(.theme-force-light) .canvas-nest {
    inset: 0 !important;
    opacity: .9 !important;
    pointer-events: none !important;
    position: fixed !important;
    z-index: 0 !important;
  }

  html body:not(.theme-force-light) .container {
    position: relative !important;
    z-index: 1 !important;
  }

  html body:not(.theme-force-light) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span),
  html body:not(.theme-force-light) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span)::before,
  html body:not(.theme-force-light) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span)::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-card.card,
  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-card {
    background: rgba(31, 29, 26, .82) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .1) !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28) !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-card::before,
  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-card::after,
  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-buttons::before,
  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-buttons::after {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    content: none !important;
    display: none !important;
  }

  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-buttons {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    min-height: 0 !important;
    outline: 0 !important;
    padding: 10px 8px 12px !important;
    width: 100% !important;
  }

  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-buttons .btn {
    background: rgba(255, 248, 234, .08) !important;
    border: 1px solid rgba(255, 248, 234, .18) !important;
    box-shadow: none !important;
    color: #f4efe7 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #f4efe7 !important;
  }

  html body:not(.theme-force-light) :is(.movies-container, .movies-wrapper) .movie-buttons .btn:is(:hover, :focus-visible) {
    background: #fff8ea !important;
    border-color: #fff8ea !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
  }

  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption),
  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::before,
  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-frame {
    border-radius: 18px !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-image {
    background: transparent !important;
    border: 0 !important;
    border-radius: inherit !important;
    box-shadow: none !important;
    display: block !important;
  }

  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-caption {
    color: #f4efe7 !important;
    line-height: 1.45 !important;
    margin: 10px 0 0 !important;
    padding: 0 4px !important;
    -webkit-text-fill-color: #f4efe7 !important;
  }

  html body:not(.theme-force-light) :is(.diary-wrapper, .diary-container) .diary-card,
  html body:not(.theme-force-light) :is(.diary-wrapper, .diary-container) .diary-card::before,
  html body:not(.theme-force-light) :is(.diary-wrapper, .diary-container) .diary-card::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) :is(.diary-wrapper, .diary-container) .diary-content {
    background: rgba(31, 29, 26, .9) !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .28) !important;
    outline: 0 !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) :is(.diary-wrapper, .diary-container) .diary-content::after {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    content: none !important;
    display: none !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) {
    max-height: calc(100vh - 16px) !important;
    top: 8px !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
    max-height: calc(100vh - 16px) !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc-wrap {
    max-height: calc(100vh - 78px) !important;
  }

  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc,
  html body:not(.theme-force-light) .sidebar:has(.post-toc-wrap) .post-toc .nav {
    max-height: calc(100vh - 106px) !important;
  }
}

/* Hard lock for the real Three.js line background and legacy dark-mode entry. */
html body > #kylo-canvas-lines,
html body > .kylo-canvas-lines,
html body > div[style*="z-index: -1"]:has(canvas),
html body > div[style*="opacity: 0.5"]:has(canvas) {
  background: transparent !important;
  display: block !important;
  height: 100vh !important;
  inset: 0 !important;
  opacity: .52 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: fixed !important;
  visibility: visible !important;
  width: 100vw !important;
  z-index: 0 !important;
}

html body > #kylo-canvas-lines canvas,
html body > .kylo-canvas-lines canvas,
html body > div[style*="z-index: -1"]:has(canvas) canvas,
html body > div[style*="opacity: 0.5"]:has(canvas) canvas {
  background: transparent !important;
  display: block !important;
  height: 100vh !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100vw !important;
}

html body:is(.theme-force-dark, .dark-mode),
html.dark-mode body {
  background-color: #151411 !important;
  background-image: none !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.container, .headband, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container),
html body:is(.theme-force-dark, .dark-mode) :is(.container, .headband, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::before,
html body:is(.theme-force-dark, .dark-mode) :is(.container, .headband, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::after,
html.dark-mode body :is(.container, .headband, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container),
html.dark-mode body :is(.container, .headband, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::before,
html.dark-mode body :is(.container, .headband, .main, .main-inner, .content-wrap, .content, .content.index, .album-page-shell, .album-container, .album-wrapper, .gallery-container, .gallery-wrapper, .books-container, .books-wrapper, .movies-container, .movies-wrapper, .movies-front, .movies-friends, .diary-wrapper, .diary-container, .bake-container, .games-container, .lab-container, .categories-container)::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) .container,
html.dark-mode body .container {
  position: relative !important;
  z-index: 1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name),
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name)::before,
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name)::after,
html.dark-mode body .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name),
html.dark-mode body .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name)::before,
html.dark-mode body .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name)::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state,
html.dark-mode body .sidebar-profile-card .site-state {
  display: grid !important;
  gap: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  overflow: visible !important;
  width: 100% !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state-item a,
html.dark-mode body .sidebar-profile-card .site-state-item a {
  align-items: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.search-pop-overlay, .local-search-pop-overlay).search-active,
html.dark-mode body :is(.search-pop-overlay, .local-search-pop-overlay).search-active {
  background: rgba(7, 7, 6, .56) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.popup.search-popup, .search-popup),
html.dark-mode body :is(.popup.search-popup, .search-popup) {
  background: rgba(31, 29, 26, .98) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .14) !important;
  border-radius: 26px !important;
  box-shadow: 0 28px 78px rgba(0, 0, 0, .52) !important;
  color: #f4efe7 !important;
  overflow: hidden !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-header,
html.dark-mode body .search-header {
  background: transparent !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(255, 248, 234, .12) !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.search-icon, .search-icon *, .popup-btn-close, .popup-btn-close *),
html.dark-mode body :is(.search-icon, .search-icon *, .popup-btn-close, .popup-btn-close *) {
  color: #d8d0c3 !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: #d8d0c3 !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-input-container,
html.dark-mode body .search-input-container {
  background: rgba(255, 248, 234, .07) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .16) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(input.search-input, .search-popup input.search-input),
html.dark-mode body :is(input.search-input, .search-popup input.search-input) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #f4efe7 !important;
  outline: 0 !important;
  -webkit-text-fill-color: #f4efe7 !important;
}

html body:is(.theme-force-dark, .dark-mode) #search-result,
html.dark-mode body #search-result {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow-x: hidden !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-result-list,
html.dark-mode body .search-result-list {
  display: grid !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-result-list li,
html.dark-mode body .search-result-list li {
  background: rgba(255, 248, 234, .07) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .13) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  color: #f4efe7 !important;
  list-style: none !important;
  overflow: hidden !important;
  padding: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-result-list li::before,
html body:is(.theme-force-dark, .dark-mode) .search-result-list li::after,
html body:is(.theme-force-dark, .dark-mode) .search-result-list li > a::before,
html body:is(.theme-force-dark, .dark-mode) .search-result-list li > a::after,
html body:is(.theme-force-dark, .dark-mode) .search-result-title::before,
html body:is(.theme-force-dark, .dark-mode) .search-result-title::after,
html body:is(.theme-force-dark, .dark-mode) .search-result::before,
html body:is(.theme-force-dark, .dark-mode) .search-result::after,
html.dark-mode body .search-result-list li::before,
html.dark-mode body .search-result-list li::after,
html.dark-mode body .search-result-list li > a::before,
html.dark-mode body .search-result-list li > a::after,
html.dark-mode body .search-result-title::before,
html.dark-mode body .search-result-title::after,
html.dark-mode body .search-result::before,
html.dark-mode body .search-result::after {
  content: none !important;
  display: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-result-list li > a,
html.dark-mode body .search-result-list li > a {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  display: block !important;
  overflow: visible !important;
  padding: 0 16px 12px !important;
  text-decoration: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .search-result-list li > a.search-result-title,
html.dark-mode body .search-result-list li > a.search-result-title {
  padding: 13px 16px 7px !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.search-result-title, a.search-result-title),
html.dark-mode body :is(.search-result-title, a.search-result-title) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff8ea !important;
  display: block !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #fff8ea !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.search-result, p.search-result),
html.dark-mode body :is(.search-result, p.search-result) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: rgba(244, 239, 231, .82) !important;
  line-height: 1.65 !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  -webkit-text-fill-color: rgba(244, 239, 231, .82) !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption),
html body:is(.theme-force-dark, .dark-mode) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::before,
html body:is(.theme-force-dark, .dark-mode) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::after,
html.dark-mode body :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption),
html.dark-mode body :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::before,
html.dark-mode body :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-caption,
html.dark-mode body :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-caption {
  color: #f4efe7 !important;
  display: block !important;
  line-height: 1.45 !important;
  margin: 10px 0 0 !important;
  padding: 0 4px !important;
  text-align: center !important;
  -webkit-text-fill-color: #f4efe7 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) {
    background-color: #151411 !important;
    background-image: none !important;
  }

  html body:not(.theme-force-light) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name),
  html body:not(.theme-force-light) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name)::before,
  html body:not(.theme-force-light) .sidebar-profile-card :is(.site-state-wrap, .site-state, .site-state-item, .site-state-item a, .site-state-item span, .site-state-item-count, .site-state-item-name)::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) .sidebar-profile-card .site-state {
    display: grid !important;
    gap: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    overflow: visible !important;
    width: 100% !important;
  }

  html body:not(.theme-force-light) :is(.search-pop-overlay, .local-search-pop-overlay).search-active {
    background: rgba(7, 7, 6, .56) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  html body:not(.theme-force-light) :is(.popup.search-popup, .search-popup) {
    background: rgba(31, 29, 26, .98) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .14) !important;
    border-radius: 26px !important;
    box-shadow: 0 28px 78px rgba(0, 0, 0, .52) !important;
    color: #f4efe7 !important;
    overflow: hidden !important;
  }

  html body:not(.theme-force-light) .search-header {
    background: transparent !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(255, 248, 234, .12) !important;
  }

  html body:not(.theme-force-light) :is(.search-icon, .search-icon *, .popup-btn-close, .popup-btn-close *) {
    color: #d8d0c3 !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    -webkit-text-fill-color: #d8d0c3 !important;
  }

  html body:not(.theme-force-light) .search-input-container {
    background: rgba(255, 248, 234, .07) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .16) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) :is(input.search-input, .search-popup input.search-input) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #f4efe7 !important;
    outline: 0 !important;
    -webkit-text-fill-color: #f4efe7 !important;
  }

  html body:not(.theme-force-light) .search-result-list {
    display: grid !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body:not(.theme-force-light) .search-result-list li {
    background: rgba(255, 248, 234, .07) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .13) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    color: #f4efe7 !important;
    list-style: none !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  html body:not(.theme-force-light) .search-result-list li::before,
  html body:not(.theme-force-light) .search-result-list li::after,
  html body:not(.theme-force-light) .search-result-list li > a::before,
  html body:not(.theme-force-light) .search-result-list li > a::after,
  html body:not(.theme-force-light) .search-result-title::before,
  html body:not(.theme-force-light) .search-result-title::after,
  html body:not(.theme-force-light) .search-result::before,
  html body:not(.theme-force-light) .search-result::after {
    content: none !important;
    display: none !important;
  }

  html body:not(.theme-force-light) .search-result-list li > a {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    display: block !important;
    overflow: visible !important;
    padding: 0 16px 12px !important;
    text-decoration: none !important;
  }

  html body:not(.theme-force-light) .search-result-list li > a.search-result-title {
    padding: 13px 16px 7px !important;
  }

  html body:not(.theme-force-light) :is(.search-result-title, a.search-result-title) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff8ea !important;
    display: block !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    text-decoration: none !important;
    -webkit-text-fill-color: #fff8ea !important;
  }

  html body:not(.theme-force-light) :is(.search-result, p.search-result) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: rgba(244, 239, 231, .82) !important;
    line-height: 1.65 !important;
    margin: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    -webkit-text-fill-color: rgba(244, 239, 231, .82) !important;
  }

  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption),
  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::before,
  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) :is(.photo-wall, .photo-item, .photo-frame, .photo-caption)::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html body:not(.theme-force-light) :is(.album-wrapper, .album-container, .gallery-wrapper, .gallery-container) .photo-caption {
    color: #f4efe7 !important;
    display: block !important;
    line-height: 1.45 !important;
    margin: 10px 0 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    -webkit-text-fill-color: #f4efe7 !important;
  }
}

/* 2026-07-12: final dark surface cleanup. Keep this block at the real EOF. */
html.dark-mode,
html:has(body.theme-force-dark),
html:has(body.dark-mode) {
  background: #151411 !important;
  background-image: none !important;
}

html body:is(.theme-force-dark, .dark-mode),
html.dark-mode body {
  background: #151411 !important;
  background-image: none !important;
  min-height: 100vh !important;
}

html body:is(.theme-force-dark, .dark-mode) > #kylo-canvas-lines,
html body:is(.theme-force-dark, .dark-mode) > .kylo-canvas-lines,
html.dark-mode body > #kylo-canvas-lines,
html.dark-mode body > .kylo-canvas-lines,
html body:is(.theme-force-dark, .dark-mode) > #kylo-canvas-lines canvas,
html body:is(.theme-force-dark, .dark-mode) > .kylo-canvas-lines canvas,
html.dark-mode body > #kylo-canvas-lines canvas,
html.dark-mode body > .kylo-canvas-lines canvas {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.container, .main, .main-inner, .content-wrap, .content, .sidebar, .sidebar-inner, .site-overview-wrap),
html.dark-mode body :is(.container, .main, .main-inner, .content-wrap, .content, .sidebar, .sidebar-inner, .site-overview-wrap) {
  background-color: transparent !important;
  background-image: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state-wrap,
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state-wrap > .site-state,
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state > .site-state-item,
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state > .site-state-item > a,
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state > .site-state-item > span,
html body:is(.theme-force-dark, .dark-mode) .sidebar-profile-card .site-state > .site-state-item > a > span,
html.dark-mode body .sidebar-profile-card .site-state-wrap,
html.dark-mode body .sidebar-profile-card .site-state-wrap > .site-state,
html.dark-mode body .sidebar-profile-card .site-state > .site-state-item,
html.dark-mode body .sidebar-profile-card .site-state > .site-state-item > a,
html.dark-mode body .sidebar-profile-card .site-state > .site-state-item > span,
html.dark-mode body .sidebar-profile-card .site-state > .site-state-item > a > span {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .album-wrapper .photo-item > .photo-caption,
html body:is(.theme-force-dark, .dark-mode) .album-container .photo-item > .photo-caption,
html.dark-mode body .album-wrapper .photo-item > .photo-caption,
html.dark-mode body .album-container .photo-item > .photo-caption {
  align-self: center !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  display: inline-block !important;
  filter: none !important;
  margin: 10px auto 0 !important;
  max-width: 100% !important;
  outline: 0 !important;
  padding: 0 4px !important;
  width: auto !important;
}

@media (prefers-color-scheme: dark) {
  html:has(body:not(.theme-force-light)) {
    background: #151411 !important;
    background-image: none !important;
  }

  html body:not(.theme-force-light),
  html body:not(.theme-force-light) :is(.container, .main, .main-inner, .content-wrap, .content, .sidebar, .sidebar-inner, .site-overview-wrap) {
    background-image: none !important;
  }

  html body:not(.theme-force-light) .sidebar-profile-card .site-state-wrap,
  html body:not(.theme-force-light) .sidebar-profile-card .site-state-wrap > .site-state,
  html body:not(.theme-force-light) .sidebar-profile-card .site-state > .site-state-item,
  html body:not(.theme-force-light) .sidebar-profile-card .site-state > .site-state-item > a,
  html body:not(.theme-force-light) .sidebar-profile-card .site-state > .site-state-item > span,
  html body:not(.theme-force-light) .sidebar-profile-card .site-state > .site-state-item > a > span {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  html body:not(.theme-force-light) .album-wrapper .photo-item > .photo-caption,
  html body:not(.theme-force-light) .album-container .photo-item > .photo-caption {
    align-self: center !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    display: inline-block !important;
    margin: 10px auto 0 !important;
    padding: 0 4px !important;
    width: auto !important;
  }
}

/* Absolute EOF: profile counters belong directly to the profile card. */
/* 2026-07-14: dark pagination, diary jump, and comments refinement. */
html body.theme-force-dark .pagination span.space,
html body.dark-mode .pagination span.space,
html.dark-mode body .pagination span.space {
  align-items: center !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #d7cfc2 !important;
  display: inline-flex !important;
  height: auto !important;
  justify-content: center !important;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 5px !important;
  width: auto !important;
  -webkit-text-fill-color: #d7cfc2 !important;
}

html body.theme-force-dark .page-jump-container,
html body.dark-mode .page-jump-container,
html.dark-mode body .page-jump-container {
  background: #1f1d1a !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .13) !important;
  box-shadow: none !important;
}

html body.theme-force-dark .page-jump-label,
html body.dark-mode .page-jump-label,
html.dark-mode body .page-jump-label {
  color: #f4efe6 !important;
  -webkit-text-fill-color: #f4efe6 !important;
}

html body.theme-force-dark :is(.page-selector-wrapper, .selector-arrow),
html body.dark-mode :is(.page-selector-wrapper, .selector-arrow),
html.dark-mode body :is(.page-selector-wrapper, .selector-arrow) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #d7cfc2 !important;
}

html body.theme-force-dark .page-selector,
html body.dark-mode .page-selector,
html.dark-mode body .page-selector {
  background: #292621 !important;
  background-image: none !important;
  border: 1px solid rgba(255, 248, 234, .16) !important;
  box-shadow: none !important;
  color: #f4efe6 !important;
  -webkit-text-fill-color: #f4efe6 !important;
}

html body.theme-force-dark .page-selector option,
html body.dark-mode .page-selector option,
html.dark-mode body .page-selector option {
  background: #1f1d1a !important;
  color: #f4efe6 !important;
}

html body.theme-force-dark .page-selector:is(:hover, :focus-visible),
html body.dark-mode .page-selector:is(:hover, :focus-visible),
html.dark-mode body .page-selector:is(:hover, :focus-visible) {
  background: #fff8ea !important;
  border-color: #fff8ea !important;
  color: #111 !important;
  outline: 0 !important;
  -webkit-text-fill-color: #111 !important;
}

html body.theme-force-dark .comments.giscus-comments,
html body.dark-mode .comments.giscus-comments,
html.dark-mode body .comments.giscus-comments {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-top: 30px !important;
  overflow: visible !important;
  padding: 0 !important;
}

html body.theme-force-dark .comments.giscus-comments :is(.giscus, iframe.giscus-frame),
html body.dark-mode .comments.giscus-comments :is(.giscus, iframe.giscus-frame),
html.dark-mode body .comments.giscus-comments :is(.giscus, iframe.giscus-frame) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color-scheme: dark !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .pagination span.space {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #d7cfc2 !important;
    height: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 5px !important;
    width: auto !important;
    -webkit-text-fill-color: #d7cfc2 !important;
  }

  html body:not(.theme-force-light) .page-jump-container {
    background: #1f1d1a !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .13) !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) .page-jump-label {
    color: #f4efe6 !important;
    -webkit-text-fill-color: #f4efe6 !important;
  }

  html body:not(.theme-force-light) :is(.page-selector-wrapper, .selector-arrow) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #d7cfc2 !important;
  }

  html body:not(.theme-force-light) .page-selector {
    background: #292621 !important;
    background-image: none !important;
    border: 1px solid rgba(255, 248, 234, .16) !important;
    box-shadow: none !important;
    color: #f4efe6 !important;
    -webkit-text-fill-color: #f4efe6 !important;
  }

  html body:not(.theme-force-light) .page-selector option {
    background: #1f1d1a !important;
    color: #f4efe6 !important;
  }

  html body:not(.theme-force-light) .page-selector:is(:hover, :focus-visible) {
    background: #fff8ea !important;
    border-color: #fff8ea !important;
    color: #111 !important;
    outline: 0 !important;
    -webkit-text-fill-color: #111 !important;
  }

  html body:not(.theme-force-light) .comments.giscus-comments {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-top: 30px !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  html body:not(.theme-force-light) .comments.giscus-comments :is(.giscus, iframe.giscus-frame) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color-scheme: dark !important;
  }
}

/* 2026-07-14: remove remaining blue accents from dark categories and search states. */
html body.theme-force-dark .categories-container :is(.stat-number, .category-card-title),
html body.dark-mode .categories-container :is(.stat-number, .category-card-title),
html.dark-mode body .categories-container :is(.stat-number, .category-card-title) {
  color: #f4efe6 !important;
  -webkit-text-fill-color: #f4efe6 !important;
}

html body.theme-force-dark .categories-container :is(.stat-label, .category-card-description, .category-card-description *),
html body.dark-mode .categories-container :is(.stat-label, .category-card-description, .category-card-description *),
html.dark-mode body .categories-container :is(.stat-label, .category-card-description, .category-card-description *) {
  color: #cfc5b8 !important;
  -webkit-text-fill-color: #cfc5b8 !important;
}

html body.theme-force-dark .categories-container :is(.tag-item, .post-count),
html body.dark-mode .categories-container :is(.tag-item, .post-count),
html.dark-mode body .categories-container :is(.tag-item, .post-count) {
  background: #292621 !important;
  background-image: none !important;
  border-color: rgba(255, 248, 234, .14) !important;
  box-shadow: none !important;
  color: #e7dfd2 !important;
  -webkit-text-fill-color: #e7dfd2 !important;
}

html body.theme-force-dark .categories-container :is(.tag-item, .post-count):is(:hover, :focus-visible),
html body.dark-mode .categories-container :is(.tag-item, .post-count):is(:hover, :focus-visible),
html.dark-mode body .categories-container :is(.tag-item, .post-count):is(:hover, :focus-visible) {
  background: #fff8ea !important;
  border-color: #fff8ea !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

html body.theme-force-dark #no-result,
html body.dark-mode #no-result,
html.dark-mode body #no-result,
html body.theme-force-dark #no-result :is(i, .fa, .fas, .far, .search-status),
html body.dark-mode #no-result :is(i, .fa, .fas, .far, .search-status),
html.dark-mode body #no-result :is(i, .fa, .fas, .far, .search-status) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #d8d0c3 !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #d8d0c3 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .categories-container :is(.stat-number, .category-card-title) {
    color: #f4efe6 !important;
    -webkit-text-fill-color: #f4efe6 !important;
  }

  html body:not(.theme-force-light) .categories-container :is(.stat-label, .category-card-description, .category-card-description *) {
    color: #cfc5b8 !important;
    -webkit-text-fill-color: #cfc5b8 !important;
  }

  html body:not(.theme-force-light) .categories-container :is(.tag-item, .post-count) {
    background: #292621 !important;
    background-image: none !important;
    border-color: rgba(255, 248, 234, .14) !important;
    box-shadow: none !important;
    color: #e7dfd2 !important;
    -webkit-text-fill-color: #e7dfd2 !important;
  }

  html body:not(.theme-force-light) .categories-container :is(.tag-item, .post-count):is(:hover, :focus-visible) {
    background: #fff8ea !important;
    border-color: #fff8ea !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
  }

  html body:not(.theme-force-light) #no-result,
  html body:not(.theme-force-light) #no-result :is(i, .fa, .fas, .far, .search-status) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #d8d0c3 !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #d8d0c3 !important;
  }
}

/* Lock the card and counters to one rendered dark color, including forced browser dark mode. */
html body.theme-force-dark .sidebar-profile-card,
html body.dark-mode .sidebar-profile-card,
html.dark-mode body .sidebar-profile-card,
html body.theme-force-dark .sidebar-profile-card .site-state,
html body.dark-mode .sidebar-profile-card .site-state,
html.dark-mode body .sidebar-profile-card .site-state {
  background: #1f1d1a !important;
  background-color: #1f1d1a !important;
  background-image: none !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .sidebar-profile-card,
  html body:not(.theme-force-light) .sidebar-profile-card .site-state {
    background: #1f1d1a !important;
    background-color: #1f1d1a !important;
    background-image: none !important;
  }
}

/* Final books selector override, placed after all generic dark controls. */
html body:is(.theme-force-dark, .dark-mode) .main-category-selector,
html.dark-mode body .main-category-selector {
  background: rgba(255, 250, 241, .10) !important;
  border: 1px solid rgba(255, 250, 241, .20) !important;
  border-radius: 50px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .main-category-selector *,
html.dark-mode body .main-category-selector * {
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .sub-category-dropdown,
html.dark-mode body .sub-category-dropdown {
  background: #27231f !important;
  border: 1px solid rgba(255, 250, 241, .14) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
  padding: 8px 0 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option),
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option) {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 250, 241, .10) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option):hover,
html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option).active,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option):hover,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option).active {
  background: rgba(255, 250, 241, .12) !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) .main-category-option::after,
html.dark-mode body .main-category-option::after {
  color: #fffaf1 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) .main-category-selector {
    background: rgba(255, 250, 241, .10) !important;
    border: 1px solid rgba(255, 250, 241, .20) !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .main-category-selector *,
  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option),
  html body:not(.theme-force-light) .main-category-option::after {
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) .sub-category-dropdown {
    background: #27231f !important;
    border: 1px solid rgba(255, 250, 241, .14) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28) !important;
    padding: 8px 0 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option) {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 250, 241, .10) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option):hover,
  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option).active {
    background: rgba(255, 250, 241, .12) !important;
  }
}

/* Encrypted-post gate: use the same warm dark card language as the site. */
html body:is(.theme-force-dark, .dark-mode) :is(.hbe-container, .password-gate),
html.dark-mode body :is(.hbe-container, .password-gate) {
  background: #24211d !important;
  border: 1px solid rgba(255, 250, 241, .14) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 46px rgba(0, 0, 0, .28) !important;
  color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.hbe-content, .hbe-form),
html.dark-mode body :is(.hbe-content, .hbe-form) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .password-gate-content,
html.dark-mode body .password-gate-content {
  background: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
  color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.hbe-input, .hbe-input-default),
html.dark-mode body :is(.hbe-input, .hbe-input-default) {
  background: #1a1815 !important;
  border: 1px solid rgba(255, 250, 241, .18) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

html body:is(.theme-force-dark, .dark-mode) .hbe-input-field,
html.dark-mode body .hbe-input-field {
  background: transparent !important;
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.hbe-input-label, .hbe-input-label-content, .hbe-error),
html.dark-mode body :is(.hbe-input-label, .hbe-input-label-content, .hbe-error) {
  color: #d7cfc2 !important;
  -webkit-text-fill-color: #d7cfc2 !important;
}

html body:is(.theme-force-dark, .dark-mode) .hbe-button,
html.dark-mode body .hbe-button {
  background: #fffaf1 !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22) !important;
  color: #211e1a !important;
  -webkit-text-fill-color: #211e1a !important;
}

html body:is(.theme-force-dark, .dark-mode) .hbe-button:hover,
html.dark-mode body .hbe-button:hover {
  background: #e9dfd0 !important;
  color: #211e1a !important;
  -webkit-text-fill-color: #211e1a !important;
}

html body:is(.theme-force-dark, .dark-mode) :is(.category-option-all, .main-category-option, .sub-category-option):is(:hover, .active) *,
html body:is(.theme-force-dark, .dark-mode) .main-category-option:is(:hover, .active)::after,
html.dark-mode body :is(.category-option-all, .main-category-option, .sub-category-option):is(:hover, .active) *,
html.dark-mode body .main-category-option:is(:hover, .active)::after {
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1 !important;
}

@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) :is(.hbe-container, .password-gate) {
    background: #24211d !important;
    border: 1px solid rgba(255, 250, 241, .14) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 46px rgba(0, 0, 0, .28) !important;
    color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) :is(.hbe-content, .hbe-form) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) .password-gate-content {
    background: transparent !important;
    border: 0 !important;
    border-radius: inherit !important;
    box-shadow: none !important;
    color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) :is(.hbe-input, .hbe-input-default) {
    background: #1a1815 !important;
    border: 1px solid rgba(255, 250, 241, .18) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }

  html body:not(.theme-force-light) .hbe-input-field {
    background: transparent !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }

  html body:not(.theme-force-light) :is(.hbe-input-label, .hbe-input-label-content, .hbe-error) {
    color: #d7cfc2 !important;
    -webkit-text-fill-color: #d7cfc2 !important;
  }

  html body:not(.theme-force-light) .hbe-button {
    background: #fffaf1 !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22) !important;
    color: #211e1a !important;
    -webkit-text-fill-color: #211e1a !important;
  }

  html body:not(.theme-force-light) .hbe-button:hover {
    background: #e9dfd0 !important;
  }

  html body:not(.theme-force-light) :is(.category-option-all, .main-category-option, .sub-category-option):is(:hover, .active) *,
  html body:not(.theme-force-light) .main-category-option:is(:hover, .active)::after {
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
  }
}

html body .sidebar-profile-card .site-state-wrap {
  display: contents !important;
}

html body .sidebar-profile-card .site-state {
  box-sizing: border-box !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  width: 100% !important;
}

html body .sidebar-profile-card .site-state-wrap,
html body .sidebar-profile-card .site-state-wrap > .site-state,
html body .sidebar-profile-card .site-state > .site-state-item,
html body .sidebar-profile-card .site-state > .site-state-item > a,
html body .sidebar-profile-card .site-state > .site-state-item > span,
html body .sidebar-profile-card .site-state > .site-state-item > a > span {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body .sidebar-profile-card .site-state-wrap::before,
html body .sidebar-profile-card .site-state-wrap::after,
html body .sidebar-profile-card .site-state::before,
html body .sidebar-profile-card .site-state::after,
html body .sidebar-profile-card .site-state-item::before,
html body .sidebar-profile-card .site-state-item::after,
html body .sidebar-profile-card .site-state-item > a::before,
html body .sidebar-profile-card .site-state-item > a::after,
html body .sidebar-profile-card .site-state-item > span::before,
html body .sidebar-profile-card .site-state-item > span::after {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
  display: none !important;
}
