/* 公開ツール(実績・当日予想・会員)専用の追加スタイル。
   トークンとヘッダ/フッタは competition.css をそのまま使い、ここでは
   「計器」らしい表示部品 — 数値タイル、SVGチャート枠、出走表 — だけを足す。 */

.tool-head { padding: clamp(34px, 5vw, 60px) 0 clamp(20px, 3vw, 30px); }
.tool-head h1 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.25; font-weight: 700; }
.tool-head .lead { margin-top: 14px; font-size: 1.02rem; color: var(--text-2); max-width: 58ch; }
.tool-head .meta { margin-top: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* 数値タイル。scale contrast で「数字が主役」を作る */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); margin-top: 8px; }
.tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px 18px; }
.tile .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-family: var(--font-mono); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 600;
  line-height: 1.15; margin-top: 8px; color: var(--text); font-variant-numeric: tabular-nums; }
.tile .v.pos { color: #34D399; }
.tile .v.neg { color: #F0A6A6; }
.tile .ci { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.tile .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 計器パネル(チャート・表の外枠) */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 20px; margin-top: 26px; }
.panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px; }
.panel h2, .panel h3 { font-size: 1rem; margin: 0; max-width: none; }
.panel .hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.chart-scroll { overflow-x: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 10px; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px;
  vertical-align: middle; }

/* データ表 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0; min-width: 560px; }
table.data th, table.data td { border-bottom: 1px solid var(--border); border-top: none; border-left: none;
  border-right: none; padding: 9px 10px; text-align: left; white-space: nowrap; }
table.data thead th { background: transparent; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; position: sticky; top: 0; }
table.data td.num { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:hover { background: rgba(255,255,255,.025); }
table.data tr.is-winner { background: rgba(52,211,153,.08); }
table.data tr.is-winner td:first-child { box-shadow: inset 2px 0 0 #34D399; }

/* 枠番(競艇の艇色) */
.post { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.post-1 { background: #E9EDF2; color: #0E1116; }
.post-2 { background: #1B2027; color: #E6EAF0; border: 1px solid #3A4350; }
.post-3 { background: #E0524F; color: #fff; }
.post-4 { background: #3B82F6; color: #fff; }
.post-5 { background: #EBC24B; color: #0E1116; }
.post-6 { background: #3FAE6A; color: #fff; }

/* 確率バー */
.bar { display: block; width: 92px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.07);
  overflow: hidden; margin-top: 5px; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.market > i { background: #64748B; }
.gap-pos { color: #34D399; }
.gap-neg { color: #F0A6A6; }
.gap-nil { color: var(--muted); }

/* レースカード */
.race { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-top: 14px;
  overflow: hidden; }
.race > summary { cursor: pointer; padding: 13px 16px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; list-style: none; font-size: 14px; }
.race > summary::-webkit-details-marker { display: none; }
.race > summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 18px;
  margin-left: auto; }
.race[open] > summary::after { content: "−"; }
.race > summary .venue { font-weight: 600; }
.race > summary .rno { font-family: var(--font-mono); color: var(--accent); font-size: 12.5px; }
.race > summary .title { font-size: 12px; color: var(--muted); }
.race > summary .top { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.race .body { padding: 0 16px 16px; }

/* 日付選択 */
.datebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.datebar label { font-size: 12px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .06em;
  text-transform: uppercase; }
.datebar select, .datebar input[type="email"] { background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-family: var(--font-mono);
  font-size: 13.5px; }
.datebar select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pill { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--text-3); }
.pill.paid { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); color: var(--accent); }
.pill.done { border-color: rgba(52,211,153,.4); color: #34D399; }

/* ペイウォール */
.paywall { border: 1px solid color-mix(in oklab, var(--accent) 34%, var(--border)); border-radius: var(--radius);
  background: linear-gradient(140deg, color-mix(in oklab, var(--accent) 9%, transparent), color-mix(in oklab, var(--accent-2) 9%, transparent));
  padding: 26px 24px; margin-top: 22px; }
.paywall h2 { font-size: 1.14rem; max-width: 28ch; }
.paywall p { font-size: 14px; color: var(--text-2); max-width: 54ch; }
.paywall .price { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600; color: var(--text);
  margin: 12px 0 2px; }
.paywall .price small { font-size: 13px; color: var(--text-3); font-weight: 400; }
.skeleton { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.skeleton i { display: block; height: 38px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); }

/* フォーム */
/* .btn-ghost / .btn-cta を <button> に使うページ(会員の契約状況など)向けに、
   ブラウザ既定の枠と背景だけを打ち消す。font-size は元のクラス指定を残す。 */
button.btn-ghost { background: transparent; border: none; border-bottom: 1px solid transparent;
  font-family: inherit; cursor: pointer; }
.tool-form form { margin: 0; }
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.tool-form input[type="email"] { flex: 1 1 240px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; font-size: 14px; }
.tool-form .note-inline { font-size: 12px; color: var(--muted); flex-basis: 100%; margin: 0; }

.empty { border: 1px dashed var(--border); border-radius: 12px; padding: 22px; text-align: center;
  color: var(--muted); font-size: 13.5px; margin-top: 16px; }
.err { border: 1px solid rgba(224,82,79,.45); background: rgba(224,82,79,.08); border-radius: 10px;
  padding: 13px 16px; font-size: 13.5px; color: #F0A6A6; margin-top: 16px; }

.method dt { font-weight: 600; color: var(--text); margin-top: 16px; font-size: 14.5px; }
.method dd { margin: 4px 0 0; color: var(--text-3); font-size: 14px; }
.method dl { margin: 0; }

.disclaimer { margin-top: 30px; border-left: 3px solid var(--muted); padding: 4px 0 4px 16px;
  font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
