/* Tema claro fijo: en celulares con modo oscuro la app se veía negra.
   El fondo es beige madera en todos los teléfonos. */
:root {
  color-scheme: light;
  --fondo: #efe2cc;
  --tarjeta: #ffffff;
  --texto: #1f1a14;
  --suave: #5e5145;
  --petroleo: #0e6474;
  --petroleo-osc: #093e4a;
  --ambar: #f5a623;
  --borde: #e2d2b8;
  --sombra: 0 1px 2px rgba(90, 60, 30, .10), 0 6px 16px rgba(90, 60, 30, .10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* La app ocupa exactamente el alto de la pantalla: el inicio nunca obliga a desplazarse */
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  /* beige con una veta suave de madera */
  background-color: var(--fondo);
  background-image:
    repeating-linear-gradient(92deg, rgba(150, 100, 50, .045) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(88deg, rgba(150, 100, 50, .035) 0 1px, transparent 1px 23px);
}

.barra {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  background: linear-gradient(135deg, #13798b, var(--petroleo-osc));
  color: #fff;
  flex: none;
  box-shadow: 0 2px 10px rgba(9, 62, 74, .25);
}
.logo { border-radius: 10px; display: block; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.barra h1 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: .2px; }
.barra .sub { margin: 2px 0 0; font-size: .82rem; color: #ffd27a; }
.barra .marca { flex: 1; text-align: center; padding-right: 52px; }   /* 52px = logo + espacio: así queda centrado en toda la barra */
.barra .tres-d { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.1; letter-spacing: .08em; }

main {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column;
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

.saludo { margin: 0 2px 10px; flex: none; }
.saludo h2 { margin: 0 0 2px; font-size: 1.25rem; }
.saludo p { margin: 0; color: var(--suave); font-size: .9rem; }

.mosaico {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* 4 filas (closet ancho + 3 de a dos) que se reparten el alto que quede libre */
  grid-template-rows: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 1; min-height: 440px; /* solo en pantallas muy bajitas aparece el desplazamiento */
}
@media (min-width: 560px) {
  .mosaico { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
}

/* Tarjeta: la ilustración llena el recuadro anclada abajo (el mueble y el piso siempre se ven;
   si sobra, se recorta solo pared). Cada trabajo trae su color en --c. */
.opcion {
  position: relative;
  display: flex; align-items: flex-start;
  min-height: 0;
  padding: 8px;
  background: var(--tarjeta) center bottom / cover no-repeat;
  color: var(--texto);
  border: 0; border-bottom: 5px solid var(--c); border-radius: 16px;
  box-shadow: var(--sombra);
  font: inherit; text-align: left; cursor: pointer; overflow: hidden;
  transition: transform .12s ease;
}
.opcion.ancha { grid-column: 1 / -1; }
@media (min-width: 560px) { .opcion.ancha { grid-column: span 2; } }
.opcion:active { transform: scale(.97); }
.opcion:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }

/* Rótulo sobre la ilustración: fondo blanco translúcido para que la letra siempre se lea */
.rotulo {
  display: block; max-width: 100%;
  padding: 5px 10px 6px; border-radius: 10px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  border-left: 4px solid var(--c);
}
.opcion.ancha .rotulo { max-width: 46%; }
.opcion strong { display: block; font-size: 1rem; line-height: 1.2; }
.opcion small { display: block; color: var(--suave); font-size: .74rem; line-height: 1.25; margin-top: 2px; }

/* Pantalla de un tipo de trabajo */
.volver {
  background: none; border: 0; color: var(--petroleo); font: inherit; font-weight: 600;
  padding: 6px 0; margin-bottom: 8px; cursor: pointer; align-self: flex-start;
}
.portada {
  aspect-ratio: 2 / 1; border-radius: 16px; margin-bottom: 14px;
  background: center / cover no-repeat; box-shadow: var(--sombra);
  border-bottom: 5px solid var(--c);
}
.cabeza { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.chip {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 16%, #fff);
  color: var(--c);
}
.chip svg { width: 38px; height: 38px; }
.cabeza h2 { margin: 0; font-size: 1.4rem; }
.cabeza p { margin: 2px 0 0; color: var(--suave); }

.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pasos li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 14px;
}
.pasos .n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--c); color: #fff;
}
.pasos b { display: block; }
.pasos span { color: var(--suave); font-size: .9rem; }
.pronto {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(245, 166, 35, .18); color: var(--texto); font-size: .9rem;
}

/* ---------- Paso 1 del Closet en la pantalla del trabajo ---------- */
.pasos li.activo { padding: 0; border: 2px solid var(--c); }
.paso-boton {
  display: flex; gap: 12px; align-items: center; width: 100%;
  background: none; border: 0; padding: 14px; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.paso-boton .flecha { margin-left: auto; font-size: 1.8rem; color: var(--c); line-height: 1; }
.pasos li.hecho { border: 2px solid #2e9e5b; }
.pasos li.hecho .n { background: #2e9e5b; }
.paso-cuerpo { display: flex; gap: 12px; align-items: center; }
.miniatura { width: 72px; height: 72px; flex: none; display: block; background: #f7efe2; border-radius: 10px; padding: 4px; }
.miniatura svg { width: 100%; height: 100%; display: block; }
.acciones { display: flex !important; gap: 16px; margin-top: 6px; }
.enlace { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; color: var(--petroleo); cursor: pointer; }

/* ---------- Pantallas que ocupan todo el alto (modelos, 3D) ---------- */
.pantalla { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.titulo-pantalla { margin: 0 2px 10px; flex: none; }
.titulo-pantalla h2 { margin: 0; font-size: 1.25rem; }
.titulo-pantalla p { margin: 2px 0 0; color: var(--suave); font-size: .88rem; }

.modelos {
  flex: 1; min-height: 360px;
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.modelo {
  position: relative; min-height: 0;
  display: flex; flex-direction: column; align-items: stretch;
  padding: 8px 8px 10px; gap: 2px;
  background: var(--tarjeta); color: var(--texto);
  border: 3px solid transparent; border-radius: 16px; box-shadow: var(--sombra);
  font: inherit; text-align: left; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.modelo:active { transform: scale(.97); }
.modelo .dibujo { flex: 1; min-height: 0; display: block; background: #f7efe2; border-radius: 10px; padding: 6px; }
.modelo .dibujo svg { width: 100%; height: 100%; display: block; }
.modelo strong { font-size: .92rem; line-height: 1.15; margin-top: 6px; }
.modelo small { color: var(--suave); font-size: .72rem; line-height: 1.2; }
.modelo .check {
  position: absolute; top: -8px; right: -8px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #2e9e5b; color: #fff; font-weight: 800; font-size: .95rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transform: scale(0); transition: transform .15s ease;
}
.modelo[aria-pressed="true"] { border-color: #2e9e5b; background: #f1fbf4; }
.modelo[aria-pressed="true"] .check { transform: scale(1); }
.modelo[aria-pressed="true"] strong { color: #1d7a43; }

.propio {
  flex: none; margin-top: 10px; padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, .55); color: var(--suave);
  border: 2px dashed #c9b394; border-radius: 14px; font: inherit; font-weight: 600;
}
.propio small { font-weight: 500; font-size: .75rem; background: #fff; padding: 2px 8px; border-radius: 999px; }

.barra-accion {
  flex: none; margin-top: 10px; min-height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 14px;
  background: var(--tarjeta); box-shadow: var(--sombra); font-size: .85rem;
}
.barra-accion b { font-size: .98rem; }
.barra-accion .apagado { color: var(--suave); }

.primario {
  background: #2e9e5b; color: #fff; border: 0; border-radius: 12px;
  padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(46, 158, 91, .35);
}
.primario:active { transform: scale(.97); }
.primario.ancho { width: 100%; flex: none; padding: 14px; font-size: 1.02rem; }
.secundario {
  flex: 1; background: var(--tarjeta); color: var(--petroleo);
  border: 2px solid var(--petroleo); border-radius: 12px;
  padding: 10px; font: inherit; font-weight: 700; cursor: pointer;
}

/* ---------- Visor 3D ---------- */
.fila-titulo { display: flex; align-items: center; gap: 12px; flex: none; }
.fila-titulo .volver { margin: 0; }
.fila-titulo b { font-size: 1.05rem; }
.visor {
  position: relative; flex: 1; min-height: 260px; margin: 6px 0 10px;
  border-radius: 16px; overflow: hidden; background: #efe2cc; box-shadow: var(--sombra);
  touch-action: none;
}
.visor canvas { display: block; }
.visor .cargando { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--suave); }
.visor .pista {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); margin: 0;
  background: rgba(31, 26, 20, .7); color: #fff; font-size: .72rem; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; pointer-events: none;
}
.controles3d { display: flex; gap: 10px; flex: none; }
.medidas-ref { flex: none; margin: 8px 2px; font-size: .78rem; color: var(--suave); text-align: center; }
.version { text-align: center; font-size: .7rem; color: var(--suave); opacity: .7; margin: 10px 0 0; }

/* ---------- Diseño 3D: botones sobre el visor, pestañas y paneles ---------- */
.visor { min-height: 200px; margin-bottom: 8px; }
.medidas-chip {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  background: rgba(255, 255, 255, .88); padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; color: var(--texto);
}
.flotantes { position: absolute; top: 8px; right: 8px; z-index: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.flotantes button {
  background: rgba(255, 255, 255, .92); color: var(--petroleo); border: 0; border-radius: 999px;
  padding: 6px 11px; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.pestanas { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.pestanas button {
  background: rgba(255, 255, 255, .6); border: 0; border-radius: 10px; padding: 8px 4px;
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--suave); cursor: pointer;
}
.pestanas button[aria-selected="true"] { background: var(--petroleo); color: #fff; }
.panel {
  flex: none; height: 158px; overflow-y: auto; margin-bottom: 8px;
  background: var(--tarjeta); border-radius: 14px; padding: 8px 10px; box-shadow: var(--sombra);
}
.fila-ropa {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 8px; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--borde);
}
.fila-ropa .donde b { display: block; font-size: .84rem; }
.fila-ropa .donde small { display: block; font-size: .72rem; color: var(--suave); }
.fila-ropa.mal .donde small { color: #c62828; font-weight: 700; }
.fila-ropa select {
  width: 100%; min-width: 0; font: inherit; font-size: .78rem; padding: 6px 4px;
  border: 1px solid var(--borde); border-radius: 8px; background: #fff; color: var(--texto);
}
.estado { color: #1d7a43; font-weight: 800; font-size: .8rem; white-space: nowrap; }
.ajustar {
  background: #c62828; color: #fff; border: 0; border-radius: 8px; padding: 7px 10px;
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.nota { margin: 6px 0 0; font-size: .72rem; color: var(--suave); }
.aviso { margin: 0 0 4px; padding: 5px 8px; border-radius: 8px; background: #e7f6ec; color: #1d7a43; font-size: .76rem; font-weight: 600; }

.opciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 100%; }
.opcion-puerta {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: #f7f3ed; border: 2px solid transparent; border-radius: 12px; padding: 6px 4px;
  font: inherit; color: var(--texto); cursor: pointer; text-align: center;
}
.opcion-puerta svg { width: 44px; height: 36px; color: var(--petroleo); }
.opcion-puerta b { font-size: .84rem; }
.opcion-puerta small { font-size: .68rem; color: var(--suave); line-height: 1.2; }
.opcion-puerta[aria-pressed="true"] { border-color: #2e9e5b; background: #f1fbf4; }

.colores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 100%; align-items: center; }
.color { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; font: inherit; cursor: pointer; color: var(--texto); }
.muestra {
  width: 58px; height: 58px; border-radius: 50%;
  background:
    repeating-linear-gradient(100deg, transparent 0 5px, color-mix(in srgb, var(--veta) 25%, transparent) 5px 6px),
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--base) 70%, #fff), var(--base) 60%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .15);
  transition: transform .12s ease;
}
.color small { font-size: .74rem; font-weight: 600; }
.color[aria-pressed="true"] .muestra { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #2e9e5b; transform: scale(1.04); }
.color[aria-pressed="true"] small { color: #1d7a43; font-weight: 800; }

/* ---------- Plano con medidas ---------- */
.plano {
  flex: 1; min-height: 0; margin: 6px 0 8px; padding: 8px;
  background: #fff; border-radius: 16px; box-shadow: var(--sombra);
}
.plano svg { width: 100%; height: 100%; display: block; }
.leyenda { flex: none; margin: 0 2px 8px; font-size: .78rem; color: var(--suave); line-height: 1.4; }
.leyenda .ok { color: #1d7a43; font-weight: 700; }
.leyenda .mal { color: #c62828; font-weight: 700; }

/* ---------- Materiales ---------- */
.pasos li.bloqueado { opacity: .55; }
.preguntas { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.pregunta { background: var(--tarjeta); border-radius: 14px; padding: 8px 10px; box-shadow: var(--sombra); }
.pregunta h3 { margin: 0 0 6px; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-op {
  position: relative; flex: 1 1 0; min-width: 70px;
  padding: 8px 6px; border-radius: 10px; border: 2px solid var(--borde);
  background: #fbf8f3; color: var(--texto); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
}
.chip-op i { font-style: normal; color: var(--ambar); margin-left: 3px; }
.chip-op[aria-checked="true"] { background: var(--petroleo); border-color: var(--petroleo); color: #fff; }
.chip-op[aria-checked="true"] i { color: #ffd27a; }
.explica { margin: 5px 0 0; font-size: .76rem; line-height: 1.3; color: var(--suave); }
.explica b { color: #b27400; font-weight: 700; }
.colores.mini { height: auto; }
.colores.mini .muestra { width: 46px; height: 46px; }

/* ---------- Despiece ---------- */
.resumen-des { flex: none; background: var(--tarjeta); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sombra); margin: 4px 0 8px; }
.resumen-des .linea { margin: 0 0 8px; font-size: .84rem; color: var(--suave); }
.resumen-des .linea b { color: var(--texto); }
.medidas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 6px; align-items: end; }
.medidas label { display: flex; flex-direction: column; font-size: .7rem; font-weight: 700; color: var(--suave); gap: 2px; }
.medidas input {
  width: 100%; min-width: 0; font: inherit; font-size: .95rem; font-weight: 700; padding: 7px 6px;
  border: 1.5px solid var(--borde); border-radius: 8px; background: #fbf8f3; color: var(--texto);
}
.recalcular { background: var(--petroleo); color: #fff; border: 0; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.nota-medidas { margin: 4px 0 0; font-size: .7rem; color: var(--suave); }
.alerta { margin: 6px 0 0; padding: 6px 8px; border-radius: 8px; background: #fdecea; color: #a02622; font-size: .76rem; font-weight: 600; }
.alerta a { color: inherit; }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; text-align: center; }
.cifras div { background: #f4efe7; border-radius: 10px; padding: 6px 4px; }
.cifras b { display: block; font-size: 1.15rem; color: var(--petroleo); }
.cifras small { font-size: .7rem; color: var(--suave); }
.lista-des { flex: 1; min-height: 0; overflow-y: auto; background: var(--tarjeta); border-radius: 14px; padding: 4px 10px 8px; box-shadow: var(--sombra); margin-bottom: 8px; }
.lista-des h4 { margin: 10px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--petroleo); }
.fila-pieza { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--borde); }
.fila-pieza .cant { font-weight: 800; color: var(--petroleo); font-size: .92rem; }
.fila-pieza .que b { display: block; font-size: .86rem; }
.fila-pieza small { display: block; font-size: .7rem; color: var(--suave); line-height: 1.25; }
.fila-pieza .dims { text-align: right; }
.fila-pieza .dims b { font-size: .88rem; font-variant-numeric: tabular-nums; }
.hoja-fondo { position: fixed; inset: 0; z-index: 20; background: rgba(20, 15, 10, .45); display: flex; align-items: flex-end; }
.hoja-fondo[hidden] { display: none; }
.hoja {
  width: 100%; max-width: 720px; margin: 0 auto; background: var(--fondo); border-radius: 18px 18px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px;
  max-height: 90dvh; overflow-y: auto;
}
.hoja h3 { margin: 0; font-size: 1.05rem; }
.hoja .nota { margin: 0; }
.opcion-envio {
  text-align: left; background: var(--tarjeta); border: 2px solid var(--borde); border-radius: 12px; padding: 10px 12px;
  font: inherit; color: var(--texto); cursor: pointer;
}
.opcion-envio b { display: block; font-size: .92rem; }
.opcion-envio small { display: block; font-size: .74rem; color: var(--suave); margin-top: 2px; }
.opcion-envio:active { border-color: var(--petroleo); }

/* ---------- Asistente de voz ---------- */
.pasos li.voz { border-color: #d6408e; background: linear-gradient(135deg, #fff, #fdf0f6); }
.pasos li.voz .n { background: linear-gradient(135deg, #14b4c8, #d6408e); font-size: .95rem; }
.etiqueta-ensayo { margin-left: auto; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #fff3d6; color: #8a5a00; }
.escena-orbe { flex: 1; min-height: 170px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; cursor: pointer; -webkit-user-select: none; user-select: none; }
.escena-orbe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.estado-voz { position: relative; margin: 0 0 4px; font-size: .86rem; font-weight: 700; color: var(--suave); background: rgba(255, 255, 255, .7); padding: 3px 12px; border-radius: 999px; }
.conversacion { flex: none; max-height: 30%; min-height: 64px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; }
.burbuja { margin: 0; max-width: 86%; padding: 8px 11px; border-radius: 14px; font-size: .86rem; line-height: 1.35; box-shadow: var(--sombra); }
.burbuja.ella { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.burbuja.tu { align-self: flex-end; background: var(--petroleo); color: #fff; border-bottom-right-radius: 4px; }
.burbuja.parcial { opacity: .7; font-style: italic; }
.cambios { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; min-height: 0; }
.cambios:empty { display: none; }
.cambio { flex: none; font-size: .72rem; font-weight: 700; color: #1d7a43; background: #e7f6ec; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.escribir { flex: none; display: flex; gap: 6px; margin: 4px 0 6px; }
.escribir input { flex: 1; min-width: 0; font: inherit; font-size: .9rem; padding: 9px 12px; border-radius: 999px; border: 1.5px solid var(--borde); background: #fff; }
.escribir button { width: 40px; border: 0; border-radius: 50%; background: var(--petroleo); color: #fff; font-size: 1rem; cursor: pointer; }
.controles-voz { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.mic {
  width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.9rem;
  background: linear-gradient(135deg, #14b4c8, #7e57c2 55%, #d6408e); color: #fff;
  box-shadow: 0 6px 18px rgba(126, 87, 194, .45);
}
.mic.activo { background: linear-gradient(135deg, #e0474c, #d6408e); animation: latir 1.2s ease-in-out infinite; }
@keyframes latir { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.08); } 30% { transform: scale(1); } 45% { transform: scale(1.05); } }
.mini-diseno, .ir-despiece { justify-self: start; width: 56px; height: 56px; border-radius: 12px; border: 0; background: #fff; box-shadow: var(--sombra); padding: 4px; cursor: pointer; font-size: 1.5rem; }
.ir-despiece { justify-self: end; }
.mini-diseno svg { width: 100%; height: 100%; display: block; }

/* ---------- Pedido de diseño ---------- */
/* 5 tarjetas iguales, una debajo de otra: en dos columnas siempre sobraría una. */
.mosaico.cinco { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(5, minmax(0, 1fr)); min-height: 420px; }
.mosaico.cinco .opcion { background-position: center; }
.pedido { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ped-titulo { margin: 0 0 8px; font-size: 1.25rem; color: var(--c); flex: none; }
.ped-pasos { grid-template-columns: repeat(4, 1fr); margin-bottom: 8px; }
.ped-ayuda { margin: -3px 0 6px; }
.ped-campo {
  width: 100%; padding: 10px; border: 2px solid var(--borde); border-radius: 10px;
  background: #fbf8f3; color: var(--texto); font: inherit; font-size: 16px;   /* con 16px el iPhone no acerca la pantalla */
}
.ped-campo:focus { outline: none; border-color: var(--petroleo); background: #fff; }
.ped-campo:disabled { opacity: .5; }
.ped-fila { display: flex; align-items: flex-start; gap: 8px; }
.ped-fila > div, .ped-fila > .ped-campo { flex: 1; min-width: 0; }
.ped-fila .nose { flex: none; min-width: 64px; padding: 11px 6px; }
.ped-caja { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ped-caja .ped-campo { padding: 10px 6px; }
.lee { display: block; min-height: 1.1em; margin-top: 2px; font-size: .76rem; font-weight: 700; color: var(--petroleo); }
.ped-mas {
  flex: none; padding: 12px; border: 2px dashed var(--borde); border-radius: 12px;
  background: transparent; color: var(--petroleo); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.ped-fotos-botones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ped-foto-boton {
  position: relative; overflow: hidden; display: block; padding: 14px 6px; text-align: center;
  border-radius: 12px; background: var(--petroleo); color: #fff; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.ped-foto-boton input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ped-fotos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.ped-fotos figure { position: relative; margin: 0; aspect-ratio: 1; }
.ped-fotos img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.ped-fotos button {
  position: absolute; top: 2px; right: 2px; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(31, 26, 20, .75); color: #fff; font-size: .9rem; cursor: pointer;
}
.ped-resumen { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: .86rem; line-height: 1.4; }
.pedido .aviso { flex: none; margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: #fff3d6; color: #7a5200; font-size: .84rem; font-weight: 600; }
.ped-envio ol { list-style: none; margin: 0; padding: 0; }
.ped-envio li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; font-size: .92rem; font-weight: 700; color: var(--suave); }
.ped-envio li.hecho { color: #1d7a43; }
.ped-envio .enlace { font-size: .8rem; }
