/* サッカー/フットサル 試合記録ツール。白地・青1色。スマホの片手で押せる大きさ（ボタン44px以上） */
:root {
  color-scheme: only light;
  --ink: #1f2937; --dim: #5b6472; --line: #dde3ea; --bg: #ffffff; --panel: #f4f6f9;
  --blue: #1d5fd1; --blue-weak: #eaf1ff; --warn: #8a5a00; --warn-weak: #fbf1dc; --ok: #0f7a4a;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; font-size: 16px; line-height: 1.6;
       padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.top { padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; margin: 0; }
.sum { margin: 2px 0 0; color: var(--dim); font-size: 15px; display: flex; flex-wrap: wrap; column-gap: 14px; }
.nw { white-space: nowrap; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px; }
h2 { font-size: 17px; margin: 16px 0 8px; }
.h { margin-top: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 10px 0; }
.card h2 { margin-top: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.col { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.row > span:first-child, .col > span:first-child { font-weight: 600; }
input, textarea, select { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; }
textarea { width: 100%; resize: vertical; }
.col input { width: 100%; }
.unit { display: inline-flex; align-items: center; gap: 6px; }
.unit input { width: 110px; text-align: right; }
.counter { display: grid; grid-template-columns: 1fr 56px 64px 56px; align-items: center; gap: 8px; margin: 12px 0; }
.counter .lbl { font-weight: 600; }
.counter output { text-align: center; font-size: 28px; font-weight: 700; }
.pm { min-height: 56px; border-radius: 14px; border: 1px solid var(--blue); background: var(--blue-weak); color: var(--blue);
  font-size: 26px; font-weight: 700; }
details { margin: 8px 0; border-top: 1px solid var(--line); padding-top: 8px; }
summary { cursor: pointer; color: var(--blue); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
button, .btn { font: inherit; min-height: 48px; padding: 0 18px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--blue); color: #fff; border: 0; font-weight: 700; flex: 1; }
.sub { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.danger { background: #fff; color: #b42318; border: 1px solid #e6b3ae; }
.msg { min-height: 1.4em; margin: 8px 0 0; color: var(--ok); font-weight: 600; }
.msg.err { color: #b42318; }
.note { color: var(--dim); font-size: 15px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 8px 0; }
.list .t { font-weight: 600; }
.list .m { color: var(--dim); font-size: 15px; }
.list .acts button { min-height: 44px; }
.todo { background: var(--warn-weak); border: 1px solid #ecd9a8; border-radius: var(--r); padding: 12px 14px; margin: 4px 0 10px; }
.todo b { color: var(--warn); }
.yearbar { display: flex; align-items: center; justify-content: space-between; }
.yearbar h2 { margin: 0; }
.yearbar button { min-width: 48px; font-size: 22px; }
.wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; margin-top: 10px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--dim); font-size: 14px; font-weight: 600; }
.tbl tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.tbl small { color: var(--dim); }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 14px; color: var(--dim); margin-top: 4px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.month { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 10px 0; }
.month .head { display: flex; justify-content: space-between; font-weight: 700; }
.month ul { margin: 6px 0 0; padding-left: 18px; }
.month li { margin: 4px 0; }
.month .q { color: var(--dim); font-size: 15px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { border: 0; background: none; color: var(--dim); border-radius: 0; min-height: 60px; font-size: 15px; padding: 0 4px; white-space: nowrap; }
.tabs button[aria-current="page"] { color: var(--blue); font-weight: 700; box-shadow: inset 0 3px 0 var(--blue); }
[hidden] { display: none !important; }
