
/* apple-final-fix.css */
html body {
  background-color: transparent !important;
  background-image: none !important;
}

body .container,
body .main,
body .content-wrap,
body .content,
body .sidebar,
body .sidebar-inner,
body .site-overview-wrap,
body .sidebar-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .main {
  display: block !important;
  min-height: 60vh !important;
  overflow: visible !important;
  padding: 0 0 48px !important;
  position: relative !important;
  z-index: 2 !important;
}

body .header {
  background: transparent !important;
  margin: 18px auto 24px !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 80 !important;
}

body .header-inner,
body .main-inner {
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1760px !important;
  width: min(1760px, calc(100vw - 56px)) !important;
}

body .header-inner {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  gap: 18px !important;
  justify-content: space-between !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
}

body .main-inner {
  align-items: start !important;
  display: grid !important;
  gap: 34px !important;
  grid-template-columns: clamp(360px, 21vw, 400px) minmax(0, 1fr) !important;
  overflow: visible !important;
}

body .content-wrap {
  grid-column: 2 !important;
  grid-row: 1 !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  width: 100% !important;
}

body .sidebar {
  grid-column: 1 !important;
  grid-row: 1 !important;
  max-height: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  position: static !important;
  scrollbar-width: none !important;
  width: 100% !important;
}

body .sidebar::-webkit-scrollbar,
body .sidebar-inner::-webkit-scrollbar,
body .site-overview-wrap::-webkit-scrollbar,
body .sidebar-panel::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

body .sidebar-inner,
body .sidebar-inner.affix,
body .sidebar-inner.affix-top,
body .sidebar-inner.affix-bottom,
body .site-overview-wrap,
body .sidebar-panel,
body .sidebar-panel-active {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  max-height: none !important;
  min-width: 0 !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0 !important;
  position: static !important;
  transform: none !important;
  visibility: visible !important;
  width: 100% !important;
}

body .sidebar-nav,
body .post-toc-wrap {
  display: none !important;
}

body .main-menu {
  align-items: center !important;
  background: rgba(255, 255, 255, .92) !important;
  border: 1px solid rgba(217, 224, 235, .92) !important;
  border-radius: 999px !important;
  box-shadow: 0 18px 45px rgba(30, 42, 68, .12) !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  line-height: 1 !important;
  list-style: none !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 7px !important;
  white-space: nowrap !important;
}

body .main-menu > .menu-item {
  display: block !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

body .main-menu > .menu-item::before,
body .main-menu > .menu-item::after,
body .main-menu > .menu-item > a::before,
body .main-menu > .menu-item > a::after {
  content: none !important;
  display: none !important;
}

body .main-menu > .menu-item > a,
body .main-menu > .menu-item > .popup-trigger {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid rgba(214, 222, 234, .9) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: #202938 !important;
  display: inline-flex !important;
  font-size: .9rem !important;
  font-weight: 760 !important;
  gap: 6px !important;
  justify-content: center !important;
  min-height: 36px !important;
  opacity: 1 !important;
  padding: 0 12px !important;
  text-decoration: none !important;
  transition: background-color .24s ease, color .24s ease, border-color .24s ease, box-shadow .24s ease, transform .24s ease !important;
  white-space: nowrap !important;
  width: auto !important;
}

body .main-menu > .menu-item > a:hover,
body .main-menu > .menu-item > a:focus-visible,
body .main-menu > .menu-item-active > a,
body .main-menu > .menu-item > .popup-trigger:hover,
body .main-menu > .menu-item > .popup-trigger:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .16) !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

body .main-menu > .menu-item-has-children {
  margin-bottom: -14px !important;
  padding-bottom: 14px !important;
}

body .main-menu > .menu-item-has-children > .menu-child {
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid rgba(216, 224, 236, .95) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 60px rgba(29, 41, 62, .18) !important;
  display: grid !important;
  gap: 8px !important;
  left: 50% !important;
  list-style: none !important;
  margin: 0 !important;
  min-width: 210px !important;
  opacity: 0 !important;
  overflow: visible !important;
  padding: 12px !important;
  pointer-events: none !important;
  position: absolute !important;
  top: calc(100% + 2px) !important;
  transform: translate(-50%, 8px) !important;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease !important;
  visibility: hidden !important;
  z-index: 9999 !important;
}

body .main-menu > .menu-item-has-children > .menu-child::before {
  content: '' !important;
  display: block !important;
  height: 18px !important;
  left: 0 !important;
  position: absolute !important;
  right: 0 !important;
  top: -18px !important;
}

body .main-menu > .menu-item-has-children:hover > .menu-child,
body .main-menu > .menu-item-has-children:focus-within > .menu-child,
body .main-menu > .menu-item-has-children > .menu-child:hover {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important;
  visibility: visible !important;
}

body .main-menu > .menu-item-has-children > .menu-child .menu-item,
body .main-menu > .menu-item-has-children > .menu-child .menu-item a {
  width: 100% !important;
}

body .main-menu > .menu-item-has-children > .menu-child .menu-item a {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid rgba(216, 224, 236, .82) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  color: #202938 !important;
  display: flex !important;
  font-size: .91rem !important;
  font-weight: 730 !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  text-align: left !important;
  text-decoration: none !important;
  transform: none !important;
  white-space: nowrap !important;
}

body .main-menu > .menu-item-has-children > .menu-child .menu-item a:hover,
body .main-menu > .menu-item-has-children > .menu-child .menu-item a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .14) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

body .site-nav {
  display: flex !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  overflow: visible !important;
}

body .site-nav .main-menu::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
}

body .sidebar-profile-card,
body .sidebar-card,
body .links-of-blogroll,
body .site-author-widget .sidebar-profile-card,
body .site-author-widget .sidebar-card,
body .content.index,
body .content-wrap > .content:not(.index),
body .content.post.posts-expand .post-block,
body .event-list,
body .gallery-container,
body .books-container,
body .movies-container,
body .diary-container,
body .lab-container,
body .schedule-container,
body .category-all-page,
body .tag-cloud,
body .archive,
body .album-wrapper {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .92) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 46px rgba(30, 42, 68, .11) !important;
  box-sizing: border-box !important;
}

body .sidebar-profile-card,
body .sidebar-card,
body .links-of-blogroll {
  margin: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 22px !important;
  width: 100% !important;
}

body .sidebar-profile-card .site-author {
  align-items: center !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: center !important;
}

body .sidebar-profile-card .site-author-image {
  border-radius: 50% !important;
  display: block !important;
  flex: 0 0 auto !important;
  height: 118px !important;
  margin: 0 auto 16px !important;
  object-fit: cover !important;
  width: 118px !important;
}

body .sidebar-profile-card .site-description {
  margin: 10px auto 0 !important;
  max-width: 260px !important;
  text-align: center !important;
}

body .sidebar-profile-card .site-state-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 16px 0 0 !important;
  padding: 14px 0 0 !important;
  width: 100% !important;
}

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

body .sidebar-profile-card .links-of-author {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  justify-content: center !important;
  margin: 16px auto 0 !important;
  max-width: 300px !important;
  padding: 0 !important;
  width: 100% !important;
}

body .sidebar-profile-card .links-of-author-item,
body .links-of-blogroll-item {
  display: block !important;
  margin: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body .sidebar-profile-card .links-of-author-item a,
body .links-of-blogroll-item a,
body .sidebar-popular-item a,
body .sidebar-tag-cloud-list a,
body .tag-cloud-tags a,
body .pagination a,
body .pagination span,
body .post-tags a,
body .content.index .post-button .btn,
body .content.index .post-button a {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid rgba(214, 222, 234, .95) !important;
  border-radius: 999px !important;
  box-shadow: 0 5px 14px rgba(31, 41, 58, .05) !important;
  color: #202938 !important;
  display: inline-flex !important;
  font-weight: 720 !important;
  justify-content: center !important;
  min-height: 40px !important;
  text-decoration: none !important;
  transition: background-color .24s ease, color .24s ease, border-color .24s ease, box-shadow .24s ease, transform .24s ease !important;
}

body .sidebar-profile-card .links-of-author-item a:hover,
body .sidebar-profile-card .links-of-author-item a:focus-visible,
body .links-of-blogroll-item a:hover,
body .links-of-blogroll-item a:focus-visible,
body .sidebar-popular-item a:hover,
body .sidebar-popular-item a:focus-visible,
body .sidebar-tag-cloud-list a:hover,
body .sidebar-tag-cloud-list a:focus-visible,
body .tag-cloud-tags a:hover,
body .tag-cloud-tags a:focus-visible,
body .pagination a:hover,
body .pagination a:focus-visible,
body .post-tags a:hover,
body .post-tags a:focus-visible,
body .content.index .post-button .btn:hover,
body .content.index .post-button .btn:focus-visible,
body .content.index .post-button a:hover,
body .content.index .post-button a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .16) !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

body .sidebar-profile-card .links-of-author-item a {
  gap: 7px !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  width: 100% !important;
}

body .sidebar-profile-card .links-of-author-item a i {
  flex: 0 0 18px !important;
  margin: 0 !important;
  text-align: center !important;
}

body .links-of-blogroll {
  padding: 18px 18px 20px !important;
}

body .links-of-blogroll-title,
body .sidebar-card-title {
  margin: 0 0 14px !important;
  text-align: left !important;
}

body .links-of-blogroll-list {
  display: grid !important;
  gap: 10px !important;
  margin: 0 auto !important;
  max-width: 320px !important;
  padding: 0 !important;
  width: 100% !important;
}

body .links-of-blogroll-item a {
  min-height: 42px !important;
  overflow: hidden !important;
  padding: 0 14px !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  width: 100% !important;
}

body .sidebar-popular-list {
  display: grid !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body .sidebar-popular-item {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body .sidebar-popular-item::before {
  display: none !important;
}

body .sidebar-popular-item a {
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: 26px minmax(0, 1fr) 54px !important;
  justify-content: stretch !important;
  min-height: 46px !important;
  padding: 0 13px !important;
  width: 100% !important;
}

body .sidebar-popular-item a span {
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .sidebar-popular-item time {
  font-variant-numeric: tabular-nums !important;
  justify-self: end !important;
  min-width: 54px !important;
  text-align: right !important;
  white-space: nowrap !important;
}

body .sidebar-tag-cloud-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .sidebar-tag-cloud-list a {
  min-height: 34px !important;
  padding: 0 12px !important;
}

body .content.index {
  overflow: visible !important;
  padding: 18px !important;
}

body .content.index .post-block {
  margin: 0 0 18px !important;
}

body .content.post.posts-expand,
body .content.post.posts-expand .post-block,
body .content.post.posts-expand .post-header,
body .content.post.posts-expand .post-body,
body .content.post.posts-expand .post-footer {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  transform: none !important;
  visibility: visible !important;
}

body .content.post.posts-expand {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 50vh !important;
  padding: 0 !important;
}

body .content.post.posts-expand .post-block {
  margin: 0 !important;
  padding: 34px 40px !important;
}

body .content.post.posts-expand .post-body {
  color: #344055 !important;
  line-height: 1.9 !important;
  padding: 0 !important;
}

body .content.post.posts-expand .post-header,
body .content.post.posts-expand .post-footer {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body .post-button .btn,
body .post-button a {
  display: inline-flex !important;
  min-width: max-content !important;
  width: auto !important;
}

body .content.post.posts-expand .post-button .btn,
body .content.post.posts-expand .post-button a {
  background: #fff !important;
  border: 1px solid rgba(214, 222, 234, .95) !important;
  border-radius: 999px !important;
  color: #202938 !important;
  min-height: 42px !important;
  padding: 0 18px !important;
}

body .content.post.posts-expand .post-button .btn:hover,
body .content.post.posts-expand .post-button a:hover {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .book-buttons,
body .movie-buttons,
body .books-container .book-buttons,
body .books-wrapper .book-buttons,
body .movies-container .movie-buttons,
body .movies-wrapper .movie-buttons {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .books-container .book-buttons .btn,
body .books-wrapper .book-buttons .btn {
  background: var(--primary-color) !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1) !important;
  color: #333 !important;
  min-height: 24px !important;
  transform: none !important;
}

body .books-container .book-buttons .btn:hover,
body .books-wrapper .book-buttons .btn:hover {
  background: var(--primary-color-hover) !important;
  color: #333 !important;
  transform: translateY(-1px) !important;
}

body .movies-container .movie-buttons .btn,
body .movies-wrapper .movie-buttons .btn {
  border: 0 !important;
  color: #fff !important;
  min-height: 24px !important;
}

body .album-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
}

body .album-card,
body .gallery-card {
  aspect-ratio: 16 / 10 !important;
  height: auto !important;
  width: 100% !important;
}

body .album-card img,
body .gallery-card img {
  height: 100% !important;
  object-fit: cover !important;
  width: 100% !important;
}

body .search-pop-overlay {
  align-items: flex-start !important;
  background: rgba(247, 249, 252, .58) !important;
  bottom: 0 !important;
  display: flex !important;
  justify-content: center !important;
  left: 0 !important;
  opacity: 0 !important;
  padding: 12vh 18px 40px !important;
  pointer-events: none !important;
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  visibility: hidden !important;
  z-index: 20000 !important;
}

body .search-pop-overlay.search-active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

body .popup.search-popup {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 28px !important;
  box-shadow: 0 28px 78px rgba(21, 31, 48, .24) !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: 74vh !important;
  overflow: hidden !important;
  position: relative !important;
  transform: translateY(8px) scale(.98) !important;
  transition: transform .22s ease, opacity .22s ease !important;
  width: min(780px, calc(100vw - 36px)) !important;
}

body .search-pop-overlay.search-active .popup.search-popup {
  transform: translateY(0) scale(1) !important;
}

body .search-header {
  align-items: center !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(45, 61, 92, .08) !important;
  display: flex !important;
}

body .search-input {
  background: #f6f8fc !important;
  border: 1px solid rgba(214, 222, 234, .95) !important;
  border-radius: 999px !important;
  color: #202938 !important;
}

body #search-result {
  background: transparent !important;
  max-height: calc(74vh - 86px) !important;
  min-height: 138px !important;
  overflow: auto !important;
  padding: 16px !important;
}

body .search-result-list {
  display: grid !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .search-result-list li {
  background: #f8fafc !important;
  border: 1px solid rgba(214, 222, 234, .86) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  list-style: none !important;
  padding: 14px 16px !important;
}

body .search-result-list a,
body .search-result {
  background: transparent !important;
  color: #202938 !important;
}

body #netease-player {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body #netease-player iframe {
  border-radius: 22px !important;
  overflow: hidden !important;
}

/* Absolute final screenshot fixes. */
body .header-inner {
  align-items: center !important;
  background: rgba(255, 255, 255, .95) !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 48px rgba(30, 42, 68, .12) !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 18px !important;
  justify-content: space-between !important;
  min-height: 58px !important;
  padding: 8px 14px 8px 22px !important;
}

body .main-menu {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body .site-brand-container,
body .site-meta,
body .brand {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .site-title {
  color: #202938 !important;
  font-size: .95rem !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  max-width: 34vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .main-inner {
  grid-template-columns: clamp(318px, 18vw, 348px) minmax(0, 1fr) !important;
}

body .sidebar-profile-card {
  padding: 16px 18px 18px !important;
}

body .sidebar-profile-card .site-author-image {
  height: 84px !important;
  margin: 0 auto 8px !important;
  width: 84px !important;
}

body .sidebar-profile-card .site-description {
  font-size: .9rem !important;
  line-height: 1.6 !important;
  max-width: 232px !important;
}

body .sidebar-popular-list {
  counter-reset: popular !important;
}

body .sidebar-popular-item a {
  grid-template-columns: 28px minmax(0, 1fr) 54px !important;
}

body .sidebar-popular-item a::before {
  align-items: center !important;
  background: #edf5ff !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #29415f !important;
  content: counter(popular) !important;
  counter-increment: popular !important;
  display: inline-flex !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
  height: 28px !important;
  justify-content: center !important;
  width: 28px !important;
}

body .sidebar-popular-item a span,
body .sidebar-popular-item a time,
body .sidebar-popular-item a:hover > :first-child,
body .sidebar-popular-item a:focus-visible > :first-child {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .sidebar-popular-item a:hover,
body .sidebar-popular-item a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:hover time,
body .sidebar-popular-item a:focus-visible span,
body .sidebar-popular-item a:focus-visible time {
  color: #fff !important;
}

body .sidebar-popular-item a:hover::before,
body .sidebar-popular-item a:focus-visible::before {
  background: rgba(255, 255, 255, .94) !important;
  color: #111 !important;
}

/* Screenshot final override: keep this block at the end. */
body .header-inner {
  align-items: center !important;
  background: rgba(255, 255, 255, .95) !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 48px rgba(30, 42, 68, .12) !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 18px !important;
  justify-content: space-between !important;
  min-height: 58px !important;
  padding: 8px 14px 8px 22px !important;
}

body .site-brand-container,
body .site-meta,
body .brand {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  margin: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

body .site-title {
  color: #202938 !important;
  font-size: .95rem !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  max-width: 34vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .logo-line-before,
body .logo-line-after,
body .site-nav-toggle,
body .site-nav-right {
  display: none !important;
}

body .site-nav {
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
  overflow: visible !important;
}

body .main-menu {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 0 !important;
}

body .main-menu > .menu-item > a,
body .main-menu > .menu-item > .popup-trigger {
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  min-height: 38px !important;
  padding: 0 12px !important;
}

body .main-menu > .menu-item > a:hover,
body .main-menu > .menu-item > a:focus-visible,
body .main-menu > .menu-item-active > a,
body .main-menu > .menu-item > .popup-trigger:hover,
body .main-menu > .menu-item > .popup-trigger:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .main-inner {
  grid-template-columns: clamp(318px, 18vw, 348px) minmax(0, 1fr) !important;
}

body .sidebar-profile-card {
  padding: 16px 18px 18px !important;
}

body .sidebar-profile-card .site-author-image {
  height: 84px !important;
  margin: 0 auto 8px !important;
  width: 84px !important;
}

body .sidebar-profile-card .site-description {
  font-size: .9rem !important;
  line-height: 1.6 !important;
  margin-top: 4px !important;
  max-width: 232px !important;
}

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

body .sidebar-profile-card .links-of-author {
  gap: 7px !important;
  margin-top: 10px !important;
  max-width: 268px !important;
}

body .sidebar-profile-card .links-of-author-item a {
  min-height: 34px !important;
  padding: 0 8px !important;
}

body .sidebar-popular-list {
  counter-reset: popular !important;
}

body .sidebar-popular-item a {
  grid-template-columns: 28px minmax(0, 1fr) 54px !important;
}

body .sidebar-popular-item a::before {
  align-items: center !important;
  background: #edf5ff !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #29415f !important;
  content: counter(popular) !important;
  counter-increment: popular !important;
  display: inline-flex !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
  height: 28px !important;
  justify-content: center !important;
  line-height: 1 !important;
  width: 28px !important;
}

body .sidebar-popular-item a span,
body .sidebar-popular-item a time,
body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:hover time,
body .sidebar-popular-item a:focus-visible span,
body .sidebar-popular-item a:focus-visible time,
body .sidebar-popular-item a:hover > :first-child,
body .sidebar-popular-item a:focus-visible > :first-child {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .sidebar-popular-item a:hover,
body .sidebar-popular-item a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:hover time,
body .sidebar-popular-item a:focus-visible span,
body .sidebar-popular-item a:focus-visible time {
  color: #fff !important;
}

body .sidebar-popular-item a:hover::before,
body .sidebar-popular-item a:focus-visible::before {
  background: rgba(255, 255, 255, .94) !important;
  color: #111 !important;
}

@media (max-width: 980px) {
  body .header-inner {
    border-radius: 24px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body .site-title {
    max-width: 100% !important;
  }

  body .main-menu {
    overflow-x: auto !important;
  }
}

body .pagination a,
body .pagination span.page-number,
body .pagination .extend {
  align-items: center !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  height: 40px !important;
  justify-content: center !important;
  line-height: 1 !important;
  min-height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  width: 40px !important;
}

body .pagination .page-number.current,
body .pagination span.current {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16) !important;
  color: #fff !important;
}

body .pagination span.space {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #7b8494 !important;
  min-width: 20px !important;
  padding: 0 2px !important;
  width: auto !important;
}

/* Final corrections requested from screenshots */
body .header-inner {
  align-items: center !important;
  background: rgba(255, 255, 255, .95) !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 48px rgba(30, 42, 68, .12) !important;
  display: flex !important;
  gap: 18px !important;
  min-height: 58px !important;
  padding: 8px 14px 8px 22px !important;
}

body .site-brand-container,
body .site-meta,
body .brand {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  margin: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

body .site-title {
  color: #202938 !important;
  font-size: .95rem !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  max-width: 34vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .logo-line-before,
body .logo-line-after,
body .site-nav-toggle,
body .site-nav-right {
  display: none !important;
}

body .site-nav {
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
}

body .main-menu {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: 100% !important;
  padding: 0 !important;
}

body .main-menu > .menu-item > a,
body .main-menu > .menu-item > .popup-trigger {
  border-radius: 999px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
}

body .main-inner {
  grid-template-columns: clamp(328px, 19vw, 360px) minmax(0, 1fr) !important;
}

body .sidebar-profile-card {
  padding: 18px 20px 20px !important;
}

body .sidebar-profile-card .site-author-image {
  height: 86px !important;
  width: 86px !important;
}

body .sidebar-profile-card .site-description {
  font-size: .92rem !important;
  line-height: 1.65 !important;
  max-width: 240px !important;
}

body .sidebar-profile-card .links-of-author {
  max-width: 280px !important;
}

body .sidebar-popular-list {
  counter-reset: popular !important;
}

body .sidebar-popular-item a {
  grid-template-columns: 28px minmax(0, 1fr) 54px !important;
  position: relative !important;
}

body .sidebar-popular-item a::before {
  align-items: center !important;
  background: #edf5ff !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #29415f !important;
  content: counter(popular) !important;
  counter-increment: popular !important;
  display: inline-flex !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
  height: 28px !important;
  justify-content: center !important;
  line-height: 1 !important;
  width: 28px !important;
}

body .sidebar-popular-item a span,
body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:focus-visible span {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .sidebar-popular-item a:hover::before,
body .sidebar-popular-item a:focus-visible::before {
  background: rgba(255, 255, 255, .94) !important;
  color: #111 !important;
}

body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:hover time,
body .sidebar-popular-item a:focus-visible span,
body .sidebar-popular-item a:focus-visible time {
  color: #fff !important;
}

@media (max-width: 1320px) {
  body .site-title {
    max-width: 26vw !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    padding: 0 10px !important;
  }
}

@media (max-width: 980px) {
  body .header-inner {
    border-radius: 24px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body .site-title {
    max-width: 100% !important;
  }
}

@media (max-width: 1320px) {
  body .header-inner,
  body .main-inner {
    width: calc(100vw - 28px) !important;
  }

  body .header-inner {
    gap: 12px !important;
  }

  body .main-inner {
    gap: 24px !important;
    grid-template-columns: clamp(330px, 26vw, 370px) minmax(0, 1fr) !important;
  }

  body .site-nav {
    overflow: hidden !important;
  }

  body .main-menu {
    flex-wrap: nowrap !important;
    max-width: calc(100vw - 360px) !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    font-size: .84rem !important;
    min-height: 34px !important;
    padding: 0 10px !important;
  }
}

@media (max-width: 980px) {
  body .header-inner,
  body .main-inner {
    width: calc(100vw - 22px) !important;
  }

  body .header-inner {
    justify-content: flex-start !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body .main-inner {
    display: block !important;
  }

  body .content-wrap,
  body .sidebar {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
  }

  body .sidebar {
    margin-bottom: 20px !important;
  }

  body .main-menu {
    border-radius: 24px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    width: 100% !important;
  }

  body .main-menu > .menu-item-has-children > .menu-child {
    left: 0 !important;
    transform: translateY(8px) !important;
  }

  body .main-menu > .menu-item-has-children:hover > .menu-child,
  body .main-menu > .menu-item-has-children:focus-within > .menu-child,
  body .main-menu > .menu-item-has-children > .menu-child:hover {
    transform: translateY(0) !important;
  }
}

@media (max-width: 720px) {
  body .header-inner,
  body .main-inner {
    width: calc(100vw - 16px) !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    min-height: 36px !important;
    padding: 0 12px !important;
  }

  body .sidebar-profile-card,
  body .sidebar-card,
  body .links-of-blogroll,
  body .content.post.posts-expand .post-block {
    border-radius: 24px !important;
    padding: 22px !important;
  }

  body .sidebar-profile-card .links-of-author {
    grid-template-columns: 1fr !important;
    max-width: 280px !important;
  }
}

/* Final navigation/sidebar polish */
body .main-menu {
  background: rgba(255, 255, 255, .95) !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 999px !important;
  box-shadow: 0 18px 45px rgba(30, 42, 68, .12) !important;
  display: inline-flex !important;
  gap: 2px !important;
  padding: 7px !important;
}

body .main-menu > .menu-item > a,
body .main-menu > .menu-item > .popup-trigger {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #202938 !important;
  min-height: 36px !important;
  padding: 0 11px !important;
}

body .main-menu > .menu-item-search > .popup-trigger {
  padding: 0 12px !important;
}

body .main-menu > .menu-item > a:hover,
body .main-menu > .menu-item > a:focus-visible,
body .main-menu > .menu-item-active > a,
body .main-menu > .menu-item > .popup-trigger:hover,
body .main-menu > .menu-item > .popup-trigger:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .sidebar-profile-card,
body .sidebar-card,
body .links-of-blogroll {
  background: #fff !important;
  padding: 18px 20px !important;
}

body .sidebar-inner,
body .sidebar-inner.affix,
body .sidebar-inner.affix-top,
body .sidebar-inner.affix-bottom,
body .site-overview-wrap,
body .sidebar-panel,
body .sidebar-panel-active {
  gap: 18px !important;
}

body .sidebar-profile-card .site-author-image {
  height: 98px !important;
  margin: 0 auto 10px !important;
  width: 98px !important;
}

body .sidebar-profile-card .site-description {
  margin-top: 6px !important;
}

body .sidebar-profile-card .site-state-wrap {
  margin-top: 10px !important;
  padding-top: 10px !important;
}

body .sidebar-profile-card .links-of-author {
  gap: 8px !important;
  margin-top: 12px !important;
}

body .sidebar-profile-card .links-of-author-item a {
  min-height: 36px !important;
  padding: 0 9px !important;
}

body .sidebar-popular-item a:hover,
body .sidebar-popular-item a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .sidebar-popular-item a:hover,
body .sidebar-popular-item a:hover *,
body .sidebar-popular-item a:focus-visible,
body .sidebar-popular-item a:focus-visible *,
body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:hover time,
body .sidebar-popular-item a:focus-visible span,
body .sidebar-popular-item a:focus-visible time {
  color: #fff !important;
}

body .sidebar-popular-item a:hover > :first-child,
body .sidebar-popular-item a:focus-visible > :first-child {
  background: rgba(255, 255, 255, .95) !important;
  color: #111 !important;
}

body #netease-player {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body #netease-player iframe {
  border-radius: 22px !important;
  overflow: hidden !important;
}

/* Home post previews: keep one fixed aspect ratio everywhere. */
body .post-card-preview {
  overflow: hidden !important;
}

body .post-card-preview .post-card-cover {
  aspect-ratio: 16 / 10 !important;
  flex: 0 0 clamp(240px, 34%, 360px) !important;
  overflow: hidden !important;
}

body .post-card-preview .post-card-cover img {
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  width: 100% !important;
}

/* Absolute final screenshot fixes at real EOF. */
body .header-inner {
  align-items: center !important;
  background: rgba(255, 255, 255, .95) !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 48px rgba(30, 42, 68, .12) !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 18px !important;
  justify-content: space-between !important;
  min-height: 58px !important;
  padding: 8px 14px 8px 22px !important;
}

body .site-brand-container,
body .site-meta,
body .brand {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .site-title {
  color: #202938 !important;
  font-size: .95rem !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  max-width: 34vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .logo-line-before,
body .logo-line-after,
body .site-nav-toggle,
body .site-nav-right {
  display: none !important;
}

body .site-nav {
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
  overflow: visible !important;
}

body .main-menu {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 0 !important;
}

body .main-menu > .menu-item > a,
body .main-menu > .menu-item > .popup-trigger {
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  min-height: 38px !important;
  padding: 0 12px !important;
}

body .main-menu > .menu-item > a:hover,
body .main-menu > .menu-item > a:focus-visible,
body .main-menu > .menu-item-active > a,
body .main-menu > .menu-item > .popup-trigger:hover,
body .main-menu > .menu-item > .popup-trigger:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .main-inner {
  grid-template-columns: clamp(318px, 18vw, 348px) minmax(0, 1fr) !important;
}

body .sidebar-profile-card {
  padding: 16px 18px 18px !important;
}

body .sidebar-profile-card .site-author-image {
  height: 84px !important;
  margin: 0 auto 8px !important;
  width: 84px !important;
}

body .sidebar-profile-card .site-description {
  font-size: .9rem !important;
  line-height: 1.6 !important;
  margin-top: 4px !important;
  max-width: 232px !important;
}

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

body .sidebar-profile-card .links-of-author {
  gap: 7px !important;
  margin-top: 10px !important;
  max-width: 268px !important;
}

body .sidebar-profile-card .links-of-author-item a {
  min-height: 34px !important;
  padding: 0 8px !important;
}

body .sidebar-popular-list {
  counter-reset: popular !important;
}

body .sidebar-popular-item a {
  grid-template-columns: 28px minmax(0, 1fr) 54px !important;
}

body .sidebar-popular-item a::before {
  align-items: center !important;
  background: #edf5ff !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #29415f !important;
  content: counter(popular) !important;
  counter-increment: popular !important;
  display: inline-flex !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
  height: 28px !important;
  justify-content: center !important;
  line-height: 1 !important;
  width: 28px !important;
}

body .sidebar-popular-item a span,
body .sidebar-popular-item a time,
body .sidebar-popular-item a:hover > :first-child,
body .sidebar-popular-item a:focus-visible > :first-child {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .sidebar-popular-item a:hover,
body .sidebar-popular-item a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

body .sidebar-popular-item a:hover span,
body .sidebar-popular-item a:hover time,
body .sidebar-popular-item a:focus-visible span,
body .sidebar-popular-item a:focus-visible time {
  color: #fff !important;
}

body .sidebar-popular-item a:hover::before,
body .sidebar-popular-item a:focus-visible::before {
  background: rgba(255, 255, 255, .94) !important;
  color: #111 !important;
}

@media (max-width: 980px) {
  body .header-inner {
    border-radius: 24px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body .site-title {
    max-width: 100% !important;
  }

  body .main-menu {
    overflow-x: auto !important;
  }
}


/* makima-pet.css */
#kagura-pet {
  --makima-size: 112px;
  background-image: url("/images/pets/kagura-pixel/spritesheet.webp");
  background-repeat: no-repeat;
  background-size: 800% 900%;
  bottom: 28px;
  cursor: grab;
  height: var(--makima-size);
  image-rendering: auto;
  position: fixed;
  right: 28px;
  touch-action: none;
  user-select: none;
  width: var(--makima-size);
  z-index: 99997;
}

#kagura-pet.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 18px 26px rgba(20, 24, 32, .22));
  transform: scale(1.04);
}

#kagura-pet.is-page-docked,
body:has(.content.games-page) #kagura-pet {
  bottom: 24px !important;
  left: auto !important;
  right: 24px !important;
  top: auto !important;
}

#kagura-pet.is-jumping {
  animation: makima-hop .42s cubic-bezier(.2, .9, .25, 1);
}

#kagura-pet::after {
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(210, 218, 230, .9);
  border-radius: 999px;
  bottom: 6px;
  box-shadow: 0 10px 24px rgba(20, 30, 46, .13);
  color: #202938;
  content: "神乐";
  font-size: 12px;
  font-weight: 760;
  left: 50%;
  opacity: 0;
  padding: 4px 9px;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
}

#kagura-pet:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes makima-hop {
  0%, 100% {
    translate: 0 0;
  }

  45% {
    translate: 0 -28px;
  }
}

@media (max-width: 720px) {
  #kagura-pet {
    --makima-size: 88px;
    bottom: 18px;
    right: 16px;
  }

  #kagura-pet.is-page-docked,
  body:has(.content.games-page) #kagura-pet {
    bottom: 16px !important;
    right: 14px !important;
  }
}


/* visual-hotfix.css */
﻿/* Loaded last on purpose: fixes the visible header/sidebar overrides. */
html body .container .header {
  background: transparent !important;
  margin: 18px auto 24px !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 80 !important;
}

html body .container .header .header-inner {
  align-items: center !important;
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 48px rgba(30, 42, 68, .12) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 18px !important;
  justify-content: space-between !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1760px !important;
  min-height: 58px !important;
  overflow: visible !important;
  padding: 8px 14px 8px 22px !important;
  position: relative !important;
  width: min(1760px, calc(100vw - 56px)) !important;
}

html body .container .header .header-inner::before {
  background: #fff !important;
  border-radius: inherit !important;
  content: "" !important;
  inset: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  z-index: -1 !important;
}

html body .header-inner .site-brand-container,
html body .header-inner .site-meta,
html body .header-inner .brand {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex: 0 1 auto !important;
  margin: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

html body .header-inner .site-title {
  color: #202938 !important;
  font-size: .95rem !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  max-width: 34vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .header-inner .logo-line-before,
html body .header-inner .logo-line-after,
html body .header-inner .site-nav-toggle,
html body .header-inner .site-nav-right {
  display: none !important;
}

html body .header-inner .site-nav {
  background: transparent !important;
  display: flex !important;
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  overflow: visible !important;
}

html body .header-inner .main-menu {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 2px !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

html body .header-inner .main-menu > .menu-item > a,
html body .header-inner .main-menu > .menu-item > .popup-trigger {
  align-items: center !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: #202938 !important;
  display: inline-flex !important;
  font-size: .9rem !important;
  font-weight: 760 !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  transition: background-color .24s ease, color .24s ease, transform .24s ease !important;
}

html body .header-inner .main-menu > .menu-item > a:hover,
html body .header-inner .main-menu > .menu-item > a:focus-visible,
html body .header-inner .main-menu > .menu-item-active > a,
html body .header-inner .main-menu > .menu-item > .popup-trigger:hover,
html body .header-inner .main-menu > .menu-item > .popup-trigger:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

html body .main-inner {
  grid-template-columns: clamp(318px, 18vw, 348px) minmax(0, 1fr) !important;
}

html body .sidebar-profile-card {
  padding: 16px 18px 18px !important;
}

html body .sidebar-profile-card .site-author-image {
  height: 84px !important;
  margin: 0 auto 8px !important;
  width: 84px !important;
}

html body .sidebar-profile-card .site-description {
  font-size: .9rem !important;
  line-height: 1.6 !important;
  margin-top: 4px !important;
  max-width: 232px !important;
}

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

html body .sidebar-profile-card .links-of-author {
  gap: 7px !important;
  margin-top: 10px !important;
  max-width: 268px !important;
}

html body .sidebar-profile-card .links-of-author-item a {
  min-height: 34px !important;
  padding: 0 8px !important;
}

html body .sidebar-popular-list {
  counter-reset: popular !important;
}

html body .sidebar-popular-item a {
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: 28px minmax(0, 1fr) 54px !important;
  min-height: 46px !important;
}

html body .sidebar-popular-item a::before {
  align-items: center !important;
  background: #edf5ff !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #29415f !important;
  content: counter(popular) !important;
  counter-increment: popular !important;
  display: inline-flex !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
  height: 28px !important;
  justify-content: center !important;
  line-height: 1 !important;
  width: 28px !important;
}

html body .sidebar-popular-item a span,
html body .sidebar-popular-item a time {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .sidebar-popular-item a:hover,
html body .sidebar-popular-item a:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

html body .sidebar-popular-item a:hover span,
html body .sidebar-popular-item a:hover time,
html body .sidebar-popular-item a:focus-visible span,
html body .sidebar-popular-item a:focus-visible time {
  color: #fff !important;
}

html body .sidebar-popular-item a:hover::before,
html body .sidebar-popular-item a:focus-visible::before {
  background: rgba(255, 255, 255, .94) !important;
  color: #111 !important;
}

html body .sidebar-popular .sidebar-popular-list .sidebar-popular-item > a:hover > span,
html body .sidebar-popular .sidebar-popular-list .sidebar-popular-item > a:focus-visible > span,
html body .sidebar-popular .sidebar-popular-list .sidebar-popular-item > a:hover > time,
html body .sidebar-popular .sidebar-popular-list .sidebar-popular-item > a:focus-visible > time {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
}

html body .sidebar-popular .sidebar-popular-list .sidebar-popular-item > a:hover::before,
html body .sidebar-popular .sidebar-popular-list .sidebar-popular-item > a:focus-visible::before {
  background: rgba(255, 255, 255, .94) !important;
  color: #111 !important;
}

html body .sidebar-inner .sidebar-nav {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 26px 26px 0 0 !important;
  box-shadow: 0 18px 42px rgba(30, 42, 68, .10) !important;
  box-sizing: border-box !important;
  display: block !important;
  gap: 8px !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 14px 14px 10px !important;
  width: 100% !important;
}

html body .sidebar-inner .sidebar-nav li {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .9) !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  color: #202938 !important;
  cursor: pointer !important;
  display: flex !important;
  font-size: .88rem !important;
  font-weight: 760 !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  width: 100% !important;
}

html body .sidebar-inner .sidebar-nav li.sidebar-nav-active,
html body .sidebar-inner .sidebar-nav li:hover {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

html body .sidebar-inner .post-toc-wrap {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 0 0 26px 26px !important;
  border-top: 0 !important;
  box-shadow: 0 18px 42px rgba(30, 42, 68, .10) !important;
  box-sizing: border-box !important;
  display: block !important;
  margin: -18px 0 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 12px 16px 16px !important;
  position: static !important;
  width: 100% !important;
}

html body .sidebar-inner .post-toc-wrap .post-toc {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: block !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
}

html body .sidebar-inner .post-toc-wrap .nav {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .sidebar-inner .post-toc-wrap .nav-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .sidebar-inner .post-toc-wrap .nav-link {
  align-items: flex-start !important;
  background: #f8fafc !important;
  border: 1px solid rgba(217, 224, 235, .84) !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  color: #202938 !important;
  display: flex !important;
  gap: 6px !important;
  line-height: 1.45 !important;
  max-width: 100% !important;
  padding: 9px 11px !important;
  text-decoration: none !important;
  width: 100% !important;
}

html body .sidebar-inner .post-toc-wrap .nav-link:hover,
html body .sidebar-inner .post-toc-wrap .nav-link:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

html body .sidebar-inner .post-toc-wrap .nav-link:hover *,
html body .sidebar-inner .post-toc-wrap .nav-link:focus-visible * {
  color: #fff !important;
}

html body .sidebar-inner .post-toc-wrap + .site-overview-wrap {
  display: flex !important;
  margin-top: 22px !important;
}

@media (max-width: 980px) {
  html body .container .header .header-inner {
    align-items: stretch !important;
    border-radius: 24px !important;
    flex-direction: column !important;
    width: calc(100vw - 22px) !important;
  }

  html body .header-inner .site-title {
    max-width: 100% !important;
  }

  html body .header-inner .main-menu {
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }
}

/* Books, movies and diary pages already sit inside the shared content card.
   Keep the page shell as the only large rounded background. */
html body .content:has(.books-container),
html body .content:has(.movies-container),
html body .content:has(.diary-wrapper) {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 46px rgba(30, 42, 68, .11) !important;
  box-sizing: border-box !important;
  padding: clamp(18px, 2.2vw, 28px) !important;
  overflow: visible !important;
}

html body .content:has(.books-container) > style,
html body .content:has(.movies-container) > style,
html body .content:has(.diary-wrapper) > style {
  display: none !important;
}

html body .books-container,
html body .movies-container,
html body .diary-wrapper {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

html body .books-wrapper,
html body .movies-wrapper {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

html body .books-front,
html body .books-friends,
html body .movies-front,
html body .movies-friends {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body .books-grid,
html body .movies-grid,
html body .diary-grid {
  margin: 0 !important;
  width: 100% !important;
}

html body .books-container .page-header,
html body .movies-container .page-header,
html body .diary-wrapper .page-header {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 0 clamp(20px, 2.5vw, 34px) !important;
  padding: 0 !important;
}

html body .books-container .book-card,
html body .movies-container .movie-card {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .92) !important;
  box-shadow: 0 10px 26px rgba(30, 42, 68, .08) !important;
}

html body .books-container .book-card:hover,
html body .movies-container .movie-card:hover {
  box-shadow: 0 18px 38px rgba(30, 42, 68, .14) !important;
}

html body .books-container .book-buttons,
html body .books-wrapper .book-buttons {
  align-items: center !important;
  display: grid !important;
  gap: 8px !important;
  grid-auto-columns: 58px !important;
  grid-auto-flow: column !important;
  justify-content: center !important;
  padding: 9px 8px 13px !important;
}

html body .books-container .book-buttons .btn,
html body .books-wrapper .book-buttons .btn {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 999px !important;
  box-shadow: 0 3px 10px rgba(30, 42, 68, .08) !important;
  box-sizing: border-box !important;
  color: #111 !important;
  display: inline-flex !important;
  flex: none !important;
  font-size: .76rem !important;
  font-weight: 760 !important;
  height: 24px !important;
  inline-size: 58px !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  max-inline-size: 58px !important;
  max-width: 58px !important;
  min-height: 24px !important;
  min-inline-size: 58px !important;
  min-width: 58px !important;
  padding: 0 !important;
  text-align: center !important;
  transform: translateY(0) !important;
  white-space: nowrap !important;
  width: 58px !important;
}

html body .books-container .book-buttons .btn:hover,
html body .books-wrapper .book-buttons .btn:hover,
html body .books-container .book-buttons .btn:focus-visible,
html body .books-wrapper .book-buttons .btn:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 8px 18px rgba(17, 17, 17, .18) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

html body .movies-container .movie-buttons,
html body .movies-wrapper .movie-buttons {
  align-items: center !important;
  display: grid !important;
  gap: 8px !important;
  grid-auto-columns: 58px !important;
  grid-auto-flow: column !important;
  justify-content: center !important;
  padding: 9px 8px 13px !important;
}

html body .movies-container .movie-buttons .btn,
html body .movies-wrapper .movie-buttons .btn {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .95) !important;
  border-radius: 999px !important;
  box-shadow: 0 3px 10px rgba(30, 42, 68, .08) !important;
  box-sizing: border-box !important;
  color: #111 !important;
  display: inline-flex !important;
  flex: none !important;
  font-size: .74rem !important;
  font-weight: 760 !important;
  height: 24px !important;
  inline-size: 58px !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  max-inline-size: 58px !important;
  max-width: 58px !important;
  min-height: 24px !important;
  min-inline-size: 58px !important;
  min-width: 58px !important;
  padding: 0 !important;
  text-align: center !important;
  text-shadow: none !important;
  transform: translateY(0) !important;
  white-space: nowrap !important;
  width: 58px !important;
}

html body .movies-container .movie-buttons .btn:hover,
html body .movies-wrapper .movie-buttons .btn:hover,
html body .movies-container .movie-buttons .btn:focus-visible,
html body .movies-wrapper .movie-buttons .btn:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 8px 18px rgba(17, 17, 17, .18) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

html body .diary-wrapper .diary-content {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .92) !important;
  box-shadow: 0 10px 26px rgba(30, 42, 68, .08) !important;
}

html body .diary-wrapper .diary-card:hover .diary-content {
  box-shadow: 0 18px 38px rgba(30, 42, 68, .14) !important;
}

@media (max-width: 767px) {
  html body .content:has(.books-container),
  html body .content:has(.movies-container),
  html body .content:has(.diary-wrapper) {
    border-radius: 24px !important;
    padding: 14px !important;
  }

  html body .books-wrapper,
  html body .movies-wrapper,
  html body .diary-wrapper {
    margin-bottom: 0 !important;
  }
}

/* Standard archive, tag, category and about pages: one large page card only. */
html body .content.categories-page,
html body .content.page.posts-expand,
html body .content.archive,
html body .content.category,
html body .content.tag {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 46px rgba(30, 42, 68, .11) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  padding: clamp(18px, 2.2vw, 28px) !important;
}

html body .content.categories-page {
  background: #fff !important;
}

html body .content.categories-page .categories-container {
  background: transparent !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  min-height: auto !important;
  padding: 0 !important;
  width: 100% !important;
}

html body .content.categories-page .categories-header-wrapper {
  margin: 0 0 24px !important;
  max-width: none !important;
}

html body .content.categories-page .categories-header-glass {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

html body .content.categories-page .stats-cards {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  justify-content: stretch !important;
  margin: 18px auto 0 !important;
  max-width: 720px !important;
  width: 100% !important;
}

html body .content.categories-page .stat-card {
  background: #f8fafc !important;
  border: 1px solid rgba(217, 224, 235, .9) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  min-width: 0 !important;
  width: 100% !important;
}

html body .content.categories-page .categories-grid {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

html body .content.categories-page .categories-container,
html body .content.categories-page .categories-header-wrapper,
html body .content.categories-page .categories-header-glass,
html body .content.categories-page .categories-header,
html body .content.page.posts-expand .post-block,
html body .content.archive .post-block,
html body .content.category .post-block,
html body .content.tag .post-block,
html body .content.tag .tag-cloud-section,
html body .content.page.posts-expand .tag-cloud,
html body .content.page.posts-expand .tag-cloud-tags,
html body .content.tag .tag-cloud-tags {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

html body .content.page.posts-expand .post-content,
html body .content.page.posts-expand .post-body,
html body .content.page.posts-expand .tag-cloud,
html body .content.page.posts-expand .tag-cloud-section,
html body .content.page.posts-expand .category-all-page,
html body .content.page.posts-expand .category-all,
html body .content.page.posts-expand .event-list,
html body .content.page.posts-expand .album-wrapper,
html body .content.page.posts-expand .categories-container,
html body .content.page.posts-expand .categories-header-glass {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

html body .content.page.posts-expand .post-content,
html body .content.page.posts-expand .post-body {
  padding: 0 !important;
}

html body .content.page.posts-expand .tag-cloud,
html body .content.page.posts-expand .category-all-page,
html body .content.page.posts-expand .event-list {
  margin: 0 !important;
  width: 100% !important;
}

html body .content.page.posts-expand .tag-cloud-tags {
  padding: 0 !important;
}

html body .content.page.posts-expand .tag-cloud-section {
  margin: 0 !important;
  padding: 0 !important;
}

html body .content.page.posts-expand .category-all-title,
html body .content.page.posts-expand .tag-cloud-title {
  margin: 0 0 12px !important;
}

html body .content.categories-page .categories-header-glass {
  padding-top: 0 !important;
}

html body .content.categories-page .stats-cards {
  background: transparent !important;
  box-shadow: none !important;
  margin-bottom: clamp(18px, 2.2vw, 28px) !important;
}

html body .content.categories-page .stat-card {
  background: #f8fafc !important;
  border: 1px solid rgba(217, 224, 235, .9) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}

html body .content.categories-page .category-card-glass {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .92) !important;
  box-shadow: 0 10px 26px rgba(30, 42, 68, .08) !important;
}

html body .content.categories-page .category-card-wrapper,
html body .content.categories-page .category-card-content,
html body .content.categories-page .category-card-image-section {
  background: transparent !important;
}

html body .content.archive .collection-title,
html body .content.archive .collection-year,
html body .content.category .collection-title,
html body .content.category .collection-year,
html body .content.tag .collection-title,
html body .content.tag .collection-year {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .content.archive .posts-collapse,
html body .content.archive .collection-title,
html body .content.category .posts-collapse,
html body .content.category .collection-title,
html body .content.tag .posts-collapse,
html body .content.tag .collection-title,
html body .content.tag .tag-cloud-section {
  background: transparent !important;
  box-sizing: border-box !important;
}

html body .content.archive .posts-collapse,
html body .content.category .posts-collapse,
html body .content.tag .posts-collapse {
  padding: 0 !important;
}

html body .content.archive .collection-title,
html body .content.category .collection-title,
html body .content.tag .collection-title {
  margin: 0 0 18px !important;
}

html body .content.page.posts-expand .post-block > *,
html body .content.archive .post-block > *,
html body .content.category .post-block > *,
html body .content.tag .post-block > * {
  max-width: 100% !important;
}

html body .content.archive .post-block,
html body .content.category .post-block,
html body .content.tag .post-block,
html body .content.page.posts-expand .post-block {
  padding: 0 !important;
}

html body .album-wrapper {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
}

html body .photo-frame {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .92) !important;
  box-shadow: 0 10px 26px rgba(30, 42, 68, .08) !important;
}

html body .tag-cloud-section {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .tag-cloud-link {
  box-shadow: none !important;
  text-shadow: none !important;
}

@media (max-width: 767px) {
  html body .content.categories-page,
  html body .content.page.posts-expand,
  html body .content.archive,
  html body .content.category,
  html body .content.tag {
    border-radius: 24px !important;
    padding: 14px !important;
  }
}
/* Password gate card */
html body .hbe.hbe-container,
html body .password-gate.hbe-container {
  background: #fff !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 40px rgba(30, 42, 68, .12) !important;
  box-sizing: border-box !important;
  color: #202938 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 20px auto !important;
  max-width: min(520px, calc(100% - 24px)) !important;
  overflow: hidden !important;
  padding: 16px 18px 14px !important;
}

html body .hbe.hbe-content,
html body .password-gate .hbe.hbe-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

html body .hbe.hbe-form,
html body .password-gate .hbe.hbe-form {
  align-items: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 0 !important;
  width: 100% !important;
}

html body .hbe.hbe-input,
html body .hbe.hbe-input-default {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

html body .hbe.hbe-input-field,
html body .hbe.hbe-input-field-default {
  background: #f8fafc !important;
  border: 1px solid rgba(217, 224, 235, .96) !important;
  border-radius: 20px !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03) !important;
  box-sizing: border-box !important;
  color: #202938 !important;
  font-size: .95rem !important;
  height: 48px !important;
  line-height: 48px !important;
  opacity: 1 !important;
  padding: 0 16px !important;
  width: 100% !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
}

html body .hbe.hbe-input-field:focus,
html body .hbe.hbe-input-field-default:focus {
  background: #fff !important;
  border-color: #111 !important;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, .08) !important;
  outline: none !important;
}

html body .hbe.hbe-input-label,
html body .hbe.hbe-input-label-default {
  color: #7b8596 !important;
  font-size: .82rem !important;
  margin: 0 !important;
  width: 100% !important;
}

html body .hbe.hbe-input-label-default::before,
html body .hbe.hbe-input-label-default::after {
  background: transparent !important;
  content: none !important;
  display: none !important;
}

html body .hbe.hbe-button {
  align-items: center !important;
  background: #111 !important;
  border: 1px solid #111 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 22px rgba(17, 17, 17, .16) !important;
  color: #fff !important;
  display: inline-flex !important;
  font-weight: 700 !important;
  height: 40px !important;
  justify-content: center !important;
  min-height: 40px !important;
  margin: 2px auto 0 !important;
  padding: 0 18px !important;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease !important;
}

html body .hbe.hbe-button:hover,
html body .hbe.hbe-button:focus-visible {
  background: #000 !important;
  box-shadow: 0 14px 26px rgba(17, 17, 17, .22) !important;
  transform: translateY(-1px) !important;
}

html body .hbe.hbe-error {
  color: #b42318 !important;
  font-size: .88rem !important;
  margin-top: 2px !important;
  min-height: 1.2em !important;
  width: 100% !important;
}

html body .hbe.hbe-container #hbeForm,
html body .password-gate #hbeForm {
  width: 100% !important;
}

html body .hbe.hbe-input-field-default {
  background: #fff !important;
  color: #202938 !important;
}

html body .hbe.hbe-input-default .hbe-input-field-default {
  box-shadow: none !important;
}

html body .hbe.hbe-input-default .hbe-input-label-default {
  display: block !important;
  float: none !important;
  padding: 0 0 2px !important;
  position: static !important;
  text-align: left !important;
  width: 100% !important;
}

html body .hbe.hbe-input-label-content-default {
  color: #7b8596 !important;
}

html body .password-gate .password-gate-content {
  display: none !important;
}

/* Index post previews: one fixed cover size, no alternating height. */
html body .content.index .post-card-preview {
  align-items: stretch !important;
  display: grid !important;
  gap: 0 !important;
  grid-template-columns: minmax(320px, 34%) minmax(0, 1fr) !important;
  min-height: 220px !important;
}

html body .content.index .post-card-preview .post-card-cover {
  aspect-ratio: 16 / 10 !important;
  display: block !important;
  height: 100% !important;
  min-height: 220px !important;
  overflow: hidden !important;
  width: 100% !important;
}

html body .content.index .post-card-preview .post-card-cover img {
  display: block !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  width: 100% !important;
}

html body .content.index .post-card-preview:nth-of-type(even),
html body .content.index .post-card-preview {
  grid-template-columns: minmax(320px, 34%) minmax(0, 1fr) !important;
}

html body #hbePass {
  ime-mode: disabled !important;
  text-transform: none !important;
}

html body .hbe.hbe-input-field,
html body .hbe.hbe-input-field-default {
  letter-spacing: 0 !important;
}

/* iPad/tablet books layout: keep every card inside the grid. */
@media (min-width: 768px) and (max-width: 1180px) {
  html body .books-container .books-wrapper,
  html body .books-wrapper {
    box-sizing: border-box !important;
    padding: 22px 18px 18px !important;
  }

  html body .books-container .page-header,
  html body .books-container .books-front .page-header,
  html body .books-container .books-friends .page-header {
    padding: 0 12px !important;
  }

  html body .books-container .books-grid,
  html body .books-wrapper .books-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 12px !important;
  }

  html body .books-container .book-card,
  html body .books-wrapper .book-card {
    min-width: 0 !important;
    width: 100% !important;
  }

  html body .books-container .book-cover,
  html body .books-wrapper .book-cover {
    aspect-ratio: 3 / 4 !important;
  }

  html body .books-container .book-title-overlay,
  html body .books-wrapper .book-title-overlay {
    font-size: .72rem !important;
    padding: 5px 7px !important;
  }

  html body .books-container .book-buttons,
  html body .books-wrapper .book-buttons {
    gap: 6px !important;
    grid-auto-columns: 54px !important;
    padding: 8px 6px 12px !important;
  }

  html body .books-container .book-buttons .btn,
  html body .books-wrapper .book-buttons .btn {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    font-size: .72rem !important;
  }
}

/* Final index card override: lock every preview card to one shape. */
html body .content.index .post-block.post-card-preview,
html body .content.index .post-block.post-card-preview:nth-of-type(even) {
  align-items: stretch !important;
  display: grid !important;
  gap: 0 !important;
  grid-auto-flow: row !important;
  grid-template-columns: minmax(340px, 36%) minmax(0, 1fr) !important;
  min-height: 228px !important;
  overflow: hidden !important;
}

html body .content.index .post-block.post-card-preview .post-card-cover {
  aspect-ratio: 16 / 10 !important;
  align-self: stretch !important;
  display: block !important;
  height: 100% !important;
  min-height: 228px !important;
  overflow: hidden !important;
  width: 100% !important;
}

html body .content.index .post-block.post-card-preview .post-card-cover img {
  display: block !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  width: 100% !important;
}

html body .content.index .post-block.post-card-preview .post-card-info {
  min-width: 0 !important;
  padding: 22px 24px !important;
}

/* Generated page submenus are handled by the header dropdown; keep raw page-level lists hidden. */
html body .content-wrap > #sub-menu,
html body .content-wrap > #sub-menu-2,
html body .content-wrap > .sub-menu {
  display: none !important;
}

/* Final tag palette: tags stay colorful, then turn black on hover. */
html body .sidebar-tag-cloud-list,
html body .tag-cloud-tags {
  align-items: flex-start !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  line-height: 1 !important;
  overflow: visible !important;
}

html body .sidebar-tag-cloud-list a,
html body .tag-cloud-tags a,
html body .tag-cloud-link {
  align-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  display: inline-flex !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  margin: 0 !important;
  min-height: 32px !important;
  padding: 0 11px !important;
  text-decoration: none !important;
  text-shadow: none !important;
  transition: background-color .24s ease, border-color .24s ease, box-shadow .24s ease, color .24s ease, transform .24s ease !important;
}

html body .sidebar-tag-cloud-list a::after,
html body .tag-cloud-tags a::after,
html body .tag-cloud-link::after {
  display: none !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+1),
html body .tag-cloud-tags a:nth-child(8n+1),
html body .tag-cloud-link:nth-child(8n+1) {
  background: #edf5ff !important;
  color: #2767c7 !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+2),
html body .tag-cloud-tags a:nth-child(8n+2),
html body .tag-cloud-link:nth-child(8n+2) {
  background: #fff0ea !important;
  color: #b95537 !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+3),
html body .tag-cloud-tags a:nth-child(8n+3),
html body .tag-cloud-link:nth-child(8n+3) {
  background: #edf9f1 !important;
  color: #2a8052 !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+4),
html body .tag-cloud-tags a:nth-child(8n+4),
html body .tag-cloud-link:nth-child(8n+4) {
  background: #f4efff !important;
  color: #7250ba !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+5),
html body .tag-cloud-tags a:nth-child(8n+5),
html body .tag-cloud-link:nth-child(8n+5) {
  background: #fff7db !important;
  color: #927017 !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+6),
html body .tag-cloud-tags a:nth-child(8n+6),
html body .tag-cloud-link:nth-child(8n+6) {
  background: #eaf8f8 !important;
  color: #1f7884 !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n+7),
html body .tag-cloud-tags a:nth-child(8n+7),
html body .tag-cloud-link:nth-child(8n+7) {
  background: #fceeff !important;
  color: #9a4aa8 !important;
}

html body .sidebar-tag-cloud-list a:nth-child(8n),
html body .tag-cloud-tags a:nth-child(8n),
html body .tag-cloud-link:nth-child(8n) {
  background: #eef2ff !important;
  color: #4e5fc4 !important;
}

html body .sidebar-tag-cloud-list a:hover,
html body .sidebar-tag-cloud-list a:focus-visible,
html body .tag-cloud-tags a:hover,
html body .tag-cloud-tags a:focus-visible,
html body .tag-cloud-link:hover,
html body .tag-cloud-link:focus-visible {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .16) !important;
  color: #fff !important;
  filter: none !important;
  transform: translateY(-2px) !important;
}

html body .sidebar-tag-cloud-list a:hover *,
html body .sidebar-tag-cloud-list a:focus-visible *,
html body .tag-cloud-tags a:hover *,
html body .tag-cloud-tags a:focus-visible *,
html body .tag-cloud-link:hover *,
html body .tag-cloud-link:focus-visible * {
  color: #fff !important;
}

/* Current child items use the same black-and-white active state as parent menu items. */
html body .header-inner .main-menu > .menu-item-has-children > .menu-child .menu-item-active > a,
html body .content-wrap > .sub-menu .menu-item-active > a,
html body .content-wrap > #sub-menu .menu-item-active > a,
html body .content-wrap > #sub-menu-2 .menu-item-active > a {
  background: #111 !important;
  border-color: #111 !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .14) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html body .header-inner .main-menu > .menu-item-has-children > .menu-child .menu-item-active > a *,
html body .content-wrap > .sub-menu .menu-item-active > a *,
html body .content-wrap > #sub-menu .menu-item-active > a *,
html body .content-wrap > #sub-menu-2 .menu-item-active > a * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Posts with a real TOC should show only the TOC sidebar; posts without headings keep the normal sidebar. */
html body .sidebar:has(.post-toc-wrap) {
  overflow: visible !important;
}

html body .sidebar:has(.post-toc-wrap) .sidebar-inner,
html body .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
html body .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
html body .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-bottom {
  align-self: start !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  max-height: calc(100vh - 24px) !important;
  overflow: hidden !important;
  position: sticky !important;
  top: 18px !important;
  width: 100% !important;
}

html body .sidebar:has(.post-toc-wrap) .site-overview-wrap,
html body .sidebar:has(.post-toc-wrap) .sidebar-profile-card,
html body .sidebar:has(.post-toc-wrap) .sidebar-card,
html body .sidebar:has(.post-toc-wrap) .links-of-blogroll,
html body .sidebar:has(.post-toc-wrap) .sidebar-button,
html body .sidebar:has(.post-toc-wrap) .cc-license,
html body .sidebar:has(.post-toc-wrap) .back-to-top {
  display: none !important;
}

html body .sidebar:has(.post-toc-wrap) .sidebar-nav {
  border-radius: 24px 24px 0 0 !important;
  flex: 0 0 auto !important;
}

html body .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  border-radius: 0 0 24px 24px !important;
  display: block !important;
  flex: 1 1 auto !important;
  margin: -1px 0 0 !important;
  max-height: calc(100vh - 80px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 12px 14px 14px !important;
  position: relative !important;
}

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

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

/* Final TOC behavior lock: keep light-mode TOC sticky and remove clipped square shadows. */
html body .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 .sidebar:has(.post-toc-wrap) .sidebar-inner,
html body .sidebar:has(.post-toc-wrap) .sidebar-inner.affix,
html body .sidebar:has(.post-toc-wrap) .sidebar-inner.affix-top,
html body .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(30, 42, 68, .08)) !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 .sidebar:has(.post-toc-wrap) .sidebar-nav,
html body .sidebar:has(.post-toc-wrap) .post-toc-wrap {
  background-clip: padding-box !important;
  box-shadow: none !important;
  position: relative !important;
}

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

html body .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 .sidebar:has(.post-toc-wrap) .post-toc,
html body .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 .sidebar:has(.post-toc-wrap) .post-toc-wrap::before,
html body .sidebar:has(.post-toc-wrap) .post-toc-wrap::after,
html body .sidebar:has(.post-toc-wrap) .post-toc::before,
html body .sidebar:has(.post-toc-wrap) .post-toc::after,
html body .sidebar:has(.post-toc-wrap) .nav-item::before,
html body .sidebar:has(.post-toc-wrap) .nav-item::after {
  display: none !important;
}

@media (max-width: 767px) {
  html body .sidebar:has(.post-toc-wrap) {
    display: none !important;
    position: static !important;
  }
}

/* Keep the article TOC close to the viewport top while preserving its inner scroll. */
html body .sidebar:has(.post-toc-wrap) {
  max-height: calc(100vh - 28px) !important;
  top: 14px !important;
}

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

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

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

/* Final TOC top offset: keep it close to the viewport edge. */
html body .sidebar:has(.post-toc-wrap) {
  max-height: calc(100vh - 16px) !important;
  top: 8px !important;
}

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

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

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

/* Movies lightbox: keep the detail card compact without changing the page grid. */
html body #movieLightbox .lightbox-content {
  box-sizing: border-box !important;
  margin: clamp(18px, 4vh, 34px) auto !important;
  max-height: calc(100vh - 40px) !important;
  max-width: min(620px, calc(100vw - 32px)) !important;
  padding: clamp(18px, 2vw, 24px) !important;
  width: min(620px, calc(100vw - 32px)) !important;
}

html body #movieLightbox .lightbox-close {
  height: 38px !important;
  right: 14px !important;
  top: 14px !important;
  width: 38px !important;
}

html body #movieLightbox .movie-detail-header h2 {
  border-bottom-width: 1px !important;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem) !important;
  margin: 0 0 16px !important;
  padding: 0 42px 12px !important;
}

html body #movieLightbox .movie-info-container {
  gap: 20px !important;
  margin-bottom: 18px !important;
}

html body #movieLightbox .movie-poster-large {
  width: clamp(118px, 23vw, 154px) !important;
}

html body #movieLightbox .movie-poster-large img {
  border-radius: 14px !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22) !important;
}

html body #movieLightbox .movie-meta {
  font-size: .94rem !important;
  line-height: 1.48 !important;
}

html body #movieLightbox .movie-meta div {
  margin-bottom: 4px !important;
  padding: 1px 0 !important;
}

html body #movieLightbox .movie-meta strong {
  font-size: .94rem !important;
  min-width: 74px !important;
}

html body #movieLightbox .movie-category-tag {
  font-size: .74rem !important;
  margin: 2px !important;
  padding: 3px 8px !important;
}

html body #movieLightbox .movie-summary {
  border-left-width: 4px !important;
  border-radius: 14px !important;
  font-size: .96rem !important;
  line-height: 1.62 !important;
  margin-bottom: 16px !important;
  padding: 14px 16px !important;
}

html body #movieLightbox .movie-detail-footer {
  margin-top: 8px !important;
}

html body #movieLightbox .download-btn {
  min-height: 34px !important;
  padding: 0 16px !important;
}

@media (max-width: 767px) {
  html body .movies-container .movie-card,
  html body .movies-wrapper .movie-card {
    min-width: 0 !important;
  }

  html body .movies-container .movie-rating,
  html body .movies-wrapper .movie-rating {
    border-radius: 8px !important;
    box-sizing: border-box !important;
    max-width: calc(100% - 8px) !important;
    overflow: hidden !important;
    padding: 2px 4px !important;
    right: 4px !important;
    top: 4px !important;
  }

  html body .movies-container .movie-rating .stars,
  html body .movies-wrapper .movie-rating .stars {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  html body .movies-container .movie-rating .star,
  html body .movies-wrapper .movie-rating .star {
    flex: 0 0 .58em !important;
    font-size: clamp(.48rem, 2.15vw, .58rem) !important;
    line-height: 1 !important;
    width: .58em !important;
  }

  html body .movies-container .movie-rating .rating-number,
  html body .movies-wrapper .movie-rating .rating-number {
    flex: 0 0 auto !important;
    font-size: clamp(.56rem, 2.25vw, .66rem) !important;
    line-height: 1 !important;
    margin-left: 2px !important;
  }

  html body #movieLightbox .lightbox-content {
    margin: 16px auto !important;
    max-height: calc(100vh - 32px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 16px !important;
    width: calc(100vw - 24px) !important;
  }

  html body #movieLightbox .movie-detail-header h2 {
    font-size: 1.22rem !important;
    margin-bottom: 12px !important;
    padding: 0 36px 10px !important;
  }

  html body #movieLightbox .movie-info-container {
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  html body #movieLightbox .movie-poster-large {
    width: 92px !important;
  }

  html body #movieLightbox .movie-summary {
    font-size: .9rem !important;
    margin-bottom: 12px !important;
    padding: 12px 13px !important;
  }
}

@media (max-width: 380px) {
  html body .movies-container .movie-rating,
  html body .movies-wrapper .movie-rating {
    padding: 2px 3px !important;
  }

  html body .movies-container .movie-rating .star,
  html body .movies-wrapper .movie-rating .star {
    flex-basis: .54em !important;
    font-size: .48rem !important;
    width: .54em !important;
  }

  html body .movies-container .movie-rating .rating-number,
  html body .movies-wrapper .movie-rating .rating-number {
    font-size: .56rem !important;
    margin-left: 1px !important;
  }
}


/* mobile-fix.css */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body .header {
    margin: 8px auto 12px !important;
    padding: 0 10px !important;
    position: relative !important;
    top: auto !important;
  }

  body .header-inner {
    align-items: stretch !important;
    border-radius: 22px !important;
    flex-direction: column !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 12px !important;
    width: calc(100vw - 20px) !important;
  }

  body .site-title {
    font-size: .92rem !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  body .site-nav {
    display: block !important;
    width: 100% !important;
  }

  body .main-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 2px 2px 8px !important;
    scrollbar-width: none !important;
    width: 100% !important;
  }

  body .main-menu::-webkit-scrollbar {
    display: none !important;
  }

  body .main-menu > .menu-item {
    flex: 0 0 auto !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    font-size: .82rem !important;
    min-height: 34px !important;
    padding: 0 11px !important;
    white-space: nowrap !important;
  }

  body .main-menu > .menu-item-has-children > .menu-child {
    left: 0 !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 188px !important;
    position: absolute !important;
    transform: translateY(8px) !important;
  }

  body .main-menu > .menu-item-has-children:hover > .menu-child,
  body .main-menu > .menu-item-has-children:focus-within > .menu-child,
  body .main-menu > .menu-item-has-children > .menu-child:hover {
    transform: translateY(0) !important;
  }

  body .main {
    padding: 0 10px 28px !important;
  }

  body .main-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: calc(100vw - 20px) !important;
  }

  body .content-wrap,
  body .sidebar {
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body .sidebar {
    display: block !important;
    margin: 0 0 12px !important;
    order: 1 !important;
  }

  body .content-wrap {
    order: 2 !important;
  }

  body .sidebar-inner,
  body .site-overview-wrap {
    position: static !important;
    width: 100% !important;
  }

  body .sidebar-profile-card,
  body .sidebar-card,
  body .links-of-blogroll,
  body .content.index,
  body .content-wrap > .content:not(.index),
  body:not(.index) .post-block,
  body .page .post-block,
  body .gallery-container,
  body .books-container,
  body .movies-container,
  body .diary-container,
  body .lab-container,
  body .category-all-page,
  body .tag-cloud,
  body .archive,
  body .album-wrapper {
    border-radius: 22px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body .sidebar-profile-card {
    padding: 14px !important;
  }

  body .sidebar-profile-card .site-author-image {
    height: 72px !important;
    width: 72px !important;
  }

  body .sidebar-profile-card .site-description {
    font-size: .82rem !important;
    line-height: 1.45 !important;
    max-width: 100% !important;
  }

  body .sidebar-profile-card .links-of-author {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: none !important;
  }

  body .content.index .post-block.post-card-preview,
  body .content.index .post-block.post-card-preview:nth-of-type(even),
  body.index .post-card-preview,
  body.index .post-card-preview:nth-of-type(even) {
    align-items: stretch !important;
    display: grid !important;
    flex-direction: initial !important;
    grid-template-columns: minmax(118px, 38%) minmax(0, 1fr) !important;
    min-height: 164px !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover,
  body.index .post-card-preview .post-card-cover {
    align-self: stretch !important;
    aspect-ratio: auto !important;
    flex: initial !important;
    height: 100% !important;
    min-height: 164px !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover img,
  body.index .post-card-preview .post-card-cover img,
  body .post-body img,
  body .gallery-container img,
  body .album-card img {
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding: 14px 14px 12px !important;
  }

  body .content.index .post-card-preview .post-header {
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-title {
    font-size: 1rem !important;
    line-height: 1.32 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px 8px !important;
    line-height: 1.4 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-meta-item {
    margin: 0 !important;
  }

  body .content.index .post-card-preview .post-body {
    color: #4e5b70 !important;
    flex: 1 1 auto !important;
    font-size: .84rem !important;
    line-height: 1.55 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-body p {
    display: -webkit-box !important;
    margin: 0 !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body .content.index .post-card-preview .post-body::after {
    display: none !important;
  }

  body .content.index .post-card-preview .post-button {
    margin-top: 8px !important;
  }

  body .content.index .post-card-preview .post-button .btn {
    font-size: .78rem !important;
    min-height: 30px !important;
    min-width: 82px !important;
    padding: 0 12px !important;
  }

  body .posts-expand .post-header,
  body .post-body,
  body .post-footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body .posts-expand .post-title {
    font-size: 1.18rem !important;
    line-height: 1.35 !important;
  }

  body .post-meta {
    font-size: .78rem !important;
  }

  body .post-body {
    font-size: .94rem !important;
    line-height: 1.72 !important;
  }

  body .books-container,
  body .movies-container,
  body .gallery-container,
  body .diary-container {
    padding: 14px !important;
  }

  body .books-container .books-grid,
  body .books-wrapper .books-grid,
  body .movies-container .movies-grid,
  body .movies-wrapper .movies-grid,
  body .album-grid,
  body .gallery-grid {
    display: grid !important;
    gap: 14px !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  body .books-container .book-card,
  body .books-wrapper .book-card,
  body .movies-container .movie-card,
  body .movies-wrapper .movie-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body .books-container .book-buttons,
  body .books-wrapper .book-buttons,
  body .movies-container .movie-buttons,
  body .movies-wrapper .movie-buttons {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body .books-container .book-buttons .btn,
  body .books-wrapper .book-buttons .btn,
  body .movies-container .movie-buttons .btn,
  body .movies-wrapper .movie-buttons .btn {
    flex: 1 1 0 !important;
    max-width: 120px !important;
    min-width: 0 !important;
    width: auto !important;
  }

  html body .password-gate.hbe-container {
    margin: 10px auto 0 !important;
    padding: 18px !important;
    width: 100% !important;
  }

  html body .password-gate .hbe.hbe-content {
    width: 100% !important;
  }

  body #netease-player,
  body #sakana-widget-container,
  body .fireworks {
    display: none !important;
  }

  body .main-menu > .menu-item-has-children.is-touch-open > .menu-child {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    visibility: visible !important;
  }
}

@media (max-width: 420px) {
  body .content.index .post-block.post-card-preview,
  body .content.index .post-block.post-card-preview:nth-of-type(even),
  body.index .post-card-preview,
  body.index .post-card-preview:nth-of-type(even) {
    grid-template-columns: 42% minmax(0, 1fr) !important;
    min-height: 150px !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover,
  body.index .post-card-preview .post-card-cover {
    min-height: 150px !important;
  }

  body .content.index .post-card-preview .post-card-info {
    padding: 12px !important;
  }

  body .content.index .post-card-preview .post-title {
    font-size: .94rem !important;
  }

  body .content.index .post-card-preview .post-meta {
    font-size: .72rem !important;
  }

  body .content.index .post-card-preview .post-body p {
    -webkit-line-clamp: 2 !important;
  }

  body .sidebar-profile-card .links-of-author {
    grid-template-columns: 1fr !important;
  }

  body .sidebar-popular-item a {
    grid-template-columns: 24px minmax(0, 1fr) 44px !important;
    padding: 0 10px !important;
  }

  body .sidebar-popular-item time {
    min-width: 44px !important;
    width: 44px !important;
  }
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  body .sidebar,
  body .sidebar-inner,
  body .site-overview-wrap,
  body .site-author-widget,
  body .sidebar-panel,
  body .sidebar-toggle,
  body #sidebar-dimmer,
  body .post-toc-wrap,
  body .back-to-top {
    display: none !important;
  }

  body .header {
    padding: 0 10px !important;
  }

  body .header-inner {
    align-items: center !important;
    border-radius: 22px !important;
    flex-direction: row !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 10px 12px !important;
    width: calc(100vw - 20px) !important;
  }

  body .site-brand-container,
  body .site-subtitle,
  body .site-nav-toggle,
  body .site-nav-right {
    display: none !important;
  }

  body .site-nav,
  body .main-menu {
    width: 100% !important;
  }

  body .main-menu {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 2px 2px 4px !important;
    scrollbar-width: none !important;
  }

  body .main-menu::-webkit-scrollbar {
    display: none !important;
  }

  body .main-menu > .menu-item {
    flex: 0 0 auto !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    min-height: 34px !important;
    padding: 0 11px !important;
    white-space: nowrap !important;
  }

  body .main,
  body .main-inner,
  body .content-wrap {
    width: 100% !important;
  }

  body .main-inner {
    display: block !important;
  }

  body .content-wrap {
    margin: 0 !important;
    padding: 0 !important;
  }

  body .content.index .post-block.post-card-preview,
  body .content.index .post-block.post-card-preview:nth-of-type(even),
  body.index .post-card-preview,
  body.index .post-card-preview:nth-of-type(even) {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    min-height: 150px !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover,
  body.index .post-card-preview .post-card-cover {
    flex: 0 0 40% !important;
    height: auto !important;
    min-height: 150px !important;
    width: 40% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover img,
  body.index .post-card-preview .post-card-cover img {
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-info {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding: 12px 12px 10px !important;
  }

  body .content.index .post-card-preview .post-header {
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-title {
    font-size: .98rem !important;
    line-height: 1.28 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px 8px !important;
    line-height: 1.35 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-body {
    color: #4e5b70 !important;
    flex: 1 1 auto !important;
    font-size: .84rem !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-body p {
    display: -webkit-box !important;
    margin: 0 !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body .content.index .post-card-preview .post-body::after {
    display: none !important;
  }

  body .content.index .post-card-preview .post-button {
    margin-top: 8px !important;
  }

  body .content.index .post-card-preview .post-button .btn {
    min-height: 30px !important;
    min-width: 82px !important;
    padding: 0 12px !important;
  }
}


/* media-performance.css */
.photo-image[data-src],
.movie-poster-img[data-src],
.album-thumb img[data-src] { visibility: hidden; }

/* These surfaces already have a fixed aspect ratio, so skipping their offscreen
   children does not change card heights, scrolling positions or image framing. */
#myBooksGrid .book-cover,
.album-grid .album-thumb,
#photo-wall .photo-frame {
  content-visibility: auto;
}

/* Album pagination replaces the growing load-more list. */
#album-pagination {
  --album-page-ink: #41464e;
  --album-page-muted: #777d85;
  --album-page-surface: #f3f4f6;
  --album-page-hover: #e9ecf0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 680px;
  margin: 32px auto 0;
  padding-top: 22px;
}
#album-pagination[hidden], #photoLightbox[hidden] { display: none !important; }
#album-pagination .album-page-button,
#album-pagination select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  margin: 0;
  padding: 8px 15px;
  background: var(--album-page-surface) !important;
  border: 0 !important;
  border-radius: 11px;
  box-shadow: none !important;
  color: var(--album-page-ink) !important;
  -webkit-text-fill-color: currentColor !important;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color .16s ease;
}
#prev-photo-page { justify-self: start; }
#next-photo-page { justify-self: end; }
#album-pagination .album-page-button:disabled {
  background: transparent !important;
  color: var(--album-page-muted) !important;
  opacity: .5;
  cursor: default;
}
#album-pagination .album-page-button:not(:disabled):hover,
#album-pagination select:hover { background: var(--album-page-hover) !important; }
#album-pagination :is(button, select):focus-visible {
  outline: 2px solid #8592a1 !important;
  outline-offset: 3px;
}
#album-pagination .album-page-info {
  color: var(--album-page-muted) !important;
  font-size: 14px;
  white-space: nowrap;
}
#album-pagination .album-page-info span {
  color: var(--album-page-ink) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#album-pagination .album-page-jump {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--album-page-muted) !important;
  font-size: 13px;
}
#album-pagination select { min-height: 36px; font-size: 13px; }
html body:is(.theme-force-dark, .dark-mode) #album-pagination,
html.dark-mode body #album-pagination {
  --album-page-ink: #eee8df;
  --album-page-muted: #b6ad9f;
  --album-page-surface: rgba(255, 248, 234, .07);
  --album-page-hover: rgba(255, 248, 234, .13);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html body:not(.theme-force-light) #album-pagination {
    --album-page-ink: #eee8df;
    --album-page-muted: #b6ad9f;
    --album-page-surface: rgba(255, 248, 234, .07);
    --album-page-hover: rgba(255, 248, 234, .13);
    color-scheme: dark;
  }
}
@media (max-width: 480px) {
  #album-pagination { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #album-pagination .album-page-info { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  #album-pagination .album-page-button { justify-self: stretch; }
}
#photoLightbox .lightbox-arrow, #photoLightbox .lightbox-close {
  appearance: none;
  border: 0;
  font-family: inherit;
  line-height: inherit;
}
#photoLightbox .lightbox-close { padding: 0; }
#photoLightbox .lightbox-arrow { background: transparent; }
#photoLightbox :is(button, img):focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
#photoLightbox [hidden] { display: none !important; }
