@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  font-family: "DM Sans", sans-serif;
  color: #142d58;
  background: #f4f7ff;
  font-synthesis: none;
  --brand: #1451c9;
  --muted: #60718d;
  --line: #dce5f5;
  --paper: #ffffff;
  --a: #1451c9;
  --b: #a96c00;
  --vote-gold: #f3bd28;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f3b71b;
  outline-offset: 4px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
.site-header {
  height: 89px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  max-width: 1600px;
  margin: auto;
}
.brand {
  text-decoration: none;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}
.season-badge {
  font-size: 10px;
  letter-spacing: 1.4px;
  border: 1px solid #c2d1ea;
  border-radius: 5px;
  padding: 9px 11px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.season-badge b {
  font-size: 14px;
}
.text-button {
  border: 0;
  padding: 6px 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button span {
  margin-left: 7px;
}
.button {
  border: 1px solid #dce5f5;
  background: var(--paper);
  padding: 12px 17px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.button:hover {
  background: #eaf1ff;
}
.button.primary {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}
.button.primary:hover {
  background: #103fa0;
}
.button.compact {
  font-size: 11px;
  padding: 11px 13px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ffc928;
  border-radius: 50%;
  flex-shrink: 0;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 49px 0 37px;
  gap: 25px;
}
.hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 66px;
  letter-spacing: -2px;
  line-height: 1.05;
  margin: 14px 0;
}
.hero h1 em {
  font-weight: 400;
  color: #1451c9;
}
.hero p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.hero-note {
  border-left: 1px solid #dce5f5;
  padding-left: 21px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}
.mini-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.hero-note strong {
  font-size: 12px;
  font-weight: 500;
}
.hero-note > span:last-child {
  font-size: 10px;
  color: var(--muted);
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 5%;
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 25px;
  align-items: start;
}
.main-column {
  min-width: 0;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 19px 23px;
  background: #eaf1ff;
  margin-bottom: 21px;
}
.stat-strip > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stat-strip b {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.stat-strip > div > span {
  font-size: 10px;
  color: var(--muted);
}
.matrix-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 22px 0;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.matrix-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 0 12px;
}
.matrix-tools .roster-edit {
  position: relative;
  font-size: 11px;
  min-height: 32px;
  padding: 5px 9px;
  border-color: #afc6f0;
  background: #f5f8ff;
  white-space: nowrap;
}
/* Keep a 44px touch target around the visually compact button. */
.matrix-tools .roster-edit::before {
  content: "";
  position: absolute;
  inset: -6px 0;
}
.matrix-tools .roster-edit:hover {
  border-color: var(--brand);
  background: #eaf1ff;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
  font-weight: 500;
  margin: 8px 0 0;
}
.panel-description {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 9px 0 20px;
}
.toggle-label {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}
.toggle-label input {
  accent-color: var(--brand);
  width: 14px;
  height: 14px;
}
.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  margin-bottom: 17px;
}
.matchup-table {
  width: 100%;
  min-width: 620px;
  border-spacing: 4px;
  table-layout: fixed;
}
.matchup-table thead th {
  font-size: 9px;
  font-weight: 500;
  height: 67px;
  text-align: center;
  vertical-align: top;
}
.matchup-table th .avatar {
  margin: auto auto 6px;
  display: block;
}
.matchup-table thead th > span:last-child {
  display: block;
}
.matchup-table thead .corner {
  width: 88px;
  font-size: 26px;
  color: #60718d;
  vertical-align: middle;
}
.matchup-table tbody th {
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: var(--paper);
  z-index: 1;
}
.matchup-table tbody th .avatar {
  display: inline-block;
  vertical-align: middle;
  margin: 0 6px 0 0;
}
.matchup-table td {
  height: 57px;
  padding: 0;
  text-align: center;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--player-color, #8fa5c8);
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
  flex-shrink: 0;
}
.avatar > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  font-weight: 600;
}
.avatar img {
  width: var(--portrait-size, 100%);
  height: var(--portrait-size, 100%);
  max-width: none;
  object-fit: cover;
  object-position: 50% 0;
  position: absolute;
  left: var(--portrait-x, 0%);
  top: var(--portrait-y, 0%);
  display: block;
}
.avatar img[hidden] {
  display: none;
}
.avatar.small {
  width: 29px;
  height: 29px;
}
.avatar.tiny {
  width: 24px;
  height: 24px;
}
.avatar.large {
  width: 79px;
  height: 79px;
  border: 4px solid white;
  box-shadow: 0 3px 15px #142d5810;
}
.avatar.large > span {
  font-size: 25px;
}
.out {
  filter: grayscale(1);
  opacity: 0.45;
}
.matchup {
  width: 100%;
  height: 100%;
  min-height: 57px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  position: relative;
  background: #f4f7ff;
  padding: 2px;
  gap: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .matchup:not(:disabled):hover {
    background: #dce5f5;
    border-color: #8fa5c8;
  }
}
.matchup:focus-visible {
  outline-offset: -3px;
}
.even-mark {
  font-size: 10px;
  font-weight: 400;
  color: #60718d;
  letter-spacing: 0.1px;
}
.even-mark > span {
  color: #8fa5c8;
  margin: 0 1px;
}
.decided {
  background: #eaf1ff;
  border-color: #dce5f5;
}
.cell-probability {
  font-size: 9px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.diagonal {
  color: #c2d1ea;
  background: repeating-linear-gradient(
    135deg,
    #f4f7ff,
    #f4f7ff 4px,
    #eaf1ff 4px,
    #eaf1ff 5px
  );
  border-radius: 5px;
  font-size: 11px;
}
.out-cell .matchup {
  background: #e9ecf1;
  border-color: transparent;
}
.out-dash {
  color: #9ba6b8;
  font-size: 11px;
}
.ranking-card {
  background: #edf3ff;
  border: 1px solid #dce5f5;
  border-radius: 12px;
  padding: 25px 23px;
}
.ranking-card .eyebrow {
  font-size: 9px;
}
.ranking-card h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 33px;
  letter-spacing: -0.6px;
  margin-top: 9px;
}
.ranking-card > .panel-description {
  font-size: 11px;
  margin-top: 11px;
  margin-bottom: 24px;
}
.rank-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.rank-position {
  font-size: 11px;
  color: #60718d;
  width: 10px;
}
.rank-detail {
  flex: 1;
}
.rank-detail > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rank-detail strong {
  font-size: 11px;
  font-weight: 500;
}
.rank-detail b {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rank-track {
  height: 4px;
  background: #dce5f5;
  margin: 7px 0 3px;
  border-radius: 3px;
  overflow: hidden;
}
.rank-track span {
  height: 100%;
  display: block;
  background: var(--player-color);
  border-radius: 3px;
  transition: width 0.25s;
}
.ranking-note {
  border-top: 1px solid #c2d1ea;
  padding-top: 16px;
  margin-top: 5px;
  display: flex;
  align-items: start;
  gap: 7px;
}
.ranking-note > span {
  color: #60718d;
  font-size: 13px;
}
.ranking-note p {
  font-size: 10px;
  line-height: 1.75;
  color: #60718d;
  margin: 0;
}
.ranking-card > .text-button {
  font-size: 10px;
  margin-top: 16px;
}
.below-matrix {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 2px;
}
.below-matrix > div {
  display: flex;
  gap: 16px;
}
.below-matrix .text-button {
  font-size: 10px;
}
.save-status {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.save-status .live-dot {
  width: 5px;
  height: 5px;
}
.scenario-note {
  font-size: 11px;
  line-height: 1.6;
  background: #fff3ce;
  padding: 10px 15px;
  border-radius: 6px;
}
.scenario-note .text-button {
  font-size: 11px;
  margin-left: 5px;
  text-decoration: underline;
}
.site-footer {
  border-top: 1px solid var(--line);
  max-width: 1440px;
  margin: auto;
  padding: 20px 5% 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: #60718d;
}
.site-footer .text-button {
  font-size: 9px;
  color: #60718d;
}
.loading,
.load-error {
  padding: 80px 0;
}
.load-error h1 {
  font-family: Georgia, serif;
  font-weight: 400;
}
.empty-state {
  font-size: 12px;
  color: var(--muted);
  padding: 25px 0;
  line-height: 1.8;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  transform: translateY(-200%);
  padding: 10px;
  background: white;
}
.skip-link:focus {
  transform: translateY(0);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}
dialog {
  border: 1px solid #dce5f5;
  padding: 0;
  border-radius: 16px;
  background: var(--paper);
  color: inherit;
  width: min(850px, calc(100% - 32px));
  max-height: 90dvh;
  box-shadow: 0 35px 100px #142d5840;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: #142d586e;
  backdrop-filter: blur(4px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  gap: 16px;
}
.dialog-header h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 35px;
  font-weight: 400;
  margin-top: 5px;
}
.dialog-header h2 em {
  font-size: 27px;
  color: #60718d;
  margin: 0 8px;
}
.icon-button {
  border: 1px solid #dce5f5;
  width: 33px;
  height: 33px;
  background: transparent;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #eaf1ff;
}
.dialog-body {
  padding: 24px 30px;
  overflow: auto;
  overscroll-behavior: contain;
}
.dialog-footer {
  padding: 17px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  gap: 15px;
  background: #f4f7ff;
  flex-shrink: 0;
}
.dialog-footer > div {
  display: flex;
  gap: 10px;
}
.faceoff {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.finalist {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.finalist.side-b {
  justify-content: flex-end;
  text-align: right;
}
.finalist h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 500;
}
.finalist strong {
  display: block;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.finalist.side-a strong {
  color: var(--a);
}
.finalist.side-b strong {
  color: var(--b);
}
.finalist span:not(.avatar) {
  font-size: 10px;
  color: var(--muted);
}
.versus {
  font-size: 10px;
  color: #60718d;
  letter-spacing: 2px;
}
.probability-track {
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--b);
  margin: 20px 0 9px;
}
.probability-track > span {
  height: 100%;
  display: block;
  background: var(--a);
  transition: width 0.1s;
}
.expected-votes {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.vote-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 23px 0 25px;
}
.vote-zone {
  --drop-color: #1451c9;
  --drop-background: #dce9ff;
  border: 1px dashed #c2d1ea;
  min-height: 88px;
  border-radius: 8px;
  padding: 11px 8px;
  text-align: center;
  transition: background 0.15s;
}
.zone-a {
  background: #edf3ff;
}
.zone-b {
  --drop-color: #b77c00;
  --drop-background: #ffecad;
  background: #fff5d6;
  border-color: #e8c76e;
}
.zone-swing {
  --drop-color: #778294;
  --drop-background: #e9ecf1;
  grid-column: 1 / -1;
  background: #f5f7fb;
  border-color: #c6ccd5;
}
.vote-zone > strong > span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}
.zone-lean.zone-a { background: #f5f8ff; }
.zone-lean.zone-b { background: #fffbef; }
.juror-chip small { font-size: 9px; color: var(--muted); }
.vote-zone > strong {
  font-size: 10px;
  font-weight: 500;
}
.vote-zone.drag-over {
  background: var(--drop-background);
  border-color: var(--drop-color);
  border-style: solid;
}
.juror-chips {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 45px;
  align-items: center;
  margin-top: 10px;
}
.juror-chip {
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  position: relative;
  cursor: grab;
}
.juror-chip:active {
  cursor: grabbing;
}
.drop-hint {
  font-size: 9px;
  color: #60718d;
}
.slider-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.slider-heading h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}
.slider-heading > span {
  font-size: 10px;
  color: var(--muted);
}
.slider-heading {
  margin-bottom: 12px;
}
.juror-row {
  display: flex;
  gap: 24px;
  align-items: center;
  border-top: 1px solid #eaf1ff;
  padding: 13px 0;
}
.juror-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 135px;
}
.juror-identity label {
  font-size: 12px;
  font-weight: 500;
}
.juror-identity small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
.juror-control {
  flex: 1;
  min-width: 0;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.slider-labels b {
  font-weight: 600;
}
.slider-labels > span:first-child b {
  color: var(--a);
}
.slider-labels > span:last-child b {
  color: var(--b);
}
input[type="range"] {
  width: 100%;
  height: 5px;
  display: block;
  margin: 13px 0 11px;
  appearance: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--thumb-color, var(--a));
  box-shadow: 0 0 0 1px #60718d;
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--thumb-color, var(--a));
}
.vote-presets {
  display: flex;
  justify-content: space-between;
}
.vote-presets button {
  font-size: 9px;
  color: var(--muted);
  border: 0;
  background: none;
  padding: 3px 0;
}
.vote-presets button:hover {
  color: var(--brand);
  text-decoration: underline;
}
.math-footnote {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: 16px 0 0;
}
.roster-list {
  margin-top: 14px;
}
.roster-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #eaf1ff;
}
.roster-row > div {
  flex: 1;
}
.roster-row strong {
  font-size: 12px;
  font-weight: 500;
}
.roster-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.status-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  flex-shrink: 0;
  min-height: 44px;
  width: 99px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.status-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.toggle-track {
  width: 36px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #9ba9bf;
  transition: background 150ms;
}
.toggle-track::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #102c5a33;
  transition: transform 150ms;
}
.status-toggle input:checked + .toggle-track {
  background: var(--blue, #245ddd);
}
.status-toggle input:checked + .toggle-track::after {
  transform: translateX(14px);
}
.status-toggle input:focus-visible + .toggle-track {
  outline: 2px solid #245ddd;
  outline-offset: 3px;
}
.status-toggle.is-locked {
  opacity: 0.55;
  cursor: default;
}
.roster-minimum {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}
#roster-dialog,
#about-dialog {
  max-width: 660px;
}
.prose h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 23px 0 8px;
}
.prose h3:first-child {
  margin-top: 0;
}
.prose p,
.prose li {
  font-size: 12px;
  color: #60718d;
  line-height: 1.85;
}
.prose ul {
  padding-left: 17px;
}
.prose li {
  margin: 6px 0;
}
.prose a {
  text-underline-offset: 3px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  background: var(--brand);
  color: white;
  font-size: 12px;
  padding: 14px 21px;
  border-radius: 9px;
  box-shadow: 0 5px 20px #1451c930;
  max-width: calc(100% - 30px);
  width: max-content;
  z-index: 20;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1450px) {
  .matchup-table td {
    height: 63px;
  }
  .matchup {
    min-height: 63px;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}
@media (max-width: 1150px) {
  main {
    padding: 0 3%;
  }
  .site-header,
  .site-footer {
    padding-left: 3%;
    padding-right: 3%;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 18px;
  }
  .ranking-card {
    padding: 23px 17px;
  }
  .matrix-card {
    padding: 21px 13px 0;
  }
  .stat-strip {
    gap: 22px;
    padding: 17px;
  }
  .hero-note {
    max-width: 270px;
  }
  .hero h1 {
    font-size: 57px;
  }
  .matchup-table {
    min-width: 585px;
  }
  .matchup-table thead .corner {
    width: 80px;
  }
  .matchup-table tbody th .avatar {
    width: 24px;
    height: 24px;
    margin-right: 3px;
  }
}
@media (max-width: 940px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .ranking-card {
    padding: 24px;
  }
  .ranking-card #rankings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 35px;
  }
  .ranking-note {
    max-width: 560px;
  }
  .hero-note {
    display: none;
  }
  .hero {
    margin: 35px 0;
  }
  .matrix-card {
    padding: 22px 19px 0;
  }
  .matchup-table {
    min-width: 620px;
  }
  .matchup-table td {
    height: 62px;
  }
  .matchup {
    min-height: 62px;
  }
  .matchup-table thead .corner {
    width: 90px;
  }
  .matchup-table tbody th .avatar {
    width: 29px;
    height: 29px;
    margin-right: 6px;
  }
  .ranking-card h2 {
    font-size: 31px;
  }
  .ranking-card > .panel-description {
    margin-bottom: 22px;
  }
}
@media (max-width: 600px) {
  .site-header {
    height: 73px;
    padding: 0 5%;
  }
  .brand {
    font-size: 19px;
    gap: 8px;
  }
  .header-right {
    gap: 10px;
  }
  .header-right > .text-button {
    display: none;
  }
  .season-badge {
    font-size: 8px;
    letter-spacing: 0.8px;
    padding: 6px;
    gap: 6px;
  }
  .season-badge b {
    font-size: 11px;
  }
  main {
    padding: 0 4%;
  }
  .hero {
    margin: 31px 0 27px;
  }
  .hero h1 {
    font-size: 46px;
    letter-spacing: -1.5px;
  }
  .hero p {
    font-size: 12px;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .stat-strip {
    gap: 20px;
    padding: 15px;
    margin-bottom: 16px;
  }
  .stat-strip b {
    font-size: 24px;
  }
  .stat-strip > div > span {
    font-size: 9px;
  }
  .matrix-card {
    padding: 20px 10px 0;
  }
  .panel-heading {
    padding: 0 4px;
  }
  .panel-heading h2 {
    font-size: 19px;
  }
  .panel-heading .eyebrow {
    font-size: 8px;
  }
  .panel-description {
    padding: 0 4px;
    font-size: 11px;
  }
  .toggle-label {
    font-size: 9px;
    gap: 3px;
  }
  .matchup-table {
    min-width: 610px;
  }
  .matchup-table tbody th {
    box-shadow: 4px 0 6px #ffffff;
  }
  .below-matrix {
    gap: 7px;
  }
  .below-matrix > div {
    gap: 10px;
  }
  .save-status,
  .below-matrix .text-button {
    font-size: 9px;
  }
  .ranking-card #rankings {
    grid-template-columns: 1fr;
  }
  .rank-row {
    margin-bottom: 21px;
  }
  .ranking-card .panel-description {
    padding: 0;
  }
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 5%;
    gap: 3px;
  }
  .dialog-header {
    padding: 19px 17px 15px;
  }
  .dialog-header .eyebrow {
    font-size: 8px;
  }
  .dialog-header h2 {
    font-size: 29px;
  }
  .dialog-body {
    padding: 18px 17px;
  }
  .dialog-footer {
    padding: 13px 17px;
    flex-wrap: wrap;
    gap: 9px;
  }
  .dialog-footer .button {
    padding: 11px;
    font-size: 11px;
  }
  .dialog-footer .text-button {
    font-size: 10px;
  }
  .avatar.large {
    width: 55px;
    height: 55px;
  }
  .finalist {
    gap: 8px;
  }
  .finalist h3 {
    font-size: 12px;
  }
  .finalist strong {
    font-size: 25px;
  }
  .finalist span:not(.avatar) {
    font-size: 8px;
  }
  .versus {
    font-size: 8px;
  }
  .vote-board {
    gap: 5px;
  }
  .vote-zone {
    padding: 10px 3px;
    min-height: 88px;
  }
  .vote-zone > strong {
    font-size: 9px;
  }
  .juror-chips {
    gap: 7px;
  }
  .drop-hint {
    font-size: 8px;
  }
  .slider-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
  .juror-row {
    gap: 10px;
    align-items: center;
  }
  .juror-identity {
    min-width: 86px;
    gap: 6px;
  }
  .juror-identity .avatar {
    width: 25px;
    height: 25px;
  }
  .juror-identity label {
    font-size: 10px;
  }
  .juror-identity small {
    font-size: 8px;
  }
  .slider-labels {
    font-size: 9px;
  }
  .vote-presets button {
    font-size: 8px;
    padding: 6px 0;
  }
  .roster-row {
    gap: 9px;
  }
  .roster-row .avatar {
    width: 30px;
    height: 30px;
  }
  .roster-row strong {
    font-size: 11px;
  }
  .roster-row small {
    font-size: 9px;
    line-height: 1.5;
  }
  .roster-row > div {
    min-width: 0;
  }
  dialog {
    width: calc(100% - 16px);
    max-height: 95dvh;
    border-radius: 12px;
  }
}
.scroll-hint {
  display: none;
}
.reset-button {
  color: #a44832;
}
.below-matrix > div {
  align-items: center;
}
.table-scroll {
  position: relative;
}
input[type="range"] {
  height: 32px;
  margin: 1px 0;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--a), var(--vote-gold));
}
input[type="range"]::-webkit-slider-thumb {
  margin-top: -6px;
}
input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--a), var(--vote-gold));
}
@media (max-width: 600px) {
  .scroll-hint {
    display: flex;
    justify-content: space-between;
    margin: 0 4px 12px;
    color: var(--muted);
    font-size: 9px;
  }
  .matchup-table {
    min-width: 480px;
    border-spacing: 3px;
  }
  .matchup-table thead .corner {
    width: 61px;
  }
  .matchup-table tbody th {
    font-size: 9px;
    white-space: normal;
    text-align: center;
  }
  .matchup-table tbody th .avatar {
    display: block;
    margin: 0 auto 3px;
    width: 23px;
    height: 23px;
  }
  .matchup-table thead th {
    font-size: 8px;
    height: 55px;
  }
  .matchup-table thead th .avatar {
    width: 29px;
    height: 29px;
  }
  .matchup-table td {
    height: 46px;
  }
  .matchup {
    min-height: 46px;
  }
  .matchup .avatar.small {
    width: 25px;
    height: 25px;
  }
  .even-mark {
    font-size: 9px;
  }
  .cell-probability {
    font-size: 8px;
  }
  .matchup-table tbody th {
    box-shadow: 3px 0 7px #8fa5c830;
  }
  .below-matrix {
    flex-wrap: wrap;
    padding-top: 12px;
  }
  .below-matrix > div {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .below-matrix .text-button {
    min-height: 44px;
    font-size: 11px;
  }
  .toggle-label {
    min-height: 44px;
  }
  .icon-button {
    width: 44px;
    height: 44px;
  }
  .vote-presets button {
    min-height: 32px;
  }
  .vote-presets {
    gap: 4px;
  }
  .juror-chip {
    min-width: 32px;
    min-height: 44px;
  }
  .dialog-footer .button {
    min-height: 44px;
  }
  .dialog-footer > .text-button {
    min-height: 44px;
  }
  .dialog-footer {
    padding-bottom: max(13px, env(safe-area-inset-bottom));
  }
  .juror-row {
    padding: 10px 0;
  }
  .slider-labels {
    font-size: 10px;
  }
  .finalist .avatar.large {
    width: 48px;
    height: 48px;
  }
  .finalist {
    gap: 6px;
  }
  .finalist strong {
    font-size: 24px;
  }
  .expected-votes {
    font-size: 10px;
  }
  .dialog-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .juror-identity {
    min-width: 83px;
  }
}
@media (max-width: 940px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-note {
    display: flex;
    max-width: none;
    border-left: 0;
    padding-left: 0;
    gap: 5px;
  }
  .hero-note > .mini-label {
    display: none;
  }
}
@media (max-width: 600px) {
  .hero {
    gap: 17px;
    margin-top: 27px;
    margin-bottom: 23px;
  }
  .hero-note {
    gap: 5px;
    margin: 0;
  }
  .hero-note strong {
    font-size: 11px;
  }
  .hero-note > span:last-child {
    font-size: 9px;
  }
  .hero h1 {
    margin: 12px 0;
  }
  .panel-description {
    font-size: 12px;
  }
  .matchup-table thead th {
    font-size: 9px;
  }
  .matchup-table tbody th {
    font-size: 10px;
  }
  .matchup-table td {
    height: 49px;
  }
  .matchup {
    min-height: 49px;
  }
  .even-mark {
    font-size: 10px;
  }
  .ranking-card > .panel-description {
    font-size: 12px;
  }
  .rank-detail strong,
  .rank-detail b {
    font-size: 13px;
  }
  .ranking-note p {
    font-size: 11px;
  }
  .juror-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 15px 0 9px;
  }
  .juror-identity {
    gap: 8px;
  }
  .juror-identity > div {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .juror-identity label {
    font-size: 13px;
  }
  .juror-identity small {
    font-size: 10px;
    margin: 0;
  }
  .juror-identity .avatar {
    width: 29px;
    height: 29px;
  }
  .slider-labels {
    font-size: 12px;
  }
  .vote-presets button {
    font-size: 10px;
    min-height: 40px;
  }
  .slider-heading > span,
  .slider-help {
    font-size: 11px;
    line-height: 1.6;
  }
  .slider-heading h3 {
    font-size: 18px;
  }
  .juror-control input[type="range"] {
    height: 40px;
    margin: 0;
  }
  .dialog-header h2 {
    font-size: 32px;
  }
  .finalist h3 {
    font-size: 14px;
  }
  .finalist strong {
    font-size: 28px;
  }
  .finalist span:not(.avatar) {
    font-size: 9px;
  }
  .vote-zone > strong {
    font-size: 11px;
  }
  .juror-chip {
    font-size: 10px;
  }
  .drop-hint {
    font-size: 10px;
  }
  .dialog-footer .text-button {
    font-size: 11px;
  }
}
/* Big Brother blue, white and gold, with distinct blue / gold finalist sides. */
.season-badge {
  background: #1451c9;
  color: #fff;
  border-color: #1451c9;
}
.season-badge b {
  color: #ffcf40;
}
.hero h1 em {
  color: #1451c9;
}
.hero h1 em::after {
  content: "";
  display: block;
  height: 4px;
  background: #ffcf40;
  border-radius: 2px;
  transform: rotate(-1deg);
  margin: 2px 0 0 2px;
}
.hero h1 em {
  display: inline-block;
}
.stat-strip {
  border-top: 3px solid #ffcf40;
}
.rank-track span {
  background: #1451c9;
}
.decided {
  background: #dce9ff;
  border-color: #b7cdf4;
}
.ranking-card {
  border-top: 3px solid #1451c9;
}
.side-b strong,
.slider-labels > span:last-child b {
  color: #946100 !important;
}
.probability-track {
  background: #f3bd28;
}
.zone-b {
  --drop-color: #b77c00;
  --drop-background: #ffecad;
  background: #fff5d6;
  border-color: #e8c76e;
}
.zone-a {
  border-color: #afc6f0;
}
.vote-zone.drag-over {
  outline: 2px solid var(--drop-color);
  outline-offset: 1px;
  background: var(--drop-background);
}
.juror-chip {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.juror-chip.is-dragging {
  opacity: 0.35;
}
.juror-drag-ghost {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, -65%);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  min-width: 62px;
  padding: 9px;
  background: white;
  border: 2px solid #1451c9;
  border-radius: 12px;
  box-shadow: 0 6px 22px #142d5840;
  font-size: 11px;
  color: #142d58;
}

.share-button {
  background: #ffcf40;
  color: #142d58;
  border-color: #f0bd2f;
  font-weight: 700;
}
.share-button:hover {
  background: #ffdf73;
}
.button[hidden] {
  display: none;
}
.button:disabled {
  opacity: 0.5;
}
.below-matrix > div {
  gap: 20px;
}
#share-dialog {
  max-width: 690px;
}
.snapshot-preview {
  background: #eaf1ff;
  border: 1px solid #dce5f5;
  border-radius: 10px;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.snapshot-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.snapshot-preview > p {
  padding: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.share-status {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 14px 0 0;
}
.share-footnote {
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .below-matrix .share-button {
    min-height: 44px;
    flex: 1;
    font-size: 13px;
  }
  .below-matrix {
    gap: 12px;
  }
  .below-matrix > div {
    gap: 22px;
  }
  .share-footnote {
    width: 100%;
    font-size: 11px;
  }
  #share-dialog .dialog-footer > div {
    width: 100%;
  }
  #share-dialog .dialog-footer .button {
    flex: 1;
    font-size: 12px;
  }
  #share-dialog .dialog-header h2 {
    font-size: 30px;
  }
  .juror-chip {
    min-width: 36px;
  }
  .hero h1 em::after {
    height: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 360px) {
  .faceoff { gap: 8px; }
  .finalist { min-width: 0; }
  .finalist .avatar.large { width: 32px; height: 32px; }
  .finalist strong { font-size: 22px; }
  .versus { display: none; }
}
