:root {
  --bg: #f4efe6;
  --ink: #1a1814;
  --muted: #6e675e;
  --paper: #fffdf8;
  --line: rgba(26, 24, 20, .12);
  --car: #d4532b;
  --car-soft: #f8e4d8;
  --pc: #0f6f73;
  --pc-soft: #d7eeee;
  --shadow: 0 24px 60px rgba(48, 32, 16, .08);
  --radius: 22px;
  --header: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(212, 83, 43, .16), transparent 55%),
    radial-gradient(760px 380px at -10% 8%, rgba(15, 111, 115, .14), transparent 50%),
    var(--bg);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
h1 { font-size: clamp(40px, 6vw, 72px); margin: 0 0 16px; }
h2 { font-size: 28px; margin: 0; }
h3 { font-size: 22px; margin: 0 0 8px; }
p { margin: 0; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 40px)); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header);
  backdrop-filter: blur(16px);
  background: rgba(244, 239, 230, .86);
  border-bottom: 1px solid transparent;
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo {
  font-family: Fraunces, "Iowan Old Style", "Yu Mincho", serif;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 560;
  letter-spacing: -.04em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
}
.site-nav a.is-active,
.site-nav a:hover { color: var(--ink); background: rgba(255, 253, 248, .9); }
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.nav-button { display: none; }

.kicker {
  margin: 0 0 10px;
  color: var(--car);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.page-pcs .kicker, .hero-link.is-pc span { color: var(--pc); }
.lede { font-size: 18px; color: var(--muted); max-width: 40rem; }

.hero { padding: 54px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 42px; align-items: end; }
.hero-links { display: grid; gap: 14px; }
.hero-link {
  display: grid;
  gap: 4px;
  padding: 22px 22px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.7);
}
.hero-link span { font-size: 13px; font-weight: 700; color: var(--car); }
.hero-link strong { font-size: 26px; letter-spacing: -.03em; }
.hero-link em { font-style: normal; color: var(--muted); }
.hero-link.is-car { background: linear-gradient(180deg, #fff, var(--car-soft)); }
.hero-link.is-pc { background: linear-gradient(180deg, #fff, var(--pc-soft)); }

.band { padding: 28px 0 54px; }
.band-tight { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section-head a { color: var(--muted); }

.post-grid, .card-list, .note-grid { display: grid; gap: 16px; }
.post-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-list { gap: 18px; }
.post-card, .media-card, .note-card, .side-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.post-card, .note-card { padding: 22px; }
.post-card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.post-card h3, .media-card h2, .media-card h3 { margin: 0; }
.post-card p:last-child, .media-card p { color: var(--muted); }
.media-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  padding: 14px;
  text-decoration: none;
  align-items: center;
}
.media-card img, .media-fallback {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--car-soft);
}
.media-fallback {
  display: grid;
  place-items: center;
  color: var(--car);
  font-weight: 700;
}
.media-fallback.is-pc, .media-card.is-pc .media-fallback { background: var(--pc-soft); color: var(--pc); }
.media-card div { display: grid; gap: 8px; padding-right: 10px; }

.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.meta.quiet { margin: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--car-soft);
  color: var(--car);
  font-weight: 700;
  font-size: 12px;
}
.pill-pc, .pill-other { background: var(--pc-soft); color: var(--pc); }
.pill-car { background: var(--car-soft); color: var(--car); }

.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 22px; align-items: start; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  text-decoration: none;
  background: var(--paper);
  border-radius: 16px;
  padding: 14px 16px;
}
.feed strong { grid-column: 2; }
.feed small { grid-column: 2; color: var(--muted); }
.feed .pill { grid-row: 1 / span 2; align-self: center; }
.side-card { padding: 22px; }
.stat-list { list-style: none; margin: 14px 0 0; padding: 0; }
.stat-list li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); }
.stat-list strong { font-variant-numeric: tabular-nums; }

.page-head { padding: 42px 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filters a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgba(255,253,248,.7); color: var(--muted); }
.filters a.is-active { background: var(--ink); color: white; }

.detail { padding: 28px 0 64px; }
.crumb { color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); }
.detail-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: end; margin-bottom: 22px; }
.detail-photo { width: 100%; height: 320px; object-fit: cover; border-radius: 24px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 28px; }
.spec-grid div { background: var(--paper); border-radius: 16px; padding: 12px 14px; }
.spec-grid dt { color: var(--muted); font-size: 12px; }
.spec-grid dd { margin: 2px 0 0; font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.detail-stack { display: grid; gap: 36px; }
.series { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.series a {
  flex: 1;
  max-width: 48%;
  display: grid;
  gap: 4px;
  text-decoration: none;
  background: var(--paper);
  border-radius: 16px;
  padding: 14px 16px;
}
.series span { color: var(--muted); font-size: 12px; font-weight: 700; }
.series .is-next { margin-left: auto; text-align: right; }
.timeline { display: grid; gap: 0; }
.timeline article { position: relative; padding: 0 0 28px 22px; border-left: 2px solid var(--line); scroll-margin-top: 90px; }
.timeline article::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--car);
  position: absolute;
  left: -6px;
  top: 6px;
}
.timeline.is-pc article::before { background: var(--pc); }
.route { color: var(--pc); font-weight: 700; margin-bottom: 8px; }
.rich { color: var(--ink); }
.rich img { border-radius: 16px; margin: 12px 0 16px; height: auto; }
.rich a { color: var(--pc); }
.article { padding: 36px 0 20px; }
.article h1 { font-size: clamp(34px, 5vw, 56px); }
.article-body { margin-top: 18px; font-size: 17px; }
.note-card pre, .plain {
  margin: 12px 0 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #221e1a;
  color: #f6f1e8;
  border-radius: 14px;
  font-family: ui-monospace, "SFMono-Regular", "Source Code Pro", monospace;
  font-size: 13.5px;
  line-height: 1.6;
}
.empty { color: var(--muted); background: rgba(255,253,248,.6); border-radius: 16px; padding: 16px 18px; }
.pager { display: flex; gap: 16px; align-items: center; margin-top: 18px; }
.pager a { color: var(--pc); }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid, .split, .detail-head, .two-col, .post-grid { grid-template-columns: 1fr; }
  .series { flex-direction: column; }
  .series a, .series .is-next { max-width: none; margin-left: 0; text-align: left; }
  .media-card { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .detail-photo, .media-card img, .media-fallback { height: 220px; }
  .nav-button {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--paper);
  }
  .site-nav {
    display: none;
    position: absolute;
    z-index: 30;
    top: var(--header);
    left: 0;
    right: 0;
    padding: 10px 20px 16px;
    background: rgba(244, 239, 230, .98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .header-inner { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
