:root {
  --bg: #f4f6f8;
  --surface: #fff;
  --text: #1a1a1a;
  --muted: #667085;
  --line: #d5dae0;
  --up: #15803d;
  --down: #c62828;
  --link: #1d4ed8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.site-header, .notice, .controls, .movers, .chart, main, .site-footer {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}
.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-top: 12px; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 14px; margin: 16px 0 4px; }
.meta, .muted { color: var(--muted); font-size: 12px; }
.notice { margin-top: 8px; padding-top: 8px; padding-bottom: 8px; border: 1px solid var(--down); border-radius: 4px; font-size: 13px; background: var(--surface); }
.control { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.control-label { flex: 0 0 5.5em; font-size: 12px; color: var(--muted); white-space: nowrap; }
.options { display: flex; flex-wrap: wrap; gap: 4px; }
.opt {
  font: inherit; font-size: 13px; line-height: 1.3;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 5px 9px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.opt.is-on { color: var(--text); border-color: var(--text); font-weight: 600; }
.shops summary { font-size: 13px; color: var(--link); cursor: pointer; margin-top: 8px; }
.shops .options { margin-top: 6px; }
.text-btn { font: inherit; font-size: 13px; background: none; border: 0; padding: 4px 0; color: var(--link); cursor: pointer; }
/* スマホで2列にすると店名が省略で消えるので、1列で全文を出す */
.movers-cols { display: grid; grid-template-columns: 1fr; gap: 4px 12px; }
.movers ul { list-style: none; margin: 0; padding: 0; font-size: 13px; min-width: 0; }
.movers li { display: flex; align-items: baseline; gap: 6px; padding: 1px 0; min-width: 0; }
.movers li .mv-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movers li .mv-diff { flex: 0 0 auto; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
.num { font-variant-numeric: tabular-nums; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; }
.chart-box { position: relative; height: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin-top: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h3 { font-size: 15px; margin: 0; }
.retail { font-size: 12px; color: var(--muted); white-space: nowrap; }
.best { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.best-shop { font-size: 13px; }
.best-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sub { display: flex; justify-content: space-between; font-size: 13px; }
.ranking { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ranking li { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.card-actions { display: flex; gap: 20px; margin-top: 4px; }
a { color: inherit; text-underline-offset: 2px; }
.table-wrap { display: none; overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; background: var(--surface); font-size: 13px; width: 100%; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 6px; text-align: right; white-space: nowrap; }
th { font-weight: 400; color: var(--muted); }
th.model, td.model {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 1;
}
td.best-cell { font-weight: 700; }
.stopped { color: var(--muted); }
.site-footer { margin-top: 28px; padding-bottom: 40px; font-size: 12px; color: var(--muted); }
.site-footer p { margin: 4px 0; }
@media (min-width: 768px) {
  .movers-cols { grid-template-columns: 1fr 1fr; }
  .cards { display: none; }
  .table-wrap { display: block; }
}
