.phone-view #toolbar {
  top: max(32%, env(safe-area-inset-top));
  right: max(3px, env(safe-area-inset-right));
  bottom: auto;
}
.phone-view #toolbar button {
  width: 36px;
  min-height: 36px;
  border-radius: 50%;
  font-weight: 700;
}
.phone-view #help #fullscreen { margin-inline-end: 8px; }

@media (orientation: portrait) {
  .phone-view #toolbar { top: 45%; right: 3px; }
}

.phone-view #canvas, .phone-view #rotation-surface, .phone-view #guest-layer {
  position: absolute;
  top: env(safe-area-inset-top);
  left: env(safe-area-inset-left);
  width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right));
  height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

#rotation-surface {
  pointer-events: none;
}

#render-info { display: none; }
body.playing #render-info:not(:empty) {
  display: block;
  position: fixed;
  left: max(4px, env(safe-area-inset-left));
  bottom: max(3px, env(safe-area-inset-bottom));
  z-index: 2;
  padding: 3px 6px;
  border-radius: 5px;
  background: #10232bea;
  color: #eff6e9;
  font: 600 11px/1.25 system-ui,sans-serif;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

#guest-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
body:not(.playing) #guest-layer { display: none; }
#guest-entry {
  position: absolute; pointer-events: auto; touch-action: manipulation;
  background: #c5f779; color: #172b26; border: 1px solid #526755;
  border-radius: 0.8em; min-height: 0; padding: 0; font-weight: 700;
  white-space: nowrap; line-height: 1.1;
}
#guest-entry:focus-visible { outline: 3px solid white; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (orientation:portrait){.phone-view.tower-open #toolbar{top:calc(env(safe-area-inset-top) + 2.4vw);bottom:auto;right:max(6px,env(safe-area-inset-right))}}
