/* Independent home layout. Existing gameplay styles are unchanged. */
.home-five-portals{--home-gap:clamp(3px,.6vw,18px);--home-top:calc(max(56px,5.5vh) + clamp(74px,19vh,400px) + 22px);--portal-height:min(58vh,calc((98vw - 4*var(--home-gap))/5*1.5));background:#a7cf81}
.home-five-portals>.backdrop{opacity:1;object-fit:cover;object-position:center}
.home-five-portals::before{content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(#fff8d50d,transparent 55%,#47733d1a);pointer-events:none}
.home-five-portals .home-brand-logo{top:max(12px,var(--game-safe-top));left:max(2%,var(--game-safe-left));width:clamp(66px,10vw,320px);max-height:23%;object-fit:contain}
.home-five-portals .home-title{position:absolute;top:max(56px,5.5vh);left:50%;right:auto;transform:translateX(-50%);width:clamp(230px,42vw,1180px);height:clamp(74px,19vh,400px);display:grid;place-items:center;background:url('assets/brand/home-title-v2.webp') center/contain no-repeat}
.home-five-portals .home-title strong{font-size:clamp(22px,3.2vw,100px);line-height:1.25;margin-top:4%;letter-spacing:.08em;color:#fff8d9;text-shadow:0 2px 0 #8b4e27,0 3px 4px #69402166}
.home-five-portals .home-portals{position:absolute;inset:auto;left:50%;top:var(--home-top);transform:translateX(-50%);width:calc(var(--portal-height)/1.5*5 + var(--home-gap)*4);max-width:98%;height:var(--portal-height);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--home-gap);padding:0;overflow:visible;align-items:end;z-index:2;touch-action:manipulation}
.home-five-portals .home-portals button{position:relative;inset:auto;left:auto;top:auto;transform:none;width:100%;height:100%;padding:0;min-width:0;border:0;border-radius:18%;background:none;box-shadow:none;isolation:isolate;-webkit-tap-highlight-color:transparent}
.home-five-portals .home-entry-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;filter:drop-shadow(0 8px 6px #254f3420);transition:filter .18s ease,translate .18s ease}
.home-five-portals .portal-copy{position:absolute;inset:auto 3% 5.1%;height:8%;display:flex;align-items:center;justify-content:center;padding:0;pointer-events:none}
.home-five-portals .portal-copy strong{position:static;transform:translateY(-.08em);padding:0;font-size:clamp(11px,1.65vw,64px);line-height:1.1;color:#38583d;font-weight:900;white-space:nowrap;text-shadow:0 1px 0 #fff7dd;letter-spacing:.02em}
.home-five-portals .home-portals button:nth-child(1) .portal-copy{bottom:6.1%}
.home-five-portals .home-portals button:nth-child(2) .portal-copy{bottom:4.6%}
.home-five-portals .home-portals button:nth-child(3) .portal-copy{bottom:7.1%}
.home-five-portals .home-portals button:nth-child(4) .portal-copy{bottom:5.4%}
.home-five-portals .home-portals button:nth-child(5) .portal-copy{bottom:5.1%}
.home-five-portals .home-portals button:hover .home-entry-art{filter:drop-shadow(0 9px 7px #1f503449) brightness(1.04)}
.home-five-portals .home-portals button:active .home-entry-art{filter:brightness(.96)}
.home-five-portals .home-portals button:focus-visible{outline:3px solid #fff5b2;outline-offset:2px;background:#fff3}
body .home-five-portals .license-home-tools{position:absolute;top:var(--game-safe-top);right:var(--game-safe-right);max-width:calc(100% - 120px);display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
body .home-five-portals .license-home-tools button{min-height:44px;padding:6px 11px;font-size:13px}
body.is-home-browsing .orientation-tip{display:none}
body.is-home-browsing #appShell,body.is-home-browsing .license-home-tools{visibility:visible}
.classroom-screen{background:#f4f4e6}
@media(max-height:480px) and (orientation:landscape){.home-five-portals{--home-top:122px;--portal-height:min(calc(100vh - 178px),calc((98vw - 4*var(--home-gap))/5*1.5))}.home-five-portals .home-brand-logo{width:74px;max-height:27%}.home-five-portals .home-title{top:40px;height:72px;width:270px}.home-five-portals .home-title strong{font-size:25px}body .home-five-portals .license-home-tools{gap:4px}body .home-five-portals .license-home-tools button{font-size:11px;padding:5px 8px}.home-five-portals .portal-copy strong{font-size:clamp(10px,1.65vw,18px)}}
@media(orientation:portrait){.home-five-portals{--home-top:calc(60vh - var(--portal-height))}.home-five-portals .home-title{top:calc(60vh - var(--portal-height) - 140px);height:120px;width:70%}}
@media(max-width:600px) and (orientation:portrait){
  .home-five-portals{--home-gap:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto 90px auto auto;align-content:start;gap:8px 12px;padding:max(12px,var(--game-safe-top)) var(--game-safe-right) max(16px,var(--game-safe-bottom)) var(--game-safe-left);overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scroll-padding:12px;touch-action:pan-y}
  .home-five-portals>.backdrop,.home-five-portals::before{position:fixed}
  .home-five-portals .home-brand-logo{position:relative;inset:auto;grid-column:1;grid-row:3;align-self:center;justify-self:start;width:82px;max-height:90px}
  .home-five-portals .home-title{position:relative;inset:auto;grid-column:1/-1;grid-row:3;justify-self:end;transform:none;width:calc(100% - 88px);height:90px}
  .home-five-portals .home-title strong{font-size:25px}
  .home-five-portals .home-portals{position:relative;inset:auto;grid-column:1/-1;grid-row:4;transform:none;width:100%;max-width:100%;height:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
  .home-five-portals .home-portals button{height:auto;min-height:44px;aspect-ratio:2/3}
  .home-five-portals .home-portals button:last-child{grid-column:1/-1;justify-self:center;width:calc((100% - 12px)/2)}
  .home-five-portals .portal-copy strong{font-size:clamp(16px,4vw,18px);letter-spacing:0}
  .home-five-portals .account-lock-label{font-size:12px}
  body .home-five-portals .license-home-tools{display:contents}
  body .home-five-portals .license-home-tools button{position:relative;z-index:6;justify-content:center;min-width:44px;min-height:44px;padding:7px 8px;font-size:13px;white-space:normal;text-align:center}
  .home-five-portals [data-home-sound]{grid-column:1;grid-row:1}.home-five-portals [data-license-growth]{grid-column:2;grid-row:1}
  .home-five-portals [data-license-open]{grid-column:1;grid-row:2}.home-five-portals [data-phone-account]{grid-column:2;grid-row:2}
  .home-five-portals .home-parent-entry{position:relative;inset:auto;grid-column:1;grid-row:5;min-width:44px;min-height:44px;margin:4px 0 0;padding:8px;font-size:14px}
  body .home-five-portals .license-home-tools [data-customer-support]{grid-column:2;grid-row:5;margin-top:4px;font-size:14px}
}
@media(max-height:300px){.home-five-portals{--home-top:106px;--portal-height:min(calc(100vh - 162px),calc((98vw - 4*var(--home-gap))/5*1.5))}.home-five-portals .home-title{top:42px;height:58px;width:220px}.home-five-portals .home-title strong{font-size:21px}.home-five-portals .home-brand-logo{width:56px}.home-five-portals .portal-copy strong{font-size:10px}}
@media(prefers-reduced-motion:reduce){.home-five-portals .home-entry-art{transition:none}}
