:root {
  --bg: #f3f5f1;
  --card: #ffffff;
  --ink: #15201a;
  --muted: #68736c;
  --line: #e2e6e0;
  --accent: #0f6b46;
  --accent-weak: #e2f1e9;
  /* 推しチームの色（app.js の applyTheme が上書きする） */
  --hero-bg: #0f6b46;
  --hero-ink: #ffffff;
  --hero-ink-rgb: 255,255,255;
  --hero-sub: #ffd66b;
  --win: #0f6b46;
  --draw: #7d857f;
  --loss: #c2452f;
  --loss-weak: #fbe9e5;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px calc(150px + env(safe-area-inset-bottom));
}

/* 上の帯 */
.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
}
.top .brand { font-weight: 700; letter-spacing: .02em; }
.top .tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-weak);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
}
.top .back {
  border: 0;
  background: none;
  padding: 6px 10px 6px 0;
  color: var(--accent);
  font-weight: 600;
}
.top .spacer { flex: 1; }

/* カード */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
}

/* シーズンのまとめ */
.hero { background: var(--hero-bg); color: var(--hero-ink); border: 0; border-bottom: 6px solid var(--hero-sub); }
.hero .team { font-size: 13px; opacity: .85; }
.hero .count { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 12px; }
.hero .count b { font-size: 44px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero .count span { font-size: 15px; opacity: .9; }

.stamps { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.cell {
  aspect-ratio: 1;
  border-radius: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  font-size: 9px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.cell span { padding: 3px 4px; position: relative; z-index: 1; }
.cell.future { border: 1px dashed rgba(var(--hero-ink-rgb), .45); color: rgba(var(--hero-ink-rgb), .7); }
.cell.miss { background: rgba(var(--hero-ink-rgb), .13); color: rgba(var(--hero-ink-rgb), .65); }
.cell.on { background-color: #fff; color: #fff; font-weight: 700; box-shadow: 0 0 0 2px #fff; }
.cell.on::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.cell.on.nophoto { color: var(--accent); }
.cell.on.nophoto::after { display: none; }
.cell.on::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 1;
  border: 1.5px solid #fff;
}
.cell.on.W::before { background: #2fbf7f; }
.cell.on.D::before { background: #b9bfba; }
.cell.on.L::before { background: #e8674f; }
.cell.on.P::before { display: none; }

.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; opacity: .85; margin-top: 10px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; border: 1px solid #fff; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.kpi .label { font-size: 11px; color: var(--muted); }
.kpi .value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .value small { font-size: 12px; font-weight: 600; }
.kpi .value .vs2 { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }

/* 集計：行った試合と行かなかった試合の成績を並べる */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split .side { min-width: 0; }
.split .label { font-size: 12px; font-weight: 700; color: var(--accent); }
.split .miss .label { color: var(--muted); }
.split .miss .big { color: var(--muted); }
.split .note { margin: 0; }
.gap { margin: 10px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--accent-weak); color: var(--accent); font-weight: 700; font-size: 14px; }

/* 絞り込み */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 試合一覧 */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: 34px 1fr auto 52px;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 10px 12px;
}
.row .rd { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
.row .rd b { display: block; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.row .opp { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.row .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .main { min-width: 0; }
.ha {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  flex: none;
}
.ha.H { background: var(--accent-weak); border-color: var(--accent-weak); color: var(--accent); }
.score { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; font-size: 14px; }
.score.W { color: var(--win); }
.score.D { color: var(--draw); }
.score.L { color: var(--loss); }
.score.none { color: var(--muted); font-weight: 500; font-size: 12px; }
.thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--bg) center / cover no-repeat;
  border: 1px dashed #cfd5cf;
}
.row.attended { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.row.attended .thumb { border: 0; }
.row.attended .thumb.nophoto {
  background: var(--accent-weak);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.row.future { opacity: .78; }
.row:not(.attended):not(.future) .score { color: var(--muted); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; font-size: 13px; }

/* 下の帯と記録ボタン */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.nav .inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.nav a { text-align: center; padding: 12px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.nav a.active { color: var(--accent); }
.fab-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(58px + env(safe-area-inset-bottom));
  z-index: 11;
  pointer-events: none;
}
.fab-wrap .inner { max-width: 520px; margin: 0 auto; padding: 0 16px; display: flex; justify-content: center; }
.fab {
  pointer-events: auto;
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fab svg { width: 20px; height: 20px; }

/* ボタン */
.btn {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 700;
  text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--loss); }
.btn + .btn { margin-top: 8px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-row .btn + .btn { margin-top: 0; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 4px 0; font-size: 13px; }

.btn[disabled] { opacity: .45; cursor: default; }
.link.danger { color: var(--loss); }

/* 写真の振り分け */
.sortmatch { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 16px; }
.sortacts { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }

/* 試合の見出し */
.matchhead { text-align: center; }
.matchhead .meta { font-size: 12px; color: var(--muted); }
.matchhead .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0 6px; }
.matchhead .teams .t { font-weight: 700; font-size: 15px; line-height: 1.35; }
.matchhead .teams .t.me { color: var(--accent); }
.matchhead .teams .sc { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.matchhead .teams .sc.pending { font-size: 15px; color: var(--muted); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 12px; }
.badge.W { background: var(--accent-weak); color: var(--win); }
.badge.D { background: #eceeec; color: var(--draw); }
.badge.L { background: var(--loss-weak); color: var(--loss); }
.note { font-size: 12px; color: var(--muted); }
.warn { font-size: 12px; background: #fff7df; border: 1px solid #f0dfa6; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; color: #6b5300; }

/* 日記 */
.photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.photos::-webkit-scrollbar { display: none; }
.photos img { flex: none; width: 86%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); scroll-snap-align: center; background: #dfe4de; }
.photos img:only-child { width: 100%; }
.diary { white-space: pre-wrap; font-size: 15px; line-height: 1.9; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); font-size: 12px; padding-top: 2px; white-space: nowrap; }
.facts dd { margin: 0; }

/* 入力 */
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.field input[type=text], .field input[type=number], .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
.field textarea.diarybox { min-height: 170px; background: #fbfcfa; }
.costgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.costgrid .mini label { font-weight: 500; }
.pstrip { display: flex; gap: 8px; flex-wrap: wrap; }
.pstrip .p { position: relative; width: 76px; height: 76px; border-radius: 10px; background: #dfe4de center / cover no-repeat; }
.pstrip .p button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
.pstrip .add {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  border: 1px dashed #b9c1ba;
  background: none;
  color: var(--muted);
  font-size: 12px;
}
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg label {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  background: #fff;
}
.seg input { display: none; }
.seg label.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }
.seg label.off { color: #a9b0aa; background: var(--bg); }
.seg label small { display: block; font-weight: 500; font-size: 10px; }

/* 集計 */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.bar .num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.wdl { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg); margin: 8px 0; }
.wdl .W { background: var(--win); }
.wdl .D { background: #b9bfba; }
.wdl .L { background: var(--loss); }
.big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.big small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 推しチーム選び */
.teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.teams-grid button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 14px 8px;
  font-weight: 700;
  font-size: 14px;
}
.teams-grid button.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
/* クラブの色：左の帯と、メイン・サブを半分ずつ塗った丸 */
.teams-grid button.club { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 14px; text-align: left; line-height: 1.35; }
.teams-grid button.club::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c1); }
.teams-grid button.club .sw { flex: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.teams-grid button.club.on { border-color: var(--ca); background: var(--cw); color: var(--ca); box-shadow: 0 0 0 1px var(--ca); }
.lead { font-size: 22px; font-weight: 800; margin: 18px 0 4px; }

/* お知らせ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(128px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(21, 32, 26, .94);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  max-width: min(92vw, 460px);
  z-index: 50;
  text-align: center;
}
.busy {
  position: fixed;
  inset: 0;
  background: rgba(243, 245, 241, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  font-weight: 700;
  color: var(--accent);
}

/* ユニフォーム */
.chipwrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.chipwrap .chip { text-align: left; }
.chipwrap .chip.active { background: var(--accent); border-color: var(--accent); }
.seg button { border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; font-size: 13px; font-weight: 600; background: #fff; }
.seg button.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }
.row.uni { grid-template-columns: 1fr auto; padding: 12px 14px; }
.row.uni .score.none { color: var(--accent); font-weight: 600; }

/* 大会の切り替え */
.chips.comps { padding-top: 0; }
.chips.comps .chip small { margin-left: 6px; font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.chips.comps .chip.active { background: var(--accent); border-color: var(--accent); }
.row .rd.cup b {
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  background: var(--accent-weak);
  color: var(--accent);
  font-size: 14px;
  margin: 0 auto;
}

/* 観戦していない試合のメモ */
.seg.two { grid-template-columns: 1fr 1fr; }
.info { font-size: 12px; background: #eceeec; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; color: var(--muted); }
.row.memo { border-style: dashed; border-color: #b4bcb5; }
.row.memo .thumb { border: 0; }
.row.memo .thumb.nophoto {
  background: #eceeec;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cell.memo::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(var(--hero-ink-rgb), .85);
}

/* 推しチーム選び：リーグごとの見出し */
.lg { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 20px 0 8px; }

/* 気持ちの5段階 */
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.moods button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.moods .f { font-size: 26px; line-height: 1.25; }
.moods .l { font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.moods.picked button:not(.on) .f { filter: grayscale(1); opacity: .45; }
.moods button.on { border-color: var(--accent); background: var(--accent-weak); }
.moods button.on .l { color: var(--accent); }
.thumb { position: relative; }
.mface {
  position: absolute;
  right: -5px;
  bottom: -5px;
  font-size: 17px;
  line-height: 1;
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 0 0 1px var(--line);
}

/* スタジアム別 */
.vlist { display: flex; flex-direction: column; gap: 14px; }
.vhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.vname { font-weight: 700; font-size: 14px; }
.vnum { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vrow .track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.vrow .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.vsub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 今季のムービー */
.mvbtn { margin-bottom: 12px; }
.movie canvas {
  display: block;
  width: min(100%, calc((100vh - 290px) * 9 / 16));
  min-width: 200px;
  aspect-ratio: 9 / 16;
  margin: 0 auto 8px;
  border-radius: 18px;
  background: #000;
  cursor: pointer;
}
/* 出来上がった動画の保存・共有 */
.mvout { margin-top: 12px; padding: 14px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-weak); }
.mvout-h { margin: 0 0 10px; font-weight: 700; color: var(--accent); }
.mvout-h small { display: block; margin-top: 2px; font-weight: 500; font-size: 12px; color: var(--muted); }
.mvout .note { margin: 8px 0 0; }
#mv-len-note { white-space: pre-line; }

/* 「行ったけど写真はない」のチェック */
.check { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink, #1d2a22); cursor: pointer; text-align: left; }
.check i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid #b9c1ba; border-radius: 6px; background: #fff; font-style: normal; font-size: 14px; font-weight: 800; color: #fff; }
.check.on i { border-color: var(--accent); background: var(--accent); }

/* ユニフォームの写真 */
.row.uni { grid-template-columns: 52px 1fr auto; padding: 10px 14px 10px 10px; }
.row.uni .thumb { border: 0; }
.thumb.unino { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 9px; line-height: 1.3; color: var(--muted); border: 1px dashed #cfd5cf !important; }
.unipick { display: flex; gap: 14px; align-items: center; }
.uniphoto { flex: none; width: 124px; height: 124px; border-radius: 14px; background: #dfe4de center / cover no-repeat; }
.uniphoto.none { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); border: 1px dashed #b9c1ba; background: none; }
.unibtns { flex: 1; min-width: 0; }
.chip .cimg { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background: center / cover no-repeat; vertical-align: -6px; margin: -2px 7px -2px -6px; }
.unishot { margin-top: 12px; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background: #dfe4de center / cover no-repeat; }

/* フリーモード */
.freebtn { margin-top: 14px; border-style: dashed; }
.freebtn.on { border-style: solid; border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.row .opp .vs { font-size: 11px; font-weight: 600; color: var(--muted); margin: 0 2px; }
.score.N { color: var(--ink); }
.field select, .field input[type=date] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  color: inherit;
}
.row .opp .mine { color: var(--accent); }
.row .sub .km { color: var(--accent); font-weight: 700; }

/* スタジアム制覇 */
.progress { height: 10px; border-radius: 999px; background: rgba(var(--hero-ink-rgb), .2); overflow: hidden; }
.progress div { height: 100%; background: var(--hero-sub); border-radius: 999px; }
.jmap { display: block; width: 100%; height: auto; max-height: 70vh; }
.jmap .land { fill: #dfe5dd; stroke: #c3ccc2; stroke-width: 1; stroke-linejoin: round; }
.jmap .oki { fill: none; stroke: #c3ccc2; stroke-width: 1.2; stroke-dasharray: 4 3; }
.jmap .dot { cursor: pointer; stroke: #fff; stroke-width: 2; }
.jmap .dot.no { fill: #fff; stroke: #8f9a92; stroke-width: 1.6; }
.jmap .dot.rec, .jmap .dot.man { fill: var(--accent); }
.jmap .dot.pick { stroke: var(--ink); stroke-width: 3; }
.maplegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 8px 0 0; align-items: center; }
.maplegend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.maplegend .dot.rec { background: var(--accent); }
.maplegend .dot.no { background: #fff; border: 1.5px solid #8f9a92; }
.mapcap { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.mapcap .btn { flex: none; width: auto; margin: 0; padding: 8px 12px; font-size: 13px; }
.lg small { margin-left: 8px; font-weight: 600; color: var(--accent); }
.hoshi { display: grid; gap: 4px; }
.hrow { display: grid; grid-template-columns: 76px repeat(3, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.hclub { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; min-width: 0; line-height: 1.2; flex-wrap: wrap; }
.hclub .sw { flex: none; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.hclub .done { font-size: 9px; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 4px; }
.hc { display: flex; align-items: center; gap: 3px; min-width: 0; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 5px; font-size: 11px; line-height: 1.2; text-align: left; }
.hc .mk { flex: none; width: 1em; font-weight: 800; color: var(--accent); }
.hc .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc.rec, .hc.man { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); font-weight: 700; }
.hc.ref { border-style: dashed; }
.hc.empty { border: 0; background: none; }
/* サブ */
.maplegend .dot.rare { border-radius: 2px; transform: rotate(45deg) scale(.85); }
.card h2 .cnt { margin-left: 8px; color: var(--accent); }
.maplegend .dot.neutral { border-radius: 2px; }
/* 星取表：マスが3つを超えたら折り返す。サブのマスは点線、クラブの枠外は二重線 */
.hrow { grid-template-columns: 76px minmax(0, 1fr); }
.hcells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.hc.rare { border-style: dotted; border-width: 1.5px; }
.hc.rare .nm::before { content: "◇"; margin-right: 2px; font-size: 9px; opacity: .6; }
.hc-rare { display: inline-block; width: 18px; height: 12px; border: 1.5px dotted var(--muted); border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.stscope { margin: 0 0 12px; }

/* スタジアムのページ */
.sthead { border-top: 5px solid var(--c1); }
.sthead .kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sthead .kind .pill { background: var(--accent-weak); color: var(--accent); border-radius: 999px; padding: 1px 8px; }
.sthead .kind .sw { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.sthead h1 { font-size: 20px; line-height: 1.35; margin: 6px 0 6px; }
.stfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; }
.stfacts div { background: var(--bg); border-radius: 10px; padding: 8px; min-width: 0; }
.stfacts b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stfacts span { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.jmap.mini { max-height: 220px; margin-top: 10px; }
.jmap .ping { fill: var(--accent); opacity: .18; }
.visit { border-top: 1px solid var(--line); padding: 10px 0; }
.visit:first-of-type { border-top: 0; padding-top: 0; }
.visit .vhead { display: flex; justify-content: space-between; align-items: center; }
.visit .vmemo { white-space: pre-wrap; font-size: 14px; margin: 4px 0 6px; }
.vphotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.vphotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.capbtns { display: flex; gap: 6px; flex: none; }
.sttap { margin: 0 0 2px; }
.sttap button { font-size: 12px; }
