.world-controls {position:absolute;inset:0;z-index:4;pointer-events:none}
.world-controls button {pointer-events:auto}
.world-actions {
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:7px;
  max-width:calc(100% - 24px);
}
.world-actions button,.world-dpad button {
  min-height:44px;
  padding:0 12px;
  border:1px solid #ede1b76e;
  border-radius:10px;
  color:#fffae9;
  background:#142922ec;
  font-size:13px;
}
.world-actions button:hover,.world-dpad button:hover {background:#325246}
.world-keyboard {
  position:absolute;
  left:12px;
  bottom:10px;
  max-width:calc(100% - 104px);
  margin:0;
  padding:6px 10px;
  border-radius:6px;
  background:#102019ed;
  color:#fffae9;
  font-size:12px;
}
.world-dpad {
  display:none;
  position:absolute;
  left:12px;
  bottom:12px;
  grid-template-columns:repeat(3,46px);
  grid-template-rows:repeat(2,46px);
  gap:5px;
  touch-action:none;
}
.world-dpad button {min-width:46px;padding:0;font-size:22px}
.world-up {grid-column:2}
.world-left {grid-column:1;grid-row:2}
.world-down {grid-column:2;grid-row:2}
.world-right {grid-column:3;grid-row:2}
.world-fallback {
  display:none;
  position:absolute;
  top:12px;
  left:12px;
  right:12px;
  z-index:2;
  margin:0;
  padding:8px 12px;
  border-radius:7px;
  background:#142922ee;
  color:#fffae9;
  font-size:13px;
}
.scene[data-world-unavailable] .world-fallback {display:block}
.scene[data-scene-world] .scene-label {top:17px;bottom:auto;max-width:calc(100% - 205px)}
.scene[data-scene-world] .scene-image {position:absolute}
.scene-depth:focus-visible {outline:2px solid #e3bd6f;outline-offset:-2px}
body.world-immersive {overflow:hidden}
.world-immersive #play-area .play-grid {
  position:fixed;
  inset:0;
  z-index:30;
  display:block;
  background:#142922;
}
.world-immersive #play-area .scene {
  width:100%;
  height:100%;
  max-height:none;
  border-radius:0;
  position:relative;
  inset:auto;
  aspect-ratio:auto;
  box-shadow:none;
}
.world-immersive .scene-depth {touch-action:none}
.world-immersive .scene[data-scene-world] .scene-label {max-width:calc(100% - 330px)}
.world-immersive .reading-page {
  visibility:hidden;
  position:absolute;
  right:16px;
  top:70px;
  bottom:18px;
  width:min(480px,calc(100% - 32px));
  max-height:calc(100% - 88px);
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid #cbbea1;
  border-radius:13px;
  padding:18px 22px;
  background:#fbf6e9f5;
  box-shadow:0 12px 45px #07120ba6;
}
.world-immersive.world-notes-open .reading-page {visibility:visible}
.world-immersive .reading-page .english-line {font-size:clamp(25px,4vw,33px)}
.world-immersive #bottom-bar {
  position:static;
  box-shadow:none;
  grid-template-columns:1fr auto;
  margin:13px 0 0;
  padding:10px 0 2px;
  background:none;
}
@media (max-width:760px), (pointer:coarse) {
  .world-dpad {display:grid}
  .world-keyboard {display:none}
  .world-actions {gap:5px;right:8px;top:8px}
  .world-actions button {padding:0 9px}
  .scene[data-scene-world] .scene-label {top:auto;bottom:12px;left:auto;right:76px;max-width:calc(100% - 244px)}
  .world-immersive .scene[data-scene-world] .scene-label {max-width:calc(100% - 244px)}
  .world-immersive #play-area .reading-page {right:8px;top:auto;bottom:8px;width:calc(100% - 16px);max-height:61dvh;padding:15px}
}
@media (max-width:375px) {
  .scene[data-scene-world] .scene-label {display:none}
}
