:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #1d2433; --muted: #667085; --line: #e4e7ec; --soft: #f1f3f6;
  --accent: #177245; --accent-ink: #ffffff; --warn: #b45309; --warn-bg: #fff7ed; --err: #b42318;
  --pitch: #eef5ef; --pitch-line: #9db5a3; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --radius: 10px; --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218; --panel: #171b23; --ink: #e6e9ef; --muted: #98a2b3; --line: #2a303c; --soft: #1e232d;
    --accent: #2fa56b; --warn: #f5b25b; --warn-bg: #2b2112; --err: #f97066;
    --pitch: #16261c; --pitch-line: #4c6b55; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1218; --panel: #171b23; --ink: #e6e9ef; --muted: #98a2b3; --line: #2a303c; --soft: #1e232d;
  --accent: #2fa56b; --warn: #f5b25b; --warn-bg: #2b2112; --err: #f97066;
  --pitch: #16261c; --pitch-line: #4c6b55; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.55 "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.logo { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); position: relative; }
.logo::after { content: ""; position: absolute; inset: 6px; border: 2px solid #fff; border-radius: 50%; }
svg.logo { flex: none; background: none; border-radius: 0; }   /* Web 版のロゴ (ピッチの線と記録の点・12/1) */
.jobchip { margin-left: auto; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--muted);
  max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jobchip.on::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  margin-right: 6px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
main { max-width: 1320px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } main { padding: 16px; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--panel); padding: 7px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=number], input[type=url], select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 10px; min-width: 0; }
input[type=color] { width: 40px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--panel); }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
label.f > input, label.f > select { color: var(--ink); font-size: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 16px 0; overflow-x: auto; }
.tab { padding: 9px 14px; border: none; background: none; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab:disabled { opacity: .4; cursor: default; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { cursor: pointer; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.stage { display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stage:last-child { border-bottom: none; }
@media (max-width: 700px) { .stage { grid-template-columns: 1fr; gap: 4px; } }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.badge.done { background: #e7f6ec; color: #17663a; }
.badge.running, .badge.queued { background: #e8f1fd; color: #1d4ed8; }
.badge.error { background: #fdecea; color: var(--err); }
.badge.paused { background: var(--warn-bg); color: var(--warn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.done { background: #133a24; color: #7ee2a8; }
  :root:not([data-theme="light"]) .badge.running, :root:not([data-theme="light"]) .badge.queued { background: #172a4a; color: #93c5fd; }
  :root:not([data-theme="light"]) .badge.error { background: #3a1714; } }
.note { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.kpi { display: grid; gap: 2px; }
.kpi .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px 14px; align-items: center; }
.vs .a { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.vs .b { font-weight: 700; font-variant-numeric: tabular-nums; }
.vs .m { text-align: center; color: var(--muted); font-size: 12px; }
.possbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 700; color: #fff; }
.possbar > div { display: flex; align-items: center; padding: 0 10px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th, table.t td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.t th { color: var(--muted); font-weight: 600; cursor: pointer; position: sticky; top: 0; background: var(--panel); }
table.t td:first-child, table.t th:first-child, table.t td.l, table.t th.l { text-align: left; }
table.t tr.sel td { background: var(--soft); }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover td { background: var(--soft); }
.tablewrap { overflow: auto; max-height: 560px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
svg.pitch { width: 100%; height: auto; display: block; }
svg.pitch .bg { fill: var(--pitch); }
svg.pitch .ln { fill: none; stroke: var(--pitch-line); stroke-width: .25; }
svg text { font-family: inherit; }
.calib { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
@media (max-width: 1000px) { .calib { grid-template-columns: minmax(0, 1fr); } }
.frame-wrap { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
.frame-wrap img { display: block; width: 100%; height: auto; user-select: none; }
.frame-wrap canvas#fcv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.loupe { position: absolute; right: 8px; top: 8px; width: 180px; height: 120px; border: 2px solid #fff; border-radius: 6px; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.lm-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; font-size: 12px; }
.lm { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.lm:hover { background: var(--soft); }
.lm.on { border-color: var(--accent); background: var(--soft); }
.lm .done { color: var(--accent); font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; background: var(--panel); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.radar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .radar { grid-template-columns: minmax(0, 1fr); } }
video { width: 100%; border-radius: 8px; background: #000; display: block; }
/* YouTube の限定公開の動画 (ytvideo.js): <video> と同じ大きさ・見た目 */
.ytv { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #000; display: block; position: relative; overflow: hidden; }
.ytv iframe, .ytv .ytv-in { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytv .ytv-none { color: #ccc; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 14px; padding: 12px; text-align: center; }
.ytv .ytv-err { position: absolute; inset: 0; background: rgba(0,0,0,.85); color: #fff; z-index: 2; }
canvas.rad { width: 100%; height: auto; display: block; border-radius: 8px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 4px; }
.thumb { width: 34px; height: 60px; object-fit: cover; border-radius: 4px; border: 2px solid transparent; cursor: pointer; background: var(--soft); }
.thumb:hover { border-color: var(--accent); }
.slotrow { display: grid; grid-template-columns: 70px 70px 60px 1fr; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.slotrow .thumbs { grid-column: 1 / -1; }
.menu { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 6px; max-height: 60vh; overflow: auto; min-width: 180px; }
.menu button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: var(--soft); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px;
  border-radius: 8px; z-index: 60; font-size: 13px; max-width: 90vw; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
dl.gloss { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; font-size: 13px; margin: 0; }
dl.gloss dt { font-weight: 600; }
dl.gloss dd { margin: 0; color: var(--muted); }
@media (max-width: 700px) { dl.gloss { grid-template-columns: 1fr; } }
.chartbox { position: relative; height: 220px; }
.mono { font-family: var(--mono); font-size: 12px; }
.tagger { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .tagger { grid-template-columns: minmax(0, 1fr); } }
.evbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; }
.evbtns .btn { text-align: left; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--soft); color: var(--ink); }
.keys { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.bigp { font-size: 18px; font-weight: 700; min-width: 120px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: var(--panel); padding: 6px 12px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
/* ---- キーパス (金色) ・ 凡例 ・ チーム分析 ---- */
.badge.kp { background: linear-gradient(135deg, #fff1a8, #ffc400 55%, #ffe680); color: #6b4e00; font-weight: 700; box-shadow: 0 0 6px rgba(255,196,0,.6); }
.badge.as { background: linear-gradient(135deg, #ffe680, #ff9f1c); color: #5a2d00; font-weight: 700; box-shadow: 0 0 6px rgba(255,159,28,.55); }
.kpi.gold { background: linear-gradient(135deg, #fff8d6, #ffe27a 60%, #fff3b0); border: 1px solid #ffc400; border-radius: 8px; padding: 8px 10px; box-shadow: 0 0 10px rgba(255,196,0,.35); }
.kpi.gold .v, .kpi.gold .l { color: #7a5700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kpi.gold { background: linear-gradient(135deg, #3d3100, #5c4700); } :root:not([data-theme="light"]) .kpi.gold .v, :root:not([data-theme="light"]) .kpi.gold .l { color: #ffd84d; } }
.kpbox { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.kp-lg { color: #b8860b; font-weight: 700; text-shadow: 0 0 6px rgba(255,196,0,.7); }
.kp-shine { animation: kpshine 1.6s linear infinite; }
.kp-twinkle { animation: kptw 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes kpshine { to { stroke-dashoffset: -9; } }
@keyframes kptw { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .kp-shine, .kp-twinkle { animation: none; } }
svg.goalfront { width: 100%; height: auto; display: block; border-radius: 6px; }
.goalpick { display: grid; gap: 4px; margin-top: 8px; }
.goalpick canvas { width: 100%; max-width: 460px; height: auto; border-radius: 6px; cursor: crosshair; background: var(--pitch); }
.insights { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.bars { display: grid; gap: 6px; font-size: 13px; }
.bars .b { display: grid; grid-template-columns: 130px 1fr 90px; gap: 8px; align-items: center; }
.bars .track { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; position: relative; }
.bars .track i { position: absolute; inset: 0 auto 0 0; background: #c7d2fe; }
.bars .track i + i { background: #4472c4; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; }
.zone3 td { text-align: center !important; }
/* ---- 記録: 悪いプレー・フォーメーション・連続パス ---- */
.btn.bad { border-color: #f5b38a; color: #b45309; }
.btn.bad kbd { background: #fff1e6; }
.bad-t { color: #c2410c; font-weight: 600; }
.kpbtn { color: #98a2b3; }
.footbtn { color: #98a2b3; margin-left: 4px; }
.footbtn.on { color: #1d4ed8; border-color: #93c5fd; }
.kpbtn.on { background: linear-gradient(135deg, #fff1a8, #ffc400); color: #6b4e00; border-color: #ffc400; box-shadow: 0 0 6px rgba(255,196,0,.6); }
tr.scene-row td { background: #f5f3ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) tr.scene-row td { background: #241f3a; } }
svg.fboard { width: 100%; max-width: 400px; height: auto; display: block; user-select: none; }
.evbtns kbd:empty { display: none; }
.fb-bg { fill: var(--pitch); }
.fb-ln { stroke: var(--pitch-line); stroke-width: .35; }
.fb-dir { font-size: 2.4px; fill: var(--muted); text-anchor: middle; }
.fb-p { cursor: pointer; }
.fb-p circle { fill: var(--panel); stroke: var(--accent); stroke-width: .6; }
.fb-p.on circle { fill: var(--accent); }
.fb-p.on .fb-no { fill: var(--accent-ink); }
.fb-p.pick circle { stroke: #f59e0b; stroke-width: 1; }
.fb-p:hover circle { stroke-width: 1; }
/* 記録: 位置を置いたあと、ピッチ図の中に出す「誰が」の一覧 (一覧の中だけスクロール) */
.tp-wrap { position: relative; }
.whoP { position: absolute; top: 8px; bottom: 8px; width: 150px; max-width: 42%; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); overflow: hidden; z-index: 2; }
.whoP[hidden] { display: none; }
.whoP.l { left: 8px; } .whoP.r { right: 8px; }
.whoP .wh { padding: 6px 10px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.whoP .wh .sub { font-weight: 400; font-size: 11px; }
.whoP .wl { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.whoP .wi { display: flex; gap: 8px; align-items: center; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 14px; user-select: none; }
.whoP .wi:last-child { border-bottom: none; }
.whoP .wi:hover { background: var(--soft); }
.whoP .wi.on { background: var(--accent); color: var(--accent-ink); }
.whoP .wi b { min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.fb-no { font-size: 3.6px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.fb-nm { font-size: 2.4px; text-anchor: middle; fill: var(--ink); }
.chip.pick { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.3); }
.chainbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; padding: 8px; border-radius: 8px; background: var(--soft); border: 1px dashed var(--accent); }
.drill { background: var(--soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; border-left: 4px solid var(--accent); }
svg.invsvg { width: 100%; height: auto; display: block; }

/* ---- 分析レポート ---- */
.report .rep-sum p { margin: 6px 0; font-size: 14px; }
.rep-box { background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.rep-box h3 { margin-top: 0; }
.rep-box.issues { border-left: 4px solid #f97066; }
.rep-box.strengths { border-left: 4px solid #2fa56b; }
.iss { padding: 6px 0; border-bottom: 1px solid var(--line); }
.iss:last-child { border-bottom: none; }
.iss .lv { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; margin-right: 8px; color: #fff; }
.lv3 { background: #d92d20; } .lv2 { background: #f79009; } .lv1 { background: #98a2b3; }
.rep-detail { margin-top: 12px; }
.rep-detail h3 { margin: 12px 0 4px; }
.drill > div { margin-top: 3px; line-height: 1.55; }
.causes { margin-top: 4px; font-size: 12.5px; }
.causes ol { margin: 4px 0 2px; padding-left: 20px; }
.causes li { margin-bottom: 4px; }
.causes .pid { font-size: 10.5px; opacity: .6; margin-left: 3px; }
.deep { margin: 4px 0 2px; padding-left: 18px; font-size: 12.5px; line-height: 1.55; }
.deep:empty { display: none; }
.deep li::marker { content: "▸ "; color: var(--accent); }
.deep li.who { opacity: .85; }
.deep li.who::after { content: "（コーチ用）"; font-size: 10.5px; margin-left: 4px; opacity: .7; }
.causes .hit { display: inline-block; font-size: 10.5px; padding: 0 6px; margin-right: 5px; border-radius: 99px; background: #039855; color: #fff; }
.sdeep .tablewrap { margin-top: 6px; }
.sdeep h3 { margin: 14px 0 4px; }
.sdeep .note { font-size: 12px; margin-top: 4px; }
.dfb { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dfb .btn { padding: 3px 10px; font-size: 12px; }
.dfb .btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.dfb .n { font-weight: 700; }
/* ---- 記録タブ: 動画をできるだけ大きく (画面の幅いっぱい・動画は画面の高さに合わせて固定) ---- */
body[data-tab="tag"] main { max-width: none; }
body[data-tab="tag"] .tagger { grid-template-columns: minmax(0, 2.1fr) minmax(420px, 1fr); }
body[data-tab="tag"] .tagger > section:first-child { position: sticky; top: 60px; max-height: calc(100vh - 72px); overflow-y: auto; }
body[data-tab="tag"] #tv { max-height: calc(100vh - 190px); object-fit: contain; }
@media (max-width: 1000px) { body[data-tab="tag"] .tagger { grid-template-columns: minmax(0, 1fr); } body[data-tab="tag"] .tagger > section:first-child { position: static; max-height: none; } }
/* ---- 個人シート: 名前を押して一覧に戻る ---- */
.pback { cursor: pointer; border-radius: 8px; padding: 2px 8px 2px 4px; }
.pback:hover { background: var(--soft); }
.pback .pback-i { color: var(--accent); font-size: .8em; }
tr.flash td { background: color-mix(in srgb, var(--accent) 20%, transparent) !important; transition: background .3s; }
/* ---- 選手の通算 (シーズン) ---- */
.sp-ov { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; overflow-y: auto; }
.sp-box { width: min(1100px, 100%); }
.sp-in .sp { margin-top: 4px; }
#sBody tr[data-pi] { cursor: pointer; }
#sBody tr[data-pi]:hover td { background: var(--soft); }
/* ---- フォーメーション・メンバー変更 ---- */
.lnedit { padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--soft); }
.lnedit .fb-p { cursor: pointer; }
.lngrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 8px; align-items: start; }
.lnedit .fb-p.empty circle { fill: transparent; stroke-dasharray: 1 1; }
/* ---- 選手の変更 ---- */
.pedit { cursor: pointer; }
.pedit .pen { color: var(--muted); font-size: 11px; opacity: .5; }
.pedit:hover .pen { opacity: 1; color: var(--accent); }
.psel { max-width: 180px; }
.reas { margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--soft); }
/* ---- コーチ用・シーズン ---- */
.coach-note { border-left: 4px solid #7a5af8; }
.rbadge { display: inline-block; min-width: 38px; text-align: center; color: #fff; font-weight: 700; border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.cbar { display: inline-block; width: 70px; height: 9px; background: var(--soft); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.cbar i { display: block; height: 100%; }
.flag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.flag.lv3 { background: #fee4e2; color: #b42318; } .flag.lv2 { background: #fef0c7; color: #b54708; } .flag.lv1 { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flag.lv3 { background: #3d1612; color: #fda29b; } :root:not([data-theme="light"]) .flag.lv2 { background: #3d2a0c; color: #fec84b; } }
tr.det td { background: var(--soft); white-space: normal; text-align: left !important; }
.parts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.parts .pp { background: #dcfae6; color: #067647; border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.parts .pm { background: #fee4e2; color: #b42318; border-radius: 99px; padding: 1px 8px; font-size: 12px; }
ol.grank { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.season-link { border-left: 4px solid var(--accent); }

/* ---- チームづくり (app_club.js) ---- */
.chip.mini { padding: 1px 7px; font-size: 11px; }
.chip.st { box-shadow: inset 0 -3px 0 #f5b301; }
.chip.style { cursor: default; background: #e8f3ec; border-color: #9fd3b4; color: #17663a; }
.sqchips .chip .sub { font-size: 10px; }
.pd-f { margin: 6px 0; } .pd-f > .sub { display: block; font-size: 11.5px; }
.pd-form { margin-top: 12px; padding: 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--panel); }
.pd-form textarea, .mt-ta { width: 100%; font: inherit; }
ol.drills { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.prop { background: var(--panel); border: 1px solid var(--line); }
.prop.prop-l0 { border-left: 4px solid #2fa56b; } .prop.prop-l1 { border-left: 4px solid #3b82f6; } .prop.prop-l2 { border-left: 4px solid #f79009; }
.prop-t { font-weight: 700; font-size: 15px; margin-top: 6px; }
/* 狭いところでは自動で縦に並ぶグリッド */
.cg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.cg.small { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.sbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.sbar > span:first-child, .sbar > b:first-child { min-width: 9em; }
.st-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.st-row .st-why { font-size: 11.5px; }
.twgrid .tw { border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--panel); }
.lanebar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; margin-top: 4px; font-size: 10px; }
.lanebar span { display: flex; align-items: center; justify-content: center; color: #fff; white-space: nowrap; overflow: hidden; }
.lanebar .ln-左 { background: #3b82f6; } .lanebar .ln-中央 { background: #7c3aed; } .lanebar .ln-右 { background: #0ea5e9; }
/* 作戦ボード */
.board-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .board-wrap { grid-template-columns: minmax(0, 1fr); } }
.bl-item { display: flex; justify-content: space-between; gap: 6px; padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.bl-item:hover { background: var(--soft); } .bl-item.on { border-color: var(--accent); background: var(--soft); }
.board-tools { flex-wrap: wrap; }
.board-cv { margin: 8px 0; touch-action: none; user-select: none; }
.board-cv svg, .mt-board svg { width: 100%; height: auto; display: block; }
svg.board-pitch .bg { fill: #2f8f4e; } svg.board-pitch .ln { stroke: rgba(255,255,255,.85); }
svg.board-pitch [data-i] { cursor: grab; } svg.board-pitch .b-sel { filter: drop-shadow(0 0 1.2px #fde047); }
/* ミーティング資料 */
.mt-doc { display: grid; gap: 16px; }
.mt-page { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 8px; padding: 22px 28px; aspect-ratio: 297 / 210; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.mt-page .sub { color: #667085; }
.mt-h { display: flex; justify-content: space-between; border-bottom: 3px solid #177245; padding-bottom: 6px; font-size: 22px; font-weight: 800; }
.mt-cover { display: flex; flex-direction: column; gap: 12px; justify-content: center; flex: 1; }
.mt-title { font-size: 28px; font-weight: 800; border: 0; border-bottom: 1px dashed #ccc; background: transparent; color: #111; }
.mt-score { font-size: 30px; } .mt-score b { font-size: 44px; margin: 0 10px; }
.mt-lead { font-size: 15px; line-height: 1.7; }
.mt-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mt-kpi { border: 1px solid #e4e7ec; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.mt-kpi b { font-size: 26px; }
.mt-bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.mt-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; }
.mt-bar i { width: 70%; background: #2fa56b; border-radius: 4px 4px 0 0; min-height: 2px; }
.mt-list { font-size: 15px; line-height: 1.6; } .mt-list li { margin: 4px 0; }
.mt-board { display: inline-block; width: calc(50% - 8px); vertical-align: top; margin-right: 8px; }
.mt-scenes td { font-size: 14px; cursor: pointer; }
.mt-ta { border: 1px dashed #c8ccd2; border-radius: 6px; padding: 6px 8px; background: #fffef5; color: #111; }
.mt-ta-print { font-size: 15px; line-height: 1.6; white-space: normal; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body.mt-print * { visibility: hidden !important; }
  body.mt-print #mtDoc, body.mt-print #mtDoc * { visibility: visible !important; }
  body.mt-print #mtDoc { position: absolute; left: 0; top: 0; width: 100%; display: block; }
  body.mt-print .mt-page { border: 0; border-radius: 0; page-break-after: always; break-after: page; aspect-ratio: auto; height: 190mm; padding: 0; }
  body.mt-print .mt-ta { display: none !important; }
  body.mt-print main, body.mt-print .vside { margin: 0 !important; }
}
.st-t td { white-space: normal !important; vertical-align: top; } .st-t td:nth-child(2) { white-space: nowrap !important; } .st-t td:nth-child(3) { font-size: 11.5px; min-width: 120px; }
.mt-scenes td, .twgrid .sub { white-space: normal; }

/* ---- ロールの説明 (押すとふわっと出る) ---- */
.rpop { position: absolute; z-index: 80; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; line-height: 1.6; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.rpop.show { opacity: 1; transform: none; }
.rpop-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.chip.style[data-role] { cursor: pointer; }
.pd-who { font-size: 16px; font-weight: 800; padding: 6px 10px; border-radius: 8px; background: var(--soft); margin-bottom: 6px; }
.pd-who span { font-size: 13px; font-weight: 400; color: var(--muted); }
.pd-grp { border-top: 1px solid var(--line); padding: 6px 0; } .pd-grp summary { cursor: pointer; font-weight: 700; }
.pd-selected .chip { cursor: pointer; }
.g-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .g-pick select { font-size: 15px; padding: 6px 8px; min-width: 240px; }
.pd-part { margin: 12px 0 2px; font-weight: 800; font-size: 13px; color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* ---- 個人シート: タイルと図を大きく（下にスクロールが増えても、見やすさを優先） ---- */
#pdetail .grid.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
#pdetail .kpi { padding: 14px 16px; border-radius: 10px; }
#pdetail .kpi.kpbox { background: var(--soft); }
#pdetail .kpi .v { font-size: 30px; line-height: 1.2; }
#pdetail .kpi .l { font-size: 13.5px; }
#pdetail .grid.g2 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
#pdetail svg.pitch, #pdetail .pitchwrap svg, #pdetail canvas { width: 100%; height: auto; max-width: 1000px; display: block; margin: 0 auto; }
#pdetail h3 { font-size: 16px; margin-top: 14px; }

/* 作戦ボード: 道具のボタンを大きく・使い方の案内 */
.board-tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.board-tools button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.board-tools button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.board-hint { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: #e8f3ec; color: #17663a; font-size: 13px; }
.board-sel { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 32px; padding: 4px 0; }
.bcol { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; } .bcol.on { border-color: var(--ink); }
.board-cv { cursor: crosshair; }
/* 作戦ボード: コマ (アニメーション) の操作盤・ピッチの色 */
.anim-bar { background: #1f2937; color: #e5e7eb; border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.anim-bar .ab-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.anim-bar label { font-size: 12px; color: #d1d5db; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.ab-b { background: #374151; color: #fff; border: 0; border-radius: 6px; min-width: 30px; height: 28px; padding: 0 8px; font-size: 14px; cursor: pointer; }
.ab-b:hover { background: #4b5563; } .ab-del { font-size: 12px; }
.ab-play { background: #16a34a; color: #fff; border: 0; border-radius: 6px; padding: 0 16px; height: 30px; font-weight: 700; cursor: pointer; }
.ab-play.on { background: #dc2626; }
.ab-step { background: #2563eb; color: #fff; border: 0; border-radius: 6px; padding: 0 12px; height: 30px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ab-step:hover { background: #1d4ed8; }
.ab-add { background: #fde047; color: #111; border: 0; border-radius: 6px; padding: 0 12px; height: 30px; font-weight: 700; cursor: pointer; }
.ab-no { font-size: 13px; min-width: 76px; text-align: center; }
.ab-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.bf-th { position: relative; flex: 0 0 104px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; }
.bf-th svg { width: 100%; height: auto; display: block; border-radius: 4px; pointer-events: none; }
.bf-th span { position: absolute; left: 3px; top: 2px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; }
.bf-th.on { border-color: #fde047; }
.bf-add { flex: 0 0 72px; border: 2px dashed #6b7280; background: none; color: #fde047; font-size: 22px; line-height: 1; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bf-add small { font-size: 10px; color: #d1d5db; }
.ab-help { font-size: 12px; color: #d1d5db; margin-top: 4px; }
.pcs { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); padding: 0; cursor: pointer; }
.pcs.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
/* 作戦ボード: 左の列に道具・コマ・選んだものの設定 (スクロールしても付いてくる) */
.board-wrap { grid-template-columns: 250px minmax(0, 1fr); gap: 12px; }
.board-list { position: sticky; top: 58px; max-height: calc(100vh - 66px); overflow-y: auto; padding: 10px; }
.bl-scroll { max-height: 66px; overflow-y: auto; margin-top: 6px; }
.bl-scroll .bl-item { padding: 4px 8px; }
.bl-h { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.bl-h b { color: var(--ink); }
.board-tools.bt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.board-tools.bt-grid button { padding: 4px 3px; font-size: 11px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-list .board-hint { font-size: 12px; padding: 5px 8px; }
.bt-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.bt-frames .ab-play, .bt-frames .ab-add { height: 30px; }
.bt-frames .btn.sm { padding: 3px 6px; }
.bt-frames .ab-play, .bt-frames .ab-add { white-space: nowrap; padding: 0 6px; font-size: 13px; }
.bf-add small { white-space: nowrap; }
.bt-frames #bDelF { grid-column: 1 / -1; }
.board-list .board-sel { flex-direction: row; gap: 6px; align-items: center; font-size: 12px; min-height: 0; padding: 0; }
.board-list .board-sel .board-hint { margin-top: 0; width: 100%; }
.board-list .board-sel input[type=text] { max-width: 150px; }
.anim-bar .ab-help { font-size: 11px; color: #d1d5db; }
.board-cv { margin: 6px 0; }
@media (max-width: 900px) { .board-list { position: static; max-height: none; } }
.anim-bar { padding: 6px 8px; }
.anim-bar .ab-row { flex-wrap: nowrap; }
.anim-bar .ab-thumbs { flex: 1 1 auto; min-width: 0; margin-top: 0; padding-bottom: 2px; }
.anim-bar .bf-th { flex-basis: 68px; }
.anim-bar .bf-add { flex-basis: 56px; }
.anim-bar .ab-opts { display: flex; flex-direction: column; gap: 2px; flex: none; }
.bt-help { font-size: 11px; color: var(--muted); margin-top: 4px; }
.board-cv svg { max-height: calc(100vh - 205px); }
@media (max-width: 1100px) { .anim-bar .ab-row { flex-wrap: wrap; } }
.mt-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }

/* ミーティング資料: 手順・ページ番号・シュートの場所・スライド表示 */
.mt-steps { margin: 6px 0 0; padding-left: 20px; }
.mt-page { position: relative; }
.mt-pno { position: absolute; right: 16px; bottom: 10px; font-size: 11px; color: #98a2b3; }
.mt-shotmap svg { width: 100%; max-height: 120mm; }
.mt-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; align-items: center; }
.mt-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; margin-right: 4px; vertical-align: middle; }
.mt-show { position: fixed; inset: 0; z-index: 200; background: #0b1220; display: flex; flex-direction: column; align-items: center; }
.mt-show .mt-stage { flex: 1; width: 100%; display: flex; justify-content: center; padding-top: 10px; overflow: hidden; }
.mt-show .mt-page { box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.mt-show .mt-nav { height: 50px; display: flex; gap: 12px; align-items: center; color: #fff; }
.mt-show .mt-nav button { background: #1f2a44; color: #fff; border: 1px solid #334155; border-radius: 8px; padding: 6px 14px; cursor: pointer; font-size: 15px; }

/* 見出しの横に長い説明があっても、見出しが縦に細くならないように (狭いときは説明を次の行へ) */
.panel > .row, section > .row, .row.wrap { flex-wrap: wrap; }
.row > h2 { min-width: min(100%, 11em); }
.row > h2 + .sub, .row > h2 ~ .sub { flex: 1 1 260px; }

/* ---- チーム分析: 図とタイルを大きく（個人シートと同じ考え方。スクロールが増えても見やすさを優先） ---- */
body[data-tab="team"] #tab .grid.g2, body[data-tab="team"] #tab .grid.g3 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
body[data-tab="team"] #tab .grid.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
body[data-tab="team"] #tab .kpi { padding: 14px 16px; border-radius: 10px; }
body[data-tab="team"] #tab .kpi .v { font-size: 30px; line-height: 1.2; }
body[data-tab="team"] #tab .kpi .l { font-size: 13.5px; }
body[data-tab="team"] #tab svg.pitch { width: 100%; height: auto; max-width: 1000px; display: block; margin: 0 auto; }
body[data-tab="team"] #tab .cg.small { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
body[data-tab="team"] #tab .cg { grid-template-columns: minmax(0, 1fr); }
/* 時間帯ごとのパスと攻め: 1 行に 2 個（狭い画面では 1 個） */
.cg.twgrid, body[data-tab="team"] #tab .cg.small.twgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .cg.twgrid, body[data-tab="team"] #tab .cg.small.twgrid { grid-template-columns: minmax(0, 1fr); } }
body[data-tab="team"] #tab h3 { font-size: 16px; }
body[data-tab="team"] #tab table.t td, body[data-tab="team"] #tab table.t th { font-size: 13.5px; }

/* ================= コーチへの提案 (原理原則・スタイル・練習の記録・ノート) */
.pl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pl-bar .seg { flex-wrap: wrap; }
.pl-sel { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.pl-stsel { display: grid; gap: 8px; }
.pl-stsel .chip { font-size: 14px; padding: 5px 12px; }
.pl-sthead { border-left: 5px solid var(--accent); }
.pl-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.pl-phase { border-radius: 10px; padding: 10px 12px; background: var(--soft); border-top: 4px solid #94a3b8; font-size: 14px; line-height: 1.6; }
.pl-phh { font-weight: 800; margin-bottom: 4px; }
.pl-phase.ph-a { border-top-color: #2563eb; } .pl-phase.ph-d { border-top-color: #dc2626; } .pl-phase.ph-td { border-top-color: #f59e0b; } .pl-phase.ph-ta { border-top-color: #16a34a; }
.pl-ph { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; color: #fff; background: #64748b; vertical-align: middle; white-space: nowrap; }
.pl-ph.ph-a { background: #2563eb; } .pl-ph.ph-d { background: #dc2626; } .pl-ph.ph-td { background: #d97706; } .pl-ph.ph-ta { background: #16a34a; }
.pl-ph.ph-sa { background: #7c3aed; } .pl-ph.ph-sd { background: #9d174d; }
.pl-plist { display: grid; gap: 6px; }
.pl-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
.pl-row:hover { border-color: var(--accent); }
.pl-rt { flex: 1; min-width: 0; line-height: 1.5; }
.pl-id { font-weight: 800; font-size: 12px; color: var(--accent); background: var(--soft); border-radius: 6px; padding: 2px 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.pl-plink { background: var(--soft); }
.chip.pl-plink:hover { border-color: var(--accent); }
.pl-acc { margin: 6px 0; }
.pl-acc > summary { list-style: none; cursor: pointer; }
.pl-acc > summary::-webkit-details-marker { display: none; }
.pl-acc[open] > summary .pl-row { border-color: var(--accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.pl-accb { border: 1px solid var(--accent); border-top: none; border-radius: 0 0 10px 10px; padding: 10px 12px; }
.pl-detail { line-height: 1.65; font-size: 14px; }
.pl-detail h4 { margin: 14px 0 6px; font-size: 14px; }
.pl-def, .pl-aim { margin: 6px 0; } .pl-def b, .pl-aim b { margin-right: 6px; color: var(--accent); }
.pl-team { background: rgba(250, 204, 21, .14); border-left: 4px solid #eab308; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.pl-team b { display: block; margin-bottom: 2px; }
.pl-tbl td, .pl-tbl th { white-space: normal; }
.pl-wrap { white-space: normal !important; }
.pl-ages th { width: 13em; color: var(--muted); font-weight: 600; cursor: default; position: static; vertical-align: top; }
.pl-ages tr.pl-age-on td, .pl-ages tr.pl-age-on th { background: rgba(37, 99, 235, .1); color: inherit; font-weight: 700; }
.pl-mis { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pl-bad { display: block; } .pl-fix { display: block; color: #15803d; font-weight: 600; }
.pl-steps { display: grid; gap: 8px; }
.pl-step { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.pl-step.main { border-color: var(--accent); border-width: 2px; }
.pl-sn { display: inline-block; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 99px; padding: 1px 8px; margin-right: 8px; }
.pl-kv { margin-top: 6px; } .pl-kv > span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.pl-kv ul { margin: 2px 0 0; padding-left: 18px; }
.pl-edit { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pl-edit > summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.pl-edit textarea, .pl-edit input[type=text] { width: 100%; }
.pl-chk { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0; }
.pl-roles { display: grid; gap: 8px; margin-top: 8px; }
.pl-rg { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.pl-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.pl-day { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.pl-dh { margin-bottom: 4px; } .pl-dh b { display: inline-block; min-width: 2.4em; color: var(--accent); }
.pl-di { margin-top: 6px; font-size: 13px; }
.pl-scg { margin-bottom: 10px; }
.pl-scl { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-sc { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: baseline; color: inherit; }
.pl-sc:hover { border-color: var(--accent); }
.pl-sc span { color: var(--muted); font-size: 12px; }
.pl-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-filter input[type=search] { flex: 1; min-width: 200px; }
.pl-warn { background: rgba(220, 38, 38, .08); border-left: 4px solid #dc2626; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.pl-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.pl-pick select { margin-top: 4px; max-width: 100%; }
.pl-item { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pl-item input[data-k=name] { flex: 2; min-width: 160px; } .pl-item input[data-k=memo] { flex: 1; min-width: 120px; } .pl-item select { max-width: 220px; }
.pl-rec { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; line-height: 1.6; }
.pl-items { margin: 4px 0; padding-left: 20px; }
.pl-bar2 { display: flex; align-items: center; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.pl-up { color: #15803d; font-weight: 700; } .pl-down { color: #dc2626; font-weight: 700; }
.pl-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 3000; display: flex; justify-content: center; align-items: flex-start; padding: 24px 12px; overflow-y: auto; }
.pl-mbox { background: var(--panel); color: var(--ink, inherit); border-radius: 14px; padding: 16px 18px; width: min(920px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.pl-mine .pl-row { background: var(--panel); }
@media (max-width: 640px) { .pl-ages th { width: 7em; } .pl-mbox { padding: 12px; } }
#plBody label.f, #plBody div.f { margin: 8px 0; }
#plBody div.f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
#plBody div.f input, #plBody div.f select, #plBody div.f .chip, #plBody label.f > textarea { color: var(--ink); font-size: 14px; }
#plBody div.f .chip { font-size: 12px; }

/* コーチへの提案: 年代・1週間の流れ・試合から */
.pl-agechip { display: inline-block; background: var(--accent); color: var(--accent-ink, #fff); border-radius: 99px; padding: 1px 10px; font-size: 12px; font-weight: 700; }
.pl-agenow { background: rgba(37, 99, 235, .08); border-left: 4px solid #2563eb; border-radius: 8px; padding: 8px 10px; font-weight: 600; }
.pl-other { margin-top: 6px; } .pl-other > summary { cursor: pointer; }
.pl-wked { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.pl-wkrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; } .pl-wkrow b { width: 1.6em; } .pl-wkrow input { flex: 1; min-width: 160px; }
.pl-day.off { opacity: .55; } .pl-day.match { background: rgba(37, 99, 235, .12); border: 1px solid rgba(37, 99, 235, .35); }
.pl-flow { margin: 6px 0; padding-left: 18px; font-size: 13px; } .pl-flow li span { margin-right: 6px; } .pl-flow li b { color: var(--accent); }
.pl-wwarn { font-size: 12px; color: #b45309; font-weight: 700; margin-top: 4px; }
.pl-dmemo { margin-top: 6px; font-size: 12px; border-top: 1px dashed var(--line); padding-top: 4px; }
.pl-head { font-size: 15px; line-height: 1.7; }
.pl-issue { border: 1px solid var(--line); border-left: 5px solid #94a3b8; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.pl-issue.lv-3 { border-left-color: #dc2626; } .pl-issue.lv-2 { border-left-color: #f59e0b; }
.pl-ip { display: grid; gap: 4px; margin-top: 6px; }
.pl-sug { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.pl-sug.top { border: 2px solid var(--accent); }
.pl-ages-set { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0; }

/* コーチへの提案: 攻撃 × 守備 の組み合わせ */
.pl-concept { font-size: 15px; font-weight: 700; margin-top: 4px; }
.pl-fit { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.pl-fit.fit3, .pl-mx td.fit3 { background: rgba(22, 163, 74, .15); color: #15803d; }
.pl-fit.fit2, .pl-mx td.fit2 { background: rgba(37, 99, 235, .1); color: #1d4ed8; }
.pl-fit.fit1, .pl-mx td.fit1 { background: rgba(245, 158, 11, .15); color: #b45309; }
.pl-mx td { text-align: center !important; font-size: 16px; font-weight: 800; cursor: pointer; }
.pl-mx td.on { outline: 3px solid var(--accent); outline-offset: -3px; }
.pl-mx td.cu { text-decoration: underline; }
.pl-mx th { cursor: default; font-size: 12px; white-space: normal; }
.pl-tag { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 6px; white-space: nowrap; color: #fff; }
.pl-tag.att { background: #2563eb; } .pl-tag.def { background: #dc2626; } .pl-tag.bridge { background: #7c3aed; }
.pl-combos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px; }

/* ゴールをキーパスより目立たせる (色だけ・大きさは同じ) */
.badge.kp { background: #fff4cc; color: #7a5700; box-shadow: none; }
.badge.goal { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; font-weight: 800; box-shadow: 0 0 6px rgba(220, 38, 38, .55); }
.kpi.goal { background: linear-gradient(135deg, #fff1f1, #fecaca 60%, #fff1f1); border: 1px solid #ef4444; border-radius: 8px; padding: 8px 10px; box-shadow: 0 0 10px rgba(239, 68, 68, .35); }
.kpi.goal .v, .kpi.goal .l { color: #991b1b; }
/* データ → 分析・ハイライト */
.da-head .seg button { white-space: nowrap; }
.da-hl { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 12px; align-items: start; }
.da-hlv :is(video, .ytv) { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.da-hll { display: grid; gap: 4px; max-height: 72vh; overflow-y: auto; }
.da-hli { display: flex; gap: 8px; align-items: baseline; text-align: left; border: 1px solid var(--line); background: var(--panel); color: inherit; border-radius: 8px; padding: 6px 8px; cursor: pointer; font-size: 13px; }
.da-hli:hover, .da-hli.on { border-color: var(--accent); }
.da-hli.on { box-shadow: 0 0 0 2px var(--accent) inset; }
.da-hli.goal { background: #fee2e2; } .da-hli.goal span:last-child { color: #b91c1c; font-weight: 800; }
.da-hli.conc { background: #f1f5f9; } .da-hli.key span:last-child { color: #7a5700; } .da-hli.scene { background: rgba(124, 58, 237, .07); }
@media (max-width: 900px) { .da-hl { grid-template-columns: 1fr; } }

/* 長い一覧を短く (ほか n / タップで出す) */
.more-btn { border: 1px solid var(--line); background: var(--soft); color: var(--accent); border-radius: 99px; padding: 1px 8px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.more-btn:hover { border-color: var(--accent); }
.tap-body { margin-top: 4px; white-space: normal; min-width: 180px; max-width: 320px; font-size: 13px; line-height: 1.5; }
.more-rest.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; } .more-rest.chips[hidden] { display: none; }
/* チーム分析のシュートのタイル: ゴール数を大きく */
.kv-goal { margin-left: 10px; }

/* 記録の一覧: ピンチ・即時奪回の行 */
tr.pinch-row td { background: #fef2f2; } tr.cpw-row td { background: #ecfdf5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) tr.pinch-row td { background: #3a1f22; } :root:not([data-theme="light"]) tr.cpw-row td { background: #1b3328; } }
.da-hli.pinch { background: #fef2f2; } .da-hli.cpw { background: #ecfdf5; }
/* コーナーの行き先 (ニア・ミドル・ファー) と決定率: 左 = 落ちた場所の図、右 = 行き先ごとの縦の棒と表 */
.cz { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }   /* 幅が足りないときは棒グラフを図の下に回す (横にはみ出さない) */
.cz > svg { flex: 1 1 200px; max-width: 320px; min-width: 0; } .cz > div { flex: 1 1 300px; max-width: 640px; min-width: 0; }
.czv { display: flex; gap: 14px; align-items: flex-end; height: 200px; padding: 18px 4px 0; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.czv-g { flex: 1; max-width: 110px; height: 100%; display: flex; flex-direction: column; }
.czv-bars { flex: 1; display: flex; gap: 4px; align-items: flex-end; justify-content: center; }
.czv-b { width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; position: relative; }
.czv-b.sh { background: #2fa56b; } .czv-b.gl { background: #d4a017; }
.czv-b span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.czv-l { display: flex; flex-direction: column; align-items: center; font-size: 12px; padding-top: 4px; margin-bottom: -40px; }
/* 位置の図を大きく (試合ごとの守備の図) */
/* 守備・奪取・ロストの図: チーム全体のパスマップと同じ大きさ (欄の横幅いっぱい) */
.bigmap { width: 100%; }
/* パスマップと守備・奪取・ロストの図: コートの比率はそのまま、画面の高さに合わせて 1 画面にコートの端まで収める大きさ
   (ピッチの図の縦横比 = 111:77 ≒ 1.44。見出し・チェック・説明・上のメニューのぶん 240px をあける)
   「分析」(#/analysis) と試合の「チーム分析」タブのどちらでも効くように #app から書く */
body #app #tMap svg.pitch, body #app .bigmap svg.pitch { max-width: min(1000px, max(320px, calc((100vh - 240px) * 1.44))); margin: 0 auto; }
/* 上のメニューの「分析」(#/analysis) は動画が横にないので、上の大きさの 1.5 倍まで (欄の横幅を超えない) */
body #app #anBody #tMap svg.pitch, body #app #anBody .bigmap svg.pitch { max-width: min(1500px, max(480px, calc((100vh - 240px) * 2.16))); }
/* 図の絞り込みのチェック (守備・奪取・ロスト) */
.mfilt { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 8px 0; }
.mfilt .g { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.mfilt label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; }
.mfilt label.zero { opacity: .5; }
.mfilt .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
/* シーズンのシュート: 左 = 打った位置、右 = ゴールの正面 (大きく) */
.sm-shots { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 700px) { .cz, .sm-shots { grid-template-columns: 1fr; } }
/* シーズン: 戦績の推移 (○△● とスコアの並び・古い順で右が新しい) */
.resstrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px; }
.resstrip .res { flex: 0 0 auto; min-width: 58px; max-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; text-align: center; }
.resstrip .res b { font-size: 18px; line-height: 1.1; }
.resstrip .res .sub { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resstrip .res.win { border-color: #2fa56b; } .resstrip .res.win b { color: #2fa56b; }
.resstrip .res.lose { border-color: var(--err); } .resstrip .res.lose b { color: var(--err); }
.resstrip .res.draw b { color: var(--muted); }
.resstrip .res:hover { background: var(--soft); }

/* 練習の作戦ボード (練習の記録のメニューごと): 画面いっぱいに重ねて開く・これまでの練習では小さく出して再生 */
html.pl-bov-on, html.pl-bov-on body { overflow: hidden; }
.pl-bov { position: fixed; inset: 0; z-index: 1000; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; }
.pl-bov-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 0; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.pl-bov-head b { font-size: 16px; }
.pl-bov .board-list { top: 56px; max-height: calc(100vh - 66px); }
.pl-bov .board-cv svg { max-height: calc(100vh - 215px); }
.pl-bd { margin: 4px 0 6px; max-width: 380px; }
.pl-bcv svg { width: 100%; height: auto; display: block; border-radius: 6px; }
/* 選手の通算・ランキング (シーズン): 見出しで並べ替え */
table.rank th.sk { cursor: pointer; user-select: none; white-space: nowrap; }
table.rank th.sk:hover { color: var(--accent, #2fa56b); }
table.rank th.sk.on, table.rank td.on { background: rgba(47, 165, 107, .12); font-weight: 700; }
table.rank tbody tr { cursor: pointer; }
