.nom-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.nom-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}

.nom-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.nom-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.nom-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.nom-disclaimer {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-dim);
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 20px;
}

/* ---------- Builder ---------- */
.nom-output {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 100px 14px 14px;
  margin-bottom: 20px;
}

.nom-output-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.nom-output-text {
  font-family: "Consolas", "SF Mono", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.nom-output #copyBuildBtn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 14px;
  font-size: 0.8rem;
}

.nom-event-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.nom-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
}

.nom-event-row .frag {
  flex: 1;
  font-family: "Consolas", "SF Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
}

.nom-event-row .nom-move {
  border: none;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
}

.nom-event-row .nom-move:hover { color: var(--text); }
.nom-event-row .nom-move:disabled { opacity: 0.3; cursor: default; }

.nom-event-row .nom-remove {
  border: none;
  background: none;
  color: #b3261e;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 6px;
}

.nom-add-event {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.nom-add-event-head {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.nom-band-row {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.nom-band-row .field { margin-bottom: 0; }

/* ---------- Validator ---------- */
.nom-validate-result {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nom-issue {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}

.nom-issue.ok { background: #e8f5e9; border-color: #b6dfb9; color: #1e5c22; }
.nom-issue.warn { background: #fff8e1; border-color: #f0dca0; color: #7a5b00; }
.nom-issue.error { background: #fdecea; border-color: #f3b8b2; color: #8c261d; }

.nom-issue .term {
  font-family: "Consolas", "SF Mono", monospace;
  font-weight: 700;
  margin-right: 6px;
}

@media (prefers-color-scheme: dark) {
  .nom-issue.ok { background: #17301a; border-color: #2a4a2d; color: #9fe0a5; }
  .nom-issue.warn { background: #332907; border-color: #5c4b12; color: #ecc975; }
  .nom-issue.error { background: #3a1a17; border-color: #63302a; color: #f3a89f; }
}

@media (max-width: 600px) {
  .nom-main { padding: 20px 12px 40px; }
  .nom-card { padding: 20px 18px; }
  .nom-band-row { grid-template-columns: 1fr; }
}
