*{box-sizing:border-box}html,body{margin:0;height:100%;background:#101319;color:#fff;font-family:system-ui,sans-serif}body{overflow:hidden}main{height:100dvh;max-width:440px;margin:auto;padding:max(8px,env(safe-area-inset-top)) 16px max(8px,env(safe-area-inset-bottom));display:grid;grid-template-rows:minmax(72px,20fr) minmax(140px,36fr) minmax(55px,16fr) minmax(90px,28fr);gap:6px}header,footer,#resultado{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:0}header b{font-size:clamp(24px,5vh,40px);line-height:1;color:#e8c575;letter-spacing:2px}header small{font-size:10px;letter-spacing:3px}h1{font-size:clamp(13px,2.8vh,21px);color:#e8c575;margin:5px 0 0}p{margin:2px 0;font-size:12px}form{display:grid;align-content:center;gap:5px;min-height:0}label{font-size:12px;color:#dfdfe2}input,select,button{width:100%;min-width:0;font:inherit;border-radius:8px;padding:6px 10px;height:clamp(32px,6vh,46px)}input,select{background:#22262f;border:1px solid #555;color:white;font-size:16px}button{background:#e8c575;color:#171717;font-weight:750;border:0;cursor:pointer}button:disabled{opacity:.55}#resultado{border:1px solid #626773;border-radius:10px;padding:4px;overflow:hidden;gap:3px}#estado{font-size:clamp(13px,2.9vh,20px);line-height:1.1}#detalle{font-size:11px;line-height:1.2;overflow-wrap:anywhere}#resultado[data-state=descargada]{border-color:#4ade80;color:#4ade80}#resultado[data-state=emitida]{border-color:#facc15;color:#facc15}#resultado[data-state=pendiente]{border-color:#f87171;color:#f87171}footer{gap:3px}footer strong{font-size:13px}footer a{color:#e8c575;font-size:11px;line-height:1}footer a:has(img){min-height:0;display:flex;justify-content:center;flex:1}footer img{height:100%;max-height:125px;max-width:125px;object-fit:contain;background:white;border-radius:4px;image-rendering:pixelated}dialog{background:#181c24;color:white;border:1px solid #a58d58;border-radius:14px;width:min(90%,360px);padding:18px}dialog::backdrop{background:#000b}dialog h2{font-size:19px;margin:0 0 8px}#error{color:#f87171;min-height:15px}@media(max-height:450px){main{grid-template-rows:60px 136px 48px 70px;padding:4px 12px;gap:3px}header b{font-size:22px}header small{display:none}footer img{max-height:48px}footer strong{font-size:11px}form{gap:2px}input,select,button{height:30px}label{font-size:11px}} 
