/* /pace_clock/pc-adaptive-display?v=33 */

#paceClockApp .pcAdaptiveDisplay[hidden],
#paceClockApp .pcAdaptiveClock[hidden]{
  display:none !important;
}

#paceClockApp .pcAdaptiveStage{
  position:relative;
  width:100%;
  min-width:0;
}

#paceClockApp .pcAdaptiveStage > .time{
  width:100%;
  box-sizing:border-box;
}

#paceClockApp.pc-adaptive-clocks-active .pcAdaptiveStage > .time{
  color:transparent;
  -webkit-text-fill-color:transparent;
  text-shadow:none;
  caret-color:transparent;
  user-select:none;
}

#paceClockApp .pcAdaptiveStage > .pcAdaptiveDisplay{
  position:absolute;
  z-index:2;
  inset:0;
  height:100%;
}

#paceClockApp.pc-adaptive-clocks-active #tvCircleTime{
  display:none !important;
}

#paceClockApp .pcAdaptiveLegacyHidden,
.pcAdaptiveLegacyHidden{
  display:none !important;
}

#paceClockApp .pcAdaptiveDisplay{
  width:100%;
  height:100%;
  box-sizing:border-box;
  color:#fff;
  border-radius:26px;
  border:0;
  background:transparent;
  box-shadow:none;
  overflow:hidden;
}

#paceClockApp .pcAdaptiveDisplayHeader,
#paceClockApp .pcAdaptiveDisplayFooter{display:none;}

#paceClockApp .pcAdaptiveDisplayHeading{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

#paceClockApp .pcAdaptiveDisplayHeading strong{
  font-size:14px;
  letter-spacing:.08em;
}

#paceClockApp .pcAdaptiveDisplayHeading span{
  font-size:13px;
  opacity:.8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#paceClockApp .pcAdaptiveDisplayBadges{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

#paceClockApp .pcAdaptiveDisplayBadges span{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  color:#063658;
  background:#d8f5ff;
}

#paceClockApp .pcAdaptiveClockGrid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
  gap:10px;
  padding:12px;
  width:100%;
  height:100%;
  box-sizing:border-box;
}

#paceClockApp .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockGrid{grid-template-columns:repeat(2,minmax(0,1fr));}

#paceClockApp .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockGrid{grid-template-columns:minmax(0,1fr);}

#paceClockApp .pcAdaptiveClock{
  --pc-group-rgb:121,220,255;
  --pc-group-color:rgb(var(--pc-group-rgb));
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  padding:14px;
  overflow:hidden;
  border-radius:18px;
  border:2px solid rgba(var(--pc-group-rgb),.88);
  background:rgba(3,43,70,.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 10px 28px rgba(0,17,33,.16);
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,opacity .18s ease,filter .18s ease;
}

#paceClockApp .pcAdaptiveClock::before{
  content:"";
  position:absolute;
  z-index:1;
  pointer-events:none;
  top:0;
  left:0;
  right:0;
  height:5px;
  background:var(--pc-group-color);
  box-shadow:0 0 18px rgba(var(--pc-group-rgb),.48);
}

#paceClockApp .pcAdaptiveClockMASTER{--pc-group-rgb:121,220,255;}

#paceClockApp .pcAdaptiveClockPC2{--pc-group-rgb:85,240,176;}

#paceClockApp .pcAdaptiveClockPC3{--pc-group-rgb:255,214,90;}

#paceClockApp .pcAdaptiveClock.is-starting{
  background:
    linear-gradient(145deg,rgba(var(--pc-group-rgb),.34),rgba(var(--pc-group-rgb),.12) 68%),
    rgba(255,255,255,.12);
  animation:pcAdaptiveGroupStart 1s cubic-bezier(.2,.8,.2,1) both;
}

#paceClockApp .pcAdaptiveClock.is-finished{
  opacity:.62;
  filter:saturate(.64);
  border-color:rgba(var(--pc-group-rgb),.5);
  background:
    linear-gradient(145deg,rgba(var(--pc-group-rgb),.08),rgba(var(--pc-group-rgb),.025) 62%),
    rgba(255,255,255,.055);
}

#paceClockApp .pcAdaptiveClock.is-finished::before{
  opacity:.58;
  box-shadow:none;
}

#paceClockApp .pcAdaptiveClock.is-warning{
  border-color:#ffd34f;
  background:
    linear-gradient(145deg,rgba(255,211,79,.24),rgba(255,211,79,.07) 68%),
    rgba(3,43,70,.34);
  box-shadow:
    0 0 0 3px rgba(255,211,79,.14),
    0 0 28px rgba(255,211,79,.3),
    inset 0 1px 0 rgba(255,255,255,.12);
}

#paceClockApp .pcAdaptiveClock.is-warning::before{
  background:#ffd34f;
  box-shadow:0 0 22px rgba(255,211,79,.58);
}

#paceClockApp .pcAdaptiveClock.is-warning .pcAdaptiveClockTop span{
  color:#2b2200;
  border-color:#ffd34f;
  background:#ffd34f;
}

#paceClockApp .pcAdaptiveClock.is-urgent{
  border-color:#ff6868;
  background:
    linear-gradient(145deg,rgba(255,84,84,.32),rgba(255,84,84,.09) 68%),
    rgba(3,43,70,.38);
  box-shadow:
    0 0 0 3px rgba(255,84,84,.18),
    0 0 34px rgba(255,84,84,.42),
    inset 0 1px 0 rgba(255,255,255,.14);
  animation:pcAdaptiveUrgent .72s ease-in-out infinite alternate;
}

#paceClockApp .pcAdaptiveClock.is-urgent::before{
  background:#ff6868;
  box-shadow:0 0 24px rgba(255,84,84,.68);
}

#paceClockApp .pcAdaptiveClock.is-urgent .pcAdaptiveClockTop span{
  color:#fff;
  border-color:#ff6868;
  background:#dc3030;
}

@keyframes pcAdaptiveUrgent{
  from{
    box-shadow:
      0 0 0 2px rgba(255,84,84,.12),
      0 0 22px rgba(255,84,84,.28),
      inset 0 1px 0 rgba(255,255,255,.12);
  }
  to{
    box-shadow:
      0 0 0 4px rgba(255,84,84,.22),
      0 0 38px rgba(255,84,84,.5),
      inset 0 1px 0 rgba(255,255,255,.16);
  }
}

/* The same signals for the original single Master Pace Clock. */
#paceClockApp:not(.pc-adaptive-clocks-active).pc-main-clock-starting #clockCard .pcAdaptiveStage > .time{
  border-color:#55f0b0;
  background:
    linear-gradient(145deg,rgba(85,240,176,.25),rgba(85,240,176,.07) 68%),
    rgba(0,0,0,.18);
  animation:pcMainClockStart 1s ease both;
}

#paceClockApp:not(.pc-adaptive-clocks-active).pc-main-clock-warning #clockCard .pcAdaptiveStage > .time{
  border-color:#ffd34f;
  background:
    linear-gradient(145deg,rgba(255,211,79,.25),rgba(255,211,79,.07) 68%),
    rgba(0,0,0,.18);
  box-shadow:
    0 0 0 3px rgba(255,211,79,.14),
    0 0 30px rgba(255,211,79,.3),
    inset 0 2px 0 rgba(255,255,255,.08);
}

#paceClockApp:not(.pc-adaptive-clocks-active).pc-main-clock-urgent #clockCard .pcAdaptiveStage > .time{
  border-color:#ff6868;
  background:
    linear-gradient(145deg,rgba(255,84,84,.3),rgba(255,84,84,.08) 68%),
    rgba(0,0,0,.18);
  animation:pcAdaptiveUrgent .72s ease-in-out infinite alternate;
}

@keyframes pcMainClockStart{
  0%{
    box-shadow:
      0 0 0 5px rgba(85,240,176,.2),
      0 0 42px rgba(85,240,176,.5),
      inset 0 0 30px rgba(85,240,176,.14);
  }
  100%{
    box-shadow:inset 0 2px 0 rgba(255,255,255,.06);
  }
}

@keyframes pcAdaptiveGroupStart{
  0%{
    border-color:var(--pc-group-color);
    box-shadow:
      0 0 0 5px rgba(var(--pc-group-rgb),.22),
      0 0 44px rgba(var(--pc-group-rgb),.58),
      inset 0 0 34px rgba(var(--pc-group-rgb),.18);
  }
  48%{
    box-shadow:
      0 0 0 3px rgba(var(--pc-group-rgb),.14),
      0 0 28px rgba(var(--pc-group-rgb),.38),
      inset 0 0 22px rgba(var(--pc-group-rgb),.12);
  }
  100%{
    border-color:rgba(var(--pc-group-rgb),.88);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.12),
      0 10px 28px rgba(0,17,33,.16);
  }
}

#paceClockApp .pcAdaptiveClockTop,
#paceClockApp .pcAdaptiveClockMeta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

#paceClockApp .pcAdaptiveClockTop strong{
  font-size:17px;
  letter-spacing:.12em;
}

#paceClockApp .pcAdaptiveClockTop span{
  padding:4px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  color:var(--pc-group-color);
  border:1px solid rgba(var(--pc-group-rgb),.34);
  background:rgba(var(--pc-group-rgb),.13);
}

#paceClockApp .pcAdaptiveClock.is-starting .pcAdaptiveClockTop span{
  color:#052c42;
  border-color:var(--pc-group-color);
  background:var(--pc-group-color);
}

#paceClockApp .pcAdaptiveClockTime{
  padding:10px 0 12px;
  font-size:clamp(34px,5.2vw,76px);
  line-height:1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.045em;
  white-space:nowrap;
  text-shadow:0 4px 18px rgba(0,17,33,.25);
}

#paceClockApp .pcAdaptiveClock.is-starting .pcAdaptiveClockTime{
  text-shadow:0 0 24px rgba(var(--pc-group-rgb),.4);
}

#paceClockApp .pcAdaptiveClockMeta{
  align-items:flex-end;
  margin-top:auto;
}

/* Main screen: give the three clocks enough room inside the old time panel. */
#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveStage > .time{min-height:142px;}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockGrid{
  gap:8px;
  padding:8px;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClock{
  padding:5px 10px;
  border-radius:15px;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClock::before{height:4px;}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTop strong{font-size:14px;}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTop span{
  padding:3px 6px;
  font-size:8px;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTime{
  margin:auto 0;
  padding:0;
  font-size:clamp(48px,6.5vw,78px);
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta{
  gap:8px;
  margin-top:0;
  padding:3px 4px 1px;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta strong{
  font-size:18px;
  font-weight:900;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta span{
  font-size:16px;
  font-weight:800;
  opacity:1;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta strong{font-size:20px;}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta span{font-size:18px;}

/* Three compact clocks need their own scale on the main Pace Clock screen. */
#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockTime{font-size:clamp(42px,5.7vw,60px);}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta{
  align-items:center;
  gap:5px;
  padding:2px 3px 3px;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta strong{
  font-size:13px;
  line-height:1.05;
}

#paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta span{
  font-size:11px;
  line-height:1.05;
}

#paceClockApp .pcAdaptiveClockMeta strong{
  font-size:12px;
  color:var(--pc-group-color);
  white-space:nowrap;
}

#paceClockApp .pcAdaptiveClockMeta span{
  min-width:0;
  font-size:11px;
  text-align:right;
  opacity:.82;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#paceClockApp .pcAdaptiveDisplayFooter strong{
  font-size:14px;
  letter-spacing:.13em;
}

#paceClockApp .pcAdaptiveDisplayFooter span{
  font-size:13px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

/* Adaptive clocks use the old Pace Clock panel as their stage. */
#paceClockApp.mode-tv.pc-adaptive-clocks-active:not(.tv-layout-dashboard) .pcTvDashboard{
  display:none !important;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-active.tv-layout-dashboard .pcTvDashboard{
  display:grid !important;
  visibility:visible !important;
}

#paceClockApp.mode-tv .pcAdaptiveDisplay{
  border-radius:26px;
  border:0;
  background:transparent;
  box-shadow:none;
}

#paceClockApp.mode-tv .pcAdaptiveDisplayHeader,
#paceClockApp.mode-tv .pcAdaptiveDisplayFooter{
  gap:28px;
  padding:clamp(15px,2vh,25px) clamp(22px,2.3vw,38px);
}

#paceClockApp.mode-tv .pcAdaptiveDisplayHeading strong{font-size:clamp(16px,1.5vw,24px);}

#paceClockApp.mode-tv .pcAdaptiveDisplayHeading span{font-size:clamp(13px,1.15vw,19px);}

#paceClockApp.mode-tv .pcAdaptiveDisplayBadges span{
  padding:9px 14px;
  font-size:clamp(12px,1vw,16px);
}

#paceClockApp.mode-tv .pcAdaptiveClockGrid{
  height:100%;
  gap:clamp(12px,1.4vw,24px);
  padding:clamp(16px,2vw,30px);
}

#paceClockApp.mode-tv .pcAdaptiveClock{
  min-height:0;
  padding:clamp(16px,1.7vw,24px);
  border-radius:28px;
  border-width:3px;
}

#paceClockApp.mode-tv .pcAdaptiveClockTop strong{font-size:clamp(20px,2vw,31px);}

#paceClockApp.mode-tv .pcAdaptiveClockTop span{
  padding:7px 11px;
  font-size:clamp(10px,.9vw,14px);
}

#paceClockApp.mode-tv .pcAdaptiveClockTime{
  margin:auto 0;
  padding:0;
  font-size:clamp(170px,16.2vw,310px);
  letter-spacing:-.07em;
}

#paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{font-size:clamp(190px,18vw,350px);}

#paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockTime{font-size:clamp(220px,22vw,430px);}

#paceClockApp.mode-tv .pcAdaptiveClockMeta{
  align-items:center;
  gap:8px;
  margin-top:0;
  padding:10px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  background:rgba(0,22,38,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

#paceClockApp.mode-tv .pcAdaptiveClockMeta strong{
  font-size:clamp(48px,3.75vw,72px);
  font-weight:900;
  letter-spacing:-.03em;
}

#paceClockApp.mode-tv .pcAdaptiveClockMeta span{
  font-size:clamp(42px,3.25vw,62px);
  font-weight:850;
  letter-spacing:-.025em;
  opacity:1;
}

#paceClockApp.mode-tv .pcAdaptiveDisplayFooter strong{font-size:clamp(17px,1.6vw,26px);}

#paceClockApp.mode-tv .pcAdaptiveDisplayFooter span{font-size:clamp(15px,1.4vw,23px);}

@media (max-width:899px){
  #paceClockApp.mode-tv .pcAdaptiveDisplay{border-radius:22px;}
}

/* Medium desktop / laptop TV. */
@media (min-width:1401px) and (max-width:1699px){
  #paceClockApp.mode-tv .pcAdaptiveClockGrid{
    gap:16px;
    padding:20px;
  }

  #paceClockApp.mode-tv .pcAdaptiveClock{padding:18px;}

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockTime{font-size:clamp(150px,11.5vw,195px);}

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{font-size:clamp(190px,15vw,250px);}

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockTime{font-size:clamp(240px,20vw,330px);}

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta strong{font-size:30px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta span{font-size:26px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta strong{font-size:38px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta span{font-size:32px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockMeta strong{font-size:48px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockMeta span{font-size:40px;}
}

/* Large tablet / compact laptop TV. */
@media (min-width:901px) and (max-width:1400px){
  #paceClockApp.mode-tv .pcAdaptiveClockGrid{
    gap:12px;
    padding:14px;
  }

  #paceClockApp.mode-tv .pcAdaptiveClock{
    padding:14px;
    border-radius:22px;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockTime{
    font-size:clamp(84px,9.5vw,124px);
    letter-spacing:-.055em;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{
    font-size:clamp(120px,13vw,180px);
    letter-spacing:-.055em;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockTime{font-size:clamp(150px,16vw,220px);}

  #paceClockApp.mode-tv .pcAdaptiveClockMeta{
    gap:5px;
    padding:7px;
    border-radius:10px;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta strong{font-size:20px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta span{font-size:18px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta strong{font-size:28px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta span{font-size:24px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockMeta strong{font-size:36px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockMeta span{font-size:31px;}
}

/* Small tablet TV: keep all three groups readable in portrait or landscape. */
@media (min-width:701px) and (max-width:900px){
  #paceClockApp.mode-tv .pcAdaptiveClockGrid{
    gap:8px;
    padding:10px;
  }

  #paceClockApp.mode-tv .pcAdaptiveClock{
    padding:10px;
    border-radius:18px;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockTime{
    font-size:clamp(62px,9.4vw,80px);
    letter-spacing:-.05em;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{
    font-size:clamp(90px,13.2vw,118px);
    letter-spacing:-.05em;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockTime{font-size:clamp(116px,18vw,160px);}

  #paceClockApp.mode-tv .pcAdaptiveClockMeta{
    gap:4px;
    padding:6px;
    border-radius:9px;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta strong{font-size:17px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockMeta span{font-size:15px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta strong{font-size:22px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta span{font-size:19px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockMeta strong{font-size:28px;}
  #paceClockApp.mode-tv .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockMeta span{font-size:24px;}
}

@media (max-width:700px){
  #paceClockApp.mode-tv .pcAdaptiveDisplayHeader,
  #paceClockApp.mode-tv .pcAdaptiveDisplayFooter{
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }

  #paceClockApp.mode-tv .pcAdaptiveDisplayBadges{justify-content:flex-start;}

  #paceClockApp.mode-tv .pcAdaptiveClockGrid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    padding:8px;
  }

  #paceClockApp.mode-tv .pcAdaptiveClock{
    padding:10px 7px;
    border-radius:16px;
  }

  #paceClockApp.mode-tv .pcAdaptiveClockTop,
  #paceClockApp.mode-tv .pcAdaptiveClockMeta{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }

  #paceClockApp.mode-tv .pcAdaptiveClockMeta{padding:8px;}

  #paceClockApp.mode-tv .pcAdaptiveClockMeta strong{font-size:16px;}

  #paceClockApp.mode-tv .pcAdaptiveClockMeta span{font-size:14px;}

  #paceClockApp.mode-tv .pcAdaptiveClockTime{
    padding:12px 0;
    font-size:clamp(27px,8vw,52px);
  }

  #paceClockApp.mode-tv .pcAdaptiveClockMeta span{text-align:left;}
}

/* When every optional TV detail is hidden, stack inside the same old panel. */
#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockGrid{
  grid-template-columns:1fr;
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:clamp(10px,1.5vh,18px);
  padding:clamp(12px,1.5vw,22px);
}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockGrid{grid-template-rows:repeat(2,minmax(0,1fr));}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveDisplay[data-clock-count="1"] .pcAdaptiveClockGrid{grid-template-rows:minmax(0,1fr);}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClock{
  display:grid;
  grid-template-columns:minmax(150px,.62fr) minmax(300px,1.35fr) minmax(210px,1fr);
  align-items:center;
  gap:clamp(18px,2vw,36px);
  min-height:0;
  padding:clamp(7px,1vh,12px) clamp(20px,2.2vw,36px);
}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockTop{
  align-items:flex-start;
  justify-content:center;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockTop span{display:none;}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockTime{
  padding:0;
  font-size:clamp(44px,6.5vh,76px);
  text-align:center;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockMeta{
  align-items:flex-end;
  flex-direction:column;
  justify-content:center;
  margin-top:0;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockMeta strong{font-size:clamp(18px,1.35vw,24px);}

#paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockMeta span{
  font-size:clamp(15px,1.1vw,20px);
  text-align:right;
}

@media (max-width:900px){
  #paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClock{
    grid-template-columns:minmax(90px,.55fr) minmax(210px,1.45fr);
    gap:10px;
    min-height:0;
    padding:10px 14px;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockTime{font-size:clamp(40px,7vh,58px);}

  #paceClockApp.mode-tv.pc-adaptive-clocks-stacked .pcAdaptiveClockMeta{display:none;}
}

@media (prefers-reduced-motion:reduce){
  #paceClockApp .pcAdaptiveClock{transition:none;}

  #paceClockApp .pcAdaptiveClock.is-starting{
    animation:none;
    border-color:var(--pc-group-color);
    box-shadow:
      0 0 0 5px rgba(var(--pc-group-rgb),.2),
      0 0 34px rgba(var(--pc-group-rgb),.42);
  }

  #paceClockApp .pcAdaptiveClock.is-urgent{animation:none;}

  #paceClockApp.pc-main-clock-starting #clockCard .pcAdaptiveStage > .time,
  #paceClockApp.pc-main-clock-urgent #clockCard .pcAdaptiveStage > .time{animation:none;}
}

/*
 * TV visibility is the final contract.
 * Some legacy layout rules restore these cards with display:flex !important;
 * these later, more specific selectors keep the coach's switches authoritative.
 */
#paceClockApp.mode-tv.tv-hide-block #clockCard #setStatus{
  display:none !important;
}

#paceClockApp.mode-tv.tv-hide-rep #clockCard #repStatus{
  display:none !important;
}

#paceClockApp.mode-tv.tv-hide-round #clockCard #roundStatus,
#paceClockApp.mode-tv.tv-hide-round #clockCard #roundSlot,
#paceClockApp.mode-tv.tv-hide-round #clockCard #roundInlineControl{
  display:none !important;
}

#paceClockApp.mode-tv.tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance #clockCard .status{
  display:none !important;
}

/* When the lower status row is hidden, give its free space to the clocks. */
@media (min-width:901px){
  #paceClockApp.mode-tv.pc-adaptive-clocks-active.tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcAdaptiveStage > .time{min-height:clamp(460px,68vh,760px);}
}

@media (min-width:561px) and (max-width:900px){
  #paceClockApp.mode-tv.pc-adaptive-clocks-active.tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcAdaptiveStage > .time{min-height:clamp(300px,62vh,480px);}
}

/* Default layout: visible status cards always share the available width. */
#paceClockApp.mode-tv.tv-layout-default.tv-hide-block #clockCard .status,
#paceClockApp.mode-tv.tv-layout-default.tv-hide-rep #clockCard .status,
#paceClockApp.mode-tv.tv-layout-default.tv-hide-round #clockCard .status{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}

#paceClockApp.mode-tv.tv-layout-default.tv-hide-block.tv-hide-rep #clockCard .status,
#paceClockApp.mode-tv.tv-layout-default.tv-hide-block.tv-hide-round #clockCard .status,
#paceClockApp.mode-tv.tv-layout-default.tv-hide-rep.tv-hide-round #clockCard .status{
  grid-template-columns:minmax(0,1fr) !important;
}

/* Tablet: three clocks remain side by side and readable. */
@media (min-width:561px) and (max-width:900px){
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveStage > .time{min-height:140px;}

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockGrid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-auto-rows:minmax(0,1fr);
    gap:7px;
    padding:7px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClock{
    display:flex;
    padding:6px 8px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTime{font-size:clamp(43px,7.2vw,66px);}
}

/* Phone: each group becomes one compact row so all three times stay visible. */
@media (max-width:560px){
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveStage > .time{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:240px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockGrid,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockGrid{
    grid-template-columns:1fr;
    grid-template-rows:none;
    grid-auto-rows:minmax(0,1fr);
    gap:6px;
    padding:6px;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveStage > .time{
    min-height:clamp(250px,52vh,430px) !important;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClock,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClock{
    display:grid;
    grid-template-columns:minmax(58px,.62fr) minmax(130px,1.75fr) minmax(42px,.48fr);
    align-items:center;
    gap:7px;
    min-height:0;
    padding:5px 8px;
    border-width:2px;
    border-radius:15px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTop,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockTop{
    align-items:flex-start;
    flex-direction:column;
    justify-content:center;
    gap:3px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTop strong,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockTop strong{
    font-size:13px;
    letter-spacing:.08em;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTop span,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockTop span{
    padding:2px 5px;
    font-size:7px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTime,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockTime{
    margin:0;
    padding:0;
    font-size:clamp(35px,11.5vw,48px);
    line-height:1;
    text-align:center;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockMeta{
    display:flex;
    align-items:flex-end;
    flex-direction:column;
    justify-content:center;
    margin:0;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta strong,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockMeta strong{
    font-size:9px;
    text-align:right;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta span,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockMeta span{display:none;}
}


/* =========================================================
   Main Pace Clock: stable two-group cards
   Use the proven compact three-group typography so the lower metadata row
   remains fully visible instead of being clipped by the legacy time panel.
   ========================================================= */

@media (min-width:561px){
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{
    font-size:clamp(42px,5.7vw,60px) !important;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta{
    align-items:center !important;
    gap:5px !important;
    padding:2px 3px 3px !important;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta strong{
    font-size:13px !important;
    line-height:1.05 !important;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockMeta span{
    font-size:11px !important;
    line-height:1.05 !important;
  }
}


/* =========================================================
   Large TV Coach focus
   When Current Set + Next Up are the only detail cards, use more of the
   available screen height while preserving a safe edge area for TVs.
   ========================================================= */

@media (min-width:1401px) and (min-height:820px){
  #paceClockApp.mode-tv.tv-layout-coach.pc-adaptive-clocks-active:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcAdaptiveStage > .time{
    height:clamp(560px,56dvh,760px) !important;
    min-height:clamp(560px,56dvh,760px) !important;
    max-height:clamp(560px,56dvh,760px) !important;
  }
}

@media (max-width:380px){
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveStage > .time{min-height:225px;}

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClock,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClock{
    grid-template-columns:minmax(54px,.58fr) minmax(124px,1.8fr) minmax(40px,.45fr);
    gap:5px;
    padding:4px 6px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTime,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockTime{font-size:clamp(34px,10.8vw,41px);}
}

/* =========================================================
   PHONE — FINAL ADAPTIVE LAYOUT
   ========================================================= */
@media (max-width:560px){
  /* Normal Pace Clock and TV use the same stable three-part clock row. */
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClock,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClock{
    grid-template-columns:minmax(50px,.52fr) minmax(112px,1.18fr) minmax(76px,.76fr);
    gap:5px;
    padding:5px 7px;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockTime,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockTime{
    min-width:0;
    font-size:clamp(34px,11.2vw,46px);
    letter-spacing:-.055em;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockMeta{
    min-width:0;
    align-items:flex-end;
    overflow:visible;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveClockMeta strong,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockMeta strong{
    max-width:none;
    font-size:clamp(10px,2.8vw,12px);
    line-height:1;
    overflow:visible;
    text-overflow:clip;
    white-space:nowrap;
  }

  /* Full-screen TV starts at the safe top edge instead of being vertically centred. */
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #screenClock{
    box-sizing:border-box !important;
    align-items:flex-start !important;
    justify-content:center !important;
    height:100dvh !important;
    padding:
      max(10px,env(safe-area-inset-top))
      6px
      calc(128px + env(safe-area-inset-bottom)) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active #clockCard{
    width:100% !important;
    max-width:none !important;
    margin:0 auto !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveStage > .time{
    min-height:clamp(300px,44dvh,380px) !important;
    max-height:380px !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClockGrid{
    gap:6px;
    padding:6px;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active .pcAdaptiveClock{border-radius:18px;}

  /* Keep Block, Rep and Round in one compact row below the clocks. */
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #clockCard .status{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;
    width:100% !important;
    margin-top:8px !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active #roundSlot{
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active #setStatus,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #repStatus,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #roundStatus{
    width:100% !important;
    min-width:0 !important;
    min-height:74px !important;
    max-height:74px !important;
    margin:0 !important;
    padding:6px 4px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:2px !important;
    border-radius:14px !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active #setStatus span,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #repStatus span,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #roundStatus span{
    min-width:0 !important;
    font-size:9px !important;
    line-height:1 !important;
    letter-spacing:.12em !important;
    text-align:center !important;
    white-space:nowrap !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active #setStatus strong,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #repStatus strong,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #roundStatus strong{
    min-width:0 !important;
    font-size:clamp(26px,8vw,32px) !important;
    line-height:1 !important;
    text-align:center !important;
    white-space:nowrap !important;
  }

  #paceClockApp.mode-tv.pc-adaptive-clocks-active #setStatus em,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #repStatus em,
  #paceClockApp.mode-tv.pc-adaptive-clocks-active #roundStatus em{
    min-width:0 !important;
    font-size:9px !important;
    line-height:1 !important;
    text-align:center !important;
    white-space:nowrap !important;
  }
}

/* Tablet main screen: two groups can use more width than three groups. */
@media (min-width:901px) and (max-width:1400px){
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockTime{
    font-size:clamp(52px,5.8vw,68px);
    letter-spacing:-.05em;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{
    font-size:clamp(62px,7vw,82px);
    letter-spacing:-.05em;
  }
}

@media (min-width:561px) and (max-width:900px){
  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="3"] .pcAdaptiveClockTime{
    font-size:clamp(44px,6.2vw,58px);
    letter-spacing:-.045em;
  }

  #paceClockApp.mode-clock.pc-adaptive-clocks-active .pcAdaptiveDisplay[data-clock-count="2"] .pcAdaptiveClockTime{
    font-size:clamp(54px,7.8vw,70px);
    letter-spacing:-.045em;
  }
}

/* =========================================================
   Adaptive groups + TV colour styles
   Hide the legacy single clock without removing its layout space.
   Apply the selected Pool LED colour to the real group clocks.
   ========================================================= */

#paceClockApp.pc-adaptive-clocks-active .pcAdaptiveStage > .time{
  visibility:hidden !important;
}

#paceClockApp.pc-adaptive-clocks-active .pcAdaptiveStage > .pcAdaptiveDisplay{
  visibility:visible !important;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-active.tv-style-poolRed .pcAdaptiveClockTime{
  color:#ff3b30 !important;
  text-shadow:
    0 0 8px rgba(255,59,48,.95),
    0 0 22px rgba(255,59,48,.64) !important;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-active.tv-style-poolGreen .pcAdaptiveClockTime{
  color:#20ff38 !important;
  text-shadow:
    0 0 8px rgba(32,255,56,.95),
    0 0 22px rgba(32,255,56,.64) !important;
}

#paceClockApp.mode-tv.pc-adaptive-clocks-active.tv-style-poolAmber .pcAdaptiveClockTime{
  color:#ffc400 !important;
  text-shadow:
    0 0 8px rgba(255,196,0,.95),
    0 0 22px rgba(255,196,0,.64) !important;
}


/* =========================================================
   Coach focus: only Current Set + Next Up are enabled
   Keep both cards in one equal row and scale them for poolside reading.
   ========================================================= */

#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachSets{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:clamp(18px,1.6vw,30px) !important;
  margin-top:clamp(18px,2vh,30px) !important;
}

#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachCurrent,
#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachNext{
  min-height:clamp(150px,18vh,250px) !important;
  padding:clamp(22px,2vw,36px) !important;
  border-radius:clamp(20px,1.7vw,30px) !important;
}

#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachLabel{
  margin-bottom:clamp(10px,1vh,16px) !important;
  font-size:clamp(17px,1.15vw,24px) !important;
}

#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachCurrent strong,
#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachNext strong{
  font-size:clamp(44px,4vw,78px) !important;
  line-height:1 !important;
}

#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance #pcTvCoachCurrentMeta,
#paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance #pcTvCoachNextMeta{
  margin-top:clamp(10px,1vh,16px) !important;
  font-size:clamp(20px,1.5vw,30px) !important;
  line-height:1.15 !important;
}

@media (max-width:900px){
  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachSets{
    gap:10px !important;
  }

  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachCurrent,
  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachNext{
    min-height:130px !important;
    padding:16px !important;
  }

  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachCurrent strong,
  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance .pcTvCoachNext strong{
    font-size:clamp(30px,4.8vw,44px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance #pcTvCoachCurrentMeta,
  #paceClockApp.mode-tv.tv-layout-coach:not(.tv-hide-current):not(.tv-hide-next).tv-hide-block.tv-hide-rep.tv-hide-round.tv-hide-progress.tv-hide-distance #pcTvCoachNextMeta{
    font-size:clamp(16px,2.4vw,22px) !important;
  }
}



/* =========================================================
   TV Coach structured workout details
   Keep complete, bounded text visible without ellipses.
   ========================================================= */

#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachCurrent,
#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachNext{
  justify-content:flex-start !important;
  min-height:0 !important;
  overflow:visible !important;
}

#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachCurrent strong,
#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachNext strong,
#paceClockApp.mode-tv.tv-layout-coach #pcTvCoachCurrentMeta,
#paceClockApp.mode-tv.tv-layout-coach #pcTvCoachNextMeta{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:baseline !important;
  align-content:flex-start !important;
  justify-content:flex-start !important;
  width:100% !important;
  max-width:100% !important;
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:normal !important;
  word-break:normal !important;
}

#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachCurrent strong,
#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachNext strong{
  gap:.18em .34em !important;
  font-size:clamp(28px,2.2vw,46px) !important;
  line-height:1.08 !important;
}

#paceClockApp.mode-tv.tv-layout-coach #pcTvCoachCurrentMeta,
#paceClockApp.mode-tv.tv-layout-coach #pcTvCoachNextMeta{
  gap:.2em .5em !important;
  margin-top:clamp(10px,1vh,16px) !important;
  font-size:clamp(15px,1.05vw,21px) !important;
  line-height:1.2 !important;
}

#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachTextPart{
  display:inline-block !important;
  min-width:0 !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}

#paceClockApp.mode-tv.tv-layout-coach .pcTvCoachLabel{
  max-width:100% !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}

#paceClockApp.mode-tv.tv-layout-coach #pcTvCoachCurrentMeta:empty,
#paceClockApp.mode-tv.tv-layout-coach #pcTvCoachNextMeta:empty{
  display:none !important;
}

@media (max-width:900px){
  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachCurrent,
  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachNext{
    min-height:140px !important;
  }

  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachCurrent strong,
  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachNext strong{
    font-size:clamp(22px,3.1vw,34px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-coach #pcTvCoachCurrentMeta,
  #paceClockApp.mode-tv.tv-layout-coach #pcTvCoachNextMeta{
    font-size:clamp(13px,1.8vw,18px) !important;
  }
}

@media (max-width:560px){
  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachSets{
    grid-template-columns:1fr !important;
  }

  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachCurrent,
  #paceClockApp.mode-tv.tv-layout-coach .pcTvCoachNext{
    min-height:0 !important;
  }
}


/* =========================================================
   TV Dashboard v6: balanced, readable and adaptive layout
   ========================================================= */

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashboard{
  --pc-dash-gap:clamp(12px,1.05vw,20px);
  --pc-dash-radius:clamp(18px,1.5vw,30px);
  box-sizing:border-box !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) auto !important;
  gap:var(--pc-dash-gap) !important;
  width:100vw !important;
  height:100dvh !important;
  min-height:0 !important;
  padding:
    max(16px,env(safe-area-inset-top))
    max(24px,env(safe-area-inset-right))
    max(58px,env(safe-area-inset-bottom))
    max(24px,env(safe-area-inset-left)) !important;
  overflow:hidden !important;
  isolation:isolate !important;
  background:
    radial-gradient(circle at 48% 46%,rgba(85,211,255,.2),transparent 34%),
    radial-gradient(circle at 8% 96%,rgba(0,73,136,.36),transparent 30%),
    linear-gradient(135deg,#08649a 0%,#0799dc 52%,#047fbd 100%) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBackground{
  background:
    radial-gradient(circle at 49% 42%,rgba(97,218,255,.19),transparent 30%),
    linear-gradient(180deg,rgba(0,38,75,.16),transparent 31%,rgba(0,37,74,.1)) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashGrid{
  opacity:.22 !important;
  background-size:52px 52px !important;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),transparent 74%) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeader{
  position:relative !important;
  z-index:2 !important;
  display:grid !important;
  grid-template-columns:minmax(190px,1fr) minmax(260px,1.6fr) minmax(120px,1fr) !important;
  align-items:center !important;
  gap:18px !important;
  min-height:58px !important;
  padding:8px 14px !important;
  border:1px solid rgba(142,225,255,.28) !important;
  border-radius:18px !important;
  background:rgba(3,74,121,.34) !important;
  box-shadow:0 16px 36px rgba(0,48,86,.16) !important;
  backdrop-filter:blur(12px) saturate(120%) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBrand,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeaderCenter,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRealClock{
  min-width:0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeaderCenter{
  text-align:center !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashWorkoutTitle{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:clamp(17px,1.25vw,24px) !important;
  line-height:1.05 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRealClock{
  justify-self:end !important;
  text-align:right !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBody{
  position:relative !important;
  z-index:2 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) clamp(270px,18vw,350px) !important;
  gap:var(--pc-dash-gap) !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrent{
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:clamp(16px,1.35vw,26px) !important;
  overflow:hidden !important;
  border:1px solid rgba(141,226,255,.36) !important;
  border-radius:var(--pc-dash-radius) !important;
  background:
    linear-gradient(145deg,rgba(1,74,124,.68),rgba(0,108,163,.3)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 24px 52px rgba(0,41,78,.22) !important;
  backdrop-filter:blur(12px) saturate(118%) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashSectionHeading{
  min-width:0 !important;
  padding:0 2px clamp(8px,1vh,14px) !important;
  border-bottom:1px solid rgba(151,226,255,.18) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentLine{
  display:grid !important;
  grid-template-columns:minmax(0,auto) minmax(120px,1fr) !important;
  align-items:baseline !important;
  gap:clamp(12px,1.2vw,24px) !important;
  min-width:0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentTitle{
  display:block !important;
  width:auto !important;
  max-width:none !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  text-transform:none !important;
  font-size:clamp(28px,2.35vw,46px) !important;
  line-height:1.05 !important;
  letter-spacing:-.025em !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentMeta{
  display:block !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:clamp(15px,1.02vw,20px) !important;
  line-height:1.2 !important;
  opacity:.86 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerArea{
  display:grid !important;
  place-items:center !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:clamp(6px,1vh,14px) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerRing{
  width:min(57dvh,42vw,600px) !important;
  height:min(57dvh,42vw,600px) !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;
  aspect-ratio:1 !important;
  border-radius:50% !important;
  box-shadow:
    0 0 0 1px rgba(153,231,255,.18),
    0 0 48px rgba(77,210,255,.26),
    0 34px 70px rgba(0,37,72,.3) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerInner{
  position:absolute !important;
  inset:clamp(12px,1vw,18px) !important;
  z-index:2 !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  height:auto !important;
  padding:clamp(18px,2vw,36px) !important;
  border:1px solid rgba(160,231,255,.16) !important;
  border-radius:50% !important;
  box-shadow:
    inset 0 0 70px rgba(0,33,70,.38),
    0 0 22px rgba(77,210,255,.12) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashPhase{
  margin-bottom:clamp(7px,.8vh,12px) !important;
  font-size:clamp(13px,.9vw,18px) !important;
  letter-spacing:.22em !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTime{
  font-size:clamp(78px,7.1vw,144px) !important;
  line-height:.88 !important;
  letter-spacing:-.065em !important;
  font-variant-numeric:tabular-nums !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInterval{
  margin-top:clamp(10px,1.2vh,18px) !important;
  font-size:clamp(13px,.95vw,19px) !important;
  letter-spacing:.1em !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStats{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:center !important;
  gap:var(--pc-dash-gap) !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStat{
  box-sizing:border-box !important;
  display:flex !important;
  flex:1 1 0 !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-width:0 !important;
  min-height:112px !important;
  max-height:230px !important;
  padding:clamp(15px,1.4vw,26px) !important;
  border:1px solid rgba(146,225,255,.34) !important;
  border-radius:var(--pc-dash-radius) !important;
  background:
    linear-gradient(155deg,rgba(0,72,120,.78),rgba(0,99,154,.46)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 20px 38px rgba(0,45,82,.18) !important;
  backdrop-filter:blur(10px) saturate(115%) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-block .pcTvDashStatBlock,
#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-rep .pcTvDashStatMain,
#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-round .pcTvDashStatRound{
  display:none !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStatLabel{
  margin-bottom:clamp(7px,.8vh,12px) !important;
  font-size:clamp(12px,.78vw,16px) !important;
  letter-spacing:.2em !important;
  opacity:.76 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStatValue,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRepValue{
  font-size:clamp(54px,4.9vw,96px) !important;
  line-height:.9 !important;
  letter-spacing:-.055em !important;
  font-variant-numeric:tabular-nums !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRepValue span,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRepValue b{
  font-size:.58em !important;
  opacity:.58 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashFooter{
  position:relative !important;
  z-index:2 !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:stretch !important;
  gap:var(--pc-dash-gap) !important;
  min-width:0 !important;
  min-height:132px !important;
  height:auto !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoCard{
  box-sizing:border-box !important;
  min-width:0 !important;
  min-height:132px !important;
  height:auto !important;
  padding:clamp(14px,1.15vw,22px) !important;
  overflow:hidden !important;
  border:1px solid rgba(150,227,255,.36) !important;
  border-radius:clamp(16px,1.15vw,22px) !important;
  background:
    linear-gradient(145deg,rgba(0,70,119,.76),rgba(0,105,161,.52)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 18px 36px rgba(0,43,79,.17) !important;
  backdrop-filter:blur(10px) saturate(116%) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextCard{
  flex:1.4 1 0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressCard,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceCard{
  flex:1 1 0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-next .pcTvDashNextCard,
#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-progress .pcTvDashProgressCard,
#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-distance .pcTvDashDistanceCard{
  display:none !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard.tv-hide-local-time .pcTvDashRealClock{
  visibility:hidden !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoIcon{
  flex:0 0 clamp(36px,2.6vw,50px) !important;
  width:clamp(36px,2.6vw,50px) !important;
  height:clamp(36px,2.6vw,50px) !important;
  margin-right:clamp(10px,.8vw,16px) !important;
  border-radius:13px !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoContent{
  min-width:0 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoLabel{
  font-size:clamp(11px,.68vw,14px) !important;
  letter-spacing:.18em !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextTitle{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  text-transform:none !important;
  font-size:clamp(19px,1.45vw,29px) !important;
  line-height:1.05 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextMeta,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressMeta{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:clamp(12px,.78vw,16px) !important;
  line-height:1.15 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressValue{
  font-size:clamp(30px,2.35vw,46px) !important;
  line-height:.95 !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressTrack{
  height:clamp(7px,.65vw,11px) !important;
  margin:clamp(8px,.7vh,12px) 0 !important;
  border-radius:999px !important;
  overflow:hidden !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceValue{
  display:flex !important;
  align-items:baseline !important;
  flex-wrap:nowrap !important;
  gap:.25em !important;
  min-width:0 !important;
  white-space:nowrap !important;
  font-size:clamp(15px,1.05vw,21px) !important;
}

#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceValue strong,
#paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceValue b{
  font-size:clamp(32px,2.7vw,52px) !important;
  line-height:.95 !important;
  letter-spacing:-.045em !important;
}


/* Laptop and compact landscape screens */
@media (max-width:1400px){
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashboard{
    --pc-dash-gap:clamp(9px,1vw,14px);
    padding:
      max(10px,env(safe-area-inset-top))
      max(14px,env(safe-area-inset-right))
      max(48px,env(safe-area-inset-bottom))
      max(14px,env(safe-area-inset-left)) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeader{
    min-height:50px !important;
    padding:6px 11px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBody{
    grid-template-columns:minmax(0,1fr) clamp(200px,18vw,260px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrent{
    padding:clamp(11px,1.2vw,18px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerRing{
    width:min(55dvh,44vw,520px) !important;
    height:min(55dvh,44vw,520px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashFooter,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoCard{
    min-height:104px !important;
  }
}


/* Tablet portrait: stats become a compact horizontal rail. */
@media (max-width:980px) and (orientation:portrait){
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashboard{
    grid-template-rows:auto minmax(0,1fr) auto !important;
    overflow:auto !important;
    scrollbar-width:none !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashboard::-webkit-scrollbar{
    display:none !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeader{
    grid-template-columns:1fr minmax(180px,1.2fr) auto !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBody{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) auto !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentLine{
    grid-template-columns:minmax(0,1fr) !important;
    gap:4px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentTitle,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentMeta{
    text-align:center !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStats{
    flex-direction:row !important;
    min-height:94px !important;
    max-height:116px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStat{
    min-height:94px !important;
    max-height:116px !important;
    padding:10px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerRing{
    width:min(42dvh,68vw,440px) !important;
    height:min(42dvh,68vw,440px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashFooter{
    flex-wrap:wrap !important;
    min-height:calc(208px + var(--pc-dash-gap)) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextCard{
    flex-basis:100% !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressCard,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceCard{
    flex-basis:calc(50% - var(--pc-dash-gap)) !important;
  }
}


/* Phone landscape: preserve the TV hierarchy without overflow. */
@media (max-width:900px) and (max-height:520px) and (orientation:landscape){
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashboard{
    --pc-dash-gap:7px;
    padding:
      max(6px,env(safe-area-inset-top))
      max(8px,env(safe-area-inset-right))
      max(34px,env(safe-area-inset-bottom))
      max(8px,env(safe-area-inset-left)) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeader{
    grid-template-columns:1fr minmax(150px,1.4fr) auto !important;
    min-height:34px !important;
    padding:3px 8px !important;
    border-radius:11px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBrandCopy,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeaderLabel,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRealClock span{
    display:none !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashWorkoutTitle,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRealClock strong{
    font-size:13px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBody{
    grid-template-columns:minmax(0,1fr) clamp(112px,18vw,150px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrent{
    grid-template-rows:auto minmax(0,1fr) !important;
    padding:7px !important;
    border-radius:14px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashSectionHeading{
    padding-bottom:4px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashEyebrow{
    display:none !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentLine{
    grid-template-columns:auto minmax(70px,1fr) !important;
    gap:8px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentTitle{
    font-size:clamp(15px,2.2vw,20px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentMeta{
    font-size:clamp(10px,1.4vw,13px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerArea{
    padding:2px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerRing{
    width:min(46dvh,34vw,210px) !important;
    height:min(46dvh,34vw,210px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerInner{
    inset:7px !important;
    padding:8px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTime{
    font-size:clamp(43px,7vw,68px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashPhase,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInterval{
    font-size:9px !important;
    margin:3px 0 !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStat{
    min-height:0 !important;
    max-height:none !important;
    padding:5px !important;
    border-radius:12px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStatLabel{
    margin-bottom:2px !important;
    font-size:8px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStatValue,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRepValue{
    font-size:clamp(24px,4vw,36px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashFooter,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoCard{
    min-height:58px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoCard{
    padding:6px 8px !important;
    border-radius:11px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoIcon,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextMeta,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressMeta{
    display:none !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextTitle{
    font-size:clamp(13px,2vw,18px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressValue,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceValue strong,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceValue b{
    font-size:clamp(22px,3vw,30px) !important;
  }
}


/* Small portrait phones: stack content and allow safe vertical scrolling. */
@media (max-width:640px) and (orientation:portrait){
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashboard{
    min-height:100dvh !important;
    height:auto !important;
    padding:
      max(8px,env(safe-area-inset-top))
      max(8px,env(safe-area-inset-right))
      max(42px,env(safe-area-inset-bottom))
      max(8px,env(safe-area-inset-left)) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeader{
    grid-template-columns:auto minmax(0,1fr) auto !important;
    gap:7px !important;
    min-height:42px !important;
    padding:4px 7px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashBrandCopy,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashHeaderLabel,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRealClock span{
    display:none !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashWorkoutTitle{
    font-size:13px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrent{
    padding:10px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentTitle{
    font-size:clamp(21px,6.5vw,29px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashCurrentMeta{
    font-size:clamp(12px,3.5vw,16px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTimerRing{
    width:min(25dvh,62vw,230px) !important;
    height:min(25dvh,62vw,230px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashTime{
    font-size:clamp(62px,20vw,94px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStats{
    min-height:100px !important;
    max-height:100px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStat{
    min-height:100px !important;
    max-height:100px !important;
    padding:7px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStatLabel{
    font-size:8px !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashStatValue,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashRepValue{
    font-size:clamp(28px,9vw,42px) !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashFooter{
    flex-direction:column !important;
    flex-wrap:nowrap !important;
  }

  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashInfoCard,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashNextCard,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashProgressCard,
  #paceClockApp.mode-tv.tv-layout-dashboard .pcTvDashDistanceCard{
    flex:0 0 auto !important;
    flex-basis:auto !important;
    min-height:82px !important;
  }
}
