/* Sports arena Home; the existing Matches, Announcements and navigation stay intact. */
.phone-screen main:has(#phone-home:not([hidden])) { max-width:1240px; }
.sportsfest-welcome, .celebration-stage-root { width:100%; min-width:0; }
.celebration-departments { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.celebration-departments button { font:inherit; font-size:12px; padding:9px 16px; border:1px solid #ffffff26; border-radius:999px; background:#ffffff08; color:#ddd3e9; }
.celebration-departments button[aria-pressed='true'] { background:#efc95e; color:#20152d; border-color:#efc95e; }
.celebration-departments button:focus-visible { outline:3px solid #efc95e; outline-offset:4px; }
.celebration-stage { position:relative; isolation:isolate; overflow:hidden; min-height:470px; padding:34px clamp(12px,3vw,45px) 32px; border:1px solid #ffffff1a; border-radius:24px; background:radial-gradient(ellipse at 50% 85%,#62377655,transparent 62%),linear-gradient(#100b1c,#1c122c); display:flex; flex-direction:column; justify-content:space-between; text-align:center; }
.celebration-stage-heading { position:relative; z-index:3; margin-bottom:25px; }
.celebration-eyebrow { font-size:10px; letter-spacing:.24em; color:#cbb7df; font-weight:700; }
.sportsfest-welcome .celebration-stage-title { margin:8px 0 5px; font-size:clamp(22px,2.8vw,36px); font-weight:750; color:#fff; line-height:1.2; }
.celebration-final-label { font-size:9px; letter-spacing:.15em; color:#ad9abc; }
.celebration-stadium { position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.celebration-stadium-seats { position:absolute; inset:70px -5% auto; height:100px; opacity:.22; background:repeating-linear-gradient(0deg,transparent 0 12px,#9a6fb544 12px 14px),repeating-linear-gradient(90deg,#8e68a144 0 7px,transparent 7px 18px); border-radius:0 0 45% 45%; }
.celebration-court { position:absolute; inset:auto 0 0; width:100%; height:48%; color:#d5bfd63b; opacity:.5; }
.celebration-floodlight { position:absolute; top:22px; width:125px; height:18px; border-radius:3px; background:repeating-linear-gradient(90deg,#fff4d6 0 8px,#8c7a7f 8px 12px); box-shadow:0 0 22px #f5dfc23b; opacity:.35; }
.celebration-floodlight-left { left:4%; transform:rotate(-12deg); }
.celebration-floodlight-right { right:4%; transform:rotate(12deg); }
.celebration-sweep { position:absolute; top:-70px; left:calc(50% - 200px); width:400px; height:650px; transform-origin:50% 0; clip-path:polygon(48% 0,52% 0,100% 100%,0 100%); background:linear-gradient(#ffecd270,#f4ce7435 65%,transparent); opacity:0; }
.celebration-podium-grid { position:relative; z-index:2; display:flex; justify-content:center; align-items:flex-end; gap:clamp(10px,2.5vw,30px); max-width:970px; width:100%; margin:0 auto; }
.celebration-podium { position:relative; isolation:isolate; flex:1 1 0; min-width:0; max-width:200px; display:flex; flex-direction:column; align-items:center; }
.celebration-podium-winner::before { content:''; position:absolute; z-index:-1; inset:-50px -25px 20px; background:linear-gradient(0deg,#efc95e32,transparent 95%); clip-path:polygon(12% 0,88% 0,100% 100%,0 100%); }
.celebration-rank { min-height:24px; margin-bottom:9px; color:#bfaaca; font-size:12px; font-weight:700; }
.celebration-podium-winner .celebration-rank { color:#f5d277; }
.celebration-mascot { position:relative; z-index:3; width:100%; max-width:160px; height:130px; margin-bottom:-3px; object-fit:contain; filter:drop-shadow(0 8px 9px #0008); }
.celebration-podium-winner .celebration-mascot { filter:drop-shadow(0 0 16px #efc95e55); }
.celebration-plinth { position:relative; flex-shrink:0; width:100%; height:var(--podium-height); display:flex; flex-direction:column; justify-content:center; align-items:center; border-radius:0 0 48% 48% / 0 0 20px 20px; background:linear-gradient(90deg,#34213d,#785082 46%,#442c50); box-shadow:0 16px 18px #0006,inset 1px 0 #ffffff22; }
.celebration-plinth::before { content:''; position:absolute; top:-14px; left:0; right:0; height:28px; border-radius:50%; border:1px solid #d3a6db66; background:radial-gradient(ellipse,#a18aac,#5c426b); }
.celebration-podium-winner .celebration-plinth::before { border:2px solid #efc95e; box-shadow:0 0 20px #efc95e55; }
.celebration-points { position:relative; z-index:2; font-size:clamp(22px,3vw,36px); color:#fff; line-height:1.15; overflow-wrap:anywhere; }
.celebration-points-label { position:relative; z-index:2; color:#d9c9e4; font-size:11px; }
.celebration-team-name { width:100%; min-height:40px; margin-top:20px; font-size:14px; font-weight:700; line-height:1.4; color:#fff; overflow-wrap:anywhere; }
.celebration-curtain { display:none; position:fixed; inset:0; z-index:900; background:#000; pointer-events:none; }
.celebration-intro .celebration-curtain { display:block; animation:celebration-blackout 2.4s linear both; }
.celebration-intro .celebration-sweep { animation:celebration-spotlight 5s .9s ease-in-out both; }
.celebration-intro .celebration-podium { animation:celebration-rise 2.2s var(--rise-delay) cubic-bezier(.18,.7,.24,1) both; }
.celebration-confetti { position:fixed; inset:0; z-index:1000; overflow:hidden; pointer-events:none; }
.celebration-confetti-piece { position:absolute; top:-16px; left:var(--celebration-x); width:8px; height:13px; border-radius:1px; background:var(--celebration-color); animation:celebration-fall 3.2s var(--celebration-delay) cubic-bezier(.17,.67,.38,.97) both; }
.celebration-confetti-piece:nth-child(3n) { width:6px; height:6px; border-radius:50%; }
.celebration-stage:has(.celebration-stage-message) { align-items:center; justify-content:center; }
.celebration-stage-message { padding:50px 20px; font-size:18px; color:#ddd3e9; }
#view-home > .sportsfest-welcome, #view-home .celebration-stage-root, #view-home .celebration-stage { height:100%; }
#view-home .celebration-stage { min-height:0; }
@keyframes celebration-blackout { 0%,35% { opacity:1; } 100% { opacity:0; } }
@keyframes celebration-spotlight { 0% { opacity:0;transform:rotate(-35deg); } 20% { opacity:1; } 60% { opacity:.8;transform:rotate(30deg); } 100% { opacity:.25;transform:rotate(0); } }
@keyframes celebration-rise { from { opacity:0;transform:translate3d(0,155px,0) scale(.9); } to { opacity:1;transform:translate3d(0,0,0) scale(1); } }
@keyframes celebration-fall { 0% { opacity:0;transform:translate3d(0,-3vh,0) rotate(0); } 8%,85% { opacity:1; } 100% { opacity:0;transform:translate3d(var(--celebration-drift),110vh,0) rotate(var(--celebration-rotation)); } }
@media (max-width:600px) {
  .celebration-stage { min-height:410px; padding:25px 12px 20px; border-radius:19px; }
  .celebration-stage-heading { margin-bottom:35px; }
  .sportsfest-welcome .celebration-stage-title { font-size:25px; }
  .celebration-podium-grid { gap:9px; }
  .celebration-mascot { height:80px; }
  .celebration-rank { font-size:9px; min-height:27px; }
  .celebration-plinth { height:var(--podium-mobile-height); border-radius:0 0 48% 48% / 0 0 12px 12px; }
  .celebration-plinth::before { top:-9px; height:18px; }
  .celebration-points { font-size:20px; }
  .celebration-points-label { font-size:9px; }
  .celebration-team-name { font-size:11px; margin-top:15px; min-height:45px; }
  .celebration-floodlight { width:70px; height:12px; top:15px; }
  .celebration-departments button { font-size:10px; padding:8px 12px; }
}
@media (min-width:1001px) and (max-height:700px) {
  #view-home .celebration-stage { padding:18px 28px; }
  #view-home .celebration-stage-heading { margin-bottom:12px; }
  #view-home .celebration-mascot { height:80px; }
  #view-home .celebration-plinth { height:var(--podium-mobile-height); }
  #view-home .celebration-stage-title { font-size:26px; }
  #view-home .celebration-team-name { min-height:30px; margin-top:14px; }
}
@media (prefers-reduced-motion:reduce) {
  .celebration-curtain, .celebration-confetti { display:none!important; }
  .celebration-intro .celebration-sweep, .celebration-intro .celebration-podium { animation:none; }
}
/* Full-screen arena entrance on Home. Other sections retain their existing layout. */
.phone-screen main:has(#phone-home:not([hidden])) { max-width:none; width:100%; height:100dvh; padding:0; margin:0; overflow:hidden; position:relative; }
.phone-screen main:has(#phone-home:not([hidden])) > .phone-masthead { position:absolute; top:18px; left:clamp(16px,4vw,60px); right:clamp(16px,4vw,60px); z-index:5; border:0; margin:0; padding:0; }
.phone-screen main:has(#phone-home:not([hidden])) > .phone-hero { position:absolute; right:clamp(16px,4vw,60px); top:82px; z-index:5; margin:0; padding:0; width:auto; }
.phone-screen main:has(#phone-home:not([hidden])) .phone-hero h1,
.phone-screen main:has(#phone-home:not([hidden])) .phone-updated,
.phone-screen main:has(#phone-home:not([hidden])) #status,
.phone-screen main:has(#phone-home:not([hidden])) .phone-hero::after { display:none; }
#phone-home, #phone-home .sportsfest-welcome, #phone-home .celebration-stage-root { height:100%; }
#phone-home .celebration-stage { height:100%; min-height:0; border:0; border-radius:0; padding:145px clamp(16px,6vw,90px) 105px; }
#phone-home .celebration-podium-grid { max-width:1100px; }
#phone-home .celebration-podium { max-width:230px; }
#phone-home .celebration-stadium-seats { top:140px; height:22%; }
#phone-home .celebration-floodlight { top:110px; }
#phone-home .celebration-court { height:60%; }
#phone-home .celebration-stage-heading { margin-bottom:20px; }
#phone-home .celebration-departments { position:absolute; top:95px; left:15%; right:15%; z-index:6; }
#view-home .celebration-stage { border:0; border-radius:0; }
@media(max-width:600px) {
  #phone-home .celebration-stage { padding:160px 16px 110px; }
  #phone-home .celebration-floodlight { top:130px; }
  .phone-screen main:has(#phone-home:not([hidden])) > .phone-masthead { top:12px; }
  #phone-home .celebration-departments { top:90px; left:12px; right:12px; }
}
@media(max-height:650px) {
  #phone-home .celebration-stage { padding-top:95px; padding-bottom:85px; }
  #phone-home .celebration-mascot { height:75px; }
  #phone-home .celebration-plinth { height:var(--podium-mobile-height); }
  #phone-home .celebration-stage-heading { margin-bottom:5px; }
}
.phone-screen main:has(#phone-home:not([hidden])) > .phone-masthead,
.phone-screen main:has(#phone-home:not([hidden])) > .phone-hero { display:none; }
#phone-home .celebration-stage { padding-top:60px; }
#phone-home .celebration-stadium-seats { top:80px; }
#phone-home .celebration-floodlight { top:30px; }
#phone-home .celebration-departments { top:16px; }
@media(max-width:600px) { #phone-home .celebration-stage { padding-top:75px; } }

/* Stadium lights and court continue to move softly after the reveal. */
.celebration-sound { position:absolute; top:18px; right:20px; z-index:7; font:inherit; font-size:11px; min-height:34px; padding:6px 12px; border:1px solid #ffffff25; border-radius:999px; background:#ffffff08; color:#dfd1ec; }
.celebration-sound:focus-visible { outline:2px solid #efc95e; outline-offset:3px; }
.celebration-floodlight { animation:arena-lights 6s ease-in-out infinite alternate; }
.celebration-floodlight-right { animation-delay:-3s; }
.celebration-court { animation:arena-court 12s ease-in-out infinite alternate; }
.celebration-stadium-seats { animation:arena-crowd 7s ease-in-out infinite alternate; }
.celebration-sweep { opacity:.18; animation:arena-sweep 14s ease-in-out infinite alternate; }
.celebration-podium-winner::before { animation:arena-winner 5s ease-in-out infinite alternate; }
.celebration-intro .celebration-podium-winner::before { animation:none; }
@keyframes arena-lights { from { opacity:.25; filter:brightness(.85); } to { opacity:.7; filter:brightness(1.3); } }
@keyframes arena-court { from { transform:translateY(0) scale(1); opacity:.35; } to { transform:translateY(-10px) scale(1.025); opacity:.65; } }
@keyframes arena-crowd { from { opacity:.14; } to { opacity:.3; } }
@keyframes arena-sweep { from { transform:rotate(-18deg); opacity:.1; } to { transform:rotate(18deg); opacity:.22; } }
@keyframes arena-winner { from { opacity:.6; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .celebration-stadium *, .celebration-podium-winner::before { animation:none!important; } }
body.phone-screen:has(#phone-home:not([hidden])) { display:block; margin:0; padding:0; }
body.phone-screen:has(#phone-home:not([hidden]))::before,
body.phone-screen:has(#phone-home:not([hidden]))::after { display:none; }
.phone-screen main:has(#phone-home:not([hidden])) { position:fixed; inset:0; }
.phone-screen:has(#phone-home:not([hidden])) .phone-nav { position:fixed; bottom:0; left:50%; right:auto; transform:translateX(-50%); margin:0 0 calc(10px + env(safe-area-inset-bottom)); }
.celebration-sound { width:44px; height:44px; min-height:44px; padding:0; display:grid; place-items:center; border-radius:50%; }
/* The champion beam breathes gently after its final reveal. */
.celebration-podium-winner::before { background:linear-gradient(0deg,#efc95e65,transparent 95%); animation:arena-winner 4.8s ease-in-out infinite alternate; }
.celebration-podium-winner .celebration-plinth::before { animation:arena-gold-ring 4.8s ease-in-out infinite alternate; }
@keyframes arena-winner { from { opacity:.18; } to { opacity:.9; } }
@keyframes arena-gold-ring { from { box-shadow:0 0 10px #efc95e25; } to { box-shadow:0 0 32px #efc95e80; } }
@media(prefers-reduced-motion:reduce) { .celebration-podium-winner .celebration-plinth::before { animation:none!important; } }

.celebration-departments { pointer-events:none; }
.celebration-departments button { pointer-events:auto; }
/* Soft champion glow without a rectangular beam or hard edges. */
.celebration-podium-winner::before { inset:-75px -65px -5px; clip-path:none; border-radius:50%; background:radial-gradient(ellipse at 50% 60%,#ffd87565 0%,#efc95e30 35%,#efc95e10 58%,transparent 75%); filter:blur(20px); }
.celebration-share { position:absolute; bottom:91px; left:50%; transform:translateX(-50%); min-height:38px; padding:7px 18px; border-radius:999px; border:1px solid #efc95e50; background:#241830e6; color:#f0d589; font:600 12px system-ui; }
#phone-home .celebration-stage { padding-bottom:155px; }
.celebration-story-dialog { width:min(430px,calc(100vw - 24px)); max-height:90dvh; overflow:auto; border:1px solid #ffffff30; border-radius:20px; padding:22px; background:#1c132c; color:white; text-align:center; }
.celebration-story-dialog::backdrop { background:#000b; }
.celebration-story-dialog img { width:100%; max-height:52dvh; object-fit:contain; }
.celebration-story-dialog h2 { font-size:22px; }
.story-status { font-size:12px; color:#cbbddd; }
.story-close { float:right; min-height:36px; width:36px; padding:0; font-size:22px; }
.story-actions { display:flex; justify-content:center; gap:10px; margin-top:15px; }
.story-actions button { font-size:13px; }
#view-home .celebration-share { bottom:8px; }
.celebration-share { width:48px; height:48px; padding:0; display:grid; place-items:center; border:0; background:linear-gradient(140deg,#ffe5a0,#e9bb50); color:#281b35; box-shadow:0 6px 24px #efc95e30,inset 0 1px #ffffff80; }
.celebration-share { transition:transform .22s ease,box-shadow .22s ease,background .22s ease; }
@media(hover:hover) and (pointer:fine) {
  .celebration-share:not(:disabled):hover { transform:translate(-50%,-4px); background:linear-gradient(140deg,#fff0bd,#f3cc70); box-shadow:0 10px 28px #efc95e65,0 0 0 4px #efc95e15,inset 0 1px #ffffffa0; }
}
.celebration-share:not(:disabled):active { transform:translate(-50%,0) scale(.94); }
@media(prefers-reduced-motion:reduce) { .celebration-share { transition:none; } .celebration-share:not(:disabled):hover,.celebration-share:not(:disabled):active { transform:translateX(-50%); } }
.celebration-share:focus-visible { outline:3px solid white; outline-offset:4px; }
.celebration-share:disabled { opacity:.4; cursor:wait; }
.celebration-share-status { position:absolute; bottom:142px; left:10px; right:10px; font-size:11px; color:#eed596; text-align:center; }
/* Keep the share control above navigation, including device safe-area insets. */
#phone-home .celebration-share { position:fixed; bottom:var(--celebration-share-bottom,calc(110px + env(safe-area-inset-bottom))); z-index:40; flex-shrink:0; overflow:visible; }
#phone-home .celebration-stage { padding-bottom:calc(var(--celebration-share-bottom,110px) + 72px); }
#phone-home .celebration-share-status { position:fixed; bottom:calc(var(--celebration-share-bottom,110px) + 55px); z-index:40; }
#view-home .celebration-share { z-index:8; bottom:16px; }

/* Side cannons and lower-corner bursts arc inward before falling. */
.celebration-confetti-burst { animation-name:celebration-burst; animation-timing-function:linear; }
@keyframes celebration-burst {
  0% { opacity:0; transform:translate3d(0,0,0) rotate(0); }
  8% { opacity:1; }
  40% { opacity:1; transform:translate3d(var(--burst-mid-x),var(--burst-rise),0) rotate(var(--celebration-rotation)); }
  85% { opacity:1; }
  100% { opacity:0; transform:translate3d(var(--burst-end-x),var(--burst-fall),0) rotate(calc(var(--celebration-rotation) + 240deg)); }
}
