/* Magnific studio body under Hehel chrome */
.app.locked .body { display: none; }

.he-menu-btn {
  height: 34px;
  min-width: 34px;
  border: 1px solid var(--line, #2a2a31);
  border-radius: 8px;
  background: var(--bg-4, #1e1e23);
  color: var(--muted, #b4b4c0);
  display: none;
}
@media (max-width: 760px) {
  .he-menu-btn:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
}

.nox-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 120px);
  flex: 1;
}
.nox-side {
  border-right: 1px solid var(--line, #2a2a31);
  background: #121218;
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}
.nox-mode-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nox-mode-tabs button {
  border: 1px solid var(--line, #2a2a31);
  background: transparent;
  color: var(--muted, #b4b4c0);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
}
.nox-mode-tabs button.on {
  color: var(--text, #ececef);
  border-color: var(--cyan-2, #1aa3e0);
  background: var(--cyan-dim, rgba(62,198,255,.12));
}
.nox-mode-tabs button:disabled { opacity: 0.35; cursor: not-allowed; }

.nox-field-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint, #9a9aa8);
  font-weight: 600;
}
.nox-select {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #2a2a34;
  background: #0c0c10;
  color: inherit;
  padding: 0 10px;
}
.nox-select.sm { width: auto; min-width: 72px; flex: 1; }

.nox-refs-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted, #b4b4c0);
}
.nox-refs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.nox-ref-slot {
  min-height: 64px;
  border: 1px dashed #3a3a44;
  border-radius: 12px;
  background: transparent;
  color: var(--muted, #b4b4c0);
  font-size: 12px;
}
.nox-ref-slot:hover { border-color: var(--cyan-2, #1aa3e0); color: var(--cyan, #3ec6ff); }
.nox-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nox-ref-chip {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line, #2a2a31);
}
.nox-ref-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nox-ref-chip button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: 0;
  font-size: 12px;
}
.nox-ref-chip .kind {
  position: absolute;
  left: 2px;
  bottom: 2px;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0,0,0,.6);
  color: #ddd;
}

#prompt {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid #2a2a34;
  background: #0c0c10;
  color: inherit;
  padding: 10px;
  font: inherit;
}
.nox-controls-row { display: flex; gap: 8px; }
.nox-actions { display: flex; gap: 8px; }
.nox-ghost, .nox-primary {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line, #2a2a31);
  font: inherit;
  cursor: pointer;
}
.nox-ghost { background: #171a21; color: inherit; }
.nox-primary {
  background: var(--cyan-2, #1aa3e0);
  border-color: transparent;
  color: #061018;
  font-weight: 650;
}
.nox-primary:disabled, .nox-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.nox-note { margin: 0; color: #f0a8a8; font-size: 13px; }

.nox-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg, #101012);
}
.nox-main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #2a2a31);
}
.nox-main-tabs { display: flex; gap: 8px; }
.nox-main-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted, #b4b4c0);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}
.nox-main-tabs button.on {
  color: var(--text, #ececef);
  border-bottom-color: var(--cyan, #3ec6ff);
}
.nox-main-tabs button:disabled { opacity: 0.35; }
.nox-main-tools { display: flex; gap: 8px; }

.nox-creations {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-content: start;
}
.nox-creations.list {
  grid-template-columns: 1fr;
}
.nox-card {
  border: 1px solid var(--line, #2a2a31);
  border-radius: 14px;
  overflow: hidden;
  background: #171a21;
  cursor: pointer;
}
.nox-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0b0d12;
}
.nox-card .plaque {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--muted, #b4b4c0);
  border: 1px dashed rgba(240,113,120,.45);
  margin: 8px;
  border-radius: 10px;
}
.nox-card .meta {
  padding: 10px 12px 12px;
  font-size: 12px;
  color: var(--muted, #b4b4c0);
  line-height: 1.35;
}
.nox-card .meta strong { color: var(--text, #ececef); font-weight: 500; }

.nox-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6,7,10,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
}
.nox-lightbox[hidden] { display: none !important; }
.nox-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}
.nox-lb-meta {
  margin-top: 14px;
  max-width: min(92vw, 720px);
  color: #ddd;
  text-align: center;
}
.nox-lb-meta p { margin: 0 0 6px; font-size: 13px; }
.nox-lb-actions { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.nox-lb-actions a, .nox-lb-actions button {
  border: 1px solid #333;
  background: #171a21;
  color: #eee;
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  font: inherit;
}
.nox-lb-close, .nox-lb-nav {
  position: absolute;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}
.nox-lb-close { top: 12px; right: 18px; }
.nox-lb-nav.prev { left: 12px; top: 50%; transform: translateY(-50%); }
.nox-lb-nav.next { right: 12px; top: 50%; transform: translateY(-50%); }

body.lb-open { overflow: hidden; }

@media (max-width: 900px) {
  .nox-layout { grid-template-columns: 1fr; }
  .nox-side { border-right: 0; border-bottom: 1px solid var(--line, #2a2a31); max-height: none; }
}
