/**
 * Horizon Spatial — assets/css/explorer.css.
 *
 * RMS studio: one brand palette, generous model space and quiet, tactile native controls.
 *
 * @package Horizon_Spatial
 * @author  Dwayne Silvera
 * @since   1.0.0
 */
:root {
  --blue: #283891;
  --yellow: #ffde16;
  --ink: #07131b;
  --paper: #f3f2ec;
  --muted: #afbdc9;
  --line: #6e8fa342;
  --surface: #102532;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--paper);
  background: var(--ink);
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.explorer-shell {
  padding: clamp(18px, 3vw, 34px);
  max-width: 1500px;
  margin: auto;
}
.studio-heading {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.generic-badge {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--yellow);
  margin: 0 0 12px;
}
.studio-heading h1 {
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
}
.studio-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}
.explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 30px;
}
.visual-column {
  min-width: 0;
}
#scene {
  position: relative;
  width: 100%;
  height: clamp(410px, 42vw, 610px);
  overflow: hidden;
  background: transparent;
}
#roof-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.static-pair {
  position: relative;
  width: 100%;
  height: 100%;
}
.static-pair img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#static-exploded {
  opacity: 0;
  transition: none;
}
#loading {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--yellow);
  font-size: 12px;
  white-space: nowrap;
}
.explore-toolbar {
  padding: 4px 0 0;
}
.primary-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}
.primary-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.primary-controls button:hover:not(:disabled) {
  border-color: var(--yellow);
  transform: translateY(-2px);
}
.primary-controls button:active:not(:disabled) {
  transform: translateY(0);
}
.primary-controls button[aria-pressed='true'] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}
.primary-controls #reset {
  background: transparent;
}
.control-icon {
  width: 20px;
  height: 22px;
  flex-shrink: 0;
}
#view-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
  min-height: 19px;
  margin: 13px 0 0;
}
.advanced-controls {
  max-width: 640px;
  margin: 17px auto 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 14px 0;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  float: right;
  color: var(--yellow);
  font-size: 18px;
  line-height: 16px;
}
details[open] > summary::after {
  content: '−';
}
.advanced-inner {
  padding: 5px 0 14px;
}
.assembly-control label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.assembly-control input,
.part-inspection input {
  width: 100%;
  accent-color: var(--yellow);
  height: 30px;
  margin: 8px 0 12px;
}
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.camera-controls select {
  max-width: 70%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--paper);
  padding: 8px 14px;
}
.view-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.view-controls button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 18px;
}
.view-controls #rotate-left {
  font-size: 12px;
  padding: 0 14px;
}
.view-controls button:hover:not(:disabled) {
  border-color: var(--yellow);
}
.explorer-details {
  min-width: 0;
  padding-top: 27px;
}
.small-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--yellow);
  font-weight: 700;
  margin: 0 0 9px;
}
.layer-heading h2 {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 21px;
}
.layer-selector {
  display: grid;
  gap: 7px;
}
.layer-selector button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  text-align: left;
  padding: 13px 15px 13px 20px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  transition:
    border-color 0.18s,
    background-color 0.18s;
}
.layer-selector button::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--blue);
}
.layer-selector button:hover {
  border-color: var(--paper);
  background: #ffffff05;
}
.layer-selector button[aria-pressed='true'] {
  border-color: var(--yellow);
  background: #ffde1609;
}
.layer-selector button[aria-pressed='true']::before {
  background: var(--yellow);
}

.layer-info {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  min-height: 165px;
}
.layer-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
#material-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.layer-info h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 12px 0;
}
.layer-info p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}
#clear-layer {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 40px;
}
.ask-rms,
.part-inspection > button {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.part-inspection > button {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.part-inspection > button:hover:not(:disabled) {
  border-color: var(--yellow);
}
.part-inspection > button[aria-pressed='true'] {
  border-color: var(--yellow);
  background: transparent;
  color: var(--yellow);
}
.ask-rms {
  margin: 17px 0 9px;
  background: transparent;
  color: var(--paper);
}
.ask-rms:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.part-inspection {
  margin-top: 10px;
}
.part-inspection details {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  font-size: 12px;
}
.part-inspection details p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.part-inspection label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.illustration-note {
  margin-top: 25px;
  border-top: 1px solid var(--line);
}
.illustration-note p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 740px;
  margin: 0 0 12px;
}
@media (max-width: 760px) {
  .explorer-shell {
    padding: 18px;
  }
  .studio-heading {
    padding-bottom: 19px;
  }
  .explorer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  #scene {
    height: clamp(280px, 88vw, 420px);
  }
  .primary-controls {
    gap: 6px;
  }
  .primary-controls button {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    padding: 10px 5px;
    min-height: 66px;
  }
  .control-icon {
    width: 19px;
    height: 20px;
  }
  .explorer-details {
    padding-top: 9px;
  }
  .layer-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }
  .layer-heading h2 {
    font-size: 21px;
    margin-bottom: 15px;
  }
  .layer-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layer-selector button {
    min-height: 54px;
    font-size: 11px;
    padding-right: 11px;
  }
  .layer-info {
    min-height: 0;
    margin-top: 20px;
  }
  .generic-badge {
    font-size: 9px;
    letter-spacing: 0.13em;
  }
  .studio-subtitle {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .primary-controls button:hover {
    transform: none;
  }
}

@supports (color: color-mix(in srgb, white, black)) {
  :root {
    --surface: color-mix(in srgb, var(--blue) 14%, var(--ink));
  }
}

/** Mobile information tray: desktop keeps the existing always-visible sidebar. */
.mobile-information-summary {
  display: none;
}
@media (max-width: 760px) {
  .explorer-shell {
    padding: 12px;
  }
  .studio-heading {
    padding-bottom: 12px;
    margin-bottom: 4px;
  }
  .studio-heading h1 {
    font-size: 22px;
    line-height: 1.15;
  }
  .generic-badge {
    margin-bottom: 7px;
  }
  .studio-subtitle {
    line-height: 1.45;
    margin-top: 7px;
  }
  .explorer-grid {
    gap: 12px;
  }
  #scene {
    /* Width-based sizing avoids iframe-height feedback while opening details. */
    height: clamp(260px, 78vw, 380px);
  }
  .primary-controls button {
    min-height: 54px;
    padding: 7px 4px;
    gap: 3px;
  }
  #view-hint {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.4;
  }
  .advanced-controls {
    margin-top: 8px;
  }
  .explorer-details {
    padding-top: 0;
  }
  .layer-heading {
    margin-bottom: 8px;
  }
  .layer-heading .small-label {
    margin: 0;
  }
  .layer-heading h2 {
    display: none;
  }
  .layer-selector {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scrollbar-width: thin;
  }
  .layer-selector button {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    max-width: min(260px, 85vw);
    border-radius: 10px;
    padding: 9px 12px 9px 18px;
    font-size: 12px;
  }
  .layer-name {
    overflow-wrap: anywhere;
  }
  .layer-selector button > span[aria-hidden='true'] {
    display: none;
  }
  .layer-information {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-top: 4px;
    padding: 0 12px;
    background: var(--surface);
  }
  .mobile-information-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 0;
    color: var(--paper);
  }
  .mobile-information-summary [data-mobile-layer-name] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 11px;
  }
  .layer-information-body {
    padding-bottom: 12px;
  }
  .layer-info {
    margin-top: 6px;
    padding-top: 10px;
  }
  .layer-info h3 {
    font-size: 19px;
  }
  .layer-info p {
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .illustration-note {
    margin-top: 12px;
  }
}

/* The embedded mobile fullscreen document uses one viewport, not page-height scrolling. */
body.mobile-fullscreen {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.mobile-fullscreen .explorer-shell {
  position: relative;
  height: 100%;
  padding: 8px;
  display: flex;
  flex-direction: column;
  max-width: none;
}
.mobile-fullscreen .studio-heading {
  flex: 0 0 auto;
  padding-bottom: 6px;
  margin: 0;
}
.mobile-fullscreen .generic-badge {
  font-size: 8px;
  margin-bottom: 4px;
}
.mobile-fullscreen .studio-heading h1 {
  font-size: 18px;
  line-height: 1.2;
}
.mobile-fullscreen .studio-subtitle {
  display: none;
}
.mobile-fullscreen .explorer-grid {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
}
.mobile-fullscreen .visual-column,
.mobile-fullscreen .explorer-details {
  display: contents;
}
.mobile-fullscreen #scene {
  order: 0;
  flex: 1 1 auto;
  height: auto;
  min-height: 100px;
}
.mobile-fullscreen .layer-heading {
  display: none;
}
.mobile-fullscreen .layer-selector {
  order: 1;
  display: flex;
  overflow-x: auto;
  gap: 6px;
  flex: 0 0 auto;
  padding: 2px 2px 5px;
}
.mobile-fullscreen .layer-selector button {
  flex: 0 0 auto;
  width: auto;
  min-height: 40px;
  max-width: 240px;
  padding: 7px 12px 7px 18px;
  font-size: 11px;
}
.mobile-fullscreen .layer-selector button > span[aria-hidden='true'] {
  display: none;
}
.mobile-fullscreen .explore-toolbar {
  order: 2;
  flex: 0 0 auto;
}
.mobile-fullscreen .primary-controls button {
  min-height: 44px;
  font-size: 10px;
  padding: 5px 4px;
  gap: 3px;
}
.mobile-fullscreen #view-hint {
  display: none;
}
.mobile-fullscreen .advanced-controls {
  margin-top: 3px;
}
.mobile-fullscreen .advanced-controls > summary {
  min-height: 36px;
  padding: 9px 0;
}
.mobile-fullscreen .layer-information {
  order: 3;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding: 0 8px;
}
.mobile-fullscreen .mobile-information-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
}
.mobile-fullscreen [data-mobile-layer-name] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.mobile-fullscreen .layer-information[open] .layer-information-body,
.mobile-fullscreen .advanced-controls[open] .advanced-inner {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 52px;
  max-height: 55%;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 5;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.mobile-fullscreen .advanced-controls[open] .advanced-inner {
  bottom: 92px;
}
.mobile-fullscreen .illustration-note {
  display: none;
}

.mobile-fullscreen .layer-information-body .studio-subtitle,
.mobile-fullscreen .layer-information-body .illustration-note {
  display: block;
}

@media (max-height: 360px) {
  .mobile-fullscreen #scene {
    min-height: 60px;
  }
  .mobile-fullscreen .generic-badge {
    display: none;
  }
  .mobile-fullscreen .studio-heading h1 {
    font-size: 15px;
  }
  .mobile-fullscreen .explorer-shell {
    padding: 4px;
  }
  .mobile-fullscreen .explorer-grid {
    gap: 3px;
  }
}
/* Landscape phones reserve controls first; the scene uses only the remaining space. */
@media (max-height: 360px) {
  .mobile-fullscreen .studio-heading {
    display: none;
  }
  .mobile-fullscreen #scene {
    min-height: 0;
  }
  .mobile-fullscreen .layer-selector button {
    min-height: 36px;
    padding-block: 6px;
  }
  .mobile-fullscreen .mobile-information-summary {
    min-height: 36px;
    padding-block: 6px;
  }
  .mobile-fullscreen .explorer-grid {
    gap: 2px;
  }
}

/* Raised studio controls communicate state without adding shadows to the roof scene. */
:is(.primary-controls, .layer-selector, .view-controls) button,
:is(.advanced-controls, .layer-information) > summary {
  border: 1px solid #6d849b80;
  border-radius: 12px;
  background: linear-gradient(155deg, #21384a, #0e1e2c 80%);
  color: #f3f2ec;
  box-shadow:
    inset 0 1px 0 #ffffff20,
    0 3px 0 #020a10;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}
:is(.primary-controls, .layer-selector, .view-controls) button:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 3px #0007,
    0 1px 0 #020a10;
}
:is(.primary-controls, .layer-selector) button[aria-pressed='true'] {
  background: linear-gradient(155deg, #fff07a, var(--yellow));
  color: #07131b;
  border-color: var(--yellow);
  box-shadow:
    inset 0 1px 0 #ffffff80,
    0 3px 0 #847215;
}
:is(.advanced-controls, .layer-information) > summary {
  padding: 12px;
}
:is(.advanced-controls, .layer-information)[open] > summary {
  border-color: var(--yellow);
}
.rmsre-sheet-handle {
  display: none;
}
.rmsre-interaction-coach {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 3;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 8px 12px;
  color: #f3f2ec;
  background: #102532ed;
  border: 1px solid #7991a166;
  border-radius: 20px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
@media (hover: hover) {
  :is(.primary-controls, .layer-selector, .view-controls) button:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: var(--yellow);
  }
}
@media (max-width: 760px) {
  .rmsre-sheet-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 48px;
    margin: 0 0 10px;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: #ffffff08;
    color: #dce8f0;
    font-size: 11px;
    cursor: grab;
  }
  .rmsre-grip {
    width: 44px;
    height: 4px;
    border-radius: 6px;
    background: var(--yellow);
  }
  :is(.layer-information-body, .advanced-inner) {
    transform: translateY(var(--sheet-drag, 0px));
    transition: transform 180ms ease;
    overscroll-behavior: contain;
  }
  :is(.layer-information-body, .advanced-inner).is-dragging {
    transition: none;
    user-select: none;
  }
  .rmsre-sheet-handle::after {
    content: '↓';
    color: var(--yellow);
    line-height: 1;
  }
}
.mobile-fullscreen .rmsre-sheet-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  margin: 0 0 10px;
  background: #ffffff08;
  color: #dce8f0;
  border: 0;
  border-radius: 10px;
  font-size: 11px;
}
.mobile-fullscreen :is(.layer-information-body, .advanced-inner) {
  transform: translateY(var(--sheet-drag, 0px));
  transition: transform 180ms ease;
}
.mobile-fullscreen :is(.layer-information-body, .advanced-inner).is-dragging {
  transition: none;
}
.mobile-fullscreen .rmsre-sheet-handle::after {
  content: '↓';
  color: var(--yellow);
  line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  :is(.primary-controls, .layer-selector, .view-controls) button,
  :is(.layer-information-body, .advanced-inner) {
    transition: none !important;
  }
}
.rmsre-interaction-coach::after {
  content: '';
  position: absolute;
  left: calc(50% - 5px);
  bottom: -6px;
  width: 9px;
  height: 9px;
  background: #102532;
  border-right: 1px solid #7991a166;
  border-bottom: 1px solid #7991a166;
  transform: rotate(45deg);
}

/* One clear studio button style; state is communicated by colour, not side marks. */
.explorer-shell button:not(.rmsre-sheet-handle) {
  background: linear-gradient(155deg, #3958c8, #283891) !important;
  color: #fff !important;
  border: 1px solid #7d94f2 !important;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 #ffffff32,
    0 3px 0 #111d50;
  font-weight: 600;
}
.explorer-shell button[aria-pressed='true']:not(.rmsre-sheet-handle) {
  background: linear-gradient(155deg, #fff17a, #ffde16) !important;
  color: #07131b !important;
  border-color: #ffde16 !important;
  box-shadow:
    inset 0 1px 0 #ffffff70,
    0 3px 0 #897717;
}
.layer-selector button::before,
.layer-selector button::after,
.layer-selector button > span:not(.layer-name) {
  display: none !important;
  content: none !important;
}
.layer-selector button {
  padding-left: 15px !important;
  justify-content: flex-start;
}
.cover-board-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  margin-top: 12px;
  border: 1px solid #7d94f2;
  border-radius: 12px;
  background: #162b59;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.cover-board-option input {
  width: 20px;
  height: 20px;
  accent-color: #ffde16;
  flex: 0 0 auto;
}
.cover-board-option input:disabled {
  cursor: not-allowed;
}
.cover-board-badge {
  margin-left: auto;
  font-size: 10px;
  color: #ffde16;
}
.cover-board-status {
  font-size: 11px;
  line-height: 1.4;
  color: #d8e4ef;
  margin: 8px 2px 12px;
}
.mobile-fullscreen .cover-board-option {
  order: 2;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 10px;
  margin: 0;
}
.mobile-fullscreen .cover-board-status {
  order: 2;
  flex: 0 0 auto;
  margin: 0 2px;
  font-size: 10px;
}
.mobile-fullscreen .explore-toolbar {
  order: 3;
}
.mobile-fullscreen .layer-information {
  order: 4;
}
@media (max-height: 360px) {
  .mobile-fullscreen .cover-board-status {
    display: none;
  }
  .mobile-fullscreen .cover-board-option {
    min-height: 30px;
    padding: 4px 8px;
  }
}
@media (hover: hover) {
  .explorer-shell button:not(:disabled):not(.rmsre-sheet-handle):hover {
    border-color: #ffde16 !important;
    filter: brightness(1.12);
  }
}
:is(.advanced-controls, .layer-information) > summary {
  background: linear-gradient(155deg, #3958c8, #283891);
  color: #fff;
  border: 1px solid #7d94f2;
  box-shadow:
    inset 0 1px 0 #ffffff32,
    0 3px 0 #111d50;
}
:is(.advanced-controls, .layer-information)[open] > summary {
  background: linear-gradient(155deg, #fff17a, #ffde16);
  color: #07131b;
  border-color: #ffde16;
}
:is(.advanced-controls, .layer-information)[open] > summary::after {
  color: #07131b;
}
.layer-information[open] .mobile-information-summary [data-mobile-layer-name] {
  color: #263448;
}

/* Desktop: all actions beside the model, with only the settings rail scrolling if needed. */
body.desktop-workspace {
  overflow: hidden;
}
.desktop-workspace .explorer-shell {
  height: var(--rmsre-workspace-height, 100dvh);
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}
.desktop-workspace .studio-heading {
  margin: 0;
  padding-bottom: 12px;
}
.desktop-workspace .generic-badge {
  margin-bottom: 5px;
}
.desktop-workspace .studio-heading h1 {
  font-size: 25px;
}
.desktop-workspace .studio-heading > .studio-subtitle {
  display: none;
}
.desktop-workspace .explorer-grid {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 380px);
  gap: 20px;
}
.desktop-workspace .visual-column {
  min-height: 0;
  height: 100%;
}
.desktop-workspace #scene {
  height: 100%;
  min-height: 0;
}
.desktop-workspace .explorer-details {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 4px 8px 12px 4px;
}
.desktop-workspace .explorer-details > * {
  flex-shrink: 0;
}
.desktop-workspace .explore-toolbar {
  position: sticky;
  top: -4px;
  z-index: 5;
  padding: 4px 0 8px;
  background: var(--ink);
}
.desktop-workspace .primary-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: none;
  margin: 0;
}
.desktop-workspace .primary-controls button {
  min-height: 44px;
  padding: 9px 8px;
  gap: 6px;
  font-size: 12px;
}
.desktop-workspace #view-hint {
  margin: 9px 0 0;
  min-height: 0;
  font-size: 11px;
}
.desktop-workspace .layer-heading {
  margin: 0;
}
.desktop-workspace .layer-heading .small-label {
  display: none;
}
.desktop-workspace .layer-heading h2 {
  margin: 0;
  font-size: 18px;
}
.desktop-workspace .layer-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.desktop-workspace .layer-selector button {
  min-height: 44px;
  padding: 10px;
  font-size: 12px;
}
.desktop-workspace .cover-board-option {
  margin: 0;
  min-height: 44px;
}
.desktop-workspace .cover-board-status {
  margin: 0;
  font-size: 11px;
}
.desktop-workspace .advanced-controls {
  width: 100%;
  max-width: none;
  margin: 0;
}
.desktop-workspace .mobile-information-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.desktop-workspace .mobile-information-summary > [data-mobile-layer-name] {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}
.desktop-workspace .layer-info {
  min-height: 0;
  margin-top: 8px;
  padding-top: 10px;
}
.desktop-workspace .layer-info h3 {
  font-size: 17px;
  margin-block: 10px;
}
.desktop-workspace .layer-info p {
  font-size: 12px;
  line-height: 1.6;
}
.desktop-workspace .illustration-note {
  margin: 0;
}

/* Inclusion is independent of inspection; every layer remains available to re-enable. */
.layer-choice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.layer-include {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
}
.layer-include input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--yellow);
}
.layer-choice button {
  width: 100%;
}
.layer-choice-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.advanced-controls {
  border-top: 0;
}
:is(.advanced-controls, .layer-information) > summary {
  margin: 0;
}
@media (max-width: 760px) {
  .layer-choice {
    flex: 0 0 auto;
    width: min(74vw, 240px);
    grid-template-columns: 40px minmax(0, 1fr);
  }
}
.mobile-fullscreen .layer-choice {
  flex: 0 0 auto;
  width: min(74vw, 240px);
}
.mobile-fullscreen .layer-choice-hint {
  display: none;
}
