
:root {
  --red: #bd0007;
  --blue: #014db9;
  --navy: #0b1f44;
  --ink: #14213d;
  --text: #1a2338;
  --muted: #4d5870;
  --bg: #f2f5fa;
  --surface: #ffffff;
  --line: #d3dae7;
  --line-strong: #aeb9cf;
  --soft: #eaf0fb;
  --good: #146c43;
  --good-bg: #e4f4ea;
  --warn: #8a5a00;
  --warn-bg: #fff4d6;
  --warn-line: #d9a400;
  --gray: #5f6b82;
  --gray-bg: #eef0f4;
  --tap: 44px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 31, 68, 0.06), 0 2px 8px rgba(11, 31, 68, 0.05);
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; padding-bottom: 68px;
}
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }


.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header::after { content: ""; display: block; height: 3px; background: var(--red); }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 6px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.brand-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--navy); min-height: var(--tap); }
.brand-link img { height: 34px; width: auto; display: block; }
.brand-sub { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; color: var(--navy); border-left: 2px solid var(--line-strong); padding-left: 8px; line-height: 1.2; }
.top-nav { display: none; }
.top-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.top-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.top-nav a:hover { background: var(--soft); }
.top-nav a.active { background: var(--navy); color: #fff; }
.env-label { margin: 0; font-size: 0.75rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 6px; padding: 1px 8px; }


.container { max-width: var(--maxw); margin: 0 auto; padding: 14px 12px 28px; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.page-head { margin: 4px 0 14px; }
.eyebrow { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; color: var(--red); }
h1 { font-size: 1.45rem; line-height: 1.35; margin: 2px 0 8px; color: var(--navy); }
h1.brand { font-size: 1.5rem; margin: 6px 0 14px; padding-bottom: 8px; border-bottom: 3px solid var(--navy); }
h2 { font-size: 1.12rem; margin: 2px 0 10px; color: var(--navy); line-height: 1.4; }
h3 { font-size: 0.98rem; margin: 12px 0 6px; color: var(--ink); }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 0.9rem; }
.small { font-size: 0.85rem; }
.date { font-size: 1.15rem; font-weight: 800; margin: 0 0 8px; color: var(--navy); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.notice { background: var(--warn-bg); border: 2px solid var(--warn-line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; font-weight: 600; font-size: 0.95rem; color: #4a3300; }
.course-caution { font-size: 0.88rem; margin: 0.6em 0 0; color: var(--muted); }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list > li { border-top: 1px solid var(--line); }
.plain-list > li:first-child { border-top: 0; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 8px 2px; text-decoration: none; color: inherit; }
.row-link:hover { background: var(--soft); }
.chev { color: var(--gray); font-weight: 800; }
.tag { display: inline-block; background: var(--gray-bg); color: var(--muted); border-radius: 999px; padding: 1px 10px; white-space: nowrap; font-size: 0.8rem; font-weight: 700; }
.tag.good { background: var(--good-bg); color: var(--good); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.member { background: var(--navy); color: #fff; }


.hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 16px; margin: 0 0 14px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--red); }
.hero h1 { color: #fff; border: 0; margin: 0 0 6px; font-size: 1.5rem; }
.hero p { color: #dbe5fa; margin: 4px 0; }
.hero .hero-logo { background: #fff; border-radius: 10px; padding: 10px 14px; display: inline-block; margin: 0 0 12px; }
.hero .hero-logo img { height: 40px; width: auto; display: block; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hero .btn { background: #fff; color: var(--navy); }
.hero .btn.secondary { background: transparent; color: #fff; border: 2px solid #fff; }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.feature { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 10px 12px; background: var(--surface); text-decoration: none; color: inherit; display: block; }
.feature:nth-child(even) { border-left-color: var(--red); }
.feature strong { display: block; color: var(--navy); }
.feature span { font-size: 0.9rem; color: var(--muted); }


.btn, .search button {
  min-height: var(--tap); padding: 0 18px; font-size: 1rem; font-weight: 800; border: 0; border-radius: 10px;
  background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
}
.btn:hover, .search button:hover { background: var(--blue); color: #fff; }
.btn.secondary { background: var(--gray-bg); color: var(--ink); border: 1px solid var(--line-strong); }
.btn.secondary:hover { background: var(--soft); color: var(--navy); }
.btn.block { display: flex; width: 100%; }
.search { display: flex; gap: 8px; margin: 0 0 12px; }
.search input[type="search"] { flex: 1; min-width: 0; min-height: var(--tap); padding: 0 12px; font-size: 1rem; border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; }
.form label { display: block; font-size: 0.92rem; color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.form input[type="email"], .form input[type="password"] { width: 100%; min-height: var(--tap); padding: 0 12px; font-size: 1rem; border: 2px solid var(--line-strong); border-radius: 10px; }
.errorlist { color: #a01818; list-style: none; padding: 0; margin: 4px 0; font-size: 0.9rem; font-weight: 700; }


.course { margin: 0 0 10px; }
.course h3 { margin: 8px 0 6px; padding-left: 8px; border-left: 4px solid var(--red); color: var(--navy); }
.race-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.race-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--tap); padding: 6px 0; border: 2px solid var(--navy); border-radius: 10px; background: var(--surface); color: var(--navy); text-decoration: none; font-weight: 800; }
.race-btn:hover { background: var(--navy); color: #fff; }
.race-btn small { font-size: 0.72rem; font-weight: 700; color: var(--muted); line-height: 1.1; }
.race-btn:hover small { color: #dbe5fa; }
.race-btn.locked { border-style: dashed; border-color: var(--line-strong); background: var(--gray-bg); color: var(--ink); }
.date-tabs { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.date-tabs a { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 16px; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; color: var(--ink); }
.date-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }


.grade { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 10px; font-weight: 800; line-height: 1.1; min-height: 2.1rem; white-space: nowrap; border: 2px solid transparent; }
.grade b { font-size: 1.3rem; font-weight: 900; }
.grade i { font-style: normal; font-size: 0.8rem; font-weight: 700; }
.grade.g1 { background: var(--navy); color: #fff; }
.grade.g2 { background: var(--soft); color: var(--navy); border-color: var(--blue); }
.grade.g3 { background: #f3f6fc; color: #2c4678; border-color: #b7c6e3; }
.grade.g4 { background: var(--gray-bg); color: #3a455c; border-color: var(--line-strong); }
.grade.g5 { background: #fff; color: #56627a; border-color: var(--line-strong); border-style: dashed; }
.status { display: inline-flex; align-items: center; justify-content: center; min-height: 2.1rem; padding: 0 10px; border-radius: 10px; border: 2px dashed var(--gray); color: #46526a; background: #fff; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.big-grade .grade { font-size: 1.1rem; min-height: 3rem; padding: 4px 14px 4px 12px; }
.big-grade .grade b { font-size: 2rem; }
.big-grade .grade i { font-size: 0.95rem; }
.big-grade .status { min-height: 3rem; font-size: 1rem; }

.legend { margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.legend summary { cursor: pointer; padding: 10px 14px; min-height: var(--tap); font-weight: 800; color: var(--navy); display: flex; align-items: center; }
.legend[open] summary { border-bottom: 1px solid var(--line); }
.legend-body { padding: 10px 14px 12px; }
.legend-list { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
.legend-list li { display: flex; align-items: center; gap: 8px; }


.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-row { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 44px; border-top: 1px solid var(--line); padding: 4px 0; }
.bar-row:first-child { border-top: 0; }
.bar-label { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.bar { height: 12px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.bar-fill.b1 { width: 100%; background: var(--navy); }
.bar-fill.b2 { width: 80%; }
.bar-fill.b3 { width: 60%; background: #5b86cf; }
.bar-fill.b4 { width: 40%; background: #93add9; }
.bar-fill.b5 { width: 20%; background: #b7bfd0; }
.bar.none { background: var(--gray-bg); border-style: dashed; }
.group-title { margin: 14px 0 4px; font-size: 0.9rem; font-weight: 800; color: var(--red); letter-spacing: 0.02em; }
.radar-wrap { max-width: 340px; margin: 0 auto 6px; }
.radar { width: 100%; height: auto; display: block; }
.radar .grid { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.radar .axis { stroke: var(--line); stroke-width: 1; }
.radar .shape { fill: rgba(1, 77, 185, 0.22); stroke: var(--blue); stroke-width: 2.5; }
.radar text { font-size: 13px; fill: var(--ink); font-weight: 700; }


.sync-head, .sync-row { display: grid; grid-template-columns: 2.6rem 2.4rem minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.sync-head { font-size: 0.8rem; color: var(--muted); padding: 0 2px 6px; border-bottom: 2px solid var(--navy); font-weight: 700; }
.sync-row { min-height: 58px; padding: 6px 2px; }
.sync-row .rank, .sync-row .no { text-align: center; font-weight: 800; color: var(--navy); }
.sync-row .rank { font-size: 1.15rem; }
.sync-row .no { color: var(--muted); font-weight: 700; }
.sync-row .name a { display: inline-block; min-height: 32px; font-weight: 800; padding: 2px 0; color: var(--navy); }
.sync-row .g { text-align: right; }
.comment { display: block; color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.race-title { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.cond { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.cond li { background: var(--soft); color: var(--navy); border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: 0.9rem; }

.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; border-top: 1px solid var(--line); }
.kv-list li:first-child { border-top: 0; }
.kv { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.kv dd { margin: 0; }


.chart-top { border-top: 4px solid var(--navy); }
.chart-top .horse-name { font-size: 1.7rem; margin: 2px 0 4px; }
.lv { display: inline-block; background: var(--navy); color: #fff; font-size: 0.72rem; font-weight: 800; border-radius: 6px; padding: 0 8px; margin-right: 6px; vertical-align: middle; }
.metric-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.metric { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfe; }
.metric.main { border: 2px solid var(--navy); background: #fff; }
.metric h3 { margin: 0 0 2px; font-size: 0.92rem; color: var(--navy); }
.metric p { margin: 2px 0; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 14px; }
.fit-good { border-left: 5px solid var(--good); background: var(--good-bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
.fit-warn { border-left: 5px solid var(--warn-line); background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
.fit-good h3, .fit-warn h3 { margin: 0 0 2px; }
.lineage-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }


.ptree { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 4px; }
.pt-node { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; display: block; }
.pt-node small { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.pt-node strong { color: var(--navy); }
.pt-node.s { border-left: 4px solid var(--blue); }
.pt-node.d { border-left: 4px solid var(--red); }
.pt-node.root { border: 2px solid var(--navy); background: var(--soft); }
.pt-node.unknown { background: var(--gray-bg); border-style: dashed; color: var(--muted); }
.pt-g3 { margin-left: 12px; } .pt-g4 { margin-left: 24px; } .pt-g5 { margin-left: 36px; } .pt-g6 { margin-left: 48px; } .pt-g7 { margin-left: 60px; }
.pt-controls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pt-controls a { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 14px; border: 2px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink); background: #fff; }
.pt-controls a.active { background: var(--navy); border-color: var(--navy); color: #fff; }


.lock-card { text-align: center; border: 2px solid var(--navy); }
.lock-card .price { font-size: 1.6rem; font-weight: 900; color: var(--navy); margin: 4px 0; }
.lock-inline { background: var(--gray-bg); border-style: dashed; border-color: var(--line-strong); }
.lock-list { list-style: none; margin: 8px auto; padding: 0; max-width: 460px; text-align: left; }
.lock-list li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; background: #fff; }
.lock-list strong { display: block; color: var(--navy); }
.lock-badge { display: inline-block; background: var(--navy); color: #fff; font-weight: 800; border-radius: 999px; padding: 2px 14px; font-size: 0.85rem; }
.member-panel { border: 2px dashed var(--line-strong); background: #fafbfe; }


.site-footer { background: var(--navy); color: #dbe5fa; margin-top: 8px; padding: 18px 12px 22px; }
.site-footer .footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.footer-brand img { height: 30px; width: auto; background: #fff; padding: 4px 8px; border-radius: 8px; display: block; }
.footer-brand span { font-weight: 800; font-size: 0.95rem; color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 0.92rem; }
.footer-links a { display: inline-block; min-height: 40px; line-height: 40px; color: #fff; }
.footer-copy { margin: 8px 0 0; font-size: 0.8rem; color: #b6c4e4; }
.plain-bullets { margin: 0.4em 0; padding-left: 1.2em; }
.doc-list { margin: 0.4em 0; padding-left: 1.4em; }
.faq-q { font-size: 1rem; margin: 0 0 0.3em; color: var(--navy); }
.faq-a { margin: 0; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bottom-nav a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 0 2px; text-decoration: none; color: var(--muted); font-size: 0.78rem; font-weight: 800; line-height: 1.2; }
.bottom-nav a.active { color: var(--navy); box-shadow: inset 0 4px 0 var(--red); background: var(--soft); }

@media (max-width: 360px) {
  .kv { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .sync-head, .sync-row { grid-template-columns: 2.2rem 2rem minmax(0, 1fr) auto; }
  .grade i { display: none; }
  .brand-sub { display: none; }
  .bar-row { grid-template-columns: 4.8rem minmax(0, 1fr) auto; }
}
@media (min-width: 600px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .legend-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .top-nav { display: block; }
  .container { padding: 20px 20px 36px; }
  .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .race-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .race-split .side { position: sticky; top: 76px; }
  .pt-grid-wrap { overflow: visible; }
  .ptree.bracket { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(30px, auto)); gap: 4px 10px; }
  .ptree.bracket .pt-node { grid-row: var(--row) / span var(--span); grid-column: var(--col); margin-left: 0; display: flex; flex-direction: column; justify-content: center; }
  .ptree.bracket .pt-node small { font-size: 0.72rem; }
}
@media (min-width: 1200px) { h1 { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .bottom-nav, .site-header, .site-footer { display: none; } }


.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; padding: 0; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--soft); color: var(--navy); font-weight: 700; font-size: 0.92rem; }

.hero::before { content: ""; position: absolute; left: 50%; right: 0; bottom: 0; height: 4px; background: var(--blue); z-index: 1; }


.card p a:not(.btn), .card dd a, .page-head a { display: inline-block; padding: 12px 2px; margin: -12px 0; }
.card ul.plain-bullets li a, .card ul.doc-list li a, .card li > a:not(.row-link):not(.race-btn):not(.btn) { display: inline-block; padding: 12px 2px; margin: -12px 0; }
.metric-grid { list-style: none; margin: 0 0 10px; padding: 0; }


.radar-note { font-size: 0.85rem; margin: 4px 0 10px; line-height: 1.5; }
.sa-intro { margin: 2px 0 12px; line-height: 1.6; }
.sa-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sa-card { border: 1px solid var(--line); border-left: 6px solid var(--navy); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; min-width: 0; }
.sa-sb { border-left-color: var(--red); }
.sa-bt { border-left-color: var(--blue); }
.sa-cr { border-left-color: var(--navy); }
.sa-nk { border-left-color: #5b86cf; }
.sa-ff { border-left-color: var(--line-strong); }
.sa-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sa-head h3 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.sa-en { font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.sa-desc { margin: 6px 0 8px; font-size: 0.9rem; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.sa-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sa-item { border-top: 1px solid var(--line); padding-top: 8px; }
.sa-item:first-child { border-top: 0; padding-top: 0; }
.sa-name { margin: 0 0 4px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.sa-badges { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.sa-status, .sa-dir { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--line-strong); background: #fff; color: var(--navy); }
.sa-st-formal { background: var(--navy); color: #fff; border-color: var(--navy); }
.sa-st-provisional { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.sa-st-insufficient, .sa-st-legacy_text { border-style: dashed; border-color: var(--gray); color: #46526a; }
.sa-dir-plus { color: var(--good); border-color: var(--good); background: var(--good-bg); }
.sa-dir-minus { color: var(--red); border-color: var(--red); background: #fdeaea; }
.sa-kv { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 4px 10px; margin: 4px 0; font-size: 0.92rem; }
.sa-kv dt { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.sa-kv dd { margin: 0; overflow-wrap: anywhere; }
.sa-chip { min-height: 28px; font-size: 0.85rem; padding: 0 10px; }
.sa-summary, .sa-note { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }
.sa-empty { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
@media (min-width: 768px) { .sa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }


.chart { margin: 0 0 8px; }
.radar-fixed { max-width: 360px; }
.radar-fixed .axis-pending { stroke: var(--line-strong); stroke-dasharray: 4 4; }
.radar-fixed .shape.series-primary { fill: rgba(1, 77, 185, 0.20); stroke: var(--blue); stroke-width: 2.5; }
.radar-fixed .shape.series-overlay { fill: rgba(200, 16, 46, 0.10); stroke: var(--red); stroke-width: 2; stroke-dasharray: 6 4; }
.radar-fixed .shape-open { fill: none; stroke-width: 2.5; }
.radar-fixed .shape-open.series-primary { stroke: var(--blue); }
.radar-fixed .shape-open.series-overlay { stroke: var(--red); stroke-dasharray: 6 4; }
.radar-fixed .dot.series-primary { fill: var(--blue); }
.radar-fixed .dot.series-overlay { fill: var(--red); }
.radar-fixed text { font-size: 13px; fill: var(--ink); font-weight: 700; }
.radar-fixed text.lbl-pending { fill: var(--muted); }
.radar-fixed .lbl-word { font-size: 11px; font-weight: 700; fill: var(--muted); }
.chart-legend { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.chart-legend .lg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.88rem; line-height: 1.45; }
.chart-legend .sw { width: 22px; height: 0; border-top: 3px solid var(--blue); flex: 0 0 auto; }
.chart-legend .lg-overlay .sw { border-top: 3px dashed var(--red); }
.chart-legend .lg-off .sw { border-top: 3px dotted var(--line-strong); }
.chart-legend .lg-name { font-weight: 800; }
.chart-legend .lg-word { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }


.race-switch { margin: 0 0 12px; }
.course-tabs { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.course-tabs a, .course-tabs span { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 16px; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 800; color: var(--ink); }
.course-tabs .active { background: var(--navy); color: #fff; border-color: var(--navy); }
.rno-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rno { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 2px solid var(--navy); border-radius: 10px; background: var(--surface); color: var(--navy); font-weight: 800; text-decoration: none; }
.rno.current { background: var(--navy); color: #fff; }
.rno.locked { border-style: dashed; border-color: var(--line-strong); background: var(--gray-bg); color: var(--ink); }
.rno.none { border: 2px dotted var(--line); color: var(--muted); background: transparent; font-weight: 600; }
.rno-step { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; }
.rno-step a { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 6px; font-weight: 800; }
@media (min-width: 720px) { .rno-strip { grid-template-columns: repeat(12, minmax(0, 1fr)); } }


.column-list { display: grid; gap: 12px; }
.column-item h2 { margin: 4px 0 6px; font-size: 1.1rem; }
.column-item h2 a { text-decoration: none; }
.column-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.column-article h1 { margin: 6px 0; overflow-wrap: anywhere; }
.column-article .lead { font-weight: 700; line-height: 1.7; }
.column-article p { line-height: 1.8; overflow-wrap: anywhere; }


.bottom-nav ul { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bottom-nav a { font-size: 0.74rem; }
@media (min-width: 900px) and (max-width: 1199px) { .top-nav a { padding: 0 10px; font-size: 0.9rem; } }
.cbp-status { display: grid; gap: 4px; }
.cbp-status.cbp-linked { background: var(--soft); border-color: var(--blue); color: var(--navy); }
.cbp-runners > li { padding: 12px 0; }
.cbp-head { display: grid; grid-template-columns: auto 2.4rem minmax(0, 1fr); grid-template-areas: "rank no name" "rank no karte"; align-items: center; gap: 2px 10px; }
.cbp-rank { grid-area: rank; display: flex; flex-direction: column; align-items: center; min-width: 4.6rem; }
.cbp-rank b { font-size: 1.5rem; color: var(--navy); line-height: 1.1; }
.cbp-k { font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.cbp-head .no { grid-area: no; display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; }
.cbp-head .name { grid-area: name; font-weight: 800; font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; }
.cbp-karte { grid-area: karte; justify-self: start; display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 800; }
.cbp-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.cbp-blocks .cbp-block:last-child { grid-column: 1 / -1; }
.cbp-block { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
.cbp-block h3 { margin: 0 0 6px; font-size: 0.9rem; color: var(--navy); }
.cbp-off-text { margin: 0; }
.cbp-kv { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; }
.cbp-kv div { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px dotted var(--line); padding: 2px 0; }
.cbp-kv dt { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.cbp-kv dd { margin: 0; font-weight: 800; }
.cbp-judgments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.jd { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 4px 4px; border-radius: 10px; border: 2px solid var(--line-strong); background: #fff; }
.jd-name { font-size: 0.74rem; font-weight: 800; color: var(--navy); text-align: center; overflow-wrap: anywhere; line-height: 1.2; }
.jd-val { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.jd-hit { border-color: var(--navy); background: var(--navy); }
.jd-hit .jd-name, .jd-hit .jd-val { color: #fff; }
.jd-off { border-style: dashed; }
.st-off, .st-na { min-height: 1.9rem; font-size: 0.8rem; }
.cbp-scope { margin-top: 4px; }
@media (min-width: 900px) {
  .cbp-blocks { grid-template-columns: 1fr 1fr 1.6fr; }
  .cbp-blocks .cbp-block:last-child { grid-column: auto; }
  .cbp-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cbp-head { grid-template-columns: auto 2.4rem minmax(0, 1fr) auto; grid-template-areas: "rank no name karte"; }
  .cbp-karte { justify-self: end; }
}


.account-area { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.acct-form { margin: 0; }
.acct-link { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 12px; border: 2px solid var(--navy); border-radius: 999px; background: var(--surface); color: var(--navy); font-weight: 800; font-size: 0.86rem; text-decoration: none; white-space: nowrap; cursor: pointer; font-family: inherit; }
.acct-link:hover { background: var(--soft); }
.acct-primary { background: var(--navy); color: #fff; }
.acct-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.acct-signup { display: none; }
.top-nav + .account-area { margin-left: 8px; }
@media (min-width: 480px) and (max-width: 899px) { .acct-signup { display: inline-flex; } }
.top-nav a { white-space: nowrap; }
@media (min-width: 900px) { .header-inner { gap: 10px; } }
@media (min-width: 900px) and (max-width: 1199px) {
  .top-nav a { padding: 0 8px; font-size: 0.86rem; }
  .brand-sub { display: none; }
  .acct-link { padding: 0 10px; font-size: 0.82rem; }
}
.demo-strip { background: var(--gray-bg); border-bottom: 1px solid var(--line-strong); }
.demo-inner { max-width: var(--maxw); margin: 0 auto; padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-size: 0.82rem; color: #3a455c; line-height: 1.45; }
.demo-inner strong { color: var(--navy); white-space: nowrap; }
.welcome h2 { margin-bottom: 6px; }
.welcome-actions, .lock-actions, .acct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.lock-actions { margin: 10px 0; }
.lock-state { margin: 6px 0 10px; }
.plan-details { margin-top: 12px; }
.plan-details summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 800; color: var(--blue); }
.plan-table-wrap { overflow-x: auto; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.plan-table th, .plan-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: center; vertical-align: middle; }
.plan-table thead th { font-size: 0.78rem; color: var(--muted); }
.plan-table tbody th { text-align: left; font-weight: 700; }
.plan-table td { width: 4.2rem; }
.pt-yes { font-weight: 800; color: var(--navy); }
.pt-no { color: var(--muted); }
.plan-note { margin-top: 8px; }
.auth-wrap { display: grid; gap: 14px; }
.auth-card .form input[type="email"], .auth-card .form input[type="password"] { width: 100%; }
.btn-block { width: 100%; }
.auth-links { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.auth-links a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }
.auth-warn { background: var(--soft); border-left: 4px solid var(--navy); padding: 8px 10px; border-radius: 6px; }
.form-preview fieldset[disabled] { opacity: 0.6; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form .check { display: flex; gap: 8px; align-items: flex-start; }
.form .check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; }
.form .check label { display: inline; font-weight: 600; }
.flow-steps { margin: 0 0 12px; padding-left: 1.4em; display: grid; gap: 6px; }
.flow-steps strong { display: block; color: var(--navy); }
.flow-compact { margin-top: 12px; color: var(--muted); }
.acct-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.acct-pending { margin: 12px 0; color: var(--muted); font-size: 0.9rem; }
.portal-form { max-width: 680px; margin: 20px auto; overflow-wrap: anywhere; }
.portal-form input:not([type=checkbox]), .portal-form select { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 44px; }
.portal-form input[type=checkbox] { width: 22px; height: 22px; }
.portal-rights { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 16px; }
.portal-email { overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .auth-wrap.auth-narrow { grid-template-columns: minmax(0, 560px); justify-content: center; }
}


.form input[type="text"] { width: 100%; min-height: var(--tap); padding: 0 12px; font-size: 1rem; border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; }
.form input:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.acct-who { display: none; font-size: 0.8rem; font-weight: 800; color: var(--good); white-space: nowrap; }
@media (min-width: 480px) { .acct-who { display: inline; } }
.mp-card h1 { margin-bottom: 8px; }
.mp-lead { margin: 0 0 12px; }
.mp-form { display: grid; gap: 4px; }
.mp-field { margin: 0 0 12px; min-width: 0; }
.mp-field label { display: block; font-size: 0.95rem; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.mp-req { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--red); color: #fff; font-size: 0.72rem; font-weight: 800; line-height: 1.6; vertical-align: 1px; }
.mp-help { margin-top: 4px; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.mp-help:empty { display: none; }
.mp-help ul { margin: 4px 0 0; padding-left: 1.2em; }
.mp-field.has-error input { border-color: #a01818; background: #fff6f6; }
.mp-check { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 8px; align-items: start; }
.mp-check input[type="checkbox"] { width: 26px; height: 26px; margin: 9px 0 0; }
.mp-check label { display: block; min-height: var(--tap); padding: 9px 0; line-height: 1.6; font-weight: 700; margin: 0; }
.mp-check label a { display: inline; padding: 0; margin: 0; }
.mp-check .errorlist { grid-column: 1 / -1; }
.mp-alert { border: 2px solid #a01818; background: #fff3f3; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; color: #5c0c0c; display: grid; gap: 4px; }
.mp-alert .errorlist { margin: 0; }
.mp-alert-note { font-size: 0.86rem; color: #5c0c0c; }
.mp-info { border-left: 4px solid var(--navy); background: var(--soft); border-radius: 6px; padding: 8px 10px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
.mp-info a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 800; }
.mp-steps { margin: 0 0 14px; padding-left: 1.4em; display: grid; gap: 6px; }
.mp-steps strong { color: var(--navy); }
.mp-progress { list-style: none; padding: 0; counter-reset: mp; }
.mp-progress li { counter-increment: mp; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0 8px; align-items: start; }
.mp-progress li::before { content: counter(mp); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--navy); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.mp-progress li.done::before { content: "✓"; background: var(--good); border-color: var(--good); color: #fff; }
.mp-progress li strong { display: block; }
.mp-msg-ok h1 { color: var(--good); }
.mp-free { margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: var(--good-bg); color: #0e4a2e; font-size: 0.92rem; }
.mp-kind { font-size: 1.05rem; }
.mp-radios { display: grid; gap: 4px; margin: 0 0 12px; }
.mp-radios label { display: flex; align-items: center; gap: 8px; min-height: var(--tap); font-weight: 700; }
.mp-radios input { width: 22px; height: 22px; }

.mp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.mp-who { margin: 0; color: var(--muted); }
.mp-who strong { color: var(--navy); overflow-wrap: anywhere; }
.mp-flash { border: 2px solid var(--good); background: var(--good-bg); color: #0e4a2e; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; font-weight: 800; }
.mp-free-notice { font-weight: 600; }
.mp-dl { margin: 0 0 12px; display: grid; gap: 8px; }
.mp-dl > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 4px 10px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mp-dl dt { font-weight: 800; color: var(--muted); font-size: 0.9rem; }
.mp-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mp-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mp-inline { margin: 0; }
.mp-section-h { margin: 18px 0 6px; color: var(--navy); }
.mp-code-grid { display: grid; gap: 12px; }
.mp-code { border-top: 4px solid var(--navy); margin: 0; display: flex; flex-direction: column; }
.mp-code-cbp { border-top-color: var(--red); }
.mp-code-simulator { border-top-color: var(--blue); }
.mp-code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mp-code-head h3 { margin: 0; font-size: 1.1rem; color: var(--navy); }
.mp-until { margin: 10px 0 6px; }
.mp-remain { display: inline-block; margin-left: 4px; color: var(--muted); font-size: 0.9rem; }
.mp-rule { margin: 0 0 10px; font-size: 0.86rem; color: var(--muted); }
.mp-done { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--good-bg); color: #0e4a2e; font-weight: 700; font-size: 0.92rem; }
.mp-code-form { margin: 0 0 8px; }
.mp-code-form label { display: block; font-weight: 800; font-size: 0.92rem; margin-bottom: 4px; }
.mp-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.mp-code-row input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.mp-links { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.mp-links a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 800; }
.mp-legend { margin-top: 14px; }
.mp-legend-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.mp-legend-list li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; align-items: center; font-size: 0.9rem; }

.st { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 2px solid; font-weight: 800; font-size: 0.86rem; white-space: nowrap; line-height: 1; }
.st::before { font-size: 0.9em; }
.st-ok { background: var(--good); border-color: var(--good); color: #fff; }
.st-ok::before { content: "✓"; }
.st-none { background: #fff; border-color: var(--line-strong); border-style: dashed; color: var(--gray); }
.st-none::before { content: "－"; }
.st-expired { background: var(--warn-bg); border-color: var(--warn-line); color: #5a3b00; }
.st-expired::before { content: "!"; }
.st-stop { background: #a01818; border-color: #a01818; color: #fff; }
.st-stop::before { content: "■"; font-size: 0.7em; }
.st-prep { background: var(--soft); border-color: var(--blue); color: var(--blue); }
.st-prep::before { content: "…"; }
.st-wait { background: var(--gray-bg); border-color: var(--gray); color: var(--ink); }
.st-wait::before { content: "◷"; }
@media (min-width: 900px) {
  .mp-code-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-legend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .mp-dl > div { grid-template-columns: minmax(0, 1fr); }
  .mp-code-row { grid-template-columns: minmax(0, 1fr); }
}

.mp-next-code summary { min-height: var(--tap); padding: 10px 0; cursor: pointer; font-weight: 700; }


@media (max-width: 479px) { .brand-sub { display: none; } }
.brand-sub { white-space: nowrap; }
.cbp-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 0 0 14px; border-bottom: 4px solid var(--red); }
.cbp-hero h1 { margin: 0 0 6px; color: var(--navy); }
.cbp-hero p { margin: 0 0 6px; }
.cbp-hero-img { width: clamp(120px, 28vw, 260px); height: auto; }
.cbp-cats-h { margin: 6px 0 8px; color: var(--navy); }
.cbp-cat-grid { display: grid; gap: 12px; margin-bottom: 14px; }
.cbp-cat { margin: 0; border-top: 4px solid var(--navy); }
.cbp-cat-hit { border-top-color: #8a4b14; }
.cbp-cat-danger { border-top-color: var(--blue); background: #f2f6ff; }
.cbp-cat-head { display: flex; align-items: center; gap: 10px; }
.cbp-cat-head h3 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.cbp-cat-classes { margin: 0; font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.cbp-cat-imgs { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.cbp-cat-imgs img { width: 56px; height: 56px; object-fit: contain; }
.cbp-cat-note { margin: 8px 0 0; font-size: 0.86rem; color: #12346e; }
.cbp-cat-empty { margin: 10px 0 0; font-weight: 700; color: var(--muted); }
.cbp-cand-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cbp-cand { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 8px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--surface); }
.cand-no { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; }
.cbp-cand-main { display: grid; gap: 4px; min-width: 0; }
.cand-name { font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.cbp-cand-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cbp-cand-cond { font-size: 0.86rem; color: var(--muted); overflow-wrap: anywhere; }
.cls { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 6px; background: var(--gray-bg); color: var(--ink); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.02em; }
.ev { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 26px; padding: 0 6px; border-radius: 6px; font-weight: 800; font-size: 0.82rem; border: 2px solid transparent; }
.ev-red { background: var(--red); color: #fff; }
.ev-yellow { background: #ffd23f; color: #3d2c00; border-color: #c9a000; }
.ev-blue { background: var(--blue); color: #fff; }
.cs { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 999px; font-weight: 800; font-size: 0.78rem; border: 2px solid; white-space: nowrap; }
.cs-cand { border-color: var(--line-strong); color: var(--ink); background: #fff; border-style: dashed; }
.cbp-guide h2 { margin-top: 0; }
.cbp-guide-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.cbp-guide-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 10px; padding: 6px 10px; }
.cbp-guide-item.cbp-cat-hit { border-left-color: #8a4b14; }
.cbp-guide-item.cbp-cat-danger { border-left-color: var(--blue); background: #f2f6ff; }
.cbp-guide-item strong { display: block; color: var(--navy); font-size: 1.05rem; }
.cbp-guide-item small { display: block; color: var(--muted); font-weight: 700; }
.cbp-guide-sub { margin: 12px 0 6px; font-size: 1rem; color: var(--navy); }
.cbp-legend { margin: 0 0 12px; display: grid; gap: 6px; }
.cbp-legend > div { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 8px; align-items: center; }
.cbp-legend dt { display: flex; flex-wrap: wrap; gap: 4px; }
.cbp-legend dd { margin: 0; font-size: 0.88rem; }
.cbp-sample { border: 2px dashed var(--line-strong); border-radius: 10px; padding: 8px; background: var(--gray-bg); }
.cbp-sample-label { margin: 0 0 6px; font-weight: 800; color: var(--red); font-size: 0.86rem; }
@media (max-width: 359px) { .cbp-legend > div { grid-template-columns: minmax(0, 1fr); } .cbp-hero { grid-template-columns: minmax(0, 1fr); } .cbp-hero-img { justify-self: center; } }
@media (min-width: 900px) {
  .cbp-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cbp-guide-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cbp-cat-imgs img { width: 64px; height: 64px; }
}
.card ul.course-tabs li > a:not(.row-link):not(.race-btn):not(.btn) { padding: 0 16px; margin: 0; }
.cbp-runners-details > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 800; color: var(--blue); }


.cbp-cat { background: #fffdf8; border: 2px solid #8f8aa6; border-top: 2px solid #8f8aa6; border-radius: 16px; padding: 12px; }
.cbp-cat-hit { border-top-color: #8f8aa6; }
.cbp-cat-danger { background: #fbfbff; border-color: #6d6a9c; border-top-color: #6d6a9c; }
.cbp-cat-head { position: relative; display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 8px 10px 8px 22px; min-height: 76px; overflow: hidden; }
.cbp-cat-recovery .cbp-cat-head { background: #fbf4ee; }
.cbp-cat-hit .cbp-cat-head { background: #fdf3ea; }
.cbp-cat-danger .cbp-cat-head { background: #eceefa; }
.cat-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; display: flex; flex-direction: column; }
.cat-bar i { flex: 1 1 0; display: block; }
.b-red { background: #d93a3f; } .b-yellow { background: #f0c030; } .b-blue { background: #3d7fd6; }
.b-deep { background: #1f2a6e; } .b-violet { background: #5a3fb0; } .b-venom { background: #8fd12a; flex: 0 0 22% !important; }
.cbp-cat-head > div { min-width: 0; flex: 1 1 auto; }
.cbp-cat-head h3 { color: #1b2235; }
.cbp-cat-danger .cbp-cat-head h3 { color: #1f2a6e; }
.cbp-cat-count { flex: 0 0 auto; font-size: 0.8rem; font-weight: 800; color: #2b3146; white-space: nowrap; }
.cbp-cat-note { color: #2c2f6b; }
.cbp-cand { position: relative; padding-left: 14px; background: #fff; border: 1px solid #d9d5e4; }
.cbp-cand::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: var(--line-strong); }
.cbp-cand.cand-red::before { background: #d93a3f; }
.cbp-cand.cand-yellow::before { background: #f0c030; }
.cbp-cand.cand-blue::before { background: #3d7fd6; }
.cls { background: #f3f2f7; border: 2px solid #c9c5d8; color: #1b2235; }
.cls-lion { border-color: #d93a3f; color: #9e1f24; background: #fff3f3; }
.cls-goat { border-color: #e0b020; color: #6b4e00; background: #fff9e6; }
.cls-snake, .cls-venom-snake { border-color: #5a3fb0; color: #2a1f74; background: #f1eefc; }
.cls-venom-snake { box-shadow: inset 0 -3px 0 #8fd12a; }
.cbp-guide-item { border-left-width: 0; position: relative; overflow: hidden; padding-left: 18px; background: #fffdf8; border-color: #c9c5d8; border-radius: 12px; }
.cbp-guide-item .cat-bar { width: 8px; }
.cbp-guide-item.cbp-cat-danger { background: #f4f4fc; }
.cbp-status.cbp-pending { background: var(--gray-bg); border-color: var(--line-strong); color: var(--ink); }
@media (max-width: 359px) { .cbp-cat-head { flex-wrap: wrap; } .cbp-cat-count { width: 100%; } }
.cls-lion-goat { border-color: #d93a3f; border-right-color: #e0b020; border-bottom-color: #e0b020; color: #6b2a10; background: #fff7ef; }
.cls-ncore-chimera-chimera-prime, .cls-ncore, .cls-normal-core, .cls-core, .cls-chimera, .cls-chimera-prime { border-color: #8f8aa6; }

.cls-boost, .cls-pulse { border-color: #8f8aa6; border-style: dashed; color: #2c2f6b; background: #fff; }
.cs-maybe { border-color: #8f8aa6; color: #2c2f6b; background: #f4f3f9; border-style: dotted; }
.cbp-cats-lead { margin: 0 0 10px; font-size: 0.9rem; }


body { padding-bottom: 0; }
.header-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; }
.header-inner > .brand-link { grid-column: 1; grid-row: 1; }
.header-inner > .account-area { grid-column: 2; grid-row: 1; margin: 0; }
.header-inner > .env-label { grid-column: 1 / -1; }
.top-nav { grid-column: 1 / -1; }
.top-nav ul { display: grid; grid-template-columns: auto auto auto auto auto auto auto; gap: 6px; }
.top-nav a { display: flex; justify-content: center; align-items: center; min-height: 46px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--soft); color: var(--navy); font-size: 1rem; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.top-nav a:hover { background: #dbe7fb; border-color: var(--blue); }
.top-nav a.active { color: white; background: var(--navy); border-color: var(--navy); box-shadow: inset 0 -4px 0 var(--red); text-decoration: none; }
.mobile-menu { grid-column: 1 / -1; }
.mobile-menu summary { cursor: pointer; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--navy); background: var(--soft); font-weight: 800; min-height: 44px; }
.mobile-menu ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 8px 0 0; padding: 0; list-style: none; background: var(--surface); border-top: 1px solid var(--line-strong); }
.mobile-menu nav a { white-space: nowrap; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 8px 4px; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 800; line-height: 1.4; }
.mobile-menu nav a:hover { color: var(--navy); background: var(--soft); }
.mobile-menu nav a.active { color: var(--navy); box-shadow: inset 0 4px 0 var(--red); background: var(--soft); }
.mp-code { gap: 0; min-width: 0; }
.mp-code-head { align-items: start; }
.mp-code-head .st { white-space: nowrap; }
.mp-code-form input { min-width: 0; width: 100%; }
.mp-next-code > p { margin: 8px 0; }
.mp-done-slot { min-width: 0; }
@media (min-width: 900px) {
  .mobile-menu { display: none; }
  .mp-code-grid { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; }
  .mp-code { display: grid; grid-template-rows: auto minmax(6em,auto) minmax(5em,auto) minmax(4em,auto) auto 1fr; }
  .mp-code-head { min-height: 3em; }
  @supports (grid-template-rows: subgrid) { .mp-code { grid-template-rows: subgrid; grid-row: span 6; } }
}
@media (max-width: 899px) {
  .site-header { position: static; }
  .top-nav { display: none; }
  .mp-code-grid { grid-template-columns: minmax(0,1fr); }
  .mp-code { display: flex; }
  .mp-done-slot:empty { display: none; }
  .brand-sub { display: none; }
  .brand-link img { max-width: 150px; }
}


.frame-badge{display:inline-flex;align-items:center;justify-content:center;min-width:2.2em;min-height:2.2em;border:1px solid #64748b;border-radius:4px;font-weight:700}
.frame-1{background:#fff!important;color:#111!important}.frame-2{background:#111!important;color:#fff!important}
.frame-3{background:#c51f2b!important;color:#fff!important}.frame-4{background:#164caf!important;color:#fff!important}
.frame-5{background:#f7d530!important;color:#111!important}.frame-6{background:#08783d!important;color:#fff!important}
.frame-7{background:#f39531!important;color:#111!important}.frame-8{background:#f39cbd!important;color:#111!important}
.horse-nav{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:1rem 0}.horse-nav a{min-height:44px;max-width:100%;overflow-wrap:anywhere}
select{max-width:100%;min-height:44px}form button{min-height:44px}

.cbp-consent{line-height:1.85;overflow-wrap:anywhere}.cbp-consent h2{margin-top:2rem}.cbp-consent-body p{margin:.9rem 0}
