/* Gameweek Explained Gameweek Scene — GS4-C bench-first mobile composition refinement. */
:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #030812;
  color: #f8fbff;
  font-family: "GWE Inter", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.review-shell {
  width: min(100% - 1.25rem, 48rem);
  margin-inline: auto;
  padding: 1rem 0 2rem;
}

.review-header {
  margin-bottom: 0.85rem;
}

.review-eyebrow {
  margin: 0 0 0.35rem;
  color: #9fe9ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.2rem, 5vw, 2rem);
  line-height: 1.05;
}

.review-copy,
.review-status {
  margin: 0.55rem 0 0;
  color: rgba(248, 251, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.45;
}

.review-status {
  color: #dff8ff;
}

.review-frame {
  display: grid;
  place-items: start center;
  width: 100%;
}

.review-note {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid rgba(159, 233, 255, 0.18);
  border-radius: 0.65rem;
  background: rgba(8, 20, 34, 0.72);
  color: rgba(248, 251, 255, 0.7);
  font-size: 0.75rem;
  line-height: 1.45;
}

.review-note strong,
.review-note code {
  color: #dff8ff;
}

.gameweek-scene {
  width: min(100%, 34rem);
  min-width: 0;
  background: #07101d;
  container-type: inline-size;
}

.gameweek-scene__history {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: 0.34rem 0.45rem 0.4rem;
  border-bottom: 1px solid rgba(159, 233, 255, 0.2);
  background: rgba(7, 16, 29, 0.97);
  backdrop-filter: blur(8px);
}

.gameweek-scene__history-head,
.season-archive__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.season-archive__head > div {
  display: grid;
  gap: 0.12rem;
}

.gameweek-scene__history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  min-width: 0;
}

.gameweek-scene__history-season {
  color: rgba(248, 251, 255, 0.58);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gameweek-scene__history-head strong,
.season-archive__head strong {
  color: #f8fbff;
  font-size: 0.72rem;
  line-height: 1.05;
  white-space: nowrap;
}

.gameweek-scene__archive-toggle,
.archive-close,
.gameweek-scene__mode-toggle {
  min-height: 1.72rem;
  border: 1px solid rgba(159, 233, 255, 0.28);
  border-radius: 999px;
  padding: 0.24rem 0.5rem;
  color: #dff8ff;
  background: rgba(159, 233, 255, 0.07);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 820;
  line-height: 1.05;
  white-space: nowrap;
  cursor: pointer;
}

.gameweek-scene__mode-toggle[aria-pressed="true"] {
  border-color: rgba(159, 233, 255, 0.72);
  background: rgba(159, 233, 255, 0.17);
}

.navigator {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr) 1.9rem;
  gap: 0.34rem;
  align-items: center;
  margin-top: 0.3rem;
}

.gw-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.34rem;
}

.nav-btn,
.gw-btn {
  min-height: 2.05rem;
  border: 1px solid rgba(248, 251, 255, 0.16);
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(248, 251, 255, 0.055);
  font: inherit;
  font-weight: 850;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-btn--rail {
  width: 100%;
  min-width: 0;
}

.nav-btn:disabled,
.gw-btn:disabled,
.archive-week:disabled {
  opacity: 0.34;
  cursor: default;
}

.endpoint-chevron {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.endpoint-chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gw-btn {
  padding: 0.22rem 0.2rem 0.2rem;
  cursor: pointer;
}

.gw-btn__label,
.gw-btn__status {
  display: block;
}

.gw-btn__label {
  font-size: 0.72rem;
}

.gw-btn__status {
  margin-top: 0.04rem;
  color: rgba(248, 251, 255, 0.54);
  font-size: 0.46rem;
  font-weight: 760;
  line-height: 1;
  text-transform: uppercase;
}

.gw-btn[aria-current="true"] {
  border-color: #9fe9ff;
  color: #07101d;
  background: #9fe9ff;
  box-shadow: 0 0 0 2px rgba(159, 233, 255, 0.15);
}

.gw-btn[aria-current="true"] .gw-btn__status {
  color: rgba(7, 16, 29, 0.68);
}

.season-archive {
  margin-top: 0.55rem;
  border: 1px solid rgba(159, 233, 255, 0.18);
  border-radius: 0.7rem;
  padding: 0.6rem;
  background: rgba(3, 8, 18, 0.84);
}

.season-archive[hidden] {
  display: none;
}

.season-archive__description {
  margin: 0.5rem 0;
  color: rgba(248, 251, 255, 0.6);
  font-size: 0.64rem;
  line-height: 1.35;
}

.season-archive__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.3rem;
}

.archive-week {
  min-height: 2rem;
  border: 1px solid rgba(248, 251, 255, 0.13);
  border-radius: 0.42rem;
  color: rgba(248, 251, 255, 0.72);
  background: rgba(248, 251, 255, 0.045);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 820;
}

.archive-week[data-available="true"] {
  border-color: rgba(159, 233, 255, 0.34);
  cursor: pointer;
}

.archive-week[aria-current="true"] {
  color: #07101d;
  background: #9fe9ff;
}

.gameweek-scene__live {
  position: absolute;
  left: -9999px;
}

.gameweek-scene__archive-toggle:focus-visible,
.archive-close:focus-visible,
.nav-btn:focus-visible,
.gw-btn:focus-visible,
.archive-week:focus-visible {
  outline: 2px solid #dff8ff;
  outline-offset: 2px;
}

.gameweek-scene__mode-toggle:focus-visible,
.gameweek-scene .squad-pitch__metric[data-player-info-control]:focus-visible {
  outline: 2px solid #dff8ff;
  outline-offset: 2px;
}

.gameweek-scene__pitch-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.gameweek-scene__pitch-navigation {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.nav-btn--pitch {
  position: absolute;
  bottom: 5.25%;
  width: clamp(1.8rem, 9cqw, 2.35rem);
  min-height: 0;
  aspect-ratio: 1;
  border-color: rgba(159, 233, 255, 0.34);
  background: rgba(7, 16, 29, 0.78);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.nav-btn--previous {
  left: 5%;
}

.nav-btn--next {
  right: 5%;
}

.gameweek-scene__information { right: 5%; bottom: 5.25%; z-index: 5; text-decoration: none; font-weight: 800; width: 44px; height: 44px; min-height: 44px; }
.gameweek-scene__information[hidden] { display: none; }
.gameweek-scene__information svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#previous-gameweek-pitch, #next-gameweek-pitch { display: none; }
#gameweek-information:hover::after, #gameweek-information:focus-visible::after {
  content: 'Score table'; position: absolute; bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: #10132a; color: white; padding: 5px 8px; border-radius: 5px;
  font: 600 12px sans-serif; z-index: 30;
}
.gameweek-scene__information .information-dot { fill: currentColor; stroke: none; }
.gameweek-scene__information:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.gameweek-scene .squad-pitch__metric[data-player-info-control] {
  appearance: none;
  border: 0;
  border-radius: 0.2rem;
  padding: 0 0 0.06em;
  background: transparent;
  color: var(--squad-pitch-metric);
  font: inherit;
  font-size: var(--metric-size);
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  line-height: 1.2;
  overflow: visible;
  text-align: center;
  text-shadow: inherit;
  cursor: pointer;
}

.gameweek-scene__pitch {
  width: 100%;
  min-width: 0;
}

.gameweek-scene__bench {
  border-top: 1px solid rgba(159, 233, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(159, 233, 255, 0.05), transparent 36%),
    #07101d;
  padding: 0.24rem 0.25rem 0.38rem;
}

.gameweek-scene__bench-head {
  display: flex;
  align-items: baseline;
  margin-top: 0.18rem;
  padding-inline: 0.35rem;
}

.gameweek-scene__bench-head strong {
  color: #f8fbff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


.gameweek-scene__bench-stage {
  --given-size: clamp(0.58rem, 3.15cqw, 0.85rem);
  --surname-size: clamp(0.60rem, 3.18cqw, 0.86rem);
  --metric-size: clamp(0.58rem, 3.15cqw, 0.85rem);
  --badge-size: clamp(2.55rem, 13cqw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-items: start;
  justify-content: space-between;
  column-gap: 0.25rem;
  width: 100%;
  min-width: 0;
  height: clamp(6.4rem, 34cqw, 8rem);
  margin-top: 0;
  padding: 0.18rem 0.45rem 0;
}



.gameweek-scene__bench-stage[data-surname-fit="fallback"] {
  --surname-size: var(--given-size);
}

.gameweek-scene__bench-slot {
  display: grid;
  justify-items: center;
  width: max-content;
  min-width: 0;
}

.gameweek-scene__bench-stage .squad-pitch__player {
  width: 100%;
  max-width: none;
}

.gameweek-scene__bench-stage .squad-pitch__given-name,
.gameweek-scene__bench-stage .squad-pitch__surname,
.gameweek-scene__bench-stage .squad-pitch__metric {
  width: max-content;
  max-width: none;
  overflow: visible;
}

@media (max-width: 340px) {
  .review-shell {
    width: 100%;
    padding-top: 0.75rem;
  }

  .review-header,
  .review-note {
    margin-inline: 0.625rem;
  }
}

/* Scene-only captaincy overlay; no frozen formation or token geometry changes. */
.gameweek-scene .squad-pitch__player[data-captaincy] {
  position: relative;
}

.gameweek-scene__captaincy-mark {
  position: absolute;
  z-index: 2;
  top: -0.16rem;
  left: calc(50% + var(--badge-size) / 2 - 0.25rem);
  display: grid;
  place-items: center;
  width: 1.13rem;
  height: 1.13rem;
  border: 1px solid #07101d;
  border-radius: 50%;
  background: #00ff85;
  color: #17001f;
  font-size: 0.59rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: none;
  pointer-events: none;
}

.gameweek-scene__captaincy-mark--vice {
  width: 1.3rem;
  height: 1.3rem;
  background: #04f5ff;
  font-size: 0.54rem;
}

/* GS7 motion is separate from every frozen slot transform and inner token. */
.gameweek-scene__motion {
  display: grid;
  justify-items: center;
  width: 100%;
  min-width: 0;
  will-change: transform;
}

.gameweek-scene .squad-pitch__player:has([data-price-freshness]) { position: relative; }
.gameweek-scene__price-freshness {
  position: absolute; top: calc(var(--badge-size) - 0.3rem); right: 0;
  width: 1rem; height: 1rem; padding: 0; border: 1px solid #a6edff;
  border-radius: 50%; background: #07111b; color: #a6edff;
  font: 700 0.65rem/1 sans-serif; cursor: pointer;
}
.gameweek-scene__price-freshness[hidden] { display: none; }
.gameweek-scene__price-freshness:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.gameweek-scene__price-freshness-copy {
  padding: 0.75rem; max-width: calc(100vw - 2rem); border: 1px solid #a6edff;
  border-radius: 0.5rem; background: #07111b; color: white;
  font: 14px/1.4 sans-serif; white-space: normal;
}

