/* Atlas uses the player's native toolbar, canvas, transport and floating editor. */
html[data-editor='atlas'] #skinEditorDialog.is-collapsed #workspace,
html[data-editor='atlas'] [hidden] {
  display: none !important;
}
html[data-editor='atlas'] #skinEditorDialog {
  width: min(430px, 94vw);
  max-height: min(76vh, 780px);
}
#workspace {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  color: var(--text-main);
}
#workspace .skin-editor-tabs {
  position: sticky;
  top: 0;
  background: var(--panel-bg);
  z-index: 1;
  flex-shrink: 0;
}
.atlas-panel,
#atlasInspector {
  padding: 12px 16px;
}
.atlas-panel {
  display: grid;
  gap: 10px;
}
.atlas-row,
#workspace .actions,
#dialog .dialog-actions,
#visual .sequence-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.atlas-row label {
  font-size: 12px;
}
.atlas-row select {
  flex: 1;
  width: 40%;
}
#workspace .btn,
#dialog .btn {
  padding: 7px 10px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
}
#workspace input,
#workspace select,
#dialog input,
#dialog textarea,
#dialog select,
#workspace .readout {
  background: #201d27;
  color: var(--text-main);
  border: none;
  border-radius: 6px;
  min-width: 0;
  padding: 8px;
  font: inherit;
}
#workspace select,
#workspace input {
  font-size: 12px;
}
#workspace label,
#dialog label,
#properties .field {
  display: grid;
  gap: 4px;
  font-size: 12px;
}
#properties,
#dialogBody {
  display: grid;
  gap: 9px;
}
#properties .readout,
#properties pre {
  font: 12px/1.45 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 9em;
  overflow: auto;
}
#properties .field {
  color: var(--text-secondary);
}
#files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 5px;
  max-height: 180px;
  overflow: auto;
}
#files .file-card {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
}
#files img {
  max-width: 100%;
  width: 100%;
  height: 33px;
  object-fit: contain;
}
#files small,
#workspace small {
  opacity: 0.73;
}
#assetDetail {
  margin-top: 10px;
}
#assetDetail summary,
#workspace a {
  color: var(--primary-light);
  cursor: pointer;
}
#assetDetail img,
#assetDetail canvas {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}
#assetDetail code,
#assetDetail small {
  display: block;
}
#visual {
  display: grid;
  justify-items: center;
  padding: 8px;
  background: #201e23;
  border-radius: 6px;
}
#dialog {
  width: min(460px, 92vw);
  max-height: 85vh;
  padding: 18px;
  background: var(--panel-bg, #24212e);
  color: var(--text-main);
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 44px #0008;
}
#dialog::backdrop {
  background: #0007;
}
#dialog.wide {
  width: min(650px, 95vw);
}
#dialog h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}
#dialog fieldset {
  display: flex;
  gap: 7px;
  border: none;
}
#dialog fieldset label {
  min-width: 0;
  flex: 1;
}
#dialog textarea {
  min-height: 40vh;
  font: 13px/1.5 monospace;
}
#dialog .dialog-actions {
  justify-content: flex-end;
}
#dialogError,
#status.error {
  color: #ff9baa;
}
#packTitle,
#packIdentity,
#status {
  overflow-wrap: anywhere;
}
#status {
  margin-top: 6px;
  font-size: 0.73rem;
  color: var(--text-secondary);
}
#atlasMode,
#atlasResult {
  max-width: 100%;
  border: none;
  border-radius: 5px;
  color: var(--text-main);
  background: var(--panel-bg);
  padding: 4px;
}

.atlas-native-frame {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #101015;
}
.atlas-native-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.atlas-native-frame > div {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--panel-bg);
  font-size: 12px;
}

.atlas-native-timeline-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  background: #101015;
  z-index: 1;
}
#atlasSceneSettings > small:empty { display: none; }
