@charset "utf-8";
/* =========================================================
   Nebula — 深色科技风 EMLOG 模板
   基础：EMLOG Pro 默认模板结构（GPL），视觉与布局重写
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --wrap: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --tap: 44px;
  --ease: cubic-bezier(.22, .8, .22, 1);
}

html[data-theme="dark"] {
  --bg: #040910;
  --bg-soft: #061020;
  --panel: rgba(10, 23, 41, .82);
  --panel-2: rgba(8, 18, 33, .92);
  --line: rgba(74, 148, 210, .18);
  --line-2: rgba(74, 148, 210, .32);
  --text: #dbe9f7;
  --text-strong: #f2f9ff;
  --muted: #7d9ab5;
  --muted-2: #5b7590;
  --accent: #38d2ff;
  --accent-2: #7a9bff;
  --accent-ink: #02121d;
  --danger: #ff5d76;
  --ok: #22e0a8;
  --shadow: 0 18px 48px rgba(0, 6, 16, .55);
  --glow: 0 0 0 1px rgba(56, 210, 255, .22), 0 0 28px rgba(56, 210, 255, .12);
  --grid: rgba(90, 170, 230, .05);
  --code-bg: #071423;
}

html[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-soft: #e9eff8;
  --panel: rgba(255, 255, 255, .9);
  --panel-2: #ffffff;
  --line: #dfe7f2;
  --line-2: #c8d6e8;
  --text: #1a2740;
  --text-strong: #0c1729;
  --muted: #5b7291;
  --muted-2: #7d90aa;
  --accent: #0b84c9;
  --accent-2: #4769e0;
  --accent-ink: #ffffff;
  --danger: #d92b48;
  --ok: #0f9d76;
  --shadow: 0 14px 36px rgba(22, 44, 80, .10);
  --glow: 0 0 0 1px rgba(11, 132, 201, .18), 0 8px 22px rgba(11, 132, 201, .08);
  --grid: rgba(30, 90, 150, .05);
  --code-bg: #0f1c2e;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 50% -8%, rgba(38, 118, 190, .20), transparent 60%),
    radial-gradient(900px 520px at 92% 18%, rgba(80, 100, 220, .10), transparent 62%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 42%, var(--bg));
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

img { max-width: 100%; height: auto; border: 0; }
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; color: var(--text-strong); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .site-head {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .45;
}

.head-in {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  color: #02121d;
  background: linear-gradient(150deg, #8ef0ff, #2aa8e0 60%, #4769e0);
  box-shadow: 0 0 18px rgba(56, 210, 255, .35), inset 0 0 10px rgba(255, 255, 255, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .5px; color: var(--text-strong); }
.brand-desc { font-size: 11px; color: var(--muted-2); letter-spacing: .4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.blog-header-nav { margin-left: 6px; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list .list-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); background: rgba(56, 210, 255, .07); }
.nav-link[aria-current="page"] { color: var(--accent); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.dropdown-menus {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .2s var(--ease);
}
.list-item:hover > .dropdown-menus,
.list-item:focus-within > .dropdown-menus { opacity: 1; visibility: visible; transform: none; }
.dropdown-menus .nav-link { display: block; padding: 7px 10px; }
.header-avatar { width: 20px; height: 20px; border-radius: 50%; }

.head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }

.head-search { position: relative; }
.head-search summary {
  list-style: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
}
.head-search summary::-webkit-details-marker { display: none; }
.head-search summary:hover { color: var(--accent); border-color: var(--line-2); }
.head-search form {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: flex;
  gap: 6px;
  padding: 8px;
  width: 300px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}
.head-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
.head-search button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}

.icon-btn,
.theme-switch {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover,
.theme-switch:hover { color: var(--accent); border-color: var(--line-2); }
.theme-switch .sun { display: none; }
html[data-theme="light"] .theme-switch .sun { display: block; }
html[data-theme="light"] .theme-switch .moon { display: none; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 6px;
}
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 36px;
  align-items: center;
}

/* 首页实时时钟卡 */
.hero-clock {
  position: relative;
  padding: 22px 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(56, 210, 255, .07), transparent 62%),
    var(--panel);
  box-shadow: var(--glow);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.hero-clock::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 14px;
  height: 14px;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
}
.clock-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 10px;
}
.clock-top .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: clockPulse 2s var(--ease) infinite;
}
.clock-mini { margin-left: auto; color: var(--accent); letter-spacing: .5px; }
.clock-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-strong);
}
.clock-date {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .6px;
}
@keyframes clockPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 2.4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hero-title {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.18;
  letter-spacing: .5px;
  margin: 0 0 14px;
  text-shadow: 0 0 30px rgba(56, 210, 255, .18);
}
.hero-title span { color: var(--accent); }
.hero-desc {
  max-width: 46em;
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 22px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  transition: .2s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #5fe3ff, #2ba9e2 70%, #4a6ee0);
  border-color: transparent;
  color: #02121d;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(43, 169, 226, .28);
}
.btn-primary:hover { color: #02121d; filter: brightness(1.06); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 11.5px;
  color: var(--muted);
}
.stat-chip b { font-size: 15px; color: var(--text-strong); font-variant-numeric: tabular-nums; }

.hero-side {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(56, 210, 255, .06), transparent 55%),
    var(--panel);
  box-shadow: var(--glow);
  overflow: hidden;
}
.hero-side::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 14px;
  height: 14px;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
}
.hero-side::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}
.avatar-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 210deg, var(--accent), transparent 55%, var(--accent-2), var(--accent));
  margin-bottom: 14px;
}
.avatar-ring img,
.avatar-ring .fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
}
.hero-side h2 { font-size: 18px; margin-bottom: 4px; }
.hero-side .role { font-size: 11.5px; letter-spacing: 1.4px; color: var(--accent); margin-bottom: 10px; }
.hero-side p { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-links a {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.hero-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- section head ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.section-title { font-size: 21px; letter-spacing: .4px; display: flex; align-items: center; gap: 10px; }
.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(56, 210, 255, .5);
}
.section-sub { font-size: 12px; color: var(--muted-2); letter-spacing: .6px; }

.page-head { padding: 40px 0 20px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.page-head p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- list layout ---------- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
  padding-bottom: 46px;
}
.content-grid.no-side { grid-template-columns: minmax(0, 1fr); }

/* ---------- post list ---------- */
.post-list { display: flex; flex-direction: column; gap: 14px; }

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.post-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.post-card.has-cover { grid-template-columns: 78px minmax(0, 1fr) 156px; }

.post-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.post-date .d { font-size: 30px; font-weight: 800; line-height: 1; color: var(--text-strong); letter-spacing: -.5px; }
.post-date .ym { font-size: 10.5px; color: var(--muted-2); margin-top: 5px; letter-spacing: .4px; }
.post-date .top-flag {
  margin-top: 9px;
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 93, 118, .5);
  color: var(--danger);
  background: rgba(255, 93, 118, .08);
}

.post-body { min-width: 0; display: flex; flex-direction: column; }
.post-title { font-size: 19px; line-height: 1.4; margin: 0 0 7px; }
.post-title a { color: var(--text-strong); }
.post-title a:hover { color: var(--accent); }
.log-topflg {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 6px;
  font-size: 9.5px;
  font-weight: 400;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 93, 118, .45);
  color: var(--danger);
}
.loglist-sort {
  display: inline-block;
  margin-left: 7px;
  vertical-align: 2px;
}
.loglist-sort a {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.post-excerpt {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-excerpt p { margin: 0; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: auto;
}
.post-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--accent); }

.post-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tags {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(56, 210, 255, .04);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}
.tags:hover { color: var(--accent); border-color: var(--accent); }

.post-cover {
  width: 156px;
  height: 100px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  align-self: center;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.05); }

/* ---------- home category boxes ---------- */
.home-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0 8px;
}
.home-box {
  --box-accent: var(--accent);
  --box-accent-soft: rgba(56, 210, 255, .12);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 90% at 100% 0, var(--box-accent-soft), transparent 62%),
    var(--panel);
  box-shadow: var(--glow);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.home-box--alt {
  --box-accent: var(--accent-2);
  --box-accent-soft: rgba(122, 155, 255, .14);
}
.home-box::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--box-accent), transparent 78%);
  opacity: .9;
}
.home-box::after {
  content: "";
  position: absolute;
  right: -32px; top: -32px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--box-accent-soft);
  filter: blur(14px);
  pointer-events: none;
}
.home-box:hover {
  transform: translateY(-3px);
  border-color: var(--box-accent);
  box-shadow: 0 18px 38px rgba(4, 20, 36, .22), var(--glow);
}
.home-box-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.home-box-icon {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--box-accent-soft), transparent 90%);
  color: var(--box-accent);
  box-shadow: inset 0 0 12px var(--box-accent-soft);
}
.home-box-heading { flex: 1 1 auto; min-width: 0; }
.home-box-title {
  display: block;
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.home-box-sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.home-box-more {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .3px;
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.home-box-more:hover {
  color: var(--box-accent);
  border-color: var(--box-accent);
  background: var(--box-accent-soft);
}
.home-box-list {
  position: relative;
  margin: 6px 0 0;
  flex: 1 1 auto;
}
.home-box-list li { min-width: 0; }
.home-box-list li + li { border-top: 1px dashed var(--line); }
.home-box-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin: 0 -8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  transition: background .22s var(--ease), color .22s var(--ease);
}
.home-box-list a:hover {
  color: var(--box-accent);
  background: var(--box-accent-soft);
}
.hb-idx {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
  transition: color .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.home-box-list li:nth-child(-n+3) .hb-idx {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--box-accent), var(--accent-2));
  box-shadow: 0 0 12px var(--box-accent-soft);
}
.hb-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hb-date {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  transition: color .22s var(--ease);
}
.home-box-list a:hover .hb-date { color: var(--box-accent); }
.home-box-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .2px;
  transition: color .25s var(--ease);
}
.home-box-foot:hover { color: var(--box-accent); }
.home-box-foot svg { transition: transform .25s var(--ease); }
.home-box-foot:hover svg { transform: translateX(3px); }
@media (max-width: 820px) {
  .home-boxes { grid-template-columns: 1fr; }
}

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
}
.pagination a,
.pagination span,
.pagination em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.pagination a:hover { color: var(--accent); border-color: var(--accent); }
.pagination span {
  color: var(--accent-ink);
  background: linear-gradient(135deg, #5fe3ff, #2ba9e2);
  border-color: transparent;
  font-weight: 700;
}
.pagination em { border-style: dashed; color: var(--muted-2); }

/* ---------- sidebar ---------- */
.side-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }

.widget {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
  position: relative;
}
.widget::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.widget-title { margin-bottom: 12px; }
.widget-title h3,
.widget > h3 {
  font-size: 13.5px;
  letter-spacing: 1.2px;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.widget-title.m { margin-bottom: 10px; }
.widget-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.widget-list li:last-child { border-bottom: 0; }
.widget-list a { color: var(--text); }
.widget-list a:hover { color: var(--accent); }

.bloggerinfo { text-align: center; }
.bloggerinfo-img { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--line-2); object-fit: cover; }
.bloginfo-name { margin-top: 10px; font-size: 15px; color: var(--text-strong); }
.bloginfo-descript { font-size: 12px; color: var(--muted); margin-top: 4px; }

.tag-container { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-container span { line-height: 1.4 !important; }
.tags-side {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(56, 210, 255, .04);
  color: var(--muted) !important;
  font-size: 12px !important;
}
.tags-side:hover { color: var(--accent) !important; border-color: var(--accent); }

.log-classify-f > li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.log-classify-f > li:last-child { border-bottom: 0; }
.log-classify-f a { color: var(--text); }
.log-classify-f a:hover { color: var(--accent); }
.log-classify-c { padding-left: 14px; margin-top: 2px; }
.log-classify-c li { font-size: 12px; padding: 3px 0; }

.blog-lates {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  min-width: 0;
}
.blog-lates:last-child { border-bottom: 0; }
.blog-lates a {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.blog-lates a:hover { color: var(--accent); }

/* 侧边栏序号：前三名高亮，其余为描边徽标 */
.side-idx {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.blog-lates:nth-child(-n+3) .side-idx {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(56, 210, 255, .35);
}
.blog-lates:hover .side-idx { transform: translateY(-1px); }
.blog-lates:hover:nth-child(n+4) .side-idx { color: var(--accent); border-color: var(--line-2); }

.widget form[name="keyform"] { display: flex; gap: 8px; }
.widget .search {
  flex: 1 1 auto;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
.widget form[name="keyform"] input[type="submit"] {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
.widget .archive {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
#calendar { font-size: 12px; }
#calendar table { width: 100%; border-collapse: collapse; }
#calendar td, #calendar th { padding: 4px 0; text-align: center; color: var(--muted); }
#calendar a { color: var(--accent); }

/* stats widget (template custom) */
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-list .kv {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(56, 210, 255, .03);
}
.stat-list .kv b { display: block; font-size: 19px; color: var(--text-strong); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-list .kv span { font-size: 11px; color: var(--muted-2); }

/* ---------- article ---------- */
.article-wrap { padding: 34px 0 50px; }
.article {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 34px clamp(20px, 4vw, 46px) 40px;
  box-shadow: var(--shadow);
}
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 24px; }
.article-title { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.32; margin: 0 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted-2); }
.article-meta a { color: var(--muted); }
.article-cover { margin: 0 0 24px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.article-cover img { width: 100%; display: block; }

.markdown { font-size: 15.5px; line-height: 1.9; color: var(--text); overflow-wrap: break-word; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 1.6em 0 .7em; }
.markdown h2 { font-size: 22px; padding-left: 12px; border-left: 3px solid var(--accent); }
.markdown h3 { font-size: 18px; }
.markdown p { margin: 0 0 1.1em; }
.markdown a { border-bottom: 1px dashed var(--line-2); }
.markdown a:hover { border-bottom-color: var(--accent); }
.markdown ul, .markdown ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.markdown ul { list-style: disc; }
.markdown ol { list-style: decimal; }
.markdown li { margin: .35em 0; }
.markdown blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: rgba(56, 210, 255, .05);
  color: var(--muted);
}
.markdown code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .88em;
  padding: .15em .45em;
  border-radius: 4px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--accent);
}
.markdown pre {
  margin: 1.2em 0;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--code-bg);
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
}
.markdown pre code { padding: 0; border: 0; background: transparent; color: #cfe6f7; }
.markdown img { border-radius: 10px; margin: 1em 0; }
.markdown table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 13.5px; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 9px 12px; }
.markdown th { background: rgba(56, 210, 255, .06); color: var(--text-strong); }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 6px; }

.neighbor-log { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 30px 0; }
.neighbor-log .prev-log, .neighbor-log .next-log { min-width: 0; }
.neighbor-log .next-log { text-align: right; }
.neighbor-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  transition: .2s var(--ease);
}
.neighbor-link:hover { border-color: var(--accent); color: var(--accent); }
.neighbor-dir { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted-2); margin-bottom: 4px; }
.next-log .neighbor-dir { justify-content: flex-end; }
.neighbor-title { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- related posts ---------- */
.related-posts {
  margin: 30px 0 8px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(56, 210, 255, .05), transparent 70%),
    var(--panel);
  box-shadow: var(--glow);
}
.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.related-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
}
.related-icon {
  width: 24px; height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(56, 210, 255, .16), rgba(122, 155, 255, .12));
  color: var(--accent);
  box-shadow: inset 0 0 10px rgba(56, 210, 255, .1);
}
.related-tag {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(56, 210, 255, .05);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .5px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.related-grid li { min-width: 0; }
.rel-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(4, 20, 36, .08);
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.rel-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(4, 20, 36, .22), 0 0 0 1px rgba(56, 210, 255, .25);
}
.rel-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 210, 255, .12), rgba(122, 155, 255, .1));
}
.rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s var(--ease);
}
.rel-card:hover .rel-thumb img { transform: scale(1.06); }
.rel-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  padding: 0 2px;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--text);
  transition: color .25s var(--ease);
}
.rel-card:hover .rel-title { color: var(--accent); }
@media (max-width: 980px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- comments ---------- */
#comments { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 24px; }
.comment-header { font-size: 14px; color: var(--text-strong); margin-bottom: 16px; }
.comment-header b { font-weight: 700; }
.comment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.comment .avatar img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); }
.comment-infos b { font-size: 13px; color: var(--text-strong); }
.comment-time { font-size: 11px; color: var(--muted-2); margin-left: 8px; }
.comment-content { font-size: 13.5px; color: var(--text); margin-top: 4px; overflow-wrap: break-word; }
.comment-reply { margin-top: 4px; }
.com-reply {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  padding: 2px 0;
  cursor: pointer;
}
.com-reply:hover { color: var(--accent); }
.comment-children { margin-left: 30px; border-bottom: 0; border-left: 2px solid var(--line); padding-left: 12px; }
.commentform { margin-top: 18px; }
.commentform textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
.comment-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.comment-info input {
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.captcha-container { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.com_submit_p { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.com_submit_p .btn,
#comment_submit {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
.cancel-reply { display: none; background: transparent !important; border: 1px solid var(--line) !important; color: var(--muted) !important; }

/* ---------- footer ---------- */
.blog-footer {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding: 26px 0 30px;
  background: linear-gradient(180deg, transparent, rgba(3, 8, 16, .35));
}
html[data-theme="light"] .blog-footer { background: linear-gradient(180deg, transparent, rgba(230, 238, 248, .5)); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.foot-info { font-size: 12px; color: var(--muted-2); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.foot-info a { color: var(--muted); }
.foot-info a:hover { color: var(--accent); }
.foot-tag { font-size: 11px; color: var(--muted-2); letter-spacing: .6px; }
.foot-tag a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color .25s var(--ease), border-color .25s var(--ease); }
.foot-tag a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- footer friend links ---------- */
.foot-links {
  border-top: 1px solid var(--line);
  padding: 18px 0 6px;
}
.foot-links-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.foot-links-title {
  flex: 0 0 auto;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
}
.foot-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.foot-links-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(56, 210, 255, .045);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
html[data-theme="light"] .foot-links-list a { background: #eef2f8; }
.foot-links-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(56, 210, 255, .1);
  transform: translateY(-1px);
}
.fl-badge {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: hsl(var(--fl-h, 200) 78% 58%);
  box-shadow: 0 1px 3px rgba(4, 20, 36, .18);
}
@media (max-width: 620px) {
  .foot-links { padding: 16px 0 4px; }
  .foot-links-in { gap: 8px 10px; }
  .foot-links-list { gap: 6px; }
  .foot-links-list a { font-size: 12px; padding: 4px 9px 4px 5px; }
}
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.foot-info { font-size: 12px; color: var(--muted-2); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.foot-info a { color: var(--muted); }
.foot-info a:hover { color: var(--accent); }
.foot-tag { font-size: 11px; color: var(--muted-2); letter-spacing: .6px; }

.side-toolbar { position: fixed; right: 18px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.side-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: .2s var(--ease);
}
.side-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* 浮动主题按钮：两个图标叠放，按主题只显示一个，避免图标溢出圆角按钮 */
#theme-toggle { position: relative; overflow: hidden; }
#theme-toggle svg { position: absolute; top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%); }
#theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] #theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] #theme-toggle .icon-moon { display: none; }

/* ---------- auth modal (EMLOG 登录/注册) ---------- */
.auth-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 15, .72);
  backdrop-filter: blur(4px);
  z-index: 100;
}
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-modal-card {
  position: relative;
  width: min(420px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 26px 24px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}
.auth-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.auth-modal-head h3 { font-size: 18px; margin-bottom: 14px; }
.auth-modal-alert:empty { display: none; }
.auth-modal-alert { color: var(--danger); font-size: 12px; margin-bottom: 10px; }
.auth-form-row { margin-bottom: 10px; }
.auth-form-row input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
.auth-inline-row { display: flex; gap: 8px; }
.auth-inline-row input { flex: 1 1 auto; min-width: 0; }
.auth-inline-btn { flex: 0 0 auto; }
.auth-checkbox { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.auth-submit { width: 100%; min-height: 40px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.auth-modal-switch { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.auth-switch-links { display: flex; gap: 8px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.auth-switch-link.active { color: var(--accent); }
.auth-modal-panel { padding-top: 6px; }

/* ---------- 404 ---------- */
.error-page {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.error-card {
  position: relative;
  width: min(560px, 100%);
  padding: 44px 28px;
  text-align: center;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--glow);
}
.error-code {
  font-size: clamp(70px, 18vw, 130px);
  line-height: 1;
  margin: 0;
  font-weight: 800;
  letter-spacing: 4px;
  color: transparent;
  background: linear-gradient(180deg, #bff4ff, #38d2ff 55%, #4769e0);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(56, 210, 255, .35));
}
.error-msg { color: var(--muted); margin: 14px 0 22px; }

/* ---------- plugins / downloads ---------- */
.em-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(56, 210, 255, .08);
  color: var(--accent) !important;
  font-size: 13px;
  text-decoration: none !important;
}
.em-download-btn:hover { border-color: var(--accent); }

/* ---------- responsive ---------- */
/* 小屏（含手机内置浏览器按 980 布局宽度渲染的情况）：隐藏侧边栏与页脚友链 */
@media (max-width: 1024px) {
  .side-col { display: none !important; }
  .foot-links { display: none !important; }
  .content-grid, .content-grid.no-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1080px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .side-col { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .hero-in { grid-template-columns: 1fr; gap: 24px; }
  .hero-side { max-width: 460px; }
  .hero-clock { max-width: 420px; }
}

@media (max-width: 820px) {
  .head-in { min-height: 62px; gap: 12px; }
  .brand-desc { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; order: 3; margin-left: auto; }
  .head-tools { order: 2; margin-left: 0; }
  .blog-header-nav {
    position: fixed;
    inset: 62px 0 auto;
    margin: 0;
    padding: 10px 16px 18px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line-2);
    box-shadow: 0 20px 44px rgba(0, 4, 12, .45);
    z-index: 70;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: .22s var(--ease);
    max-height: calc(100vh - 62px);
    overflow: auto;
  }
  .blog-header-nav.show { transform: none; opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 11px 12px; border-radius: 8px; }
  .nav-link[aria-current="page"]::after { display: none; }
  .dropdown-menus {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding-left: 8px;
    background: transparent;
  }
  .nav-overlay { position: fixed; inset: 62px 0 0; background: rgba(2, 7, 15, .5); z-index: -1; }

  .hero { padding: 28px 0 4px; }
  .hero-title { font-size: 30px; }
  /* 手机端列表：日期块 + 标题元信息 + 右侧缩略图 */
  .post-card,
  .post-card.has-cover { grid-template-columns: 54px minmax(0, 1fr) 102px; gap: 10px 12px; padding: 14px 12px; align-items: start; }
  .post-card:not(.has-cover) { grid-template-columns: 54px minmax(0, 1fr); }
  .post-card .post-date { flex-direction: column; align-items: flex-start; gap: 1px; border-right: 1px solid var(--line); padding: 0 10px 0 0; }
  .post-card .post-date .d { font-size: 23px; letter-spacing: -.8px; }
  .post-card .post-date .ym { font-size: 9.5px; margin-top: 2px; }
  .post-card .post-date .top-flag { margin-top: 6px; font-size: 9px; padding: 1px 5px; }
  .post-card .post-title { font-size: 15px; line-height: 1.45; margin: 0 0 6px; }
  .post-card .post-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .post-card .post-excerpt { display: none; }
  .post-card .post-meta { gap: 8px; font-size: 11px; margin-top: 0; flex-wrap: wrap; }
  .post-card .post-tags { display: none; }
  .post-card .post-cover { grid-column: 3; width: 100%; height: 78px; margin: 0; border-radius: 10px; align-self: start; }
  .article { padding: 24px 18px 30px; }
  .neighbor-log { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .related-posts { padding: 15px 14px 16px; }
  .rel-title { font-size: 12.2px; }
  .comment-info { grid-template-columns: 1fr; }
  .side-col { display: none !important; }
  .foot-links { display: none !important; }
  .content-grid, .content-grid.no-side { grid-template-columns: minmax(0, 1fr); }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .head-search form { width: calc(100vw - 48px); }
  .hero-title { font-size: 26px; }
  .hero-stats .stat-chip { font-size: 10.5px; padding: 6px 10px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .post-card,
  .post-card.has-cover { grid-template-columns: 46px minmax(0, 1fr) 88px; gap: 8px 10px; padding: 12px 10px; }
  .post-card:not(.has-cover) { grid-template-columns: 46px minmax(0, 1fr); }
  .post-card .post-date .d { font-size: 20px; }
  .post-card .post-date .ym { font-size: 9px; }
  .post-card .post-title { font-size: 14px; }
  .post-card .post-meta { gap: 6px; font-size: 10.5px; }
  .post-card .post-cover { height: 68px; }
  .article-title { font-size: 24px; }
  .markdown { font-size: 15px; }
  .side-toolbar { right: 12px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .post-card:hover { transform: none; }
}
/* ---------- structural fixes ---------- */
.main-col { min-width: 0; }
.content-grid .article { max-width: none; }
.article-meta .spacer { flex: 1 1 auto; }
.site-head.is-scrolled { box-shadow: 0 12px 30px rgba(0, 4, 12, .35); }
html[data-theme="light"] .site-head.is-scrolled { box-shadow: 0 10px 24px rgba(22, 44, 80, .12); }
.head-search summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-modal { padding-top: 8vh; align-items: start; }
@media (max-height: 720px) { .auth-modal { padding-top: 3vh; } }
.side-col .avatar-ring { width: 64px; height: 64px; margin-bottom: 8px; }
.side-col .avatar-ring .fallback { font-size: 22px; }

/* ---------- 与 EMLOG 插件常用变量兼容 ---------- */
:root {
  --buttonBgColor: var(--panel-2);
  --buttonBorderColor: var(--line-2);
  --buttonTextColor: var(--text);
  --fontColor: var(--text);
  --conBgcolor: var(--panel);
  --bodyBground: var(--bg);
  --lightColor: var(--muted);
  --aHoverColor: var(--accent);
  --marRadius: 8px;
}

/* ---------- article actions（点赞 / 分享） ---------- */
.article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin: 26px 0 4px;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line);
}
.act-like {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.act-like:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.act-like:disabled { opacity: .7; cursor: default; }
.act-like-icon { display: inline-grid; place-items: center; }
.act-like-num { font-variant-numeric: tabular-nums; color: var(--muted-2); }
.act-like.is-liked { color: #fff; border-color: transparent; background: linear-gradient(135deg, #ff6b81, #ff9a3c); }
.act-like.is-liked .act-like-num { color: rgba(255, 255, 255, .85); }
.act-share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.act-share-label { font-size: 12px; color: var(--muted-2); letter-spacing: .4px; }
.act-share-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.act-share-btn:hover { color: var(--accent); border-color: var(--accent); background: rgba(56, 210, 255, .08); }
.act-toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  z-index: 200;
  transform: translate(-50%, 12px);
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(10, 22, 38, .92);
  color: #fff;
  font-size: 13px;
  letter-spacing: .2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.act-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 620px) {
  .article-actions { gap: 10px; }
  .act-share { margin-left: 0; width: 100%; }
  .act-share-btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- code block（高亮 + 复制） ---------- */
.code-block { position: relative; margin: 18px 0; }
.code-block pre {
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-soft, rgba(6, 14, 24, .72));
  overflow: auto;
  font-size: 13px;
  line-height: 1.72;
}
html[data-theme="light"] .code-block pre { background: #f6f8fb; }
.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--text);
  white-space: pre;
}
.code-block-bar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.code-lang {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(56, 210, 255, .12);
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.code-copy {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.code-copy:hover { color: var(--accent); border-color: var(--accent); }
.code-copy.is-done { color: #14c37d; border-color: #14c37d; }

/* 语法着色 */
.tk-cmt { color: #6f8296; font-style: italic; }
.tk-str { color: #7ee787; }
.tk-num { color: #f0b46a; }
.tk-kw { color: #ff7b93; }
.tk-fn { color: #66d9ff; }
html[data-theme="light"] .tk-cmt { color: #8b98a8; }
html[data-theme="light"] .tk-str { color: #1a7f37; }
html[data-theme="light"] .tk-num { color: #b35900; }
html[data-theme="light"] .tk-kw { color: #cf222e; }
html[data-theme="light"] .tk-fn { color: #0550ae; }

/* ---------- article copyright ---------- */
.article-copyright {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: rgba(56, 210, 255, .04);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.cp-icon { flex: 0 0 auto; color: var(--accent); margin-top: 2px; }
.cp-body { min-width: 0; word-break: break-word; }
.cp-body a { color: var(--accent); }
@media (max-width: 620px) {
  .code-block pre { font-size: 12px; padding: 14px 12px 12px; }
  .article-copyright { font-size: 12px; padding: 11px 12px; }
}

/* ---------- 特效：樱花飘落 ---------- */
.fx-sakura {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 90;
  opacity: .92;
}
@media (max-width: 820px) {
  .fx-sakura { z-index: 40; opacity: .85; }
}

/* ---------- 特效：鼠标指针箭头样式 ---------- */
html.fx-cursor-pink,
html.fx-cursor-pink body,
html.fx-cursor-pink a,
html.fx-cursor-pink button,
html.fx-cursor-pink summary,
html.fx-cursor-pink label,
html.fx-cursor-pink input[type="submit"],
html.fx-cursor-pink input[type="button"],
html.fx-cursor-pink .post-card,
html.fx-cursor-pink .rel-card,
html.fx-cursor-pink .home-box-item {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij48cGF0aCBkPSJNNiAzLjUgMjEuNiAxNi4yIDE0LjcgMTcuMjUgMTguMyAyNC41IDE0LjcgMjYgMTEuMSAxOC43IDYgMjIuN1oiIGZpbGw9IiNmZmM3ZGQiIHN0cm9rZT0iI2ZmNGY5NyIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=") 6 4, auto;
}
html.fx-cursor-cyan,
html.fx-cursor-cyan body,
html.fx-cursor-cyan a,
html.fx-cursor-cyan button,
html.fx-cursor-cyan summary,
html.fx-cursor-cyan label,
html.fx-cursor-cyan input[type="submit"],
html.fx-cursor-cyan input[type="button"],
html.fx-cursor-cyan .post-card,
html.fx-cursor-cyan .rel-card,
html.fx-cursor-cyan .home-box-item {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij48cGF0aCBkPSJNNiAzLjUgMjEuNiAxNi4yIDE0LjcgMTcuMjUgMTguMyAyNC41IDE0LjcgMjYgMTEuMSAxOC43IDYgMjIuN1oiIGZpbGw9IiNjNGYwZmYiIHN0cm9rZT0iIzJlYzRmMCIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=") 6 4, auto;
}
html.fx-cursor-dark,
html.fx-cursor-dark body,
html.fx-cursor-dark a,
html.fx-cursor-dark button,
html.fx-cursor-dark summary,
html.fx-cursor-dark label,
html.fx-cursor-dark input[type="submit"],
html.fx-cursor-dark input[type="button"],
html.fx-cursor-dark .post-card,
html.fx-cursor-dark .rel-card,
html.fx-cursor-dark .home-box-item {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij48cGF0aCBkPSJNNiAzLjUgMjEuNiAxNi4yIDE0LjcgMTcuMjUgMTguMyAyNC41IDE0LjcgMjYgMTEuMSAxOC43IDYgMjIuN1oiIGZpbGw9IiMxMDFkMmYiIHN0cm9rZT0iIzdlZTBmZiIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=") 6 4, auto;
}
html.fx-cursor-pink input,
html.fx-cursor-pink textarea,
html.fx-cursor-cyan input,
html.fx-cursor-cyan textarea,
html.fx-cursor-dark input,
html.fx-cursor-dark textarea {
  cursor: text;
}
