/* Public blog pages built by api/posts/build.php (list, post). Theme from the blog settings: html[data-theme]. */
html {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #66727f;
  --line: #e4e7eb;
  --paper: #fbfaf8;
  --card: #fff;
  --accent: #0f766e;
  --on-accent: #fff;
  --chip: #f1efeb;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

html[data-theme="navy"] {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.7);
  --line: rgba(255, 255, 255, 0.14);
  --paper: #0b1f3a;
  --card: #143056;
  --accent: #7eb6e6;
  --on-accent: #0b1f3a;
  --chip: #1b446f;
}

html[data-theme="black"] {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.12);
  --paper: #0a0a0a;
  --card: #171717;
  --accent: #e5e5e5;
  --on-accent: #111;
  --chip: #262626;
}

html[data-theme="wine"] {
  color-scheme: dark;
  --ink: #fff7f8;
  --muted: #f3d5dc;
  --line: rgba(255, 247, 248, 0.14);
  --paper: #3f1020;
  --card: #5c1830;
  --accent: #f3c1ce;
  --on-accent: #3f1020;
  --chip: #73243c;
}

html[data-theme="green"] {
  color-scheme: dark;
  --ink: #f3fff9;
  --muted: #c9e6da;
  --line: rgba(243, 255, 249, 0.16);
  --paper: #0e2f26;
  --card: #164538;
  --accent: #b7f0d4;
  --on-accent: #0e2f26;
  --chip: #1e5a48;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); line-height: 1.75; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.bl-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 760px; width: 100%; margin: 0 auto; padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.bl-brand { color: var(--ink); font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.bl-top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-top nav a {
  padding: 4px 12px; border-radius: 999px; background: var(--chip); color: var(--ink); text-decoration: none; font-size: 0.9rem;
}

.bl-main { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 28px 20px 48px; }
.bl-list h1 { margin: 0 0 8px; font-size: 1.9rem; line-height: 1.3; letter-spacing: -0.02em; }
.bl-intro { margin: 0 0 20px; color: var(--muted); }
.bl-empty { color: var(--muted); padding: 40px 0; text-align: center; }

.bl-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.bl-cats a {
  padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.92rem;
}
.bl-cats a.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.bl-cards { display: grid; gap: 14px; }
.bl-card {
  display: grid; grid-template-columns: 1fr; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bl-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.bl-card[hidden] { display: none; }
.bl-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.bl-card-text { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.bl-card-text strong { font-size: 1.12rem; line-height: 1.4; }
.bl-card-text span { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.bl-card-text small { color: var(--muted); font-size: 0.82rem; }
@media (min-width: 640px) {
  .bl-card:has(img) { grid-template-columns: 220px 1fr; }
  .bl-card img { height: 100%; aspect-ratio: auto; min-height: 150px; }
}

.bl-post h1 { margin: 6px 0 22px; font-size: 2rem; line-height: 1.3; letter-spacing: -0.02em; word-break: keep-all; }
.bl-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.bl-meta a { text-decoration: none; font-weight: 700; }
.bl-post p { margin: 0 0 1.2em; font-size: 1.07rem; word-break: keep-all; overflow-wrap: anywhere; }
.bl-post h2 { margin: 1.8em 0 0.6em; font-size: 1.4rem; line-height: 1.4; }
.bl-post blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); color: var(--muted); font-size: 1.07rem;
}
.bl-post figure { margin: 1.6em 0; }
.bl-post figure img { display: block; width: 100%; border-radius: 12px; }
.bl-post figcaption { margin-top: 8px; color: var(--muted); font-size: 0.88rem; text-align: center; }
.bl-video { position: relative; margin: 1.6em 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.bl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.bl-share { margin: 32px 0 24px; text-align: center; }
.bl-share button {
  padding: 10px 26px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 700; cursor: pointer;
}
.bl-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; border-top: 1px solid var(--line); padding-top: 18px; }
.bl-pager a { color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.45; }
.bl-pager small { display: block; color: var(--muted); font-size: 0.8rem; }
.bl-pager .bl-older { text-align: right; }
.bl-pager .bl-all { align-self: center; padding: 6px 14px; border-radius: 999px; background: var(--chip); white-space: nowrap; }

.bl-foot { border-top: 1px solid var(--line); padding: 20px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.bl-foot p { margin: 0; }
.bl-foot a { color: var(--muted); }
.bl-made { margin-top: 6px !important; font-size: 0.75rem; opacity: 0.7; }

@media (max-width: 520px) {
  .bl-post h1, .bl-list h1 { font-size: 1.6rem; }
  .bl-pager { grid-template-columns: 1fr 1fr; }
  .bl-pager .bl-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
