/* Final visual override for the restored functional shell.
   No DOM/content mutation: only background, glass material and compact spacing. */
:root{
  --restore-glass:rgba(255,255,255,.04);
  --restore-edge:rgba(255,255,255,.14);
  --restore-text:#fff;
  --restore-muted:rgba(255,255,255,.66);
}

html[data-ui="liquid-glass-v2"],
html[data-ui="liquid-glass-v2"] body{
  min-height:100%;
  background:
    linear-gradient(180deg,rgba(23,2,3,.45) 0%,rgba(5,0,0,.88) 100%),
    url("./stadium-background.jpg") center top/cover fixed no-repeat!important;
  background-attachment:fixed!important;
  color:var(--restore-text)!important;
}

.app-atmosphere{
  position:fixed!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:none!important;
  background:
    linear-gradient(180deg,rgba(23,2,3,.45) 0%,rgba(5,0,0,.88) 100%),
    url("./stadium-background.jpg") center top/cover fixed no-repeat!important;
  background-size:cover!important;
  background-attachment:fixed!important;
  opacity:1!important;
  filter:none!important;
}
.app-atmosphere::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(circle at 82% 8%,rgba(255,255,255,.40) 0 3%,rgba(255,255,255,.10) 11%,transparent 25%),
    linear-gradient(112deg,transparent 0 53%,rgba(218,24,48,.10) 69%,transparent 84%)!important;
  opacity:1!important;
  filter:none!important;
  transform:none!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
}
.app-atmosphere::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.18) 44%,rgba(0,0,0,.52) 100%)!important;
}

.screen,.home-screen,.mockup-topbar,.mockup-home,.week-overview,.mockup-section-head,
.page-head,.day-detail-head,.day-detail-content,.stopwatch-shell,.an-shell{
  background:transparent!important;
}
.screen{position:relative;z-index:1;color:var(--restore-text)!important}

.next-card,.week-card,.phase-card,.card,.day-exercise,.rest-detail,.training-flow-step,
.training-actuals-card,.an-card,.prompt,.flow-switch,
.subnav,.bottom,.streak,.refresh-plan,.mini-back,.actual-toggle,.actuals-toggle,
.actual-checkin-edit,.hero.test,.text-link{
  background:var(--restore-glass)!important;
  border:1px solid rgba(255,255,255,.09)!important;
  border-top:1px solid var(--restore-edge)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.10)!important;
  backdrop-filter:blur(25px)!important;
  -webkit-backdrop-filter:blur(25px)!important;
}

/* One-screen home: all original components stay visible. */
#today.screen.active{
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  padding:0 0 66px!important;
}
.mockup-topbar{
  width:min(100%,430px)!important;
  height:calc(42px + env(safe-area-inset-top))!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:calc(5px + env(safe-area-inset-top)) 12px 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
}
.top-actions{gap:6px!important;margin-left:auto!important}
.streak,.refresh-plan{min-height:30px!important;height:30px!important;border-radius:15px!important;color:#fff!important}
.streak{padding:4px 9px!important;font-size:10px!important;gap:4px!important}.streak b{font-size:11px!important}
.refresh-plan{width:30px!important;min-width:30px!important;padding:0!important;font-size:16px!important}

.mockup-home{
  width:min(100%,430px)!important;
  height:calc(100dvh - 108px - env(safe-area-inset-top))!important;
  margin:0 auto!important;
  padding:0 11px 4px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  overflow:hidden!important;
}
.greeting{flex:0 0 auto!important;padding:2px 1px 1px!important;margin:0!important}
.greeting h1{margin:0!important;font-size:25px!important;line-height:1!important;font-weight:800!important;letter-spacing:-.04em!important;color:#fff!important}
.greeting p{margin:3px 0 0!important;font-size:11px!important;line-height:1.1!important;color:var(--restore-muted)!important}
.mockup-main-card{flex:1 1 210px!important;min-height:185px!important;margin:0!important}
.mockup-primary-action{display:none!important}

.next-card{
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:11px 13px 48px!important;
  border-radius:22px!important;
  overflow:visible!important;
  color:#fff!important;
}
.next-card::after{
  top:-10px!important;
  bottom:-8px!important;
  left:51%!important;
  right:-10px!important;
  background-size:auto 105%!important;
  background-position:right center!important;
  opacity:.96!important;
}
.next-label{font-size:8px!important;letter-spacing:.08em!important}
.next-date-nav{margin-top:5px!important;gap:1px!important;width:min(66%,245px)!important}
.next-date-button{font-size:13px!important;padding:1px!important}
.next-arrow{height:22px!important;width:20px!important;font-size:18px!important}
.session-title{margin-top:2px!important;width:min(66%,245px)!important;font-size:20px!important;line-height:1.02!important}
.next-meta{margin-top:5px!important;padding-top:5px!important;width:min(66%,245px)!important;font-size:8.5px!important;gap:3px!important;line-height:1.15!important}
.hero-start,.hero-view,.hero-complete{width:min(68%,255px)!important}
.hero-start{min-height:38px!important;height:38px!important;margin-top:6px!important;padding:0 36px 0 44px!important;border-radius:20px!important;font-size:13px!important}
.hero-start::before{width:27px!important;height:27px!important;left:7px!important}.hero-start::after{left:18px!important}
.hero-view{min-height:33px!important;margin-top:4px!important;padding:5px 9px!important;border-radius:17px!important}.hero-view span{font-size:10px!important}.hero-view small{font-size:7px!important}
.hero-complete{min-height:34px!important;margin-top:5px!important;font-size:10px!important}

.week-overview{flex:0 0 auto!important;margin:0!important;padding:0!important}
.mockup-section-head{min-height:15px!important;margin:0 1px 3px!important;display:flex!important;align-items:center!important;justify-content:space-between!important}
.mockup-section-head .section-kicker{display:inline!important;font-size:7px!important;letter-spacing:.08em!important;color:rgba(255,255,255,.65)!important}
.mockup-section-head .text-link{position:static!important;width:auto!important;min-height:0!important;height:auto!important;padding:2px 6px!important;border-radius:10px!important;font-size:7.5px!important;color:#fff!important}
.week-card{margin:0!important;padding:6px 8px!important;border-radius:18px!important;color:#fff!important}
.week-strip{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;margin:0!important}
.week-day{min-height:34px!important;padding:3px 1px!important;border-radius:10px!important;color:#fff!important}
.week-day strong{font-size:7px!important}.week-day span{font-size:11px!important;margin:1px auto!important;width:22px!important;height:22px!important}.week-day i{width:4px!important;height:4px!important;margin-top:1px!important}
.week-legend{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:3px!important;margin:3px 0 0!important;font-size:6px!important;line-height:1!important;color:rgba(255,255,255,.55)!important;white-space:nowrap!important}
.legend-dot{width:4px!important;height:4px!important;margin-right:1px!important}
#week-progress:not(:empty){margin-top:5px!important;padding-top:5px!important;border-top:1px solid rgba(255,255,255,.08)!important}
.progress-head{margin:0 0 4px!important}.progress-head strong{font-size:7px!important;letter-spacing:.06em!important;color:rgba(255,255,255,.80)!important}.progress-head span{font-size:6.5px!important;color:rgba(255,255,255,.55)!important}
.progress-track{height:3px!important;margin:0 0 4px!important;background:rgba(255,255,255,.12)!important}.progress-track span{background:#c82035!important}
.metrics{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;margin:0!important;padding:0!important;border-top:0!important}
.metrics>div{padding:0 6px!important;border-color:rgba(255,255,255,.08)!important}.metrics>div:first-child{padding-left:0!important}.metrics>div:last-child{padding-right:0!important}
.metrics small{font-size:6px!important;line-height:1!important;color:rgba(255,255,255,.55)!important}.metrics b{font-size:12px!important;line-height:1!important;margin-top:2px!important;color:#fff!important}

.phase-card{
  flex:0 0 auto!important;
  margin:0!important;
  min-height:48px!important;
  padding:6px 9px!important;
  border-radius:17px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  color:#fff!important;
}
.phase-card .section-kicker{font-size:6.5px!important;letter-spacing:.07em!important;color:rgba(255,255,255,.58)!important}
.phase-card h3{margin:2px 0 1px!important;font-size:11px!important;line-height:1.05!important;color:#fff!important}.phase-card p{margin:0!important;font-size:6.5px!important;line-height:1.1!important;color:rgba(255,255,255,.56)!important}
.phase-pill,.phase-ring{width:29px!important;height:29px!important;min-width:29px!important;flex:0 0 29px!important;margin:0!important;border-width:2px!important}.phase-pill svg{width:17px!important;height:17px!important}.phase-ring b{font-size:9px!important}.phase-ring span{font-size:4.5px!important}

.bottom{
  position:fixed!important;
  z-index:30!important;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  bottom:calc(5px + env(safe-area-inset-bottom))!important;
  width:min(calc(100% - 18px),412px)!important;
  height:56px!important;
  min-height:56px!important;
  padding:4px 5px!important;
  border-radius:20px!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.bottom .nav{min-width:0!important;padding:2px!important;font-size:8px!important;line-height:1.05!important;color:rgba(255,255,255,.70)!important;gap:2px!important}
.bottom .nav>span:first-child{font-size:16px!important;line-height:1!important}.bottom .nav.active{color:#fff!important}

/* Sub-pages retain normal scrolling and exactly the same functional structure. */
.screen:not(#today){padding-bottom:78px!important;background:transparent!important}
.page-head,.day-detail-head{color:#fff!important}.page-head h1,.day-detail-head h1{color:#fff!important}.page-head p,.day-detail-head p,.muted{color:rgba(255,255,255,.62)!important}
.card,.day-exercise,.rest-detail,.training-flow-step,.training-actuals-card,.stopwatch-card,.an-card,.prompt,.hero.test{color:#fff!important}

@media(max-height:780px){
  #today.screen.active{padding-bottom:60px!important}
  .mockup-topbar{height:calc(36px + env(safe-area-inset-top))!important;padding-top:calc(3px + env(safe-area-inset-top))!important}
  .mockup-home{height:calc(100dvh - 96px - env(safe-area-inset-top))!important;gap:3px!important}
  .greeting h1{font-size:21px!important}.greeting p{font-size:9px!important}
  .mockup-main-card{min-height:160px!important}.next-card{padding:8px 10px 42px!important}.session-title{font-size:17px!important}.hero-start{height:33px!important;min-height:33px!important;margin-top:4px!important}
  .week-card{padding:4px 6px!important}.week-day{min-height:29px!important}.week-day span{width:19px!important;height:19px!important}.week-legend{font-size:5.5px!important}
  #week-progress:not(:empty){margin-top:3px!important;padding-top:3px!important}.metrics b{font-size:10px!important}
  .phase-card{min-height:42px!important;padding:4px 7px!important}.phase-card h3{font-size:10px!important}
  .bottom{height:50px!important;min-height:50px!important}
}

@media(max-height:690px){
  .mockup-main-card{min-height:145px!important}.next-meta{font-size:7.5px!important}.week-legend{font-size:5px!important}.phase-card p{font-size:6px!important}
}
