/* Reference artwork for the two persistent village controls. Native buttons retain their labels and behavior. */
.topbar{
  min-height:88px;
  padding-block:5px;
}
.topbar .utility-nav{gap:8px}
.topbar #passportButton,.topbar #soundButton{
  flex:0 0 78px;
  width:78px;
  height:78px;
  min-width:78px;
  min-height:78px;
  padding:0;
  border:0;
  border-radius:50%;
  background-color:transparent;
  background-position:center;
  background-size:contain;
  background-repeat:no-repeat;
  box-shadow:none;
  color:transparent;
  transition:transform .16s ease,filter .16s ease;
  touch-action:manipulation;
}
.topbar #passportButton{background-image:url('/assets/img/topbar/passport-topbar.webp')}
.topbar #soundButton{background-image:url('/assets/img/topbar/sound-off-topbar.webp')}
.topbar #soundButton[aria-pressed="true"]{background-image:url('/assets/img/topbar/sound-on-topbar.webp')}
.topbar #passportButton:hover,.topbar #soundButton:hover{
  background-color:transparent;
  border:0;
  filter:brightness(1.08) drop-shadow(0 3px 5px #001825);
  transform:translateY(-2px);
}
.topbar #passportButton:active,.topbar #soundButton:active{transform:translateY(1px)}
.topbar #passportButton:focus-visible,.topbar #soundButton:focus-visible{
  outline:3px solid #fff1a5;
  outline-offset:2px;
}
.topbar #passportButton svg,.topbar #soundButton svg{display:none}
.topbar #passportButton span,.topbar #soundButton span{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.topbar #passportButton #passportCount{
  position:absolute;
  top:46%;left:22%;right:auto;
  min-width:24px;width:24px;height:24px;
  margin:0;
  border:1px solid #f8e6a0;
  box-shadow:inset 0 1px #fff5b8,0 1px 2px #613310;
  background:radial-gradient(circle at 35% 25%,#ffe582,#e4a82b 68%,#b3761b);
  color:#71300d;
  font:900 15px/1 Georgia,serif;
}
@media(max-width:760px){
  :root{--topbar-height:70px}
  .topbar{min-height:70px;padding-block:4px}
  .topbar .utility-nav{gap:2px}
  .topbar #passportButton,.topbar #soundButton{
    display:inline-flex;
    flex-basis:62px;
    width:62px;height:62px;
    min-width:62px;min-height:62px;
  }
  .topbar #passportButton #passportCount{
    top:46%;left:22%;right:auto;
    min-width:20px;width:20px;height:20px;font-size:13px;
  }
}
@media(max-width:360px){
  .topbar{padding-inline:7px}
  .topbar .brand{gap:6px}
  .topbar .brand-mark{width:32px;height:32px}
  .topbar .brand strong{font-size:12px}
  .topbar .brand small{font-size:7px}
}
@media(max-height:520px) and (orientation:landscape){
  :root{--topbar-height:62px}
  .topbar{min-height:62px;padding-block:2px}
  .topbar #passportButton,.topbar #soundButton{
    flex-basis:58px;width:58px;height:58px;min-width:58px;min-height:58px;
  }
}
@media(prefers-reduced-motion:reduce){
  .topbar #passportButton,.topbar #soundButton{transition:none}
}

/* Keep retired controls out of the first paint while the village module assembles the dock. */
.topbar [data-scroll="world"],.topbar #directoryButton,#world .world-compass{display:none!important}
#world .world-controls:not(.illustrated-dock){display:none!important}
#world .world-mode-note,#world .world-diagnostics{display:none!important}

/* Let the village fill the viewport while its controls float above the scene. */
:root{--topbar-height:0px}
.topbar{
  position:absolute;
  inset:0 0 auto;
  z-index:50;
  min-height:0;
  width:100%;
  padding-top:max(4px,env(safe-area-inset-top));
  border:0;
  background:none;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  pointer-events:none;
}
.topbar .brand,.topbar .utility-nav{pointer-events:auto}
.topbar .brand{filter:drop-shadow(0 2px 3px #061b2b)}
.topbar #passportButton,.topbar #soundButton{
  filter:drop-shadow(0 3px 4px #061b2b88);
}
.world-prototype{
  height:100dvh;
  min-height:0;
  scroll-margin-top:0;
}
@media(max-width:760px){
  :root{--topbar-height:0px}
  .topbar{min-height:0}
  .world-prototype{height:100dvh;min-height:0}
}
@media(max-height:520px) and (orientation:landscape){
  :root{--topbar-height:0px}
  .topbar{min-height:0}
  .world-prototype{height:100dvh;min-height:0}
}

@media(max-width:700px){
  .world-prototype .avatar-guide{top:72px}
}
@media(max-height:520px) and (orientation:landscape){
  .world-prototype .avatar-guide{
    top:62px;
    left:50%;
    transform:translateX(-50%);
  }
}


/* Keep wheel, touch and keyboard scrolling inside the village and its dialogs. */
html.village-page{
  height:100%;
  overflow:hidden;
  overscroll-behavior:none;
}
.village-page body{
  position:fixed;
  inset:0;
  height:100%;
  height:100dvh;
  overflow:hidden;
  overscroll-behavior:none;
}
.village-page body>main{
  height:100%;
  min-height:0;
  overflow:hidden;
}
.village-page #world{
  height:100%;
  min-height:0;
}
