/* ==========================================================================
   Gali — 样式
   颜色全部来自 theme.js 写入的 CSS 变量；想改什么，去「工作室 → 设置 → 自定义 CSS」覆盖即可
   ========================================================================== */

:root {
  --bg: #fbfbfa; --bg-2: #f1f1ef; --fg: #141414; --fg-2: #555553; --fg-3: #9a9a97; --line: #e3e3e0;
  --accent: var(--fg);
  --fs: 17px;
  --serif: "Newsreader", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;
  --body-font: var(--serif);
  --measure: 40rem;
  --spine: 228px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --soft: color-mix(in srgb, var(--fg) 9%, transparent);
  --danger: #b42318;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--fg-3); }
.small { font-size: 12.5px; }
code, kbd, pre { font-family: var(--mono); }
[hidden] { display: none !important; }

#progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 95;
  background: var(--fg); transform-origin: 0 50%; transform: scaleX(0);
  opacity: 0; transition: opacity .3s;
}
#progress.on { opacity: 1; }

.boot { height: 100vh; display: grid; place-items: center; }
.boot-mark { font-size: 40px; color: var(--fg-3); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .2; } }

/* ---------- 按钮与表单 ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 34px; padding: 0 14px; border-radius: 2px;
  border: 1px solid var(--fg); background: transparent; color: var(--fg);
  font-size: 13px; letter-spacing: .02em; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn.solid:hover { opacity: .82; background: var(--fg); color: var(--bg); }
.btn.ghost { border-color: var(--line); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; color: var(--fg); }
.btn.danger { border-color: var(--line); color: var(--danger); }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.tiny { height: 28px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .5; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--fg-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--fg); }
.i { display: block; flex: none; }
.linkish { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: var(--accent); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.seg > a, .seg > button {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent;
  padding: 5px 12px; font-size: 12.5px; color: var(--fg-2); letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.seg > * + * { border-left: 1px solid var(--line) !important; }
.seg > .on { background: var(--fg); color: var(--bg); }
.seg > :not(.on):hover { color: var(--fg); background: var(--bg-2); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: 12px; color: var(--fg-2); letter-spacing: .04em; }
.field > span i { font-style: normal; }
.field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.field textarea, .field select, .chips, .affix {
  width: 100%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--bg-2));
  border-radius: 2px; padding: 8px 10px; font-size: 14px; outline: none; transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus, .chips:focus-within, .affix:focus-within { border-color: var(--fg-2); }
.field textarea { resize: vertical; line-height: 1.6; }
.field.narrow { max-width: 160px; }
.mono, textarea.mono { font-family: var(--mono) !important; font-size: 12.5px !important; }
.affix { display: flex; align-items: center; padding: 0 !important; }
.affix i { font-style: normal; padding: 0 2px 0 10px; color: var(--fg-3); font-family: var(--mono); font-size: 12px; }
.affix input { border: 0 !important; background: transparent !important; padding-left: 2px !important; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); cursor: pointer; margin: 6px 0; user-select: none; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
input[type=range] { accent-color: var(--accent); }

.badge { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; padding: 1px 7px; border: 1px solid currentColor; border-radius: 20px; color: var(--fg-3); }
.badge.s-published { color: var(--fg); }
.badge.s-hidden { color: var(--fg-2); border-style: dashed; }

.tag { font-family: var(--mono); font-size: 12px; color: var(--fg-3); transition: color .15s; }
.tag:hover, .tag.on { color: var(--accent); }
.tag sup { font-size: 9px; margin-left: 1px; opacity: .7; }

/* ---------- 外壳 ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}

.spine {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 52px 28px 28px 36px;
  border-right: 1px solid var(--line);
}
.spine-top { display: flex; align-items: flex-start; justify-content: space-between; }
.brand { display: inline-block; position: relative; }
.brand-title {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 4.2vw, 58px); line-height: 1; letter-spacing: -.01em;
  transition: color .2s;
}
.vertical-title .brand-title {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: clamp(54px, 5.6vw, 80px); letter-spacing: .04em;
  max-height: 44vh; overflow: hidden;
}
.brand:hover .brand-title { color: var(--fg-2); }
.nav-toggle { display: none; }

.spine-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 32px; }
.tagline { margin: 0 0 28px; font-family: var(--serif); font-style: italic; color: var(--fg-2); font-size: 14.5px; line-height: 1.55; max-width: 13em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative; padding: 5px 0; font-family: var(--serif); font-size: 17px; color: var(--fg-2);
  transition: color .2s, padding .3s var(--ease);
}
.nav a::before {
  content: ""; position: absolute; left: -16px; top: 50%; width: 8px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0; transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); }
.nav a.active::before, .nav a:hover::before { transform: scaleX(1); }

.now {
  margin-top: 28px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--fg-2); line-height: 1.5;
}
.now-emoji { color: var(--fg-3); font-size: 14px; flex: none; }

.spine-tools { margin-top: auto; display: flex; align-items: center; gap: 2px; margin-left: -8px; padding-top: 20px; }
.admin-tools { display: contents; }

.main { min-width: 0; padding: 64px clamp(20px, 6vw, 96px) 40px; display: flex; flex-direction: column; }
.view { flex: 1; max-width: calc(var(--measure) + 120px); width: 100%; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.view.leaving { opacity: .35; }

.colophon {
  margin-top: 96px; padding-top: 22px; border-top: 1px solid var(--line);
  max-width: calc(var(--measure) + 120px);
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--fg-3);
}
.colophon-text { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--fg-2); }
.colophon-text p { margin: 0; }
.colophon-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; font-family: var(--mono); }
.colophon-meta a:hover { color: var(--accent); }
.quill { font-family: var(--serif); font-size: 15px; opacity: .45; transition: opacity .2s, transform .3s var(--ease); display: inline-block; }
.quill:hover { opacity: 1; transform: rotate(-12deg); }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 20;
  border: 1px solid var(--line); background: var(--bg);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- 首页 ---------- */

.hero { margin: 8px 0 72px; }
.manifesto {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(25px, 3.1vw, 38px); line-height: 1.5; letter-spacing: -.005em;
  text-wrap: balance;
}
.manifesto p { margin: 0 0 .35em; }
.manifesto em { color: var(--fg-2); }
.manifesto a { border-bottom: 1px solid var(--fg-3); }
.manifesto strong { font-weight: 600; }
.hero-sig { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.sig-line { width: 40px; height: 1px; background: var(--fg-3); }
.sig-name { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; filter: grayscale(.2); }

.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); color: var(--fg-3); padding: 3px 2px; transition: border-color .2s; }
.search:focus-within { border-color: var(--fg); color: var(--fg); }
.search input { border: 0; outline: 0; background: transparent; width: 9em; font-size: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 18px; }
.result-line { font-family: var(--mono); font-size: 12px; color: var(--fg-2); margin: 0 0 12px; }
.result-line .clear { margin-left: 10px; text-decoration: underline; text-underline-offset: 3px; }

/* 目录式 */
.index { border-top: 1px solid var(--fg); }
.year {
  margin: 44px 0 4px; line-height: 1;
  font-family: var(--serif); font-style: italic; font-size: 76px; letter-spacing: -.03em;
  color: transparent; -webkit-text-stroke: 1px var(--fg-3); opacity: .6; user-select: none;
}
.index > .year:first-child { margin-top: 18px; }
.row {
  display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; align-items: baseline; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  transition: padding .35s var(--ease);
}
.row-no { font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); transition: color .2s; }
.row.pinned .row-no { color: var(--fg); }
.row-main { min-width: 0; }
.row-title { font-family: var(--serif); font-size: 21px; line-height: 1.35; transition: color .2s; }
.row-mood { font-family: var(--sans); font-size: 13px; margin-left: 10px; color: var(--fg-3); }
.row-excerpt {
  display: block; max-height: 0; overflow: hidden; opacity: 0;
  font-size: 13.5px; color: var(--fg-2); line-height: 1.6;
  transition: max-height .4s var(--ease), opacity .3s, margin .3s;
}
.row-date { font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); }
.row:hover { padding-left: 6px; }
.row:hover .row-no { color: var(--fg); }
.row:hover .row-excerpt { max-height: 5em; opacity: 1; margin-top: 6px; }
@media (hover: none) { .row-excerpt { max-height: 3.2em; opacity: 1; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }

/* 碎片 */
.note {
  position: relative; padding: 22px 0 22px 26px; border-bottom: 1px solid var(--line);
}
.note::before {
  content: ""; position: absolute; left: 5px; top: 31px; width: 6px; height: 6px; border-radius: 50%;
  border: 1px solid var(--fg-3);
}
.note::after { content: ""; position: absolute; left: 7.5px; top: 42px; bottom: 22px; width: 1px; background: var(--line); }
.note-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); margin-bottom: 8px; }
.note-meta > a:first-child:hover { color: var(--accent); }
.note-title { font-family: var(--serif); font-weight: 500; font-size: 18px; margin: 0 0 6px; }
.note-body { font-size: calc(var(--fs) - .5px); }
.note-body > :first-child { margin-top: 0; }
.note-body > :last-child { margin-bottom: 0; }
.note-body figure, .note-body .gallery { margin: 14px 0; }

/* 卡片式 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 28px; padding-top: 12px; }
.card { display: flex; flex-direction: column; gap: 8px; }
.card-face {
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); display: grid; place-items: center;
  border-radius: 2px;
}
.card-face img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; filter: saturate(.9); }
.card-face.bare { background: var(--bg-2); }
.card-glyph { font-family: var(--serif); font-size: 88px; line-height: 1; color: var(--fg-3); transition: transform .8s var(--ease); }
.card-note .card-face.bare { background: transparent; border: 1px dashed var(--line); }
.card-note .card-glyph { font-style: italic; color: var(--fg-3); }
.card-meta { font-family: var(--mono); font-size: 11px; color: var(--fg-3); letter-spacing: .04em; margin-top: 6px; }
.card-title { font-family: var(--serif); font-size: 19px; line-height: 1.35; transition: color .2s; }
.card-excerpt { font-size: 13px; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover img, .card:hover .card-glyph { transform: scale(1.04); filter: none; }
.card:hover .card-title { color: var(--accent); }

/* 长流 */
.stream { border-top: 1px solid var(--fg); }
.stream-item { padding: 40px 0; border-bottom: 1px solid var(--line); }
.stream-item h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.25; margin: 10px 0 16px; text-wrap: balance; }
.stream-item h2 a:hover { color: var(--accent); }
.stream-cover { display: block; margin-bottom: 18px; }
.stream-cover img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 2px; }
.stream-excerpt { font-family: var(--body-font); font-size: var(--fs); color: var(--fg-2); line-height: 1.8; margin: 0 0 14px; }
.more { font-family: var(--mono); font-size: 12px; color: var(--fg-2); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; font-family: var(--mono); font-size: 12.5px; }
.pager a { padding: 6px 0; border-bottom: 1px solid transparent; }
.pager a:hover { color: var(--accent); border-color: var(--accent); }
.pager-n { color: var(--fg-3); }

.empty { padding: 80px 0; text-align: center; color: var(--fg-2); }
.empty-mark { font-family: var(--serif); font-style: italic; font-size: 64px; color: var(--fg-3); margin: 0 0 6px; line-height: 1; }
.empty .btn { margin-top: 18px; }
.lost .empty-mark { font-size: 120px; color: transparent; -webkit-text-stroke: 1px var(--fg-3); }

/* ---------- 正文 ---------- */

.kicker {
  display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center;
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); letter-spacing: .05em;
}
.kicker > * + *::before { content: "/"; margin: 0 10px; color: var(--line); }
.kicker > :first-child { color: var(--fg-2); }

.post { position: relative; max-width: var(--measure); }
.post-head { margin-bottom: 36px; }
.post-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4.6vw, 54px); line-height: 1.16; letter-spacing: -.015em;
  margin: 18px 0 0; text-wrap: balance;
}
.post-cover { margin: 0 0 40px; }
.post-cover img { width: 100%; display: block; border-radius: 2px; max-height: 70vh; object-fit: cover; }
.post-note .prose { font-size: calc(var(--fs) + 2px); }
.post-note .post-head { margin-bottom: 20px; }
.post-page .post-head { margin-bottom: 20px; }

.layout-wide { max-width: calc(var(--measure) + 200px); }
.layout-verse { text-align: center; margin: 0 auto; }
.layout-verse .kicker { justify-content: center; }
.prose.verse { font-size: calc(var(--fs) + 2px); line-height: 2.25; }
.prose.verse p { margin: 0 0 2em; }
.prose.verse blockquote { border: 0; padding: 0; }

.prose {
  font-family: var(--body-font); font-size: var(--fs); line-height: 1.88; color: var(--fg);
  overflow-wrap: break-word; hanging-punctuation: first;
}
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 600; line-height: 1.35; position: relative; text-wrap: balance; }
.prose h1 { font-size: 1.75em; margin: 2em 0 .7em; }
.prose h2 { font-size: 1.42em; margin: 2em 0 .7em; }
.prose h3 { font-size: 1.18em; margin: 1.8em 0 .6em; }
.prose h4 { font-size: 1em; margin: 1.6em 0 .5em; letter-spacing: .04em; }
.prose .anchor {
  position: absolute; left: -1.1em; top: 0; width: 1em; color: var(--accent); opacity: 0;
  font-weight: 400; font-size: .8em; line-height: 1.7; transition: opacity .2s;
}
.prose h1:hover .anchor, .prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: .8; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .15s; }
.prose a:hover { text-decoration-color: var(--fg); }
.prose strong { font-weight: 650; }
.prose em { font-style: italic; }
.prose mark { background: linear-gradient(transparent 52%, var(--soft) 52%); color: inherit; padding: 0 .1em; }
.prose del { color: var(--fg-3); }
.prose u { text-decoration-color: var(--fg-3); text-underline-offset: .25em; }
.prose small { font-size: .82em; color: var(--fg-2); }
.prose blockquote {
  margin: 1.6em 0; padding: .1em 0 .1em 1.3em; border-left: 1px solid var(--fg);
  color: var(--fg-2); font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--fg-3); font-family: var(--mono); font-size: .85em; }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin: .2em 0; }
.prose li:has(> input[type=checkbox]) { list-style: none; margin-left: -1.3em; }
.prose input[type=checkbox] { accent-color: var(--accent); margin: 0 .5em 0 0; vertical-align: -.1em; }
.prose hr { border: 0; margin: 3em 0; text-align: center; height: 1em; }
.prose hr::after { content: "·  ·  ·"; color: var(--fg-3); letter-spacing: .6em; font-size: 1.1em; }
.prose img, .prose video { display: block; height: auto; margin: 0 auto; border-radius: 2px; }
.prose p > img { display: inline-block; vertical-align: middle; }
.prose audio { width: 100%; margin: .5em 0; }
.prose figure { margin: 2.2em 0; }
.prose figcaption { margin-top: .8em; text-align: center; font-size: .82em; color: var(--fg-3); font-family: var(--serif); font-style: italic; }
.prose .zoomable { cursor: zoom-in; }
.prose .gallery { display: grid; gap: 6px; margin: 2em 0; grid-template-columns: repeat(2, 1fr); }
.prose .gallery[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.prose .gallery > * { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; margin: 0; }
.prose .gallery > br { display: none; }

.prose :not(pre) > code {
  font-size: .84em; padding: .12em .38em; border-radius: 3px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--fg);
}
.prose .code { margin: 1.6em 0; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--fg-3); letter-spacing: .04em; }
.code-copy { border: 0; background: none; font-size: 11px; color: var(--fg-3); padding: 2px 8px; border-radius: 2px; }
.code-copy:hover { color: var(--fg); background: var(--bg-2); }
.prose pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.65; tab-size: 2; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.prose .table-wrap { overflow-x: auto; margin: 1.6em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9em; line-height: 1.6; }
.prose th { text-align: left; font-family: var(--mono); font-weight: 600; font-size: .78em; letter-spacing: .05em; color: var(--fg-2); border-bottom: 1px solid var(--fg); padding: 8px 12px 8px 0; }
.prose td { border-bottom: 1px solid var(--line); padding: 8px 12px 8px 0; vertical-align: top; }

.prose ruby rt { font-size: .5em; color: var(--fg-3); font-family: var(--sans); letter-spacing: .05em; }
.prose .spoiler { background: var(--fg); color: transparent; border-radius: 2px; padding: 0 .15em; cursor: pointer; transition: color .25s, background .25s; }
.prose .spoiler a { color: transparent; }
.prose .spoiler:hover, .prose .spoiler.open { background: var(--bg-2); color: var(--fg); }
.prose .spoiler.open a, .prose .spoiler:hover a { color: inherit; }

.callout { margin: 1.6em 0; padding: .9em 1.1em; border-left: 1px solid var(--fg); background: var(--bg-2); font-size: .95em; }
.callout-title { font-family: var(--mono); font-size: .72em; letter-spacing: .12em; color: var(--fg-3); margin-bottom: .35em; }
.callout > :last-child { margin-bottom: 0; }
.callout-quote { font-style: italic; }
.md-details { margin: 1.4em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.md-details summary { cursor: pointer; padding: .7em 0; list-style: none; display: flex; gap: .7em; align-items: center; font-weight: 500; }
.md-details summary::-webkit-details-marker { display: none; }
.md-details summary::before { content: "+"; font-family: var(--mono); color: var(--fg-3); width: 1em; transition: transform .25s var(--ease); }
.md-details[open] summary::before { transform: rotate(45deg); }
.md-details > div { padding: 0 0 .6em 1.7em; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.align-center img, .align-right img { display: inline-block; }
.bleed { margin-left: -8%; margin-right: -8%; }
.marginal { font-size: .85em; color: var(--fg-2); border-top: 1px solid var(--line); padding-top: .5em; margin: 1em 0; }
@media (min-width: 1300px) {
  .marginal { float: right; clear: right; width: 220px; margin: .3em -260px 1em 0; }
}
.embed { position: relative; aspect-ratio: 16 / 9; margin: 1.8em 0; background: var(--bg-2); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.attach {
  display: inline-flex !important; align-items: center; gap: 12px; text-decoration: none !important;
  border: 1px solid var(--line); border-radius: 3px; padding: 8px 14px 8px 8px; margin: .2em 0; max-width: 100%;
  font-family: var(--sans); font-size: .86em; transition: border-color .2s;
}
.attach:hover { border-color: var(--fg); }
.attach-ext { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .05em; background: var(--fg); color: var(--bg); padding: 6px 7px; border-radius: 2px; min-width: 38px; text-align: center; }
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-dl { color: var(--fg-3); }

.fnref a { text-decoration: none !important; font-family: var(--mono); font-size: .72em; color: var(--fg-2) !important; padding: 0 .1em; }
.footnotes { margin-top: 3.5em; padding-top: 1em; border-top: 1px solid var(--line); font-size: .84em; color: var(--fg-2); }
.footnotes ol { padding-left: 1.3em; }
.fnback { text-decoration: none !important; color: var(--fg-3) !important; }

.post-foot { margin-top: 56px; display: flex; flex-direction: column; gap: 14px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.post-tools { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); }
.post-tools a:hover, .post-tools button:hover { color: var(--accent); }
.post-tools .linkish { font-size: inherit; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; border-top: 1px solid var(--fg); padding-top: 18px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; }
.post-nav small { font-family: var(--mono); font-size: 11px; color: var(--fg-3); letter-spacing: .06em; }
.post-nav span { font-family: var(--serif); font-size: 17px; line-height: 1.4; transition: color .2s; }
.post-nav a:hover span { color: var(--accent); }
.pn-prev { text-align: right; align-items: flex-end; }

.toc { position: fixed; top: 140px; right: max(24px, calc((100vw - 1280px) / 2 + 24px)); width: 190px; font-size: 12.5px; display: none; max-height: calc(100vh - 200px); overflow: auto; }
.toc-title { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--fg-3); margin-bottom: 10px; }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--fg-3); border-left: 1px solid var(--line); line-height: 1.45; transition: color .2s, border-color .2s; }
.toc a.toc-h3 { padding-left: 24px; }
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--fg); border-left-color: var(--accent); }
@media (min-width: 1380px) { .toc { display: block; } }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 4vh 4vw;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .22s; cursor: zoom-out;
}
.lightbox.show { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .35); transform: scale(.97); transition: transform .3s var(--ease); }
.lightbox.show img { transform: none; }
.lightbox-cap { position: absolute; bottom: 3vh; font-family: var(--serif); font-style: italic; color: var(--fg-2); }

/* 代码高亮：只用明暗与字重 */
.hljs-comment, .hljs-quote, .hljs-meta { color: var(--fg-3); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type, .hljs-built_in, .hljs-title, .hljs-section, .hljs-name { color: var(--fg); font-weight: 600; }
.hljs-string, .hljs-regexp, .hljs-number, .hljs-symbol, .hljs-attr, .hljs-attribute, .hljs-variable, .hljs-params, .hljs-property { color: var(--fg-2); }
.hljs-deletion { text-decoration: line-through; color: var(--fg-3); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ---------- 归档 / 关于 ---------- */

.page-head { margin-bottom: 40px; }
.page-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.02em; margin: 0 0 18px; }
.stats { font-family: var(--mono); font-size: 12px; color: var(--fg-3); display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: baseline; margin: 0; }
.stats span { white-space: nowrap; }
.stats b { font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--fg); margin-right: 4px; }
.arch-year { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; border-top: 1px solid var(--line); padding: 22px 0; }
.arch-y { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 34px; margin: 0; line-height: 1.1; position: sticky; top: 24px; align-self: start; }
.arch-y sup { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--fg-3); margin-left: 4px; }
.arch-y.small { font-size: 22px; margin-bottom: 14px; position: static; }
.arch-list { list-style: none; margin: 0; padding: 0; }
.arch-item { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 6px 0; }
.arch-item time { font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); }
.arch-item a { font-family: var(--serif); font-size: 17px; transition: color .15s; }
.arch-item a:hover { color: var(--accent); }
.arch-note a i { color: var(--fg-2); font-size: 15px; }
.arch-mood { font-size: 12px; color: var(--fg-3); }
.cloud { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.cloud .arch-y { width: 100%; }

.about-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 28px; }
.about-links { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--mono); font-size: 13px; }
.about-links a:hover { color: var(--accent); }

.setup { max-width: 640px; margin: 12vh auto; padding: 0 24px; }
.setup h1 { font-family: var(--serif); font-weight: 400; font-size: 48px; margin: 0 0 8px; }
.setup ol { line-height: 1.9; padding-left: 1.2em; }
.setup code { background: var(--bg-2); padding: 1px 6px; border-radius: 3px; }

/* ---------- 弹窗 / 提示 / 口令锁 ---------- */

.modal-wrap {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s;
}
.modal-wrap.show { opacity: 1; }
.modal {
  width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 26px;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .35);
  transform: translateY(8px) scale(.99); transition: transform .3s var(--ease);
}
.modal.wide { max-width: 980px; }
.modal-wrap.show .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin: -6px 0 16px; }
.modal-head h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.confirm-text { font-family: var(--serif); font-size: 18px; line-height: 1.6; margin: 0; }

.lock { text-align: center; }
.lock-seal { width: 48px; height: 48px; margin: 4px auto 14px; color: var(--fg); }
.lock-seal svg { width: 100%; height: 100%; }
.lock h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 6px; }
.lock p.muted { font-size: 13px; margin: 0 0 22px; }
.lock input[name=pw] {
  width: 100%; border: 0; border-bottom: 1px solid var(--fg); background: transparent; outline: none;
  font-size: 22px; letter-spacing: .3em; text-align: center; padding: 8px 0; font-family: var(--mono);
  -webkit-text-security: disc;
}
.lock .check { justify-content: center; margin-top: 16px; }
.lock-err { color: var(--danger); font-size: 13px; min-height: 1.3em; margin: 8px 0 0; }
.lock .modal-actions { justify-content: center; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ed-locked { min-height: 100vh; }

#toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--fg); color: var(--bg); font-size: 13px; padding: 9px 16px; border-radius: 2px;
  opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .3s var(--ease); max-width: 80vw;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / .3);
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- 写作台 ---------- */

.editor {
  height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: var(--bg); position: relative; overflow: hidden;
}
.ed-top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ed-back { font-size: 20px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--fg-2); border-radius: 50%; }
.ed-back:hover { background: var(--bg-2); color: var(--fg); }
.ed-state { font-size: 12px; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ed-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ed-views button { padding: 5px 9px; }

.ed-toolbar {
  display: flex; align-items: center; gap: 1px; padding: 5px 12px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.ed-toolbar::-webkit-scrollbar { display: none; }
.tb {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 3px; color: var(--fg-2);
  transition: background .12s, color .12s;
}
.tb:hover { background: var(--bg-2); color: var(--fg); }
.tb-h { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.tb-sep { flex: none; width: 1px; height: 18px; background: var(--line); margin: 0 6px; }

.ed-body { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.view-write .ed-body, .view-preview .ed-body { grid-template-columns: 1fr; }
.view-write .ed-preview, .view-preview .ed-write { display: none; }
.view-preview .ed-toolbar { visibility: hidden; }
.ed-pane { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.ed-paper { max-width: 780px; margin: 0 auto; padding: 44px 40px 40vh; }
.ed-title {
  display: block; width: 100%; border: 0; outline: 0; background: transparent; resize: none; overflow: hidden;
  font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -.01em;
  padding: 0; margin-bottom: 26px;
}
.ed-title::placeholder, .ed-text::placeholder { color: var(--fg-3); opacity: .7; }
.ed-text {
  display: block; width: 100%; min-height: 50vh; border: 0; outline: 0; background: transparent; resize: none; overflow: hidden;
  font-family: var(--body-font); font-size: calc(var(--fs) - .5px); line-height: 1.9; padding: 0; tab-size: 2;
  caret-color: var(--accent);
}
.ed-preview { border-left: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 35%, var(--bg)); }
.ed-preview .post { margin: 0 auto; padding: 44px 40px 30vh; }
.view-preview .ed-preview { border: 0; background: var(--bg); }
.ed-preview .post.layout-verse { text-align: center; }

.ed-foot { display: flex; align-items: center; gap: 20px; padding: 5px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--fg-3); min-height: 28px; }
.ed-uploads { margin-left: auto; display: flex; gap: 8px; overflow: hidden; }
.up-chip { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; padding: 1px 10px; overflow: hidden; max-width: 220px; }
.up-chip i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--soft); transition: width .2s; }
.up-chip b { position: relative; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-chip.ok { border-color: var(--fg-2); color: var(--fg); }
.up-chip.bad { border-color: var(--danger); color: var(--danger); }

.ed-restore {
  position: absolute; z-index: 5; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; font-size: 13px;
  background: var(--bg); border: 1px solid var(--fg); border-radius: 3px; box-shadow: 0 10px 30px -15px rgb(0 0 0 / .3); max-width: calc(100% - 24px);
}

.ed-props {
  position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 100%; z-index: 6;
  background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto;
  transform: translateX(100%); transition: transform .35s var(--ease), box-shadow .35s;
}
.props-open .ed-props { transform: none; box-shadow: -30px 0 60px -40px rgb(0 0 0 / .4); }
.ed-props-inner { padding: 18px 22px 40px; }
.props-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.props-head h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px !important; }
.chip { display: inline-flex; gap: 4px; align-items: center; font-family: var(--mono); font-size: 12px; background: var(--bg-2); padding: 2px 8px; border-radius: 20px; cursor: pointer; }
.chip i { font-style: normal; color: var(--fg-3); }
.chip:hover i { color: var(--danger); }
.chip-input { flex: 1; min-width: 80px; border: 0 !important; padding: 2px !important; background: transparent !important; }
.cover-box { border: 1px dashed var(--line); border-radius: 3px; padding: 8px; }
.cover-box img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 2px; margin-bottom: 8px; display: block; }
.cover-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mood-picks { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.mood-picks button { width: 30px; height: 30px; border: 0; background: none; border-radius: 3px; font-size: 15px; color: var(--fg-2); }
.mood-picks button:hover { background: var(--bg-2); color: var(--fg); }
.props-danger { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.props-help { margin-top: 24px; font-size: 12px; }
.props-help summary { cursor: pointer; color: var(--fg-2); }
.props-help pre { font-size: 11px; line-height: 1.7; background: var(--bg-2); padding: 10px 12px; border-radius: 3px; white-space: pre-wrap; color: var(--fg-2); }

.ed-drop { position: absolute; inset: 10px; z-index: 50; display: none; place-items: center; border: 1px dashed var(--fg-3); border-radius: 4px; background: color-mix(in srgb, var(--bg) 88%, transparent); font-family: var(--serif); font-size: 26px; color: var(--fg-2); pointer-events: none; }
.dropping .ed-drop { display: grid; }

.editor.focus .ed-top, .editor.focus .ed-toolbar, .editor.focus .ed-foot { display: none; }
.editor.focus { grid-template-rows: minmax(0, 1fr); }
.editor.focus .ed-paper { padding-top: 14vh; max-width: 720px; }
.editor.focus .ed-text { font-size: calc(var(--fs) + 1px); }

.pop {
  position: fixed; z-index: 160; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 5px;
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / .35); display: flex; flex-direction: column; min-width: 150px;
}
.pop > button, .pop-row button { border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: 2px; font-size: 13px; }
.pop > button:hover, .pop-row button:hover { background: var(--bg-2); }
.pop-h { font-family: var(--serif); }
.pop-h1 { font-size: 20px !important; } .pop-h2 { font-size: 17px !important; } .pop-h3 { font-size: 15px !important; }
.pop-row { display: flex; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.pop-grid { display: grid; grid-template-columns: repeat(8, 18px); gap: 3px; padding: 6px; }
.pop-grid button { width: 18px; height: 18px; border: 1px solid var(--line); background: none; padding: 0; border-radius: 2px; }
.pop-grid button.on { background: var(--soft); border-color: var(--fg); }
.pop-grid-label { text-align: center; font-size: 11px; font-family: var(--mono); padding-bottom: 4px; }

/* ---------- 媒体库 ---------- */

.media { position: relative; }
.media.dragging::after { content: "松手上传"; position: absolute; inset: 0; display: grid; place-items: center; border: 1px dashed var(--fg-3); background: color-mix(in srgb, var(--bg) 88%, transparent); font-family: var(--serif); font-size: 24px; color: var(--fg-2); }
.m-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.m-head .check { margin: 0; }
.m-search { border: 0; border-bottom: 1px solid var(--line); background: transparent; outline: none; padding: 4px 2px; font-size: 13px; }
.m-count { margin-left: auto; font-size: 12px; font-family: var(--mono); }
.m-upload { cursor: pointer; }
.m-progress .up-row { position: relative; height: 26px; border: 1px solid var(--line); margin-bottom: 6px; font-size: 12px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; }
.m-progress .up-row i { position: absolute; inset: 0 auto 0 0; background: var(--soft); width: 0; transition: width .2s; }
.m-progress .up-row span { position: relative; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.m-item { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.m-thumb { aspect-ratio: 1; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.m-thumb img, .m-thumb video { width: 100%; height: 100%; object-fit: cover; }
.m-ext { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--fg-3); }
.m-info { padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 2px; font-size: 11px; min-width: 0; }
.m-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-acts { display: flex; align-items: center; gap: 2px; padding: 4px 6px 8px 10px; }
.m-acts .btn { margin-right: auto; }
.m-acts .icon-btn { width: 28px; height: 28px; }
.m-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; }

/* ---------- 工作室 ---------- */

.studio { min-height: 100vh; }
.st-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.st-brand { font-family: var(--serif); font-size: 24px; display: flex; align-items: baseline; gap: 10px; }
.st-brand small { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--fg-3); }
.st-tabs { display: flex; gap: 22px; }
.st-tabs a { font-size: 14px; color: var(--fg-3); padding: 4px 0; border-bottom: 1.5px solid transparent; }
.st-tabs a:hover { color: var(--fg); }
.st-tabs a.on { color: var(--fg); border-color: var(--fg); }
.st-acts { margin-left: auto; display: flex; gap: 8px; }
.st-main { max-width: 1100px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 80px; }

.quick { border: 1px solid var(--line); border-radius: 3px; padding: 14px 16px 10px; margin-bottom: 30px; transition: border-color .2s; }
.quick:focus-within { border-color: var(--fg-2); }
.quick textarea { width: 100%; border: 0; outline: 0; background: transparent; resize: none; font-family: var(--body-font); font-size: 16px; line-height: 1.7; }
.quick-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; }

.st-filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.st-search { border: 0; border-bottom: 1px solid var(--line); background: transparent; outline: none; padding: 4px 2px; font-size: 13px; min-width: 180px; }
.st-filters .btn { margin-left: auto; }
.st-list { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.st-table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--fg-3); letter-spacing: .06em; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--fg); white-space: nowrap; }
.st-table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.st-table .num { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--fg-2); }
.t-title { white-space: normal !important; min-width: 220px; }
.t-title a { font-family: var(--serif); font-size: 16.5px; }
.t-title a:hover { color: var(--accent); }
.t-tags { display: block; font-family: var(--mono); font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.pin { color: var(--fg); margin-right: 6px; }
.t-acts { text-align: right; }
.t-acts .icon-btn { width: 28px; height: 28px; }

.settings fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 26px 0 14px; display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 32px; }
.settings fieldset > * { grid-column: 2; }
.settings legend { float: left; grid-column: 1; grid-row: 1 / span 20; font-family: var(--serif); font-size: 24px; padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 14px; }
.fs-out { font-family: var(--mono); color: var(--fg-2); }
.pairs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; align-items: flex-start; }
.pair { display: grid; grid-template-columns: 1fr 2fr auto auto; gap: 6px; width: 100%; align-items: center; }
.pair input { border: 1px solid var(--line); background: transparent; border-radius: 2px; padding: 6px 9px; font-size: 13.5px; outline: none; min-width: 0; }
.pair input:focus { border-color: var(--fg-2); }
.pair .icon-btn { width: 28px; height: 28px; }
.health { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: 12px; font-family: var(--mono); }
.health span { padding: 4px 10px; border-radius: 20px; border: 1px solid currentColor; }
.health .ok { color: var(--fg-2); }
.health .bad { color: var(--danger); }
.save-bar {
  position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.save-hint { margin-right: auto; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .spine, .colophon, .grain, #progress, .toc, .to-top, .post-nav, .post-tools { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
}
