.sa-panel { margin: 0 0 14px; }
.sa-setup { margin: 0 0 16px; }
.sa-setup-addresses { display: grid; gap: 4px; margin-bottom: 12px; }
.sa-setup-addresses small + label { margin-top: 8px; }
.hub-check {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: 16px;
}
.hub-check p:empty { display: none; }
.hub-check p { margin: 0; }
.sa-controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.sa-fullscreen { margin-inline-start: auto; }
.sa-screen-status { flex-basis: 100%; color: #8b2420; }
.sa-screen-status:empty { display: none; }
.sa-status:empty { display: none; }
.sa-result {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) repeat(2, minmax(0, .55fr));
  margin-top: 8px;
  padding: 14px 20px;
  align-items: center;
  gap: 12px 20px;
  border: 1px solid #253d54;
  border-radius: 12px;
  background: #15283b;
  color: #f4f8fc;
}
.sa-result[hidden], .sa-controls [hidden] { display: none; }
.sa-team { min-width: 0; overflow-wrap: anywhere; }
.sa-team-name { display: block; font-size: clamp(16px, 2vw, 24px); line-height: 1.2; }
.sa-label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 650; color: #b9c9da; }
.sa-value { display: block; font-variant-numeric: tabular-nums; line-height: 1; }
.sa-time { background: #a7f0df; color: #07352f; padding: 10px 14px; border-radius: 8px; }
.sa-time .sa-label { color: #22594f; }
.sa-time .sa-value { font-size: clamp(30px, 4.6vw, 64px); }
.sa-place { display: block; margin-top: 7px; font-size: 15px; font-weight: 650; }
.sa-place:empty { display: none; }
.sa-previous-result { margin: 8px 0 0; font-size: 15px; font-weight: 650; }
.sa-previous-result:empty { display: none; }
.sa-target { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: baseline; margin-top: 8px; padding: 8px 12px; border-left: 3px solid #287481; background: #dcefea; color: #164740; }
.sa-target[hidden] { display: none; }
.sa-target .sa-label { margin: 0; color: inherit; }
.sa-target .sa-value { font-size: 22px; }
.sa-disqualified { background: #ffccd1; color: #6d1827; }
.sa-disqualified .sa-label { color: #6d1827; }
.sa-disqualified .sa-value { font-size: clamp(17px, 2.6vw, 38px); overflow-wrap: anywhere; }
.sa-count .sa-value { font-size: clamp(26px, 3.4vw, 46px); }
.sa-new-leader {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #ffe5a0;
  color: #533809;
  font-size: 13px;
  font-weight: 700;
}
.sa-new-leader:empty { display: none; }
.sa-gold-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sa-gold-flake {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: 6px;
  height: 10px;
  border-radius: 1px;
  background: #ffda73;
  animation: sa-gold-fall var(--duration) var(--delay) both ease-in;
}
.sa-gold-flake:nth-child(3n) { background: #b78625; width: 4px; }
.sa-gold-flake:nth-child(3n + 1) { background: #fff4ce; }
@keyframes sa-gold-fall {
  from { transform: translate(0, -6px) rotate(0); opacity: 0; }
  14% { opacity: .95; }
  to { transform: translate(22px, 260px) rotate(245deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .sa-gold-rain { display: none; } }
dialog.sa-standings {
  width: min(960px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 18px 24px;
  background: #fff;
  color: #18263a;
  border: 1px solid #a7b7ca;
  border-radius: 12px;
}
.sa-standings::backdrop { background: #0b172bc9; }
.sa-standings .sa-standings-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 10px; }
.sa-standings-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sa-standings-title { margin: 0; font-size: clamp(19px, 3vw, 32px); overflow-wrap: anywhere; }
.sa-standings table { width: 100%; border-collapse: collapse; }
.sa-standings th, .sa-standings td { padding: 9px 12px; text-align: left; }
.sa-standings thead { background: #15283b; color: #fff; }
.sa-standings thead th { color: inherit; }
.sa-standings tr > :nth-child(n + 3) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sa-standings tbody th { font-size: 20px; }
.sa-standings tbody tr:nth-child(even) { background: #f3f6fa; }
.sa-standings tbody tr[data-place="1"] { background: #ffedba; }
.sa-standings tbody tr[data-place="2"], .sa-standings tbody tr[data-place="3"] { background: #e6eefc; }
.sa-standing-team { display: block; overflow-wrap: anywhere; }
.sa-standing-mobile-label { display: none; }
.sa-standings-large tbody :is(th, td) { padding-block: 15px; font-size: clamp(20px, 2.7vw, 29px); line-height: 1.15; }
.sa-standings-large tbody th { font-size: clamp(26px, 3.4vw, 37px); }
.sa-standings-large tbody td:nth-child(3) { font-weight: 750; }
@media (max-width: 540px) {
  dialog.sa-standings { padding: 10px; }
  .sa-standings .sa-standings-heading { align-items: flex-start; flex-direction: column; }
  .sa-standings th, .sa-standings td { padding: 7px 4px; font-size: 12px; }
  .sa-standings tbody th { font-size: 15px; }
  .sa-standings-large thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sa-standings-large tbody tr { display: grid; grid-template-columns: 36px repeat(3, minmax(0, 1fr)); padding: 7px; border-bottom: 1px solid #cbd5e2; }
  .sa-standings-large tbody :is(th, td) { padding: 5px; font-size: 18px; text-align: left; }
  .sa-standings-large tbody th { font-size: 26px; }
  .sa-standings-large tbody td:nth-child(2) { grid-column: 2 / -1; font-size: 22px; }
  .sa-standings-large tbody td:nth-child(3) { grid-column: 2; }
  .sa-standings-large .sa-standing-mobile-label { display: block; font-size: 11px; font-weight: 650; }
}
@media (max-width: 740px) {
  .sa-result { grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(0, 1fr)); padding: 12px; gap: 10px; }
  .sa-team { grid-column: 1 / -1; }
  .sa-time { padding-inline: 8px; }
}

/* AWC competition board. The notes selection stays separate from the live starter. */
.sa-board {
  display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(210px, 1fr);
  gap: 12px; margin-top: 8px; align-items: stretch;
}
.sa-board[hidden] { display: none; }
.sa-board .sa-result {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin: 0; gap: 6px 14px;
}
.sa-board .sa-team { grid-row: 1 / span 2; grid-column: 1; }
.sa-dog-line { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.sa-bib { color: #b9cfe5; font-size: clamp(19px, 2.6vw, 34px); font-variant-numeric: tabular-nums; }
.sa-board .sa-team-name { font-size: clamp(25px, 4vw, 50px); line-height: 1.12; }
.sa-handler { display: block; margin-top: 2px; font-size: clamp(15px, 2vw, 21px); }
.sa-board .sa-time {
  grid-column: 2; padding: 2px 8px 2px 14px; border-left: 1px solid #536d84;
  border-radius: 0; background: transparent; color: #f4f8fc;
}
.sa-board .sa-time .sa-label { color: #b9c9da; }
.sa-board .sa-disqualified { border-radius: 6px; border-color: transparent; background: #ffccd1; color: #6d1827; }
.sa-board .sa-disqualified .sa-label { color: #6d1827; }
.sa-counts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; padding-left: 14px; }
.sa-count { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 5px; }
.sa-board .sa-count .sa-value { font-size: 14px; }
.sa-count .sa-label { margin: 0; }
.sa-board .sa-target {
  grid-column: 1 / -1; justify-content: space-between; gap: 8px 12px; margin-top: 6px;
  border: 0; border-radius: 7px; background: #a7f0df; color: #10453b;
}
.sa-board .sa-target[hidden] { display: none; }
.sa-queue { min-width: 0; padding: 12px 14px; background: #fff; color: #18263a; border: 1px solid var(--line); border-radius: 12px; }
.sa-queue-title { margin: 0 0 4px; font-size: 17px; }
.sa-queue-list { list-style: none; margin: 0; padding: 0; }
.sa-queue-list li + li { border-top: 1px solid var(--line); }
.sa-queue .sa-queue-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%;
  align-items: center; gap: 8px; text-align: left; padding: 6px 2px; min-height: 42px;
  border: 0; border-radius: 0; background: transparent; color: inherit;
}
.sa-queue button.sa-queue-row:is(:hover, [aria-pressed="true"]) { background: #edf2f9; }
.sa-queue-bib { color: #4b5d72; font-variant-numeric: tabular-nums; }
.sa-queue-names { min-width: 0; overflow-wrap: anywhere; }
.sa-queue-names small { display: block; letter-spacing: 0; }
.sa-queue-message:empty { display: none; }
.awc-notes-heading { display: none; margin: 14px 0 5px; font-size: 18px; }
.awc-live-layout .awc-notes-heading { display: block; }
.awc-live-layout #runningOrder { display: none; }
.awc-live-layout .announce-grid { grid-template-columns: minmax(0, 1fr); }
.awc-live-layout #groupNavigation:has(select:disabled) { display: none; }
.awc-live-layout #identity { padding: 8px 14px; min-height: 0; }
.awc-live-layout #identity .race-number { font-size: 23px; }
.awc-live-layout #identity .race-names :is(h2, p) { font-size: 17px; }
.awc-live-layout #identity .shared-handler-intro { margin-top: 5px; padding-top: 4px; }
.awc-live-layout #identity .shared-handler-intro p { margin-block: 3px; }
@media (min-width: 1000px) {
  .announcing .awc-live-layout .note { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .sa-board { grid-template-columns: minmax(0, 1fr); }
  .sa-board .sa-result { padding: 12px; gap: 8px; }
  .sa-board .sa-time { padding-inline: 8px; }
}
@media (max-width: 390px) {
  .sa-board .sa-team { grid-row: auto; grid-column: 1 / -1; }
  .sa-board .sa-time { grid-column: 1; border-left: 0; padding-left: 0; }
  .sa-counts { padding-left: 0; }
}
