
  /* Funciona sin internet: fuentes del sistema, librería QR incluida (qrcodejs, MIT). */
  :root{--ui-bg:#eef0ec; --ui-fg:#1c2a24; --ui-muted:#5f6a64; --ui-line:#cfd6d0; --ui-accent:#4a2f1f; color-scheme:light}
  *{box-sizing:border-box}
  body{margin:0; background:var(--ui-bg); color:var(--ui-fg); font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; line-height:1.5}
  .controls{max-width:480px; margin:0 auto; padding:20px 16px 6px; display:flex; flex-direction:column; gap:12px}
  h1{font-family:Georgia,"Times New Roman",serif; font-weight:600; font-size:1.7rem; margin:0}
  p.sub{margin:-6px 0 2px; color:var(--ui-muted); font-size:.92rem}
  .grid{display:grid; grid-template-columns:1fr 1fr; gap:10px}
  .field{display:flex; flex-direction:column; gap:4px}
  .full{grid-column:1/-1}
  label{font-size:.8rem; font-weight:600; color:var(--ui-muted)}
  input,select{font-size:1rem; padding:10px 11px; border:1px solid var(--ui-line); border-radius:9px; background:#fff; color:var(--ui-fg); font-family:inherit; width:100%}
  input:focus-visible,select:focus-visible,button:focus-visible{outline:2px solid var(--ui-accent); outline-offset:1px}
  .err{color:#9b2c1f; font-size:.82rem; min-height:1.2em}
  .btn{appearance:none; cursor:pointer; border-radius:10px; font-weight:600; font-size:1rem; padding:13px 16px; border:0; background:var(--ui-accent); color:#fff; font-family:inherit}
  .hint{font-size:.8rem; color:var(--ui-muted); margin:0}
  .stage{display:flex; flex-wrap:wrap; justify-content:center; gap:0; padding:12px 16px 48px}
  .sheet{display:flex; justify-content:center}
  .sheet.a4{width:210mm; height:297mm; display:grid; grid-template-columns:105mm 105mm; grid-template-rows:148mm 148mm; background:#fff; box-shadow:0 10px 40px -12px rgba(30,40,30,.4)}
  .sheet.a4 .card{box-shadow:none; outline:0.1mm dashed #bbb}

  .card{--paper:#f7f2e7; --ink:#2b1d14; --accent:#4a2f1f; --gold:#b08322; --muted:#6f685a; --line:#ddd2ba;
    position:relative; width:105mm; height:148mm; background:var(--paper); color:var(--ink); overflow:hidden;
    box-shadow:0 10px 40px -12px rgba(30,40,30,.5); display:flex; flex-direction:column; align-items:center; text-align:center; padding:11mm 9mm 9mm}
  .card[data-theme="salvia"]{--paper:#eef3ec; --accent:#2f5a45; --gold:#7f9c6b; --line:#cfdcc9; --muted:#5d6b61}
  .card[data-theme="cielo"]{--paper:#eef4f8; --accent:#1f4a6b; --gold:#5b8db3; --line:#cddde8; --muted:#56687a}
  .card[data-theme="terracotta"]{--paper:#f8efe7; --accent:#7a3b22; --gold:#c2703f; --line:#ead4c2; --muted:#7a6457}
  .frame{position:absolute; inset:5mm; border:0.5mm solid var(--gold); pointer-events:none}
  .frame::after{content:""; position:absolute; inset:1.1mm; border:0.2mm solid var(--gold); opacity:.55}
  .inner{position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:2.3mm; height:100%}
  .eyebrow{font-size:2.6mm; letter-spacing:.4em; text-transform:uppercase; color:var(--accent); font-weight:700; display:flex; align-items:center; gap:2.2mm}
  .eyebrow::before,.eyebrow::after{content:""; width:7mm; height:0.3mm; background:var(--gold)}
  .biz{font-family:Georgia,serif; font-style:italic; font-size:4.8mm; color:var(--accent); line-height:1.1; max-width:85mm}
  .headline{font-family:Georgia,"Times New Roman",serif; font-weight:700; font-size:10.5mm; line-height:1.02; margin:1mm 0 0; max-width:86mm}
  .subhead{font-size:3.1mm; color:var(--muted); max-width:74mm; line-height:1.4; margin:0}
  .stars{color:var(--gold); font-size:5mm; letter-spacing:1.6mm}
  .qrwrap{position:relative; padding:4mm; background:#fff; border-radius:3mm; border:0.3mm solid var(--line)}
  .qr img,.qr canvas{display:block; width:33mm !important; height:33mm !important}
  .action{display:flex; align-items:center; gap:2.4mm; margin-top:1.4mm; color:var(--accent); font-weight:700; font-size:3.2mm}
  .action .ph{font-size:4.6mm}
  .action .sub{color:var(--muted); font-weight:600}
  .card[data-layout="focus"] .qrwrap{order:7; padding:3mm}
  .card[data-layout="focus"] .qr img,.card[data-layout="focus"] .qr canvas{width:25mm !important; height:25mm !important}
  .card[data-layout="focus"] .action{order:6; flex-direction:column; gap:1.4mm; margin-top:2mm}
  .card[data-layout="focus"] .action .ph{font-size:10mm}
  .card[data-layout="focus"] .action .txt{font-size:6mm; text-transform:uppercase; line-height:1.05}
  .card[data-layout="focus"] .action .sub{display:block; font-size:3.4mm; text-transform:none; margin-top:1mm}
  .card[data-layout="focus"] .foot{order:8}
  .foot{margin-top:auto}
  .legal{font-size:2.4mm; color:var(--muted); max-width:80mm; line-height:1.35; margin:0}
  @media (max-width:440px){ .sheet.a6 .card{transform:scale(.9); transform-origin:top center} .sheet.a4{transform:scale(.45); transform-origin:top center; margin-bottom:-160mm} }
  @media print{
    @page{size:105mm 148mm; margin:0}
    *{-webkit-print-color-adjust:exact !important; print-color-adjust:exact !important}
    body{background:#fff}
    .controls{display:none !important}
    .stage{padding:0}
    .card,.sheet.a4{box-shadow:none; transform:none !important; margin:0}
  }
  [hidden]{display:none !important}

  .qph{width:33mm;height:33mm;display:flex;align-items:center;justify-content:center;color:#aaa;font-size:3mm}
  .home{font-size:.85rem;color:var(--ui-muted);text-decoration:none}
  .up{max-width:480px;margin:0 auto;padding:8px 16px 40px;display:grid;gap:12px}
  .up h2{font-family:Georgia,serif;font-size:1.3rem;margin:8px 0 0}
  .up .box{background:#fff;border:1px solid var(--ui-line);border-radius:12px;padding:14px 16px}
  .up .box h3{margin:0 0 4px;font-size:1.05rem}
  .up .box p{margin:0 0 10px;font-size:.92rem;color:var(--ui-muted)}
  .up a.btn{display:inline-block;text-decoration:none}
  .up .faq p{font-size:.9rem;color:var(--ui-muted);margin:4px 0 12px}
  @media print{ .up,.home{display:none !important} }
