/* =========================================================
   GACHIIKU — ボートレース データ
   白ベース。装飾は線と面だけで、グラデーション・発光は使わない。
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --bg-3: #eceef1;
  --line: #e2e5ea;
  --line-2: #c9ced6;
  --tx: #16191f;
  --tx-2: #4f5765;
  --tx-3: #8a919c;
  --navy: #12305f;
  --navy-2: #e8edf5;
  --red: #d0272e;
  --red-2: #fbeaea;
  --gold: #c58f00;
  --gold-2: #fff6dc;
  --green: #1e8a4c;
  /* 艇番カラー */
  --l1: #ffffff; --l2: #1b1f27; --l3: #e0262f; --l4: #1f5fd6; --l5: #f2cc12; --l6: #1a9a4f;
  --r: 6px;
  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --num: 'Oswald', 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: 'palt';
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
small { font-size: .78em; }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-top: 4px solid var(--navy);
  border-bottom: 1px solid var(--line);
}
.hdr__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 58px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px;
  background: var(--navy); color: #fff; font-family: var(--num); font-weight: 600; font-size: 20px;
}
.logo__txt { font-family: var(--num); font-weight: 600; font-size: 22px; letter-spacing: .04em; line-height: 1; display: flex; flex-direction: column; color: var(--navy); }
.logo__txt small { font-family: var(--font); font-size: 10px; font-weight: 500; letter-spacing: .08em; color: var(--tx-3); margin-top: 3px; }
.nav { display: flex; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 16px; font-size: 14px; font-weight: 700; color: var(--tx-2);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--navy); }
.nav a.is-active { color: var(--navy); border-bottom-color: var(--navy); }
.hdr__clock { margin-left: auto; font-family: var(--num); font-size: 20px; font-weight: 500; color: var(--tx); }
.hdr__clock small { font-family: var(--font); font-size: 11px; color: var(--tx-3); margin-right: 6px; }

.ticker { display: flex; align-items: stretch; height: 34px; font-size: 13px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.ticker__label { flex: none; display: grid; place-items: center; padding: 0 14px; font-weight: 700; font-size: 12px; background: var(--red); color: #fff; }
.ticker__track { overflow: hidden; flex: 1; }
.ticker__move { display: flex; gap: 28px; width: max-content; height: 100%; align-items: center; animation: marquee 70s linear infinite; padding-left: 16px; }
.ticker:hover .ticker__move { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tk { color: var(--tx-2); white-space: nowrap; }
.tk b { color: var(--tx); margin-right: 4px; }
.tk i { font-style: normal; font-family: var(--num); color: var(--navy); margin-left: 6px; font-weight: 500; }
.tk i.is-hot { color: var(--red); }

/* ---------- 本日のまとめ ---------- */
.summary { border-bottom: 1px solid var(--line); }
.summary__inner { max-width: 1280px; margin: 0 auto; padding: 28px 24px; display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.summary__date { font-size: 24px; font-weight: 900; }
.summary__date small { font-size: 16px; font-weight: 700; color: var(--tx-2); }
.summary__upd { display: block; font-size: 12px; font-weight: 400; color: var(--tx-3); margin-top: 2px; }
.kpis { display: flex; flex-wrap: wrap; margin-left: auto; }
.kpi { padding: 0 24px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi dt { font-size: 12px; color: var(--tx-3); font-weight: 500; }
.kpi dd { font-family: var(--num); font-size: 28px; font-weight: 500; line-height: 1.15; }
.kpi dd small { font-family: var(--font); font-size: 12px; color: var(--tx-2); margin-left: 3px; }

/* ---------- Section ---------- */
.sec { max-width: 1280px; margin: 0 auto; padding: 44px 24px 0; }
.sec__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec__title { font-size: 20px; font-weight: 900; padding-left: 12px; border-left: 5px solid var(--navy); line-height: 1.3; }
.sec__note { font-size: 12px; color: var(--tx-3); }

.seg { display: flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.seg button { padding: 6px 16px; font-size: 13px; font-weight: 500; color: var(--tx-2); border-left: 1px solid var(--line-2); }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--bg-2); }
.seg button.is-on { background: var(--navy); color: #fff; font-weight: 700; }

/* ---------- Venue cards ---------- */
.venues { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.vc {
  position: relative; text-align: left; padding: 12px 14px 12px; border-radius: var(--r);
  background: var(--bg); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 4px; min-height: 158px;
  transition: border-color .15s, background .15s;
}
.vc--live { border-top: 3px solid var(--navy); }
.vc--live:hover, .vc--done:hover { border-color: var(--navy); background: #fbfcfe; }
.vc--done { background: var(--bg-2); border-top: 3px solid var(--tx-3); }
.vc--off { background: var(--bg-2); border-color: var(--line); min-height: 0; color: var(--tx-3); }
.vc__top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--tx-3); }
.vc__no { font-family: var(--num); font-weight: 500; font-size: 12px; }
.vc__en { flex: 1; }
.vc__name { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 8px; line-height: 1.25; }
.vc--off .vc__name { font-size: 18px; color: var(--tx-2); }
.vc__day { font-size: 12px; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc__next { display: flex; align-items: flex-end; gap: 12px; margin-top: auto; padding-top: 6px; }
.vc__r { font-family: var(--num); font-size: 34px; font-weight: 500; line-height: .95; color: var(--navy); }
.vc__r small { font-size: 15px; margin-left: 1px; }
.vc__t { font-size: 11px; color: var(--tx-3); display: flex; flex-direction: column; line-height: 1.3; }
.vc__t b { font-family: var(--num); font-size: 18px; color: var(--tx); font-weight: 500; }
[data-deadline].is-hot { color: var(--red) !important; }
.vc__fin { font-size: 14px; color: var(--tx-3); font-weight: 700; }
.vc__foot { font-size: 12px; color: var(--tx-3); }
.vc__foot b { font-family: var(--num); color: var(--tx-2); font-size: 15px; font-weight: 500; }
.prog { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 8px; }
.prog i { height: 5px; background: var(--bg-3); }
.prog i.is-done { background: #9aa3b0; }
.prog i.is-man { background: var(--gold); }
.prog i.is-next { background: var(--navy); }
.prog i.is-cancel { background: repeating-linear-gradient(90deg, var(--line-2) 0 2px, transparent 2px 4px); }

.tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px;
  font-size: 10.5px; font-weight: 700; border: 1px solid var(--line-2); color: var(--tx-2); background: var(--bg);
}
.tag--night { border-color: #c8cbe6; color: #3b3f8f; background: #f0f1fb; }
.tag--g.is-big { background: var(--gold-2); border-color: #e6c66b; color: #7a5800; }
.tag--hot { background: var(--red-2); border-color: #efb6b8; color: var(--red); font-size: 11px; }
.tag--cancel { background: var(--bg-3); color: var(--tx-2); font-size: 11px; }
.tag--cool { background: var(--navy-2); border-color: #bfcbe0; color: var(--navy); font-size: 11px; }

/* ---------- Ranking ---------- */
.ranks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rk { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.rk__h { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.rk__h h3 { font-size: 15px; font-weight: 900; }
.rk__u { font-size: 11px; color: var(--tx-3); }
.rk ol { list-style: none; }
.rk li {
  position: relative; display: grid; grid-template-columns: 20px 1fr; column-gap: 10px;
  padding: 9px 14px; border-top: 1px solid var(--line); cursor: pointer;
}
.rk li:first-child { border-top: 0; }
.rk li:hover { background: var(--bg-2); }
.rk__pos { grid-row: 1 / 3; font-family: var(--num); font-size: 18px; font-weight: 500; color: var(--tx-3); line-height: 1.3; }
.rk li:first-child .rk__pos { color: var(--red); }
.rk__name { font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.rk__name small { font-weight: 400; color: var(--tx-3); font-size: 11px; }
.rk__val { position: absolute; right: 14px; top: 9px; font-family: var(--num); font-weight: 500; font-size: 15px; }
.rk__bar { height: 3px; background: var(--bg-3); margin-top: 5px; }
.rk__bar i { display: block; height: 100%; width: var(--w); background: var(--navy); }

/* ---------- Finder ---------- */
.finder { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.finder__tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg-2); border-bottom: 1px solid var(--line-2); }
.finder__tabs button {
  padding: 12px 16px; text-align: left; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); position: relative;
}
.finder__tabs button:last-child { border-right: 0; }
.finder__tabs b { font-size: 15px; }
.finder__tabs span { font-size: 11px; color: var(--tx-3); }
.finder__tabs button:hover { background: var(--bg-3); }
.finder__tabs button.is-on { background: var(--bg); }
.finder__tabs button.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--navy); }
.finder__tabs button.is-on b { color: var(--navy); }
.finder__body { display: grid; grid-template-columns: 1fr 1.3fr; }
.finder__cond { padding: 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.finder__desc { color: var(--tx-2); font-size: 13px; }
.cond__l { display: block; font-size: 12px; color: var(--tx-2); margin-bottom: 6px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 4px; border: 1px solid var(--line-2); font-family: var(--num); font-weight: 500; font-size: 15px; background: var(--bg); }
.chip small { font-family: var(--font); font-size: 10px; color: var(--tx-3); margin-left: 2px; }
.chip:hover { border-color: var(--navy); }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.is-on small { color: rgba(255, 255, 255, .75); }
.finder__result { padding: 16px 20px 20px; }
.finder__count { font-size: 13px; color: var(--tx-2); margin-bottom: 8px; }
.finder__count span { font-family: var(--num); font-size: 26px; font-weight: 500; color: var(--tx); margin-right: 3px; }
.hits { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 340px; overflow: auto; }
.hits button {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "v r go" "t tag go";
  column-gap: 10px; align-items: center; padding: 8px 12px; border-radius: 4px; border: 1px solid var(--line); text-align: left;
}
.hits button:hover { border-color: var(--navy); background: var(--bg-2); }
.hit__v { grid-area: v; font-weight: 700; }
.hit__r { grid-area: r; font-family: var(--num); font-weight: 500; font-size: 17px; color: var(--navy); }
.hit__t { grid-area: t; font-family: var(--num); font-size: 12px; color: var(--tx-3); }
.hit__tag { grid-area: tag; font-size: 11px; color: var(--tx-2); }
.hit__go { grid-area: go; color: var(--tx-3); }
.empty { color: var(--tx-3); font-size: 14px; padding: 12px 0; grid-column: 1 / -1; }

/* ---------- Footer ---------- */
.ftr { margin-top: 72px; border-top: 1px solid var(--line); background: var(--bg-2); }
.ftr__inner { max-width: 1280px; margin: 0 auto; padding: 32px 24px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.ftr__nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--tx-2); }
.ftr__nav a:hover { color: var(--navy); text-decoration: underline; }
.ftr__note { width: 100%; font-size: 12px; color: var(--tx-3); }

/* ---------- Lane badge ---------- */
.ln {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 3px;
  font-family: var(--num); font-weight: 500; font-size: 17px;
}
.ln-1 { background: var(--l1); color: #111; box-shadow: inset 0 0 0 1px #9aa1ab; }
.ln-2 { background: var(--l2); color: #fff; }
.ln-3 { background: var(--l3); color: #fff; }
.ln-4 { background: var(--l4); color: #fff; }
.ln-5 { background: var(--l5); color: #111; }
.ln-6 { background: var(--l6); color: #fff; }

/* ---------- Drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(16, 22, 34, .45); opacity: 0; transition: opacity .25s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(1060px, 100%);
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 24px 12px; border-top: 4px solid var(--navy); }
.drawer__meta { font-size: 12px; color: var(--tx-2); display: flex; align-items: center; gap: 8px; }
.drawer__title { font-size: 26px; font-weight: 900; line-height: 1.25; margin-top: 2px; }
.drawer__title span { font-family: var(--num); font-weight: 500; color: var(--navy); }
.drawer__title small { font-size: 14px; color: var(--tx-2); font-weight: 500; margin-left: 4px; }
.drawer__close { width: 36px; height: 36px; border-radius: 4px; border: 1px solid var(--line-2); font-size: 15px; color: var(--tx-2); }
.drawer__close:hover { background: var(--bg-2); color: var(--tx); }
.race-tabs { display: flex; padding: 0 24px; overflow-x: auto; border-bottom: 1px solid var(--line-2); scrollbar-width: none; }
.race-tabs button {
  flex: none; min-width: 58px; padding: 6px 8px 8px; font-family: var(--num); font-weight: 500; font-size: 16px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: var(--tx-2);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.race-tabs button small { font-size: 10.5px; font-weight: 400; color: var(--tx-3); }
.race-tabs button.is-done { color: var(--tx-3); }
.race-tabs button:hover { background: var(--bg-2); }
.race-tabs button.is-on { color: var(--navy); border-bottom-color: var(--navy); }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 24px 40px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-2); }
.drawer__body > * { flex-shrink: 0; }

.cond-row { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); }
.cond-row > div { padding: 8px 14px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.cond-row > div:first-child { border-left: 0; }
.cond-row span { font-size: 11px; color: var(--tx-3); }
.cond-row b { font-size: 15px; }
.cond-row em { font-style: normal; font-family: var(--num); color: var(--navy); font-size: 13px; }

.result { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line-2); border-left: 5px solid var(--gold); }
.result__l { font-weight: 900; font-size: 13px; }
.result__o { display: flex; align-items: center; gap: 4px; }
.result__o i { font-style: normal; color: var(--tx-3); }
.result__p { margin-left: auto; font-family: var(--num); font-size: 20px; font-weight: 500; }
.result__p.is-man { color: var(--red); }
.result--cancel { border-left-color: var(--tx-3); }
.result__note { font-size: 12px; color: var(--tx-3); }

.dr-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; align-items: start; }
.dr-side { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px; }
.card__h { font-size: 14px; font-weight: 900; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.card__h small { font-size: 11px; color: var(--tx-3); font-weight: 400; }

.entry { display: flex; flex-direction: column; }
.en {
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1.5fr) 30px repeat(5, minmax(0, 1fr)); gap: 10px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.en:first-child { border-top: 0; padding-top: 2px; }
.en__who { display: flex; flex-direction: column; min-width: 0; }
.en__who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en__who small { font-size: 11px; color: var(--tx-3); white-space: nowrap; }
.en__num { display: flex; flex-direction: column; line-height: 1.25; }
.en__num span { font-size: 10px; color: var(--tx-3); }
.en__num b { font-family: var(--num); font-size: 16px; font-weight: 500; }
.en__num b.is-best { color: var(--red); }
.en__num small { font-family: var(--num); font-size: 10.5px; color: var(--tx-3); }
.cls { font-family: var(--num); font-size: 12px; font-weight: 500; text-align: center; padding: 1px 0; border-radius: 3px; border: 1px solid var(--line-2); color: var(--tx-2); }
.cls-A1 { background: var(--red); border-color: var(--red); color: #fff; }
.cls-A2 { border-color: var(--red); color: var(--red); }
.flag { position: absolute; left: 20px; top: 4px; font-family: var(--num); font-size: 10px; background: var(--gold); color: #fff; padding: 0 3px; border-radius: 2px; line-height: 1.4; }

.bar { height: 6px; background: var(--bg-3); }
.bar i { display: block; height: 100%; width: var(--w); background: var(--navy); }

.pred { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.pred li { display: grid; grid-template-columns: 18px 28px 92px 1fr 40px; gap: 8px; align-items: center; }
.pred .ln { width: 24px; height: 24px; font-size: 14px; }
.pred__m { color: var(--red); font-weight: 900; }
.pred__n { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred li b { font-family: var(--num); font-weight: 500; text-align: right; }
.pred__buy { margin-top: 12px; padding: 8px 12px; border-radius: 4px; background: var(--bg-2); font-size: 12px; color: var(--tx-2); }
.pred__buy b { font-family: var(--num); font-weight: 500; font-size: 18px; color: var(--tx); margin: 0 4px; }
.pred__note { margin-top: 6px; font-size: 11px; color: var(--tx-3); }

.course { display: flex; flex-direction: column; gap: 7px; }
.co { display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; row-gap: 3px; align-items: center; }
.co .ln { width: 24px; height: 24px; font-size: 14px; grid-row: span 2; }
.co__bar { display: grid; grid-template-columns: 40px 1fr 44px; gap: 8px; align-items: center; font-size: 11px; color: var(--tx-2); }
.co__bar b { font-family: var(--num); font-weight: 500; color: var(--tx); text-align: right; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dr-grid { grid-template-columns: 1fr; }
  .kpis { margin-left: 0; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .finder__tabs { grid-template-columns: repeat(2, 1fr); }
  .finder__tabs button:nth-child(2) { border-right: 0; }
  .finder__tabs button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .finder__body { grid-template-columns: 1fr; }
  .finder__cond { border-right: 0; border-bottom: 1px solid var(--line); }
}
/* ---------- スマホ用パーツ(PCでは非表示) ---------- */
.tabbar, .race-pager { display: none; }

@media (max-width: 860px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--bg); border-top: 1px solid var(--line-2);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 10.5px; font-weight: 700; color: var(--tx-3);
  }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .tabbar a.is-active { color: var(--navy); }
  .ftr { margin-top: 48px; }
}

/* ---------- スマホ版 ---------- */
@media (max-width: 600px) {
  body { font-size: 14px; }
  html { scroll-padding-top: 96px; }
  .hdr__inner, .summary__inner, .sec, .ftr__inner { padding-left: 16px; padding-right: 16px; }
  .hdr__inner { height: 52px; }
  .logo__mark { width: 28px; height: 28px; font-size: 17px; }
  .logo__txt { font-size: 19px; }
  .ticker { height: 30px; font-size: 12px; }
  .ticker__label { padding: 0 10px; font-size: 11px; }

  /* 本日のまとめ: 4項目を2×2で */
  .summary__inner { padding-top: 16px; padding-bottom: 16px; gap: 12px; }
  .summary__date { font-size: 19px; }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border: 1px solid var(--line); border-radius: var(--r); }
  .kpi, .kpi:first-child { padding: 7px 12px; border-left: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--line); }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi dd { font-size: 22px; }

  .sec { padding-top: 28px; }
  .sec__head { margin-bottom: 12px; }
  .sec__title { font-size: 18px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 0; }

  /* 開催場: 1場1行のリスト。開催なしの場は3列の小さなタイルに */
  .venues { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .vc {
    grid-column: 1 / -1; min-height: 0; padding: 10px 12px 10px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px;
  }
  .vc__top { grid-column: 1 / -1; }
  .vc__name { grid-column: 1; font-size: 20px; }
  .vc__day { grid-column: 1; }
  .vc__next { grid-column: 2; grid-row: 2 / 4; align-self: center; margin: 0; padding: 0; gap: 8px; }
  .vc__r { font-size: 32px; }
  .vc__t { text-align: right; }
  .prog { grid-column: 1 / -1; margin-top: 8px; }
  .vc--off { grid-column: auto; display: flex; padding: 8px 10px; gap: 0; }
  .vc--off .vc__name { font-size: 15px; }
  .vc--off .vc__foot { font-size: 10.5px; }

  /* 場傾向: 横スワイプのカード */
  .ranks {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none;
  }
  .ranks::-webkit-scrollbar { display: none; }
  .rk { flex: 0 0 86%; scroll-snap-align: center; }

  /* レース検索: タブを横スクロールに */
  .finder { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .finder__tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .finder__tabs button { flex: none; padding: 10px 16px; border-bottom: 0 !important; }
  .finder__tabs button:nth-child(2) { border-right: 1px solid var(--line); }
  .finder__cond { padding: 16px; }
  .finder__result { padding: 14px 16px 16px; }
  .hits { grid-template-columns: 1fr; max-height: none; }
  .chip { padding: 7px 12px; }

  /* レース詳細: 下から出る全画面シート */
  .drawer__panel {
    width: 100%; top: 0; transform: translateY(100%);
    padding-top: env(safe-area-inset-top);
  }
  .drawer__head { padding: 12px 16px 8px; }
  .drawer__title { font-size: 21px; }
  .race-tabs { padding: 0 8px; }
  .race-tabs button { min-width: 50px; font-size: 15px; }
  .drawer__body { padding: 12px 12px 20px; gap: 10px; }
  .race-pager {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    border-top: 1px solid var(--line-2); background: var(--bg);
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  }
  .race-pager span { font-family: var(--num); font-size: 18px; font-weight: 500; text-align: center; }
  .race-pager span small { font-size: 12px; color: var(--tx-3); margin-left: 4px; }
  .race-pager button {
    height: 40px; border: 1px solid var(--line-2); border-radius: var(--r);
    font-family: var(--num); font-size: 16px; color: var(--navy);
  }
  .race-pager button:first-child { justify-self: start; padding: 0 16px; }
  .race-pager button:last-child { justify-self: end; padding: 0 16px; }
  .race-pager button:disabled { visibility: hidden; }

  .cond-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cond-row > div { padding: 7px 10px; }
  .cond-row > div:nth-child(4) { border-left: 0; }
  .cond-row > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .cond-row b { font-size: 14px; }
  .result { padding: 10px 12px; gap: 10px; }
  .card { padding: 12px; }

  /* 出走表: 1段目に艇番・選手・級別、2段目に数値5項目 */
  .en { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 8px; }
  .en > .ln { grid-row: 1; grid-column: 1; }
  .en__who { grid-row: 1; grid-column: 1 / 5; padding-left: 38px; }
  .en > .cls { grid-row: 1; grid-column: 5; justify-self: end; width: 34px; }
  .en__num { grid-row: 2; }
  .en__num b { font-size: 15px; }
  .pred li { grid-template-columns: 18px 24px 78px 1fr 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   選手データ（一覧）
   ========================================================= */
.pl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pl-q {
  flex: 1 1 260px; height: 38px; padding: 0 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--tx);
}
.pl-q:focus, .pl-sel:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
.pl-sel { height: 36px; padding: 0 8px; font: inherit; font-size: 13px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--tx); }
.pl-count { font-size: 12px; color: var(--tx-3); margin: 14px 0 6px; }
.pl-count span { font-family: var(--num); font-size: 16px; color: var(--tx); margin-right: 2px; }
.pl-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); }
.pl {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px repeat(4, 62px); align-items: center; gap: 10px;
  padding: 9px 6px; border-bottom: 1px solid var(--line);
}
.pl:hover { background: var(--bg-2); }
.pl__who { display: flex; flex-direction: column; min-width: 0; }
.pl__who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl__who small { font-size: 11px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl__n { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--num); font-size: 16px; line-height: 1.2; }
.pl__n small { font-family: var(--font); font-size: 10px; color: var(--tx-3); }
.pl__n--ab { color: var(--navy); }
.pl-more { display: block; margin: 16px auto 0; padding: 9px 28px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14px; font-weight: 700; color: var(--navy); }
.pl-more:hover { border-color: var(--navy); }

/* 評価ランク */
.grade {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-family: var(--num); font-weight: 600; font-size: 15px; border: 1.5px solid var(--line-2); color: var(--tx-3);
}
.grade--S { background: var(--gold); border-color: var(--gold); color: #fff; }
.grade--A { background: var(--navy); border-color: var(--navy); color: #fff; }
.grade--B { border-color: var(--navy); color: var(--navy); }
.grade--C { color: var(--tx-2); }
.grade--lg { width: 56px; height: 56px; font-size: 30px; border-width: 2px; }

/* 出走表の選手名 → 選手ページ */
a.en__who:hover b { color: var(--navy); text-decoration: underline; }

/* =========================================================
   選手ページ
   ========================================================= */
.racer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.racer__panel {
  position: absolute; inset: 0; background: var(--bg); display: flex; flex-direction: column;
  opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s;
}
.racer.is-open { pointer-events: auto; }
.racer.is-open .racer__panel { opacity: 1; transform: none; }
.racer__head {
  border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 12px max(24px, calc((100% - 1232px) / 2));
  padding-top: calc(12px + env(safe-area-inset-top));
}
.racer__back { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14px; font-weight: 700; color: var(--navy); }
.racer__back:hover { border-color: var(--navy); }
.racer__title { font-size: 26px; font-weight: 900; line-height: 1.25; }
.racer__title small { font-size: 13px; font-weight: 500; color: var(--tx-3); margin-left: 6px; }
.racer__body { flex: 1; overflow-y: auto; padding: 20px max(24px, calc((100% - 1232px) / 2)) 48px; }
.racer__body > * { flex-shrink: 0; }

.rp-top { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.rp-grade { display: flex; align-items: center; gap: 12px; }
.rp-grade b { display: block; font-size: 16px; font-weight: 900; }
.rp-grade small { font-size: 12px; color: var(--tx-2); }
.rp-prof { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.rp-prof dt { font-size: 11px; color: var(--tx-3); }
.rp-prof dd { font-size: 14px; font-weight: 700; }
.rp-prof dd small { font-weight: 400; color: var(--tx-3); margin-left: 6px; }
.rp-prof .cls { display: inline-block; width: 34px; }

.rp-kpis { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 18px; border: 1px solid var(--line-2); border-radius: var(--r); }
.rp-kpis div { padding: 10px 14px; border-left: 1px solid var(--line); }
.rp-kpis div:first-child { border-left: 0; }
.rp-kpis dt { font-size: 11px; color: var(--tx-3); }
.rp-kpis dd { font-family: var(--num); font-size: 26px; font-weight: 500; line-height: 1.2; }
.rp-note { font-size: 11px; color: var(--tx-3); margin: 6px 0 16px; }

.rp-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.rp-grid > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.rp-eval { display: grid; grid-template-columns: 240px 1fr; gap: 12px; align-items: center; }
.rd { width: 100%; max-width: 260px; }
.rd__ring { fill: none; stroke: var(--line); }
.rd__ax { stroke: var(--line); }
.rd__mid { fill: none; stroke: var(--line-2); stroke-dasharray: 3 3; }
.rd__val { fill: rgba(18, 48, 95, .14); stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; }
.rd__l { font-size: 11px; font-weight: 700; fill: var(--tx-2); }
.rd__v { font-family: var(--num); font-size: 13px; font-weight: 500; fill: var(--navy); }
.rp-pts { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.rp-pts li { padding-left: 14px; position: relative; line-height: 1.5; }
.rp-pts li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--navy); }

.rp-tbl-wrap { overflow-x: auto; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.rp-tbl th { font-size: 11px; font-weight: 500; color: var(--tx-3); text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.rp-tbl td { font-family: var(--num); font-size: 15px; text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); position: relative; }
.rp-tbl th:first-child, .rp-tbl td:first-child { text-align: left; }
.rp-tbl td.is-hi { color: var(--red); }
.rp-tbl .ln { width: 24px; height: 24px; font-size: 15px; }
.rp-tbl .cls { display: inline-block; width: 32px; font-size: 12px; }
.rp-tbl--hist td:first-child { font-family: var(--font); font-size: 13px; }
.mini { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px; }
.mini::after { content: ''; position: absolute; right: 0; bottom: 0; height: 2px; width: var(--w); background: var(--navy-2); }
.stack { display: flex; width: 130px; height: 10px; margin-left: auto; background: var(--bg-3); }
.stack i, .rp-legend i { display: block; height: 100%; width: var(--w); }
.p1 { background: var(--navy); }
.p2 { background: #4f74ad; }
.p3 { background: #a9bcd9; }
.p4, .p5, .p6 { background: var(--bg-3); }
.rp-legend { display: flex; align-items: center; gap: 4px 10px; justify-content: flex-end; font-size: 11px; color: var(--tx-3); margin-top: 8px; }
.rp-legend i { width: 10px; height: 10px; margin-right: -6px; }
.rp-legend .p4 { background: var(--line-2); }

.rp-recent { list-style: none; max-height: 380px; overflow-y: auto; }
.rp-recent li { display: grid; grid-template-columns: 44px 1fr 24px 64px; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.rp-recent small { color: var(--tx-3); margin-left: 6px; }
.rp-recent__d { font-family: var(--num); color: var(--tx-2); }
.rp-recent .ln { width: 22px; height: 22px; font-size: 14px; }
.rp-recent b { text-align: right; font-size: 13px; }
.rp-recent li.is-win b { color: var(--red); }

@media (max-width: 1000px) {
  .pl-list { grid-template-columns: 1fr; }
  .rp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pl-tools { gap: 8px; }
  .pl-q { flex-basis: 100%; }
  #pl-cls { width: 100%; }
  #pl-cls button { flex: 1; padding: 7px 0; }
  .pl-sel { flex: 1; }
  .pl { grid-template-columns: 28px minmax(0, 1fr) 30px 46px 52px; gap: 8px; padding: 9px 2px; }
  .pl__n--q, .pl__n--st { display: none; }
  .pl .grade { width: 26px; height: 26px; font-size: 14px; }

  .racer__head { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); gap: 12px; }
  .racer__back { padding: 0 10px; }
  .racer__title { font-size: 21px; }
  .racer__title small { display: block; margin: 0; font-size: 11px; }
  .racer__body { padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
  .rp-top { gap: 14px; }
  .rp-prof { gap: 6px 18px; }
  .rp-kpis { grid-template-columns: repeat(3, 1fr); }
  .rp-kpis div:nth-child(4) { border-left: 0; }
  .rp-kpis div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .rp-kpis div { padding: 7px 10px; }
  .rp-kpis dd { font-size: 21px; }
  .rp-eval { grid-template-columns: 1fr; justify-items: center; }
  .rp-pts { justify-self: stretch; }
  .stack { width: 80px; }
}
.sec--page { padding-top: 32px; min-height: 60vh; }

/* 選手ページ: タブと成績データ */
.rp-tabs { display: flex; gap: 0; margin: 4px 0 16px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; position: sticky; top: -20px; background: var(--bg); z-index: 2; }
.rp-tabs::-webkit-scrollbar { display: none; }
.rp-tabs button { flex: none; padding: 10px 18px; font-size: 14px; font-weight: 700; color: var(--tx-3); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.rp-tabs button:hover { color: var(--tx); }
.rp-tabs button.is-on { color: var(--navy); border-bottom-color: var(--navy); }
.rp-span { font-size: 12px; color: var(--tx-3); margin-bottom: 12px; }
.rp-stack { display: flex; flex-direction: column; gap: 16px; }
.rp-tbl--stat td { font-size: 14px; padding: 6px 7px; }
.rp-tbl--stat th { padding: 4px 7px; }
.rp-tbl--stat tr.is-total td { font-weight: 600; background: var(--bg-2); }
.rp-tbl--stat td:first-child { font-family: var(--font); font-size: 13px; font-weight: 700; }
.rp-tbl td.is-same { color: var(--navy); font-weight: 600; }
.rp-tbl tbody tr:hover td { background: var(--bg-2); }

.rp-fin { list-style: none; }
.rp-fin li { display: grid; grid-template-columns: 90px minmax(0, 1fr) 56px 48px; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.rp-fin__d { font-family: var(--num); color: var(--tx-2); }
.rp-fin__t { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.rp-fin__t small { width: 100%; color: var(--tx-3); }
.rp-fin__l { display: flex; align-items: center; gap: 3px; }
.rp-fin__l .ln { width: 22px; height: 22px; font-size: 14px; }
.rp-fin__l small { font-family: var(--num); color: var(--tx-3); }
.rp-fin b { text-align: right; }
.rp-fin li.is-win b { color: var(--red); }

.rp-ser { margin-bottom: 12px; }
.rp-ser .card__h { flex-wrap: wrap; align-items: center; }
.rp-runs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.rp-runs li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 4px; }
.rp-runs__d { font-size: 10px; color: var(--tx-3); white-space: nowrap; }
.rp-runs .ln { width: 22px; height: 22px; font-size: 14px; }
.rp-runs__st, .rp-runs__c { font-family: var(--num); font-size: 12px; color: var(--tx-2); line-height: 1.2; }
.rp-runs b { font-family: var(--num); font-size: 20px; font-weight: 500; line-height: 1.1; }
.rp-runs li.is-win b { color: var(--red); }
.rp-runs li.is-final { border-color: var(--gold); background: var(--gold-2); }
@media (max-width: 600px) {
  .rp-tabs { top: -16px; }
  .rp-tabs button { padding: 10px 12px; font-size: 13px; }
  .rp-fin li { grid-template-columns: 74px minmax(0, 1fr) 44px 40px; gap: 6px; }
  .rp-runs { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
}

/* =========================================================
   レースページ
   ========================================================= */
.rc { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.rc-venues { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.rc-venues::-webkit-scrollbar { display: none; }
.rc-venues a { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 76px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r); line-height: 1.3; }
.rc-venues a b { font-size: 14px; }
.rc-venues a small { font-family: var(--num); font-size: 11px; color: var(--tx-3); }
.rc-venues a:hover { border-color: var(--navy); }
.rc-venues a.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.rc-venues a.is-on small { color: rgba(255, 255, 255, .75); }
.rc-head { padding: 14px 0 8px; }
.rc-title { font-size: 28px; font-weight: 900; line-height: 1.3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rc-title span { font-family: var(--num); font-weight: 500; color: var(--navy); }
.rc-title small { font-size: 14px; color: var(--tx-2); font-weight: 500; }
.rc-dl { font-style: normal; font-size: 13px; font-weight: 500; color: var(--tx-2); margin-left: auto; font-family: var(--num); }
.rc-dl i { font-style: normal; color: var(--navy); margin-left: 6px; }
.rc-dl i.is-hot { color: var(--red); }
.rc-tabs { padding: 0; margin-bottom: 14px; }
.rc-tabs a { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 4px; font-family: var(--num); font-weight: 500; font-size: 16px; border-bottom: 3px solid transparent; line-height: 1.2; }
.rc-tabs a small { font-size: 10.5px; color: var(--tx-3); font-weight: 400; }
.rc-tabs a.is-done { color: var(--tx-3); }
.rc-tabs a:hover { background: var(--bg-2); }
.rc-tabs a.is-on { color: var(--navy); border-bottom-color: var(--navy); }
.rc-body { display: flex; flex-direction: column; gap: 12px; }

.rc-scroll { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r); }
.rc-tbl { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; }
.rc-tbl th, .rc-tbl td { border-bottom: 1px solid var(--line); padding: 6px 6px; text-align: center; vertical-align: middle; }
.rc-tbl td { border-left: 1px solid var(--line); font-family: var(--num); font-size: 16px; line-height: 1.25; }
.rc-tbl tbody th { width: 104px; text-align: left; font-size: 12px; font-weight: 700; color: var(--tx-2); background: var(--bg-2); line-height: 1.3; }
.rc-tbl tbody th small { font-weight: 400; color: var(--tx-3); font-size: 10.5px; }
.rc-tbl thead th { position: sticky; top: 0; background: var(--bg); font-size: 12px; color: var(--tx-3); border-bottom: 1px solid var(--line-2); }
.rc-tbl thead th:first-child { width: 104px; text-align: left; background: var(--bg-2); }
.rc-tbl thead .ln { width: 100%; max-width: 72px; height: 26px; }
.rc-tbl td small { display: block; font-size: 11px; color: var(--tx-3); font-family: var(--num); }
.rc-tbl td b { font-weight: 500; }
.rc-tbl td b.is-best { color: var(--red); }
.rc-tbl td.is-sm { font-size: 14px; }
.rc-tbl .is-warn { color: var(--red); }
.rc-tbl tr.rc-sec th { background: var(--navy); color: #fff; font-size: 12.5px; padding: 5px 10px; text-align: left; }
.rc-tbl tr.rc-sec th small { color: rgba(255, 255, 255, .7); font-weight: 400; margin-left: 8px; }
.rc-who { vertical-align: top; }
.rc-name { display: flex; flex-direction: column; align-items: center; font-family: var(--font); }
.rc-name b { font-size: 14px; font-weight: 700; line-height: 1.3; word-break: keep-all; }
.rc-name:hover b { color: var(--navy); text-decoration: underline; }
.rc-tbl .cls { display: inline-block; width: 32px; }
.rc-grade { margin-top: 2px; }
.rc-grade .grade { width: 18px; height: 18px; font-size: 11px; border-width: 1px; vertical-align: -4px; }
.rc-days td { vertical-align: top; padding: 4px; }
.rc-run { display: inline-flex; flex-direction: column; align-items: center; width: 46px; padding: 2px 0; line-height: 1.15; }
.rc-run + .rc-run { border-top: 1px dashed var(--line); }
.rc-run .ln { width: 18px; height: 18px; font-size: 12px; font-style: normal; margin: 1px 0; }
.rc-run b { font-size: 17px; }
.rc-run b small { display: inline; margin-left: 1px; }
.rc-run b.is-win { color: var(--red); }
.rc-run b.is-in { color: var(--navy); }
.rc-run.is-now { background: var(--gold-2); border-radius: 3px; }
.rc-hayami a { font-size: 14px; color: var(--navy); text-decoration: underline; margin: 0 2px; }
.rc-note { font-size: 11.5px; color: var(--tx-3); }

@media (max-width: 600px) {
  .rc { padding: 0 12px; }
  .rc-title { font-size: 22px; }
  .rc-dl { margin-left: 0; width: 100%; }
  .rc-tbl { min-width: 0; }
  .rc-tbl th, .rc-tbl td { padding: 5px 2px; }
  .rc-tbl td { font-size: 14px; }
  .rc-tbl tbody th, .rc-tbl thead th:first-child { width: 58px; font-size: 10.5px; padding-left: 4px; }
  .rc-tbl tbody th small { font-size: 9px; }
  .rc-tbl thead .ln { height: 22px; font-size: 14px; }
  .rc-name b { font-size: 12px; }
  .rc-name small { font-size: 9.5px !important; }
  .rc-tbl td small { font-size: 9.5px; }
  .rc-tbl td.is-sm { font-size: 12px; }
  .rc-tbl .cls { width: 26px; font-size: 10px; }
  .rc-grade { display: none !important; }
  .rc-run { width: 100%; }
  .rc-run b { font-size: 15px; }
  .rc-tbl tr.rc-sec th small { display: block; margin: 0; }
  .rc-scroll { margin: 0 -12px; border-radius: 0; border-left: 0; border-right: 0; }
}

/* 選手ページ: コース別・場別 */
.card__h .seg { margin-left: auto; }
.seg--sm button { padding: 3px 10px; font-size: 12px; }
.rp-sub { font-size: 13px; font-weight: 900; margin: 14px 0 6px; }
.rp-sub small { font-weight: 400; color: var(--tx-3); margin-left: 6px; }
.rp-def { font-size: 11px; color: var(--tx-3); margin-top: 8px; line-height: 1.6; }
.rp-ctbl { table-layout: fixed; min-width: 480px; }
.rp-ctbl th { text-align: center !important; }
.rp-ctbl thead th:first-child, .rp-ctbl tbody th { width: 86px; text-align: left !important; font-size: 12px; color: var(--tx-2); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rp-ctbl tbody th small { display: block; font-weight: 400; color: var(--tx-3); font-size: 10.5px; }
.rp-ctbl td { text-align: center !important; font-size: 15px; }
.rp-ctbl td small { display: block; font-size: 10.5px; color: var(--tx-3); line-height: 1.2; }
.rp-ctbl thead .ln { width: 24px; height: 24px; font-size: 14px; }
.rp-ctbl td.heat { background: rgba(18, 48, 95, calc(var(--h, 0) * .16)); }
.rp-ctbl td.is-same { font-weight: 600; color: var(--navy); }
.rp-kim td { padding: 6px 4px; }
.rp-kim td b { font-weight: 500; display: block; }
.rp-kim td.is-lose b { color: var(--red); }
.rp-kim td.is-gain b { color: var(--navy); }
.rp-kim__n td { font-size: 13px; color: var(--tx-2); }
.k-lose { color: var(--red); } .k-gain { color: var(--navy); }
.rp-tbl-wrap--tall { max-height: 360px; overflow-y: auto; }
.rp-vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rp-fin b small { display: block; font-size: 10.5px; color: var(--tx-3); font-weight: 400; font-family: var(--num); }
.rp-tbl--stat td a { color: var(--navy); text-decoration: underline; }
@media (max-width: 1000px) { .rp-vgrid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .rp-ctbl { min-width: 0; }
  .rp-ctbl thead th:first-child, .rp-ctbl tbody th { width: 62px; font-size: 10.5px; padding: 5px 4px; }
  .rp-ctbl td { font-size: 13px; padding: 5px 2px; }
  .rp-ctbl td small { font-size: 9.5px; }
  .rp-ctbl thead .ln { width: 20px; height: 20px; font-size: 12px; }
  .card__h .seg { margin-left: 0; width: 100%; }
  .card__h .seg button { flex: 1; }
}

/* 決まり手・負け筋 */
.rp-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.card--lose { border-color: #efb6b8; }
.card--lose .card__h { color: var(--red); }
.lose { list-style: none; display: flex; flex-direction: column; }
.lose li { display: grid; grid-template-columns: 26px 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.lose .ln { width: 24px; height: 24px; font-size: 14px; }
.lose__n { font-size: 12px; color: var(--tx-2); }
.lose__n b { font-family: var(--num); font-size: 15px; font-weight: 500; color: var(--tx); }
.lose__n b.k-lose { color: var(--red); }
.lose__n small { color: var(--tx-3); }
.lose__by { display: flex; flex-wrap: wrap; gap: 4px; }
.lose__chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 3px; font-size: 12px;
  background: linear-gradient(90deg, var(--red-2) var(--w), var(--bg-2) var(--w)); border: 1px solid var(--line);
}
.lose__chip i { font-style: normal; width: 18px; height: 18px; font-size: 12px; }
.lose__chip b { font-family: var(--num); font-weight: 500; color: var(--red); }
.lose__chip small { color: var(--tx-3); font-size: 10px; }
.rc-tbl td.k-lose-c b { color: var(--red); }
.rc-tbl td.k-lose-c { background: #fdf5f5; }
.rc-tbl td.k-gain-c b { color: var(--navy); }
.rc-tbl td.k-lose-c small, .rc-tbl td.k-gain-c small { font-family: var(--font); }
.rc-lose span { display: flex; align-items: center; justify-content: center; gap: 2px; font-family: var(--font); font-size: 11px; white-space: nowrap; }
.rc-lose span + span { margin-top: 2px; }
.rc-lose .ln { width: 16px; height: 16px; font-size: 11px; font-style: normal; }
.rc-lose b { font-family: var(--num); color: var(--red); font-weight: 500; font-size: 13px; }
@media (max-width: 1000px) { .rp-pair { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .lose li { grid-template-columns: 24px minmax(0, 1fr); }
  .lose__by { grid-column: 1 / -1; }
  .rc-lose span { font-size: 9.5px; flex-wrap: wrap; }
  .rc-lose b { font-size: 11px; }
}

/* モーター評価 */
.mgrade { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; font-family: var(--num); font-size: 17px; font-weight: 600; color: #fff; background: #9aa1ab; }
.mgrade--S { background: var(--gold); }
.mgrade--A { background: var(--red); }
.mgrade--B { background: var(--navy); }
.mgrade--C { background: #6c7a91; }
.mgrade--E { background: #b9bec6; }
.rc-tbl td.is-memo { font-family: var(--font); font-size: 11.5px; text-align: left; line-height: 1.4; color: var(--tx-2); }
@media (max-width: 600px) { .mgrade { width: 22px; height: 22px; font-size: 14px; } .rc-tbl td.is-memo { font-size: 10px; } }

.mgrade--x { background: var(--bg-3); color: var(--tx-3); }
.mnum { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; width: 44px; }
.mnum b { font-size: 18px; font-weight: 500; line-height: 1; }
.mnum i { display: block; width: 100%; height: 4px; background: linear-gradient(90deg, var(--navy) var(--w), var(--bg-3) var(--w)); border-radius: 2px; }
.mnum--5 b { color: var(--red); } .mnum--5 i { background: linear-gradient(90deg, var(--red) var(--w), var(--bg-3) var(--w)); }
@media (max-width: 600px) { .mnum { width: 34px; } .mnum b { font-size: 15px; } }

/* レース映像 */
.vbtn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 4px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 700; }
.vbtn:hover { background: #0b2247; }
.vbtn--sm { height: 22px; padding: 0 7px; font-size: 10px; }
.result .vbtn { margin-left: 8px; }
.vmodal { position: fixed; inset: 0; z-index: 200; display: none; }
.vmodal.is-open { display: block; }
.vmodal__scrim { position: absolute; inset: 0; background: rgba(10, 14, 22, .75); }
.vmodal__panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(960px, calc(100% - 24px)); background: #000; border-radius: var(--r); overflow: hidden; }
.vmodal__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--navy); color: #fff; font-size: 14px; }
.vmodal__close { color: #fff; font-size: 18px; width: 32px; height: 32px; }
.vmodal__frame { position: relative; padding-top: 56.25%; }
.vmodal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vmodal__note { background: var(--bg); padding: 6px 12px; font-size: 11px; color: var(--tx-3); }
.vmodal__note a { color: var(--navy); text-decoration: underline; }
.rp-runs li { position: relative; }
.rp-runs .vbtn--sm { margin-top: 3px; height: 18px; padding: 0 6px; font-size: 9px; }

/* モーター機歴 */
.mbtn { display: inline-block; padding: 3px 8px; border: 1px solid var(--navy); border-radius: 4px; font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.mbtn:hover { background: var(--navy); color: #fff; }
.rc-tbl b.is-plus, .mo-sum dd.is-plus { color: var(--red); }
.rc-tbl b.is-minus, .mo-sum dd.is-minus { color: var(--tx-2); }
.mo-sums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.mo-sum { border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; }
.mo-sum h5 { font-size: 13px; font-weight: 900; margin-bottom: 6px; }
.mo-sum dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
.mo-sum dt { font-size: 10.5px; color: var(--tx-3); }
.mo-sum dd { font-family: var(--num); font-size: 20px; font-weight: 500; line-height: 1.2; }
.mo-sum dd small { font-size: 11px; color: var(--tx-3); margin-left: 1px; }
.mo-eval { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r); background: var(--bg-2); font-size: 13px; }
.mo-eval em { font-style: normal; color: var(--tx-2); width: 100%; font-size: 12px; }
.mo-ser { margin-bottom: 12px; }
.mo-ser .card__h { flex-wrap: wrap; align-items: center; }
.mo-who { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.mo-who a { color: var(--navy); text-decoration: underline; }
.mo-who small { font-weight: 400; color: var(--tx-3); }
.mo-tbl td, .mo-tbl th { text-align: center !important; }
.mo-tbl td.mo-rn { font-family: var(--font); font-size: 12px; text-align: left !important; white-space: nowrap; }
.mo-tbl td small { display: block; font-size: 10px; color: var(--tx-3); }
.mo-tbl .ln { width: 22px; height: 22px; font-size: 13px; }
.mo-tbl tr.is-win b { color: var(--red); }
@media (max-width: 600px) {
  .mo-sums { grid-template-columns: 1fr; }
  .mo-sum dd { font-size: 17px; }
  .mo-tbl td, .mo-tbl th { padding: 5px 3px; font-size: 12px; }
}

/* 日付の切り替え */
.summary__head { display: flex; flex-direction: column; gap: 8px; }
.datenav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.datenav__btn { height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); font-family: var(--num); font-size: 14px; color: var(--navy); background: var(--bg); }
.datenav__btn:hover { border-color: var(--navy); }
.datenav__btn.is-off { color: var(--line-2); }
.datenav__sel { height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r); font: inherit; font-size: 14px; font-weight: 700; color: var(--tx); background: var(--bg); }
.datenav__today { font-size: 13px; color: var(--navy); text-decoration: underline; margin-left: 4px; }
.auto-note { width: 100%; padding: 8px 12px; border-radius: var(--r); background: var(--gold-2); border: 1px solid #e6c66b; font-size: 13px; color: #6b4d00; }
.auto-note a { color: var(--navy); font-weight: 700; text-decoration: underline; margin-left: 8px; }
@media (max-width: 600px) {
  .datenav__sel { flex: 1; min-width: 0; }
}
.mbtn { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 4px 10px; }
.mbtn b { font-family: var(--num); font-size: 14px; font-weight: 500; }
.mbtn span { font-size: 10.5px; }
@media (max-width: 600px) {
  .mbtn { display: flex; width: 100%; padding: 4px 0; }
  .mbtn b { font-size: 12px; }
  .mbtn span { font-size: 9.5px; }
}

/* ヘッダー: 次の締切カウントダウン */
.hdr__next { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r); background: var(--navy-2); color: var(--navy); white-space: nowrap; }
.hdr__next[hidden] { display: none; }
.hdr__next small { font-size: 10.5px; color: var(--tx-2); }
.hdr__nrace { font-size: 13px; font-weight: 700; }
.hdr__next b { font-family: var(--num); font-size: 20px; font-weight: 500; min-width: 54px; text-align: right; }
.hdr__next:hover { background: #dbe3f0; }
.hdr__next.is-hot { background: var(--red); color: #fff; }
.hdr__next.is-hot small { color: rgba(255, 255, 255, .8); }
.hdr__next + .hdr__clock { margin-left: 16px; }
@media (max-width: 600px) {
  .hdr__next { gap: 5px; height: 32px; padding: 0 8px; }
  .hdr__next small { display: none; }
  .hdr__nrace { font-size: 11.5px; }
  .hdr__next b { font-size: 16px; min-width: 42px; }
  .hdr__next + .hdr__clock { margin-left: 8px; font-size: 15px; }
  .hdr__next + .hdr__clock small { display: none; }
}

/* コース別のレース */
.seg--course button { padding: 3px 6px; }
.seg--course .ln { width: 22px; height: 22px; font-size: 13px; }
.seg--course button.is-on { background: var(--bg-3); }
.cr-sum { font-size: 13px; color: var(--tx-2); margin-bottom: 8px; }
.cr-sum b { font-family: var(--num); font-size: 16px; font-weight: 500; color: var(--tx); }
.cr-wrap { max-height: 520px; overflow-y: auto; }
.cr-tbl td.cr-v { text-align: left !important; font-family: var(--font); font-size: 13px; white-space: nowrap; }
.cr-tbl td.cr-v small { display: block; }
.cr-tbl td.cr-k { font-family: var(--font); font-size: 12px; }
.cr-tbl td.cr-o { font-size: 13px; color: var(--tx-2); }
@media (max-width: 600px) {
  .cr-tbl td.cr-v { font-size: 11px; }
  .cr-tbl td.cr-k { font-size: 10.5px; }
  .cr-tbl td.cr-o { font-size: 11px; }
}

/* 着順バッジ */
.pos { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--num); font-size: 16px; font-weight: 600; line-height: 1; border: 1.5px solid var(--line-2); color: var(--tx-3); background: var(--bg); }
.pos--1 { background: var(--red); border-color: var(--red); color: #fff; }
.pos--2 { background: var(--navy); border-color: var(--navy); color: #fff; }
.pos--3 { background: #a9bcd9; border-color: #a9bcd9; color: var(--navy); }
.pos--4, .pos--5, .pos--6 { color: var(--tx-2); }
.pos--x { border-style: dashed; font-size: 12px; color: var(--tx-3); }
.rp-runs .pos { width: 26px; height: 26px; font-size: 15px; margin-top: 2px; }
@media (max-width: 600px) { .pos { width: 24px; height: 24px; font-size: 14px; } }

/* 選手の静的ページ（検索向け） */
.sp { max-width: 1000px; margin: 0 auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 14px; }
.sp-crumb { font-size: 12px; color: var(--tx-3); }
.sp-crumb a { color: var(--navy); text-decoration: underline; }
.sp-h1 { font-size: 30px; font-weight: 900; line-height: 1.3; }
.sp-h1 small { display: block; font-size: 13px; font-weight: 500; color: var(--tx-3); }
.sp-lead { font-size: 14px; color: var(--tx-2); }
.sp .rp-kpis { margin-top: 0; }
.sp-cta { align-self: flex-start; padding: 12px 18px; border-radius: var(--r); background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; }
.sp-cta:hover { background: #0b2247; }
.sp-tbl td, .sp-tbl th { text-align: center !important; }
.sp-tbl .ln { width: 24px; height: 24px; font-size: 14px; }
.sp-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; }
.sp-peers { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.sp-peers a { color: var(--navy); text-decoration: underline; }
@media (max-width: 600px) { .sp { padding: 16px 16px 32px; } .sp-h1 { font-size: 24px; } .sp-cta { align-self: stretch; text-align: center; } }

/* トップの説明文 */
.about { max-width: 1280px; margin: 56px auto 0; padding: 0 24px; }
.about h2 { font-size: 16px; font-weight: 900; margin-bottom: 8px; }
.about p { font-size: 13px; color: var(--tx-2); line-height: 1.9; max-width: 900px; }
.about ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; list-style: none; font-size: 13px; }
.about a { color: var(--navy); text-decoration: underline; }
@media (max-width: 600px) { .about { padding: 0 16px; margin-top: 40px; } }
.rp-share { margin-left: 6px; color: var(--navy); text-decoration: underline; font-size: 12px; }

/* スマホの崩れ修正 */
@media (max-width: 600px) {
  .hdr .logo__txt small { display: none; }       /* ロゴ下の小さな文字（カウントダウンと並ぶと割れる） */
  .hdr .logo__txt { font-size: 18px; }
  .card__h { flex-wrap: wrap; row-gap: 6px; }     /* 見出し＋切り替えボタンは2段に */
  .card__h .seg { order: 3; }
  .cr-sum { display: flex; flex-wrap: wrap; gap: 2px 12px; }
  .cr-sum span { white-space: nowrap; }
  .sp-cta { font-size: 14px; }
  .rp-meta-link { display: block; }
}
@media (max-width: 600px) {
  .card__h { display: block; line-height: 1.5; }
  .card__h > small { margin-left: 6px; }
  .card__h .seg { display: flex; width: 100%; margin: 8px 0 0; }
  .card__h .tag { margin-right: 6px; vertical-align: 1px; }
}

/* 水面の状況（風と波の図） */
.wrel { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; margin-right: 4px; vertical-align: 2px; }
.wrel--tail { background: #e6f4ec; color: var(--green); }
.wrel--head { background: var(--red-2); color: var(--red); }
.wrel--side { background: var(--bg-3); color: var(--tx-2); }
.water__body { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 16px; align-items: center; }
.water__svg { width: 100%; height: auto; }
.water__pool { fill: #e9f1fb; stroke: #c4d6ee; }
.water__wave { fill: none; stroke: #9db8dc; stroke-width: 1.5; }
.water__mark { fill: #fff; stroke: var(--navy); stroke-width: 2; }
.water__lab { font-size: 10px; fill: var(--tx-2); text-anchor: middle; font-family: var(--font); }
.water__lab--start { fill: var(--navy); font-weight: 700; }
.water__lab--stand { fill: #fff; font-weight: 700; }
.water__start { stroke: var(--navy); stroke-width: 2; stroke-dasharray: 5 4; }
.water__startHead { fill: var(--navy); }
.water__stand { fill: var(--navy); }
.water__wind { stroke-width: 7; stroke-linecap: round; }
.water__wind--tail { stroke: var(--green); } .water__head--tail { fill: var(--green); }
.water__wind--head { stroke: var(--red); } .water__head--head { fill: var(--red); }
.water__wind--side { stroke: #6c7a91; } .water__head--side { fill: #6c7a91; }
.water__n { fill: var(--tx-2); }
.water__dl { display: flex; flex-direction: column; gap: 6px; }
.water__dl div { display: flex; align-items: baseline; gap: 10px; }
.water__dl dt { font-size: 12px; color: var(--tx-3); width: 36px; }
.water__dl dd { font-size: 14px; }
.water__dl dd b { font-family: var(--num); font-size: 24px; font-weight: 500; margin-right: 2px; }
.water__dl dd small { color: var(--tx-3); margin-left: 6px; }
.water__help { font-size: 12px; color: var(--tx-2); line-height: 1.6; margin-top: 4px; }
@media (max-width: 600px) { .water__body { grid-template-columns: 1fr; gap: 8px; } }

/* 選手コメント */
.cmt__list { list-style: none; display: flex; flex-direction: column; }
.cmt__list li { display: grid; grid-template-columns: 28px 150px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cmt__list .ln { width: 26px; height: 26px; font-size: 15px; }
.cmt__who b { display: block; font-size: 14px; }
.cmt__who small { font-size: 10.5px; color: var(--tx-3); }
.cmt__txt { font-size: 14px; line-height: 1.6; color: var(--tx); }
.cmt__none { color: var(--tx-3); font-size: 12px; }
.cmt .rp-def a { color: var(--navy); text-decoration: underline; }
@media (max-width: 600px) {
  .cmt__list li { grid-template-columns: 26px minmax(0, 1fr); gap: 4px 8px; }
  .cmt__txt { grid-column: 2; font-size: 13px; }
}

/* 攻め方指標（映像タグ） */
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 10px; font-weight: 700; color: var(--tx-3); vertical-align: 1px; cursor: help; }
.tip-pop { position: fixed; z-index: 200; width: min(280px, calc(100vw - 24px)); padding: 9px 11px; border-radius: 4px; background: var(--navy); color: #fff; font-size: 12px; line-height: 1.65; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.tgx__row { display: grid; grid-template-columns: 190px 88px minmax(0, 1fr) 110px; gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tgx__name b { font-size: 14px; }
.tgx__name small { display: block; font-size: 11px; color: var(--tx-3); }
.tgx__val b { font-family: var(--num); font-size: 22px; color: var(--navy); }
.tgx__few { display: inline-block; margin-left: 4px; font-size: 10px; color: var(--red); border: 1px solid var(--red); border-radius: 3px; padding: 0 4px; vertical-align: 3px; }
.tgx__none { font-size: 12px; color: var(--tx-3); }
.tgx__bar { position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.tgx__bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--navy); }
.tgx__bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--red); }
.tgx__n { font-size: 12px; text-align: right; color: var(--tx-2); font-family: var(--num); }
.tgx__n small { display: block; font-family: inherit; font-size: 10.5px; color: var(--tx-3); }
.tgx__sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--tx-2); }
.tgx__sub b { color: var(--tx); }
@media (max-width: 600px) {
  .tgx__row { grid-template-columns: minmax(0, 1fr) auto; }
  .tgx__bar { grid-column: 1 / -1; order: 3; }
  .tgx__n { grid-column: 1 / -1; order: 4; text-align: left; }
  .tgx__n small { display: inline; margin-left: 8px; }
  .tgx__sub { order: 5; }
}

/* 動きのマーク（前・握・3角・変全） */
.mk-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 4px; }
.mk { display: inline-block; min-width: 20px; padding: 1px 4px; border-radius: 3px; font-size: 11px; font-weight: 900; line-height: 1.4; cursor: help; }
.mk--mae { background: var(--red); color: #fff; }
.mk--tag { background: var(--navy); color: #fff; }

/* チルト3・展示進入 */
.mk--tilt { background: #d97706; color: #fff; }
.is-tilt3 { color: #d97706 !important; font-weight: 900; }
.rc-tbl b.is-moved { color: var(--red); }
.exin { border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; }
.exin.is-moved { border: 2px solid var(--red); background: #fff6f5; }
.exin__h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.exin__l { font-size: 14px; font-weight: 900; }
.exin__tag { font-size: 12px; font-weight: 900; color: #fff; background: var(--red); border-radius: 3px; padding: 2px 8px; }
.exin__ok { font-size: 12px; color: var(--tx-3); }
.exin__row { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.exin__row li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); }
.exin__row li small { font-size: 10.5px; color: var(--tx-3); }
.exin__row .ln { width: 30px; height: 30px; font-size: 17px; }
.exin__row li em { font-style: normal; font-size: 11px; font-weight: 900; }
.exin__row li.is-in { border-color: var(--red); }
.exin__row li.is-in em { color: var(--red); }
.exin__row li.is-out em { color: var(--tx-3); }
.exin__note { font-size: 13px; margin-top: 10px; line-height: 1.6; }
.exin__note b { color: var(--red); }
.exin__def { font-size: 11px; color: var(--tx-3); margin-top: 6px; }
@media (prefers-color-scheme: dark) { .exin.is-moved { background: transparent; } }

/* 展示進入：3角（スロー2・ダッシュ4に分けて見せる） */
.exin__tag--kado { background: #7c2d12; }
.exin__split { display: flex; gap: 10px; align-items: flex-start; }
.exin__grp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.exin__gl { font-size: 11px; font-weight: 900; color: var(--tx-2); text-align: center; border-bottom: 2px solid var(--line-2); padding-bottom: 2px; }
.exin__grp.is-dash { margin-top: 16px; }
.exin__grp.is-dash .exin__gl { border-color: var(--red); color: var(--red); }
.exin__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.exin__row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exin__row li.is-kado { border: 2px solid var(--red); background: #fff6f5; }
.exin__row li.is-kado em { color: var(--red); font-size: 12px; }
@media (prefers-color-scheme: dark) { .exin__row li.is-kado { background: transparent; } }

.exin__chk { font-size: 12px; color: var(--tx-2); margin-top: 8px; }

/* 過去のレースの3角 */
.result__kado, .cr-kado { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: #7c2d12; color: #fff; font-size: 11px; font-weight: 900; vertical-align: 2px; }

/* 展示の特殊アラート（前づけ＝赤、3角＝茶） */
.al-badge { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px; background: var(--red); color: #fff; font-size: 10px; font-weight: 900; line-height: 1.5; vertical-align: 1px; }
.al-badge--kado { background: #7c2d12; }
#rc-tabs a.is-al-mae, .rc-venues a.is-al-mae { background: #fff0ee; box-shadow: inset 0 0 0 2px var(--red); }
#rc-tabs a.is-al-kado, .rc-venues a.is-al-kado { background: #fbefe6; box-shadow: inset 0 0 0 2px #7c2d12; }
#rc-tabs a.is-al.is-on { color: inherit; }
.vc.is-al-mae { box-shadow: 0 0 0 2px var(--red); }
.vc.is-al-kado { box-shadow: 0 0 0 2px #7c2d12; }
.vc__al { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.vc__al span { font-size: 11px; font-weight: 900; color: #fff; background: var(--red); border-radius: 3px; padding: 1px 6px; }
.vc__al.is-kado span { background: #7c2d12; }
#al-toasts { position: fixed; z-index: 300; top: 64px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; }
.al-toast { position: relative; display: block; padding: 10px 34px 10px 14px; border-radius: 6px; background: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); text-decoration: none; animation: al-in .25s ease-out; }
.al-toast--kado { background: #7c2d12; }
.al-toast b { display: block; font-size: 14px; }
.al-toast span { display: block; font-size: 12px; margin-top: 2px; opacity: .95; }
.al-toast i { position: absolute; right: 10px; top: 8px; font-style: normal; font-size: 18px; cursor: pointer; }
@keyframes al-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-color-scheme: dark) { #rc-tabs a.is-al-mae, .rc-venues a.is-al-mae, #rc-tabs a.is-al-kado, .rc-venues a.is-al-kado { background: transparent; } }
.rc-venues a.is-on.is-al-mae { background: var(--navy); color: #fff; box-shadow: inset 0 0 0 3px var(--red); }
.rc-venues a.is-on.is-al-kado { background: var(--navy); color: #fff; box-shadow: inset 0 0 0 3px #c2410c; }
.rc-venues a.is-on.is-al small { color: rgba(255,255,255,.8); }

/* 出走表の並び（進入順・枠番順） */
.ord-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 10px; }
.ord-seg > span { font-size: 12px; font-weight: 900; }
.ord-seg small { flex-basis: 100%; font-size: 11px; color: var(--tx-3); }
.rc-tbl th .th-c { display: block; font-size: 10px; color: var(--tx-3); font-weight: 500; margin-bottom: 2px; }
.rc-tbl th .th-c.is-moved { color: var(--red); font-weight: 900; }

/* モーター機歴：その節の選手コメント */
.mo-cmt { margin: 4px 0 10px; padding: 8px 10px; border-radius: 4px; background: var(--bg-2, #f5f6f8); }
.mo-cmt h5 { font-size: 12px; font-weight: 900; margin-bottom: 4px; }
.mo-cmt h5 small { font-weight: 400; color: var(--tx-3); font-size: 10.5px; }
.mo-cmt ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mo-cmt li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px; font-size: 13px; line-height: 1.55; }
.mo-cmt li > span { color: var(--tx-3); font-family: var(--num); }
.mo-cmt li small { display: block; font-size: 10.5px; color: var(--tx-3); }
@media (prefers-color-scheme: dark) { .mo-cmt { background: rgba(255,255,255,.05); } }

.mk--kado { background: #7c2d12; color: #fff; }
.result__l .result__kado { display: block; margin: 4px 0 0; text-align: center; }
.result__l .result__kado { white-space: nowrap; font-size: 10px; padding: 1px 3px; margin-left: -4px; margin-right: -4px; }

/* 勝ち筋・負け筋：回数と出走数 */
.rc-tbl small.k-n { display: block; font-size: 10px; color: var(--tx-3); font-weight: 500; }
.rc-tbl tr.k-runs td b { font-size: 15px; }
.rc-tbl tr.k-runs td.is-few { color: var(--red); }
.rc-tbl tr.k-runs td.is-few small { color: var(--red); }

/* 選手ページ 枠別決まり手：回数／出走数 */
.rp-kim td small.kc { display: block; font-size: 10px; color: var(--tx-3); margin: 0 0 2px; }
.rp-kim td i.kc { display: block; font-style: normal; font-size: 9.5px; color: var(--tx-3); }
.rp-kim__n td.is-few { color: var(--red); }
.rp-kim__n td em { font-style: normal; font-size: 10px; font-weight: 900; margin-left: 2px; }

/* スマホで短い文字が2行に折れないように */
.vbtn, .result__p, .chip, .cr-sum > span, .rp-span, .al-badge, .mk, .tag { white-space: nowrap; }
.result { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 600px) {
  .result .vbtn { margin-left: auto; padding: 6px 10px; font-size: 12px; }
  .result__p { font-size: 18px; }
  .result__p.is-man { font-size: 18px; }
  .cr-sum { flex-wrap: wrap; gap: 2px 10px; }
  .rp-fin li { grid-template-columns: 70px minmax(0, 1fr) 40px 64px; }
  .rp-ser .card__h small { display: block; white-space: nowrap; margin: 2px 0 0; }
}
.rp-fin b small i { display: block; font-style: normal; }
.sec__title .sec__sub { font-size: 12px; font-weight: 500; color: var(--tx-3); margin-left: 8px; white-space: nowrap; }

/* ===== AI予想（ガチイク侍） ===== */
.ai { border: 2px solid var(--navy); }
.ai .card__h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-conf { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.ai-conf.is-kata { background: #e6f0ff; color: var(--navy); }
.ai-conf.is-futsu { background: #f1f1f1; color: var(--tx-2); }
.ai-conf.is-kon { background: #fde8e7; color: var(--red); }
.ai-head { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; }
.ai-sam { flex: 0 0 auto; width: 96px; height: 96px; }
.ai-say { position: relative; flex: 1; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; }
.ai-say::before { content: ""; position: absolute; left: -8px; top: 26px; border: 8px solid transparent; border-left: 0; border-right-color: var(--line-2); }
.ai-say b { font-size: 12px; color: var(--navy); }
.ai-say p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.7; }
.ai-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.ai-rank, .ai-tri { list-style: none; margin: 0; padding: 0; }
.ai-rank li { display: grid; grid-template-columns: 18px 26px minmax(0, 11em) 1fr 52px; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ai-rank .ln { width: 24px; height: 22px; font-size: 13px; }
.ai-mk { font-weight: 900; color: var(--red); text-align: center; }
.ai-nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-nm small { margin-left: 6px; color: var(--tx-3); font-size: 11px; }
.ai-bar { height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.ai-bar i { display: block; height: 100%; background: var(--navy); border-radius: 5px; }
.ai-rank b { text-align: right; font-family: var(--num); font-size: 15px; }
.ai-tri li { display: flex; align-items: center; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ai-tri li > small { width: 16px; color: var(--tx-3); }
.ai-tri .ln { width: 26px; height: 24px; font-size: 14px; }
.ai-tri i { font-style: normal; color: var(--tx-3); }
.ai-tri b { margin-left: auto; font-family: var(--num); }
.ai-tri li.is-hit { background: #fff6d6; }
.ai-tri em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--red); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.ai-res { margin: 8px 0 0; font-size: 13px; }
.ai-res .is-hit { color: var(--red); }
@media (max-width: 600px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-sam { width: 72px; height: 72px; }
  .ai-say p { font-size: 13.5px; }
  .ai-rank li { grid-template-columns: 16px 24px minmax(0, 9.5em) 1fr 46px; gap: 6px; }
}

/* ===== 広告枠（js/ads.js で広告のIDを入れるまでは出さない） ===== */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; margin: 16px 0; text-align: center; min-height: 100px; }
.ads-on .ad-slot::before { content: "広告"; display: block; font-size: 10.5px; color: var(--tx-3); text-align: left; margin-bottom: 4px; }
.rc-body + .ad-slot { margin: 12px 0; }
#rc-body2:not(:empty) { margin-top: 12px; }

/* ===== 穴予想（アナ姫） ===== */
.ai--ana { border-color: #e86aa0; }
.ai--ana .ai-say { background: #fff2f8; border-color: #f7c6dc; }
.ai--ana .ai-say::before { border-right-color: #f7c6dc; }
.ai--ana .ai-say b { color: #c2407a; }
.ai-conf.is-ana { background: #fff3cc; color: #9a6b00; }
.ana-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.ana-pick > .ln { width: 36px; height: 34px; font-size: 18px; }
.ana-pick b { font-size: 16px; }
.ana-pick small { display: block; color: var(--tx-3); font-size: 11.5px; }
.ana-pick dl { display: flex; gap: 14px; margin: 0 0 0 auto; }
.ana-pick dt { font-size: 10.5px; color: var(--tx-3); white-space: nowrap; }
.ana-pick dd { margin: 0; font-family: var(--num); font-size: 17px; font-weight: 600; }
.ana-pick dd.is-up { color: var(--red); }
@media (max-width: 600px) { .ana-pick dl { margin: 4px 0 0; width: 100%; justify-content: space-between; } }

/* ===== 船足AI評価 ===== */
.mgrade--D { background: #b9bec6; }
.rc-tbl .mgrade + small { margin-top: 2px; }
.mnum[data-tip] { cursor: pointer; }
.rc-auto { display: block; margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: #fff6d6; color: var(--tx-1, #222); font-size: 12.5px; }
.rc-auto a { margin-left: 6px; font-weight: 700; }
