.aside { grid-column: 3; }

/* Paso 2 */
.interpretation { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--hair); margin-bottom: 28px; }
.interpretation > strong { display: flex; align-items: center; gap: 10px; color: var(--strong); font-size: 14px; }
.interpretation > strong i { color: var(--amber-text); }
.context-summary { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.status-badge { display: inline-block; margin-top: 12px; padding: 6px 10px; border-radius: 8px; font: 600 10.5px/1.3 var(--mono); letter-spacing: .08em; color: var(--amber-text); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }

/* Vista previa (.preview) */
.aside { min-height: 0; height: 100%; animation: panel-in .5s var(--ease) .09s both; }
.aside-card { display: flex; flex-direction: column; height: 100%; max-height: none; border-radius: 26px; border: 1px solid var(--line-2); background: var(--glass); box-shadow: var(--lift); overflow: hidden; }
.stellar-view--overview { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.aside-body { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; }
.aside-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px; }
.aside-head strong { color: var(--strong); font-size: 15.5px; letter-spacing: -.02em; margin-right: auto; }
.aside .preview { padding: 4px 14px 16px; }
.aside .iso-plate { padding: 42px 6px 46px; border-radius: 20px; }
.aside .iso-fig,
.aside .iso-title { top: 18px; }
.aside .iso-fig { left: 18px; }
.aside .iso-title { right: 18px; }
.aside .iso-hint { bottom: 18px; left: 18px; }
.aside .iso-readout { bottom: 18px; right: 18px; max-width: 66%; }
.preview-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.preview-title { margin-top: 14px; padding: 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -.04em; color: var(--strong); }
.preview-sub { padding: 0 6px; font-size: 13.5px; line-height: 1.55; margin-top: 4px; }
.preview-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; margin-top: 12px; }
.preview-badges span { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--hair); border: 1px solid var(--line); color: var(--text); }
.aside-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 4px 14px 16px; }
.aside-stat { display: grid; gap: 4px; padding: 12px 8px; text-align: center; border-radius: 14px; border: 1px solid var(--line); background: var(--hair); }
.aside-stat strong { font-size: 22px; letter-spacing: -.05em; color: var(--strong); line-height: 1; font-variant-numeric: tabular-nums; }
.aside-stat span { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.aside-cost { flex: none; padding: 14px 20px 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.aside-cost .primary-value { font-size: 36px; line-height: 1; letter-spacing: -.06em; font-weight: 700; color: var(--strong); font-variant-numeric: tabular-nums; }
.aside-cost .monthly { font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.aside-cost .hint { margin: 0; font-size: 11.5px; }
.aside-cost .lines { display: grid; gap: 10px; font-size: 13.5px; }
.aside-cost .lines > div { display: flex; justify-content: space-between; gap: 12px; }
.aside-cost .lines strong { color: var(--strong); font-weight: 650; }
.aside-tip { display: flex; gap: 14px; margin: 0 14px 14px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--hair); font-size: 12.5px; line-height: 1.6; }
.aside-tip > i { color: var(--mint); margin-top: 3px; }
.aside-tip strong { display: block; color: var(--strong); margin-bottom: 2px; font-size: 13px; }

/* Ficha (inspector) */
.stellar-view--detail { display: grid; align-content: start; overflow: auto; max-height: 100%; scrollbar-width: thin; }
.detail-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px; }
.detail-close { display: none; }
.stellar-inspector { padding: 10px 24px 26px; display: grid; gap: 12px; }
.detail-context-label { font: 500 10px/1 var(--mono); letter-spacing: .14em; color: var(--muted); }
.stellar-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inspector-kicker { font: 600 11px/1 var(--mono); letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.stellar-view--detail #inspectorTitle { font-size: 26px; line-height: 1.12; letter-spacing: -.045em; }
.inspector-description { font-size: 14.5px; line-height: 1.7; }
.inspector-list,
.inspector-details { display: grid; gap: 10px; }
.inspect-list-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--field); color: var(--strong); font-weight: 650; font-size: 14px; transition: all .28s var(--ease); }
.inspect-list-item:hover { border-color: var(--sky); transform: translateX(3px); }
.inspect-list-item small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.inspect-list-item b { display: block; font-size: 14px; }
.inspect-list-item strong { font: 600 12px/1 var(--mono); color: var(--text); }
.inspect-list-item > i { font-size: 11px; color: var(--muted); }
.inspect-list-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-size: 15px; color: var(--kc); background: color-mix(in srgb, var(--kc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--kc) 30%, transparent); }
.inspect-facts { display: grid; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.inspect-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border-top: 1px solid var(--hair); font-size: 13px; }
.inspect-facts > div:first-child { border-top: 0; }
.inspect-facts span { color: var(--muted); flex: none; }
.inspect-facts b { text-align: right; color: var(--strong); font-weight: 650; }
.inspector-details h4 { font-size: 14px; margin-top: 6px; }
.inspector-details ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.inspect-quota { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 7%, transparent); font-size: 13px; }
.inspect-quota b { color: var(--amber-text); font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.inspect-quota span { color: var(--strong); font-weight: 650; }
.inspect-quota small { color: var(--muted); }
.inspector-caution { font-size: 12px; line-height: 1.6; color: var(--muted); }
.inspector-footer { margin-top: 6px; }

/* Diálogo de plantillas */
.nebula-dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: hidden; }
.nebula-dialog[open] { display: grid; grid-template-rows: auto 1fr auto; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 24px 26px 8px; }
.dialog-head h2 { font-size: 26px; margin-top: 8px; }
.dialog-body { overflow: auto; padding: 8px 26px 20px; display: grid; gap: 14px; }
.dialog-body h4 { font-size: 14px; margin-top: 6px; }
.dialog-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.dialog-body p { font-size: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px 22px; border-top: 1px solid var(--line); }

/* Vista previa en pantallas chicas: hoja inferior (ui.bottom-sheet). El componente pone .is-sheet y se ocupa del fondo, el asa y el foco. */
.mobile-preview-dock { display: none; }
.aside.is-sheet { animation: none; height: min(88dvh, 780px); width: min(100%, 760px); margin-inline: auto; overflow: hidden; display: flex; flex-direction: column; }
.aside.is-sheet .sheet-handle { position: relative; flex: none; }
.aside.is-sheet .aside-card { flex: 1 1 auto; min-height: 0; height: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.aside.is-sheet .stellar-view--detail { max-height: none; height: 100%; }
@media (max-width: 1180px), (max-height: 640px) {
  .detail-close { display: inline-grid; }
  .mobile-preview-dock { display: flex; align-items: center; gap: 14px; position: fixed; z-index: 77; left: 12px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 62px); min-height: 48px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--btn-bg); color: var(--btn-ink); font-weight: 700; font-size: 13px; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .75), 0 0 0 1px var(--line-2); }
  .mobile-preview-dock span { display: inline-flex; align-items: center; gap: 9px; }
  .dock-price { font-family: var(--mono); font-size: 13px; }
}
@media (min-width: 1181px) and (max-height: 800px) {
  .aside-tip { display: none; }
}
.status-badge { margin-top: 8px; }
@media (min-width: 1181px) and (max-height: 820px) {
  .interpretation { padding: 12px 14px; margin-bottom: 14px; }
  .interpretation .pillbar { margin: 8px 0 0; }
}
@media (max-width: 760px) {
  .mobile-preview-dock { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 4px); left: 12px; right: 12px; justify-content: space-between; }
}
.panel .interpretation { margin-bottom: 0; }
.panel .interpretation { padding: 12px 16px; }
.panel .interpretation .pillbar { margin: 8px 0 0; }

/* Pantallas chicas: el pie de la etapa queda por encima de la barra «Ver mi sistema», nunca debajo */
@media (max-width: 1180px), (max-height: 640px) {
  .mobile-preview-dock { left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); justify-content: space-between; }
}
