/* =========================================================
   Pico — layout & components
   Original CSS written for this theme. No third-party framework.
   Design tokens live here; palettes are in skins.css, dark in dark.css.
   ========================================================= */

/* ---------- 0. tokens ---------- */
:root {
  /* palette (mint, default) */
  --bg: #cfdad5;
  --bg-2: #c3d1cb;
  --surface: #f7fbf8;
  --surface-2: #eaf2ed;
  --surface-3: #dfeae4;
  --text: #2c3733;
  --text-2: #74857c;
  --text-3: #94a49b;
  --line: #e2ecE6;
  --line-2: #d5e2da;
  --accent: #22bb6d;
  --accent-2: #16e186;
  --accent-soft: #e0f2e7;
  --accent-ink: #ffffff;

  /* geometry */
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --shell-w: 1120px;
  --rail-w: 248px;
  --right-w: 232px;
  --topbar-h: 64px;
  --pad: 28px;

  /* depth */
  --shadow-1: 0 1px 2px rgba(30, 46, 39, .04);
  --shadow-2: 0 18px 40px -18px rgba(26, 44, 35, .28), 0 2px 8px rgba(26, 44, 35, .05);
  --shadow-3: 0 26px 70px -24px rgba(20, 40, 30, .38);

  /* type */
  --font: "HarmonyOS Sans SC", "HarmonyOS_M", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- 1. base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 12% -10%, var(--bg-2), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--bg-2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.pico-noscroll { overflow: hidden; }

img, video, canvas, svg { max-width: 100%; height: auto; }
img { border: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
table { border-collapse: collapse; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  overflow: hidden;
}

::selection { background: var(--accent); color: #fff; }

.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.12em; fill: none; }
.ico-fill { fill: currentColor; stroke: none; }

/* ---------- 2. shell ---------- */
.site {
  position: relative;
  max-width: var(--shell-w);
  margin: 46px auto 64px;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  /* No overflow:hidden here — it would kill position:sticky on the rail and top bar. */
  isolation: isolate;
}

.site.has-right { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--right-w); }

/* layout variants without the left rail (two columns / single column) */
.site.no-left { grid-template-columns: minmax(0, 1fr); }
.site.no-left.has-right { grid-template-columns: minmax(0, 1fr) var(--right-w); }
.site.no-left:not(.has-right) .col-main { border-radius: var(--r-l); }
.site.no-left.has-right .col-main { border-radius: var(--r-l) 0 0 var(--r-l); }
.site.no-left .menu-btn { display: grid; }

/* Two-column modes keep the reading column at 640px (the reference theme's
   measure) and let the shell follow the sidebar width, so a narrow rail really
   does make the whole page narrower instead of stretching the text column. */
@media (min-width: 1024px) {
  .site:not(.no-left):not(.has-right) {
    --shell-w: calc(var(--rail-w) + 640px);
  }
  .site.no-left.has-right {
    --shell-w: calc(var(--right-w) + 640px);
  }
  .site.no-left:not(.has-right) { --shell-w: 720px; }
}

/* ---------- 3. left rail ---------- */
.rail {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  border-radius: var(--r-l) 0 0 var(--r-l);
  min-width: 0;
}

.rail-inner {
  position: sticky;
  top: 0;
  padding: 30px 22px 40px;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.rail-inner::-webkit-scrollbar { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 26px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.5px;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  flex: none;
}
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.2px; line-height: 1.2; }
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.brand img { max-height: 38px; width: auto; }

.rail-menu { list-style: none; margin: 0 0 6px; }
.rail-menu li { margin: 0 0 2px; }
.rail-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-s);
  font-size: 13.5px;
  color: var(--text-2);
  transition: background .18s ease, color .18s ease;
}
.rail-menu a:hover { background: var(--surface-3); color: var(--text); }
.rail-menu a.is-current { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); }
.rail-menu a.is-current::after {
  content: ""; margin-left: auto;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.rail-menu .sub-menu { padding-left: 14px; list-style: none; }
.rail-menu .sub-menu a { font-size: 12.5px; color: var(--text-3); }

.rail-sep { height: 1px; background: var(--line); margin: 20px 4px; opacity: .8; }

.rail-widgets { margin-top: 18px; }
.rail-widgets .widget { margin-bottom: 22px; }
.rail-widgets .widget-title {
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 7px;
}
.rail-widgets .widget-title::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* widget content: tags + recent posts + author card */
.tag-cloud, .tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a, .tag-list a, .chip {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
  transition: all .18s ease;
}
.tag-cloud a:hover, .tag-list a:hover { background: var(--accent); color: #fff; }

.w-mini { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.w-mini-thumb {
  width: 46px; height: 46px; border-radius: 9px; overflow: hidden;
  background: var(--surface-3); flex: none;
}
.w-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-mini-txt { min-width: 0; }
.w-mini-txt strong { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--text); }
.w-mini-txt span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }

.author-card { display: flex; align-items: center; gap: 12px; }
.author-card .avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: var(--shadow-1); }
.author-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-card strong { font-size: 13px; display: block; }
.author-card span { font-size: 11.5px; color: var(--text-3); }

.rail-foot {
  margin-top: 26px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ---------- 4. content column ---------- */
.col-main { min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.site:not(.has-right) .col-main { border-radius: 0 var(--r-l) var(--r-l) 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
}

.topbar.is-stuck { box-shadow: 0 10px 24px -18px rgba(24, 40, 32, .4); }

/* compact brand inside the top bar, used when the left rail is off */
.top-brand { flex: none; padding-right: 4px; }
.topbar .brand { padding: 0; gap: 8px; }
.topbar .brand .brand-sub { display: none; }
.topbar .brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; box-shadow: none; }
.topbar .brand .brand-name { font-size: 14px; }

.search-form { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-form .s-ico {
  position: absolute; left: 13px;
  color: var(--text-3);
  pointer-events: none;
  font-size: 15px;
  display: flex;
}
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: background .2s ease, border-color .2s ease;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { background: var(--surface); border-color: var(--accent); }

.tools { display: flex; align-items: center; gap: 2px; flex: none; }
.tool-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-2);
  font-size: 16px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.tool-btn:hover { background: var(--surface-3); color: var(--text); }
.tool-btn:active { transform: scale(.94); }
.tool-btn.is-on { color: var(--accent); }

/* 登录后的前台管理入口：挂在站标 / 横幅头像上，鼠标移上去才浮出一个小圆钮 */
.brand-wrap { position: relative; display: block; }
.u-avatar { position: relative; }

.qa-menu { position: absolute; z-index: 32; }
.qa-float {
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px) scale(.94);
  transition: opacity .18s ease, transform .18s ease;
}
.qa-brand { left: 22px; top: 22px; }
.qa-hero { right: -6px; bottom: -6px; }

.brand-wrap:hover .qa-float,
.u-avatar:hover .qa-float,
.qa-float:focus-within,
.qa-float[open] {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.qa-trigger {
  width: 28px; height: 28px;
  padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--surface);
  box-shadow: 0 6px 16px rgba(24, 44, 38, .22);
  cursor: pointer;
  list-style: none;
}
.qa-trigger::-webkit-details-marker { display: none; }
.qa-trigger::marker { content: ""; }
.qa-trigger .ico { font-size: 13px; }
.qa-trigger:hover { filter: brightness(1.05); }

.qa-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(24, 44, 38, .14);
}
.qa-hello {
  margin: 2px 6px 8px;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qa-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}
.qa-item:hover { background: var(--surface-3); color: var(--text); }
.qa-item .ico { font-size: 15px; opacity: .8; }
:root[data-mode="dark"] .qa-panel { box-shadow: 0 16px 38px rgba(0, 0, 0, .5); }

/* 触屏没有 hover：直接露出来 */
@media (hover: none) {
  .qa-float { opacity: 1; pointer-events: auto; transform: none; }
}

/* skin switcher: three swatches */
.skin-switch { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 4px; margin-right: 2px; border-right: 1px solid var(--line); }
.skin-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform .15s ease, border-color .15s ease;
  position: relative;
}
.skin-dot[data-skin="mint"] { background: #22bb6d; }
.skin-dot[data-skin="ocean"] { background: #3b7fe0; }
.skin-dot[data-skin="clay"] { background: #b8784a; }
.skin-dot:hover { transform: scale(1.15); }
.skin-dot.is-active { border-color: var(--surface); box-shadow: 0 0 0 2px var(--text-3); }

.menu-btn { display: none; }

/* ---------- 5. hero ---------- */
.hero {
  position: relative;
  height: 214px;
  background-color: var(--surface-3);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 16, .62) 0%, rgba(10, 22, 16, .18) 46%, rgba(10, 22, 16, .02) 70%);
}
.hero-user {
  position: absolute;
  right: 26px; bottom: 20px;
  z-index: 2;
  display: flex; align-items: center; gap: 12px;
  text-align: right;
  color: #fff;
}
.hero-user .u-txt { display: flex; flex-direction: column; align-items: flex-end; }
.hero-user .u-name {
  font-size: 16px; font-weight: 650; letter-spacing: -.2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.hero-user .u-bio {
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
  margin-top: 2px;
  max-width: 320px;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}
.hero-user .u-avatar {
  width: 56px; height: 56px; border-radius: 13px; overflow: hidden;
  flex: none;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
  background: var(--surface-3);
}
.hero-user .u-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 6. category nav ---------- */
.catnav {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav a {
  flex: none;
  font-size: 12px;
  padding: 6px 13px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-2);
  transition: all .18s ease;
  white-space: nowrap;
}
.catnav a:hover { color: var(--text); transform: translateY(-1px); }
.catnav a.is-active { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -8px var(--accent); }

/* ---------- 7. moments feed ---------- */
.stream { padding-bottom: 8px; }

.moment { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.moment:last-of-type { border-bottom: 0; }

.m-head { display: flex; align-items: center; gap: 10px; }
.m-avatar {
  width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex: none;
  background: var(--surface-3);
}
.m-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-meta { min-width: 0; }
.m-name { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.m-name .badge {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 6px; border-radius: 5px;
}
.m-time { font-size: 11.5px; color: var(--text-3); display: block; margin-top: 1px; }
.m-mode { margin-left: auto; color: var(--text-3); font-size: 13px; display: flex; }

.m-body { padding-left: 50px; }
.m-title {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 16.5px; font-weight: 650; letter-spacing: -.2px;
  line-height: 1.5;
  margin: 13px 0 6px;
}
.m-title .at { color: var(--accent); font-size: 14px; flex: none; }
.m-title a:hover { color: var(--accent); }
.m-text {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-2);
  margin: 0;
  overflow-wrap: break-word;
}
.m-text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

.m-media { margin-top: 14px; }
.m-media.single img { width: 100%; max-height: 470px; object-fit: cover; border-radius: var(--r-m); display: block; }
.m-media.grid { display: grid; gap: 6px; }
.m-media.grid.g2 { grid-template-columns: repeat(2, 1fr); }
.m-media.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.m-media.grid.g4 { grid-template-columns: repeat(2, 1fr); }
.m-media.grid a { display: block; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.m-media.grid a img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.m-media.grid a:hover img { transform: scale(1.04); }

.m-media.video { position: relative; border-radius: var(--r-m); overflow: hidden; background: #10160f; }
.m-media.video video, .m-media.video img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.m-media.video .v-play {
  position: absolute; inset: 0; margin: auto;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #111; display: grid; place-items: center;
  font-size: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
}

.m-audio {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 10px 14px;
}
.m-audio .a-play {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: none;
  font-size: 14px;
}
.m-audio .a-wave { display: flex; align-items: flex-end; gap: 2px; height: 20px; flex: 1; opacity: .55; }
.m-audio .a-wave i { display: block; width: 2px; border-radius: 2px; background: var(--accent); }
.m-audio .a-time { font-size: 11.5px; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }

.m-quote {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.8;
}
.m-quote cite { display: block; font-size: 12px; color: var(--text-3); margin-top: 8px; font-style: normal; }

.m-loca { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); margin-top: 10px; }
.m-loca .ico { color: var(--accent); }

.m-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
  padding-left: 50px;
}
.m-acts { display: flex; align-items: center; gap: 4px; }
.act {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-3);
  transition: all .18s ease;
}
.act:hover { background: var(--surface-2); color: var(--text); }
.act .ico { font-size: 14px; }
.act.is-liked { color: var(--accent); background: var(--accent-soft); }
.act.is-liked .ico { fill: currentColor; stroke: none; }
.m-foot .right { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); }
.m-foot .right .top-flag { color: var(--accent); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }

/* ---------- 8. post cards ---------- */
.plist { padding: 6px 26px 18px; }
.plist.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-top: 18px; }

.pcard {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.pcard:last-child { border-bottom: 0; }
.pcard.grid-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 0; border: 0;
  background: var(--surface);
  border-radius: var(--r-m);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.pcard.grid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.pthumb { border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.pthumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.pcard:hover .pthumb img { transform: scale(1.04); }
.pcard.grid-card .pthumb { border-radius: 0; }
.pcard.grid-card .pthumb img { aspect-ratio: 16 / 9; }

.pbody { min-width: 0; }
.pcard.grid-card .pbody { padding: 0 16px 16px; }
.pcat { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pcat span, .pcat a {
  font-size: 10.5px; letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px; border-radius: 5px;
}
.ptitle { font-size: 15.5px; font-weight: 650; line-height: 1.5; margin: 0 0 5px; letter-spacing: -.2px; }
.ptitle a:hover { color: var(--accent); }
.pexcerpt {
  font-size: 12.8px; color: var(--text-2); line-height: 1.7; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pmeta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-3); }
.pmeta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.pmeta .ico { margin-right: 3px; }

.empty-state { padding: 70px 26px; text-align: center; color: var(--text-3); }
.empty-state strong { display: block; font-size: 15px; color: var(--text-2); margin-bottom: 6px; }

/* ---------- 9. pager ---------- */
.pager { padding: 22px 26px 32px; display: flex; justify-content: center; gap: 10px; }
.pager .btn, .loadmore {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  transition: all .2s ease;
}
.pager .btn:hover, .loadmore:hover { border-color: var(--accent); color: var(--accent); }
.loadmore.is-loading { opacity: .6; pointer-events: none; }

/* ---------- 10. single ---------- */
.article { padding: 30px 40px 8px; }
.article-head { margin-bottom: 22px; }
.a-cat { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.a-cat a {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 5px;
}
.a-title { font-size: 25px; line-height: 1.4; font-weight: 750; letter-spacing: -.5px; margin: 0 0 12px; }
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--text-3); }
.a-meta .ico { margin-right: 4px; }
.a-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.a-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.5;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.a-edit:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.a-edit .ico { font-size: 12px; }

.article-cover { border-radius: var(--r-m); overflow: hidden; margin: 0 0 22px; }
.article-cover img { width: 100%; max-height: 460px; object-fit: cover; display: block; }

.toc {
  margin: 0 0 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
}
.toc-head {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  font-size: 12.5px; font-weight: 650; color: var(--text);
  text-align: left;
}
.toc-head .ico { color: var(--accent); }
.toc-head .chev { margin-left: auto; color: var(--text-3); transition: transform .2s ease; }
.toc.is-open .toc-head .chev { transform: rotate(180deg); }
.toc-body { display: none; padding: 0 16px 14px; }
.toc.is-open .toc-body { display: block; }
.toc-body ol { list-style: none; counter-reset: toc; }
.toc-body li { counter-increment: toc; margin: 4px 0; }
.toc-body li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 10px; color: var(--text-3);
  margin-right: 8px; font-variant-numeric: tabular-nums;
}
.toc-body a { font-size: 12.8px; color: var(--text-2); }
.toc-body a:hover { color: var(--accent); }
.toc-body .lvl3 { padding-left: 22px; }
.toc-body .lvl3::before { opacity: .6; }

.entry {
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text);
  overflow-wrap: break-word;
}
.entry > * { margin-bottom: 1.35em; }
.entry p { color: var(--text); }
.entry h2, .entry h3, .entry h4 { letter-spacing: -.3px; line-height: 1.5; margin: 1.9em 0 .75em; }
.entry h2 { font-size: 19px; font-weight: 700; }
.entry h3 { font-size: 16.5px; font-weight: 650; }
.entry h4 { font-size: 15px; font-weight: 650; }
.entry h2::before {
  content: ""; display: inline-block;
  width: 4px; height: 14px; border-radius: 2px;
  background: var(--accent);
  margin-right: 9px; vertical-align: -1px;
}
.entry a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.entry a:hover { border-bottom-color: var(--accent); }
.entry ul, .entry ol { padding-left: 1.4em; margin-bottom: 1.35em; }
.entry ul { list-style: none; }
.entry ul li::before { content: "•"; color: var(--accent); margin-left: -1em; margin-right: .5em; }
.entry blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  color: var(--text-2);
  font-size: 14.5px;
}
.entry blockquote p { margin: 0; }
.entry code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-3);
  padding: .15em .45em;
  border-radius: 5px;
  color: var(--text);
}
.entry pre {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 18px 20px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
}
.entry pre code { background: none; padding: 0; font-size: inherit; }
.entry table { width: 100%; margin: 1.4em 0; font-size: 13.5px; }
.entry th, .entry td { border: 1px solid var(--line-2); padding: 8px 12px; text-align: left; }
.entry th { background: var(--surface-2); font-weight: 600; }
.entry figure { margin: 1.6em 0; }
.entry img { border-radius: var(--r-m); display: block; margin: 0 auto; }
.entry figcaption { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 8px; }
.entry hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.entry iframe { border-radius: var(--r-m); max-width: 100%; }

.a-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; }
.a-tags a { font-size: 11.5px; padding: 4px 10px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); }
.a-tags a:hover { background: var(--accent); color: #fff; }

.a-acts { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.like-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2);
  transition: all .2s ease;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn.is-liked { background: var(--accent); border-color: var(--accent); color: #fff; }
.like-btn.is-liked .ico { fill: currentColor; stroke: none; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13px; color: var(--text-2); border: 1px solid transparent; }
.share-btn:hover { background: var(--surface-2); color: var(--text); }

.a-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 6px; }
.a-nav a {
  display: block; padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--r-m);
  font-size: 12.5px; color: var(--text-2);
  transition: all .2s ease;
  min-width: 0;
}
.a-nav a:hover { background: var(--surface-3); color: var(--text); }
.a-nav .dir { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.a-nav strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-nav .next { text-align: right; }
.a-nav .next .dir { justify-content: flex-end; }

/* ---------- 11. comments ---------- */
.comments-area {
  margin: 30px 40px 44px;
  padding: 26px 28px;
  background: var(--surface-2);
  border-radius: var(--r-l);
  border: 1px solid var(--line);
}
.comments-title { font-size: 15px; font-weight: 700; margin: 0 0 18px; display: flex; align-items: center; gap: 8px; }
.comments-title span { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 5px; }
.comment-list { list-style: none; margin: 0; }
.comment-list li.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-body { display: flex; gap: 12px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; }
.comment-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.comment-main { min-width: 0; flex: 1; }
.comment-author { font-size: 12.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-author time { font-size: 11px; font-weight: 400; color: var(--text-3); }
.comment-text { font-size: 13.5px; line-height: 1.8; color: var(--text-2); margin-top: 4px; }
.comment-text p { margin: 0; }
.comment-actions { display: flex; gap: 6px; margin-top: 4px; }
.comment-actions a { font-size: 11.5px; color: var(--text-3); }
.comment-actions a:hover { color: var(--accent); }
.comment-list .children { list-style: none; margin-left: 48px; }

.comment-respond { margin-top: 20px; }
.comment-respond .comment-reply-title { font-size: 13.5px; font-weight: 650; margin: 0 0 12px; }
.comment-form { display: grid; gap: 10px; }
.comment-form textarea {
  width: 100%; min-height: 110px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color .2s ease;
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
  height: 40px; padding: 0 14px;
  border-radius: var(--r-s);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 13px;
  outline: none;
}
.comment-form input:focus { border-color: var(--accent); }
.comment-form .form-submit { margin: 0; }
.comment-submit {
  height: 38px; padding: 0 22px;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 13px;
  transition: opacity .2s ease, transform .15s ease;
}
.comment-submit:hover { opacity: .9; transform: translateY(-1px); }
.comment-form .comment-notes, .comment-form .logged-in-as { font-size: 11.5px; color: var(--text-3); margin: 0; }

/* ---------- 12. pages / 404 / search ---------- */
.page-body { padding: 34px 40px 50px; }
.page-body .a-title { font-size: 24px; }
.page-content { font-size: 15.5px; line-height: 1.95; }
.page-content h2 { font-size: 19px; margin: 1.8em 0 .7em; }
.page-content p { margin-bottom: 1.3em; }
.page-content a { color: var(--accent); }
.page-content img { border-radius: var(--r-m); }

.nf { padding: 70px 30px 80px; text-align: center; }
.nf-code {
  font-size: 78px; font-weight: 800; letter-spacing: -.06em;
  color: var(--accent); line-height: 1; margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.nf h2 { font-size: 18px; margin: 0 0 8px; }
.nf p { font-size: 13.5px; color: var(--text-3); margin: 0 0 22px; }
.nf .btn {
  display: inline-flex; align-items: center; height: 40px; padding: 0 22px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px;
}

.search-head { padding: 26px 26px 4px; }
.search-head h1 { font-size: 16px; margin: 0; font-weight: 650; }
.search-head h1 em { font-style: normal; color: var(--accent); }
.search-head span { font-size: 12px; color: var(--text-3); }

/* ---------- archive banner (random image) ---------- */
.cat-banner {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: var(--surface-3);
}
.cat-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 1023px) {
  .cat-banner { height: 150px; }
}

.search-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px;
  padding: 16px 26px; border-bottom: 1px solid var(--line);
  align-items: center;
}
.search-row .pthumb img { aspect-ratio: 4 / 3; }
.search-row strong { font-size: 14.5px; font-weight: 650; display: block; margin-bottom: 3px; }
.search-row strong:hover { color: var(--accent); }
.search-row p { font-size: 12.5px; color: var(--text-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 13. right rail ---------- */
.rrail {
  background: var(--surface-2);
  border-left: 1px solid var(--line);
  border-radius: 0 var(--r-l) var(--r-l) 0;
  padding: 22px 16px 40px;
  min-width: 0;
}
.rrail-inner { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
.rrail-inner::-webkit-scrollbar { display: none; }

.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px 14px 16px;
  margin-bottom: 12px;
}
.side-card h3 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.side-card h3::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hot-list { list-style: none; }
.hot-list li { display: flex; gap: 8px; padding: 6px 0; align-items: flex-start; }
.hot-list .rk {
  font-size: 10.5px; font-weight: 700; color: var(--text-3);
  font-variant-numeric: tabular-nums; padding-top: 2px; flex: none;
}
.hot-list li:nth-child(-n+3) .rk { color: var(--accent); }
.hot-list a { font-size: 12.3px; line-height: 1.55; color: var(--text-2); }
.hot-list a:hover { color: var(--accent); }

.side-progress { display: flex; flex-direction: column; gap: 8px; }
.prog { font-size: 11.5px; color: var(--text-3); }
.prog .bar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.prog .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.prog .row { display: flex; justify-content: space-between; }

.side-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.side-links a { font-size: 11.5px; color: var(--text-2); padding: 7px 8px; background: var(--surface-2); border-radius: 7px; text-align: center; }
.side-links a:hover { background: var(--accent); color: #fff; }

/* ---------- 14. footer ---------- */
.foot {
  margin-top: auto;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 11.5px; color: var(--text-3);
  flex-wrap: wrap;
}
.foot .f-links { display: flex; gap: 14px; }
.foot a:hover { color: var(--accent); }

/* ---------- 15. floating actions & drawer ---------- */
.fab {
  position: fixed;
  right: max(24px, calc((100vw - var(--shell-w)) / 2 - 60px));
  bottom: 30px;
  z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
}
.fab button, .fab a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-2);
  font-size: 17px;
  transition: transform .2s ease, color .2s ease;
}
.fab button:hover, .fab a:hover { color: var(--accent); transform: translateY(-2px); }
.fab .to-top { opacity: 0; pointer-events: none; transform: translateY(8px); transition: all .25s ease; }
.fab .to-top.is-show { opacity: 1; pointer-events: auto; transform: none; }

.drawer-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(14, 24, 19, .38);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.drawer-mask.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
  width: min(84vw, 320px);
  background: var(--surface-2);
  transform: translateX(-102%);
  transition: transform .32s cubic-bezier(.3, .8, .3, 1);
  padding: 22px 18px 40px;
  overflow-y: auto;
  box-shadow: 20px 0 60px -30px rgba(0, 0, 0, .5);
}
.drawer.is-open { transform: none; }
.drawer .brand { padding-bottom: 18px; }
.drawer .rail-menu { margin-bottom: 14px; }
.drawer-close {
  position: absolute; top: 14px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-2);
}
.drawer .skin-switch { border: 0; padding: 10px 0 0; }

/* ---------- 16. responsive ---------- */
@media (max-width: 1279px) {
  .site.has-right { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .site.has-right .col-main { border-radius: 0 var(--r-l) var(--r-l) 0; }
  .site.no-left, .site.no-left.has-right { grid-template-columns: minmax(0, 1fr); }
  .site.no-left .col-main, .site.no-left.has-right .col-main { border-radius: var(--r-l); }
  .rrail { display: none; }
  :root { --shell-w: 960px; }
  .site.no-left:not(.has-right) { --shell-w: 720px; }
}

@media (max-width: 1023px) {
  :root { --shell-w: 100%; --pad: 20px; }
  .site, .site.has-right, .site.no-left, .site.no-left.has-right,
  .site:not(.no-left):not(.has-right), .site.no-left:not(.has-right) { --shell-w: 100%; margin: 0; border-radius: 0; grid-template-columns: 1fr; box-shadow: none; }
  .site .col-main, .site.has-right .col-main, .site.no-left .col-main { border-radius: 0; }
  .rail { display: none; }
  .menu-btn { display: grid; }
  .top-brand { display: none; }
  .hero { height: 168px; }
  .hero-user { right: 16px; bottom: 14px; }
  .hero-user .u-avatar { width: 46px; height: 46px; }
  .hero-user .u-bio { max-width: 200px; }
  .topbar { padding: 0 12px; height: 58px; }
  .topbar .search-form { flex: 1; }
  .skin-switch { display: none; }
  .moment { padding: 18px 16px 14px; }
  .m-body, .m-foot { padding-left: 0; }
  .m-title { margin-top: 10px; }
  .plist { padding: 0 16px; }
  .plist.grid, .a-nav, .side-links { grid-template-columns: 1fr; }
  .pcard { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .article, .page-body { padding: 20px 16px 6px; }
  .a-title { font-size: 21px; }
  .comments-area { margin: 24px 16px 32px; padding: 18px 16px; }
  .foot { padding: 18px 16px; }
  .fab { right: 14px; bottom: 18px; }
}

@media (max-width: 600px) {
  .hero { height: 150px; }
  .m-media.grid.g3 { grid-template-columns: repeat(2, 1fr); }
  .search-row { grid-template-columns: 74px minmax(0, 1fr); padding: 12px 16px; }
  .a-meta { gap: 8px; font-size: 11px; }
  .a-acts { flex-wrap: wrap; }
  .toc-body a { font-size: 12px; }
}

/* ---------- 17. motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- 18. editor/utility ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.wp-caption-text { font-size: 12px; color: var(--text-3); text-align: center; }
.sticky-flag { display: none; }

/* ---------- 19. small pieces ---------- */
.pthumb-empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  color: var(--text-3);
  background:
    radial-gradient(120% 120% at 0% 0%, var(--accent-soft), transparent 62%),
    linear-gradient(135deg, var(--surface-3), var(--surface-2));
}
.pthumb-empty .ico { font-size: 19px; opacity: .5; }
.search-row .pthumb-empty { aspect-ratio: 4 / 3; }

.f-menu { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.f-menu li { margin: 0; }
.f-menu a { font-size: 11.5px; color: var(--text-3); }
.f-menu a:hover { color: var(--accent); }

.pico-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 300;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(24, 34, 29, .92);
  color: #fff;
  font-size: 12.5px;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(8px);
}
.pico-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.pico-lightbox {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(10, 16, 13, .9);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  cursor: zoom-out;
}
.pico-lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.pico-lightbox.is-open { opacity: 1; pointer-events: auto; }

.js-like.is-busy { opacity: .65; pointer-events: none; }
.loadmore.is-done { opacity: .55; cursor: default; }

