/* 既存ブランドページの緑・文字色・罫線を継承。新規UIだけに限定する。 */
:root {
  --toto-feature-yellow: #ffd400; --toto-feature-ink: #111;
  --tc-ink: var(--ink, #333); --tc-muted: #52646b; --tc-brand: #35766e;
  --tc-line: #e1e5e9; --tc-paper: #f7f8fa; --tc-surface: #fff; --tc-weak: #edf5f3;
  --tc-s1: 4px; --tc-s2: 8px; --tc-s3: 12px; --tc-s4: 16px; --tc-s5: 24px; --tc-s6: 32px; --tc-s7: 48px;
  --tc-radius: 6px; --tc-font: 16px; --tc-small: 14px; --tc-heading: 24px; --tc-title: 32px;
  --tc-max: 1100px; --tc-cell: 44px; --tc-table: 640px;
  --tc-stats-radius: 12px; --tc-stats-heading: 18px; --tc-stats-caption: 11px;
  --tc-stats-orange: #c66b27; --tc-stats-orange-soft: #eab484;
  --tc-stats-gray: #87929b; --tc-stats-track: #edf0f3; --tc-stats-rule: #687782;
  --tc-stats-bar-height: 8px; --tc-stats-pill-radius: 999px;
  --tc-stats-result-width: 132px;
}
.tc-panel, .tc-main { color: var(--tc-ink); font-size: var(--tc-font); line-height: 1.75; font-variant-numeric: tabular-nums; }
.tc-panel { display: grid; gap: var(--tc-s4); margin-block: var(--tc-s6); padding: var(--tc-s5); border: 1px solid var(--tc-line); border-radius: var(--tc-radius); background: var(--tc-surface); min-width: 0; max-width: 100%; }
.tc-panel > *, .tc-group > * { margin: 0; }
.tc-panel h2, .tc-main h2 { font-size: var(--tc-heading); font-weight: 600; line-height: 1.5; }
.tc-panel p, .tc-main p { max-width: 70ch; }
.tc-muted { color: var(--tc-muted); font-size: var(--tc-small); }
.tc-scroll { max-width: 100%; min-width: 0; overflow-x: auto; border-radius: var(--tc-radius); }
.tc-scroll table { width: 100%; min-width: var(--tc-table); border-collapse: collapse; border: 0 !important; margin: 0; font-size: var(--tc-small); }
.tc-scroll table th, .tc-scroll table td { padding: var(--tc-s3) var(--tc-s4) !important; border: 0 !important; border-bottom: 1px solid var(--tc-line) !important; text-align: left; font-weight: 400; vertical-align: top; line-height: 1.75; background: var(--tc-surface) !important; color: var(--tc-ink) !important; }
.tc-scroll table th { background: var(--tc-paper) !important; color: var(--tc-muted) !important; font-weight: 600; position: static; }
.tc-scroll table th::after { display: none; }
.tc-scroll table td:not(:first-child), .tc-scroll table th:not(:first-child) { text-align: right; }
.tc-scroll table tr:hover td { background: var(--tc-weak) !important; }
.tc-panel .tc-scroll table td:nth-child(2), .tc-panel .tc-scroll table th:nth-child(2) { text-align: left; }
.tc-scroll summary { cursor: pointer; min-height: var(--tc-cell); display: list-item; white-space: nowrap; color: var(--tc-brand); }
.tc-scroll details ul { text-align: left; padding-left: var(--tc-s5); min-width: 30ch; }
.tc-scroll details li { margin-bottom: var(--tc-s2); }
.tc-panel a, .tc-main a { color: var(--tc-brand); text-decoration: underline; display: inline-block; padding-block: var(--tc-s3); min-height: var(--tc-cell); }
.tc-panel a:hover, .tc-main a:hover, .tc-scroll summary:hover { background: var(--tc-weak); }
.tc-panel a:focus-visible, .tc-main a:focus-visible, .tc-scroll:focus-visible, .tc-scroll summary:focus-visible { outline: 2px solid var(--tc-brand); outline-offset: var(--tc-s1); }
body.tc-stats-page { background: var(--tc-paper); margin: 0; }
.tc-main { max-width: var(--tc-max); padding: var(--tc-s5) var(--tc-s4) var(--tc-s7); margin: auto; }
.tc-main h1 { font-size: var(--tc-title); font-weight: 600; line-height: 1.5; margin-block: var(--tc-s5); }
.tc-period { display: grid; gap: var(--tc-s5); margin-top: var(--tc-s7); }
.tc-group { display: grid; gap: var(--tc-s4); min-width: 0; }
.tc-main h3 { font-size: var(--tc-font); font-weight: 600; }
@media (min-width: 640px) { .tc-main { padding-inline: var(--tc-s5); } }
.tc-ticket { display: grid; gap: var(--tc-s3); padding-block: var(--tc-s4); border-block: 1px solid var(--tc-line); min-width: 0; overflow-wrap: anywhere; }
.tc-ticket > * { margin: 0; }
.tc-ticket h3 { font-size: var(--tc-font); font-weight: 600; }
.tc-ticket summary { cursor: pointer; min-height: var(--tc-cell); color: var(--tc-brand); padding-block: var(--tc-s2); }
.tc-ticket ul { padding-left: var(--tc-s5); }
.tc-ticket summary:hover { background: var(--tc-weak); }
.tc-ticket summary:focus-visible { outline: 2px solid var(--tc-brand); outline-offset: var(--tc-s1); }
/* タスク1/§1: スマホでは統合予想の各行を縦積みにし、最終予想・信頼度を横スクロールなしで見せる。 */
@media (max-width: 600px) {
  .tc-scroll table.tc-pred { min-width: 0; }
  .tc-pred thead { display: none; }
  .tc-pred tr { display: grid; grid-template-columns: 2em 1fr auto auto; align-items: center; border-bottom: 1px solid var(--tc-line); }
  .tc-scroll table.tc-pred td { padding: var(--tc-s2) var(--tc-s1) !important; border-bottom: 0 !important; }
  .tc-scroll table.tc-pred td:nth-child(3) { text-align: center; }
  .tc-scroll table.tc-pred td:last-child { grid-column: 1 / -1; text-align: left; padding-top: 0 !important; }
  .tc-panel { padding: var(--tc-s4); }
}

.tc-rate { white-space: nowrap; }
.tc-rate-count, .tc-rate-mark {
  color: var(--tc-muted);
  font-size: var(--tc-stats-caption);
  font-weight: 400;
}
.tc-rate-mark { margin-inline-start: var(--tc-s1); line-height: 0; }
.tc-scroll .tc-stats-table :is(td, th):first-child { white-space: nowrap; }
.tc-main .tc-stats-pending { max-width: none; }
.tc-panel.tc-stats-summary {
  --tc-stats-columns: 92px minmax(0, 1fr) var(--tc-stats-result-width);
  gap: var(--tc-s2);
  padding: var(--tc-s4);
  border-radius: var(--tc-stats-radius);
  text-align: left;
}
.tc-stats-summary .tc-stats-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--tc-s2);
  padding-bottom: var(--tc-s2);
  border-bottom: 2px solid var(--tc-stats-orange);
}
#main .tc-stats-summary h2 {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--tc-ink);
  font-size: var(--tc-stats-heading);
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}
#main .tc-stats-summary h2::before,
#main .tc-stats-summary h2::after { display: none; }
.tc-stats-pill, .tc-stats-tag {
  display: inline-block;
  padding-inline: var(--tc-s1);
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-stats-pill-radius);
  background: var(--tc-paper);
  color: var(--tc-muted);
  font-size: var(--tc-stats-caption);
  font-weight: 400;
  white-space: nowrap;
}
.tc-stats-pill { padding-inline: var(--tc-s2); }
.tc-stats-summary .tc-stats-summary-note {
  margin: 0;
  color: var(--tc-muted);
  font-size: var(--tc-stats-caption);
  line-height: 1.5;
}
.tc-stats-summary-note span { display: inline-block; }
.tc-stats-summary .tc-stats-bars {
  position: relative;
  display: grid;
  grid-template-columns: var(--tc-stats-columns);
  column-gap: var(--tc-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tc-stats-bars::after {
  content: "";
  position: absolute;
  grid-column: 2 / 3;
  inset-block: var(--tc-s1);
  inset-inline-start: var(--tc-stats-baseline);
  border-inline-start: 1px dotted var(--tc-stats-rule);
  pointer-events: none;
}
.tc-stats-bars .tc-stats-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: var(--tc-stats-columns);
  align-items: center;
  gap: var(--tc-s2);
  min-height: var(--tc-s6);
  margin: 0;
  padding: 0;
  line-height: 1.25;
}
.tc-stats-name { font-size: var(--tc-small); overflow-wrap: anywhere; }
.tc-stats-track, .tc-stats-track > span {
  display: block;
  height: var(--tc-stats-bar-height);
  border-radius: var(--tc-stats-pill-radius);
}
.tc-stats-track { background: var(--tc-stats-track); }
.tc-stats-track > span { background: var(--tc-stats-orange-soft); }
.tc-stats-row.is-best .tc-stats-track > span { background: var(--tc-stats-orange); }
.tc-stats-row.is-below .tc-stats-track > span { background: var(--tc-stats-gray); }
.tc-stats-result { text-align: right; white-space: nowrap; }
.tc-stats-result .tc-rate { white-space: normal; }
.tc-stats-result .tc-rate-count { white-space: nowrap; }
.tc-stats-result strong { font-size: var(--tc-small); }
.tc-stats-result small { color: var(--tc-muted); font-size: var(--tc-stats-caption); }
.tc-stats-below { display: block; }
.tc-stats-summary .tc-stats-summary-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0 var(--tc-s2);
  padding: 0;
  border-top: 1px solid var(--tc-line);
}
.tc-stats-summary-footer p { margin-inline-end: auto !important; max-width: none; }
.tc-stats-summary-footer a {
  display: inline-flex;
  align-items: center;
  gap: var(--tc-s1);
  margin-inline-start: auto;
  padding: 0;
  font-size: var(--tc-stats-caption);
}
@media (min-width: 640px) {
  .tc-panel.tc-stats-summary { --tc-stats-columns: 110px minmax(0, 1fr) var(--tc-stats-result-width); }
  #main .tc-stats-summary h2 { font-size: calc(var(--tc-stats-heading) + 2px); }
}
