:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --header-height: 64px;
  --code-bg: #111827;
  --code-toolbar-bg: #0b1220;
  --code-text: #dbeafe;
  --code-muted: #94a3b8;
  --code-line: rgba(148, 163, 184, 0.26);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111c31;
  --surface-soft: #17233a;
  --text: #e5eefb;
  --muted: #9aa8bd;
  --border: #27364f;
  --accent: #60a5fa;
  --accent-strong: #93c5fd;
  --accent-soft: rgba(96, 165, 250, 0.18);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
  --code-bg: #0b1020;
  --code-toolbar-bg: #080d18;
  --code-text: #dbeafe;
  --code-muted: #8ea3bd;
  --code-line: rgba(148, 163, 184, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

body.search-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-main {
  min-height: calc(100vh - var(--header-height));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 100%;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  font-weight: 700;
  font-size: 14px;
}

.site-nav a {
  color: var(--text);
  opacity: 0.88;
}

.site-nav a:hover {
  color: var(--accent);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-soft);
}

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

.lang-switch span {
  font-size: 15px;
  font-weight: 800;
}

.mobile-menu-button {
  display: none;
}

.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: 52px;
  min-height: 390px;
  padding: 34px 0 32px;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker {
  margin-bottom: 16px;
}

.hero-badge,
.hero-tax {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  max-width: 100%;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.hero-tax {
  color: var(--muted);
  background: var(--surface);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.hero-tax:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.hero-badge svg,
.hero-tax svg,
.hero-meta svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.hero-copy h1 {
  margin: 0;
  max-width: 680px;
  font-size: 42px;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-copy h1 a {
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-copy h1 a:hover {
  color: var(--accent-strong);
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.hero-meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: var(--surface);
}

:root[data-theme="dark"] .btn-primary {
  background: #e5eefb;
  color: #0f172a;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.hero-actions .btn {
  gap: 8px;
}

.hero-media {
  min-width: 0;
}

.hero-cover-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
}

.hero-cover-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.66));
}

.hero-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.hero-cover-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.04);
}

.hero-cover-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.hero-cover-label svg {
  width: 15px;
  height: 15px;
}

:root[data-theme="dark"] .hero-cover-card img {
  filter: brightness(0.92) saturate(0.92);
}

:root[data-theme="dark"] .hero-cover-card:hover img {
  filter: brightness(0.98) saturate(1.02);
}

.journal-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(340px, 34vw, 440px);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, var(--border));
  background:
    linear-gradient(100deg, rgba(248, 250, 252, 0.94) 0%, rgba(248, 250, 252, 0.76) 36%, rgba(248, 250, 252, 0.12) 72%),
    radial-gradient(circle at 80% 26%, rgba(20, 184, 166, 0.2), transparent 31%),
    radial-gradient(circle at 92% 72%, rgba(37, 99, 235, 0.12), transparent 30%),
    linear-gradient(135deg, #edf6f3 0%, #f8fafc 48%, #eef2ff 100%);
}

.journal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(248, 250, 252, 0.9) 0%, rgba(248, 250, 252, 0.54) 38%, rgba(248, 250, 252, 0) 72%),
    linear-gradient(180deg, transparent 62%, rgba(15, 23, 42, 0.04));
  pointer-events: none;
}

.journal-hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.journal-rule-field {
  position: absolute;
  inset: -20% -8% -20% 42%;
  opacity: 0.48;
  background:
    linear-gradient(115deg, rgba(15, 23, 42, 0.07) 1px, transparent 1px),
    linear-gradient(25deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 64px 64px, 88px 88px;
  mask-image: linear-gradient(90deg, transparent, #000 26%, #000 78%, transparent);
}

.journal-light-band {
  position: absolute;
  right: 3%;
  top: 10%;
  width: min(520px, 46vw);
  height: min(360px, 32vw);
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.12) 64%, transparent),
    conic-gradient(from 145deg, rgba(20, 184, 166, 0.24), rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.04), rgba(20, 184, 166, 0.2));
  filter: blur(4px);
  transform: rotate(-12deg);
}

.journal-stack {
  position: absolute;
  right: max(7vw, 72px);
  top: 50%;
  width: min(430px, 37vw);
  aspect-ratio: 1.18 / 1;
  transform: translateY(-50%);
  transform-style: preserve-3d;
}

.journal-sheet,
.journal-spine,
.journal-thread,
.journal-node,
.journal-marker {
  position: absolute;
  display: block;
}

.journal-sheet {
  width: 68%;
  height: 74%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(226, 232, 240, 0.42));
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.journal-sheet-back {
  right: 4%;
  top: 8%;
  transform: rotate(8deg) skewY(-2deg);
  opacity: 0.72;
}

.journal-sheet-front {
  right: 18%;
  top: 16%;
  transform: rotate(-7deg);
}

.journal-sheet-line {
  position: absolute;
  left: 15%;
  top: var(--line-y);
  width: var(--line-width);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.28), rgba(20, 184, 166, 0.18), transparent);
}

.journal-corner-mark {
  position: absolute;
  right: 13%;
  top: 13%;
  width: 44px;
  height: 44px;
  border-top: 2px solid rgba(20, 184, 166, 0.5);
  border-right: 2px solid rgba(20, 184, 166, 0.5);
}

.journal-spine {
  left: 7%;
  top: 47%;
  width: 74%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.26), transparent);
  transform: rotate(-18deg);
  transform-origin: center;
}

.journal-thread {
  width: 56%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.5), rgba(37, 99, 235, 0.36), transparent);
  transform-origin: center;
}

.journal-thread-a {
  right: 4%;
  top: 36%;
  transform: rotate(17deg);
}

.journal-thread-b {
  right: 15%;
  bottom: 24%;
  transform: rotate(-23deg);
}

.journal-node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.12), 0 10px 20px rgba(15, 23, 42, 0.14);
}

.journal-node-a {
  right: 18%;
  top: 28%;
}

.journal-node-b {
  right: 51%;
  top: 55%;
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.1), 0 10px 20px rgba(15, 23, 42, 0.14);
}

.journal-node-c {
  right: 31%;
  bottom: 17%;
}

.journal-marker {
  right: 23%;
  top: 5%;
  width: 14px;
  height: 88%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 184, 166, 0), rgba(20, 184, 166, 0.58), rgba(37, 99, 235, 0));
  opacity: 0.38;
}

.journal-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: clamp(340px, 34vw, 440px);
  padding: 38px 0 42px;
}

.journal-hero-copy {
  width: min(590px, 54vw);
  margin-left: clamp(0px, 2vw, 22px);
}

.journal-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.22em;
}

.journal-hero-kicker::after {
  content: "";
  width: 46px;
  height: 2px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.76;
}

.journal-hero-copy h1 {
  margin: 18px 0 0;
  max-width: 680px;
  color: #0f172a;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(36px, 3.45vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.journal-hero-copy p {
  margin: 16px 0 0;
  max-width: 520px;
  color: rgba(15, 23, 42, 0.72);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.75;
  font-weight: 650;
  overflow-wrap: break-word;
}

.journal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.journal-hero-actions .btn {
  min-height: 42px;
  border-radius: 999px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.journal-hero-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.journal-hero-actions .btn-primary {
  background: #0f172a;
  color: #f8fafc;
}

.journal-hero-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.journal-hero-actions .btn svg {
  width: 17px;
  height: 17px;
}

:root[data-theme="dark"] .journal-hero {
  border-bottom-color: rgba(96, 165, 250, 0.18);
  background:
    linear-gradient(100deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 40%, rgba(15, 23, 42, 0.16) 76%),
    radial-gradient(circle at 80% 28%, rgba(20, 184, 166, 0.2), transparent 32%),
    radial-gradient(circle at 94% 72%, rgba(96, 165, 250, 0.16), transparent 30%),
    linear-gradient(135deg, #0b1324 0%, #111c31 52%, #172554 100%);
}

:root[data-theme="dark"] .journal-hero::before {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.58) 42%, rgba(15, 23, 42, 0) 76%),
    linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.12));
}

:root[data-theme="dark"] .journal-rule-field {
  opacity: 0.34;
  background:
    linear-gradient(115deg, rgba(226, 232, 240, 0.08) 1px, transparent 1px),
    linear-gradient(25deg, rgba(226, 232, 240, 0.06) 1px, transparent 1px);
}

:root[data-theme="dark"] .journal-light-band {
  opacity: 0.62;
  filter: blur(8px);
}

:root[data-theme="dark"] .journal-sheet {
  border-color: rgba(226, 232, 240, 0.14);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.64)),
    linear-gradient(180deg, rgba(226, 232, 240, 0.08), rgba(96, 165, 250, 0.04));
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .journal-spine {
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.28), transparent);
}

:root[data-theme="dark"] .journal-hero-kicker {
  color: #5eead4;
}

:root[data-theme="dark"] .journal-hero-copy h1 {
  color: #e5eefb;
}

:root[data-theme="dark"] .journal-hero-copy p {
  color: rgba(229, 238, 251, 0.72);
}

:root[data-theme="dark"] .journal-hero-actions .btn-primary {
  background: #e5eefb;
  color: #0f172a;
}

:root[data-theme="dark"] .journal-hero-actions .btn-secondary {
  background: rgba(17, 28, 49, 0.64);
  color: #e5eefb;
  border-color: rgba(226, 232, 240, 0.14);
}

.home-feature-section {
  padding: 22px 0 14px;
}

.home-feature-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 30%);
  --feature-panel-image: none;
  overflow: hidden;
  height: 340px;
  min-height: 340px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #6d4bf0;
  box-shadow: var(--shadow-soft);
}

.home-feature-banner.is-solo {
  grid-template-columns: 1fr;
}

.feature-main,
.feature-list-item {
  position: relative;
  min-width: 0;
  color: #ffffff;
}

.feature-main {
  display: block;
  overflow: hidden;
  height: 100%;
  min-height: 340px;
  background: #111827;
  touch-action: pan-y;
}

.feature-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.62));
  pointer-events: none;
}

.feature-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: none;
  transform: scale(1.02);
  transition: opacity 0.18s ease, transform 0.45s ease;
}

.feature-main:hover img {
  transform: scale(1.055);
}

.feature-main-copy {
  position: absolute;
  left: clamp(22px, 3vw, 44px);
  right: clamp(22px, 5vw, 86px);
  bottom: clamp(22px, 3vw, 38px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.feature-main-copy h1 {
  order: 1;
  margin: 0;
  max-width: 18em;
  color: #ffffff;
  font-size: clamp(24px, 2.45vw, 36px);
  line-height: 1.18;
  font-weight: 850;
  text-shadow: 0 3px 18px rgba(15, 23, 42, 0.34);
  overflow-wrap: anywhere;
}

.feature-label {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 750;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
}

.feature-label svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.feature-mobile-dots {
  display: none;
}

.feature-list {
  position: relative;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  height: 100%;
  min-height: 340px;
  background: #1f2937;
}

.feature-list::before,
.feature-list::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.feature-list::before {
  inset: -34px;
  background-image: var(--feature-panel-image);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.55) contrast(1.08);
  opacity: 1;
  transform: scale(1.12);
  transition: opacity 0.2s ease;
}

.feature-list::after {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(15, 23, 42, 0.26));
}

.feature-list-item {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 780;
  line-height: 1.35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.12);
  cursor: default;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.feature-list-item:last-child {
  border-bottom: 0;
}

.feature-list-item.is-active,
.feature-list-item:hover {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.26);
}

.feature-list-item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.feature-list-item span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] .home-feature-banner {
  border-color: var(--border);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .feature-list {
  background: #111827;
}

:root[data-theme="dark"] .feature-list-item {
  background: rgba(15, 23, 42, 0.16);
}

:root[data-theme="dark"] .feature-list-item.is-active,
:root[data-theme="dark"] .feature-list-item:hover {
  background: rgba(15, 23, 42, 0.42);
}

.home-cats {
  padding: 18px 0 34px;
}

.cat-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}

.cat-strip::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cat-chip em {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.cat-chip.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: none;
}

.cat-chip:hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  color: var(--accent);
  transform: translateY(-1px);
}

.cat-chip.is-active:hover {
  color: #fff;
  background: var(--accent);
}

.cat-chip.more {
  margin-left: auto;
  border: 1px solid var(--border);
  background: var(--surface);
}

.cat-chip svg {
  width: 17px;
  height: 17px;
}

.post-section {
  padding: 8px 0 64px;
}

.home-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.home-post-column {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.section-head svg {
  width: 16px;
  height: 16px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-aside {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  display: grid;
  gap: 18px;
  min-width: 0;
}

.home-aside-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.home-aside-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 20px 8px;
  color: var(--text);
  font-weight: 850;
}

.home-aside-head svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.home-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 15px;
  padding: 14px 20px 20px;
}

.home-tag-cloud a {
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  color: var(--text);
  opacity: var(--tag-opacity, 0.78);
  font-size: var(--tag-size, 16px);
  line-height: 1.2;
  transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.home-tag-cloud a.is-hidden {
  display: none;
}

.home-tag-card.is-expanded .home-tag-cloud a.is-hidden {
  display: inline-flex;
}

.home-tag-card.is-expanded .home-tag-cloud a {
  opacity: 0.9;
}

.home-tag-cloud a:hover {
  color: var(--accent);
  opacity: 1;
  transform: translateY(-1px);
}

.home-tag-cloud em {
  color: color-mix(in srgb, currentColor 58%, var(--muted));
  font-size: 0.62em;
  font-style: normal;
  line-height: 1;
}

.home-aside-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 40px);
  min-height: 44px;
  margin: 0 20px 20px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  appearance: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.home-aside-more[hidden] {
  display: none;
}

.home-aside-more:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
}

.home-aside-more svg {
  width: 16px;
  height: 16px;
}

.home-webinfo {
  padding: 0 18px 18px;
}

.webinfo-head {
  padding: 18px 2px 10px;
}

.webinfo-list::before {
  content: "";
  display: block;
  margin: 0 0 12px;
  border-top: 1px dashed color-mix(in srgb, var(--accent) 18%, var(--border));
}

.webinfo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 0 2px;
  color: var(--text);
}

.webinfo-item + .webinfo-item {
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.webinfo-item span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-weight: 760;
  font-size: 14px;
}

.webinfo-item svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
}

.webinfo-item strong {
  flex: 0 0 auto;
  color: var(--text);
  min-width: 54px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-list.is-list-view {
  grid-template-columns: 1fr;
}

.post-card {
  overflow: hidden;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.post-card.compact {
  box-shadow: none;
}

.post-list.is-list-view .post-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
  min-height: 132px;
}

.post-list.is-list-view .post-cover {
  width: 220px;
  height: 132px;
  min-height: 0;
  aspect-ratio: 5 / 3;
  align-self: center;
}

.post-list.is-list-view .post-card-body {
  justify-content: center;
  min-width: 0;
  padding: 18px 20px;
}

.post-list.is-list-view .post-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-soft);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.post-card:hover .post-cover img {
  transform: scale(1.04);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.post-title {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.45;
}

.post-title:hover {
  color: var(--accent);
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-card-tags a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.post-card-tags a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.post-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.post-card-meta svg {
  width: 14px;
  height: 14px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 70px;
}

.post-main {
  min-width: 0;
}

.post-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 22%, rgba(96, 165, 250, 0.34), transparent 34%),
    linear-gradient(135deg, #111827 0%, #1e3a8a 52%, #0f172a 100%);
  background-position: center;
  background-size: cover;
}

.post-hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.post-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.42)),
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.12), transparent 30%);
  pointer-events: none;
}

.post-hero.has-cover::after {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.65)),
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.08), transparent 30%);
}

.post-hero.no-cover::after {
  background:
    radial-gradient(circle at 22% 80%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.18));
}

.post-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding-top: 56px;
  padding-bottom: 44px;
}

.post-hero-back {
  width: fit-content;
  margin-bottom: auto;
  color: rgba(255, 255, 255, 0.84);
}

.post-hero-back:hover {
  color: #fff;
}

.post-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 750;
}

.post-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(12px);
}

.post-hero-meta a {
  color: inherit;
}

.post-hero-meta a:hover {
  color: #fff;
}

.post-hero-meta svg {
  width: 14px;
  height: 14px;
}

.post-hero h1 {
  margin: 0;
  max-width: 920px;
  font-size: 40px;
  line-height: 1.18;
  letter-spacing: 0;
  text-wrap: balance;
}

.post-hero p {
  margin: 16px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.75;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.post-hero .post-hero-back {
  margin-bottom: auto;
  color: rgba(255, 255, 255, 0.84);
}

.post-hero .post-hero-back:hover {
  color: #fff;
}

.post-content {
  margin-top: 34px;
  padding: 2px 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.9;
  word-break: break-word;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 34px 0 14px;
  line-height: 1.35;
  letter-spacing: 0;
}

.post-content h2 {
  font-size: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.post-content h3 {
  font-size: 19px;
}

.post-content h2::before,
.post-content h3::before {
  content: "#";
  margin-right: 8px;
  color: var(--accent);
  font-weight: 900;
}

.post-content p {
  margin: 16px 0;
}

.post-content a {
  color: var(--accent);
  font-weight: 700;
}

.post-content blockquote {
  margin: 18px 0;
  padding: 12px 15px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  line-height: 1.75;
}

.post-content blockquote p {
  margin: 8px 0;
}

.post-content blockquote > :first-child {
  margin-top: 0;
}

.post-content blockquote > :last-child {
  margin-bottom: 0;
}

.post-content ul,
.post-content ol {
  margin: 16px 0;
  padding-left: 1.35em;
}

.post-content li + li {
  margin-top: 6px;
}

.post-content table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.post-content th,
.post-content td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content th {
  background: var(--surface-soft);
  font-weight: 850;
}

.post-content hr {
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: var(--border);
}

.post-content mark {
  padding: 2px 7px;
  border-radius: 5px;
  background: linear-gradient(transparent 52%, #fde68a 0);
  color: var(--text);
  font-weight: 700;
}

.post-content pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: #111827;
  color: #e5e7eb;
  line-height: 1.6;
}

.post-content code {
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-strong);
  font-size: 0.92em;
  font-weight: 750;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.post-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.post-content figure.highlight {
  position: relative;
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  box-shadow: var(--shadow-soft);
}

.post-content figure.highlight .highlight-tools {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: var(--code-toolbar-bg);
  color: var(--code-muted);
}

.post-content figure.highlight .highlight-tools::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 16px 0 #f59e0b, 32px 0 #22c55e;
}

.post-content figure.highlight .code-lang {
  margin-left: 38px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.post-content figure.highlight .copy-notice {
  margin-left: auto;
  margin-right: 10px;
  color: var(--code-muted);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.post-content figure.highlight .copy-notice.is-visible {
  opacity: 1;
}

.post-content figure.highlight .copy-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--code-muted);
  cursor: pointer;
}

.post-content figure.highlight .copy-button:hover {
  background: rgba(148, 163, 184, 0.14);
  color: var(--code-text);
}

.post-content figure.highlight .copy-button svg {
  width: 16px;
  height: 16px;
}

.post-content figure.highlight table {
  display: table;
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0;
  background: transparent;
}

.post-content figure.highlight th,
.post-content figure.highlight td {
  padding: 0;
  border: 0;
  background: transparent;
}

.post-content figure.highlight pre {
  margin: 0;
  padding: 16px 0;
  border-radius: 0;
  background: transparent;
  color: var(--code-text);
  font-family: "JetBrains Mono", "Fira Code", Consolas, "SFMono-Regular", monospace;
  font-size: 14px;
  line-height: 1.72;
}

.post-content figure.highlight .gutter {
  width: 46px;
  user-select: none;
  border-right: 1px solid var(--code-line);
  background: rgba(15, 23, 42, 0.22);
  color: var(--code-muted);
  text-align: right;
}

.post-content figure.highlight .gutter pre {
  padding-left: 10px;
  padding-right: 10px;
}

.post-content figure.highlight .code pre {
  overflow-x: auto;
  padding-left: 18px;
  padding-right: 18px;
}

.post-content figure.highlight .line {
  min-height: 1.72em;
}

.post-content figure.highlight .code pre::-webkit-scrollbar,
.post-content pre::-webkit-scrollbar {
  height: 10px;
}

.post-content figure.highlight .code pre::-webkit-scrollbar-thumb,
.post-content pre::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  background-clip: content-box;
}

.post-content figure.highlight .keyword,
.post-content figure.highlight .selector-tag,
.post-content figure.highlight .literal {
  color: #93c5fd;
}

.post-content figure.highlight .string,
.post-content figure.highlight .regexp {
  color: #86efac;
}

.post-content figure.highlight .number,
.post-content figure.highlight .built_in,
.post-content figure.highlight .bullet {
  color: #fbbf24;
}

.post-content figure.highlight .title,
.post-content figure.highlight .title.function_,
.post-content figure.highlight .title.class_,
.post-content figure.highlight .section {
  color: #c4b5fd;
}

.post-content figure.highlight .attr,
.post-content figure.highlight .attribute,
.post-content figure.highlight .property,
.post-content figure.highlight .params {
  color: #67e8f9;
}

.post-content figure.highlight .comment {
  color: #94a3b8;
  font-style: italic;
}

.post-content img {
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.post-tags a {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.post-tags a:hover {
  background: var(--accent);
  color: var(--surface);
}

/* ── Prev / Next pager ── */
.post-pager {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 42px;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-pager-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-height: 160px;
  padding: 24px;
  background: var(--surface-soft);
  background-size: cover;
  background-position: center;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Only one article → full width */
.post-pager-item:only-child {
  grid-column: 1 / -1;
}

.post-pager-item:hover {
  transform: scale(1.025);
  filter: brightness(1.06);
}

.post-pager-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.7));
  transition: background 0.25s ease;
}

.post-pager-item:hover::before {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.78));
}

.post-pager-item.is-empty {
  display: none;
}

/* Single article → full width */
.post-pager-item:only-child {
  grid-column: 1 / -1;
}

.post-pager-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-pager-label svg {
  width: 14px;
  height: 14px;
}

.post-pager-item:last-child .post-pager-label {
  align-self: flex-end;
}

.post-pager-title {
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
  .post-pager {
    grid-template-columns: 1fr;
  }

  .post-pager-item {
    min-height: 120px;
    padding: 18px;
  }

  .post-pager-item.is-empty {
    display: none;
  }

  .post-pager-title {
    font-size: 15px;
  }
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 850;
  box-shadow: var(--shadow-soft);
}

.pagination a:hover,
.pagination a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination .page-nav {
  font-size: 22px;
  line-height: 1;
}

.post-aside {
  min-width: 0;
}

.toc-panel {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  max-height: calc(100vh - var(--header-height) - 36px);
  overflow-y: auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.toc-panel h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.toc-panel ol,
.toc-panel ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.toc-panel .toc-child {
  margin-top: 4px;
  padding-left: 16px;
}

.toc-panel .toc-item {
  margin: 4px 0;
  list-style: none;
}

.toc-panel a {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 5px 8px 5px 18px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
  transition: background 0.18s ease, color 0.18s ease;
}

.toc-panel .toc-number {
  flex: 0 0 auto;
}

.toc-panel .toc-text {
  min-width: 0;
}

.toc-panel a:hover {
  color: var(--accent);
}

.toc-panel .toc-link.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.toc-panel .toc-link.is-active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.toc-panel .toc-item.is-active > .toc-link,
.toc-panel li.is-active > .toc-link {
  color: var(--accent);
}

.post-progress {
  --post-progress-value: 0deg;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) var(--post-progress-value), var(--border) 0),
    var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.post-progress::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--surface);
}

.post-progress span {
  grid-area: 1 / 1;
  position: relative;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.post-progress .post-progress-top {
  opacity: 0;
  transform: translateY(4px);
  width: 30px;
  font-size: 10px;
  line-height: 1.15;
  white-space: normal;
}

.post-progress:hover .post-progress-percent,
.post-progress:focus-visible .post-progress-percent {
  opacity: 0;
  transform: translateY(-4px);
}

.post-progress:hover .post-progress-top,
.post-progress:focus-visible .post-progress-top {
  opacity: 1;
  transform: translateY(0);
}

.post-progress:hover,
.post-progress:focus-visible {
  outline: 0;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}

.post-progress.is-complete span {
  color: var(--accent);
}

.related-posts {
  margin-top: 52px;
}

.related-posts h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.page-hero {
  padding: 58px 0 34px;
}

.archive-page .page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
}

.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.archive-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.archive-view-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 76px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.archive-view-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.archive-view-toggle svg {
  width: 15px;
  height: 15px;
}

.taxonomy-cloud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 74px;
}

.taxonomy-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-weight: 850;
}

.taxonomy-pill em {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.taxonomy-pill:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.about-page {
  padding-bottom: 96px;
}

/* ── Hero ── */
.about-hero {
  padding: 72px 0 0;
  text-align: center;
}

.about-greeting {
  margin: 0;
  font-size: 14px;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.about-name {
  margin: 10px 0 0;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.about-bio {
  max-width: 500px;
  margin: 26px auto 0;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  font-weight: 450;
}

.about-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.about-contact > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.about-contact svg {
  width: 15px;
  height: 15px;
  opacity: 0.55;
}

.about-socials {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.about-socials a {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.about-socials a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.about-socials a svg {
  width: 17px;
  height: 17px;
  opacity: 1;
}

/* ── Body ── */
.about-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 0 0;
}

.about-prose {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

/* ── Numbers ── */
.about-numbers {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.about-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.about-number em {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.about-number span {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .about-hero {
    padding-top: 48px;
  }

  .about-name {
    font-size: 38px;
  }

  .about-bio {
    font-size: 16px;
  }

  .about-numbers {
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-number em {
    font-size: 28px;
  }
}

.comments-page {
  padding-bottom: 72px;
}

/* Hero inline stats */
.comments-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.comments-hero-text {
  min-width: 0;
}

.comments-hero-stats {
  flex-shrink: 0;
}

.chs-sub {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.chs-sub strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 0 2px;
}

@media (max-width: 640px) {
  .chs-sub {
    font-size: 13px;
  }

  .chs-sub strong {
    font-size: 18px;
  }
}

/* ── Ambient breathing background for guestbook page ── */
.page-comments .site-main {
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, color-mix(in srgb, var(--accent) 5%, transparent), transparent),
    radial-gradient(ellipse 60% 70% at 70% 60%, color-mix(in srgb, var(--accent) 4%, transparent), transparent),
    var(--bg);
}

.page-comments .site-main.is-loaded {
  animation: guestbook-page-breathe 16s ease-in-out infinite alternate;
}

@keyframes guestbook-page-breathe {
  0%   { background-position: 0% 0%, 0% 0%, 0 0; }
  100% { background-position: 8% 5%, -4% -2%, 0 0; }
}

:root[data-theme="dark"] .page-comments .site-main {
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, color-mix(in srgb, var(--accent) 9%, transparent), transparent),
    radial-gradient(ellipse 60% 70% at 70% 60%, color-mix(in srgb, var(--accent) 7%, transparent), transparent),
    var(--bg);
}

.blue-heart {
  color: var(--accent);
}

.post-comment {
  margin-top: 52px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.comment-headline,
.comment-random-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comment-headline {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.comment-headline svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.comment-random-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.comment-random-info a {
  color: var(--accent);
}

.comment-wrap {
  min-width: 0;
}

.guestbook-comment {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.guestbook-head {
  margin-bottom: 8px;
}

.guestbook-board {
  display: grid;
  gap: 24px;
}

.guestbook-emoji-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.03);
  max-width: 320px;
  animation: guestbook-popover-in 0.18s ease;
}

.guestbook-emoji-panel[hidden] {
  display: none;
}

.guestbook-emoji-item {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 18px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "EmojiOne", sans-serif;
  cursor: pointer;
  line-height: 32px;
  text-align: center;
  transition: background 0.12s ease;
}

.guestbook-emoji-item:hover {
  background: var(--accent-soft);
}

.guestbook-colors {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.guestbook-color-dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--dot-color);
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
  transition: border-color 0.2s ease, border-width 0.2s ease, transform 0.2s ease;
}

/* White dot always needs a visible edge */
.guestbook-color-dot[data-color="#ffffff"] {
  border-color: #d1d5db;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Hover — border previews the selection color */
.guestbook-color-dot:hover {
  border-color: var(--dot-color);
  transform: scale(1.18);
}

.guestbook-color-dot[data-color="#ffffff"]:hover {
  border-color: #6b7280;
}

/* Active — thicker border confirms selection */
.guestbook-color-dot.is-active {
  border-width: 3px;
  border-color: var(--dot-color);
  transform: scale(1.1);
}

.guestbook-color-dot[data-color="#ffffff"].is-active {
  border-color: #374151;
}

/* Keyboard focus */
.guestbook-color-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.guestbook-settings-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.03);
  min-width: auto;
  animation: guestbook-popover-in 0.18s ease;
}

@keyframes guestbook-popover-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guestbook-emoji-panel,
  .guestbook-settings-popover {
    animation: none;
  }

  .guestbook-color-dot {
    transition: none;
  }

  .guestbook-board.is-loaded {
    animation: none;
  }

  .page-comments .site-main.is-loaded {
    animation: none;
  }

  .guestbook-board.is-loaded .guestbook-lane::after {
    animation: none;
    opacity: 0.15;
  }

  .guestbook-empty-icon {
    animation: none;
  }
}

.guestbook-settings-popover[hidden] {
  display: none;
}

.guestbook-settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guestbook-settings-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guestbook-stage {
  position: relative;
  height: 600px;
  overflow: hidden;
  border-radius: var(--radius);
  background: transparent;
}

:root[data-theme="dark"] .guestbook-lane::after {
  background: linear-gradient(90deg, transparent 5%, color-mix(in srgb, var(--border) 38%, transparent) 25%, color-mix(in srgb, var(--border) 38%, transparent) 75%, transparent 95%);
}

.guestbook-stage::before,
.guestbook-stage::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 48px;
  pointer-events: none;
}

.guestbook-stage::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.guestbook-stage::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.guestbook-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.guestbook-empty-icon {
  font-size: 42px;
  line-height: 1;
  opacity: 0.55;
  animation: empty-float 3.5s ease-in-out infinite;
}

@keyframes empty-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%      { transform: translateY(-8px) rotate(3deg); }
  70%      { transform: translateY(-3px) rotate(-2deg); }
}

.guestbook-empty[hidden] {
  display: none;
}

.guestbook-lanes {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 18px;
  height: 100%;
  padding: 24px 0 30px;
  transition: height 0.3s ease, padding 0.3s ease;
}

.guestbook-lane {
  position: relative;
  min-width: 0;
  padding-left: 10px;
}

/* Lane guide — subtle center hint */
.guestbook-lane::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, color-mix(in srgb, var(--border) 60%, transparent) 25%, color-mix(in srgb, var(--border) 60%, transparent) 75%, transparent 95%);
  opacity: 0;
  transform: translateY(-0.5px);
  pointer-events: none;
}

.guestbook-board.is-loaded .guestbook-lane::after {
  animation: lane-shimmer 4.5s ease-in-out infinite;
}

.guestbook-lane:nth-child(odd)::after  { animation-delay: 0s; }
.guestbook-lane:nth-child(even)::after { animation-delay: 1.6s; }

@keyframes lane-shimmer {
  0%, 100% { opacity: 0.12; }
  50%      { opacity: 0.32; }
}

.guestbook-danmaku {
  position: absolute;
  display: inline-flex;
  align-items: center;
  max-width: min(66vw, 440px);
  padding: 7px 18px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
  animation: guestbook-danmaku-move var(--guestbook-duration, 16s) linear forwards;
  will-change: transform;
}

.guestbook-danmaku span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.guestbook-danmaku.has-color {
  border-color: var(--danmaku-color);
  color: var(--danmaku-color);
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 600px;
  justify-self: center;
  position: relative;
}

.guestbook-form-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  line-height: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guestbook-form-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.guestbook-form-message {
  flex: 1;
  min-width: 0;
}

.guestbook-form textarea {
  display: block;
  width: 100%;
  height: 22px;
  min-height: 22px;
  max-height: 88px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--guestbook-input-color, var(--text));
  caret-color: var(--guestbook-input-color, var(--accent));
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  outline: none;
  resize: none;
  overflow-y: auto;
  transition: color 0.18s ease, caret-color 0.18s ease;
}

.guestbook-form textarea::selection {
  background: color-mix(in srgb, var(--guestbook-input-color, var(--accent)) 28%, transparent);
  color: var(--guestbook-input-color, var(--accent-strong));
}

.guestbook-form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  opacity: 1;
  font-weight: 500;
}

.guestbook-form-row > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  line-height: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.guestbook-form-row > button:hover {
  background: var(--accent-strong);
  transform: scale(1.06);
}

.guestbook-form-row > button:active {
  transform: scale(0.96);
}

.guestbook-form-row > button svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke-width: 2.4;
}

.guestbook-form-row > .guestbook-tool-btn {
  width: 34px;
  height: 34px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 58%, transparent);
}

.guestbook-form-row > .guestbook-tool-btn:hover,
.guestbook-form-row > .guestbook-tool-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.guestbook-form-row > .guestbook-tool-btn.is-active {
  transform: scale(1.04);
}

.guestbook-form-row > .guestbook-tool-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.25;
}

.guestbook-form-row > button[type="submit"] {
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 24%, transparent);
}

.guestbook-form-row > button[type="submit"] svg {
  margin-left: 1px;
}

.guestbook-form button:disabled {
  opacity: 0.45;
  cursor: wait;
  transform: none;
}

.guestbook-form-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.guestbook-form-status.is-error {
  color: #d14343;
  font-weight: 600;
}

.guestbook-form-status.is-success {
  color: #238a52;
  font-weight: 600;
}

@keyframes guestbook-danmaku-move {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(var(--guestbook-end, -120vw));
  }
}

.twikoo-placeholder {
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
}

.twikoo-placeholder.is-loading {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.comment-loading {
  color: var(--muted);
  font-weight: 800;
}

.mock-comment-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.mock-comment-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mock-comment-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mock-comment-form input,
.mock-comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mock-comment-form input:focus,
.mock-comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mock-comment-form input {
  height: 38px;
  padding: 0 12px;
}

.mock-comment-form textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px;
}

.mock-comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-comment-actions p {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mock-comment-actions p.is-warning {
  color: var(--accent-strong);
  font-weight: 800;
}

.mock-comment-actions button {
  min-width: 70px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.mock-comment-actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.mock-comment-actions button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent);
}

.mock-comment-actions button:last-child:hover {
  color: #fff;
  filter: brightness(1.04);
}

.message-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.message-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.message-list img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.message-list h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.message-list p {
  margin: 0;
  color: var(--muted);
}

.message-list time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.plain-page,
.archive-page {
  padding-bottom: 72px;
}

.page-content {
  max-width: 820px;
}

.page-content a {
  color: var(--accent);
  font-weight: 800;
}

.empty-state {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  font-weight: 800;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 88px 20px 20px;
  background: rgba(15, 23, 42, 0.42);
}

.search-overlay[hidden] {
  display: none;
}

.search-panel {
  width: min(680px, 100%);
  max-height: min(720px, calc(100vh - 120px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-head label {
  font-size: 18px;
  font-weight: 850;
}

[data-search-input] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

[data-search-input]:focus {
  border-color: var(--accent);
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.search-result {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-result:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.search-result strong {
  line-height: 1.35;
}

.search-result small {
  color: var(--muted);
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-result em {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-style: normal;
}

.search-result span {
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.search-empty {
  color: var(--muted);
}

@media (max-width: 920px) {
  .nav-shell {
    grid-template-columns: auto auto 1fr;
  }

  .mobile-menu-button {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 20px;
    right: 20px;
    display: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--surface-soft);
  }

  .nav-actions {
    justify-self: end;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0 28px;
    gap: 28px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-media {
    width: min(100%, 560px);
    justify-self: center;
  }

  .hero-cover-card {
    aspect-ratio: 16 / 9;
  }

  .home-feature-section {
    padding-top: 18px;
  }

  .home-feature-banner {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .feature-main {
    min-height: clamp(248px, 44vw, 340px);
  }

  .feature-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    grid-template-rows: none;
    height: auto;
    min-height: 86px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .feature-list::-webkit-scrollbar {
    display: none;
  }

  .feature-list-item {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 86px;
    padding: 0 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
  }

  .feature-list-item img {
    width: 36px;
    height: 36px;
  }

  .journal-hero,
  .journal-hero-inner {
    min-height: 400px;
  }

  .journal-hero {
    background:
      linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.76) 56%, rgba(248, 250, 252, 0.22) 100%),
      radial-gradient(circle at 76% 72%, rgba(20, 184, 166, 0.18), transparent 34%),
      linear-gradient(135deg, #edf6f3 0%, #f8fafc 58%, #eef2ff 100%);
  }

  .journal-hero::before {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.64) 58%, rgba(248, 250, 252, 0.1) 100%);
  }

  :root[data-theme="dark"] .journal-hero::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.66) 58%, rgba(15, 23, 42, 0.14) 100%);
  }

  .journal-rule-field {
    inset: 26% -22% -16% 12%;
    opacity: 0.28;
  }

  .journal-light-band {
    right: -9%;
    top: 40%;
    width: 70vw;
    height: 42vw;
    opacity: 0.68;
  }

  .journal-stack {
    right: -5vw;
    top: 68%;
    width: min(390px, 58vw);
    opacity: 0.72;
  }

  .journal-hero-inner {
    align-items: flex-start;
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .journal-hero-copy {
    width: min(500px, 76vw);
    margin-left: 0;
  }

  .post-list,
  .taxonomy-cloud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-content-layout {
    grid-template-columns: 1fr;
  }

  .home-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-aside {
    display: none;
  }

  .post-hero,
  .post-hero-inner {
    min-height: 320px;
  }

  .post-hero-inner {
    padding-top: 42px;
    padding-bottom: 34px;
  }

  .post-hero h1 {
    font-size: 32px;
  }

	}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .brand span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-actions {
    gap: 2px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .hero-grid {
    padding: 30px 0 22px;
    gap: 24px;
    overflow: hidden;
  }

  .hero-copy h1 {
    font-size: 27px;
    line-height: 1.22;
  }

  .hero-copy h1 a {
    overflow-wrap: anywhere;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .hero-cover-label {
    left: 12px;
    bottom: 12px;
  }

  .home-feature-section {
    padding: 12px 0 10px;
  }

  .home-feature-banner {
    border-radius: 8px;
  }

  .feature-main {
    min-height: 248px;
  }

  .feature-main-copy {
    left: 18px;
    right: 18px;
    bottom: 18px;
    gap: 8px;
  }

  .feature-main-copy h1 {
    max-width: 100%;
    font-size: 24px;
    line-height: 1.2;
  }

  .feature-label {
    display: none;
    font-size: 13px;
  }

  .feature-mobile-dots {
    order: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 12px;
    margin-top: 2px;
  }

  .feature-mobile-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.16);
    transition: width 0.2s ease, background 0.2s ease;
  }

  .feature-mobile-dot.is-active {
    width: 28px;
    background: #ffffff;
  }

  .feature-list {
    display: none;
  }

  .hero-actions {
    gap: 10px;
    width: 100%;
  }

  .btn {
    flex: 1 1 136px;
    padding: 0 14px;
  }

  .hero-actions .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .journal-hero,
  .journal-hero-inner {
    min-height: 360px;
  }

  .journal-hero {
    background:
      linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.8) 52%, rgba(248, 250, 252, 0.12) 100%),
      radial-gradient(circle at 85% 80%, rgba(20, 184, 166, 0.18), transparent 32%),
      linear-gradient(135deg, #edf6f3 0%, #f8fafc 62%, #eef2ff 100%);
  }

  .journal-hero::before {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.7) 54%, rgba(248, 250, 252, 0.1) 100%);
  }

  :root[data-theme="dark"] .journal-hero::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.72) 54%, rgba(15, 23, 42, 0.12) 100%);
  }

  .journal-rule-field {
    inset: 42% -28% -18% 5%;
    opacity: 0.2;
  }

  .journal-light-band {
    right: -26%;
    top: 51%;
    width: 88vw;
    height: 58vw;
    opacity: 0.5;
  }

  .journal-stack {
    right: -20vw;
    top: 76%;
    width: 80vw;
    opacity: 0.48;
  }

  .journal-hero-inner {
    padding-top: 30px;
    padding-bottom: 32px;
  }

  .journal-hero-copy {
    width: min(100%, 460px);
    max-width: 100%;
  }

  .journal-hero-kicker {
    font-size: 12px;
    letter-spacing: 0.22em;
  }

  .journal-hero-kicker::after {
    width: 42px;
  }

  .journal-hero-copy h1 {
    margin-top: 14px;
    max-width: 9.8em;
    font-size: clamp(28px, 8.2vw, 34px);
    line-height: 1.08;
    overflow-wrap: normal;
  }

  .journal-hero-copy p {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.68;
  }

  .journal-hero-actions {
    width: 100%;
    margin-top: 18px;
    flex-direction: column;
  }

  .journal-hero-actions .btn {
    flex: 0 0 auto;
    width: min(100%, 230px);
    min-width: 0;
    min-height: 40px;
    padding: 0 15px;
  }

  .cat-strip {
    border-radius: 0;
    margin-left: -14px;
    margin-right: -14px;
    border-left: 0;
    border-right: 0;
  }

  .cat-chip.more {
    margin-left: 0;
  }

  .cat-chip {
    min-height: 40px;
    padding: 0 15px;
  }

  .hero-kicker,
  .hero-meta {
    gap: 8px;
  }

  .hero-badge,
  .hero-tax {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-grid,
  .post-list,
  .taxonomy-cloud,
  .home-aside {
    grid-template-columns: 1fr;
  }

  .post-list.is-list-view .post-card {
    display: block;
    min-height: 0;
  }

  .post-list.is-list-view .post-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .post-list.is-list-view .post-card-body {
    justify-content: flex-start;
    padding: 16px;
  }

  .post-list.is-list-view .post-card p {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
  }

  .page-hero h1 {
    font-size: 27px;
  }

  .post-hero,
  .post-hero-inner {
    min-height: 280px;
  }

  .post-hero h1 {
    font-size: 28px;
  }

  .post-hero-meta span {
    min-height: 26px;
  }

  .post-content h2 {
    font-size: 21px;
  }

  .comment-head,
  .mock-comment-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .guestbook-stage {
    height: 280px;
  }

  .mock-comment-fields {
    grid-template-columns: 1fr;
  }

  .mock-comment-actions p {
    margin-right: 0;
  }

  .guestbook-colors {
    gap: 3px;
  }

  .guestbook-color-dot {
    width: 24px;
    height: 24px;
  }

  .message-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .message-list time {
    grid-column: 2;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 16px 0;
  }
}
