/* ゲームの結果発表画面のつもりで組む。丸い・光る・動く。明るい配色だけ。 */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #2a1b52;
  --dim: #4d3f73;
  --mute: #5f5385;
  --hair: #d9d0f0;
  --red: #e6003c;
  --blue: #0b5ed7;
  --pink: #ff4fa3;
  --yellow: #ffd91a;
  --cyan: #5fd6ff;
  --lime: #a6ec4b;
  --purple: #6a2dff;
  --stripe: #f5f0ff;
  --pop: "Mochiy Pop One", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --ol2: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink);
  --k2: #0b5ed7; --k2t: #ffffff;
  --k1: #b5d6ff; --k1t: #2a1b52;
  --z: #e4def5;  --zt: #2a1b52;
  --a1: #ffc2d2; --a1t: #2a1b52;
  --a2: #e6003c; --a2t: #ffffff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #c9f0ff;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.75) 2px, transparent 2.5px),
    linear-gradient(180deg, #9fe3ff 0%, #ffd9ef 38%, #fff3a6 72%, #b9f5c9 100%);
  background-size: 22px 22px, 100% 100%;
  background-attachment: scroll, fixed;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}
.wrap { max-width: 940px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }
p { margin: 0; }
b, strong { font-weight: 800; }
.aka { color: var(--red); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

@keyframes rainbow { from { background-position: 0 0; } to { background-position: 400% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slam { from { transform: rotate(12deg) scale(2.4); opacity: 0; } to { transform: rotate(12deg) scale(1); opacity: 1; } }
@keyframes fall { 0% { transform: translateY(-40px) rotateY(0deg); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(520px) rotateY(720deg); opacity: 0; } }
@keyframes fill { from { width: 0; } }
@keyframes shine { 0%, 60% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(-10deg) scale(1.08); } }

/* 題字 */
.mast-bg {
  background: linear-gradient(90deg, #ff4fa3, #ffb400, #a6ec4b, #19c2ff, #8a5bff, #ff4fa3);
  background-size: 400% 100%; animation: rainbow 24s linear infinite;
  border-bottom: 5px solid var(--ink);
}
.mast { padding-top: 10px; padding-bottom: 14px; text-align: center; }
.mast-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; font-weight: 800; }
.mast-top .date, .mast-top a { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 0 10px; text-decoration: none; }
.mast h1 {
  font-family: var(--pop); font-weight: 400; font-size: clamp(28px, 8.6vw, 64px); line-height: 1.25; margin: 8px 0 0; color: #fff;
  -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; filter: drop-shadow(0 6px 0 var(--ink));
}
.mast h1 em { font-style: normal; color: var(--yellow); }
.nav { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 4px solid var(--ink); }
.nav .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding-top: 5px; padding-bottom: 5px; }
.nav a { font-size: 13px; font-weight: 800; text-decoration: none; padding: 2px 12px; white-space: nowrap; border-radius: 999px; border: 2px solid transparent; }
.nav a:hover { background: var(--yellow); border-color: var(--ink); }
.ticker { display: flex; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; overflow: hidden; white-space: nowrap; }
.ticker[hidden] { display: none; }
.ticker b { flex: none; position: relative; z-index: 1; background: var(--yellow); color: var(--ink); padding: 3px 14px; border-radius: 0 999px 999px 0; }
.ticker-run { display: inline-block; padding: 3px 0; animation: run 45s linear infinite; }
.ticker-run span { margin-left: 40px; }

main { padding-bottom: 48px; overflow-x: clip; }
.notice { border: 4px solid var(--ink); border-radius: 18px; background: var(--yellow); padding: 8px 14px; margin-top: 16px; font-size: 14px; font-weight: 800; }

/* 区画は白い板。見出しは板の上に乗るリボン */
section { scroll-margin-top: 56px; }
#kiroku, #tsuki, #kirikuchi, #daicho {
  background: #fff; border: 4px solid var(--ink); border-radius: 28px; box-shadow: 0 9px 0 var(--ink);
  padding: 0 18px 20px; margin-top: 54px;
}
h2 { margin: 0 0 16px; font-size: 0; line-height: 1; transform: translateY(-22px); height: 26px; }
h2 span {
  display: inline-block; font-family: var(--pop); font-weight: 400; font-size: 23px; line-height: 1.5; color: #fff;
  background: linear-gradient(180deg, #ff86c4, #f0207f); border: 4px solid var(--ink); border-radius: 999px;
  padding: 1px 26px; box-shadow: 0 5px 0 var(--ink); text-shadow: var(--ol2); animation: bob 3.2s ease-in-out infinite;
}
#tsuki h2 span { background: linear-gradient(180deg, #6fd8ff, #0b8cf0); }
#kirikuchi h2 span { background: linear-gradient(180deg, #c3f56b, #4fb81a); }
#daicho h2 span { background: linear-gradient(180deg, #b79bff, #6a2dff); }
h3 { font-size: 16px; font-weight: 800; margin: 0 0 8px; }
h3 span { display: inline-block; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 0 14px; }
.note { font-size: 12px; color: var(--mute); margin-top: 10px; line-height: 1.6; }

/* 結果発表 */
.kicker { display: inline-block; font-size: 13px; font-weight: 800; margin-top: 18px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 0 14px; }
.splash {
  position: relative; overflow: hidden; isolation: isolate; margin: 12px 0 22px; text-align: center;
  background: #ffe94a; border: 5px solid var(--ink); border-radius: 34px; box-shadow: 0 11px 0 var(--ink);
  padding: 18px 14px 20px; animation: pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.splash::before {
  content: ""; position: absolute; z-index: -2; left: 50%; top: 50%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(#fff27a 0 9deg, #ffc93a 9deg 18deg); animation: spin 70s linear infinite;
}
.coins { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.coins i {
  position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7b0, #ffcf1a 55%, #e09a00); border: 2px solid #b87400;
  animation: fall 4s linear infinite; opacity: 0;
}
.coins i:nth-child(1) { left: 4%; animation-delay: 0s; } .coins i:nth-child(2) { left: 12%; animation-delay: 1.3s; animation-duration: 5s; }
.coins i:nth-child(3) { left: 21%; animation-delay: 2.4s; } .coins i:nth-child(4) { left: 30%; animation-delay: 0.6s; animation-duration: 4.6s; }
.coins i:nth-child(5) { left: 39%; animation-delay: 3.1s; } .coins i:nth-child(6) { left: 48%; animation-delay: 1.8s; animation-duration: 5.4s; }
.coins i:nth-child(7) { left: 57%; animation-delay: 0.3s; } .coins i:nth-child(8) { left: 66%; animation-delay: 2.9s; animation-duration: 4.4s; }
.coins i:nth-child(9) { left: 74%; animation-delay: 1.1s; } .coins i:nth-child(10) { left: 82%; animation-delay: 3.6s; animation-duration: 5.2s; }
.coins i:nth-child(11) { left: 89%; animation-delay: 2.1s; } .coins i:nth-child(12) { left: 95%; animation-delay: 0.9s; animation-duration: 4.8s; }
.stamp {
  position: absolute; right: 14px; top: 12px; transform: rotate(12deg); font-family: var(--pop); font-size: clamp(18px, 5vw, 34px); line-height: 1.4;
  color: #fff; background: var(--red); border: 4px solid var(--ink); border-radius: 16px; padding: 0 14px; box-shadow: 0 5px 0 var(--ink);
  animation: slam 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) 0.9s both;
}
.stamp.kuro { background: var(--blue); }
.headline {
  font-family: var(--pop); font-weight: 400; font-size: clamp(38px, 12.4vw, 116px); line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap;
  color: #ff2a6d; -webkit-text-stroke: clamp(7px, 1.8vw, 14px) #fff; paint-order: stroke fill;
  filter: drop-shadow(3px 0 0 var(--ink)) drop-shadow(-3px 0 0 var(--ink)) drop-shadow(0 3px 0 var(--ink)) drop-shadow(0 -3px 0 var(--ink)) drop-shadow(0 7px 0 var(--ink));
}
.headline.kuro { color: #ffab00; }
.headline .sign { display: block; font-size: 0.3em; letter-spacing: 0.14em; line-height: 1.7; color: #fff; -webkit-text-stroke: 0; }
.headline small { font-size: 0.45em; margin: 0 0.04em; }
.catch { display: inline-block; margin-top: 10px; background: var(--ink); color: var(--yellow); font-weight: 800; font-size: clamp(14px, 4vw, 21px); line-height: 1.5; padding: 2px 20px; border-radius: 999px; }

.gauge { margin: 16px auto 0; max-width: 620px; text-align: left; }
.g-track { position: relative; height: 30px; background: #fff; border: 4px solid var(--ink); border-radius: 999px; overflow: hidden; }
.g-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 999px 999px 0; background: linear-gradient(180deg, #ffb3d4, #ff2a6d); animation: fill 1.4s cubic-bezier(0.2, 0.9, 0.3, 1) 0.3s both; }
.g-fill.kuro { background: linear-gradient(180deg, #ffe58a, #ffab00); }
.g-ci { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, rgba(42, 27, 82, 0.28) 0 4px, transparent 4px 8px); }
.g-100 { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--ink); }
.g-lab { position: relative; height: 22px; font-size: 12px; font-weight: 800; }
.g-lab span { position: absolute; top: 2px; white-space: nowrap; }
.g-lab .g-mid { transform: translateX(-50%); }
.g-lab .g-end { right: 0; }
.g-key { font-size: 12px; font-weight: 800; margin-top: 2px; }
.g-key i { display: inline-block; width: 22px; height: 10px; vertical-align: middle; margin-right: 4px; border: 2px solid var(--ink); border-radius: 999px; background: repeating-linear-gradient(-45deg, rgba(42, 27, 82, 0.28) 0 4px, #fff 4px 8px); }

.heads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 22px; }
.hd { display: block; min-width: 0; text-align: left; font: inherit; color: #fff; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 7px 0 var(--ink); padding: 8px 14px 10px; cursor: pointer; transition: transform 0.12s; }
.hd:hover { transform: translateY(-3px); }
.hd:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--ink); }
.hd-aka { background: linear-gradient(180deg, #ff2f5f, #c9002f); }
.hd-ao { background: linear-gradient(180deg, #2f8bff, #0b4fbd); }
.hd-k { display: inline-block; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; padding: 0 10px; border-radius: 999px; border: 2px solid var(--ink); }
.hd-t { display: block; font-family: var(--pop); font-size: clamp(16px, 4.4vw, 28px); line-height: 1.45; text-shadow: var(--ol2); }
.hd-s { display: block; font-size: 12px; font-weight: 800; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.stats > div { min-width: 0; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); padding: 6px 12px 10px; background: var(--cyan); }
.stats > div:nth-child(2) { background: var(--lime); }
.stats > div:nth-child(3) { background: var(--yellow); }
.stats > div:nth-child(4) { background: #ffc2dc; }
.stats dt { font-size: 12px; font-weight: 800; }
.stats dd { margin: 0; font-size: clamp(18px, 2.5vw, 24px); font-weight: 900; line-height: 1.4; white-space: nowrap; }
.stats dd small { font-size: 12px; font-weight: 800; }
.stats dd.sm { font-size: 12px; font-weight: 800; color: var(--ink); white-space: normal; line-height: 1.5; }
.stats dd.aka { color: #b3002e; }

figure { margin: 26px 0 0; background: #fff; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); padding: 12px 14px 8px; }
figcaption { font-size: 16px; font-weight: 800; }
figcaption span { display: inline-block; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 0 14px; }
.chart { width: 100%; margin-top: 8px; }
.chart svg { display: block; width: 100%; touch-action: pan-y; }
.chart text { font-size: 12px; fill: var(--mute); font-weight: 800; font-variant-numeric: tabular-nums; }
.chart path[fill="none"] { stroke: var(--purple); stroke-width: 4; }
.chart circle { fill: var(--pink); stroke: var(--ink); }

#shushi .two { background: #fff; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); padding: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 26px; }
.two > * { min-width: 0; }
#shushi > .note { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 6px 12px; margin-top: 16px; }

/* 表 */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
th, td { padding: 6px 8px; text-align: left; white-space: nowrap; }
thead th { font-size: 12px; font-weight: 800; color: #fff; background: var(--purple); vertical-align: bottom; }
thead th:first-child { border-radius: 14px 0 0 0; }
thead th:last-child { border-radius: 0 14px 0 0; }
thead th small { color: #fff; }
th.num, td.num { text-align: right; }
th small, td small { display: block; font-size: 12px; color: var(--mute); line-height: 1.2; font-weight: 500; }
tbody tr { background: #fff; }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody td { background: inherit; border-bottom: 1px solid var(--hair); }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: #fff3a6; }
tbody tr.total, tbody tr.total:nth-child(n) { background: var(--yellow); font-weight: 900; }
tr.few td, tr.few td .aka { color: var(--mute); }
.tag { display: inline-block; font-size: 12px; border: 2px dashed var(--mute); border-radius: 999px; padding: 0 6px; margin-left: 6px; color: var(--mute); line-height: 1.5; }
.sticky th:first-child, .sticky td:first-child { position: sticky; left: 0; }
.bar { display: inline-block; vertical-align: middle; width: 84px; height: 12px; position: relative; margin-right: 8px; }
.bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.bar i { position: absolute; top: 0; bottom: 0; }
.bar i.p { left: 50%; background: linear-gradient(180deg, #5aa6ff, #0b5ed7); border-radius: 0 999px 999px 0; }
.bar i.n { right: 50%; background: linear-gradient(180deg, #ff6a8e, #e6003c); border-radius: 999px 0 0 999px; }

/* 開催日のマス */
.cal { display: grid; gap: 6px; margin-top: 6px; }
.cal-row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: start; }
.cal-month { font-size: 13px; font-weight: 900; padding-top: 4px; font-variant-numeric: tabular-nums; }
.cal-days { display: flex; flex-wrap: wrap; gap: 4px; }
.cal-days button { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; transition: transform 0.1s; }
.cal-days button:hover { transform: scale(1.25); }
.c-k2 { background: var(--k2); color: var(--k2t); }
.c-k1 { background: var(--k1); color: var(--k1t); }
.c-z { background: var(--z); color: var(--zt); }
.c-a1 { background: var(--a1); color: var(--a1t); }
.c-a2 { background: var(--a2); color: var(--a2t); }
.legend { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; font-weight: 800; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; display: inline-block; border-radius: 50%; border: 2px solid var(--ink); }

/* 切り替えボタン */
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pick button, .cg-b button {
  font: inherit; font-size: 13px; font-weight: 800; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 999px;
  padding: 0 12px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); transition: transform 0.08s;
}
.pick button:active, .cg-b button:active { transform: translateY(3px); box-shadow: none; }
.pick button[aria-pressed="true"], .cg-b button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }

/* 記録 */
.recs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rec { display: block; min-width: 0; text-align: left; font: inherit; color: var(--ink); background: #e8f8ff; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 8px 12px 10px; transition: transform 0.12s; }
.rec:nth-child(3n + 2) { background: #fff6bf; }
.rec:nth-child(3n) { background: #ffe6f2; }
.rec:nth-child(odd) { transform: rotate(-1deg); }
.rec:nth-child(even) { transform: rotate(1deg); }
button.rec { cursor: pointer; }
button.rec:hover { transform: rotate(0) translateY(-3px); }
.rec-l { display: inline-block; background: var(--ink); color: var(--yellow); font-size: 12px; font-weight: 800; padding: 0 12px; border-radius: 999px; }
.rec-v { display: block; font-family: var(--pop); font-size: clamp(19px, 4.2vw, 30px); line-height: 1.5; white-space: nowrap; }
.rec-v small { font-size: max(12px, 0.5em); }
.rec-s { display: block; font-size: 12px; font-weight: 800; color: var(--dim); }

/* 分析 */
.cg { display: grid; grid-template-columns: 60px 1fr; gap: 6px; align-items: start; margin-bottom: 8px; }
.cg-l { font-size: 12px; font-weight: 900; padding-top: 3px; }
.cg-b { display: flex; flex-wrap: wrap; gap: 6px; }
.clear { font: inherit; font-size: 13px; font-weight: 800; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 1px 14px; cursor: pointer; margin: 4px 0 0 66px; box-shadow: 0 3px 0 var(--ink); }
.panel { position: relative; border: 5px solid var(--ink); border-radius: 26px; background: linear-gradient(180deg, #fff, #f1ebff); box-shadow: 0 9px 0 var(--ink); padding: 14px 16px; margin: 18px 0 22px; }
.p-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.p-l { display: inline-block; font-size: 12px; font-weight: 800; background: var(--ink); color: var(--yellow); padding: 0 12px; border-radius: 999px; }
.p-n { font-family: var(--pop); font-size: clamp(24px, 7vw, 58px); line-height: 1.35; white-space: nowrap; color: var(--blue); }
.p-n.aka { color: var(--red); }
.p-n small { font-size: max(12px, 0.45em); }
.hanko {
  flex: none; font-family: var(--pop); font-size: clamp(16px, 4.4vw, 28px); line-height: 1.3; padding: 10px 22px; border: 4px solid var(--ink); border-radius: 999px;
  box-shadow: 0 5px 0 var(--ink); text-align: center; animation: pulse 1.6s ease-in-out infinite;
}
.h-bad { background: var(--red); color: #fff; }
.h-good { background: var(--blue); color: #fff; }
.h-luck { background: var(--yellow); color: var(--ink); }
.h-few { background: var(--z); color: var(--ink); }
.p-why { font-size: 13px; font-weight: 800; margin-top: 8px; }
.p-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.p-stats > div { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 2px 12px 4px; }
.p-stats dt { font-size: 12px; font-weight: 800; color: var(--dim); }
.p-stats dd { margin: 0; font-size: 17px; font-weight: 900; white-space: nowrap; }
.p-stats dd small { font-size: 12px; font-weight: 500; color: var(--mute); margin-left: 3px; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin-bottom: 10px; }
.filters label { display: block; font-size: 12px; font-weight: 800; }
.filters select, .filters input {
  display: block; width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  border: 3px solid var(--ink); border-radius: 14px; padding: 4px 8px; min-height: 38px;
}
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 0 4px 0 12px; margin: 0 6px 8px 0; }
.chip button { font: inherit; border: 0; background: none; color: var(--ink); cursor: pointer; padding: 2px 6px; }
.summary { font-size: 14px; font-weight: 800; padding: 6px 14px; background: var(--ink); color: #fff; border-radius: 999px; }
.summary b.aka { color: #ff9db5; }
.races { list-style: none; margin: 0; padding: 0; }
.race { border-bottom: 2px dotted var(--hair); padding: 10px 0; }
.race-head { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: baseline; }
.race-head time { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.race-head .name { font-weight: 900; font-size: 16px; }
.race-head .res { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.race-head .pl { margin-left: auto; font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--blue); }
.race-head .pl.aka { color: var(--red); }
.bets { margin-top: 3px; display: grid; gap: 3px; }
.bet { display: grid; grid-template-columns: 52px 1fr; gap: 6px; font-size: 13px; }
.bet .bt { font-weight: 800; }
.bet .lines { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.ln { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ln.hit {
  font-weight: 900; border-radius: 999px; padding: 0 4px 0 10px; border: 2px solid var(--ink);
  background: linear-gradient(110deg, #ffe45c 40%, #fffbe0 50%, #ffe45c 60%); background-size: 200% 100%; animation: shine 2.6s linear infinite;
}
.ln.hit::after { content: "的中"; display: inline-block; margin-left: 6px; font-size: 12px; line-height: 1.5; color: #fff; background: var(--red); padding: 0 8px; border-radius: 999px; }
.more-row { text-align: center; padding-top: 18px; }
.more-row button {
  font-family: var(--pop); font-size: 15px; color: var(--ink); background: linear-gradient(180deg, #fff27a, #ffc21a); border: 4px solid var(--ink); border-radius: 999px;
  padding: 6px 26px; cursor: pointer; box-shadow: 0 6px 0 var(--ink); transition: transform 0.08s;
}
.more-row button:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }

.foot-bg { background: var(--ink); color: #fff; border-radius: 28px 28px 0 0; }
.foot { font-size: 12px; padding-top: 14px; padding-bottom: 28px; text-align: center; }
.tip {
  position: fixed; z-index: 20; pointer-events: none; background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 5px 10px; font-size: 13px; font-weight: 800; line-height: 1.5; max-width: 260px; font-variant-numeric: tabular-nums;
}

/* さらに派手に：電飾、紙吹雪、きらめく星、押したときの火花、虹色に光る板 */
@keyframes chase { 0% { background-position: 0 0; } 50% { background-position: 11px 11px; } 100% { background-position: 0 0; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.045); } 24% { transform: scale(1); } 36% { transform: scale(1.03); } 48% { transform: scale(1); } }
@keyframes wig { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
@keyframes wave { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-9px) rotate(4deg); } }
@keyframes ring { 0% { box-shadow: 0 9px 0 var(--ink), 0 0 0 7px #ff4fa3; } 25% { box-shadow: 0 9px 0 var(--ink), 0 0 0 7px #ffd91a; } 50% { box-shadow: 0 9px 0 var(--ink), 0 0 0 7px #5fd6ff; } 75% { box-shadow: 0 9px 0 var(--ink), 0 0 0 7px #a6ec4b; } 100% { box-shadow: 0 9px 0 var(--ink), 0 0 0 7px #ff4fa3; } }
@keyframes twinkle { 0%, 100% { transform: scale(0.3) rotate(0deg); opacity: 0.2; } 50% { transform: scale(1) rotate(180deg); opacity: 1; } }
@keyframes confetti { 0% { transform: translateY(-20px) rotate(0deg); opacity: 1; } 100% { transform: translateY(105vh) rotate(900deg); opacity: 1; } }
@keyframes spark { 0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(200deg); opacity: 0; } }
@keyframes flip { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }

.mast h1 { animation: wig 3s ease-in-out infinite; }
.fanfare { margin: 18px 0 0; text-align: center; font-family: var(--pop); font-size: clamp(26px, 8vw, 54px); line-height: 1.3; white-space: nowrap; }
.fanfare i { display: inline-block; font-style: normal; color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; filter: drop-shadow(0 5px 0 var(--ink)); animation: wave 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * 0.12s); }
.fanfare i:nth-child(5n + 1) { color: #ff4fa3; }
.fanfare i:nth-child(5n + 2) { color: #ffd91a; }
.fanfare i:nth-child(5n + 3) { color: #5fd6ff; }
.fanfare i:nth-child(5n + 4) { color: #a6ec4b; }
.fanfare i:nth-child(5n) { color: #c9a8ff; }
.bulbs {
  margin: 8px 0 26px; padding: 13px; border-radius: 46px; background-color: var(--ink);
  background-image: radial-gradient(circle, #fff36b 3.5px, transparent 4.5px), radial-gradient(circle, #ff7cc0 3.5px, transparent 4.5px);
  background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; animation: chase 1.4s steps(2, jump-none) infinite;
  box-shadow: 0 11px 0 var(--ink), 0 0 0 5px #fff, 0 0 34px 10px rgba(255, 79, 163, 0.55);
}
.bulbs .splash { margin: 0; box-shadow: none; }
.headline #big { display: inline-block; animation: beat 1.6s ease-in-out 1.6s infinite; }
#kiroku, #tsuki, #kirikuchi, #daicho { animation: ring 6s linear infinite; }
#tsuki { animation-delay: -1.5s; }
#kirikuchi { animation-delay: -3s; }
#daicho { animation-delay: -4.5s; }
.stats > div { transition: transform 0.12s; }
.stats > div:hover { transform: translateY(-4px) rotate(-1.5deg); }

.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.stars i { position: absolute; width: var(--s); height: var(--s); background: var(--c); clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%); animation: twinkle 2.6s ease-in-out infinite; animation-delay: var(--d); }
.confetti { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: confetti linear forwards; }
.spark { position: fixed; z-index: 40; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%); animation: spark 0.6s ease-out forwards; }

/* アクセスカウンター */
.counter { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; padding: 8px 12px; background: linear-gradient(180deg, #3b2a6e, #2a1b52); color: #fff; font-size: 13px; font-weight: 800; border-bottom: 4px solid var(--ink); }
.counter[hidden] { display: none; }
.c-d { display: inline-flex; gap: 2px; perspective: 200px; }
.c-d b { display: inline-block; min-width: 20px; padding: 0 3px; text-align: center; font-family: var(--pop); font-weight: 400; font-size: 20px; line-height: 1.5; color: var(--yellow); background: #120a2b; border: 2px solid #8a5bff; border-radius: 6px; animation: flip 0.5s ease-out both; }
.c-d b:nth-child(2) { animation-delay: 0.06s; } .c-d b:nth-child(3) { animation-delay: 0.12s; } .c-d b:nth-child(4) { animation-delay: 0.18s; }
.c-d b:nth-child(5) { animation-delay: 0.24s; } .c-d b:nth-child(6) { animation-delay: 0.3s; } .c-d b:nth-child(7) { animation-delay: 0.36s; }

/* もっと派手に：回る光線の地、走る馬、流れるテープ、光の帯、画面下のテロップ */
@keyframes gallop { from { transform: translateX(0); } to { transform: translateX(calc(-100vw - 80px)); } }
@keyframes hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes glow { 0% { box-shadow: 0 11px 0 var(--ink), 0 0 0 5px #fff, 0 0 40px 14px rgba(255, 79, 163, 0.7); } 33% { box-shadow: 0 11px 0 var(--ink), 0 0 0 5px #fff, 0 0 40px 14px rgba(95, 214, 255, 0.8); } 66% { box-shadow: 0 11px 0 var(--ink), 0 0 0 5px #fff, 0 0 40px 14px rgba(166, 236, 75, 0.8); } 100% { box-shadow: 0 11px 0 var(--ink), 0 0 0 5px #fff, 0 0 40px 14px rgba(255, 79, 163, 0.7); } }
@keyframes glint { 0% { transform: scale(0) rotate(0deg); opacity: 0; } 40% { transform: scale(1) rotate(90deg); opacity: 1; } 100% { transform: scale(0) rotate(180deg); opacity: 0; } }
@keyframes trail { from { transform: scale(1) rotate(0deg); opacity: 0.9; } to { transform: scale(0.1) rotate(160deg); opacity: 0; } }
@keyframes bounceIn { 0% { transform: scale(0.55) translateY(50px); opacity: 0; } 60% { transform: scale(1.1) translateY(-6px); opacity: 1; } 80% { transform: scale(0.96); } 100% { transform: scale(1); } }
@keyframes cannon { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.12); } }

body { padding-bottom: 36px; }
body::before {
  content: ""; position: fixed; z-index: -2; left: 50%; top: 50%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.42) 0 7deg, transparent 7deg 14deg); animation: spin 140s linear infinite;
}

.lane { position: relative; height: 46px; overflow: hidden; background: linear-gradient(180deg, #8be67f, #37a845); border-bottom: 4px solid var(--ink); }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: repeating-linear-gradient(90deg, #fff 0 8px, transparent 8px 38px); }
.lane i { position: absolute; left: 100%; top: 6px; font-style: normal; font-size: 30px; line-height: 38px; animation: gallop 6.5s linear infinite, hop 0.32s ease-in-out infinite; }
.lane i:nth-child(2) { animation-duration: 5.2s, 0.28s; animation-delay: -2s, 0s; }
.lane i:nth-child(3) { animation-duration: 8.4s, 0.36s; animation-delay: -5s, 0s; }
.lane i:nth-child(4) { animation-duration: 7.3s, 0.3s; animation-delay: -3.4s, 0s; }

.tape-wrap { overflow: hidden; padding: 14px 0 6px; }
.tape { overflow: hidden; white-space: nowrap; transform: rotate(-1.6deg) scale(1.06); background: #f0207f; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); font-family: var(--pop); font-size: clamp(15px, 4.2vw, 22px); line-height: 1.9; color: #fff; text-shadow: var(--ol2); }
.tape div { display: inline-block; animation: run 26s linear infinite; }
.tape.t2 { transform: rotate(1.4deg) scale(1.06); background: var(--yellow); color: var(--ink); text-shadow: none; margin-top: 6px; }
.tape.t2 div { animation-direction: reverse; animation-duration: 32s; }

.bulbs { animation: chase 1.4s steps(2, jump-none) infinite, glow 4s linear infinite; }
.splash::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.75) 50%, transparent 58%); background-size: 250% 100%; animation: shine 3.4s linear infinite;
}
.glint { position: absolute; z-index: 2; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); pointer-events: none; background: #fff; clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); animation: glint 0.9s ease-in-out forwards; }
.trail { position: fixed; z-index: 40; width: 12px; height: 12px; margin: -6px 0 0 -6px; pointer-events: none; clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%); animation: trail 0.6s ease-out forwards; }
.rec.in, .hd.in, .stats > div.in, figure.in { animation: bounceIn 0.7s cubic-bezier(0.2, 1.2, 0.4, 1) both; }

.telop { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; height: 36px; align-items: center; overflow: hidden; white-space: nowrap; background: var(--yellow); border-top: 4px solid var(--ink); font-weight: 900; font-size: 15px; }
.telop[hidden] { display: none; }
.telop b { flex: none; position: relative; z-index: 1; align-self: stretch; display: flex; align-items: center; background: var(--red); color: #fff; padding: 0 14px; font-family: var(--pop); font-weight: 400; }
.telop-run { display: inline-block; animation: run 38s linear infinite; }
.telop-run span { margin-left: 44px; }
.telop-run span::before { content: "★"; margin-right: 8px; color: var(--red); }
.cannon {
  position: fixed; right: 12px; bottom: 48px; z-index: 7; width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--ink); cursor: pointer;
  font-family: var(--pop); font-size: 12px; line-height: 1.2; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff, #ff9bd0 45%, #ff4fa3); box-shadow: 0 6px 0 var(--ink); animation: cannon 1.2s ease-in-out infinite;
}
.cannon:active { box-shadow: 0 1px 0 var(--ink); translate: 0 5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .coins, .confetti, .stars, .lane, body::before { display: none; }
}

@media (max-width: 640px) {
  .bulbs { padding: 10px; border-radius: 36px; }
  .c-d b { font-size: 17px; min-width: 17px; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats dd { font-size: 19px; }
  .stats > div { padding: 5px 9px 8px; }
  .two { grid-template-columns: 1fr; gap: 22px; }
  .recs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rec { padding: 6px 9px 8px; border-radius: 18px; }
  .heads { grid-template-columns: 1fr; gap: 14px; }
  .hd { padding: 6px 9px 8px; border-radius: 18px; }
  #kiroku, #tsuki, #kirikuchi, #daicho { padding: 0 12px 16px; border-radius: 22px; }
  h2 span { font-size: 19px; padding: 1px 18px; }
  .splash { padding: 14px 8px 16px; border-radius: 26px; }
  .stamp { right: 8px; top: 8px; }
  .clear { margin-left: 0; }
  .panel { padding: 10px 12px; border-radius: 20px; }
  .nav a { padding: 1px 8px; }
  .mast h1 { -webkit-text-stroke-width: 6px; }
}
