/* Championship Mode is intentionally visually related to the existing glass UI.
   The court remains the hero; controls stay near screen edges and out of the ball path. */
.championshipHud {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  font-family: inherit;
}

.championshipHud[hidden] {
  display: none;
}

.championshipMatchup,
.championshipScore,
.championshipResults {
  pointer-events: auto;
}

.championshipMatchup {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.championshipScore {
  position: absolute;
  top: max(62px, calc(env(safe-area-inset-top) + 44px));
  left: 50%;
  transform: translateX(-50%);
  min-width: 112px;
  padding: 8px 16px;
  text-align: center;
  font-size: clamp(22px, 3vw, 34px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.championshipMessage {
  position: absolute;
  top: max(118px, calc(env(safe-area-inset-top) + 100px));
  left: 50%;
  transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 40px));
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(35, 67, 56, 0.62);
  color: #fffdf7;
  font-size: clamp(13px, 1.7vw, 20px);
  font-weight: 850;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(24, 56, 44, 0.3);
  opacity: 0.92;
  pointer-events: none;
}

.championshipResults {
  position: absolute;
  left: 50%;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 18px));
  transform: translateX(-50%);
  display: grid;
  gap: 9px;
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
}

.championshipResults[hidden] {
  display: none;
}


.championshipResultSummary {
  margin: 2px 0 12px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing: .04em;
}

.championshipResults strong {
  font-size: 20px;
  text-align: center;
}

.championshipResults button {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(41, 79, 67, 0.16);
  background: rgba(255, 253, 247, 0.9);
  color: #294f43;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.championshipResults .championshipPrimary {
  background: #416d59;
  color: #fffdf7;
}

.championshipControlsHint {
  position: absolute;
  left: 50%;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(35, 67, 56, 0.48);
  color: rgba(255, 253, 247, 0.88);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.035em;
  white-space: nowrap;
  pointer-events: none;
}

.championshipTouchPad,
.championshipSwing {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  .championshipControlsHint { display: none; }
  .championshipTouchPad,
  .championshipSwing {
    display: block;
    position: absolute;
    bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .championshipTouchPad {
    left: max(18px, env(safe-area-inset-left));
    width: 118px;
    height: 118px;
    border-radius: 50%;
    border: 2px solid rgba(255, 253, 247, 0.65);
    background:
      radial-gradient(circle at center, rgba(255, 253, 247, 0.12) 0 24%, transparent 25%),
      rgba(41, 79, 67, 0.24);
    box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.08);
  }

  .championshipSwing {
    right: max(20px, env(safe-area-inset-right));
    width: 94px;
    height: 94px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.82);
    background: rgba(65, 109, 89, 0.88);
    color: #fffdf7;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.06em;
    box-shadow: 0 8px 30px rgba(30, 65, 52, 0.22);
  }
}

@media (max-width: 520px) {
  .championshipMatchup {
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .championshipMessage {
    top: max(108px, calc(env(safe-area-inset-top) + 92px));
    font-size: 13px;
  }
}

/* During a match the ordinary club chrome fades away rather than competing
   with the court. It returns automatically when Championship Mode releases. */
body.championship-active .topbar,
body.championship-active .objective,
body.championship-active .scenePeek,
body.championship-active .hint,
body.championship-active .build,
body.championship-active .hud,
body.championship-active .moment,
body.championship-active .speech {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}


.championshipTouchPad[hidden],
.championshipSwing[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.championship-active .topbar,
  body.championship-active .objective,
  body.championship-active .scenePeek,
  body.championship-active .hint,
  body.championship-active .build,
  body.championship-active .hud,
  body.championship-active .moment,
  body.championship-active .speech {
    transition: none;
  }
}

/* The match transformation should read as a deliberate camera event, not as a
   sudden UI swap. During the orbit the sports HUD stays quiet and a very soft
   vignette separates the moment from ordinary club exploration. */
.championshipHud {
  transition: background 260ms ease;
}

.championshipHud[data-phase="intro"] {
  background: radial-gradient(
    ellipse at 50% 46%,
    rgba(25, 54, 45, 0) 42%,
    rgba(25, 54, 45, 0.11) 100%
  );
}

.championshipHud[data-phase="intro"] .championshipScore {
  opacity: 0;
  transform: translate(-50%, -7px) scale(0.97);
}

.championshipScore {
  transition: opacity 220ms ease, transform 260ms ease;
}

body.championship-transitioning .championshipControlsHint,
body.championship-transitioning .championshipTouchPad,
body.championship-transitioning .championshipSwing {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .championshipHud,
  .championshipScore {
    transition: none;
  }

  .championshipHud[data-phase="intro"] {
    background: none;
  }
}

/* Compact edge scorecard; the live ball always owns the middle. */
.championshipMatchup{left:max(16px,env(safe-area-inset-left));top:max(14px,env(safe-area-inset-top));transform:none;font-size:10px;padding:8px 12px;max-width:calc(100vw - 166px)}
.championshipScore{left:max(16px,env(safe-area-inset-left));top:max(48px,calc(env(safe-area-inset-top) + 34px));transform:none;min-width:76px;font-size:25px;padding:5px 12px}
.championshipMessage{top:auto;bottom:max(52px,calc(env(safe-area-inset-bottom) + 40px));font-size:12px;max-width:calc(100vw - 32px)}
.championshipMessage:empty{display:none}
.championshipExit{position:absolute;right:max(16px,env(safe-area-inset-right));top:max(14px,env(safe-area-inset-top));pointer-events:auto;min-height:44px;padding:8px 13px;border:1px solid #d9decd;border-radius:14px;background:#f2ebdc;color:#294f43;font:600 12px inherit;cursor:pointer}
.championshipPause{position:absolute;right:max(16px,env(safe-area-inset-right));top:max(64px,calc(env(safe-area-inset-top) + 50px));pointer-events:auto;min-height:44px;padding:8px 13px;border:1px solid #d9decd;border-radius:14px;background:#f2ebdc;color:#294f43;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.championshipPausePanel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(320px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:20px;display:grid;gap:10px;border-radius:18px;pointer-events:auto;color:#294f43}
.championshipPausePanel strong{font-size:22px}
.championshipPausePanel p{margin:0 0 4px;font-size:13px;line-height:1.45}
.championshipPausePanel button{min-height:44px;padding:9px 12px;border-radius:12px;background:#f2ebdc;color:#294f43;font:inherit;font-size:13px;cursor:pointer}
.championshipPausePanel button[aria-pressed="true"]{background:#416d59;color:#fffdf7}
.championshipPauseActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.championshipPauseActions button:first-child{background:#416d59;color:#fffdf7;font-weight:750}
.championshipExit[hidden]{display:none}
@media(max-height:320px){.championshipPausePanel{padding:14px;gap:8px}.championshipPausePanel strong{font-size:18px}.championshipPausePanel p{display:none}}
.championshipPause[hidden],.championshipPausePanel[hidden]{display:none}
.championshipHud[data-paused="true"]{background:#192e231f}
.championshipResultSummary{color:#405e51}
.championshipHud[data-phase="intro"] .championshipScore{transform:translateY(-7px)}
.championshipHud[data-phase="challenge"] .championshipMatchup,.championshipHud[data-phase="challenge"] .championshipScore,.championshipHud[data-phase="challenge"] .championshipControlsHint{display:none}
.championshipHud[data-phase="matchResult"] .championshipControlsHint{display:none}
body.championship-active .toast{display:none}
@media(pointer:coarse){.championshipMessage{bottom:max(155px,calc(env(safe-area-inset-bottom) + 142px))}}
@media(max-height:480px){.championshipTouchPad{width:88px;height:88px;bottom:14px}.championshipSwing{width:76px;height:76px;bottom:14px}.championshipMessage{bottom:20px;max-width:50vw}.championshipScore{font-size:21px}.championshipResults{bottom:12px;padding:12px;gap:5px}.championshipResults button{min-height:40px}}
button:focus-visible{outline:3px solid #d6a745;outline-offset:3px}

.championshipMatchup,.championshipScore{border-radius:12px;box-shadow:0 4px 18px #17291a18}

/* Contact praise stays at the edge of the court and matches its material flash. */
.championshipHud[data-cue="sweet"] .championshipMessage{background:#f4edb5;color:#294f43;text-shadow:none;box-shadow:0 3px 14px #283d2f26;animation:contactPraise 180ms ease-out}
.championshipHud[data-cue="nice"] .championshipMessage{background:#d8e8bb;color:#294f43;text-shadow:none}
@keyframes contactPraise{from{transform:translateX(-50%) scale(1.08)}to{transform:translateX(-50%) scale(1)}}
.championshipHud[data-motion="reduced"] .championshipMessage{animation:none}
@media(prefers-reduced-motion:reduce){.championshipMessage{animation:none!important}}
