/* PC 版・スマホ版で共通 (体のデータ・相手の分析・使い方・開発について・メニュー) */
.x-h1 { font-size: 20px; margin: 4px 0 8px; }
.x-spark { width: 100%; height: 74px; display: block; }
.x-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.x-bform { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; align-items: end; margin-bottom: 6px; }
.x-bform input { width: 100%; font-size: 16px; }
.x-bform .x-wide { grid-column: 1 / -1; }
.x-points { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.x-st h2 { color: #b42318; }
.x-wk h2 { color: var(--accent); }
.x-tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.x-guide ol, .x-guide ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.x-guide p { margin: 0 0 8px; }
.x-dl { margin: 0; display: grid; gap: 4px; }
.x-dl dt { font-weight: 700; margin-top: 6px; }
.x-dl dd { margin: 0; color: var(--muted); }
.x-upd { list-style: none; padding: 0 !important; }
.x-ref-url { word-break: break-all; font-size: 12px; }
.note.warn { background: #fef3f2; color: #b42318; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note.warn { background: #3a1714; color: #fda29b; } }
/* 一覧 (スマホ版と同じ見た目) */
.m-list { display: grid; gap: 6px; }
.m-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; color: var(--ink); font: inherit; }
.m-item.static { cursor: default; }
.m-t { flex: none; font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 2px 6px; border: 0; }
.m-l { flex: 1; min-width: 0; display: grid; }
.m-x { border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 8px; }
/* ハンバーガーメニュー */
.x-burger { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; width: 38px; height: 34px; font-size: 18px; cursor: pointer; color: var(--ink); flex: none; }
.x-menu { position: fixed; top: 52px; right: 12px; z-index: 50; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 6px; display: grid; align-content: start;
  max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.x-menu a, .x-menu button { display: block; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.x-menu a:hover, .x-menu button:hover { background: var(--soft); }
.x-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.x-menu .sub { padding: 4px 12px; }

/* 個人のデータ: 目標・プレースタイル / 体のデータ の切り替え */
.x-pview button { font-size: 14px; padding: 6px 14px; }
tr[data-gn].on td { background: var(--soft); font-weight: 700; }

/* サーバーの起動し直しのお知らせ */
.stale-bar { position: sticky; top: 0; z-index: 90; background: #fef0c7; color: #7a2e0e; padding: 8px 40px 8px 14px; font-size: 13px; border-bottom: 1px solid #f79009; }
.stale-bar button { position: absolute; right: 10px; top: 6px; border: 0; background: transparent; font-size: 16px; cursor: pointer; color: inherit; }
/* 集めたデータ（開発者）: 数が少ない組は薄く、全体の行は太く */
tr.rs-small td { opacity: .55; }
tr.rs-total td { font-weight: 700; border-top: 2px solid var(--line); }
/* 個人のデータ: 2 人を比べる (左右に並べる・PC だけ) */
.x-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.x-cmp .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.x-cmp .x-charts { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.x-cmp-pick select { min-width: 200px; }

/* ================================================================ 映像交換 (swap.js) */
/* .sw-head: 見出し / .sw-cols: 左 = 渡す (コードの一覧)・右 = 受け取る */
.sw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; }
.sw-head h2 { margin: 0; font-size: 20px; }
.sw-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .sw-cols { grid-template-columns: 1fr; } }
.sw-give { display: grid; gap: 8px; }
.sw-make { flex-wrap: wrap; gap: 6px; }
.sw-make select { max-width: 280px; }
.sw-make input { flex: 1; min-width: 160px; }
#swCodes { display: grid; gap: 8px; max-height: calc(100vh - 260px); overflow-y: auto; }
.sw-forms { display: grid; gap: 12px; position: sticky; top: 64px; }
.sw-forms .panel { display: grid; gap: 6px; }
.sw-forms select { max-width: 100%; }
.sw-note { font-size: 12px; line-height: 1.6; }
.sw-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; background: var(--bg); }
.sw-item.off { opacity: .55; }
.sw-code { font: 700 20px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 2px; }
.sw-codein { flex: 1; font: 700 18px ui-monospace, Consolas, monospace; letter-spacing: 2px; text-transform: uppercase; }
.sw-qr { display: flex; gap: 10px; align-items: center; }
.sw-qr[hidden] { display: none; }
.sw-qr svg { width: 150px; height: 150px; background: #fff; border-radius: 6px; flex: none; }
.sw-peek { border: 1px solid var(--accent); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; }
.sw-err { color: #e5484d; font-size: 13px; }
.sw-got { border-bottom: 1px solid var(--line); padding: 4px 0; }
#swGot { max-height: 220px; overflow-y: auto; }
.sw-msg { font-size: 13px; white-space: pre-wrap; }
.sw-acts { flex-wrap: wrap; gap: 6px; align-items: center; }
/* お支払いのお知らせ (画面の上) */
.bill-banner { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fff7e0; border: 1px solid #f0c040; color: #5a4300; font-size: 14px; }
.bill-banner.bad { background: #fde8e8; border-color: #e08080; color: #7a1010; }
.bill-banner a { font-weight: 700; }
.bill-banner.demo { background: #e8f4ff; border-color: #7ab3e6; color: #12395e; }
