
:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #ffffff;
  --ink: #14201c;
  --muted: #64706b;
  --line: #dfe3dc;
  --line-strong: #c8cec6;
  --accent: #087a5b;
  --accent-dark: #075d47;
  --accent-soft: #e6f3ee;
  --red: #b8463d;
  --red-soft: #faece9;
  --blue: #315ee7;
  --amber: #ad6d0c;
  --shadow: 0 18px 48px rgba(22, 40, 34, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  /* 和文の組版: 禁則を厳しめにし、約物の空きを詰める（未対応ブラウザは素の挙動） */
  line-break: strict;
  text-spacing-trim: space-first;
  font-feature-settings: 'palt' 1;
}
/* 長文は行末の1文字だけの折り返しを避ける */
p, li { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  transform: translateY(-160%); background: var(--ink); color: white;
  padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(200,206,198,.8);
  background: rgba(245,244,239,.92);
  backdrop-filter: blur(16px);
}
.site-header__inner {
  width: min(1180px, calc(100% - 40px)); height: 74px; margin: auto;
  display: flex; align-items: center; gap: 42px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 38px; height: 38px; flex: none; display: block;
}
.brand strong { display: block; font-size: 14px; line-height: 1.2; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font: 10px/1.4 ui-monospace, monospace; letter-spacing: .12em; margin-top: 2px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { position: relative; color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.nav-label--narrow { display: none; }
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -25px;
  height: 2px; border-radius: 2px; background: var(--accent);
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; border: 1px solid var(--accent); border-radius: 10px;
  background: var(--accent); color: white; padding: 0 22px;
  font-weight: 750; font-size: 14px; text-decoration: none;
  box-shadow: 0 7px 16px rgba(8,122,91,.15);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.button:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(8,122,91,.2); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button--small { min-height: 36px; padding: 0 15px; font-size: 12px; border-radius: 8px; }
.button--wide { width: 100%; }
/* 移動を促す二次ボタン: 緑の主ボタンと役割を混同させない */
.button--quiet {
  background: var(--paper); border-color: var(--line-strong); color: var(--ink); box-shadow: none;
}
.button--quiet:hover {
  background: var(--surface); border-color: var(--ink); color: var(--ink);
  box-shadow: 0 6px 14px rgba(22,40,34,.07);
}
.button--quiet .icon { transition: transform .16s ease; }
.button--quiet:hover .icon { transform: translateX(2px); }

.icon { flex: 0 0 auto; width: 15px; height: 15px; }
.button .icon:last-child { margin-right: -2px; }
.button--small .icon { width: 13px; height: 13px; }

.site-main { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 190px); margin: auto; padding: 68px 0 96px; }
.site-footer {
  width: min(1180px, calc(100% - 40px)); margin: auto;
  padding: 32px 0 46px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 32px; color: var(--muted);
}
.site-footer strong { color: var(--ink); font-size: 13px; }
.footer-links { display: flex; gap: 20px; align-items: center; font-size: 12px; }

.eyebrow, .mono-label {
  margin: 0 0 12px; color: var(--accent);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
}
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* 練習中だけ出る帯。スコアボード本体には触らず、誤解しやすい一点だけを先に置く */
.phase-notice {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 16px 22px;
  background: #eef2ec; border: 1px solid #d3ddd2; border-radius: 14px;
}
.phase-notice strong {
  color: var(--accent-dark); white-space: nowrap;
  font: 750 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.phase-notice p { margin: 0; flex: 1 1 380px; color: #46544c; font-size: 13.5px; line-height: 1.7; }

/* 状態だけを語る薄いバー: 大会進行 / 次の締切 / 決算カレンダーへの導線 */
.session-bar {
  display: flex; align-items: center; gap: 56px;
  padding: 20px 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.session-bar__cell { display: flex; flex-direction: column; gap: 8px; }
.session-bar__cell small {
  color: var(--muted);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.session-bar__cell strong { font-size: 26px; font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.session-bar__deadline { margin-left: auto; align-items: flex-end; text-align: right; }
.session-bar__idle { color: var(--muted); }

.section { padding: 62px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h1, .section-heading h2, .panel-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -.045em; }
.as-of { margin: 0; color: var(--muted); font-size: 12px; }
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 17px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
/* uppercaseはσ20をΣ20（総和記号）に化けさせるため使わない */
thead th {
  background: #fafaf7; color: var(--muted); font-size: 10px; font-weight: 750;
  letter-spacing: .08em;
}
tbody tr:last-child > * { border-bottom: 0; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fafbf8; }
tbody th { font-size: 14px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong { font-weight: 750; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.02em; }
.rank {
  display: inline-grid; place-items: center; width: 31px; height: 31px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 50%;
  font: 700 11px/1 ui-monospace, monospace;
}
.rank--1 { background: var(--ink); border-color: var(--ink); color: white; }
.rank--2, .rank--3 { background: var(--accent-soft); border-color: #b5d8ca; color: var(--accent-dark); }
/* 行のどこを押しても詳細へ飛べるよう、名前のリンクを行全体に広げる。 */
.ranking-table tbody tr { position: relative; }
.participant-link { text-decoration-color: var(--line-strong); }
.participant-link::after { content: ''; position: absolute; inset: 0; }
.ranking-table tbody tr:hover .participant-link { color: var(--accent); text-decoration-color: currentColor; }
.participant-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.positive { color: var(--accent) !important; }
.negative { color: var(--red) !important; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px;
  border-radius: 999px; background: #eff1ed; color: var(--muted);
  font-size: 10px; font-weight: 750; letter-spacing: .04em; white-space: nowrap;
}
.badge__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--api, .badge--published { color: var(--accent); background: var(--accent-soft); }
.badge--manual { color: var(--amber); background: #fbf0df; }
.badge--cancelled { color: var(--red); background: var(--red-soft); }
/* ランキングの後ろに置く参加導線。順位表と競わないよう、面ではなく枠だけで示す */
.join-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 30px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.join-cta p { flex: 1 1 340px; margin: 0; font-size: 14px; line-height: 1.7; }

.empty-state {
  min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; padding: 40px;
}
.empty-state__number { color: #d3d8d1; font: 800 72px/1 ui-monospace, monospace; }
.empty-state h1, .empty-state h2, .empty-state h3 { margin: 15px 0 5px; letter-spacing: -.035em; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }
.empty-state.compact { min-height: 160px; }
.not-found { min-height: 60vh; }

.page-header {
  display: flex; justify-content: space-between; gap: 60px; align-items: end;
  padding: 36px 0 58px; border-bottom: 1px solid var(--line); margin-bottom: 46px;
}
.page-header h1 { margin: 0; font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -.065em; }
.lead { max-width: 650px; margin: 20px 0 0; color: var(--muted); font-size: 15px; }
.deadline-card {
  min-width: 190px; padding: 18px 20px; border-left: 3px solid var(--accent);
  background: var(--surface); box-shadow: var(--shadow);
}
.deadline-card span, .deadline-card small { display: block; color: var(--muted); font-size: 11px; }
.deadline-card strong { display: block; margin: 6px 0; font: 750 24px/1 ui-monospace, monospace; }
/* 14営業日を左から右へ通して並べる。週の切れ目は罫線、掲載前の日は破線で示す。 */
.schedule { margin-bottom: 34px; }
.schedule__position {
  margin: 0 0 10px; color: var(--muted);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.schedule__position strong { color: var(--ink); font-size: 13px; }
/* 14営業日なら折り返さず収まる。日程外の掲載日が混ざった時だけスクロールへ逃がす */
.schedule__rail { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: thin; }
/* どの週も月〜金の5列。列数が揃うので週をまたいでもセル幅と縦位置が一致する */
.schedule__week {
  display: grid; grid-template-columns: repeat(5, minmax(62px, 1fr));
  flex: 1 1 0; gap: 6px; min-width: fit-content;
}
.schedule__week + .schedule__week {
  margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--line);
}
/* 非開催日は枠を持たず、位置だけを残す */
.rail-blank {
  display: grid; place-items: center;
  color: #ccd2cc; font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.rail-day {
  min-width: 0; padding: 10px 4px 9px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--muted); text-decoration: none; text-align: center;
  transition: border-color .16s ease, background .16s ease;
}
.rail-day span {
  display: block; color: var(--ink); font-size: 12px; font-weight: 700;
  letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.rail-day small {
  display: block; margin-top: 3px; white-space: nowrap;
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.rail-day:hover:not(.is-current) { border-color: var(--line-strong); background: #fafbf8; }
.rail-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-day.is-open { border-color: #b5d8ca; }
.rail-day.is-open small { color: var(--accent); }
/* 選択中は反転。is-openより後に置き、受付中の日を選んでも反転側が勝つようにする。 */
.rail-day.is-current { border-color: var(--ink); background: var(--ink); }
.rail-day.is-current span { color: white; }
.rail-day.is-current small { color: #aeb8b3; }
.rail-day.is-pending { border-style: dashed; background: transparent; }
.rail-day.is-pending span { color: #a4aea8; font-weight: 600; }
.rail-day.is-pending small { color: #b3bcb6; }

/* 数百銘柄でも目的の行へ届くための絞り込みと並び替え */
.event-filter {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.event-filter__search { flex: 1 1 auto; }
.event-filter__search input {
  width: 100%; min-height: 42px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font-size: 13px; color: var(--ink);
}
.event-filter__search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.event-filter__sort { display: flex; align-items: center; gap: 8px; }
.event-filter__sort span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.event-filter__sort select {
  min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); font-size: 12px; color: var(--ink);
}
.event-filter__count {
  margin: 0; min-width: 84px; text-align: right; color: var(--muted);
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* モバイルのカード表示は tr/tbody を再定義するため、非表示指定を明示的に優先させる */
[data-event-row][hidden], [data-event-rows][hidden] { display: none; }
.event-filter__empty {
  margin: 0; padding: 34px; border: 1px dashed var(--line-strong); border-top: 0;
  border-radius: 0 0 14px 14px; background: var(--surface);
  color: var(--muted); font-size: 13px; text-align: center;
}
.event-group__heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.event-group__heading > div:first-child { display: flex; align-items: center; gap: 14px; }
.event-group__heading h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.event-group__tools { display: flex; align-items: center; gap: 22px; }
.event-count { min-width: 34px; text-align: right; }
.event-count strong { font-size: 23px; }
.event-count small { display: block; color: var(--muted); line-height: 1; }
.event-group__empty {
  padding: 28px; border: 1px dashed var(--line-strong); border-radius: 14px;
  background: var(--surface); color: var(--muted); font-size: 13px; text-align: center;
}
.event-exclusions {
  margin-top: 14px; padding: 18px 20px; border: 1px solid #efd0cc; border-radius: 12px;
  background: var(--red-soft);
}
.event-exclusions__heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.event-exclusions__heading strong { font-size: 13px; }
.event-exclusions__heading p {
  max-width: 680px; margin: 5px 0 0; color: #785f5b; font-size: 11px; line-height: 1.65;
}
.event-exclusion-list {
  display: grid; gap: 1px; margin-top: 14px; overflow: hidden;
  border: 1px solid #efd0cc; border-radius: 9px; background: #efd0cc;
}
.event-exclusion-row {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center;
  padding: 11px 13px; background: var(--surface); color: var(--muted); font-size: 11px;
}
.event-exclusion-row > strong { color: var(--ink); font-size: 12px; }
.status-pill {
  display: inline-flex; padding: 4px 8px; border-radius: 5px;
  background: var(--accent); color: white; font-size: 9px; font-weight: 750; letter-spacing: .08em;
}
.status-pill.muted { background: #dfe3dc; color: var(--muted); }
.group-note { margin: 10px 4px 0; color: var(--muted); font-size: 11px; }
/* 下向き矢印そのものが「落とす」動作を示す。ホバーで矢印が沈む。 */
.event-downloads { display: inline-flex; align-items: center; gap: 8px; }
.download-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  color: var(--muted); text-decoration: none;
  font: 750 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.download-chip .icon { width: 14px; height: 14px; transition: transform .16s ease; }
.download-chip:hover { color: var(--accent-dark); border-color: #b5d8ca; background: var(--accent-soft); }
.download-chip:hover .icon { transform: translateY(2px); }

.participant-title { padding: 10px 0 42px; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; text-decoration: none; margin-bottom: 48px; }
.rank-kicker { color: var(--accent); font: 700 12px/1 ui-monospace, monospace; letter-spacing: .14em; }
.participant-title h1 { margin: 8px 0 0; font-size: clamp(44px, 7vw, 72px); line-height: 1; letter-spacing: -.06em; }
.metric-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric { min-height: 132px; padding: 24px; display: flex; flex-direction: column; background: var(--surface); }
.metric span { margin-bottom: auto; color: var(--muted); font-size: 11px; }
.metric strong { font-size: 24px; letter-spacing: -.04em; }
/* 金額に添える副次的な数字。主役の金額と張り合わない大きさに落とす。 */
.metric strong i { margin-left: 9px; font-size: 15px; font-style: normal; opacity: .75; }
/* 数字の根拠（母数・銘柄名）を値の直下に置く。 */
.metric small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.metric--wide { grid-column: span 2; }
.metric--primary { background: var(--ink); color: white; }
.metric--primary span { color: #aeb8b3; }
.metric--primary strong { font-size: 29px; }
.chart-card { margin-top: 24px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Race chart: 全員が同じ0%ラインから出走する一枚 */
.race-card { padding: 26px 22px 14px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
.race-card + .table-shell { border-radius: 0 0 14px 14px; }
.race-chart-svg { display: block; width: 100%; height: auto; }
.race-grid { stroke: var(--line); stroke-width: 1; }
.race-grid--zero { stroke: var(--line-strong); }
.race-tick { fill: var(--muted); font: 400 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.race-line {
  fill: none; stroke: #d5dad3; stroke-width: 1.25;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: visibleStroke;
  stroke-dasharray: 1; animation: race-draw 1.1s cubic-bezier(.3, 0, .2, 1) both;
  transition: opacity .15s ease;
}
.race-line--r3 { stroke: #7e8d85; stroke-width: 1.75; }
.race-line--r2 { stroke: #4a5751; stroke-width: 2; }
.race-line--r1, .race-line--focus { stroke: var(--accent); stroke-width: 2.5; }
.race-label { animation: race-fade .5s .85s both; transition: opacity .15s ease; }
.race-label circle { fill: #99a69f; }
.race-label text { fill: #6b7871; font: 700 11.5px/1 -apple-system, BlinkMacSystemFont, "Noto Sans JP", sans-serif; }
.race-label--r3 circle { fill: #7e8d85; }
.race-label--r3 text { fill: #7e8d85; }
.race-label--r2 circle { fill: #4a5751; }
.race-label--r2 text { fill: #4a5751; }
.race-label--r1 circle, .race-label--focus circle { fill: var(--accent); }
.race-label--r1 text, .race-label--focus text { fill: var(--accent-dark); }
@keyframes race-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes race-fade { from { opacity: 0; } to { opacity: 1; } }
[data-race-chart].has-hot .race-line:not(.is-hot) { opacity: .14; }
[data-race-chart].has-hot .race-label:not(.is-hot) { opacity: .2; }
.race-line.is-hot { stroke: var(--accent); stroke-width: 3; opacity: 1; }

/* 本戦と練習ラウンドの小さな2枚。縦軸はSSR側で共通化して渡している */
.race-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.race-panel { margin: 0; }
.race-panel figcaption {
  margin-bottom: 6px; color: var(--muted);
  font: 750 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.race-panel--muted .race-chart-svg { opacity: .62; }
.race-panel--muted:hover .race-chart-svg { opacity: 1; }

.section-footnote { margin: 18px 0 0; font-size: 13px; }
.section-footnote a { color: var(--muted); text-decoration-color: var(--line-strong); }
.section-footnote a:hover { color: var(--accent-dark); }

/* 共通スケール・0%中心のリターンバー */
.ret-cell { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 210px; }
.ret-cell span { flex: 0 0 64px; font-variant-numeric: tabular-nums; }
.ret-cell svg { display: block; flex: 1; max-width: 150px; height: 8px; }
.ret-axis { stroke: var(--line-strong); stroke-width: 1.5; }
.ret-fill--pos { fill: var(--accent); }
.ret-fill--neg { fill: var(--red); }
/* 日次ログ: 畳んだ1行で1営業日。開くとその日の注文と約定に降りられる */
.daily-log__tools { display: flex; align-items: center; gap: 16px; }
.day-log { display: grid; gap: 8px; }
.day-card { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.day-card[open] { border-color: var(--line-strong); }
.day-card__summary {
  display: grid; grid-template-columns: 9px 104px minmax(0, 250px) 1fr auto;
  align-items: center; gap: 18px; padding: 16px 20px;
  cursor: pointer; list-style: none; border-radius: 12px;
}
.day-card__summary::-webkit-details-marker { display: none; }
/* 開閉の三角は自前で描く: 説明なしで「まだ中身がある」と伝える唯一の記号 */
.day-card__summary::before {
  content: ""; width: 7px; height: 7px; margin-left: 1px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg); transition: transform .18s ease;
}
.day-card[open] > .day-card__summary::before { transform: rotate(45deg); }
.day-card__summary:hover { background: #fafbf8; }
.day-card__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.day-card__date { font-size: 14px; font-weight: 750; letter-spacing: -.02em; }
.day-card__result .ret-cell { justify-content: flex-start; min-width: 0; }
.day-card__result .ret-cell span { flex: 0 0 auto; min-width: 96px; text-align: right; }
.day-card__pending { color: var(--muted); font-size: 12px; }
.day-card__flag { display: flex; }
.day-card__body { padding: 4px 20px 20px; }
.day-submissions { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.day-submissions__heading { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.submission-row.is-superseded { opacity: .55; }
.submission-row.is-superseded .submission-row__index { color: var(--muted); }
.submission-list { display: grid; gap: 8px; }
.submission-row {
  display: grid; grid-template-columns: 36px 150px 70px 1fr; align-items: center; gap: 18px;
  padding: 16px 20px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
}
.submission-row__index { color: var(--muted); font: 700 10px/1 ui-monospace, monospace; }
.submission-row > div:nth-child(2) { display: flex; flex-direction: column; }
.submission-row small { color: var(--muted); font-size: 10px; }
.submission-orders { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.submission-orders > span { padding: 3px 7px; border-radius: 5px; background: #f0f2ee; font: 10px/1.5 ui-monospace, monospace; }
.submission-orders i { font-style: normal; }
.trade-list { display: grid; gap: 10px; }
.trade-row {
  display: grid; grid-template-columns: 1.3fr .65fr .9fr .8fr; gap: 20px;
  padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
}
.trade-row__identity, .trade-row__side, .trade-row__prices, .trade-row__pnl { display: flex; flex-direction: column; }
.trade-row__identity span { color: var(--accent); font-size: 11px; }
.trade-row__identity strong { margin-top: 2px; }
.trade-row small { color: var(--muted); font-size: 10px; }
.trade-row__side { align-items: flex-start; }
.trade-row__side > span { font: 750 9px/1 ui-monospace, monospace; padding: 4px 6px; border-radius: 4px; }
.side-long { color: var(--accent); background: var(--accent-soft); }
.side-short { color: var(--red); background: var(--red-soft); }
.short-disabled { color: var(--muted); }
.trade-row__side strong { margin-top: 5px; }
.trade-row__prices { gap: 1px; font-size: 11px; font-family: ui-monospace, monospace; }
.trade-row__prices span { color: var(--muted); }
.trade-row__prices b { color: var(--ink); margin-left: 4px; }
.trade-row__pnl { text-align: right; align-items: flex-end; gap: 6px; }
.trade-row__pnl strong { font-size: 16px; }
.trade-row__pnl.inactive strong { font-size: 12px; color: var(--muted); }
.trade-row__reason { grid-column: 1 / -1; display: grid; grid-template-columns: 90px 1fr; padding-top: 16px; border-top: 1px solid var(--line); }
.trade-row__reason span { color: var(--muted); font-size: 10px; }
.trade-row__reason p { margin: 0; max-width: 78ch; font-size: 12px; line-height: 1.85; }

.rules-layout { display: grid; grid-template-columns: 190px minmax(0, 760px); gap: 86px; align-items: start; }
.rules-index { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 10px; }
.rules-index span { margin-bottom: 8px; color: var(--muted); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .14em; }
.rules-index a { color: var(--muted); font-size: 12px; text-decoration: none; }
.rules-index a:hover { color: var(--accent); }
/* minmax(0,1fr)がないと、長行のpre（curl例）がmin-width:autoで列幅を押し広げる */
.rules-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 72px; }
.rule-section { scroll-margin-top: 110px; }
.rule-section__number { color: var(--accent); font: 700 12px/1 ui-monospace, monospace; }
.rule-section h2 { margin: 11px 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 29px; letter-spacing: -.045em; }
.rule-section p { color: #3f4c47; line-height: 2; }
.rule-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 28px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rule-facts > div { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.rule-facts > div:nth-child(odd) { border-right: 1px solid var(--line); }
.rule-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.rule-facts dt { color: var(--muted); font-size: 10px; }
.rule-facts dd { margin: 2px 0 0; font-weight: 700; }
.callout, .notice { margin: 28px 0; padding: 20px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.callout strong { font-size: 17px; }
.callout p { margin: 3px 0 0; color: var(--accent-dark); font-family: ui-monospace, monospace; font-size: 12px; }
.notice { color: var(--muted); font-size: 12px; border-left-color: var(--line-strong); background: #eceee9; }
.notice strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; }
.notice p { margin: 0 0 8px; line-height: 1.85; }
.notice p:last-child { margin-bottom: 0; }
.rule-section pre { overflow-x: auto; margin: 26px 0; padding: 18px 20px; border-radius: 10px; background: var(--ink); color: #dff6ed; font-size: 12px; }
.formula { margin: 28px 0; padding: 28px; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.formula span, .formula small { display: block; color: var(--muted); font-size: 10px; }
.formula strong { display: block; margin: 10px 0; color: var(--accent); font: 750 clamp(17px, 3vw, 24px)/1.3 ui-monospace, monospace; }
.rule-section h3 { margin: 30px 0 8px; font-size: 16px; letter-spacing: -.02em; }
.rule-section ul { margin: 14px 0; padding-left: 22px; color: #3f4c47; line-height: 2; }
.rule-section li { margin: 2px 0; }
/* 読み飛ばされがちな細則や長い例文は畳んでおく。必要な人だけが開けばよい */
.rule-details { margin: 26px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rule-details summary {
  display: flex; align-items: center; gap: 11px; padding: 15px 19px;
  cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700;
}
.rule-details summary::-webkit-details-marker { display: none; }
.rule-details summary::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-left: 1px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg); transition: transform .18s ease;
}
.rule-details[open] summary::before { transform: rotate(45deg); }
.rule-details[open] summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.rule-details__body { padding: 6px 20px 8px; }
.rule-details__body p, .rule-details__body ul { font-size: 13px; }
/* ルール全文はAIに渡される前提: ヘッダー右にコピー動線を常設する */
.doc-copy-card {
  min-width: 250px; max-width: 300px; display: grid; gap: 10px; justify-items: start;
  padding: 18px 20px; border-left: 3px solid var(--accent);
  background: var(--surface); box-shadow: var(--shadow);
}
.doc-copy-card p { margin: 0; font-size: 12px; font-weight: 750; }
.doc-copy-card small { color: var(--muted); font-size: 11px; line-height: 1.75; }
.doc-copy-card a { color: var(--accent); margin-left: 4px; }

.form-page { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 110px; align-items: start; padding: 44px 0; }
.form-intro h1 { max-width: 600px; margin: 0; font-size: clamp(48px, 7vw, 72px); line-height: 1; letter-spacing: -.065em; }
.form-intro > p:not(.eyebrow) { max-width: 560px; color: var(--muted); margin: 24px 0 0; }
.steps { list-style: none; display: grid; gap: 0; margin: 48px 0 0; padding: 0; }
.steps li { display: flex; gap: 16px; padding: 0 0 28px; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 33px; bottom: 0; border-left: 1px dashed var(--line-strong); }
.steps li > span { flex: 0 0 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--accent); font: 700 11px/1 ui-monospace, monospace; }
.steps strong, .steps small { display: block; }
.steps small { margin-top: 2px; color: var(--muted); }
.form-card { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card h2 { margin: 0 0 22px; font-size: 22px; letter-spacing: -.035em; }
form label, .form-card > label, .summary-card label { display: block; margin-bottom: 20px; }
label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
label small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
input {
  width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line-strong);
  border-radius: 9px; background: #fcfcfa; color: var(--ink); outline: none;
}
textarea {
  width: 100%; padding: 12px 13px; resize: vertical; border: 1px solid var(--line-strong);
  border-radius: 9px; background: #fcfcfa; color: var(--ink); outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.6;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,122,91,.1); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,122,91,.1); }
input::placeholder, textarea::placeholder { color: #a5ada8; }
.form-status { min-height: 22px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.form-status.is-error { color: var(--red); }
.form-status.is-success { color: var(--accent); }
.token-result { text-align: center; }
.success-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 800; }
.token-result h2 { margin: 0 0 5px; }
.token-result > p { color: var(--muted); font-size: 12px; }
.token-box { display: flex; align-items: center; gap: 10px; margin: 22px 0; padding: 10px 10px 10px 14px; border: 1px dashed var(--accent); border-radius: 9px; background: var(--accent-soft); }
.token-box code { overflow: hidden; flex: 1; min-width: 0; color: var(--accent-dark); font-size: 13px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.copy-button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border: 1px solid #b5d8ca; border-radius: 8px; background: var(--surface); color: var(--accent-dark);
  font-size: 11px; font-weight: 750;
  transition: background .16s ease, border-color .16s ease;
}
.copy-button:hover { border-color: var(--accent); background: white; }
.copy-button .icon { width: 14px; height: 14px; }
.copy-button .icon--check, .copy-button.is-copied .icon--copy { display: none; }
.copy-button.is-copied .icon--check { display: block; }
.copy-button.is-copied { border-color: var(--accent); color: var(--accent); }
.token-help { display: grid; gap: 7px; margin: -4px 0 24px; color: var(--muted); font-size: 11px; line-height: 1.75; text-align: left; }
.link-button { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent); font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.quick-links { display: grid; gap: 13px; }
.quick-links > a:last-child { color: var(--accent); font-size: 12px; text-decoration: none; }
/* コピー動線を二次ボタンの体裁に揃え、主ボタン（手動提出）と並べても迷わせない */
.quick-links .copy-button { justify-content: center; min-height: 46px; border-radius: 10px; font-size: 12px; }

.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.order-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: 26px; border-bottom: 1px solid var(--line); }
.panel-heading > span { flex: none; color: var(--muted); font-size: 11px; }
.panel-heading small { display: block; max-width: 46ch; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.order-list { max-height: 820px; overflow-y: auto; }
.order-row { display: grid; grid-template-columns: 1.1fr 130px 1.3fr; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--line); align-items: start; }
.order-row:last-child { border-bottom: 0; }
.order-name { min-width: 0; display: flex; flex-direction: column; }
.order-name span { color: var(--accent); font-size: 10px; }
.order-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-name small { color: var(--muted); }
.order-row label { margin: 0; }
.order-row label > span { color: var(--muted); font-size: 9px; }
.weight-input > div { display: flex; align-items: center; position: relative; }
.weight-input input { padding-right: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.weight-input b { position: absolute; right: 12px; color: var(--muted); font-size: 11px; pointer-events: none; }
/* 理由は一行では書けない: 複数行の入力欄と長い例示で、書ける分量を先に見せる */
.reason-input textarea { min-height: 124px; font-family: inherit; font-size: 12px; line-height: 1.7; }
.submit-summary { position: sticky; top: 96px; display: grid; gap: 14px; }
.summary-card { padding: 24px; background: var(--ink); color: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-card .mono-label { color: #8ed2bb; }
.gross-meter { padding: 14px 0 22px; }
.gross-meter > div { display: flex; justify-content: space-between; align-items: end; }
.gross-meter span, .gross-meter small { color: #aeb8b3; font-size: 10px; }
.gross-meter strong { font: 750 28px/1 ui-monospace, monospace; }
progress { width: 100%; height: 5px; margin: 14px 0 2px; border: 0; border-radius: 5px; overflow: hidden; background: #3e4a46; }
progress::-webkit-progress-bar { background: #3e4a46; }
progress::-webkit-progress-value { background: #63c4a4; }
progress::-moz-progress-bar { background: #63c4a4; }
.summary-card dl { margin: 0 0 24px; border-top: 1px solid #38443f; }
.summary-card dl div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #38443f; }
.summary-card dt { color: #aeb8b3; font-size: 10px; }
.summary-card dd { margin: 0; font: 700 11px/1.7 ui-monospace, monospace; }
.summary-card label > span { color: #d7ddda; }
.summary-card input { background: #25312c; border-color: #46524d; color: white; }
/* 主ボタンと同じ重さにしない: 入力を消す操作は控えめに、押せる時だけ有効に */
.summary-card .remember-token { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 9px; align-items: center; margin: -8px 0 20px; }
.summary-card .remember-token input { width: auto; min-height: 0; padding: 0; background: none; accent-color: #8de2c4; }
.summary-card .remember-token > span { margin: 0; font-size: 11px; }
.summary-card .remember-token small { grid-column: 2; margin-top: 5px; color: #aeb8b3; }
.summary-card .button--reset {
  min-height: 38px; margin-top: 8px; border-color: transparent; background: transparent;
  color: #aeb8b3; font-size: 12px; font-weight: 700; box-shadow: none;
}
.summary-card .button--reset:enabled:hover {
  background: #2b3733; border-color: #46524d; color: white; transform: none; box-shadow: none;
}
.summary-card .button--reset:disabled { opacity: .45; }
.summary-card .form-status { color: #bdc5c1; }
.summary-card .form-status.is-error { color: #ff9f96; }
.summary-card .form-status.is-success { color: #8de2c4; }
.summary-note { padding: 18px; border: 1px solid var(--line); border-radius: 12px; font-size: 11px; }
.summary-note strong { font-size: 11px; }
.summary-note p { margin: 5px 0 0; color: var(--muted); }

/* 長い一覧を辿っても列の意味を見失わないよう、余裕のある幅でだけ見出しを追従させる */
@media (min-width: 901px) {
  .table-shell--events { overflow: visible; }
  /* border-collapseだと追従中に下線が消えるため、影で境界を描く */
  .table-shell--events thead th {
    position: sticky; top: 74px; z-index: 5; box-shadow: inset 0 -1px 0 var(--line);
  }
}

@media (max-width: 900px) {
  .site-header__inner { gap: 18px; }
  .site-nav { gap: 16px; }
  .session-bar { gap: 28px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  /* 1frだとmin-width:autoで長行のpreが列を押し広げ、本文ごと画面外へはみ出す */
  .rules-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rules-index { position: static; display: none; }
  .form-page { grid-template-columns: 1fr; gap: 50px; }
  .submit-layout { grid-template-columns: 1fr; }
  .submit-summary { position: static; }
  /* 14セルを1行に置くと日付が潰れるため、週ごとに改行して縦に積む */
  .schedule__rail { flex-direction: column; gap: 6px; }
  .schedule__week + .schedule__week {
    margin-left: 0; padding-left: 0; border-left: 0;
  }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .site-header__inner, .site-main, .site-footer { width: min(100% - 24px, 1180px); }
  .site-header__inner { height: 64px; }
  /* blur系filterはfixed子孫の包含ブロックを作り、下部ナビがヘッダーに張り付くため無効化 */
  .site-header { backdrop-filter: none; background: rgba(245,244,239,.97); }
  .brand small { display: none; }
  .brand__mark { width: 34px; height: 34px; }
  /* 下部バー寸法。フッター余白はこの合算に合わせる（10 + 58 + 22 = 90） */
  body {
    --site-nav-inset: 10px;
    --site-nav-height: 58px;
    --site-nav-gap: 22px;
    --site-nav-clearance: calc(
      var(--site-nav-inset) + var(--site-nav-height) + var(--site-nav-gap) + env(safe-area-inset-bottom)
    );
  }
  /* 背後は白いカードが多いので、半透明だと本文が透けてバーが溶ける。不透明 + 上向きの影で浮かせる */
  .site-nav {
    position: fixed; z-index: 30; left: var(--site-nav-inset); right: var(--site-nav-inset);
    bottom: calc(var(--site-nav-inset) + env(safe-area-inset-bottom));
    height: var(--site-nav-height); padding: 5px; justify-content: space-around; gap: 0;
    border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface);
    box-shadow: 0 -1px 3px rgba(22,40,34,.05), 0 12px 32px rgba(22,40,34,.18);
  }
  .site-nav a {
    flex: 1; display: flex; align-items: center; justify-content: center;
    height: 100%; padding: 0 4px; font-size: 11px; border-radius: 10px;
  }
  /* 10pxの文字の下に2pxの線を引いても読み取れないため、選択中は面で示す */
  .site-nav a.active { background: var(--accent-soft); color: var(--accent); }
  .site-nav a.active::after { content: none; }
  .nav-label--wide { display: none; }
  .nav-label--narrow { display: inline; }
  .site-header .button { display: none; }
  .site-main { padding-top: 38px; padding-bottom: 56px; }
  .site-footer { padding-bottom: var(--site-nav-clearance); flex-direction: column; }
  .footer-links { flex-wrap: wrap; }
  /* 小さなリンクが2段に並ぶと下部バーと見分けがつかないので、フッターは役割を絞る */
  .footer-link--in-nav { display: none; }
  /* 本文側の主CTAと競合させないため、全幅にも緑にもせず、フッターの導線として置く */
  .footer-links .footer-cta {
    order: -1; flex: 0 0 auto; min-height: 40px; padding: 0 18px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: 9px;
    background: var(--surface); color: var(--ink);
    font-size: 13px; font-weight: 750; text-decoration: none;
  }
  .session-bar { flex-direction: column; align-items: stretch; gap: 18px; padding: 18px; }
  .session-bar__deadline { margin-left: 0; align-items: flex-start; text-align: left; }
  .section { padding: 42px 0; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 26px; }
  .ranking-table thead { display: none; }
  .ranking-table, .ranking-table tbody { display: block; }
  .ranking-table tr { display: grid; grid-template-columns: 44px 1fr auto; gap: 2px 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .ranking-table td, .ranking-table th { display: block; padding: 0; border: 0; }
  .ranking-table td:nth-of-type(1) { grid-column: 1; grid-row: 1 / 3; }
  .ranking-table th { grid-column: 2; grid-row: 1; }
  .ranking-table td:nth-of-type(2) { grid-column: 3; grid-row: 1; }
  .ranking-table td:nth-of-type(3) { grid-column: 3; grid-row: 2; font-size: 11px; }
  .ranking-table td:nth-of-type(4) { grid-column: 2 / 4; grid-row: 3; margin-top: 9px; }
  /* 最大DDは同着時のみ効く補助情報。狭い画面ではカードを詰まらせるので詳細ページに預ける */
  .ranking-table td:nth-of-type(5) { display: none; }
  .ranking-table td:nth-of-type(6) { grid-column: 2; grid-row: 2; }
  .ret-cell { width: 100%; min-width: 0; flex-direction: row; align-items: center; }
  .ret-cell svg { order: -1; flex: 1; width: auto; }
  .race-card { padding: 16px 10px 8px; }
  .phase-notice { gap: 10px; padding: 14px 16px; }
  /* ヘッダーの参加ボタンが消える幅。ここではボタンを全幅で押しやすくする */
  .join-cta { gap: 18px; padding: 20px; }
  .join-cta .button { width: 100%; }
  /* 2枚並べると1枚あたりが読めなくなる。縦に積んで縮尺の共通性だけ残す */
  .race-panels { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .race-panel--muted .race-chart-svg { opacity: 1; }
  .race-tick { font-size: 15px; }
  .race-label text { font-size: 16px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 24px; padding-top: 14px; }
  .page-header h1 { font-size: 46px; }
  .page-header__aside { width: 100%; }
  .deadline-card { width: 100%; }
  .doc-copy-card { width: 100%; max-width: none; }
  .schedule__week { gap: 4px; }
  .rail-day { padding: 9px 2px 8px; }
  .rail-day span { font-size: 11px; }
  .event-group .table-shell { border: 0; overflow: visible; background: transparent; }
  .event-group table, .event-group tbody { display: block; }
  .event-group thead { display: none; }
  .event-group tr { display: grid; grid-template-columns: 80px 1fr; padding: 15px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
  .event-group td, .event-group th { padding: 2px; border: 0; }
  .event-group td:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .event-group th { grid-column: 2; grid-row: 1; }
  .event-group td:nth-of-type(2), .event-group td:nth-of-type(3) { grid-column: 2; font-size: 10px; color: var(--muted); }
  .event-group td:nth-of-type(4), .event-group td:nth-of-type(5) { display: none; }
  .event-group__heading { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .event-group__tools { width: 100%; justify-content: space-between; }
  .event-filter { flex-wrap: wrap; gap: 10px; }
  .event-filter__search { flex: 1 0 100%; }
  .event-filter__sort { flex: 1 1 auto; }
  .event-filter__sort select { flex: 1 1 auto; min-width: 0; }
  .event-filter__count { min-width: 0; }
  .event-filter__empty { border-radius: 12px; border-top: 1px dashed var(--line-strong); }
  .event-downloads { justify-content: flex-start; }
  .download-chip { min-height: 40px; padding-inline: 15px; }
  .event-exclusions { padding: 16px; }
  .event-exclusions__heading { display: grid; gap: 10px; }
  .event-exclusions__heading .badge { width: max-content; }
  .event-exclusion-row { grid-template-columns: 70px 1fr; gap: 4px 10px; }
  .event-exclusion-row > span:last-child { grid-column: 2; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { min-height: 90px; }
  .metric--wide { grid-column: auto; }
  .daily-log__tools { flex-direction: column; align-items: flex-end; gap: 8px; }
  .day-card__summary {
    grid-template-columns: 9px 1fr auto; gap: 4px 14px; padding: 14px 16px;
  }
  .day-card__summary::before { grid-row: 1; }
  .day-card__date { grid-column: 2; grid-row: 1; }
  .day-card__summary > .badge { grid-column: 3; grid-row: 1; }
  .day-card__result { grid-column: 2 / -1; grid-row: 2; }
  .day-card__flag { grid-column: 2 / -1; grid-row: 3; }
  .day-card__flag:empty { display: none; }
  .day-card__result .ret-cell { gap: 12px; }
  /* 幅を固定しないと目盛りだけが間延びして、金額が画面端まで飛ばされる */
  .day-card__result .ret-cell svg { flex: 0 0 104px; }
  .day-card__result .ret-cell span { min-width: 0; text-align: left; }
  .day-card__body { padding: 4px 16px 16px; }
  .trade-row { grid-template-columns: 1fr 1fr; }
  .submission-row { grid-template-columns: 30px 1fr auto; }
  .submission-orders { grid-column: 2 / -1; justify-content: flex-start; }
  .trade-row__prices { display: none; }
  .trade-row__pnl { grid-column: 2; grid-row: 1; }
  .trade-row__reason { grid-template-columns: 1fr; }
  .rule-facts { grid-template-columns: 1fr; }
  .rule-facts > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .rule-facts > div:last-child { border-bottom: 0 !important; }
  .form-card { padding: 22px; }
  .order-row { grid-template-columns: 1fr 110px; }
  .reason-input { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
