:root {
  --bg: #f1f3f5;
  --panel: #ffffff;
  --line: #e2e6ea;
  --text: #1f2328;
  --muted: #6b7280;
  --accent: #1a6fc4;
  --green: #22863a;
  --green-bg: #2e8b47;
  --patch-bg: #5aa469;
  --soft: #eef1f4;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
header.site { background: var(--panel); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { color: var(--text); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
input[type=search] { background: var(--panel); color: var(--text); border: 1px solid #cdd3da; border-radius: 6px; padding: 7px 10px; font: inherit; min-width: 0; width: 260px; max-width: 100%; }
button, .button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 16px; font: inherit; cursor: pointer; display: inline-block; }
.button:hover, button:hover { text-decoration: none; filter: brightness(1.08); }
main { padding-top: 16px; padding-bottom: 32px; }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 28px 0 8px; }
.lead { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.meta, .muted { color: var(--muted); }
.meta { font-size: 13px; margin: 4px 0 12px; }
.small { font-size: 12px; }
.filters { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; margin: 10px 0; font-size: 14px; }
.notice { background: #fff8e1; border: 1px solid #f0d58a; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 24px 0; }
.pager a, .pager strong { min-width: 36px; padding: 6px 10px; border-radius: 6px; text-align: center; border: 1px solid var(--line); background: var(--panel); }
.pager a:hover { text-decoration: none; border-color: var(--accent); }
.pager strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .gap { color: var(--muted); padding: 0 2px; }

/* ---- カード一覧 ---- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.card .thumb { display: block; aspect-ratio: 460 / 215; background: #d9dee3; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.card h3 a { color: var(--text); }
.badges, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 3px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.7; }
.badge.jp { background: var(--green-bg); }
.badge.patch { background: var(--patch-bg); }
.review { font-size: 13px; }
.review .label { color: var(--accent); }
.chip { display: inline-block; padding: 0 7px; border: 1px solid #d5dadf; border-radius: 3px; color: #aab1b9; font-size: 12px; line-height: 1.8; }
.chip.on { border-color: var(--green); color: var(--green); }
.detected { font-size: 13px; color: var(--muted); }
.patchnote { background: var(--soft); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.patchnote a { font-weight: 600; }
.patchnote .excerpt { margin: 4px 0 0; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.card .links { margin-top: auto; padding-top: 6px; display: flex; gap: 28px; font-size: 13px; }
.card .links a { text-decoration: underline; }

/* ---- 表（収集状況・検索のその他） ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
table.list th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; background: #f7f8fa; }
table.list tr:last-child td { border-bottom: 0; }
table.compact td { padding: 5px 10px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.title { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.title img, .title .noimg { width: 92px; height: 43px; object-fit: cover; border-radius: 3px; flex: none; background: #d9dee3; }
.title span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- お知らせ・詳細 ---- */
ul.news, ul.events { list-style: none; padding: 0; margin: 0; }
ul.news li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.news-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-weight: 700; }
.news-title { display: block; margin-top: 4px; }
.excerpt { margin: 6px 0 0; color: var(--muted); font-size: 13px; word-break: break-word; }
ul.events li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.app-head { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.app-head img { max-width: 100%; height: auto; background: #d9dee3; border-radius: 8px; flex: none; }
.app-head > div { flex: 1 1 320px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.app-head .links { display: flex; gap: 10px; flex-wrap: wrap; }
.button.secondary { background: #4b5563; }

footer.site { border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; padding: 16px 0 24px; }
footer.site p { margin: 6px 0; }
footer.site strong { color: var(--text); }

/* 幅 760px 以上は横 3 列、520〜760px は 2 列、それより狭いと 1 列 */
@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .opt { display: none; }
  .title img, .title .noimg { display: none; }
  table.list th, table.list td { padding: 7px 6px; }
  h1 { font-size: 19px; }
  .filters input[type=search] { flex: 1; width: auto; }
}
