/* THE TIMER V1.0.50.2 — CORE HARDENING FIELD FIXES */
html[data-timer-version="1.0.50.2"] #sensorCard:not(.ready) .sensorStatus{opacity:.96}
html[data-timer-version="1.0.50.2"] #sensorCard.ready .sensorStatus:before{content:"MOUVEMENT TESTÉ · ";font-size:.72em;letter-spacing:.08em;opacity:.65}

/* ======================================================================
   MOBILE PLAYER LAYOUT
   V50.1 deliberately stops forcing the entire player UI into one 100dvh
   grid. The page may scroll naturally; only gameplay overlays own a fixed
   viewport. This prevents clipped names, buzzers, footer links and rules.
   ====================================================================== */
@media (max-width:900px) and (pointer:coarse){
  html,body{overflow-x:hidden!important;overscroll-behavior-y:auto!important}
  body:not(.v143HostMobile) #playerView:not(.hidden){
    position:relative!important;inset:auto!important;width:100%!important;height:auto!important;
    min-height:100dvh!important;overflow:visible!important;padding:0!important;touch-action:pan-y!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerTop{
    position:relative!important;box-sizing:border-box!important;height:auto!important;min-height:62px!important;
    padding:7px 12px!important;align-items:center!important;gap:10px!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerLogo{width:118px!important;height:54px!important;object-fit:contain!important;flex:0 0 auto!important}
  body:not(.v143HostMobile) #playerView .v32PlayerTopActions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:nowrap!important;margin-left:auto!important}
  body:not(.v143HostMobile) #playerView .v28IconAction{
    box-sizing:border-box!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
    flex:0 0 40px!important;padding:0!important;margin:0!important;border-radius:50%!important;
    display:grid!important;place-items:center!important;line-height:1!important;font-size:18px!important;text-align:center!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerMain{
    position:relative!important;box-sizing:border-box!important;height:auto!important;min-height:calc(100dvh - 62px)!important;
    display:flex!important;flex-direction:column!important;padding:0 14px max(18px,env(safe-area-inset-bottom))!important;overflow:visible!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerMeta{
    height:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    justify-content:flex-start!important;gap:7px!important;padding:8px 1px 12px!important;overflow:visible!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerMeta>div:first-child{width:100%!important;min-width:0!important}
  body:not(.v143HostMobile) #playerView .v28PlayerMeta .v28BlockLabel{font-size:8px!important}
  body:not(.v143HostMobile) #playerView #playerNameTitle{
    display:block!important;width:100%!important;max-width:100%!important;font-size:clamp(20px,6vw,28px)!important;line-height:1.08!important;
    margin-top:2px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;overflow:visible!important;
  }
  body:not(.v143HostMobile) #playerView .v28ModePill{
    align-self:flex-start!important;max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
    font-size:9px!important;line-height:1.2!important;padding:7px 10px!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerCenter{
    box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:0!important;flex:1 0 auto!important;
    justify-content:flex-start!important;overflow:visible!important;padding:22px 0 16px!important;gap:8px!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerMessage{
    width:100%!important;font-size:clamp(28px,9vw,48px)!important;line-height:.98!important;margin:0 0 7px!important;
    max-height:none!important;overflow:visible!important;overflow-wrap:anywhere!important;
  }
  body:not(.v143HostMobile) #playerView .v28PlayerHint{
    width:min(100%,560px)!important;font-size:clamp(12px,3.5vw,15px)!important;line-height:1.35!important;
    max-height:none!important;overflow:visible!important;margin:0 auto!important;
  }
  body:not(.v143HostMobile) #playerView .progressDots{margin:7px 0!important;min-height:0!important;flex-wrap:wrap!important}
  body:not(.v143HostMobile) #playerView #buzzBtn{
    width:min(70vw,265px)!important;height:min(70vw,265px)!important;min-width:0!important;min-height:0!important;max-height:none!important;
    flex:0 0 auto!important;margin:14px auto 10px!important;font-size:clamp(24px,7vw,38px)!important;
  }
  body:not(.v143HostMobile) #playerView .redlightState{font-size:10px!important;line-height:1.3!important;padding:7px 10px!important;margin-top:4px!important;max-width:100%!important}
  body:not(.v143HostMobile) #playerView .redlightBar{height:12px!important;width:min(88vw,420px)!important;margin:7px auto 0!important}
  body:not(.v143HostMobile) #playerView .v28PlayerBottom{
    box-sizing:border-box!important;width:100%!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;
    gap:8px!important;padding:12px 0 4px!important;min-height:0!important;max-height:none!important;overflow:visible!important;
  }
  body:not(.v143HostMobile) #playerView .v28Bonus{align-self:flex-start!important;font-size:10px!important;padding:6px 10px!important}
  body:not(.v143HostMobile) #playerView .v29NetWrap{width:100%!important;min-width:0!important;text-align:left!important}
  body:not(.v143HostMobile) #playerView .v28NetStatus{font-size:9px!important;line-height:1.35!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  body:not(.v143HostMobile) #playerView .v29ReconnectBtn{width:auto!important;min-height:32px!important;padding:0 10px!important;font-size:8px!important;margin-top:5px!important}
  body:not(.v143HostMobile) #playerView .v28Sensor{
    box-sizing:border-box!important;max-width:none!important;width:100%!important;padding:8px 10px!important;display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:5px 9px!important;
  }
  body:not(.v143HostMobile) #playerView .v28Sensor strong{font-size:9px!important;min-width:0!important}
  body:not(.v143HostMobile) #playerView .v28Sensor #sensorStatus{font-size:8px!important;line-height:1.3!important;white-space:normal!important;overflow:visible!important;grid-column:1/-1!important}
  body:not(.v143HostMobile) #playerView .v28Sensor .sensorButton{grid-column:1/-1!important;width:100%!important;margin:2px 0 0!important;padding:7px 9px!important;font-size:8px!important;min-height:32px!important}
  body:not(.v143HostMobile) #playerView .v28Sensor.ready{display:none!important}
  body:not(.v143HostMobile) #playerView .spectatorPanel{width:100%!important;max-height:none!important;overflow:visible!important;padding:8px!important}

  /* Public/legal links stay after the page, never over the gameplay content. */
  #v141PublicFooter{
    position:relative!important;inset:auto!important;z-index:2!important;width:100%!important;margin:12px 0 0!important;
    padding:14px 12px max(22px,env(safe-area-inset-bottom))!important;background:rgba(3,5,6,.78)!important;
    border-top:1px solid rgba(255,255,255,.05)!important;line-height:1.5!important;
  }

  /* Secondary rules/help guide: a true mobile sheet with its own scroll. */
  .v114GuideOverlay{align-items:flex-start!important;justify-content:center!important;overflow-y:auto!important;padding:max(10px,env(safe-area-inset-top)) 10px max(14px,env(safe-area-inset-bottom))!important}
  .v114GuidePanel{width:100%!important;max-width:620px!important;max-height:none!important;min-height:0!important;margin:auto 0!important;padding:15px!important;overflow:visible!important}
  .v114GuideTop{position:sticky!important;top:-1px!important;z-index:2!important;padding:3px 0 8px!important;margin-bottom:10px!important;background:linear-gradient(180deg,rgba(13,17,21,.995) 75%,rgba(13,17,21,0))!important}
  .v114GuideTop h2{font-size:21px!important;line-height:1.08!important}
  .v114GuideClose{display:grid!important;place-items:center!important;flex:0 0 40px!important;padding:0!important;line-height:1!important}
  .v114GuideCards{grid-template-columns:1fr!important;gap:8px!important}
  .v114GuideCard{padding:11px!important}.v114GuideCard span{font-size:11px!important;line-height:1.45!important}
  .v114GuideActions{position:sticky!important;bottom:-1px!important;z-index:2!important;padding:10px 0 2px!important;background:linear-gradient(0deg,rgba(5,8,10,.995) 75%,rgba(5,8,10,0))!important}

  /* Round briefing/rules: allow vertical scroll instead of clipping on short phones. */
  #briefingOverlay.briefingOverlay{align-items:flex-start!important;justify-content:center!important;overflow-y:auto!important;padding:max(10px,env(safe-area-inset-top)) 10px max(14px,env(safe-area-inset-bottom))!important}
  #briefingOverlay .briefingFrame{width:100%!important;max-width:620px!important;max-height:none!important;margin:auto 0!important;padding:18px 14px 16px!important}
  #briefingOverlay .briefingMode{font-size:clamp(30px,10vw,48px)!important;line-height:.98!important;margin-bottom:10px!important}
  #briefingOverlay .briefingRule{font-size:14px!important;line-height:1.38!important}
  #briefingOverlay .briefingSteps{grid-template-columns:1fr!important;gap:7px!important;margin:14px 0 12px!important}
  #briefingOverlay .briefStep{min-height:0!important;padding:10px!important;flex-direction:row!important;justify-content:flex-start!important;text-align:left!important}
  #briefingOverlay .briefingVoice{min-height:38px!important;margin:4px auto 10px!important;font-size:10px!important;line-height:1.35!important}
  #briefingOverlay .briefingCountdown{font-size:10px!important;margin-top:9px!important;letter-spacing:.18em!important}
}

@media (max-width:360px) and (pointer:coarse){
  body:not(.v143HostMobile) #playerView .v28PlayerTop{padding-left:9px!important;padding-right:9px!important}
  body:not(.v143HostMobile) #playerView .v28PlayerLogo{width:100px!important;height:48px!important}
  body:not(.v143HostMobile) #playerView .v28IconAction{width:37px!important;height:37px!important;min-width:37px!important;min-height:37px!important;flex-basis:37px!important;font-size:17px!important}
  body:not(.v143HostMobile) #playerView #buzzBtn{width:min(74vw,235px)!important;height:min(74vw,235px)!important}
}
