/* Homepage hero repair: Play 45% / Academy 30% / Apps 25%, without empty advert art. */
body.portal-home section.portal-hero .portal-hero-grid{
  grid-template-columns:minmax(0,1.42fr) minmax(0,.96fr) minmax(0,.84fr)!important;
  align-items:stretch!important;
  gap:13px!important;
}
body.portal-home section.portal-hero .portal-hero-grid> .hero-play-first,
body.portal-home section.portal-hero .portal-hero-grid> .hero-academy-column,
body.portal-home section.portal-hero .portal-hero-grid> .hero-app-column{
  padding:15px!important;border-radius:18px!important;
  box-shadow:0 8px 20px rgba(45,72,110,.07)!important;
}
body.portal-home section.portal-hero .hero-play-first .hero-play-intro{
  margin:0 0 9px!important;gap:4px!important;
}
body.portal-home section.portal-hero .hero-play-first .hero-play-intro h1{
  font-size:clamp(25px,2.3vw,34px)!important;
}
body.portal-home section.portal-hero .hero-play-first .hero-web-play-card{
  padding:12px!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"head" "board" "cta"!important;
  gap:6px!important;
  align-content:center!important;
  min-height:0!important;
  background:linear-gradient(125deg,#fff,#f0f6ff)!important;
}
body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
  width:min(100%,300px)!important;
  max-width:300px!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:1;
  justify-self:center!important;
  margin:3px auto!important;
  filter:drop-shadow(0 5px 9px rgba(35,65,109,.12));
}
body.portal-home section.portal-hero .hero-web-play-head{
  margin-bottom:0!important;
}
body.portal-home section.portal-hero .hero-web-play-cta{
  min-height:44px!important;
  width:100%!important;
  margin:5px 0 0!important;
}
body.portal-home section.portal-hero .hero-web-shortcuts{
  margin-top:7px!important;gap:7px!important;
}
body.portal-home section.portal-hero .hero-web-shortcuts a{
  min-height:44px!important;
}
body.portal-home section.portal-hero .hero-academy-column{
  gap:9px!important;
  justify-content:center!important;
}
body.portal-home section.portal-hero .hero-academy-column h2{
  font-size:clamp(24px,2.1vw,30px)!important;
  line-height:1.17!important;
}
body.portal-home section.portal-hero .hero-academy-description{
  font-size:12px!important;line-height:1.5!important;
}
body.portal-home section.portal-hero .hero-academy-courses{
  gap:8px!important;margin:4px 0!important;
}
body.portal-home section.portal-hero .hero-academy-course{
  min-height:72px!important;
  padding:9px!important;
}
body.portal-home section.portal-hero .hero-academy-steps{
  padding:5px 0!important;
  margin:1px 0!important;
}
body.portal-home section.portal-hero .hero-academy-primary{
  margin:5px 0 0!important;
  min-height:45px!important;
}
body.portal-home section.portal-hero .portal-device-card.hero-app-column{
  grid-template-areas:"device" "stores"!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:13px!important;
  align-content:center!important;
  align-items:center!important;
  justify-items:stretch!important;
}
body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-showcase{
  grid-area:device!important;
  min-width:0!important;width:100%!important;
  margin:0!important;padding:0!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  align-self:stretch!important;
}
body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-stage{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;align-items:center!important;
  position:relative!important;
  width:100%!important;height:auto!important;max-height:none!important;
  padding:10px 0 0!important;
  gap:10px!important;
  overflow:visible!important;
}
body.portal-home section.portal-hero .hero-monitor-frame{
  position:relative;order:0;
  width:min(100%,300px);height:180px;
  border:8px solid #253752;border-bottom-width:13px;
  border-radius:15px;background:#1f2b41;box-shadow:0 12px 24px #3046632c;
  padding:0;overflow:hidden;box-sizing:border-box;
}
body.portal-home section.portal-hero .hero-monitor-frame::after{
  content:"";position:absolute;bottom:0;left:0;right:0;
  height:7px;background:linear-gradient(90deg,#314b75,#213752);
  pointer-events:none;
}
body.portal-home section.portal-hero .hero-monitor-frame>.desktop-art{
  display:block!important;
  width:100%!important;height:100%!important;
  min-height:0!important;max-height:none!important;
  object-fit:cover!important;object-position:right center!important;
  border-radius:0!important;box-shadow:none!important;
}
body.portal-home section.portal-hero .hero-app-column .phone-art{
  position:relative!important;order:1;
  display:flex!important;align-items:center;justify-content:center;
  inset:auto!important;left:auto!important;right:auto!important;
  top:auto!important;bottom:auto!important;
  width:auto!important;height:176px!important;
  max-width:100%!important;
  margin-top:-7px!important;
  padding:0!important;filter:none!important;transform:none!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
}
body.portal-home section.portal-hero .hero-app-column .phone-art img{
  display:block!important;
  width:auto!important;height:100%!important;max-width:100%!important;
  object-fit:contain!important;
  filter:drop-shadow(0 7px 9px #4255722c);
}
body.portal-home section.portal-hero .portal-device-card.hero-app-column .portal-qr-grid{
  grid-area:stores!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:8px!important;padding:0!important;margin:0!important;
  width:100%!important;
}
body.portal-home section.portal-hero .portal-store-merged-card{
  min-width:0!important;width:100%!important;
  min-height:53px!important;
  grid-template-columns:25px minmax(0,1fr) 39px!important;
  gap:9px!important;padding:7px 9px!important;
  border-radius:12px!important;
}
body.portal-home section.portal-hero .portal-store-merged-card .store-copy strong{
  font-size:13px!important;overflow-wrap:anywhere;
}
body.portal-home section.portal-hero .portal-store-merged-card .store-copy small{
  font-size:9px!important;
}
body.portal-home section.portal-hero .portal-store-merged-card .store-qr{
  width:37px!important;height:37px!important;
}
@media(max-width:1239px) and (min-width:821px){
 body.portal-home section.portal-hero .portal-hero-grid{
   grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)!important;
 }
 body.portal-home section.portal-hero .portal-hero-grid>.hero-app-column{
   grid-column:1/-1!important;
   grid-template-areas:"device stores"!important;
   grid-template-rows:auto!important;
   grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 }
 body.portal-home section.portal-hero .hero-app-column .device-stage{
   flex-direction:row!important;gap:15px!important;padding:0!important;
 }
 body.portal-home section.portal-hero .hero-monitor-frame{
   width:min(62%,300px);height:165px;
 }
 body.portal-home section.portal-hero .hero-app-column .phone-art{
   height:164px!important;margin:0!important;
 }
}
@media(max-width:820px){
 body.portal-home section.portal-hero .portal-hero-grid{
   grid-template-columns:minmax(0,1fr)!important;gap:11px!important;
 }
 body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
   width:min(100%,315px)!important;max-width:315px!important;
 }
 body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-stage{
   flex-direction:row!important;gap:15px!important;
   justify-content:space-evenly!important;
 }
 body.portal-home section.portal-hero .hero-monitor-frame{
   width:min(65%,330px);height:170px;
 }
 body.portal-home section.portal-hero .hero-app-column .phone-art{
   display:flex!important;height:176px!important;margin:0!important;
 }
}
@media(max-width:510px){
 body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
   width:min(100%,285px)!important;max-width:285px!important;
 }
 body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-stage{
   flex-direction:row!important;gap:8px!important;
 }
 body.portal-home section.portal-hero .hero-monitor-frame{
   width:65%;height:145px;
   border-width:6px;border-bottom-width:10px;
 }
 body.portal-home section.portal-hero .hero-app-column .phone-art{
   height:150px!important;width:32%!important;
 }
 body.portal-home section.portal-hero .portal-device-card.hero-app-column .portal-qr-grid{
   grid-template-columns:minmax(0,1fr)!important;
 }
}
body.portal-home.dark section.portal-hero .hero-monitor-frame{
  border-color:#263653;background:#263653;
}

/* Final geometry: the 9×9 hero must be genuinely square; no stretched rows. */
body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
  height:300px!important;
  width:300px!important;
  max-width:100%!important;
  max-height:300px!important;
  aspect-ratio:1!important;
  grid-template-columns:repeat(9,minmax(0,1fr))!important;
  grid-template-rows:repeat(9,minmax(0,1fr))!important;
  grid-auto-rows:minmax(0,1fr)!important;
  box-sizing:border-box!important;
}
body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku span{
  min-width:0!important;min-height:0!important;
  height:auto!important;max-height:100%!important;
  aspect-ratio:auto!important;
}
@media(max-width:1239px) and (min-width:821px){
 body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-stage{
   display:flex!important;flex-direction:row!important;
   gap:15px!important;padding:0!important;
 }
}
@media(max-width:820px){
 body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
  width:min(100%,315px)!important;
  height:315px!important;max-height:315px!important;
 }
 body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-stage{
  display:flex!important;flex-direction:row!important;gap:15px!important;
 }
}
@media(max-width:510px){
 body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
  width:min(100%,285px)!important;
  height:min(285px,calc(100vw - 106px))!important;
  max-height:285px!important;
 }
 body.portal-home section.portal-hero .portal-device-card.hero-app-column .device-stage{
  display:flex!important;flex-direction:row!important;gap:8px!important;
 }
}

/* Old 38px fixed-size cells were forcing 356px width even on 300px board.
   Remove intrinsic cell width so nine tracks actually share the square board. */
body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku{
  min-width:0!important;
  grid-auto-columns:minmax(0,1fr)!important;
}
body.portal-home section.portal-hero .hero-play-first .hero-mini-sudoku>span{
  width:auto!important;max-width:100%!important;min-width:0!important;
  height:auto!important;max-height:100%!important;min-height:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}

body.portal-home section.portal-hero #heroSudokuPreviewBoard{
 display:grid!important;
 position:relative!important;
 grid-template-columns:repeat(9,minmax(0,1fr))!important;
 grid-template-rows:repeat(9,minmax(0,1fr))!important;
 grid-auto-rows:minmax(0,1fr)!important;
 width:300px!important;height:300px!important;
 min-width:0!important;min-height:0!important;max-width:100%!important;max-height:300px!important;
 padding:0!important;margin:3px auto!important;
 aspect-ratio:1!important;
 box-sizing:border-box!important;
 align-self:center!important;justify-self:center!important;
}
body.portal-home section.portal-hero #heroSudokuPreviewBoard>span{
 display:grid!important;place-items:center!important;
 width:auto!important;height:auto!important;
 min-width:0!important;min-height:0!important;
 max-width:100%!important;max-height:100%!important;
}
@media(max-width:820px){
 body.portal-home section.portal-hero #heroSudokuPreviewBoard{
   width:315px!important;height:315px!important;max-height:315px!important;
 }
}
@media(max-width:510px){
 body.portal-home section.portal-hero #heroSudokuPreviewBoard{
   width:min(100%,285px)!important;
   height:min(285px,calc(100vw - 106px))!important;
   max-height:285px!important;
 }
}

body.portal-home{--hero-board-size:300px;}
@media(max-width:820px){body.portal-home{--hero-board-size:315px;}}
@media(max-width:510px){body.portal-home{--hero-board-size:min(285px,calc(100vw - 78px));}}

/* Canonical independent 9×9 hero grid: no legacy mini-sudoku fixed-size rules. */
body.portal-home section.portal-hero .hero-sudoku-grid-v2{
  display:grid!important;
  grid-template-columns:repeat(9,minmax(0,1fr))!important;
  grid-template-rows:repeat(9,minmax(0,1fr))!important;
  direction:ltr!important;
  position:relative!important;
  width:min(100%,315px)!important;
  max-width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  margin:5px auto!important;
  padding:0!important;
  border:2px solid #506381!important;
  border-radius:12px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:#fff!important;
  box-shadow:0 8px 18px #2a49662a!important;
  align-self:center!important;justify-self:center!important;
}
body.portal-home section.portal-hero .hero-sudoku-grid-v2>span{
  box-sizing:border-box!important;
  display:grid!important;place-items:center!important;
  width:auto!important;height:auto!important;
  min-height:0!important;min-width:0!important;
  max-width:100%!important;max-height:100%!important;
  padding:0!important;margin:0!important;
  background:#fff!important;color:#294f91!important;
  font-size:clamp(13px,1.25vw,18px)!important;font-weight:850!important;
  line-height:1!important;text-align:center!important;
  border-right:1px solid #cdd6e2!important;
  border-bottom:1px solid #cdd6e2!important;
}
body.portal-home section.portal-hero .hero-sudoku-grid-v2>span:nth-child(9n){border-right:0!important}
body.portal-home section.portal-hero .hero-sudoku-grid-v2>span:nth-child(n+73){border-bottom:0!important}
body.portal-home section.portal-hero .hero-sudoku-grid-v2::after{
  content:""!important;
  pointer-events:none!important;
  position:absolute!important;inset:0!important;
  z-index:3!important;
  border-radius:inherit!important;
  background:
    linear-gradient(to right,transparent calc(33.333% - 1px),#546882 calc(33.333% - 1px),#546882 calc(33.333% + 1px),transparent calc(33.333% + 1px)),
    linear-gradient(to right,transparent calc(66.667% - 1px),#546882 calc(66.667% - 1px),#546882 calc(66.667% + 1px),transparent calc(66.667% + 1px)),
    linear-gradient(to bottom,transparent calc(33.333% - 1px),#546882 calc(33.333% - 1px),#546882 calc(33.333% + 1px),transparent calc(33.333% + 1px)),
    linear-gradient(to bottom,transparent calc(66.667% - 1px),#546882 calc(66.667% - 1px),#546882 calc(66.667% + 1px),transparent calc(66.667% + 1px))!important;
}
@media(max-width:820px){
 body.portal-home section.portal-hero .hero-sudoku-grid-v2{width:min(100%,315px)!important;}
}
@media(max-width:510px){
 body.portal-home section.portal-hero .hero-sudoku-grid-v2{width:min(100%,285px)!important;}
 body.portal-home section.portal-hero .hero-sudoku-grid-v2>span{font-size:clamp(12px,3.8vw,16px)!important;}
}

@media(max-width:360px){
 body.portal-home section.portal-hero .portal-hero-grid>.hero-play-first{
   padding:9px!important;
 }
 body.portal-home section.portal-hero .hero-play-first .hero-web-play-card{
   padding:6px!important;
 }
}
