/* ミニカーシティの画面（2026-11-01 項目196「ゲームレース風モーショングラフィックスUIに全てのUIは刷新」）
   板＝墨（ほぼ黒）・字＝白・強調＝黄緑（--volt）と紅（--hot）。オレンジと紺は使わない（feedback_no_black_orange）。
   形＝斜めに切った板（clip-path）。動き＝transform と opacity だけ（重い処理の間も合成の層で回る）。数字＝細身の斜体（Barlow Condensed） */
:root {
  --ink: #0b0d12; --ink2: #151a23; --ink3: #232b38; --line: rgba(255, 255, 255, .16); --mute: #b9c3d0; --paper: #ffffff;
  --volt: #d6ff3f; --hot: #ff2e6a; --hotd: #c8004c; --gold: #ffd84a; --silver: #e3e8ee; --bronze: #c9a27e; --sky: #8fd8ff;
  --disp: 'Dela Gothic One', 'Zen Kaku Gothic New', sans-serif; --body: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif; --num: 'Barlow Condensed', 'Dela Gothic One', sans-serif;
  --cut: 14px; --para: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); --cham: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  --ease: cubic-bezier(.2, .9, .2, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  /* 前の名前（ほかの画面の JS・ほかのセッションの部品が使う） */
  --navy: var(--ink); --pink: var(--hot); --yellow: var(--volt); --green: var(--volt); --soft: var(--ink3);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* 横向きで文字が勝手に大きくならない（項目149） */
html, body { margin: 0; height: 100%; overflow: clip; overscroll-behavior: none; background: var(--ink); font-family: var(--body); color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
button { font-family: var(--body); cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--volt); }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
.num, #spd, #rpos, #center, .cnt { font-family: var(--num); font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- 部品 ---------- */
/* 斜めの板のボタン */
.pill { position: relative; border: 0; background: var(--ink3); color: #fff; font-weight: 900; font-size: 16px; padding: 12px 24px; min-height: 48px; clip-path: var(--para); transition: transform .12s, background .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pill.strong { background: var(--volt); color: var(--ink); }
.pill.hotb { background: var(--hot); color: var(--ink); }
.pill:active { transform: translateX(3px) scale(.98); }
.pill:disabled { opacity: .5; cursor: default; }
.pill .i { width: 22px; height: 22px; }
.back { background: var(--ink2); }
.pill.back.icob { padding: 8px 20px; } .pill.back.icob .i { width: 26px; height: 26px; display: inline-block; }
.coins { margin-left: auto; background: var(--ink); color: var(--volt); font-family: var(--num); font-style: italic; font-weight: 800; font-size: 20px; padding: 6px 16px 6px 12px; clip-path: var(--para); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; box-shadow: inset 0 0 0 2px var(--line); }
.coins .i { width: 22px; height: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips i, .chip { font-style: normal; font-size: 12px; font-weight: 900; padding: 3px 10px; background: var(--ink3); color: #fff; clip-path: var(--para); white-space: nowrap; }
.chips i.v, .chip.v { background: var(--volt); color: var(--ink); } .chips i.h, .chip.h { background: var(--hot); color: var(--ink); }
.chips i.night { background: #2b2f4a; color: #fff; } .chips i.fw { background: var(--hot); color: var(--ink); }
.nb { white-space: nowrap; } /* 数字と単位（30 m・150 km/h）を割らない */
.logo { vertical-align: middle; flex: none; }
/* 見出しの帯：もどる・名前・コイン */
.hdr { display: flex; align-items: center; gap: 12px; }
.hdr h2 { margin: 0; font-family: var(--disp); font-weight: 400; font-size: clamp(22px, 3.2vw, 32px); color: #fff; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hdr h2::before { content: ''; flex: none; width: 10px; height: 1.1em; background: var(--volt); transform: skewX(-18deg); }
/* 速さの線（右から左へ流れる。合成の層だけで動く） */
.speedlines { position: absolute; inset: -30% -60%; pointer-events: none; transform: skewX(-22deg); opacity: .55;
  background: repeating-linear-gradient(90deg, transparent 0 70px, rgba(255, 255, 255, .22) 70px 72px, transparent 72px 128px, rgba(214, 255, 63, .35) 128px 129px, transparent 129px 220px);
  animation: lines .5s linear infinite; }
@keyframes lines { from { transform: skewX(-22deg) translateX(0); } to { transform: skewX(-22deg) translateX(-220px); } }
/* 板が左から差し込む（--i の順に少しずつ遅らせる） */
@keyframes inL { from { transform: translateX(-48px) skewX(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inR { from { transform: translateX(48px) skewX(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inU { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(1.9); opacity: 0; } 55% { transform: scale(.94); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.screen:not([hidden]) .hdr, .screen:not([hidden]) .menu > *, .screen:not([hidden]) .mode, .screen:not([hidden]) .pbox > *, .screen:not([hidden]) .gside, .screen:not([hidden]) .rtr, .screen:not([hidden]) .gpcard, .screen:not([hidden]) .course { animation: inL .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.screen:not([hidden]) .glist, .screen:not([hidden]) .sub3 { animation: inU .45s var(--ease) .1s both; }
/* 画面の切り替えの帯（main.js の showScreen が .go を付け直す） */
#wipe { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: clip; }
#wipe i { position: absolute; top: -10%; bottom: -10%; left: 0; width: 55%; transform: skewX(-18deg) translateX(calc(-100% - 25vh)); background: var(--volt); will-change: transform; visibility: hidden; }
#wipe i:nth-child(2) { background: var(--hot); width: 22%; } #wipe i:nth-child(3) { background: var(--ink); width: 40%; }
#wipe.go i { visibility: visible; animation: wipe .5s cubic-bezier(.7, 0, .3, 1) both; }
#wipe.go i:nth-child(2) { animation-delay: .04s; } #wipe.go i:nth-child(3) { animation-delay: .08s; }
@keyframes wipe { from { transform: skewX(-18deg) translateX(calc(-100% - 25vh)); } to { transform: skewX(-18deg) translateX(calc(100vw + 25vh)); } } /* 帯の幅によらず、左の外から右の外まで抜ける（前は自分の幅の 560% だけ動き、細いピンクの帯が真ん中で止まって残っていた・項目 210）。25vh＝斜めの分のはみ出し */
@media (prefers-reduced-motion: reduce) { #wipe { display: none; } .speedlines { animation: none; } }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button, #hud #steer { pointer-events: auto; }
.hudp { background: rgba(11, 13, 18, .82); clip-path: var(--para); }
#speed { position: absolute; left: 50%; bottom: calc(12px + var(--sab)); translate: -50% 0; display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 6px; color: #fff; padding: 2px 22px 8px; background: rgba(11, 13, 18, .78); clip-path: var(--para); }
#speed b { font-size: 54px; line-height: .95; min-width: 3ch; text-align: right; }
#speed span { font-weight: 900; font-size: 13px; padding-bottom: 7px; color: var(--mute); }
#spdbar, #drift { grid-column: 1 / 3; display: block; height: 7px; margin-top: 4px; width: 160px; overflow: clip; background: rgba(255, 255, 255, .14); clip-path: var(--para); }
#spdbar u, #drift u { display: block; height: 100%; width: 0%; background: var(--volt); }
#spdbar u { background: repeating-linear-gradient(90deg, var(--volt) 0 9px, transparent 9px 12px); }
#drift { height: 5px; margin-top: 3px; opacity: 0; transition: opacity .2s; }
#drift.on { opacity: 1; }
#drift u { background: #fff; } #drift.l1 u { background: var(--sky); } #drift.l2 u { background: var(--hot); }
#mini { position: absolute; top: calc(10px + var(--sat)); right: calc(10px + var(--sar)); width: 138px; height: 138px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 0 0 2px var(--volt); background: #4c6b54; }
#raceinfo { position: absolute; top: calc(10px + var(--sat)); left: calc(12px + var(--sal)); color: #fff; display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: end; padding: 6px 22px 8px 16px; background: rgba(11, 13, 18, .8); clip-path: var(--para); }
#rpos { font-size: 58px; line-height: .9; grid-row: 1 / 4; color: var(--volt); }
#rpos small { font-size: 22px; margin-left: 2px; color: #fff; font-family: var(--body); font-style: normal; font-weight: 900; }
#rlap { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 22px; line-height: 1; }
#rtime, #rbest { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 17px; line-height: 1.15; color: var(--mute); font-variant-numeric: tabular-nums; }
#rtime { color: #fff; }
#toast { position: absolute; top: calc(66px + var(--sat)); left: 50%; translate: -50% -10px; background: rgba(11, 13, 18, .9); color: #fff; font-weight: 900; padding: 8px 22px 8px 26px; font-size: 16px; opacity: 0; transition: opacity .25s, translate .3s var(--ease); white-space: nowrap; clip-path: var(--para); box-shadow: inset 6px 0 0 var(--volt); }
#toast.on { opacity: 1; translate: -50% 0; }
#center { position: absolute; top: 34%; left: 50%; translate: -50% -50%; font-size: 150px; line-height: 1; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; white-space: nowrap; text-align: center; text-shadow: 6px 6px 0 var(--hot); }
#center.go { font-family: var(--disp); font-style: normal; font-weight: 400; font-size: 76px; color: var(--volt); text-shadow: 5px 5px 0 var(--ink); -webkit-text-stroke: 0; }
#center.pop { animation: pop .38s var(--ease) both; }
#center.small { font-family: var(--body); font-style: normal; font-weight: 900; font-size: 24px; background: var(--hot); color: var(--ink); padding: 8px 26px; text-shadow: none; -webkit-text-stroke: 0; clip-path: var(--para); }
#topbtns { position: absolute; top: calc(10px + var(--sat)); left: 50%; translate: -50% 0; display: flex; gap: 6px; }
.ico { width: 46px; height: 44px; border: 0; background: rgba(11, 13, 18, .82); color: #fff; display: grid; place-items: center; clip-path: var(--para); }
.ico svg { width: 22px; height: 22px; fill: currentColor; }
.ico.on, .ico[aria-pressed="true"] { background: var(--volt); color: var(--ink); }
#b-ctx { position: absolute; left: 50%; bottom: calc(100px + var(--sab)); translate: -50% 0; pointer-events: auto; border: 0; background: var(--volt); color: var(--ink); font-weight: 900; font-size: 17px; padding: 12px 32px; clip-path: var(--para); min-height: 50px; animation: inU .3s var(--ease) both; }
#b-ctx.ico { padding: 6px 26px; line-height: 0; width: auto; height: auto; } /* 乗り物は記号だけ（項目 145・147） */
#b-ctx .i { width: 36px; height: 36px; }
#b-ctx.lock { background: var(--ink3); color: #fff; }

/* タッチの操作 */
#touch { display: none; }
body.touch #touch { display: block; }
/* 画面の左半分（ボタンの下）：どこを触っても、触った所から左右へずらすと曲がる（項目144） */
#steerzone { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; pointer-events: auto; touch-action: none; }
#hud button, #topbtns { z-index: 2; } /* #topbtns は translate で重なりの層を作るので入れ物にも付ける */
#steer { z-index: 1; position: absolute; left: calc(18px + var(--sal)); bottom: calc(18px + var(--sab)); width: 132px; height: 132px; border-radius: 50%; background: rgba(11, 13, 18, .45); box-shadow: inset 0 0 0 2px var(--line); touch-action: none; }
#steer .wheel { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); filter: drop-shadow(0 3px 0 rgba(11, 13, 18, .45)); }
#touch button { position: absolute; border: 0; border-radius: 50%; font-weight: 900; color: var(--ink); touch-action: none; box-shadow: 0 0 0 3px rgba(11, 13, 18, .55), 0 4px 0 rgba(11, 13, 18, .45); }
#touch button.on { translate: 0 3px; box-shadow: 0 0 0 3px rgba(11, 13, 18, .55); }
#b-acc { right: calc(18px + var(--sar)); bottom: calc(18px + var(--sab)); width: 96px; height: 96px; background: var(--volt); font-size: 15px; }
#b-brk { right: calc(124px + var(--sar)); bottom: calc(14px + var(--sab)); width: 70px; height: 70px; background: #ffffff; font-size: 13px; }
#b-drift { right: calc(30px + var(--sar)); bottom: calc(126px + var(--sab)); width: 76px; height: 76px; background: var(--hot); font-size: 13px; }
#b-rev { right: calc(128px + var(--sar)); bottom: calc(94px + var(--sab)); width: 58px; height: 58px; background: #d5dbe3; font-size: 12px; }
.icob .i { width: 30px; height: 30px; display: block; margin: auto; }
#b-brk.icob .i, #b-drift.icob .i { width: 26px; height: 26px; } #b-rev.icob .i { width: 22px; height: 22px; }
@media (max-aspect-ratio: 1/1) {
  #speed { left: calc(16px + var(--sal)); translate: none; bottom: calc(164px + var(--sab)); }
  #speed b { font-size: 44px; }
  #spdbar, #drift { width: 130px; }
  body:not(.touch) #speed { bottom: calc(16px + var(--sab)); }
  #b-ctx { bottom: calc(232px + var(--sab)); }
  .setrow { grid-template-columns: 1fr; gap: 4px; }
  #mini { width: 112px; height: 112px; top: calc(62px + var(--sat)); }
  #toast { top: calc(130px + var(--sat)); }
  #raceinfo { top: calc(62px + var(--sat)); }
  #rpos { font-size: 46px; }
}

/* ---------- 画面 ---------- */
.screen { position: fixed; inset: 0; display: grid; place-items: center; padding: calc(12px + var(--sat)) calc(12px + var(--sar)) calc(12px + var(--sab)) calc(12px + var(--sal)); overflow: auto; color: #fff; }
.screen.dim { background: linear-gradient(100deg, rgba(11, 13, 18, .78) 0 40%, rgba(11, 13, 18, .45)); }
.screen.fx { overflow: clip; padding: 0; place-items: stretch; }
.skip { position: absolute; right: calc(14px + var(--sar)); bottom: calc(14px + var(--sab)); z-index: 3; background: rgba(11, 13, 18, .85); box-shadow: inset 0 0 0 2px var(--line); }
.skip::after { content: ''; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 4px; }

/* 起動画面（タイトル）：左に名前とメニュー、右の空きに車（3D）。縦持ちは上に車・下にメニュー */
#title { place-items: center start; padding-left: calc(5vw + var(--sal)); background: linear-gradient(90deg, rgba(11, 13, 18, .82) 0, rgba(11, 13, 18, .55) 34%, transparent 58%); }
.tbox { width: min(400px, 100%); display: grid; gap: 14px; }
.logo-mc { position: relative; overflow: clip; padding: 10px 0 12px; }
.logo-mc .speedlines { inset: -40% -60%; opacity: .35; }
#title h1 { position: relative; font-family: var(--disp); font-weight: 400; white-space: nowrap; font-size: clamp(34px, 6.4vw, 64px); line-height: 1.05; margin: 0; color: #fff; letter-spacing: .02em; transform: skewX(-8deg); text-shadow: 4px 4px 0 var(--hot); }
#title h1::after { content: ''; display: block; height: 8px; width: 62%; margin-top: 8px; background: var(--volt); clip-path: var(--para); }
.menu { display: grid; gap: 10px; }
.big { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; padding: 14px 26px; color: #fff; background: rgba(11, 13, 18, .86); min-height: 62px; clip-path: var(--para); box-shadow: inset 6px 0 0 var(--volt); transition: transform .15s var(--ease), background .15s; }
.big b { font-family: var(--disp); font-weight: 400; font-size: 26px; }
.big.hot { background: var(--hot); color: var(--ink); box-shadow: inset 6px 0 0 var(--ink); }
.big::after { content: ''; margin-left: auto; width: 12px; height: 12px; border-top: 4px solid currentColor; border-right: 4px solid currentColor; transform: rotate(45deg); }
.big:hover { transform: translateX(6px); }
.big:active { transform: translateX(8px) scale(.98); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sub3 .pill { font-size: 14px; padding: 10px 18px; min-height: 44px; background: rgba(11, 13, 18, .82); }
.keys { color: var(--mute); font-size: 12px; font-weight: 700; line-height: 1.7; margin: 4px 0 0; background: rgba(11, 13, 18, .7); padding: 6px 12px; clip-path: var(--para); }
body.touch .keys { display: none; }
.carplate { position: absolute; right: calc(24px + var(--sar)); bottom: calc(22px + var(--sab)); display: grid; justify-items: end; gap: 2px; padding: 8px 26px 10px; background: rgba(11, 13, 18, .86); clip-path: var(--para); box-shadow: inset -6px 0 0 var(--volt); animation: inR .5s var(--ease) .2s both; }
.carplate small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; color: var(--mute); }
.carplate b { font-family: var(--disp); font-weight: 400; font-size: 22px; color: #fff; }

/* モード選択（項目180） */
.mwrap { width: min(980px, 100%); display: grid; gap: 14px; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode { position: relative; overflow: clip; display: grid; align-content: end; justify-items: start; gap: 10px; min-height: min(52vh, 360px); border: 0; padding: 22px 26px; text-align: left; color: #fff; background: rgba(11, 13, 18, .88); clip-path: var(--cham); transition: transform .15s var(--ease); }
.mode em { position: absolute; right: 14px; top: -8px; font-family: var(--num); font-style: italic; font-weight: 800; font-size: clamp(120px, 20vw, 220px); line-height: 1; color: rgba(255, 255, 255, .08); }
.mode b { font-family: var(--disp); font-weight: 400; font-size: clamp(26px, 3.6vw, 40px); }
.mode b::before { content: ''; display: block; width: 54px; height: 8px; margin-bottom: 12px; background: var(--volt); clip-path: var(--para); }
.mode.gp { background: var(--hot); color: var(--ink); } .mode.gp em { color: rgba(11, 13, 18, .14); } .mode.gp b::before { background: var(--ink); }
.mode.gp .chips i { background: var(--ink); color: #fff; }
.mode:hover { transform: translateY(-4px); }
.mode:active { transform: scale(.985); }

/* コース・カップの一覧 */
.sbox { width: min(1040px, 100%); max-height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; padding: 14px; background: rgba(11, 13, 18, .9); clip-path: var(--cham); color: #fff; }
#gpsel .sbox { grid-template-rows: auto minmax(0, 1fr); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 0; padding: 10px 22px; font-weight: 900; font-size: 16px; background: var(--ink3); color: #fff; min-height: 44px; clip-path: var(--para); }
.tabs button.sel { background: var(--volt); color: var(--ink); }
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; overflow: auto; align-content: start; }
.course { border: 0; background: var(--ink2); padding: 10px; text-align: left; color: #fff; display: grid; gap: 5px; clip-path: var(--cham); box-shadow: inset 0 0 0 2px var(--line); transition: transform .15s var(--ease), background .15s; }
.course:hover { background: var(--ink3); transform: translateY(-2px); }
.course canvas { width: 100%; aspect-ratio: 16/9; background: var(--ink); clip-path: var(--para); }
.course b { font-weight: 900; font-size: 16px; }
.course small { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 16px; color: var(--mute); }
.course .medal { font-weight: 800; font-size: 12px; color: var(--mute); }
.course .prize { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .course .prize .coins { margin: 0; font-size: 17px; padding: 3px 12px; } .course .prize .coins .i { width: 16px; height: 16px; }
.course .ctags { display: flex; flex-wrap: wrap; gap: 4px; }
.course .ctags i { font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 10px; background: var(--ink3); color: #fff; clip-path: var(--para); }
.course .ctags i.night { background: #2b2f4a; } .course .ctags i.fw { background: var(--hot); color: var(--ink); } .course .ctags i.dirt { background: #6b5a3e; } .course .ctags i.mountain { background: #2f6b46; } .course .ctags i.highway { background: #3d4f6e; }
/* 5 周のコース（項目221）：黄緑の縁と、地図の左上の大きな周回の札 */
.course { position: relative; } .course.laps5 { box-shadow: inset 0 0 0 2px var(--volt); }
.course .lapbig { position: absolute; left: 16px; top: 14px; display: flex; align-items: baseline; gap: 3px; padding: 3px 14px 3px 12px; background: var(--volt); color: var(--ink); font-weight: 900; font-size: 14px; clip-path: var(--para); pointer-events: none; }
.course .lapbig b { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 34px; line-height: .9; }
.help { margin: 0; font-size: 13px; font-weight: 700; color: var(--mute); }
/* グランプリのカップ（項目181）：段・名前・コースの並び・優勝の賞金と車 */
.gplist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 12px; overflow-y: auto; align-content: start; } /* 横に流れない（項目269）：札は欄の幅より広くならない。縦だけ流れる */
.gpcard { border: 0; display: grid; gap: 8px; padding: 14px 16px 16px; text-align: left; color: #fff; background: var(--ink2); clip-path: var(--cham); box-shadow: inset 0 0 0 2px var(--line); transition: transform .15s var(--ease), background .15s; }
.gpcard:hover { transform: translateY(-3px); background: var(--ink3); }
.gpcard .gph { display: flex; align-items: center; gap: 8px; }
.gpcard .gph b { font-family: var(--disp); font-weight: 400; font-size: 24px; }
.gpcard .gph .won { margin-left: auto; }
.gpcard ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: rd; }
.gpcard li { counter-increment: rd; display: grid; grid-template-columns: 30px 56px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.gpcard li::before { content: counter(rd); font-family: var(--num); font-style: italic; font-weight: 800; font-size: 20px; color: var(--volt); text-align: center; }
.gpcard li canvas { width: 56px; height: 32px; background: var(--ink); clip-path: var(--para); }
.gpcard li small { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 15px; color: var(--mute); }
.gpcard .gpp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; border-top: 2px solid var(--line); }
.gpcard .gpp .coins { margin: 0; font-size: 18px; padding: 3px 12px; }
.gpcard .gpp .carp { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 13px; padding: 4px 12px; background: var(--ink3); clip-path: var(--para); }
.gpcard .best { font-size: 12px; font-weight: 800; color: var(--mute); }

/* グランプリの始まり：末尾の「始まりと終わりの動き（項目219）」 */

/* コースの紹介（空撮）：左上の札と下の字幕 */
.ccard { position: absolute; left: calc(18px + var(--sal)); top: calc(16px + var(--sat)); display: grid; gap: 6px; padding: 12px 26px 14px 20px; background: rgba(11, 13, 18, .9); clip-path: var(--para); box-shadow: inset 6px 0 0 var(--volt); animation: inL .5s var(--ease) both; max-width: calc(100% - 140px); }
.ccard small { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 20px; color: var(--volt); }
.ccard b { font-family: var(--disp); font-weight: 400; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.1; }
.subs { position: absolute; left: 50%; bottom: calc(76px + var(--sab)); translate: -50% 0; width: min(760px, calc(100% - 32px)); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 12px 22px; background: rgba(11, 13, 18, .9); clip-path: var(--para); opacity: 0; transition: opacity .2s; }
.subs.on { opacity: 1; }
.subs em { font-style: normal; font-size: 13px; font-weight: 900; padding: 3px 12px; background: var(--volt); color: var(--ink); clip-path: var(--para); white-space: nowrap; }
.subs em.ks { background: var(--hot); }
.subs span { font-size: 17px; font-weight: 800; line-height: 1.55; word-break: keep-all; overflow-wrap: break-word; }

/* 一時停止・設定 */
.pbox, .rbox { background: rgba(11, 13, 18, .92); color: #fff; padding: 18px 20px; display: grid; gap: 8px; min-width: min(340px, 100%); clip-path: var(--cham); }
.pbox h2, .rbox h2 { margin: 0 0 4px; font-family: var(--disp); font-weight: 400; color: #fff; font-size: 28px; }
.pbox > h2 { display: flex; align-items: center; gap: 10px; } .pbox > h2::before { content: ''; width: 10px; height: 1.1em; background: var(--volt); transform: skewX(-18deg); }
.pbox > .pill { justify-content: flex-start; }
.pbox > *:nth-child(2) { --i: 1; } .pbox > *:nth-child(3) { --i: 2; } .pbox > *:nth-child(4) { --i: 3; } .pbox > *:nth-child(5) { --i: 4; } .pbox > *:nth-child(6) { --i: 5; } .pbox > *:nth-child(7) { --i: 6; } .pbox > *:nth-child(8) { --i: 7; } .pbox > *:nth-child(9) { --i: 8; }
.setrow { display: grid; grid-template-columns: 9em 1fr; align-items: center; gap: 10px; font-weight: 900; color: #fff; }
.seg { display: flex; gap: 4px; }
.seg button { flex: 1; border: 0; padding: 10px; font-weight: 900; background: var(--ink3); color: #fff; min-height: 44px; clip-path: var(--para); }
.seg button.sel { background: var(--volt); color: var(--ink); }

/* 結果（項目189）・途中の順位（項目187）・グランプリの終わり */
.rbox { width: min(820px, 100%); max-height: 100%; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; }
.rhead { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; column-gap: 12px; }
.rhead small { grid-column: 1; font-family: var(--num); font-style: italic; font-weight: 800; font-size: 18px; color: var(--volt); }
.rhead p { grid-column: 1; margin: 0; font-family: var(--disp); font-weight: 400; font-size: clamp(20px, 3vw, 28px); line-height: 1.15; }
.rhead h2 { grid-column: 2; grid-row: 1 / 3; margin: 0; font-family: var(--num); font-style: italic; font-weight: 800; font-size: clamp(56px, 9vw, 92px); line-height: .9; color: var(--volt); }
.rhead h2 small { font-family: var(--body); font-style: normal; font-size: 22px; color: #fff; font-weight: 900; margin-left: 2px; }
.rtable, .stable { display: grid; gap: 3px; overflow: auto; min-height: 0; align-content: start; }
.rtr { display: grid; grid-template-columns: 36px 8px minmax(0, 1fr) 76px 64px 64px 40px; align-items: center; gap: 8px; padding: 6px 12px; background: var(--ink2); clip-path: var(--para); font-weight: 800; font-size: 14px; min-height: 38px; }
.rtr.hd { background: transparent; color: var(--mute); font-size: 11px; min-height: 0; padding-top: 0; padding-bottom: 0; animation: none !important; }
.rtr.me { background: var(--volt); color: var(--ink); } .rtr.me .t, .rtr.me .g { color: var(--ink); }
.rtr .p { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 24px; text-align: center; }
.rtr .sw { width: 8px; height: 22px; clip-path: var(--para); }
.rtr .nm { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.rtr .nm .logo { flex: none; }
.rtr .t, .rtr .g, .rtr .bl, .rtr .pt { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rtr .g { color: var(--mute); }
.rtr .bl.fl { color: var(--hot); } .rtr.me .bl.fl { color: var(--hotd); }
.rtr .pt { font-weight: 800; }
.rtr.nogp { grid-template-columns: 36px 8px minmax(0, 1fr) 76px 64px 64px; }
.rprize { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: var(--ink2); clip-path: var(--para); font-weight: 900; }
.rprize .coins { margin: 0; font-size: 26px; }
.rprize .lab { font-size: 13px; color: var(--mute); }
.rprize .gift { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: var(--ink3); clip-path: var(--para); font-size: 14px; }
.rprize .gift.v { background: var(--volt); color: var(--ink); }
.rbtns { margin-top: 0; }
/* 途中の順位：順位・名前・回ごとの点・合計 */
.str { display: grid; grid-template-columns: 36px 8px minmax(0, 1fr) repeat(var(--n, 4), 40px) 56px; align-items: center; gap: 8px; padding: 6px 12px; background: var(--ink2); clip-path: var(--para); font-weight: 800; font-size: 14px; min-height: 38px; animation: inL .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.str.hd { background: transparent; color: var(--mute); font-size: 11px; min-height: 0; padding-top: 0; padding-bottom: 0; animation: none; }
.str.me { background: var(--volt); color: var(--ink); }
.str .p { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 24px; text-align: center; }
.str .sw { width: 8px; height: 22px; clip-path: var(--para); }
.str .nm { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.str .r, .str .tot { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 18px; text-align: center; }
.str .r.x { opacity: .35; }
.str .tot { font-weight: 800; font-size: 24px; text-align: right; }
/* 結果発表：末尾の「始まりと終わりの動き（項目219）」 */

/* 地図 */
.mbox { display: grid; gap: 10px; justify-items: center; }
#bigmap { width: min(86vmin, 680px); height: min(86vmin, 680px); background: #3d9ad6; touch-action: none; clip-path: var(--cham); }
#mapview .row { justify-content: center; }
/* 地図の拡大縮小のボタン（項目 274）：地図の右下に重ねる */
.mapwrap { position: relative; }
.mvzoom { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 6px; }
.mvzoom .pill { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; font: 900 24px/1 var(--body); }

/* ガレージ・店・ディーラー：見本の車は後ろの 3D。見出しの帯・左の板・下の車の札 */
#garage, #shop, #dealer { place-items: stretch; padding: 0; }
.gbox { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0, 320px) 1fr; grid-template-rows: auto 1fr auto; gap: 10px; padding: calc(12px + var(--sat)) calc(12px + var(--sar)) calc(12px + var(--sab)) calc(12px + var(--sal)); }
.gbox header { grid-column: 1 / 3; }
.gbox .hdr .back { background: rgba(11, 13, 18, .88); }
.gbox .hdr h2 { background: rgba(11, 13, 18, .88); padding: 6px 22px 6px 14px; clip-path: var(--para); font-size: clamp(18px, 2.6vw, 26px); }
.gbox .hdr h2::before { display: none; }
.gside { grid-column: 1; grid-row: 2; align-self: start; display: grid; gap: 10px; background: rgba(11, 13, 18, .9); color: #fff; padding: 14px 16px; clip-path: var(--cham); }
.gside h3 { margin: 0; font-family: var(--disp); font-weight: 400; font-size: 24px; color: #fff; display: flex; align-items: center; gap: 8px; }
.glist { grid-column: 1 / 3; grid-row: 3; display: flex; gap: 6px; overflow-x: auto; overflow-y: clip; padding-bottom: 4px; scroll-snap-type: x proximity; }
.card { position: relative; flex: 0 0 150px; scroll-snap-align: start; border: 0; background: rgba(11, 13, 18, .9); padding: 10px 14px; text-align: left; color: #fff; display: grid; gap: 2px; min-height: 64px; clip-path: var(--para); }
.card b { font-weight: 900; font-size: 16px; }
.card small { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 15px; color: var(--mute); display: flex; align-items: center; gap: 4px; }
.card small .i { width: 15px; height: 15px; }
.card.sel { background: var(--volt); color: var(--ink); } .card.sel small, .card.sel .mk { color: var(--ink); }
.card .tag { position: absolute; top: 4px; right: 12px; display: grid; place-items: center; width: 20px; height: 20px; background: var(--hot); color: var(--ink); clip-path: var(--para); }
.card .tag .i { width: 14px; height: 14px; }
.card .mk { font-size: 11px; font-weight: 800; color: var(--mute); display: flex; align-items: center; gap: 4px; }
.card.lock { opacity: .72; }
.mkdesc { margin: -2px 0 2px; font-size: 13px; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; color: var(--mute); }
#gstats, #sstats, #dstats { display: grid; gap: 6px; }
.stat { display: grid; grid-template-columns: 6.3em 1fr auto; align-items: center; gap: 8px; font-weight: 900; font-size: 13px; }
.stat > span:first-child { white-space: nowrap; } .stat > span:first-child .i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.stat > span:last-child { font-family: var(--num); font-style: italic; font-weight: 600; font-size: 15px; }
.stat i { height: 9px; background: var(--ink3); overflow: clip; clip-path: var(--para); }
.stat i u { display: block; height: 100%; background: var(--volt); }
#gcolors { display: flex; flex-wrap: wrap; gap: 8px; }
#gcolors button { width: 34px; height: 30px; border: 0; clip-path: var(--para); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
#gcolors button.sel { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink); }
.dprice { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--num); font-style: italic; font-weight: 800; font-size: 30px; color: var(--volt); }
.dprice .i { width: 26px; height: 26px; }
/* パーツショップ：段ごとの行（名前・効き目・買う／付ける） */
#sparts { display: grid; gap: 6px; }
.prow { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 10px; background: var(--ink2); color: #fff; clip-path: var(--para); }
.prow.on { background: var(--ink3); box-shadow: inset 4px 0 0 var(--volt); }
.prow b { font-weight: 900; font-size: 14px; }
.prow small { grid-column: 1; font-weight: 700; font-size: 12px; color: var(--mute); }
.prow .pill { grid-row: 1 / 3; grid-column: 2; min-height: 40px; padding: 8px 16px; font-size: 14px; }
.eff { display: inline-flex; align-items: center; gap: 2px; margin-right: 10px; white-space: nowrap; } .eff .i { width: 16px; height: 16px; }
#shop { display: block; } /* 画面の高さで .gbox の高さを決める（grid の行に任せると中身の高さで伸びて、店の画面がスクロールした） */
#shop .gbox { grid-template-rows: auto minmax(0, 1fr) auto; }
#shop .gside { max-height: 100%; min-height: 0; overflow-y: auto; }
#slist .card { padding-top: 19px; min-height: 0; }
#slist .card .tag { top: 3px; left: 12px; right: auto; }
@media (max-width: 760px) {
  #shop .gbox { grid-template-rows: auto minmax(0, 1fr) auto; }
  #shop .gside { grid-row: 2; align-self: end; }
  #shop .glist { grid-row: 3; }
}
/* 横持ちのスマホ（高さが低い）：性能の棒とパーツの段を左右に並べ、店の画面の中だけで収める */
@media (max-height: 480px) {
  #shop .gbox { grid-template-columns: minmax(0, 600px) 1fr; gap: 6px; }
  #shop .hdr h2 { font-size: 18px; } #shop .hdr .pill { min-height: 40px; padding: 8px 16px; } #shop .coins { padding: 4px 12px; font-size: 16px; }
  #shop .gside { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; padding: 8px 10px; gap: 4px 10px; }
  #shop .gside h3 { grid-column: 1 / 3; font-size: 17px; }
  #shop .stat { font-size: 11px; grid-template-columns: 4.6em 1fr auto; gap: 4px; }
  #sparts { gap: 4px; } .prow { padding: 4px 8px; } .prow b { font-size: 12px; } .prow small { font-size: 10.5px; } .prow .pill { min-height: 34px; padding: 4px 12px; font-size: 12px; }
  #slist .card { flex-basis: 128px; min-height: 52px; padding: 17px 10px 6px; } #slist .card small { font-size: 12px; }
}
#gname .logo, #s-title .logo, #dname .logo { margin-right: 2px; }

/* 読み込み（項目197）：速さの線・走る車の絵・斜めのゲージ。動きは transform だけ */
#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--ink); z-index: 30; transition: opacity .45s; overflow: clip; }
#loading .speedlines { opacity: .7; }
#loading::before { content: ''; position: absolute; left: -20%; right: -20%; top: 56%; height: 22%; background: var(--hot); transform: skewY(-6deg); opacity: .92; }
.ld { position: relative; display: grid; gap: 10px; justify-items: center; color: #fff; }
.ldcar { width: min(260px, 60vw); height: auto; animation: bob .32s ease-in-out infinite alternate; }
.ldwheel { animation: spin .35s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.ld b { font-family: var(--disp); font-weight: 400; font-size: clamp(34px, 7vw, 54px); transform: skewX(-8deg); text-shadow: 4px 4px 0 var(--ink); }
.ldrow { display: flex; align-items: baseline; gap: 10px; font-weight: 900; text-shadow: 0 2px 0 var(--ink); }
.ldrow em { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 28px; color: var(--volt); min-width: 2.2em; text-align: right; }
.ldrow em::after { content: '%'; font-size: 18px; margin-left: 1px; }
.ldbar { display: block; width: min(300px, 70vw); height: 12px; background: var(--ink); overflow: clip; clip-path: var(--para); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); }
.ldbar u { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--volt) 0 10px, transparent 10px 13px); transition: width .25s; }
#loading.off { opacity: 0; pointer-events: none; }
#loading.off * { animation: none; }

@media (max-width: 760px) {
  .gbox { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto; }
  .gbox header { grid-column: 1; }
  .gside { grid-column: 1; grid-row: 3; padding: 10px 12px; gap: 6px; }
  .gside h3 { font-size: 19px; }
  .glist { grid-column: 1; grid-row: 4; }
  #title { place-items: end center; padding: calc(12px + var(--sat)) calc(14px + var(--sar)) calc(16px + var(--sab)) calc(14px + var(--sal)); background: linear-gradient(0deg, rgba(11, 13, 18, .9) 0, rgba(11, 13, 18, .55) 48%, transparent 66%); }
  .carplate { top: calc(14px + var(--sat)); bottom: auto; right: calc(14px + var(--sar)); }
  .clist { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .modes { grid-template-columns: 1fr; } .mode { min-height: 30vh; }
  .rtr { grid-template-columns: 28px 6px minmax(0, 1fr) 66px 52px 34px; font-size: 13px; gap: 6px; padding: 6px 8px; }
  .rtr .bl { display: none; } .rtr.nogp { grid-template-columns: 28px 6px minmax(0, 1fr) 66px 52px; }
  .rtr .t, .rtr .g, .rtr .pt { font-size: 15px; } .rtr .p { font-size: 20px; }
  .str { grid-template-columns: 28px 6px minmax(0, 1fr) repeat(var(--n, 4), 26px) 40px; gap: 5px; padding: 6px 8px; font-size: 13px; }
  .str .r { font-size: 15px; } .str .tot { font-size: 20px; }
  .subs { bottom: calc(70px + var(--sab)); } .subs span { font-size: 15px; }
}
@media (max-height: 480px) {
  .tbox { width: min(360px, 100%); gap: 8px; }
  #title h1 { font-size: 34px; } .logo-mc { padding: 4px 0 6px; }
  .big { min-height: 46px; padding: 8px 22px; } .big b { font-size: 20px; }
  .menu { gap: 6px; }
  .gside { padding: 10px; gap: 6px; } .gside h3 { font-size: 19px; }
  .card { min-height: 52px; padding: 6px 12px; }
  .mode { min-height: 0; height: calc(100vh - 110px); padding: 14px 18px; } .mode em { font-size: 140px; }
  .rbox { padding: 10px 14px; gap: 6px; } .rhead h2 { font-size: 52px; } .rtr, .str { min-height: 30px; padding: 3px 10px; } .rprize { padding: 6px 10px; } .rprize .coins { font-size: 20px; }
  .pbox { padding: 12px 16px; gap: 5px; } .pbox > .pill { min-height: 38px; padding: 6px 20px; }
  .ccard { padding: 8px 20px 10px 16px; } .ccard b { font-size: 22px; }
  .subs { bottom: calc(60px + var(--sab)); padding: 8px 16px; }
}

/* 買う前の確認（項目148） */
.confirm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(11, 13, 18, .6); }
.cbox { width: min(360px, 100%); background: var(--ink); color: #fff; padding: 20px 18px 16px; display: grid; gap: 10px; justify-items: center; clip-path: var(--cham); box-shadow: inset 0 0 0 2px var(--line); animation: inU .25s var(--ease) both; }
.cbox .cname { font-size: 19px; font-weight: 900; text-align: center; }
.cbox .i { width: 22px; height: 22px; flex: none; }
.cbox .cprice, .cbox .cafter { margin: 0; display: flex; align-items: center; gap: 6px; font-family: var(--num); font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; }
.cbox .cprice { font-size: 34px; color: var(--volt); }
.cbox .cprice .i { width: 28px; height: 28px; }
.cbox .cafter { font-size: 19px; color: var(--mute); }
.cbox .cbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 4px; }
.cbox .cbtns button { min-height: 48px; font-size: 16px; }

/* ミッション：達成の知らせ・一覧。メーカー */
#banner { position: absolute; top: calc(108px + var(--sat)); left: 50%; translate: -50% -12px; display: grid; gap: 2px; justify-items: center; background: rgba(11, 13, 18, .92); color: #fff; padding: 10px 28px; opacity: 0; transition: opacity .3s, translate .3s var(--ease); pointer-events: none; text-align: center; width: max-content; max-width: calc(100vw - 32px); clip-path: var(--para); box-shadow: inset 0 -4px 0 var(--volt); } /* width が無いと left: 50% のため画面の半分までしか広がらず、名前が 3〜4 行に折れていた */
#banner.on { opacity: 1; translate: -50% 0; }
#banner small { font-weight: 900; font-size: 12px; color: var(--volt); letter-spacing: .08em; }
#banner b { font-weight: 900; font-size: 17px; word-break: keep-all; overflow-wrap: break-word; } /* 折るのは budoux.js が入れた <wbr>・空白・句読点の後だけ */
#banner > span { font-family: var(--num); font-style: italic; font-weight: 800; white-space: nowrap; font-size: 18px; display: inline-flex; align-items: center; gap: 4px; color: var(--volt); } #banner .i { width: 18px; height: 18px; }
@media (max-width: 760px) { #banner { top: calc(176px + var(--sat)); } }
.mbox.pbox { width: min(720px, 100%); max-height: 100%; grid-template-rows: auto auto minmax(0, 1fr); justify-items: stretch; }
.mbox .tabs { flex-wrap: wrap; }
#q-list, #mk-list { overflow-y: auto; display: grid; gap: 4px; align-content: start; min-height: 0; }
.mrow { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ink2); color: #fff; clip-path: var(--para); }
.mrow b { font-weight: 900; font-size: 14px; word-break: keep-all; overflow-wrap: break-word; } /* keep-all が無いと <wbr> は効かない。tools/wrapcheck.mjs */
.mrow .ck { width: 24px; height: 24px; background: var(--ink3); display: grid; place-items: center; color: var(--ink); clip-path: var(--para); }
.mrow .ck .i { width: 16px; height: 16px; }
.mrow.done .ck { background: var(--volt); }
.mrow.done b { color: var(--mute); }
.mrow > span { font-family: var(--num); font-style: italic; font-weight: 800; white-space: nowrap; font-size: 17px; display: inline-flex; align-items: center; gap: 4px; color: var(--volt); } .mrow .i { width: 18px; height: 18px; }
.mkrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 14px; background: var(--ink2); color: #fff; clip-path: var(--para); }
.mkrow .mkhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.mkrow .mkhead .logo { background: #fff; padding: 4px 8px; height: 30px; width: auto; max-width: 100%; clip-path: var(--para); }
.mkrow .mkhead b { font-weight: 900; font-size: 15px; }
.mkrow .mkhead small { font-size: 12px; font-weight: 700; color: var(--mute); }
.mkrow p { margin: 0; font-size: 13px; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; color: var(--mute); }

/* ---------- 2026-11-01 直し：数字用の斜体（Barlow Condensed）は数字だけ。日本語の混じる所は本文の書体（崩れて「周」「点」が箱に見えた） ---------- */
.rhead small, .ccard small { font-family: var(--disp); font-style: normal; font-weight: 400; }
.rhead small, .ccard small { font-size: 15px; }
.rtr.hd span, .str.hd span, .rtr .g, #rlap, #rtime, #rbest, .course small, .gpcard li small, .card small, #gp-won, .stat > span:last-child { font-family: var(--body); font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; }
.rtr.hd span { font-size: 11px; } .rtr .g { font-size: 14px; } .course small, .gpcard li small { font-size: 13px; } #rlap { font-size: 18px; } #rtime, #rbest { font-size: 14px; }
.u { font-family: var(--body); font-style: normal; font-weight: 900; font-size: .7em; margin-left: 2px; }
#gp-won { font-size: 15px; color: #fff; } #gp-won .i { color: var(--volt); }
/* 板の高さは画面の高さから（grid の max-height では表の行が縮まず、横持ちで板が下へはみ出してボタンが隠れた） */
:root { --avail: calc(100dvh - 24px - var(--sat) - var(--sab)); }
.rbox, .sbox, .mbox.pbox { display: flex; flex-direction: column; max-height: var(--avail); }
.rbox > *, .sbox > *, .mbox.pbox > * { flex: none; }
.rtable, .stable, .clist, .gplist, #q-list, #mk-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pbox:not(.mbox) { max-height: var(--avail); overflow-y: auto; }
/* 上に板が出ている間は、下の HUD と画面の板を隠す（一時停止・地図・ミッション・メーカー・設定の下の速さと入るボタン、買う前の確認の下の説明が重なって見えた） */
body:has(#pause:not([hidden])) #hud, body:has(#mapview:not([hidden])) #hud, body:has(#missions:not([hidden])) #hud, body:has(#makers:not([hidden])) #hud, body:has(#settings:not([hidden])) #hud { visibility: hidden; }
#garage:has(.confirm) .gbox, #dealer:has(.confirm) .gbox, #shop:has(.confirm) .gbox { visibility: hidden; }
.ldrow { background: var(--ink); padding: 4px 22px; clip-path: var(--para); text-shadow: none; } /* 紅の帯の上で白い字が読みにくかった */

/* リプレイ（リプレイのセッションの部品・2026-11-01）：見た目だけ。下に記号のボタンとつまみ・左上に順位の札 */
#replay { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#rp-tag { position: absolute; top: calc(12px + var(--sat)); left: calc(12px + var(--sal)); display: flex; align-items: baseline; gap: 2px; background: rgba(11, 13, 18, .85); color: #fff; padding: 4px 22px 6px 14px; font-weight: 900; clip-path: var(--para); box-shadow: inset 5px 0 0 var(--volt); }
#rp-tag:empty { display: none; }
#rp-tag b { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1; color: var(--volt); }
#rp-tag small { font-size: 12px; }
#rp-tag span { font-size: 12px; margin-left: 8px; color: var(--mute); }
#rp-bar { position: absolute; left: calc(12px + var(--sal)); right: calc(12px + var(--sar)); bottom: calc(12px + var(--sab)); display: flex; align-items: center; gap: 8px; pointer-events: auto; max-width: 720px; margin: 0 auto; background: rgba(11, 13, 18, .85); padding: 6px 18px; clip-path: var(--para); }
#rp-bar .ico { flex: none; background: var(--ink3); }
#rp-bar .ico .i { width: 22px; height: 22px; }
#rp-fast.on { background: var(--volt); color: var(--ink); }
#rp-seek { flex: 1; min-width: 0; accent-color: var(--volt); height: 28px; }
/* 運転席の視点の切り替え（項目 175）：一人称の間は黄緑 */
#b-fpv .i { width: 24px; height: 24px; }
#b-fpv.on { background: var(--volt); color: var(--ink); }
#r-replay .i { width: 22px; height: 22px; }
/* 結果・順位・グランプリの終わりの下にも HUD（周・タイム・知らせ）を出さない（重なって数えられた） */
body:has(#result:not([hidden])) #hud, body:has(#standings:not([hidden])) #hud, body:has(#gpend:not([hidden])) #hud { visibility: hidden; }
/* 背の低い画面（横持ちのスマホ）：表の 6 行がスクロールなしで入るように詰める */
@media (max-height: 480px) {
  .rhead h2 { font-size: 44px; } .rhead p { font-size: 18px; } .rhead small { font-size: 13px; }
  .rtr.hd, .str.hd { display: none; }
  .rtr, .str { min-height: 28px; padding: 2px 10px; } .rtr .p, .str .p { font-size: 19px; } .rtr .sw, .str .sw { height: 18px; }
  .rprize { padding: 4px 10px; } .rprize .coins { font-size: 18px; padding: 3px 12px; }
  .rbtns .pill { min-height: 40px; padding: 6px 20px; }
}
/* モード選択の飾りの字：板の右の縦の真ん中。見出しとチップは左 58% に（大きな画面で飾りの字が見出しと重なった） */
.mode::after { content: attr(data-mark); position: absolute; right: 16px; top: 50%; translate: 0 -50%; font-family: var(--num); font-style: italic; font-weight: 800; font-size: min(34vh, 16vw, 200px); line-height: 1; color: rgba(255, 255, 255, .08); pointer-events: none; }
.mode.gp::after { color: rgba(11, 13, 18, .14); }
.mode > b, .mode > .chips { position: relative; z-index: 1; max-width: 58%; }
/* 結果・順位・終わりの見出し：2 行（カップと戦・コース）と大きな順位の字の箱が重ならないように行の間と下を空ける */
.rhead { row-gap: 6px; padding-bottom: 14px; } .rhead small { line-height: 1.3; } .rhead p { line-height: 1.3; } .rhead h2 { line-height: 1; }
/* 走っている時の左上：周・タイム・ベストの行の間（字の箱が重なった） */
#rlap { line-height: 1.35; } #rtime, #rbest { line-height: 1.4; }

/* グランプリの終わりのごほうびの札：記号の大きさ（「カーディーラーが開きました」の旗が大きくなり、字が 3 行に折れた） */
.rprize .gift { white-space: nowrap; } .rprize .gift .i, .rprize .gift .logo { width: 18px; height: 18px; flex: none; }

/* ---------- 2026-11-01 メリハリ（利用者「１位などの数字は最も大胆に。メリハリのあるUIにして」） ----------
   数字は 4 段：順位（いちばん大きく・900）＞ 速さ・合計の点・賞金（大きく・900）＞ タイム・差・回ごとの点（中・600）＞ 見出しの字（小さく・灰色）。
   1 位は黄緑（大きな順位は黄緑の板に墨の数字）、2 位からは白か黄緑の数字。4〜6 位は表の順位を灰色にして上位を立たせる */
/* 走っている時の左上：大きな順位・「位」と「/6」を縦に・線・周（数字だけ大きく）・小さな見出しのタイム */
#raceinfo { column-gap: 0; padding: 6px 24px 8px 14px; }
#rpos { display: flex; align-items: flex-end; gap: 8px; padding-right: 14px; font-weight: 900; font-size: 96px; line-height: .8; letter-spacing: -.02em; color: #fff; transform-origin: 0 100%; }
#rpos[data-p="1"] { color: var(--volt); }
#rpos small { display: grid; justify-items: start; gap: 4px; margin: 0 0 1px; letter-spacing: 0; text-shadow: none; }
#rpos small b { font-family: var(--disp); font-weight: 400; font-style: normal; font-size: 26px; line-height: 1.5; color: #fff; }
#rpos small i { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 20px; line-height: 1.25; color: var(--mute); }
#rpos.pop { animation: rposPop .34s var(--ease) both; }
@keyframes rposPop { 0% { transform: translateY(-6px) scale(1.3); } 100% { transform: none; } }
#rlap, #rtime, #rbest { padding-left: 12px; border-left: 2px solid var(--line); }
#rlap { display: flex; align-items: baseline; gap: 2px; line-height: 1; padding-bottom: 2px; }
#rlap b { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 36px; line-height: .85; color: #fff; }
#rlap small { font-size: 14px; font-weight: 900; color: var(--mute); }
#rtime, #rbest { display: flex; align-items: baseline; gap: 8px; font-family: var(--num); font-style: italic; font-weight: 600; font-size: 19px; line-height: 1.25; color: #fff; }
#rbest { font-size: 16px; color: var(--mute); }
#rtime small, #rbest small { min-width: 3.6em; font-family: var(--body); font-style: normal; font-weight: 800; font-size: 10px; letter-spacing: .08em; color: var(--mute); }
#speed b { font-weight: 900; font-size: 60px; letter-spacing: -.01em; }
#speed span { font-size: 12px; }
#center { font-weight: 900; font-size: clamp(150px, 38vh, 280px); }
@media (max-aspect-ratio: 1/1) {
  #rpos { font-size: 80px; } #rpos small b { font-size: 22px; } #rpos small i { font-size: 17px; }
  #rlap b { font-size: 30px; } #rtime { font-size: 17px; } #rbest { font-size: 15px; }
  #speed b { font-size: 50px; }
}
#rp-tag b { font-weight: 900; font-size: 44px; }

/* 結果・グランプリの終わり：順位を主役に。横持ちは左の列に大きく、縦持ちは見出しの右に */
.rbox > .rtop { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.rmain { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.rmain > .rtable { flex: 1 1 auto; }
.rmain > .rprize { flex: none; }
.rhead h2 { display: flex; align-items: flex-end; gap: 12px; justify-self: end; font-family: var(--num); font-style: italic; font-weight: 900; font-size: clamp(88px, 15vw, 132px); line-height: 1.2; letter-spacing: -.02em; color: var(--volt); animation: heroIn .5s var(--ease) .15s both; }
.rhead h2 small { margin: 0 0 .1em; font-family: var(--disp); font-style: normal; font-weight: 400; font-size: .26em; color: #fff; letter-spacing: 0; }
/* 1 位の板の傾きは表の行と同じ角度（行は高さ 38px に 10px の切れ・背の低い画面は 28px）。板の高さ＝1.2em なので切れも em で決める */
:root { --tn: .263; }
@media (max-height: 480px) { :root { --tn: .357; } }
/* 字は板の真ん中に、斜めの縁から離す（縁ぎりぎりはださい）。板の高さ H＝1.2em＋上下の .08em、切れ o＝H×傾き。
   左の縁は上ほど右へ寄る（数字の上は斜体で右へ逃げる）、右の縁は下ほど左へ寄る（「位」は下にある）ので、左右の余白を o から決める */
.rhead h2[data-p="1"] { --o: calc(1.36em * var(--tn)); gap: .1em; padding: .08em calc(var(--o) * .4 + .16em) .08em calc(var(--o) * .85 - .02em); background: var(--volt); color: var(--ink); clip-path: polygon(var(--o) 0, 100% 0, calc(100% - var(--o)) 100%, 0 100%); }

.rhead h2[data-p="1"] small { color: var(--ink); }
@keyframes heroIn { 0% { transform: scale(2); opacity: 0; } 60% { transform: scale(.95); opacity: 1; } 100% { transform: none; opacity: 1; } }
@media (min-aspect-ratio: 1/1) {
  #result .rbox, #gpend .rbox { width: min(1000px, 100%); }
  .rbox > .rtop { flex-direction: row; gap: 18px; }
  .rtop > .rhead { flex: none; width: clamp(170px, 24vw, 280px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-content: start; padding: 0 14px 0 0; border-right: 2px solid var(--line); }
  .rtop > .rhead small, .rtop > .rhead p { grid-column: 1; }
  .rtop > .rhead p { font-size: clamp(18px, 2.2vw, 26px); word-break: keep-all; overflow-wrap: anywhere; }
  .rtop > .rhead h2 { grid-column: 1; grid-row: 3; align-self: end; justify-self: start; font-size: min(28vh, 11.5vw, 170px); }
  #gpend .rmain { justify-content: center; }
}
/* 表：順位の数字を大きく太く・1 位は黄緑・4〜6 位は灰色。合計の点は太く、回ごとの点とタイムは中くらい、見出しは小さく */
.rtr .p, .str .p { font-weight: 900; font-size: 30px; line-height: .85; letter-spacing: -.02em; }
.rtr:not(.hd):not(.me):nth-child(2) .p, .str:not(.hd):not(.me):nth-child(2) .p { color: var(--volt); }
.rtr:not(.hd):not(.me):nth-child(n+5) .p, .str:not(.hd):not(.me):nth-child(n+5) .p { color: var(--mute); }
.rtr.hd span, .str.hd span { font-size: 10px; letter-spacing: .1em; color: var(--mute); }
.rtr .t { font-size: 18px; }
.rtr .bl { font-size: 15px; color: var(--mute); } .rtr.me .bl:not(.fl) { color: var(--ink); } .rtr .bl.fl { color: var(--hot); }
.rtr .pt { font-weight: 900; font-size: 22px; }
.str .r { font-weight: 600; font-size: 16px; color: var(--mute); } .str.me .r { color: var(--ink); }
.str .tot { font-weight: 900; font-size: 32px; line-height: .85; }
.rprize { padding: 8px 14px; }
.rprize .lab { font-size: 11px; letter-spacing: .08em; }
.rprize .coins { font-weight: 900; font-size: 34px; padding: 4px 18px 4px 14px; }
#gpend .rprize .coins { font-size: 46px; } #gpend .rprize .coins .i { width: 32px; height: 32px; }
@media (max-width: 760px) {
  .rtr .p, .str .p { font-size: 26px; } .str .tot { font-size: 26px; } .rtr .pt { font-size: 18px; } .rtr .t { font-size: 16px; } .str .r { font-size: 14px; }
}
@media (max-height: 480px) {
  .rtr .p, .str .p { font-size: 26px; } .str .tot { font-size: 26px; } .rtr .pt { font-size: 19px; } .rtr .t { font-size: 16px; }
  .rprize .coins { font-size: 26px; padding: 2px 14px 2px 10px; } #gpend .rprize .coins { font-size: 38px; }
}
/* 値段・コイン・読み込みの割合も太い数字に */
.coins { font-weight: 900; }
.dprice { font-weight: 900; font-size: 38px; }
.cbox .cprice { font-weight: 900; font-size: 44px; }
.ldrow em { font-weight: 900; font-size: 40px; }
/* 小さな見出し（カップと戦・ごほうびなど）は本文の書体で細く。太い見出しの書体は小さいと字がつぶれた */
.rhead small, .ccard small { font-family: var(--body); font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.ccard small { font-size: 14px; }
/* 「位」は数字の右上（走っている時の左上と同じ並び）。1 位の板では、斜めの板の広い右上を埋める */
.rhead h2 { align-items: flex-start; } .rhead h2 small { margin: .85em 0 0; }
#r-round span { display: inline-block; white-space: nowrap; margin-right: 1em; line-height: 1.6; }

/* ---------- 2026-11-01 夕：グランプリのアンロック（項目225）・空撮の区間（220）・英語の声の字幕（231） ---------- */
/* 鍵のカップ：中身は薄く・開く条件を黄緑で。押すとゆれる */
.gpcard.lock { background: var(--ink2); cursor: default; }
.gpcard.lock:hover { transform: none; background: var(--ink2); }
.gpcard.lock .gph b, .gpcard.lock ol { opacity: .45; }
.gpcard.lock li canvas { filter: grayscale(1); }
.gpcard .chip.lk { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: var(--ink3); color: #fff; }
.gpcard .chip.lk .i { width: 12px; height: 12px; }
.gpcard .lockmsg { color: var(--volt); font-weight: 900; font-size: 14px; gap: 8px; flex-wrap: nowrap; }
.gpcard .lockmsg .i { width: 18px; height: 18px; flex: none; }
.gpcard.shake { animation: shake .36s var(--ease) both !important; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-4px); } }
/* 紹介の上の段：札と（右に）小さな地図・区間の札。入らない幅では下の行へ折り返す */
.cctop { position: absolute; left: calc(18px + var(--sal)); right: calc(18px + var(--sar)); top: calc(16px + var(--sat)); display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; }
.cctop .ccard { position: static; max-width: 100%; flex: 0 1 auto; }
.ccside { display: grid; justify-items: end; gap: 6px; flex: none; animation: inR .5s var(--ease) .15s both; }
#cc-map { width: 132px; height: 80px; background: rgba(11, 13, 18, .86); clip-path: var(--para); padding: 4px 10px; }
#cc-map .all { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 2.2; stroke-linejoin: round; }
#cc-map .sec { fill: none; stroke: var(--volt); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; opacity: .28; }
#cc-map .sec.on { opacity: 1; }
#cc-map .st { fill: var(--hot); }
.ccsec { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 20px 4px 14px; background: rgba(11, 13, 18, .9); clip-path: var(--para); box-shadow: inset -6px 0 0 var(--hot); opacity: 0; }
.ccsec.on { animation: secIn .5s var(--ease) both; }
@keyframes secIn { 0% { opacity: 0; transform: translateX(40px) skewX(-12deg); } 100% { opacity: 1; transform: none; } }
.ccsec i { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 34px; line-height: 1; color: var(--volt); }
.ccsec i small { font-size: 16px; font-weight: 600; color: var(--mute); margin-left: 2px; }
.ccsec i.go { color: var(--hot); }
.ccsec span { font-weight: 900; font-size: 16px; white-space: nowrap; }
/* 区間の切り替え：斜めの光が横切って、切れ目をかくす */
.cutflash { position: absolute; inset: -10% -40%; pointer-events: none; opacity: 0; background: linear-gradient(100deg, transparent 32%, rgba(214, 255, 63, .85) 44%, rgba(255, 255, 255, .95) 50%, rgba(255, 46, 106, .85) 56%, transparent 68%); transform: translateX(-70%); }
.cutflash.go { animation: cutSweep .46s cubic-bezier(.5, 0, .3, 1) both; }
@keyframes cutSweep { 0% { opacity: 1; transform: translateX(-70%); } 100% { opacity: 1; transform: translateX(70%); } }
/* 字幕：英語（声のとおり）を大きく、日本語の訳を下に */
.subs.en { grid-template-columns: auto 1fr; row-gap: 2px; }
.subs.en > span { font-size: 17px; font-weight: 800; line-height: 1.4; word-break: normal; }
.subs small { grid-column: 2; font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--mute); word-break: keep-all; overflow-wrap: break-word; }
@media (max-height: 480px) { #cc-map { width: 110px; height: 64px; } .ccsec { min-height: 38px; } .ccsec i { font-size: 28px; } .subs.en > span { font-size: 15px; } .subs small { font-size: 12px; } }

/* ---------- グランプリの始まりと終わりの動き（2026-11-01 夕・項目219「モーショングラフィックスのアニメ」） ----------
   場面ごとに 1 つの塊だけを出す（data-sc）。切り替えは斜めの帯（.mg-wipe）が横切る間。動きは transform・opacity・clip-path と SVG の線だけ */
.mg { overflow: hidden; place-items: stretch; padding: 0; }
#gpopen { background: rgba(11, 13, 18, .55); }
.mg-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mg-bg .speedlines { opacity: .4; }
.mg-band { position: absolute; left: -30%; width: 160%; transform: skewY(-9deg); }
.mg-band.b1 { top: 20%; height: 24%; background: var(--hot); opacity: .9; animation: bandIn .6s var(--ease) both, bandDrift 5s ease-in-out .6s infinite alternate; }
.mg-band.b2 { top: 49%; height: 3.5%; background: var(--volt); animation: bandIn .6s var(--ease) .1s both, bandDrift 4s ease-in-out .7s infinite alternate-reverse; }
.mg-band.b3 { top: 57%; height: 1%; background: #fff; opacity: .6; animation: bandIn .6s var(--ease) .2s both; }
@keyframes bandIn { from { transform: skewY(-9deg) translateX(-110%); } to { transform: skewY(-9deg) translateX(0); } }
@keyframes bandDrift { from { transform: skewY(-9deg) translateX(0); } to { transform: skewY(-9deg) translateX(-5%); } }
.mg-mq { position: absolute; left: 0; top: 4%; height: 17vh; width: auto; overflow: visible; animation: mq 9s linear infinite; }
.mg-mq text { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 140px; fill: none; stroke: rgba(255, 255, 255, .26); stroke-width: 2.5; letter-spacing: 4px; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-36%); } }
.mg-sc { position: absolute; inset: 0; z-index: 2; display: none; align-content: center; justify-content: center; gap: 12px; padding: calc(18px + var(--sat)) calc(18px + var(--sar)) calc(84px + var(--sab)) calc(18px + var(--sal)); }
#gpopen[data-sc="1"] .s1, #gpopen[data-sc="2"] .s2, #gpopen[data-sc="3"] .s3, #gpopen[data-sc="4"] .s4, #ceremony[data-sc="1"] .c1, #ceremony[data-sc="2"] .c2, #ceremony[data-sc="3"] .c3 { display: grid; }
/* 場面の切り替えの帯・始まりの幕・進み具合 */
.mg-wipe { position: absolute; inset: -10% -60%; z-index: 4; pointer-events: none; transform: translateX(-100%); background: linear-gradient(105deg, transparent 34%, var(--volt) 34% 42%, var(--ink) 42% 57%, var(--hot) 57% 62%, transparent 62%); }
.mg-wipe.go { animation: mgWipe .5s cubic-bezier(.6, 0, .35, 1) both; }
@keyframes mgWipe { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.mg-shut { position: absolute; left: 0; right: 0; height: 50.5%; z-index: 5; background: var(--ink); pointer-events: none; }
.mg-shut.t { top: 0; animation: shutT .55s cubic-bezier(.7, 0, .2, 1) .08s both; } .mg-shut.b { bottom: 0; animation: shutB .55s cubic-bezier(.7, 0, .2, 1) .08s both; }
@keyframes shutT { to { transform: translateY(-101%); } } @keyframes shutB { to { transform: translateY(101%); } }
.mg-prog { position: absolute; left: calc(18px + var(--sal)); bottom: calc(36px + var(--sab)); width: min(240px, 36vw); height: 4px; background: rgba(255, 255, 255, .22); z-index: 3; }
.mg-prog i { display: block; height: 100%; background: var(--volt); transform-origin: left; animation: prog var(--dur, 8.2s) linear both; }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* 場面 1：段・カップの名前・全◯戦 */
.s1 { justify-items: start; gap: 8px; }
.gpo-lv { margin: 0; padding: 3px 20px; background: var(--volt); color: var(--ink); clip-path: var(--para); font-weight: 900; font-size: clamp(16px, 2.2vw, 24px); letter-spacing: .06em; animation: inL .4s var(--ease) .25s both; }
.gpo-name { margin: 4px 0 0; padding: .08em .4em .16em; background: var(--hot); color: var(--ink); clip-path: var(--para); font-family: var(--disp); font-weight: 400; font-size: clamp(30px, 8vw, 96px); line-height: 1.15; white-space: nowrap; transform-origin: 30% 50%; animation: slam .55s var(--ease) .45s both; }
@keyframes slam { 0% { transform: scale(2.3); opacity: 0; } 60% { transform: scale(.96); opacity: 1; } 100% { transform: none; opacity: 1; } }
.gpo-sub { margin: 4px 0 0; padding: 5px 20px; background: var(--ink); color: #fff; clip-path: var(--para); font-weight: 900; font-size: clamp(15px, 1.8vw, 19px); animation: inU .4s var(--ease) 1s both; }
.gpo-sub .num { font-size: 1.5em; color: var(--volt); margin: 0 .12em; line-height: .9; }
/* 場面の見出し */
.mg-h { margin: 0; justify-self: start; display: flex; align-items: center; gap: 10px; padding: 4px 20px 4px 12px; background: var(--ink); clip-path: var(--para); font-weight: 900; font-size: 17px; color: #fff; animation: inL .35s var(--ease) both; }
.mg-h::before { content: ''; width: 9px; height: 1.1em; background: var(--volt); transform: skewX(-18deg); }
/* 場面 2：コースのカード（番号・線が描かれていく形・名前・長さ） */
.s2 { width: min(1040px, 100%); justify-self: center; margin: 0 auto; }
.gpo-rounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.gpo-rounds li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 2px; padding: 10px 14px 12px; background: rgba(11, 13, 18, .93); clip-path: var(--cham); box-shadow: inset 0 -4px 0 var(--volt); min-width: 0; animation: cardIn .5s var(--ease) both; animation-delay: calc(.1s + var(--i) * .14s); }
@keyframes cardIn { 0% { opacity: 0; transform: translateY(34px) skewX(-10deg); } 100% { opacity: 1; transform: none; } }
.gpo-rounds li em { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 46px; line-height: .95; color: var(--volt); }
.gpo-rounds li svg { width: 100%; height: 58px; }
.gpo-rounds li svg path { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s ease-out both; animation-delay: calc(.35s + var(--i) * .14s); }
.gpo-rounds li svg circle { fill: var(--hot); animation: inU .3s var(--ease) both; animation-delay: calc(.3s + var(--i) * .14s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.gpo-rounds li b { grid-column: 1 / 3; font-weight: 900; font-size: 16px; white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.gpo-rounds li small { grid-column: 1 / 3; font-weight: 800; font-size: 13px; color: var(--mute); white-space: nowrap; }
/* 場面 3：出場する 6 台（番号・色・メーカーと車の名前）。自分は黄緑 */
.s3 { width: min(1040px, 100%); margin: 0 auto; }
.gpo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gpo-grid li { display: grid; grid-template-columns: auto 6px minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 8px 16px 8px 12px; background: rgba(11, 13, 18, .93); clip-path: var(--para); min-width: 0; animation: plateL .45s var(--ease) both; animation-delay: calc(.1s + var(--i) * .09s); }
.gpo-grid li:nth-child(even) { animation-name: plateR; }
@keyframes plateL { from { opacity: 0; transform: translateX(-60px) skewX(-12deg); } to { opacity: 1; transform: none; } }
@keyframes plateR { from { opacity: 0; transform: translateX(60px) skewX(-12deg); } to { opacity: 1; transform: none; } }
.gpo-grid li .num { font-size: 34px; font-weight: 900; line-height: 1; min-width: 1.3em; text-align: center; }
.gpo-grid li i { align-self: stretch; clip-path: var(--para); }
.gpo-grid li span { display: grid; min-width: 0; }
.gpo-grid li small { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--mute); white-space: nowrap; overflow: clip; }
.gpo-grid li b { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.gpo-grid li.me { background: var(--volt); color: var(--ink); } .gpo-grid li.me small { color: var(--ink); }
/* 場面 4：第 1 戦とコースの名前 */
.s4 { justify-items: center; gap: 10px; }
.gpo-r1 { font-family: var(--disp); font-weight: 400; font-size: clamp(64px, 15vw, 190px); line-height: 1; color: #fff; text-shadow: 6px 6px 0 var(--hot); transform: skewX(-8deg); animation: zoomIn .6s var(--ease) both; }
@keyframes zoomIn { 0% { transform: skewX(-8deg) scale(3.2); opacity: 0; } 55% { transform: skewX(-8deg) scale(.95); opacity: 1; } 100% { transform: skewX(-8deg) scale(1); opacity: 1; } }
.gpo-r1n { padding: 5px 24px; background: var(--volt); color: var(--ink); clip-path: var(--para); font-weight: 900; font-size: clamp(16px, 2.4vw, 26px); animation: inU .4s var(--ease) .35s both; }
@media (max-width: 640px) { .gpo-rounds { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gpo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gpo-rounds li em { font-size: 36px; } .gpo-rounds li svg { height: 46px; } }
@media (max-height: 480px) { .mg-sc { padding-top: calc(12px + var(--sat)); padding-bottom: calc(64px + var(--sab)); gap: 8px; } .gpo-rounds li { padding: 6px 10px 8px; } .gpo-rounds li em { font-size: 34px; } .gpo-rounds li svg { height: 40px; } .gpo-grid li { padding: 4px 12px 4px 10px; } .gpo-grid li .num { font-size: 28px; } .gpo-name { font-size: 54px; } }

/* 結果発表：最終結果 → 3 位・2 位・1 位 → 優勝 */
#ceremony { background: none; }
.ce-shade { position: absolute; inset: 0; background: rgba(11, 13, 18, .6); transition: opacity .6s; pointer-events: none; }
#ceremony[data-sc="2"] .ce-shade { opacity: .55; } #ceremony[data-sc="3"] .ce-shade { opacity: 0; }
#ceremony .mg-bg { transition: opacity .5s; } #ceremony[data-sc="3"] .mg-bg { opacity: 0; }
.c1 { justify-items: center; gap: 8px; }
.ce-gp { padding: 3px 18px; background: var(--volt); color: var(--ink); clip-path: var(--para); font-weight: 900; font-size: 15px; letter-spacing: .06em; animation: inU .35s var(--ease) .1s both; }
.ce-fr { font-family: var(--disp); font-weight: 400; font-size: clamp(48px, 11vw, 136px); line-height: 1.05; color: #fff; text-shadow: 6px 6px 0 var(--hot); transform: skewX(-8deg); animation: zoomIn .6s var(--ease) .25s both; }
.c2 { align-content: end; justify-content: start; }
.ce-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: min(560px, calc(100vw - 36px)); }
.ce-top li { display: grid; grid-template-columns: 58px 8px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 8px 20px 8px 12px; background: rgba(11, 13, 18, .93); clip-path: var(--para); animation: plateL .5s var(--ease) both; }
.ce-top li:nth-child(3) { animation-delay: .15s; } .ce-top li:nth-child(2) { animation-delay: .85s; } .ce-top li:nth-child(1) { animation-delay: 1.6s; animation-name: plateWin; }
@keyframes plateWin { 0% { opacity: 0; transform: translateX(-80px) skewX(-14deg) scale(1.08); } 70% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
.ce-top li .p { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 46px; line-height: .9; text-align: center; color: var(--volt); }
.ce-top li i { align-self: stretch; clip-path: var(--para); }
.ce-top li .nm { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 900; font-size: 16px; white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.ce-top li .nm .num { font-size: 22px; }
.ce-top li .pt { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 30px; white-space: nowrap; }
.ce-top li .pt small { font-family: var(--body); font-style: normal; font-size: 14px; margin-left: 2px; }
.ce-top li.w { background: var(--volt); color: var(--ink); } .ce-top li.w .p { color: var(--ink); }
.c3 { align-content: start; justify-items: center; }
.ce-one { position: absolute; left: 50%; top: 50%; height: min(78vh, 96vw); width: auto; translate: -50% -50%; pointer-events: none; animation: oneIn 1.1s var(--ease) both; }
.ce-one text { font-family: var(--num); font-style: italic; font-weight: 900; font-size: 260px; text-anchor: middle; fill: rgba(214, 255, 63, .1); stroke: var(--volt); stroke-width: 5; opacity: .85; }
@keyframes oneIn { 0% { transform: scale(2.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cer { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.cer small { padding: 2px 16px; background: rgba(11, 13, 18, .88); color: var(--volt); clip-path: var(--para); font-weight: 900; font-size: 15px; letter-spacing: .08em; animation: inU .35s var(--ease) .1s both; }
.cer b { font-family: var(--disp); font-weight: 400; font-size: clamp(44px, min(9vw, 14vh), 104px); line-height: 1.05; color: #fff; text-shadow: 5px 5px 0 var(--hot), 0 0 18px rgba(11, 13, 18, .6); transform: skewX(-8deg); animation: zoomIn .55s var(--ease) .2s both; }
.cer-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.cer-row > span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 22px; background: var(--volt); color: var(--ink); clip-path: var(--para); font-weight: 900; font-size: clamp(16px, 2.4vw, 24px); animation: inU .4s var(--ease) .6s both; }
.cer-row > span .num { font-size: 1.7em; line-height: .8; }
.cer em { display: inline-flex; align-items: baseline; gap: 4px; padding: 0 18px; background: rgba(11, 13, 18, .9); clip-path: var(--para); font-style: normal; animation: inU .4s var(--ease) .9s both; }
.cer em .cnt { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; color: #fff; }
.cer em small { padding: 0; background: none; clip-path: none; color: #fff; font-size: 15px; letter-spacing: 0; animation: none; }
@media (max-height: 480px) { .cer b { font-size: 44px; } .ce-top li { padding: 4px 16px 4px 10px; } .ce-top li .p { font-size: 34px; } .ce-top li .pt { font-size: 24px; } .ce-one { height: 70vh; } }
/* 大きな見出しの書体（Dela Gothic One）は字の箱が行の高さより上下に 0.23em ずつ出る → 上下を空けて、となりの札と字の箱が重ならないように */
.gpo-r1, .ce-fr, .cer b { margin-block: .24em; }
.gpo-name { margin-block: .1em; }

/* 設定の画面の音楽の出典（index.html の #s-credit・依頼 233） */
.setcredit { margin: 6px 0 0; max-width: 360px; font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .74); }
/* ---------- レギュレーション（2026-11-01 夜・項目236）：カップの札の行・始まりの動きの札・出場者の注記・ガレージで止める板 ---------- */
.gpcard .gpreg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.gpcard .gpreg .rt { min-width: 0; }
.chip.ng { background: var(--ink3); color: #fff; box-shadow: inset 0 0 0 2px var(--hot); }
.gpo-reg { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 18px 5px 12px; background: var(--ink); color: #fff; clip-path: var(--para); font-weight: 900; font-size: clamp(14px, 1.7vw, 18px); animation: inU .4s var(--ease) 1.2s both; }
.gpo-reg[hidden] { display: none; }
.mg-note { margin: 0; justify-self: end; padding: 3px 16px; background: var(--ink); color: var(--mute); clip-path: var(--para); font-weight: 800; font-size: 13px; animation: inU .35s var(--ease) .8s both; }
/* ガレージで止める板（出られない車を選んだ時）：理由・持っている出られる車・手に入る所・ディーラーへ */
.greg { display: grid; gap: 6px; margin-top: 6px; padding: 10px 12px; background: var(--ink); clip-path: var(--cham); box-shadow: inset 0 0 0 2px var(--hot); }
.greg[hidden] { display: none; }
.greg .why { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-weight: 900; font-size: 14px; line-height: 1.5; color: #fff; }
.greg .why .i { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--hot); }
.greg .none { margin: 0; font-weight: 800; font-size: 13px; color: #fff; }
.greg small { font-weight: 800; font-size: 12px; color: var(--mute); }
.gregcars { display: flex; flex-wrap: wrap; gap: 6px; }
.gregcars .pill { min-height: 40px; padding: 6px 16px; font-size: 14px; background: var(--ink3); }
.greg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.greg li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #fff; }
.greg li span { color: var(--mute); font-weight: 700; }
.greg #g-reg-dealer { justify-self: start; min-height: 40px; }
.glist .card.ng { box-shadow: inset 0 0 0 2px var(--hot); }

/* ---------- 2026-11-02：開催の行（項目247）・開催していないカップ・エピックの札（項目246） ---------- */
.gpcard .gpsched { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: #fff; }
.gpcard .gpsched.on > span:last-child { color: var(--volt); }
.gpcard.shut { cursor: default; }
.gpcard.shut:hover { transform: none; background: var(--ink2); }
.gpcard.shut .gph b, .gpcard.shut ol { opacity: .55; }
.gpcard.epic { box-shadow: inset 0 0 0 2px var(--volt), inset 0 0 0 5px var(--ink2), inset 0 0 0 7px var(--hot); }
/* 文節で折る（2026-11-02 項目269〜271）：グランプリの一覧・始まり・結果発表・終わりの画面。折れ目は budoux.js の <wbr>（jatext.js の jaHTML：BudouX の切れ目から Janome の語の途中を除いた所）と空白・句読点だけ。
   keep-all が無いと <wbr> は効かない。名前は jatext.js の jaName（.jg・折らない）・括弧は .jp・入らない時は jaFit が字を小さくする（店とガレージのセッションの共通の作り） */
.gpcard, #gpopen, #ceremony, #gpend { word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
.gpcard { min-width: 0; grid-template-columns: minmax(0, 1fr); } /* 札の中の欄は札の幅まで（長い副賞の名前で欄が 314px に広がり、札からはみ出した・項目269） */
.gpcard li > span, .gpcard .gph > b, #gpo-rounds b, #gpo-grid b { min-width: 0; } /* 名前の欄（jaFit は .jg の親＝この欄の幅で字を小さくする） */
.gpcard .gpp .carp { flex-wrap: wrap; max-width: 100%; }
.jg, .jp { white-space: nowrap; } .jg.jw, .jp.jw { white-space: normal; } /* jatext.js（店とガレージのセッションの shop.css にも同じ物がある） */
.screen:not([hidden]) .gpcard { animation-name: inU; } /* 入る動きは縦だけ（inL の skewX で背の高い札が右へ 30px 出て、一覧が横に流れた・項目269） */
#gpsel .hdr { flex-wrap: wrap; row-gap: 6px; } #gpsel .hdr h2 { white-space: nowrap; flex: none; } /* 「グランプリ」を 1 語のまま（320px で「グランプ／リ」と折れた・項目270）。入らない幅では制覇の数が次の行へ */

/* 結果の画面（レースの結果・途中の順位・結果発表・グランプリの終わり）は横スクロール禁止（2026-11-03 利用者「グランプリのリザルドも横スクロール禁止」）。
   名前の欄は切らずに折る（会社と車の名前の間だけ・js/main.js の entrantHTML）。表は縦にだけ動く。細い画面は列を詰めて幅に収める */
.rtr .nm, .str .nm { white-space: normal; overflow: visible; text-overflow: clip; flex-wrap: wrap; row-gap: 0; line-height: 1.15; }
.rtr .nm .en, .str .nm .en { min-width: 0; word-break: keep-all; overflow-wrap: normal; }
.rtr .nm > .num, .str .nm > .num, .rtr .nm > .logo, .str .nm > .logo { flex: none; }
@media (max-width: 420px) {
  .str { grid-template-columns: 24px 4px minmax(0, 1fr) repeat(var(--n, 4), minmax(16px, 22px)) minmax(30px, 36px); gap: 4px; padding-left: 6px; padding-right: 6px; }
  .rtr { grid-template-columns: 24px 4px minmax(0, 1fr) minmax(52px, 62px) minmax(40px, 50px) minmax(26px, 32px); gap: 4px; padding-left: 6px; padding-right: 6px; }
  .rtr.nogp { grid-template-columns: 24px 4px minmax(0, 1fr) minmax(52px, 62px) minmax(40px, 50px); }
}
/* 結果発表の上位 3 台の名前も切らない（2026-11-03）：入らない時は jaFit が字を小さくし、それでも入らない時だけ折る */
.ce-top li .nm { white-space: normal; overflow: visible; text-overflow: clip; flex-wrap: wrap; row-gap: 0; line-height: 1.15; }
.ce-top li .nm > span:last-child { min-width: 0; }
@media (max-width: 360px) { .ce-top li { grid-template-columns: 40px 6px minmax(0, 1fr) auto; column-gap: 6px; padding-left: 8px; padding-right: 12px; } .ce-top li .p { font-size: 34px; } .ce-top li .pt { font-size: 24px; } }

/* ---------- 2026-11-04 横スクロール禁止（利用者「グランプリの最終順位を横スクロール禁止にしただろ」「店舗の中でも」「カルーセル以外の UI 全体の横スクロールは禁止」） ----------
   最終順位（#gpend）は、副賞の札が nowrap（上の「記号の大きさ」の指定）で、「プロフェッショナルのカップが開きました」などの長い 1 行が画面の幅を超え、
   画面の枠（.screen・overflow: auto）ごと横に動いた（本番 a5fafec5・320px で +115px・390px で +45px・412px で +23px）。
   札は行が足りなければ折る（折る位置は jaHTML の <wbr>・名前は jaName のひとかたまり・入らない名前は jaFit が字を小さくする）。
   画面と表の枠は x を切る（overflow-x: clip は、y が auto の枠では hidden になる＝縦だけ動く。hidden を使うのではなく、幅を超えない作りにしたうえでの念のため）。
   carousel（.glist の scroll-snap）だけが横に動く。tests/hsgp.mjs・hsgpend.mjs・hsall.mjs が数える */
.rprize .gift { white-space: normal; max-width: 100%; flex-wrap: wrap; row-gap: 0; line-height: 1.3; }
.screen, .rtable, .stable, .clist, .gplist, #q-list, #mk-list, .pbox, .gside { overflow-x: clip; }
/* 副賞の札が多くて板の高さを超える時は、札の欄が縦に動く（前は板の下のボタン「ディーラーへ・メニューへ」に重なった・320×568・札 5 枚）。横には動かない */
.rmain { overflow-y: auto; overflow-x: clip; }
/* ミッションの行：題名の列が 1fr だと、折れない長い題名で列が広がり、報酬の数が画面の右へ出た（320px のタブ 4〜7・8〜48px）。題名は列の中で折る */
.mrow { grid-template-columns: 28px minmax(0, 1fr) auto; }
/* ガレージ・店・ディーラーの見出し：入らない幅（320〜390px・コイン 6 桁）ではコインを次の行へ（前は右へ出た・本番 a5fafec5） */
#garage .gbox > .hdr, #shop .gbox > .hdr, #dealer .gbox > .hdr { flex-wrap: wrap; row-gap: 4px; }
/* 副賞の札の記号（旗・コイン・車のロゴ）は、文の左に並べる（前は文が長いと文だけが次の行へ回り、記号が 1 行を占めた） */
.rprize .gift > .i + span, .rprize .gift > .logo + span { flex: 1 1 0; min-width: 0; }
/* 2026-11-10 依頼 310：サーキットカップの 16 台（始まりの動きの場面 3）。4 列・小さい札（縦持ちと狭い画面は 2 列）。出る間隔も短く（16 台目が場面の 2.1 秒に入る） */
.gpo-grid.many { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.gpo-grid.many li { padding: 3px 10px 3px 8px; column-gap: 7px; animation-delay: calc(.1s + var(--i) * .05s); }
.gpo-grid.many li .num { font-size: 22px; }
.gpo-grid.many li small { font-size: 10px; }
.gpo-grid.many li b { font-size: 13px; }
@media (max-width: 640px) { .gpo-grid.many { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; } .gpo-grid.many li { padding: 2px 8px 2px 6px; } .gpo-grid.many li .num { font-size: 18px; } }
@media (max-height: 480px) { .gpo-grid.many li { padding: 1px 8px 1px 6px; } .gpo-grid.many li .num { font-size: 18px; } .gpo-grid.many li small { display: none; } }
/* 2026-11-10 依頼 310：結果と途中の順位の表は、行を中身の高さのまま並べて縦に送る（表は高さの決まった格子で、行が入りきらない時に各行が最小の高さ 38px まで縮められ、
   縦持ちで 3 行に折れた「番号・会社・車の名前」が次の行に重なった。6 台の時も 320〜412px で起きていた。16 台で目立った） */
.rtable, .stable { grid-auto-rows: max-content; }
/* 2026-11-10 依頼 310：16 台の札（始まりの場面 3）の文字の欄は 83〜118px しかない。前は欄が中の行の幅（「ツバサモータース・ハッチバック」176px）まで広がり、メーカー・種類と長い車の名前（アイアンリッジ）が札の右で切れた。
   欄を札の幅に収め、縦に余裕のある画面は種類を次の行へ（「・」は出さない）、低い画面は種類を出さずメーカーだけ。320px は札の余白と数字を詰める（6 台の札は前のまま） */
.gpo-grid li small em { font-style: normal; }
.gpo-grid.many li > span { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) and (min-height: 700px) { .gpo-grid.many li small { flex-wrap: wrap; row-gap: 0; line-height: 1.2; } .gpo-grid.many li small .dot { display: none; } .gpo-grid.many li small .kd { flex-basis: 100%; } }
@media (max-width: 1000px) and (max-height: 699.98px) { .gpo-grid.many li small .dot, .gpo-grid.many li small .kd { display: none; } }
@media (max-width: 340px) { .gpo-grid.many li { padding: 2px 6px 2px 4px; column-gap: 4px; } .gpo-grid.many li .num { font-size: 16px; min-width: 1.1em; } .gpo-grid.many li small { font-size: 9.5px; gap: 3px; } .gpo-grid.many li small svg { width: 12px; height: 12px; } .gpo-grid.many li b { font-size: 12px; } }
