/* ---------- App header additions ---------- */

.pitch-site--app .stage__header > .stage-brand {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pitch-site--app .stage__header > .stage-actions {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 8px;
  justify-content: flex-end;
}

.stage-org-switcher {
  position: relative;
  width: fit-content;
}

.stage-org-switcher > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.stage-org-switcher > summary::-webkit-details-marker {
  display: none;
}

.stage-org-switcher__label {
  align-items: center;
  color: var(--ps-cream-soft);
  display: flex;
  font-family: var(--font-mono);
  font-size: 11px;
  gap: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-org-switcher__crest {
  filter: drop-shadow(0 1px 3px rgba(6, 20, 11, 0.6));
  flex: none;
}

.stage-org-switcher__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-org-switcher > summary.stage-org-switcher__label::after {
  color: var(--ps-yellow);
  content: " ▾";
}

.stage-org-switcher[open] > summary.stage-org-switcher__label::after {
  content: " ▴";
}

.stage-org-switcher > summary:hover {
  color: var(--ps-cream);
}

.stage-org-switcher .stage-menu-card {
  left: 0;
  right: auto;
}

/* ---------- Chips ---------- */

.stage-chip {
  align-items: center;
  backdrop-filter: blur(10px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 100px;
  box-shadow: var(--ps-chrome-shadow);
  color: var(--ps-cream);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 9px 14px;
  text-decoration: none;
  white-space: nowrap;
}

a.stage-chip:hover {
  color: var(--ps-yellow);
}

details.stage-chip {
  padding: 0;
  position: relative;
}

details.stage-chip > summary {
  cursor: pointer;
  list-style: none;
  padding: 9px 14px;
  user-select: none;
}

details.stage-chip > summary::-webkit-details-marker {
  display: none;
}

details.stage-chip > summary::after {
  color: var(--ps-yellow);
  content: " ▾";
}

details.stage-chip[open] > summary::after {
  content: " ▴";
}

.stage-chip--live {
  color: var(--ps-live);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.stage-chip__dot {
  animation: stage-chip-pulse 1.6s ease-in-out infinite;
  background: var(--ps-live);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.stage-chip--warning {
  color: var(--ps-yellow);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

@keyframes stage-chip-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ---------- Paper menu card (chips, switcher, user menu) ---------- */

.stage-menu-card {
  background: var(--ps-paper-raised);
  border: 2px solid var(--ps-ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 rgba(6, 20, 11, 0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(70vh, 480px);
  min-width: 14rem;
  overflow-y: auto;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 6;
}

.stage-menu-card form {
  margin: 0;
}

.stage-menu-card__item {
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--ps-ink);
  cursor: pointer;
  display: block;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  width: 100%;
}

.stage-menu-card__item:hover {
  background: var(--ps-paper-shade);
  color: var(--ps-ink);
}

.stage-menu-card__item.is-active {
  background: var(--ps-yellow);
}

.stage-menu-card__item--muted {
  color: var(--ps-ink-soft);
}

.stage-menu-card__item--signout,
.stage-menu-card__item--danger {
  color: var(--ps-red-deep);
}

.stage-menu-card__hint {
  color: var(--ps-ink-soft);
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stage-menu-card__heading {
  color: var(--ps-red-deep);
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 10px 2px;
  text-transform: uppercase;
}

.stage-menu-card__group {
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding-top: 4px;
}

.stage-menu-card__group--compact {
  display: none;
}

/* ---------- Row actions: a three-dot menu of what a page can do ---------- */

.stage-actions {
  position: relative;
}

.stage-actions__trigger {
  align-items: center;
  border: 2px solid var(--color-ink);
  border-radius: 8px;
  color: var(--color-ink);
  cursor: pointer;
  display: flex;
  height: 2.25rem;
  justify-content: center;
  list-style: none;
  user-select: none;
  width: 2.25rem;
}

.stage-actions__trigger::-webkit-details-marker {
  display: none;
}

.stage-actions__trigger:hover,
.stage-actions[open] .stage-actions__trigger {
  background: var(--color-shade);
}

.stage-actions__trigger svg {
  height: 1.125rem;
  width: 1.125rem;
}

.stage-actions__card {
  background: var(--color-surface);
  border: 2px solid var(--color-ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 rgba(6, 20, 11, 0.25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 12rem;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
}

.stage-actions__card form {
  margin: 0;
}

.stage-actions__card .folder-picker {
  position: static;
}

.stage-actions__card .folder-picker__dropdown {
  background: none;
  border: none;
  box-shadow: none;
  margin: 0;
  min-width: 0;
  padding: 0 0 4px;
  position: static;
}

.stage-actions__card .folder-picker__title {
  display: none;
}

/* ---------- User menu ---------- */

.stage-user {
  position: relative;
}

.stage-user__summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  user-select: none;
}

.stage-user__summary::-webkit-details-marker {
  display: none;
}

.stage-user__avatar {
  align-items: center;
  background: var(--ps-yellow);
  border: 2px solid var(--ps-ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 rgba(6, 20, 11, 0.7);
  color: var(--ps-ink);
  display: flex;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  letter-spacing: 0.02em;
  width: 36px;
}

.stage-user__avatar--large {
  font-size: 1rem;
  height: 3rem;
  width: 3rem;
}

.stage-user__summary:hover .stage-user__avatar {
  background: var(--ps-cream);
}

.stage-user__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stage-user__name {
  color: var(--ps-cream);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.stage-user__role {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Landing: greeting, recent activity and module glyphs ---------- */

.stage-landing {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 12px 0 24px;
  width: 100%;
}

.stage-greeting {
  color: var(--ps-yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0;
  text-align: center;
  text-shadow: 0 1px 10px rgba(6, 20, 11, 0.7);
  text-transform: uppercase;
}

/* The search bar under the greeting. On the landing the live results drop
   down over the stage while the field has focus or the pointer is over them. */
.stage-search {
  margin-inline: auto;
  max-width: 40rem;
  position: relative;
  width: 100%;
}

.stage-search__input {
  backdrop-filter: blur(6px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  box-shadow: var(--ps-chrome-shadow);
  color: var(--ps-cream);
  font: inherit;
  font-size: 15px;
  padding: 10px 20px;
  width: 100%;
}

.stage-search__input::placeholder {
  color: var(--ps-cream-soft);
}

.stage-search__input:focus {
  border-color: var(--ps-yellow);
  outline: none;
}

.stage-search__results {
  display: none;
  inset-inline: 0;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 5;
}

.stage-search--landing:is(:focus-within, :hover) .stage-search__results:not(:empty) {
  backdrop-filter: blur(10px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 12px;
  box-shadow: var(--ps-chrome-shadow);
  color: var(--ps-cream);
  display: block;
  max-height: 60vh;
  overflow-y: auto;
  padding: 12px 16px;
}

.stage-search__groups {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.stage-search__meta {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  margin-inline-start: 6px;
}

.stage-search__empty {
  color: var(--ps-cream-soft);
  font-size: 13.5px;
  margin: 0;
}

.stage-search__all {
  color: var(--ps-yellow);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-block-start: 12px;
  text-transform: uppercase;
}

.stage-recent {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-recent__title {
  color: var(--ps-cream);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 1px 8px rgba(6, 20, 11, 0.8);
}

.stage-recent__groups {
  align-content: start;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.stage-recent__group {
  backdrop-filter: blur(6px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 12px;
  box-shadow: var(--ps-chrome-shadow);
  color: var(--ps-cream);
  min-width: 0;
  padding: 12px 16px;
}

.stage-recent__heading {
  color: var(--ps-yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.stage-recent__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stage-recent__link {
  color: var(--ps-cream);
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-recent__link:hover {
  color: var(--ps-yellow);
}

.stage-recent__empty {
  backdrop-filter: blur(6px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 12px;
  box-shadow: var(--ps-chrome-shadow);
  color: var(--ps-cream-soft);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

.stage-modules {
  display: grid;
  gap: 28px 12px;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.stage-module {
  align-items: center;
  animation: stage-module-bob 6s ease-in-out infinite;
  display: flex;
  justify-content: center;
  margin: 0;
}

.stage-module__link {
  align-items: center;
  color: var(--ps-cream);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(6, 20, 11, 0.7);
}

.stage-module__art {
  aspect-ratio: 1;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(6, 20, 11, 0.55));
  transition: filter 160ms, transform 160ms;
  width: clamp(64px, 6vw, 92px);
}

.stage-module__art svg {
  display: block;
  height: 100%;
  width: 100%;
}

.stage-module__label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 160ms;
}

.stage-module__status {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  min-height: 1.2em;
  text-transform: uppercase;
}

.stage-module--hero .stage-module__art {
  color: var(--ps-yellow);
}

.stage-module__link:hover .stage-module__art {
  filter: brightness(1.25) drop-shadow(0 2px 10px rgba(6, 20, 11, 0.6));
  transform: translateY(-2px);
}

.stage-module__link:hover .stage-module__label {
  color: var(--ps-yellow);
}

.stage-module__link:focus-visible {
  border-radius: 14px;
  outline: 3px solid var(--ps-yellow);
  outline-offset: 4px;
}

.stage-module--slot-1 { animation-delay: 0s; }
.stage-module--slot-2 { animation-delay: -0.9s; }
.stage-module--slot-3 { animation-delay: -1.8s; }
.stage-module--slot-4 { animation-delay: -2.7s; }
.stage-module--slot-5 { animation-delay: -3.6s; }
.stage-module--slot-6 { animation-delay: -4.5s; }
.stage-module--slot-7 { animation-delay: -5.4s; }
.stage-module--slot-8 { animation-delay: -6.3s; }

@keyframes stage-module-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@media (min-width: 75rem) {
  .stage-landing {
    align-items: center;
    column-gap: clamp(24px, 4vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    inset: 0;
    padding: 4px clamp(16px, 3vw, 48px) 16px;
    position: absolute;
    row-gap: 8px;
  }

  .stage-landing .stage-greeting,
  .stage-landing .stage-search {
    grid-column: 1 / 3;
  }

  .stage-landing .stage-recent {
    align-self: center;
  }

  .stage-landing .stage-recent__groups {
    gap: clamp(10px, 1.6vh, 18px) 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-landing .stage-modules {
    align-content: center;
    gap: clamp(16px, 3vh, 40px) 4px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    height: 100%;
  }

  .stage-module--slot-1 { grid-area: 1 / 1 / 2 / 3; }
  .stage-module--slot-2 { grid-area: 1 / 3 / 2 / 5; }
  .stage-module--slot-3 { grid-area: 1 / 5 / 2 / 7; }
  .stage-module--slot-4 { grid-area: 1 / 7 / 2 / 9; }
  .stage-module--slot-5 { grid-area: 2 / 2 / 3 / 4; }
  .stage-module--slot-6 { grid-area: 2 / 4 / 3 / 6; }
  .stage-module--slot-7 { grid-area: 2 / 6 / 3 / 8; }

  .stage-modules:has(.stage-module--slot-8) {
    .stage-module--slot-5 { grid-area: 2 / 1 / 3 / 3; }
    .stage-module--slot-6 { grid-area: 2 / 3 / 3 / 5; }
    .stage-module--slot-7 { grid-area: 2 / 5 / 3 / 7; }
    .stage-module--slot-8 { grid-area: 2 / 7 / 3 / 9; }
  }
}

@media (max-width: 49.999rem) {
  .stage-modules {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Hockey: coming soon ---------- */

.stage-coming-soon {
  align-items: center;
  color: var(--ps-cream);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  text-shadow: 0 1px 10px rgba(6, 20, 11, 0.7);
}

.stage-coming-soon__kicker {
  color: var(--ps-yellow);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.stage-coming-soon__line {
  color: var(--ps-cream);
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}

/* ---------- View frame: switching view swaps the stage in place ---------- */

.pitch-site--app #stage_view {
  display: contents;
}

.pitch-site--app #stage_view[busy] .stage__overlay,
.pitch-site--app #stage_view[busy] .stage-statpanel,
.pitch-site--app #stage_view[busy] .stage-bench,
.pitch-site--app #stage_view[busy] .pitch-window {
  opacity: 0.5;
  transition: opacity 0.15s ease 0.15s;
}

/* ---------- Window variants ---------- */

.pitch-site--app .pitch-window__title {
  color: var(--ps-ink);
  flex: 0 1 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-site--app .pitch-window--stretch {
  flex: 1 1 auto;
}

/* A subject page keeps its header in one place while its views swap windows
   of different heights underneath. */
.pitch-site--app .stage__main:has(.stage-sidenav) {
  justify-content: flex-start;
}

/* On the full stage a page with view links gets a left column: the subject's
   header, its actions and the links stacked in the top-left corner, with the
   window beside it from the top of the stage down. */
@media (min-width: 75rem) {
  .pitch-site--app .stage:has(.stage-sidenav) {
    --stage-column-inset: clamp(18px, 3.4vw, 48px);
    --stage-column-width: 15rem;
    --stage-column-room: calc(var(--stage-column-inset) + var(--stage-column-width) + 24px);
  }

  .pitch-site--app .stage__main:has(.stage-sidenav) {
    padding-left: var(--stage-column-room);
  }

  /* Without a window the turf is the content, so it is drawn beside the
     column rather than under it, its edges bleeding out to the screen's. */
  .pitch-site--app .stage:has(.stage-sidenav):not(:has(.pitch-window)) .stage__pitch-svg {
    left: var(--stage-column-room);
    overflow: visible;
    width: calc(100% - var(--stage-column-room));
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) {
    align-items: stretch;
    gap: 14px;
    left: var(--stage-column-inset);
    padding-top: 0;
    position: absolute;
    top: 14px;
    width: var(--stage-column-width);
    z-index: 3;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-sidenav {
    gap: 9px;
    padding: 14px 18px;
    position: static;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-sidenav__links {
    gap: 10px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-sidenav__link {
    font-size: 13px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-sidenav .stage-competitions {
    max-width: none;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard {
    padding-inline: 4px;
    text-align: start;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__title {
    font-size: clamp(22px, 1.8vw, 28px);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-subject-actions {
    justify-content: flex-start;
    margin-top: -6px;
    padding-inline: 4px;
  }

  /* A match's scoreboard is a card in the column, one row per side: the
     crest when the team has a logo, the name over its playing style, and the
     side's goals at the end of the row. */
  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard:has(.stage-scoreboard__line) {
    align-items: center;
    backdrop-filter: blur(6px);
    background: var(--ps-chrome);
    border: 2px solid var(--ps-ink);
    border-radius: 10px;
    box-shadow: var(--ps-chrome-shadow);
    display: grid;
    gap: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 16px 14px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) :is(.stage-scoreboard__line, .stage-scoreboard__styles, .stage-scoreboard__team) {
    display: contents;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__meta {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 0 4px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__team > :not(.stage-scoreboard__team-link, .stage-scoreboard__goals) {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin-inline-end: 10px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__team-link {
    font-size: 17px;
    grid-column: 2;
    grid-row: 2;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__style {
    font-size: 10px;
    grid-column: 2;
    grid-row: 3;
    margin-top: 2px;
    text-align: start;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__goals {
    display: block;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    grid-column: 3;
    grid-row: 2 / span 2;
    line-height: 1;
    margin-inline-start: 12px;
    text-align: end;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__team--away > :not(.stage-scoreboard__team-link, .stage-scoreboard__goals),
  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__team--away .stage-scoreboard__goals {
    grid-row: 4 / span 2;
    margin-top: 12px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__team--away .stage-scoreboard__team-link {
    grid-row: 4;
    margin-top: 12px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__style--away {
    grid-row: 5;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__score {
    font-size: 20px;
    grid-column: 1 / -1;
    grid-row: 6;
    line-height: 1;
    margin-top: 12px;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard--scored .stage-scoreboard__score {
    display: none;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__line ~ .stage-scoreboard__meta {
    grid-row: 7;
    margin: 10px 0 0;
  }

  .pitch-site--app .stage__overlay:has(.stage-sidenav) .stage-scoreboard__style:empty {
    display: none;
  }

  .pitch-site--app .stage__main:has(.stage-sidenav) .stage-statpanel--left {
    left: var(--stage-column-room);
  }

  .pitch-site--app .stage__main:has(.stage-sidenav) .competition-matchday {
    max-width: min(84rem, 100%);
  }
}

.pitch-site--app .pitch-window--stretch .pitch-window__body {
  display: flex;
  flex-direction: column;
}

.pitch-site--app .pitch-window--stretch .pitch-window__body > * {
  flex: 1 1 auto;
}

.pitch-site--app .pitch-window--full {
  align-self: stretch;
  flex: 1 1 auto;
  max-width: none;
  min-height: 60dvh;
}

.pitch-site--app .pitch-window--full .pitch-window__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0;
}

.pitch-site--app .pitch-window__body > .auth-flash {
  margin-inline: clamp(16px, 3vw, 32px);
}

.pitch-site--app .pitch-window:not(.pitch-window--full) .pitch-window__body > :not(.container, .container-large, .container-small, .auth-flash, .stage-auth-card) {
  padding-inline: clamp(16px, 3vw, 32px);
}

/* ---------- Auth tabs (sign in / create account) ---------- */

.stage-auth-tabs {
  background: var(--ps-paper-shade);
  border: 2px solid var(--ps-ink);
  border-radius: 99rem;
  display: flex;
  gap: 4px;
  margin-inline: auto;
  padding: 4px;
  width: fit-content;
}

.stage-auth-tabs__link {
  border-radius: 99rem;
  color: var(--ps-ink);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 18px;
  text-decoration: none;
}

.stage-auth-tabs__link.is-active {
  background: var(--ps-red);
  color: var(--ps-cream);
}

.stage-auth-card__title {
  font-size: 1.75rem;
  letter-spacing: -0.025em;
  margin: 0;
  text-align: center;
}

/* ---------- Locked CTA on paper ---------- */

.pitch-site--app .locked-section__card {
  background: var(--ps-paper-raised);
  border: 2px solid var(--ps-ink);
  border-radius: 10px;
  box-shadow: var(--ps-hard-shadow);
}

.pitch-site--app .locked-section__title {
  color: var(--ps-ink);
}

/* ---------- Responsive header ---------- */

@media (min-width: 50rem) and (max-width: 74.999rem) {
  .stage-chip {
    font-size: 12px;
  }

  .stage-user__name {
    display: none;
  }
}

@media (max-width: 49.999rem) {
  .stage-org-switcher,
  .stage-org-switcher__label,
  .stage-actions > .stage-chip--live,
  .stage-user__text {
    display: none;
  }

  .stage-menu-card__group--compact {
    display: flex;
  }

  .stage-menu-card {
    max-width: calc(100vw - 32px);
  }

  .pitch-site--app .stage__header > .stage-brand {
    flex: none;
  }

  .pitch-site--app .stage__sport-pill {
    padding: 7px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-module,
  .stage-chip__dot {
    animation: none;
  }
}

.pitch-site--app .folder-item {
  position: relative;
}

.pitch-site--app .folder-item__remove-form {
  inset-block-start: 8px;
  inset-inline-end: 8px;
  position: absolute;
}

.pitch-site--app .folder-item__remove {
  align-items: center;
  background: var(--ps-paper);
  border: 2px solid var(--ps-ink);
  border-radius: 6px;
  color: var(--ps-ink);
  cursor: pointer;
  display: flex;
  height: 26px;
  justify-content: center;
  opacity: 0.7;
  padding: 0;
  width: 26px;
}

.pitch-site--app .folder-item__remove svg {
  height: 12px;
  width: 12px;
}

.pitch-site--app .folder-item:hover .folder-item__remove,
.pitch-site--app .folder-item__remove:focus-visible {
  opacity: 1;
}

.pitch-site--app .folder-item__remove:hover {
  background: var(--ps-red);
  color: var(--ps-cream);
}
