/* Miniescudo: el mismo aire que la portada (claro; titulares y botones en Bricolage Grotesque, como pidió Dani el 14-oct). El lima de las bobinas sobre claro no se lee como
   texto: solo rellena. El 3D, en un campo de fútbol verde. */
:root {
  --fondo: #f4efe6; --papel: #fffdf8; --tinta: #1b1b1d; --suave: #5f5a52; --linea: #e3dccf; --linea-2: #cfc5b3;
  --lima: #dcf414; --rojo: #d2231f; --azul: #1739b8; --verde: #0f8a45; --campo: #12803f;
  --ok: #0f8a45; --mal: #c0271f; --ojo: #b26a00;
  --radio: 14px; --barra-alto: 76px; --panel-ancho: 420px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fondo); color: var(--tinta); font: 15px/1.45 Barlow, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
a { color: var(--azul); }
[hidden] { display: none !important; }   /* .chips, .casilla… llevan display propio: sin esto, «hidden» no ocultaba */

.cab { position: fixed; inset: 0 auto auto 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 14px 20px; pointer-events: none; }
.marca { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #fff;
  font: 800 24px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.marca .verde { color: var(--lima); }
.puntos { display: inline-grid; grid-template-columns: repeat(2, 8px); gap: 3px; }
.puntos i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.lema { color: rgba(255,255,255,.85); font: 600 14px 'Bricolage Grotesque', sans-serif; }

.disposicion { display: flex; height: calc(100dvh - var(--barra-alto)); }

/* ---------- El escenario: un campo de fútbol ---------- */
.escenario { position: relative; flex: 1; min-width: 0; overflow: hidden; background:
  radial-gradient(circle at 50% 50%, transparent 0 17%, rgba(255,255,255,.22) 17% calc(17% + 2px), transparent calc(17% + 2px)),
  linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.22) calc(50% - 1px), rgba(255,255,255,.22) calc(50% + 1px), transparent calc(50% + 1px)),
  repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 10%, transparent 10% 20%),
  radial-gradient(ellipse 70% 70% at 50% 45%, #18a24f, var(--campo) 60%, #0b6531); }
#lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.cargando { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 600 18px 'Bricolage Grotesque', sans-serif; letter-spacing: .04em; background: rgba(11,101,49,.6); transition: opacity .3s; }
.cargando.listo { opacity: 0; pointer-events: none; }
.ejemplo { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.92);
  font: 600 13px/1 'Bricolage Grotesque', sans-serif; white-space: nowrap; }
.ejemplo[hidden] { display: none; }
.medida { position: absolute; left: 16px; bottom: 14px; color: rgba(255,255,255,.9); font: 600 14px 'Bricolage Grotesque', sans-serif; letter-spacing: .04em; }
.botones-escena { position: absolute; right: 12px; top: 12px; display: flex; gap: 8px; }
.botones-escena button, .ver-nombre button { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 0; background: rgba(255,255,255,.94); font: 700 15px 'Bricolage Grotesque', sans-serif; letter-spacing: .03em; }
.ver-nombre { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 99px; background: rgba(0,0,0,.35); color: #fff; }
.ver-nombre[hidden] { display: none; }
.ver-nombre button { min-width: 40px; padding: 0; font-size: 22px; line-height: 1; }
.ver-nombre span { min-width: 90px; text-align: center; font: 700 15px 'Bricolage Grotesque', sans-serif; letter-spacing: .04em; }

/* ---------- El panel ---------- */
.panel { width: var(--panel-ancho); flex: none; overflow-y: auto; background: var(--fondo); border-left: 1.5px solid var(--linea); padding: 14px 18px 30px; scroll-behavior: smooth; }
.bloque { background: var(--papel); border: 1.5px solid var(--linea); border-radius: var(--radio); padding: 16px; margin-bottom: 12px; }
.bloque h2 { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; font: 800 21px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; }
.bloque h2 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center; font: 800 15px 'Bricolage Grotesque', sans-serif; }
.etiqueta-campo { display: block; margin: 12px 0 6px; font: 700 13px 'Bricolage Grotesque', sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--suave); }
.etiqueta-campo small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ayuda, .nota { color: var(--suave); font-size: 13.5px; margin: 6px 0 0; }

.subir { display: grid; gap: 2px; padding: 14px 16px; border: 2px dashed var(--linea-2); border-radius: 12px; cursor: pointer; background: #fbf8f1; transition: border-color .2s, background .2s; }
.subir:hover, .subir.encima { border-color: var(--verde); background: #f1f8f2; }
.subir b { font: 800 18px 'Bricolage Grotesque', sans-serif; }
.subir span { color: var(--suave); font-size: 14px; }
.estado { margin: 8px 0 0; font-size: 14px; color: var(--suave); min-height: 0; }
.estado.mal { color: var(--mal); font-weight: 600; }
.estado:empty { display: none; }
.logo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; margin-top: 12px; }
.logo-fila[hidden] { display: none; }
.miniatura { display: grid; justify-items: center; gap: 4px; padding: 8px; border-radius: 10px; background: repeating-conic-gradient(#eee8dc 0 25%, #f8f4ec 0 50%) 0 0 / 14px 14px; }
.miniatura canvas { image-rendering: pixelated; max-width: 100%; max-height: 120px; }
#logoOriginal { image-rendering: auto; }
.mapa { display: flex; flex-wrap: wrap; gap: 8px; }
.mapa-color { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 5px; border-radius: 99px; border: 1.5px solid var(--linea); background: #fff; font: 600 14px Barlow, sans-serif; }
.mapa-color i { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); }
.mapa-color.sel { border-color: var(--tinta); }
.mapa-elegir[hidden] { display: none; }
.mapa-elegir { margin-top: 10px; padding: 10px; border-radius: 12px; background: #f6f2ea; }
#limpieza button { padding: 6px 4px; }
#limpieza button small { font-size: 11px; }
.miniatura small { color: var(--suave); font-size: 12px; }
.veredicto { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.veredicto:empty { display: none; }
.veredicto.v-ok { background: #e6f4ea; color: #0b5f2c; }
.veredicto.v-aviso { background: #fff3dc; color: #7a4a00; }
.veredicto.v-mal { background: #fde8e7; color: #8e1b15; }
.veredicto small { display: block; margin-top: 4px; opacity: .85; }
.avisos { margin: 6px 0 0; color: var(--suave); font-size: 13px; }
.avisos:empty { display: none; }
.casilla { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; cursor: pointer; }
.casilla input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--verde); flex: none; }

.segmentos { display: flex; gap: 6px; flex-wrap: wrap; }
.segmentos button { flex: 1; min-height: 42px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--linea); background: #fff; font: 700 15px 'Bricolage Grotesque', sans-serif; letter-spacing: .02em; }
.segmentos button small { display: block; font: 500 12px Barlow; color: var(--suave); }
.segmentos button.sel { border-color: var(--tinta); background: var(--tinta); color: #fff; }
.segmentos button.sel small { color: rgba(255,255,255,.75); }
.segmentos button .marca-nivel { display: block; font-size: 11px; font-weight: 600; margin-top: 1px; }
.fuentes button { font-weight: 400; font-size: 17px; }
#logoColores { flex-wrap: nowrap; }
#logoColores button { min-width: 0; padding: 6px 4px; }

.formas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.formas button { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--linea); background: #fff; }
.formas svg { width: 34px; height: 40px; fill: var(--tinta); }
.formas b { font: 700 14px 'Bricolage Grotesque', sans-serif; letter-spacing: .02em; }
.formas button.sel { border-color: var(--verde); box-shadow: inset 0 0 0 1.5px var(--verde); background: #f1f8f2; }
.formas button.sel svg { fill: var(--verde); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { width: 36px; height: 36px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); position: relative; }
.chips button.sel { box-shadow: 0 0 0 2.5px var(--fondo), 0 0 0 4.5px var(--tinta); }
.chips button:disabled { opacity: .25; cursor: not-allowed; }
.cuenta { margin: 10px 0 0; font-size: 13.5px; color: var(--suave); }
.cuenta b { color: var(--tinta); }

textarea, input:not([type]), input[type=number] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--linea-2); background: #fff; font-size: 16px; }
textarea { resize: vertical; text-transform: uppercase; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; letter-spacing: .03em; line-height: 1.5; }
#textoB { text-transform: uppercase; }
.nota.mal { color: var(--mal); font-weight: 600; }
.cuantos { display: flex; align-items: center; gap: 10px; }
.cuantos input { width: 96px; text-align: center; font: 700 20px 'Bricolage Grotesque', sans-serif; }
.cuantos span { color: var(--suave); }
.tramos { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.tramos td { padding: 7px 8px; border-bottom: 1px solid var(--linea); }
.tramos td:last-child { text-align: right; font-weight: 600; }
.taller { margin-top: 14px; padding: 0; border: 0; background: none; color: var(--suave); font-size: 13px; text-decoration: underline; }
/* Lo que el cliente casi nunca toca, plegado (14-oct): se abre solo si la guía lo necesita */
.afinar { margin-top: 14px; border-top: 1.5px solid var(--linea); padding-top: 4px; }
.afinar > summary { cursor: pointer; padding: 10px 0; font: 700 15px 'Bricolage Grotesque', sans-serif; color: var(--suave); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.afinar > summary::-webkit-details-marker { display: none; }
.afinar > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; transition: transform .2s; }
.afinar[open] > summary::after { transform: rotate(-135deg); }
.afinar[open] > summary { color: var(--tinta); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.botones-escena button { display: inline-flex; align-items: center; gap: 6px; }
.veredicto .ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; }
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 5px; vertical-align: 1px; }
.punto.ok { background: var(--ok); } .punto.aviso { background: #e0a100; } .punto.mal { background: var(--mal); } .punto.nada { background: var(--linea-2); }
.segmentos button.sel .punto { box-shadow: 0 0 0 1.5px #fff; }
.tramos tr.activo td { background: #f1f8f2; color: var(--verde); font-weight: 700; }

/* ---------- La barra del pedido ---------- */
.barra { position: fixed; left: 0; right: 0; bottom: 0; height: var(--barra-alto); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px calc(env(safe-area-inset-bottom) * .5); background: var(--papel); border-top: 1.5px solid var(--linea); }
.resumen { display: grid; line-height: 1.2; }
.resumen b { font: 800 20px 'Bricolage Grotesque', sans-serif; letter-spacing: .02em; }
.resumen span { color: var(--suave); font-size: 14px; }
.pedir { min-height: 50px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--lima); color: var(--tinta); font: 800 19px 'Bricolage Grotesque', sans-serif; }
.pedir:disabled { background: #e7e2d6; color: #8b8478; cursor: not-allowed; }
.secundario { min-height: 50px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--linea-2); background: #fff; font: 700 17px 'Bricolage Grotesque', sans-serif; }

dialog { width: min(440px, calc(100vw - 24px)); border: 0; border-radius: 18px; padding: 22px; background: var(--papel); color: var(--tinta); }
dialog::backdrop { background: rgba(20,16,10,.45); }
dialog h3 { margin: 0 0 6px; font: 800 25px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; }
dialog label:not(.casilla) { display: grid; gap: 4px; margin-top: 12px; font: 700 13px 'Bricolage Grotesque', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
dialog label input { text-transform: none; letter-spacing: 0; font: 400 16px Barlow; color: var(--tinta); }
.trampa { position: absolute; left: -9999px; }
.resumen-pedido { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f1f8f2; font-size: 14px; }
.acciones { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.aviso { position: fixed; left: 50%; bottom: calc(var(--barra-alto) + 14px); transform: translate(-50%, 20px); opacity: 0; z-index: 9; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 12px; background: var(--tinta); color: #fff; font-size: 14px; transition: opacity .25s, transform .25s; pointer-events: none; }
.aviso.ver { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  body { overflow: auto; }
  .disposicion { display: block; height: auto; padding-bottom: var(--barra-alto); }
  .escenario { position: sticky; top: 0; z-index: 2; height: 44dvh; min-height: 260px; }
  .panel { width: auto; border-left: 0; overflow: visible; padding: 12px 12px 20px; }
  .cab { padding: 10px 14px; }
  .marca { font-size: 22px; }
  .lema { display: none; }
  .ejemplo { top: 50px; font-size: 12px; }
  .botones-escena button { min-height: 36px; font-size: 14px; }
}
@media (max-width: 420px) {
  .botones-escena { top: auto; bottom: 10px; }          /* arriba chocaba con «mini escudo» */
  .ver-nombre { bottom: 56px; }
  .barra { padding: 0 12px; }
  .resumen b { font-size: 17px; }
  .resumen span { font-size: 13px; }
  .pedir { padding: 0 18px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Lo subo / Lo hago aquí, la guía y el diseño a mano ---------- */
.origen { margin-bottom: 12px; }
.origen button { min-height: 52px; }
.consejos { margin-top: 10px; font-size: 14px; color: var(--suave); }
.consejos summary { cursor: pointer; font-weight: 600; color: var(--tinta); }
.consejos p { margin: 8px 0 0; }
.guia { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #eef3ff; color: #1d2c5c; font-size: 14px; }
.guia p { margin: 0; }
.guia-boton { margin-top: 10px; min-height: 42px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--tinta); color: #fff; font: 700 15px 'Bricolage Grotesque', sans-serif; }
.patrones button { flex: 1 1 30%; min-width: 0; font-size: 14px; }
.campos-mano { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.campos-mano label { display: grid; gap: 6px; font: 700 13px 'Bricolage Grotesque', sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--suave); }
.campos-mano input, #manoClub { text-transform: uppercase; }
