:root {
  --black: #21162f;
  --ink: #21162f;
  --gold: #ffc844;
  --accent: #ffc844;
  --paper: #f8f6fb;
  --line: #ddd6e8;
  --violet: #6331a1;
  --violet-soft: #f0e7fc;
  --muted: #5e516c;
  --category: var(--violet);
  --category-tint: var(--violet-soft);
  --category-text: #fff;
}
[data-category="0"], [data-cat="0"] { --category:#ae245e; --category-tint:#fce6ef; --category-text:#fff; }
[data-category="1"], [data-cat="1"] { --category:#1266b5; --category-tint:#e4f2ff; --category-text:#fff; }
[data-category="2"], [data-cat="2"] { --category:#a6d873; --category-tint:#eef8e2; --category-text:#19331a; }
[data-category="3"], [data-cat="3"] { --category:#1d633f; --category-tint:#e0f2e8; --category-text:#fff; }
[data-category="4"], [data-cat="4"] { --category:#203a69; --category-tint:#e7edf8; --category-text:#fff; }
:is(.public-live,.judge-page)[data-category="0"]{--category:#c00078;--category-tint:#fce6f5}
:is(.public-live,.judge-page)[data-category="3"]{--category:#08472e;--category-tint:#e0f3e8}
:is(.public-live,.judge-page)[data-category="4"]{--category:#102958;--category-tint:#e3ecfb}
:is(.public-live,.judge-page){
 --competition-highlight:color-mix(in srgb,var(--category) 46%,#21162f);
 --competition-background:radial-gradient(ellipse at top right,var(--competition-highlight),transparent 70%),
  linear-gradient(110deg,#21162f,#172539);
 --competition-title:color-mix(in srgb,var(--category) 50%,white);
}
:is(.public-live,.judge-page)[data-category="2"]{--competition-title:var(--category)}


body {
  color:var(--ink);
  background:radial-gradient(ellipse at 100% 0%,#f4e5f5,transparent 36rem),var(--paper);
}
header, .top, .hero, body > footer {
  color:white;
  background:linear-gradient(112deg,#20152e,#452459 63%,#672d55);
}
header { padding-block:clamp(14px,3vw,30px); border-color:#eab742; }
header.top { padding-block:0; }
.hero {
  background:
    radial-gradient(ellipse at 79% 45%,#9a3d7266,transparent 56%),
    linear-gradient(115deg,#24163e,#462359 60%,#361947);
}
.hero-grid { padding-block:clamp(24px,5vw,68px); gap:clamp(14px,4vw,36px); }
.slide-mark { background:#fff1; border-color:#f6be674f; }
.brand-crest { width:clamp(54px,10vw,96px); }
.brand h1 { font-size:clamp(1.65rem,5vw,3.3rem); }
.nav { min-height:56px; padding-block:6px; gap:8px 14px; }
.nav nav { gap:3px 11px; }
.nav nav>a:not(.outline) { padding-block:5px; }
h1,h2,h3 { letter-spacing:-.028em; }
main > h1 { margin-block:8px 4px; }
.section { padding-block:clamp(18px,4vw,32px); }
main:not(.wrap) { padding-inline:clamp(12px,3vw,26px); }
main:has(>.hero) { padding-inline:0; }
.cards, .rules { gap:10px; }
.cards article, .rules article, .review-card, .club-sidebar, .club-editor {
  border-color:var(--line);
  box-shadow:0 4px 14px #3321490a;
  padding:clamp(10px,2vw,15px);
}
.cards:not(#clubs) article, .rules article {
  border-top:3px solid var(--card-accent,var(--violet));
  background:linear-gradient(145deg,var(--card-tint,var(--violet-soft)),white 62%);
}
.cards article:nth-child(4n+2), .rules article:nth-child(4n+2) { --card-accent:#a82c73; --card-tint:#fce6ef; }
.cards article:nth-child(4n+3), .rules article:nth-child(4n+3) { --card-accent:#226ca6; --card-tint:#e4f2ff; }
.cards article:nth-child(4n+4), .rules article:nth-child(4n+4) { --card-accent:#1d633f; --card-tint:#e0f2e8; }
#schedule-turns .review-card { border-inline-start:4px solid var(--category); }
#schedule-turns .review-card h3, .club-division h3 { background:var(--category-tint); padding:4px 8px; border-radius:5px; }
#rotation-editor fieldset { min-width:0; border:1px solid var(--line); border-radius:8px; margin:6px 0; }

button, .gold, .outline, .tabs button, .slide-controls button {
  width:fit-content;
  max-width:100%;
  min-height:32px;
  padding:4px 9px;
  border-radius:7px;
  font-size:.85rem;
  font-weight:750;
  line-height:1.22;
  white-space:normal;
  overflow-wrap:anywhere;
}
button, .gold { background:var(--gold); color:var(--ink); border:1px solid transparent; }
button.outline, .outline { background:transparent; color:inherit; border:1px solid #927da566; }
button:not(.outline,[data-cat],[data-category]):is(:hover,:active):not(:disabled), .gold:is(:hover,:active) { background:#ffda77; color:var(--ink); }
:is(button.outline,.outline):is(:hover,:active):not(:disabled) { background:var(--violet-soft); color:var(--ink); }
.slide-controls button { min-width:34px; background:#fff1; color:white; }
.hero .actions, .actions, .tabs, .role-switch nav, .preview-bar nav { gap:5px 8px; }
.role-switch a, .role-switch span, .preview-bar nav a, .preview-bar nav span {
  padding:5px 8px;
  font-size:.84rem;
}
button[data-cat]:is([aria-pressed=false],[aria-pressed=true]) {
  border-color:var(--category);
  background:var(--category-tint);
  color:var(--ink);
}
button[data-cat][aria-pressed=true] { background:var(--category); color:var(--category-text); }
#score > button { width:auto; }
summary { padding:5px 3px; }
label {
  margin:2px 4px 2px 0;
  font-size:.82rem;
  font-weight:670;
  line-height:1.3;
}
.access label, .session-form label, .club-editor label, .score-fields label { gap:2px; }
input:not([type=checkbox],[type=radio]), select, textarea {
  min-height:33px;
  padding:4px 7px;
  max-width:100%;
  border:1px solid #a89ab4;
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font:400 .9rem/1.25 system-ui,sans-serif;
}
input[type=checkbox], input[type=radio] {
  width:1.05rem;
  min-height:0;
  height:1.05rem;
  accent-color:var(--violet);
  vertical-align:middle;
}
input[type=file] { font-size:.8rem; }
input::file-selector-button { padding:3px 6px; border:0; border-radius:4px; background:var(--violet-soft); color:var(--ink); }
:where(a,button,input,select,textarea,summary):focus-visible { outline:2px solid #7947ba; outline-offset:2px; }
header :is(a,button):focus-visible, .hero :is(a,button):focus-visible { outline-color:var(--gold); }
.session-form { gap:6px 9px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.session-form > :is(p,div,#schedule-label) { grid-column:1/-1; }
.session-form > button { align-self:end; }
.session-form fieldset:nth-child(1) { background:#fce6ef; }
.session-form fieldset:nth-child(2) { background:#e4f2ff; }
.session-form fieldset:nth-child(3) { background:#eef8e2; }
.session-form fieldset:nth-child(4) { background:#f0e7fc; }
.session-form :is(fieldset,legend) { min-width:0; }
.session-form legend, #rotation-editor legend { font-weight:750; font-size:.86rem; }
.access form, .score-fields, .filters, .turn-form { gap:6px; }
.club-workspace { gap:10px; }
.club-team.selected, .preview-bar, .grid form, #score output { background:var(--violet-soft); }
th { background:var(--violet-soft); }
th, td { padding:5px 7px; border-color:var(--line); }
#schedule-turns table { width:100%; border-collapse:collapse; text-align:left; font-size:.82rem; }
#schedule-turns th { white-space:nowrap; }
#schedule-turns td { min-width:7rem; }
#schedule-turns td:first-child { white-space:nowrap; }
@media (pointer:coarse) {
  button, .gold, .outline, .tabs button, .slide-controls button { min-height:40px; }
  input:not([type=checkbox],[type=radio]), select, textarea { min-height:38px; font-size:16px; }
}
@media (max-width:580px) {
  .nav nav { width:100%; min-width:0; font-size:.8rem; }
  .access > * { min-width:0; }
  .hero-grid { grid-template-columns:minmax(0,1fr) minmax(62px,24%); }
  .hero-grid .crest, .hero-grid .slide-mark { grid-row:auto; width:100%; justify-self:end; }
  .hero-grid .slide-mark small { font-size:.55rem; }
  .slide h2, .hero h1 { font-size:clamp(2rem,9vw,3rem); }
  .session-form { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

.planning-layout {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:clamp(12px,3vw,28px);
  margin-block:12px;
}
.planning-layout > * { min-width:0; }
#schedule-turns > .review-card:first-child { margin-top:0; }
.planning-layout h2, .planning-session details { margin-top:0; }
.planning-session {
  padding:12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.planning-session summary { font-size:1.15rem; }
.planning-layout + [role=status]:empty { display:none; }
@media (max-width:740px) {
  .planning-layout { grid-template-columns:minmax(0,1fr); }
}

.control-menu { margin-block:8px; }
.control-menu a { padding:5px 9px; border:1px solid var(--line); border-radius:7px; font-size:.85rem; }
.control-menu [aria-current="page"] { background:var(--violet); color:#fff; border-color:var(--violet); }

#directory { list-style:none; margin:0; padding:0; }
#directory > :first-child, #directory-editor h3 { margin-top:0; }
#directory li { overflow-wrap:anywhere; }
#directory-status:empty { display:none; }

.session-heading {
  display:inline-flex;
  width:calc(100% - 1.2em);
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:5px 8px;
  vertical-align:middle;
}
.session-name-badge {
  margin-inline-start:auto;
  padding:3px 7px;
  border-radius:6px;
  background:var(--category);
  color:var(--category-text);
  font-size:.8rem;
  overflow-wrap:anywhere;
}

.judge-coverage { display:flex; flex-wrap:wrap; gap:4px; list-style:none; padding:0; margin:7px 0; }
.judge-coverage li { padding:2px 6px; border-radius:5px; background:#fbe7ee; color:#842348; font-size:.75rem; font-weight:700; }
.judge-coverage [data-count="1"] { background:#fff0cc; color:#714900; }
.judge-coverage [data-count="2"] { background:#e0f2e8; color:#1d633f; }

#schedule-turns .review-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);
  gap:6px 10px;
  align-items:start;
}
.turn-card-info { min-width:0; overflow-wrap:anywhere; }
#schedule-turns .review-card > details { grid-column:1/-1; min-width:0; }
.judge-coverage {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-self:start;
  margin:0;
}
.judge-coverage li { min-width:0; overflow-wrap:anywhere; }
.judge-coverage :is(strong,span) { display:block; }
.judge-coverage span { font-weight:550; }
@media (max-width:430px), (min-width:741px) and (max-width:940px) {
  #schedule-turns .review-card { grid-template-columns:minmax(0,1fr); }
}

.session-send-actions label { display:inline-flex; align-items:center; gap:4px; }
.session-send-actions input { width:5.2rem; }
#session-form-status:empty { display:none; }
.judge-coverage .judge-invited { color:#124e9a; background:#e1efff; border-radius:4px; padding-inline:3px; }
.judge-coverage .invitation-marker { display:inline; }

.session-send-group {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:5px 8px;
  margin-inline-start:auto;
}
.session-send-group label { margin-inline-end:0; }

.apparatus-board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; align-items:start; }
.apparatus-panel {
  --apparatus-accent:#ae245e;
  --apparatus-tint:#fce6ef;
  min-width:0;
  padding:8px;
  border:1px solid var(--line);
  border-top:3px solid var(--apparatus-accent);
  border-radius:9px;
  background:var(--apparatus-tint);
  overflow-wrap:anywhere;
}
.apparatus-panel[data-event="1"] { --apparatus-accent:#1266b5; --apparatus-tint:#e4f2ff; }
.apparatus-panel[data-event="2"] { --apparatus-accent:#1d633f; --apparatus-tint:#e0f2e8; }
.apparatus-panel[data-event="3"] { --apparatus-accent:#6331a1; --apparatus-tint:#f0e7fc; }
.apparatus-heading { display:flex; justify-content:space-between; align-items:center; gap:4px; }
.apparatus-heading h3, .apparatus-panel h4 { margin:0; }
.apparatus-judge-group { min-width:0; }
.apparatus-judge-group h4 { margin:0 0 4px; }
.apparatus-judges { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.apparatus-judge { display:grid; align-content:start; gap:3px; min-width:0; font-size:.72rem; line-height:1.2; overflow-wrap:anywhere; }
.apparatus-judge:nth-child(2) { text-align:right; }
.judge-seat-name { padding:6px; border-radius:6px; font-size:.83rem; background:#e5e9ef; color:#263447; }
.judge-seat-name[data-state="online"] { background:#17633d; color:white; }
.judge-seat-name[data-state="waiting"] { background:#ffcb80; color:#4d2600; }
.judge-seat-name[data-state="offline"] { background:#941b32; color:white; }
.apparatus-count { border-radius:8px; padding:1px 7px; color:white; background:var(--apparatus-accent); font-size:.8rem; }
.apparatus-empty { margin:5px 0 0; font-size:.82rem; }
.apparatus-panel .review-card { padding:8px; }
.apparatus-panel .review-card ul { margin:5px 0; padding-inline-start:16px; font-size:.82rem; }
@media (max-width:880px) { .apparatus-board { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .apparatus-board { grid-template-columns:minmax(0,1fr); } }

.apparatus-team { margin:5px 0 0; font-weight:800; }
.apparatus-rotation { margin:2px 0 6px; color:var(--muted); font-size:.78rem; }
.apparatus-panel .live-note-card { padding:6px 8px; }
.live-note-identity { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:6px; align-items:baseline; line-height:1.2; }
.live-note-identity h4 { font-size:.93rem; }
.live-note-club { margin:0; text-align:right; font-size:.78rem; font-weight:650; color:var(--muted); }
.live-note-footer { display:flex; flex-wrap:wrap; align-items:center; gap:4px 7px; margin-top:4px; }
.live-note-time { font-size:.72rem; font-variant-numeric:tabular-nums; color:var(--muted); }
.live-note-score-line { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:5px; margin-top:4px; }
.live-note-score-line button { padding-inline:6px; }
.apparatus-panel .live-note-footer details { margin:0; }
.live-note-footer details[open] { order:1; flex-basis:100%; }
.live-note-context { margin:4px 0; color:var(--muted); }
.live-note-values { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; margin:0; text-align:center; }
.live-note-values div { background:var(--paper); border-radius:5px; padding:3px 0; }
.live-note-values dt { font-size:.72rem; color:var(--muted); }
.live-note-values dd { margin:0; font-size:.85rem; font-weight:750; font-variant-numeric:tabular-nums; }
.live-note-values div:last-child { background:var(--apparatus-tint); }
.apparatus-panel details { margin:4px 0 0; font-size:.78rem; }

#score input[aria-invalid="true"] { border-color:#ae245e; background:#fff0f4; }
#score .score-mismatch { margin:0; color:#8b204a; font-size:.84rem; font-weight:750; }

#waiting-peer {
  width:min(26rem,calc(100% - 32px));
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px;
  color:var(--ink);
  background:white;
}
#waiting-peer::backdrop { background:#21162fa6; }
#waiting-peer h2 { margin:0 0 6px; }
#waiting-peer p { margin:5px 0; }

.score-check {
  display:inline-grid;
  place-items:center;
  width:1.65em;
  height:1.65em;
  border-radius:50%;
  background:#dff5e7;
  color:#14623b;
  font-weight:850;
  vertical-align:middle;
  animation:score-confirmation .35s ease-out both;
}
#waiting-peer .score-check { font-size:1.65rem; margin-bottom:6px; }
@keyframes score-confirmation {
  from { opacity:0; transform:scale(.55); }
  65% { opacity:1; transform:scale(1.13); }
  to { opacity:1; transform:scale(1); }
}

.score-check { position:relative; }
.score-confetti {
  position:absolute;
  inset:50% auto auto 50%;
  width:5px;
  height:8px;
  border-radius:2px;
  background:hsl(var(--hue) 72% 46%);
  pointer-events:none;
  animation:score-confetti .65s ease-out both;
}
@keyframes score-confetti {
  from { opacity:1; transform:rotate(var(--angle)) translateY(-5px); }
  to { opacity:0; transform:rotate(var(--angle)) translateY(-38px) rotate(130deg); }
}
@media (prefers-reduced-motion:reduce) { .score-confetti { display:none; } }

.score-celebration {
  position:fixed;
  z-index:1000;
  inset:clamp(8px,2vw,22px);
  display:grid;
  place-content:center;
  justify-items:center;
  gap:12px;
  padding:16px;
  overflow:hidden;
  pointer-events:none;
  text-align:center;
  border:2px solid #92d4ae;
  border-radius:24px;
  color:#14623b;
  background:radial-gradient(ellipse at center,#f7fff9 18%,#e1f6eafa 100%);
  box-shadow:0 0 0 30px #183a2e54;
}
.score-celebration .score-check {
  z-index:1;
  font-size:clamp(5rem,20vmin,11rem);
  box-shadow:0 10px 42px #14623b30;
}
.score-celebration p { z-index:1; margin:0; font-size:clamp(1.45rem,5vw,2.6rem); font-weight:850; }
.score-celebration .score-confetti {
  width:clamp(7px,1.5vmin,14px);
  height:clamp(11px,2.5vmin,22px);
  animation:score-confetti-wide 1.5s cubic-bezier(.16,.68,.35,1) both;
}
@keyframes score-confetti-wide {
  from { opacity:0; transform:rotate(var(--angle)) translateY(-12px); }
  15%,65% { opacity:1; }
  to { opacity:0; transform:rotate(var(--angle)) translateY(calc(-1 * var(--distance))) rotate(160deg); }
}

.judge-workspace { max-width:920px; }
.judge-hero {
  margin-top:clamp(10px,3vw,24px);
  padding:clamp(14px,3vw,24px);
  border-radius:18px;
  color:#fff;
  background:radial-gradient(ellipse at 85% 12%,#8553ae,transparent 60%),linear-gradient(115deg,#2b1946,#522967);
}
.judge-hero .eyebrow { color:#ffdb80; margin:0; }
.judge-hero h1 { margin:3px 0; font-size:clamp(2rem,7vw,3.6rem); line-height:1; }
.judge-hero p:not(.eyebrow) { margin:5px 0 0; font-size:.88rem; }
.judge-desk {
  grid-template-columns:minmax(0,1fr) minmax(0,2fr);
  align-items:start;
  gap:12px;
}
.judge-team, .judge-desk #score {
  border:1px solid var(--line);
  border-radius:15px;
  padding:clamp(12px,2vw,18px);
  background:#fff;
}
.judge-team { background:linear-gradient(140deg,#f0e7fc,#fff); border-top:3px solid var(--violet); }
.judge-team h2, .judge-desk #score h2 { font-size:1.2rem; margin:0; overflow-wrap:anywhere; }
.judge-team p { margin:4px 0; }
.judge-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.judge-metrics > div { min-width:0; }
.judge-metrics label { display:block; min-height:2.6em; }
.judge-metrics input { width:100%; font-variant-numeric:tabular-nums; }
.judge-submit { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.judge-submit output { padding:6px 9px; font-weight:800; background:var(--violet-soft); border-radius:7px; }
.judge-submit button { min-width:5rem; }
.judge-desk #agreement-status { font-size:.84rem; color:var(--muted); }
.score-celebration {
  border-color:#bde9d1;
  color:#f5fff9;
  background:radial-gradient(ellipse at 50% 46%,#206851 0%,#102f35 60%,#211936 100%);
}
.score-celebration-tag { z-index:1; color:#bdf5d7; font-size:.8rem; font-weight:800; letter-spacing:.14em; }
.score-celebration .score-check { background:#c5f4d7; color:#125338; }
.score-celebration .score-confetti { background:hsl(var(--hue) 90% 68%); }
@media (min-width:700px) and (max-width:1400px) {
  .judge-page .judge-workspace { width:calc(100% - 24px); max-width:none; }
  .judge-page .judge-desk { grid-template-columns:minmax(0,24fr) minmax(0,31fr); gap:10px; }
  .judge-page .judge-team { padding-inline:10px; }
}
@media(max-width:620px) {
  .judge-desk { grid-template-columns:minmax(0,1fr); gap:7px; }
  .judge-team { padding:8px 12px; }
}

.judge-page {
  min-height:100%;
  background:var(--competition-background);
}
.judge-page body { min-height:100vh; background:transparent; }
.judge-page .top { background:transparent; border-color:#ffffff35; }
.judge-page .judge-hero { background:transparent; }
.judge-page .judge-desk { border-bottom-color:#ffffff35; }

#scoring-athlete { margin:0; color:var(--muted); font-size:.88rem; font-weight:650; }


#lineup-order { display:grid; gap:5px; margin:6px 0; }
#lineup-order > div { display:grid; grid-template-columns:1.6rem minmax(0,1fr) 3.5rem; align-items:center; gap:4px; padding:3px; border:1px solid var(--line); border-radius:7px; background:white; }
#lineup-order .lineup-position { text-align:center; font-weight:800; }
#lineup-order select { width:100%; min-height:36px; font-size:1rem; }
#lineup-order button { min-height:36px; padding-inline:2px; font-size:.72rem; }
#lineup-order > div { --lineup-active:var(--violet); }
#lineup-order button[aria-pressed="true"], #lineup-order > div:has(button[aria-pressed="true"]) select {
  background:var(--lineup-active);
  border-color:var(--lineup-active);
  color:white;
}
#lineup-order > div:has(button[aria-pressed="true"]) select { font-weight:750; }
#lineup-order select option { background:white; color:var(--ink); }
#lineup-order .gymnast-complete { --lineup-active:#1d633f; background:#e0f5e8; border-color:#67af86; color:#155b37; }
#lineup-order .gymnast-complete button { font-size:1rem; background:#d1eedc; color:#155b37; }
#lineup-order .gymnast-complete button[aria-pressed="true"] { background:var(--lineup-active); color:white; }
#lineup-status,#lineup-gap { font-size:.8rem; }
#lineup-status:empty { display:none; }

.mesa-connection { color:white; font-size:.85rem; }
.mesa-connection:empty { display:none; }
.judge-page #retry-queue { color:white; border-color:#ffffff70; }

#preparing-mesa {
  width:min(26rem,calc(100% - 32px));
  border:1px solid #d8c9ed;
  border-radius:18px;
  padding:22px;
  color:var(--ink);
  background:#fff;
  text-align:center;
}
#preparing-mesa::backdrop { background:#21162fc9; }
#preparing-mesa h2 { margin:12px 0 5px; }
#preparing-mesa p { font-size:.9rem; }
.mesa-spinner { width:36px; height:36px; margin:auto; border:3px solid #eee6f7; border-top-color:var(--violet); border-radius:50%; animation:mesa-loading .8s linear infinite; }
@keyframes mesa-loading { to { transform:rotate(360deg); } }

.team-detail-trigger { padding:3px 5px; background:transparent; color:var(--violet); text-align:left; text-decoration:underline; text-underline-offset:3px; }
#rank .team-detail-trigger[aria-expanded="true"] { background:var(--violet-soft); }
#rank .team-detail-row :is(th,td) { background:#faf7fe; font-size:.84rem; padding:5px 7px; }
#rank .team-detail-row th { font-weight:550; }
#rank .team-detail-row .note-counted { color:var(--ink); }
#rank .team-detail-row .note-discarded { color:#756d80; background:#f5f2f8; }
#rank .team-detail-row small { display:block; font-size:.68rem; font-weight:400; }
@media(max-width:580px) {
 #rank > table { display:table; min-width:680px; }
 #rank > table > thead { display:table-header-group; position:static; width:auto; height:auto; overflow:visible; clip-path:none; }
 #rank > table > tbody { display:table-row-group; }
 #rank > table > :is(thead,tbody) > tr { display:table-row; }
 #rank > table > :is(thead,tbody) > tr > :is(th,td) { display:table-cell; padding:6px; font-size:.84rem; }
 #rank > table td::before { display:none; }
}

#rank table > :is(thead,tbody,tfoot) > tr > :is(th,td) { text-align:center; }
#rank > table > :is(thead,tbody,tfoot) > tr > :is(th,td):nth-child(2) { text-align:left; }

.ranking-sort { padding:3px 5px; background:transparent; color:inherit; white-space:nowrap; }
.ranking-sort[aria-pressed="true"] { color:var(--violet); background:var(--violet-soft); border-color:#9c7cbc; }

:is(#rank,#ranking) > table > :is(thead,tbody,tfoot) > tr > :is(th,td):first-child {
  width:4.5rem;
  min-width:4.5rem;
  max-width:4.5rem;
  box-sizing:border-box;
  white-space:nowrap;
  font-size:.85rem;
}

#notes .apparatus-notes-table { width:100%; table-layout:fixed; }
#notes .apparatus-name-column { width:40%; }
#notes .apparatus-score-column { width:15%; }
#notes .apparatus-notes-table :is(th,td) {
  min-width:0;
  font-size:.85rem;
  overflow-wrap:anywhere;
}
#notes .apparatus-notes-table :is(th,td):not(:first-child) { text-align:center; }
#notes .apparatus-notes-table :is(th,td):first-child { text-align:left; }
@media(max-width:580px) {
 #notes .apparatus-notes-table { display:table; min-width:420px; }
 #notes .apparatus-notes-table thead { display:table-header-group; position:static; width:auto; height:auto; overflow:visible; clip-path:none; }
 #notes .apparatus-notes-table tbody { display:table-row-group; }
 #notes .apparatus-notes-table tr { display:table-row; }
 #notes .apparatus-notes-table :is(th,td) { display:table-cell; padding:6px 4px; }
 #notes .apparatus-notes-table td::before { display:none; }
}

#notes .apparatus-note-discarded > td { color:#756d80; background:#f8f6fa; }
