
/* v13.38.1: prevent mobile landing card CTA from being clipped */
@media (max-width:640px){
  .landing-role-cards .role-card-inner{
    min-height:0;
    padding:14px 16px 16px;
    gap:4px;
  }
  .landing-role-cards .role-card-enter{
    margin-top:4px;
    padding-top:3px;
    padding-bottom:2px;
    line-height:1.35;
  }
}

/* ==== v14.0.25 public bracket refresh controls ==== */
.bracket-top-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
  gap:8px;
  margin:0 0 14px;
}
.bracket-top-controls .bracket-view-toggle{margin:0;}
.bracket-top-controls-refresh-only{display:flex;justify-content:flex-end;align-items:center;}
.bracket-refresh-btn{
  min-width:84px;
  min-height:44px;
  padding:8px 12px;
  white-space:nowrap;
  border-color:rgba(217,185,92,.34);
  color:var(--gold);
}
.bracket-refresh-btn:disabled{opacity:.55;cursor:wait;}
.public-context-hud{width:max-content;max-width:100%;}
@media(max-width:640px){
  .bracket-top-controls{
    position:sticky;
    top:calc(var(--sticky-header-h, 0px) + 6px);
    z-index:12;
    gap:5px;
    margin-bottom:6px;
    border-radius:9px;
    background:rgba(8,9,10,.78);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  .bracket-top-controls .bracket-view-toggle{
    position:static;
    top:auto;
    z-index:auto;
    margin:0;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  .bracket-refresh-btn{
    min-width:68px;
    min-height:38px;
    padding:5px 8px;
    font-size:11px;
  }
  .public-context-hud{width:100%;}
}

/* ==== v14.0.26 shared tournament context bar ==== */
.mode-management-context:empty{
  display:none!important;
  margin:0!important;
}
.tournament-context-bar{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:5px 12px;
  background:rgba(217,185,92,.035);
  border-bottom:1px solid rgba(217,185,92,.20);
  box-sizing:border-box;
}
.tournament-context-left{display:flex;align-items:center;min-width:0;}
.tournament-context-center{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:0;
}
.tournament-context-bar .status-pill,
.tournament-context-bar .room-status{
  margin:0!important;
  min-height:28px;
  padding:3px 8px;
  white-space:nowrap;
}
.tournament-context-code{
  min-height:30px;
  max-width:100%;
  flex:0 1 auto;
}
.tournament-context-sync{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:28px;
  padding:3px 7px;
  border-radius:8px;
  color:var(--metal);
  font:600 10.5px var(--font-d);
  white-space:nowrap;
}
.tournament-context-sync.is-error{color:#ff8a8a;}
.tournament-context-mode{
  color:var(--metal-dim);
  font:600 11px var(--font-d);
  white-space:nowrap;
}
.tournament-context-back{
  min-height:36px!important;
  padding:6px 10px!important;
  white-space:nowrap;
}
@media(max-width:640px){
  .tournament-context-bar{
    grid-template-columns:auto minmax(0,1fr);
    gap:6px;
    min-height:42px;
    padding:4px 8px;
  }
  .tournament-context-center{
    justify-content:flex-end;
    gap:5px;
  }
  .tournament-context-mode{display:none;}
  .tournament-context-back{
    min-height:34px!important;
    padding:5px 8px!important;
    font-size:11px!important;
  }
  .tournament-context-bar .status-pill,
  .tournament-context-bar .room-status{
    min-height:26px;
    padding:2px 7px;
    font-size:10px;
  }
  .tournament-context-code{
    min-height:28px;
    padding:3px 7px;
    font-size:10.5px;
    letter-spacing:1px;
  }
  .tournament-context-sync{display:none;}
}
@media(max-width:390px){
  .tournament-context-bar .status-pill,
  .tournament-context-bar .room-status{
    padding-left:6px;
    padding-right:6px;
  }
  .tournament-context-code{
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* ==== v14.0.28 referee resume / independent dispatch / court swap ==== */
.court-swap-selection-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:10px 12px;border:1px solid rgba(61,220,132,.46);border-radius:10px;background:rgba(61,220,132,.055);}
.court-swap-selection-banner>div{display:flex;flex-direction:column;gap:3px;min-width:0;}
.court-swap-selection-banner b{color:var(--ok);font-family:var(--font-d);}
.court-swap-selection-banner span{color:var(--white);font-size:12px;}
.court-swap-selection-banner small{color:var(--metal-dim);font-size:10.5px;line-height:1.45;}
.match-box.court-swap-candidate{outline:2px solid rgba(61,220,132,.82);outline-offset:1px;cursor:pointer;box-shadow:0 0 0 1px rgba(61,220,132,.18),0 0 16px rgba(61,220,132,.10);}
.match-box.court-swap-candidate:hover{background:rgba(61,220,132,.07);}
.match-box.court-swap-source{outline:2px solid rgba(217,185,92,.80);outline-offset:1px;cursor:default;}
.match-box.court-swap-unavailable{opacity:.42;}
.court-swap-badge{display:inline-block;margin-left:6px;padding:1px 5px;border-radius:7px;background:rgba(61,220,132,.14);color:var(--ok);font-size:9px;font-weight:800;letter-spacing:.3px;vertical-align:1px;}
.court-swap-badge.source{background:rgba(217,185,92,.14);color:var(--gold);}
@media(max-width:640px){.court-swap-selection-banner{align-items:flex-start;padding:8px 9px;gap:8px}.court-swap-selection-banner .btn{min-height:34px;padding:5px 8px;font-size:10.5px;white-space:nowrap}.match-box.court-swap-unavailable{opacity:.34}}

/* ==== v14.0.31 compact people roster / attendance light ==== */
.people-subnav{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:7px;
  margin:0 0 12px;
}
.people-subnav .btn{
  min-height:42px;
  padding:7px 8px;
  border-radius:10px;
  font-size:12px;
  white-space:normal;
  line-height:1.25;
}
.people-subnav .btn strong{display:block;font-size:13px;color:inherit;}
.people-section-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.people-section-summary .hint{margin:0;}
.people-wait-rank{
  display:inline-flex;
  min-width:46px;
  justify-content:center;
  padding:3px 7px;
  border:1px solid rgba(217,185,92,.38);
  border-radius:999px;
  color:var(--gold);
  font:700 11px var(--font-d);
}
.people-capacity-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.people-checkin-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:32px;
  padding:5px 10px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:var(--metal-dim);
  font:700 11px var(--font-d);
  white-space:nowrap;
  cursor:pointer;
}
.people-checkin-toggle .people-checkin-dot{
  width:7px;height:7px;border-radius:50%;
  background:#6d727c;
  box-shadow:none;
}
.people-checkin-toggle.is-checked{
  border-color:rgba(191,225,0,.72);
  background:rgba(191,225,0,.08);
  color:#d9ef4a;
  box-shadow:0 0 12px rgba(191,225,0,.08);
}
.people-checkin-toggle.is-checked .people-checkin-dot{
  background:#dfff22;
  box-shadow:0 0 8px rgba(223,255,34,.9);
}
.people-checkin-toggle:disabled{cursor:default;opacity:.52;}
.people-more-menu{position:relative;display:inline-block;}
.people-more-menu>summary{
  list-style:none;
  display:grid;
  place-items:center;
  width:34px;
  height:32px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:9px;
  background:rgba(255,255,255,.025);
  color:var(--metal);
  font-size:20px;
  line-height:1;
  cursor:pointer;
  user-select:none;
}
.people-more-menu>summary::-webkit-details-marker{display:none;}
.people-more-menu[open]>summary{
  border-color:rgba(217,185,92,.5);
  color:var(--gold);
  background:rgba(217,185,92,.07);
}
.people-more-popover{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:80;
  width:154px;
  padding:7px;
  border:1px solid rgba(217,185,92,.28);
  border-radius:11px;
  background:rgba(15,15,17,.98);
  box-shadow:0 12px 28px rgba(0,0,0,.5);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.people-more-meta{
  padding:3px 5px 7px;
  color:var(--metal-dim);
  font-size:10px;
  border-bottom:1px solid rgba(255,255,255,.07);
  margin-bottom:6px;
}
.people-more-popover .btn{
  display:block;
  width:100%;
  min-height:34px;
  margin:4px 0 0;
  padding:6px 8px;
  text-align:left;
  font-size:11.5px;
}
.people-primary-inline{
  min-height:32px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  font-size:11px!important;
  white-space:nowrap;
}

@media(max-width:760px){
  .people-subnav{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
  .people-section-summary{margin-bottom:4px;}
  .people-section-summary .hint{display:none;}
  .people-roster-scroll{overflow:visible!important;}
  .people-roster-table,
  .people-roster-table tbody{display:block;width:100%;}
  .people-roster-table thead{display:none;}
  .people-roster-table tr{
    display:grid;
    grid-template-columns:30px minmax(0,1fr) auto 34px;
    grid-template-areas:"idx name status actions";
    align-items:center;
    gap:6px;
    min-height:48px;
    padding:7px 0;
    border-bottom:1px solid rgba(255,255,255,.075);
  }
  .people-roster-table tr:last-child{border-bottom:0;}
  .people-roster-table td{
    display:block;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    text-align:left!important;
  }
  .people-col-index{
    grid-area:idx;
    color:var(--metal-dim);
    font:700 11.5px var(--font-d);
  }
  .people-col-name{
    grid-area:name;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:14px;
  }
  .people-col-source{display:none!important;}
  .people-col-checkin{
    grid-area:status;
    justify-self:end;
  }
  .people-col-actions{
    grid-area:actions;
    justify-self:end;
    width:34px!important;
  }
  .people-checkin-toggle{
    min-height:30px;
    padding:4px 8px;
    font-size:10.5px;
  }
  .people-more-menu>summary{width:32px;height:30px;}
  .people-more-popover{width:148px;}
  .people-wait-rank{min-width:0;padding:3px 5px;font-size:10px;}
}
@media(max-width:390px){
  .people-roster-table tr{
    grid-template-columns:27px minmax(0,1fr) auto 31px;
    gap:5px;
    min-height:46px;
    padding:6px 0;
  }
  .people-col-name{font-size:13px;}
  .people-checkin-toggle{padding:4px 6px;font-size:10px;gap:4px;}
  .people-more-menu>summary{width:30px;height:29px;font-size:18px;}
}
