/* V75.8 — one complete forest viewport; no double forest; readable daily quotes. */
:root{--shd-forest-height:100dvh}
html:has(body.shd-v758-forest-visible){scroll-behavior:auto!important}
body:is([data-page="free"],[data-page="paid"]).shd-v758-forest-visible.shd-v757-home-active,
body[data-page="gateway"].shd-v758-forest-visible{overflow:hidden!important;overscroll-behavior:none!important}
body:is([data-page="free"],[data-page="paid"]).shd-v758-forest-visible.shd-v757-home-active.shd-v756-tabbed .app-main{padding:0!important;margin:0!important}
body:is([data-page="free"],[data-page="paid"]).shd-v758-forest-visible.shd-v757-home-active.shd-v756-tabbed .shd-member-panes{margin:0!important;padding:0!important}
body:is([data-page="free"],[data-page="paid"]).shd-v758-forest-visible.shd-v756-tabbed .shd-member-pane[data-shd-app-pane="home"]{padding:0!important;margin:0!important}
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-member-forest.shd-original-home,
body[data-page="gateway"].shd-v757-gateway-welcome .shd-gateway-welcome{
  position:relative!important;box-sizing:border-box!important;overflow:hidden!important;
  height:var(--shd-forest-height)!important;min-height:0!important;max-height:var(--shd-forest-height)!important;
  width:100%!important;margin:0!important;border:0!important;border-radius:0!important;
  background:linear-gradient(180deg,rgba(13,19,11,.62),rgba(14,20,11,.72)),url('/assets/hero-forest-wide.jpg') center center/cover no-repeat!important;
  display:flex!important;align-items:flex-start!important;justify-content:center!important;
}
.shd-original-home-inner,
.shd-gateway-welcome .shd-original-home-inner{
  flex:0 0 auto!important;box-sizing:border-box!important;min-height:0!important;height:auto!important;
  width:100%!important;max-width:530px!important;
  padding:max(45px,env(safe-area-inset-top,0px) + 8px) 6.6% 12px!important;
  margin:0 auto!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;
  flex-direction:column!important;text-align:center!important;
  transform-origin:top center!important;transform:translateY(var(--shd-forest-offset,0px)) scale(var(--shd-forest-fit,1));
}
/* Preserve visual hierarchy while spending vertical space on content, not empty margins. */
.shd-original-logo{width:clamp(98px,14dvh,133px)!important;height:clamp(98px,14dvh,133px)!important;margin:0 auto clamp(8px,1.4dvh,14px)!important;flex-shrink:0!important}
.shd-original-kicker{font-size:clamp(.76rem,2.9vw,.97rem)!important;letter-spacing:.27em!important;line-height:1.35!important;margin:0 0 clamp(9px,1.6dvh,16px)!important}
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-member-forest.shd-original-home h1,
.shd-gateway-welcome h1{
  font-size:clamp(1.9rem,7.45vw,3.2rem)!important;line-height:1.07!important;
  margin:0 0 clamp(9px,1.7dvh,17px)!important;max-width:100%!important;
}
.shd-original-mission{font-size:clamp(.85rem,3.1vw,1.1rem)!important;line-height:1.24!important;margin:0 0 clamp(10px,1.7dvh,16px)!important}
.shd-original-quote{padding:clamp(12px,1.7dvh,17px) clamp(14px,4.5vw,20px)!important;
 border-radius:17px!important;margin:0 0 clamp(10px,1.65dvh,16px)!important;min-height:0!important}
.shd-original-quote-heading{font-size:clamp(.67rem,2.55vw,.77rem)!important;line-height:1.22!important;letter-spacing:.08em!important;
  margin:0 0 7px!important;color:#3a5341!important;text-shadow:none!important;display:flex!important;gap:5px!important;flex-wrap:wrap!important;align-items:center!important}
.shd-quote-moment{font-size:.76em!important;font-weight:650!important;letter-spacing:.035em!important;color:#566a58!important}
.shd-original-quote-preview,
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-original-quote-slot .daily-quote-card blockquote{
  display:block!important;color:#344436!important;text-shadow:none!important;
  font-size:clamp(1.1rem,4.7vw,1.45rem)!important;line-height:1.18!important;
  margin:0 0 5px!important;font-style:normal!important;overflow-wrap:break-word!important;
}
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-member-forest.shd-original-home .shd-original-quote :is(.shd-original-quote-heading,.shd-original-quote-footer,.daily-quote-author),
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-member-forest.shd-original-home .shd-original-quote p{
 color:#455848!important;text-shadow:none!important;
}
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-member-forest.shd-original-home .shd-original-quote .shd-original-quote-footer,
.shd-original-quote-footer{color:#667369!important;text-shadow:none!important;font-size:clamp(.71rem,2.8vw,.83rem)!important;margin:7px 0 0!important;line-height:1.2!important}
.shd-original-quote-slot .daily-quote-card{margin:0!important;padding:0!important;min-height:0!important}
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-original-quote-slot .daily-quote-card [data-daily-quote-author]{font-size:clamp(.66rem,2.6vw,.75rem)!important;color:#667369!important;margin:3px 0 0!important}
.shd-original-main-button,.shd-original-secondary-button{
 flex:0 0 auto!important;min-height:clamp(44px,5.9dvh,54px)!important;
 padding:10px 16px!important;border-radius:15px!important;font-size:clamp(.85rem,3.5vw,1.05rem)!important;
}
.shd-original-main-button{margin:0 0 clamp(8px,1.35dvh,13px)!important}
.shd-original-secondary-button{margin:0 0 clamp(9px,1.4dvh,14px)!important}
.shd-original-signature{margin:0!important;font-size:clamp(.94rem,3.6vw,1.21rem)!important;line-height:1.25!important;white-space:nowrap!important}
/* One signed-out screen: auth form remains hidden until requested. */
body[data-page="gateway"].shd-v758-forest-visible:not(.shd-v757-gateway-auth) #gatewaySignedOut{width:100%!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important}
body[data-page="gateway"].shd-v758-forest-visible .gateway-wrap{padding:0!important;width:100%!important;max-width:none!important}
body[data-page="gateway"].shd-v758-forest-visible .shd-welcome-auth-panel,
body[data-page="gateway"].shd-v758-forest-visible #gatewayLoading,
body[data-page="gateway"].shd-v758-forest-visible #gatewayUsername,
body[data-page="gateway"].shd-v758-forest-visible #gatewayRecovery,
body[data-page="gateway"].shd-v758-forest-visible #gatewayFree,
body[data-page="gateway"].shd-v758-forest-visible #gatewayPaid,
body[data-page="gateway"].shd-v758-forest-visible #gatewayError{display:none!important}
body[data-page="gateway"].shd-v758-forest-visible .shd-gateway-welcome{display:flex!important}
/* The secondary quote is visible immediately on tapping Create, without adding another category tap. */
body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-creator-daily-quote{
 width:100%;margin:0 0 12px;padding:12px 15px;border:1px solid #ccd2c4;border-radius:16px;
 background:#f9f5ed;color:#344436;box-shadow:0 3px 9px #1b261b12;
}
.shd-creator-daily-quote strong{display:block;color:#405541;font-size:.8rem;margin-bottom:5px}
.shd-creator-daily-quote blockquote{font-family:Georgia,serif;color:#344436;font-size:1rem;line-height:1.26;margin:0 0 4px}
.shd-creator-daily-quote small{color:#637363;display:block}
@media (max-height:760px){
 .shd-original-home-inner,.shd-gateway-welcome .shd-original-home-inner{padding-top:max(42px,env(safe-area-inset-top,0px) + 7px)!important}
 .shd-original-logo{width:clamp(86px,13.5dvh,110px)!important;height:clamp(86px,13.5dvh,110px)!important}
 .shd-original-kicker{margin-bottom:8px!important}.shd-original-mission{margin-bottom:8px!important}
 .shd-original-quote{padding:10px 14px!important;margin-bottom:9px!important}
 .shd-original-main-button,.shd-original-secondary-button{min-height:43px!important}
}
@media (max-height:645px){
 .shd-original-home-inner,.shd-gateway-welcome .shd-original-home-inner{padding-top:max(33px,env(safe-area-inset-top,0px) + 4px)!important}
 .shd-original-logo{width:76px!important;height:76px!important;margin-bottom:6px!important}
 .shd-original-kicker{font-size:.7rem!important;margin-bottom:6px!important}
 body:is([data-page="free"],[data-page="paid"]).shd-v756-tabbed .shd-member-forest.shd-original-home h1,.shd-gateway-welcome h1{font-size:1.75rem!important;margin-bottom:7px!important}
 .shd-original-mission{font-size:.79rem!important;margin-bottom:7px!important}
 .shd-original-quote{padding:8px 12px!important;margin-bottom:7px!important}
 .shd-original-quote-heading{margin-bottom:3px!important}
 .shd-original-main-button,.shd-original-secondary-button{min-height:40px!important;margin-bottom:6px!important}
}
/* HTML hidden is authoritative even when the forest is used for the login transition. */
body[data-page="gateway"] .shd-gateway-welcome[hidden],
body[data-page="gateway"] .shd-welcome-auth-panel[hidden]{display:none!important}

/* V75.9 sign-out containment. The guest welcome is ONE fixed viewport,
   independent of old gateway wrappers or restored scroll positions in WKWebView. */
html:has(body[data-page="gateway"].shd-v758-forest-visible){overflow:hidden!important}
body[data-page="gateway"].shd-v758-forest-visible{height:100dvh!important;max-height:100dvh!important;overflow:hidden!important}
body[data-page="gateway"].shd-v758-forest-visible:not(.shd-v757-gateway-auth) #gatewaySignedOut:not(.hidden){
 position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;
 z-index:2000!important;width:100vw!important;max-width:100vw!important;
 height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;
 padding:0!important;margin:0!important;display:block!important;
 background:#152016!important;transform:none!important;
}
body[data-page="gateway"].shd-v758-forest-visible:not(.shd-v757-gateway-auth) #gatewaySignedOut:not(.hidden) > .shd-gateway-welcome:not([hidden]){
 position:absolute!important;top:0!important;left:0!important;width:100%!important;
 height:100%!important;min-height:0!important;max-height:100%!important;
 overflow:hidden!important;display:flex!important;
}
/* No ghost welcome or legacy gateway hero may appear below the current screen. */
body[data-page="gateway"].shd-v758-forest-visible:not(.shd-v757-gateway-auth) #gatewaySignedOut > :not(.shd-gateway-welcome){display:none!important}
body[data-page="gateway"] #gatewaySignedOut > .shd-gateway-welcome[hidden]{display:none!important}
