*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.hidden{display:none}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border{border-width:1px}/* =============================================================
   theme.css  —  Sakura / mono blog design system
   Implements the CSS variables + theme-* component classes.
   Dark mode via  html.dark.  Pairs with Tailwind utilities.
   ============================================================= */

/* 自托管 JetBrains Mono（拉丁子集，CJK 自动回退到系统黑体）。仅本站资源，不联网加载。 */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dist/fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/dist/fonts/jetbrains-mono-700.woff2") format("woff2");
}

:root {
  --theme-bg: #ffffff;
  --theme-bg-elev: #ffffff;
  --theme-text: #475569;        /* slate-600 */
  --theme-text-dark: #0f172a;   /* slate-900 */
  --theme-heading: #1e293b;     /* slate-800 */
  --theme-text-secondary: #64748b; /* slate-500 */
  --theme-text-meta: #94a3b8;   /* slate-400 */

  --theme-accent: #38bdf8;       /* sky-400 */
  --theme-accent-strong: #0ea5e9; /* sky-500 */
  --theme-accent-deep: #0284c7;  /* sky-600 */

  --theme-soft: #f0f9ff;         /* sky-50 */
  --theme-soft-strong: #e0f2fe;  /* sky-100 */

  --theme-border: #e2e8f0;       /* slate-200 */
  --theme-border-strong: #cbd5e1;/* slate-300 */
  --theme-line: #eef2f6;

  --theme-grid: rgba(15, 23, 42, 0.045);

  --theme-radius-sm: 14px;
  --theme-radius-lg: 18px;
  --theme-radius-pill: 999px;

  --theme-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --theme-shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.05);

  --theme-font: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", monospace;
}

html.dark {
  --theme-bg: #020617;          /* slate-950 */
  --theme-bg-elev: #0f172a;     /* slate-900 */
  --theme-text: #cbd5e1;        /* slate-300 */
  --theme-text-dark: #f1f5f9;   /* slate-100 */
  --theme-heading: #e2e8f0;     /* slate-200 */
  --theme-text-secondary: #94a3b8; /* slate-400 */
  --theme-text-meta: #64748b;   /* slate-500 */

  --theme-accent: #38bdf8;       /* sky-400 */
  --theme-accent-strong: #0ea5e9; /* sky-500 */
  --theme-accent-deep: #7dd3fc;  /* sky-300 (brighter on dark) */

  --theme-soft: #0c1a2e;
  --theme-soft-strong: #102841;

  --theme-border: #1e293b;       /* slate-800 */
  --theme-border-strong: #334155;/* slate-700 */
  --theme-line: #16202e;

  --theme-grid: rgba(148, 163, 184, 0.07);

  --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  --theme-shadow-md: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ---------- base ---------- */
.theme-root {
  background-color: var(--theme-bg);
  background-image:
    linear-gradient(var(--theme-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--theme-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  color: var(--theme-text);
  font-family: var(--theme-font);
  font-size: 15.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
.theme-root h1, .theme-root h2, .theme-root h3, .theme-root h4 {
  color: var(--theme-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.theme-muted { color: var(--theme-text-meta); }
.theme-secondary { color: var(--theme-text-secondary); }
.theme-accent-text { color: var(--theme-accent-deep); }

/* ---------- surfaces / cards ---------- */
.theme-surface {
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-sm);
}
.theme-surface-hover {
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, border-color .25s;
}
.theme-surface-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--theme-shadow-md);
  border-color: var(--theme-border-strong);
}
.theme-content-card {
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-sm);
  padding: 2rem 2.25rem;
}

/* ---------- header ---------- */
.theme-header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 64px;
  padding: 0 1.25rem;
  background: color-mix(in srgb, var(--theme-bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--theme-border);
}
.theme-header-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--theme-text-dark);
  white-space: nowrap;
}
.theme-header-brand .brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: var(--theme-radius-pill);
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 117, 140, .35);
}
.theme-header-nav-wrap { flex: 1; display: flex; justify-content: center; }
.theme-header-actions { display: inline-flex; align-items: center; gap: .4rem; }
.theme-header-action-item { display: inline-flex; }

.theme-nav-menu { display: inline-flex; align-items: center; gap: .25rem; }
.theme-nav-menu a {
  padding: .5rem .85rem;
  border-radius: var(--theme-radius-pill);
  color: var(--theme-text-secondary);
  font-size: .92rem;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.theme-nav-menu a:hover { background: var(--theme-soft); color: var(--theme-accent-deep); }
.theme-nav-menu a.is-active { color: var(--theme-accent-deep); font-weight: 600; background: transparent; }

.theme-icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--theme-radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--theme-text-secondary);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.theme-icon-button:hover {
  background: var(--theme-soft);
  color: var(--theme-accent-deep);
  border-color: var(--theme-border);
}

/* ---------- home hero ---------- */
.theme-home-hero { width: 100%; }
.theme-home-hero-card {
  position: relative;
  border-radius: var(--theme-radius-lg);
  min-height: 236px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.theme-home-hero-overlay {
  position: absolute; inset: -40px -20px 0; pointer-events: none;
  background:
    radial-gradient(46% 70% at 26% 18%, var(--theme-soft-strong), transparent 60%),
    radial-gradient(40% 60% at 85% 6%, var(--theme-soft), transparent 58%);
}
.theme-home-hero-shine { display: none; }
.theme-home-hero-content {
  position: relative;
  z-index: 2;
  padding: 2.7rem 2.6rem;
  color: var(--theme-text);
}
.theme-home-hero-content h1 { color: var(--theme-text-dark); }

.theme-hero-search {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: var(--theme-bg);
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--theme-radius-pill);
  padding: .65rem 1.1rem;
  box-shadow: var(--theme-shadow-sm);
  max-width: 440px;
}
.theme-hero-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--theme-text-dark); font-family: var(--theme-font); font-size: .92rem;
}
.theme-hero-search input::placeholder { color: var(--theme-text-meta); }

/* ---------- chips / categories ---------- */
.theme-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-soft);
  border: 1px solid var(--theme-border);
  color: var(--theme-text-secondary);
  font-size: .85rem;
  transition: all .2s;
  cursor: pointer;
}
.theme-chip:hover { border-color: var(--theme-accent); color: var(--theme-accent-deep); }
.theme-chip-active {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,117,140,.3);
}

/* ---------- tag cloud ---------- */
.theme-tag-cloud { display: flex; flex-wrap: wrap; gap: .65rem; }
.theme-tag {
  display: inline-flex; align-items: baseline; gap: .35rem;
  padding: .35rem .8rem;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  color: var(--theme-text-secondary);
  transition: all .2s;
}
.theme-tag:hover {
  border-color: var(--theme-accent);
  color: var(--theme-accent-deep);
  background: var(--theme-soft);
  transform: translateY(-2px);
}
.theme-tag-count {
  font-size: .72rem;
  color: var(--theme-text-meta);
}

/* ---------- post card meta ---------- */
.theme-taxonomy-list { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.theme-post-meta {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--theme-text-meta); font-size: .82rem;
}
.theme-post-avatar {
  width: 26px; height: 26px; border-radius: var(--theme-radius-pill);
  object-fit: cover; border: 1px solid var(--theme-border);
  background: var(--theme-soft);
}
a.theme-meta-link { transition: color .2s; cursor: pointer; }
a.theme-meta-link:hover { color: var(--theme-accent-deep); }
.theme-post-author { color: var(--theme-text-secondary); font-weight: 600; }
.theme-post-date { color: var(--theme-text-meta); }

/* ---------- pagination ---------- */
.theme-pagination { display: inline-flex; align-items: center; gap: .35rem; }
.theme-page-link {
  display: inline-grid; place-items: center;
  min-width: 38px; height: 38px; padding: 0 .6rem;
  border-radius: var(--theme-radius-sm);
  border: 1px solid var(--theme-border);
  background: var(--theme-bg-elev);
  color: var(--theme-text-secondary);
  font-size: .9rem;
  transition: all .2s; cursor: pointer;
}
.theme-page-link:hover { border-color: var(--theme-accent); color: var(--theme-accent-deep); background: var(--theme-soft); }
.theme-page-link-active {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(255,117,140,.3);
}

/* ---------- reading panel / TOC ---------- */
.theme-reading-panel {
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-sm);
  padding: 1.25rem 1.35rem;
}
.theme-reading-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--theme-text-meta); margin-bottom: .9rem;
}
.theme-toc { font-size: .88rem; }
.theme-toc-list { display: flex; flex-direction: column; gap: .2rem; }
.theme-toc-link {
  display: block; padding: .35rem .65rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--theme-text-secondary);
  transition: all .18s;
}
.theme-toc-link:hover { color: var(--theme-accent-deep); background: var(--theme-soft); }
.theme-toc-link.is-active {
  color: var(--theme-accent-deep);
  border-left-color: var(--theme-accent-strong);
  background: var(--theme-soft-strong);
  font-weight: 600;
}
.theme-toc-link.lvl-3 { padding-left: 1.4rem; font-size: .82rem; }

.theme-toc-inline {
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  background: var(--theme-soft);
}
.theme-toc-inline summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.1rem; font-weight: 600; color: var(--theme-text-dark);
}
.theme-toc-inline summary::-webkit-details-marker { display: none; }
.theme-toc-inline-chevron { transition: transform .25s; color: var(--theme-text-meta); }
.theme-toc-inline[open] .theme-toc-inline-chevron { transform: rotate(180deg); }

/* ---------- sidebar widgets ---------- */
.theme-widget {
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-sm);
  padding: 1.35rem 1.4rem;
}
.theme-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.theme-widget-title {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; color: var(--theme-text-dark); font-size: .98rem;
}
.theme-widget-icon {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 10px;
  background: var(--theme-soft-strong); color: var(--theme-accent-deep);
}
.theme-widget-action { color: var(--theme-text-meta); font-size: .8rem; cursor: pointer; transition: color .2s; }
.theme-widget-action:hover { color: var(--theme-accent-deep); }

/* ---------- latest grid / cards ---------- */
.theme-latest-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
}
@media (min-width: 640px) {
  .theme-latest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; }
}
.theme-latest-card {
  display: flex; flex-direction: column;
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-sm);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, border-color .25s;
}
.theme-latest-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--theme-shadow-md);
  border-color: var(--theme-border-strong);
}
.theme-latest-cover {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, var(--theme-soft-strong), var(--theme-accent));
}
.theme-latest-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.theme-latest-card:hover .theme-latest-cover img { transform: scale(1.05); }
.theme-latest-title {
  font-weight: 700; font-size: 1.08rem; color: var(--theme-text-dark);
  line-height: 1.4; margin-bottom: .5rem;
}
.theme-latest-card:hover .theme-latest-title { color: var(--theme-accent-deep); }
.theme-latest-excerpt {
  color: var(--theme-text-secondary); font-size: .9rem; line-height: 1.6;
}
.theme-latest-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; margin-top: auto;
  border-top: 1px solid var(--theme-line);
}
.theme-latest-stat {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--theme-text-meta); font-size: .8rem;
}

/* ---------- popular list ---------- */
.theme-popular-list { display: flex; flex-direction: column; }
.theme-popular-item {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .75rem 0;
  border-bottom: 1px solid var(--theme-line);
}
.theme-popular-item:last-child { border-bottom: 0; }
.theme-popular-item .rank {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  background: var(--theme-soft); color: var(--theme-text-meta);
}
.theme-popular-item:nth-child(-n+3) .rank {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  color: #fff;
}
.theme-popular-item .pop-title {
  font-size: .9rem; color: var(--theme-text-secondary); line-height: 1.45;
}
.theme-popular-item:hover .pop-title { color: var(--theme-accent-deep); }

/* ---------- taxonomy header ---------- */
.theme-taxonomy-header {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 2rem 2.25rem;
  border-radius: var(--theme-radius-lg);
  background:
    radial-gradient(140% 120% at 100% 0%, var(--theme-soft-strong), transparent 60%),
    var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-sm);
}
.theme-taxonomy-icon {
  flex: none; width: 56px; height: 56px; border-radius: var(--theme-radius-sm);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  color: #fff; box-shadow: 0 6px 16px rgba(255,117,140,.3);
}
.theme-taxonomy-kicker {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--theme-accent-deep); font-weight: 700;
}
.theme-taxonomy-heading { font-size: 1.7rem; color: var(--theme-text-dark); margin: .15rem 0 .4rem; }
.theme-taxonomy-body { color: var(--theme-text-secondary); font-size: .92rem; max-width: 60ch; }

/* ---------- filters ---------- */
.theme-filter-panel {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 1.1rem;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-sm);
}
.theme-filter-list { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.theme-filter-pill {
  padding: .35rem .8rem; border-radius: var(--theme-radius-pill);
  color: var(--theme-text-secondary); font-size: .85rem; cursor: pointer;
  transition: all .2s;
}
.theme-filter-pill:hover { background: var(--theme-soft); color: var(--theme-accent-deep); }
.theme-filter-pill-active {
  background: var(--theme-text-dark); color: var(--theme-bg-elev);
}
html.dark .theme-filter-pill-active { background: var(--theme-accent-deep); color: #1d1d1f; }

/* ---------- floating buttons ---------- */
.theme-float-button {
  position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 40;
  width: 48px; height: 48px; border-radius: var(--theme-radius-pill);
  display: grid; place-items: center; cursor: pointer; border: 0;
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  color: #fff; box-shadow: 0 8px 24px rgba(255,117,140,.4);
  transition: transform .2s;
}
.theme-float-button:hover { transform: translateY(-3px) scale(1.04); }
.theme-edit-button {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .9rem; border-radius: var(--theme-radius-pill);
  background: var(--theme-soft); color: var(--theme-accent-deep);
  border: 1px solid var(--theme-border); font-size: .82rem; cursor: pointer;
  transition: all .2s;
}
.theme-edit-button:hover { background: var(--theme-soft-strong); border-color: var(--theme-accent); }

/* ---------- profile ---------- */
.theme-profile-avatar {
  width: 76px; height: 76px; border-radius: var(--theme-radius-pill);
  object-fit: cover; border: 3px solid var(--theme-bg-elev);
  box-shadow: var(--theme-shadow-md);
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
}
.theme-profile-stats { display: flex; gap: 1rem; }
.theme-profile-stats .stat { text-align: center; padding: .35rem .7rem; border-radius: var(--theme-radius-sm); transition: background .2s, transform .2s; }
.theme-profile-stats a.stat { cursor: pointer; }
.theme-profile-stats a.stat:hover { background: var(--theme-soft); transform: translateY(-2px); }
.theme-profile-stats a.stat:hover b { color: var(--theme-accent-deep); }
.theme-profile-stats .stat b { display: block; font-size: 1.15rem; color: var(--theme-text-dark); transition: color .2s; }
.theme-profile-stats .stat span { font-size: .76rem; color: var(--theme-text-meta); }

/* ---------- admin shell helpers ---------- */
.theme-admin-side {
  background: var(--theme-bg-elev);
  border-right: 1px solid var(--theme-border);
}
.theme-admin-nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .85rem; border-radius: var(--theme-radius-sm);
  color: var(--theme-text-secondary); font-size: .9rem; cursor: pointer;
  transition: all .18s;
}
.theme-admin-nav-item:hover { background: var(--theme-soft); color: var(--theme-accent-deep); }
.theme-admin-nav-item.is-active {
  background: var(--theme-soft-strong); color: var(--theme-accent-deep); font-weight: 600;
}
.theme-stat-card {
  background: var(--theme-bg-elev);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-sm);
  padding: 1.4rem 1.5rem;
}
.theme-field-label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--theme-text-secondary); margin-bottom: .4rem;
}
.theme-input {
  width: 100%; padding: .6rem .85rem;
  border-radius: var(--theme-radius-sm);
  border: 1px solid var(--theme-border);
  background: var(--theme-bg);
  color: var(--theme-text-dark);
  font-family: var(--theme-font); font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.theme-input:focus {
  outline: 0; border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(255,183,197,.3);
}
.theme-input::placeholder { color: var(--theme-text-meta); }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.1rem; border-radius: var(--theme-radius-sm);
  font-family: var(--theme-font); font-size: .9rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all .2s;
}
.theme-btn-primary {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
  color: #fff; box-shadow: 0 4px 12px rgba(255,117,140,.3);
}
.theme-btn-primary:hover { filter: brightness(1.03); transform: translateY(-1px); }
.theme-btn-ghost {
  background: var(--theme-bg-elev); border-color: var(--theme-border);
  color: var(--theme-text-secondary);
}
.theme-btn-ghost:hover { border-color: var(--theme-accent); color: var(--theme-accent-deep); }

/* status dots / badges */
.theme-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .6rem; border-radius: var(--theme-radius-pill);
  font-size: .74rem; font-weight: 600;
}
.theme-badge-pub { background: rgba(34,165,118,.14); color: #1f8a5b; }
.theme-badge-draft { background: var(--theme-soft); color: var(--theme-text-meta); }
.theme-badge-pin { background: var(--theme-soft-strong); color: var(--theme-accent-deep); }
html.dark .theme-badge-pub { background: rgba(52,199,140,.16); color: #5ad6a0; }

/* segmented tab (editor 编辑/预览) */
.seg {
  padding: .3rem .9rem; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--theme-font); font-size: .82rem; color: var(--theme-text-meta);
  background: transparent; transition: all .18s;
}
.seg.on { background: var(--theme-bg-elev); color: var(--theme-accent-deep); font-weight: 600; box-shadow: var(--theme-shadow-sm); }
.seg-group { display: inline-flex; gap: .25rem; background: var(--theme-soft); padding: .25rem; border-radius: 999px; margin-bottom: 18px; }
/* 列表里可点击的状态徽标（草稿⇄发布一键切换）*/
.status-toggle { border: 0; cursor: pointer; font: inherit; transition: filter .15s, box-shadow .15s; }
.status-toggle:hover { filter: brightness(.95); box-shadow: 0 0 0 2px var(--theme-soft-strong); }

/* 评论：博主身份徽标 + 「以博主身份回复」提示 */
.cmt-badge { display: inline-block; padding: .04rem .42rem; font-size: .66rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong)); border-radius: 999px; vertical-align: middle; }
.cmt-asauthor { font-size: .9rem; color: var(--theme-text-secondary); margin-bottom: .9rem; }
mark { background: var(--theme-soft-strong); color: var(--theme-accent-deep); padding: 0 .12em; border-radius: 3px; }

/* 图注 figure/figcaption */
.prose figure.post-figure { margin: 1.4em 0; text-align: center; }
.prose figure.post-figure img { margin: 0 auto; }
.prose figure.post-figure figcaption { margin-top: .5em; font-size: .82rem; color: var(--theme-text-meta); }

/* 文章操作条：点赞 + 分享 */
.post-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 2.2rem 0 .5rem; }
.like-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--theme-border-strong); background: var(--theme-bg-elev); color: var(--theme-text-secondary); cursor: pointer; font: inherit; font-size: .9rem; transition: transform .15s, color .2s, border-color .2s, background .2s; }
.like-btn:hover { color: #e0245e; border-color: #e0245e; }
.like-btn.liked { color: #e0245e; border-color: #e0245e; background: rgba(224,36,94,.08); cursor: default; }
.like-btn.bump { animation: like-bump .4s ease; }
@keyframes like-bump { 0%{transform:scale(1)} 30%{transform:scale(1.28)} 60%{transform:scale(.94)} 100%{transform:scale(1)} }
.share-bar { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; }
.share-btn { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 .55rem; border-radius: 999px; border: 1px solid var(--theme-border); background: var(--theme-bg-elev); color: var(--theme-text-secondary); cursor: pointer; font: inherit; font-size: .78rem; text-decoration: none; transition: color .2s, border-color .2s; }
.share-btn:hover { color: var(--theme-accent-deep); border-color: var(--theme-accent); }

/* 全站轻量 toast */
.mini-toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(1rem); background: var(--theme-text-dark); color: var(--theme-bg); padding: .5rem 1rem; border-radius: 999px; font-size: .82rem; z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.mini-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 标签云按热度分级字号 */
.theme-tag.tag-sm { font-size: .78rem; }
.theme-tag.tag-md { font-size: .92rem; }
.theme-tag.tag-lg { font-size: 1.06rem; }
.theme-tag.tag-xl { font-size: 1.22rem; font-weight: 600; }

/* 评论提交结果提示：出现时脉冲一下 */
.flash-notice { animation: flash-pulse 1.1s ease; }
@keyframes flash-pulse { 0% { box-shadow: 0 0 0 3px var(--theme-soft-strong); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* 评论预览区 */
.cmt-preview { margin-top: .6rem; padding: .8rem 1rem; border: 1px dashed var(--theme-border-strong); border-radius: var(--theme-radius-sm); background: var(--theme-soft); }

/* 系列「本文属于系列」框 */
.series-box { margin: 0 0 1.6rem; padding: 1rem 1.2rem; border: 1px solid var(--theme-border); border-left: 3px solid var(--theme-accent); border-radius: var(--theme-radius-sm); background: var(--theme-soft); }
.series-box-head { font-size: .86rem; font-weight: 600; color: var(--theme-text-secondary); margin-bottom: .6rem; display: flex; align-items: center; gap: .4rem; }
.series-box-head a { color: var(--theme-accent-deep); }
.series-box-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.series-box-list li { font-size: .9rem; }
.series-box-list a { color: var(--theme-text-secondary); }
.series-box-list a:hover { color: var(--theme-accent-deep); }
.series-box-list li.current span { color: var(--theme-text-dark); font-weight: 600; }

/* 草稿预览横幅 + 评论提交结果提示 */
.draft-banner { display: flex; align-items: center; gap: .45rem; margin-bottom: 18px; padding: .6rem .9rem; border-radius: var(--theme-radius-sm); font-size: .84rem; font-weight: 600; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; }
html.dark .draft-banner { color: #fcd34d; background: rgba(120,53,15,.25); border-color: rgba(180,83,9,.5); }
.flash-notice { margin-bottom: 1.2rem; padding: .6rem .9rem; border-radius: var(--theme-radius-sm); font-size: .85rem; border: 1px solid transparent; }
.flash-notice.ok { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.flash-notice.warn { color: #9a3412; background: #ffedd5; border-color: #fed7aa; }
html.dark .flash-notice.ok { color: #86efac; background: rgba(22,101,52,.25); border-color: rgba(34,197,94,.4); }
html.dark .flash-notice.warn { color: #fdba74; background: rgba(154,52,18,.25); border-color: rgba(234,88,12,.4); }

/* toggle switch */
.theme-switch {
  position: relative; width: 42px; height: 24px; border-radius: 999px;
  background: var(--theme-border-strong); cursor: pointer; transition: background .2s; flex: none;
  display: inline-block;
}
.theme-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.theme-switch.on { background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong)); }
.theme-switch.on::after { transform: translateX(18px); }

/* misc dividers / scrollbar */
.theme-divider { height: 1px; background: var(--theme-line); border: 0; }
.theme-root ::selection { background: var(--theme-accent); color: #fff; }

/* dark-mode icon toggle (sun in dark, moon in light) */
.icon-sun { display: none; }
.icon-moon { display: inline-block; }
html.dark .icon-sun { display: inline-block; }
html.dark .icon-moon { display: none; }

[x-cloak] { display: none !important; }
.brand-mark { font-weight: 800; }
.theme-profile-avatar { font-weight: 800; }

/* 文章页目录：仅桌面(≥1024)显示右侧栏，窄屏不显示，避免封面下出现重复/突兀目录 */
@media (max-width: 1023px) { .toc-sidebar { display: none !important; } }

/* header responsive: hide centered nav on mobile, show hamburger */
.hdr-menu-btn { display: none; }
@media (max-width: 767px) {
  .theme-header-nav-wrap { display: none; }
  .hdr-menu-btn { display: inline-grid; }
}

/* ---------- responsive layout grids ---------- */
.adm-stats { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.adm-dash { display: grid; gap: 18px; grid-template-columns: 1fr; }
.adm-editor { display: grid; gap: 18px; grid-template-columns: 1fr; }
.adm-taxo { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1100px) {
  .adm-stats { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .adm-dash { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); }
  .adm-editor { grid-template-columns: minmax(0,1fr) 308px; }
  .adm-taxo { grid-template-columns: 320px minmax(0,1fr); }
}
.fe-main { display: grid; gap: 30px; grid-template-columns: 1fr; }
.fe-post { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .fe-main { grid-template-columns: minmax(0,1fr) 296px; } }
@media (min-width: 1024px) { .fe-post { grid-template-columns: minmax(0,1fr) 252px; } }

/* ---------- article prose ---------- */
.prose { color: var(--theme-text); line-height: 1.72; font-size: 15.5px; max-width: none; }
.prose > * + * { margin-top: 1.15em; }
.prose h1 { font-size: 1.7rem; color: var(--theme-text-dark); font-weight: 700; margin-top: 1.6em; margin-bottom: .5em; }
.prose h2 {
  font-size: 1.42rem; color: var(--theme-text-dark); font-weight: 700;
  margin-top: 2.2em; margin-bottom: .6em; scroll-margin-top: 90px;
  display: flex; align-items: center; gap: .55rem;
}
.prose h2::before {
  content: ""; width: 6px; height: 1.05em; border-radius: 999px;
  background: linear-gradient(180deg, var(--theme-accent), var(--theme-accent-strong));
}
.prose h3 { font-size: 1.16rem; color: var(--theme-text-dark); font-weight: 700; margin-top: 1.8em; margin-bottom: .5em; scroll-margin-top: 90px; }
.prose p { color: var(--theme-text); }
.prose a { color: var(--theme-accent-deep); text-decoration: underline; text-decoration-color: var(--theme-accent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--theme-accent-deep); }
.prose strong { color: var(--theme-text-dark); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 1.2em; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--theme-accent-strong);
}
.prose ol { list-style: decimal; }
.prose li { margin-top: .4em; }
.prose blockquote {
  border-left: 3px solid var(--theme-accent-strong);
  background: var(--theme-soft);
  padding: .8em 1.2em; border-radius: 0 12px 12px 0;
  color: var(--theme-text-secondary); font-style: normal;
}
.prose blockquote p { margin: 0; }
.prose code {
  font-family: var(--theme-font); font-size: .86em;
  background: var(--theme-soft-strong); color: var(--theme-text-dark);
  border: 1px solid var(--theme-border); padding: .12em .42em; border-radius: 6px;
}
.prose pre {
  background: #1b1620; color: #f3e7ee; border: 1px solid var(--theme-border-strong);
  padding: 1.1em 1.3em; border-radius: var(--theme-radius-sm); overflow-x: auto;
  font-size: .85rem; line-height: 1.6;
}
html.dark .prose pre { background: #0f0c11; }
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose img { border-radius: var(--theme-radius-sm); box-shadow: var(--theme-shadow-sm); max-width: 100%; }
.prose hr { border: 0; height: 1px; background: var(--theme-line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--theme-border); padding: .5em .75em; }
.prose th { background: var(--theme-soft); }

/* ===== 代码块：统一深色面板（浅色/深色站点主题通用，保证高对比可读）===== */
.codeblock { margin: 1.15em 0; border: 1px solid #1e293b; border-radius: var(--theme-radius-sm); overflow: hidden; background: #2b303b; font-size: .85rem; }
.cb-head { display: flex; align-items: center; gap: .6rem; padding: .4rem .85rem; font-size: .72rem; background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.08); }
.cb-lang { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: #8fb6e0; }
.cb-title { color: #9aa5b1; }
.cb-copy { margin-left: auto; cursor: pointer; border: 0; background: transparent; color: #9aa5b1; font-size: .72rem; font-family: var(--theme-font); }
.cb-copy:hover { color: #c0c5ce; }
.cb-body { display: flex; }
.codeblock pre { margin: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; line-height: 1.6; font-family: var(--theme-font); }
.cb-gutter { padding: .8rem .7rem !important; text-align: right; color: #65737e; user-select: none; flex: none; border-right: 1px solid rgba(255,255,255,.08); white-space: pre; }
.cb-pre { padding: .8rem 1rem !important; overflow-x: auto; flex: 1; min-width: 0; }
.cb-code { background: transparent !important; padding: 0 !important; color: #c0c5ce; }

/* @syntect-begin */
/* ===== syntect code highlight (generated) — 深色代码面板，两种站点主题通用 ===== */
/*
 * theme "Base16 Ocean Dark" generated by syntect
 */

.stx-code {
 color: #c0c5ce;
 background-color: #2b303b;
}

.stx-variable.stx-parameter.stx-function {
 color: #c0c5ce;
}
.stx-comment, .stx-punctuation.stx-definition.stx-comment {
 color: #65737e;
}
.stx-punctuation.stx-definition.stx-string, .stx-punctuation.stx-definition.stx-variable, .stx-punctuation.stx-definition.stx-string, .stx-punctuation.stx-definition.stx-parameters, .stx-punctuation.stx-definition.stx-string, .stx-punctuation.stx-definition.stx-array {
 color: #c0c5ce;
}
.stx-none {
 color: #c0c5ce;
}
.stx-keyword.stx-operator {
 color: #c0c5ce;
}
.stx-keyword {
 color: #b48ead;
}
.stx-variable, .stx-variable.stx-other.stx-dollar.stx-only.stx-js {
 color: #bf616a;
}
.stx-entity.stx-name.stx-function, .stx-meta.stx-require, .stx-support.stx-function.stx-any-method, .stx-variable.stx-function {
 color: #8fa1b3;
}
.stx-support.stx-class, .stx-entity.stx-name.stx-class, .stx-entity.stx-name.stx-type.stx-class {
 color: #ebcb8b;
}
.stx-meta.stx-class {
 color: #eff1f5;
}
.stx-keyword.stx-other.stx-special-method {
 color: #8fa1b3;
}
.stx-storage {
 color: #b48ead;
}
.stx-support.stx-function {
 color: #96b5b4;
}
.stx-string, .stx-constant.stx-other.stx-symbol, .stx-entity.stx-other.stx-inherited-class {
 color: #a3be8c;
}
.stx-constant.stx-numeric {
 color: #d08770;
}
.stx-none {
 color: #d08770;
}
.stx-none {
 color: #d08770;
}
.stx-constant {
 color: #d08770;
}
.stx-entity.stx-name.stx-tag {
 color: #bf616a;
}
.stx-entity.stx-other.stx-attribute-name {
 color: #d08770;
}
.stx-entity.stx-other.stx-attribute-name.stx-id, .stx-punctuation.stx-definition.stx-entity {
 color: #8fa1b3;
}
.stx-meta.stx-selector {
 color: #b48ead;
}
.stx-none {
 color: #d08770;
}
.stx-markup.stx-heading .stx-punctuation.stx-definition.stx-heading, .stx-entity.stx-name.stx-section {
 color: #8fa1b3;
}
.stx-keyword.stx-other.stx-unit {
 color: #d08770;
}
.stx-markup.stx-bold, .stx-punctuation.stx-definition.stx-bold {
 color: #ebcb8b;
font-weight: bold;
}
.stx-markup.stx-italic, .stx-punctuation.stx-definition.stx-italic {
 color: #b48ead;
font-style: italic;
}
.stx-markup.stx-raw.stx-inline {
 color: #a3be8c;
}
.stx-string.stx-other.stx-link {
 color: #bf616a;
}
.stx-meta.stx-link {
 color: #d08770;
}
.stx-meta.stx-image {
 color: #d08770;
}
.stx-markup.stx-list {
 color: #bf616a;
}
.stx-markup.stx-quote {
 color: #d08770;
}
.stx-meta.stx-separator {
 color: #c0c5ce;
 background-color: #4f5b66;
}
.stx-markup.stx-inserted, .stx-markup.stx-inserted.stx-git_gutter {
 color: #a3be8c;
}
.stx-markup.stx-deleted, .stx-markup.stx-deleted.stx-git_gutter {
 color: #bf616a;
}
.stx-markup.stx-changed, .stx-markup.stx-changed.stx-git_gutter {
 color: #b48ead;
}
.stx-markup.stx-ignored, .stx-markup.stx-ignored.stx-git_gutter {
 color: #4f5b66;
}
.stx-markup.stx-untracked, .stx-markup.stx-untracked.stx-git_gutter {
 color: #4f5b66;
}
.stx-constant.stx-other.stx-color {
 color: #96b5b4;
}
.stx-string.stx-regexp {
 color: #96b5b4;
}
.stx-constant.stx-character.stx-escape {
 color: #96b5b4;
}
.stx-punctuation.stx-section.stx-embedded, .stx-variable.stx-interpolation {
 color: #ab7967;
}
.stx-invalid.stx-illegal {
 color: #2b303b;
 background-color: #bf616a;
}
.stx-markup.stx-deleted.stx-git_gutter {
 color: #f92672;
}
.stx-markup.stx-inserted.stx-git_gutter {
 color: #a6e22e;
}
.stx-markup.stx-changed.stx-git_gutter {
 color: #967efb;
}
.stx-markup.stx-ignored.stx-git_gutter {
 color: #565656;
}
.stx-markup.stx-untracked.stx-git_gutter {
 color: #565656;
}
/* @syntect-end */

/* ===== 漫画/连续阅读模式 ===== */
.fe-post.reader-layout { grid-template-columns: 1fr; }
.reader-toolbar { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
/* 连续平铺：图片块级、居中、间距小，营造连读体验 */
.reader img { display: block; margin: .4rem auto; border-radius: 6px; box-shadow: none; }
/* 三档阅读宽度 */
.reader.fit-mid img  { width: 100%; max-width: 720px; }
.reader.fit-wide img { width: 100%; max-width: 1000px; }
.reader.fit-orig img { width: auto;  max-width: 100%; }

/* ===== 加密文章：锁屏 + 列表打码（马赛克为装饰，真内容不下发）===== */
.lockwall { position: relative; border-radius: var(--theme-radius-lg); overflow: hidden; min-height: 360px; display: grid; place-items: center; border: 1px solid var(--theme-border); margin: .5rem 0 1rem; }
.lockwall-mosaic {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(148,163,184,.30) 0 16px, rgba(148,163,184,0) 16px 32px),
    repeating-linear-gradient(90deg, rgba(100,116,139,.22) 0 16px, rgba(148,163,184,.10) 16px 32px),
    linear-gradient(135deg, var(--theme-soft-strong), var(--theme-soft));
  filter: blur(2px);
}
.lockwall-mosaic.has-img { filter: none; }
.lockwall-mosaic-img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.card-mosaic-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.lockwall-card { position: relative; text-align: center; background: var(--theme-bg-elev); padding: 2rem 2.2rem; border-radius: var(--theme-radius-lg); box-shadow: var(--theme-shadow-md); max-width: 420px; width: calc(100% - 3rem); }
.lockwall-icon { color: var(--theme-accent-deep); display: grid; place-items: center; }
.lockwall-form { display: flex; gap: .5rem; }
.lockwall-form .theme-input { flex: 1; }
.lockwall-err { color: #dc2626; font-size: .85rem; margin: 0 0 .8rem; }

.card-mosaic {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(2,6,23,.18) 0 12px, rgba(2,6,23,0) 12px 24px),
    repeating-linear-gradient(90deg, rgba(2,6,23,.18) 0 12px, rgba(2,6,23,0) 12px 24px);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; color: #fff; font-size: .76rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.55); }

/* ===== 图片灯箱 ===== */
.prose img { cursor: zoom-in; }
.lb-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(2,6,23,.93); }
.lb-overlay.open { display: flex; overflow: auto; }
.lb-img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.lb-img.zoom { max-width: none; max-height: none; cursor: zoom-out; }
.lb-close, .lb-prev, .lb-next { position: fixed; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer; border-radius: 999px; display: grid; place-items: center; transition: background .2s; z-index: 2; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 1.4rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 1.7rem; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-count { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.85); font-size: .85rem; }

/* ===== 标题悬停锚点 ===== */
.hanchor { margin-left: .4rem; color: var(--theme-accent); opacity: 0; text-decoration: none; font-weight: 400; transition: opacity .15s; }
.prose h1:hover .hanchor, .prose h2:hover .hanchor, .prose h3:hover .hanchor, .prose h4:hover .hanchor { opacity: .65; }
.hanchor:hover { opacity: 1 !important; }

/* ===== 提示框 callout（[!NOTE] / [!TIP] / ...）===== */
.callout { border-radius: var(--theme-radius-sm); padding: .8em 1.1em; margin: 1.3em 0; border-left: 4px solid var(--c); background: var(--cb); }
.callout-head { font-weight: 700; font-size: .82rem; letter-spacing: .02em; margin-bottom: .35em; color: var(--c); }
.callout p { margin: .35em 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-note { --c: #0ea5e9; --cb: rgba(14,165,233,.09); }
.callout-tip { --c: #10b981; --cb: rgba(16,185,129,.09); }
.callout-important { --c: #8b5cf6; --cb: rgba(139,92,246,.09); }
.callout-warning { --c: #f59e0b; --cb: rgba(245,158,11,.10); }
.callout-caution { --c: #ef4444; --cb: rgba(239,68,68,.09); }

/* ===== 表格 / 脚注 / kbd / 任务列表 增强 ===== */
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1.2em 0; display: block; overflow-x: auto; }
.prose thead th { background: var(--theme-soft); }
.prose th, .prose td { border: 1px solid var(--theme-border); padding: .5em .75em; text-align: left; }
.prose tbody tr:nth-child(even) { background: rgba(15,23,42,.02); }
html.dark .prose tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
.prose .footnote-definition { font-size: .85rem; color: var(--theme-text-secondary); }
.prose sup a, .prose .footnote-reference a { text-decoration: none; color: var(--theme-accent-deep); }
.prose kbd { font-family: var(--theme-font); font-size: .8em; background: var(--theme-soft-strong); border: 1px solid var(--theme-border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .1em .4em; }
.prose ul.contains-task-list { list-style: none; padding-left: .2em; }
.prose ul.contains-task-list > li::before { display: none; }
.prose .task-list-item input { margin-right: .5em; }

/* ===== 轻量进入动效（尊重 reduce-motion）===== */
@media (prefers-reduced-motion: no-preference) {
  .theme-latest-card { animation: fadeup .4s ease both; }
  @keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}


/* ════════════════════════════════════════════════════════════════
   动效与质感增强  A 转场/渐入 · B hover · C 等宽/计数 · D 质感
   所有运动均包在 prefers-reduced-motion: no-preference 内，
   并以 html.js 兜底：禁用 JS 时内容始终可见（不被渐入隐藏）。
   参数偏克制，需要更强/更弱可直接调本区块。
   ════════════════════════════════════════════════════════════════ */
:root {
  --theme-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
    Menlo, Consolas, "Liberation Mono", monospace;
}

/* —— A. 跨页面转场（Chromium 支持，其它浏览器自动忽略）—— */
@view-transition {
  navigation: auto;
}
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.32s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* 主题切换：从开关圆心扩散（仅同文档切换时打上 html.vt-theme）*/
  html.vt-theme::view-transition-old(root) {
    animation: none;
  }
  html.vt-theme::view-transition-new(root) {
    animation: vt-theme-circle 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes vt-theme-circle {
    from {
      clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 50%));
    }
    to {
      clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 50%));
    }
  }
}

/* —— A. 滚动渐入：.reveal → 进入视口加 .in —— */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease,
      transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--reveal-i, 0) * 55ms);
    will-change: opacity, transform;
  }
  html.js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* —— B. 文章卡封面 hover 缩放（适配当前内联封面结构）—— */
@media (prefers-reduced-motion: no-preference) {
  .theme-latest-card > a > img,
  .theme-latest-card > a > div {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.6s ease;
  }
  .theme-latest-card:hover > a > img {
    transform: scale(1.05);
    filter: saturate(1.06);
  }
  .theme-latest-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease,
      border-color 0.3s ease;
  }
  .theme-latest-card:hover {
    transform: translateY(-4px);
  }
}

/* —— B. 导航链接滑动下划线 —— */
.theme-nav-menu a {
  position: relative;
}
.theme-nav-menu a::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: 2px;
  left: 18%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  border-radius: 2px;
  background: var(--theme-accent-deep);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.theme-nav-menu a.is-active::after {
  transform: scaleX(1);
}

/* —— C. 等宽小标签（eyebrow / meta / 统计数字）—— */
.mono-label {
  font-family: var(--theme-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* —— D. 全站极淡噪点颗粒 —— */
.theme-root::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.022;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
html.dark .theme-root::after {
  opacity: 0.03;
  mix-blend-mode: screen;
}

/* —— D. hero 无图时缓慢流动的渐变光晕 —— */
@media (prefers-reduced-motion: no-preference) {
  .theme-home-hero-overlay {
    background-size: 220% 220%;
    animation: hero-drift 22s ease-in-out infinite alternate;
  }
  @keyframes hero-drift {
    from {
      background-position: 0% 50%;
    }
    to {
      background-position: 100% 50%;
    }
  }
}


/* ===== PayPal 收款（付费解锁 / 打赏）===== */
.lockwall-price{font-size:1.6rem;font-weight:700;color:var(--theme-text-dark);margin:.2rem 0 1rem}
.paypal-buttons{max-width:340px;margin:0 auto}
.lockwall-paid{text-align:center}
.lockwall-restore{margin-top:1rem}
.lockwall-restore summary{list-style:none}
.lockwall-restore summary::-webkit-details-marker{display:none}
.donate-tiers{display:flex;flex-wrap:wrap;gap:.5rem}
.donate-tier{flex:1 1 auto;min-width:64px;padding:.55rem .4rem;border-radius:var(--theme-radius-sm);border:1px solid var(--theme-border);background:var(--theme-bg);color:var(--theme-text-dark);font-weight:600;cursor:pointer;transition:border-color .15s,background .15s}
.donate-tier:hover{border-color:var(--theme-accent)}
.donate-tier.on{border-color:var(--theme-accent);background:var(--theme-soft);color:var(--theme-accent-deep)}
