:root, :root[data-theme="dark"] {
  --bg: #1b1b11; --bg2: #24241a; --card: #2c2a1c; --ink: #f4efe2; --muted: #b9b29c; --line: rgba(243, 201, 121, 0.22);
  --gold: #f3c979; --gold-hi: #fde9b8; --link: #f3c979;
}
:root[data-theme="light"] {
  --bg: #faf6ec; --bg2: #f3ecdc; --card: #fffdf7; --ink: #26231a; --muted: #6d6654; --line: rgba(120, 90, 30, 0.25);
  --gold: #9a6b12; --gold-hi: #7d560c; --link: #8a5c0a;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: linear-gradient(170deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%); background-attachment: fixed;
  font: 18px/1.7 Georgia, "Iowan Old Style", "Noto Serif", serif; min-height: 100vh; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.top { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 650; }
.brand img { border-radius: 9px; }
.brand b { color: var(--gold); letter-spacing: 0.22em; font-size: 0.72rem; text-transform: uppercase; }
.top nav { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.tool { font: inherit; cursor: pointer; background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }

.home, .post { max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; }
.hero { text-align: center; margin-bottom: 30px; }
.logo { width: min(100%, 420px); height: auto; border-radius: 20px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--line); }
.tag { margin: 16px 0 0; font-style: italic; color: var(--gold-hi); font-size: 1.15rem; }
.sub { margin: 4px 0 0; color: var(--muted); font: 0.95rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.list { display: grid; gap: 14px; }
.card { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; transition: transform 0.16s ease, border-color 0.16s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--gold); }
.card time, .card span, .meta { font: 0.82rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--muted); letter-spacing: 0.02em; }
.card h2 { margin: 6px 0 8px; font-size: 1.45rem; line-height: 1.25; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.card span { color: var(--gold); font-weight: 600; }

.post h1 { font-size: clamp(1.9rem, 5.5vw, 2.7rem); line-height: 1.18; margin: 8px 0 22px; }
.post .cover { width: 100%; height: auto; border-radius: 16px; margin: 0 0 24px; }
article { overflow-wrap: break-word; }
article p { margin: 0 0 1.15em; }
article h2 { font-size: 1.5rem; line-height: 1.3; margin: 1.7em 0 0.5em; }
article h3 { font-size: 1.25rem; margin: 1.5em 0 0.4em; }
article h4 { font-size: 1.05rem; margin: 1.4em 0 0.4em; color: var(--gold-hi); }
article img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 1.2em auto; }
article figure { margin: 1.4em 0; }
article figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; }
article hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
article blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); color: var(--muted); font-style: italic; }
.embed a { display: inline-block; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; text-decoration: none; }
.next { display: flex; justify-content: space-between; gap: 14px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.95rem; }
.next a { text-decoration: none; max-width: 48%; }
.next a.right { margin-left: auto; text-align: right; }
.next small { display: block; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.7rem; }
.foot { text-align: center; color: var(--muted); font: 0.85rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 20px 16px 50px; }
.foot span { color: var(--gold); letter-spacing: 0.42em; font-weight: 700; font-size: 0.72rem; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
