/* Nebulosa · creador (formulario + vista previa en tiempo real) */
.hide-sm { display: inline; }
.topbar .header-actions { margin-left: 0; }
.uppercase { font: 600 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.center { text-align: center; }

/* ---------- Estructura: riel | formulario | vista previa (pantalla completa en computadoras) ---------- */
.creator .topbar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: min(1500px, calc(100% - 32px)); height: 56px; margin: 0; padding: 0 10px 0 8px; }
.brand--mark .brandmark { width: 40px; height: 40px; transition: transform .4s var(--ease); }
.brand--mark:hover .brandmark { transform: rotate(-6deg) scale(1.06); }
.topbar-title { margin: 0 auto 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.creator .header-actions { margin-left: auto; gap: 6px; }
.creator .header-actions .icon-btn { width: 38px; height: 38px; font-size: 13px; }
.shell { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(380px, .74fr); gap: 16px; height: 100dvh; padding: 76px 16px 16px; max-width: 1560px; margin-inline: auto; }
.workspace { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-radius: 26px; border: 1px solid var(--line-2); background: var(--glass); box-shadow: var(--lift); overflow: hidden; grid-column: 2; }
.stage-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.stage-strip p { margin: 0; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 12.5px; line-height: 1.5; color: var(--text); }
.stage-strip em { display: block; font: 600 9px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.stage-strip .y { border-style: solid; border-color: color-mix(in srgb, var(--sky) 38%, transparent); background: color-mix(in srgb, var(--sky) 7%, transparent); }
.stage-strip .y em { color: var(--accent); }
.creator-head { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px 28px 14px; }
.creator-head h1 { font-size: clamp(22px, min(2.3vw, 3.6vh), 32px); line-height: 1.05; letter-spacing: -.05em; margin-top: 8px; }
.creator-head h1 em { font-style: normal; background: linear-gradient(100deg, var(--sky), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.creator-head p { font-size: 13px; line-height: 1.55; max-width: 360px; text-align: right; }

/* Pasos horizontales (se usan en pantallas chicas, donde no hay riel) */
.stepper { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--hair); flex: none; }
.step-tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-weight: 650; font-size: 13px; transition: all .28s var(--ease); }
.step-tab:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 26%; bottom: 26%; width: 1px; background: var(--line); }
.step-tab .num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; font: 600 11px/1 var(--mono); border: 1px solid var(--line-2); transition: all .28s var(--ease); }
.step-tab:hover { color: var(--strong); }
.step-tab.active { color: var(--strong); background: color-mix(in srgb, var(--sky) 9%, transparent); }
.step-tab.active .num { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
.step-tab.active::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--sky); box-shadow: 0 0 14px var(--sky); }
.step-tab.complete .num { color: var(--live); border-color: color-mix(in srgb, var(--mint) 45%, transparent); background: color-mix(in srgb, var(--mint) 10%, transparent); }

/* Paneles: cabecera fija, cuerpo con su propio desplazamiento y pie siempre a la vista */
.panel { display: none; flex: 1; min-height: 0; flex-direction: column; border-top: 1px solid var(--line); }
.panel.active { display: flex; animation: panel-in .5s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.panel-head { flex: none; padding: 16px 28px 6px; }
.panel h2 { font-size: clamp(20px, min(2.2vw, 3.8vh), 28px); line-height: 1.1; letter-spacing: -.04em; margin-bottom: 6px; }
.lead { font-size: 13.5px; line-height: 1.6; margin: 0; max-width: 720px; }
.panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 28px 18px; scrollbar-width: thin; }
.panel-footer { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px 14px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 60%, transparent); }
.panel-footer .hint { margin: 0; max-width: 340px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-block { width: 100%; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 8px; position: sticky; top: -10px; z-index: 3; padding: 8px 0 6px; background: color-mix(in srgb, var(--page) 70%, transparent); }
.toolbar .tabs { margin: 0; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 16px; background: var(--hair); border: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { padding: 9px 15px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font-size: 13.5px; font-weight: 650; transition: all .28s var(--ease); }
.tabs button:hover { color: var(--strong); }
.tabs button.active { background: var(--btn-bg); color: var(--btn-ink); }
.info { display: flex; gap: 14px; margin-top: 24px; padding: 16px 18px; border-radius: 16px; background: var(--hair); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.info > i { margin-top: 3px; color: var(--accent); }
.info strong { color: var(--strong); }
.note-row { margin: 12px 4px 0; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips span { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--sky) 11%, transparent); border: 1px solid color-mix(in srgb, var(--sky) 26%, transparent); color: var(--strong); }
.mobile-only { display: none; }
@media (max-width: 1180px), (max-height: 640px) {
  .creator { overflow: auto; }
  .shell { display: block; height: auto; padding: 84px 12px 16px; }
  .workspace { overflow: visible; }
  .stepper { display: grid; }
  .panel.active { display: block; }
  .panel-body { overflow: visible; padding: 12px 18px 12px; }
  .panel-head { padding: 14px 18px 4px; }
  .creator-head { padding: 14px 18px 8px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .creator-head p { text-align: left; max-width: none; }
  .panel-footer { position: sticky; bottom: 0; z-index: 20; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 88%, transparent); }
  .toolbar { top: 0; }
  .mobile-only { display: inline-grid; }
  .footer { padding-bottom: 130px; }
  .topbar .header-actions { margin-left: auto; }
  .toast { bottom: 140px; }
}
@media (min-width: 1181px) and (min-height: 641px) {
  .creator .footer { display: none; }
  .creator { overflow: hidden; }
}
@media (max-width: 760px) {
  .stepper .slabel { font-size: 11px; }
  .step-tab { flex-direction: column; gap: 4px; min-height: 60px; }
  .panel-footer .btn { flex: 1 1 auto; }
  .hide-sm { display: none; }
  .creator-head h1 { font-size: 22px; }
}
@media (max-width: 380px) {
  .stepper .slabel { font-size: 0; }
  .stepper .step-tab:nth-child(1) .slabel::after { content: "Negocio"; font-size: 11px; }
  .stepper .step-tab:nth-child(2) .slabel::after { content: "Piezas"; font-size: 11px; }
  .stepper .step-tab:nth-child(3) .slabel::after { content: "Extras"; font-size: 11px; }
  .stepper .step-tab:nth-child(4) .slabel::after { content: "Precio"; font-size: 11px; }
}
@media (min-width: 1181px) and (max-width: 1360px) {
  .shell { grid-template-columns: 84px minmax(0, 1fr) minmax(340px, .8fr); gap: 12px; padding-inline: 12px; }
  .panel-body,
  .panel-head,
  .panel-footer,
  .creator-head { padding-inline: 20px; }
}
@media (min-width: 1181px) and (max-height: 800px) {
  .creator-head p,
  .panel .lead { display: none; }
}
@media print {
  @page { size: A4; margin: 8mm; }
  html,
  body { background: #fff !important; margin: 0 !important; padding: 0 !important; width: auto !important; height: auto !important; font-family: Arial, Helvetica, sans-serif !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body::before,
  body::after { display: none !important; }
  body > *:not(#printSheet) { display: none !important; }
}
@media (min-width: 1181px) and (max-height: 820px) {
  .panel-head { padding-top: 10px; }
  .creator-head { padding-block: 10px 8px; }
}
@media (max-width: 1180px), (max-height: 640px) {
  .shell { padding-top: 76px; }
}
@media (max-width: 760px) {
  .stage-strip { grid-template-columns: minmax(0, 1fr); }
  .stage-strip p:first-child { display: none; }
  .topbar-title { display: none; }
}
@media (min-width: 1181px) and (max-height: 800px) {
  .stage-strip p:first-child { display: none; }
  .stage-strip { grid-template-columns: minmax(0, 1fr); }
}

/* Paso 4: acciones compactas y accesibles */
#step-3 .panel-footer { align-items: center; }
#step-3 .action-row { margin-left: auto; }
@media (max-width: 760px) {
  #step-3 .panel-footer { flex-direction: column; align-items: stretch; }
  #step-3 .action-row { margin-left: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
  #step-3 .action-row .btn { padding: 0 6px; min-width: 0; }
  .topbar .header-actions .btn-ghost { padding: 0 10px; }
  .topbar { gap: 6px; padding: 0 8px 0 12px; }
  .brand-words { display: none; }
  .panel-footer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .toast { bottom: 80px; }
  .footer { padding-bottom: 96px; }
}
.panel:not(.is-first-sub) .stage-strip { display: none; }
.panel-footer .btn { max-width: 100%; white-space: normal; text-align: left; }

/* Más aire para lo que importa: cabecera compacta; la lista ocupa el resto */
.creator-head { padding: 12px 28px 8px; }
.creator-head p { display: none; }
.creator-head h1 { font-size: clamp(20px, min(2vw, 3.2vh), 28px); margin-top: 6px; }
.panel-head { padding: 10px 28px 2px; }
.panel h2 { font-size: clamp(18px, min(1.9vw, 3.2vh), 24px); margin-bottom: 4px; }
.stage-strip p { padding: 6px 12px; font-size: 12px; }
@media (max-height: 760px) {
  .stage-strip { display: none !important; }
  .creator-head { display: none; }
}
@media (max-width: 1180px), (max-height: 640px) {
  .panel-footer { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 60px); padding-bottom: 10px; background: var(--card); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 30px -18px rgba(0, 0, 0, .7); }
  .shell { padding-bottom: 150px; }
  .toast { bottom: 150px; }
}
