/* ===== ゲーム本体：完全情報パネル方式 ===== */
#beta { position: absolute; inset: 0; z-index: 60; display: none; background: linear-gradient(180deg, #1b2f66 0%, #12224a 55%, #0a1126 100%); color: #fff; font-family: inherit; }
#beta .bv { position: absolute; inset: 0; display: none; }
#beta .bv.on { display: block; }
#beta button { font: inherit; cursor: pointer; }
.bb { color: #fff; background: linear-gradient(180deg, #5a8be8, #2a56b8); border: 3px solid #ffd54a; border-radius: 12px; padding: 8px 26px; font-size: 24px; }
.bb:hover { filter: brightness(1.15); }
.bb.sub { background: rgba(255,255,255,0.12); border-color: #9fb3d9; font-size: 20px; }
/* メニュー */
#bMenu .mrow { position: absolute; left: 110px; width: 1060px; height: 168px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; text-align: left; border-radius: 18px; border-width: 4px; box-shadow: 0 6px 0 #14306e, 0 12px 20px rgba(0,0,0,0.35); }
#bMenu .mtx { display: block; min-width: 0; }
#bMenu .mn { display: block; font-size: 56px; line-height: 1.15; letter-spacing: 4px; text-shadow: 0 3px 0 rgba(0,0,0,0.45); }
#bMenu .ms { display: block; margin-top: 10px; font-size: 26px; color: #ffe9a8; text-shadow: 0 2px 0 rgba(0,0,0,0.4); }
#bMenu .mbx { display: block; flex: none; min-width: 230px; text-align: right; }
#bMenu .ml { display: block; font-size: 24px; color: #cfe0ff; }
#bMenu .mvl { display: block; font-size: 66px; line-height: 1.05; color: #ffd54a; font-family: Consolas, "Courier New", monospace; text-shadow: 0 3px 0 rgba(0,0,0,0.5); }
#bMenu .mvl small { font-size: 28px; margin-left: 6px; font-family: inherit; }
#bMenu .mrow:disabled { opacity: 0.45; cursor: default; filter: none; }
#bMenu .mrow:not(:disabled):hover { transform: translateY(-2px); }
/* オプション */
#bOpt h1 { position: absolute; left: 0; right: 0; top: 34px; margin: 0; text-align: center; font-size: 52px; color: #ffd54a; text-shadow: 0 4px 0 #000; font-weight: normal; }
#bOpt .ol { font-size: 28px; }
#bOpt .oc { display: flex; align-items: center; gap: 18px; }
#bOpt .oc button:disabled { opacity: 0.35; cursor: default; filter: none; }
#bOpt #oRaceN { font-size: 22px; color: #ffd54a; } #bOpt #oRaceN.warn { color: #ff8a80; }
#bOpt .yc { gap: 8px; }
#bOpt .yc button { width: 52px; padding: 4px 0; font-size: 28px; }
#bOpt .yc button:disabled { opacity: 0.35; cursor: default; filter: none; }
#bOpt .yl { font-size: 18px; color: #cfe0ff; margin-left: 14px; }
#bOpt .yv { min-width: 84px; text-align: center; font-size: 34px; color: #ffd54a; font-family: Consolas, "Courier New", monospace; }
#bOpt .tg.onv { background: linear-gradient(180deg, #4caf50, #2e7d32); border-color: #ffd54a; }
/* プレイ */
#bTop { position: absolute; left: 30px; right: 30px; top: 12px; height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 24px; }
#bTop #bRace { font-size: 28px; letter-spacing: 3px; color: #ffd54a; text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
#bTop .sc span { font-family: Consolas, "Courier New", monospace; font-size: 34px; color: #ffd54a; }
/* 残り時間ゲージ：1秒=1セグメント。消灯は秒が変わるときだけ（アニメーション・transitionなし） */
#bPanel { position: absolute; left: 40px; top: 112px; width: 1200px; height: 330px; background: #fff; color: #333; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
#bPanel .ph { position: absolute; left: 20px; top: 8px; right: 20px; height: 64px; }
#bPanel .yr { position: absolute; left: 0; top: 0; font-size: 24px; color: #555; }
#bPanel .gc { position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: flex; border: 1px solid #ccc; font-size: 18px; font-weight: bold; }
#bPanel .gc span { padding: 2px 12px; }
#bPanel .gc .s { background: #dcedc8; font-weight: normal; }
#bPanel .gc .s.d { background: #efe0c8; }
#bPanel .tt { position: absolute; left: 0; top: 30px; font-size: 32px; font-weight: bold; color: #444; display: flex; align-items: center; }
#bPanel .tt .kai { font-size: 18px; margin-right: 8px; }
#bPanel .tt .gi { margin-left: 10px; background: #1976d2; color: #fff; font-size: 20px; padding: 0 16px; border-radius: 3px; }
#bTbl { position: absolute; left: 20px; top: 84px; width: 1160px; table-layout: fixed; border-collapse: collapse; font-size: 19px; }
#bTbl th { background: #37474f; color: #fff; font-size: 14px; line-height: 1.15; height: 50px; border-left: 1px solid #546e7a; }
#bTbl td { position: relative; height: 48px; text-align: center; border-bottom: 1px solid #ddd; white-space: nowrap; overflow: hidden; }
#bTbl tr:nth-child(odd) td { background: #f7f7f7; }
#bTbl td.nm { text-align: left; padding-left: 8px; font-size: 21px; }
#bTbl .wk { display: inline-block; width: 30px; line-height: 30px; font-weight: bold; border: 1px solid #aaa; }
#bTbl td.mk { color: transparent; }
#bTbl td.mk .wk { visibility: hidden; }
#bTbl td.mk::after { content: "？"; position: absolute; inset: 9px 10px; background: #dfe5e9; color: #90a4ae; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
#bTbl td.ans.mk::after { content: "？？？？？"; inset: 5px 8px; background: #fff3c4; color: #b8860b; letter-spacing: 4px; font-size: 22px; }   /* 無限の明滅アニメは廃止（常時フレーム生成を避ける） */
/* 開示時のフラッシュ：背景色アニメ（再描画）をやめ、opacityのみのアニメ（GPU合成）に変更 */
#bTbl td.flash::before, #bPanel .hm.flash::before { content: ""; position: absolute; inset: 0; background: #ffe082; border-radius: inherit; opacity: 0; pointer-events: none; animation: bflash 0.6s ease-out; }
@keyframes bflash { 0% { opacity: 0.6; } 100% { opacity: 0; } }
/* ゲーム表示中は、下にあるタイトル画面（背景・ボタン）を描画対象から外す */
body.beta-on #stage > *:not(#beta) { display: none !important; }
#bChoices { position: absolute; left: 40px; top: 452px; width: 1200px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#bChoices button { height: 54px; font-size: 24px; color: #fff; background: linear-gradient(180deg, #3f6fd6, #234a9c); border: 3px solid #ffd54a; border-radius: 12px; }
#bChoices button:hover:not(.done):not(:disabled) { filter: brightness(1.2); }
#bChoices button.ok { background: #2e9b4a; }
#bChoices button.ng { background: #b3261e; }
#bChoices button:disabled { cursor: default; opacity: 0.9; }
#bFb { position: absolute; left: 40px; top: 580px; width: 1200px; height: 114px; background: rgba(0,0,0,0.45); border: 3px solid #9fb3d9; border-radius: 12px; display: none; }
#bFb.on { display: block; }
#bFb .m { position: absolute; left: 20px; top: 8px; font-size: 32px; }
#bFb .m.ok { color: #7dff9b; } #bFb .m.ng { color: #ff9b9b; }
#bFb .c { position: absolute; left: 20px; top: 56px; right: 240px; font-size: 18px; line-height: 1.45; color: #e8f0ff; }
#bFb .c b { font-size: 26px; color: #ffd54a; margin-right: 12px; }
#bFb .bb { position: absolute; right: 20px; top: 40px; }
#bQuit { position: absolute; right: 30px; bottom: 3px; font-size: 13px; padding: 0 14px; border-width: 2px; }
/* 結果 */
#bResult h2 { position: absolute; left: 0; right: 0; top: 24px; margin: 0; text-align: center; font-size: 44px; color: #ffd54a; font-weight: normal; }
#bResult .big { position: absolute; left: 90px; top: 110px; width: 300px; text-align: center; }
#bResult .big .rk { font-size: 190px; line-height: 1; color: #ffd54a; text-shadow: 0 6px 0 #000; }
#bResult .big .tot { font-size: 40px; font-family: Consolas, "Courier New", monospace; }
#bResult .big .best { font-size: 20px; color: #cfe0ff; margin-top: 6px; line-height: 1.5; }
#bResult .big .best small { font-size: 15px; color: #9fb3d9; }
#bList { position: absolute; left: 420px; top: 100px; width: 780px; border-collapse: collapse; font-size: 22px; }
#bList td { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.2); }
#bList .ok { color: #7dff9b; } #bList .ng { color: #ff9b9b; }
#bResult .btns { position: absolute; left: 0; right: 0; top: 625px; text-align: center; }
#bResult .btns .bb { margin: 0 8px; }

/* ヒント扱いのヘッダ項目（年・回・馬場）と勝ち馬の血統欄 */
#bPanel .hm { position: relative; display: inline-block; }
#bPanel .hm.mk { color: transparent; background: #dfe5e9; border-radius: 6px; }
#bPanel .hm.mk::after { content: "？"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #90a4ae; font-size: 18px; }
#bPanel .yr .hm { padding: 0 8px; }
#bPanel .tt .kai .hm { padding: 0 6px; }
#bPanel .pd { position: absolute; right: 0; top: 0; height: 64px; display: flex; align-items: center; gap: 12px; }
#bPanel .pd .pc { font-size: 13px; line-height: 1.25; color: #777; text-align: center; border-right: 1px solid #ccc; padding-right: 12px; }
#bPanel .pd .pr { display: flex; align-items: center; gap: 8px; height: 21px; font-size: 17px; font-weight: bold; color: #444; }   /* 父・母・母の父の3行を64pxの枠に収める */
#bPanel .pd .pl { width: 46px; line-height: 18px; text-align: center; font-size: 12px; color: #fff; background: #607d8b; border-radius: 3px; }
#bPanel .pd .pr .hm { min-width: 250px; padding: 0 8px; height: 18px; line-height: 18px; }   /* 伏せ枠どうしがくっつかないよう、行高21pxより少し低く */
#bPanel .pd .pr .hm.mk::after { font-size: 14px; }
#bPanel .pd .pv { min-width: 250px; padding: 0 8px; color: #999; }

/* 血統・戦績モード：勝ち馬カード（#bPB）。年・レース名は成績パネルの .ph を流用。マスク（.mk）は共通 */
#bPB { display: none; }
#bPB .pd { align-items: flex-start; }
#bPB .cwho { background: #fff3c4; color: #8a6d00; border: 2px solid #e0b84a; border-radius: 8px; padding: 4px 16px; font-size: 22px; font-weight: bold; text-align: center; line-height: 1.2; }
#bPB .cwho small { display: block; font-size: 12px; font-weight: normal; }
#bPB .cbody { position: absolute; left: 20px; right: 20px; top: 78px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
#bPB .cr { display: flex; gap: 8px; }
#bPB .ct { flex: 1; min-width: 0; height: 60px; box-sizing: border-box; padding: 3px 8px; background: #f4f6f8; border: 1px solid #dde3e8; border-radius: 6px; }
#bPB .cl { font-size: 12px; line-height: 15px; color: #78909c; }
#bPanel #bPB .cv { display: flex; align-items: center; height: 34px; font-size: 21px; font-weight: bold; color: #333; overflow: hidden; }
#bPanel #bPB .cv.sm { font-size: 14px; line-height: 16px; }
#bPB .cwr { display: flex; gap: 8px; flex: 1; min-height: 0; }
#bPB .cwl { width: 50px; display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1.25; color: #777; text-align: center; border-right: 1px solid #ccc; padding-right: 8px; }
#bPB .cwg { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: row dense; grid-auto-rows: 20px; gap: 2px 8px; align-content: start; }
#bPanel #bPB .cv.wl { height: 20px; font-size: 13px; font-weight: normal; padding: 0 6px; background: #f4f6f8; white-space: nowrap; }
#bPanel #bPB .cv.wl.xs { grid-column: span 2; }
#bPanel #bPB .cv.mk { color: transparent; background: #dfe5e9; }
/* 解答後の表示（2行） */
#bFb .m { top: 6px; font-size: 30px; }
#bFb .c { top: 44px; font-size: 16px; line-height: 1.3; }   /* 3行（血統／馬主・牧場／1番人気凡走）が収まる */
#bTbl.r4 td { height: 38px; }   /* 同着で行が増える年（予約行を含め5行） */
#bTbl.r4 td.mk::after { inset: 5px 10px; }
#bTbl.r4 td.ans.mk::after { inset: 3px 8px; font-size: 18px; }
#bTbl tr.fv td { background: #fff; }   /* 1番人気凡走馬の予約行（解答前・凡走なしのときは空白） */
#bTbl tr.fv.on td { background: #fdecea; }
#bTbl tr.fv .wk { width: 26px; line-height: 26px; }

/* タイピング回答（選択肢ボタンの位置に入力欄を置く） */
#bType { position: absolute; left: 40px; top: 470px; width: 1200px; display: none; align-items: center; gap: 16px; }
#bType input { flex: 1; height: 64px; font: inherit; font-size: 32px; padding: 0 20px; color: #fff; background: rgba(0,0,0,0.4); border: 3px solid #ffd54a; border-radius: 12px; outline: none; }
#bType input:focus { box-shadow: 0 0 0 3px rgba(255,213,74,0.35); }
#bType input.ok { background: #2e9b4a; } #bType input.ng { background: #b3261e; }
#bType input:disabled { opacity: 0.95; }
#bType .bb { height: 64px; padding: 0 40px; }
#bType .bb:disabled { cursor: default; opacity: 0.5; filter: none; }

/* 出題するレースの選択画面 */
#bRaces h1 { position: absolute; left: 0; right: 0; top: 36px; margin: 0; text-align: center; font-size: 52px; color: #ffd54a; text-shadow: 0 4px 0 #000; font-weight: normal; }
#bRaces .rg { position: absolute; left: 60px; top: 130px; width: 1160px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; }
#bRaces .rc { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 12px; background: rgba(255,255,255,0.1); border: 2px solid #9fb3d9; border-radius: 10px; cursor: pointer; }
#bRaces .rc:hover { background: rgba(255,255,255,0.2); }
#bRaces .rc input { width: 24px; height: 24px; accent-color: #ffd54a; flex: none; cursor: pointer; }
#bRaces .rc .rn { font-size: 21px; flex: 1; white-space: nowrap; }
#bRaces .rc .rs { font-size: 14px; color: #cfe0ff; flex: none; }
#bRaces .rc.nodata { opacity: 0.5; }
#bRaces .rinfo { position: absolute; left: 60px; width: 1160px; top: 548px; text-align: center; font-size: 18px; color: #cfe0ff; }
#bRaces .rinfo.warn { color: #ff8a80; }
#bRaces .rbtns { position: absolute; left: 0; right: 0; top: 610px; text-align: center; }
#bRaces .rbtns .bb { margin: 0 10px; }
#bRaces .rbtns .bb:disabled { opacity: 0.35; cursor: default; filter: none; }

/* ---- v1.4.0：メニュー・オプション・ルールの整頓 ---- */
#beta button { user-select: none; -webkit-user-select: none; }
#bMenu .mbtns { position: absolute; left: 0; right: 0; top: 618px; display: flex; justify-content: center; gap: 24px; }
#bMenu .mbtns .bb { min-width: 220px; }
#bOpt .olist { position: absolute; left: 190px; width: 900px; top: 124px; }
#bOpt .orow { position: relative; height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(159,179,217,0.28); }
#bOpt .orow:last-child { border-bottom: none; }
#bOpt .ol { font-size: 26px; }
#bOpt .oc button { width: 60px; padding: 4px 0; font-size: 30px; }
#bOpt .oc button.tx, #bOpt .oc button.tg { width: auto; min-width: 150px; padding: 6px 18px; font-size: 21px; white-space: nowrap; }
#bOpt #oVal { min-width: 112px; text-align: center; font-size: 40px; color: #ffd54a; font-family: Consolas, "Courier New", monospace; }
#bOpt .back, #bRules .back { position: absolute; left: 50%; top: 656px; transform: translateX(-50%); min-width: 160px; }
#bRules h1 { position: absolute; left: 0; right: 0; top: 40px; margin: 0; text-align: center; font-size: 52px; color: #ffd54a; text-shadow: 0 4px 0 #000; font-weight: normal; }
#bRules .rtext { position: absolute; left: 190px; width: 900px; top: 124px; height: 480px; overflow-y: auto; padding-right: 18px; font-size: 19px; line-height: 1.65; color: #dbe6ff; }
#bRules .rtext h2 { margin: 18px 0 4px; font-size: 22px; color: #ffd54a; font-weight: normal; }
#bRules .rtext h2:first-child { margin-top: 0; }
#bRules .rtext p { margin: 0; }
#bRules .rtext b { color: #fff; }
#bRules .rtext::-webkit-scrollbar { width: 10px; } #bRules .rtext::-webkit-scrollbar-thumb { background: #5b6fa0; border-radius: 5px; }

/* v1.6.9 解答後パネル：判定は右上に小さく。勝ち馬の生涯成績・獲得賞金・主な勝ち鞍・馬主・生産を主役に */
#bFb .m { left: auto; right: 20px; top: 12px; width: 210px; text-align: right; font-size: 20px; }
#bFb .c { top: 6px; right: 250px; font-size: 16px; line-height: 1.3; }
#bFb .c > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bFb .c > div:empty { display: none; }
#bFb .c .w { font-size: 15px; }
#bFb .bb { top: 52px; }
#bChoices button.done { cursor: default; opacity: 0.9; }
#bChoices button.done:hover { box-shadow: 0 0 0 3px rgba(255,255,255,0.75); }

#bPanel .tt .gi.g2 { background: #c62828; }
#bPanel .tt .gi.g3 { background: #2e7d32; }
#bOpt .gb { width: 130px; padding: 4px 0; font-size: 22px; }

#bOpt .oc button:not(.gb) { }

/* v1.12.0 オプション画面：タブ（出題範囲／重賞・非G1馬／フルゲート／回答・音・その他）と、各項目の説明文 */
#bOpt .otabs { position: absolute; left: 190px; width: 900px; top: 122px; display: flex; gap: 10px; }
#bOpt .otab { flex: 1; padding: 8px 0; font-size: 21px; white-space: nowrap; }
#bOpt .otab.sel { background: linear-gradient(180deg, #ffe38a, #f0b400); color: #1a1a1a; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,213,74,0.55); }
#bOpt .olist { top: 194px; }
#bOpt .olist .orow { height: 82px; display: none; }
#bOpt[data-tab="1"] .orow[data-t="1"], #bOpt[data-tab="2"] .orow[data-t="2"], #bOpt[data-tab="3"] .orow[data-t="3"], #bOpt[data-tab="4"] .orow[data-t="4"] { display: flex; }
#bOpt .olx { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
#bOpt .olist .ol { font-size: 26px; }
#bOpt .od { font-size: 15px; line-height: 1.35; color: #a9bbe0; }

#bPlay .hv { cursor: help; text-decoration: underline dotted; text-underline-offset: 4px; }   /* 解答後、名馬カードのある馬名（マウスオーバーでプロフィール） */

/* v1.13.1 解答後のプロフィールに血統・生誕・抹消の行（.pg）を追加。名前を少し小さく・行間を詰めて収める */
#bFb .c { line-height: 1.22; }
#bFb .c b { font-size: 22px; margin-right: 10px; }
#bFb .c .pg { font-size: 15px; color: #cfe0ff; }
#bFb .c { right: 180px; }
#bFb .c .w { display: flex; }   /* 勝ち鞍が長くて切れるときも、末尾の「等」は必ず見えるようにする */
#bFb .c .w .wt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bFb .c .w .wm { flex: none; }
