:root{--acento:#7a2a14;--fondo:#e9e5de;}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{background:var(--fondo);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#222}
.barra{position:sticky;top:0;z-index:20;height:34px;display:flex;align-items:center;justify-content:space-between;
  padding:0 10px;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);border-bottom:1px solid #0001;font-size:14px}
.barra[hidden]{display:none}
.barra-nombre{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:8px}
.barra-btn{min-height:30px;padding:0 10px;border:1px solid #0002;border-radius:15px;background:#fff;color:var(--acento);font-size:12px;cursor:pointer;white-space:nowrap}
.paginas{width:100%;padding-bottom:90px}
.pagina{position:relative;width:100%;margin:0 auto 6px;background:#fff;line-height:0}
.pagina canvas{display:block;width:100%;height:100%}
.capa{position:absolute;inset:0}
.zona{position:absolute;display:block;padding:0;border:0;margin:0;background:transparent;border-radius:4px;cursor:pointer;
  transition:background .25s,box-shadow .25s;touch-action:manipulation}
.zona.flash{background:rgba(255,170,0,.35);box-shadow:0 0 0 2px rgba(255,140,0,.7)}
.zona.ok{background:rgba(40,170,80,.35);box-shadow:0 0 0 2px rgba(30,140,60,.8)}
.estado{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:60vh;padding:24px;text-align:center;font-size:16px;line-height:1.4}
.estado[hidden]{display:none}
.estado.error p{max-width:320px}
.spinner{width:34px;height:34px;border:4px solid #0002;border-top-color:var(--acento);border-radius:50%;animation:giro 1s linear infinite}
.estado.error .spinner{display:none}
@keyframes giro{to{transform:rotate(360deg)}}
.sheet-fondo{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:90}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:91;background:#fff;border-radius:16px 16px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 20px #0004;max-width:560px;margin:0 auto;animation:sube .2s ease-out}
.sheet[hidden],.sheet-fondo[hidden]{display:none}
@keyframes sube{from{transform:translateY(100%)}to{transform:none}}
.sheet-titulo{margin:0 0 12px;font-size:17px}
.sheet-opciones{display:flex;flex-direction:column;gap:8px}
.sheet-opciones button{display:flex;justify-content:space-between;align-items:center;padding:0 16px;min-height:48px;border:1px solid #0003;border-radius:10px;background:#faf6ee;font-size:16px;cursor:pointer}
.sheet-opciones button:active{background:#f0e3c8}
.sheet-cancelar{width:100%;min-height:44px;margin-top:10px;border:0;background:none;color:#666;font-size:15px;cursor:pointer}
.op-precio{font-weight:700;color:var(--acento)}
.zona.enlace.flash{background:rgba(30,120,255,.30);box-shadow:0 0 0 2px rgba(20,90,220,.85)}
.zona.enlace.ok{background:rgba(30,120,255,.40);box-shadow:0 0 0 2px rgba(20,90,220,.9)}
.zona.enlace::after{content:"";position:absolute;right:-7px;top:-7px;width:16px;height:16px;border-radius:50%;background:#145adc;color:#fff;
  font:10px/16px system-ui,sans-serif;text-align:center;opacity:0;pointer-events:none;transition:opacity .25s}
.zona.enlace.flash::after{content:"\1F517";opacity:1}
