.structures-panel { display: flex; flex-direction: column; max-height: 850px; }
.structures-panel .panel-heading { flex-shrink: 0; }
.structures-panel .layer-switches { padding-bottom: 12px; flex-shrink: 0; }
.atlas-tools { display: grid; gap: 6px; padding: 12px 0; color: var(--muted); font-size: .7rem; }
.atlas-tools select, .atlas-tools input[type="search"] { width: 100%; min-width: 0; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: var(--panel-2); font: inherit; }
.atlas-tools input[type="range"], #atlasOpacity { width: 100%; accent-color: var(--teal); cursor: pointer; }
.atlas-explode-heading, .atlas-tool-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atlas-explode-heading { margin-top: 4px; }
.atlas-explode-heading output { font: .65rem var(--font-mono); }
.atlas-tool-actions label { display: flex; align-items: center; gap: 5px; }
.atlas-tool-actions input { accent-color: var(--teal); }
.atlas-tool-actions button, .atlas-inspector button { min-height: 32px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel-2); color: var(--teal); font: 600 .65rem var(--font-body); cursor: pointer; }
.atlas-search-label { margin-top: 5px; }
.structures-panel .structure-groups { flex: 1; min-height: 160px; max-height: 470px; }
.atlas-structure { display: flex; align-items: center; gap: 2px; }
.atlas-structure[hidden], .structure-group[hidden], .atlas-inspector [hidden] { display: none; }
.atlas-structure .structure-row { flex: 1; min-width: 0; min-height: 35px; gap: 7px; padding-inline: 7px; font-size: .7rem; }
.atlas-structure .structure-row span { overflow: hidden; text-overflow: ellipsis; }
.atlas-visibility { flex: 0 0 30px; display: grid; place-items: center; min-height: 34px; border: 0; background: transparent; color: var(--teal); border-radius: 6px; cursor: pointer; }
.atlas-visibility svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.atlas-visibility[aria-pressed="false"] { opacity: .3; }
.atlas-visibility:hover, .atlas-inspector button:hover, .atlas-tool-actions button:hover { background: var(--teal-soft); }
.atlas-inspector { flex-shrink: 0; padding-top: 12px; margin-top: 9px; border-top: 1px solid var(--line); }
.atlas-inspector[hidden] { display: none; }
.atlas-inspector-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .78rem; }
.atlas-inspector-title button { border: 0; font-size: 1rem; min-width: 30px; }
.atlas-inspector p { max-height: 65px; overflow: auto; margin: 6px 0 10px; color: var(--muted); font-size: .69rem; line-height: 1.55; }
.atlas-inspector-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#atlasFocus { background: var(--teal); color: white; border-color: var(--teal); }
#atlasAppearance { display: flex; gap: 7px; align-items: center; margin-top: 8px; font-size: .66rem; }
#atlasColor { width: 32px; height: 25px; padding: 0; border: 1px solid var(--line); background: transparent; flex-shrink: 0; cursor: pointer; }
#atlasSource { display: block; margin-top: 7px; font-size: .6rem; color: var(--teal); text-underline-offset: 2px; }
.atlas-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.atlas-labels span { position: absolute; transform: translate(-50%, -130%); padding: 5px 9px; border: 1px solid var(--teal-line); border-radius: 6px; background: rgba(255,255,255,.94); color: var(--teal); box-shadow: var(--shadow-sm); white-space: nowrap; font: 600 .7rem var(--font-body); }
.atlas-labels span::after { content: ''; position: absolute; top: 100%; left: 50%; height: 10px; width: 1px; background: var(--teal); }
.atlas-quality { position: absolute; inset-inline-start: 18px; top: 65px; z-index: 3; color: var(--muted); font: .6rem var(--font-mono); }
.atlas-quality select { margin-inline-start: 6px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px; font: inherit; background: rgba(255,255,255,.9); color: var(--teal); }
@media (max-width: 980px) { .structures-panel { max-height: 900px; } }
@media (max-width: 640px) {
  .structures-panel { order: 2; max-height: none; }
  .motion-panel { order: 3; }
  .structures-panel .structure-groups { display: block; max-height: 330px; min-height: 200px; }
  .structures-panel .structure-group:last-child { display: block; }
  .atlas-structure .structure-row, .atlas-visibility { min-height: 44px; }
  .atlas-tools select, .atlas-tools button, .atlas-inspector button { min-height: 40px; }
  .atlas-inspector p { max-height: none; }
}
