/* トップページ専用(2026-10-23 競馬場に作り直し)。共通部品は style.css。
   ページ全体が競馬場: 上＝向こう正面のスタート(空・山・発馬機)、下へ進むと 1コーナー → 向こう正面 → 4コーナー → 直線 → ゴール(フッターの上)。
   景色の色は芝・木の緑、ラチの白、空の青だけ(赤＝★★、金＝💣 なので景色には使わない)。文字はすべて不透明な窓の上に置く。 */

/* ---------- 内馬場(ページの地) ---------- */
body.top {
  background-color: #0e361e;
  background-image: var(--dither), repeating-linear-gradient(180deg, #0e361e 0 96px, #113c22 96px 192px);
  background-size: 4px 4px, auto;
}
body.top::before { display: none; }  /* 共通の流れる星は使わない(夜空は空の中だけ) */
@media (min-width: 1180px) {  /* 広い画面: 左右の余白に木・花壇・池 */
  body.top {
    background-image: url(px/garden.svg), url(px/garden.svg), var(--dither), repeating-linear-gradient(180deg, #0e361e 0 96px, #113c22 96px 192px);
    background-size: 128px 512px, 128px 512px, 4px 4px, auto;
    background-position: left 12px top 760px, right 12px top 1020px, 0 0, 0 0;
    background-repeat: repeat-y, repeat-y, repeat, repeat;
  }
}
.top main.wrap { padding-top: 0; }

/* ---------- タイトル画面(空と向こう正面のスタート地点) ---------- */
.hero { position: relative; z-index: 0; text-align: center; margin-bottom: 28px; }
.hero-top { position: relative; padding-top: 22px; }
.hero-top > .hero-band, .hero-top > .hero-logo, .hero-top > .hero-tagline { position: relative; z-index: 2; }
/* 空は画面いっぱい。帯状の段々グラデーション(ドット絵の空)。時間帯は body[data-tod] */
.sky { position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; pointer-events: none;
       background: linear-gradient(180deg, #2e94f0 0 18%, #3aa8ff 18% 36%, #5cc0ff 36% 54%, #8fd8ff 54% 72%, #bfeaff 72%); }
.sky > span { position: absolute; image-rendering: pixelated; }
.sky-orb { right: 12%; top: 26px; width: 40px; height: 40px; background: url(px/sun.svg) 0 0 / 100% 100%; }
/* 雲(ドットの雲2つ。ゆっくり流れる) */
.sky-cloud { left: 100%; width: 4px; height: 4px;
  box-shadow: 12px 0 #fff, 16px 0 #fff, 20px 0 #fff, 36px 0 #fff, 40px 0 #fff,
    4px 4px #fff, 8px 4px #fff, 12px 4px #fff, 16px 4px #fff, 20px 4px #fff, 24px 4px #fff, 28px 4px #fff, 32px 4px #fff, 36px 4px #fff, 40px 4px #fff, 44px 4px #fff,
    0 8px #dff4ff, 4px 8px #dff4ff, 8px 8px #dff4ff, 12px 8px #dff4ff, 16px 8px #dff4ff, 20px 8px #dff4ff, 24px 8px #dff4ff, 28px 8px #dff4ff,
    32px 8px #dff4ff, 36px 8px #dff4ff, 40px 8px #dff4ff, 44px 8px #dff4ff, 48px 8px #dff4ff;
  animation: cloud 48s steps(160) infinite; }
.sky-cloud.c1 { top: 70px; left: 14%; animation-delay: -20s; }
.sky-cloud.c2 { top: 150px; transform: scale(1.5); animation-duration: 70s; animation-delay: -50s; }
@keyframes cloud { from { left: 100%; } to { left: -80px; } }
.sky-stars { left: 0; top: 0; width: 3px; height: 3px; display: none; color: #fff;
  box-shadow: 6vw 20px, 14vw 64px #9fe3ff, 22vw 12px, 31vw 98px, 38vw 40px, 47vw 16px #9fe3ff, 55vw 76px, 63vw 30px, 71vw 110px, 79vw 18px, 86vw 60px #9fe3ff, 93vw 26px, 9vw 140px, 27vw 170px, 60vw 150px, 90vw 180px;
  animation: twinkle 1.6s steps(2) infinite; }
/* 時間帯(top.js が body に data-tod を付ける。JSなしは昼) */
body[data-tod="morning"] .sky { background: linear-gradient(180deg, #5a86f0 0 18%, #6f9cff 18% 36%, #9ec0ff 36% 54%, #ffc9b0 54% 72%, #ffe6c8 72%); }
body[data-tod="morning"] .sky-orb { right: auto; left: 10%; top: 120px; }
body[data-tod="sunset"] .sky { background: linear-gradient(180deg, #2b1f66 0 18%, #3b2a7a 18% 36%, #7a3a8f 36% 54%, #c0607e 54% 72%, #f08a6a 72%); }
body[data-tod="sunset"] .sky-orb { top: 150px; right: 20%; filter: sepia(1) saturate(3) hue-rotate(-30deg); }
body[data-tod="sunset"] .l-mount, body[data-tod="sunset"] .l-trees { filter: brightness(.72) saturate(.85); }
body[data-tod="night"] .sky { background: linear-gradient(180deg, #050c2a 0 18%, #08123a 18% 36%, #0b1a4a 36% 54%, #14286f 54% 72%, #1d3580 72%); }
body[data-tod="night"] .sky-orb { background-image: url(px/moon.svg); }
body[data-tod="night"] .sky-stars { display: block; }
body[data-tod="night"] .sky-cloud { opacity: .25; }
body[data-tod="night"] .l-mount, body[data-tod="night"] .l-trees { filter: brightness(.6); }
body[data-tod="night"] .l-turf, body[data-tod="night"] .lap-turf { filter: brightness(.8); }
/* 空模様(最新の開催日の馬場発表から。build_site.weather_of): 雨・小雨は空を曇らせて雨粒を降らせる */
.hero-rain { display: none; position: absolute; z-index: 1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; pointer-events: none;
             background: url(px/rain.svg) 0 0 / 48px 96px; image-rendering: pixelated; animation: rainfall .36s steps(4) infinite; }
body[data-wx="drizzle"] .hero-rain { display: block; background-image: url(px/drizzle.svg); animation-duration: .8s; opacity: .8; }
body[data-wx="rain"] .hero-rain { display: block; }
@keyframes rainfall { to { background-position: -8px 96px; } }
body[data-wx="rain"] .sky::after, body[data-wx="drizzle"] .sky::after { content: ""; position: absolute; inset: 0; background: rgba(52,62,92,.55); }
body[data-wx="drizzle"] .sky::after { background: rgba(70,80,110,.35); }
body[data-wx="rain"] .sky-orb, body[data-wx="drizzle"] .sky-orb { display: none; }
body[data-wx="rain"] .sky-cloud { filter: brightness(.7); }
body[data-wx="rain"] .l-turf, body[data-wx="rain"] .lap-turf { filter: brightness(.85) saturate(.8); }

.hero-band { display: inline-block; margin: 0; font-family: var(--f-dot); font-size: 1.05rem; color: #fff; letter-spacing: 2px;
             background: var(--red); padding: 4px 16px; border: 3px solid var(--bg-deep);
             box-shadow: inset -4px -4px 0 #44238f, inset 4px 4px 0 #a98bff, 0 0 0 3px var(--edge); }
.hero-logo { display: block; width: fit-content; margin: 18px auto 4px; padding: 0 30px 10px; line-height: 1; cursor: default;
             -webkit-tap-highlight-color: transparent; user-select: none; }
.hero-word { display: block; font-family: "PressStart2P", monospace; font-size: clamp(2.8rem, 14vw, 5.6rem); letter-spacing: 2px;
             color: #ffd23f;
             text-shadow: -2px -2px 0 #fff6b0, 2px 2px 0 #f0a800, 4px 4px 0 #e08a00, 6px 6px 0 #8a4a00, 8px 8px 0 #4a2200, 10px 10px 0 var(--bg-deep); }
.spk { position: absolute; font-size: 22px; animation: twinkle 1.4s steps(2) infinite; }
.spk1 { left: 0; top: -6px; } .spk2 { right: 4px; top: 30%; animation-delay: .5s; font-size: 16px; }
.spk3 { right: -6px; bottom: -8px; animation-delay: .9s; } .spk4 { left: 6px; bottom: -6px; font-size: 18px; animation: none; }
@keyframes twinkle { 50% { opacity: .15; } }
.hero-tagline { max-width: 34em; margin: 14px auto 0; font-family: var(--f-dot); font-size: 1rem; color: #dfe6ff;
                background: var(--bg-deep); border: 3px solid var(--edge); box-shadow: inset 0 0 0 2px var(--edge2), 4px 4px 0 rgba(5,12,42,.45); padding: 8px 12px; }
.hero-band { animation: bandin .3s steps(3) both; }
@keyframes bandin { from { transform: scaleX(0); } }
.hero-word { animation: drop .9s steps(4) .15s both; }
@keyframes drop {
  0% { transform: translateY(-96px); opacity: 0; } 8% { opacity: 1; }
  50% { transform: translateY(0); } 66% { transform: translateY(-16px); } 82% { transform: translateY(0); }
  91% { transform: translateY(-4px); } 100% { transform: none; }
}

/* 向こう正面のスタート地点(画面いっぱい)。下から: 内馬場・内ラチ・芝・外ラチ・木立・山。ドット絵は2倍 */
/* 2026-11-21: 山の上の空を少し詰めて(262→232px、スマホ226→200px)、START と使い方が最初の画面に収まりやすくした */
.course { position: relative; z-index: 0; height: 232px; margin: 14px calc(50% - 50vw) 0; overflow: hidden; }
.course > span { position: absolute; left: 0; right: 0; image-rendering: pixelated; }
.course::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; z-index: 5; background: #0e361e; }
.l-mount { z-index: 1; bottom: 172px; height: 36px; background: url(px/mountains.svg) 0 0 / 160px 36px repeat-x; animation: pan-m 90s steps(80) infinite; }
.l-trees { z-index: 2; bottom: 158px; height: 28px; background: url(px/treeline.svg) 0 0 / 64px 28px repeat-x; }
.l-turf { z-index: 3; bottom: 14px; height: 142px; background: repeating-linear-gradient(90deg, #2f9e3a 0 32px, #39b445 32px 64px);
          box-shadow: inset 0 6px 0 rgba(15,58,30,.35); }
.l-rail { z-index: 4; height: 10px; background: url(px/rail.svg) 0 0 / 16px 10px repeat-x; }
.l-rail.o { bottom: 150px; } .l-rail.i { bottom: 10px; z-index: 6; }
@keyframes pan-m { to { background-position: -160px 0; } }
/* 発馬機(4枠を斜めに重ねる。奥ほど上・右)。中の馬は待機モーション。START でゲートが開いて飛び出す */
.course > .gate { z-index: 7; left: max(14px, calc(50% - 470px)); right: auto; bottom: 18px; width: 120px; height: 136px; }
.stall { position: absolute; left: calc(var(--k) * 8px); bottom: calc(var(--k) * 26px); width: 80px; height: 52px; z-index: calc(10 - var(--k)); }
.stall > span { position: absolute; image-rendering: pixelated; }
.st-back { inset: 0; background: url(px/gate_back.svg) 0 0 / 80px 52px; }
.st-front { inset: 0; z-index: 3; background: url(px/gate_front.svg) 0 0 / 160px 52px; }
.st-horse { z-index: 2; left: 8px; bottom: 4px; width: 48px; height: 32px; overflow: hidden; }
.st-horse svg { display: block; width: 192px; height: 32px; }
.sh-run { display: none !important; }
.sh-idle { animation: idle4 2s steps(4) infinite; }
.stall:nth-child(2) .sh-idle { animation-delay: -.5s; } .stall:nth-child(3) .sh-idle { animation-delay: -1.2s; } .stall:nth-child(4) .sh-idle { animation-delay: -.8s; }
@keyframes idle4 { to { transform: translateX(-192px); } }
/* 開いたゲート(top.js が .course に .go)。馬は横一列で右へ飛び出し、土ぼこり */
.course.go .st-front { background-position: -80px 0; }
.course.go .st-horse { animation: gateburst .95s steps(24) forwards; animation-delay: calc(var(--k) * 70ms + 80ms); }
.course.go .sh-idle { display: none; }
.course.go .sh-run { display: block !important; animation: idle4 .3s steps(4) infinite; }
@keyframes gateburst { 0% { transform: translateX(0); } 12% { transform: translateX(10px); } 100% { transform: translateX(105vw); } }
.course.go .gate { animation: gateshake .2s steps(2); }
@keyframes gateshake { 50% { transform: translateY(-2px); } }
/* 「スタート」の看板 */
.course > .l-sign { z-index: 8; left: max(150px, calc(50% - 330px)); right: auto; bottom: 64px; }
.l-sign, .lap-sign { display: inline-flex; flex-direction: column; align-items: center; padding: 3px 10px 4px; line-height: 1.25;
          background: var(--bg-deep); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--bg-deep), 4px 4px 0 2px rgba(0,0,0,.4); }
.l-sign::after, .lap-sign::after { content: ""; position: absolute; left: 50%; top: 100%; width: 6px; height: 18px; margin-left: -3px; margin-top: 3px;
          background: linear-gradient(90deg, #140c24 0 2px, #c8ccd8 2px 4px, #7d8396 4px); }
.l-sign b, .lap-sign b { font-family: var(--f-dot); font-weight: 400; font-size: 16px; color: #fff; white-space: nowrap; }
.l-sign small, .lap-sign small { font-family: var(--f-px); font-size: 8px; color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
@media (max-width: 520px) {
  .course { height: 200px; }
  .l-mount { bottom: 142px; } .l-trees { bottom: 130px; } .l-rail.o { bottom: 122px; } .l-turf { height: 114px; }
  .course > .gate { bottom: 14px; left: 10px; }
  .stall { bottom: calc(var(--k) * 20px); left: calc(var(--k) * 6px); }
  .course > .l-sign { left: auto; right: 12px; bottom: 44px; }
}

/* START とつかい方(内馬場の上) */
.hero-start { margin: 22px 0 12px; }
.btn.start { font-family: var(--f-px); font-size: 24px; padding: 14px 26px 12px; letter-spacing: 2px; }
.btn.start small { display: block; font-family: var(--f-dot); font-size: 16px; letter-spacing: 0; margin-top: 8px; }
.blink { display: inline-block; margin-right: 8px; animation: blink 1s steps(2) infinite; }
.btn.start { animation: startpulse 1s steps(1) 1s infinite; }
@keyframes startpulse { 50% { box-shadow: inset -4px -4px 0 #44238f, inset 4px 4px 0 #a98bff, 0 5px 0 var(--bg-deep), 0 0 0 3px #fff; } }

/* ---------- コースの区切り(1コーナー・向こう正面・4コーナー・直線)。画面いっぱいの芝のコース ---------- */
.lap { --hw: 72px; --hh: 48px; position: relative; height: 104px; margin: 4px calc(50% - 50vw) 44px; pointer-events: none; }
.lap > span { position: absolute; image-rendering: pixelated; }
.lap-hedge { left: 0; right: 0; top: 0; height: 16px; background: url(px/hedge.svg) 0 0 / 32px 16px repeat-x; }
.lap-rail { left: 0; right: 0; height: 10px; background: url(px/rail.svg) 0 0 / 16px 10px repeat-x; z-index: 2; }
.lap-rail.o { top: 12px; } .lap-rail.i { bottom: 6px; z-index: 4; }
.lap-turf { left: 0; right: 0; top: 18px; bottom: 12px; z-index: 1;
            background: repeating-linear-gradient(90deg, #2f9e3a 0 32px, #39b445 32px 64px);
            box-shadow: inset 0 4px 0 rgba(15,58,30,.4), inset 0 -2px 0 rgba(15,58,30,.3); }
/* ハロン棒(白と紺) */
.lap-pole { z-index: 3; bottom: 12px; width: 10px; height: 60px; background: url(px/pole.svg) 0 0 / 100% 100%; }
.lap-pole.p1 { left: 36%; } .lap-pole.p2 { left: 74%; }
/* 地点の看板(本文の左端にそろえる) */
.lap > .lap-sign { z-index: 6; left: max(12px, calc(50% - 468px)); top: -14px; }
/* 馬(色は中立の青い勝負服)。top.js がスクロールに合わせて --x を動かす(steps 風に4pxきざみ)。JSなし・reduced-motion は止まったまま */
.lap > .lap-horse { z-index: 5; left: var(--x, 18%); bottom: 14px; width: var(--hw); height: var(--hh); overflow: hidden;
                    --jk: #2a6cf0; --js: #173f9a; --jc: #ffffff; }
.lap-horse svg { display: block; width: calc(var(--hw) * 4); height: var(--hh); }
.lap-horse .lh-run { display: none; }
.lh-idle { animation: lapidle 2s steps(4) infinite; }
@keyframes lapidle { to { transform: translateX(calc(var(--hw) * -4)); } }
.lap.run .lh-idle { display: none; }
.lap.run .lh-run { display: block; animation: lapidle .36s steps(4) infinite; }
.lap.back .lap-horse { transform: scaleX(-1); }
.lap-horse::after { content: ""; }
.lap:not(.lap-goal) { margin-top: 12px; }
@media (max-width: 699.98px) {
  .lap { --hw: 48px; --hh: 32px; height: 84px; margin-bottom: 36px; }
  .lap-turf { top: 18px; }
  .lap-pole { height: 44px; width: 8px; }
}

/* ゴール(フッターの上): スタンドと観客・手前の直線・ゴール板。馬が着くと「GOAL!」(JSなし・reduced-motion は最初から出す) */
.lap.lap-goal { height: 176px; margin: 8px 0 0; overflow: hidden; background: #0e361e; }
.lg-stand { left: 0; right: 0; top: 0; height: 66px; background: url(px/stand.svg) 0 0 / 96px 66px repeat-x; }
.lg-cheer { position: absolute; inset: 0; background: url(px/crowd_cheer.svg) 0 0 / 96px 66px repeat-x; image-rendering: pixelated; opacity: 0; }
.lap-goal .lap-rail.o { top: 60px; }
.lap-goal .lap-turf { top: 66px; }
.lap-goal .lap-pole { display: none; }
.lap-goal > .lap-sign { top: 78px; }
.lg-post { z-index: 6; right: max(20px, calc(50% - 460px)); bottom: 10px; width: 32px; height: 96px; background: url(px/goalpost.svg) 0 0 / 100% 100%; }
.lg-line { z-index: 2; right: calc(max(20px, calc(50% - 460px)) + 14px); top: 66px; bottom: 12px; width: 4px;
           background: repeating-linear-gradient(180deg, #fff 0 4px, #140c24 4px 8px); }
.lg-word { z-index: 7; left: 50%; top: 72px; transform: translateX(-50%); font-family: var(--f-px); font-size: 32px; line-height: 1; color: #fff; white-space: nowrap;
           padding: 10px 14px 8px; background: var(--bg-deep); border: 4px solid #fff; box-shadow: 0 0 0 3px var(--bg-deep), 6px 6px 0 2px rgba(0,0,0,.4);
           text-shadow: 3px 3px 0 #6a3fd0; }
html.lapjs .lg-word { visibility: hidden; }
html.lapjs .lap-goal.goal .lg-word { visibility: visible; animation: goalpop .5s steps(5) both; }
html.lapjs .lap-goal.goal .lg-cheer { animation: cheer .5s steps(1) infinite; }
@keyframes goalpop { 0% { transform: translateX(-50%) scale(.2); } 60% { transform: translateX(-50%) scale(1.15); } 100% { transform: translateX(-50%); } }
@keyframes cheer { 50% { opacity: 1; } }
/* JSなし・reduced-motion: 馬はゴール板の手前に止まっている */
.lap-goal > .lap-horse { left: calc(100% - max(20px, calc(50% - 460px)) - var(--hw) - 6px); }
html.lapjs .lap-goal > .lap-horse { left: var(--x, 18%); }
@media (max-width: 699.98px) {
  .lap.lap-goal { height: 150px; }
  .lg-stand { height: 44px; background-size: 64px 44px; } .lg-cheer { background-size: 64px 44px; }
  .lap-goal .lap-rail.o { top: 40px; } .lap-goal .lap-turf, .lg-line { top: 46px; }
  .lap-goal > .lap-sign { top: 54px; }
  .lg-post { width: 24px; height: 72px; }
  .lg-line { right: calc(max(20px, calc(50% - 460px)) + 10px); }
  .lg-word { top: 56px; font-size: 24px; }
}

/* ---------- 掲示板(LEDの電光掲示板風。数字は実際の結果) と 案内役の馬 ---------- */
.duo { display: grid; gap: 0 20px; }
@media (min-width: 900px) { .duo { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.board h2 small { font-size: .875rem; }
.led { position: relative; padding: 14px 14px 12px; color: #e8f4ff; font-family: var(--f-dot);
       background: #04060d; border: 4px solid; border-color: #2a3150 #4a5378 #4a5378 #2a3150;
       box-shadow: inset 0 0 0 2px #000, inset 0 0 18px rgba(159,227,255,.08), 4px 4px 0 rgba(0,0,0,.4); }
.led::before { content: ""; position: absolute; inset: 0; pointer-events: none;
               background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.06) 0 1px, transparent 1.5px) 0 0 / 4px 4px; }
.led > * { position: relative; }
.led b, .led i { text-shadow: 0 0 6px rgba(159,227,255,.45); }
.led-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; color: var(--accent); }
.led-cols { display: none; gap: 4px; font-size: var(--fs-s); color: #aab6e6; margin-right: calc(5.2em + 12px); }
.led-cols i { width: 40px; text-align: center; font-style: normal; text-shadow: none; }
.led-rows { list-style: none; margin: 0 0 10px; padding: 0; }
.led-rows li { border-top: 2px dashed rgba(159,227,255,.18); }
.led-rows li:first-child { border-top: 0; }
.led-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "r n n" "t t s"; align-items: center; gap: 4px 10px;
           padding: 8px 4px; color: inherit; text-decoration: none; }
.led-row:hover, .led-row:focus-visible { background: rgba(159,227,255,.08); color: #fff; }
.led-r { grid-area: r; font-size: 16px; color: #fff; white-space: nowrap; }
.led-n { grid-area: n; font-size: 16px; color: #cfe0ff; overflow-wrap: anywhere; }
.led-top3 { grid-area: t; display: flex; gap: 4px; }
.led-top3 i { display: inline-grid; place-items: center; width: 40px; height: 32px; font-style: normal; font-family: var(--f-px); font-size: 16px; color: #fff;
              background: #0b1222; border: 2px solid #26304f; box-shadow: inset 0 -2px 0 rgba(0,0,0,.6); }
.led-st { grid-area: s; font-size: 16px; text-align: right; white-space: nowrap; }
.led-row.is-hit .led-st .hit { text-shadow: 0 0 8px rgba(109,255,124,.55); }
.led-row.is-hit .led-top3 i { border-color: #2f6e3a; }
.led-none { margin: 0 0 10px; color: #cfe0ff; }
/* 広い画面: 左に★★の結果、右に的中レース率・馬場・空模様 */
.led-side { display: grid; gap: 10px; padding-top: 10px; border-top: 2px solid rgba(159,227,255,.3); }
.led-side .led-rate { border-top: 0; padding: 0 4px; }
.led-side > p { margin: 0; }
@media (min-width: 760px) {
  .led { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 0 18px; }
  .led-main .led-rows { margin-bottom: 0; }
  .led-side { align-content: start; padding: 4px 0 0 18px; border-top: 0; border-left: 2px solid rgba(159,227,255,.3); }
  .led-side .led-rate { flex-direction: column; align-items: flex-start; gap: 8px; }
  .led-side .led-rate b { font-size: 40px; }
  .led-going { flex-direction: column; gap: 2px; }
}
.led-wx { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 16px; color: #fff; }
.led-wx .led-k { font-size: var(--fs-s); }
.led-wxi { width: 24px; height: 24px; image-rendering: pixelated; background: url(px/sun.svg) center / 20px 20px no-repeat; }
.led-wxi.wx-rain, .led-wxi.wx-drizzle { background: url(px/rain.svg) 0 0 / 24px 48px, #3a4466; }
.led-going .led-k { margin-right: 4px; }
@media (min-width: 640px) {
  .led-row { grid-template-columns: 5.2em minmax(0, 1fr) auto 5.2em; grid-template-areas: "r n t s"; }
  .led-cols { display: flex; }
}
.led-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; padding: 10px 4px 6px; border-top: 2px solid rgba(159,227,255,.3); font-size: 16px; }
.led-rate b { font-family: var(--f-px); font-weight: 400; font-size: 32px; line-height: 1; color: #fff; }
.led-rate b small { font-size: 16px; margin-left: 2px; }
.led-den { font-family: var(--f-px); font-size: 16px; color: var(--accent); }
.led-wait { font-family: var(--f-dot) !important; font-size: 16px !important; }
.led-going { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; padding: 0 4px; font-size: var(--fs-s); color: #cfe0ff; }
.led-k { color: var(--accent); }
.board-note { margin: 10px 0 0; font-size: var(--fs-s); color: var(--muted); }
/* LEDが流れるように一度だけ点灯(画面に入ったとき) */
.fx .board.in .led-row { animation: ledon .4s steps(4) both; }
.fx .board.in li:nth-child(2) .led-row { animation-delay: .08s; } .fx .board.in li:nth-child(3) .led-row { animation-delay: .16s; }
.fx .board.in li:nth-child(4) .led-row { animation-delay: .24s; } .fx .board.in li:nth-child(n+5) .led-row { animation-delay: .32s; }
@keyframes ledon { from { clip-path: inset(0 100% 0 0); } }

/* 案内役の馬(ひとこと)。白いふきだしに濃い文字 */
.npc-in { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; }
.npc-bubble { position: relative; padding: 10px 14px 12px; color: #140c24; background: #f2f4ff; border: 3px solid #140c24;
              box-shadow: inset -3px -3px 0 #c8ccd8, 4px 4px 0 rgba(0,0,0,.45); }
.npc-bubble::before { content: ""; position: absolute; left: -11px; top: 22px; width: 8px; height: 12px;
  background: linear-gradient(90deg, transparent 0 4px, #140c24 4px) 0 0 / 8px 4px no-repeat,
              linear-gradient(90deg, #140c24 0 4px, #f2f4ff 4px) 0 4px / 8px 4px no-repeat,
              linear-gradient(90deg, transparent 0 4px, #140c24 4px) 0 8px / 8px 4px no-repeat; }
.npc-name { margin: 0 0 4px; font-family: var(--f-dot); font-size: var(--fs-s); color: #44238f; }
.npc-tips { margin: 0; padding: 0 0 0 1.1em; font-family: var(--f-dot); font-size: 16px; line-height: 1.7; }
.npc-tips li { margin: 0 0 6px; }
.npc-tips li::marker { content: "▶ "; color: #6a3fd0; font-size: .75em; }
.npc-more { display: inline-block; margin-left: 6px; color: #44238f; font-size: var(--fs-s); text-underline-offset: 3px; }
.npc-more:hover, .npc-more:focus-visible { color: #140c24; }
.npc-more::after { content: " ▶"; font-size: .75em; }
/* JSあり: 1つずつ表示(残りは読み上げ用に見えなくするだけ) */
.npc.js .npc-tips { padding: 0; min-height: 3.2em; }
.npc.js .npc-tips li { margin: 0; }
.npc.js .npc-tips li::marker { content: ""; }
.npc.js .npc-tips li:not(.on) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx .npc.js .npc-tips li.on { animation: tipin .3s steps(6) both; }
@keyframes tipin { from { clip-path: inset(0 100% 0 0); } }
.npc-ctl { margin: 8px 0 0; text-align: right; }
@media (min-width: 700px) {
  .npc.js .npc-bubble { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; align-items: end; }
  .npc.js .npc-name { grid-column: 1 / -1; }
  .npc.js .npc-tips { min-height: 0; }
  .npc.js .npc-ctl { margin: 0; }
}
.top .site-footer { margin-top: 0; }
.npc-ctl[hidden] { display: none; }
.npc-next { min-height: 44px; padding: 4px 14px; font-family: var(--f-dot); font-size: 16px; color: #fff; cursor: pointer;
            background: #6a3fd0; border: 3px solid #140c24; box-shadow: inset -3px -3px 0 #44238f, inset 3px 3px 0 #a98bff, 0 3px 0 #140c24; }
.npc-next:hover, .npc-next:focus-visible { filter: brightness(1.12); }
.npc-next:active { transform: translateY(2px); box-shadow: inset 3px 3px 0 #44238f, 0 1px 0 #140c24; }
.npc-count { font-family: var(--f-px); font-size: 8px; margin-right: 8px; color: #dfe6ff; }
.npc-tri { display: inline-block; margin-left: 6px; font-size: .75em; }
.npc-face { width: 76px; height: 76px; }
@media (max-width: 520px) {
  .npc-in { grid-template-columns: 1fr; gap: 12px; }
  .npc-face { width: 60px; height: 60px; }
  .npc-bubble::before { left: 22px; top: -11px; width: 12px; height: 8px;
    background: linear-gradient(180deg, transparent 0 4px, #140c24 4px) 0 0 / 4px 8px no-repeat,
                linear-gradient(180deg, #140c24 0 4px, #f2f4ff 4px) 4px 0 / 4px 8px no-repeat,
                linear-gradient(180deg, transparent 0 4px, #140c24 4px) 8px 0 / 4px 8px no-repeat; }
}

/* ---------- パドック(★★の💣の馬が周回。押すとそのレースへ) ---------- */
.paddock { --hw: 72px; --hh: 48px; --D: 44s; --rt: 52px; --rb: 12px; --rw: 30px; --plate: 26px;
           --yb: calc(var(--rt) + var(--rw) - 4px - var(--hh)); --yf: calc(100% - var(--rb) - 4px - var(--hh));
           position: relative; height: 252px; margin: 12px 0 6px; overflow: hidden; --e: 46px;
           background: var(--dither) 0 0 / 4px 4px, #1f6a2a; border: 4px solid #0a2e18; box-shadow: 0 0 0 2px var(--bg-deep), 4px 4px 0 2px rgba(0,0,0,.4); }
.paddock > span { position: absolute; image-rendering: pixelated; }
/* 角をドットで落とした周回コース(土)と内側の芝・白い柵 */
.pd-ring { left: 14px; right: 14px; top: var(--rt); bottom: var(--rb); background: var(--dither) 0 0 / 4px 4px, #8a6a48;
           clip-path: polygon(24px 0, calc(100% - 24px) 0, calc(100% - 24px) 8px, calc(100% - 12px) 8px, calc(100% - 12px) 16px, 100% 16px,
             100% calc(100% - 16px), calc(100% - 12px) calc(100% - 16px), calc(100% - 12px) calc(100% - 8px), calc(100% - 24px) calc(100% - 8px), calc(100% - 24px) 100%,
             24px 100%, 24px calc(100% - 8px), 12px calc(100% - 8px), 12px calc(100% - 16px), 0 calc(100% - 16px), 0 16px, 12px 16px, 12px 8px, 24px 8px); }
.pd-in { left: calc(14px + var(--rw)); right: calc(14px + var(--rw)); top: calc(var(--rt) + var(--rw)); bottom: calc(var(--rb) + var(--rw));
         display: grid; place-items: center; background: var(--dither) 0 0 / 4px 4px, #2a7a3a; border: 3px solid #fff; box-shadow: 0 0 0 2px #7d8396; }
.pd-sign { font-family: var(--f-px); font-size: 16px; letter-spacing: 3px; color: #dfe6ff; text-shadow: 2px 2px 0 #0a2e18; opacity: .85; }
.pd-h { position: absolute; z-index: 3; width: var(--hw); height: var(--hh); text-decoration: none; cursor: pointer;
        top: var(--yf); left: calc((100% - var(--hw) - var(--e) * 2) * var(--i) / max(var(--n) - 1, 1) + var(--e));
        animation: pdloop var(--D) infinite; animation-delay: calc(var(--D) * var(--i) / var(--n) * -1); }
.pd-h.back { top: var(--yb); z-index: 1; }
.pd-spr { position: absolute; inset: 0; overflow: hidden; }
.pd-h.back .pd-spr { transform: scaleX(-1); }
.pd-spr svg { display: block; width: calc(var(--hw) * 4); height: var(--hh); animation: pdlegs 1s steps(4) infinite; }
.pd-h:nth-of-type(2n) .pd-spr svg { animation-delay: -.5s; }
.pd-h > .pd-spr { animation: pdface var(--D) step-end infinite; animation-delay: inherit; }
@keyframes pdlegs { to { transform: translateX(calc(var(--hw) * -4)); } }
@keyframes pdloop {
  0%   { left: var(--e); top: var(--yf); z-index: 3; animation-timing-function: steps(90); }
  44%  { left: calc(100% - var(--hw) - var(--e)); top: var(--yf); z-index: 3; animation-timing-function: steps(12); }
  50%  { left: calc(100% - var(--hw) - var(--e)); top: var(--yb); z-index: 1; animation-timing-function: steps(90); }
  94%  { left: var(--e); top: var(--yb); z-index: 1; animation-timing-function: steps(12); }
  100% { left: var(--e); top: var(--yf); z-index: 3; }
}
@keyframes pdface { 0% { transform: none; } 47% { transform: scaleX(-1); } 97% { transform: none; } }
/* 名札(馬番＋馬名)。💣の馬なので枠は金 */
.pd-plate { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); display: flex; align-items: center; gap: 4px;
            max-width: 11em; padding: 0 6px 0 0; font-family: var(--f-dot); font-size: 14px; line-height: 20px; color: #fff; white-space: nowrap;
            background: var(--bg-deep); border: 2px solid var(--gold); box-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.pd-plate b { font-family: var(--f-px); font-weight: 400; font-size: 8px; line-height: 20px; padding: 0 4px; color: var(--bg-deep); background: var(--gold); }
.pd-h:hover .pd-plate { background: #2c2470; }
.paddock:hover .pd-h, .paddock:hover .pd-spr, .paddock:hover .pd-spr svg { animation-play-state: paused; }
.pd-note { margin: 0 0 12px; font-size: var(--fs-s); color: var(--muted); }
@media (max-width: 699.98px) {
  .paddock { --hw: 48px; --hh: 32px; --rt: 44px; --rb: 10px; --rw: 24px; --e: 10px; height: 206px; }
  /* スマホは名札を馬番だけにする(7頭の名前が重なるため。馬名は下のカードに) */
  .pd-plate { padding: 0; font-size: 0; gap: 0; }
  .pd-plate b { font-size: 8px; padding: 0 5px; }
  .pd-sign { font-size: 8px; }
}

/* ---------- 新着コラム(クエストの貼り紙) ---------- */
.qb-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 18px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.qb-note { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 14px 12px; color: #140c24; text-decoration: none;
           background: var(--dither) 0 0 / 4px 4px, #eef1ff; border: 3px solid #140c24;
           box-shadow: inset -3px -3px 0 #c8ccd8, inset 3px 3px 0 #fff, 5px 5px 0 rgba(0,0,0,.45); }
.qb-list li:nth-child(2n) .qb-note { margin-top: 6px; }
.qb-note:hover, .qb-note:focus-visible { color: #140c24; transform: translate(-2px, -2px); border-color: #6a3fd0;
           box-shadow: inset -3px -3px 0 #c8ccd8, inset 3px 3px 0 #fff, 0 0 0 2px #a98bff, 7px 7px 0 rgba(0,0,0,.45); }
.qb-note:active { transform: translate(2px, 2px); }
.qb-pin { position: absolute; left: 50%; top: -9px; width: 12px; height: 12px; margin-left: -6px; background: #5b7cf0;
          box-shadow: inset -3px -3px 0 #2a4ab0, inset 3px 3px 0 #9fe3ff, 0 0 0 2px #140c24; }
.qb-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.qb-cat { font-family: var(--f-dot); font-size: var(--fs-s); color: #fff; background: #14286f; padding: 0 6px; }
.qb-new { font-family: var(--f-px); font-size: 8px; line-height: 16px; padding: 1px 5px; color: #fff; background: #6a3fd0; }
.qb-t { font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #140c24; }
.qb-s { font-family: var(--f-body); font-size: var(--fs-s); line-height: 1.6; color: #2a2f5a;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qb-m { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 2px dashed #aab0c4;
        font-size: var(--fs-s); color: #3a3f6a; }
.qb-go { font-family: var(--f-dot); color: #44238f; white-space: nowrap; }
.qb-more { margin: 0; }

/* ---------- キャラクターカード(ステータス画面) ---------- */
.picks h2 small { font-size: .8rem; }
.deck { position: relative; list-style: none; margin: 10px -12px 0; padding: 8px 12px 14px; display: flex; gap: 14px; overflow-x: auto;
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.slot { flex: 0 0 min(76vw, 290px); scroll-snap-align: center; perspective: 800px; }
@media (min-width: 900px) {
  .deck { flex-wrap: wrap; overflow: visible; }
  .slot { flex-basis: calc((100% - 28px) / 3); }
}
.ccard { display: block; height: 100%; text-decoration: none; color: var(--text);
         transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s steps(3); }
.ccard-in { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 16px; }
.ccard.is-bomb .ccard-in { --f-hi: #ffe680; --f-lo: #c08a00; --b-hi: #8a6a10; --b-lo: #0c0a2e; --w1: #2c2470; --w2: #17134a; }
.ccard-top { display: flex; justify-content: space-between; font-family: var(--f-dot); font-size: 16px; color: #e6ebff; }
.ccard-portrait { position: relative; height: 104px; background: var(--bg-deep); border: 2px solid var(--edge2);
                  background-image: linear-gradient(180deg, transparent 70%, #2f9e3a 70%); }
.ccard-horse { position: absolute; left: 50%; bottom: 8px; width: 96px; height: 64px; margin-left: -48px; overflow: hidden; z-index: 1; }
.ccard-run, .ccard-idle { display: block; width: 384px; height: 64px; }
.ccard-run { display: none; }
.ccard-idle { animation: cardrun 2s steps(4) infinite; }
.slot:nth-child(2n) .ccard-idle { animation-delay: -.5s; } .slot:nth-child(3n) .ccard-idle { animation-delay: -1s; }
.ccard:hover .ccard-idle, .ccard:focus-visible .ccard-idle { display: none; }
.ccard:hover .ccard-run, .ccard:focus-visible .ccard-run { display: block; animation: cardrun .44s steps(4) infinite; }
.ccard-portrait::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 96px; height: 6px; margin-left: -48px; pointer-events: none;
  background: linear-gradient(rgba(5,12,42,.5), rgba(5,12,42,.5)) center / 56% 100% no-repeat,
              linear-gradient(rgba(5,12,42,.32), rgba(5,12,42,.32)) center / 82% 50% no-repeat; }
@keyframes cardrun { to { transform: translateX(-384px); } }
.ccard-crest { position: absolute; left: 6px; top: 4px; font-size: 24px; }
.ccard-crest .mark { font-size: 1.4rem; }
.ccard-no { position: absolute; right: 6px; top: 6px; font-family: var(--f-px); font-size: 16px; line-height: 1; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.ccard-name { font-family: var(--f-dot); font-size: 1.35rem; line-height: 1.3; text-align: center; color: #fff; text-shadow: 2px 2px 0 var(--bg-deep);
              overflow-wrap: anywhere; }
.ccard.is-bomb .ccard-name { color: var(--gold); font-size: 24px; text-shadow: 2px 2px 0 #c06a00, 4px 4px 0 #4a2200; }  /* 💣の馬の名前は金で大きく(2026-11-21) */
.ccard-stats { display: grid; grid-template-columns: 4.5em 1fr; gap: 3px 8px; font-family: var(--f-dot); font-size: 16px;
               border-top: 2px dashed rgba(170,182,230,.35); padding-top: 8px; }
.ccard-stats .k, .ccard-words .k { color: var(--muted); }
.ccard-words { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-family: var(--f-dot); font-size: .875rem; }
.ccard-words .k { margin-right: 4px; }
.ccard-words .w { background: var(--bg-deep); border: 2px solid var(--edge2); padding: 0 6px; }
.ccard-go { margin-top: auto; text-align: right; font-family: var(--f-dot); color: #fff; font-size: 16px; }
.swipe { text-align: center; margin: 0; font-family: var(--f-dot); }
@media (min-width: 900px) { .swipe { display: none; } }
.deck-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 0; }
.deck-nav[hidden] { display: none; }
.dk-btn { min-width: 48px; min-height: 44px; font-family: var(--f-dot); font-size: 1rem; color: #fff; cursor: pointer;
          background: #6a3fd0; border: 3px solid var(--bg-deep); box-shadow: inset -3px -3px 0 #44238f, inset 3px 3px 0 #a98bff, 0 4px 0 var(--bg-deep); }
.dk-btn:active { transform: translateY(3px); box-shadow: inset -3px -3px 0 #44238f, inset 3px 3px 0 #a98bff, 0 1px 0 var(--bg-deep); }
.dk-btn:disabled { opacity: .4; cursor: default; }
.dk-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 50%; }
.dk-dots i { width: 10px; height: 10px; background: var(--bg-deep); border: 2px solid var(--edge2); }
.dk-dots i.on { background: #fff; border-color: #fff; }
.dk-count { font-family: var(--f-px); font-size: 8px; color: var(--muted); min-width: 4.5em; text-align: center; }
.js-deck .swipe { display: none; }
@media (min-width: 900px) { .deck-nav { display: none !important; } }
.ccard-in { position: relative; transition: transform .1s steps(2); }
.ccard:hover .ccard-in, .ccard:focus-visible .ccard-in { transform: translate(-3px, -3px); --drop: 9px 9px 0 2px rgba(0,0,0,.5);
  box-shadow: inset 0 0 0 2px var(--bg-deep), inset 4px 4px 0 var(--b-hi), inset -4px -4px 0 var(--b-lo), var(--glow), 0 0 0 2px var(--bg-deep), var(--drop); }
.ccard:active .ccard-in { transform: translate(2px, 2px); --drop: 2px 2px 0 2px rgba(0,0,0,.5); }
.ccard.is-bomb .ccard-in::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.16) 42% 47%, transparent 47% 51%, rgba(255,255,255,.1) 51% 53%, transparent 53%) no-repeat;
  background-size: 300% 100%; animation: shine 4.5s steps(16) infinite; }
.ccard-crest { animation: bob 1s steps(1) infinite; }

/* ---------- その他 ---------- */
.day-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* 起動画面(top.js が1セッションに1回だけ出す。タップ・キーで飛ばせる。reduced-motion では出さない) */
.intro { position: fixed; inset: 0; z-index: 10001; display: grid; place-content: center; gap: 18px; text-align: center; cursor: pointer;
         background: #050c2a; color: #fff; font-family: var(--f-px); }
.intro-t { font-size: 16px; letter-spacing: 3px; }
.intro-t::after { content: ""; display: inline-block; width: 3ch; text-align: left; animation: dots .9s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.intro-bar { width: 220px; height: 16px; margin: 0 auto; border: 3px solid #fff; padding: 2px; }
.intro-bar > i { display: block; height: 100%; width: 0; background: #9fe3ff; animation: load .7s steps(8) forwards; }
@keyframes load { to { width: 100%; } }
.intro-p { font-size: 16px; letter-spacing: 3px; visibility: hidden; }
.intro.ready .intro-t, .intro.ready .intro-bar { display: none; }
.intro.ready .intro-p { visibility: visible; animation: blink .8s steps(2) infinite; }
.intro-s { font-family: var(--f-dot); font-size: .875rem; color: var(--muted); }
.intro.out { animation: introout .26s steps(5) forwards; }
@keyframes introout { to { clip-path: inset(0 0 100% 0); } }

/* 隠しコマンドの「SPECIAL RUN」: お知らせ＋ドットの紙吹雪＋馬の大行進(どれも数秒で消える。reduced-motion はお知らせだけ) */
.egg { position: fixed; left: 50%; top: 38%; z-index: 10005; width: min(92vw, 30em); transform: translate(-50%, -50%); text-align: center; pointer-events: none;
       padding: 18px 20px 16px; background: var(--dither) 0 0 / 4px 4px, var(--win); border: 4px solid; border-color: #fff #9fb0ee #9fb0ee #fff;
       box-shadow: 0 0 0 3px var(--bg-deep), inset 0 0 0 2px var(--bg-deep), 8px 8px 0 2px rgba(0,0,0,.5); animation: eggin .3s steps(4) both; }
.egg-t { margin: 0 0 10px; font-family: var(--f-px); font-size: 24px; line-height: 1.2; color: #fff; text-shadow: 3px 3px 0 #6a3fd0, 5px 5px 0 rgba(0,0,0,.4);
         animation: eggt .5s steps(2) infinite; }
.egg-m { margin: 0; font-family: var(--f-dot); font-size: 16px; color: #dfe6ff; }
@keyframes eggin { from { clip-path: inset(50% 0 50% 0); } }
@keyframes eggt { 50% { transform: translateY(-3px); } }
.egg.out { animation: eggout .3s steps(4) forwards; }
@keyframes eggout { to { clip-path: inset(50% 0 50% 0); } }
.confetti { position: fixed; top: -16px; z-index: 10004; width: 8px; height: 8px; pointer-events: none; animation: fall var(--t, 2.6s) steps(26) var(--d, 0s) forwards; }
@keyframes fall { 0% { transform: translate(0, 0); } 50% { transform: translate(var(--dx, 20px), 55vh) rotate(90deg); } 100% { transform: translate(calc(var(--dx, 20px) * -1), 110vh) rotate(180deg); } }
.parade { position: fixed; left: 0; bottom: 18px; z-index: 10003; width: 72px; height: 48px; overflow: hidden; pointer-events: none;
          animation: parade 2.8s steps(56) var(--d, 0s) both; }
.parade svg { display: block; width: 288px; height: 48px; animation: lapidle .3s steps(4) infinite; }
@keyframes parade { from { transform: translateX(-90px); } to { transform: translateX(calc(100vw + 20px)); } }

@media (prefers-reduced-motion: reduce) {
  .ccard { transform: none !important; }
  .sky-cloud.c1 { left: 14%; } .sky-cloud.c2 { left: 62%; }
}

/* ================= 本日のレース(トップの一番上。2026-11-21 ユーザー指示: 携帯で押すとその日のレースが一覧で開く) =================
   大きな紫のボタン(金のふち＝このページの一番の入口)。開くと場のタブ(JSあり)と、1レース1枚の押せる札(発走時刻・R・レース名・★・◎/💣・結果)。
   ★★の札は赤、💣の馬は金、的中は緑。外れは書かない(着順だけ) */
.tr { position: relative; z-index: 3; margin: 12px 0 0; }
.tr-btn { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 14px 8px 12px;
          font-family: var(--f-dot); color: #fff; user-select: none; -webkit-tap-highlight-color: transparent;
          background: var(--dither) 0 0 / 4px 4px, #6a3fd0; border: 3px solid var(--bg-deep); text-shadow: 2px 2px 0 rgba(5,12,42,.6);
          box-shadow: inset -4px -4px 0 #44238f, inset 4px 4px 0 #a98bff, 0 0 0 3px var(--gold), 0 0 0 5px var(--bg-deep), 4px 9px 0 rgba(0,0,0,.4); }
.tr-btn::-webkit-details-marker { display: none; }
.tr-btn::marker { content: ""; }
.tr-btn:hover, .tr-btn:focus-visible { filter: brightness(1.1); }
.tr-btn:active { transform: translateY(3px); }
.tr-cur { flex: 0 0 auto; font-size: 16px; color: var(--gold); animation: blink 1s steps(2) infinite; }
.tr-t { flex: 1 1 auto; min-width: 0; font-size: 24px; line-height: 1.25; }
.tr-c { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 6px; flex: 0 0 auto; font-size: 16px; color: #efe9ff; }
.tr-cb { font-size: 14px; line-height: 20px; padding: 0 6px; color: #fff; background: var(--red2); border: 2px solid var(--red); }
.tr-tri::before { content: "▼"; display: inline-block; font-size: 16px; color: #fff; }
.tr[open] .tr-tri::before { transform: rotate(180deg); }
.tr[open] .tr-btn { box-shadow: inset 4px 4px 0 #44238f, inset -4px -4px 0 #a98bff, 0 0 0 3px var(--gold), 0 0 0 5px var(--bg-deep), 2px 4px 0 rgba(0,0,0,.4); }
.tr[open] .tr-cur { animation: none; transform: rotate(90deg); }
.tr-body { margin: 12px 0 0; padding: 12px 10px;
           background: var(--dither) 0 0 / 4px 4px, linear-gradient(180deg, var(--win), var(--win2));
           border: 4px solid; border-color: #fff #9fb0ee #9fb0ee #fff; box-shadow: inset 0 0 0 2px var(--bg-deep), 0 0 0 2px var(--bg-deep), var(--drop); }
.fx .tr[open] .tr-body { animation: accopen .24s steps(4) both; }
.tr-tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.tr-tabs[hidden], .tr-venue[hidden] { display: none; }
.tr-tab { flex: 1 1 0; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px;
          font-family: var(--f-dot); font-size: 16px; color: #dfe6ff; cursor: pointer;
          background: var(--bg-deep); border: 2px solid var(--edge2); box-shadow: inset 2px 2px 0 rgba(255,255,255,.06), 0 3px 0 rgba(0,0,0,.4); }
.tr-tab small { font-size: 14px; color: var(--muted); }
.tr-tab[aria-selected="true"] { color: var(--bg-deep); background: var(--edge); border-color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.tr-tab[aria-selected="true"] small { color: #2a3f94; }
.tr.tabbed .tr-vh { display: none; }
.tr-venue + .tr-venue { margin-top: 16px; }
.tr-vh { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-family: var(--f-dot); font-size: 16px; color: #fff; }
.tr-vh small { font-size: 14px; color: var(--muted); }
.tr-vb { color: #ff8a7a; }
.tr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 10px; align-items: start; min-height: 64px;
          padding: 8px 10px 8px 8px; color: var(--text); text-decoration: none;
          background: var(--dither) 0 0 / 4px 4px, #0b1645; border: 2px solid rgba(91,124,240,.75);
          box-shadow: inset 2px 2px 0 rgba(255,255,255,.06), 0 3px 0 rgba(0,0,0,.4); }
.tr-row.star1 { border-color: #c8d0f0; }
.tr-row.boss { border-color: var(--red); border-left-width: 6px; background: var(--dither) 0 0 / 4px 4px, linear-gradient(180deg, #3a0b2a, #1a0620); }
.tr-row.hit { box-shadow: inset 0 0 0 2px rgba(109,255,124,.5), 0 3px 0 rgba(0,0,0,.4); }
.tr-row:hover, .tr-row:focus-visible { color: var(--text); border-color: #fff; }
.tr-row:active { transform: translate(1px, 2px); }
.tr-time { display: flex; flex-direction: column; align-items: center; padding: 3px 0 2px; font-family: var(--f-dot); font-size: 16px; line-height: 1.25; color: #dfe6ff;
           background: var(--bg-deep); border: 2px solid rgba(159,227,255,.35); }
.tr-time b { font-family: var(--f-px); font-weight: 400; font-size: 16px; line-height: 1.4; color: #fff; }
.tr-row.boss .tr-time { border-color: rgba(255,122,110,.7); }
.tr-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.tr-name { font-family: var(--f-dot); font-size: 16px; line-height: 1.45; color: #fff; overflow-wrap: anywhere; }
.tr-row.boss .tr-name { text-shadow: 2px 2px 0 #b81e1e; }
.tr-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-px); font-size: 8px; line-height: 16px; padding: 1px 5px; color: #fff;
            background: var(--bg-deep); border: 2px solid var(--edge2); white-space: nowrap; }
.tr-badge .stars { font-size: 14px; }
.tr-badge.boss { background: var(--red2); border-color: var(--red); }
.tr-picks { display: flex; flex-wrap: wrap; gap: 0 14px; font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #e6ebff; }
.tr-picks .mark { min-width: 0; margin-right: 2px; }
.tr-bomb { color: var(--gold); }
.tr-bomb .mark { color: var(--gold); }
.tr-bomb .px, .tr-res .px { margin-right: 2px; }
.tr-none { color: var(--muted); }
.tr-hit { margin-left: auto; font-size: 16px; line-height: 1.45; text-shadow: 0 0 6px rgba(109,255,124,.5); }
.tr-f { display: inline-block; margin-left: 6px; padding: 0 4px; font-weight: 400; font-size: 16px; line-height: 1.3; color: #fff;
        background: var(--bg-deep); border: 1px solid rgba(220,226,255,.45); }
.tr-row.hit .tr-f { border-color: rgba(109,255,124,.6); }
.tr-jump { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0 0 10px; padding: 4px 10px;
           font-family: var(--f-dot); font-size: 16px; color: var(--bg-deep); text-decoration: none; background: var(--accent); border: 2px solid #fff;
           box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.tr-jump:hover, .tr-jump:focus-visible { color: var(--bg-deep); filter: brightness(1.08); }
.tr-jump[hidden] { display: none; }
.tr-soon { font-family: var(--f-dot); font-size: 14px; line-height: 1.5; color: var(--muted); }
.tr-soon:empty { display: none; }
.tr-row.next { border-color: var(--accent); box-shadow: inset 0 0 0 2px rgba(159,227,255,.4), 0 3px 0 rgba(0,0,0,.4); }
.tr-row.boss.next { border-color: var(--accent); border-left-color: var(--red); }
.tr-row.next .tr-soon { color: var(--accent); }
.tr-row.next::after { content: "NEXT"; position: absolute; top: -9px; right: 8px; font-family: var(--f-px); font-size: 8px; line-height: 14px; padding: 0 4px;
                      color: var(--bg-deep); background: var(--accent); border: 2px solid var(--bg-deep); }
.tr-more { margin: 12px 0 0; text-align: right; font-size: 16px; }
.tr-more a { display: inline-block; padding: 10px 0; }
@media (min-width: 700px) {
  .tr { margin-top: 16px; }
  .tr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .tr-body { padding: 16px 16px 12px; }
}
.top .hero-top { padding-top: 16px; }

/* ================= 今日の勝負馬(2026-11-21 最初の画面の主役) =================
   空の上に不透明な窓を置く。大きい窓(.td-slot)＝次に発走する★★の💣(無い日は11Rの◎)、下の札の列(.td-row)＝ほかのレース。
   同じ .td-item を置く場所で見た目を変える(top.js が発走時刻で入れ替える)。色: 赤＝★★、金＝💣、緑＝的中、それ以外は中立色 */
.hero-top > .today { position: relative; z-index: 2; }
.today { max-width: 640px; margin: 18px auto 0; text-align: left; }
.td-panel { position: relative; padding: 26px 14px 14px;
  --f-hi: #ffffff; --f-lo: #9fb0ee; --b-hi: #4f6ee0; --b-lo: #0a1648; --w1: var(--win); --w2: var(--win2);
  border: 4px solid; border-color: var(--f-hi) var(--f-lo) var(--f-lo) var(--f-hi);
  background: var(--dither) 0 0 / 4px 4px, linear-gradient(180deg, var(--w1), var(--w2));
  box-shadow: inset 0 0 0 2px var(--bg-deep), inset 4px 4px 0 var(--b-hi), inset -4px -4px 0 var(--b-lo), 0 0 0 2px var(--bg-deep), var(--drop); }
.today.is-boss .td-panel { --f-hi: #ff7a6e; --f-lo: #b81e1e; --b-hi: #8a1430; --b-lo: #12030f; --w1: #3a0b2a; --w2: #1a0620; }
.td-panel > .win-tag { color: #fff; }
.today.is-boss .td-panel > .win-tag { background: var(--red2); border-color: #ff7a6e #b81e1e #b81e1e #ff7a6e; }
/* LIVE 更新中(書き出しの時刻)。点は水色(赤・金・緑は意味のある色なので使わない) */
.td-live { position: absolute; top: -14px; right: 12px; display: flex; align-items: center; gap: 6px; margin: 0;
           font-family: var(--f-dot); font-size: 14px; line-height: 20px; color: #dfe6ff; white-space: nowrap;
           background: var(--bg-deep); border: 2px solid; border-color: #fff #9fb0ee #9fb0ee #fff;
           box-shadow: 0 0 0 2px var(--bg-deep), 3px 3px 0 2px rgba(0,0,0,.4); padding: 0 8px 0 6px; }
.td-dot { display: none; width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 0 2px #050c2a, 0 0 6px 2px rgba(159,227,255,.6); }
.td-live .lv-on { display: none; color: #fff; }
.td-live .lv-on b { font-family: var(--f-px); font-weight: 400; font-size: 8px; letter-spacing: 1px; margin-right: 6px; }
.td-live.on .td-dot, .td-live.on .lv-on { display: inline-block; }
.td-live.on .lv-off { display: none; }
.td-live.on .td-dot { animation: blink 1s steps(2) infinite; }

/* ---- 1レース分の札(共通) ---- */
.td-card { display: block; color: var(--text); text-decoration: none; }
.td-card:hover, .td-card:focus-visible { color: var(--text); }
.td-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #d7dcf5; }
.td-t b { font-family: var(--f-px); font-weight: 400; font-size: 16px; color: #fff; margin-right: 4px; }
.td-d { color: #fff; }
.td-race { display: block; font-family: var(--f-dot); color: #fff; overflow-wrap: anywhere; }
.td-stars { margin-left: 8px; white-space: nowrap; }
.td-horse { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.td-kind { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-family: var(--f-px); color: var(--gold); }
.td-kind b { font-weight: 400; }
.td-kind .mark { min-width: 0; color: #fff; font-family: var(--f-dot); }
.td-name { font-family: var(--f-dot); color: var(--gold); overflow-wrap: anywhere; min-width: 0; }
.td-item.is-hon .td-name { color: #fff; }
.td-st { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; font-family: var(--f-dot); }
.td-st:empty, .td-soon:empty, .td-fin:empty { display: none; }
.td-hit { color: var(--hit); }
.td-fin { color: #e6ebff; }
.td-soon { color: var(--muted); }
.td-clock, .td-go { display: none; }

/* ---- 大きい窓: 次のレース。レース名は★★の赤、馬名は大きく(💣は金、◎は白)。ボタンは★★なら赤(BOSS)、◎なら紫 ---- */
.td-slot .td-race { margin: 6px 0 0; font-size: 24px; line-height: 1.35; text-shadow: 2px 2px 0 var(--bg-deep); }
.today.is-boss .td-slot .td-race { text-shadow: 2px 2px 0 #b81e1e, 4px 4px 0 #12030f; }
.td-slot .td-stars { font-size: 16px; vertical-align: .2em; }
.td-slot .td-horse { margin: 12px 0 0; }
.td-slot .td-kind { padding: 2px 8px; font-size: 16px; line-height: 28px; background: rgba(5,12,42,.7); border: 2px solid var(--gold); }
.td-slot .td-kind .px { font-size: 24px; }
.td-slot .td-name { flex: 1 1 100%; font-size: 32px; line-height: 1.3;
                    text-shadow: 2px 2px 0 #c06a00, 4px 4px 0 #4a2200; }
.td-slot .is-hon .td-kind { color: #fff; border-color: #fff; }
.td-slot .is-hon .td-kind .mark { font-size: 24px; }
.td-slot .is-hon .td-name { text-shadow: 2px 2px 0 #6a3fd0, 4px 4px 0 var(--bg-deep); }
@media (max-width: 419.98px) { .td-slot .td-name.long { font-size: 24px; line-height: 1.5; } }
.td-slot .td-st { margin: 10px 0 0; font-size: 16px; }
.td-slot .st-pre .td-st { display: none; }
.td-slot .td-hit { font-size: 32px; line-height: 1.2; text-shadow: 2px 2px 0 #1f7a2c, 4px 4px 0 var(--bg-deep); }
.td-slot .td-fin { font-size: 24px; line-height: 1.3; }
.td-slot .td-fin .px { margin-right: 4px; }
.td-slot .st-wait .td-soon { font-size: 16px; color: #fff; }
.td-slot .td-go { display: block; position: relative; margin: 14px 0 0; padding: 10px 12px; text-align: center;
                  font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #fff; text-shadow: 2px 2px 0 rgba(5,12,42,.6);
                  --bt: #6a3fd0; --bt-hi: #a98bff; --bt-lo: #44238f;
                  background: var(--dither) 0 0 / 4px 4px, var(--bt); border: 3px solid var(--bg-deep);
                  box-shadow: inset -4px -4px 0 var(--bt-lo), inset 4px 4px 0 var(--bt-hi), 0 5px 0 var(--bg-deep), 4px 9px 0 rgba(0,0,0,.35);
                  transition: transform .05s steps(1); }
.today.is-boss .td-slot .td-go { --bt: #d42a27; --bt-hi: #ff8a7a; --bt-lo: #8a1430;
  box-shadow: inset -4px -4px 0 var(--bt-lo), inset 4px 4px 0 var(--bt-hi), 0 0 0 3px var(--gold), 0 0 0 5px var(--bg-deep), 4px 10px 0 rgba(0,0,0,.4); }
.td-slot .td-card:hover .td-go, .td-slot .td-card:focus-visible .td-go { transform: translateY(-2px); filter: brightness(1.1); }
.td-slot .td-card:active .td-go { transform: translateY(3px); }
.td-go > span { display: inline-block; animation: nudge .8s steps(1) infinite; }
/* カウントダウンと馬のゲージ(JSがあり、発走前のときだけ) */
.tdjs .td-slot .st-pre:not(.far) .td-clock { display: block; margin: 12px 0 0; padding: 8px 10px 6px; background: rgba(5,12,42,.82);
  border: 2px solid; border-color: #9fb0ee #3a4a9a #3a4a9a #9fb0ee; box-shadow: inset 2px 2px 0 rgba(255,255,255,.06); }
.td-cd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.td-cd-k { font-family: var(--f-dot); font-size: 16px; color: #dfe6ff; }
.td-cd-v { font-family: var(--f-px); font-weight: 400; font-size: 24px; line-height: 1.2; color: #fff; letter-spacing: 1px;
           text-shadow: 2px 2px 0 #2a3f94, 0 0 8px rgba(159,227,255,.45); font-variant-numeric: tabular-nums; }
.td-bar { --hw: 48px; position: relative; display: block; height: 40px; margin: 8px 0 0; overflow: hidden; image-rendering: pixelated;
          background: linear-gradient(#fff, #fff) 0 2px / 100% 2px no-repeat, linear-gradient(#fff, #fff) 0 calc(100% - 4px) / 100% 2px no-repeat,
                      repeating-linear-gradient(90deg, #2f9e3a 0 16px, #39b445 16px 32px);
          box-shadow: inset 0 0 0 2px var(--bg-deep); }
.td-gate { position: absolute; left: 2px; top: 6px; bottom: 6px; width: 6px; background: repeating-linear-gradient(180deg, #c8ccd8 0 4px, #5b7cf0 4px 8px); }
.td-goal { position: absolute; right: 10px; top: 0; bottom: 0; width: 6px; background: repeating-linear-gradient(180deg, #fff 0 4px, #140c24 4px 8px); }
.td-goal::after { content: ""; position: absolute; left: 6px; top: 2px; width: 10px; height: 8px; background: #fff; box-shadow: inset -2px -2px 0 #c8ccd8; }
.td-runner { position: absolute; left: var(--x, 8px); bottom: 5px; width: var(--hw); height: 32px; overflow: hidden; z-index: 1; }
.td-runner svg { display: block; width: calc(var(--hw) * 4); height: 32px; }
.td-run { display: none !important; }
.td-idle { animation: idle4b 2s steps(4) infinite; }
.td-bar.go .td-idle { display: none; }
.td-bar.go .td-run { display: block !important; animation: idle4b .44s steps(4) infinite; }
@keyframes idle4b { to { transform: translateX(calc(var(--hw) * -4)); } }
.td-scale { display: flex; justify-content: space-between; margin: 2px 0 0; font-family: var(--f-dot); font-size: 14px; line-height: 1.4; color: var(--muted); }

/* ---- 今日の的中(当たったレースの数だけ。LEDの掲示板) ---- */
.td-score { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin: 16px 0 0; padding: 10px 14px;
            font-family: var(--f-dot); font-size: 16px; color: #c8ffd0;
            background: #04060d; border: 4px solid; border-color: #2a3150 #4a5378 #4a5378 #2a3150;
            box-shadow: inset 0 0 0 2px #000, inset 0 0 18px rgba(109,255,124,.12), 0 0 0 2px var(--bg-deep), 4px 4px 0 2px rgba(0,0,0,.4); }
.td-score::before { content: ""; position: absolute; inset: 0; pointer-events: none;
                    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.06) 0 1px, transparent 1.5px) 0 0 / 4px 4px; }
.ts-n { position: relative; font-family: var(--f-px); font-weight: 400; font-size: 32px; line-height: 1.2; color: var(--hit);
        text-shadow: 3px 3px 0 #0f4a22, 0 0 10px rgba(109,255,124,.55); }
.ts-n::before, .ts-n::after { content: ""; position: absolute; left: -10px; top: 2px; width: 4px; height: 4px; pointer-events: none; animation: burst 1.8s step-end infinite; }
.ts-n::after { left: auto; top: auto; right: -12px; bottom: 2px; animation-delay: .9s; }

/* ---- ほかのレース(小さい札の列。スマホは横にスワイプ) ---- */
.td-rest { margin: 16px 0 0; }
.td-rest-h { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-family: var(--f-dot); font-size: 16px; color: #fff;
             width: fit-content; padding: 0 10px; background: var(--bg-deep); border: 2px solid var(--edge2); }
.td-rest-h small { font-size: 14px; color: var(--muted); }
.td-row { display: flex; gap: 10px; margin: 0 -12px; padding: 6px 12px 12px; overflow-x: auto;
          -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #5b7cf0 transparent; }
.td-row .td-item { flex: 0 0 188px; }
.td-row .td-card { height: 100%; padding: 6px 10px 8px; line-height: 1.45;
                   background: var(--dither) 0 0 / 4px 4px, rgba(5,12,42,.94); border: 2px solid var(--edge2);
                   box-shadow: inset 2px 2px 0 rgba(255,255,255,.08), inset -2px -2px 0 rgba(0,0,0,.4), 0 4px 0 rgba(0,0,0,.4);
                   transition: transform .06s steps(1); }
.today.is-boss .td-row .td-card { border-color: rgba(232,50,47,.8); }
.td-row .is-hit .td-card { border-color: var(--green); box-shadow: inset 0 0 10px rgba(109,255,124,.18), 0 4px 0 rgba(0,0,0,.4); }
.td-row .td-card:hover, .td-row .td-card:focus-visible { border-color: #fff; transform: translate(-2px, -2px); }
.td-row .td-meta { gap: 0 8px; }
.td-row .td-t { order: -1; }
.td-row .td-t b { font-family: var(--f-dot); font-size: 16px; margin: 0; }
.td-row .td-tw, .td-row .td-race { display: none; }
.td-row .td-horse { font-size: 16px; line-height: 1.45; }
.td-row .td-kind { font-family: var(--f-dot); font-size: 16px; }
.td-row .td-name { font-size: 16px; }
.td-row .td-st { font-size: 14px; line-height: 1.5; }
.td-row .td-hit { font-size: 16px; }
.td-row .td-fin .px { margin-right: 2px; }
.td-row .st-done:not(.is-hit) .td-fin { color: var(--muted); }

/* 紹介文は START の下で控えめに(今日の勝負馬があるとき) */
.hero-tagline.quiet { margin: 6px auto 0; padding: 0 8px; background: none; border: 0; box-shadow: none; font-size: 16px; color: #c3cbe8;
                      text-shadow: 1px 1px 0 #050c2a; }

/* ---- 広い画面: 左に大きい窓、右に「的中」とほかのレース(縦の一覧) ---- */
@media (min-width: 700px) {
  .today { max-width: 720px; }
  .td-panel { padding: 30px 22px 20px; }
  .td-slot .td-race { font-size: 32px; line-height: 1.3; }
  .td-slot .td-stars { font-size: 24px; vertical-align: .1em; }
  .td-slot .td-name { font-size: 48px; line-height: 1.25; text-shadow: 3px 3px 0 #c06a00, 6px 6px 0 #4a2200; }
  .td-slot .is-hon .td-name { text-shadow: 3px 3px 0 #6a3fd0, 6px 6px 0 var(--bg-deep); }
  .td-slot .td-go { font-size: 24px; padding: 12px 16px; }
  .td-cd-v { font-size: 32px; }
  .td-bar { --hw: 72px; height: 56px; }
  .td-runner { height: 48px; }
  .td-runner svg { height: 48px; }
  .ts-n { font-size: 48px; }
}
@media (min-width: 900px) {
  .today { max-width: 960px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "panel score" "panel rest";
           grid-template-rows: auto 1fr; gap: 16px 20px; align-items: start; }
  .today:not(.has-score) { grid-template-areas: "panel rest" "panel rest"; }
  .td-panel { grid-area: panel; }
  .td-score { grid-area: score; margin: 0; flex-direction: column; gap: 0; padding: 12px 10px; }
  .td-rest { grid-area: rest; margin: 0; min-height: 0; }
  .td-row { flex-direction: column; gap: 8px; margin: 0; padding: 2px 6px 4px 2px; max-height: 330px; overflow-x: hidden; overflow-y: auto; scroll-snap-type: none; }
  .td-row .td-item { flex: 0 0 auto; }
  .td-row .td-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta st" "horse horse"; gap: 0 8px; }
  .td-row .td-meta { grid-area: meta; }
  .td-row .td-st { grid-area: st; justify-content: flex-end; }
  .td-row .td-horse { grid-area: horse; }
}

/* 入場: 窓がコマ送りで降りてきて、名前がどんと出る。下の札は少しずつずれて出る(どれも1回だけ。reduced-motion では動かない) */
.fx .td-panel { animation: tdin .42s steps(6) .1s both; }
.fx .td-slot .td-name { animation: slam .4s steps(4) .45s both; }
.fx .td-score { animation: winopen .3s .55s both; }
.fx .td-row .td-item { animation: tdpop .3s steps(3) both; animation-delay: calc(.6s + var(--n, 0) * 60ms); }
.fx .td-slot.swap .td-item { animation: tdin .36s steps(5) both; }
@keyframes tdin { 0% { transform: translateY(-24px); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(4px); } 100% { transform: none; } }
@keyframes tdpop { from { transform: translateY(12px); opacity: 0; } }
