:root {
  --bg: #f5f6f8; --surface: #fff; --text: #1c1d22; --muted: #686a75; --line: #e2e3ea;
  --accent: #1f6feb; --accent-ink: #fff; --sale: #d92d43; --best: #0f9d58; --wait: #b7791f;
  --chart: #1f6feb;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111317; --surface: #1b1e24; --text: #eceef3; --muted: #9a9ead; --line: #2c3038;
    --accent: #4b8dff; --best: #34c27a; --wait: #e0a040; --chart: #6aa2ff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif; }
a { color: inherit; }
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 48px; }

.pr { margin: 0; padding: 4px 16px; font-size: 12px; color: var(--muted); background: var(--surface);
  border-bottom: 1px solid var(--line); text-align: center; }
.site-header { max-width: 1180px; margin: 0 auto; padding: 14px 16px; display: flex; gap: 16px;
  align-items: center; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--accent); }
.site-header nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-header nav a { font-size: 13px; text-decoration: none; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); }

.hero { padding: 20px 0 4px; }
.hero h1 { font-size: clamp(22px, 3.4vw, 30px); margin: 4px 0 8px; line-height: 1.3; }
.crumb, .updated, .note { color: var(--muted); font-size: 13px; }
.crumb { margin: 16px 0 0; }
.kpi { display: flex; gap: 12px; padding: 0; list-style: none; flex-wrap: wrap; }
.kpi li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
  font-size: 13px; color: var(--muted); }
.kpi b { display: block; font-size: 22px; color: var(--text); }
section { margin-top: 28px; }
h2 { font-size: 20px; border-left: 4px solid var(--accent); padding-left: 10px; }

/* 一覧カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; }
.card:hover { border-color: var(--accent); }
.tw { position: relative; aspect-ratio: 3 / 4; background: var(--line); }
.thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid; place-items: center; color: var(--muted); font-size: 13px;
  background: repeating-linear-gradient(45deg, var(--line) 0 10px, transparent 10px 20px); }
.badges { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #fff; }
.badge.off { background: var(--sale); }
.badge.best { background: var(--best); }
.badge.rank { position: absolute; left: 8px; top: 8px; background: var(--text); color: var(--bg); }
.body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.body h3 { font-size: 14px; margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 0; font-size: 12px; color: var(--muted); }
.price { margin: auto 0 0; font-size: 14px; }
.price s, .now s { color: var(--muted); font-size: 12px; }
.price b { color: var(--sale); font-size: 17px; }
.low { margin: 0; font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); }
.more { text-align: center; margin-top: 16px; }

/* 作品ページ */
.item { display: grid; grid-template-columns: 280px 1fr; gap: 28px; margin-top: 12px; }
.cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; display: block; }
.item h1 { font-size: clamp(20px, 3vw, 26px); line-height: 1.35; margin: 0 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; padding: 0; list-style: none; }
.tags li { font-size: 11px; padding: 1px 8px; border-radius: 4px; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); }
.verdict { border-radius: 12px; padding: 14px 16px; margin: 12px 0; display: flex; flex-direction: column; gap: 2px;
  border: 2px solid var(--line); background: var(--surface); }
.verdict b { font-size: 18px; }
.verdict span { font-size: 14px; color: var(--muted); }
.v-best { border-color: var(--best); } .v-best b { color: var(--best); }
.v-sale { border-color: var(--sale); } .v-sale b { color: var(--sale); }
.v-wait { border-color: var(--wait); } .v-wait b { color: var(--wait); }
.now { font-size: 15px; margin: 8px 0 12px; }
.now b { font-size: 26px; color: var(--sale); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-size: 18px; font-weight: 700; }
.stats small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

.chart { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.c-line { fill: none; stroke: var(--chart); stroke-width: 2.5; }
.c-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.c-low { fill: var(--best); }
.c-label { fill: var(--muted); font-size: 12px; }

.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden;
  font-size: 14px; }
.tbl th, .tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }

.btn { display: inline-block; text-align: center; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); border: 0; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.cta { display: block; font-size: 17px; padding: 14px; background: var(--sale); }
.cta-wrap { max-width: 520px; margin: 28px auto 0; }
.prose { max-width: 760px; }

footer { border-top: 1px solid var(--line); padding: 24px 16px; text-align: center; font-size: 13px; color: var(--muted); }
footer p { margin: 4px 0; }

.age-gate { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 14, .92); display: grid;
  place-items: center; padding: 16px; }
.age-gate[hidden] { display: none; }
.age-box { background: var(--surface); color: var(--text); border-radius: 16px; padding: 28px 24px;
  max-width: 420px; text-align: center; }
.age-title { font-weight: 800; font-size: 18px; color: var(--sale); }
.age-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 720px) {
  .item { grid-template-columns: 1fr; }
  .item-img { max-width: 240px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .body { padding: 8px; }
}
