/* ============================================================
   Game UI Composer — guided wizard (4 steps)
   Shares tokens with styles.css · dark stage, amber CTA, cyan scan
   ============================================================ */

.guided-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(79, 209, 255, .12), transparent 60%),
    radial-gradient(860px 540px at 90% 112%, rgba(255, 182, 72, .09), transparent 62%),
    var(--bg);
}

.guided-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(154, 168, 196, .09) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* ---------- Header ---------- */

.guided-header {
  position: relative;
  z-index: 30;
  height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 28, .88);
  backdrop-filter: blur(20px);
}
.guided-brand { justify-self: start; min-width: 0; }
.guided-brand-copy { min-width: 0; }
.guided-brand-copy strong { white-space: nowrap; }

.guided-header-actions { display: flex; align-items: center; justify-self: end; gap: 10px; }
.local-pill {
  white-space: nowrap;
  padding: 7px 13px;
  border: 1px solid rgba(62, 207, 142, .32);
  border-radius: 999px;
  color: var(--green);
  background: rgba(62, 207, 142, .08);
  font-size: 12px;
  font-weight: 600;
}

/* Step progress */
.guided-progress {
  display: flex;
  align-items: center;
  justify-content: center;
}
.guided-progress button {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: var(--faint);
  background: transparent;
  cursor: default;
  transition: color .2s;
}
.guided-progress button span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  transition: all .2s;
}
.guided-progress button b { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.guided-progress button.active { color: var(--cyan); }
.guided-progress button.done { color: var(--green); }
.guided-progress button.active span {
  border-color: var(--cyan);
  color: #04222f;
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-soft), 0 0 18px rgba(79, 209, 255, .35);
}
.guided-progress button.done span { border-color: var(--green); color: #052b1b; background: var(--green); }
.guided-progress > i { width: clamp(14px, 3vw, 46px); height: 1.5px; margin: 0 10px; background: var(--line-strong); }

/* ---------- Main content ---------- */

.guided-main {
  position: relative;
  z-index: 1;
  height: calc(100vh - 68px);
  overflow: auto;
  padding: clamp(22px, 3vw, 44px);
}

.guided-step {
  width: min(1320px, 100%);
  min-height: calc(100vh - 68px - clamp(44px, 6vw, 88px));
  margin: 0 auto;
  animation: guided-enter .38s ease both;
}
.guided-step[hidden] { display: none; }
.guided-step[data-step="1"] {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(560px, 1.18fr);
  align-items: center;
  gap: clamp(34px, 5vw, 78px);
}
.guided-step[data-step="1"][hidden] { display: none; }

@keyframes guided-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.guided-kicker {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
}

/* ---------- Step 1 · Hero ---------- */

.hero-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 4.4vw, 62px);
  line-height: 1.06;
  letter-spacing: -.04em;
  font-weight: 700;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--amber);
  text-shadow: 0 0 34px rgba(255, 182, 72, .35);
}
.hero-copy > p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-points { display: grid; gap: 12px; max-width: 460px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero-points li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(16, 22, 43, .62);
}
.hero-points li > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(79, 209, 255, .25);
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 15px;
}
.hero-points b, .hero-points small { display: block; }
.hero-points b { font-size: 14px; font-weight: 600; }
.hero-points small { margin-top: 2px; color: var(--faint); font-size: 12.5px; }

.guided-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.guided-privacy-line { display: block; margin-top: 16px; color: var(--faint); font-size: 12.5px; }

/* ---------- Guided button system ---------- */

.guided-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  transition: transform .16s, box-shadow .16s, filter .16s, border-color .16s, background .16s;
}
.guided-button:hover { transform: translateY(-2px); filter: brightness(1.04); }
.guided-button:active { transform: translateY(0); }
.guided-button.primary {
  color: #2a1802;
  border-color: rgba(255, 196, 106, .6);
  background: linear-gradient(180deg, #ffc46a, #f79b1b);
  box-shadow: 0 5px 0 #a35f06, 0 16px 32px rgba(232, 137, 12, .24), inset 0 1px rgba(255, 255, 255, .5);
}
.guided-button.primary:hover { box-shadow: 0 6px 0 #a35f06, 0 20px 38px rgba(232, 137, 12, .3), inset 0 1px rgba(255, 255, 255, .5); }
.guided-button.primary:active { box-shadow: 0 2px 0 #a35f06, 0 8px 18px rgba(232, 137, 12, .2); }
.guided-button.secondary {
  color: #dbe6f7;
  border-color: var(--line-strong);
  background: var(--panel-soft);
}
.guided-button.secondary:hover { border-color: rgba(148, 163, 198, .5); background: var(--panel-raised); }
.guided-button.success {
  color: #052b1b;
  border-color: rgba(62, 207, 142, .6);
  background: linear-gradient(180deg, #5fe3a8, #2cb87a);
  box-shadow: 0 5px 0 #157a4c, 0 16px 30px rgba(62, 207, 142, .22), inset 0 1px rgba(255, 255, 255, .4);
}
.guided-button.success:active { box-shadow: 0 2px 0 #157a4c; }
.guided-button.wide { width: 100%; }
.guided-button[hidden] { display: none; }
.guided-button[disabled] { opacity: .5; cursor: default; transform: none; }
.guided-button.hero-cta { min-width: 210px; min-height: 54px; font-size: 16px; border-radius: 15px; }
.guided-button.hero-cta span { font-size: 18px; }

/* ---------- Reference image window ---------- */

.reference-showcase { position: relative; }
.reference-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0d1226;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(79, 209, 255, .06), 0 0 70px rgba(79, 209, 255, .07);
}
.window-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
}
.window-bar > span { display: flex; gap: 6px; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b63; }
.window-bar i:nth-child(2) { background: #ffc243; }
.window-bar i:nth-child(3) { background: #35cd68; }
.window-bar b { flex: 1; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted); text-align: center; }
.window-bar em { font-family: var(--font-mono); font-size: 12px; font-style: normal; }
.reference-window video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #0d1226; }
.reference-badge {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #e8f4ff;
  background: rgba(7, 12, 26, .82);
  backdrop-filter: blur(10px);
  font-size: 12.5px;
  font-weight: 600;
}
.video-toggle {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #e8f4ff;
  background: rgba(7, 12, 26, .82);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
}
.video-toggle:hover { border-color: rgba(79, 209, 255, .5); color: var(--cyan); }
.video-controls {
  display: flex;
  gap: 8px;
}
.video-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: rgba(7, 12, 26, .92);
}

/* ---------- Step headings ---------- */

.step-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.step-heading h2 { margin: 9px 0 7px; font-size: clamp(27px, 2.8vw, 40px); font-weight: 700; letter-spacing: -.03em; }
.step-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.step-counter { color: var(--faint); font-family: var(--font-mono); font-size: 15px; font-weight: 700; letter-spacing: .18em; }

/* ---------- Shared cards ---------- */

.component-review-panel, .scan-status-card, .quick-canvas-panel, .quick-palette {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 60%), var(--panel);
  box-shadow: var(--shadow-card);
}

/* ---------- Step 2 · Scan ---------- */

.scan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 18px; }

.scan-stage, .review-reference {
  position: relative;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #0d1226;
  box-shadow: var(--shadow-card);
}
.scan-stage {
  min-height: 0;
  align-self: start;
  width: min(100%, max(520px, calc((100vh - 380px) * 1.7768)));
  margin-inline: auto;
}
.scan-stage > img, .review-reference > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.scan-stage.scanning::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(48, 197, 244, .05), rgba(48, 197, 244, .14), rgba(48, 197, 244, .05));
  animation: scan-pulse .8s ease-in-out infinite alternate;
}
@keyframes scan-pulse { to { background-color: rgba(83, 210, 249, .08); } }
.scan-beam {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: -8%;
  height: 4px;
  opacity: 0;
  background: #77edff;
  box-shadow: 0 0 10px #5ce2ff, 0 0 32px 14px rgba(64, 216, 255, .35);
}
.scan-stage.scanning .scan-beam { opacity: 1; animation: scan-beam 1.7s ease-in-out both; }
@keyframes scan-beam { from { top: 1%; } to { top: 99%; } }
.scan-corners i { position: absolute; z-index: 4; width: 34px; height: 34px; border-color: rgba(141, 239, 255, .85); border-style: solid; }
.scan-corners i:nth-child(1) { left: 14px; top: 14px; border-width: 3px 0 0 3px; }
.scan-corners i:nth-child(2) { right: 14px; top: 14px; border-width: 3px 3px 0 0; }
.scan-corners i:nth-child(3) { left: 14px; bottom: 14px; border-width: 0 0 3px 3px; }
.scan-corners i:nth-child(4) { right: 14px; bottom: 14px; border-width: 0 3px 3px 0; }

.detection-layer { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
.detection-box {
  position: absolute;
  opacity: 0;
  border: 2px solid #8df2ff;
  border-radius: 7px;
  background: rgba(70, 220, 255, .07);
  box-shadow: 0 0 0 1px rgba(4, 24, 44, .5), 0 0 20px rgba(88, 230, 255, .28);
  transition: opacity .22s, transform .22s;
  transform: scale(.94);
}
.detection-box.show { opacity: 1; transform: scale(1); }
.detection-box.muted { opacity: .18; }
.detection-box::before {
  content: attr(data-index);
  position: absolute;
  left: -2px;
  top: -21px;
  padding: 3px 7px;
  border-radius: 5px 5px 0 0;
  color: #04222f;
  background: #8df2ff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
}

.scan-status-card { align-self: stretch; display: flex; flex-direction: column; padding: 24px 22px; }
.status-orb {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #04222f;
  background: linear-gradient(160deg, #7ee2ff, #22a8dd);
  box-shadow: 0 8px 22px rgba(34, 168, 221, .35), inset 0 1px rgba(255, 255, 255, .5);
  font-size: 19px;
}
.scan-status-card h3 { margin: 16px 0 7px; font-size: 19px; font-weight: 700; }
.scan-status-card > p { min-height: 66px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.scan-meter { height: 7px; overflow: hidden; margin: 18px 0; border-radius: 999px; background: var(--panel-raised); }
.scan-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4fd1ff, #3ecf8e); box-shadow: 0 0 12px rgba(79, 209, 255, .5); transition: width .38s ease; }
.scan-log { display: grid; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.scan-log li { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; font-weight: 600; transition: color .2s; }
.scan-log li span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all .2s;
}
.scan-log li.done { color: #bfeeda; }
.scan-log li.done span { color: #052b1b; background: var(--green); }
.scan-status-card .guided-button { margin-top: auto; }

.guided-back { margin-top: 16px; padding: 8px 0; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 13px; font-weight: 600; }
.guided-back:hover { color: var(--text); }

/* ---------- Step 3 · Review components ---------- */

/* Pin the panel to the right, match the reference height, and let the list fill the available space. */
.review-layout { position: relative; padding-right: 418px; }
.review-reference {
  width: min(100%, max(520px, calc((100vh - 420px) * 1.7768)));
  margin-inline: auto;
}
.review-detections .detection-box { opacity: 1; transform: none; }

.component-review-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.component-panel-head, .quick-palette-head, .quick-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}
.component-panel-head b, .component-panel-head small,
.quick-canvas-toolbar b, .quick-canvas-toolbar small,
.quick-palette-head b, .quick-palette-head small { display: block; }
.component-panel-head b, .quick-canvas-toolbar b, .quick-palette-head b { font-size: 14.5px; font-weight: 700; }
.component-panel-head small, .quick-canvas-toolbar small, .quick-palette-head small { margin-top: 2px; color: var(--faint); font-size: 12px; }
.quick-palette-head button {
  padding: 8px 12px;
  border: 1px solid rgba(79, 209, 255, .4);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  background: var(--cyan-soft);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  transition: background .15s, border-color .15s;
}
.quick-palette-head button:hover { border-color: var(--cyan); background: rgba(79, 209, 255, .2); }

.component-review-list { flex: 1 1 0; min-height: 0; overflow: auto; padding: 8px; }
.component-review-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.component-review-row:last-child { border-bottom: 0; }
.component-mini-preview {
  width: 82px;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--panel-raised);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.component-type {
  padding: 4px 8px;
  border: 1px solid rgba(79, 209, 255, .3);
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.component-name b, .component-name small { display: block; }
.component-name b { font-size: 13.5px; font-weight: 600; }
.component-name small { margin-top: 2px; color: var(--faint); font-size: 11.5px; }
.component-ready {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052b1b;
  background: var(--green);
  font-size: 11px;
  font-weight: 900;
}
.ready-count {
  padding: 6px 11px;
  border: 1px solid rgba(62, 207, 142, .32);
  border-radius: 999px;
  color: var(--green);
  background: rgba(62, 207, 142, .08);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.guided-footer-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }

/* ---------- Step 4 · Compose ---------- */

.compact-heading { margin-bottom: 14px; }
.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.quick-canvas-panel, .quick-palette { overflow: hidden; }
.quick-canvas-panel { display: flex; flex-direction: column; }
.quick-canvas-toolbar em { color: var(--cyan); font-family: var(--font-mono); font-size: 12px; font-style: normal; font-weight: 600; }
.quick-canvas-wrap { flex: 1; display: grid; align-content: center; padding: 14px; background: var(--bg-deep); }
.quick-canvas {
  position: relative;
  width: min(100%, max(520px, calc((100vh - 480px) * 1.7768)));
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  aspect-ratio: 1672 / 941;
  background: #0d1226;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  touch-action: none;
}
.quick-canvas > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
#quickCanvasLayer { position: absolute; inset: 0; }
.quick-canvas-item { position: absolute; cursor: grab; touch-action: none; }
.quick-canvas-item:active { cursor: grabbing; }
.quick-canvas-item img { width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; }
.quick-canvas-item::after { content: ""; position: absolute; inset: -2px; opacity: 0; border: 1.5px dashed #5ae4ff; border-radius: 5px; transition: opacity .15s; }
.quick-canvas-item:hover::after { opacity: 1; }
.quick-canvas-item.selected::after { opacity: 1; border-style: solid; box-shadow: 0 0 0 2px rgba(90, 228, 255, .25), 0 0 18px rgba(64, 216, 255, .35); }
.canvas-empty-message {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  min-width: 240px;
  padding: 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  background: rgba(10, 14, 28, .86);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.canvas-empty-message[hidden] { display: none; }
.canvas-empty-message b, .canvas-empty-message small { display: block; text-align: center; }
.canvas-empty-message b { font-size: 14.5px; }
.canvas-empty-message small { margin-top: 5px; color: var(--muted); font-size: 12.5px; }

.quick-palette { display: flex; flex-direction: column; }
/* flex-basis: 0 lets the component grid absorb extra panel height instead of leaving empty space. */
.quick-palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  align-content: start;
  flex: 1 1 0;
  min-height: 132px;
  overflow: auto;
  padding: 12px;
}
.palette-item {
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--bg-deep);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, transform .15s;
}
.palette-item:hover { border-color: var(--line-strong); background: var(--panel-soft); transform: translateY(-1px); }
.palette-item.added { border-color: rgba(62, 207, 142, .4); background: rgba(62, 207, 142, .06); }
.palette-item.selected { border-color: var(--cyan); background: var(--cyan-soft); box-shadow: 0 0 0 1px var(--cyan); }
.palette-item img {
  display: block;
  width: 100%;
  height: 46px;
  object-fit: contain;
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(154, 168, 196, .1) 25%, transparent 25%, transparent 75%, rgba(154, 168, 196, .1) 75%),
    linear-gradient(45deg, rgba(154, 168, 196, .1) 25%, var(--panel-soft) 25%, var(--panel-soft) 75%, rgba(154, 168, 196, .1) 75%);
  background-position: 0 0, 6px 6px;
  background-size: 12px 12px;
}
.palette-item b { display: block; margin-top: 7px; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.palette-item small { display: block; margin-top: 2px; color: var(--faint); font-size: 10.5px; }

.simple-inspector {
  margin: 0 12px 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-deep);
}
.simple-inspector-empty { min-height: 118px; display: grid; place-items: center; text-align: center; }
.simple-inspector-empty[hidden], #simpleInspectorContent[hidden] { display: none; }
.simple-inspector-empty b, .simple-inspector-empty small { display: block; }
.simple-inspector-empty b { font-size: 13.5px; }
.simple-inspector-empty small { margin-top: 5px; color: var(--faint); font-size: 12px; }
.simple-selection-head { display: flex; align-items: center; gap: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.simple-selection-head img { width: 56px; height: 42px; object-fit: contain; border-radius: 7px; background: var(--panel-raised); }
.simple-selection-head b, .simple-selection-head small { display: block; }
.simple-selection-head b { font-size: 13.5px; font-weight: 600; }
.simple-selection-head small { margin-top: 2px; color: var(--faint); font-size: 11.5px; }
.simple-range { display: block; margin-top: 12px; }
.simple-range > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.simple-range output { color: var(--cyan); font-family: var(--font-mono); }
.simple-range input { width: 100%; margin-top: 7px; accent-color: var(--cyan); }
.variant-button {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
  border: 1px solid rgba(79, 209, 255, .4);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  background: var(--cyan-soft);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.variant-button:hover { border-color: var(--cyan); background: rgba(79, 209, 255, .2); }
.variant-button span { color: var(--amber); }
.variant-button b { font-size: 12.5px; }
.variant-button em {
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(255, 182, 72, .14);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
}

/* ---------- Compact-height mode: keep each step within one screen ---------- */

@media (max-height: 860px) {
  .guided-main { padding-top: 16px; padding-bottom: 16px; }
  .guided-step { min-height: 0; }
  .step-heading { margin-bottom: 12px; }
  .step-heading h2 { margin: 6px 0 4px; font-size: clamp(22px, 2.4vw, 30px); }
  .step-heading p { font-size: 13px; }
  .compact-heading { margin-bottom: 10px; }
  .hero-copy h1 { margin: 12px 0 12px; font-size: clamp(34px, 3.8vw, 48px); }
  .hero-points { gap: 9px; margin-top: 18px; }
  .hero-points li { padding: 9px 12px; }
  .guided-actions { margin-top: 20px; }
  .guided-button { min-height: 42px; }
  .guided-button.hero-cta { min-height: 50px; }
  .scan-stage { width: min(100%, max(520px, calc((100vh - 340px) * 1.7768))); }
  .review-reference { width: min(100%, max(520px, calc((100vh - 380px) * 1.7768))); }
  .quick-canvas { width: min(100%, max(520px, calc((100vh - 430px) * 1.7768))); }
  .scan-status-card { padding: 16px; }
  .status-orb { width: 40px; height: 40px; font-size: 16px; }
  .scan-status-card h3 { margin: 11px 0 5px; font-size: 17px; }
  .scan-status-card > p { min-height: 0; font-size: 12.5px; }
  .scan-meter { margin: 12px 0; }
  .scan-log { gap: 7px; margin-bottom: 12px; }
  .scan-log li { font-size: 12.5px; }
  .guided-back { margin-top: 10px; }
  .simple-inspector { margin: 0 10px 10px; padding: 11px; }
  .simple-range { margin-top: 8px; }
  .variant-button { height: 36px; margin-top: 10px; }
  .quick-palette-grid { min-height: 106px; }
  .guided-footer-actions { margin-top: 12px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .guided-brand-copy small, .guided-progress button b { display: none; }
  .guided-progress > i { margin: 0 6px; }
}

@media (max-width: 1100px) {
  .guided-header { padding: 0 18px; }
  .guided-step[data-step="1"] { grid-template-columns: 1fr; align-content: start; }
  .hero-copy { text-align: center; }
  .hero-copy > p, .hero-points { margin-left: auto; margin-right: auto; }
  .hero-points li { text-align: left; }
  .guided-actions { justify-content: center; }
  .reference-showcase { width: min(760px, 100%); margin: 0 auto; }
  .review-layout { grid-template-columns: minmax(0, 1fr) 350px; }
}

@media (max-width: 800px) {
  .guided-header { grid-template-columns: 1fr auto; }
  .guided-progress { display: none; }
  .guided-header-actions { justify-self: end; }
  .guided-main { padding: 22px 14px 80px; }
  .guided-step { min-height: auto; }
  .scan-layout, .compose-layout { grid-template-columns: 1fr; }
  .review-layout { padding-right: 0; }
  .component-review-panel { position: static; width: auto; margin-top: 18px; }
  .component-review-list, .quick-palette-grid { flex: none; max-height: none; height: auto; }
  .scan-stage, .review-reference, .quick-canvas { width: 100%; }
  .step-heading { align-items: flex-start; }
  .step-counter { display: none; }
  .guided-footer-actions { flex-direction: column-reverse; }
  .guided-footer-actions .guided-button { width: 100%; }
}

@media (max-width: 540px) {
  .alpha-tag { display: none; }
  .reference-badge { display: none; }
  .video-footer { justify-content: flex-end; }
  .video-toggle { padding: 7px 10px; font-size: 11.5px; }
}
