:root {
  --bg: #faf8f4; --fg: #1f2328; --muted: #6a6f76; --line: #e3ded4;
  --accent: #1f5f8b; --card: #ffffff; --hover: #f1ede5;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171a; --fg: #e6e6e6; --muted: #9aa0a6; --line: #2a2f35;
          --accent: #6fb3e0; --card: #1b1f23; --hover: #22272c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif; line-height: 1.8; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 48px 16px 64px; }
header h1 { font-size: 2rem; margin: 0 0 4px; letter-spacing: .02em; }
header .en { color: var(--muted); font-size: .95rem; letter-spacing: .08em; }
header p { margin-top: 20px; }
.back { display: inline-block; margin-bottom: 24px; text-decoration: none; font-size: .95rem; }
.back:hover { text-decoration: underline; }

/* 首頁分類 */
.cats { display: grid; gap: 16px; margin-top: 40px; }
.cat { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
       padding: 20px 24px; text-decoration: none; color: var(--fg); transition: background .15s, border-color .15s; }
a.cat:hover { background: var(--hover); border-color: var(--accent); }
.cat h2 { margin: 0 0 4px; font-size: 1.25rem; }
a.cat h2::after { content: " →"; color: var(--accent); }
.cat p { margin: 0; color: var(--muted); font-size: .92rem; }
.cat.soon { opacity: .65; }

/* 列表頁 */
details.month { border-bottom: 1px solid var(--line); }
details.month summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 1.05rem; list-style: none; }
details.month summary::-webkit-details-marker { display: none; }
details.month summary::before { content: "▸ "; color: var(--muted); }
details.month[open] summary::before { content: "▾ "; }
details.month summary .n { color: var(--muted); font-weight: 400; font-size: .9rem; }
ul.posts { list-style: none; margin: 0 0 16px; padding: 0; }
ul.posts li { display: flex; gap: 16px; padding: 6px 8px; border-radius: 6px; }
ul.posts li:hover { background: var(--hover); }
ul.posts .d { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 9.5em; }
ul.posts .t { min-width: 0; }
ul.posts .tag { display: inline-block; margin-left: .5em; padding: 0 .55em; font-size: .75rem; line-height: 1.6;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; vertical-align: .1em; cursor: help; }
ul.posts a { text-decoration: none; }
ul.posts a:hover { text-decoration: underline; }
.empty { color: var(--muted); font-style: italic; }

footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
@media (max-width: 520px) { ul.posts li { flex-direction: column; gap: 0; } }
