/* ═══════════════════════════════════════════════════════════════════════════
   BOATRACE EDGE — UI2「Lane & Slit」
   ゼロベース再設計（全レース一覧 ＋ レース詳細の2画面）。
   色は6艇の公式枠番色だけが主役。地は静かな水面色、数字はトートボード風の細身書体。
   有効化: ?ui=2（localStorage br-ui=2）/ 無効化: ?ui=1
   ═══════════════════════════════════════════════════════════════════════════ */

html.ui2 {
  --f-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --f-num: "Barlow Condensed", "Zen Kaku Gothic New", system-ui, sans-serif;
  --f-data: "Barlow", "Zen Kaku Gothic New", system-ui, sans-serif;

  /* light — 石灰岩の地 / 深い湖のアクセント */
  --bg: #EDF1F0;
  --panel: #FFFFFF;
  --panel-2: #F5F7F6;
  --ink: #0E1B1F;
  --ink-2: #43535A;
  --ink-3: #5E6D73;
  --line: rgba(14, 27, 31, 0.08);
  --line-2: rgba(14, 27, 31, 0.15);
  --accent: #0A6A73;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(10, 106, 115, 0.09);
  --alert: #C23F2B;
  --alert-soft: rgba(194, 63, 43, 0.09);
  --caution: #965E0E;
  --caution-soft: rgba(168, 106, 18, 0.10);
  --shadow: 0 1px 0 rgba(14, 27, 31, 0.04), 0 8px 24px -12px rgba(14, 27, 31, 0.18);

  /* 枠番色（公式） */
  --l1: #F8F8F6; --l1-ink: #111; --l1-edge: rgba(14, 27, 31, 0.28);
  --l2: #1A1C1D; --l2-ink: #FFF; --l2-edge: transparent;
  --l3: #D8392D; --l3-ink: #FFF; --l3-edge: transparent;
  --l4: #2A62D4; --l4-ink: #FFF; --l4-edge: transparent;
  --l5: #F1C31A; --l5-ink: #111; --l5-edge: transparent;
  --l6: #177F48; --l6-ink: #FFF; --l6-edge: transparent;

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --gut: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  html.ui2:not([data-theme="light"]) {
    --bg: #0A1114; --panel: #101A1D; --panel-2: #142125;
    --ink: #E5EDEE; --ink-2: #A0B0B4; --ink-3: #7D8F94;
    --line: rgba(229, 237, 238, 0.075); --line-2: rgba(229, 237, 238, 0.15);
    --accent: #4FC1C9; --accent-ink: #062226; --accent-soft: rgba(79, 193, 201, 0.12);
    --alert: #FF6A55; --alert-soft: rgba(255, 106, 85, 0.12);
    --caution: #E5A93C; --caution-soft: rgba(229, 169, 60, 0.12);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
    --l1-edge: transparent; --l2: #2B2F31; --l2-edge: rgba(229, 237, 238, 0.35);
    color-scheme: dark;
  }
}
html.ui2[data-theme="dark"] {
  --bg: #0A1114; --panel: #101A1D; --panel-2: #142125;
  --ink: #E5EDEE; --ink-2: #A0B0B4; --ink-3: #7D8F94;
  --line: rgba(229, 237, 238, 0.075); --line-2: rgba(229, 237, 238, 0.15);
  --accent: #4FC1C9; --accent-ink: #062226; --accent-soft: rgba(79, 193, 201, 0.12);
  --alert: #FF6A55; --alert-soft: rgba(255, 106, 85, 0.12);
  --caution: #E5A93C; --caution-soft: rgba(229, 169, 60, 0.12);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --l1-edge: transparent; --l2: #2B2F31; --l2-edge: rgba(229, 237, 238, 0.35);
  color-scheme: dark;
}

/* ── 旧UIの浮遊物を隠す ── */
html.ui2 #edgeHomeBtn { display: none !important; }

html.ui2, html.ui2 body {
  background: var(--bg) !important;
  color: var(--ink);
  margin: 0;
  min-height: 100%;
}
html.ui2 body { overscroll-behavior-y: none; }
html.ui2 #root { max-width: none !important; padding: 0 !important; margin: 0 !important; }

:where(.u-app), :where(.u-app) * { box-sizing: border-box; }
.u-app {
  font-family: var(--f-jp);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}
:where(.u-app) :where(button) {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit;
  letter-spacing: inherit; border-radius: 0; box-shadow: none; min-height: 0; width: auto;
}
.u-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.u-num { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.u-data { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.u-mute { color: var(--ink-3); }
.u-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ═══ Top bar ═══ */
.u-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 var(--gut);
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.u-mark { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; padding: 6px 4px; margin: -6px -4px; border-radius: 6px; }
.u-mark:hover b { opacity: 0.8; }
@media (max-width: 380px) { .u-bar { gap: 6px; } .u-mark i { display: none; } .u-date-label { min-width: 70px; } }
.u-mark b {
  font-family: var(--f-num); font-weight: 700; font-size: 21px; letter-spacing: 0.14em;
}
.u-mark i {
  display: block; width: 18px; height: 3px; align-self: center;
  background: linear-gradient(90deg, var(--l1) 0 16.6%, var(--l2) 0 33.3%, var(--l3) 0 50%, var(--l4) 0 66.6%, var(--l5) 0 83.3%, var(--l6) 0);
  border-radius: 2px; box-shadow: inset 0 0 0 0.5px var(--line-2);
}
.u-date { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.u-date-btn {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; color: var(--ink-2);
  transition: background 0.15s;
}
.u-date-btn:hover { background: var(--line); }
.u-date-btn:disabled { opacity: 0.3; cursor: default; }
.u-date-label { min-width: 78px; text-align: center; line-height: 1.1; }
.u-date-label .d { font-family: var(--f-num); font-size: 19px; font-weight: 600; }
.u-date-label .w { font-size: 11px; color: var(--ink-3); margin-left: 3px; }
.u-date-label .t {
  display: block; font-size: 10.5px; letter-spacing: 0.12em; color: var(--accent); font-weight: 700;
}
.u-live {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 11px; color: var(--ink-3); font-family: var(--f-data);
  padding: 6px 2px 6px 6px;
}
.u-live i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
@media (max-width: 380px) { .u-live .lbl { display: none; } }
/* 320px 幅で上部バーが約20pxはみ出して横スクロールが出ていた（2026-11-07）*/
@media (max-width: 340px) { .u-bar { gap: 4px; } .u-mark b { font-size: 18px; letter-spacing: 0.08em; } .u-date-btn { width: 30px; } .u-date-label { min-width: 62px; } .u-date-label .d { font-size: 17px; } .u-live { padding-left: 2px; } }
/* 2026-11-12: 点滅は合成だけで済む作り（重ねた輪の拡大と透明度）にする。以前は影の伸縮で、表示中ずっと毎フレーム描き直しが走っていた
   （何もしていない詳細画面で 20秒あたり約4.3秒の処理 → 約0.2秒）。取得中の点（u-pulse）は透明度の点滅 */
.u-live.busy i { background: var(--accent); animation: u-pulse 0.9s var(--ease) infinite; }
.u-live.on i { background: var(--accent); }
.u-live.on i::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: radial-gradient(circle, transparent 3px, var(--accent-soft) 3.4px); animation: u-ring 2.4s var(--ease) infinite; }   /* 中心の点には重ねない */
@keyframes u-ring { 50% { transform: scale(1.5); opacity: 0; } }
@keyframes u-pulse { 50% { opacity: 0.35; } }

/* ═══ Layout ═══ */
.u-main { display: block; }
.u-pane { min-width: 0; }
.u-board-pane { padding-bottom: 40px; }
@media (min-width: 1024px) {
  .u-main { display: grid; grid-template-columns: minmax(380px, 440px) 1fr; }
  .u-board-pane {
    position: sticky; top: 56px; height: calc(100dvh - 56px); overflow-y: auto;
    border-right: 1px solid var(--line); padding-bottom: 32px; scrollbar-width: thin;
  }
  .u-detail-pane { min-height: calc(100dvh - 56px); }
  .u-back { display: none !important; }
}
@media (max-width: 1023.98px) {
  .u-main[data-route="race"] .u-board-pane { display: none; }
  .u-main[data-route="board"] .u-detail-pane { display: none; }
}

/* ═══ Board header ═══ */
.u-board-head { padding: 20px var(--gut) 12px; }
.u-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--ink-3);
  text-transform: uppercase;
}
.u-next {
  margin-top: 10px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 12px;
  padding: 16px; border-radius: var(--r-l); background: var(--panel); box-shadow: var(--shadow);
  border: 1px solid var(--line); width: 100%; text-align: left;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.u-next:hover { transform: translateY(-1px); }
.u-next-race { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.u-next-race .v { font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }
.u-next-race .r { font-family: var(--f-num); font-size: 30px; font-weight: 700; line-height: 1; }
.u-next-race .r small { font-size: 0.6em; margin-left: 1px; }
.u-next-count { text-align: right; line-height: 1; }
.u-next-count .m { font-family: var(--f-num); font-size: 44px; font-weight: 600; color: var(--accent); }
.u-next-count .u { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.u-next-count .at { display: block; font-size: 12px; color: var(--ink-3); margin-top: 6px; font-family: var(--f-data); }
.u-next-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }

.u-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border-top: 1px solid var(--line); }
.u-stat { padding: 10px 0 2px; }
.u-stat + .u-stat { padding-left: 12px; border-left: 1px solid var(--line); }
.u-stat .n { font-family: var(--f-num); font-size: 22px; font-weight: 600; line-height: 1.1; }
.u-stat .l { font-size: 11px; color: var(--ink-3); }

/* ═══ Controls ═══ */
.u-controls {
  position: sticky; top: 56px; z-index: 20;
  display: flex; flex-direction: column; gap: 10px;
  padding: 10px var(--gut) 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
@media (min-width: 1024px) { .u-controls { top: 0; } }
.u-seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 10px; background: var(--line);
}
.u-seg button {
  height: 32px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.u-seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.u-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut); }
.u-chips::-webkit-scrollbar { display: none; }
.u-chip {
  flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.u-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.u-chip .c { font-family: var(--f-data); font-size: 11px; opacity: 0.7; }

/* ═══ Timeline ═══ */
.u-group { padding: 0 var(--gut); }
.u-group-h {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-3);
}
.u-group-h .c { font-family: var(--f-data); font-weight: 500; letter-spacing: 0; }
.u-list { border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.u-row {
  display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 10px 14px 10px 12px; text-align: left;
  position: relative; transition: background 0.15s;
}
.u-row + .u-row::before { content: ""; position: absolute; left: 12px; right: 0; top: 0; border-top: 1px solid var(--line); }
.u-row:hover { background: var(--panel-2); }
.u-row[aria-current="true"] { background: var(--accent-soft); }
.u-row[aria-current="true"]::after {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.u-row.done .u-time .t, .u-row.done .u-rv { color: var(--ink-3); }
.u-time { line-height: 1.05; }
.u-time .t { font-family: var(--f-num); font-size: 20px; font-weight: 600; display: block; }
.u-time .s { font-size: 11px; color: var(--ink-3); font-family: var(--f-data); white-space: nowrap; }
.u-time .s.hot { color: var(--alert); font-weight: 600; }
.u-time .s.soon { color: var(--caution); font-weight: 600; }
.u-rv { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.u-rv .v { font-weight: 700; font-size: 15px; white-space: nowrap; }
.u-rv .r { font-family: var(--f-num); font-weight: 700; font-size: 17px; }
.u-rv .r small { font-size: 0.72em; }
.u-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.u-sub .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-right { display: flex; align-items: center; gap: 10px; }

/* grade */
.u-grade {
  font-family: var(--f-num); font-weight: 700; font-size: 11px; letter-spacing: 0.06em;
  padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); line-height: 1.4;
}
.u-grade.SG { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.u-grade.G1, .u-grade.PG1 { border-color: var(--ink); color: var(--ink); }
.u-grade.std { display: none; }

/* rank */
.u-rank {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--f-num); font-weight: 700; font-size: 16px;
  color: var(--ink-3); border: 1px solid var(--line-2);
}
.u-rank.S { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.u-rank.A { color: var(--accent); border-color: var(--accent); }
.u-rank.D:not(.lg), .u-rank.none { visibility: hidden; }
.u-rank.lg.D { color: var(--ink-3); border-style: dashed; }
.u-rank.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 30px; }

/* chaos meter */
.u-chaos { display: grid; gap: 3px; width: 42px; justify-items: end; }
.u-chaos .n { font-family: var(--f-num); font-size: 15px; font-weight: 600; line-height: 1; }
.u-chaos .bar { width: 42px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.u-chaos .bar i { display: block; height: 100%; background: var(--ink-2); border-radius: 3px; }
.u-chaos .bar i { background: var(--ink-3); }
.u-chaos.hi .bar i { background: var(--caution); }
.u-chaos.ana .n { color: var(--alert); }
.u-chaos.ana .bar i { background: var(--alert); }
.u-chaos.lo .bar i { background: var(--accent); }

/* lanes */
.u-lane {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px;
  font-family: var(--f-num); font-weight: 700; font-size: 13px; line-height: 1; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px var(--edge, transparent);
}
.u-lane.sm { width: 16px; height: 16px; font-size: 11px; border-radius: 4px; }
.u-lane.lg { width: 30px; height: 30px; font-size: 18px; border-radius: 8px; }
.u-lane.b1 { background: var(--l1); color: var(--l1-ink); --edge: var(--l1-edge); }
.u-lane.b2 { background: var(--l2); color: var(--l2-ink); --edge: var(--l2-edge); }
.u-lane.b3 { background: var(--l3); color: var(--l3-ink); }
.u-lane.b4 { background: var(--l4); color: var(--l4-ink); }
.u-lane.b5 { background: var(--l5); color: var(--l5-ink); }
.u-lane.b6 { background: var(--l6); color: var(--l6-ink); }
.u-combo { display: inline-flex; align-items: center; gap: 2px; }
.u-combo .sep { width: 4px; height: 1px; background: var(--ink-3); opacity: 0.5; }

.u-hit {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.04em;
  background: var(--accent); color: var(--accent-ink);
}
.u-miss { font-size: 11px; color: var(--ink-3); }
.u-pay { font-family: var(--f-data); font-size: 12px; color: var(--ink-2); }

.u-empty {
  margin: 32px var(--gut); padding: 32px 20px; text-align: center; color: var(--ink-3);
  border: 1px dashed var(--line-2); border-radius: var(--r-l); font-size: 13.5px;
}
.u-more {
  display: block; width: 100%; padding: 13px; text-align: center !important; font-size: 13px; font-weight: 700; color: var(--accent);
  border-top: 1px solid var(--line);
}

/* ═══ Venue matrix ═══ */
.u-matrix { padding: 4px var(--gut) 0; }
.u-mx-head, .u-mx-row { display: grid; grid-template-columns: 74px repeat(12, 1fr); align-items: center; gap: 3px; }
.u-mx-head { font-family: var(--f-num); font-size: 11px; color: var(--ink-3); text-align: center; padding: 0 0 6px; }
.u-mx-row { padding: 5px 0; border-top: 1px solid var(--line); }
.u-mx-v { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.u-mx-v b { font-size: 13.5px; }
.u-mx-v span { font-size: 10.5px; color: var(--ink-3); }
.u-cell {
  aspect-ratio: 1 / 1.25; width: 100%; border-radius: 5px; position: relative;
  display: grid; place-items: center; font-family: var(--f-num); font-size: 12px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-3);
  transition: transform 0.15s var(--ease);
}
.u-cell:hover { transform: scale(1.08); z-index: 2; }
.u-cell.done { background: transparent; border-style: dashed; color: var(--ink-3); }
.u-cell.done i { position: absolute; inset: 4px 30% 4px; border-radius: 2px; }
.u-cell.next { border: 2px solid var(--ink); color: var(--ink); }
.u-cell.S { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.u-cell.A { color: var(--accent); border-color: var(--accent); }
.u-cell.hit::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.u-cell[aria-current="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.u-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 14px var(--gut) 0; font-size: 11px; color: var(--ink-3); }
.u-legend span { display: inline-flex; align-items: center; gap: 5px; }
.u-legend .sw { width: 11px; height: 13px; border-radius: 3px; border: 1px solid var(--line-2); }

/* ═══ Detail ═══ */
.u-detail { max-width: 880px; margin: 0 auto; padding: 0 var(--gut) 72px; }
.u-dhead { padding: 20px 0 16px; }
.u-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); margin: 0 0 14px -4px; padding: 4px; }
.u-dtitle { display: flex; align-items: flex-end; gap: 14px; }
.u-dtitle .vr { line-height: 0.9; }
.u-dtitle .v { font-size: 15px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.u-dtitle .r { font-family: var(--f-num); font-size: 64px; font-weight: 700; letter-spacing: -0.01em; }
.u-dtitle .r small { font-size: 0.42em; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.u-dnav { margin-left: auto; display: flex; gap: 6px; padding-bottom: 6px; }
.u-dnav button {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--ink-2); transition: all 0.15s;
}
.u-dnav button:hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.u-dnav button:disabled { opacity: 0.25; cursor: default; }
.u-dname { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.u-rstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(36px, 1fr); gap: 4px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.u-rstrip::-webkit-scrollbar { display: none; }
@media (max-width: 520px) { .u-rstrip { margin-left: calc(var(--gut) * -1); margin-right: calc(var(--gut) * -1); padding: 0 var(--gut); } }
.u-rstrip button {
  position: relative; height: 36px; scroll-snap-align: center; border-radius: 6px; text-align: center;
  font-family: var(--f-num); font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: var(--panel); border: 1px solid var(--line); transition: background 0.15s, color 0.15s;
}
.u-rstrip button:hover { border-color: var(--line-2); }
.u-rstrip button.closed, .u-rstrip button.done { color: var(--ink-3); background: transparent; }
.u-rstrip button i { position: absolute; left: 50%; bottom: 3px; width: 12px; height: 3px; transform: translateX(-50%); border-radius: 2px; }
.u-rstrip button.cur { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.u-dmeta { display: flex; align-items: stretch; margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.u-dm { flex: 1; padding: 10px 0 10px 12px; min-width: 0; }
.u-dm:first-child { padding-left: 0; }
.u-dm + .u-dm { border-left: 1px solid var(--line); }
.u-dm .l { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; }
.u-dm .n { font-family: var(--f-num); font-size: 22px; font-weight: 600; line-height: 1.15; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.u-dm .n small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.u-dm .n.alert { color: var(--alert); }
.u-dm .n.txt { font-family: var(--f-jp); font-size: 15px; font-weight: 700; line-height: 1.95; }
.u-dm .sub { font-size: 11px; color: var(--ink-3); font-family: var(--f-data); margin-top: -2px; }
.u-dm .n.accent { color: var(--accent); }
.u-wind { width: 14px; height: 14px; color: var(--ink-2); flex-shrink: 0; }

.u-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.u-sig {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500;
  padding: 5px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line);
}
.u-sig i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.u-sig.alert { background: var(--alert-soft); border-color: transparent; color: var(--alert); }
.u-sig.alert i { background: var(--alert); }
.u-sig.caution { background: var(--caution-soft); border-color: transparent; color: var(--caution); }
.u-sig.caution i { background: var(--caution); }
.u-sig.ok i { background: var(--accent); }
.u-sig.zen { align-items: flex-start; line-height: 1.5; }
.u-sig.zen i { margin-top: 6px; flex-shrink: 0; }
.u-zen-note { flex-basis: 100%; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

.u-sec { margin-top: 30px; }
/* 2026-11-12: 画面の外にある区画は、見えるまで配置と描画を後回しにする（詳細を開く処理 約1.3秒 → 約0.5秒・等速の計測）。
   描き直しのたびに高さがずれないよう、ui2.js の draw が直前の高さを contain-intrinsic-size に引き継ぐ */
.u-detail > .u-sec { content-visibility: auto; contain-intrinsic-size: auto 480px; }
.u-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.u-sec-h h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.u-sec-h .aside { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.u-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); }

/* result */
.u-result { padding: 16px; display: grid; gap: 14px; }
.u-podium { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.u-pod { text-align: center; }
.u-pod .p { font-family: var(--f-num); font-size: 12px; color: var(--ink-3); }
.u-pod .u-lane { margin: 4px auto 0; }
.u-pod .st { font-family: var(--f-data); font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.u-pays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.u-paycell + .u-paycell { border-left: 1px solid var(--line); padding-left: 10px; }
.u-paycell .l { font-size: 10.5px; color: var(--ink-3); }
.u-paycell .n { font-family: var(--f-num); font-size: 19px; font-weight: 600; }
.u-verdict { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }

/* entries table */
.u-entries { overflow: hidden; }
.u-eh, .u-e {
  display: grid; align-items: center;
  grid-template-columns: 30px minmax(0, 1fr) 54px 46px 46px 50px 92px;
  gap: 10px; padding: 0 14px;
}
.u-eh { height: 34px; font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.u-eh span:nth-child(n+3) { text-align: right; }
.u-e { width: 100%; min-height: 64px; text-align: left; position: relative; transition: background 0.15s; }
.u-e + .u-e, .u-ex + .u-e { border-top: 1px solid var(--line); }
.u-e:hover { background: var(--panel-2); }
.u-e .who { min-width: 0; }
.u-e .nm { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 15px; }
.u-e .nm .cls { font-family: var(--f-num); font-size: 12px; font-weight: 700; color: var(--ink-3); }
.u-e .nm .cls.A1 { color: var(--accent); }
.u-e .mk { font-size: 13px; color: var(--accent); width: 14px; flex-shrink: 0; }
.u-e .meta { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-e .ses { display: flex; align-items: baseline; gap: 5px; margin-top: 1px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.u-e .ses em { font-style: normal; font-size: 10.5px; }
.u-e .ses b { font-family: var(--f-data); font-weight: 600; color: var(--ink-2); }
.u-e .ses .sq { font-family: var(--f-data); letter-spacing: 0.08em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.u-e .ses .sq i { font-style: normal; }
.u-e .ses .sq i.w { color: var(--accent); font-weight: 700; }
.u-e .c { text-align: right; font-family: var(--f-data); font-size: 14px; font-weight: 500; }
.u-e .c small { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 400; }
.u-e .c.best { color: var(--accent); font-weight: 700; }
.u-e .c.worst { color: var(--alert); }
.u-prob { display: grid; gap: 4px; justify-items: end; }
.u-prob .n { font-family: var(--f-num); font-size: 18px; font-weight: 600; line-height: 1; }
.u-prob .bar { width: 100%; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.u-prob .bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink-2); transform-origin: left; }
.u-prob.top .n { color: var(--accent); }
.u-prob.top .bar i { background: var(--accent); }
.u-mobile-stats { display: none; }

@media (max-width: 640px) {
  .u-eh { display: none; }
  .u-e { grid-template-columns: 30px minmax(0, 1fr) 74px; padding: 10px 14px; row-gap: 8px; }
  .u-e .c { display: none; }
  .u-mobile-stats {
    display: grid; grid-column: 2 / -1; grid-template-columns: repeat(4, 1fr); gap: 6px;
    font-family: var(--f-data); font-size: 12.5px;
  }
  .u-mobile-stats span { display: flex; flex-direction: column; line-height: 1.25; }
  .u-mobile-stats em { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-family: var(--f-jp); }
  .u-mobile-stats .best { color: var(--accent); font-weight: 700; }
  .u-mobile-stats .worst { color: var(--alert); }
}
.u-ex { padding: 4px 14px 16px 54px; display: grid; gap: 14px; background: var(--panel-2); border-top: 1px solid var(--line); }
@media (max-width: 640px) { .u-ex { padding-left: 14px; } }
.u-ex h3 { margin: 12px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); }
.u-prof { display: flex; align-items: center; gap: 14px; padding-top: 14px; }
.u-ph { flex: none; width: 72px; height: 96px; border-radius: 6px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); border-bottom: 3px solid var(--edge-c, var(--line)); display: grid; place-items: center; }
.u-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-ph.none { border-bottom-width: 1px; border-bottom-color: var(--line); }
.u-prof-t { display: grid; gap: 4px; min-width: 0; }
.u-prof-t .nm { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 16px; }
.u-prof-t .nm .cls { font-family: var(--f-num); font-size: 12px; font-weight: 700; color: var(--ink-3); }
.u-prof-t .nm .cls.A1 { color: var(--accent); }
.u-prof-t .meta { font-size: 12px; color: var(--ink-3); }
.u-prof-a { font-size: 12px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; justify-self: start;
  padding: 6px 0; }
.u-prof-a:hover { color: var(--ink); }
.u-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px 14px; }
.u-kv span { display: flex; flex-direction: column; font-family: var(--f-data); font-size: 14px; }
.u-kv em { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-family: var(--f-jp); }
.u-ctab { width: 100%; border-collapse: collapse; font-family: var(--f-data); font-size: 12.5px; }
.u-ctab th, .u-ctab td { padding: 5px 4px; text-align: right; border-bottom: 1px solid var(--line); }
.u-ctab th:first-child, .u-ctab td:first-child { text-align: left; color: var(--ink-3); font-family: var(--f-jp); font-size: 11px; }
.u-ctab thead th { color: var(--ink-3); font-weight: 500; font-size: 11px; }
.u-ctab .here { color: var(--accent); font-weight: 700; }
.u-kim { display: grid; gap: 6px; max-width: 420px; }
.u-kim > div { display: grid; grid-template-columns: 72px 1fr 28px 36px; align-items: center; gap: 8px; font-size: 12px; }
.u-kim .l { color: var(--ink-2); }
.u-kim .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.u-kim .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.u-kim .n { font-family: var(--f-data); font-variant-numeric: tabular-nums; text-align: right; }
.u-kim .p { font-family: var(--f-data); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-3); }
.u-kim .zero { color: var(--ink-3); }
.u-kim .zero .l { color: var(--ink-3); }
.u-r10 td, .u-r10 th { text-align: center; }
.u-r10 td:first-child, .u-r10 th:first-child { text-align: left; font-family: var(--f-data); font-size: 12.5px; color: var(--ink-2); }
.u-r10 tr.w .pl { color: var(--accent); font-weight: 700; }
.u-ses { display: flex; gap: 4px; flex-wrap: wrap; }
.u-ses span {
  min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px;
  font-family: var(--f-num); font-weight: 700; font-size: 15px; background: var(--panel); border: 1px solid var(--line);
}
.u-ses span.w { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.u-factors { display: grid; gap: 5px; }
.u-factor { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.u-factor .track { height: 6px; position: relative; background: var(--line); border-radius: 3px; }
.u-factor .track i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.u-factor .track .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.u-factor .v { text-align: right; font-family: var(--f-data); }

/* pick */
.u-pick { padding: 18px; display: grid; gap: 16px; }
.u-pick-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.u-pick-top > * { min-width: 0; }
.u-pick-top .lbl { font-weight: 700; font-size: 17px; }
.u-pick-top .strat { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.u-pick-top .amt { text-align: right; }
.u-pick-top .amt .n { font-family: var(--f-num); font-size: 26px; font-weight: 600; line-height: 1; }
.u-pick-top .amt .l { font-size: 10.5px; color: var(--ink-3); }
.u-ds { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); display: grid; gap: 8px; }
.u-ds-head { display: flex; align-items: center; gap: 10px; }
.u-ds-head .ttl { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); }
.u-ds-head .num { font-family: var(--f-num); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.u-ds-head .num small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.u-ds-head .meter { display: flex; gap: 3px; margin-left: auto; }
.u-ds-head .meter i { width: 14px; height: 6px; border-radius: 2px; background: var(--line); }
.u-ds-head .meter i.full { background: var(--accent); }
.u-ds-head .meter i.part { background: linear-gradient(90deg, var(--accent) 50%, var(--line) 50%); }
.u-ds-head .meter i.na { background: transparent; border: 1px dashed var(--line); height: 4px; }
.u-ds-stage { font-size: 12px; color: var(--ink-2); }
.u-ds-stage .miss { color: var(--ink-3); }
.u-ds-wait { font-size: 12px; color: var(--accent); }
.u-ds-list .fetching .dot { border-color: var(--accent); background: transparent; animation: u-pulse 0.9s var(--ease) infinite; }
.u-ds-list .fetching .v { color: var(--ink-2); }
.u-ds-src { font-size: 11.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 8px; }
.u-ds-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; }
.u-ds-list .it { display: grid; grid-template-columns: 10px auto 1fr; align-items: center; gap: 6px; font-size: 12px; min-height: 22px; }
.u-ds-list .dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.u-ds-list .full .dot { background: var(--accent); border-color: var(--accent); }
.u-ds-list .part .dot { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); border-color: var(--accent); }
.u-ds-list .na .dot { border-style: dashed; }
.u-ds-list .l { color: var(--ink-2); }
.u-ds-list .v { font-family: var(--f-data); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); white-space: nowrap; }
.u-ds-list .none .v, .u-ds-list .na .v { color: var(--ink-3); }
.u-calnote { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
/* 研究中の買い目（オッズを見ない3連単・別枠）— docs/history-db-adopt-20261110/mock-p3.html */
.u-labtag { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; color: var(--caution); border: 1px solid var(--line-2); border-color: color-mix(in srgb, var(--caution) 42%, transparent); border-radius: 999px; padding: 0 7px; line-height: 1.6; white-space: nowrap; }
.u-labtag.hit { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 700; }
.u-sec-h.lab { align-items: center; gap: 8px; margin-bottom: 10px; }
.u-sec-h.lab .aside { white-space: nowrap; }
.u-lab-pill { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; color: var(--caution); border: 1px solid var(--line-2); border-color: color-mix(in srgb, var(--caution) 42%, transparent); border-radius: 999px; padding: 1px 9px; white-space: nowrap; line-height: 1.6; }
.u-lab { border: 1px dashed var(--line-2); border-color: color-mix(in srgb, var(--caution) 42%, transparent); padding: 16px 18px 14px; display: grid; gap: 12px; }
.u-lab-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.u-lab-top .ttl { font-weight: 700; font-size: 15px; line-height: 1.4; }
.u-lab-top .n { font-family: var(--f-num); font-size: 30px; font-weight: 600; line-height: 0.9; }
.u-lab-top .n small { font-family: var(--f-jp); font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.u-lab-rows { display: grid; border-top: 1px solid var(--line); }
.u-lab-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 88px; align-items: center; gap: 8px; padding: 8px 0; font-family: var(--f-data); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.u-lab-row + .u-lab-row { border-top: 1px solid var(--line); }
.u-lab-row > span:not(:first-child) { text-align: right; }
.u-lab-row.head { font-family: var(--f-jp); font-size: 10.5px; color: var(--ink-3); padding: 8px 0 4px; }
.u-lab-row .dim, .u-lab-row .miss { color: var(--ink-3); }
.u-lab-row.won { background: linear-gradient(90deg, var(--accent-soft), transparent 85%); }
.u-lab-row .hit { color: var(--accent); font-weight: 700; white-space: nowrap; }
.u-lab-row .hit small, .u-lab-row .dim small { font-family: var(--f-jp); font-size: 10.5px; font-weight: 400; margin-left: 1px; }
.u-lab-settle { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 10px; }
.u-lab-settle b { font-family: var(--f-num); font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.u-lab-settle b small { font-family: var(--f-jp); font-size: 10.5px; font-weight: 400; color: var(--ink-3); margin: 0 6px 0 1px; }
.u-lab-rec { background: var(--panel-2); border-radius: 10px; padding: 9px 12px 8px; display: grid; gap: 1px; }
.u-lab-rec .l { font-size: 11px; color: var(--ink-3); }
.u-lab-rec .v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; font-size: 11px; color: var(--ink-3); }
.u-lab-rec .v b { font-family: var(--f-num); font-size: 18px; font-weight: 600; color: var(--ink); margin: 0 2px 0 5px; font-variant-numeric: tabular-nums; }
.u-lab-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.u-lab-note b { color: var(--ink-2); }
.u-lab-link { appearance: none; background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; color: var(--accent); cursor: pointer; white-space: nowrap; }
.u-lab-link:hover { text-decoration: underline; }
.u-lab-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.u-lab-about { border-top: 1px solid var(--line); padding-top: 12px; }
.u-lab-about dl { margin: 0; }
.u-lab-about dt { font-weight: 700; font-size: 13px; margin-top: 10px; }
.u-lab-about dt:first-child { margin-top: 0; }
.u-lab-about dd { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.u-lab.min { padding: 12px 18px; gap: 2px; }
.u-lab.min .msg { font-size: 13.5px; font-weight: 500; }
.u-lab.min .sub { font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 400px) { .u-lab { padding: 14px 14px 12px; } .u-lab.min { padding: 11px 14px; } .u-lab-row { grid-template-columns: minmax(0, 1fr) 44px 80px; font-size: 12.5px; } .u-lab-top .n { font-size: 26px; } }
.u-lock { font-size: 11px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.u-bets { display: grid; border-top: 1px solid var(--line); }
.u-bet { display: grid; grid-template-columns: minmax(0, 1fr) 58px 58px 48px 60px; align-items: center; gap: 8px; padding: 9px 0; font-family: var(--f-data); font-size: 13.5px; }
/* 狭い画面（〜400px）: 金額列がカードからはみ出さないよう列幅と文字を詰める（2026-11-07） */
@media (max-width: 400px) {
  .u-pick { padding: 14px; }
  .u-pick-top { gap: 10px; }
  .u-pick-top .amt .n { font-size: 22px; }
  .u-bet { grid-template-columns: minmax(0, 1fr) 44px 46px 36px 54px; gap: 5px; font-size: 12.5px; }
}
.u-bet + .u-bet { border-top: 1px solid var(--line); }
.u-bet span:not(:first-child) { text-align: right; }
.u-bet.head { font-family: var(--f-jp); font-size: 10.5px; color: var(--ink-3); padding: 8px 0 4px; }
.u-bet .ev.pos { color: var(--accent); font-weight: 700; }
.u-bet.won { background: linear-gradient(90deg, var(--accent-soft), transparent); }

/* slit */
.u-slit { padding: 18px 18px 14px; }
.u-slit-grid { position: relative; display: grid; gap: 9px; }
.u-sl { display: grid; grid-template-columns: 26px 1fr 84px; align-items: center; gap: 10px; }
.u-sl .c { font-family: var(--f-num); font-size: 12px; color: var(--ink-3); text-align: right; }
.u-sl .track { position: relative; height: 22px; }
.u-sl .track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line-2); }
.u-sl .boat {
  position: absolute; top: 50%; transform: translate(-100%, -50%);
  display: flex; align-items: center; gap: 0;
  transition: left 0.9s var(--ease);
}
.u-sl .boat .wake { height: 3px; width: 56px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--wk)); opacity: 0.9; margin-right: 2px; }
.u-sl .tac { font-size: 11.5px; font-weight: 700; color: var(--ink-2); display: flex; flex-direction: column; line-height: 1.2; }
.u-sl .tac small { font-family: var(--f-data); font-weight: 400; color: var(--ink-3); font-size: 11px; }
.u-sl .tac.attack { color: var(--accent); }
.u-slit-line {
  position: absolute; top: -8px; bottom: -8px; width: 0; border-left: 2px solid var(--ink); opacity: 0.85;
}
.u-slit-line span {
  position: absolute; top: -18px; left: 0; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--ink-3); white-space: nowrap;
}
.u-slit-axis { display: grid; grid-template-columns: 26px 1fr 84px; gap: 10px; margin-top: 10px; }
.u-slit-axis div { display: flex; justify-content: space-between; font-family: var(--f-data); font-size: 11px; color: var(--ink-3); }
.u-patterns { display: grid; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.u-pat { display: grid; grid-template-columns: 1fr 120px 44px; align-items: center; gap: 10px; font-size: 13px; }
.u-pat .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.u-pat .bar i { display: block; height: 100%; background: var(--ink-2); border-radius: 3px; }
.u-pat:first-child:not(.other) .bar i { background: var(--accent); }
.u-pat.other { color: var(--ink-3); }
.u-pat.other .bar i { background: var(--line-2); }
.u-pat .n { text-align: right; font-family: var(--f-data); font-weight: 600; }

/* trifecta table */
.u-tri-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.u-tri-tools .u-seg { flex: 1; min-width: 220px; }
.u-tri { overflow: hidden; }
.u-tr { display: grid; grid-template-columns: 34px 1fr 64px 64px 56px 22px; align-items: center; gap: 8px; padding: 0 14px; height: 42px; font-family: var(--f-data); font-size: 13.5px; }
.u-tr + .u-tr { border-top: 1px solid var(--line); }
.u-tr span:nth-child(n+3):not(:last-child) { text-align: right; }
.u-tr .i { font-size: 11px; color: var(--ink-3); }
.u-tr.head { height: 34px; font-family: var(--f-jp); font-size: 10.5px; color: var(--ink-3); background: var(--panel-2); }
.u-tr .pbar { position: relative; }
.u-tr .pbar { display: grid; justify-items: end; gap: 3px; }
.u-tr .pbar i { order: 2; display: block; height: 2px; background: var(--accent); opacity: 0.55; border-radius: 2px; }
.u-tr .pbar b { font-weight: 500; }
.u-tr .ev.pos { color: var(--accent); font-weight: 700; }
.u-tr.pick { box-shadow: inset 3px 0 0 var(--accent); }
.u-tr.won { background: var(--accent-soft); }
.u-tr .mk { text-align: center; color: var(--accent); font-size: 12px; }
.u-note { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; line-height: 1.6; }

.u-placeholder {
  display: grid; place-items: center; min-height: calc(100dvh - 56px); padding: 40px; text-align: center; color: var(--ink-3);
}
.u-placeholder .big { font-family: var(--f-num); font-size: 120px; font-weight: 700; line-height: 1; color: var(--line-2); letter-spacing: -0.02em; }
.u-placeholder p { margin: 12px 0 0; font-size: 14px; }

.u-skel { border-radius: 8px; background: linear-gradient(90deg, var(--line) 0%, var(--line-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: u-shim 1.4s linear infinite; }
@keyframes u-shim { to { background-position: -200% 0; } }

.u-disclaimer { margin-top: 36px; font-size: 11px; color: var(--ink-3); line-height: 1.7; }

/* enter motion (初回描画のみ) */
.u-enter .u-row, .u-enter .u-mx-row { animation: u-rise 0.5s var(--ease) both; }
.u-enter .u-row:nth-child(2), .u-enter .u-mx-row:nth-child(3) { animation-delay: 30ms; }
.u-enter .u-row:nth-child(3), .u-enter .u-mx-row:nth-child(4) { animation-delay: 60ms; }
.u-enter .u-row:nth-child(4), .u-enter .u-mx-row:nth-child(5) { animation-delay: 90ms; }
.u-enter .u-row:nth-child(n+5), .u-enter .u-mx-row:nth-child(n+6) { animation-delay: 120ms; }
.u-denter .u-dhead, .u-denter .u-sec { animation: u-rise 0.55s var(--ease) both; }
.u-denter .u-sec:nth-of-type(2) { animation-delay: 40ms; }
.u-denter .u-sec:nth-of-type(n+3) { animation-delay: 80ms; }
@keyframes u-rise { from { opacity: 0; transform: translateY(8px); } }
/* スリット: 詳細を開いた瞬間に6艇がスリットへ滑り込む（シグネチャー・モーション） */
.u-denter .u-sl .boat { animation: u-launch 1.1s var(--ease) both; animation-delay: calc(180ms + var(--i, 0) * 55ms); }
@keyframes u-launch { from { transform: translate(calc(-100% - 120px), -50%); opacity: 0; } 60% { opacity: 1; } }
.u-denter .u-slit-line { animation: u-line 0.7s var(--ease) both; }
@keyframes u-line { from { transform: scaleY(0); } }
.u-denter .u-prob .bar i, .u-denter .u-pat .bar i { animation: u-grow 0.9s var(--ease) both; animation-delay: 120ms; transform-origin: left; }
@keyframes u-grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .u-app *, .u-app *::before, .u-app *::after { animation: none !important; transition: none !important; }
}

/* データ更新パネル・読み込みの進み具合 */
.u-upd { position: sticky; top: 0; z-index: 30; margin: 0 auto; max-width: 720px; width: calc(100% - 32px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14); padding: 14px 16px; display: grid; gap: 10px; margin-top: 8px; }
.u-upd .ttl { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-3); }
.u-upd .grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: baseline; }
.u-upd .k { font-size: 13px; color: var(--ink); display: grid; gap: 2px; }
.u-upd .k small { font-size: 11.5px; color: var(--ink-3); }
.u-upd .v { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; white-space: nowrap; }
.u-upd .note { font-size: 12px; color: var(--ink-2); }
.u-upd .note b { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.u-upd-btn { justify-self: start; min-height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--panel-2); }
.u-upd-btn:disabled { opacity: 0.6; }
.u-load { margin: 16px 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: grid; gap: 8px; }
.u-upd .u-load { margin: 0; background: var(--panel-2); }
.u-load .ttl { font-size: 14px; font-weight: 700; }
.u-load .sub { font-size: 12px; color: var(--ink-3); }
.u-load .steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.u-load .steps li { display: grid; grid-template-columns: 10px auto 1fr; gap: 8px; align-items: center; font-size: 13px; }
.u-load .dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.u-load li.done .dot { background: var(--accent); border-color: var(--accent); }
.u-load li.loading .dot { border-color: var(--accent); animation: u-pulse 0.9s var(--ease) infinite; }
.u-load li.error .dot { border-color: var(--alert); background: var(--alert); }
.u-load .v { text-align: right; font-family: var(--f-data); font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12.5px; }
.u-load li.error .v { color: var(--alert); }

/* オッズ妙味（参考） */
.u-val { display: grid; gap: 16px; }
.u-val .sw { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.u-val .sugg .sw { background: var(--accent); }
.u-val .over .sw { background: var(--alert); }
.u-val .ai .sw { background: var(--ink-2); }
.u-val .mk .sw { background: transparent; border: 1.5px solid var(--ink-2); }
/* 比較の帯 */
.u-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.u-vs-t { background: var(--panel-2); padding: 12px 14px; display: grid; gap: 6px; }
.u-vs-t .l { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.u-vs-t .v { font-family: var(--f-num); font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.u-vs-t .v small { font-size: 14px; font-weight: 600; margin-left: 1px; color: var(--ink-3); }
.u-vs-t.sugg .v { color: var(--accent); }
.u-vs-t.over .v { color: var(--alert); }
.u-vs-t .bar { position: relative; height: 4px; border-radius: 2px; background: var(--line); }
.u-vs-t .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.u-vs-t.sugg .bar i { background: var(--accent); }
.u-vs-t.over .bar i { background: var(--alert); }
.u-vs-t .bar .par { position: absolute; right: 0; top: -3px; bottom: -3px; width: 1.5px; background: var(--ink-3); }
.u-vs-t .s { font-size: 11px; color: var(--ink-3); line-height: 1.5; display: flex; flex-wrap: wrap; column-gap: 8px; }
.u-vs-t .s span { white-space: nowrap; }
/* リスト */
.u-vls { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .u-vls { grid-template-columns: 1fr 1fr; gap: 24px; } }
.u-vl { display: grid; align-content: start; }
.u-vl-h { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.u-vl-h b { font-size: 14px; }
.u-vl-h .rule { font-size: 11.5px; color: var(--ink-3); flex: 1 1 160px; }
.u-vl-h .n { font-family: var(--f-num); font-size: 18px; font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.u-vl-h .n small { font-family: var(--f-jp); font-size: 11px; color: var(--ink-3); margin-left: 2px; font-weight: 500; }
.u-vl-empty { font-size: 12.5px; color: var(--ink-3); padding: 12px 0; }
.u-vr { display: grid; grid-template-columns: 82px minmax(0, 1fr) 54px 44px; gap: 10px; align-items: center; min-height: 40px; border-bottom: 1px solid var(--line);
  font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 13px; }
.u-vr.head { min-height: 28px; font-family: var(--f-jp); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; }
.u-vr .o, .u-vr .e { text-align: right; }
.u-vr .d { display: grid; gap: 3px; min-width: 0; }
.u-vr .nums { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.u-vr .nums b { color: var(--ink); font-weight: 600; }
.u-vr .e { font-weight: 700; color: var(--ink-2); }
.u-vl.sugg .u-vr .e.hi { color: var(--accent); }
.u-vl.over .u-vr .e { color: var(--alert); }
.u-vr .e.past { color: var(--ink-2); }
.u-vr.won { background: var(--accent-soft); }
/* AI と市場の確率の図（対数の目盛り） */
.u-db { position: relative; display: block; height: 10px; }
.u-db .track { position: absolute; left: 0; right: 0; top: 4.5px; height: 1px; background: var(--line-2); }
.u-db .gap { position: absolute; top: 3.5px; height: 3px; border-radius: 2px; background: var(--ink-3); opacity: 0.45; }
.u-vl.sugg .u-db .gap { background: var(--accent); }
.u-vl.over .u-db .gap { background: var(--alert); }
.u-db .ai, .u-db .mk { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; }
.u-db .ai { background: var(--ink); }
.u-vl.sugg .u-db .ai { background: var(--accent); }
.u-vl.over .u-db .ai { background: var(--alert); }
.u-db .mk { background: var(--panel); border: 1.5px solid var(--ink-2); }
/* 折りたたみ */
.u-vx { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.u-vx:hover { color: var(--ink); }
.u-vx.sm { font-size: 12px; min-height: 32px; margin-top: 4px; }
.u-vsplit { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--panel-2); }
.u-val-tg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); min-height: 32px; cursor: pointer; }
.u-val-tg input { width: 16px; height: 16px; accent-color: var(--accent); }
.u-val-note { margin: 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
@media (max-width: 380px) { .u-vr { grid-template-columns: 74px minmax(0, 1fr) 48px 38px; gap: 8px; } .u-vs-t .v { font-size: 26px; } }

/* ── モーター節（db/motor-view.json・参考表示・買い目/確率には非接続）── */
@media (min-width: 641px) { .u-eh, .u-e { grid-template-columns: 30px minmax(0, 1fr) 54px 46px 62px 50px 92px; } }
.u-mvk { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; font-family: var(--f-jp); }
.u-mvk b { font-weight: 700; font-size: 10.5px; }
.u-mvk .up, .u-mt .up, .u-band.up { color: var(--accent); }
.u-mvk .dn, .u-mt .dn, .u-band.dn { color: var(--alert); }
@media (max-width: 640px) { .u-mvk { justify-content: flex-start; } }
.u-mt { padding: 10px 14px 12px; }
.u-mt-lg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--ink-3); padding-bottom: 8px; }
.u-mt-lg span { display: inline-flex; align-items: center; gap: 5px; }
.u-mtd { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 4px; vertical-align: 1px; }
.u-mt-lg .u-mtd { margin-left: 0; }
.u-mtd.new { background: var(--accent); }
.u-mtd.in { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.u-mt-info { font-size: 12px; color: var(--ink-2); background: var(--panel-2); border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; line-height: 1.55; }
.u-mt-r { display: grid; grid-template-columns: 28px repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
@media (min-width: 641px) { .u-mt-r { grid-template-columns: 28px 92px 104px 92px minmax(0, 1fr); gap: 14px; } }
.u-mt-r.hd { border-top: 0; padding: 0 0 6px; font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; }
.u-mt-r .v { display: flex; flex-direction: column; font-family: var(--f-data); font-size: 14px; font-weight: 500; line-height: 1.25; }
.u-mt-r .v small { font-size: 10.5px; color: var(--ink-3); font-weight: 400; }
.u-mt-r .v.wait, .u-mt-r .v.na { color: var(--ink-3); font-size: 12.5px; font-family: var(--f-jp); }
.u-mt-r .v.up, .u-mt-r .v.dn { font-weight: 700; }
.u-mt-r .w { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.u-mt-r .v.mid { color: var(--ink-2); }
.u-mt-empty { margin: 2px 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.u-mt-note { margin: 8px 0 0; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
@media (max-width: 640px) {
  .u-mt-r { grid-template-columns: 26px repeat(3, minmax(0, 1fr)); row-gap: 4px; }
  .u-mt-r .w { grid-column: 2 / -1; }
  .u-mt-r .w.empty, .u-mt-r.hd .w { display: none; }
}
.u-kv-s { display: block; font-size: 10.5px; color: var(--ink-3); font-family: var(--f-jp); }
.u-band { font-weight: 700; font-family: var(--f-jp); font-size: 12.5px; }
.u-mvb { display: grid; gap: 10px; }
.u-mvp { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.u-mvp em { flex-basis: 100%; font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.u-mvp b { font-family: var(--f-data); font-weight: 500; color: var(--ink-2); margin-right: 6px; }

/* ═══ 的中結果（暫定設置） ═══ */
.u-res-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px var(--gut) 0; }
.u-res-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px 14px; min-width: 0; }
.u-res-col .ttl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.u-res-col .kv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; padding: 2px 0; }
.u-res-col .kv em { font-style: normal; color: var(--ink-3); flex-shrink: 0; }
.u-res-col .kv b { font-family: var(--f-data); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.u-res-col .kv.big b { font-family: var(--f-num); font-size: 26px; line-height: 1.1; }
.u-res-col .nt { margin-top: 6px; font-size: 10.5px; color: var(--ink-3); line-height: 1.5; }
.u-res .u-group-h { align-items: center; }
.u-rrow { display: grid; gap: 8px; width: 100%; padding: 11px 14px; text-align: left; }
.u-rrow + .u-rrow { border-top: 1px solid var(--line); }
.u-rrow:hover { background: var(--panel-2); }
.u-rrow .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.u-rrow .vr { font-weight: 700; font-size: 14px; display: inline-flex; align-items: baseline; gap: 3px; min-width: 0; }
.u-rrow .vr b { font-family: var(--f-num); font-size: 17px; margin-left: 4px; }
.u-rrow .vr small { font-size: 11px; color: var(--ink-3); }
.u-rrow .vr .t { font-family: var(--f-data); font-weight: 400; font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.u-rrow .rs { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.u-rrow .bd { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.u-rrow .c { display: grid; gap: 2px; padding: 6px 9px; border-radius: 8px; background: var(--panel-2); font-size: 12px; color: var(--ink-2); min-width: 0; }
.u-rrow .c em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.u-rrow .c > span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-family: var(--f-data); }
.u-rrow .c.hit { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--ink); }
.u-rrow .c.hit b { color: var(--accent); font-weight: 700; }
.u-res-log td, .u-res-log th { text-align: right; font-variant-numeric: tabular-nums; }
.u-res-log td:first-child, .u-res-log th:first-child { text-align: left; }
.u-res-note { margin: 14px var(--gut) 28px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.u-res .u-group-h .u-chips { padding: 0; margin: 0; gap: 6px; flex-wrap: nowrap; }
.u-res .u-group-h .u-chip { height: 28px; padding: 0 10px; font-size: 11.5px; letter-spacing: 0; }
.u-stat-btn { text-align: left; }
.u-stat-btn .l { color: var(--accent); }

/* ═══ 区画へ飛ぶ帯（レース詳細・2026-11-13） ═══ */
.u-jump {
  position: sticky; top: 56px; z-index: 15; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gut) * -1); padding: 6px var(--gut);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.u-jump::-webkit-scrollbar { display: none; }
.u-jump button { flex-shrink: 0; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.u-jump button:hover, .u-jump button:active { background: var(--line); color: var(--ink); }
.u-jump-id { display: none; flex-shrink: 0; align-items: baseline; gap: 3px; height: 36px; line-height: 36px; padding: 0 10px 0 0; margin-right: 4px;
  position: sticky; left: 0; z-index: 1; font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap;
  background: var(--bg); border-right: 1px solid var(--line); }
.u-jump-id b { font-size: 17px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.u-jump-id small { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.u-jump.stuck .u-jump-id { display: inline-flex; }
.u-detail > .u-sec { scroll-margin-top: 112px; }
@media (min-width: 1024px) { .u-jump { top: 0; } .u-detail > .u-sec { scroll-margin-top: 56px; } }
/* ═══ スマホ幅: 押す場所を大きく（2026-11-13） ═══ */
@media (max-width: 1023.98px) {
  .u-chip { height: 36px; padding: 0 14px; }
  .u-seg button { height: 36px; }
  .u-date-btn { width: 40px; height: 40px; }
  .u-res .u-group-h .u-chip { height: 34px; }
}
@media (max-width: 340px) { .u-date-btn { width: 30px; } .u-chip { padding: 0 12px; } }   /* 320px 幅で上部バーがはみ出さないように（従来の指定を保つ） */
