.bmc-body {
  overflow-x: hidden;
  background: #0A0A0F;
}

.bmc-heading {
  grid-template-columns: minmax(0, 820px) auto;
}

.bmc-workspace {
  grid-template-columns: minmax(320px, 0.9fr) minmax(560px, 1.34fr);
}

.bmc-form {
  position: sticky;
  top: 84px;
}

.bmc-workflow-card,
.bmc-preset-block,
.bmc-summary-card,
.bmc-section,
.bmc-mini-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #111118;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.bmc-preset-block {
  background: #161620;
}

.bmc-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.bmc-card-header strong {
  color: #EDEDF5;
  font: 800 1rem var(--font-display);
}

.bmc-card-header span {
  color: #8888A0;
  font-size: 0.8rem;
  font-weight: 800;
}

.bmc-steps {
  display: grid;
  gap: 9px;
}

.bmc-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: #161620;
}

.bmc-step > span,
.action-step > span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #2A2A3A;
  color: #B8B8CC;
  font-size: 0.82rem;
  font-weight: 900;
}

.bmc-step strong {
  display: block;
  color: #B8B8CC;
  font-size: 0.9rem;
  line-height: 1.25;
}

.bmc-step em {
  display: block;
  margin-top: 2px;
  color: #8888A0;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.bmc-step.is-active {
  border-color: rgba(14, 165, 233, 0.36);
  background: rgba(14, 165, 233, 0.08);
}

.bmc-step.is-active > span {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #f59e0b);
}

.bmc-step.is-done > span {
  color: #ffffff;
  background: #0f766e;
}

.bmc-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 8px;
  background: #111118;
  color: #B8B8CC;
  cursor: pointer;
  font: 800 0.82rem var(--font-sans);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.preset-chip:hover {
  border-color: rgba(14, 165, 233, 0.52);
  background: rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

.preset-chip.is-active {
  border-color: rgba(245, 158, 11, 0.44);
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.bmc-grid,
.bmc-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bmc-actions .action-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.bmc-actions .btn {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.bmc-output .output-header {
  align-items: flex-start;
}

.bmc-regen-control {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.bmc-regen-control select {
  width: min(244px, 100%);
}

.bmc-result {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.bmc-result[hidden] {
  display: none !important;
}

.bmc-summary-card {
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: stretch;
  border-color: rgba(14, 165, 233, 0.22);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(245, 158, 11, 0.08)),
    #ffffff;
}

.bmc-summary-card h3 {
  margin: 0 0 8px;
  color: #EDEDF5;
  font: 900 1.35rem/1.15 var(--font-display);
}

.bmc-summary-card p {
  margin: 0;
  color: #B8B8CC;
  line-height: 1.5;
}

.bmc-score-box {
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: 8px;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.08);
}

.bmc-score-box span {
  color: #8888A0;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bmc-score-box strong {
  color: #EDEDF5;
  font: 900 2.2rem/1 var(--font-display);
}

.bmc-expert-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.08);
}

.bmc-expert-row strong {
  color: #EDEDF5;
  font-size: 0.86rem;
}

.bmc-expert-row span {
  color: #B8B8CC;
  line-height: 1.45;
}

.bmc-canvas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bmc-block,
.bmc-mini-card,
.bmc-experiment-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #161620;
}

.bmc-block {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.bmc-block:hover {
  border-color: rgba(14, 165, 233, 0.34);
  background: rgba(14, 165, 233, 0.06);
  transform: translateY(-1px);
}

.bmc-block h3,
.bmc-mini-card h3,
.bmc-experiment-card h3 {
  margin: 0;
  color: #EDEDF5;
  font: 900 1rem/1.2 var(--font-display);
}

.bmc-tag {
  display: block;
  margin: 6px 0;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #111118;
  color: #B8B8CC;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
}

.bmc-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bmc-experiment-list {
  display: grid;
  gap: 12px;
}

.bmc-experiment-card p {
  margin: 0;
  color: #B8B8CC;
  line-height: 1.48;
}

.bmc-loader {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 380px;
  padding: 34px 16px;
  text-align: center;
}

.bmc-loader-grid {
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bmc-loader-cell {
  height: 74px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: linear-gradient(110deg, #ffffff 8%, #e0f2fe 28%, #fef3c7 52%, #ffffff 76%);
  background-size: 220% 100%;
  animation: bmc-shimmer 1.35s ease-in-out infinite;
}

.bmc-loader-cell:nth-child(2n) {
  animation-delay: 0.14s;
}

.bmc-loader-cell:nth-child(3n) {
  animation-delay: 0.28s;
}

.bmc-loader strong {
  color: #EDEDF5;
  font: 900 1.35rem var(--font-display);
}

.bmc-loader p {
  margin: 4px 0 0;
  color: #8888A0;
  font-weight: 700;
}

@keyframes bmc-shimmer {
  0%, 100% {
    background-position: 100% 0;
    opacity: 0.72;
  }
  50% {
    background-position: 0 0;
    opacity: 1;
  }
}

@media (max-width: 1040px) {
  .bmc-workspace,
  .bmc-heading {
    grid-template-columns: 1fr;
  }

  .bmc-form {
    position: static;
  }
}

@media (max-width: 840px) {
  .bmc-canvas-grid,
  .bmc-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bmc-shell {
    width: 100%;
  }

  .bmc-grid,
  .bmc-actions,
  .bmc-summary-card,
  .bmc-canvas-grid,
  .bmc-insight-grid {
    grid-template-columns: 1fr;
  }

  .bmc-card-header,
  .bmc-output .output-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .bmc-regen-control,
  .bmc-regen-control select,
  .bmc-regen-control .btn {
    width: 100%;
  }

  .bmc-actions .action-step {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .bmc-step > span,
  .action-step > span {
    width: 26px;
    height: 26px;
  }
}
