.advanced-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.65rem;
  border-bottom: 1px solid var(--border, #d9e0e6);
}
.advanced-panel {
  padding: 0.75rem;
  background: #eaf7f0;
  color: #143e2c;
}
.advanced-panel[hidden] {
  display: none;
}
#asset-list img {
  max-width: 160px;
  height: 100px;
  object-fit: contain;
}
.asset-card {
  padding: 0.65rem;
  border: 1px solid #b9c9c0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
#cloud-list > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem;
  border-bottom: 1px solid #ccc;
}
.queue-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .advanced-actions button {
    flex: 1 1 130px;
  }
  .advanced-panel .studio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.color-controls[hidden],
#cloud-conflict[hidden] {
  display: none;
}
.difference-table {
  overflow: auto;
  max-height: 40vh;
}
.difference-table table {
  border-collapse: collapse;
  width: 100%;
}
.difference-table th,
.difference-table td {
  border: 1px solid #78917e;
  padding: 6px;
  overflow-wrap: anywhere;
  max-width: 260px;
}
#data-preview-image {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0/16px 16px;
}
.mobile-editor-panels {
  display: none;
}
@media (max-width: 900px) {
  .mobile-editor-panels {
    display: flex;
    padding: 6px;
    gap: 8px;
  }
  .mobile-editor-panels button {
    flex: 1;
    min-height: 44px;
    background: #263c2b;
    color: #eff5ed;
    border: 1px solid #546b55;
    border-radius: 6px;
  }
  .image-editor .editor-inspector {
    display: none;
  }
  .image-editor.mobile-inspector-open .editor-inspector {
    display: block;
    position: fixed;
    z-index: 5;
    right: 0;
    bottom: max(0px, env(safe-area-inset-bottom));
    max-height: calc(var(--editor-visible-height, 100dvh) * 0.45);
    width: min(400px, 100%);
    overflow: auto;
    background: #18221b;
    box-shadow: 0 -4px 24px #0007;
  }
  .image-editor .editor-body {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .image-editor .advanced-actions,
  .image-editor .studio-actions {
    display: none;
  }
  .image-editor.mobile-workflows-open .advanced-actions,
  .image-editor.mobile-workflows-open .studio-actions {
    display: flex;
    max-height: 22vh;
    overflow: auto;
  }
  .image-editor .advanced-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    max-height: 28vh;
    overflow: auto;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .image-editor input,
  .image-editor select,
  .image-editor textarea {
    font-size: 16px;
  }
  .image-editor button {
    min-height: 44px;
  }
  .image-editor .selection-handle {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }
  .image-editor dialog {
    max-height: calc(var(--editor-visible-height, 100dvh) - 40px);
    overflow: auto;
    width: min(620px, calc(100vw - 20px));
  }
}
@media (max-width: 760px) {
  .image-editor .editor-workspace {
    height: min(60dvh, calc(var(--editor-visible-height, 100dvh) - 240px));
    min-height: 240px;
  }
  .image-editor .editor-viewport {
    min-height: 160px;
  }
  .image-editor .editor-top {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px;
  }
  .image-editor .editor-title {
    min-width: 120px;
    width: 120px;
  }
  .image-editor .editor-title input {
    width: 100px;
  }
  .image-editor .editor-actions {
    width: auto;
    flex-wrap: nowrap;
  }
  .image-editor .editor-actions .button {
    flex: none;
    padding: 7px 9px;
    font-size: 12px;
    white-space: nowrap;
  }
}
.selection-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.selection-handles[hidden] {
  display: none;
}
.selection-handle {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  touch-action: none;
  border: 2px solid #fff;
  background: #157a43;
  border-radius: 50%;
  box-shadow: 0 1px 4px #0009;
}
@media (pointer: coarse) {
  .image-editor .selection-handle {
    width: 44px;
    height: 44px;
    min-height: 44px;
    background: #157a43cc;
  }
}
.mobile-memory-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  white-space: nowrap;
}
.mobile-memory-mode input {
  width: 20px;
  height: 20px;
}
