/* 色は web-brand の tokens.css（ツール画面）に合わせる。ここで色を足さない */
:root {
  --primary: #1b4e8f;
  --primary-weak: #eef3f9;
  --bg: #f5f7fa;
  --card: #fff;
  --text: #16202e;
  --text2: #465366;
  --muted: #77828f;
  --line: #e3e8ee;
  --ok: #14603a; --ok-bg: #e4f4ea;
  --warn: #9a5510; --warn-bg: #fdf3e7;
  --ng: #a32b21; --ng-bg: #fdeeec;
  --r: 12px;
  --r-ctl: 7px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 48px; }
.wrap.narrow { max-width: 560px; }
header.top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
header.top img { width: 28px; height: 28px; }
header.top .logo { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
header.top .sub { color: var(--muted); font-size: 13px; margin-left: auto; }
h1 { font-size: 22px; line-height: 1.4; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: var(--r-ctl); font-size: 15px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-main { background: var(--primary); color: #fff; }
.btn-sub { background: #fff; color: var(--primary); border-color: var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text] {
  width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; color: var(--text);
}
label { display: block; font-weight: 700; margin-bottom: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1 1 200px; }

/* 状態の色 */
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--ng); }
.none { color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); }
.pill.warn { background: var(--warn-bg); }
.pill.bad { background: var(--ng-bg); }
.pill.none { background: var(--bg); }

/* 参加者画面：自分の数値 */
.big { font-size: 20px; font-weight: 700; margin: 4px 0 14px; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meter { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.meter .k { font-size: 12.5px; color: var(--text2); }
.meter .v { font-size: 24px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.meter .u { font-size: 12px; color: var(--muted); margin-left: 3px; font-weight: 400; }
.meter.ok .v { color: var(--ok); }
.meter.warn .v { color: var(--warn); }
.meter.bad .v { color: var(--ng); }
.meter.none .v { color: var(--muted); }
@media (max-width: 520px) { .meters { grid-template-columns: repeat(2, 1fr); } }

/* 主催者画面：共有欄 */
.share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share code {
  flex: 1 1 260px; background: var(--primary-weak); color: var(--primary); padding: 10px 12px;
  border-radius: var(--r-ctl); font-size: 15px; word-break: break-all; font-family: inherit; font-weight: 700;
}
.copied { color: var(--ok); font-size: 13px; font-weight: 700; }

/* 主催者画面：一覧 */
.summary { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--text2); margin-bottom: 10px; }
.summary b { font-size: 18px; color: var(--text); margin-right: 2px; }
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { font-size: 12.5px; color: var(--text2); font-weight: 700; white-space: nowrap; }
table.list td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
table.list th.n { text-align: right; }
table.list tr.off td { opacity: .5; }
.who { font-weight: 700; }
.who small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.spark { display: block; }
.sp-line { fill: none; stroke: var(--primary); stroke-width: 1.5; }
.sp-ref { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.sp-gap { fill: var(--ng); opacity: .55; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.legend { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.8; }

/* スマホでは表をカードに組み替える */
@media (max-width: 760px) {
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 10px; }
  table.list td { border: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 10px; }
  table.list td::before { content: attr(data-k); color: var(--text2); font-size: 12.5px; font-weight: 400; }
  table.list td.who-cell::before, table.list td.sp-cell::before { content: none; }
  table.list td.n { text-align: right; }
}
