/* Buzz News — simple site theme */
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #55534e;
  --ink-3: #8a877f;
  --line: #e6e1d8;
  --accent: #e8462c;
  --hot: #e8462c;
  --hot-bg: #fdebe7;
  --warm: #c27c0e;
  --warm-bg: #fbf1dc;
  --cool: #5b6b7d;
  --cool-bg: #eaeef2;
  --link: #1f5fbf;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 4px 16px rgba(30, 25, 15, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171a; --surface: #1f2024; --ink: #f1efea; --ink-2: #bdb9b0; --ink-3: #8b877e;
    --line: #2f3036; --hot-bg: #3a1f1a; --warm-bg: #352a14; --cool-bg: #262c33;
    --hot: #ff6b52; --warm: #e5a93a; --cool: #9fb0c3; --link: #7fb0ff;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16171a; --surface: #1f2024; --ink: #f1efea; --ink-2: #bdb9b0; --ink-3: #8b877e;
  --line: #2f3036; --hot-bg: #3a1f1a; --warm-bg: #352a14; --cool-bg: #262c33;
  --hot: #ff6b52; --warm: #e5a93a; --cool: #9fb0c3; --link: #7fb0ff;
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px; line-height: 1.75; letter-spacing: .01em;
  font-feature-settings: "palt" 1;
}
a { color: var(--link); text-underline-offset: 3px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: .04em; }
.logo-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 6px 5px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: skewX(-12deg); border-radius: 1px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.site-nav a:hover { background: var(--surface); color: var(--ink); }

main { padding: 36px 0 56px; }

/* article fragment from the scheduled task */
.buzz-news { display: block; }
.buzz-title { font-size: clamp(24px, 5vw, 32px); line-height: 1.3; margin: 0 0 4px; letter-spacing: .02em; }
.buzz-date { margin: 0; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.buzz-ai-note { margin: 6px 0 0; color: var(--ink-3); font-size: 13px; }
.buzz-news > .buzz-title { order: -2; }

/* overview (top3 + chips) is placed before the article; move it visually under the title */
.overview { display: grid; gap: 14px; margin: 20px 0 0; }
.overview-title { font-size: 13px; color: var(--ink-3); font-weight: 700; letter-spacing: .08em; margin: 0 0 8px; }
.top3 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 8px; box-shadow: var(--shadow); }
.top3 ol { list-style: none; margin: 0; padding: 0; }
.top3 li a { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.top3 li:first-child a { border-top: 0; }
.top3 li a:hover .t { text-decoration: underline; }
.top3 .rank { font-weight: 800; color: var(--ink-3); font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.top3 .t { font-weight: 700; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--ink-3); }

/* score badge */
.buzz-score {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 52px; padding: 4px 8px; border-radius: 10px; line-height: 1.05;
  background: var(--cool-bg); color: var(--cool); vertical-align: middle; flex: none;
}
.buzz-score small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.buzz-score b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.buzz-score.is-hot { background: var(--hot-bg); color: var(--hot); }
.buzz-score.is-warm { background: var(--warm-bg); color: var(--warm); }

/* categories */
.buzz-category { margin-top: 36px; }
.buzz-category > h3 { font-size: 20px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); display: flex; align-items: center; gap: 8px; }
.buzz-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 0 0 14px; box-shadow: var(--shadow);
}
.buzz-item h4 { display: flex; gap: 14px; align-items: center; margin: 0 0 12px; font-size: 18px; line-height: 1.5; }
.buzz-item ul { list-style: none; margin: 0; padding: 0; }
.buzz-item li { padding: 8px 0; border-top: 1px dashed var(--line); color: var(--ink); font-size: 15px; }
.buzz-item li:first-child { border-top: 0; padding-top: 0; }
.buzz-item li strong { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .06em; font-weight: 700; margin-bottom: 1px; }
.buzz-item li:nth-child(3) strong, .buzz-item li:nth-child(4) strong, .buzz-item li:nth-child(5) strong { color: var(--ink-2); }
.buzz-item li:last-child { font-size: 14px; }
.buzz-item li:last-child a { word-break: break-all; }
.buzz-note { color: var(--ink-3); font-size: 14px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 16px; }

.buzz-about { margin-top: 44px; padding: 18px 20px; border-radius: var(--radius); background: transparent; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.buzz-about h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.buzz-about p { margin: 6px 0; }
.buzz-footer { margin-top: 16px; color: var(--ink-3); font-size: 12.5px; line-height: 1.7; }

/* pager / archive */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 32px; font-size: 14px; }
.pager a { text-decoration: none; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.pager .newer { text-align: right; }
.pager .all { text-align: center; }
.old-banner { background: var(--warm-bg); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 20px; }
.page-title { font-size: 28px; margin: 0 0 8px; }
.day h2 { font-size: 16px; color: var(--ink-2); margin: 28px 0 8px; }
.day-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day-list a { display: grid; grid-template-columns: 64px auto 1fr; gap: 12px; align-items: center; padding: 10px 16px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.day-list li:first-child a { border-top: 0; }
.day-list a:hover { background: var(--bg); }
.day-list time { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }
.day-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 60px 0; color: var(--ink-2); }

.site-footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; padding: 20px 0 32px; }
.site-footer p { margin: 0; }

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .buzz-item { padding: 16px; }
  .buzz-item h4 { font-size: 16.5px; gap: 12px; align-items: flex-start; }
  .day-list a { grid-template-columns: 58px auto 1fr; padding: 10px 12px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .all { grid-column: 1 / -1; order: 3; }
}
