/* 競馬予想GAME Flex 共通スタイル — レトロなドット絵ゲーム風(外部CDNなし)
   書体: 見出し・ラベル・ボタン・短いUIの文字だけドット書体(英数字 Press Start 2P／日本語 DotGothic16)。
         小さい文字・詰まった文字(発走時刻とコース、結果の行、説明文、表、長い一覧、記事)は通常のゴシック。
         小さい文字も 0.875rem(14px)以上。
   色の意味(厳密に): 赤・BOSS枠＝★★だけ／金・黄＝💣(穴馬)だけ／緑＝的中／くすんだ色＝不的中／
         それ以外(印・情報チップ・見出しなど)は中立色(白・水色・紺)。
   絵:   assets/px/*.svg (site_pixels.py で生成した自作ドット絵) */

@font-face {
  font-family: "PressStart2P"; src: url(fonts/pressstart2p.woff2) format("woff2");
  font-display: swap; unicode-range: U+0020-007E;
}
/* 2026-10-22 round5: 書体の大きさはドットの方眼にそろえる。
   Press Start 2P は 8px の倍数(8/16/24/32px)、DotGothic16 は 16px・32px(大見出しのスマホだけ24px)。
   本文・説明・表は通常のゴシック(15px、スマホでも14px以上) */
@font-face {
  font-family: "DotGothic16"; src: url(fonts/dotgothic16-sub.woff2) format("woff2");
  font-display: swap;
}

:root {
  --bg: #0b1a4a; --bg-deep: #050c2a; --win: #14286f; --win2: #0e1d57;
  --edge: #eef1ff; --edge2: #5b7cf0; --text: #f2f4ff; --muted: #bac4ee;
  --gold: #ffd23f; --gold2: #e08a00; --red: #d42a27; --red2: #a81616;
  --green: #3ccf4e; --turf: #2f9e3a; --dirt: #a0642c;
  --accent: #9fe3ff; --hit: #6dff7c; --miss: #9aa3c7; --fs-s: .875rem;
  --f-px: "PressStart2P", "DotGothic16", ui-monospace, monospace;
  --f-dot: "DotGothic16", "PressStart2P", ui-monospace, monospace;
  --f-body: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  /* ウィンドウの質感: 枠は左上が明るく右下が暗い2色、内側にもう1段の面取り、中は薄い市松(ディザ) */
  --dither: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='1' height='1' fill='%23fff' fill-opacity='.045'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23fff' fill-opacity='.045'/%3E%3Crect x='2' width='1' height='1' fill='%23000' fill-opacity='.06'/%3E%3Crect y='2' width='1' height='1' fill='%23000' fill-opacity='.06'/%3E%3C/svg%3E");
  --glow: inset 0 0 0 2px rgba(159,227,255,.55), inset 0 0 14px 2px rgba(159,227,255,.22);
  --drop: 6px 6px 0 2px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* 2026-11-21 読みやすさの見直し: 本文は16px・行間1.8(スマホも)。方眼は文字の後ろでうるさくならないよう少し薄く */
body {
  margin: 0; color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 1.8;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 16px 16px;
}
a { color: #8fd3ff; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 12px; }
main.wrap { padding-top: 18px; padding-bottom: 40px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ドット絵アイコン ---------- */
.px { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; background: center / contain no-repeat;
      image-rendering: pixelated; image-rendering: crisp-edges; }
.i-star { background-image: url(px/star.svg); width: .92em; }
.i-coin { background-image: url(px/coin.svg); }
.i-crown { background-image: url(px/crown.svg); width: 1.2em; }
.i-shoe { background-image: url(px/shoe.svg); }
.i-bomb { background-image: url(px/bomb.svg); width: 1.1em; }
.i-heart { background-image: url(px/heart.svg); }
.i-sparkle { background-image: url(px/sparkle.svg); }
.i-arrow { background-image: url(px/arrow.svg); width: .7em; }
.i-horse { background-image: url(px/horse.svg); width: 1.5em; }
.stars { display: inline-flex; gap: 1px; vertical-align: -.1em; white-space: nowrap; }
/* 2026-11-23 穴馬💣が◎/○のレースの札(紫) */
.bombs { display: inline-flex; gap: 1px; vertical-align: -.1em; white-space: nowrap; background: #7a3cd6; border: 2px solid #4a1d8f; border-radius: 3px; padding: 1px 3px; box-shadow: 0 0 0 1px #c9a6ff inset; }
.bombs .i-bomb { filter: drop-shadow(0 0 1px #fff); }

/* ---------- ヘッダー(タイトル帯＋メニュー) ---------- */
.site-header { background: var(--bg-deep); border-bottom: 4px solid var(--edge); box-shadow: 0 4px 0 var(--edge2); }
.header-inner { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; color: var(--text); }
.logo:hover { color: var(--text); }
.logo .i-horse { font-size: 26px; }
.logo-band { font-family: var(--f-dot); font-size: .82rem; background: var(--red); color: #fff; padding: 1px 6px;
             box-shadow: inset -2px -2px 0 var(--red2), inset 2px 2px 0 #ff8a7a; }
.logo-word { font-family: var(--f-px); font-size: 16px; color: var(--gold); letter-spacing: 1px;
             text-shadow: 2px 2px 0 var(--gold2), 3px 3px 0 #6a3a00; }
.nav { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; scrollbar-width: none;
       font-family: var(--f-dot); }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; color: var(--text); text-decoration: none; font-size: 16px; padding: 4px 8px 4px 18px; white-space: nowrap; }
.nav a::before { content: ""; position: absolute; left: 4px; top: 50%; width: 9px; height: 11px; margin-top: -6px;
                 background: url(px/arrow.svg) center / contain no-repeat; image-rendering: pixelated; opacity: 0; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.nav a:hover::before, .nav a[aria-current="page"]::before { opacity: 1; }
@media (min-width: 760px) { .nav { justify-content: flex-end; } }

/* スマホのメニュー(▶MENU)。700px未満だけ。<details> なのでJSなしでも開閉できる */
.menu { display: none; margin-left: auto; }
.menu-btn { list-style: none; cursor: pointer; font-family: var(--f-px); font-size: 16px; letter-spacing: 1px; color: #fff;
            background: var(--win); border: 3px solid var(--edge); box-shadow: inset 0 0 0 2px var(--edge2); padding: 9px 12px 8px;
            min-height: 44px; display: flex; align-items: center; gap: 6px; user-select: none; }
.menu-btn::-webkit-details-marker { display: none; }
.menu-btn::marker { content: ""; }
.menu-cur { display: inline-block; font-family: var(--f-dot); }
.menu[open] .menu-cur { transform: rotate(90deg); }
.menu[open] .menu-btn { background: var(--edge); color: var(--bg-deep); }
.menu-win { position: absolute; left: 8px; right: 8px; top: calc(100% + 8px); z-index: 50; display: grid; gap: 2px;
            font-family: var(--f-dot); padding: 12px; }
.menu-win a { position: relative; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 16px; padding: 10px 8px 10px 26px;
              border-top: 2px dashed rgba(170,182,230,.28); }
.menu-win a:first-child { border-top: 0; }
.menu-win a::before { content: ""; position: absolute; left: 8px; top: 50%; width: 9px; height: 11px; margin-top: -6px;
                      background: url(px/arrow.svg) center / contain no-repeat; image-rendering: pixelated; opacity: 0; }
.menu-win a:hover, .menu-win a:focus-visible, .menu-win a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.06); }
.menu-win a:hover::before, .menu-win a:focus-visible::before, .menu-win a[aria-current="page"]::before { opacity: 1; }
/* ヘッダーは画面の上に固定(スクロールしてもMENUに手が届く)。ページ内リンクの飛び先がヘッダーに隠れないよう余白をとる */
.site-header { position: sticky; top: 0; z-index: 60; }
html { scroll-padding-top: 84px; }
.menu-win { max-height: calc(100vh - 90px); overflow-y: auto; }
@media (max-width: 699.98px) {
  .site-header { position: sticky; }
  .header-inner { flex-wrap: nowrap; }
  .nav { display: none; }
  .menu { display: block; }
}

/* ---------- フッター ---------- */
.site-footer { background: var(--bg-deep); color: var(--muted); font-size: var(--fs-s); padding: 18px 0 26px; border-top: 4px solid var(--edge); box-shadow: 0 -4px 0 var(--edge2); margin-top: 10px; }
.site-footer b { color: var(--text); }
.site-footer a { color: #8fd3ff; }
.footer-links a { margin-right: 14px; font-family: var(--f-dot); }
.small { font-size: var(--fs-s); color: var(--muted); }

/* ---------- 見出し・画面タイトル ---------- */
h1, h2, h3 { font-family: var(--f-dot); font-weight: 400; line-height: 1.5; word-break: auto-phrase; }  /* 見出しは語の途中で折り返さない(対応ブラウザだけ。2026-11-21) */
h1 { font-size: 24px; margin: 8px 0 16px; text-shadow: 2px 2px 0 var(--bg-deep), 4px 4px 0 rgba(0,0,0,.35); }
h2 { font-size: 16px; margin: 0 0 12px; color: #fff; padding-left: 18px; text-shadow: 2px 2px 0 var(--bg-deep);
     background: url(px/arrow.svg) 0 50% / 9px 11px no-repeat; image-rendering: auto; }
h3 { font-size: 16px; margin: 16px 0 8px; color: #cfe0ff; }
@media (min-width: 700px) {
  h1 { font-size: 32px; line-height: 1.375; }
  h2 { font-size: 24px; line-height: 1.34; padding-left: 22px; background-size: 12px 14px; }
}
.screen-tag { display: flex; align-items: center; gap: 8px; font-family: var(--f-px); font-size: 8px; line-height: 16px; color: var(--accent);
              letter-spacing: 2px; margin: 0; text-shadow: 2px 2px 0 var(--bg-deep); }
.screen-tag .px { font-size: 16px; }
@media (min-width: 700px) { .screen-tag { font-size: 16px; line-height: 24px; } .screen-tag .px { font-size: 24px; } }

/* ---------- RPGウィンドウ ---------- */
/* 共通の窓枠(.card ほか): 外側の黒い線 → 2色の枠(左上が明るい) → 黒い線 → 内側の面取り(左上が明るい／右下が暗い)
   → 中は薄いディザ。右下にドットの影。色を変えるときは --f-hi/--f-lo(枠) と --b-hi/--b-lo(面取り)、--w1/--w2(地) を変える */
.card, .ccard-in, .menu-win, .boss-strip, .battle {
  --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);
}
.card { --pt: 16px; --px: 16px;
  position: relative; color: var(--text); padding: var(--pt) var(--px) 16px; margin: 0 0 24px; overflow-wrap: anywhere; }
/* 枠の色: 赤＝★★(BOSS)だけ、緑＝的中。注意書きは中立色 */
.card.boss-card, .boss-strip, .battle.is-boss { --f-hi: #ff7a6e; --f-lo: #b81e1e; --b-hi: #8a1430; --b-lo: #12030f; --w1: #3a0b2a; --w2: #1a0620; }
.card.hit-card { --f-hi: #8dff98; --f-lo: #2f9e3a; --b-hi: #1f7a2c; --b-lo: #06210d; }
.card.caution { --w1: #1d2a5e; --w2: #121b45; }
.win-tag { position: absolute; top: -14px; left: 12px; display: flex; align-items: center; gap: 6px;
           font-family: var(--f-px); font-size: 8px; line-height: 16px; letter-spacing: 1px;
           background: var(--bg-deep); color: var(--accent); 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: 2px 8px 2px 6px; }
.win-tag .px { font-size: 16px; }
.card.has-tag { --pt: 24px; }
.muted, .note { color: var(--muted); font-size: var(--fs-s); }
.note { margin: 0 0 8px; }
p.muted, li.muted { font-size: 15px; }  /* 説明の段落は15px(短いラベルや日別の凡例 .note は14px のまま) */
.lead { font-size: 1rem; }

/* ---------- チップ・印・ボタン ---------- */
.chip { display: inline-block; padding: 1px 7px; background: var(--bg-deep); border: 2px solid var(--edge2); color: #dfe6ff;
        font-family: var(--f-dot); font-size: var(--fs-s); line-height: 1.6; margin: 2px 4px 2px 0; text-decoration: none; white-space: nowrap; }
a.chip { box-shadow: 2px 2px 0 rgba(0,0,0,.45); transition: transform .06s steps(1), box-shadow .06s steps(1); }
a.chip:hover, a.chip:focus-visible { border-color: #fff; color: #fff; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(0,0,0,.5), var(--glow); }
a.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.chip.on { background: var(--edge); color: var(--bg-deep); border-color: var(--edge); }
.chip.info { font-family: var(--f-body); }
.chip.bomb { border-color: var(--gold); color: var(--gold); }   /* 💣(穴馬)だけ */
.chip.boss { border-color: var(--red); background: var(--red2); color: #fff; }  /* ★★だけ */
.mark { color: #fff; font-family: var(--f-dot); display: inline-block; min-width: 1.3em; text-align: center; }
.hit { color: var(--hit); font-family: var(--f-dot); }
.miss { color: var(--miss); font-family: var(--f-dot); }
.t-turf { color: #5fd06a; } .t-dirt { color: #e0a46c; }

/* 色の凡例 */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: var(--fs-s); color: var(--muted); margin: 0 0 14px; }
.legend .lg { display: inline-flex; align-items: center; font-family: var(--f-px); font-size: 8px; padding: 3px 5px; border: 2px solid; }
.legend .lg + .stars { margin-left: -2px; }
.legend .lg-boss { color: #fff; background: var(--red2); border-color: var(--red); }
.legend .lg-bomb { color: var(--gold); border-color: var(--gold); background: var(--bg-deep); font-size: .875rem; padding: 0 4px; margin-left: 8px; }
.legend .lg-i { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; margin-right: 10px; }
.legend .lg-bomb { margin-left: 0; }
/* ボタン(紫だけ。赤は★★、金は💣専用なのでボタンには使わない)。乗せると明るく1段浮き、押すと沈む */
.btn { --bt: #6a3fd0; --bt-hi: #a98bff; --bt-lo: #44238f;
       display: inline-block; position: relative; font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #fff; text-decoration: none;
       background: var(--dither) 0 0 / 4px 4px, var(--bt); padding: 8px 20px; 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), box-shadow .05s steps(1); text-shadow: 2px 2px 0 rgba(5,12,42,.6); min-height: 44px; }
.btn:hover, .btn:focus-visible { color: #fff; --bt: #7a4fe0; transform: translateY(-2px);
       box-shadow: inset -4px -4px 0 var(--bt-lo), inset 4px 4px 0 var(--bt-hi), inset 0 0 0 6px rgba(255,255,255,.08), 0 7px 0 var(--bg-deep), 4px 11px 0 rgba(0,0,0,.35); }
.btn:active { transform: translateY(4px); box-shadow: inset 4px 4px 0 var(--bt-lo), inset -4px -4px 0 var(--bt-hi), 0 1px 0 var(--bg-deep); }
.btn.sub { --bt: #3d2496; --bt-hi: #8a6cf0; --bt-lo: #26136a; }
.btn.sub:hover, .btn.sub:focus-visible { --bt: #4a2eaa; }

/* 虹色の「当たり!」 */
.rainbow { font-family: var(--f-dot); font-weight: 400; color: #fff;
           background: linear-gradient(90deg, #ff4d4d, #ffa23f, #ffe14d, #5dff6e, #4dc3ff, #b06dff, #ff4d4d);
           background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
           filter: drop-shadow(2px 2px 0 var(--bg-deep)); animation: rainbow 1.6s steps(8) infinite; }
.badge-hit { display: inline-block; font-size: 16px; padding: 0 6px; border: 2px solid var(--green); background: var(--bg-deep); vertical-align: .1em; }
@keyframes rainbow { to { background-position: 200% 0; } }

/* ---------- リスト・表 ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 2px dashed rgba(170,182,230,.28); padding: 9px 0; }
.list > li:first-child { border-top: 0; }
.row-link { display: block; color: inherit; text-decoration: none; }
.row-link:hover { color: #fff; text-decoration: underline; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-family: var(--f-body); font-size: .9rem; min-width: 320px; }
table.data th, table.data td { padding: 6px 8px; border-bottom: 2px dashed rgba(170,182,230,.25); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--accent); font-weight: 700; font-size: var(--fs-s); border-bottom: 2px solid var(--edge2); }
table.data tbody tr:nth-child(even) td { background: rgba(255,255,255,.035); }
table.data b { font-weight: 700; color: #fff; }

/* ---------- ゲージ(実際の数字をそのまま) ---------- */
.gauges { display: grid; gap: 4px 0; }
.gauge { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l v" "b b"; gap: 2px 10px; align-items: center; padding: 3px 0; }
.gauge-l { grid-area: l; font-family: var(--f-dot); font-size: .88rem; }
.gauge-v { grid-area: v; font-family: var(--f-px); font-size: 16px; color: #fff; text-align: right; white-space: nowrap; }
.gauge-v small { font-family: var(--f-body); font-size: var(--fs-s); color: var(--muted); margin-left: 4px; }
.gauge-bar { grid-area: b; position: relative; height: 16px; background: var(--bg-deep); border: 2px solid var(--edge); box-shadow: 0 0 0 2px var(--bg-deep); }
.gauge-bar > span { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w, 0) * 1%);
                    background: linear-gradient(90deg, #3ccf4e, #a6e22e 55%, #ffd23f); }
.gauge-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(5,12,42,.6) 6px 8px); }
.gauge-bar > i { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #fff; z-index: 1; }
.gauge-note { font-size: var(--fs-s); color: var(--muted); margin: 6px 0 0; }
@media (min-width: 640px) {
  .gauge { grid-template-columns: 11em 1fr 6.5em; grid-template-areas: "l b v"; }
}

/* ---------- 要約の数字 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--bg-deep); border: 2px solid var(--edge2); padding: 10px; text-align: center; }
.stat .num { font-family: var(--f-px); font-size: 24px; color: #fff; }
.stat .lbl { font-family: var(--f-dot); font-size: var(--fs-s); color: var(--muted); }

/* ---------- 記事本文(読みやすいゴシック) ---------- */
.article { line-height: 1.95; overflow-wrap: anywhere; font-family: var(--f-body); }
.article h1 { font-size: 1.3rem; }
.article h2 { margin-top: 1.6em; }
.article h3 { margin-top: 1.3em; }
.article img { max-width: 100%; height: auto; image-rendering: auto; border: 3px solid var(--edge2); }
.article table { border-collapse: collapse; width: 100%; font-size: .88rem; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid rgba(170,182,230,.4); padding: 6px 8px; }
.article pre { background: var(--bg-deep); border: 2px solid var(--edge2); padding: 10px 12px; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.article code { font-family: Consolas, "Courier New", monospace; }
.article blockquote { margin: 1em 0; padding: 4px 14px; border-left: 4px solid var(--edge2); color: #cfd8f7; }
.article ul, .article ol { padding-left: 1.4em; }
.article strong { color: #fff3b0; }

/* ---------- 冒険の書(記事・コラム一覧) ---------- */
.log { counter-reset: log; }
.log > li { counter-increment: log; display: grid; grid-template-columns: auto 1fr; gap: 0 10px; }
.log > li::before { content: counter(log, decimal-leading-zero); font-family: var(--f-px); font-size: 8px; color: var(--bg-deep);
                    background: var(--accent); padding: 3px 5px; height: fit-content; margin-top: 3px; }
.log .row-link b { font-family: var(--f-dot); font-weight: 400; font-size: 1.02rem; }

/* ---------- セーブデータ一覧(アーカイブ) ---------- */
.saves { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.save { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; text-decoration: none; color: var(--text);
        background: var(--bg-deep); border: 2px solid var(--edge2); padding: 8px 10px; }
.save:hover, .save:focus-visible { border-color: #fff; color: #fff; }
.save .i-horse { font-size: 28px; grid-row: span 2; }
.save-no { font-family: var(--f-px); font-size: 8px; color: var(--accent); }
.save-day { font-family: var(--f-dot); font-size: 1rem; }

/* ---------- ステージ選択(日別) ---------- */
.world-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.world-head h2 { margin: 0; }
.world-no { font-family: var(--f-px); font-size: 8px; color: var(--bg-deep); background: var(--accent); padding: 3px 6px; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 700px) { .stages { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.stage .chip, .cmd .chip { white-space: normal; }
.stage { display: block; position: relative; height: 100%; color: var(--text); text-decoration: none; background: var(--bg-deep);
         border: 2px solid var(--edge2); border-left: 8px solid var(--turf); padding: 8px 10px 8px 10px;
         box-shadow: 0 4px 0 rgba(0,0,0,.4); transition: transform .05s steps(1); }
.stage.dirt { border-left-color: var(--dirt); }
.stage:hover, .stage:focus-visible { border-color: #fff; color: var(--text); }
.stage:active { transform: translateY(3px); }
.stage.star1 { border-top-color: var(--edge); border-right-color: var(--edge); border-bottom-color: var(--edge); background: #0b1645; }
.stage.boss { border: 3px solid var(--red); border-left: 8px solid var(--red); background: linear-gradient(180deg, #3a0b2a, #1a0620);
              box-shadow: 0 0 0 2px var(--red2), 0 4px 0 rgba(0,0,0,.4); }
/* 2026-11-21: BOSS の札は点滅させない(★★が並ぶ日に画面がちらつくため。赤い枠の明滅は残す) */
.boss-tag { position: absolute; top: -12px; right: 8px; font-family: var(--f-px); font-size: 8px; color: #fff; background: var(--red);
            border: 2px solid #fff; padding: 2px 6px; }
.boss-tag.static { position: static; vertical-align: .15em; }
.stage-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stage-no { font-family: var(--f-px); font-size: 16px; color: #fff; }
.stage-name { font-family: var(--f-dot); font-size: 1rem; }
.stage-sub { display: block; font-family: var(--f-body); font-size: 15px; color: var(--muted); }
.stage-marks { display: block; }
.stage-res { display: block; font-family: var(--f-body); font-size: var(--fs-s); color: var(--muted); margin-top: 2px; }
.stage-res .hit, .stage-res .miss { font-weight: 700; }
.stage-go { position: absolute; right: 8px; bottom: 6px; font-family: var(--f-dot); color: var(--muted); font-size: .8rem; }
.stage:hover .stage-go, .stage:focus-visible .stage-go { color: #fff; }

/* 日別: ★★は大きいBOSSカード、★は中くらいのカード、★なしは1行(開くと印) */
.day-pick .chip { font-family: var(--f-dot); }
.day-stages, .stages.day-stages { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.day-stages > li.is-boss { margin: 10px 0 6px; }
.day-stages > li.is-boss + li.is-boss { margin-top: 14px; }
.stage.boss { padding: 14px 14px 12px 14px; }
.stage.boss .stage-no { font-size: 1.2rem; }
.stage.boss .stage-name { font-size: 1.3rem; }
.stage.boss .stage-sub { color: #d7c6e6; }
.stage.boss .stage-res { color: #d7c6e6; }
.boss-bomb { display: block; margin: 8px 0 6px; padding: 6px 10px; font-family: var(--f-dot); font-size: 1.2rem; color: var(--gold);
             background: rgba(5,12,42,.65); border: 2px solid var(--gold); width: fit-content; max-width: 100%; }
.boss-bomb .px { font-size: 1.15em; margin-right: 6px; }
.boss-bomb-no { font-family: var(--f-px); font-size: 16px; }
.boss-bomb small { white-space: nowrap; font-family: var(--f-body); font-size: var(--fs-s); color: #ffe795; }
.stage.star1 { padding: 10px 12px; }
.stage.star1 .stage-name { font-size: 1.08rem; }

.srow { background: var(--bg-deep); border: 2px solid rgba(91,124,240,.6); border-left: 6px solid var(--turf); }
.srow.dirt { border-left-color: var(--dirt); }
.srow > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto;
                  grid-template-areas: "no name res" "no hon res"; gap: 0 8px; align-items: center; padding: 6px 10px 6px 8px; min-height: 44px; }
.srow > summary::-webkit-details-marker { display: none; }
.srow > summary::marker { content: ""; }
.srow > summary:hover { background: rgba(255,255,255,.05); }
.srow-no { grid-area: no; font-family: var(--f-px); font-size: 16px; color: #dfe6ff; }
.srow-no::before { content: "▶"; display: inline-block; font-family: var(--f-dot); font-size: .75rem; color: var(--muted); margin-right: 2px; }
.srow[open] .srow-no::before { transform: rotate(90deg); }
.srow-name { grid-area: name; font-family: var(--f-dot); font-size: .95rem; overflow-wrap: anywhere; }
.srow-name .chip { margin: 0 0 0 4px; padding: 0 5px; }
.srow-hon { grid-area: hon; font-family: var(--f-body); font-size: 15px; color: #e6ebff; overflow-wrap: anywhere; }
.srow-res { grid-area: res; font-size: var(--fs-s); }
.srow-body { padding: 0 10px 10px 12px; border-top: 2px dashed rgba(170,182,230,.28); padding-top: 6px; }
.srow-link { display: inline-block; margin-top: 6px; font-family: var(--f-dot); font-size: .95rem; padding: 4px 0; }
@media (min-width: 700px) {
  .srow > summary { grid-template-columns: 3em minmax(0, 15em) minmax(0, 1fr) auto; grid-template-areas: "no name hon res"; }
}

/* 日別の上の「この日の勝負レース」帯 */
.boss-strip { padding: 12px 16px; margin: 0 0 24px; }
.boss-strip-h { background: none; padding: 0; margin: 0 0 8px; font-size: 1rem; color: #fff; }
.boss-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px; }
.boss-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "race res" "horse res"; gap: 0 8px; align-items: center;
               padding: 6px 8px; background: rgba(5,12,42,.7); border: 2px solid rgba(232,50,47,.6); color: var(--text); text-decoration: none; }
.boss-list a:hover, .boss-list a:focus-visible { border-color: #fff; }
.bl-race { grid-area: race; font-family: var(--f-dot); font-size: .95rem; }
.bl-race small { font-family: var(--f-body); font-size: var(--fs-s); color: #d7c6e6; margin-left: 4px; }
.bl-horse { grid-area: horse; font-family: var(--f-dot); color: var(--gold); overflow-wrap: anywhere; }
.bl-horse .px { margin-right: 4px; }
.bl-res { grid-area: res; font-size: var(--fs-s); }
@media (max-width: 699.98px) {
  .boss-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding: 6px 8px; min-height: 44px; }
  .bl-res { margin-left: auto; }
}
@keyframes blink { 50% { opacity: .35; } }

/* 1レース1枚の押せる札(_macros.race_card。日別のページ・トップの注目レース。2026-11-21 スマホの見直し)。
   左に R と発走時刻の札、右にレース名(★★は赤い影で大きく)・コース・◎と💣(金)・ほかの印(控えめ)・結果。左の帯は芝=緑/ダート=茶 */
.rc { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 12px; align-items: start;
      align-content: start; height: 100%; min-height: 64px; padding: 10px 12px 10px 8px; color: var(--text); text-decoration: none;
      background: var(--dither) 0 0 / 4px 4px, var(--bg-deep); border: 2px solid rgba(91,124,240,.7); border-left: 6px solid var(--turf);
      box-shadow: inset 2px 2px 0 rgba(255,255,255,.06), inset -2px -2px 0 rgba(0,0,0,.4), 0 4px 0 rgba(0,0,0,.4);
      transition: transform .06s steps(1), box-shadow .06s steps(1); }
.rc.dirt { border-left-color: var(--dirt); }
.rc.star1 { border-color: #dfe6ff; border-left-color: var(--turf); background: var(--dither) 0 0 / 4px 4px, #0b1645; }
.rc.star1.dirt { border-left-color: var(--dirt); }
.rc.boss { border: 3px solid var(--red); border-left-width: 8px; background: var(--dither) 0 0 / 4px 4px, linear-gradient(180deg, #3a0b2a, #1a0620);
           box-shadow: inset 2px 2px 0 rgba(255,138,122,.25), inset -2px -2px 0 rgba(0,0,0,.45), 0 0 0 2px var(--red2), 0 4px 0 rgba(0,0,0,.4); }
.rc:hover, .rc:focus-visible { color: var(--text); border-color: #fff; transform: translate(-2px, -2px);
                               box-shadow: inset 2px 2px 0 rgba(255,255,255,.12), inset -2px -2px 0 rgba(0,0,0,.4), var(--glow), 4px 6px 0 rgba(0,0,0,.5); }
.rc:active { transform: translate(2px, 2px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.4); }
.rc-no { display: flex; flex-direction: column; align-items: center; padding: 4px 0 3px; font-family: var(--f-dot); font-size: 16px; line-height: 1.25; color: #dfe6ff;
         background: #050c2a; border: 2px solid rgba(159,227,255,.35); }
.rc-no b { font-family: var(--f-px); font-weight: 400; font-size: 16px; line-height: 1.5; color: #fff; }
.rc.boss .rc-no { border-color: rgba(255,122,110,.75); }
/* R の札はレース名とコースの横だけ。💣・印・結果は札の幅いっぱい */
.rc-no { grid-column: 1; grid-row: 1 / span 2; }
.rc-head, .rc-sub { grid-column: 2; min-width: 0; }
.rc-head { grid-row: 1; }
.rc-sub { grid-row: 2; }
.rc > .boss-bomb, .rc-marks, .rc-oth, .rc > .stage-res { grid-column: 1 / -1; min-width: 0; }
.rc > .boss-bomb { margin-top: 8px; }
.rc-marks { margin-top: 6px; }
.rc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.rc-name { font-family: var(--f-dot); font-size: 16px; line-height: 1.45; color: #fff; overflow-wrap: anywhere; }
.rc.boss .rc-name { font-size: 24px; line-height: 1.3; text-shadow: 2px 2px 0 #b81e1e, 4px 4px 0 #12030f; }
.rc .chip { margin: 0; padding: 0 5px; }
.rc-sub { font-family: var(--f-body); font-size: 15px; line-height: 1.5; color: var(--muted); }
.rc .boss-bomb { margin: 4px 0 2px; padding: 4px 10px; font-size: 24px; line-height: 1.3; text-shadow: 2px 2px 0 #4a2200; }
.rc .boss-bomb .boss-bomb-no { font-size: 16px; vertical-align: .15em; }
.rc-marks { display: flex; flex-wrap: wrap; gap: 0 14px; font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #e6ebff; }
.rc-marks .mark { min-width: 0; margin-right: 2px; }
.rc-vh { color: var(--gold); }
.rc-vh .px { margin-right: 2px; }
.rc-oth { display: flex; flex-wrap: wrap; gap: 0 12px; font-family: var(--f-dot); font-size: 15px; line-height: 1.5; color: var(--muted); }
.rc-none { color: var(--muted); }
.rc .stage-res { margin-top: 2px; }
.rc > .boss-tag { right: 10px; }
.fx .stages > li.in .rc.boss { animation: shake .36s steps(1) .3s; }

/* ---------- 作戦画面(レース詳細) ---------- */
.battle-head h1 { margin-bottom: 4px; }
.battle-info { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cmd { list-style: none; margin: 0; padding: 0; font-family: var(--f-dot); }
.cmd > li { position: relative; padding: 7px 0 7px 18px; border-top: 2px dashed rgba(170,182,230,.28); }
.cmd > li:first-child { border-top: 0; }
.cmd > li::before { content: ""; position: absolute; left: 0; top: 13px; width: 9px; height: 11px; background: url(px/arrow.svg) center / contain no-repeat; }
.cmd .muted { font-family: var(--f-body); }
.cmd > li.is-bomb { background: rgba(255,210,63,.08); color: var(--gold); }
.cmd > li.is-bomb .mark { color: var(--gold); }
.result-rank { display: grid; grid-template-columns: 4.2em 1fr; gap: 4px 8px; font-family: var(--f-dot); font-size: 1.02rem; margin: 4px 0 8px; }
.result-rank .r { font-family: var(--f-px); font-size: 16px; color: #fff; align-self: center; }
.result-big { font-family: var(--f-dot); font-size: 1.15rem; }
.party { list-style: none; margin: 0; padding: 0; }
.party > li { border-top: 2px dashed rgba(170,182,230,.28); padding: 8px 0; }
.party > li:first-child { border-top: 0; }
.party .row > span:first-child { font-family: var(--f-dot); font-size: 1rem; }
.waku { display: inline-block; min-width: 1.9em; text-align: center; font-family: var(--f-px); font-size: 8px; padding: 3px 2px 2px;
        border: 2px solid var(--bg-deep); box-shadow: 0 0 0 1px var(--edge2); vertical-align: .1em;
        background: #ddd; color: #111; }
.waku.w1 { background: #fff; color: #111; } .waku.w2 { background: #222; color: #fff; } .waku.w3 { background: #e33; color: #fff; }
.waku.w4 { background: #2b6fe8; color: #fff; } .waku.w5 { background: #f5d300; color: #111; } .waku.w6 { background: #1f9e3a; color: #fff; }
.waku.w7 { background: #f08a00; color: #111; } .waku.w8 { background: #ff8fc0; color: #111; }
.horse .sub { margin: 2px 0 0 2.6em; }
.speed { font-family: var(--f-px); font-size: 8px; color: #fff; }
.num-b { display: inline-block; min-width: 1.6em; text-align: right; }

/* ---------- 当たりランキング ---------- */
.rank-1 td { color: #fff; }
.rank-no { font-family: var(--f-px); font-size: 8px; }

/* ---------- チュートリアル(予想の見方) ---------- */
.talk { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start; margin: 0 0 22px; }
.talk-face { width: 76px; height: 76px; background: var(--bg-deep) url(px/horse.svg) center / 64px auto no-repeat; image-rendering: pixelated;
             border: 4px solid var(--edge); box-shadow: inset 0 0 0 2px var(--edge2), 4px 4px 0 rgba(0,0,0,.45); }
.talk .card { margin: 0; }
.talk .card::before { content: ""; position: absolute; left: -14px; top: 22px; border: 8px solid transparent; border-right-color: var(--edge); border-left: 0; }
.next { text-align: right; font-family: var(--f-dot); color: #fff; margin: 6px 0 0; }
@media (max-width: 520px) {
  .talk { grid-template-columns: 1fr; }
  .talk-face { width: 60px; height: 60px; background-size: 50px auto; margin-bottom: -4px; }
  .talk .card::before { left: 22px; top: -14px; border: 8px solid transparent; border-bottom-color: var(--edge); border-top: 0; }
}

/* ---------- クエスト(ピックアップ) ---------- */
.quest { --rar: var(--edge2); border-color: var(--rar);
         box-shadow: inset 0 0 0 2px var(--bg-deep), inset 0 0 0 4px var(--rar), 0 0 0 2px var(--bg-deep), 6px 6px 0 2px rgba(0,0,0,.45); }
.quest .win-tag { border-color: var(--rar); color: var(--rar); }
/* 赤＝★★レースの💣、金＝💣(穴馬)、それ以外は中立色 */
.quest.r-boss { --rar: #ff5a57; background: linear-gradient(180deg, #3a0b2a, #1a0620); }
.quest.r-bomb { --rar: #ffd23f; background: linear-gradient(180deg, #2c2470, #17134a); }
.quest.r-plain { --rar: #eef1ff; }
.quest h2 { color: #fff; }
.quest.r-bomb .quest-reward { color: var(--gold); }
.quest .cmd { font-family: var(--f-body); }
.quest-reward { font-family: var(--f-body); font-weight: 700; }

/* ================= 動きの演出(8bit風: steps() でコマ送り、移動はドット単位) =================
   JSなしでも全部見える。html.fx(base.html の head で付与)のときだけ「出てくる」演出をする。 */
html, body { overflow-x: clip; }

/* 背景: ゆっくり流れるドットの星(1枚の要素を transform で動かすだけ) */
body::before { content: ""; position: fixed; left: 0; right: 0; top: -192px; bottom: 0; z-index: -1; pointer-events: none; opacity: .4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='192' shape-rendering='crispEdges'%3E%3Cg fill='%23fff'%3E%3Crect x='21' y='9' width='2' height='2'/%3E%3Crect x='87' y='43' width='2' height='2'/%3E%3Crect x='150' y='25' width='2' height='2'/%3E%3Crect x='42' y='101' width='2' height='2'/%3E%3Crect x='121' y='137' width='2' height='2'/%3E%3Crect x='181' y='91' width='2' height='2'/%3E%3Crect x='9' y='171' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%23ffd23f'%3E%3Crect x='59' y='69' width='2' height='2'/%3E%3Crect x='169' y='157' width='2' height='2'/%3E%3Crect x='103' y='185' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 192px 192px;
  animation: drift 64s steps(96) infinite; }
@keyframes drift { to { transform: translateY(192px); } }

/* ウィンドウが「開く」: 横線 → 縦に広がる(画面に入ったとき) */
.fx main .card:not(.in), .fx .talk:not(.in), .fx .stages > li:not(.in), .fx .saves > li:not(.in), .fx .slot:not(.in) { opacity: 0; }
.fx main .talk > .card { opacity: 1; }
.fx main .card.in, .fx .talk.in, .fx .stages > li.in, .fx .saves > li.in, .fx .slot.in { animation: winopen .3s both; }
.fx main .talk > .card.in { animation: none; }
.fx .in.tall { animation: none !important; }
@keyframes winopen {
  0%   { transform: scale(.2, .04); animation-timing-function: steps(3); }
  45%  { transform: scale(1, .08); animation-timing-function: steps(3); }
  100% { transform: none; }
}

/* ゲージ: 0から実際の値まで10コマで伸びる(数字はJSで数え上げ、最後は元の値) */
.fx .gauge-bar > span { width: 0; transition: width .7s steps(10); }
.fx .gauge.in .gauge-bar > span { width: calc(var(--w, 0) * 1%); }

/* メニュー: ▶カーソルが小さく揺れる。別の項目に乗せるとカーソルがそこへ移る */
.nav a[aria-current="page"]::before, .nav a:hover::before { animation: nudge .8s steps(1) infinite; }
.nav:hover a[aria-current="page"]:not(:hover)::before { opacity: 0; }
@keyframes nudge { 50% { transform: translateX(2px); } }

/* カード: 乗せる・押すと浮く(影がのびる) */
.stage:hover, .stage:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 6px 0 rgba(0,0,0,.5); }
.save { transition: transform .05s steps(1); }
.save:hover, .save:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(0,0,0,.55); }

/* BOSS(★★): 枠が点滅、画面に入ったときに一度ゆれる */
.stage.boss { animation: bosspulse 1.2s steps(1) infinite; }
.fx .stages > li.in .stage.boss { animation: shake .36s steps(1) .3s, bosspulse 1.2s steps(1) infinite; }
@keyframes bosspulse { 50% { border-color: #ff8a7a; } }
@keyframes shake { 0% { transform: translateX(-4px); } 25% { transform: translateX(4px); } 50% { transform: translateX(-2px); } 75% { transform: translateX(2px); } 100% { transform: none; } }

/* レア枠(推奨・最強期待値馬)に光が走る */
.quest.r-boss::after, .quest.r-bomb::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; }
.quest.r-bomb::after { animation-delay: 1.5s; }
@keyframes shine { 0% { background-position: 100% 0; } 45%, 100% { background-position: 0 0; } }

/* コイン・王冠などがふわふわ浮く */
.quest h2 .px, .result-rank .i-crown { animation: bob 1s steps(1) infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* 的中: 「当たり!」のまわりにドットのきらきら */
.burst { position: relative; display: inline-block; }
.burst::before, .burst::after { content: ""; position: absolute; left: -2px; top: 2px; width: 4px; height: 4px; pointer-events: none;
  animation: burst 1.8s step-end infinite; }
.burst::after { left: auto; top: auto; right: -2px; bottom: 2px; animation-delay: .9s; }
@keyframes burst {
  0%   { box-shadow: 0 -6px #fff, 6px 0 #ffe14d, 0 6px #fff, -6px 0 #ffe14d; }
  12%  { box-shadow: 0 -11px #fff, 8px -8px #ffe14d, 11px 0 #fff, 8px 8px #ffe14d, 0 11px #fff, -8px 8px #ffe14d, -11px 0 #fff, -8px -8px #ffe14d; }
  24%  { box-shadow: 0 -15px #5dff6e, 11px -11px #4dc3ff, 15px 0 #ff4d4d, 11px 11px #b06dff, 0 15px #ffa23f, -11px 11px #4dc3ff, -15px 0 #5dff6e, -11px -11px #ff4d4d; }
  36%, 100% { box-shadow: none; }
}

/* チュートリアルの会話: 2026-11-21 タイプライター(1文字ずつ表示)と▼カーソルの点滅はやめた(すぐ読めるように) */

/* ================= 2026-10-22 追加: WORLD SELECT・バトル画面・結果・実績・404・画面効果 ================= */

/* ドットのフォーカス枠(白の破線。金は💣専用なので使わない) */
:focus-visible { outline: 3px dashed #fff; outline-offset: 3px; }
.blink-c { display: inline-block; margin-right: 6px; animation: blink 1s steps(2) infinite; }

/* ---------- WORLD SELECT(日本地図) ---------- */
.wsel { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px 20px; align-items: center; margin: 8px 0 14px; }
.wmap { position: relative; aspect-ratio: 49 / 55; }
.wmap img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.wpt { position: absolute; width: 0; height: 0; text-decoration: none; z-index: 1; }
.wpt i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: #fff;
         box-shadow: 0 0 0 2px #050c2a, 0 0 0 4px #9fe3ff; animation: ping 1.2s steps(2) infinite; }
@keyframes ping { 50% { background: #9fe3ff; box-shadow: 0 0 0 2px #050c2a, 0 0 0 6px rgba(159,227,255,.55), 0 0 14px 8px rgba(159,227,255,.45); } }
.wpt span { position: absolute; font-family: var(--f-dot); font-size: 14px; line-height: 1.35; color: #fff; white-space: nowrap;
            background: #050c2a; border: 2px solid #9fe3ff; padding: 0 4px; }
.wpt.r span { left: 11px; top: -11px; } .wpt.l span { right: 11px; top: -11px; }
.wpt.t span { left: 0; bottom: 10px; transform: translateX(-50%); } .wpt.b span { left: 0; top: 10px; transform: translateX(-50%); }
.wpt:hover span { background: #fff; color: #050c2a; }
.wsel-h { font-family: var(--f-px); font-size: 16px; letter-spacing: 1px; color: var(--accent); margin: 0 0 8px; }
.wsel-h small { font-family: var(--f-dot); font-size: .875rem; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.wsel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wsel-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; color: var(--text); text-decoration: none;
               background: var(--bg-deep); border: 2px solid var(--edge2); box-shadow: 0 4px 0 rgba(0,0,0,.4); transition: transform .05s steps(1); }
.wsel-list a:hover, .wsel-list a:focus-visible { border-color: #fff; transform: translate(-2px, -2px); box-shadow: 4px 6px 0 rgba(0,0,0,.5); }
.wsel-no { font-family: var(--f-px); font-size: 8px; color: var(--bg-deep); background: var(--accent); padding: 3px 5px; }
.wsel-v { font-family: var(--f-dot); font-size: 1.1rem; }
.wsel-list small { margin-left: auto; font-size: var(--fs-s); color: var(--muted); white-space: nowrap; }
.wsel-boss { color: #ff8a7a; }  /* BOSS＝★★ */
.wsel-card { padding-top: 12px; }
.wsel-card .wsel { margin: 0; }
@media (max-width: 599.98px) {
  .wsel { grid-template-columns: minmax(0, 1fr); }
  .wmap { width: min(100%, 270px); margin: 0 auto; }
}
.world { scroll-margin-top: 12px; }

/* ---------- バトル画面(レース詳細の上の陣形) ---------- */
.battle { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); margin: 8px 0 24px; overflow: hidden; }
.bt-field { display: flex; align-items: flex-end; justify-content: center; gap: 8px 18px; padding: 18px 12px 14px; min-height: 170px;
            background: linear-gradient(0deg, #1f6a2a 0 18px, #247a30 18px 50px, #2f9e3a 50px 54px, #14286f 54px 96px, #0b1645 96px); }
.bt-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bt-col.back { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 8px; align-items: end; }
.bt-col.back > .unit:nth-child(even) { margin-bottom: 18px; }
.unit { --uw: 48px; position: relative; display: flex; flex-direction: column; align-items: center; }
.unit.big { --uw: 72px; max-width: 9em; }
@media (min-width: 640px) { .unit { --uw: 60px; } .unit.big { --uw: 96px; max-width: 10em; } }
.u-spr { order: 9; position: relative; z-index: 1; display: block; width: var(--uw); height: calc(var(--uw) * 2 / 3); overflow: hidden; }
/* 待機モーション(4コマ: 静止・息・しっぽ・勝負服)。馬ごとに少しずらす */
.u-run { display: block; width: calc(var(--uw) * 4); height: 100%; animation: urun 2s steps(4) infinite; }
.unit:nth-child(2) .u-run { animation-delay: -.5s; } .unit:nth-child(3) .u-run { animation-delay: -1.1s; } .bt-col.mid .u-run { animation-delay: -1.5s; }
@keyframes urun { to { transform: translateX(calc(var(--uw) * -4)); } }
.u-tag { font-family: var(--f-dot); font-size: 14px; line-height: 1.4; color: #fff; white-space: nowrap; background: var(--bg-deep);
         border: 2px solid var(--edge2); padding: 0 5px; margin-top: 2px; }
.u-tag .mark { min-width: 0; margin-right: 2px; }
.u-tag .px { margin-right: 2px; }
.unit.big .u-tag { font-size: 1rem; border-color: #fff; }
.unit.is-bomb .u-tag, .unit.is-bomb .u-tag .mark { border-color: var(--gold); color: var(--gold); }  /* 💣だけ金 */
.u-name { font-family: var(--f-dot); font-size: 1rem; line-height: 1.3; color: #fff; text-align: center; text-shadow: 2px 2px 0 var(--bg-deep);
          margin-top: 4px; overflow-wrap: anywhere; }
.u-chips { display: flex; flex-wrap: wrap; justify-content: center; }
.u-chips .chip { margin: 0 2px 4px; }
.bt-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 16px; text-align: center;
         background: repeating-linear-gradient(135deg, #050c2a 0 8px, #081236 8px 16px); border-left: 4px solid var(--edge); }
.battle.is-boss .bt-vs { border-left-color: var(--red); }
.vs { font-family: var(--f-px); font-size: 32px; line-height: 1; color: #fff; letter-spacing: 2px;
      text-shadow: 3px 3px 0 #6a3fd0, 6px 6px 0 #050c2a; }
.bt-enemy { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bt-enemy small { font-family: var(--f-body); font-size: var(--fs-s); color: var(--muted); }
.bt-enemy b { font-family: var(--f-dot); font-weight: 400; font-size: 1.2rem; line-height: 1.35; color: #fff; overflow-wrap: anywhere; }
@media (max-width: 639.98px) {
  .battle { grid-template-columns: minmax(0, 1fr); }
  .bt-field { gap: 8px 12px; padding: 16px 8px 12px; }
  .bt-vs { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; border-left: 0; border-top: 4px solid var(--edge); padding: 10px 12px; }
  .battle.is-boss .bt-vs { border-top-color: var(--red); }
  .vs { font-size: 24px; }
  .bt-enemy { align-items: flex-start; flex: 1 1 0; min-width: 0; }
}
/* 入場: 陣形が左から行進して入り、VSがどんと出る */
.fx .bt-col { animation: march .5s steps(5) both; }
.fx .bt-col.mid { animation-delay: .1s; } .fx .bt-col.front { animation-delay: .2s; }
@keyframes march { from { transform: translateX(-60px); opacity: 0; } 20% { opacity: 1; } }
.fx .vs { animation: slam .4s steps(4) .45s both, vsglow 1.2s steps(1) 1s infinite; }
@keyframes slam { from { transform: scale(3); opacity: 0; } 50% { opacity: 1; } }
@keyframes vsglow { 50% { text-shadow: 3px 3px 0 #a98bff, 6px 6px 0 #050c2a; } }

/* ---------- 結果: 的中(STAGE CLEAR)・不的中(CONTINUE?) ---------- */
.clear { position: relative; overflow: hidden; text-align: center; margin: 10px 0 8px; padding: 18px 10px 16px;
         background: linear-gradient(180deg, #0f4a22, #072812); border: 3px solid var(--green); box-shadow: inset 0 0 0 2px #050c2a; }
.clear-big { position: relative; margin: 0; font-family: var(--f-px); font-size: 24px; letter-spacing: 2px; color: #fff;
             text-shadow: 3px 3px 0 #1f7a2c, 6px 6px 0 #050c2a; }
.clear-sub { position: relative; margin: 10px 0 0; font-family: var(--f-px); font-size: 16px; letter-spacing: 2px; color: var(--hit); }
.fx .clear-big { animation: clearin .6s steps(6) both; }
@keyframes clearin { from { letter-spacing: 24px; opacity: 0; } 30% { opacity: 1; } }
.clear-sub { animation: blink 1s steps(2) .8s infinite; }
/* 紙ふぶき(緑・白・水色・紫。赤と金は意味のある色なので使わない) */
.confetti { position: absolute; left: 50%; top: 45%; }
.confetti::before, .confetti::after { content: ""; position: absolute; width: 6px; height: 6px; left: -3px; top: -3px;
  box-shadow: -150px -40px #6dff7c, -120px 10px #fff, -96px -30px #9fe3ff, -70px 30px #b06dff, -44px -44px #6dff7c, -20px 36px #9fe3ff,
    20px -38px #fff, 46px 34px #6dff7c, 72px -28px #b06dff, 98px 26px #9fe3ff, 124px -42px #fff, 150px 12px #6dff7c,
    -136px 38px #9fe3ff, 136px 40px #b06dff, -60px -12px #fff, 60px 6px #fff;
  animation: confetti 2.6s steps(13) infinite; }
.confetti::after { width: 4px; height: 8px; transform: rotate(0); animation-delay: -1.3s;
  box-shadow: -160px 0 #fff, -110px -46px #b06dff, -84px 40px #6dff7c, -30px -20px #9fe3ff, 30px 44px #b06dff, 84px -46px #6dff7c,
    110px 2px #fff, 160px -22px #9fe3ff, -8px -48px #6dff7c, 8px 48px #fff; }
@keyframes confetti { 0% { transform: translateY(-16px) scale(.1); opacity: 1; } 35% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(30px) scale(1.08); opacity: 0; } }
.cont { text-align: center; margin: 10px 0 8px; padding: 16px 10px 14px; background: #0b1240; border: 3px dashed var(--edge2); }
.cont-big { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 0; font-family: var(--f-px);
            font-size: 16px; letter-spacing: 2px; color: #fff; text-shadow: 3px 3px 0 #050c2a; }
.cont-n { display: inline-block; width: 1.5em; height: 1.5em; line-height: 1.5em; overflow: hidden; background: var(--bg-deep);
          border: 3px solid #fff; letter-spacing: 0; text-align: center; }
.cont-n > span { display: block; width: 1ch; margin: 0 auto; word-break: break-all; animation: countdown 10s steps(9) .6s forwards; }
@keyframes countdown { to { transform: translateY(-13.5em); } }
.cont-msg { font-family: var(--f-body); color: #dfe6ff; margin: 12px 0; }
.cont-opt { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin: 0; }
.cont-opt .btn small, .go-opt .btn small { display: block; font-size: var(--fs-s); margin-top: 2px; }
.cont-no { font-family: var(--f-dot); color: var(--muted); padding: 10px 4px; }

/* ---------- 実績(トロフィー) ---------- */
.trophies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.tro { position: relative; overflow: hidden; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "ic name" "ic cond" "ic st";
       gap: 0 10px; align-items: center; background: var(--bg-deep); border: 3px solid var(--edge); padding: 8px 10px; }
.tro.k-hit { border-color: var(--green); } .tro.k-boss { border-color: var(--red); } .tro.k-bomb { border-color: var(--gold); }
.tro-ic { grid-area: ic; display: grid; place-items: center; width: 48px; height: 48px; font-size: 32px; background: #14286f; border: 2px solid var(--edge2); }
.tro-name { grid-area: name; font-family: var(--f-dot); font-size: 1.05rem; color: #fff; }
.tro-cond { grid-area: cond; font-size: var(--fs-s); color: var(--muted); line-height: 1.5; }
.tro-st { grid-area: st; font-size: var(--fs-s); color: #dfe6ff; }
.tro-ok { font-family: var(--f-px); font-size: 8px; color: var(--bg-deep); background: var(--edge); padding: 2px 4px; vertical-align: .1em; margin-right: 4px; }
.tro:not(.locked)::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.12) 42% 47%, transparent 47%) no-repeat; background-size: 300% 100%;
  animation: shine 5s steps(16) infinite; }
.tro:nth-child(3n+2)::after { animation-delay: 1.6s; } .tro:nth-child(3n)::after { animation-delay: 3.2s; }
.tro.locked { border-color: #3a4270; border-style: dashed; background: #070f33; }
.tro.locked .tro-ic { background: #0b1645; border-color: #2a3360; }
.tro.locked .tro-ic .px { filter: brightness(0); opacity: .5; }
.tro.locked .tro-name { color: #8a93bd; }
.tro.locked .tro-st { color: #8a93bd; }
@media (max-width: 520px) {
  .trophies { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .tro { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ic" "name" "cond" "st"; justify-items: center; text-align: center; padding: 8px 6px; gap: 2px; }
  .tro-name { font-size: 1rem; line-height: 1.35; }
}

/* ---------- 404(GAME OVER) ---------- */
.gameover { text-align: center; padding: 36px 8px 24px; }
.go-big { margin: 0 0 18px; font-family: var(--f-px); font-size: 32px; line-height: 1.1; color: #fff; letter-spacing: 2px;
          text-shadow: 4px 4px 0 #6a3fd0, 8px 8px 0 #050c2a; }
.fx .go-big { animation: slam .5s steps(4) both; }
.go-msg { font-size: 1rem; margin: 0 0 22px; }
.go-opt { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin: 18px 0 0; }

/* ---------- 画面効果の切り替え(フッター) ---------- */
.toggles { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.toggles[hidden] { display: none; }
.tg { font-family: var(--f-dot); font-size: var(--fs-s); color: #fff; cursor: pointer; min-height: 40px; padding: 5px 10px;
      background: #6a3fd0; border: 3px solid var(--bg-deep); box-shadow: inset -3px -3px 0 #44238f, inset 3px 3px 0 #a98bff; }
.tg:active { transform: translateY(2px); }
.tg-v { font-family: var(--f-px); font-size: 8px; margin-left: 8px; padding: 2px 4px; background: var(--bg-deep); color: var(--muted); }
.tg[aria-pressed="true"] .tg-v { color: var(--accent); }
/* ブラウン管風(走査線＋四隅を暗く)。選んだときだけ */
html.crt body::after { content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,.22) 2px 3px),
              radial-gradient(ellipse at center, transparent 62%, rgba(0,0,0,.45) 100%);
  animation: crtflick 5s steps(1) infinite; }
@keyframes crtflick { 50% { opacity: .9; } 51% { opacity: 1; } }

/* ページ切り替えのドットのワイプ(fx.js。reduced-motion では使わない) */
.wipe { position: fixed; inset: 0; z-index: 10002; pointer-events: none; display: grid; grid-template-rows: repeat(8, 1fr); }
.wipe > i { display: block; background: #050c2a; transform: scaleX(0); transform-origin: 0 0; animation: wipe .16s steps(4) forwards; }
@keyframes wipe { to { transform: none; } }

/* ================= 2026-10-22 監査で追加: 使いやすさ・読み上げ ================= */

/* 本文へスキップ(Tabで最初に出る) */
.skip { position: absolute; left: 8px; top: -60px; z-index: 10003; background: #fff; color: var(--bg-deep); font-family: var(--f-dot);
        padding: 10px 14px; text-decoration: none; border: 3px solid var(--bg-deep); }
.skip:focus { top: 8px; }

/* 用語の「?」(予想の見方へのリンク)。見た目は小さく、押せる範囲は広め */
.qm { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 2px 0 4px; vertical-align: .08em;
      font-family: var(--f-px); font-size: 8px; line-height: 1; color: var(--bg-deep); background: var(--accent); text-decoration: none;
      border: 2px solid var(--bg-deep); box-shadow: 0 0 0 1px var(--accent); }
.qm::after { content: ""; position: absolute; inset: -15px; }
.qm:hover, .qm:focus-visible { background: #fff; color: var(--bg-deep); }
h2 .qm { font-size: 8px; vertical-align: .2em; }

/* トップの使い方(3ステップ)。2026-11-21: ボタンに見えないよう1枚の窓にまとめ、下に「はじめての方へ」の小さな文字リンク */
.howto-box { width: fit-content; max-width: 100%; margin: 18px auto 0; padding: 10px 16px 8px; text-align: left;
             background: var(--bg-deep); border: 2px solid var(--edge2); box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
.howto { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; font-family: var(--f-dot); font-size: 16px; line-height: 1.5; color: #e6ebff; }
.howto li { display: flex; align-items: center; gap: 8px; }
.howto b { flex: 0 0 auto; display: inline-grid; place-items: center; width: 20px; height: 20px; font-family: var(--f-px); font-size: 8px; font-weight: 400;
           color: var(--bg-deep); background: var(--accent); }
.howto-more { margin: 8px 0 0; padding-top: 6px; border-top: 2px dashed rgba(170,182,230,.28); text-align: right; font-size: 15px; }
.howto-more a { display: inline-block; padding: 4px 0; text-underline-offset: 3px; }
@media (min-width: 760px) { .howto-box { padding: 10px 14px 8px; } .howto { display: flex; flex-wrap: wrap; gap: 4px 16px; } }
.terms { margin-top: 0; }

/* チュートリアルのもくじ */
.toc { padding-top: 12px; }
.toc-h { font-family: var(--f-dot); margin: 0 0 4px; color: var(--accent); }
.toc ol { margin: 0; padding-left: 1.6em; columns: 2 12em; column-gap: 24px; }
.toc li { padding: 2px 0; break-inside: avoid; }
.toc a { display: inline-block; padding: 6px 0; }
.talk { scroll-margin-top: 84px; }

/* ページの先頭へ(スクロールしたら右下に出る。fx.js が html.scrolled を付ける) */
.to-top { position: fixed; right: 12px; bottom: 14px; z-index: 55; display: none; align-items: center; justify-content: center; gap: 4px;
          min-width: 48px; min-height: 48px; padding: 4px 8px; font-family: var(--f-px); font-size: 8px; color: #fff; text-decoration: none;
          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); }
.to-top span { font-family: var(--f-dot); font-size: .8rem; }
html.scrolled .to-top { display: flex; }
.to-top:hover { color: #fff; filter: brightness(1.08); }
/* スマホの下の固定ボタン「本日のレース」(トップ・日別・レースのページ。2026-11-21)。右の▲TOPと並ぶ。
   トップでは一番上の一覧が画面から外れたときだけ出す(top.js が html.tr-away を付ける) */
.tr-fab { display: none; }
@media (max-width: 699.98px) {
  .tr-fab { position: fixed; left: 10px; right: 70px; bottom: 12px; z-index: 55; display: flex; align-items: center; justify-content: center; gap: 8px;
            min-height: 48px; padding: 6px 12px; font-family: var(--f-dot); font-size: 16px; line-height: 1.3; color: #fff; text-decoration: none;
            text-shadow: 2px 2px 0 rgba(5,12,42,.6); background: var(--dither) 0 0 / 4px 4px, #6a3fd0; border: 3px solid var(--bg-deep);
            box-shadow: inset -3px -3px 0 #44238f, inset 3px 3px 0 #a98bff, 0 0 0 2px var(--gold), 0 0 0 4px var(--bg-deep), 0 6px 0 2px rgba(0,0,0,.4); }
  .tr-fab .px { font-size: 20px; }
  .tr-fab:hover, .tr-fab:focus-visible { color: #fff; filter: brightness(1.1); }
  .tr-fab:active { transform: translateY(2px); }
  body.top .tr-fab { display: none; }
  html.tr-away body.top .tr-fab { display: flex; }
  .to-top { bottom: 12px; }
  .site-footer { padding-bottom: 84px; }
}

/* スマホ・タッチ操作: 押せるリンクは高さ44px以上 */
@media (pointer: coarse), (max-width: 699.98px) {
  a.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; }
  .stage a.chip, .srow a.chip { min-height: 0; }
  .footer-links a { display: inline-block; padding: 10px 0; }
  .srow-link { padding: 12px 0; }
  .cont-no { display: inline-flex; align-items: center; min-height: 44px; }
  .tg { min-height: 44px; }
  .row-link { padding: 4px 0; }
  .article a, .card p a:not(.btn):not(.chip):not(.qm) { padding: 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (min-width: 700px) {
  .card { --pt: 24px; --px: 24px; padding-bottom: 24px; }
  .card.has-tag { --pt: 32px; }
}

@media (min-width: 700px) {
  .clear-big { font-size: 32px; } .cont-big { font-size: 24px; } .go-big { font-size: 48px; }
  .logo-word { font-size: 24px; }
}

/* ================= 2026-10-22 round5: 16bitゲーム機のメニュー画面のような仕上げ ================= */

/* ---------- アイコン(site_pixels.ICONS。中立色だけ) ---------- */
.i-home { background-image: url(px/home.svg); width: 1.1em; } .i-book { background-image: url(px/book.svg); width: 1.2em; }
.i-quest { background-image: url(px/quest.svg); } .i-quill { background-image: url(px/quill.svg); }
.i-mug { background-image: url(px/mug.svg); width: 1.1em; } .i-chart { background-image: url(px/chart.svg); width: 1.1em; }
.i-disk { background-image: url(px/disk.svg); } .i-flag { background-image: url(px/flag.svg); }
.i-sword { background-image: url(px/sword.svg); } .i-warn { background-image: url(px/warn.svg); }
.i-mail { background-image: url(px/mail.svg); width: 1.15em; } .i-shield { background-image: url(px/shield.svg); }
.i-list { background-image: url(px/list.svg); width: 1.15em; } .i-trophy { background-image: url(px/trophy.svg); }
.nav .nav-ic { display: none; }
@media (min-width: 1100px) {
  .site-header .wrap { max-width: 1100px; }
  .nav { gap: 2px; }
  .nav a { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; padding: 6px 7px; border: 2px solid transparent; }
  .nav a::before { display: none; }
  .nav .nav-ic { display: inline-block; font-size: 16px; }
  .nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { text-decoration: none; background: rgba(159,227,255,.08); border-color: #fff; box-shadow: var(--glow); }
  .nav:hover a[aria-current="page"]:not(:hover) { border-color: rgba(255,255,255,.35); box-shadow: none; }
}
.nav a:active, .menu-win a:active { transform: translate(1px, 1px); }

/* ---------- 小さな窓(ステージ・一覧の行など)も同じ質感: 2色の面取り＋ディザ＋ドットの影 ---------- */
.stage, .srow, .wsel-list a, .save, .tro, .boss-list a {
  background-image: var(--dither); background-size: 4px 4px;
  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); }
.stage.boss { box-shadow: inset 2px 2px 0 rgba(255,138,122,.25), inset -2px -2px 0 rgba(0,0,0,.45), 0 0 0 2px var(--red2), 0 4px 0 rgba(0,0,0,.4);
              background-image: var(--dither), linear-gradient(180deg, #3a0b2a, #1a0620); background-size: 4px 4px, auto; }
.stage, .wsel-list a, .save, .boss-list a, .row-link, .srow > summary, .ccard, .qm, .to-top, .tg, .dk-btn, .cont-no, .mm-item, .menu-btn {
  transition: transform .06s steps(1), box-shadow .06s steps(1), background-color .06s steps(1); }
.stage:hover, .stage:focus-visible, .wsel-list a:hover, .wsel-list a:focus-visible, .save:hover, .save:focus-visible,
.boss-list a:hover, .boss-list a:focus-visible {
  transform: translate(-2px, -2px); box-shadow: inset 2px 2px 0 rgba(255,255,255,.12), inset -2px -2px 0 rgba(0,0,0,.4), var(--glow), 4px 6px 0 rgba(0,0,0,.5); }
.stage.boss:hover, .stage.boss:focus-visible { box-shadow: inset 0 0 0 2px rgba(255,138,122,.6), inset 0 0 16px 2px rgba(255,90,87,.25), 0 0 0 2px var(--red2), 4px 6px 0 rgba(0,0,0,.5); }
.stage:active, .wsel-list a:active, .save:active, .boss-list a:active { transform: translate(2px, 2px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.4); }
.srow > summary:hover, .srow > summary:focus-visible { background: rgba(159,227,255,.07); box-shadow: var(--glow); }
.srow > summary:active { transform: translateY(1px); }
.row-link:hover, .row-link:focus-visible { background: rgba(159,227,255,.06); box-shadow: -6px 0 0 rgba(159,227,255,.06), 6px 0 0 rgba(159,227,255,.06); }
.row-link:active { transform: translateX(2px); }
.qm:active, .tg:active, .to-top:active { transform: translate(1px, 2px); }
.tg:hover, .tg:focus-visible, .to-top:hover, .to-top:focus-visible { filter: brightness(1.12); box-shadow: inset -3px -3px 0 #44238f, inset 3px 3px 0 #a98bff, inset 0 0 0 5px rgba(255,255,255,.1), 0 4px 0 var(--bg-deep); }
.cont-no:hover, .cont-no:focus-visible { color: #fff; }
.menu-btn:hover, .menu-btn:focus-visible { box-shadow: inset 0 0 0 2px var(--edge2), var(--glow); }
.menu-btn:active { transform: translateY(2px); }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; background: rgba(159,227,255,.1); }
.tro { box-shadow: inset 2px 2px 0 rgba(255,255,255,.08), inset -2px -2px 0 rgba(0,0,0,.4), 4px 4px 0 rgba(0,0,0,.4); }

/* 数字の刻み(リズム): 余白は 8px 単位 */
.stage-name, .srow-name, .wsel-v, .tro-name, .cmd, .u-name, .bl-race, .result-rank, .gauge-l { font-size: 16px; }
.stage.boss .stage-name, .stage.boss .stage-no { font-size: 24px; }
.stage.star1 .stage-name { font-size: 16px; }
.boss-bomb { font-size: 16px; padding: 8px 12px; }
.bt-enemy b { font-size: 24px; }
.result-big { font-size: 24px; }
@media (max-width: 699.98px) { .stage.boss .stage-name { font-size: 16px; } .stage.boss .stage-no { font-size: 16px; } .bt-enemy b { font-size: 16px; } .result-big { font-size: 16px; } }

/* ---------- メインメニュー(トップ) ---------- */
.mm { margin-bottom: 32px; }
.mm-list { list-style: none; margin: 0; padding: 0; display: grid; }
.mm-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px 8px 36px; color: var(--text);
           text-decoration: none; font-family: var(--f-dot); font-size: 16px; border: 2px solid transparent; }
.mm-item::before { content: ""; position: absolute; left: 12px; top: 50%; width: 12px; height: 14px; margin-top: -7px;
                   background: url(px/arrow.svg) center / contain no-repeat; image-rendering: pixelated; opacity: 0; }
.mm-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--bg-deep); border: 2px solid var(--edge2);
         box-shadow: inset 2px 2px 0 rgba(255,255,255,.1), inset -2px -2px 0 rgba(0,0,0,.4); }
.mm-ic .px { width: 20px; height: 20px; }
.mm-l { flex: 1 1 auto; min-width: 0; }
.mm-badge { margin-left: auto; font-family: var(--f-dot); font-size: 16px; line-height: 20px; padding: 1px 8px; white-space: nowrap; color: #e6ebff;
            background: var(--bg-deep); border: 2px solid var(--edge2); }  /* 数字が読めるよう16px(2026-11-21) */
.mm-badge.boss { color: #fff; background: var(--red2); border-color: var(--red); }  /* ★★の数だけ赤 */
.mm-item:hover, .mm-item:focus-visible, .mm.js li.on > .mm-item { color: #fff; background: rgba(159,227,255,.08); border-color: #fff; box-shadow: var(--glow); outline: none; }
.mm-item:focus-visible { outline: 3px dashed #fff; outline-offset: 2px; }
.mm-item:hover::before, .mm-item:focus-visible::before, .mm.js li.on > .mm-item::before { opacity: 1; animation: nudge .8s steps(1) infinite; }
.mm-item:active { transform: translate(2px, 2px); }
.mm-pv { display: none; }
.mm-hint { margin: 8px 0 0; font-size: var(--fs-s); color: var(--muted); }
@media (min-width: 760px) {
  .mm { min-height: 380px; }
  .mm-list { width: 44%; }
  .mm-pv { position: absolute; top: var(--pt); bottom: 24px; left: calc(44% + 24px); right: var(--px); padding: 16px 20px; overflow: hidden;
           background: var(--dither) 0 0 / 4px 4px, var(--bg-deep); border: 2px solid; border-color: #9fb0ee #3a4a9a #3a4a9a #9fb0ee;
           box-shadow: inset 2px 2px 0 rgba(255,255,255,.08), inset -2px -2px 0 rgba(0,0,0,.45), 4px 4px 0 rgba(0,0,0,.35); }
  .mm:not(.js) .mm-list > li:hover .mm-pv, .mm:not(.js) .mm-list > li:focus-within .mm-pv,
  .mm:not(.js) .mm-list:not(:hover):not(:focus-within) > li:first-child .mm-pv, .mm.js .mm-list > li.on .mm-pv { display: block; }
  .mm:not(.js) .mm-list:not(:hover):not(:focus-within) > li:first-child > .mm-item { border-color: rgba(255,255,255,.5); }
  .mm:not(.js) .mm-list:not(:hover):not(:focus-within) > li:first-child > .mm-item::before { opacity: 1; }
  .fx .mm .mm-pv { animation: pvin .2s steps(4); }
}
@media (max-width: 759.98px) { .mm-hint { display: none; } }
@keyframes pvin { from { clip-path: inset(0 100% 0 0); } }
.pv-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--f-dot); font-size: 16px; color: var(--accent); }
.pv-h .px { font-size: 16px; }
.pv-big { margin: 8px 0 12px; font-family: var(--f-px); font-size: 32px; line-height: 1; color: #fff; text-shadow: 3px 3px 0 #6a3fd0, 5px 5px 0 rgba(0,0,0,.5); }
.pv-big small { margin-left: 10px; font-family: var(--f-dot); font-size: 16px; color: var(--muted); text-shadow: none; }
.pv-rows { list-style: none; margin: 0 0 8px; padding: 0; font-size: var(--fs-s); }
.pv-rows li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 2px dashed rgba(170,182,230,.28); }
.pv-races { list-style: none; margin: 8px 0 0; padding: 0; font-size: var(--fs-s); color: #ffd7d2; }
.pv-races li::before { content: "▶"; font-family: var(--f-dot); margin-right: 6px; color: #ff8a7a; }
.pv-bomb { color: var(--gold); font-family: var(--f-dot); white-space: nowrap; }
.pv-t { margin: 8px 0 0; font-size: var(--fs-s); color: #dfe6ff; }
.pv-t b { font-family: var(--f-dot); font-weight: 400; color: #fff; }
.pv-talk { display: flex; gap: 14px; align-items: flex-start; margin-top: 8px; }
.pv-talk .talk-face { flex: 0 0 72px; width: 72px; height: 72px; }
.pv-talk p { margin: 0; font-size: var(--fs-s); }

/* ---------- 競馬場ごとの景色(site_pixels.scene_svg)。赤と金は主役にしない ---------- */
.v-generic, .world, .battle { --scene: url(px/bg-generic.svg); --scene-b: url(px/bg-generic-boss.svg); --sky0: #3aa8ff; --va: var(--accent); }
.v-tokyo { --scene: url(px/bg-tokyo.svg); --scene-b: url(px/bg-tokyo-boss.svg); --sky0: #050c2a; --va: #9fe3ff; }
.v-kyoto { --scene: url(px/bg-kyoto.svg); --scene-b: url(px/bg-kyoto-boss.svg); --sky0: #241e5a; --va: #cdb8ff; }
.v-niigata { --scene: url(px/bg-niigata.svg); --scene-b: url(px/bg-niigata-boss.svg); --sky0: #2a8ce8; --va: #8fe8ff; }
.v-nakayama { --scene: url(px/bg-nakayama.svg); --scene-b: url(px/bg-nakayama-boss.svg); --sky0: #4a9cf0; --va: #bfe6ff; }
.v-hanshin { --scene: url(px/bg-hanshin.svg); --scene-b: url(px/bg-hanshin-boss.svg); --sky0: #6f9ad8; --va: #dfe6ff; }
.v-sapporo { --scene: url(px/bg-sapporo.svg); --scene-b: url(px/bg-sapporo-boss.svg); --sky0: #5a9cf0; --va: #d0e8ff; }
.v-hakodate { --scene: url(px/bg-hakodate.svg); --scene-b: url(px/bg-hakodate-boss.svg); --sky0: #050c2a; --va: #9fe3ff; }
.v-fukushima { --scene: url(px/bg-fukushima.svg); --scene-b: url(px/bg-fukushima-boss.svg); --sky0: #4a9cf0; --va: #c0e8ff; }
.v-chukyo { --scene: url(px/bg-chukyo.svg); --scene-b: url(px/bg-chukyo-boss.svg); --sky0: #3a58b0; --va: #bccbee; }
.v-kokura { --scene: url(px/bg-kokura.svg); --scene-b: url(px/bg-kokura-boss.svg); --sky0: #2a8ce8; --va: #b0e0ff; }
.battle.is-boss { --scene: var(--scene-b); --sky0: #0a0210; }

/* 日別の WORLD: 窓の上に景色、左下にステージ名の札 */
.world-scene { position: relative; height: 88px; margin: calc(4px - var(--pt)) calc(4px - var(--px)) 0; image-rendering: pixelated;
               background: var(--scene) 0 0 / 256px 80px repeat-x, linear-gradient(0deg, #1f6a2a 0 4px, #2f9e3a 4px 8px, transparent 8px), var(--sky0);
               border-bottom: 2px solid var(--bg-deep); }
.fx .world-scene { animation: scenepan 60s steps(128) infinite; }
@keyframes scenepan { to { background-position: -256px 0, 0 0, 0 0; } }
.world-head { position: relative; z-index: 1; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; max-width: 100%;
              margin: -26px 0 12px -4px; padding: 6px 14px 6px 10px; background: var(--dither) 0 0 / 4px 4px, var(--bg-deep);
              border: 2px solid; border-color: #fff #9fb0ee #9fb0ee #fff; box-shadow: 0 0 0 2px var(--bg-deep), 4px 4px 0 2px rgba(0,0,0,.45); }
.world-head h2 { margin: 0; padding-left: 0; background: none; }
.world-no { background: var(--va); }
.world-meta { font-size: var(--fs-s); color: var(--muted); white-space: nowrap; }
.world-bias { margin: -4px 0 12px; }

/* ---------- バトル画面: 競馬場の景色＋芝、待機モーション、影、◎のオーラ、BOSSの挑戦者 ---------- */
.bt-field { flex-wrap: nowrap; image-rendering: pixelated;
            background: var(--scene) left 0 bottom 54px / 256px 80px repeat-x,
                        repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 16px, transparent 16px 32px) left bottom / 100% 50px no-repeat,
                        linear-gradient(0deg, #1f6a2a 0 18px, #247a30 18px 50px, #2f9e3a 50px 54px, transparent 54px), var(--sky0); }
.battle.is-boss .bt-field { background: var(--scene) left 0 bottom 54px / 256px 80px repeat-x,
                        repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 16px, transparent 16px 32px) left bottom / 100% 50px no-repeat,
                        linear-gradient(0deg, #143a1c 0 18px, #1a4a24 18px 50px, #24602c 50px 54px, transparent 54px), var(--sky0); }
.bt-form { display: flex; align-items: flex-end; justify-content: center; gap: 8px 18px; }
.battle.is-boss .bt-field { justify-content: space-between; padding-left: 16px; padding-right: 20px; }
/* 足元の影(ドット2段) */
.unit::after { content: ""; position: absolute; left: 50%; bottom: -3px; z-index: 0; width: var(--uw); height: 4px; margin-left: calc(var(--uw) / -2);
               background: linear-gradient(rgba(5,12,42,.55), rgba(5,12,42,.55)) center / 58% 100% no-repeat,
                           linear-gradient(rgba(5,12,42,.35), rgba(5,12,42,.35)) center / 84% 50% no-repeat; pointer-events: none; }
/* ◎のオーラ(水色。金・赤は使わない) */
.unit.is-hon::before { content: ""; position: absolute; left: 50%; bottom: -4px; z-index: 0; width: calc(var(--uw) * 1.3); height: calc(var(--uw) * .95);
  margin-left: calc(var(--uw) * -.65); pointer-events: none;
  background: radial-gradient(closest-side, rgba(159,227,255,.32) 0 50%, rgba(159,227,255,.14) 50% 78%, transparent 78%);
  animation: aura 1.6s steps(2) infinite; }
.unit.is-hon .u-spr::after { content: ""; position: absolute; left: 20%; top: 30%; width: 2px; height: 2px; pointer-events: none;
  animation: motes 1.6s steps(4) infinite; }
@keyframes aura { 50% { opacity: .55; transform: scale(1.08, 1.04); } }
@keyframes motes {
  0% { box-shadow: 0 0 transparent; }
  25% { box-shadow: 4px 8px #dff4ff, calc(var(--uw) * .5) 4px #9fe3ff; }
  50% { box-shadow: 4px 2px #9fe3ff, calc(var(--uw) * .5) -2px #dff4ff, calc(var(--uw) * .3) 10px #fff; }
  75% { box-shadow: 4px -4px rgba(159,227,255,.5), calc(var(--uw) * .3) 4px #9fe3ff; }
}
/* 挑戦者(💣の馬)は陣形と向かい合う(左向き)。札は💣の金 */
.bt-chal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bt-chal .u-spr { transform: scaleX(-1); }
.chal-tag { font-family: var(--f-px); font-size: 8px; line-height: 16px; letter-spacing: 1px; color: #1a0620; background: var(--gold);
            padding: 2px 6px; border: 2px solid #1a0620; box-shadow: 0 0 0 2px var(--gold), 3px 3px 0 2px rgba(0,0,0,.5); }
.fx .chal-tag { animation: blink 1s steps(2) infinite; }
.fx .battle.go .bt-chal { animation: chalin .5s steps(5) .1s both; }
@keyframes chalin { from { transform: translateX(80px); opacity: 0; } 20% { opacity: 1; } }
@media (max-width: 639.98px) {
  .battle.is-boss .bt-col.back { display: none; }
  .bt-chal .u-chips { display: none; }
  .battle.is-boss .bt-field { padding-left: 8px; padding-right: 10px; }
}
/* 行進は .go が付いてから(fx.js。BOSSの登場演出のあと) */
.fx .bt-col { animation: none; }
.fx .battle.go .bt-col { animation: march .5s steps(5) both; }
.fx .battle.go .bt-col.mid { animation-delay: .1s; } .fx .battle.go .bt-col.front { animation-delay: .2s; }
.fx .vs { animation: none; }
.fx .battle.go .vs { animation: slam .4s steps(4) .45s both, vsglow 1.2s steps(1) 1s infinite; }
.fx .battle.go.hit { animation: shake .36s steps(1); }

/* ---------- BOSS ENCOUNTER(★★のレース。fx.js が1回だけ出す。タップ・キーで飛ばせる。reduced-motion では出さない) ---------- */
.enc { position: fixed; inset: 0; z-index: 10001; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.enc::before { content: ""; position: absolute; inset: 0; background: #12030f; animation: encflash .45s steps(1) forwards; }
@keyframes encflash { 0% { background: #fff; } 15% { background: #12030f; } 30% { background: #fff; } 45% { background: #3a0b2a; } 60%, 100% { background: rgba(18,3,15,.92); } }
.enc-band { position: relative; width: 100%; padding: 20px 16px 18px; text-align: center; transform: translateX(105%);
            background: repeating-linear-gradient(0deg, #3a0b2a 0 4px, #2a0820 4px 8px);
            border-top: 4px solid #ff7a6e; border-bottom: 4px solid #b81e1e; box-shadow: 0 0 0 4px #12030f, 0 12px 0 4px rgba(0,0,0,.4);
            animation: encin .3s steps(6) .42s forwards; }
@keyframes encin { to { transform: none; } }
.enc-t { margin: 0; font-family: var(--f-px); font-size: 24px; line-height: 1.2; letter-spacing: 2px; color: #fff; text-shadow: 3px 3px 0 #b81e1e, 6px 6px 0 #12030f; }
.enc-n { margin: 12px 0 0; font-family: var(--f-dot); font-size: 16px; color: #fff; }
.enc-n .stars { margin-left: 8px; }
.enc-s { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font-size: var(--fs-s); color: #d7c6e6; }
.enc.out { animation: encout .26s steps(4) forwards; }
@keyframes encout { to { clip-path: inset(50% 0 50% 0); } }
@media (min-width: 700px) { .enc-t { font-size: 32px; } .enc-n { font-size: 24px; } }

/* ---------- 開閉(details)はコマ送りで開く ---------- */
.fx .srow[open] > .srow-body, .fx .menu[open] > .menu-win { animation: accopen .24s steps(4) both; }
@keyframes accopen { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(-20px); } }

/* ---------- お知らせ(画面効果の切り替えなど) ---------- */
.toast { position: fixed; left: 50%; bottom: 80px; z-index: 10003; transform: translateX(-50%); max-width: calc(100vw - 32px);
         padding: 8px 16px; font-family: var(--f-dot); font-size: 16px; color: #fff; pointer-events: none;
         background: var(--dither) 0 0 / 4px 4px, var(--win); border: 3px solid; border-color: #fff #9fb0ee #9fb0ee #fff;
         box-shadow: 0 0 0 2px var(--bg-deep), 5px 5px 0 2px rgba(0,0,0,.45); animation: toast 2s steps(1) forwards; }
@keyframes toast { 0% { clip-path: inset(0 50% 0 50%); } 6% { clip-path: inset(0 20% 0 20%); } 12%, 88% { clip-path: inset(0); } 94% { clip-path: inset(0 20% 0 20%); } 100% { clip-path: inset(0 50% 0 50%); } }

/* round5 調整: 景色は PC で3倍(1ドット=3px)、名前には暗い下地 */
@media (min-width: 700px) {
  .world-scene { height: 128px; background-size: 384px 120px, auto, auto; }
  @keyframes scenepan { to { background-position: -384px 0, 0 0, 0 0; } }
  .bt-field { min-height: 196px; }
}
.u-name { background: rgba(5,12,42,.78); padding: 0 6px; box-shadow: 2px 2px 0 rgba(0,0,0,.4); }
@media (min-width: 1100px) { .header-inner { flex-wrap: nowrap; } }
.srow > summary { grid-template-columns: 64px minmax(0, 1fr) auto; }
.srow-no { white-space: nowrap; }
@media (min-width: 700px) { .srow > summary { grid-template-columns: 64px minmax(0, 15em) minmax(0, 1fr) auto; } }
@media (min-width: 640px) { .gauge { grid-template-columns: 12em minmax(0, 1fr) 9.5em; } }
/* 案内役の馬も待機モーション */
.talk-face { background-image: url(px/horse_idle.svg); background-size: 256px auto; background-position: 2px 50%; animation: faceidle 2s steps(4) infinite; }
@keyframes faceidle { to { background-position: -254px 50%; } }
@media (max-width: 520px) {
  .talk-face { background-size: 200px auto; background-position: 1px 50%; animation-name: faceidle-s; }
  @keyframes faceidle-s { to { background-position: -199px 50%; } }
}
.pv-talk .talk-face { background-size: 256px auto; background-position: 0 50%; animation-name: faceidle-p; }
@keyframes faceidle-p { to { background-position: -256px 50%; } }

/* ================= 2026-10-22 コラム(blog): 章立てのもくじ・パンくず・記事のもくじ・読んだ位置のゲージ ================= */
.crumbs ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px;
             font-size: var(--fs-s); color: var(--muted); }
.crumbs li { min-width: 0; }
.crumbs li + li::before { content: "▶"; font-family: var(--f-dot); font-size: .7em; margin-right: 6px; color: var(--edge2); }
.crumbs a { display: inline-block; padding: 6px 0; }
.crumbs li[aria-current] { color: var(--text); flex: 1 1 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 章のもくじ(コラム一覧)。中身のある章は押せる窓、まだ無い章は灰色の点線 */
.ch-toc .ch-list { list-style: none; columns: auto; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 12px; }
.ch-list li { padding: 0; }
.ch-list a, .ch-lock { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; font-family: var(--f-dot); font-size: 16px;
                       text-decoration: none; color: var(--text); 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); }
.ch-list a:hover, .ch-list a:focus-visible { color: #fff; border-color: #fff; box-shadow: var(--glow), 0 3px 0 rgba(0,0,0,.4); }
.ch-list a:active { transform: translateY(2px); }
.ch-no, .ch-n { flex: 0 0 auto; white-space: nowrap; }
.ch-no { font-family: var(--f-px); font-size: 8px; line-height: 1; color: var(--bg-deep); background: var(--accent); padding: 4px 5px; }
.ch-n { margin-left: auto; font-family: var(--f-px); font-size: 8px; color: var(--accent); }
.ch-lock { opacity: .55; border-style: dashed; box-shadow: none; }
.ch-lock .ch-no { background: var(--miss); }
.ch-lock .ch-n { font-family: var(--f-dot); font-size: var(--fs-s); color: var(--muted); }
.ch-more { margin: 8px 0 0; text-align: right; }
.tag-cloud, .ch-chips { margin: 0 0 28px; }
.row-cat { margin-left: 8px; padding: 0 5px; border: 1px solid var(--edge2); color: #dfe6ff; white-space: nowrap; }
.row-min { margin-left: 8px; white-space: nowrap; }

/* 記事の頭(公開日・更新日・読む時間)と記事のもくじ */
.post-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: -8px 0 8px; font-size: var(--fs-s); color: var(--muted); }
.post-meta b { font-family: var(--f-dot); font-weight: 400; color: var(--accent); margin-right: 2px; }
.post-chips { margin: 0 0 16px; }
.ptoc { margin: 0 0 24px; padding: 12px 16px 10px; background: var(--dither) 0 0 / 4px 4px, var(--bg-deep); border: 2px solid var(--edge2);
        box-shadow: inset 2px 2px 0 rgba(255,255,255,.06), 4px 4px 0 rgba(0,0,0,.35); line-height: 1.7; }
.ptoc ol { margin: 0; padding-left: 1.8em; }
.ptoc li::marker { font-family: var(--f-px); font-size: 8px; color: var(--accent); }
.ptoc a { display: inline-block; padding: 4px 0; }
.related h2 { margin-bottom: 4px; }

/* お問い合わせのメール(JSで組み立てる。JSなしは noscript の表記) */
.mail-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.mail-box[hidden], .rprog[hidden] { display: none; }
.mail-addr { font-family: var(--f-body); user-select: all; }

/* 読んだ位置のゲージ: ヘッダーの下を、ドット絵の馬がゴールの旗まで走る(スクロール中だけ脚が動く)。
   色は中立の水色(赤＝★★・金＝💣・緑＝的中 は使わない)。JSなしは出さない、reduced-motion は馬なしのゲージだけ */
.rprog { --p: 0; position: absolute; left: 0; right: 0; top: calc(100% + 8px); height: 20px; pointer-events: none;
         background: rgba(5,12,42,.94); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.rprog::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(91,124,240,.35); }
.rprog-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 100%);
             background: repeating-linear-gradient(90deg, var(--accent) 0 6px, #5fb8e0 6px 8px); }
.rprog-horse { position: absolute; bottom: 3px; left: calc(var(--p) * (100% - 52px)); width: 24px; height: 16px;
               background: url(px/horse_run.svg) 0 0 / 96px 16px no-repeat; image-rendering: pixelated; image-rendering: crisp-edges; }
.rprog.run .rprog-horse { animation: rp-run .32s steps(4) infinite; }
.rprog.back .rprog-horse { transform: scaleX(-1); }
@keyframes rp-run { to { background-position: -96px 0; } }
.rprog-goal { position: absolute; right: 6px; bottom: 4px; font-size: 16px; opacity: .5; }
.rprog.goal .rprog-goal { opacity: 1; }
html.has-rprog { scroll-padding-top: 112px; }
@media (prefers-reduced-motion: reduce) { .rprog-horse { display: none; } }

/* 2026-11-21 レースページ「評価のくわしい中身」: スマホで馬名などが縦に割れないように(はみ出す分は横スクロール) */
table.eval th, table.eval td { white-space: nowrap; }
table.eval td:last-child { white-space: normal; min-width: 12em; text-align: left; }
/* 2026-11-21 表を枠(.card)の中だけで横スクロールさせる入れ物(スマホ用)。「出走馬」と「評価のくわしい中身」の表 */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll:focus-visible { outline: 3px dashed #fff; outline-offset: 3px; }
/* 2026-11-21 レースページ「出走馬」(JRA公式の出馬表): セルは折り返さない。馬名・騎手は左寄せ、ほかは中央 */
table.data.runners { font-size: 15px; }
table.data.runners th, table.data.runners td { white-space: nowrap; text-align: center; }
table.data.runners .rn-l { text-align: left; }
table.data.runners tr.is-bomb td { background: rgba(255,210,63,.08); color: var(--gold); }
table.data.runners tr.is-bomb .mark, table.data.runners tr.is-bomb b { color: var(--gold); }
table.data.runners tr.is-out td { color: var(--muted); }

/* 2026-11-22 レースページ「全頭の評価」: スマホで読みやすい1頭1行のカード */
.evlist { list-style: none; margin: 8px 0 0; padding: 0; }
.evlist .ev { display: grid; grid-template-columns: 2.6em 2.4em 1fr auto; grid-template-areas: "rk mk main num" "rk mk main fin"; align-items: center; gap: 2px 8px; padding: 10px 6px; border-bottom: 1px dashed rgba(255,255,255,.18); }
.evlist .ev.is-mark { background: rgba(255,255,255,.05); }
.evlist .ev.is-bomb { background: rgba(255,204,51,.12); }
.evlist .ev.is-out { opacity: .5; }
.ev-rank { grid-area: rk; font-family: var(--f-dot); font-size: 20px; color: var(--gold, #ffcc33); text-align: center; }
.ev-rank small { font-size: 11px; }
.ev-mark { grid-area: mk; font-size: 18px; text-align: center; white-space: nowrap; }
.ev-main { grid-area: main; min-width: 0; }
.ev-name { display: block; font-size: 17px; font-weight: 700; line-height: 1.4; }
.ev-no { display: inline-block; min-width: 1.6em; margin-right: 6px; padding: 0 4px; border: 1px solid rgba(255,255,255,.5); font-size: 14px; text-align: center; }
.ev-sub { display: block; font-size: 13px; color: var(--muted, #bac4ee); line-height: 1.5; }
.ev-pt { color: #9fe6b8; }
.ev-num { grid-area: num; display: flex; flex-direction: column; align-items: flex-end; font-size: 18px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.ev-num small { font-size: 11px; font-weight: 400; color: var(--muted, #bac4ee); margin-right: 4px; }
.ev-fin { grid-area: fin; justify-self: end; font-size: 13px; padding: 1px 6px; border: 1px solid #9fe6b8; color: #9fe6b8; }
/* ---------- Xでシェア(2026-11-22)。外部スクリプトなしの普通のリンク。黒いドットのボタン ---------- */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.share-row .muted { margin: 0; font-size: var(--fs-s); }
.xshare { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; max-width: 100%;
          font-family: var(--f-dot); font-size: 16px; line-height: 1.4; color: #fff; text-decoration: none; background: #0b0b0b;
          border: 3px solid var(--bg-deep); box-shadow: inset -3px -3px 0 #000, inset 3px 3px 0 #5a5a5a, 0 4px 0 var(--bg-deep), 3px 7px 0 rgba(0,0,0,.35);
          transition: transform .05s steps(1); }
.xshare:hover, .xshare:focus-visible { color: #fff; background: #222; transform: translateY(-2px); }
.xshare:active { transform: translateY(3px); box-shadow: inset 3px 3px 0 #000, inset -3px -3px 0 #5a5a5a; }
.xs-x { display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; font-family: var(--f-px); font-size: 12px; line-height: 1;
        color: #0b0b0b; background: #fff; box-shadow: 2px 2px 0 rgba(0,0,0,.5); }
/* 結果のまとめ(レースページ)・見出しの「予想と結果」 */
.recap { margin: 8px 0 10px; padding: 8px 10px; background: var(--bg-deep); border: 2px solid var(--edge2); line-height: 1.7; }
.recap b { font-family: var(--f-dot); font-weight: 400; color: var(--accent); margin-right: 6px; }
.h1-sub { display: inline-block; font-size: .6em; color: var(--accent); margin-left: 4px; vertical-align: .1em; white-space: nowrap; }
/* G1 のページ(2026-11-22) */
.g1-facts { display: grid; gap: 4px; margin: 12px 0 8px; }
.g1-facts > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 0 10px; padding: 4px 0; border-top: 2px dashed rgba(170,182,230,.28); }
.g1-facts dt { font-family: var(--f-dot); color: var(--muted); font-size: var(--fs-s); }
.g1-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 419.98px) { .g1-facts > div { grid-template-columns: minmax(0, 1fr); } }
.g1-st { display: block; font-size: var(--fs-s); color: var(--muted); }
.g1-chips .chip.on { border-color: var(--gold); color: var(--gold); }
.g1-link { margin: 0 0 14px; }
