/* A reserved, compact brand row. Artwork still covers the entire viewport.
   Each native dialog owns its link; z-index alone cannot cross the top layer. */
.everlys-home {
  position:absolute; z-index:120; top:calc(4px + env(safe-area-inset-top));
  left:50%; transform:translateX(-50%); display:flex; align-items:center;
  justify-content:center; width:116px; height:44px; padding:7px 9px;
  border:1px solid #e9d6ad; border-radius:9px; background:#fff9edf5;
  box-shadow:0 2px 10px #001d1840; text-decoration:none; touch-action:manipulation;
  pointer-events:auto; opacity:1;
}
.everlys-home img {display:block; width:98px; height:auto; max-width:100%;}
.everlys-home:focus-visible {outline:3px solid #ffe0a0; outline-offset:3px;}
/* On the map, keep its original geometry. The compact logo shares the
   existing tool row; restart retains its accessible label and 44px target. */
#app > .everlys-home {left:12px; transform:none; width:84px; padding:5px; top:calc(10px + env(safe-area-inset-top));}
#app > .everlys-home img {width:72px;}
#app .board-header {padding:calc(10px + env(safe-area-inset-top)) 12px 8px 104px; gap:6px;}
#app .board-header .restart-control {width:44px; min-width:44px; height:44px; padding:0; font-size:0; flex:0 0 44px;}
#app .board-header .restart-control::before {content:'↻'; font:22px/1 system-ui,sans-serif;}
#event-card .reader-tools {top:calc(54px + env(safe-area-inset-top));}
#event-card .scene-status {top:calc(62px + env(safe-area-inset-top));}
#overlay.screen-modal .overlay-tools, #reading-dialog .overlay-tools {
  padding-top:calc(50px + env(safe-area-inset-top));
  min-height:calc(96px + env(safe-area-inset-top));
}
/* Chapter II: the logo is independent from the HUD hidden by immersion. */
#gardens .hud {padding-top:calc(54px + env(safe-area-inset-top));}
#gardens .immersive-hint {top:calc(52px + env(safe-area-inset-top));}
#gardens .storage-warning {top:calc(128px + env(safe-area-inset-top));}
#panel .panel-inner {padding-top:calc(66px + env(safe-area-inset-top));}
@media(max-width:420px), (orientation:landscape) and (max-height:430px) {
  #event-card .scene-status {top:calc(106px + env(safe-area-inset-top));}
}
/* Keep navigation reachable even while a scene loader covers the illustration. */
@media(max-height:590px) {
  #panel .panel-inner {padding-top:calc(60px + env(safe-area-inset-top));}
  #gardens .hud {padding-top:calc(50px + env(safe-area-inset-top));}
}
