/* Shared game overlays for the standalone launcher and the Astro wrapper. */
[hidden] {
  display: none !important;
}
#quality-panel {
  position:fixed;
  right:48px;
  top:12px;
  z-index:30;
  background:#14201aeb;
  padding:8px 12px;
  border:1px solid #496452;
  border-radius:8px;
  font:12px system-ui;
  color:#d7e9dc;
  display:flex;
  gap:10px;
  align-items:center
}
#quality-panel select {
  padding:4px;
  font-size:12px
}
#quality-panel label {
  margin:0;
  gap:6px
}
#quality-panel span {
  min-width:70px
}
#quality-panel button {
  width:auto;
  padding:6px 10px;
  font-size:12px
}
#graphics-options>summary {
  display:none
}
#graphics-options>div {
  display:flex;
  gap:10px;
  align-items:center
}
#graphics-options {
  position:relative
}
#graphics-options:not([open])>div {
  display:none
}
body.in-game {
  display:block;
  min-height:0;
  padding:0;
  background:#000;
  overscroll-behavior:none
}
body.in-game canvas {
  touch-action:none
}
body.in-game #quality-panel {
  right:calc(48px + env(safe-area-inset-right));
  top:max(8px,env(safe-area-inset-top));
  max-width:calc(100% - 64px - env(safe-area-inset-left) - env(safe-area-inset-right));
  flex-wrap:wrap
}
@media(pointer:coarse) {
  #quality-panel {
    gap:6px;
    padding:4px 8px
  }
  #quality-panel label {
    font-size:0
  }
  #quality-panel select {
    font-size:11px;
    max-width:132px;
    min-height:36px
  }
  #quality-panel span {
    font-size:10px
  }
  #quality-panel button {
    font-size:11px;
    min-height:36px;
    padding:4px 8px
  }
}
@media(pointer:coarse) {
  #graphics-options>summary {
    display:grid;
    place-items:center;
    cursor:pointer;
    list-style:none;
    width:36px;
    height:36px;
    font-size:22px;
    border-radius:4px
  }
  #graphics-options>summary::-webkit-details-marker {
    display:none
  }
  #graphics-options>summary:hover {
    background:#263e30
  }
  #graphics-options>div {
    position:absolute;
    right:0;
    top:calc(100% + 10px);
    padding:12px;
    border:1px solid #496452;
    border-radius:8px;
    background:#14201a;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    min-width:180px
  }
  #graphics-options label {
    display:block
  }
  #graphics-options select {
    max-width:100%;
    width:100%
  }
}
#game-keyboard {
  position:fixed;
  left:8px;
  right:8px;
  bottom:max(8px,env(safe-area-inset-bottom));
  z-index:50;
  display:flex;
  gap:8px;
  padding:8px;
  border:1px solid #496452;
  border-radius:8px;
  background:#14201a
}
#game-keyboard input {
  flex:1;
  width:auto;
  min-width:0;
  font-size:16px
}
#game-keyboard button {
  width:auto;
  padding:8px;
  font-size:12px
}
#quality-panel {
  bottom: auto;
  left: auto;
}
body.in-game #quality-panel {
  bottom: auto;
  left: auto;
}
#quality-panel label {
  display: flex;
  text-transform: none;
  letter-spacing: normal;
  font: inherit;
}
#quality-panel select {
  display: inline-block;
  width: auto;
}
#quality-panel button {
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
}
#quality-panel input, #quality-panel select, #quality-panel button {
  min-height: 36px;
}
@media (pointer: coarse) {
  #quality-panel label {
    font-size: 0;
  }
}
/* The public client keeps only a small fullscreen control. Diagnostics are
   mounted separately, only for the verified owner account. */
#game-controls{position:fixed;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));z-index:30}
#game-controls button{min-height:40px;min-width:40px;border:1px solid #ffffff38;border-radius:8px;background:#14201aaa;color:white;font:24px system-ui;cursor:pointer}
#quality-panel{color-scheme:dark;color:#d7e9dc}
#quality-panel button,#quality-panel select{background:#263e30;color:#d7e9dc}
#rotate-device{position:fixed;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:60;width:max-content;max-width:90vw;padding:12px 18px;border:1px solid #718f7e;border-radius:12px;background:#14201aee;color:#fff;font:14px system-ui;cursor:pointer}
#graphics-options>div{flex-wrap:wrap;max-width:480px}
#graphics-current,#graphics-timing{display:block;white-space:normal;font:12px/1.5 system-ui;color:#d7e9dc}
#graphics-options #graphics-current,#graphics-options #graphics-timing{flex-basis:100%;min-width:0}
@media(pointer:coarse){#graphics-options>div{width:min(300px,calc(100vw - 60px));box-sizing:border-box}}
#settings_game_menu{display:block;width:100%;padding:8px 0;cursor:pointer}
/* Game controls are outlined artwork and text, never filled tiles. */
body.in-game #quality-panel,body.in-game #graphics-options>div,body.in-game #game-controls button{background:transparent;border:0;box-shadow:none;text-shadow:0 1px 2px #07150d,0 0 4px #07150d}
body.in-game #quality-panel button,body.in-game #quality-panel select,body.in-game #graphics-options>summary:hover{background:transparent;color:#edf6e3;text-shadow:0 1px 2px #07150d}
body.in-game #settings_menu{background:transparent;border-color:#edf6e366;color:#edf6e3;text-shadow:0 1px 2px #07150d,0 0 4px #07150d}
body.in-game #settings_menu button{background:transparent;color:#edf6e3;border:1px solid #edf6e366;text-shadow:0 1px 2px #07150d}
body.in-game #settings_button{background:transparent;color:#f1d892;filter:drop-shadow(0 1px 1px #10271e)}
