@charset "UTF-8";
/* 基本設定
===================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inner,
.main {
  width: calc(100% - 64px);
  max-width: 1440px;
  margin-inline: auto;
}
@media (max-width: 767px) {
  .inner,
  .main {
    width: calc(100% - 32px);
  }
}

/* ヘッダー・ページタイトル
===================================== */
.header {
  border-top: 4px solid #000;
  border-bottom: 1px solid #d9d9d9;
}
.header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.beta-label {
  padding: 2px 6px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  color: #595959;
  font-size: 0.75rem;
  font-weight: 400;
}

.about-link {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #595959;
  text-align: right;
  white-space: nowrap;
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 0 14px;
  flex-wrap: wrap;
}
.intro h1 {
  font-size: 1.375rem;
  line-height: 1.5;
}
.intro .lead {
  margin-top: 6px;
  color: #595959;
}

.date {
  color: #595959;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #000;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  gap: 28px;
}
.tabs button {
  padding: 9px 4px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: #595959;
  font-weight: 700;
  white-space: nowrap;
}
.tabs button[aria-selected=true] {
  border-color: #c92c20;
  color: #000;
}

.count-label {
  font-size: 0.8125rem;
  color: #595959;
}

/* 選手・チームランキング
===================================== */
.workspace {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-top: 16px;
}
@media (max-width: 767px) {
  .workspace {
    display: block;
  }
}

.ranking-column {
  flex: 1;
  min-width: 0;
}
@media (max-width: 767px) {
  .ranking-column {
    display: contents;
  }
}

.ranking {
  min-width: 0;
}

.filters {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}
.filters label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 100px;
  font-size: 0.875rem;
}

select {
  width: 100%;
  padding: 9px 24px 9px 10px;
  border: 1px solid #b7b7b7;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}
.table-heading h2 {
  font-size: 1rem;
}
.table-heading > span {
  color: #595959;
  font-size: 0.8125rem;
}

.table-scroll {
  overflow: auto;
  max-height: 720px;
  border-top: 2px solid #000;
  border-bottom: 1px solid #d9d9d9;
  scrollbar-color: #aaa #f5f5f5;
}
.table-scroll > table {
  min-width: 460px;
  table-layout: fixed;
}
.table-scroll .rank-column {
  width: 46px;
}
.table-scroll .era-column {
  width: 92px;
}
.table-scroll .games-column {
  width: 78px;
}
.table-scroll .innings-column {
  width: 88px;
}
.table-scroll thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
@media (max-width: 1024px) {
  .table-scroll {
    max-height: 520px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

thead {
  background: #eee;
}
thead th {
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
}
thead th:first-child, thead th:nth-child(2) {
  text-align: left;
}
thead button {
  padding: 0;
  line-height: 1.5;
  text-align: right;
}
thead [aria-sort] {
  font-weight: 700;
}

tbody td,
tbody th {
  border-top: 1px solid #e8e8e8;
  font-size: 0.9375rem;
}
tbody td {
  padding: 13px 12px;
  text-align: right;
}
tbody th {
  padding: 0 8px;
  font-weight: 400;
  text-align: left;
}
tbody tr:nth-child(even) {
  background: #fafafa;
}
tbody tr:hover, tbody tr:focus-within {
  background: #f0f0f0;
}
tbody tr.selected {
  background: #fff3f1;
}
tbody tr.selected .row-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rank-number {
  color: #595959;
  text-align: left;
  font-size: 0.8125rem;
}

.row-name {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}
.row-name > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.row-name small {
  display: block;
  margin-top: 3px;
  color: #595959;
  font-size: 0.8125rem;
}

.team-mark {
  width: 4px;
  height: 28px;
  flex-shrink: 0;
  background: var(--team, #999);
  font-size: 0;
}

.actual-col strong {
  font-size: 1.125rem;
  font-weight: 700;
}

#rows tr {
  cursor: pointer;
}

.table-note,
.table-foot {
  color: #595959;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.table-note {
  padding-bottom: 12px;
}

.table-foot {
  padding-top: 12px;
}

.empty {
  padding: 40px 16px;
  text-align: center;
}
.empty p {
  margin-top: 8px;
  color: #595959;
}
.empty button {
  padding: 8px 14px;
  margin-top: 16px;
  border: 1px solid #000;
}

/* 追加登板後の予測
===================================== */
.simulator {
  flex: 0 0 clamp(300px, 31.25vw, 400px);
  min-width: 0;
  padding-left: clamp(20px, 1.875vw, 24px);
  border-left: 1px solid #d9d9d9;
  scroll-margin-top: 20px;
}
@media (max-width: 767px) {
  .simulator {
    width: 100%;
    margin-inline: auto;
    padding-left: 0;
    border-left: 0;
  }
}

.selected-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.selected-name h2 {
  font-size: 1.375rem;
  line-height: 1.5;
}

.team-badge {
  padding-left: 8px;
  border-left: 3px solid var(--team, #999);
  color: #595959;
  font-size: 0.875rem;
}

.muted {
  margin-top: 6px;
  color: #595959;
  font-size: 0.8125rem;
}

.metrics {
  padding-block: 10px 12px;
}
.metrics .current {
  display: flex;
  align-items: baseline;
  gap: 0 12px;
  flex-wrap: wrap;
}
.metrics span {
  font-size: 0.875rem;
  font-weight: 700;
}
.metrics strong {
  font-size: 3rem;
  line-height: 1.25;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.metrics small {
  flex-basis: 100%;
  color: #595959;
  font-size: 0.8125rem;
}

.scenario-controls {
  margin-top: 14px;
  border-block: 1px solid #d9d9d9;
}
.scenario-controls summary {
  padding-block: 12px;
  font-weight: 700;
}
.scenario-controls summary span {
  display: block;
  margin: 4px 0 0 18px;
  color: #595959;
  font-size: 0.75rem;
  font-weight: 400;
}

.controls {
  padding: 4px 0 16px;
}

.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}
.slider-label output {
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.slider-label output span {
  margin-left: 5px;
  font-size: 0.875rem;
  font-weight: 400;
}

input[type=range] {
  width: 100%;
  margin: 16px 0 6px;
  accent-color: #c92c20;
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: #595959;
  font-size: 0.8125rem;
}

.innings-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 0.875rem;
}
.innings-control select {
  width: auto;
}

.games-default-note {
  margin-top: 10px;
  font-size: 0.8125rem;
}

.games-source-note {
  margin-top: 4px;
  color: #595959;
  font-size: 0.75rem;
}

.result {
  padding: 10px 12px;
  background: #f5f5f5;
  scroll-margin-block: 16px;
}
.result > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  flex-wrap: wrap;
}
.result p {
  font-size: 0.8125rem;
}
.result strong {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.range-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #595959;
}
.range-result b {
  font-size: 0.875rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.range-result small {
  flex-basis: 100%;
  font-size: inherit;
}

figure {
  max-width: 420px;
  margin: 12px auto 0;
}
figure svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
figure text {
  font-family: Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
  fill: #595959;
}

.chart-grid {
  stroke: #ddd;
}

.chart-band {
  fill: #f4dcd8;
}

.chart-line {
  stroke: #c92c20;
}

.chart-guide {
  stroke: #777;
}

.chart-point {
  fill: #c92c20;
  stroke: #fff;
}

figcaption {
  display: flex;
  justify-content: center;
  gap: 2px 12px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #595959;
}
figcaption span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.line-key {
  width: 16px;
  height: 2px;
  background: #c92c20;
}

.band-key {
  width: 16px;
  height: 10px;
  background: #f4dcd8;
}

.sim-note {
  margin-block: 12px 20px;
  color: #595959;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.detail {
  padding-top: 20px;
  border-top: 1px solid #d9d9d9;
}
.detail h3 {
  font-size: 0.9375rem;
}
.detail #feature-note {
  margin-bottom: 16px;
}
.detail dl div {
  display: flex;
  justify-content: space-between;
  gap: 4px 12px;
  flex-wrap: wrap;
  padding-block: 7px;
  font-size: 0.875rem;
}
.detail dt {
  color: #595959;
}
.detail dt small {
  font-size: 0.8125rem;
}
.detail dd {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.detail details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #d9d9d9;
}

summary {
  font-size: 0.875rem;
  cursor: pointer;
}

#history {
  overflow: auto;
  margin-top: 12px;
}
#history th,
#history td {
  padding: 8px 6px;
  font-size: 0.8125rem;
}
#history p {
  margin-top: 12px;
  color: #595959;
  font-size: 0.8125rem;
}

/* 集計方法・出典
===================================== */
.method {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-block: 32px 48px;
  border-top: 2px solid #000;
  scroll-margin-top: 24px;
}
.method > h2 {
  flex: 0 0 210px;
  font-size: 1.125rem;
}
.method h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}
.method article {
  margin-bottom: 28px;
}
.method p {
  color: #595959;
  line-height: 1.9;
}
.method p + p {
  margin-top: 8px;
}
@media (max-width: 1024px) {
  .method {
    flex-direction: column;
    gap: 24px;
  }
  .method > h2 {
    flex-basis: auto;
  }
}

.method-content {
  flex: 1;
  min-width: 0;
  max-width: 900px;
}

.validation {
  padding-block: 16px;
  border-block: 1px solid #d9d9d9;
}
.validation summary {
  font-size: 1rem;
}
.validation p {
  margin-top: 12px;
}

.data-status {
  margin-top: 28px;
}

.sources {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: #595959;
}
.sources li + li {
  margin-top: 4px;
}

.footer {
  border-top: 1px solid #d9d9d9;
}
.footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding-block: 24px;
  font-size: 0.8125rem;
  color: #595959;
}

/* 高さが限られるPC画面でも、予測グラフまで見渡せる余白にします。
===================================== */
@media (min-width: 900px) and (max-height: 800px) {
  .header .inner {
    padding-block: 8px;
  }
  .intro {
    padding-bottom: 10px;
  }
  .toolbar {
    margin-bottom: 12px;
  }
  .metrics {
    padding-block: 4px 6px;
  }
  .result {
    padding-block: 8px;
  }
  .simulator figure {
    margin-top: 8px;
  }
}
/* スマートフォン
===================================== */
@media (max-width: 767px) {
  .header .inner {
    gap: 12px;
    padding-block: 12px;
  }
  .brand {
    gap: 7px;
    font-size: clamp(1rem, 4.8vw, 1.125rem);
  }
  .about-link {
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .intro {
    padding-block: 0 12px;
    gap: 8px;
  }
  .intro h1 {
    font-size: 1.25rem;
  }
  .toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    gap: 12px;
    margin-bottom: 16px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
  }
  .simulator {
    display: flow-root;
  }
  .result {
    scroll-margin-top: calc(var(--tabs-height, 48px) + 16px);
  }
  .tabs {
    flex: 1;
    gap: 0;
    min-width: 0;
  }
  .tabs button {
    flex: 1;
    padding-inline: 2px;
    font-size: clamp(0.75rem, 3vw, 0.875rem);
  }
  .toolbar .count-label {
    display: none;
  }
  .filters {
    gap: 8px;
    padding-bottom: 16px;
  }
  .filters label {
    min-width: 88px;
  }
  .filters select {
    padding-left: 6px;
    padding-right: 6px;
  }
  .intro .lead {
    font-size: 0.8rem;
  }
  .date,
  .count-label {
    font-size: 0.75rem;
  }
  .table-scroll {
    max-height: 420px;
  }
  .table-scroll > table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .table-scroll .rank-column {
    width: 12%;
  }
  .table-scroll .name-column {
    width: 28%;
  }
  .table-scroll .era-column {
    width: 22%;
  }
  .table-scroll .games-column {
    width: 16%;
  }
  .table-scroll .innings-column {
    width: 22%;
  }
  .table-scroll thead th {
    padding: 10px 2px;
    font-size: 0.75rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .table-scroll thead button {
    max-width: 100%;
    white-space: normal;
  }
  .table-scroll tbody td {
    padding: 11px 2px;
    font-size: 0.8125rem;
  }
  .table-scroll tbody th {
    padding-inline: 2px;
  }
  .table-scroll th:first-child,
  .table-scroll td:first-child {
    padding-left: 8px;
  }
  .table-scroll th:last-child,
  .table-scroll td:last-child {
    padding-right: 8px;
  }
  .table-scroll .actual-col strong {
    font-size: 1rem;
  }
  .ranking.is-team .table-scroll {
    max-height: none;
    overflow: visible;
  }
  .ranking.is-team .table-scroll thead {
    position: static;
  }
  .row-name {
    gap: 5px;
    font-size: clamp(0.8125rem, 3.6vw, 0.875rem);
  }
  .row-name small {
    font-size: 0.6875rem;
  }
  .team-mark {
    width: 3px;
  }
  .scenario-controls summary span {
    margin-left: 18px;
  }
  #history {
    overflow: visible;
  }
  #history table {
    table-layout: fixed;
    white-space: normal;
  }
  #history th,
  #history td {
    padding: 8px 2px;
    font-size: 0.75rem;
  }
  #history thead th {
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  #history thead th:nth-child(1) {
    width: 16%;
  }
  #history thead th:nth-child(2) {
    width: 13%;
  }
  #history thead th:nth-child(3) {
    width: 24%;
  }
  #history thead th:nth-child(4) {
    width: 11%;
  }
  #history thead th:nth-child(5) {
    width: 19%;
  }
  #history thead th:nth-child(6) {
    width: 17%;
  }
  #history tbody th,
  #history tbody td {
    white-space: nowrap;
  }
  .method {
    margin: 48px -16px 0;
    padding: 28px 16px 40px;
    border-top: 4px solid #000;
    background: #f5f5f5;
  }
  .method > h2 {
    padding-left: 12px;
    border-left: 4px solid #c92c20;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/*# sourceMappingURL=style.css.map */
