/* ===== Estilos base da interface ===== */
:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button,
.action {
  display: inline-block;
  border: 1px solid #425e6c;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b6e3c1;
  outline-offset: 2px;
}
header {
  height: 76px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #314754;
  background: #13242f;
}
h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}
.sub {
  color: #a5beca;
  font-size: 12px;
  margin-top: 5px;
}
.headerActions {
  display: flex;
  gap: 8px;
}
.pill {
  font-size: 11px;
  border: 1px solid #536b78;
  border-radius: 20px;
  padding: 6px 10px;
  align-self: center;
}
.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
}
aside {
  padding: 18px 18px 28px;
  border-right: 1px solid #314754;
  overflow-y: auto;
}
section {
  margin-bottom: 22px;
}
h2 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a6beca;
  margin: 0 0 10px;
  font-weight: 600;
}
select {
  width: 100%;
  padding: 10px 9px;
  border: 1px solid #476372;
  border-radius: 8px;
  background: #253b49;
  color: inherit;
  font-size: 13px;
}
.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.wide {
  width: 100%;
  margin-top: 7px;
}
.small {
  font-size: 12px;
  line-height: 1.55;
  color: #a6bfcb;
  margin: 8px 0;
}
.layer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 11px 0;
  font-size: 13px;
}
.layer input {
  margin-left: auto;
  accent-color: #b9e5c0;
  width: 17px;
  height: 17px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: #b6c3c7;
}
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 7px;
  margin: 9px 0;
}
input[type='number'] {
  width: 76px;
  padding: 6px;
  background: #253b49;
  border: 1px solid #476372;
  color: inherit;
  border-radius: 6px;
}
input[type='range'] {
  width: 100%;
  accent-color: #b9e5c0;
}
.sectionLine {
  border-top: 1px solid #354e5c;
  padding-top: 18px;
}
#stage {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: #e3e9ec;
}
#view {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#status {
  position: absolute;
  top: 16px;
  left: 18px;
  background: #f3f7f8ed;
  border: 1px solid #b7c7cf;
  color: #294450;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
  max-width: calc(100% - 35px);
}
#tip {
  position: absolute;
  bottom: 17px;
  left: 17px;
  right: 230px;
  border-radius: 9px;
  padding: 11px 14px;
  line-height: 1.5;
  font-size: 12px;
  pointer-events: none;
}
#minimap {
  position: absolute;
  right: 17px;
  bottom: 17px;
  width: 190px;
  height: 190px;
  border: 1px solid #b7c7cf;
  border-radius: 9px;
  cursor: crosshair;
}
#selection {
  display: none;
  position: absolute;
  top: 65px;
  right: 17px;
  max-width: 330px;
  width: calc(100% - 34px);
  padding: 17px;
  border-radius: 12px;
  border: 1px solid #48616e;
  max-height: 60%;
  overflow: auto;
}
#selection h3 {
  margin: 0 24px 7px 0;
  font-size: 16px;
  font-weight: 500;
}
#selection .close {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 4px 8px;
}
#selection button.doc {
  width: 100%;
  text-align: left;
  margin-top: 6px;
  font-size: 12px;
}
#loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #e3e9ec;
  display: grid;
  place-content: center;
  text-align: center;
}
#loading p {
  font-size: 13px;
}
#error {
  display: none;
  position: absolute;
  inset: 0;
  padding: 30px;
  z-index: 25;
}
#joystick {
  display: none;
  position: absolute;
  left: 22px;
  bottom: 86px;
  z-index: 5;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #0f172a99;
  border: 1px solid #94a3b880;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
body.walk #joystick {
  display: block;
}
#joystick span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: 0 2px 10px #02061780;
  pointer-events: none;
  transition: transform 0.15s ease-out;
}
#joystick.held span {
  transition: none;
}
#mobileDock {
  display: none;
}
#crosshair {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 25px;
  pointer-events: none;
}
body.walk #crosshair {
  display: block;
}
#mobileBtn {
  display: none;
}
.note {
  font-size: 11px;
  color: #e6c78f;
  line-height: 1.5;
}
.overviewHint {
  position: absolute;
  right: 18px;
  bottom: 20px;
  background: #f3f7f8e8;
  padding: 14px;
  color: #375261;
  border: 1px solid #b7c7cf;
  border-radius: 9px;
  width: 193px;
  font-size: 12px;
  line-height: 1.5;
}
dialog {
  border: 1px solid #577584;
  border-radius: 14px;
  max-width: 94vw;
  max-height: 94dvh;
  padding: 20px;
}
dialog header {
  height: auto;
  border: 0;
  padding: 0 0 16px;
}
dialog h2 {
  font-size: 18px;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  font-weight: 500;
}
#library {
  width: 1180px;
}
#filters {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 10px;
  margin-bottom: 14px;
}
#search {
  padding: 10px;
  background: #243e4d;
  border: 1px solid #476372;
  border-radius: 8px;
  color: inherit;
  min-width: 0;
}
#docList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 65dvh;
  overflow: auto;
  padding-right: 5px;
}
.docCard {
  display: block;
  text-align: left;
  padding: 13px;
}
.docCard strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.docCard small {
  display: block;
  font-size: 11px;
  color: #b2c8d3;
  margin-top: 6px;
}
.docCard .warn {
  color: #edc885;
}
.libraryCount {
  font-size: 12px;
  color: #aac1ce;
  margin-bottom: 12px;
}
#documentDialog {
  width: 1160px;
}
#docTitle {
  font-size: 15px;
  overflow-wrap: anywhere;
  max-width: 900px;
}
#docPreview {
  width: 100%;
  height: 64dvh;
  object-fit: contain;
  background: white;
  border-radius: 5px;
}
#docPreview[hidden],
#pdfLink[hidden] {
  display: none;
}
#docTools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}
#docNote {
  font-size: 12px;
  color: #b5cbd5;
  line-height: 1.5;
}
#aboutDialog {
  width: 780px;
}
#aboutDialog p,
#aboutDialog li {
  font-size: 13px;
  line-height: 1.65;
  color: #c2d3dd;
}
#aboutDialog li {
  margin: 9px 0;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: #afc5d0;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 240px 1fr;
  }
  aside {
    padding: 15px 13px;
  }
  #minimap {
    width: 140px;
    height: 140px;
    bottom: 90px;
  }
  #tip {
    right: 17px;
  }
  #selection {
    max-width: 280px;
  }
  .overviewHint {
    bottom: 94px;
    width: 160px;
  }
  .pill {
    display: none;
  }
}
@media (max-width: 600px) {
  header {
    height: 70px;
    padding: 12px;
  }
  h1 {
    font-size: 16px;
  }
  .layout {
    display: block;
  }
  aside {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 8;
    width: 252px;
    display: none;
    box-shadow: 8px 0 30px #07182766;
  }
  body.menu aside {
    display: block;
  }
  #stage {
    height: 100%;
  }
  #mobileBtn {
    display: block;
  }
  .headerActions .desktop {
    display: none;
  }
  .headerActions button {
    font-size: 12px;
    padding: 8px;
  }
  #minimap {
    width: 120px;
    height: 120px;
  }
  .overviewHint {
    width: 145px;
    font-size: 11px;
  }
  #docList {
    grid-template-columns: 1fr;
  }
  #filters {
    grid-template-columns: 1fr 1fr;
  }
  #search {
    grid-column: span 2;
  }
  dialog {
    padding: 14px;
  }
  #docTitle {
    font-size: 12px;
  }
  #documentDialog header {
    align-items: flex-start;
  }
  #status {
    font-size: 11px;
    top: 12px;
    left: 12px;
  }
  .libraryCount {
    font-size: 11px;
  }
  #docPreview {
    height: 58dvh;
  }
}

#assetDialog,
#viewsDialog {
  width: 790px;
}
.toolFilters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.toolFilters input {
  flex: 1;
  min-width: 0;
  padding: 10px;
  background: #243e4d;
  border: 1px solid #476372;
  border-radius: 8px;
  color: inherit;
}
.toolFilters select {
  width: 175px;
}
.resultList {
  max-height: 55dvh;
  overflow: auto;
  display: grid;
  gap: 7px;
}
.resultList button {
  text-align: left;
}
.resultList small {
  display: block;
  color: #acc6d2;
  margin-top: 4px;
}
.viewRow {
  display: flex;
  gap: 8px;
}
.viewRow button:first-child {
  flex: 1;
}
.toolFooter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.toolMessage {
  min-height: 18px;
  font-size: 12px;
}
#assetCount {
  margin-bottom: 12px;
  color: #a9c3cf;
  font-size: 12px;
}
#assetQuery,
#viewName {
  width: 100%;
}
@media (max-width: 600px) {
  .toolFilters {
    flex-wrap: wrap;
  }
  .toolFilters select {
    width: 100%;
  }
}

.brandLogo {
  position: relative;
  width: 320px;
  height: 68px;
  overflow: hidden;
  background: #fff;
  border-radius: 5px;
  flex-shrink: 0;
}
.brandLogo img {
  position: absolute;
  width: 320px;
  height: auto;
  max-width: none;
  left: 0;
  top: -94px;
}
body > header {
  height: 104px;
}
.layout {
  height: calc(100dvh - 104px);
}
@media (max-width: 600px) {
  .brandLogo {
    width: 205px;
    height: 46px;
  }
  .brandLogo img {
    width: 205px;
    top: -60px;
  }
  .headerActions {
    gap: 4px;
  }
  .headerActions #mobileBtn {
    padding: 6px;
  }
  .sub {
    font-size: 9px;
  }
}

/* ===== Paleta MundiData (sobrepõe as cores base; variáveis --ui-* em edicao/configuracoes.js) ===== */
/* Paleta baseada nos estilos públicos de app-maintenance.replit.app. */
:root {
  --ui-bg: #020617;
  --ui-panel: #0f172a;
  --ui-raised: #1e293b;
  --ui-border: #334155;
  --ui-text: #f8fafc;
  --ui-muted: #94a3b8;
  --ui-primary: #0369a1;
  --ui-primary-hover: #075985;
  --ui-ring: #38bdf8;
  color: var(--ui-text);
  background: var(--ui-bg);
}
body > header {
  background: var(--ui-bg);
  border-color: var(--ui-border);
}
aside {
  background: var(--ui-panel);
  border-color: var(--ui-border);
}
h2,
.sub,
.small,
.legend,
.libraryCount,
#assetCount {
  color: var(--ui-muted);
}
.sectionLine {
  border-color: var(--ui-border);
}
button,
.action {
  background: var(--ui-raised);
  color: var(--ui-text);
  border-color: var(--ui-border);
}
button:hover,
.action:hover {
  background: #334155;
  border-color: #64748b;
}
button.active {
  background: var(--ui-primary);
  border-color: #0ea5e9;
  color: #fff;
}
button.active:hover {
  background: var(--ui-primary-hover);
}
button:disabled {
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: var(--ui-ring);
}
select,
input[type='number'],
#search,
.toolFilters input {
  background: var(--ui-bg);
  color: var(--ui-text);
  border-color: var(--ui-border);
}
input::placeholder {
  color: var(--ui-muted);
}
.layer input,
input[type='range'] {
  accent-color: var(--ui-ring);
}
.pill {
  color: #7dd3fc;
  border-color: #075985;
  background: #082f494d;
}
.note,
.docCard .warn {
  color: #fbbf24;
}
.toolMessage {
  color: #7dd3fc;
}
#status,
.overviewHint {
  background: #f8fafcf2;
  color: #0f172a;
  border-color: #cbd5e1;
}
#tip {
  background: #0f172aee;
  color: #e2e8f0;
}
#minimap {
  background: #f8fafcf2;
  border-color: #94a3b8;
}
#crosshair {
  color: var(--ui-ring);
}
#selection {
  background: #0f172af7;
  border-color: var(--ui-border);
  box-shadow: 0 8px 30px #02061755;
}
dialog {
  background: var(--ui-panel);
  border-color: var(--ui-border);
  color: var(--ui-text);
  box-shadow: 0 16px 70px #02061799;
}
dialog::backdrop {
  background: #020617cc;
}
dialog header {
  background: transparent;
}
dialog h2 {
  color: var(--ui-text);
}
.docCard {
  background: var(--ui-raised);
}
.docCard small,
.resultList small,
#docNote,
#aboutDialog p,
#aboutDialog li {
  color: #cbd5e1;
}
#saveView,
#exportViews,
#pdfLink {
  background: var(--ui-primary);
  border-color: #0284c7;
  color: #fff;
}
#saveView:hover,
#exportViews:hover,
#pdfLink:hover {
  background: var(--ui-primary-hover);
}
#stage,
#loading {
  background: #e2e8f0;
}
#loading {
  color: #0f172a;
}
#error {
  background: #fff1f2;
  color: #9f1239;
}

/* ===== Modo escuro (body.dark-surroundings) ===== */
body.dark-surroundings #stage,
body.dark-surroundings #loading {
  background: var(--dark-stage-gradient, #161f3d);
}
body.dark-surroundings #status,
body.dark-surroundings .overviewHint {
  background: #0f172aee;
  color: #e2e8f0;
  border-color: #334155;
}
body.dark-surroundings #loading {
  color: #e2e8f0;
}
body.dark-surroundings #tip {
  background: #0f172aee;
  border: 1px solid #334155;
}

/* ===== Cabeçalho com título centralizado ===== */
body > header {
  position: relative;
}
.productTitle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.035em;
  color: #f8fafc;
  white-space: nowrap;
  line-height: 1.2;
}
.productTitle span {
  font-weight: 400;
  color: #38bdf8;
}
body.dark-surroundings #stage {
  box-shadow: inset 0 1px 0 #334155;
}
body.dark-surroundings #selection {
  box-shadow: 0 12px 40px #0006;
  border-color: #475569;
}
@media (max-width: 1200px) {
  body > header {
    height: 142px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    gap: 8px;
  }
  .productTitle {
    position: static;
    transform: none;
    grid-column: 1/-1;
    grid-row: 2;
    text-align: center;
    font-size: 24px;
  }
  .headerActions {
    grid-column: 2;
    grid-row: 1;
  }
  .layout {
    height: calc(100dvh - 142px);
  }
}
@media (max-width: 600px) {
  body > header {
    height: 128px;
    padding: 10px 12px;
    gap: 7px;
  }
  .productTitle {
    font-size: 23px;
  }
  .layout {
    height: calc(100dvh - 128px);
  }
  aside {
    top: 128px;
  }
}

/* ===== Tela cheia e 4 pavimentos (body.expanded-view / body.four-floors) ===== */
body.expanded-view > header,
body.expanded-view aside {
  display: none !important;
}
body.expanded-view .layout {
  display: block !important;
  width: 100vw;
  height: 100dvh !important;
}
body.expanded-view #stage {
  width: 100%;
  height: 100dvh !important;
}
#viewToolbar {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 7;
  gap: 7px;
  align-items: center;
  padding: 7px;
  background: #0f172aee;
  border: 1px solid #334155;
  border-radius: 10px;
}
#viewToolbar strong {
  color: #e2e8f0;
  padding: 0 8px;
  font-size: 14px;
}
#exitExpanded {
  display: none;
}
body.expanded-view #exitExpanded {
  display: block;
}
#viewToolbar {
  display: none;
}
body.expanded-view #viewToolbar,
body.four-floors #viewToolbar {
  display: flex;
}
body.expanded-view.native-fullscreen #viewToolbar {
  display: none;
}
body.expanded-view.native-fullscreen #floorTiles {
  inset: 10px;
}
/* Escurece rapidamente a vista quando a escada leva a outro pavimento no modo Caminhar. */
#stairFade {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #0f172a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease-out;
}
#stairFade.show {
  opacity: 0.85;
  transition: none;
}
#floorTiles {
  display: none;
  position: absolute;
  inset: 64px 10px 10px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  pointer-events: none;
}
body.four-floors #floorTiles {
  display: grid;
}
.floorTile {
  border: 1px solid #64748b66;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.floorTile button {
  position: absolute;
  top: 8px;
  left: 8px;
  pointer-events: auto;
  background: #0f172aee;
  color: #f8fafc;
}
.floorTile small {
  position: absolute;
  left: 12px;
  color: #64748b;
  font-size: 11px;
}
body.dark-surroundings .floorTile small {
  color: #94a3b8;
}
body.four-floors #minimap,
body.four-floors #overviewHint,
body.four-floors #tip,
body.four-floors #status,
body.four-floors #selection {
  display: none !important;
}
body.expanded-view:not(.four-floors):not(.native-fullscreen) #status {
  top: 70px;
}
@media (max-width: 600px) {
  #viewToolbar {
    left: 10px;
    right: 10px;
    justify-content: space-between;
    gap: 4px;
  }
  #viewToolbar strong {
    font-size: 12px;
    padding: 0;
  }
  #viewToolbar button {
    font-size: 11px;
    padding: 7px;
  }
  .floorTile button {
    font-size: 11px;
    padding: 6px;
  }
  .floorTile small {
    display: none;
  }
}

/* ===== Controles individuais dos quadros ===== */
.floorTile .tileControls {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 4px;
  pointer-events: auto;
}
.floorTile .tileControls button {
  position: static;
  padding: 5px 9px;
  min-height: 30px;
  font-size: 12px;
}
.floorTile .tileControls button.active {
  background: #0369a1;
  border-color: #38bdf8;
}
.floorTile small {
  bottom: 46px;
}
.floorTile .openFloor {
  max-width: calc(100% - 16px);
}
@media (max-width: 600px) {
  .floorTile .tileControls {
    right: 5px;
    left: 5px;
    bottom: 5px;
    justify-content: center;
    gap: 3px;
  }
  .floorTile .tileControls button {
    padding: 4px 7px;
    font-size: 11px;
  }
}

/* ===== Celular: tela estreita, ou deitada com toque (mesma consulta de "phone" em modelo.js) ===== */
@media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
  body > header {
    height: 72px;
    padding: 6px 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 8px;
    align-items: center;
  }
  .brandLogo {
    width: 120px;
    height: 26px;
    border-radius: 3px;
  }
  .brandLogo img {
    width: 120px;
    top: -35px;
  }
  .sub {
    display: none;
  }
  .productTitle {
    position: static;
    transform: none;
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 17px;
    text-align: center;
  }
  .headerActions {
    grid-column: 2;
    grid-row: 1;
  }
  .headerActions .desktop {
    display: none;
  }
  #mobileBtn {
    display: block;
    padding: 6px 14px;
  }
  .layout {
    display: block;
    position: relative;
    height: calc(100dvh - 72px);
  }
  /* Menu lateral sobre a vista, com fundo escurecido que fecha ao ser tocado. */
  aside {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 8;
    width: min(86vw, 320px);
    display: none;
    box-shadow: 8px 0 30px #02061799;
  }
  body.menu aside {
    display: block;
  }
  body.menu .layout::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 7;
    background: #02061799;
  }
  #navSection {
    display: none;
  }
  #stage {
    height: 100%;
  }
  #mobileDock {
    display: grid;
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 5;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 7px;
    border-radius: 12px;
    background: #0f172aee;
    border: 1px solid #334155;
  }
  #mobileDock select {
    min-width: 0;
    padding: 8px;
  }
  #mobileDock .buttons {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }
  #mobileDock .buttons button {
    padding: 9px 2px;
    font-size: 12px;
    white-space: nowrap;
  }
  body.four-floors #mobileDock {
    display: none;
  }
  #status {
    top: 10px;
    left: 10px;
    padding: 7px 10px;
    font-size: 11px;
  }
  #tip {
    top: 52px;
    bottom: auto;
    left: 10px;
    right: 10px;
    padding: 9px 12px;
    transition: opacity 0.3s;
  }
  body.tipSeen #tip {
    opacity: 0;
  }
  .overviewHint {
    display: none !important;
  }
  #minimap {
    width: 112px;
    height: 112px;
    right: 8px;
    bottom: 112px;
  }
  #joystick {
    left: 14px;
    bottom: 112px;
  }
  #selection {
    top: 50px;
    right: 8px;
    width: calc(100% - 16px);
    max-height: calc(100% - 170px);
  }
}
/* Celular deitado: cabeçalho e barra em uma linha só, para sobrar altura para a vista. */
@media (max-height: 500px) and (pointer: coarse) {
  body > header {
    height: 46px;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
  }
  .productTitle {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
  }
  .headerActions {
    grid-column: 3;
  }
  .layout {
    height: calc(100dvh - 46px);
  }
  #mobileDock {
    right: auto;
    width: min(760px, calc(100% - 16px));
    grid-template-columns: 150px 150px 1fr;
  }
  #mobileDock .buttons {
    grid-column: auto;
  }
  #minimap,
  #joystick {
    bottom: 66px;
  }
  #selection {
    max-height: calc(100% - 120px);
  }
}
