:root {
  color-scheme: light;
  --canvas: #f4f7f2;
  --panel: #ffffff;
  --panel-soft: #f8faf7;
  --ink: #20252b;
  --muted: #66707a;
  --line: #dfe6df;
  --mint: #36a779;
  --mint-dark: #167457;
  --coral: #d95a48;
  --amber: #d99a2b;
  --sky: #407da3;
  --violet: #7762a6;
  --shadow: 0 20px 50px rgba(31, 45, 38, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(54, 167, 121, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(54, 167, 121, 0.07) 1px, transparent 1px),
    var(--canvas);
  background-size: 34px 34px;
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

button:hover {
  border-color: rgba(54, 167, 121, 0.5);
  box-shadow: 0 8px 20px rgba(31, 45, 38, 0.1);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

button:focus-visible,
textarea:focus-visible,
select:focus-visible,
.drop-zone:focus-visible {
  outline: 3px solid rgba(54, 167, 121, 0.28);
  outline-offset: 2px;
}

.app-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: calc(100vh - 56px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.control-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--panel-soft);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 2px solid #182019;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(54, 167, 121, 0.22), transparent 52%),
    linear-gradient(315deg, rgba(217, 90, 72, 0.2), transparent 46%),
    #fff;
  box-shadow: 5px 5px 0 #182019;
}

.brand-mark span {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-row p,
.eyebrow {
  color: var(--muted);
  font-size: 13px;
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(32, 37, 43, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(64, 125, 163, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(217, 154, 43, 0.14), transparent 42%),
    #fff;
}

.drop-zone.drag-over {
  border-color: var(--mint);
  background:
    linear-gradient(135deg, rgba(54, 167, 121, 0.18), transparent 38%),
    linear-gradient(315deg, rgba(217, 90, 72, 0.16), transparent 42%),
    #fff;
}

.drop-zone.is-busy {
  cursor: wait;
}

.drop-art {
  position: absolute;
  inset: 18px;
  pointer-events: none;
}

.drop-art span {
  position: absolute;
  display: block;
  width: 76px;
  height: 52px;
  border: 2px solid rgba(32, 37, 43, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.drop-art span:nth-child(1) {
  top: 8px;
  left: 12px;
  transform: rotate(-8deg);
}

.drop-art span:nth-child(2) {
  right: 18px;
  bottom: 26px;
  transform: rotate(7deg);
}

.drop-art span:nth-child(3) {
  right: 92px;
  top: 36px;
  width: 42px;
  background: rgba(54, 167, 121, 0.16);
}

.drop-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 240px;
  text-align: center;
}

.drop-copy strong {
  font-size: 20px;
}

.drop-copy span {
  color: var(--muted);
  font-size: 14px;
}

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

.button-grid.compact button {
  min-height: 38px;
  font-size: 14px;
}

.support-bundle-button {
  grid-column: 1 / -1;
}

.primary-action {
  border-color: #182019;
  color: #fff;
  background: #182019;
}

.field-label {
  margin-bottom: -10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 136px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

.ocr-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: -8px;
}

.ocr-row button {
  min-height: 38px;
  font-size: 14px;
}

.ocr-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ocr-status.working {
  color: var(--sky);
}

.ocr-status.done {
  color: var(--mint-dark);
}

.ocr-status.error {
  color: var(--coral);
}

.language-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.result-pane {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  background: #fff;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-header h2 {
  margin-top: 4px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.status-pill.neutral {
  color: var(--muted);
  background: #eef1ed;
}

.status-pill.ready {
  color: #fff;
  background: var(--mint-dark);
}

.status-pill.warn {
  color: #1f1605;
  background: #f4ca76;
}

.status-pill.blocked {
  color: #fff;
  background: var(--coral);
}

.status-pill.scanning {
  color: #fff;
  background: var(--sky);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 24px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-strip div {
  display: grid;
  min-height: 86px;
  align-content: center;
  gap: 4px;
  padding: 14px;
  background: var(--panel-soft);
}

.summary-strip span {
  font-size: 30px;
  font-weight: 900;
}

.summary-strip small {
  color: var(--muted);
  font-size: 13px;
}

.scan-banner {
  display: grid;
  gap: 10px;
  margin: -4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel-soft);
}

.scan-banner[hidden] {
  display: none;
}

.scan-banner div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
}

.scan-banner strong {
  font-size: 14px;
}

.scan-banner span {
  color: var(--muted);
  font-size: 13px;
}

.scan-banner.scanning,
.scan-banner.analyzing {
  border-color: rgba(64, 125, 163, 0.34);
  background: rgba(64, 125, 163, 0.08);
}

.scan-banner.large {
  border-color: rgba(217, 154, 43, 0.4);
  background: rgba(217, 154, 43, 0.1);
}

.scan-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece7;
}

.scan-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 0.18s ease;
}

.scan-banner.scanning .scan-progress span,
.scan-banner.analyzing .scan-progress span {
  background: var(--sky);
}

.scan-banner.large .scan-progress span {
  background: var(--amber);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  min-width: 82px;
  min-height: 38px;
}

.tab.active {
  border-color: #182019;
  color: #fff;
  background: #182019;
}

.tab-panel {
  display: none;
  min-height: 0;
}

.tab-panel.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 10px;
}

.section-title:first-child {
  margin-top: 0;
}

.section-title h3 {
  font-size: 18px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.finding,
.candidate,
.engine-card,
.asset-card,
.profile-card,
.runtime-repair-summary,
.prepared-handoff,
.launch-attempt-card,
.roadmap-summary,
.roadmap-step,
.environment-summary,
.runtime-assistant,
.environment-check,
.error-summary,
.error-recipe,
.recipe-library-card,
.support-summary-card,
.support-card,
.package-card,
.package-roadmap article,
.one-stop-wizard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.finding {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
}

.finding::before {
  content: "";
  width: 10px;
  height: 100%;
  min-height: 42px;
  border-radius: 999px;
  background: var(--sky);
}

.finding.warning::before {
  background: var(--amber);
}

.finding.blocker::before {
  background: var(--coral);
}

.finding.good::before {
  background: var(--mint);
}

.finding h4,
.candidate h4,
.engine-card h4,
.asset-card h4,
.profile-card h4,
.runtime-repair-summary h4,
.prepared-handoff h4,
.launch-attempt-card h4,
.roadmap-summary h4,
.roadmap-step h4,
.environment-summary h4,
.runtime-assistant h4,
.environment-check h4,
.error-summary h4,
.error-recipe h4,
.recipe-library-card h4,
.support-summary-card h4,
.support-card h4,
.package-card h4,
.package-roadmap h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.one-stop-heading h4,
.one-stop-step h5 {
  margin: 0;
}

.finding p,
.candidate p,
.engine-card p,
.asset-card p,
.profile-card p,
.runtime-repair-summary p,
.prepared-handoff p,
.launch-attempt-card p,
.roadmap-summary p,
.roadmap-step p,
.environment-summary p,
.runtime-assistant p,
.environment-check p,
.error-summary p,
.error-recipe p,
.recipe-library-card p,
.support-summary-card p,
.support-card p,
.package-card p,
.package-roadmap p,
.one-stop-heading p,
.one-stop-step p,
.empty-state p {
  color: var(--muted);
  line-height: 1.55;
}

.candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.runtime-repair-summary {
  margin-bottom: 10px;
  border-color: rgba(217, 154, 43, 0.32);
  background: rgba(217, 154, 43, 0.07);
}

.runtime-repair-summary p {
  margin: 0;
}

.repair-tool-card {
  border-color: rgba(217, 154, 43, 0.32);
}

.repair-tool-card.recommended {
  background: rgba(54, 167, 121, 0.05);
  border-color: rgba(54, 167, 121, 0.34);
}

.repair-type-badge {
  min-width: 72px;
  border-radius: 8px;
  padding: 7px 9px;
  background: #f2ead8;
  color: #684d18;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.repair-entry-button {
  background: #8f6412;
  border-color: rgba(143, 100, 18, 0.54);
}

.prepared-handoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.prepared-handoff.ready {
  border-color: rgba(54, 167, 121, 0.34);
  background: rgba(54, 167, 121, 0.06);
}

.prepared-handoff.todo {
  border-color: rgba(217, 154, 43, 0.44);
  background: rgba(217, 154, 43, 0.06);
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.handoff-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.launch-attempt-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border-color: rgba(64, 125, 163, 0.32);
  background: rgba(64, 125, 163, 0.06);
}

.launch-attempt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.launch-attempt-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.candidate-side {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 10px;
}

.launch-entry-button {
  min-height: 34px;
  border-color: rgba(22, 116, 87, 0.5);
  padding: 0 12px;
  color: #fff;
  background: var(--mint-dark);
  font-size: 13px;
  font-weight: 800;
}

.launch-entry-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #eef3ee;
}

.package-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.package-actions button {
  min-height: 34px;
  border-color: rgba(22, 116, 87, 0.5);
  padding: 0 12px;
  color: #fff;
  background: var(--mint-dark);
  font-size: 13px;
  font-weight: 800;
}

.package-actions button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #eef3ee;
}

.launch-failure-title {
  margin-top: 18px;
}

.launch-failure-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(217, 154, 43, 0.32);
  border-radius: 8px;
  padding: 14px;
  background: rgba(217, 154, 43, 0.06);
}

.launch-failure-copy h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.launch-failure-form {
  display: grid;
  gap: 10px;
}

.launch-failure-form > strong {
  font-size: 13px;
}

.failure-triage {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(64, 125, 163, 0.2);
  border-radius: 8px;
  padding: 12px;
  background: rgba(64, 125, 163, 0.06);
}

.failure-triage-heading {
  display: grid;
  gap: 4px;
}

.failure-triage-heading strong {
  font-size: 13px;
}

.failure-triage-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.failure-triage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.failure-triage-question {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.failure-triage-question legend {
  display: grid;
  gap: 3px;
  padding: 0;
}

.failure-triage-question legend strong {
  color: var(--ink);
  font-size: 13px;
}

.failure-triage-question legend span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.failure-triage-options {
  display: grid;
  gap: 6px;
}

.failure-triage-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  border: 1px solid rgba(32, 37, 43, 0.1);
  border-radius: 7px;
  padding: 8px;
  background: #fbfcfb;
}

.failure-triage-option.selected {
  border-color: rgba(64, 125, 163, 0.38);
  background: rgba(64, 125, 163, 0.1);
}

.failure-triage-option input {
  margin-top: 3px;
}

.failure-triage-option span {
  display: grid;
  gap: 2px;
}

.failure-triage-option strong {
  font-size: 12px;
}

.failure-triage-option small {
  color: var(--muted);
  line-height: 1.35;
}

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

.failure-symptom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.failure-symptom.selected {
  border-color: rgba(217, 154, 43, 0.52);
  background: rgba(217, 154, 43, 0.1);
}

.failure-symptom input {
  margin-top: 3px;
}

.failure-symptom span {
  display: grid;
  gap: 3px;
}

.failure-symptom strong {
  font-size: 13px;
}

.failure-symptom small {
  color: var(--muted);
  line-height: 1.45;
}

.launch-failure-form textarea {
  min-height: 96px;
  resize: vertical;
}

.launch-failure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.launch-failure-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.profile-list {
  margin-top: 10px;
}

.profile-card {
  display: grid;
  gap: 12px;
}

.profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.command-box {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  color: #334039;
  font-size: 13px;
}

.launch-template-list {
  display: grid;
  gap: 8px;
}

.launch-template-list > strong {
  font-size: 12px;
}

.launch-template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(64, 125, 163, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(64, 125, 163, 0.06);
}

.launch-template-card h5 {
  margin: 0 0 4px;
  font-size: 13px;
}

.launch-template-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.launch-template-card code {
  display: block;
  overflow-x: auto;
  border-radius: 6px;
  padding: 5px 6px;
  background: #fff;
  color: #334039;
  font-size: 12px;
}

.launch-template-card button {
  min-height: 34px;
  white-space: nowrap;
}

.profile-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-notes span {
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(64, 125, 163, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.launch-history-title {
  margin-top: 18px;
}

.launch-history-list {
  margin-top: 8px;
}

.launch-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.launch-history-item h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.launch-history-item p {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.launch-history-item span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.roadmap-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.roadmap-summary.blocked {
  border-color: rgba(217, 90, 72, 0.42);
  background: rgba(217, 90, 72, 0.06);
}

.roadmap-summary.todo {
  border-color: rgba(217, 154, 43, 0.44);
  background: rgba(217, 154, 43, 0.06);
}

.roadmap-summary.ready {
  border-color: rgba(54, 167, 121, 0.34);
}

.roadmap-actions {
  display: flex;
  justify-content: flex-end;
}

.roadmap-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.roadmap-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.roadmap-counts span,
.roadmap-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.roadmap-counts .blocked,
.roadmap-state.blocked {
  color: #8f2e21;
  border-color: rgba(217, 90, 72, 0.35);
  background: rgba(217, 90, 72, 0.1);
}

.roadmap-counts .todo,
.roadmap-state.todo,
.roadmap-state.waiting {
  color: #744c00;
  border-color: rgba(217, 154, 43, 0.38);
  background: rgba(217, 154, 43, 0.12);
}

.roadmap-counts .ready,
.roadmap-state.ready {
  color: var(--mint-dark);
  border-color: rgba(54, 167, 121, 0.34);
  background: rgba(54, 167, 121, 0.1);
}

.roadmap-list {
  display: grid;
  gap: 10px;
}

.roadmap-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}

.roadmap-step.blocked {
  border-color: rgba(217, 90, 72, 0.34);
}

.roadmap-step.todo {
  border-color: rgba(217, 154, 43, 0.38);
}

.roadmap-index {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #182019;
  font-weight: 900;
}

.roadmap-step-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.roadmap-action {
  border-left: 3px solid var(--sky);
  margin-top: 8px;
  padding-left: 10px;
  color: #334039;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 700;
}

.roadmap-evidence code {
  overflow-wrap: anywhere;
}

.environment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.runtime-assistant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.environment-summary.warning,
.environment-check.warning,
.runtime-assistant.warning {
  border-color: rgba(217, 154, 43, 0.44);
  background: rgba(217, 154, 43, 0.06);
}

.environment-summary.blocker,
.environment-check.blocker {
  border-color: rgba(217, 90, 72, 0.42);
  background: rgba(217, 90, 72, 0.06);
}

.environment-summary.good,
.environment-check.good,
.runtime-assistant.good {
  border-color: rgba(54, 167, 121, 0.32);
}

.environment-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.environment-counts span,
.env-status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.environment-counts .good,
.env-status.good {
  color: var(--mint-dark);
  border-color: rgba(54, 167, 121, 0.34);
  background: rgba(54, 167, 121, 0.1);
}

.environment-counts .warning,
.env-status.warning {
  color: #744c00;
  border-color: rgba(217, 154, 43, 0.38);
  background: rgba(217, 154, 43, 0.12);
}

.environment-counts .blocker,
.env-status.blocker {
  color: #8f2e21;
  border-color: rgba(217, 90, 72, 0.35);
  background: rgba(217, 90, 72, 0.1);
}

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

.native-environment-grid {
  margin-bottom: 12px;
}

.environment-check {
  display: grid;
  align-content: start;
  gap: 10px;
}

.environment-check-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.environment-check-header .env-status,
.error-recipe-header .env-status {
  justify-self: end;
}

.environment-action {
  border-left: 3px solid var(--sky);
  padding-left: 10px;
  color: #334039;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 700;
}

.runtime-assistant-actions {
  display: flex;
  justify-content: flex-end;
}

.runtime-checked-at {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.environment-evidence code {
  overflow-wrap: anywhere;
}

.error-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.error-summary.warning,
.error-recipe.warning {
  border-color: rgba(217, 154, 43, 0.44);
  background: rgba(217, 154, 43, 0.06);
}

.error-summary.info,
.error-recipe.info {
  border-color: rgba(64, 125, 163, 0.26);
}

.error-grid {
  display: grid;
  gap: 12px;
}

.error-recipe {
  display: grid;
  gap: 12px;
}

.error-recipe-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.recipe-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
  color: #334039;
  line-height: 1.5;
  font-size: 13px;
  font-weight: 700;
}

.recipe-library-card {
  margin-top: 0;
}

.support-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  border-color: rgba(54, 167, 121, 0.32);
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.support-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

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

.support-card {
  display: grid;
  gap: 12px;
}

.support-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-file-list code {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.support-file-list code {
  border-radius: 7px;
  overflow-wrap: anywhere;
}

.support-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.support-stat-grid span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--panel-soft);
}

.support-stat-grid strong {
  font-size: 18px;
}

.support-stat-grid small,
.support-note {
  color: var(--muted);
}

.support-issue-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.support-issue-list li {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--amber);
  padding-left: 10px;
}

.support-issue-list span {
  color: var(--muted);
  line-height: 1.45;
}

.support-preview {
  overflow: auto;
  max-height: 260px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  white-space: pre-wrap;
  color: #334039;
  font-size: 13px;
  line-height: 1.55;
}

.candidate-score {
  align-self: start;
  min-width: 54px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #fff;
  background: var(--mint-dark);
  text-align: center;
  font-weight: 900;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 700;
}

.chip.good {
  color: var(--mint-dark);
  border-color: rgba(54, 167, 121, 0.35);
  background: rgba(54, 167, 121, 0.1);
}

.chip.warn {
  color: #744c00;
  border-color: rgba(217, 154, 43, 0.38);
  background: rgba(217, 154, 43, 0.12);
}

.chip.blocked {
  color: #8f2e21;
  border-color: rgba(217, 90, 72, 0.35);
  background: rgba(217, 90, 72, 0.1);
}

.one-stop-wizard {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  border-color: rgba(64, 125, 163, 0.28);
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
}

.one-stop-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.one-stop-heading h4 {
  font-size: 18px;
}

.one-stop-heading p {
  margin: 6px 0 0;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wizard-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.one-stop-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.one-stop-step {
  display: grid;
  grid-template-rows: auto minmax(92px, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.one-stop-step > span,
.one-stop-step > strong {
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.one-stop-step > span {
  border: 1px solid rgba(64, 125, 163, 0.22);
  background: rgba(64, 125, 163, 0.1);
  color: var(--sky-dark);
}

.one-stop-step > strong {
  align-self: end;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.one-stop-step.current {
  border-color: rgba(217, 154, 43, 0.46);
  background: rgba(217, 154, 43, 0.08);
}

.one-stop-step.current > strong {
  border-color: rgba(217, 154, 43, 0.38);
  background: rgba(217, 154, 43, 0.14);
  color: #744c00;
}

.one-stop-step.done > strong {
  border-color: rgba(54, 167, 121, 0.35);
  background: rgba(54, 167, 121, 0.1);
  color: var(--mint-dark);
}

.one-stop-step.waiting > strong {
  border-color: rgba(64, 125, 163, 0.24);
  background: rgba(64, 125, 163, 0.08);
  color: var(--sky-dark);
}

.one-stop-step h5 {
  font-size: 14px;
}

.one-stop-step p {
  margin: 5px 0 0;
  font-size: 12px;
}

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

.package-roadmap {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.package-roadmap article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.package-roadmap article > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #182019;
  font-weight: 900;
}

.package-card.warning {
  border-color: rgba(217, 154, 43, 0.46);
  background: rgba(217, 154, 43, 0.07);
}

.engine-next-step {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.engine-next-step strong {
  font-size: 12px;
}

.engine-next-step p {
  margin-top: 4px;
}

.engine-evidence-details code {
  display: grid;
  gap: 3px;
}

.engine-evidence-details code span {
  color: var(--muted);
  font-size: 12px;
}

.package-files code {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.package-files code span {
  color: var(--muted);
}

.archive-preview {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.archive-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.archive-preview-header strong {
  font-size: 13px;
}

.asset-bars {
  display: grid;
  gap: 10px;
}

.asset-bar {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece7;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.sample-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.sample-list strong {
  color: var(--ink);
  font-size: 12px;
}

.sample-list code,
.report-box code {
  border-radius: 6px;
  padding: 2px 5px;
  background: #eef1ed;
  color: #334039;
}

.report-box {
  overflow: auto;
  max-height: 58vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfb;
  white-space: pre-wrap;
  line-height: 1.55;
}

.empty-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.empty-glyph {
  width: 96px;
  height: 72px;
  border: 2px solid rgba(32, 37, 43, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 30%, rgba(64, 125, 163, 0.18) 30% 34%, transparent 34%),
    linear-gradient(0deg, transparent 46%, rgba(217, 90, 72, 0.16) 46% 54%, transparent 54%),
    #fff;
  box-shadow: 8px 8px 0 rgba(54, 167, 121, 0.18);
}

.empty-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 820px);
  margin-top: 10px;
}

.empty-flow-step {
  display: grid;
  gap: 6px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  text-align: left;
}

.empty-flow-step span {
  width: max-content;
  border: 1px solid rgba(64, 125, 163, 0.24);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(64, 125, 163, 0.1);
  color: var(--sky-dark);
  font-size: 11px;
  font-weight: 900;
}

.empty-flow-step h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.empty-flow-step p {
  margin: 0;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(340px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #182019;
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 920px) {
  .app-shell {
    padding: 14px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .control-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .one-stop-heading,
  .one-stop-steps,
  .grid-two,
  .environment-grid,
  .failure-triage-grid,
  .failure-symptom-grid,
  .empty-flow,
  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .control-pane,
  .result-pane {
    padding: 16px;
  }

  .result-header {
    display: grid;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }

  .ocr-row {
    grid-template-columns: 1fr;
  }

  .candidate {
    grid-template-columns: 1fr;
  }

  .prepared-handoff {
    grid-template-columns: 1fr;
  }

  .launch-attempt-card {
    grid-template-columns: 1fr;
  }

  .environment-summary,
  .runtime-assistant {
    grid-template-columns: 1fr;
  }

  .error-summary,
  .error-recipe-header,
  .launch-template-card,
  .launch-history-item,
  .roadmap-summary,
  .roadmap-step-header,
  .one-stop-heading,
  .support-summary-card {
    grid-template-columns: 1fr;
  }

  .launch-history-item span {
    white-space: normal;
  }

  .roadmap-actions,
  .handoff-actions,
  .handoff-actions button,
  .launch-attempt-actions,
  .launch-attempt-actions button,
  .candidate-side,
  .candidate-side button,
  .roadmap-actions button {
    width: 100%;
  }

  .support-actions,
  .support-actions button,
  .runtime-assistant-actions,
  .runtime-assistant-actions button,
  .wizard-actions,
  .wizard-actions button {
    width: 100%;
  }

  .support-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .error-recipe-header .env-status {
    justify-self: start;
  }

  .environment-counts {
    justify-content: flex-start;
  }

  .candidate-score {
    justify-self: start;
  }

  .asset-bar {
    grid-template-columns: 88px minmax(0, 1fr) 40px;
  }
}
