:root {
  --surface-border: #d7dde5;
  --surface-shadow: 0 2px 6px rgba(20,38,62,.045), 0 10px 24px rgba(20,38,62,.025);
}
[hidden] { display: none !important; }
a:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #9d4840;
  outline-offset: 3px;
}
html { scrollbar-gutter: stable; }
input, select, textarea { max-width: 100%; }
.league-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  color: var(--forest);
}
.league-brand strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 2vw, 1.26rem);
  line-height: 1.2;
}
.league-brand [data-brand-logo], .league-brand [data-brand-initials] {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: #fff;
}
.league-brand [data-brand-initials] {
  color: var(--green);
  background: #f4e8d2;
  font-weight: 800;
  letter-spacing: .02em;
  font-size: .89rem;
}
.shell aside { background: linear-gradient(168deg,#213b57 0%,#14263e 48%,#0e1b2c 100%); }
.shell aside .brand { display: grid; justify-content: start; }
.shell aside .brand img { width: 150px; height: auto; object-fit: contain; }
.shell aside nav button { min-height: 44px; border-radius: 9px; }
.shell aside nav button[data-view=director] { font-weight: 750; }
.shell main { min-width: 0; }
.shell .top { height: auto; min-height: 72px; gap: 12px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--surface-border); }
.shell .top label { min-width: 0; margin: 0; }
.shell .top select { display: block; min-height: 42px; margin-top: 4px; }
.shell .top .actions { align-self: end; flex: 0 0 auto; }
.shell .top button { min-height: 42px; }
.workspace-context { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 8px; }
.workspace-context:has(.league-brand[hidden]) { justify-content: flex-end; min-height: 28px; }
.workspace-context p { flex: 0 0 auto; margin: 0; }
#sync-panel:not([hidden]) { border-color: var(--surface-border); box-shadow: var(--surface-shadow); padding: 10px 14px; }
#sync-panel button { min-height: 32px; }
.shell .subpage, .shared-page .subpage, .video-workspace .subpage { margin-block: 18px 14px; }
.admin-card, .station, .panel, .metric { border-color: var(--surface-border); box-shadow: var(--surface-shadow); }
.admin-card { border-radius: 15px; padding: clamp(15px, 2.5vw, 23px); margin: 16px 0; }
.criterion h3 { line-height: 1.3; }
.criterion .rating { min-height: 44px; font-variant-numeric: tabular-nums; }
.branding-preview { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--surface-border); background: #faf7f2; }
.branding-preview small { margin-left: 7px; color: var(--muted); }
#branding-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
#branding-form p, #branding-form .actions { grid-column: 1 / -1; }
#branding-form input[type=file] { padding: 7px; }
#branding-form input[type=file]::file-selector-button { padding: 6px 8px; font: inherit; color: var(--forest); background: #eef1f5; border: 1px solid var(--surface-border); border-radius: 6px; }
#room { padding: 0 22px 36px; }
.draftbar { flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--surface-border); margin-bottom: 15px; }
#room > .league-brand, .shared-page .league-brand, .video-workspace .league-brand { margin-block: 12px; }
#room h1 { margin: 6px 0; }
#draft-context { color: var(--muted); }
#room .turn, #room .columns > section { margin-top: 14px; }
#room .columns > section { background: white; border: 1px solid var(--surface-border); border-radius: 15px; padding: 16px; box-shadow: var(--surface-shadow); }
#room .pickrow > details { padding: 4px 0; }
#room .columns h2 { margin-bottom: 8px; }
#room .team:last-child, #room .pickrow:last-child { border-bottom: 0; }
.shared-page { padding: 0 0 28px; }
.shared-page .admin-card ul { padding-left: 22px; }
.shared-page .admin-card li+li { margin-top: 12px; }
.video-workspace .subpage h1, .shared-page .subpage h1 { margin: 8px 0; }

@media(max-width:760px) {
  html { scrollbar-gutter: auto; }
  .shell aside { padding: 8px 14px; }
  .shell aside .brand img { width: 78px; height: auto; }
  .shell aside nav { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .shell aside nav button { min-height: 39px; padding: 4px; line-height: 1.12; }
  .shell aside nav button span { display: none; }
  .shell main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .shell .top { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 10px; align-items: end; }
  .shell .top label select { width: 100%; min-width: 0; }
  .shell .top .actions { grid-column: 1 / -1; justify-content: flex-end; }
  .shell .top button { min-height: 38px; }
  .workspace-context { flex-wrap: wrap; gap: 3px 10px; }
  .workspace-context p { margin-left: auto; }
  #room { padding-inline: 14px; }
}
@media(max-width:460px) {
  #branding-form { grid-template-columns: 1fr; }
  .branding-preview { flex-wrap: wrap; }
  .branding-preview small { margin: 0; }
  .league-brand [data-brand-logo], .league-brand [data-brand-initials] { flex-basis: 40px; width: 40px; height: 40px; }
}
body[data-offline=true] .shell .top { display: none; }
body[data-role=locked] .shell .top { display: none; }

.readiness-session {display:block;max-width:24rem;margin-top:1rem}
.readiness-staff {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.75rem;padding:.75rem 0}
.readiness-issues {padding-inline-start:1.3rem}
.readiness-issues li+li {margin-top:.45rem}
