/* Bodoge TI Stats — theme-neutral, inherits site colors */
.bts { --bts-line: color-mix(in srgb, currentColor 18%, transparent); --bts-soft: color-mix(in srgb, currentColor 6%, transparent); --bts-accent: #c2410c; /* 文字・塗り＋白文字用（白との比 5.2:1、#fafafa 上の文字で 5.0:1 = WCAG AA） */ --bts-accent-fill: #ea580c; /* 文字を載せない棒グラフ用（背景との比 3.4:1 = UI 部品の基準） */ line-height: 1.5; }
.bts *, .bts *::before, .bts *::after { box-sizing: border-box; }

.bts-lede { font-size: 1.05em; }
.bts-foot { font-size: 0.85em; opacity: 0.75; margin-top: 1em; }

/* filters */
.bts-filters { display: flex; flex-wrap: wrap; gap: 0.5em 1.25em; align-items: center; padding: 0.75em 0; border-top: 1px solid var(--bts-line); border-bottom: 1px solid var(--bts-line); margin-bottom: 1em; }
.bts-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3em; }
.bts-chips-label { font-size: 0.8em; opacity: 0.7; margin-right: 0.2em; }
.bts-chip { font: inherit; font-size: 0.85em; padding: 0.2em 0.75em; border: 1px solid var(--bts-line); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.bts-chip:hover { background: var(--bts-soft); }
.bts-chip.is-on { background: var(--bts-accent); border-color: var(--bts-accent); color: #fff; }
.bts-toggle { font-size: 0.85em; display: inline-flex; align-items: center; gap: 0.3em; cursor: pointer; }
.bts-reset { font: inherit; font-size: 0.8em; background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; opacity: 0.7; margin-left: auto; }

/* tiles */
.bts-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75em; margin: 1em 0; }
.bts-tile { border: 1px solid var(--bts-line); border-radius: 10px; padding: 0.75em 1em; }
.bts-tile.is-key { background: var(--bts-soft); }
.bts-tile-label { font-size: 0.8em; opacity: 0.75; }
.bts-tile-value { font-size: 1.8em; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bts-tile-sub { font-size: 0.75em; opacity: 0.7; margin-top: 0.2em; }

/* progress */
.bts-progress { margin: 0.5em 0 1.25em; display: grid; gap: 0.4em; }
.bts-progress-row { display: grid; grid-template-columns: minmax(12em, 1fr) 2fr; gap: 0.75em; align-items: center; font-size: 0.9em; }
.bts-bar { display: block; height: 0.6em; border-radius: 999px; background: var(--bts-soft); overflow: hidden; }
.bts-bar-fill { display: block; height: 100%; background: var(--bts-accent-fill); border-radius: 999px; }

/* tables */
.bts-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1em; }
.bts-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.bts-table caption { text-align: left; font-size: 0.85em; opacity: 0.75; padding: 0 0 0.4em; caption-side: top; }
.bts-table th, .bts-table td { padding: 0.45em 0.6em; border-bottom: 1px solid var(--bts-line); text-align: left; vertical-align: top; white-space: nowrap; }
.bts-table th { font-weight: 600; font-size: 0.85em; }
.bts-table .bts-num { text-align: right; font-variant-numeric: tabular-nums; }
.bts-sortable { cursor: pointer; user-select: none; }
.bts-sortable:hover { background: var(--bts-soft); }
.bts-sortable.is-on { color: var(--bts-accent); }
.bts-cell-faction .bts-en { opacity: 0.6; font-size: 0.8em; }
.bts-rate.is-high { font-weight: 700; color: var(--bts-accent); }
.bts-none { font-size: 0.9em; opacity: 0.75; }

/* game list */
.bts-games > summary { cursor: pointer; font-weight: 600; margin-bottom: 0.5em; }
.bts-result { display: inline-block; font-size: 0.8em; padding: 0.1em 0.5em; border-radius: 4px; border: 1px solid var(--bts-line); }
.bts-result-win { background: var(--bts-accent); border-color: var(--bts-accent); color: #fff; }
.bts-result-ongoing, .bts-result-abandoned { opacity: 0.6; }
.bts-tag { display: inline-block; font-size: 0.75em; padding: 0.05em 0.4em; border: 1px solid var(--bts-line); border-radius: 4px; margin-right: 0.25em; }
.bts-date { font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
	.bts-progress-row { grid-template-columns: 1fr; gap: 0.2em; }
	.bts-tile-value { font-size: 1.5em; }
}
