@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --fondo: #14121f; --tarjeta: #1d1a2e; --tarjeta-2: #272340; --texto: #f4f2ff; --suave: #b3aecf;
  --acento: #7c5cff; --cian: #22d3ee; --ok: #3ddc97; --aviso: #ffc857; --error: #ff6b81; --borde: #3a3560;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--fondo); color: var(--texto); font: 400 16px/1.5 Manrope, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.app { width: min(100%, 560px); margin-inline: auto; padding: max(16px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.cabeza h1 { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; }
.sub { margin: 4px 0 0; color: var(--suave); }
.sub strong { color: var(--texto); font-weight: 700; }

.paso { background: var(--tarjeta); border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.paso h2 { margin: 0; font-size: 1.05rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--acento); font-size: .85rem; }
.nota { margin: 0; color: var(--suave); font-size: .9rem; }

.destinos { display: flex; flex-wrap: wrap; gap: 8px; }
.destinos button { min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--borde); border-radius: 12px; background: transparent; color: var(--texto); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.destinos button[aria-pressed="true"] { border-color: var(--cian); background: color-mix(in srgb, var(--cian) 16%, transparent); }
.resumen { margin: 0; font-weight: 700; color: var(--cian); }

.personal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.campo { display: grid; gap: 4px; font-size: .9rem; color: var(--suave); font-weight: 600; }
.campo--ancho { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--texto); }
.check input { width: 22px; height: 22px; accent-color: var(--acento); flex: none; }
input[type="text"], select { width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--borde); border-radius: 12px; background: var(--tarjeta-2); color: var(--texto); font: inherit; font-size: 16px; /* 16px evita el zoom automático en iPhone */ }
select:disabled { opacity: .5; }
input[aria-invalid="true"] { border-color: var(--error); }

.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1.5px solid var(--borde); border-radius: 14px; background: var(--tarjeta-2); color: var(--texto); font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.boton--principal { border-color: transparent; background: var(--acento); color: #fff; }
.boton:active { transform: scale(.98); }
@media (hover: hover) { .boton:hover, .destinos button:hover { filter: brightness(1.12); } }
.boton[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.marco { display: grid; place-items: center; }
.lienzo {
  --prop: 1;
  width: min(100%, calc(58vh * var(--prop))); aspect-ratio: var(--prop); height: auto;
  border-radius: 14px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
  background: repeating-conic-gradient(#3b3760 0% 25%, #2a2646 0% 50%) 50% / 20px 20px; /* cuadros = transparente */
}
.lienzo:active { cursor: grabbing; }
.aviso { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--aviso) 16%, transparent); color: var(--aviso); font-size: .9rem; font-weight: 600; }
.zoom { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; }
.mini { width: 44px; height: 44px; border: 1.5px solid var(--borde); border-radius: 12px; background: var(--tarjeta-2); color: var(--texto); font: inherit; font-size: 22px; font-weight: 700; cursor: pointer; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--cian); }
.opciones { display: grid; gap: 10px; }

.detalle { margin: 0; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.detalle .bien { color: var(--ok); }
.detalle .mal { color: var(--aviso); }
.acciones { display: grid; gap: 10px; }

.mensaje { margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--error) 18%, var(--tarjeta)); color: #ffd5db; font-weight: 600; }
:focus-visible { outline: 3px solid var(--ok); outline-offset: 2px; }
body.arrastrando::after { content: "Suelta la foto aquí"; position: fixed; inset: 12px; display: grid; place-items: center; border: 3px dashed var(--cian); border-radius: 20px; background: rgba(20, 18, 31, .85); font-size: 1.4rem; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 640px) { .acciones { grid-template-columns: 1fr 1fr; } }

/* Pantalla de entrada */
body.centrado { display: grid; place-items: center; padding: 16px; }
.entrada { width: min(100%, 400px); }
.entrada h1 { margin: 0; font-size: 1.6rem; font-weight: 800; }
.entrada form { display: grid; gap: 12px; }
.salir { justify-self: start; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--borde); border-radius: 12px; background: transparent; color: var(--suave); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cabeza { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cabeza .sub { flex-basis: 100%; }
