/* Tsukiro 2.8.6 — Candy Fix
   Hero CTA visibility + short-page/footer compaction + cache-busting polish. */

/* HOME HERO
   v2.8.5 accidentally overrode the old long-title min-heights with a fixed
   hero height. Long Russian titles could therefore push the CTA under the
   quick-start overlap. The hero is content-driven again. */
html[data-candy-ui="true"] #hero.hero-v8{
  height:auto!important;
  min-height:790px!important;
  max-height:none!important;
  overflow:hidden!important;
}
html[data-candy-ui="true"] #hero .hero-content-v8{
  min-height:790px!important;
  height:auto!important;
  box-sizing:border-box!important;
  justify-content:center!important;
}
html[data-candy-ui="true"] #hero.hero-v8.has-long-title,
html[data-candy-ui="true"] #hero.hero-v8.has-long-title .hero-content-v8{
  min-height:870px!important;
}
html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title,
html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title .hero-content-v8{
  min-height:935px!important;
}

/* v2.8.5's #heroTitle selector had two IDs and unintentionally beat the
   older long-title font rules. Make the title scale down before it can eat
   the action area. */
html[data-candy-ui="true"] #hero.hero-v8.has-long-title #heroTitle{
  max-width:760px!important;
  font-size:clamp(48px,5.15vw,78px)!important;
  line-height:.93!important;
  letter-spacing:-.056em!important;
  text-wrap:balance!important;
}
html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title #heroTitle{
  max-width:780px!important;
  font-size:clamp(38px,4.25vw,62px)!important;
  line-height:.96!important;
  letter-spacing:-.048em!important;
  text-wrap:pretty!important;
  overflow-wrap:anywhere!important;
}
html[data-candy-ui="true"] #hero.hero-v8.has-long-title .hero-description,
html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title .hero-description{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}

/* The primary CTA is a permanent part of the hero. Keep it above the 3D
   stage/quick-start overlap and never let legacy loading/hidden styles remove it. */
html[data-candy-ui="true"] #hero .hero-actions{
  position:relative!important;
  z-index:30!important;
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex-wrap:wrap!important;
  flex-shrink:0!important;
  margin-top:18px!important;
  pointer-events:auto!important;
}
html[data-candy-ui="true"] #hero #heroWatch,
html[data-candy-ui="true"] #hero #heroWatch[hidden]{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  visibility:visible!important;
  opacity:1!important;
  min-width:142px!important;
  min-height:49px!important;
  position:relative!important;
  z-index:31!important;
  pointer-events:auto!important;
}

/* HOME BOTTOM
   The schedule is the last home section. It should occupy only the space its
   rows need; no inherited viewport/min-height is allowed to survive here. */
html[data-candy-ui="true"] body[data-page="home"] main,
html[data-candy-ui="true"] body[data-page="home"] .home-sections,
html[data-candy-ui="true"] body[data-page="home"] #schedule,
html[data-candy-ui="true"] body[data-page="home"] #scheduleList{
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
}
html[data-candy-ui="true"] body[data-page="home"] .home-sections{
  padding-bottom:0!important;
  margin-bottom:0!important;
}
html[data-candy-ui="true"] body[data-page="home"] #schedule{
  padding-bottom:22px!important;
  margin-bottom:0!important;
}
html[data-candy-ui="true"] body[data-page="home"] #scheduleList{
  align-content:start!important;
  margin-bottom:0!important;
  padding-bottom:0!important;
}
html[data-candy-ui="true"] body[data-page="home"] .footer-modern{
  margin-top:18px!important;
}

/* STANDALONE SCHEDULE
   Explicitly neutralize the old .page-main { min-height:82vh } even if an
   older base stylesheet or cached rule wins earlier in the cascade. */
html[data-candy-ui="true"] body[data-page="schedule"]{
  min-height:0!important;
}
html[data-candy-ui="true"] body[data-page="schedule"] main.page-main{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  padding-bottom:22px!important;
  margin-bottom:0!important;
}
html[data-candy-ui="true"] body[data-page="schedule"] .discovery-schedule-list{
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  align-content:start!important;
  margin-bottom:0!important;
  padding-bottom:0!important;
}
html[data-candy-ui="true"] body[data-page="schedule"] .footer,
html[data-candy-ui="true"] body[data-page="schedule"] .footer-modern{
  margin-top:14px!important;
}

/* Keep row heights compact without clipping long names. */
html[data-candy-ui="true"] body[data-page="home"] .schedule-item,
html[data-candy-ui="true"] body[data-page="schedule"] .discovery-schedule-row{
  min-height:0!important;
}

@media(max-width:1200px) and (min-width:681px){
  html[data-candy-ui="true"] #hero.hero-v8,
  html[data-candy-ui="true"] #hero .hero-content-v8{min-height:760px!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-long-title,
  html[data-candy-ui="true"] #hero.hero-v8.has-long-title .hero-content-v8{min-height:825px!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title,
  html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title .hero-content-v8{min-height:885px!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-long-title #heroTitle{font-size:clamp(43px,5vw,66px)!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title #heroTitle{font-size:clamp(35px,4.2vw,54px)!important}
}

@media(max-width:680px){
  html[data-candy-ui="true"] #hero.hero-v8,
  html[data-candy-ui="true"] #hero .hero-content-v8{min-height:720px!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-long-title,
  html[data-candy-ui="true"] #hero.hero-v8.has-long-title .hero-content-v8{min-height:775px!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title,
  html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title .hero-content-v8{min-height:835px!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-long-title #heroTitle{font-size:clamp(30px,9.4vw,40px)!important;line-height:1!important}
  html[data-candy-ui="true"] #hero.hero-v8.has-extra-long-title #heroTitle{font-size:clamp(25px,7.8vw,34px)!important;line-height:1.02!important}
  html[data-candy-ui="true"] #hero .hero-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
    margin-top:13px!important;
  }
  html[data-candy-ui="true"] #hero #heroWatch{width:100%!important;min-width:0!important}
}

@media(max-width:360px){
  html[data-candy-ui="true"] #hero .hero-actions{grid-template-columns:1fr!important}
}
