
:root {
  --bg: #0d1017;
  --surface: #151924;
  --surface2: #1d2333;
  --border: #2a3247;
  --text: #e8ecf4;
  --muted: #9aa6c0;
  --primary: #5b7cfa;
  --primary-h: #4668f0;
  --success: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.hidden { display: none !important; }

input, select, textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  width: 100%;
  min-width: 0;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; font-family: inherit; line-height: 1.45; }
textarea.auto-grow { overflow-y: hidden; min-height: 70px; transition: height 0.08s ease; }
textarea.auto-grow-neg { min-height: 84px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sub-h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--surface2);
  transition: transform 0.08s ease, opacity 0.15s ease, background 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-h); }
.btn-success { background: #16a34a; }
.btn-danger { background: #dc2626; }
.btn-warn { background: #d97706; }
.btn-secondary { background: #2b344a; color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; margin-top: 10px; }

.select-sm { width: auto; max-width: 100%; min-width: 120px; padding: 5px 8px; font-size: 12px; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.empty-hint { font-size: 12px; color: var(--muted); padding: 8px 0; }

.seg-toggle {
  display: inline-flex; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 2px; gap: 2px;
}
.seg-btn {
  background: transparent; color: var(--muted); border: none; border-radius: 6px;
  padding: 4px 9px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.seg-btn.active { background: var(--primary); color: #fff; }

.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7, 9, 14, 0.86);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.auth-card, .modal-card {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-card { max-width: 640px; max-height: 86vh; overflow-y: auto; }
.auth-header h1 { font-size: 22px; margin-bottom: 4px; }
.auth-header p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.auth-tab {
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 6px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.auth-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.auth-pane { display: flex; flex-direction: column; gap: 8px; }
.toast-inline {
  padding: 8px 12px; border-radius: 8px; font-size: 12px; margin-bottom: 10px;
  background: rgba(91,124,250,0.16); border: 1px solid var(--primary);
}
.toast-inline.err { background: rgba(239,68,68,0.16); border-color: var(--danger); }

/* ================= TOPBAR (DESKTOP + MOBILE 100% FULL-WIDTH ALIGNED) ================= */
.topbar {
  position: sticky; top: 0; z-index: 50; width: 100%;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 10px 18px;
  background: rgba(21, 25, 36, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-row1 { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.badge-ver {
  font-size: 11px; background: rgba(91,124,250,0.22); color: #9db4ff;
  padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(91,124,250,0.4);
}
.nav-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-btn {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.nav-btn.active { background: var(--primary); color: #fff; }
.nav-btn:hover:not(.active) { background: var(--surface2); color: var(--text); }

.status-strip, .user-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.pill-on { background: rgba(34,197,94,0.16); color: #86efac; border-color: rgba(34,197,94,0.4); }
.pill-off { background: rgba(239,68,68,0.16); color: #fca5a5; border-color: rgba(239,68,68,0.4); }
.pill-warn { background: rgba(245,158,11,0.18); color: #fcd34d; border-color: rgba(245,158,11,0.4); }
.pill-info { color: #c7d2fe; }
.user-badge { font-size: 12px; font-weight: 600; padding: 4px 8px; background: var(--surface2); border-radius: 8px; }
.toggle-chip, .toggle-chip-sm {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--surface2); padding: 6px 10px; border-radius: 8px; font-size: 12px; color: var(--text); margin: 0;
  border: 1px solid var(--border);
}
.toggle-chip-sm { padding: 4px 8px; font-size: 11px; }
.toggle-chip input, .toggle-chip-sm input { width: auto; }

.global-toast {
  position: fixed; bottom: 18px; right: 18px; z-index: 300;
  background: var(--surface2); border: 1px solid var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: min(440px, calc(100vw - 32px));
}

/* ================= MAIN STUDIO LAYOUT ================= */
.tab-view { padding: 14px 18px 32px; width: 100%; }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}
.studio-left, .studio-right { min-width: 0; width: 100%; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.panel-head h2 { font-size: 14px; font-weight: 700; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.pedido-trail {
  font-size: 12px; color: #a5b4fc; background: rgba(91,124,250,0.1);
  padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; word-break: break-word;
}
.sub-details summary { cursor: pointer; font-size: 12px; color: var(--muted); font-weight: 600; }
.summary-h2 { font-size: 14px !important; color: var(--text) !important; font-weight: 700 !important; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.check-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

/* Editar com Ajuda */
.help-toolbar { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.help-cat-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.help-tab {
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 9px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.help-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.help-presets-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 2px;
}
.help-preset-btn {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 8px; font-size: 11px; text-align: left; cursor: pointer;
}
.help-preset-btn:hover { border-color: var(--primary); background: rgba(91,124,250,0.14); }

/* Subjects 5-Layers */
.subjects-list { display: flex; flex-direction: column; gap: 10px; }
.suj-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
}
.suj-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.suj-title { font-weight: 700; font-size: 13px; }
.suj-layers { display: grid; grid-template-columns: 1fr; gap: 6px; }
.suj-layer-row { display: grid; grid-template-columns: 78px 1fr; gap: 6px; align-items: center; }
.suj-layer-row span { font-size: 11px; color: var(--muted); font-weight: 600; }
.suj-layer-row input { padding: 5px 8px; font-size: 12px; }

/* Blocks & LoRAs */
.blocks-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.block-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 10px; font-size: 12px;
}
.block-pill button { background: none; border: none; color: #fca5a5; cursor: pointer; font-weight: 700; font-size: 13px; }
.loras-list { display: flex; flex-direction: column; gap: 6px; }
.lora-row {
  display: flex; align-items: center; gap: 8px; background: var(--bg);
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px;
}
.lora-row input[type="range"] { width: 100px; padding: 0; }
.img-base-preview { max-height: 120px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--border); }

/* Right Column: Live Progress & Mini-Gallery */
.progress-bar-bg { width: 100%; height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), #22c55e); transition: width 0.3s ease; }
.live-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.live-preview { max-width: 100%; max-height: 300px; border-radius: 10px; margin-top: 10px; display: block; margin-inline: auto; border: 1px solid var(--border); }

.active-jobs-strip { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.active-job-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12px;
}

.mini-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.mini-gal-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
}
.mini-gal-card img {
  width: 100%; height: 250px; object-fit: cover; display: block; cursor: zoom-in; background: #080a0f;
}
.mini-gal-meta { padding: 7px 9px 4px; }
.mini-gal-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); gap: 6px; }
.mini-gal-ped { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mini-gal-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 8px 8px; }
.empty-feed { text-align: center; padding: 36px 16px; color: var(--muted); }

/* Gallery Infinite Scroll */
.filter-row { display: grid; grid-template-columns: 2fr repeat(5, 1fr) auto; gap: 8px; }
.gallery-meta-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease;
}
.gal-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.gal-card img { width: 100%; height: 270px; object-fit: cover; display: block; background: #090b10; }
.gal-card-info { padding: 8px 10px; }
.gal-card-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; gap: 6px; }
.gal-card-ped { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-sentinel { text-align: center; padding: 24px 12px; }

/* Lightbox Fullscreen + Left Sidebar */
.lightbox {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(5, 7, 12, 0.96);
  display: flex; flex-direction: column;
}
.lb-close {
  position: fixed; top: 12px; right: 16px; z-index: 270;
  background: rgba(30,36,52,0.9); color: #fff; border: 1px solid var(--border);
  width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer;
}
.lb-main-area { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.lb-sidebar {
  width: 380px; max-width: 92vw; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.lb-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.lb-sidebar-head h3 { font-size: 14px; }
.lb-sidebar-body {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 12px; font-size: 12px;
}
.lb-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lb-kv { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; }
.lb-kv b { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; }
.lb-kv span { font-size: 12px; color: var(--text); word-break: break-word; }
.lb-sec { display: flex; flex-direction: column; gap: 4px; }
.lb-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lb-sec-val {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; color: var(--text); word-break: break-word; line-height: 1.4;
}
.lb-code-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; color: #a5b4fc; white-space: pre-wrap; word-break: break-word;
  font-family: Consolas, monospace; font-size: 11px; line-height: 1.45;
}
.lb-stage {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  padding: 14px 64px 8px; overflow: hidden; min-width: 0;
}
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 260;
  background: rgba(30,36,52,0.78); color: #fff; border: 1px solid var(--border);
  width: 44px; height: 56px; border-radius: 10px; font-size: 22px; cursor: pointer;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-bottom {
  background: rgba(21, 25, 36, 0.96); border-top: 1px solid var(--border);
  padding: 10px 18px; display: flex; flex-direction: column; gap: 8px;
}
.lb-meta, .lb-actions, .lb-mod-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb-mod-row input { flex: 1; min-width: 200px; }

/* Admin & Account Lists */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.info-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  font-size: 12px; color: #a5b4fc; word-break: break-word; margin-top: 6px;
}
.mini-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.mini-list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px;
}
.char-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 240px; overflow-y: auto; }
.char-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px;
}
.tf-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; max-height: 300px; overflow-y: auto; }
.tf-check-item {
  display: flex; align-items: center; gap: 6px; background: var(--surface2); padding: 6px 8px; border-radius: 8px; font-size: 12px; cursor: pointer;
}
.tf-check-item input { width: auto; }

/* ================= MOBILE RESPONSIVE FIX (100% FULL WIDTH TOP HEADER & CARDS) ================= */
@media (max-width: 1040px) {
  .studio-grid { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px;
    gap: 8px;
  }
  .topbar-row1 {
    width: 100%;
    justify-content: space-between;
  }
  .nav-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 5px;
  }
  .nav-btn {
    padding: 7px 6px;
    font-size: 12px;
    text-align: center;
    justify-content: center;
  }
  .status-strip {
    width: 100%;
    justify-content: flex-start;
    gap: 4px;
  }
  .tab-view { padding: 10px 10px 28px; }
  .panel { padding: 11px; margin-bottom: 10px; }
  .form-grid-2, .form-grid-4, .check-grid-2, .admin-grid, .tf-check-grid { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
  .filter-row { grid-template-columns: 1fr; }
  .gallery-grid, .mini-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gal-card img, .mini-gal-card img { height: 190px; }
  .suj-layer-row { grid-template-columns: 1fr; gap: 3px; }
  .lb-stage { padding: 10px 44px 6px; }
  .lb-sidebar {
    position: fixed; inset: 0; width: 100vw; max-width: 100vw; z-index: 265;
  }
  .lb-bottom { padding: 8px 10px; }
}

/* ================= V22.6: AI LOADING CARD + LARGE TODAY SHOWCASE ================= */
.ai-loading-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(91, 124, 250, 0.12);
  border: 1px solid rgba(91, 124, 250, 0.45);
}
.ai-loading-stage {
  font-size: 12px;
  font-weight: 600;
  color: #c7d2fe;
}
.progress-bar-fill.ai-fill {
  background: linear-gradient(90deg, #6366f1, #38bdf8, #22c55e);
  background-size: 200% 100%;
  animation: aiShimmer 1.8s linear infinite;
}
@keyframes aiShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.today-showcase-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.today-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.today-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  background: rgba(13, 16, 23, 0.55);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.today-card-media {
  background: #080a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: zoom-in;
}
.today-card-media img {
  width: 100%;
  max-height: 640px;
  object-fit: contain;
  display: block;
}
.today-card-foot {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.today-card-ped {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  word-break: break-word;
}
.today-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 768px) {
  .today-card-media img { max-height: 72vh; }
}

/* ================= V22.8: NETWORK ROWS, DROPZONE, DANBOORU AUTOCOMPLETE, SIMILAR & OPENPOSE ================= */
.net-status-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.net-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
}
.net-row-left { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.net-row-urls { display: flex; flex-wrap: wrap; gap: 6px; }
.net-url-link {
  color: #93c5fd;
  text-decoration: none;
  font-family: Consolas, monospace;
  font-size: 11px;
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.net-url-link:hover { border-color: var(--primary); color: #fff; }
.net-url-locked { color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }

.png-dropzone {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(13, 16, 23, 0.45);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.png-dropzone:hover, .png-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(91, 124, 250, 0.14);
  color: var(--text);
}

.dan-search-box { position: relative; margin-top: 8px; }
.dan-results {
  margin-top: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}
.dan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface2);
  font-size: 12px;
}

.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .sim-grid { grid-template-columns: 1fr; } }

.openpose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
  max-height: 62vh;
  overflow-y: auto;
}
.op-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.op-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.op-card img { width: 100%; height: 140px; object-fit: contain; background: #000; display: block; }
.op-card-lbl { padding: 6px 8px; font-size: 11px; color: var(--text); line-height: 1.3; }
