/* Blog styles: tokens, header, list, post typography, editor. */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e6e8ec;
  --text: #1f2430;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #eef2ff;
  --danger: #dc2626;
  --radius: 14px;
  --maxw: 760px;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.01em; }
button { font: inherit; cursor: pointer; }

.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 22px; color: var(--accent); }
.brand-text b { display: block; font-size: 17px; }
.brand-text small { display: block; font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.site-nav a:hover { color: var(--accent); }
.link-btn { border: 0; background: none; color: var(--accent); padding: 0; font-size: inherit; }
.link-btn.danger { color: var(--danger); }

.site-main { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 80px; }
.notice { color: var(--muted); padding: 14px 0; }
.notice.err { color: var(--danger); }
.hint { color: var(--muted); font-size: 12px; }

.filter-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 12px; color: var(--muted); }
.tag-bar { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 18px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 13px;
}
.chip small { opacity: .65; }
.chip.on { background: var(--accent-soft); border-color: #cdd8ff; color: var(--accent); }

.post-card { border-bottom: 1px solid var(--line); padding: 22px 0; }
.post-card:last-of-type { border-bottom: 0; }
.post-card h2 { margin: 0 0 6px; font-size: 20px; }
.post-link:hover h2 { color: var(--accent); }
.post-meta { margin: 0; color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-meta .tag { color: var(--accent); }
.post-summary { margin: 10px 0 0; color: #4b5563; }
.load-more { margin: 18px auto 0; display: block; }

.post-view h1 { font-size: 27px; margin: 6px 0 8px; }
.post-view .post-meta { margin-bottom: 22px; }
.post-actions { display: flex; gap: 8px; margin-top: 28px; }

.post-body { font-size: 16.5px; overflow-wrap: break-word; }
.post-body h2 { margin: 30px 0 10px; font-size: 21px; }
.post-body h3 { margin: 24px 0 8px; font-size: 18px; }
.post-body p { margin: 0 0 16px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote {
  margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--line); color: var(--muted);
}
.post-body pre {
  background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.55;
}
.post-body code { background: #eef1f5; padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.post-body pre code { background: none; padding: 0; }
.post-body img, .post-body video {
  max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 0 0 16px;
}
.post-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 10px 12px; font: inherit; color: inherit;
}
textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }

.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 9px 16px;
}
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }

.media-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.media-bar-label { font-size: 12.5px; color: var(--muted); }
.media-list { list-style: none; margin: 0 0 14px; padding: 0; }
.media-list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px;
}
.media-kind { color: var(--accent); }
.media-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-size { color: var(--muted); }

.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.preview {
  min-height: 220px; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); overflow-wrap: break-word;
}
.editor-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42); display: grid; place-items: center;
  padding: 18px; z-index: 50;
}
.modal {
  width: min(420px, 100%); background: var(--surface); border-radius: 16px; padding: 20px;
  box-shadow: 0 18px 60px rgba(10, 15, 25, .25);
}
.modal h2 { margin: 0 0 14px; font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #111827; color: #fff; border-radius: 10px; padding: 9px 14px; font-size: 13px; z-index: 80;
}
