/* Site polish: calm reading surfaces and distinct functional pages. */
:root {
  --ui-ink: #1f2933;
  --ui-heading: #14212b;
  --ui-muted: #68737d;
  --ui-faint: #8c969e;
  --ui-surface: rgba(255, 255, 255, 0.96);
  --ui-surface-solid: #ffffff;
  --ui-surface-soft: #f4f7f6;
  --ui-border: rgba(31, 41, 51, 0.11);
  --ui-border-strong: rgba(31, 41, 51, 0.18);
  --ui-amber: #bd7d1d;
  --ui-amber-soft: #fff6e7;
  --ui-teal: #18756f;
  --ui-teal-soft: #eaf7f5;
  --ui-coral: #bf6252;
  --ui-coral-soft: #fff0ed;
  --ui-blue: #4673a0;
  --ui-blue-soft: #eef5fb;
  --ui-plum: #85627f;
  --ui-plum-soft: #f7f0f6;
  --ui-shadow-sm: 0 4px 14px rgba(28, 39, 49, 0.06);
  --ui-shadow-md: 0 12px 32px rgba(28, 39, 49, 0.09);
  --page-sky: #d8f0f4;
  --page-paper: #c6e3eb;
  --page-texture: rgba(34, 113, 148, 0.11);
  --card-bg: var(--ui-surface);
  --font-color: var(--ui-ink);
  --text-highlight-color: var(--ui-heading);
  --card-meta: var(--ui-muted);
  --btn-bg: var(--ui-teal);
  --btn-hover-color: #115e59;
  --pseudo-hover: var(--ui-coral);
}

[data-theme='dark'] {
  --ui-ink: #dbe2e6;
  --ui-heading: #f4f7f8;
  --ui-muted: #a6b0b7;
  --ui-faint: #7f8b93;
  --ui-surface: rgba(27, 34, 39, 0.97);
  --ui-surface-solid: #1b2227;
  --ui-surface-soft: #202a30;
  --ui-border: rgba(226, 232, 236, 0.12);
  --ui-border-strong: rgba(226, 232, 236, 0.2);
  --ui-amber: #e1a64d;
  --ui-amber-soft: #352b1d;
  --ui-teal: #56b7af;
  --ui-teal-soft: #193330;
  --ui-coral: #df897a;
  --ui-coral-soft: #3b2725;
  --ui-blue: #7fa9d1;
  --ui-blue-soft: #202f3d;
  --ui-plum: #b995b3;
  --ui-plum-soft: #332833;
  --ui-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.22);
  --ui-shadow-md: 0 14px 36px rgba(0, 0, 0, 0.32);
  --page-sky: #161e2b;
  --page-paper: #151b27;
  --page-texture: rgba(142, 189, 225, 0.035);
  --card-bg: var(--ui-surface);
  --font-color: var(--ui-ink);
  --text-highlight-color: var(--ui-heading);
  --card-meta: var(--ui-muted);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--page-paper);
  background-image:
    repeating-linear-gradient(0deg, var(--page-texture) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.17) 0 1px, transparent 1px 7px);
  color: var(--ui-ink);
}

[data-theme='dark'] body {
  background-color: var(--page-paper);
}

#web_bg {
  background-color: var(--page-paper) !important;
  background-image:
    radial-gradient(ellipse 54% 38% at 14% 12%, rgba(252, 255, 255, 0.78), transparent 72%),
    radial-gradient(ellipse 46% 34% at 82% 74%, rgba(89, 169, 203, 0.42), transparent 74%),
    linear-gradient(180deg, var(--page-sky) 0, var(--page-paper) 620px) !important;
}

[data-theme='dark'] #web_bg {
  background-color: var(--page-paper) !important;
  background-image:
    radial-gradient(ellipse 70% 24% at 50% 0%, rgba(54, 90, 124, 0.35), transparent 100%),
    linear-gradient(180deg, var(--page-sky) 0, var(--page-paper) 620px) !important;
}

/* Sparse floral line work echoes the sunflower motif without competing with content. */
#web_bg::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.68;
  background-image:
    radial-gradient(ellipse 9px 21px at 13% 29%, transparent 67%, rgba(95, 162, 192, 0.2) 69% 72%, transparent 74%),
    radial-gradient(ellipse 9px 21px at 18% 25%, transparent 67%, rgba(95, 162, 192, 0.2) 69% 72%, transparent 74%),
    radial-gradient(ellipse 21px 9px at 14% 24%, transparent 67%, rgba(95, 162, 192, 0.2) 69% 72%, transparent 74%),
    radial-gradient(ellipse 21px 9px at 18% 29%, transparent 67%, rgba(95, 162, 192, 0.2) 69% 72%, transparent 74%),
    radial-gradient(circle 3px at 16% 27%, rgba(246, 193, 88, 0.24) 0 55%, transparent 58%),
    radial-gradient(ellipse 8px 18px at 84% 42%, transparent 67%, rgba(226, 167, 93, 0.18) 69% 72%, transparent 74%),
    radial-gradient(ellipse 8px 18px at 88% 38%, transparent 67%, rgba(226, 167, 93, 0.18) 69% 72%, transparent 74%),
    radial-gradient(ellipse 18px 8px at 84% 38%, transparent 67%, rgba(226, 167, 93, 0.18) 69% 72%, transparent 74%),
    radial-gradient(ellipse 18px 8px at 88% 42%, transparent 67%, rgba(226, 167, 93, 0.18) 69% 72%, transparent 74%),
    radial-gradient(circle 3px at 86% 40%, rgba(91, 157, 190, 0.22) 0 55%, transparent 58%),
    radial-gradient(ellipse 7px 15px at 30% 77%, transparent 67%, rgba(142, 180, 205, 0.15) 69% 72%, transparent 74%),
    radial-gradient(ellipse 15px 7px at 33% 80%, transparent 67%, rgba(142, 180, 205, 0.15) 69% 72%, transparent 74%);
}

[data-theme='dark'] #web_bg::after {
  opacity: 0.48;
  background-image:
    radial-gradient(ellipse 9px 21px at 13% 29%, transparent 67%, rgba(122, 183, 211, 0.24) 69% 72%, transparent 74%),
    radial-gradient(ellipse 9px 21px at 18% 25%, transparent 67%, rgba(122, 183, 211, 0.24) 69% 72%, transparent 74%),
    radial-gradient(ellipse 21px 9px at 14% 24%, transparent 67%, rgba(122, 183, 211, 0.24) 69% 72%, transparent 74%),
    radial-gradient(ellipse 21px 9px at 18% 29%, transparent 67%, rgba(122, 183, 211, 0.24) 69% 72%, transparent 74%),
    radial-gradient(circle 3px at 16% 27%, rgba(235, 190, 105, 0.28) 0 55%, transparent 58%),
    radial-gradient(ellipse 8px 18px at 84% 42%, transparent 67%, rgba(224, 178, 111, 0.2) 69% 72%, transparent 74%),
    radial-gradient(ellipse 8px 18px at 88% 38%, transparent 67%, rgba(224, 178, 111, 0.2) 69% 72%, transparent 74%),
    radial-gradient(ellipse 18px 8px at 84% 38%, transparent 67%, rgba(224, 178, 111, 0.2) 69% 72%, transparent 74%),
    radial-gradient(ellipse 18px 8px at 88% 42%, transparent 67%, rgba(224, 178, 111, 0.2) 69% 72%, transparent 74%),
    radial-gradient(circle 3px at 86% 40%, rgba(122, 183, 211, 0.26) 0 55%, transparent 58%),
    radial-gradient(ellipse 7px 15px at 30% 77%, transparent 67%, rgba(151, 188, 211, 0.18) 69% 72%, transparent 74%),
    radial-gradient(ellipse 15px 7px at 33% 80%, transparent 67%, rgba(151, 188, 211, 0.18) 69% 72%, transparent 74%);
}

/* Daytime keeps rain and ripples while reserving petals for the night scene. */
html:not([data-theme='dark']) #web_bg::after {
  display: none;
}

html:not([data-theme='dark']) .petal-layer {
  display: none;
}

/* Independently timed petals make the motion visible without becoming a screen effect. */
.petal-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  pointer-events: none;
}

.effects-disabled .petal-layer,
.effects-disabled .day-rain-layer,
.effects-disabled .night-star-layer {
  display: none !important;
}

.petal {
  position: absolute;
  top: -12vh;
  left: var(--petal-left);
  width: var(--petal-size);
  height: calc(var(--petal-size) * 0.68);
  opacity: 0;
  will-change: transform, opacity;
  animation: petal-fall var(--petal-duration) var(--petal-delay) linear infinite;
}

.petal-sky { --petal-color: #78b9d8; }
.petal-sun { --petal-color: #efbc68; }
.petal-rose { --petal-color: #dba0b3; }

.petal::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--petal-color) 70%, white);
  border-radius: 100% 0 100% 0;
  background: color-mix(in srgb, var(--petal-color) 60%, transparent);
  box-shadow: inset 3px -2px 5px rgba(255, 255, 255, 0.32);
  animation: petal-spin var(--petal-spin) ease-in-out infinite alternate;
}

@keyframes petal-fall {
  0% { opacity: 0; transform: translate3d(0, -12vh, 0); }
  8% { opacity: var(--petal-opacity); }
  88% { opacity: var(--petal-opacity); }
  100% { opacity: 0; transform: translate3d(var(--petal-drift), 118vh, 0); }
}

@keyframes petal-spin {
  from { transform: rotate(-28deg) scale(0.88); }
  to { transform: rotate(222deg) scale(1.08); }
}

[data-theme='dark'] .petal {
  animation-name: night-petal-fall;
  filter: saturate(0.9) brightness(0.96);
}

[data-theme='dark'] .petal-sky { --petal-color: #78d3ef; }
[data-theme='dark'] .petal-sun { --petal-color: #b9a2eb; }
[data-theme='dark'] .petal-rose { --petal-color: #e49cbf; }

[data-theme='dark'] .petal::before {
  animation-name: night-petal-spin;
  box-shadow: inset 3px -2px 5px rgba(207, 231, 255, 0.22);
}

@keyframes night-petal-fall {
  0% { opacity: 0; transform: translate3d(0, -12vh, 0); }
  10% { opacity: var(--petal-night-opacity); }
  52% { transform: translate3d(var(--petal-night-drift), 52vh, 0); }
  88% { opacity: var(--petal-night-opacity); }
  100% { opacity: 0; transform: translate3d(var(--petal-drift), 118vh, 0); }
}

@keyframes night-petal-spin {
  from { transform: rotate(18deg) scale(0.8); }
  to { transform: rotate(-196deg) scale(1.04); }
}

.day-rain-layer,
.night-star-layer {
  position: fixed;
  inset: 0;
  z-index: 199;
  overflow: hidden;
  pointer-events: none;
}

.rain-impact {
  position: absolute;
  top: var(--impact-top);
  left: var(--impact-left);
  width: var(--impact-size);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.rain-drop {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  height: 28px;
  opacity: 0;
  border-radius: 1px;
  background: rgba(234, 252, 255, 0.95);
  box-shadow: 0 0 7px rgba(226, 249, 255, 0.58);
  transform: translateX(-50%) rotate(12deg);
  will-change: transform, opacity;
  animation: rain-drop var(--impact-duration) var(--impact-delay) linear infinite;
}

.water-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  aspect-ratio: 3.2;
  border: 1.5px solid rgba(232, 252, 255, 0.96);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(134, 209, 232, 0.68), inset 0 0 11px rgba(236, 254, 255, 0.3);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  will-change: transform, opacity;
  animation: water-ripple var(--impact-duration) var(--impact-delay) ease-out infinite;
}

.water-ripple::after {
  content: '';
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(224, 251, 255, 0.8);
  border-radius: inherit;
}

@keyframes rain-drop {
  0% { opacity: 0; transform: translate(-50%, -72px) rotate(12deg); }
  11% { opacity: 0.92; }
  37% { opacity: 0.9; transform: translate(-50%, 0) rotate(12deg); }
  42%, 100% { opacity: 0; transform: translate(-50%, 0) rotate(12deg); }
}

@keyframes water-ripple {
  0%, 36% { opacity: 0; transform: translate(-50%, -50%) scale(0.25); }
  44% { opacity: 0.96; transform: translate(-50%, -50%) scale(0.4); }
  74% { opacity: 0.42; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.25); }
}

.night-star-layer,
.night-star {
  display: none;
}

[data-theme='dark'] .day-rain-layer {
  display: none;
}

[data-theme='dark'] .night-star-layer {
  display: block;
}

[data-theme='dark'] .night-star {
  display: block;
  position: absolute;
  top: var(--effect-top);
  left: var(--effect-left);
  width: var(--effect-size);
  height: var(--effect-size);
  opacity: 0;
  animation: night-twinkle var(--effect-duration) var(--effect-delay) ease-in-out infinite;
}

[data-theme='dark'] .night-star::before,
[data-theme='dark'] .night-star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: #c8e9ff;
  box-shadow: 0 0 8px rgba(144, 211, 255, 0.72);
  transform: translate(-50%, -50%);
}

[data-theme='dark'] .night-star::before {
  width: 1px;
  height: 100%;
}

[data-theme='dark'] .night-star::after {
  width: 100%;
  height: 1px;
}

@keyframes night-twinkle {
  0%, 100% { opacity: 0.04; transform: rotate(0deg) scale(0.5); }
  50% { opacity: 0.92; transform: rotate(45deg) scale(1); }
}
}

@media (max-width: 768px) {
  .petal:nth-child(n + 13) {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .petal-layer,
  .day-rain-layer,
  .night-star-layer {
    display: none;
  }
}

a {
  color: var(--ui-teal);
}

a:hover {
  color: var(--ui-coral);
}

#body-wrap a:not(.article-title):not(.article-sort-item-title) {
  border-bottom-color: transparent;
}

/* Header and navigation */
#page-header {
  z-index: 100;
  overflow: visible;
}

#page-header.full_page {
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  background-position: center 46%;
}

#page-header.full_page::before {
  background: linear-gradient(105deg, rgba(5, 24, 38, 0.84) 0%, rgba(8, 34, 50, 0.76) 42%, rgba(8, 35, 51, 0.48) 72%, rgba(8, 35, 51, 0.3) 100%);
}

#page-header.full_page #nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 32, 44, 0.14);
  backdrop-filter: blur(10px);
}

#page-header.full_page #site-info {
  top: 48%;
  left: max(7vw, 64px);
  width: min(600px, 48vw);
  padding: 0;
  text-align: left;
  transform: translateY(-50%);
}

#page-header.full_page #site-info::before {
  display: block;
  width: 54px;
  height: 3px;
  margin: 0 0 22px;
  background: #f3c978;
  content: '';
}

#page-header.full_page #site-title {
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 3.45rem;
  line-height: 1.15;
  text-align: left;
  letter-spacing: 0;
  text-shadow: 0 3px 18px rgba(2, 14, 23, 0.88), 0 1px 2px rgba(2, 14, 23, 0.8);
}

#page-header.full_page #site-subtitle {
  display: none;
}

#page-header.full_page #site_social_icons {
  display: none;
}

#page-header.full_page #site_social_icons .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(17, 30, 38, 0.24);
  backdrop-filter: blur(8px);
}

#page-header.full_page #site_social_icons i {
  color: #fff !important;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 26px;
}

.home-hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 6px;
  color: #fff !important;
  font-size: 0.87rem;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.home-hero-primary { background: rgba(240, 185, 96, 0.24); }
.home-hero-secondary { background: rgba(11, 37, 52, 0.2); }
.home-hero-actions a:hover { border-color: rgba(255, 255, 255, 0.66) !important; background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }

.home-hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  margin-top: 30px;
}

.home-hero-stats span {
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 0 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.home-hero-stats span:first-child { padding-left: 0; border-left: 0; }
.home-hero-stats strong { color: #fff; font-size: 1.22rem; line-height: 1.15; text-shadow: 0 2px 8px rgba(2, 14, 23, 0.74); }
.home-hero-stats small { margin-top: 5px; color: rgba(255, 255, 255, 0.92); font-size: 0.76rem; text-shadow: 0 1px 5px rgba(2, 14, 23, 0.76); }

.home-hero-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 112px;
  margin: 0;
  padding: 24px max(6vw, 48px);
  border-top: 1px solid rgba(116, 183, 198, 0.22);
  border-bottom: 1px solid var(--ui-border);
  background: rgba(247, 252, 251, 0.94);
  color: var(--ui-heading);
}

.home-hero-bridge > div { display: flex; flex-direction: column; gap: 6px; }
.home-hero-bridge span { color: var(--ui-teal); font-size: 0.68rem; font-weight: 780; letter-spacing: 0.1em; }
.home-hero-bridge strong { font-size: 1.08rem; font-weight: 720; line-height: 1.5; }
.home-hero-bridge a { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--ui-teal) !important; font-size: 0.85rem; font-weight: 760; }
.home-hero-bridge a i { transition: transform 0.2s ease; }
.home-hero-bridge a:hover i { transform: translateY(3px); }

[data-theme='dark'] .home-hero-bridge { border-top-color: rgba(124, 205, 213, 0.15); background: #151f25; color: #edf6f4; }

.home-hero-manifesto {
  margin-top: 21px;
  color: #fff;
  text-align: left;
}

.home-hero-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: rgba(238, 251, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(2, 14, 23, 0.8);
}

.home-hero-identity i {
  width: 18px;
  height: 1px;
  background: #f3c978;
}

.home-hero-identity strong {
  color: #fff;
  font-size: 0.94rem;
  font-weight: 780;
}

.home-hero-identity small {
  margin: 0 0 0 3px;
  color: #c5f3ff;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.home-hero-manifesto p {
  margin: 0 0 7px;
  font-size: 1.2rem;
  font-weight: 620;
  line-height: 1.52;
  text-shadow: 0 2px 10px rgba(2, 14, 23, 0.82);
}

.home-hero-manifesto em {
  color: #c5f3ff;
  font-style: normal;
}

.home-hero-manifesto small {
  display: block;
  margin-top: 19px;
  color: rgba(239, 250, 255, 0.94);
  font-size: 0.87rem;
  letter-spacing: 0.16em;
  text-shadow: 0 1px 7px rgba(2, 14, 23, 0.82);
}

.home-latest-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ui-border);
}

.home-latest-heading > div > span {
  color: var(--ui-teal);
  font-size: 0.72rem;
  font-weight: 760;
}

.home-latest-heading h2 {
  margin: 5px 0 0;
  color: var(--ui-heading);
  font-size: 1.72rem;
  font-weight: 780;
}

.home-latest-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ui-muted) !important;
  font-size: 0.86rem;
  font-weight: 680;
}

.home-latest-heading > a:hover { color: var(--ui-teal) !important; }

/* Homepage editorial bento */
#content-inner.home-bento-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start;
  gap: 24px;
  max-width: 1320px;
  padding: 42px 20px 68px;
}

#content-inner.home-bento-layout #recent-posts {
  width: 100%;
}

#content-inner.home-bento-layout #aside-content {
  display: block;
  width: 286px;
  margin: 0;
}

html.hide-aside #content-inner.home-bento-layout {
  grid-template-columns: minmax(0, 1fr);
}

html.hide-aside #content-inner.home-bento-layout #aside-content {
  display: none;
}

.home-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(168px, 1fr)) 88px;
  gap: 16px;
  margin-bottom: 48px;
}

.home-bento-card,
.home-bento-info,
.home-bento-status {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(30, 74, 94, 0.24);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 55, 70, 0.13);
}

.home-bento-card {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  color: #fff !important;
  isolation: isolate;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-bento-card > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}

.home-bento-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 17, 28, 0.06) 15%, rgba(5, 16, 25, 0.84) 100%);
  content: '';
}

.home-bento-card:hover {
  color: #fff !important;
  box-shadow: 0 20px 42px rgba(28, 55, 70, 0.21);
  transform: translateY(-3px);
}

.home-bento-card:hover > img {
  filter: saturate(1.08);
  transform: scale(1.045);
}

.home-bento-featured { grid-column: span 4; grid-row: span 2; }
.home-bento-album { grid-column: span 8; }
.home-bento-identity-card,
.home-bento-archive { grid-column: span 2; }

.home-bento-identity-card,
.home-bento-archive { grid-column: span 4; }

.home-bento-card-content {
  width: 100%;
  padding: 26px 28px;
  text-align: left;
}

.home-bento-featured .home-bento-card-content { padding: 30px; }

.home-bento-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(239, 249, 255, 0.84);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.home-bento-card-meta span {
  padding: 5px 8px;
  border: 1px solid rgba(225, 248, 255, 0.35);
  border-radius: 5px;
  background: rgba(12, 28, 40, 0.38);
  color: #d1f4ff;
}

.home-bento-card h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.28;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.58);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-bento-featured h2 { font-size: 2rem; }

.home-bento-card p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: rgba(247, 252, 255, 0.88);
  font-size: 0.91rem;
  letter-spacing: 0;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-bento-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border: 1px solid rgba(235, 251, 255, 0.36);
  border-radius: 50%;
  background: rgba(10, 29, 42, 0.36);
  color: #d9f7ff;
  font-size: 0.8rem;
}

.home-bento-info {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 21px 20px 17px;
  overflow: hidden;
  color: #173d4f !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-bento-info::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 118px;
  height: 118px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: '';
  opacity: 0.14;
}

.home-bento-info:hover { color: #173d4f !important; box-shadow: 0 20px 42px rgba(28, 55, 70, 0.18); transform: translateY(-3px); }
.home-bento-identity-card { background: linear-gradient(145deg, #eef7f3, #dcefe8); color: #246c62 !important; }
.home-bento-info-icon { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; border: 1px solid currentColor; border-radius: 50%; font-size: 0.75rem; }
.home-bento-info-copy { position: relative; z-index: 1; margin-top: 11px; }
.home-bento-info-copy > span { display: block; color: inherit; font-size: 0.62rem; font-weight: 780; letter-spacing: 0.07em; opacity: 0.8; }
.home-bento-info-copy h2 { margin: 5px 0 4px; color: inherit; font-size: 1.16rem; font-weight: 780; line-height: 1.28; }
.home-bento-info-copy p { display: -webkit-box; margin: 0; overflow: hidden; color: inherit; font-size: 0.77rem; line-height: 1.55; opacity: 0.8; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-bento-info small { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 10px; color: inherit; font-size: 0.7rem; font-weight: 700; }
.home-bento-info small i { font-size: 0.64rem; }

.home-bento-archive {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 23px 24px 18px;
  overflow: hidden;
  border: 1px solid rgba(30, 74, 94, 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, #e8f2f3, #d2e1e7);
  box-shadow: 0 14px 34px rgba(28, 55, 70, 0.11);
  color: #183c4d !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-bento-archive::before,
.home-bento-archive::after {
  position: absolute;
  border: 1px solid rgba(47, 113, 144, 0.17);
  border-radius: 50%;
  content: '';
}

.home-bento-archive::before { right: -45px; bottom: -74px; width: 178px; height: 178px; }
.home-bento-archive::after { right: 58px; bottom: -109px; width: 140px; height: 140px; }
.home-bento-archive:hover { color: #183c4d !important; box-shadow: 0 20px 42px rgba(28, 55, 70, 0.18); transform: translateY(-3px); }

.home-bento-archive-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(34, 103, 130, 0.14);
  color: #226782;
  font-size: 0.86rem;
}

.home-bento-archive-copy { position: relative; z-index: 1; margin-top: 8px; }
.home-bento-archive-copy > span { color: #327d99; font-size: 0.67rem; font-weight: 780; letter-spacing: 0.08em; }
.home-bento-archive-copy h2 { margin: 6px 0 4px; color: #173d4f; font-size: 1.3rem; font-weight: 780; }
.home-bento-archive-copy p { display: -webkit-box; margin: 0; overflow: hidden; color: #527180; font-size: 0.78rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-bento-archive-stats { position: relative; z-index: 1; display: flex; gap: 12px; margin-top: 12px; color: #527180; font-size: 0.69rem; }
.home-bento-archive-stats span { display: flex; align-items: baseline; gap: 3px; }
.home-bento-archive-stats strong { color: #1d4a65; font-size: 0.96rem; font-weight: 780; }

.home-bento-status {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  border-color: rgba(25, 63, 83, 0.32);
  background: linear-gradient(105deg, #0d2230, #224b61 63%, #183746);
  color: #fff;
}

.home-bento-clock {
  min-width: 158px;
  padding-right: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.7rem;
  font-weight: 780;
  letter-spacing: 0.08em;
}

.home-bento-status-copy { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.home-bento-status-copy span { color: rgba(247, 252, 255, 0.94); font-size: 0.9rem; font-weight: 700; }
.home-bento-status-copy span i { margin-right: 7px; color: #55d89c; font-size: 0.57rem; vertical-align: 1px; }
.home-bento-status-copy small { color: rgba(221, 240, 247, 0.7); font-size: 0.78rem; }
.home-bento-status a { color: #fff !important; font-size: 0.84rem; font-weight: 700; white-space: nowrap; }
.home-bento-status a i { margin-right: 6px; color: #9be7f3; }

.home-bento-metrics { display: flex; align-items: center; gap: 16px; }
.home-bento-metrics > span { display: flex; flex-direction: column; min-width: 54px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.home-bento-metrics strong { color: #fff; font-size: 1.02rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.home-bento-metrics small { margin-top: 3px; color: rgba(221, 240, 247, 0.7); font-size: 0.68rem; white-space: nowrap; }

#content-inner.home-bento-layout .recent-post-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#content-inner.home-bento-layout #recent-posts .recent-post-item {
  position: relative;
  display: flex;
  min-height: 258px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(30, 74, 94, 0.22);
  border-radius: 8px;
  background: #123042;
  box-shadow: 0 10px 26px rgba(28, 55, 70, 0.1) !important;
}

#content-inner.home-bento-layout #recent-posts .recent-post-item .post_cover {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

#content-inner.home-bento-layout #recent-posts .recent-post-item .post_cover a,
#content-inner.home-bento-layout #recent-posts .recent-post-item .post_cover img { width: 100%; height: 100%; }

#content-inner.home-bento-layout #recent-posts .recent-post-item .post_cover img { object-fit: cover; transition: transform 0.45s ease; }

#content-inner.home-bento-layout #recent-posts .recent-post-item .post_cover::after {
  background: linear-gradient(180deg, rgba(6, 17, 28, 0.08), rgba(5, 16, 25, 0.86)) !important;
}

#content-inner.home-bento-layout #recent-posts .recent-post-item > .recent-post-info {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: flex-end;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  min-height: 0;
  padding: 24px 26px;
  color: #fff;
}

#content-inner.home-bento-layout #recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap { order: 1; margin: 0 0 9px; color: rgba(231, 245, 250, 0.84); font-size: 0.76rem; }
#content-inner.home-bento-layout #recent-posts .article-meta-wrap a { color: #b7f1fb; }
#content-inner.home-bento-layout #recent-posts .recent-post-item > .recent-post-info > .article-title { order: 2; color: #fff !important; font-size: 1.34rem; line-height: 1.3; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.64); }
#content-inner.home-bento-layout #recent-posts .recent-post-item > .recent-post-info > .content { order: 3; margin-top: 9px; color: rgba(240, 250, 253, 0.86); font-size: 0.86rem; -webkit-line-clamp: 2; }
#content-inner.home-bento-layout #recent-posts .recent-post-item:hover .post_cover img { transform: scale(1.045); }

[data-theme='dark'] .home-bento-info { border-color: rgba(135, 204, 224, 0.22); }
[data-theme='dark'] .home-bento-info:hover { color: #eefaff !important; }
[data-theme='dark'] .home-bento-identity-card { background: linear-gradient(145deg, #153a38, #102b2b); color: #b7eee5 !important; }
[data-theme='dark'] .home-bento-archive { border-color: rgba(135, 204, 224, 0.22); background: linear-gradient(145deg, #173542, #102630); color: #eefaff !important; }
[data-theme='dark'] .home-bento-archive:hover { color: #eefaff !important; }
[data-theme='dark'] .home-bento-archive-copy > span, [data-theme='dark'] .home-bento-archive-icon { color: #9fe7f5; }
[data-theme='dark'] .home-bento-archive-copy h2, [data-theme='dark'] .home-bento-archive-stats strong { color: #eefaff; }
[data-theme='dark'] .home-bento-archive-copy p, [data-theme='dark'] .home-bento-archive-stats { color: #afcbd5; }

@media screen and (max-width: 1100px) {
  #content-inner.home-bento-layout { grid-template-columns: 1fr; }
  #content-inner.home-bento-layout #aside-content { width: 100%; margin-top: 8px; }
}

@media screen and (max-width: 900px) {
  #content-inner.home-bento-layout { padding: 30px 15px 54px; }
  .home-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(190px, auto)) auto; }
  .home-bento-featured { grid-column: span 1; grid-row: span 2; }
  .home-bento-album { grid-column: span 1; }
  .home-bento-identity-card,
  .home-bento-archive { grid-column: span 1; }
  .home-bento-status { grid-column: 1 / -1; }
}

@media screen and (max-width: 620px) {
  #content-inner.home-bento-layout { padding: 24px 12px 42px; }
  .home-bento { display: flex; flex-direction: column; gap: 12px; margin-bottom: 34px; }
  .home-bento-card { min-height: 218px; }
  .home-bento-featured { min-height: 340px; }
  .home-bento-card-content, .home-bento-featured .home-bento-card-content { padding: 22px; }
  .home-bento-featured h2 { font-size: 1.65rem; }
  .home-bento-card h2 { font-size: 1.3rem; }
  .home-bento-info { min-height: 186px; }
  .home-bento-archive { min-height: 196px; }
  .home-bento-status { align-items: flex-start; flex-wrap: wrap; gap: 13px 18px; min-height: 136px; padding: 20px; }
  .home-bento-clock { min-width: 0; padding: 0 18px 0 0; font-size: 1.42rem; }
  .home-bento-status-copy { flex-basis: calc(100% - 146px); }
  .home-bento-metrics { order: 4; width: 100%; gap: 0; }
  .home-bento-metrics > span { flex: 1; padding-left: 12px; }
  .home-bento-metrics > span:first-child { padding-left: 0; border-left: 0; }
  .home-bento-status a { margin-top: 3px; }
  #content-inner.home-bento-layout .recent-post-items { grid-template-columns: 1fr; gap: 12px; }
  #content-inner.home-bento-layout #recent-posts .recent-post-item { min-height: 232px; }
  #content-inner.home-bento-layout #recent-posts .recent-post-item > .recent-post-info { padding: 20px; }
}

/* The homepage sidebar is a compact navigation and context rail. */
.home-aside-enhanced #aside-content .card-info {
  position: relative;
  overflow: hidden;
  border-color: rgba(38, 116, 146, 0.24);
  background: #f3fafc;
}

.home-aside-enhanced #aside-content .card-info::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--ui-teal);
  content: '';
}

.home-aside-enhanced #aside-content .card-info .author-info-name {
  margin-top: 10px;
  font-size: 1.15rem;
}

.home-aside-enhanced #aside-content .card-info .site-data {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--ui-border);
}

.home-aside-enhanced .home-quick-nav {
  padding: 19px !important;
}

.home-aside-enhanced .home-quick-nav .item-headline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.home-aside-enhanced .home-quick-nav .item-headline i {
  color: var(--ui-teal);
}

.home-quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-quick-nav-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px;
  background: var(--ui-surface-soft);
  color: var(--ui-ink) !important;
  font-size: 0.82rem;
  font-weight: 680;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-quick-nav-grid a:hover {
  border-color: var(--ui-teal) !important;
  color: var(--ui-teal) !important;
  transform: translateY(-2px);
}

.home-quick-nav-grid a i { color: var(--ui-teal); }
.home-quick-nav-grid a:nth-child(2) i { color: var(--ui-coral); }
.home-quick-nav-grid a:nth-child(3) i { color: var(--ui-blue); }
.home-quick-nav-grid a:nth-child(4) i { color: var(--ui-plum); }

[data-theme='dark'] .home-aside-enhanced #aside-content .card-info {
  border-color: rgba(99, 184, 207, 0.24);
  background: #172833;
}

@media screen and (max-width: 768px) {
  #page-header.full_page {
    height: 100svh;
    min-height: 580px;
    background-position: 54% center;
  }

  #page-header.full_page #nav { background: rgba(10, 32, 44, 0.23); }

  #page-header.full_page #site-info {
    top: 48%;
    left: 50%;
    width: calc(100% - 40px);
    text-align: center;
    transform: translate(-50%, -50%);
  }

  #page-header.full_page #site-info::before { margin: 0 auto 16px; }
  #page-header.full_page #site-title { text-align: center; }
  #page-header.full_page #site-title { font-size: 2.5rem; }
  .home-hero-manifesto { margin-top: 18px; text-align: center; }
  .home-hero-identity { justify-content: center; }
  .home-hero-manifesto p { font-size: 1rem; }
  .home-hero-manifesto small { margin-top: 14px; font-size: 0.74rem; letter-spacing: 0.09em; }
  .home-hero-actions { justify-content: center; margin-top: 20px; }
  .home-hero-stats { justify-content: center; margin-top: 23px; }
  .home-hero-stats span { min-width: 0; flex: 1; padding: 0 10px; }
  .home-hero-bridge { align-items: flex-start; min-height: 0; padding: 21px 20px; }
  .home-hero-bridge strong { font-size: 0.94rem; }
  .home-hero-bridge a { padding-top: 5px; font-size: 0.78rem; white-space: nowrap; }
  .home-latest-heading { margin-bottom: 16px; }
  .home-latest-heading h2 { font-size: 1.45rem; }
}

#page-header.full_page #nav .site-page,
#page-header.full_page #nav .site-name,
#page-header.full_page #nav #toggle-menu {
  color: #fff !important;
  text-shadow: 0 2px 10px rgba(12, 24, 31, 0.34);
}

#page-header.full_page #nav .site-page:hover {
  background: rgba(17, 30, 38, 0.22);
  color: #fff !important;
}

#page-header.not-top-img {
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--ui-border);
  backdrop-filter: blur(16px);
  animation: none;
}

[data-theme='dark'] #page-header.not-top-img {
  background: rgba(18, 23, 27, 0.9);
}

#nav {
  height: 64px;
  padding: 0 4%;
}

#nav .site-page,
#nav .nav-site-title,
#sidebar a,
#aside-content a {
  border-bottom: 0 !important;
}

#nav .menus_items .menus_item .site-page {
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 600;
}

#page-header.not-top-img #nav .site-page,
#page-header.not-top-img #nav .site-name,
#page-header.not-top-img #nav #toggle-menu {
  color: var(--ui-ink);
  text-shadow: none;
}

#page-header.not-top-img #nav .site-page:hover {
  background: var(--ui-teal-soft);
  color: var(--ui-teal);
}

#nav .menus_items .menus_item .menus_item_child {
  z-index: 1000;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background-color: rgba(18, 29, 36, 0.32);
  box-shadow: 0 12px 30px rgba(12, 24, 31, 0.2);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}

#nav .menus_items .menus_item .menus_item_child li a {
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.94) !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42) !important;
}

#nav .menus_items .menus_item .menus_item_child li:hover,
#nav .menus_items .menus_item .menus_item_child li a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

#nav .menus_items .menus_item .menus_item_child li a i,
#page-header.not-top-img #nav .menus_items .menus_item .menus_item_child li a,
#page-header.not-top-img #nav .menus_items .menus_item .menus_item_child li a i {
  color: rgba(255, 255, 255, 0.94) !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42) !important;
}

#page-header.not-top-img #nav .menus_items .menus_item .menus_item_child li:hover,
#page-header.not-top-img #nav .menus_items .menus_item .menus_item_child li a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

#blog-info .site-icon {
  box-shadow: none;
}

/* Shared layout */
.layout {
  max-width: 1320px !important;
  gap: 24px;
}

.layout.hide-aside {
  max-width: 1240px !important;
}

#content-inner {
  padding-top: 32px;
}

.layout > div:first-child:not(.nc),
#recent-posts .recent-post-item,
#aside-content .card-widget {
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.layout > div:first-child:not(.nc):hover {
  box-shadow: var(--ui-shadow-sm);
}

#aside-content .card-widget {
  padding: 24px;
}

#aside-content .card-widget:hover {
  transform: translateY(-2px);
  box-shadow: var(--ui-shadow-md) !important;
}

#aside-content .card-info .avatar-img {
  width: 92px;
  height: 92px;
  border: 3px solid var(--ui-surface-solid);
  box-shadow: 0 0 0 2px var(--ui-teal);
}

#aside-content .card-info .avatar-img img {
  box-shadow: none;
}

/* Sidebar follows a single quiet information hierarchy on all non-home pages. */
#aside-content { gap: 16px; }
#aside-content .card-widget { padding: 20px; }
#aside-content .card-info { padding-top: 22px; }
#aside-content .card-info .avatar-img { width: 80px; height: 80px; margin-top: 0; border: 0; box-shadow: 0 0 0 2px var(--ui-teal), 0 0 0 6px var(--ui-surface-solid); }
#aside-content .card-info .avatar-img img { width: 80px; height: 80px; padding: 0; border: 0; background: transparent; box-shadow: none; object-fit: cover; }
#aside-content .card-info .avatar-img img:hover { box-shadow: none; transform: scale(1.035); }
#aside-content .card-info .author-info-name { margin: 15px 0 5px; color: var(--ui-heading); font-size: 1.1rem; letter-spacing: 0; }
#aside-content .card-info .author-info-description { padding: 0 4px; color: var(--ui-muted); font-size: 0.8rem; line-height: 1.68; }
#aside-content .author-tags { gap: 6px; margin-top: 12px; }
#aside-content .author-tag { padding: 3px 8px; border-radius: 4px; background: var(--ui-surface-soft); font-size: 0.7rem; font-weight: 650; }
#aside-content .card-info .site-data { margin: 17px 0 14px; padding: 12px 0; border-bottom: 1px solid var(--ui-border); }
#aside-content .card-info .site-data a { padding: 2px 0; border-radius: 0; }
#aside-content .card-info .site-data a:hover { background: transparent; box-shadow: none; transform: none; }
#aside-content .card-info .site-data .headline { color: var(--ui-faint); font-size: 0.64rem; letter-spacing: 0.04em; }
#aside-content .card-info .site-data .length-num { color: var(--ui-heading); font-size: 1.05rem; }
#aside-content .card-info #card-info-btn { width: 100%; min-height: 38px; margin: 0; padding: 0 14px; border: 1px solid var(--ui-teal); border-radius: 5px !important; background: var(--ui-teal); font-size: 0.82rem; line-height: 36px; }
#aside-content .card-info #card-info-btn::before { display: none; }
#aside-content .card-info-social-icons { gap: 5px; padding: 14px 0 0; }
#aside-content .card-info-social-icons .social-icon { width: 31px; height: 31px; border: 1px solid var(--ui-border); border-radius: 5px; font-size: 0.82rem; }
#aside-content .card-info-social-icons .social-icon:hover { background: var(--ui-teal-soft); box-shadow: none; transform: translateY(-1px); }
#aside-content .card-announcement { border-left: 3px solid var(--ui-coral); }
#aside-content .card-announcement .announcement_content { color: var(--ui-muted); font-size: 0.84rem; line-height: 1.72; }
#aside-content .card-webinfo .webinfo { margin: 0; }
#aside-content .card-webinfo .webinfo-item { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 7px 0; border-bottom: 1px solid var(--ui-border); }
#aside-content .card-webinfo .webinfo-item:last-child { border-bottom: 0; }
#aside-content .card-webinfo .item-name { color: var(--ui-muted); font-size: 0.78rem; }
#aside-content .card-webinfo .item-count { color: var(--ui-heading); font-size: 0.78rem; font-weight: 700; }

[data-theme='dark'] #aside-content .card-info .avatar-img { box-shadow: 0 0 0 2px #75d5d0, 0 0 0 6px #172833; }
[data-theme='dark'] #aside-content .card-info .site-data .length-num { color: #e9f5f3; }

#aside-content .card-info .author-info-name {
  color: var(--ui-heading);
  font-weight: 750;
}

#aside-content .card-info .author-info-description {
  color: var(--ui-muted);
}

#aside-content .author-tags {
  justify-content: center;
}

#aside-content .author-tag {
  padding: 4px 10px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-surface-soft);
  box-shadow: none;
  color: var(--ui-muted);
  font-size: 0.75rem;
}

#aside-content .author-tag:nth-child(1) {
  color: var(--ui-blue);
}

#aside-content .author-tag:nth-child(2) {
  color: var(--ui-coral);
}

#aside-content .author-tag:nth-child(3) {
  color: var(--ui-teal);
}

#aside-content .card-info #card-info-btn {
  border-radius: 6px !important;
  background: var(--ui-teal);
  box-shadow: none !important;
}

#aside-content .card-info #card-info-btn:hover {
  background: #115e59;
}

#aside-content .card-info-social-icons .social-icon {
  border-bottom: 0;
}

#aside-content .item-headline {
  color: var(--ui-heading);
  font-weight: 700;
}

#aside-content .card-announcement .item-headline i {
  color: var(--ui-coral) !important;
}

/* Home article list */
#recent-posts .recent-post-item {
  min-height: 250px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#recent-posts .recent-post-item:hover {
  transform: translateY(-3px);
  border-color: var(--ui-border-strong);
  box-shadow: var(--ui-shadow-md) !important;
}

#recent-posts .recent-post-item .post_cover {
  flex: 0 0 40%;
  width: 40%;
  height: 100% !important;
  min-height: 250px;
}

#recent-posts .recent-post-item .post_cover img {
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.45s ease;
}

#recent-posts .recent-post-item > .recent-post-info {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 30px 34px;
}

#recent-posts .recent-post-item > .recent-post-info > .article-title {
  order: 2;
  width: 100%;
  margin: 0;
  border-bottom: 0;
  color: var(--ui-heading);
  font-size: 1.4rem;
  font-weight: 750;
  line-height: 1.42;
  letter-spacing: 0;
}

#recent-posts .recent-post-item > .recent-post-info > .article-title::after {
  display: inline-block;
  margin-left: 9px;
  color: var(--ui-faint);
  content: '\f061';
  font-family: 'Font Awesome 7 Free', 'Font Awesome 6 Free';
  font-size: 0.72em;
  font-weight: 900;
  transition: color 0.2s ease, transform 0.2s ease;
}

#recent-posts .recent-post-item > .recent-post-info > .article-title:hover {
  color: var(--ui-teal);
}

#recent-posts .recent-post-item > .recent-post-info > .article-title:hover::after {
  color: var(--ui-teal);
  transform: translateX(3px);
}

#recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap {
  order: 1;
  margin: 0 0 12px;
  color: var(--ui-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

#recent-posts .article-meta-wrap .article-meta-separator {
  margin: 0 8px;
  color: var(--ui-border-strong);
}

#recent-posts .article-meta-wrap a {
  color: var(--ui-teal);
  font-weight: 650;
}

#recent-posts .recent-post-item > .recent-post-info > .content {
  display: -webkit-box;
  order: 3;
  margin-top: 14px;
  color: var(--ui-muted);
  font-size: 0.94rem;
  line-height: 1.72;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#recent-posts .recent-post-item.no-cover > .recent-post-info,
#recent-posts .recent-post-item:not(:has(.post_cover)) > .recent-post-info {
  min-height: 220px;
  padding: 34px 40px;
}

#recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap i {
  margin-right: 4px;
  color: var(--ui-faint);
}

#recent-posts .recent-post-item > .recent-post-info > .content::after {
  color: var(--ui-faint);
}

#recent-posts .recent-post-item .post_cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 72%, rgba(20, 33, 43, 0.08));
  content: '';
  pointer-events: none;
}

#recent-posts .recent-post-item:nth-child(even) .post_cover::after {
  background: linear-gradient(270deg, transparent 72%, rgba(20, 33, 43, 0.08));
}

/* Functional page headers */
#page > .page-title,
#archive > .article-sort-title {
  position: relative;
  margin: 0 0 30px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-heading);
  font-size: 2rem;
  font-weight: 780;
  line-height: 1.25;
  letter-spacing: 0;
}

#page > .page-title::after,
#archive > .article-sort-title::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: var(--page-accent, var(--ui-teal));
  content: '';
}

.type-tags #page {
  --page-accent: var(--ui-teal);
}

.type-categories #page {
  --page-accent: var(--ui-coral);
}

.type-link #page {
  --page-accent: var(--ui-blue);
}

/* Archive hub combines category and tag discovery without changing legacy routes. */
.type-archive-hub #page {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.type-archive-hub #article-container {
  max-width: none;
}

.type-archive-hub #page > .page-title {
  display: none;
}

#archive-hub {
  --archive-ink: #153448;
  --archive-muted: #587082;
  --archive-line: rgba(41, 110, 143, 0.2);
}

.archive-hub-hero {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 390px;
  overflow: hidden;
  padding: 52px 54px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(14, 42, 58, 0.78), rgba(18, 48, 64, 0.42)), url('/images/selection1.jpg') center 43% / cover;
  box-shadow: 0 16px 36px rgba(25, 75, 99, 0.17);
  color: #fff;
}

.archive-hub-hero::after {
  position: absolute;
  top: -80px;
  right: 10%;
  width: 340px;
  height: 150px;
  border: 2px solid rgba(234, 250, 255, 0.36);
  border-radius: 50%;
  box-shadow: 120px 42px 0 -1px rgba(234, 250, 255, 0.25), -150px 94px 0 -1px rgba(234, 250, 255, 0.16);
  content: '';
  pointer-events: none;
}

.archive-hub-hero-copy,
.archive-hub-stats {
  position: relative;
  z-index: 1;
}

.archive-hub-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 750;
}

.archive-hub-hero h1 {
  margin: 18px 0 12px;
  color: #fff;
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
}

.archive-hub-hero p {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.04rem;
  line-height: 1.7;
}

.archive-hub-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  margin: 0;
  padding: 20px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(15, 31, 42, 0.6);
  backdrop-filter: blur(10px);
}

.archive-hub-stats div {
  padding: 0 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.archive-hub-stats div:last-child { border-right: 0; }
.archive-hub-stats dt { font-size: 1.6rem; font-weight: 760; }
.archive-hub-stats dd { margin: 4px 0 0; color: rgba(255, 255, 255, 0.78); font-size: 0.8rem; }

.archive-hub-browser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 32px 0 22px;
}

.archive-hub-switch {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--archive-line);
  border-radius: 8px;
  background: var(--ui-surface);
}

.archive-hub-switch button {
  min-width: 118px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--archive-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.archive-hub-switch button.is-active {
  background: var(--archive-ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21, 52, 72, 0.18);
}

.archive-hub-summary { margin: 0; color: var(--archive-muted); font-size: 0.88rem; }

.archive-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}

.archive-category-card {
  display: grid;
  grid-template-columns: 38% minmax(0, 1fr);
  min-height: 208px;
  overflow: hidden;
  border: 1px solid var(--archive-line);
  border-radius: 8px;
  background: var(--ui-surface);
  box-shadow: 0 5px 16px rgba(24, 63, 81, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.archive-category-card:hover {
  border-color: var(--archive-accent);
  box-shadow: 0 13px 26px rgba(24, 63, 81, 0.13);
  transform: translateY(-3px);
}

.archive-category-cover { background: linear-gradient(135deg, color-mix(in srgb, var(--archive-accent) 42%, transparent), rgba(12, 32, 43, 0.15)), var(--archive-cover) center / cover; }

.archive-category-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
}

.archive-category-label { color: var(--archive-accent); font-size: 0.74rem; font-weight: 750; }
.archive-category-info strong { margin-top: 6px; color: var(--ui-heading); font-size: 1.24rem; }
.archive-category-info > span:not(.archive-category-label) { margin-top: 9px; color: var(--ui-muted); font-size: 0.86rem; line-height: 1.58; }
.archive-category-info small { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: 0.79rem; font-weight: 650; }
.archive-category-info small i { color: var(--archive-accent); }

.archive-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--archive-line);
  border-radius: 8px;
  background: var(--ui-surface);
}

.archive-tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: var(--ui-surface-soft);
  color: var(--ui-ink) !important;
  font-size: 0.9rem;
  font-weight: 680;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.archive-tag-cloud a:nth-child(3n + 1) i { color: var(--ui-teal); }
.archive-tag-cloud a:nth-child(3n + 2) i { color: var(--ui-coral); }
.archive-tag-cloud a:nth-child(3n) i { color: var(--ui-blue); }
.archive-tag-cloud a:hover { border-color: var(--ui-teal); color: var(--ui-teal) !important; transform: translateY(-2px); }
.archive-tag-cloud small { color: var(--ui-faint); font-size: 0.74rem; }

@media screen and (max-width: 768px) {
  .archive-hub-hero { display: block; min-height: 390px; padding: 34px 26px 24px; }
  .archive-hub-hero h1 { font-size: 2.65rem; }
  .archive-hub-hero p { font-size: 0.94rem; }
  .archive-hub-stats { margin-top: 30px; }
  .archive-hub-stats div { padding: 0 10px; }
  .archive-hub-browser { align-items: flex-start; flex-direction: column; gap: 14px; margin-top: 22px; }
  .archive-hub-switch { width: 100%; }
  .archive-hub-switch button { flex: 1; min-width: 0; }
  .archive-category-grid { grid-template-columns: 1fr; gap: 14px; }
  .archive-category-card { min-height: 180px; }
  .archive-tag-cloud { padding: 18px; }
}

/* Tag cloud */
.type-tags .tag-cloud-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  text-align: left !important;
}

.type-tags .tag-cloud-list a {
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px;
  background: var(--ui-surface-soft) !important;
  box-shadow: none;
  color: var(--ui-ink) !important;
  font-size: 0.95rem !important;
  font-weight: 650;
}

.type-tags .tag-cloud-list a::before {
  position: static;
  z-index: auto;
  width: auto;
  height: auto;
  margin-right: 4px;
  background: none;
  color: var(--ui-teal);
  content: '#';
}

.type-tags .tag-cloud-list a:nth-child(3n + 2)::before {
  color: var(--ui-coral);
}

.type-tags .tag-cloud-list a:nth-child(3n)::before {
  color: var(--ui-blue);
}

.type-tags .tag-cloud-list a:hover {
  border-color: var(--ui-teal) !important;
  background: var(--ui-teal-soft) !important;
  color: var(--ui-teal) !important;
  transform: translateY(-2px);
}

/* Category cards: content is enriched from /data/category-cards.json. */
.type-categories .category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  padding: 0;
}

.type-categories .category-list-item {
  min-height: 218px;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(34, 113, 148, 0.18);
  border-radius: 8px;
  background: var(--ui-surface);
  box-shadow: 0 5px 18px rgba(31, 64, 82, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.type-categories .category-list-item::before {
  display: none;
}

.type-categories .category-list-item:hover {
  border-color: var(--category-accent, var(--ui-teal));
  box-shadow: 0 14px 30px rgba(31, 64, 82, 0.14);
  transform: translateY(-4px);
}

.type-categories .category-list-link {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  width: 100%;
  height: 100%;
  border: 0;
  color: var(--ui-heading) !important;
}

.type-categories .category-list-link::before {
  display: none;
}

.type-categories .category-card-cover {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: hidden;
  background: var(--category-cover) center / cover no-repeat;
}

.type-categories .category-card-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-accent, var(--ui-teal)) 42%, transparent), rgba(14, 30, 42, 0.18));
  content: '';
  transition: background 0.22s ease;
}

.type-categories .category-list-item:hover .category-card-cover::after {
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-accent, var(--ui-teal)) 22%, transparent), rgba(14, 30, 42, 0.04));
}

.type-categories .category-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 23px 22px 19px;
}

.type-categories .category-card-label {
  color: var(--category-accent, var(--ui-teal));
  font-size: 0.75rem;
  font-weight: 750;
}

.type-categories .category-card-title {
  margin-top: 6px;
  color: var(--ui-heading);
  font-size: 1.28rem;
  font-weight: 760;
  line-height: 1.25;
}

.type-categories .category-card-summary {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 0.87rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.type-categories .category-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--ui-border);
}

.type-categories .category-card-total {
  color: var(--ui-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.type-categories .category-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--category-accent, var(--ui-teal)) 14%, transparent);
  color: var(--category-accent, var(--ui-teal));
  font-size: 0.73rem;
  transition: transform 0.22s ease;
}

.type-categories .category-list-item:hover .category-card-arrow {
  transform: translateX(3px);
}

@media screen and (max-width: 768px) {
  .type-categories .category-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .type-categories .category-list-item {
    min-height: 184px;
  }

  .type-categories .category-list-link {
    grid-template-columns: 34% minmax(0, 1fr);
  }

  .type-categories .category-card-content {
    padding: 19px 18px 16px;
  }
}

/* Individual category pages are reading collections rather than home-page feeds. */
.category-detail-page #page-header.not-home-page {
  min-height: 300px;
  background-position: center;
}

.category-detail-page #page-site-info {
  padding: 0 24px;
}

.category-detail-page #site-title {
  font-size: 2.8rem;
  font-weight: 780;
  letter-spacing: 0;
}

.category-detail-page #content-inner {
  max-width: 1120px !important;
  padding-top: 42px;
}

.category-detail-intro {
  position: relative;
  margin: 0 0 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--ui-border);
}

.category-detail-intro::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 72px;
  height: 3px;
  background: var(--category-accent, var(--ui-teal));
  content: '';
}

.category-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  color: var(--category-accent, var(--ui-teal)) !important;
  font-size: 0.82rem;
  font-weight: 720;
}

.category-detail-back:hover i {
  transform: translateX(-3px);
}

.category-detail-back i {
  transition: transform 0.2s ease;
}

.category-detail-intro h2 {
  margin: 12px 0 8px;
  color: var(--ui-heading);
  font-size: 2rem;
  font-weight: 780;
  line-height: 1.2;
}

.category-detail-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.category-detail-count {
  position: absolute;
  right: 0;
  bottom: 26px;
  color: var(--ui-muted);
  font-size: 0.85rem;
  font-weight: 680;
}

.category-detail-page #recent-posts.category-article-list {
  width: 100%;
}

.category-detail-page #recent-posts.category-article-list .recent-post-item {
  min-height: 178px;
  margin-bottom: 14px;
  border-color: var(--ui-border);
}

.category-detail-page #recent-posts.category-article-list .post_cover {
  flex-basis: 28%;
  width: 28%;
  min-height: 178px;
}

.category-detail-page #recent-posts.category-article-list > .recent-post-items > .recent-post-item > .recent-post-info {
  padding: 24px 28px;
}

.category-detail-page #recent-posts.category-article-list .article-title {
  font-size: 1.22rem;
}

.category-detail-page #recent-posts.category-article-list .content {
  margin-top: 10px;
  -webkit-line-clamp: 2;
}

.category-detail-page #recent-posts.category-article-list .article-meta__categories,
.category-detail-page #recent-posts.category-article-list .article-meta__categories + .article-meta-link,
.category-detail-page #recent-posts.category-article-list .article-meta__categories ~ i.fa-inbox {
  display: none;
}

@media screen and (max-width: 768px) {
  .category-detail-page #page-header.not-home-page {
    min-height: 230px;
  }

  .category-detail-page #site-title {
    font-size: 2.1rem;
  }

  .category-detail-page #content-inner {
    padding-top: 28px;
  }

  .category-detail-intro {
    margin-bottom: 20px;
    padding-bottom: 22px;
  }

  .category-detail-intro h2 {
    font-size: 1.65rem;
  }

  .category-detail-count {
    position: static;
    display: inline-block;
    margin-top: 14px;
  }

  .category-detail-page #recent-posts.category-article-list .recent-post-item {
    min-height: 0;
  }

  .category-detail-page #recent-posts.category-article-list .post_cover {
    flex-basis: 34%;
    width: 34%;
    min-height: 142px;
  }

  .category-detail-page #recent-posts.category-article-list > .recent-post-items > .recent-post-item > .recent-post-info {
    padding: 18px;
  }

  .category-detail-page #recent-posts.category-article-list .content {
    display: none;
  }
}

/* Friend links */
.type-link #article-container > .flink > h2,
.type-link #article-container > .flink > .flink-desc {
  display: none;
}

.type-link .flink-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 !important;
}

.type-link .flink-list-item {
  width: auto !important;
  margin: 0 !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-blue-soft) !important;
  box-shadow: none !important;
}

.type-link .flink-list-item:hover {
  border-color: var(--ui-blue) !important;
  transform: translateY(-2px) !important;
}

.type-link .flink-list-item a {
  border: 0;
}

.type-link .flink-item-icon {
  margin: 14px 12px 14px 14px !important;
}

.type-link .flink-item-icon img {
  border-radius: 6px !important;
  box-shadow: none;
}

.type-link .flink-item-name {
  color: var(--ui-heading) !important;
  font-weight: 700;
}

.type-link .flink-item-desc {
  color: var(--ui-muted) !important;
}

/* Bangumi page refinements over its local styles */
.type-bangumis #page,
.type-about #page,
.type-album #page {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.type-bangumis #page > .page-title {
  --page-accent: var(--ui-plum);
  margin-bottom: 22px;
  padding: 28px 32px 22px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface);
}

.type-bangumis #page > .page-title::after {
  left: 32px;
}

.type-bangumis .bangumi-container {
  margin: 0 !important;
  padding: 32px !important;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.type-bangumis .bangumi-container blockquote {
  margin: 0 0 24px !important;
  border-left-color: var(--ui-plum) !important;
  border-radius: 0 6px 6px 0 !important;
  background: var(--ui-plum-soft) !important;
  color: var(--ui-muted) !important;
  box-shadow: none !important;
}

.type-bangumis .bangumi-tabs {
  gap: 8px !important;
  border-bottom: 1px solid var(--ui-border) !important;
}

.type-bangumis .bangumi-tab {
  border: 1px solid transparent !important;
  border-radius: 6px 6px 0 0 !important;
  background: transparent !important;
  color: var(--ui-muted) !important;
  box-shadow: none !important;
}

.type-bangumis .bangumi-tab.bangumi-active {
  border-color: var(--ui-border) !important;
  border-bottom-color: var(--ui-surface-solid) !important;
  background: var(--ui-surface-solid) !important;
  color: var(--ui-plum) !important;
}

.type-bangumis .bangumi-total {
  border-left-color: var(--ui-plum) !important;
  background: var(--ui-surface-soft) !important;
  color: var(--ui-muted) !important;
}

.type-bangumis .bangumi-item {
  border-bottom-color: var(--ui-border) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.type-bangumis .bangumi-item:hover {
  background: var(--ui-surface-soft) !important;
  transform: none !important;
}

.type-bangumis .bangumi-picture,
.type-bangumis .bangumi-picture img {
  border-radius: 6px !important;
  box-shadow: none !important;
}

.type-bangumis .bangumi-title a {
  border-bottom: 0 !important;
  color: var(--ui-heading) !important;
}

.type-bangumis .bangumi-tag {
  border-radius: 999px !important;
  background: var(--ui-blue-soft) !important;
  color: var(--ui-blue) !important;
}

/* Bangumi shelf */
.type-bangumis #page > .page-title { display: none; }
.bangumi-shelf { max-width: 1060px; margin: 0 auto; }
.bangumi-shelf-hero { position: relative; display: flex; align-items: end; justify-content: space-between; min-height: 290px; overflow: hidden; padding: 42px 48px; border: 1px solid rgba(82, 84, 132, 0.3); border-radius: 8px; background: linear-gradient(100deg, rgba(31, 31, 62, 0.92), rgba(70, 58, 97, 0.72)), url('/images/selection2.jpg') center / cover; color: #fff; }
.bangumi-shelf-hero::after { position: absolute; top: -115px; right: 8%; width: 340px; height: 230px; border: 1px solid rgba(239, 232, 255, 0.34); border-radius: 50%; box-shadow: 100px 76px 0 -1px rgba(239, 232, 255, 0.18); content: ''; }
.bangumi-shelf-hero > * { position: relative; z-index: 1; }
.bangumi-shelf-hero > div > span { display: inline-flex; align-items: center; gap: 8px; color: #d8d4ff; font-size: 0.77rem; font-weight: 760; }
.bangumi-shelf-hero h1 { margin: 15px 0 8px; color: #fff; font-size: 3.15rem; font-weight: 800; line-height: 1; }
.bangumi-shelf-hero p { margin: 0; color: rgba(248, 246, 255, 0.88); font-size: 1rem; }
.bangumi-shelf-hero dl { display: grid; grid-template-columns: repeat(2, minmax(92px, 1fr)); margin: 0; padding: 17px 6px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 8px; background: rgba(19, 17, 37, 0.55); backdrop-filter: blur(8px); }
.bangumi-shelf-hero dl div { padding: 0 15px; border-right: 1px solid rgba(255, 255, 255, 0.2); }.bangumi-shelf-hero dl div:last-child { border: 0; }.bangumi-shelf-hero dt { font-size: 1.45rem; font-weight: 760; }.bangumi-shelf-hero dd { margin: 4px 0 0; color: rgba(255, 255, 255, 0.7); font-size: 0.78rem; }
.bangumi-shelf-controls { display: inline-flex; gap: 5px; margin: 30px 0 12px; padding: 5px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface); }
.bangumi-shelf-controls button { min-width: 98px; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ui-muted); font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }.bangumi-shelf-controls button.is-active { background: #4d4a78; color: #fff; }.bangumi-shelf-summary { margin: 0 0 18px; color: var(--ui-muted); font-size: 0.87rem; }
.bangumi-shelf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.bangumi-shelf-card { overflow: hidden; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface); box-shadow: var(--ui-shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }.bangumi-shelf-card:hover { border-color: #736da6; box-shadow: var(--ui-shadow-md); transform: translateY(-3px); }.bangumi-shelf-card a { display: grid; grid-template-columns: 126px minmax(0, 1fr); min-height: 224px; border: 0; color: inherit !important; }.bangumi-shelf-card img { width: 100%; height: 100%; object-fit: cover; box-shadow: none; }.bangumi-shelf-info { display: flex; flex-direction: column; padding: 19px; }.bangumi-shelf-info small { color: var(--ui-muted); font-size: 0.76rem; }.bangumi-shelf-info strong { margin-top: 8px; color: var(--ui-heading); font-size: 1.12rem; line-height: 1.35; }.bangumi-shelf-info em { margin-top: 9px; color: #c98528; font-size: 0.86rem; font-style: normal; font-weight: 760; }.bangumi-shelf-info p { display: -webkit-box; margin: 10px 0; overflow: hidden; color: var(--ui-muted); font-size: 0.84rem; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.bangumi-shelf-info b { margin-top: auto; color: #5d588f; font-size: 0.78rem; }.bangumi-shelf-info b i { margin-left: 5px; }

/* Friend links */
.type-link #page { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.type-link #page > .page-title { display: none; }
.type-link #article-container { max-width: 1060px; margin: 0 auto; }
.type-link .flink { position: relative; padding-top: 294px; }
.type-link .flink::before { position: absolute; top: 0; left: 0; width: 100%; height: 254px; border: 1px solid rgba(47, 113, 144, 0.3); border-radius: 8px; background: linear-gradient(100deg, rgba(15, 50, 65, 0.92), rgba(39, 110, 137, 0.68)), url('/images/Bamboo.jpg') center 38% / cover; content: ''; }
.type-link .flink::after { position: absolute; top: 58px; left: 48px; max-width: 480px; color: #fff; content: '友链\A 与值得反复访问的站点保持连接。'; font-size: 1.04rem; font-weight: 500; line-height: 1.75; white-space: pre-line; }
.type-link .flink > h2,
.type-link .flink > .flink-desc { display: none !important; }
.type-link .flink-list { gap: 18px; }.type-link .flink-list-item { min-height: 132px; border-color: rgba(47, 113, 144, 0.18) !important; background: var(--ui-surface) !important; }.type-link .flink-list-item a { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; height: 100%; padding: 18px; }.type-link .flink-item-icon { width: 60px; height: 60px; margin: 0 !important; }.type-link .flink-item-icon img { width: 100%; height: 100%; border-radius: 50% !important; object-fit: cover; }.type-link .flink-item-name { align-self: end; font-size: 1.04rem; }.type-link .flink-item-desc { grid-column: 2; align-self: start; margin-top: 5px; font-size: 0.84rem; }

@media screen and (max-width: 768px) {
  .bangumi-shelf-hero { display: block; min-height: 340px; padding: 32px 24px 22px; }.bangumi-shelf-hero h1 { font-size: 2.5rem; }.bangumi-shelf-hero dl { margin-top: 28px; width: max-content; }.bangumi-shelf-controls { display: flex; width: 100%; }.bangumi-shelf-controls button { flex: 1; min-width: 0; }.bangumi-shelf-grid { grid-template-columns: 1fr; }.bangumi-shelf-card a { grid-template-columns: 108px minmax(0, 1fr); min-height: 194px; }.bangumi-shelf-info { padding: 16px; }
  .type-link .flink { padding-top: 244px; }.type-link .flink::before { height: 210px; }.type-link .flink::after { top: 32px; left: 24px; right: 24px; font-size: 0.92rem; }.type-link .flink-list { grid-template-columns: 1fr; }.type-link .flink-list-item a { grid-template-columns: 66px minmax(0, 1fr); }.type-link .flink-item-icon { width: 52px; height: 52px; }
}

/* About: remove the card-inside-envelope treatment and use clear sections. */
.type-about #page > .page-title {
  display: none;
}

.type-about .about-envelope-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

.type-about .about-envelope-flap,
.type-about .about-envelope-bg {
  display: none !important;
}

.type-about .about-envelope-body,
.type-about .about-envelope-content {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.type-about .about-hero-section {
  margin: 0 0 22px !important;
  padding: 34px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow-sm) !important;
}

.type-about .about-envelope-avatar img {
  border-radius: 8px !important;
  box-shadow: none !important;
}

.type-about .about-greeting {
  color: var(--ui-heading) !important;
  font-size: 2rem !important;
  letter-spacing: 0 !important;
}

.type-about .about-tagline,
.type-about .about-signature {
  color: var(--ui-muted) !important;
}

.type-about .about-card {
  margin: 0 0 18px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow-sm) !important;
}

.type-about .about-card:hover {
  transform: none !important;
  box-shadow: var(--ui-shadow-sm) !important;
}

.type-about .about-card-header {
  border-bottom-color: var(--ui-border) !important;
}

.type-about .about-card-header h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--ui-heading) !important;
}

.type-about .about-info-item,
.type-about .achievement-item,
.type-about .feature-item,
.type-about .skill-item {
  border-color: var(--ui-border) !important;
  background: var(--ui-surface-soft) !important;
  box-shadow: none !important;
}

.type-about .about-main-quote {
  border-left-color: var(--ui-teal) !important;
  background: var(--ui-teal-soft) !important;
  box-shadow: none !important;
}

.type-about .contact-btn {
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px !important;
  background: var(--ui-surface-soft) !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
}

.type-about .contact-btn:hover {
  border-color: var(--ui-teal) !important;
  color: var(--ui-teal) !important;
}

/* About page: a concise personal profile and site introduction. */
.about-redesign {
  --about-accent: #247c98;
  max-width: 1000px;
  margin: 0 auto;
}

.about-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 48px;
  min-height: 330px;
  overflow: hidden;
  padding: 48px 56px;
  border: 1px solid rgba(65, 139, 165, 0.28);
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(12, 51, 68, 0.96), rgba(26, 91, 113, 0.82)), url('/images/selection1.jpg') center / cover;
  color: #fff;
}

.about-intro::after {
  position: absolute;
  top: -105px;
  right: -82px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(220, 246, 255, 0.28);
  border-radius: 50%;
  box-shadow: -54px 42px 0 -1px rgba(220, 246, 255, 0.14);
  content: '';
}

.about-intro-copy,
.about-avatar-frame { position: relative; z-index: 1; }
.about-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #aee7f5; font-size: 0.77rem; font-weight: 760; }
.about-intro h1 { margin: 15px 0 10px; color: #fff; font-size: 3rem; font-weight: 800; line-height: 1.1; }
.about-lead { max-width: 540px; margin: 0; color: rgba(241, 252, 255, 0.9); font-size: 1.04rem; line-height: 1.75; }
.about-interests { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.about-interests span { padding: 5px 9px; border: 1px solid rgba(225, 248, 255, 0.28); border-radius: 999px; color: rgba(245, 253, 255, 0.92); font-size: 0.76rem; }

.about-avatar-frame { width: 166px; height: 166px; padding: 7px; border: 1px solid rgba(230, 250, 255, 0.46); border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.about-avatar-frame img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: none; }

.about-section { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; padding: 44px 0; border-bottom: 1px solid var(--ui-border); }
.about-section-heading { display: flex; align-items: flex-start; gap: 14px; }
.about-section-heading > span { color: var(--about-accent); font-size: 0.82rem; font-weight: 760; }
.about-section-heading p { margin: 0 0 5px; color: var(--ui-muted); font-size: 0.72rem; font-weight: 760; }
.about-section-heading h2 { margin: 0; color: var(--ui-heading); font-size: 1.56rem; font-weight: 780; }
.about-section-content { color: var(--ui-muted); font-size: 0.98rem; line-height: 1.85; }
.about-section-content > p { margin: 0 0 14px; }
.about-section-content strong { color: var(--ui-heading); }

.about-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.about-facts div { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--ui-border); border-radius: 6px; background: var(--ui-surface-soft); color: var(--ui-ink); font-size: 0.82rem; font-weight: 650; }
.about-facts i { color: var(--about-accent); }

.about-site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.about-site-grid > div { padding: 19px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface); }
.about-site-grid i { color: var(--about-accent); font-size: 1.2rem; }
.about-site-grid h3 { margin: 13px 0 6px; color: var(--ui-heading); font-size: 1rem; }
.about-site-grid p { margin: 0; color: var(--ui-muted); font-size: 0.83rem; line-height: 1.65; }

.about-contact { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 0 4px; }
.about-contact p { margin: 0; color: var(--ui-muted); }
.about-contact > div { display: flex; flex-wrap: wrap; gap: 9px; }
.about-contact a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--ui-border) !important; border-radius: 6px; background: var(--ui-surface); color: var(--ui-ink) !important; font-size: 0.84rem; font-weight: 680; }
.about-contact a:hover { border-color: var(--about-accent) !important; color: var(--about-accent) !important; }

[data-theme='dark'] .about-intro { background: linear-gradient(105deg, rgba(12, 31, 43, 0.96), rgba(17, 56, 72, 0.86)), url('/images/selection1.jpg') center / cover; }

@media screen and (max-width: 768px) {
  .about-intro { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 34px 24px; }
  .about-intro h1 { font-size: 2.35rem; }
  .about-avatar-frame { width: 112px; height: 112px; }
  .about-section { grid-template-columns: 1fr; gap: 18px; padding: 32px 0; }
  .about-site-grid { grid-template-columns: 1fr; }
  .about-contact { align-items: flex-start; flex-direction: column; gap: 14px; }
}

/* Footer and utility controls */
#footer {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
  border-top: 1px solid rgba(95, 162, 192, 0.32);
  background: #f7fbfd !important;
  color: var(--ui-muted) !important;
}

#footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #79bdd7;
}

#footer .footer-other {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
}

#footer .footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(160px, 0.7fr) minmax(220px, 0.9fr);
  gap: 42px;
  order: -1;
  padding: 44px 0 34px;
  text-align: left;
}

#footer .footer-intro p {
  max-width: 320px;
  margin: 10px 0 0;
  color: var(--ui-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

#footer .footer-brand {
  display: inline-block;
  color: var(--ui-heading) !important;
  font-size: 1.25rem;
  font-weight: 700;
}

#footer .footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-content: start;
  gap: 12px 24px;
  padding-top: 5px;
}

#footer .footer-nav a,
#footer .footer-record {
  color: var(--ui-muted) !important;
  font-size: 0.9rem;
}

#footer .footer-nav a:hover,
#footer .footer-record:hover {
  color: var(--ui-teal) !important;
}

#footer .footer-social {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

#footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ui-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ui-teal) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#footer .footer-social a:hover {
  border-color: var(--ui-teal);
  color: var(--ui-coral) !important;
  transform: translateY(-2px);
}

#footer .footer-record {
  grid-column: 3;
  align-self: end;
  justify-self: start;
  margin-top: -8px;
}

#footer .footer-copyright {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  padding: 18px 0 22px;
  border-top: 1px solid var(--ui-border);
  font-size: 0.82rem;
}

#footer-wrap,
#footer-wrap a,
#footer .footer-other,
#footer .footer-other a {
  color: var(--ui-muted) !important;
}

[data-theme='dark'] #footer {
  border-top-color: rgba(120, 211, 239, 0.32);
  background: #141d2b !important;
}

[data-theme='dark'] #footer::before {
  background: #5b96b8;
}

[data-theme='dark'] #footer .footer-brand {
  color: #edf7ff !important;
}

[data-theme='dark'] #footer .footer-social a {
  border-color: rgba(190, 224, 244, 0.19);
  background: rgba(31, 45, 64, 0.82);
  color: #8ad5ee !important;
}

[data-theme='dark'] #footer .footer-social a:hover {
  border-color: #8ad5ee;
  color: #e8acd3 !important;
}

#rightside > div > button,
#rightside > div > a {
  border: 1px solid var(--ui-border);
  border-radius: 6px !important;
  background: var(--ui-surface-solid) !important;
  box-shadow: var(--ui-shadow-sm) !important;
  color: var(--ui-ink) !important;
}

/* Compact appearance settings: theme and ambient motion live behind one clear control. */
#rightside.rightside-show {
  opacity: 1;
}

#rightside #rightside-config-show > button,
#rightside #rightside-config-hide > button {
  position: relative;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-color: rgba(32, 95, 110, 0.2);
  border-radius: 50% !important;
  background: rgba(250, 253, 251, 0.94) !important;
  box-shadow: 0 8px 22px rgba(22, 62, 74, 0.17) !important;
  color: #25616b !important;
  font-size: 0.9rem;
  line-height: 38px;
}

#rightside #rightside-config-show > button:hover,
#rightside #rightside-config-hide > button:hover {
  border-color: #2d8d88;
  background: #e4f4f0 !important;
  color: #176f6a !important;
  transform: translateY(-2px);
}

#rightside #rightside-config {
  background: #236c70 !important;
  color: #fff !important;
}

#rightside #rightside-config i {
  animation: none;
}

#rightside #rightside-config-hide {
  padding: 4px 0;
}

#rightside #rightside-config-hide.show::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(24, 56, 63, 0.92);
  color: #fff;
  content: '显示设置';
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

#rightside #toggle-effects {
  color: #a85d52 !important;
}

[data-theme='dark'] #rightside #rightside-config-show > button,
[data-theme='dark'] #rightside #rightside-config-hide > button {
  border-color: rgba(152, 215, 218, 0.22);
  background: rgba(27, 43, 48, 0.96) !important;
  color: #a9dfd8 !important;
}

[data-theme='dark'] #rightside #rightside-config {
  background: #347f7e !important;
  color: #fff !important;
}

/* Local search follows the site's quiet paper-and-teal UI rather than the theme default. */
#search-mask {
  background: rgba(12, 27, 35, 0.56);
  backdrop-filter: blur(5px);
}

#local-search .search-dialog {
  top: max(7vh, 52px);
  margin-left: min(-340px, -44vw);
  padding: 24px;
  width: min(680px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 104px));
  border: 1px solid var(--ui-border-strong);
  border-radius: 8px;
  background: var(--ui-surface-solid);
  box-shadow: 0 24px 68px rgba(17, 38, 49, 0.24), var(--ui-shadow-md);
}

#local-search .search-nav {
  min-height: 32px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-heading);
  font-size: 1rem;
}

#local-search .search-dialog-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

#local-search .search-dialog-title::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--ui-teal-soft);
  color: var(--ui-teal);
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-size: 0.78rem;
  font-weight: 900;
}

#local-search .search-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px !important;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px !important;
  background: transparent;
  box-shadow: none !important;
  color: var(--ui-muted) !important;
}

#local-search .search-close-button:hover {
  border-color: var(--ui-coral) !important;
  background: var(--ui-coral-soft);
  box-shadow: none !important;
  color: var(--ui-coral) !important;
  transform: none;
}

#local-search .local-search-input input {
  height: 44px;
  padding: 0 15px;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: 6px !important;
  background: var(--ui-surface-soft) !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
  font-size: 0.95rem;
}

#local-search .local-search-input input:focus {
  border-color: var(--ui-teal) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-teal) 16%, transparent) !important;
}

#local-search .local-search-input input::placeholder {
  color: var(--ui-faint);
}

#local-search .search-dialog hr {
  margin: 18px 0 12px;
  border: 0;
  border-top: 1px solid var(--ui-border);
}

#local-search .search-dialog hr::before {
  display: none;
}

#local-search .search-result-list {
  margin: 0 -6px;
  padding: 0 6px;
  max-height: min(480px, calc(100vh - 300px));
}

#local-search .search-result-list .local-search-hit-item {
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  line-height: 1.55;
}

#local-search .search-result-list .local-search-hit-item[value]::before {
  min-width: 24px;
  height: 24px;
  margin: 1px 12px 0 0;
  border-radius: 50%;
  background: var(--ui-amber-soft);
  color: var(--ui-amber);
  font-size: 0.74rem;
  font-style: normal;
}

#local-search .search-result-list .local-search-hit-item:hover {
  border-color: var(--ui-border);
  background: var(--ui-surface-soft);
  box-shadow: var(--ui-shadow-sm);
  transform: translateY(-1px);
}

#local-search .search-result-list .local-search-hit-item a,
#local-search .search-result-list .local-search-hit-item a:hover {
  color: var(--ui-ink);
}

#local-search .search-result-title {
  display: block;
  margin-bottom: 4px;
  color: var(--ui-heading);
  font-size: 0.98rem;
  font-weight: 700;
}

#local-search .search-result {
  margin: 0 0 5px !important;
  color: var(--ui-muted);
  font-size: 0.87rem;
  overflow-wrap: anywhere;
}

#local-search .search-keyword {
  padding: 0 0.12em;
  border-radius: 2px;
  background: var(--ui-amber-soft);
  color: var(--ui-heading);
  font-weight: 700;
}

#local-search #local-search-stats .search-result-stats {
  margin: 12px 0 0;
  color: var(--ui-muted);
  font-size: 0.84rem;
}

#local-search .ais-Pagination {
  margin-top: 18px;
}

#local-search .ais-Pagination .ais-Pagination-link {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--ui-border);
  border-radius: 5px;
  background: var(--ui-surface-soft);
  box-shadow: none;
  color: var(--ui-ink);
}

#local-search .ais-Pagination .ais-Pagination-item:not(.ais-Pagination-item--selected):not(.ais-Pagination-item--ellipsis):not(.ais-Pagination-item--disabled) .ais-Pagination-link:hover {
  border-color: var(--ui-teal);
  background: var(--ui-teal-soft);
  color: var(--ui-teal);
  transform: none;
}

#local-search .ais-Pagination .ais-Pagination-item--selected .ais-Pagination-link {
  border-color: var(--ui-teal);
  background: var(--ui-teal);
  color: #fff;
}

[data-theme='dark'] #search-mask {
  background: rgba(5, 12, 19, 0.72);
}

[data-theme='dark'] #local-search .search-dialog {
  border-color: rgba(173, 212, 223, 0.2);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.52);
}

@media screen and (max-width: 768px) {
  #local-search .search-dialog {
    top: 0;
    left: 0;
    margin-left: 0;
    padding: 20px 16px;
    width: 100%;
    max-height: none;
    height: var(--search-height);
    border: 0;
    border-radius: 0;
  }

  #local-search .search-result-list {
    max-height: calc(var(--search-height) - 250px);
  }

  #local-search .search-result-list .local-search-hit-item {
    padding: 11px 10px;
  }
}

@media screen and (max-width: 900px) {
  #nav {
    padding: 0 18px;
  }

  #content-inner {
    padding-top: 22px;
  }

  .layout {
    gap: 18px;
  }

  .layout > div:first-child:not(.nc) {
    padding: 30px 24px;
  }

  .type-bangumis .bangumi-container {
    padding: 24px !important;
  }
}

@media screen and (max-width: 768px) {
  #footer {
    margin-top: 42px;
  }

  #footer .footer-other {
    width: min(100% - 36px, 520px);
  }

  #footer .footer-main {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 0 28px;
  }

  #footer .footer-nav {
    gap: 12px 30px;
  }

  #footer .footer-record {
    grid-column: auto;
    margin-top: 0;
  }

  #footer .footer-copyright {
    justify-content: flex-start;
    padding: 16px 0 20px;
    text-align: left;
  }

  #page-header.full_page #site-title {
    font-size: 2.15rem;
  }

  #content-inner {
    padding: 16px 12px 0;
  }

  .layout > div:first-child:not(.nc) {
    padding: 24px 18px;
  }

  #recent-posts .recent-post-item {
    min-height: 0;
    margin-bottom: 16px;
  }

  #recent-posts .recent-post-item .post_cover {
    flex-basis: auto;
    width: 100%;
    height: 200px !important;
    min-height: 200px;
  }

  #recent-posts .recent-post-item > .recent-post-info {
    width: 100%;
    padding: 22px 20px 24px;
  }

  #recent-posts .recent-post-item.no-cover > .recent-post-info,
  #recent-posts .recent-post-item:not(:has(.post_cover)) > .recent-post-info {
    min-height: 0;
    padding: 24px 20px;
  }

  #recent-posts .recent-post-item .post_cover::after,
  #recent-posts .recent-post-item:nth-child(even) .post_cover::after {
    background: linear-gradient(0deg, rgba(20, 33, 43, 0.09), transparent 34%);
  }

  #recent-posts .recent-post-item > .recent-post-info > .article-title {
    font-size: 1.2rem;
  }

  #recent-posts .recent-post-item > .recent-post-info > .content {
    margin-top: 10px;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  #page > .page-title,
  #archive > .article-sort-title {
    margin-bottom: 22px;
    padding-bottom: 16px;
    font-size: 1.6rem;
  }

  .type-categories .category-list,
  .type-link .flink-list {
    grid-template-columns: 1fr;
  }

  #archive .article-sort {
    margin-left: 2px;
    padding-left: 18px;
  }

  #archive .article-sort-item::before {
    left: -24px;
  }

  #archive .article-sort-item-img {
    width: 92px;
    height: 64px;
  }

  .type-bangumis #page > .page-title,
  .type-bangumis .bangumi-container,
  .type-about .about-hero-section {
    padding: 22px 18px !important;
  }

  .type-bangumis #page > .page-title::after {
    left: 18px;
  }

  .type-about .about-greeting {
    font-size: 1.55rem !important;
    overflow-wrap: anywhere;
  }

  .type-about .about-hero-section {
    align-items: center !important;
    flex-direction: column !important;
    overflow: hidden;
    text-align: center;
  }

  .type-about .about-hero-text {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
  }

  .type-about .about-signature {
    width: 100%;
    flex-direction: column;
  }

  .type-about .signature-item {
    max-width: 100%;
  }

  .type-about .signature-item span {
    overflow-wrap: anywhere;
  }

  .type-about .signature-divider {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Search experience v2: a focused command palette rather than a generic modal. */
#search-mask {
  background: rgba(8, 23, 31, 0.68);
  backdrop-filter: blur(12px) saturate(0.82);
}

#local-search .search-dialog {
  top: 50%;
  left: 50%;
  display: none;
  margin: 0;
  padding: 0;
  width: min(760px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 72px));
  overflow: hidden;
  border: 1px solid rgba(38, 80, 91, 0.22);
  border-radius: 8px;
  background: #fbfcfa;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
}

#local-search .search-dialog::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 6px;
  background: var(--ui-teal);
  content: '';
}

#local-search .search-nav,
#local-search .local-search-input,
#local-search .search-dialog hr,
#local-search #local-search-results,
#local-search .ais-Pagination,
#local-search #local-search-stats {
  position: relative;
  z-index: 1;
}

#local-search .search-nav {
  min-height: 68px;
  margin: 0;
  padding: 0 24px 0 30px;
  border: 0;
  background: #e7f3f1;
  color: #173e42;
}

#local-search .search-dialog-title {
  gap: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

#local-search .search-dialog-title::before {
  display: none;
  content: none;
}

#local-search .search-dialog-title::after {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(24, 117, 111, 0.24);
  color: #5a7475;
  content: '循字而行，遇见旧日篇章';
  font-size: 0.78rem;
  font-weight: 500;
}

#local-search .search-close-button {
  flex-basis: 34px !important;
  width: 34px;
  height: 34px;
  border-color: rgba(24, 117, 111, 0.2) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.56);
  color: #35666a !important;
}

#local-search .search-close-button:hover {
  border-color: var(--ui-coral) !important;
  background: #fff !important;
  color: var(--ui-coral) !important;
  transform: rotate(90deg);
}

#local-search .local-search-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 28px 16px 30px;
  background: #fbfcfa;
}

#local-search .local-search-input::before {
  display: none;
  content: none;
}

#local-search .local-search-input::after {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(31, 41, 51, 0.15);
  border-radius: 4px;
  color: var(--ui-faint);
  content: 'ESC';
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  line-height: 1;
}

#local-search .local-search-input input {
  height: 42px;
  min-width: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ui-heading) !important;
  font-size: 1.08rem;
  font-weight: 600;
}

#local-search .local-search-input input:focus {
  box-shadow: none !important;
}

#local-search .local-search-input:focus-within {
  box-shadow: inset 0 -2px 0 var(--ui-teal);
}

#local-search .search-dialog hr {
  margin: 0 28px 0 30px;
  border-top-color: rgba(31, 41, 51, 0.1);
}

#local-search .search-result-list {
  margin: 0;
  padding: 10px 28px 12px 30px;
  max-height: min(456px, calc(100vh - 258px));
}

#local-search .search-result-list .local-search-hit-item {
  position: relative;
  align-items: flex-start;
  margin: 0;
  padding: 16px 14px 16px 48px;
  border: 0;
  border-bottom: 1px solid rgba(31, 41, 51, 0.09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background 0.18s ease, padding 0.18s ease;
}

#local-search .search-result-list .local-search-hit-item:last-child {
  border-bottom: 0;
}

#local-search .search-result-list .local-search-hit-item[value]::before {
  position: absolute;
  top: 18px;
  left: 10px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  margin: 0;
  border: 1px solid rgba(24, 117, 111, 0.2);
  border-radius: 4px;
  background: #eef8f6;
  color: var(--ui-teal);
  font-size: 0.7rem;
  font-weight: 800;
}

#local-search .search-result-list .local-search-hit-item:hover {
  padding-left: 54px;
  border-color: rgba(31, 41, 51, 0.09);
  background: #f0f7f6;
  box-shadow: inset 3px 0 0 var(--ui-teal);
  transform: none;
}

#local-search .search-result-list .local-search-hit-item:hover::before {
  left: 16px;
  background: var(--ui-teal);
  color: #fff;
}

#local-search .search-result-title {
  margin-bottom: 6px;
  color: #17363d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

#local-search .search-result {
  max-width: 620px;
  margin: 0 0 4px !important;
  color: #718085;
  font-size: 0.86rem;
  line-height: 1.62;
}

#local-search .search-keyword {
  padding: 0 0.14em;
  border-radius: 2px;
  background: #fff0c9;
  color: #61430d;
  font-weight: 800;
}

#local-search #local-search-stats {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 28px 0 30px;
  border-top: 1px solid rgba(31, 41, 51, 0.09);
  background: #f4f8f7;
}

#local-search #local-search-stats .search-result-stats {
  margin: 0;
  color: #708087;
  font-size: 0.78rem;
  font-weight: 650;
}

#local-search .ais-Pagination {
  margin: 0;
  padding: 12px 30px;
  border-top: 1px solid rgba(31, 41, 51, 0.09);
  background: #f4f8f7;
}

#local-search .ais-Pagination .ais-Pagination-link {
  min-width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #5f7278;
  font-size: 0.78rem;
}

#local-search .ais-Pagination .ais-Pagination-item:not(.ais-Pagination-item--selected):not(.ais-Pagination-item--ellipsis):not(.ais-Pagination-item--disabled) .ais-Pagination-link:hover {
  border: 0;
  background: #dcefed;
  color: var(--ui-teal);
}

#local-search .ais-Pagination .ais-Pagination-item--selected .ais-Pagination-link {
  border: 0;
  background: var(--ui-teal);
  color: #fff;
}

[data-theme='dark'] #local-search .search-dialog {
  border-color: rgba(155, 206, 215, 0.2);
  background: #172126;
}

[data-theme='dark'] #local-search .search-nav {
  background: #193533;
  color: #e1f2ef;
}

[data-theme='dark'] #local-search .search-dialog-title::before,
[data-theme='dark'] #local-search .search-close-button {
  border-color: rgba(174, 224, 216, 0.2) !important;
  background: rgba(18, 39, 40, 0.78);
  color: #8dd6ce !important;
}

[data-theme='dark'] #local-search .search-dialog-title::after {
  border-left-color: rgba(174, 224, 216, 0.25);
  color: #a4c7c2;
}

[data-theme='dark'] #local-search .local-search-input,
[data-theme='dark'] #local-search .ais-Pagination,
[data-theme='dark'] #local-search #local-search-stats {
  background: #172126;
}

[data-theme='dark'] #local-search .local-search-input input {
  color: #e7f0f0 !important;
}

[data-theme='dark'] #local-search .local-search-input::after {
  border-color: rgba(213, 235, 235, 0.2);
}

[data-theme='dark'] #local-search .search-dialog hr,
[data-theme='dark'] #local-search .search-result-list .local-search-hit-item,
[data-theme='dark'] #local-search #local-search-stats,
[data-theme='dark'] #local-search .ais-Pagination {
  border-color: rgba(213, 235, 235, 0.1);
}

[data-theme='dark'] #local-search .search-result-list .local-search-hit-item:hover {
  background: #1d302f;
}

[data-theme='dark'] #local-search .search-result-title {
  color: #edf6f5;
}

[data-theme='dark'] #local-search .search-result {
  color: #a9bbbd;
}

[data-theme='dark'] #local-search .search-keyword {
  background: #4a3a17;
  color: #ffda84;
}

@media screen and (max-width: 768px) {
  #local-search .search-dialog {
    top: 0;
    left: 0;
    width: 100%;
    max-height: none;
    height: var(--search-height);
    border: 0;
    border-radius: 0;
    transform: none;
  }

  #local-search .search-nav {
    min-height: 62px;
    padding: 0 18px 0 22px;
  }

  #local-search .local-search-input {
    padding: 16px 20px 12px 22px;
  }

  #local-search .local-search-input::after {
    display: none;
  }

  #local-search .search-dialog-title::after {
    margin-left: 9px;
    padding-left: 9px;
    font-size: 0.7rem;
  }

  #local-search .search-dialog hr {
    margin: 0 20px 0 22px;
  }

  #local-search .search-result-list {
    padding: 6px 14px 8px 22px;
    max-height: calc(var(--search-height) - 232px);
  }

  #local-search .search-result-list .local-search-hit-item {
    padding-right: 8px;
  }

  #local-search #local-search-stats,
  #local-search .ais-Pagination {
    padding-right: 20px;
    padding-left: 22px;
  }
}

@keyframes search-panel-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes search-panel-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
