/* Strictly Score — iPhone-first presentation layer (v66).
   Loaded after the ballroom theme; rules/data and the original hero art stay intact. */

/* Optional guides are compact disclosures, not full-screen cards. */
#lobbyView .compact-help-card{
  display:block;
  overflow:hidden;
  padding:0!important;
  border-radius:16px;
}
#lobbyView .compact-help-card > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:59px;
  padding:11px 13px;
  cursor:pointer;
  list-style:none;
  color:#fff0d0;
}
#lobbyView .compact-help-card > summary::-webkit-details-marker{display:none}
#lobbyView .compact-help-card > summary .small{display:block;margin-bottom:3px}
#lobbyView .compact-help-card > summary strong{
  display:block;
  font:700 17px/1.2 Georgia,"Times New Roman",serif;
}
#lobbyView #installCard > summary{
  justify-content:flex-start;
}
#lobbyView .compact-help-card .install-icon{
  flex:0 0 38px;
  width:38px;
  height:38px;
  border-radius:12px;
  font-size:18px;
}
#lobbyView .install-summary-text{
  flex:1 1 auto;
  min-width:0;
  color:#ffedc8;
  font:730 13px/1.3 system-ui,sans-serif;
}
#lobbyView .install-summary-text small{
  display:block;
  margin-top:2px;
  color:#d9c3df;
  font:500 11px/1.3 system-ui,sans-serif;
}
#lobbyView .compact-help-card .help-chevron{
  flex:0 0 auto;
  color:#f5dbac;
  font:700 22px/1 system-ui,sans-serif;
  transition:transform .18s ease;
}
#lobbyView .compact-help-card[open] .help-chevron{transform:rotate(180deg)}
#lobbyView #installCard > p,
#lobbyView .compact-help-body{
  margin:0;
  padding:0 13px 15px;
  color:#dfcfeb;
}
#lobbyView .compact-help-body .muted{
  margin:2px 0 12px;
  font-size:12px;
}
#lobbyView .compact-help-card > summary:focus-visible{
  outline:2px solid #ffe6ba;
  outline-offset:-3px;
}

/* Five-column layout also works when browsing on an iPad or desktop:
   base theme's previous three-column selector was intentionally important. */
.disco-nav-wrap .disco-nav.disco-nav-simple.native-app-nav{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 76px minmax(0,1fr) minmax(0,1fr)!important;
  gap:0!important;
}
.disco-nav-wrap .native-app-nav .disco-nav-item{
  min-height:56px;
  font-size:10px!important;
}

/* New quick live totals use the SAME confirmed judge scores/dance-win data. */
#gameView .dashboard-quick-scores{
  display:none;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}
#gameView .dashboard-quick-score{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:2px 7px;
  min-width:0;
  padding:8px 9px;
  border:1px solid rgba(242,206,160,.21);
  border-radius:12px;
  background:linear-gradient(120deg,rgba(127,73,147,.22),rgba(31,13,46,.20));
}
#gameView .dashboard-quick-score span{
  display:block;
  width:100%;
  color:#f7e3f5;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:750 12px/1.2 system-ui,sans-serif;
}
#gameView .dashboard-quick-score strong{
  color:#ffe4ac;
  font:820 18px/1.2 Georgia,"Times New Roman",serif;
}
#gameView .dashboard-quick-score small{
  color:#d4bde0;
  font:620 10px/1.25 system-ui,sans-serif;
}
#gameView .dashboard-jump-dance{
  display:none;
  width:100%;
  margin:10px 0 0;
  padding:9px 12px;
  min-height:44px;
  border:1px solid rgba(250,222,169,.51);
  border-radius:12px;
  background:linear-gradient(110deg,rgba(197,122,178,.28),rgba(135,76,176,.19));
  color:#fff1d3;
  text-align:center;
  font:780 12px/1.3 system-ui,sans-serif;
}
#gameView .dashboard-jump-dance[hidden]{display:none!important}

/* A raised centre glitterball and FOUR direct destinations.
   Quick menu is still available for secondary/host actions. */
.disco-nav-wrap .native-app-nav .disco-nav-item{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.disco-nav-wrap .native-app-nav .disco-nav-item.is-active:after{
  content:"";
  position:absolute;
  bottom:3px;
  left:50%;
  width:14px;
  height:2px;
  transform:translateX(-50%);
  border-radius:4px;
  background:#ffe2aa;
  box-shadow:0 0 9px rgba(255,219,168,.44);
}
#discoBallAction[aria-expanded="true"] .disco-ball-label{color:#ffe4a1}

@media(max-width:768px) and (pointer:coarse){
  html{scroll-padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
  body{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))}
  .shell{padding:8px 10px 28px}
  #lobbyView>.card,#lobbyView>.split,#lobbyView>.result-panel{
    margin-bottom:10px;
  }
  #lobbyView .split{
    gap:10px;
  }
  #lobbyView .split>.card{
    margin-bottom:0;
    padding:13px 12px;
    border-radius:16px;
  }
  #lobbyView .split>.card .muted{margin:5px 0 9px;font-size:12px;line-height:1.38}
  #lobbyView .split>.card label{margin-bottom:5px}
  #lobbyView .split>.card button{min-height:45px}
  #lobbyView>.identity-card{padding:11px 13px}
  #lobbyView>.identity-card .small{margin-bottom:4px}
  #lobbyView>.identity-card input{min-height:44px}
  #lobbyView #myPartiesCard{padding:13px}
  #lobbyView .season-heading .mini-glitterball{
    width:34px;height:34px;font-size:14px;
  }

  /* Reorder ONLY the visible app sections: the first editable dance is now
     directly below the slim dashboard instead of below a tall leaderboard. */
  #gameView{
    display:flex;
    flex-direction:column;
    gap:0;
    min-width:0;
  }
  #gameView #finale{order:0}
  #gameView #competitionDashboard{order:1}
  #gameView #hostControls{order:2}
  #gameView #rounds{order:3;min-width:0}
  #gameView>.party-scoreboard-card{order:4}
  #gameView #revealRound{order:5}
  #gameView #finishShow{order:6}
  #gameView #startNextWeek{order:7}
  #gameView #reset{order:8}
  #gameView #leave{order:9}
  #gameView #gameMsg{order:10}
  #gameView>.photo-credits{order:11}

  /* An active dance stays fully interactive; other dances remain available
     as compact one-tap entries, preventing long multi-dance page scrolls. */
  #gameView #rounds>.scoring-card{
    margin-bottom:10px!important;
    padding:10px 9px 12px!important;
    border-radius:17px!important;
  }
  #gameView #rounds>.scoring-card .dance-show-banner{
    min-height:69px!important;
    height:69px!important;
    margin:-4px -4px 5px!important;
    padding:2px 9px 3px 0!important;
  }
  #gameView #rounds>.scoring-card .dance-show-art{
    height:64px!important;
    width:92px!important;
  }
  #gameView #rounds>.scoring-card .dance-show-number{
    font-size:clamp(23px,6vw,29px)!important;
  }
  #gameView #rounds>.scoring-card .live-scoring-head{gap:5px}
  #gameView #rounds>.scoring-card .scoring-panel{
    padding:10px 7px!important;
  }
  #gameView #rounds>.scoring-card .scoring-judge-grid{gap:5px}
  #gameView #rounds>.scoring-card .live-judge-tile{
    padding:5px 2px 6px;
  }
  #gameView #rounds>.scoring-card .live-judge-tile .judge-avatar{
    height:clamp(50px,16vw,61px);
    margin-bottom:4px;
  }
  #gameView #rounds>.scoring-card .live-judge-tile .judge-current-score{
    width:clamp(39px,11vw,49px);
    height:clamp(39px,11vw,49px);
    margin:5px auto 4px;
    font-size:clamp(23px,6vw,29px);
  }
  #gameView #rounds>.scoring-card .neon-submit{
    margin-top:11px;
    min-height:48px;
  }
  #gameView #rounds>.scoring-card .mobile-dance-open{display:none}
  #gameView #rounds>.scoring-card.mobile-dance-compact{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:7px;
    min-height:69px!important;
    padding:5px 9px!important;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .dance-show-banner{
    min-width:0;
    margin:0!important;
    height:56px!important;
    min-height:56px!important;
    padding:0!important;
    justify-content:flex-start;
    background:transparent!important;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .dance-show-art{
    flex:0 0 52px;
    width:52px!important;
    height:52px!important;
    margin:0!important;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .dance-show-number{
    flex:0 1 auto;
    font-size:19px!important;
    text-align:left;
    letter-spacing:-.02em;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .round-head,
  #gameView #rounds>.scoring-card.mobile-dance-compact .scoring-panel,
  #gameView #rounds>.scoring-card.mobile-dance-compact .scoring-opponent-panel,
  #gameView #rounds>.scoring-card.mobile-dance-compact .dance-result-strip{
    display:none!important;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .mobile-dance-open{
    display:block!important;
    width:auto!important;
    min-width:112px;
    max-width:133px;
    min-height:44px;
    padding:7px 8px;
    border:1px solid rgba(246,207,156,.45);
    border-radius:12px;
    background:rgba(139,73,160,.30);
    color:#fff0d2;
    font:750 11px/1.25 system-ui,sans-serif;
    text-align:center;
    touch-action:manipulation;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .mobile-dance-open:active{
    background:rgba(209,108,169,.42);
  }

  /* Replace four oversized dashboard tiles with tighter at-a-glance stats. */
  #gameView #competitionDashboard{
    padding:12px!important;
    border-radius:17px!important;
    margin-bottom:10px!important;
  }
  #gameView #competitionDashboard .dashboard-head{
    align-items:center;
    margin-bottom:8px;
  }
  #gameView #competitionDashboard .dashboard-head h2{
    font-size:20px;
    line-height:1.13;
  }
  #gameView #competitionDashboard .dashboard-grid{
    gap:6px;
  }
  #gameView #competitionDashboard .dashboard-stat{
    min-height:52px;
    padding:6px 9px;
    border-radius:11px;
  }
  #gameView #competitionDashboard .dashboard-stat span{
    font-size:9px;
  }
  #gameView #competitionDashboard .dashboard-stat strong{
    margin-top:3px;
    font-size:15px;
    line-height:1.1;
  }
  #gameView #competitionDashboard .dashboard-code{font-size:20px!important}
  #gameView #competitionDashboard .dashboard-progress-track{height:5px;margin-top:9px}
  #gameView #competitionDashboard .dashboard-status{
    margin-top:7px;
    font-size:11px;
    line-height:1.3;
  }
  #gameView .dashboard-quick-scores{display:grid;margin-top:9px}
  #gameView .dashboard-quick-score{padding:7px 8px}
  #gameView .dashboard-quick-score strong{font-size:17px}
  #gameView .dashboard-jump-dance:not([hidden]){display:block}
  #gameView .party-scoreboard-card{margin-top:3px}
  #gameView #hostControls{margin:0 0 7px}
  #gameView #hostControls button{min-height:43px}

  /* Native-feeling, thumb-friendly bottom navigation, above the home
     indicator. Expensive blurred layers are replaced by painted glass. */
  .disco-nav-wrap{
    bottom:calc(5px + env(safe-area-inset-bottom,0px))!important;
    width:min(calc(100% - 14px),420px)!important;
  }
  .disco-nav-wrap .disco-nav.disco-nav-simple.native-app-nav{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 62px minmax(0,1fr) minmax(0,1fr)!important;
    min-height:65px;
    gap:0!important;
    padding:5px 3px 3px!important;
    border-radius:22px;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  .disco-nav-wrap .native-app-nav .disco-nav-item{
    min-height:53px;
    padding:4px 0 6px;
    gap:2px;
    font-size:10px!important;
    border-radius:12px;
    transition:transform .14s ease,background-color .14s ease;
  }
  .disco-nav-wrap .native-app-nav .disco-nav-item .disco-nav-icon{
    width:25px;height:26px;font-size:23px;
  }
  .disco-nav-wrap .native-app-nav .disco-live-dot{
    top:6px;right:calc(50% - 19px);
  }
  #discoNavWrap #discoBallAction.disco-ball-action{
    bottom:0!important;
    width:67px!important;
    height:79px!important;
    padding:0 0 4px!important;
  }
  #discoNavWrap #discoBallAction .disco-orbit{
    flex:0 0 60px!important;
    width:60px!important;
    height:60px!important;
    transform:translateZ(0);
  }
  #discoNavWrap #discoBallAction .disco-ball-label{
    margin-top:4px;
    font-size:8px;
  }
  .disco-nav-wrap .disco-quick-menu{
    width:min(345px,calc(100% - 7px))!important;
    max-height:calc(100dvh - 120px - env(safe-area-inset-bottom,0px));
    margin-bottom:10px;
    padding:10px!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    animation:iphoneMenuUp .19s cubic-bezier(.18,.72,.28,1) both;
  }
  .disco-nav-wrap .disco-quick-menu .disco-menu-grid{gap:6px}
  .disco-nav-wrap .disco-quick-menu .disco-menu-grid>button{
    min-height:63px;
    border-radius:12px;
    padding:8px;
  }
  .disco-nav-wrap .disco-quick-menu .disco-menu-grid>button.disco-action-feature{
    min-height:76px;
  }

  /* Keep the celebrated ballroom theme, but stop unnecessary repeated
     fixed-layer animation while scoring, where responsiveness matters most. */
  body.in-live-game .global-disco-ball.ball-two,
  body.in-live-game .global-disco-ball.ball-three,
  body.in-live-game .global-disco-flare{
    display:none!important;
  }
  body.in-live-game .global-disco-ball.ball-one{
    animation:none!important;
    opacity:.24!important;
    filter:none!important;
    box-shadow:0 0 18px rgba(197,112,239,.20)!important;
  }
  body.in-live-game .glam-sparkle-field::before,
  body.in-live-game .glam-sparkle-field::after{
    animation:none!important;
    filter:none!important;
    opacity:.26!important;
  }
  .disco-nav-wrap .disco-ball-face{animation:discoNavRotate 26s linear infinite}
  .disco-nav-wrap .disco-orbit::after{animation:none!important}
}
@media(display-mode:standalone){
  #installCard{display:none!important}
}
@keyframes iphoneMenuUp{
  from{opacity:0;transform:translate3d(0,8px,0) scale(.985)}
  to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
@media(max-width:365px) and (pointer:coarse){
  .disco-nav-wrap .disco-nav.disco-nav-simple.native-app-nav{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px minmax(0,1fr) minmax(0,1fr)!important;
    padding:5px 2px 3px!important;
  }
  .disco-nav-wrap .native-app-nav .disco-nav-item{
    font-size:9px!important;
  }
  #discoNavWrap #discoBallAction.disco-ball-action{
    width:61px!important;height:73px!important;
  }
  #discoNavWrap #discoBallAction .disco-orbit{
    width:55px!important;height:55px!important;flex-basis:55px!important;
  }
  #gameView #rounds>.scoring-card.mobile-dance-compact .mobile-dance-open{
    min-width:100px;padding:6px;
  }
}
@media(prefers-reduced-motion:reduce){
  #lobbyView .compact-help-card .help-chevron,
  .disco-nav-wrap .native-app-nav .disco-nav-item{
    transition:none!important;
  }
  .disco-nav-wrap .disco-quick-menu,
  .disco-nav-wrap .disco-ball-face{
    animation:none!important;
  }
}

/* v67 — battery-saving iPhone render path. Replaces a continuously animated,
   full-screen, blurred copy of the hero with a STATIC violet/gold atmosphere.
   The actual dancer artwork and all short winner celebrations stay untouched. */
@media(max-width:768px) and (pointer:coarse){
  .glam-sparkle-field{
    position:fixed!important;
    inset:0!important;
    opacity:1!important;
    transform:none!important;
    animation:none!important;
    -webkit-filter:none!important;
    filter:none!important;
    background:
      radial-gradient(ellipse at 92% 18%,rgba(105,43,146,.39),transparent 45%),
      radial-gradient(ellipse at 7% 75%,rgba(96,38,135,.31),transparent 46%),
      radial-gradient(ellipse at 53% 3%,rgba(223,155,100,.12),transparent 42%),
      linear-gradient(180deg,#14091e,#0d0716 70%,#13091d)!important;
  }
  /* The narrow decorative shell edge need not pulse continuously. */
  .shell::before,
  .shell::after{
    animation:none!important;
    filter:none!important;
  }
  .glam-sparkle-field::before,
  .glam-sparkle-field::after{
    display:none!important;
    animation:none!important;
    -webkit-filter:none!important;
    filter:none!important;
  }
  .global-disco-scene{
    mix-blend-mode:normal!important;
    -webkit-filter:none!important;
    filter:none!important;
    -webkit-mask-image:none!important;
    mask-image:none!important;
  }
  .global-disco-scene::before,
  .global-disco-scene::after,
  .global-disco-flare,
  .global-disco-ball.ball-two,
  .global-disco-ball.ball-three{
    display:none!important;
    animation:none!important;
  }
  /* Keep one STATIC purple mirrored ball framing the home page so the
     approved Strictly aesthetic remains visible without a GPU paint loop. */
  .global-disco-ball.ball-one{
    display:block!important;
    animation:none!important;
    filter:none!important;
    opacity:.28!important;
    box-shadow:inset -11px -14px 24px rgba(31,11,49,.32),
               inset 7px 6px 13px rgba(255,255,255,.18),
               0 0 23px rgba(161,97,194,.26)!important;
  }
  .global-disco-ball.ball-one::before,
  .global-disco-ball.ball-one::after{display:none!important}
  body.in-live-game .global-disco-scene{opacity:.33!important}
  /* Avoid creating an additional heavily blurred hero-sized image layer.
     The actual home-hero image, dancers and decorative fade remain. */
  .hero.hero-poster::before{
    display:none!important;
    animation:none!important;
    filter:none!important;
  }
  /* The glitterball animates on a tap, not continuously for hours while
     a live show is open. Retains existing sparkle/winner reveal effects. */
  .disco-nav-wrap .disco-ball-face{
    animation:none!important;
    transform:rotate(-12deg);
  }
  .disco-nav-wrap .disco-ball-action.disco-tap-spin .disco-ball-face{
    animation:discoTap .55s ease-in-out 1!important;
  }
  .disco-nav-wrap .disco-orbit::after{
    animation:none!important;
  }
  /* End-of-round theatre remains animated, but its mirrored ball runs
     briefly rather than spinning indefinitely when someone leaves it open. */
  #roundCelebration.show .disco-ball{
    animation:discoFloat 3.8s ease-in-out 1,
      discoGlow 2.8s ease-in-out 1,
      discoTurn 3.8s linear 1!important;
  }
}
body.app-backgrounded .global-disco-scene,
body.app-backgrounded .glam-sparkle-field{
  display:none!important;
}
@media(prefers-reduced-motion:reduce){
  .disco-nav-wrap .disco-ball-action.disco-tap-spin .disco-ball-face,
  #roundCelebration.show .disco-ball{
    animation:none!important;
  }
}