:root {
  --bg: #f5f2ec; --surface: #ffffff; --ink: #1b1f24; --ink-2: #4a525c; --ink-3: #7a828c;
  --line: #e2ddd3; --dark: #1f2630; --accent: #d9600b; --accent-2: #b24a05; --accent-soft: #fbe9dc;
  --ok: #1f7a4d; --err: #b3261e;
  --r: 12px; --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181d; --surface: #1d232b; --ink: #f1eee8; --ink-2: #c3c0b8; --ink-3: #8d9199; --line: #2c343e; --dark: #0f1318; --accent: #f08030; --accent-2: #f39a55; --accent-soft: #3a2616; --ok: #4cc38a; --err: #ff8a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: env(safe-area-inset-bottom); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }

.top { background: var(--dark); color: #f1eee8; padding: 28px 0 24px; }
.brand { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #f0a46b; font-weight: 600; }
.top h1 { margin: 0 0 10px; font-size: clamp(28px, 7vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.lead { margin: 0; color: #cfcac0; max-width: 56ch; }

.progress { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 0 8px; }
.bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.paso-txt { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }

main { padding-top: 20px; padding-bottom: 40px; }
.step { display: none; }
.step.on { display: block; animation: ent .25s ease; }
@keyframes ent { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step.on { animation: none; } .bar span { transition: none; } }
h2 { margin: 4px 0 16px; font-size: 22px; letter-spacing: -.01em; }

label { display: block; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px; min-height: 46px; font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.req { color: var(--accent); }
.invalid { border-color: var(--err) !important; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
fieldset { margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
legend { padding: 0 6px; font-weight: 700; font-size: 14px; color: var(--ink); }
.hint { margin: 0 0 12px; font-size: 14px; color: var(--ink-3); }
.radio { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink); min-height: 44px; align-items: center; }
.radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { min-height: 44px; padding: 9px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips-sm .chip { padding: 8px 12px; }
.inline { display: flex; gap: 8px; align-items: stretch; }
.inline input { margin: 0 !important; }

.rep { display: grid; gap: 12px; margin-bottom: 12px; }
.item { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); position: relative; }
.item-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.item-h strong { font-size: 15px; }
.item label { font-size: 13px; }
.star { min-height: 44px; padding: 6px 12px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.star[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 700; }
.quitar { min-height: 44px; padding: 6px 10px; background: none; border: 0; color: var(--err); font: inherit; font-size: 13px; cursor: pointer; }

.drop { position: relative; display: block; margin-bottom: 14px; padding: 18px 14px; border: 2px dashed var(--line); border-radius: var(--r); background: var(--surface); text-align: left; }
.drop strong { display: block; font-size: 15px; }
.drop > span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop:focus-within { border-color: var(--accent); }
.thumbs { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 10px; pointer-events: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--line); pointer-events: auto; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .doc { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--ink-2); padding: 4px; text-align: center; word-break: break-all; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.contador { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); position: relative; z-index: 1; pointer-events: none; }

.resumen { display: grid; gap: 8px; margin-bottom: 16px; }
.resumen div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.resumen b { text-align: right; }
.resumen .falta b { color: var(--err); }
.subida { margin: 14px 0; }
.error { margin: 12px 0; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--err) 12%, var(--surface)); color: var(--err); font-size: 14px; font-weight: 600; }

.nav-btns { display: flex; gap: 10px; margin-top: 20px; position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.btn, .btn-sec { min-height: 50px; padding: 12px 20px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn { flex: 1; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-2); }
.btn-send { background: var(--ok); }
.btn-sec { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn[disabled], .btn-sec[disabled] { opacity: .55; cursor: wait; }
[hidden] { display: none !important; }
.autosave { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gracias { padding: 28px 0; }
.gracias h2 { font-size: 28px; }
