* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:root {
  color-scheme: light;
  --ink: #173e60;
  --line: #cbddea;
  --blue: #176ccc;
}
body {
  margin: 0;
  background: #e7f1f8;
  color: var(--ink);
  font: 14px system-ui, sans-serif;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px max(14px, env(safe-area-inset-left));
  background: #fff;
  flex: none;
  border-bottom: 1px solid var(--line);
  min-height: 58px;
}
header img {
  width: 112px;
}
header small {
  display: block;
  color: #59778c;
  font-size: 11px;
}
#status {
  margin-left: auto;
  font-size: 12px;
}
button,
input,
select {
  font: inherit;
  min-height: 44px;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #16b6ce;
  outline-offset: 2px;
}
button[aria-expanded="true"] {
  background: #0b465f;
  box-shadow: inset 0 -3px #42d7e7;
}
.hud-nav {
  position: absolute;
  top: 70px;
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  gap: 6px;
  z-index: 6;
  padding: 6px;
  border-radius: 14px;
  background: #ffffffed;
  box-shadow: 0 6px 25px #163e6020;
}
main {
  flex: 1;
  min-height: 0;
  position: relative;
  isolation: isolate;
}
.world {
  position: absolute;
  inset: 0;
}
#scene {
  position: absolute;
  inset: 0;
  touch-action: none;
}
#scene canvas {
  display: block;
}
.heading {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  background: #ffffffe8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 40%;
  pointer-events: none;
}
.heading h1 {
  font-size: 17px;
  margin: 0 0 3px;
  overflow-wrap: anywhere;
}
#count {
  font-size: 12px;
  color: #59778c;
}
#notice {
  position: absolute;
  left: 14px;
  bottom: 8px;
  z-index: 2;
  max-width: min(520px, calc(100% - 28px));
  padding: 8px 12px;
  background: #ffffffe8;
  border-radius: 10px;
  font-size: 12px;
  margin: 0;
  pointer-events: none;
}
.hud-panel {
  position: absolute;
  right: 12px;
  top: 74px;
  bottom: 52px;
  width: 330px;
  max-width: calc(100% - 24px);
  z-index: 5;
  background: #fffffff5;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 35px #143e6030;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-heading button {
  background: #edf5ff;
  color: var(--ink);
  font-size: 22px;
  padding: 3px 12px;
}
h2 {
  font-size: 16px;
  margin: 14px 0 8px;
}
.editor summary {
  font-weight: 700;
  cursor: pointer;
  padding: 8px 0;
}
.editor form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
input,
select {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}
.room-list,
.inventory-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.room-list button {
  text-align: left;
  overflow-wrap: anywhere;
  background: #edf5ff;
  color: #1b568b;
  border: 1px solid #bad2eb;
}
.room-list button.active {
  background: var(--blue);
  color: #fff;
}
.inventory-list button {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #edf5ff;
  color: var(--ink);
  text-align: left;
}
.inventory-list img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
#edit-permission {
  font-size: 12px;
  color: #53718b;
}
.access {
  bottom: auto;
  display: grid;
  gap: 8px;
}
#account-panel {
  bottom: auto;
  max-height: calc(100% - 130px);
  align-content: start;
}
#account-panel [id^="portal-"].icon-button {
  width: 100%;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  padding: 10px 12px;
  text-align: left;
}
#account-panel [id^="portal-"].icon-button svg { flex: 0 0 24px; }
#identity-status { margin: 4px 0 10px; overflow-wrap: anywhere; }
#furniture-actions {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: #fffffff5;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  width: max-content;
  max-width: calc(100% - 24px);
  box-shadow: 0 6px 20px #143e6020;
}
#selected-furniture {
  margin: 0 0 6px;
  font-size: 12px;
}
#furniture-actions button {
  margin: 2px;
  padding: 8px 10px;
}
#chat-panel {
  display: flex;
  flex-direction: column;
}
#chat-panel h2 {
  margin: 0 0 8px;
}
#people {
  padding-left: 20px;
  max-height: 75px;
  overflow: auto;
  flex-shrink: 0;
}
#messages {
  flex: 1;
  min-height: 40px;
  overflow: auto;
  overflow-wrap: anywhere;
  border-top: 1px solid var(--line);
}
#messages p {
  padding: 8px;
  background: #edf5ff;
  border-radius: 9px;
}
#chat label {
  display: block;
  font-size: 12px;
  margin: 8px 0;
}
#chat div {
  display: flex;
  gap: 6px;
}
#text {
  width: 100%;
}
aside small {
  font-size: 10px;
  color: #59778c;
  margin-top: 8px;
}
footer {
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px max(12px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 7;
}
footer label {
  font-size: 12px;
}
#radio {
  flex: 1;
  max-width: 320px;
}
#volume {
  width: 85px;
}
#audio-status {
  font-size: 11px;
  color: #59778c;
  max-width: 230px;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  header {
    min-height: 52px;
    padding: 6px 10px;
  }
  header img {
    width: 90px;
  }
  header small {
    display: none;
  }
  #status {
    font-size: 10px;
    max-width: 115px;
  }
  .hud-nav {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    position: relative;
    order: 2;
    justify-content: center;
    padding: 6px;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--line);
  }
  .hud-nav button {
    flex: 1;
    padding: 7px 4px;
    font-size: 12px;
  }
  .heading {
    max-width: calc(100% - 24px);
    top: 8px;
    left: 12px;
    padding: 8px 12px;
  }
  .heading h1 {
    font-size: 15px;
  }
  .hud-panel {
    top: 76px;
    bottom: 42px;
    right: 8px;
    width: 340px;
    max-width: calc(100% - 16px);
    padding: 12px;
  }
  footer {
    order: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
  }
  footer > label {
    display: none;
  }
  #radio {
    max-width: none;
    width: 100%;
    font-size: 12px;
  }
  #volume {
    width: 100%;
    min-height: 20px;
  }
  #audio-status {
    grid-column: 2 / 4;
    max-width: none;
    font-size: 10px;
  }
  #notice {
    font-size: 10px;
    bottom: 6px;
  }
  #furniture-actions {
    bottom: 42px;
    width: calc(100% - 24px);
  }
  #furniture-actions button {
    font-size: 12px;
  }
}
@media (max-height: 480px) {
  header {
    min-height: 42px;
  }
  header img {
    width: 85px;
  }
  .hud-nav {
    top: 48px;
  }
  .heading {
    top: 6px;
    padding: 6px 10px;
  }
  .hud-panel {
    top: 62px;
    bottom: 36px;
  }
  #notice {
    max-width: 40%;
  }
  footer {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  footer button,
  footer select {
    min-height: 36px;
  }
}

/* Musical Studio: original cyan/violet night theme matching the supplied direction. */
:root {
  color-scheme: dark;
  --ink: #e5f4ff;
  --line: #245984;
  --blue: #123e68;
}
body {
  background: #061329;
  color: var(--ink);
}
header,
footer {
  background: linear-gradient(115deg, #08162f, #10254c);
  border-color: #267293;
}
header strong {
  color: #42e8f4;
}
header small,
#status,
#count,
#audio-status {
  color: #a2c5df;
}
.hud-nav,
.heading,
.hud-panel,
#furniture-actions {
  background: linear-gradient(140deg, #0a203bed, #112b52f5);
  border: 1px solid #2081a7;
  box-shadow: 0 0 18px #00c8fa16;
}
button {
  background: linear-gradient(145deg, #164b76, #112d56);
  border: 1px solid #327ea4;
  color: #dbf9ff;
}
button:hover {
  border-color: #40eaff;
  box-shadow: 0 0 12px #19dcef40;
}
button[aria-expanded="true"],
#play {
  background: linear-gradient(135deg, #08c6da, #087cba);
  color: #001b35;
  border-color: #5ef7ff;
}
input,
select {
  background: #102843;
  color: #e5f4ff;
  border-color: #3c7097;
}
.room-list button,
.inventory-list button,
#messages p,
.panel-heading button {
  background: #142f53;
  color: #d7f2ff;
  border-color: #315a85;
}
.room-list button.active {
  background: #087f9b;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 10px;
  flex: none;
}
.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#notice {
  background: #0c2540e8;
  color: #b9d7ed;
}
#edit-permission,
aside small {
  color: #a0c4df;
}
.studio-path {
  display: block;
  font-size: 10px;
  color: #8ab8d4;
  margin: 4px 0;
}
.heading h1 {
  color: #f3faff;
}
@media (min-width: 1000px) {
  .hud-nav {
    top: 88px;
    left: 12px;
    right: auto;
    flex-direction: column;
  }
  .heading {
    left: 84px;
  }
  .hud-panel {
    right: 14px;
    width: 310px;
  }
  .hud-nav .icon-button {
    width: 48px;
    height: 48px;
  }
}
@media (max-width: 700px) {
  .hud-nav {
    background: #081a36;
  }
  .hud-nav .icon-button {
    flex: 1;
    width: auto;
  }
  .studio-path {
    font-size: 9px;
  }
  .heading {
    max-width: calc(100% - 24px);
  }
  footer .icon-button {
    width: 44px;
    height: 44px;
  }
}

#discord-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#discord-status {
  font-size: 11px;
  color: #9bd6ef;
  margin: 0;
}
#discord-messages {
  flex: 1;
  min-height: 50px;
  overflow: auto;
  overflow-wrap: anywhere;
}
#discord-messages article {
  padding: 10px;
  margin: 6px 0;
  background: #153253;
  border-radius: 10px;
}
#discord-messages p {
  margin: 5px 0;
  font-size: 13px;
  white-space: pre-wrap;
}
#discord-messages time {
  float: right;
  font-size: 10px;
  color: #aac8e3;
}
#discord-panel details {
  max-height: 120px;
  overflow: auto;
  flex-shrink: 0;
}
#discord-panel small {
  font-size: 10px;
  color: #a0c4df;
}
.discord-open {
  padding: 12px;
  border: 1px solid #26cde7;
  border-radius: 10px;
  color: #6ff2ff;
  text-decoration: none;
  flex-shrink: 0;
}

#community-panel p {
  font-size: 12px;
  color: #accce2;
}
#community-links {
  display: grid;
  gap: 8px;
}
#community-links a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #32658b;
  border-radius: 10px;
  background: #112e50;
  color: #dffaff;
  text-decoration: none;
  min-height: 52px;
}
#community-links a:focus-visible {
  outline: 3px solid #37e3f4;
}
#community-links small {
  color: #9ec6df;
}
#reference-gallery {
  margin-top: 16px;
}
#reference-gallery summary {
  min-height: 44px;
  cursor: pointer;
}
#reference-cards figure {
  margin: 12px 0;
}
#reference-cards img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
#reference-cards figcaption {
  font-size: 12px;
  padding: 6px;
}

.camera-tools {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.camera-tools .icon-button {
  width: 42px;
  height: 42px;
  background: #0d2442e8;
}
.hud-nav {
  backdrop-filter: blur(10px);
}
header {
  box-shadow: 0 5px 24px #01081970;
}
#play {
  border-radius: 50%;
  box-shadow: 0 0 18px #21dff53a;
}
.world {
  background: radial-gradient(ellipse at center, #142947, #061329 75%);
}
#scene {
  background: transparent;
}
.heading {
  backdrop-filter: blur(8px);
}
@media (min-width: 1100px) {
  .camera-tools {
    right: 344px;
  }
  .heading {
    max-width: 330px;
  }
}
@media (max-width: 700px) {
  .camera-tools {
    right: 10px;
    bottom: 48px;
  }
  .camera-tools .icon-button {
    width: 40px;
    height: 40px;
  }
  .heading .studio-path {
    display: none;
  }
}

@media (min-width: 1100px) {
  #chat-panel,
  #discord-panel {
    top: 12px;
    bottom: 12px;
    background: linear-gradient(145deg, #0b2340f5, #112c50f5);
    border-color: #22c3e4;
  }
  #chat-panel .panel-heading,
  #discord-panel .panel-heading {
    padding-bottom: 8px;
    border-bottom: 1px solid #295679;
  }
  #chat-panel h2 {
    font-size: 13px;
    color: #9ac3de;
  }
  #chat-panel #messages {
    border: 0;
  }
  #chat-panel #people {
    border-bottom: 1px solid #254566;
    padding-bottom: 10px;
  }
}

.heading #venue-artwork { pointer-events: auto; }
#venue-image { display: block; max-width: min(280px, 70vw); height: auto; }

#scene {
  background-image: linear-gradient(#061329a0, #061329e8);
  background-position: center;
  background-size: cover;
}

#venue-portals { pointer-events: auto; max-width: 100%; }
#terrain-return { pointer-events: auto; margin-top: 6px; }
#terrain-sectors { pointer-events: auto; margin-top: 6px; }
#campus-content .terrain-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;}
#campus-content .terrain-actions button {min-height:48px;width:100%;}
.radio-programs {margin-block:16px;min-width:0;overflow-wrap:anywhere;}
.program-controls {display:grid;gap:8px;grid-template-columns:minmax(0,1fr) 48px;}
.program-controls label {display:grid;gap:5px;min-width:0;font-size:12px;}
.program-controls label:first-child {grid-column:1;grid-row:1;}
.program-controls label:nth-child(2) {grid-column:1/-1;grid-row:2;}
.program-controls select {min-height:44px;width:100%;min-width:0;font-size:14px;}
.program-controls button {grid-column:2;grid-row:1;width:48px;min-height:44px;align-self:end;}
.program-status,.program-notice {font-size:12px;line-height:1.5;color:#afd9ed;}
.program-list {display:grid;gap:10px;}
.program-card {border:1px solid #29546d;border-radius:12px;padding:12px;background:#102a42;}
.program-card h3 {font-size:16px;margin:0 0 8px;color:#e5f5ff;}
.program-card p {font-size:13px;margin:6px 0;line-height:1.5;white-space:pre-wrap;}
.program-card .program-time {color:#68e8f7;font-weight:700;}
.program-card span {display:inline-block;background:#183e55;border-radius:6px;padding:4px 6px;font-size:11px;color:#b6e7f5;}
body[data-terrain="true"] .heading {display:grid;grid-template-columns:44px 44px minmax(0,1fr);gap:6px;align-items:center;}
body[data-terrain="true"] .heading h1 {grid-column:1/-1;overflow-wrap:anywhere;}
body[data-terrain="true"] .heading #count {white-space:nowrap;font-size:11px;padding-left:6px;}
body[data-terrain="true"] .heading #terrain-return,
body[data-terrain="true"] .heading #terrain-sectors {margin:0;}
body[data-terrain="true"] #venue-portals,
body[data-terrain="true"] .heading .studio-path {display:none;}

.entrance-destinations {
  display: grid;
  gap: 8px;
}
.entrance-destinations .icon-button {
  width: 100%;
  min-height: 52px;
  height: auto;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px;
}
.entrance-destinations svg { flex: 0 0 24px; }
.campus-logo { display:block; width:90px; height:90px; object-fit:contain; margin:8px auto 14px; }
#campus-content { display:grid; gap:8px; }
#campus-content p { line-height:1.5; margin:4px 0 10px; color:#bbd4e6; }
#campus-content .campus-link { width:100%; height:auto; min-height:48px; padding:10px 12px; gap:12px; justify-content:flex-start; text-align:left; }
#campus-content .campus-link svg { flex:none; }
#camera-follow[aria-pressed="true"] {border-color:#65e6d8; background:#087c80;}
.camera-tools { flex-wrap:wrap; justify-content:flex-end; }
@media(max-width:700px) {
  .camera-tools {max-width:192px;}
  .camera-tools .icon-button {width:42px; height:44px; padding:9px;}
}
#entrance-panel > p { color: #a9c9e4; }
.camera-tools { max-width: calc(100% - 24px); }
.camera-tools .icon-button { min-height: 44px; }
#camera-move[aria-pressed="true"] {
  border-color: #69f6ff;
  background: #087f9b;
  box-shadow: inset 0 -3px #42d7e7;
}
.camera-tools { max-width:calc(100% - 24px); flex-wrap:wrap; }
@media(max-width:700px) {
  .camera-tools { max-width:188px; gap:4px; }
  .camera-tools .icon-button { flex:0 0 44px; width:44px; height:44px; }
}
#scene canvas.camera-move { cursor: grab !important; }
#scene canvas.camera-dragging { cursor: grabbing !important; }
@media (max-width: 700px) {
  .hud-nav {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    padding: 4px;
  }
  .hud-nav .icon-button {
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 8px 4px;
  }
  .camera-tools { gap: 4px; }
}
/* Entry hub: keep all navigation above the scene and the same persistent audio. */
.entry-shortcuts {position:absolute;left:84px;top:68px;z-index:4;display:flex;gap:6px;}
.entry-shortcuts .icon-button {width:44px;height:44px;background:#0b2649e8;}
body[data-entry="false"] .entry-shortcuts {display:none;}
body[data-entry="true"] .heading {display:flex;align-items:center;gap:12px;max-width:calc(100% - 440px);padding:10px 16px;min-height:48px;}
body[data-entry="true"] .heading h1 {margin:0;white-space:nowrap;}
body[data-entry="true"] .heading .studio-path,
body[data-entry="true"] #venue-artwork,
body[data-entry="true"] #venue-portals {display:none;}
body[data-entry="true"] #count {font-size:11px;border-left:1px solid #26557b;padding-left:12px;}
#radio-search {width:100%;margin-top:8px;}
#radio-catalog-status {color:#9cbcd6;font-size:12px;}
#radio-catalog {display:grid;gap:10px;}
#radio-catalog article {display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:10px;background:#10294a;border:1px solid #22517b;padding:10px;border-radius:12px;}
#radio-catalog img {width:44px;height:44px;object-fit:contain;border-radius:8px;}
#radio-catalog strong {font-size:12px;overflow-wrap:anywhere;}
#radio-catalog small {grid-column:2/4;color:#86dce8;font-size:10px;}
#radio-catalog .icon-button {width:44px;}
#service-content {display:grid;gap:12px;line-height:1.5;}
#service-content a {color:#cefbff;text-decoration:none;border:1px solid #297499;padding:14px;border-radius:12px;background:#12395a;}
#service-content small {color:#a1bdd5;font-size:12px;}
#service-content a:focus-visible {outline:3px solid #4fe7ff;outline-offset:3px;}
#school-radio.icon-button {width:100%;gap:10px;justify-content:flex-start;padding:12px;height:auto;}
#player-logo {width:52px;height:52px;object-fit:contain;border:1px solid #2b6988;border-radius:12px;background:#0b1833;}
#discord-people {list-style:none;padding:0;margin:8px 0;}
#discord-people li {padding:8px 4px;border-bottom:1px solid #24405f;font-size:12px;overflow-wrap:anywhere;}
#discord-panel details {border-top:1px solid #28516f;padding-top:10px;max-height:160px;}
#discord-panel summary {cursor:pointer;font-weight:600;color:#a4e1ed;min-height:32px;}
#discord-messages strong {color:#72e7f5;font-size:12px;}
#discord-messages article {border:1px solid #284667;background:#16304f;}
@media(min-width:1100px){
  header {min-height:64px;gap:18px;}
  header img {width:132px;}
  header strong {font-size:20px;}
  footer {min-height:76px;padding-inline:24px;gap:16px;}
  #radio {max-width:380px;}
  .hud-nav {top:82px;bottom:auto;}
  .camera-tools {gap:5px;bottom:15px;}
  #notice {max-width:340px;font-size:11px;}
  #discord-panel {width:310px;}
}
@media(min-width:701px) and (max-width:1099px){
  .hud-nav {left:12px;right:auto;top:74px;flex-direction:column;}
  .heading {left:82px;}
  body[data-entry="true"] .heading {max-width:calc(100% - 105px);}
  .entry-shortcuts {left:84px;}
  .hud-panel {top:130px;bottom:65px;}
  .camera-tools {right:12px;}
}
@media(max-width:700px){
  header {min-height:50px;gap:10px;}
  header img {width:82px;}
  header strong {font-size:13px;}
  #status {font-size:9px;max-width:95px;}
  body[data-entry="true"] .heading {top:6px;left:8px;right:8px;max-width:none;padding:9px 12px;min-height:46px;justify-content:space-between;gap:6px;}
  body[data-entry="true"] .heading h1 {font-size:14px;}
  body[data-entry="true"] #count {font-size:10px;}
  .entry-shortcuts {left:8px;top:58px;gap:5px;}
  .entry-shortcuts .icon-button {width:44px;height:44px;}
  .hud-nav {grid-template-columns:repeat(6,minmax(0,1fr));order:4;}
  .hud-nav #fullscreen,.hud-nav [data-panel="chat-panel"] {display:none;}
  .hud-panel {top:58px;bottom:44px;}
  #account-panel {max-height:calc(100% - 102px);}
  footer {grid-template-columns:40px minmax(0,1fr) 44px 44px;order:3;gap:5px;min-height:74px;}
  #player-logo {width:40px;height:40px;grid-row:1 / 3;}
  #radio {grid-column:2;font-size:12px;}
  #play {grid-column:3;} #stop {grid-column:4;}
  #volume {grid-column:2;grid-row:2;}
  #audio-status {grid-column:3 / 5;grid-row:2;font-size:9px;}
  .camera-tools {bottom:38px;right:8px;}
  #discord-panel details {max-height:100px;}
}
@media(max-height:480px){
  header {min-height:42px;}
  .entry-shortcuts {top:56px;left:80px;}
  .camera-tools {bottom:36px;max-width:235px;}
  .hud-nav {top:52px;max-height:calc(100dvh - 130px);overflow:auto;}
  footer {min-height:55px;}
  #player-logo {width:36px;height:36px;}
}
.camera-tools {max-width:none;flex-wrap:nowrap;align-items:flex-end;}
.camera-advanced {position:relative;}
.camera-advanced summary {display:grid;place-items:center;list-style:none;cursor:pointer;min-width:44px;min-height:44px;font-weight:700;font-size:26px;line-height:1;border:1px solid #327ea4;background:#0d2442f5;border-radius:10px;}
.camera-advanced summary::-webkit-details-marker {display:none;}
.camera-advanced summary:focus-visible {outline:3px solid #4fe7ff;outline-offset:2px;}
.camera-advanced>div {position:absolute;bottom:54px;left:0;display:grid;grid-template-columns:44px 44px;gap:5px;padding:7px;background:#081a36;border:1px solid #2bb7d3;border-radius:12px;}
@media(max-width:700px){.camera-tools {max-width:none;gap:4px;bottom:38px;}.camera-advanced>div{left:0;}}

#studio-radio-panel {padding:12px;margin:8px 0 18px;border:1px solid #327ea4;border-radius:12px;background:#0d2442;}
#studio-radio-panel h2 {font-size:16px;margin:0 0 8px;}
#studio-radio-status {font-size:13px;line-height:1.5;overflow-wrap:anywhere;}
#studio-radio-form label {font-size:13px;}
#studio-radio-form small {display:block;line-height:1.5;margin-top:8px;color:#a8c8df;}
.studio-radio-controls {display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;margin-top:8px;}
.studio-radio-controls select {width:100%;min-width:0;min-height:48px;}
#studio-radio-save {width:48px;height:48px;}
/* Camera references remain an explicit viewer, never a replacement world. */
#camera-picker-dialog {
  position:fixed;inset:0;z-index:1000;box-sizing:border-box;
  width:min(1120px,calc(100% - 32px));max-width:none;
  max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
  margin:auto;padding:24px;overflow:auto;overscroll-behavior:contain;
  color:#e4f4ff;background:linear-gradient(140deg,#102443,#061328);
  border:1px solid #27c6df;border-radius:20px;box-shadow:0 25px 80px #0009;
}
#camera-picker-dialog:not([open]) {display:none;}
#camera-picker-dialog::backdrop {background:#030a18d9;}
.camera-picker-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.camera-picker-heading h2 {margin:5px 0 0;font-size:24px;}
.camera-picker-heading small {font-size:11px;letter-spacing:2px;color:#51e0ef;}
#camera-picker-description {line-height:1.5;color:#b7d0e6;font-size:14px;}
#camera-picker {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;margin-top:20px;}
#camera-picker label {grid-column:1/-1;font-size:13px;font-weight:600;}
#camera-picker select {width:100%;min-width:0;min-height:46px;}
#camera-picker-dialog .icon-button {min-width:44px;min-height:44px;}
#camera-picker-dialog [data-label] {display:inline-flex;width:auto;height:auto;align-items:center;gap:9px;padding:12px 16px;}
#camera-picker-dialog [data-label] svg {width:22px;height:22px;flex:0 0 22px;}
#camera-picker-dialog button:focus-visible,#camera-picker-dialog select:focus-visible,#camera-preview-pan:focus-visible {outline:3px solid #55ebff;outline-offset:3px;}
#camera-preview-status {font-size:13px;line-height:1.5;min-height:20px;color:#8dd6eb;}
#camera-preview-figure {margin:16px 0;}
#camera-preview-pan {border:1px solid #285778;border-radius:14px;overflow-x:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;}
#camera-preview-image {display:block;width:100%;height:auto;max-width:none;}
#camera-preview-figure figcaption {color:#94b5d1;font-size:12px;line-height:1.5;margin-top:10px;}
.camera-pan-hint {display:none;}
@media(max-width:700px) {
  #camera-picker-dialog {width:calc(100% - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:16px;border-radius:16px;}
  .camera-picker-heading h2 {font-size:20px;}
  #camera-picker {grid-template-columns:minmax(0,1fr);}
  #camera-picker-dialog [data-label] {justify-content:center;}
  #camera-picker-return {width:100% !important;}
  #camera-preview-image {width:900px;}
  .camera-has-preview .camera-pan-hint {display:block;font-size:12px;color:#a8c8df;}
}
/* Private owner terrain tools use the existing HUD drawer at every viewport. */
#my-radio-terrains { margin-block: 12px; padding-block: 10px; border-bottom: 1px solid #245478; }
.my-terrain-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-block: 10px; }
.my-terrain-row strong { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.my-terrain-row button { max-width: 100%; white-space: normal; }
.radio-page {min-width:0;margin-block:16px;}
.radio-page-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;}
.radio-page-controls label {min-width:0;font-size:12px;}
.radio-page-controls select {display:block;width:100%;min-width:0;margin-top:6px;min-height:44px;}
.radio-page-controls button {min-width:44px;min-height:44px;}
.radio-page-status,.radio-news-meta {font-size:12px;color:#b3cfe1;}
.radio-page-body {overflow-wrap:anywhere;min-width:0;}
.radio-page-body>p,.radio-news-text {white-space:pre-wrap;line-height:1.65;}
.radio-page-body .radio-page-logo {width:76px;height:76px;object-fit:contain;}
.radio-news-card {margin-block:12px;padding:14px;border:1px solid #2c5670;border-radius:14px;background:#102d40;}
.radio-news-card summary {min-height:44px;font-weight:700;cursor:pointer;line-height:1.5;}
.radio-news-card img {display:block;max-width:100%;height:auto;max-height:220px;object-fit:contain;border-radius:8px;}
.radio-news-card a {display:inline-block;min-height:44px;line-height:1.5;padding-block:10px;color:#63e6f4;}
