/* Article Creation Lab — full-screen remix room */
body.nd-alab-open { overflow: hidden; }

#nd-alab-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

#nd-alab-root:empty { display: none; }

.nd-alab-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: auto;
}

.nd-alab {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #0e1014;
  pointer-events: auto;
  max-height: 100dvh;
}

.nd-alab-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0) + 12px) 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nd-alab-close {
  min-width: 44px;
  min-height: 44px;
  font-size: 28px;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #9aa0ad;
  cursor: pointer;
  flex-shrink: 0;
}

.nd-alab-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d4a853;
}

.nd-alab-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: #f4ecd9;
  overflow-wrap: anywhere;
}

.nd-alab-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nd-alab-foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0) + 12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #12141a;
}

.nd-alab-foot .nd-cta {
  min-height: 44px;
  flex: 1 1 140px;
}

.nd-alab-sub {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c8cdd4;
}

.nd-alab-seed-preview {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #aab2bb;
}

.nd-alab-field {
  display: block;
  font-size: 13px;
  color: #9aa0ad;
  margin-bottom: 10px;
}

.nd-alab-field input,
.nd-alab-field select,
.nd-alab-field textarea,
#nd-alab-edit {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}

.nd-alab-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.nd-alab-pill {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #c8cdd4;
  cursor: pointer;
}

.nd-alab-pill.on {
  border-color: #d4a853;
  background: rgba(212, 168, 83, 0.15);
  color: #f4ecd9;
}

.nd-alab-write {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.nd-alab-error {
  margin: 0;
  color: #e07a7a;
  font-size: 14px;
}

.nd-alab-preview {
  max-height: none;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  background: rgba(244, 236, 217, 0.04);
}

.nd-alab-sources {
  margin-bottom: 12px;
}

.nd-alab-sources-label {
  display: block;
  font-size: 12px;
  color: #9aa0ad;
  margin-bottom: 8px;
}

.nd-alab-src-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nd-alab-src-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #d4a853;
  text-decoration: none;
  min-height: 32px;
  line-height: 1.2;
}

.nd-alab-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.nd-alab-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nd-alab-platform-btn {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: #f4ecd9;
  cursor: pointer;
  font-size: 14px;
}

@media (min-width: 769px) {
  .nd-alab {
    inset: auto;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, 94vw);
    max-height: 90vh;
    border-radius: 14px;
    border: 1px solid rgba(212, 168, 83, 0.2);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  }
}
