/* Image to WebP — keep custom CSS minimal and namespaced */

.ctl-visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

#app .ctl-drop {
  display: grid; place-items: center;
  min-height: 140px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
}
#app .ctl-drop:focus-visible { box-shadow: var(--focus-ring); }
#app .ctl-drop.ctl-drop--over { border-color: var(--primary); background: #f0f7ff; }

#app .ctl-list {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  #app .ctl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  #app .ctl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ctl-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card);
  overflow: hidden;
}

.ctl-item__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ctl-item__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ctl-item__thumb {
  display: grid; place-items: center;
  padding: 12px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}
.ctl-item__thumb img { max-height: 160px; object-fit: contain; }

.ctl-item__meta {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.ctl-item__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-700); }
.ctl-item__actions { display: flex; gap: 8px; }

.ctl-item__edit {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}
.ctl-item__edit .ctl-in { padding: 8px 10px; }

.ctl-pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

/* Small utility for status line */
#ctl-status { min-height: 20px; }
