/* Review/status colours with enough contrast in both themes. */
:root { --rv-warn: #ffcf70; --rv-ok: #70e0ad; }
:root[data-theme="light"] { --rv-warn: #8a5300; --rv-ok: #0b7a4b; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --rv-warn: #8a5300; --rv-ok: #0b7a4b; } }
/* ScrimMate v1.0.4: results review (scoreboard preview + edit cards), schedule chooser, repeat options,
   category chips, bigger room card, deeper public stats. */

/* ---------- Results review ---------- */
.m14-review .m14-warnc { color: var(--rv-warn); font-weight: 700; }
.rv-board { padding: 14px 12px 12px; margin: 0 0 14px; }
.rv-board__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rv-board__head h2 { margin: 0; font-size: 17px; }
.rv-board__head small { color: var(--on-surface-variant); font-size: 12px; }
.rv-board__stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.rv-board__stats span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--on-surface) 7%, transparent); color: var(--on-surface-variant); }
.rv-board__stats b { color: var(--on-surface); font-variant-numeric: tabular-nums; }
.rv-pill { flex: 0 0 auto; font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.rv-pill--ok { background: color-mix(in srgb, var(--rv-ok) 16%, transparent); color: var(--rv-ok); }
.rv-pill--warn { background: color-mix(in srgb, var(--rv-warn) 18%, transparent); color: var(--rv-warn); }
.rv-table { display: grid; gap: 4px; }
.rv-tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px 36px 44px; align-items: center; gap: 6px; width: 100%; padding: 8px 6px; border-radius: 12px; border: 1px solid transparent; background: color-mix(in srgb, var(--on-surface) 4%, transparent); color: var(--on-surface); text-align: left; font: inherit; }
button.rv-tr { cursor: pointer; transition: background var(--sm-motion-fast, 140ms) ease, transform var(--sm-motion-fast, 140ms) ease; }
button.rv-tr:active { transform: scale(.99); background: color-mix(in srgb, var(--on-surface) 9%, transparent); }
.rv-tr.is-bad { border-color: color-mix(in srgb, var(--rv-warn) 45%, transparent); background: color-mix(in srgb, var(--rv-warn) 7%, transparent); }
.rv-th { background: none; padding-block: 2px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--on-surface-variant); }
.rv-th span:nth-child(n+3), .rv-num { text-align: right; font-variant-numeric: tabular-nums; }
.rv-num { font-size: 14px; }
.rv-total { font-weight: 800; color: var(--primary, #f6c445); }
.rv-rank { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: color-mix(in srgb, var(--on-surface) 9%, transparent); font-variant-numeric: tabular-nums; }
.rv-rank.m1 { background: #f6c445; color: #241a00; }
.rv-rank.m2 { background: #c9d1dc; color: #1b2027; }
.rv-rank.m3 { background: #d99a63; color: #2a1606; }
.rv-team { display: grid; gap: 1px; min-width: 0; }
.rv-team b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-team small { font-size: 11.5px; color: var(--on-surface-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-team small em { font-style: normal; color: var(--rv-warn); }
.rv-absent { margin: 10px 2px 0; font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.45; }
.rv-absent b { color: var(--on-surface); }
.rv-evidence > summary { list-style: none; cursor: pointer; display: grid; gap: 2px; }
.rv-evidence > summary::-webkit-details-marker { display: none; }
.rv-evidence > summary h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.rv-evidence > summary h2::after { content: '▾'; margin-left: auto; font-size: 14px; color: var(--on-surface-variant); transition: transform .2s ease; }
.rv-evidence[open] > summary h2::after { transform: rotate(180deg); }
.rv-evidence > summary h2 em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--primary, #f6c445) 18%, transparent); color: var(--primary, #f6c445); }
.rv-evidence > summary small { color: var(--on-surface-variant); font-size: 12px; }
.rv-evidence[open] > summary { margin-bottom: 10px; }
.rv-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 18px 2px 4px; }
.rv-edit-head h2 { margin: 0; font-size: 17px; }
.rv-hint { color: var(--on-surface-variant); margin: 2px 2px 10px; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-card { padding: 0; margin: 0 0 10px; overflow: hidden; }
.rv-card.is-bad { border-color: color-mix(in srgb, var(--rv-warn) 40%, transparent); }
.rv-card.rv-flash { box-shadow: 0 0 0 2px var(--primary, #f6c445); }
.rv-card__sum { list-style: none; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.rv-card__sum::-webkit-details-marker { display: none; }
.rv-card__body { padding: 0 12px 12px; display: grid; gap: 10px; border-top: 1px solid var(--sm-line); padding-top: 12px; }
.rv-issues { margin: 0; padding: 8px 10px 8px 26px; border-radius: 10px; background: color-mix(in srgb, var(--rv-warn) 10%, transparent); color: var(--rv-warn); font-size: 13px; }
.rv-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.rv-grid3 .sm-field input { width: 100%; min-width: 0; }
.rv-kills { display: grid; gap: 4px; padding: 0 0 8px; text-align: center; }
.rv-kills small { font-size: 12px; color: var(--on-surface-variant); }
.rv-kills b { font-size: 20px; font-variant-numeric: tabular-nums; }
.rv-players { display: grid; gap: 8px; }
.rv-player { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--on-surface) 4%, transparent); border: 1px solid transparent; }
.rv-player.is-bad { border-color: color-mix(in srgb, var(--rv-warn) 40%, transparent); }
.rv-player__row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 36px; gap: 6px; align-items: center; }
.rv-player__row input { width: 100%; min-width: 0; min-height: 42px; }
.rv-k input { text-align: center; font-variant-numeric: tabular-nums; }
.rv-x { width: 36px; height: 36px; border-radius: 10px; color: var(--on-surface-variant); background: none; border: 0; font-size: 15px; }
.rv-x:active { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.rv-player__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--on-surface-variant); }
.rv-tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--on-surface) 9%, transparent); color: var(--on-surface-variant); }
.rv-tag--ok { background: color-mix(in srgb, var(--rv-ok) 15%, transparent); color: var(--rv-ok); }
.rv-tag--warn { background: color-mix(in srgb, var(--rv-warn) 16%, transparent); color: var(--rv-warn); }
.rv-player__id { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.rv-player__id select { width: 100%; min-height: 40px; }
/* The shell's scroll area already reserves room for the bottom nav (padding-bottom), so the bar sits just above it. */
.rv-submit { position: sticky; bottom: -18px; z-index: 3; padding: 10px 0 4px; background: linear-gradient(to top, var(--surface, #09090b) 70%, transparent); }

/* Practice results: scoreboard preview at the top of the review dialog. */
.rv-board--practice { margin: 0 0 12px; }

/* ---------- Scrims: schedule entry + chooser ---------- */
.scrims-schedule-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.scrims-schedule-cta button { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid var(--sm-line); background: var(--sm-glass); color: var(--on-surface); font: inherit; }
.scrims-schedule-cta button b { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.scrims-schedule-cta button small { font-size: 11.5px; color: var(--on-surface-variant); line-height: 1.3; }
.scrims-schedule-cta button.is-primary { background: color-mix(in srgb, var(--primary, #f6c445) 14%, var(--sm-glass)); border-color: color-mix(in srgb, var(--primary, #f6c445) 40%, transparent); }
.scrims-schedule-cta button:active { transform: scale(.985); }
.scrim-cat-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--on-surface) 9%, transparent); color: var(--on-surface-variant); white-space: nowrap; }
.scrim-cat-pill--weekly_war { color: #ff9f7a; background: color-mix(in srgb, #ff9f7a 15%, transparent); }
.scrim-cat-pill--tournament { color: #b59cff; background: color-mix(in srgb, #b59cff 16%, transparent); }
.scrim-repeat-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--rv-ok); background: color-mix(in srgb, var(--rv-ok) 13%, transparent); white-space: nowrap; }
.scrim-tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }

/* ---------- Create wizard: category / repeat / registration close ---------- */
.cc-access--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cc-access--3 .cc-access__opt { padding: 10px 8px; }
.cc-access--3 .cc-access__opt b { font-size: 13.5px; }
.cc-access--3 .cc-access__opt small { font-size: 11px; }
.cc-repeat-box { display: grid; gap: 8px; margin-top: 4px; }
.cc-repeat-box[hidden] { display: none; }
.cc-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cc-days label { position: relative; }
.cc-days input { position: absolute; opacity: 0; inset: 0; }
.cc-days span { display: inline-flex; min-width: 44px; min-height: 36px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--sm-line); font-size: 13px; font-weight: 650; }
.cc-days input:checked + span { background: var(--primary, #f6c445); color: var(--on-primary, #241a00); border-color: transparent; }
.cc-days input:focus-visible + span { outline: 2px solid var(--primary, #f6c445); outline-offset: 2px; }
.cc-note { font-size: 12px; color: var(--on-surface-variant); margin: 6px 0 0; line-height: 1.4; }

/* ---------- Room ID / password card: full-width rows, large readable values, never clipped ---------- */
.sm-roomkit__grid { grid-template-columns: 1fr; gap: 10px; }
.sm-roomkit__cell { gap: 6px; }
.sm-roomkit__cell small { font-size: 12px; font-weight: 700; }
.sm-roomkit__val { min-height: 60px; padding: 10px 12px 10px 16px; width: 100%; }
.sm-roomkit__val b { font-size: 24px; line-height: 1.25; font-weight: 800; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; word-break: normal; letter-spacing: .02em; text-align: left; min-width: 0; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
.sm-roomkit__copy { width: 40px; height: 40px; border-radius: 11px; }
.sm-roomkit__copy svg { width: 20px; height: 20px; }
.sm-roomkit__acts .btn { min-height: 46px; }
.sm-roomkit.is-compact .sm-roomkit__val { min-height: 50px; }
.sm-roomkit.is-compact .sm-roomkit__val b { font-size: 18px; letter-spacing: .01em; }

/* ---------- Deep stats: public tab extras ---------- */
.v1-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.v1-cats button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--sm-line); background: none; color: var(--on-surface-variant); font: inherit; font-size: 12.5px; font-weight: 650; }
.v1-cats button.is-on { background: var(--primary, #f6c445); color: var(--on-primary, #241a00); border-color: transparent; }
.v1-summary { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--primary, #f6c445) 9%, transparent); border: 1px solid color-mix(in srgb, var(--primary, #f6c445) 25%, transparent); font-size: 13.5px; line-height: 1.5; margin: 0 0 10px; }
.v1-summary b { color: var(--primary, #f6c445); }
.v1-meter { display: grid; gap: 8px; }
.v1-meter__row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 12.5px; }
.v1-meter__row .track { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--on-surface) 9%, transparent); overflow: hidden; }
.v1-meter__row .track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary, #f6c445), #ff9f7a); }
.v1-meter__row b { text-align: right; font-variant-numeric: tabular-nums; }
.v1-form span.mvp { box-shadow: 0 0 0 2px #f6c445 inset; }
@media (max-width: 359px) { .rv-tr { grid-template-columns: 30px minmax(0, 1fr) 28px 32px 40px; gap: 4px; } }
.v1-table td small { color: var(--sm-muted, #9aa3b2); font-size: .72em; margin-left: 1px; }
.v1-table--log td:first-child small { display: block; margin: 1px 0 0; }
.v1-table tr.is-mvp td:first-child { box-shadow: inset 3px 0 0 #f6c445; }
.scrim-card > .scrim-tagrow { display: flex; align-items: center; margin: 2px 0 10px; }
.scrim-card > .scrim-tagrow .scrim-kind-pill { font-size: 11px; padding: 2px 8px; }
.v104-series-row .v18-row__main b, .v104-series-row .v18-row__main small { white-space: normal; overflow: visible; text-overflow: clip; }
.v104-series-row { flex-wrap: wrap; gap: 10px; }
/* Room card in match rows: full width under the match, never squeezed next to "View match". */
.scrim-item-compact { flex-wrap: wrap; }
.scrim-room-row { flex: 1 0 100%; min-width: 0; width: 100%; }
.scrim-room-row > small { display: block; }
.sm-roomkit { width: 100%; min-width: 0; }
.sm-roomkit__acts { grid-template-columns: 1fr 1fr; }
.sm-roomkit__acts .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 10px; }
.v1-table--log td:first-child { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v1-table--log td:first-child small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Review status line scrolls with the page; a sticky pill covered the scoreboard header. */
.m14-review .m14-summary { position: static; border-radius: 14px; backdrop-filter: none; }
/* Wizard sections never grow wider than the sheet (a date input's intrinsic width pushed the Matches card past the edge). */
.cc-section { grid-template-columns: minmax(0, 1fr); }
.cc-section > *, .cc-repeat-box > * { min-width: 0; }
.cc-repeat-box input[type=date] { width: 100%; min-width: 0; box-sizing: border-box; }
.v1-planner { grid-template-columns: minmax(0, 1fr); }
.v1-planner > [data-pm-inner] { min-width: 0; }
/* v1.0.0: a card linked by slot number whose players are not on that team's roster. */
.rv-mismatch { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--rv-warn) 45%, transparent); background: color-mix(in srgb, var(--rv-warn) 8%, transparent); }
.rv-mismatch b { font-size: 14px; color: var(--on-surface); }
.rv-mismatch small { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.45; }
.rv-mismatch .rv-actions { margin-top: 2px; }
