/* Fullscreen court cards must grow with names, progress and next-match details. */
.public-court-center.is-screen-mode {
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}
.public-court-center.is-screen-mode .public-court-grid {
  height: auto;
  grid-template-rows: none;
  grid-auto-rows: minmax(min-content, auto);
  align-items: stretch;
  align-content: start;
}
.public-court-center.is-screen-mode .public-court-grid > article,
.public-court-center.is-screen-mode .court-tile {
  min-width: 0;
  min-height: min-content;
  height: auto;
  overflow: visible;
}
.public-court-center.is-screen-mode .court-tile > header {
  min-width: 0;
  line-height: 1.3;
}
.public-court-center.is-screen-mode .court-tile > header > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.public-court-center.is-screen-mode .court-tile > p {
  align-items: center;
}
.public-court-center.is-screen-mode .court-tile p > span,
.public-court-center.is-screen-mode .court-tile > small,
.public-court-center.is-screen-mode .court-next-up > em {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.public-court-center.is-screen-mode .court-next-up > em {
  font-size: 11px;
  line-height: 1.35;
}
.public-court-center.is-screen-mode .court-next-up > small {
  font-size: 11px;
  line-height: 1.35;
}
.public-court-center.is-screen-mode .court-next-up > p {
  font-size: 12px;
  line-height: 1.35;
}
@media (max-width: 900px) {
  .public-court-center.is-screen-mode .public-court-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .public-court-center.is-screen-mode .public-court-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .public-court-center.is-screen-mode .live-screen-button {
    white-space: normal;
  }
}
/* Override the inline three-column heading when a tablet has narrow cards. */
@media (max-width: 1200px) {
  .public-court-center.is-screen-mode .public-court-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .public-court-center.is-screen-mode .court-tile > header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 4px 8px !important;
    font-size: 14px;
  }
  .public-court-center.is-screen-mode .court-tile > header > b:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .public-court-center.is-screen-mode .court-tile > header > span {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    white-space: nowrap;
    font-size: 13px;
  }
  .public-court-center.is-screen-mode .court-tile > header > b:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal !important;
    text-align: center;
  }
  .public-court-center.is-screen-mode .live-screen-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .public-court-center.is-screen-mode .live-screen-actions {
    min-width: 0;
    max-width: 100%;
  }
  .public-court-center.is-screen-mode .live-screen-button {
    max-width: 100%;
    white-space: normal;
  }
}
@media (max-width: 600px) {
  .public-court-center.is-screen-mode .public-court-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tablet requirement: retain three courts per row in both orientations. */
.public-court-center.is-screen-mode .public-court-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .public-court-center.is-screen-mode { padding: 8px; }
  .public-court-center.is-screen-mode .public-court-grid { gap: 6px; }
  .public-court-center.is-screen-mode .public-court-grid > article {
    padding: 8px 6px;
  }
  .public-court-center.is-screen-mode .court-tile > header { font-size: 12px; }
  .public-court-center.is-screen-mode .court-tile > header > span { font-size: 11px; }
  .public-court-center.is-screen-mode .court-tile > p { gap: 4px; font-size: 12px; }
  .public-court-center.is-screen-mode .court-tile > p > strong { font-size: 20px; }
  .public-court-center.is-screen-mode .court-next-up > p { font-size: 11px; gap: 4px !important; }
  .public-court-center.is-screen-mode .court-next-up > em,
  .public-court-center.is-screen-mode .court-next-up > small { font-size: 10px; }
}

/* Measure the full stage, then scale uniformly into the viewport. */
.public-court-center.is-screen-mode.is-auto-fit {
  overflow: hidden;
}
.public-court-center.is-screen-mode .live-screen-stage {
  display: flow-root;
  transform-origin: top left;
}
.public-court-center.is-screen-mode .live-screen-stage .live-screen-heading {
  position: static;
  margin: 0 0 8px;
  padding: 4px 0;
}

/* Compact completed/total counter and the existing league logo. */
.public-court-center .live-tournament-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 8px 16px;
  border: 1px solid #d8e2ef;
  border-radius: 14px;
  background: #fff;
  color: #061632;
}
.public-court-center .live-total-count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.public-court-center .live-total-count strong { font-size: 28px; line-height: 1.1; }
.public-court-center .live-total-count span { font-size: 13px; }
.public-court-center .live-logo-top { grid-column: 2; width: 80px; height: 80px; object-fit: contain; }
.public-court-center .live-logo-bottom { display: none; }
@media (pointer: coarse), (max-width: 900px) {
  .public-court-center .live-logo-top { display: none; }
  .public-court-center .live-tournament-progress { grid-template-columns: minmax(0, 1fr); padding: 10px 14px; }
  .public-court-center .live-logo-bottom { display: flex; justify-content: center; padding: 10px 0 0; }
  .public-court-center .live-logo-bottom img { display: block; width: 96px; height: 96px; object-fit: contain; }
}

.public-court-center .live-logo-top.live-logo-strip {
  display: flex; width: auto; height: auto; justify-content: center; align-items: center; gap: 10px;
}
.public-court-center .live-logo-strip .live-logo-cell {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  padding: 6px; border-radius: 10px; background: #061632;
}
.public-court-center .live-logo-strip .live-logo-city { background: #fff; border: 1px solid #d8e2ef; }
.public-court-center .live-logo-strip .live-logo-cell img {
  display: block; width: 72px; height: 72px; object-fit: contain;
}
.public-court-center .live-logo-strip .live-logo-city img { width: 126px; }
@media (pointer: coarse), (max-width: 900px) {
  .public-court-center .live-logo-top.live-logo-strip { display: none; }
  .public-court-center .live-logo-bottom.live-logo-strip { gap: 10px; align-items: center; }
}

/* Use transparent PNG assets directly, without decorative tiles or frames. */
.public-court-center .live-logo-strip,
.public-court-center .live-logo-strip .live-logo-cell,
.public-court-center .live-logo-strip .live-logo-cell img {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.public-court-center .live-logo-strip .live-logo-cell { padding: 6px; }
.public-court-center .live-logo-strip .live-logo-pspz img {
  filter: none;
}
.public-court-center .live-tournament-progress {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
