/* Workspace, instrument transports, and compact mobile settings. */
.workspace-controls {
  border: 1px solid #486668;
  background: #122d32;
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0 14px;
}
.workspace-controls .row {
  gap: 6px;
  flex-wrap: wrap;
}
.workspace-controls button {
  min-height: 42px;
  flex: 1;
  font-size: 12px;
}
.workspace-controls .active {
  background: #315455;
  border-color: #afd9ce;
}
.draft-banner {
  background: #443d2b;
  color: #f7db9b;
  border-left: 3px solid #dcc28a;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0;
}
.object-row small {
  display: block;
  color: #a4bbbe;
  font-size: 10px;
  margin-top: 3px;
}
.object-row {
  min-height: 45px;
}
.parameter-control {
  margin: 15px 0;
}
.parameter-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.parameter-heading label {
  margin: 0;
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
}
.parameter-heading input[type="number"] {
  width: 100px;
  min-width: 80px;
  min-height: 44px;
  padding: 8px 10px;
  text-align: right;
  font-size: 16px;
  border: 1px solid #57716d;
  background: #11292d;
  color: #f4e2be;
  border-radius: 7px;
}
.parameter-control input[type="range"] {
  width: 100%;
  min-height: 30px;
  margin: 3px 0 0;
  accent-color: #acd9c7;
}
.simulation-controls {
  border-top: 1px solid #466061;
  border-bottom: 1px solid #466061;
  padding: 14px 0;
  margin: 18px 0;
}
.simulation-controls .row {
  display: flex;
  gap: 7px;
}
.simulation-controls button {
  min-height: 44px;
  flex: 1;
  font-size: 12px;
}
.simulation-controls label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.simulation-controls select {
  min-height: 44px;
}
.simulation-controls output {
  color: #f1dba8;
  font-variant-numeric: tabular-nums;
}
#settings-dialog {
  width: min(440px, calc(100vw - 28px));
  padding: 28px;
  border-radius: 18px;
  border: 1px solid #56706b;
  background: #122a2d;
  color: #edeee5;
  max-height: 85dvh;
  overflow: auto;
}
#settings-dialog::backdrop {
  background: #02111399;
  backdrop-filter: blur(8px);
}
#settings-dialog h2 {
  font:
    400 30px Georgia,
    serif;
  margin: 14px 0;
}
#settings-dialog p {
  line-height: 1.6;
  font-size: 13px;
  color: #b6ccca;
}
#settings-dialog label {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 7px;
  font-size: 13px;
}
#settings-dialog select {
  width: 100%;
  min-height: 46px;
  background: #19393d;
  color: #edeee5;
  border: 1px solid #58736d;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
}
#settings-dialog input {
  width: 100%;
  min-height: 34px;
  accent-color: #d3ba83;
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 42px;
  height: 42px;
  font-size: 26px;
}
#joystick {
  display: none;
  position: fixed;
  z-index: 17;
  bottom: calc(98px + env(safe-area-inset-bottom));
  left: 22px;
  width: 110px;
  height: 110px;
  border: 1px solid #b6d5c966;
  border-radius: 50%;
  background: #112d3280;
  backdrop-filter: blur(8px);
  touch-action: none;
  user-select: none;
}
#joystick i {
  position: absolute;
  width: 46px;
  height: 46px;
  left: 31px;
  top: 31px;
  border-radius: 50%;
  background: #c1d3b477;
  border: 1px solid #d7e4cda0;
  box-shadow: 0 2px 12px #0004;
}
#joystick span {
  position: absolute;
  bottom: -21px;
  left: 0;
  right: 0;
  text-align: center;
  font: 9px sans-serif;
  letter-spacing: 2px;
  color: #bed0c7;
}
#heritage-panel {
  position: fixed;
  right: 26px;
  top: 115px;
  width: 340px;
  max-height: calc(100dvh - 160px);
  overflow: auto;
  z-index: 23;
  background: #132d30ee;
  border: 1px solid #776950;
  border-radius: 16px;
  padding: 20px;
  color: #e1e5d9;
  backdrop-filter: blur(18px);
}
#heritage-panel p {
  font-size: 13px;
  line-height: 1.7;
  color: #c9d0bc;
}
#heritage-panel h2 {
  font:
    400 27px Georgia,
    serif;
}
#heritage-panel input {
  width: 100%;
  min-height: 36px;
  accent-color: #dfc28f;
}
.heritage-open .experiment-dock,
.heritage-open .right-hud,
.heritage-open .zone-caption,
.heritage-open .scene-label,
.heritage-open #touch-pad,
.heritage-open #joystick {
  display: none !important;
}
.creator-credit {
  display: flex;
  gap: 7px 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #c8d1c2;
  padding: 10px 0 0;
}
.creator-credit a {
  color: #d9c8a0;
  text-decoration: none;
}
.creator-credit strong {
  font-weight: 500;
}
.about-credit {
  padding: 18px;
  border-radius: 12px;
  background: #294346;
  margin: 20px 0;
}
.about-credit p {
  margin: 8px 0 !important;
}
.about-credit a {
  color: #ebcf9a;
}
#music-track {
  width: 100%;
  min-height: 44px;
  background: #19393d;
  color: #edeee5;
  padding: 10px;
  border: 1px solid #58736d;
  border-radius: 8px;
  font-size: 14px;
}
#music-offline {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  font-size: 12px;
}
@media (max-width: 800px), (max-width: 1000px) and (max-height: 500px) {
  body[data-touch-style="joystick"].walking:not(.open):not(.station-open):not(
      .home
    ):not(.heritage-open)
    #joystick {
    display: block;
  }
  body[data-touch-style="joystick"] #touch-pad {
    display: none !important;
  }
  .hud-right {
    gap: 2px;
  }
  .hud-right .icon-button {
    width: 31px;
    min-width: 31px;
    height: 36px;
  }
  .hud .status,
  .hud .edition {
    display: none;
  }
  .brand {
    gap: 5px;
  }
  .brand small {
    font-size: 7px;
  }
  #heritage-panel {
    top: auto;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 40dvh;
    padding: 16px;
  }
  .heritage-open #zones {
    display: none;
  }
  .heritage-open #mobile-toolbar {
    display: none;
  }
  .heritage-open #heritage-panel {
    bottom: 10px;
  }
  .creator-credit {
    font-size: 10px;
    gap: 5px 10px;
    padding: 8px 0 2px;
  }
  .home-foot {
    flex-wrap: wrap;
    gap: 6px;
  }
  .parameter-heading input[type="number"] {
    width: 92px;
  }
  .simulation-controls button {
    padding: 8px 5px;
  }
  #station-panel .instrument-body {
    padding-bottom: 30px;
  }
  .workspace-controls button {
    font-size: 11px;
  }
  .workspace-controls .row {
    flex-wrap: wrap;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  #joystick {
    bottom: 20px;
    width: 96px;
    height: 96px;
  }
  #joystick i {
    left: 24px;
    top: 24px;
  }
  #heritage-panel {
    top: 64px;
    right: 12px;
    left: auto;
    bottom: 12px;
    width: 280px;
    max-height: none;
  }
  .home .creator-credit {
    padding-top: 0;
    font-size: 9px;
  }
}
.instrument-head .quick-sim {
  flex-shrink: 0;
  min-width: 42px;
  min-height: 42px;
  background: #afdccf;
  color: #123332;
  font-size: 15px;
}
.instrument-head > div {
  flex: 1;
  min-width: 0;
}
.instrument-head {
  gap: 8px;
}
@media (max-width: 800px) {
  .heritage-open #mobile-zoom {
    display: none;
  }
}

.heritage-open #zones {
  display: none !important;
}
@media (max-width:800px) and (min-height:501px){
  .home-actions{bottom:calc(170px + env(safe-area-inset-bottom));z-index:2}
  .home-preview{bottom:calc(242px + env(safe-area-inset-bottom))}
}

/* A single identity across the room, controls, and installed app. */
.brand-icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  flex: none;
  box-shadow: 0 0 22px #65e6e449;
}
.brand-name {
  font-size: 17px;
  line-height: 1.08;
  letter-spacing: 2.2px;
  white-space: nowrap;
}
.brand-name small {
  font-size: 11px;
  letter-spacing: 3.2px;
  margin-top: 4px;
}
.dialog-brand-logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 17px;
  margin: 0 0 16px;
  box-shadow: 0 0 30px #65e6e447;
}
@media (max-width: 800px), (max-width: 1000px) and (max-height: 500px) {
  .brand-icon { width: 38px; height: 38px; border-radius: 10px; }
  .brand-name { font-size: 14px; letter-spacing: 1.6px; }
  .brand-name small { font-size: 9px; letter-spacing: 2.5px; }
}
@media (max-width: 420px) {
  .brand-icon { width: 35px; height: 35px; border-radius: 9px; }
  .brand-name { font-size: 12px; letter-spacing: 1.2px; }
  .brand-name small { font-size: 8px; letter-spacing: 2.1px; }
}

.creator-credit {
  align-items: center;
  flex-wrap: nowrap;
  gap: 11px;
}
.creator-avatar {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  flex: none;
  overflow: hidden;
  border: 2px solid #d6bd85;
  border-radius: 50%;
  background: #18353a;
  box-shadow: 0 0 18px #70d9d83d;
}
.creator-avatar img {
  position: absolute;
  display: block;
  width: 220%;
  max-width: none;
  height: auto;
  left: -44%;
  top: -165%;
}
.creator-avatar-large { width: 92px; height: 92px; }
.creator-credit-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.creator-credit-details > span { color: #a8bdbd; }
.creator-credit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
}
.about-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.about-identity p { margin: 3px 0 !important; }
@media (max-width: 800px) {
  .creator-avatar { width: 42px; height: 42px; }
  .creator-avatar-large { width: 82px; height: 82px; }
}
