/* The report (report_view.js): tabs, graphs, bars and tables. Used by the public report page and the operators' "レポート" tab, so it
   takes its colours from the page (var(--line), --ink, --muted ...) with plain fallbacks. No style attributes are used anywhere. */
.rp, .rp-body { min-width: 0; }
.rp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.rp-tab, .rp-pill, .rp-chip { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line, rgba(128, 128, 128, .4)); background: transparent; border-radius: 999px; padding: 6px 14px; line-height: 1.3; }
.rp-tab:hover, .rp-pill:hover, .rp-chip:hover { background: rgba(128, 128, 128, .14); }
.rp-tab.on, .rp-pill.on { background: var(--ember, #2a6ebb); color: var(--on-accent, #fff); border-color: var(--ember, #2a6ebb); font-weight: 700; }
.rp-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: rgba(128, 128, 128, .1); }
.rp-pill { padding: 5px 12px; font-size: .9em; }
.rp-hint { margin: 8px 0; font-size: .85em; opacity: .78; line-height: 1.6; }
.rp-foot { margin: 16px 0 0; font-size: .8em; opacity: .65; }
.rp-sealed { padding: 16px; border: 1px dashed var(--line, rgba(128, 128, 128, .5)); border-radius: 10px; text-align: center; }
.rp-h { margin: 22px 0 6px; font-size: 1.05em; }
.rp-scroll { overflow-x: auto; }
.rp-sw { display: inline-block; vertical-align: -2px; margin-right: 5px; flex: 0 0 auto; }
.rp-keys { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 10px; font-size: .88em; }
.rp-keys span { display: inline-flex; align-items: center; }
.rp-grad { align-items: center; gap: 2px; font-size: .8em; }
.rp-grad .g .rp-sw { margin: 0; }
.rp-grad span:first-child { margin-right: 6px; } .rp-grad span:last-child { margin-left: 6px; }

/* charts */
.rp-chart { display: block; width: 100%; height: auto; max-width: 100%; margin: 4px 0; }
.rp-line { transition: opacity .15s; }
.rp-line.dim { opacity: .14; }
.rp-lanes text { font-family: inherit; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.rp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: .85em; border-radius: 8px; }
.rp-chip .nm { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.rp-chip.on { outline: 2px solid var(--ember, #2a6ebb); background: rgba(128, 128, 128, .16); }

/* bar rows (rank, name, bar, value) */
.rp-rows, .rp-gaps, .rp-fast { list-style: none; margin: 8px 0; padding: 0; }
.rp-rows li { display: grid; grid-template-columns: 2em minmax(6em, 14em) minmax(60px, 1fr) minmax(4.5em, auto); align-items: center; gap: 4px 10px; padding: 5px 0; border-bottom: 1px solid var(--line, rgba(128, 128, 128, .25)); }
.rp-rows .rk { text-align: right; font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; }
.rp-rows .rk.first { color: var(--gold, #b8860b); opacity: 1; }
.rp-rows .nm { overflow-wrap: anywhere; }
.rp-rows .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-rows .v small, .rp-gaps .v small { display: block; font-size: .75em; opacity: .7; }
.rp-bar { display: block; width: 100%; height: 14px; border-radius: 3px; }
@media (max-width: 560px) {
  .rp-rows li { grid-template-columns: 1.6em 1fr auto; }
  .rp-rows .rk { grid-row: 1; } .rp-rows .nm { grid-row: 1; } .rp-rows .v { grid-row: 1; grid-column: 3; }
  .rp-rows .rp-bar { grid-row: 2; grid-column: 1 / -1; }
}
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 20px; }
.rp-card { min-width: 0; }
.rp-card h4 { margin: 4px 0; font-size: 1em; }

/* the gap to the team above */
.rp-gaps li { padding: 8px 0; border-bottom: 1px solid var(--line, rgba(128, 128, 128, .25)); }
.rp-gaps .top { display: grid; grid-template-columns: minmax(8em, 16em) minmax(60px, 1fr) 5em; align-items: center; gap: 4px 10px; }
.rp-gaps .nm small { display: block; font-size: .78em; opacity: .7; }
.rp-gaps .v { text-align: right; white-space: nowrap; }
.rp-gaps .chips { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; }
.rp-gap { display: inline-flex; align-items: center; gap: 2px; font-size: .8em; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(128, 128, 128, .35); }
.rp-gap b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.rp-gap.behind { background: rgba(224, 82, 77, .14); border-color: rgba(224, 82, 77, .5); }
.rp-gap.ahead { background: rgba(47, 163, 107, .15); border-color: rgba(47, 163, 107, .5); }
@media (max-width: 560px) { .rp-gaps .top { grid-template-columns: 1fr auto; } .rp-gaps .rp-bar { grid-column: 1 / -1; grid-row: 2; } }

/* tables */
.rp-table, .rp-rare { width: 100%; border-collapse: collapse; font-size: .92em; }
.rp-table th, .rp-table td, .rp-rare th, .rp-rare td { padding: 6px 8px; border-bottom: 1px solid var(--line, rgba(128, 128, 128, .25)); text-align: left; vertical-align: middle; }
.rp-table th small { display: block; font-weight: 400; opacity: .7; font-size: .8em; }
.rp-table .n, .rp-rare .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-table td.bar { min-width: 130px; }
.rp-table td.bar small { margin-left: 6px; opacity: .75; }
.rp-more { margin: 14px 0 0; }
.rp-more summary { cursor: pointer; font-size: .9em; padding: 4px 0; }
.rp-tag { display: inline-block; margin: 1px 4px 1px 0; padding: 0 8px; border: 1px solid rgba(128, 128, 128, .35); border-radius: 999px; font-size: .85em; white-space: nowrap; }
progress.rp-prog { width: 110px; height: 8px; vertical-align: middle; appearance: none; -webkit-appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: rgba(128, 128, 128, .22); }
progress.rp-prog::-webkit-progress-bar { background: rgba(128, 128, 128, .22); }
progress.rp-prog::-webkit-progress-value { background: #2fa36b; }
progress.rp-prog::-moz-progress-bar { background: #2fa36b; }

/* records */
.rp-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.rp-record { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line, rgba(128, 128, 128, .35)); border-radius: 12px; background: rgba(128, 128, 128, .08); }
.rp-record small { font-size: .78em; opacity: .75; }
.rp-record b { font-size: 1.15em; overflow-wrap: anywhere; }
.rp-record span { font-size: .82em; opacity: .85; }
.rp-fast li { display: grid; grid-template-columns: minmax(8em, 14em) minmax(60px, 1fr) minmax(8em, 15em); gap: 2px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line, rgba(128, 128, 128, .25)); }
.rp-fast .sec { font-size: .92em; overflow-wrap: anywhere; }
.rp-fast .who { font-variant-numeric: tabular-nums; }
.rp-fast .next { grid-column: 2 / -1; font-size: .78em; opacity: .7; }
@media (max-width: 560px) { .rp-fast li { grid-template-columns: 1fr; } .rp-fast .next { grid-column: 1; } }

/* the rare drops: teams down the side, the drops across the top */
.rp-rare { min-width: 520px; }
.rp-rare th.rot { height: 9em; padding: 6px 2px; text-align: center; vertical-align: bottom; font-weight: 600; }
.rp-rare th.rot span { writing-mode: vertical-rl; display: inline-block; font-size: .85em; line-height: 1.2; }
.rp-rare th.nm { white-space: nowrap; font-weight: 600; text-align: left; }
.rp-rare td.got, .rp-rare td.no, .rp-rare td.first { text-align: center; padding: 4px 2px; }
.rp-rare td.got svg { display: block; margin: 0 auto; }
.rp-rare td.no { opacity: .25; }
.rp-rare tr.foot th, .rp-rare tr.foot td { font-size: .82em; opacity: .85; border-top: 1px solid var(--line, rgba(128, 128, 128, .5)); }
.rp-rare td small { opacity: .6; }
.rp-notes { margin: 8px 0; padding-left: 1.3em; font-size: .9em; }

/* the league table of the totals: numbers under each bar */
.rp-league .rp-lg { grid-template-columns: 2em minmax(6em, 14em) minmax(60px, 1fr) minmax(5.5em, auto); }
.rp-league .nums { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: .88em; }
.rp-num { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-num .rp-sw { align-self: center; }
.rp-num small { opacity: .75; }
.rp-league .v b { font-size: 1.15em; }
@media (max-width: 560px) { .rp-league .rp-lg { grid-template-columns: 1.6em 1fr auto; } .rp-league .nums { grid-column: 1 / -1; } }
/* the legend of a line graph: one row per team, in the order of the ranking */
.rp-legend-h { margin: 12px 0 4px; font-size: .85em; opacity: .8; }
.rp-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: 4px 12px; }
.rp-chip { display: grid; grid-template-columns: 30px 1.6em 1fr auto; align-items: center; gap: 6px; text-align: left; border-radius: 8px; padding: 5px 10px; font-size: .92em; }
.rp-chip .rp-sw { margin: 0; }
.rp-chip .no { opacity: .65; text-align: right; font-variant-numeric: tabular-nums; }
.rp-chip .nm { max-width: none; overflow-wrap: anywhere; white-space: normal; }

/* the meter of the totals: points written on each segment */
.rp-meter { display: block; width: 100%; height: auto; border-radius: 4px; }

/* the order in which the teams cleared one section: the name has room to wrap, however long it is */
.rp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.rp-pick .rp-pill[disabled] { opacity: .35; cursor: default; }
.rp-select { flex: 1 1 14em; min-width: 0; max-width: 100%; font: inherit; color: inherit; padding: 6px 10px; border: 1px solid var(--line, rgba(128, 128, 128, .4)); border-radius: 8px; background: transparent; }
.rp-select option { color: #222; background: #fff; }
.rp-order { list-style: none; margin: 0; padding: 0; }
.rp-order li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) minmax(70px, 22%) minmax(8em, auto); align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(128, 128, 128, .25)); }
.rp-order .pl { font-weight: 700; opacity: .8; text-align: right; font-variant-numeric: tabular-nums; }
.rp-order .pl.first { color: var(--gold, #b8860b); opacity: 1; }
.rp-order .nm { overflow-wrap: anywhere; line-height: 1.4; }
.rp-order .tm { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-order .tm small { display: block; font-size: .78em; opacity: .7; }
@media (max-width: 640px) {
  .rp-order li { grid-template-columns: 3em minmax(0, 1fr) auto; }
  .rp-order .rp-bar { grid-column: 2 / -1; grid-row: 2; }
}

/* every section at once: sections down the side (kept at the left when scrolling), teams across */
.rp-matrix { border-collapse: separate; border-spacing: 0; font-size: .86em; min-width: 100%; }
.rp-matrix th, .rp-matrix td { border-bottom: 1px solid var(--line, rgba(128, 128, 128, .25)); border-right: 1px solid var(--line, rgba(128, 128, 128, .15)); padding: 5px 6px; vertical-align: middle; }
.rp-matrix th.team { white-space: normal; min-width: 8.5em; max-width: 9em; text-align: center; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; vertical-align: bottom; position: sticky; top: 0; background: var(--panel, #fff); }
.rp-matrix th.sec { white-space: normal; position: sticky; left: 0; z-index: 1; min-width: 11em; max-width: 13em; text-align: left; font-weight: 600; background: var(--panel, #fff); line-height: 1.35; }
.rp-matrix thead th.sec { z-index: 2; }
.rp-matrix td { text-align: center; line-height: 1.25; font-variant-numeric: tabular-nums; }
.rp-matrix td b { display: block; font-size: .95em; }
.rp-matrix td span { display: block; }
.rp-matrix td small { display: block; opacity: .7; font-size: .8em; }
.rp-matrix td.none { opacity: .3; }
.rp-matrix td.p1 { background: rgba(215, 154, 30, .30); }
.rp-matrix td.p2 { background: rgba(150, 160, 175, .30); }
.rp-matrix td.p3 { background: rgba(190, 110, 60, .24); }

/* the tab "注目点" (highlights) */
.rp-tag.solo { background: rgba(47, 163, 107, .18); border-color: rgba(47, 163, 107, .55); }
.rp-tag.none { background: rgba(224, 82, 77, .14); border-color: rgba(224, 82, 77, .5); }
.rp-tag.missed { background: rgba(215, 154, 30, .2); border-color: rgba(215, 154, 30, .6); }
.rp-sub { display: block; font-size: .78em; opacity: .7; }
.rp-teamcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0; }
.rp-teamcard { padding: 10px 14px; border: 1px solid var(--line, rgba(128, 128, 128, .35)); border-radius: 12px; background: rgba(128, 128, 128, .06); min-width: 0; }
.rp-teamcard h4 { margin: 0 0 6px; font-size: 1em; overflow-wrap: anywhere; }
.rp-teamcard h4 .rk { display: inline-block; min-width: 1.6em; margin-right: 6px; font-weight: 700; opacity: .8; }
.rp-teamcard h4 small { margin-left: 8px; font-weight: 400; opacity: .7; }
.rp-teamcard h5 { margin: 10px 0 2px; font-size: .85em; opacity: .8; }
.rp-teamcard ul { margin: 2px 0; padding-left: 1.2em; font-size: .9em; }
.rp-teamcard li small { margin-left: 6px; opacity: .65; }

/* the choice of how times are shown (elapsed or real clock) and the start it counts from */
.rp-time { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.rp-time .rp-pill { padding: 2px 10px; font-size: .8em; }
.rp-sw-label { font-size: .8em; opacity: .7; margin-right: 2px; }

/* the frame is tall from the start, so a link to the title band can scroll that far before the report has loaded */
[data-report] { min-height: 85vh; }
