:root {
  --turf: #12382a;
  --turf-2: #1b4a38;
  --paper: #f5efe0;
  --ink: #1c2a24;
  --muted: #5e6b63;
  --line: #d8cfb9;
  --gold: #d9a93a;
  --red: #c8362c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--turf);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; cursor: pointer; }

/* ---- 部屋の帯 ---- */
#room-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 8px 14px;
  background: var(--turf);
  color: #fff;
  font-size: 13px;
}
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bar-head strong { font-size: 15px; }
#bar-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold); }
#bar-people { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.person { padding: 1px 7px; border-radius: 10px; background: rgba(255,255,255,.14); font-size: 12px; }
.person.off { opacity: .45; }
.person.done { background: var(--gold); color: #1c1200; font-weight: 700; }
#conn-status {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9;
  padding: 6px 12px;
  background: #6b1d17;
  color: #fff;
  text-align: center;
  font-size: 13px;
}

/* ---- 入力欄 ---- */
#login-form input, .text-input {
  width: 100%;
  padding: 10px;
  font: inherit;
  font-size: 17px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---- 準備画面 ---- */
#setup {
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  background: var(--paper);
  min-height: 100dvh;
}
.picks.two { grid-template-columns: repeat(2, 1fr); }
.pick:disabled { cursor: default; opacity: .7; }
.horse-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.tab-list { display: flex; gap: 4px; margin-right: auto; }
.tab-list button { padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.tab-list button.on { background: var(--turf-2); border-color: var(--turf-2); color: #fff; font-weight: 700; }
.sub.wide { display: block; width: 100%; margin-top: 10px; }
.done-text { margin: 22px 0 10px; font-size: 17px; font-weight: 700; }
.top-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.title { margin: 18px 0 8px; border-bottom: 3px double var(--ink); padding-bottom: 12px; }
.kicker { margin: 0; font-size: 13px; letter-spacing: .2em; color: var(--red); font-weight: 700; }
h1 { margin: 2px 0 0; font-size: 34px; letter-spacing: .08em; font-weight: 800; }
section { margin-top: 22px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h2 small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head p { margin: 0; font-size: 14px; }
.section-head strong { font-size: 22px; color: var(--red); }

.picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.picks.five { grid-template-columns: repeat(5, 1fr); }
.note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.chosen { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.chosen strong { font-size: 17px; }
.pick {
  padding: 10px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.pick.on { background: var(--turf-2); border-color: var(--turf-2); color: #fff; font-weight: 700; }

.ability {
  display: grid;
  grid-template-columns: minmax(96px, 150px) 40px 1fr 52px 40px;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.ability-name b { display: block; font-size: 15px; }
.ability-name small { color: var(--muted); font-size: 11px; }
.ability button {
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ability button:disabled { opacity: .35; cursor: default; }
.ability input {
  width: 100%;
  height: 40px;
  padding: 0;
  text-align: center;
  font: inherit;
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.ability input::-webkit-outer-spin-button,
.ability input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.meter { height: 8px; background: #e6dfcd; border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--turf-2); }
.row-buttons { display: flex; gap: 8px; margin-top: 10px; }
.sub { padding: 8px 14px; background: transparent; border: 1px solid var(--ink); border-radius: 6px; font-size: 13px; }

.howto dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.howto dt { font-weight: 700; white-space: nowrap; }
.howto dd { margin: 0; color: #3b4942; }
body.touch .howto dl { display: none; }

.go {
  display: block;
  width: 100%;
  margin-top: 26px;
  padding: 16px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .1em;
}
.go:disabled { background: #a8a294; letter-spacing: 0; font-size: 15px; cursor: default; }

/* ---- 出馬表 ---- */
#card { min-height: 100dvh; padding: 16px; display: flex; justify-content: center; align-items: flex-start; }
.card-sheet { width: 100%; max-width: 680px; background: var(--paper); border-radius: 10px; padding: 18px 16px; }
.card-sheet h2 { font-size: 24px; margin: 2px 0 10px; }
.card-sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.card-sheet th { font-size: 11px; color: var(--muted); text-align: left; padding: 2px 6px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.card-sheet td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.card-sheet tr.me td { background: #f3dfa8; font-weight: 700; }
.card-sheet td small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.card-sheet td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-sheet td.win { font-size: 17px; font-weight: 800; color: var(--red); }
.card-sheet td.stats { font-size: 11px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.card-sheet td.mark { font-size: 17px; font-weight: 800; text-align: center; }
.card-sheet td.short { white-space: nowrap; font-size: 13px; }
.card-sheet td small.mobile-stats, .card-sheet td small.narrow-only { display: none; }
.card-sheet .go { margin-top: 14px; }
.card-sheet > .sub { margin-top: 12px; }
.payout-title { margin: 16px 0 6px; font-size: 14px; }
.payouts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.payouts dt { font-weight: 700; }
.payouts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.payout { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.payout b.odds { margin-left: 3px; color: var(--red); }
.payout .chip.inline { width: 22px; height: 22px; font-size: 12px; }
@media (max-width: 760px) {
  .card-sheet th.stats, .card-sheet td.stats { display: none; }
  .card-sheet td small.mobile-stats { display: block; }
}
@media (max-width: 520px) {
  #card { padding: 8px; }
  .card-sheet { padding: 12px 8px; }
  .card-sheet table { font-size: 13px; }
  .card-sheet th { padding: 2px; }
  .card-sheet td { padding: 6px 2px; }
  .card-sheet td.win { font-size: 15px; }
  .card-sheet td.short { font-size: 11px; }
  .card-sheet .wide-only { display: none; }
  .card-sheet td small.narrow-only { display: block; }
  .card-sheet td small.mobile-stats { font-size: 10px; white-space: nowrap; }
  .card-sheet td .chip.inline { width: 22px; height: 22px; font-size: 12px; }
}

/* ---- レース画面 ---- */
#race {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
#stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; box-shadow: inset 0 0 120px 30px rgba(255, 190, 60, .55); }
#stage.spurting .vignette { opacity: 1; }

.hud-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) 14px 22px;
  color: #fff;
  background: linear-gradient(rgba(0,0,0,.5), transparent);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  pointer-events: none;
}
.hud-rank { display: flex; align-items: baseline; gap: 4px; }
.hud-rank strong { font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.hud-rank span { font-size: 13px; }
.hud-info { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.hud-info span { font-size: 26px; font-weight: 700; line-height: 1.1; }
.hud-info small { font-size: 13px; }
.hud-tools { margin-left: auto; display: flex; gap: 6px; pointer-events: auto; }
.hud-tools button {
  padding: 5px 9px;
  font-size: 12px;
  color: #fff;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 5px;
}
#race-title { position: absolute; top: 74px; left: 14px; margin: 0; color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000; pointer-events: none; }
#my-horses { position: absolute; top: 94px; left: 14px; display: flex; gap: 6px; }
#my-horses button { padding: 3px 8px; font-size: 12px; color: #fff; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.4); border-radius: 5px; }
#my-horses button.on { background: var(--gold); border-color: var(--gold); color: #1c1200; font-weight: 700; }
.chip { cursor: pointer; pointer-events: auto; }

.hud-flags {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 94%;
  pointer-events: none;
}
.hud-flags span {
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#my-style.in-band { background: var(--gold); color: #1c1200; }
#fence.zone { background: #f2cf2e; color: #1c1200; font-size: 17px; }
#spurt { background: var(--gold); color: #1c1200; font-size: 17px; }
#exhausted { background: #6b1d17; }
#blocked { background: #8a5a12; }

.near {
  position: absolute;
  top: 46%;
  padding: 6px 8px;
  background: rgba(200, 54, 44, .85);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border-radius: 4px;
  pointer-events: none;
}
#near-left { left: 8px; }
#near-right { right: 8px; }

#count-text {
  position: absolute;
  top: 34%;
  left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-size: 96px;
  font-weight: 900;
  text-shadow: 0 3px 16px rgba(0,0,0,.7);
  pointer-events: none;
}
#status {
  position: absolute;
  top: 45%;
  left: 16px; right: 16px;
  text-align: center;
  color: #fff;
  font-size: 16px;
}

#panel {
  flex: none;
  background: var(--turf);
  color: #fff;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 8px 20px;
  align-items: center;
}
.gauges { display: grid; gap: 6px; }
.gauge { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.track { position: relative; height: 13px; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden; }
.track i { display: block; height: 100%; width: 100%; background: #5fce77; transition: width .1s linear; }
.track i.low { background: #e5573f; }
.track.speed i { background: var(--gold); width: 0; }
.track.speed u { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.8); }
.track.form i { background: #e86fa0; width: 0; }

.lines { min-width: 0; padding: 0 12px; }
#progress-line { position: relative; height: 12px; margin: 0 4px; }
#progress-line::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: rgba(255,255,255,.4); }
#progress-line .end { position: absolute; top: -2px; font-size: 10px; }
#progress-line .start { left: -11px; }
#progress-line .goal { right: -12px; }
#mark-400 { position: absolute; top: 1px; width: 2px; height: 10px; background: var(--gold); }
.dot { position: absolute; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.5); transition: left .1s linear; }
.dot.me { width: 12px; height: 12px; top: 0; margin-left: -6px; box-shadow: 0 0 0 2px var(--gold); z-index: 2; }

#order-line {
  position: relative;
  height: 58px;
  margin: 4px 14px 0;
  border-radius: 4px;
  background-color: rgba(255,255,255,.07);
  background-image: linear-gradient(to left, rgba(255,255,255,.28) 1px, transparent 1px);
  background-position: right top;
}
#order-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(255,255,255,.35); }
.chip {
  position: absolute;
  top: 50%;
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
  transition: left .12s linear, top .15s ease-out;
}
.chip.me { width: 28px; height: 28px; margin: -14px 0 0 -14px; box-shadow: 0 0 0 3px var(--gold); z-index: 2; }
.chip.inline { position: static; margin: 0; width: 24px; height: 24px; }
.line-legend { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 10px; margin-top: 2px; color: rgba(255,255,255,.75); }
.line-legend strong { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }

#pad { display: none; }
body.touch #panel { grid-template-columns: 1fr; }
body.touch #pad {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr 1.3fr;
  gap: 8px;
  height: 128px;
}
#pad button {
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  touch-action: none;
}
#pad button.down { background: rgba(255,255,255,.4); }
#pad small { display: block; font-size: 11px; font-weight: 400; }
.pad-col { display: grid; gap: 8px; }
#pad .pad-col [data-act="push"] { background: var(--red); }
#pad .pad-col [data-act="hold"] { background: #2a6fdb; }
#pad .whip-btn { background: var(--gold); color: #1c1200; font-size: 24px; }
#pad .jump-btn { background: #f2cf2e; color: #1c1200; }
#pad .down { filter: brightness(1.35); }

/* スマホ横向き: 映像を広く取り、ボタンは左右に重ねる */
@media (orientation: landscape) and (max-height: 500px) {
  body.touch #panel {
    position: absolute;
    inset: 0;
    background: none;
    padding: 0;
    display: block;
    pointer-events: none;
  }
  body.touch .gauges {
    position: absolute;
    top: 56px;
    left: 14px;
    width: 190px;
  }
  #my-horses { top: 120px; }
  body.touch .lines {
    position: absolute;
    left: 21%; right: 30%;
    bottom: 4px;
    background: rgba(0,0,0,.4);
    border-radius: 6px;
    padding: 2px 16px;
  }
  body.touch #order-line { height: 46px; }
  body.touch .line-legend span { display: none; }
  body.touch .line-legend { justify-content: center; }
  body.touch #pad {
    position: absolute;
    inset: auto 10px 10px 10px;
    height: 130px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
  }
  body.touch #pad button { pointer-events: auto; background: rgba(0,0,0,.35); }
  body.touch #pad .dir { width: 64px; height: 84px; }
  body.touch #pad [data-act="right"] { margin-right: auto; }
  body.touch #pad .pad-col { width: 84px; height: 130px; pointer-events: none; }
  body.touch #pad .pad-col [data-act="push"] { background: rgba(200,54,44,.7); }
  body.touch #pad .pad-col [data-act="hold"] { background: rgba(42,111,219,.7); }
  body.touch #pad .whip-col { width: 112px; height: auto; }
  body.touch #pad .whip-btn { width: 112px; height: 130px; background: rgba(217,169,58,.85); }
  body.touch #pad .jump-btn { width: 112px; height: 64px; background: rgba(242,207,46,.85); }
  .hud-flags { bottom: auto; top: 14px; left: 50%; }
  #race-title { display: none; }
  body.touch .gauge { text-shadow: 0 1px 3px #000; }
}

/* 狭い画面 */
@media (max-width: 640px) {
  #panel { grid-template-columns: 1fr; gap: 6px; }
  .lines { padding: 0 8px; }
  .hud-rank strong { font-size: 38px; }
  .hud-info span { font-size: 22px; }
  #count-text { font-size: 72px; }
  .ability { grid-template-columns: 1fr 40px 52px 40px; }
  .ability .meter { display: none; }
}

/* ---- 結果 ---- */
#result {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  padding: 16px;
  padding-top: calc(var(--bar-height, 0px) + 12px); /* 部屋の帯の下から始める */
  background: rgba(0,0,0,.55);
  overflow: hidden;
  touch-action: pan-y;
  z-index: 5;
}
.result-card { width: 100%; max-width: 760px; max-height: 100%; overflow: auto; background: var(--paper); border-radius: 10px; padding: 18px 16px; }
.result-card h2 { font-size: 26px; margin: 0 0 12px; }
.result-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-card th { font-size: 11px; color: var(--muted); text-align: left; padding: 2px 6px; border-bottom: 2px solid var(--ink); }
.result-card td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.result-card tr.me td { background: #f3dfa8; font-weight: 700; }
.result-card td.rank { font-size: 18px; font-weight: 800; text-align: center; }
.result-card td small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.result-card .go { margin-top: 16px; }
.result-card .note { margin: -6px 0 10px; }
@media (max-width: 520px) {
  #result { padding: 8px; padding-top: calc(var(--bar-height, 0px) + 8px); }
  .result-card { padding: 12px 8px; }
}

/* ---- トップページと厩舎 ---- */
#top, #stable {
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  background: var(--paper);
  min-height: 100dvh;
}
#login-form { display: grid; gap: 14px; margin-top: 20px; }
#login-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
#login-form .go { margin-top: 0; }
#top-error, #top-message, #stable-message { margin: 8px 0 0; min-height: 1.2em; color: var(--red); font-size: 14px; font-weight: 700; }
.me-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.me-line strong { font-size: 18px; }
.create-room { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.create-room .go { margin: 0; width: auto; padding: 10px 18px; font-size: 15px; letter-spacing: 0; }
.go.alt { background: var(--turf-2); margin-top: 10px; }
.room-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.room-main { flex: 1; min-width: 0; }
.room-main strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.room-main small { color: var(--muted); font-size: 11.5px; }
.room-state { text-align: right; white-space: nowrap; font-size: 13px; }
.room-state small { display: block; color: var(--muted); font-size: 11px; }
.silk-mark { flex: none; width: 22px; height: 22px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.link-button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; }
.name-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.silks { display: flex; flex-wrap: wrap; gap: 8px; }
.silk { width: 36px; height: 36px; border: 0; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.silk.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.bar-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.bar-sub span { margin-right: auto; }
.bar-sub button { padding: 2px 8px; font-size: 11.5px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.45); border-radius: 5px; }

/* ---- 馬券 ---- */
#bet-panel { margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--ink); }
.bet-horses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bet-horse { padding: 5px; background: #fff; border: 2px solid var(--line); border-radius: 8px; line-height: 0; }
.bet-horse.on { border-color: var(--red); background: #f3dfa8; }
.bet-amount { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.bet-amount input { flex: 1; min-width: 70px; height: 38px; padding: 0 8px; font: inherit; font-size: 17px; font-weight: 700; text-align: right; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; }
.bet-amount .sub { padding: 8px 9px; white-space: nowrap; }
#bet-panel .go { margin-top: 8px; padding: 12px; font-size: 15px; letter-spacing: 0; }
.bet-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bet-line span { display: inline-flex; align-items: center; gap: 3px; }
.bet-line .chip.inline { width: 22px; height: 22px; font-size: 12px; }
.bet-line.hit { color: var(--red); font-weight: 700; }
.bet-line.total { border-bottom: 0; font-size: 15px; font-weight: 800; }

/* ---- ランキング ---- */
.ranking { margin: 0; padding: 0 0 0 26px; font-size: 14px; }
.ranking li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.ranking li span { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.ranking li.me { font-weight: 800; color: var(--red); }

/* ---- 観戦の出走馬一覧 ---- */
#watch-list {
  position: absolute;
  top: 66px;
  right: 10px;
  bottom: 56px;
  width: min(300px, 62%);
  overflow-y: auto;
  padding: 4px 8px;
  background: rgba(0,0,0,.6);
  border-radius: 8px;
  color: #fff;
  touch-action: pan-y;
}
.watch-row { display: grid; grid-template-columns: 18px 26px 1fr; align-items: center; gap: 4px; width: 100%; padding: 4px 0; color: inherit; text-align: left; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.18); font-size: 12.5px; }
.watch-row.on { color: var(--gold); font-weight: 700; }
.watch-row small { display: block; font-size: 10px; font-weight: 400; color: rgba(255,255,255,.72); }
