:root{
  --credaf-blue: #003ba7;
  --credaf-yellow: #ffda00;
  --credaf-yellow-light: #ffea90;
  --credaf-yellow-bright: #ffe922;
  --navy-dark: #0a1428;
  --slate-muted: #5e6d87;
  --surface-light: #f4f7fc;
  --paper: #ffffff;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html,body{height:100%;}
body{
  margin:0;min-height:100vh;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:16px;padding:24px;
  font-family:'Inter',-apple-system,sans-serif;
  background:radial-gradient(120% 90% at 20% -10%,#ffffff 0%,#edf3fc 55%,#d5e3f7 100%);
}
.loading{color:var(--slate-muted);font-family:'IBM Plex Mono',monospace;font-size:13px;letter-spacing:.08em;}

.card-actions{width:100%;max-width:340px;display:flex;flex-direction:column;gap:10px;}
@media(prefers-reduced-motion:no-preference){
  #app .tmpl{animation:rise .5s cubic-bezier(.2,.8,.2,1);}
  @keyframes rise{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}
}

.btn-cast{
  width:100%;border:none;padding:15px;border-radius:6px;
  font-family:'Inter',sans-serif;font-weight:600;font-size:14.5px;color:#ffffff;
  background:var(--credaf-blue);
  box-shadow:0 4px 14px rgba(0, 59, 167, .35);cursor:pointer;
  transition:background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn-cast:hover{background:#002f87;box-shadow:0 6px 18px rgba(0, 59, 167, .45);}
.btn-cast:active{transform:translateY(1px);}
.btn-ghost{
  width:100%;border:1px solid rgba(0, 59, 167, .3);background:transparent;padding:13px;border-radius:6px;
  font-family:'IBM Plex Mono',monospace;font-size:12px;letter-spacing:.05em;color:var(--credaf-blue);
  cursor:pointer;transition:background .15s ease, border-color .15s ease;
}
.btn-ghost:hover{background:rgba(0, 59, 167, .05);border-color:var(--credaf-blue);}

.qr-overlay{position:fixed;inset:0;background:rgba(10, 20, 40, .88);display:none;align-items:center;justify-content:center;z-index:10;padding:24px;}
.qr-overlay.open{display:flex;}
.qr-box{background:var(--paper);border-radius:10px;padding:28px;text-align:center;max-width:340px;width:100%;box-shadow:0 20px 40px rgba(0,0,0,.25);border-top:4px solid var(--credaf-yellow);}
#qr-canvas{display:flex;justify-content:center;margin-bottom:14px;padding:12px;background:#fff;border-radius:6px;}
.qr-hint{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--slate-muted);margin:0 0 16px;}

:focus-visible{outline:2px solid var(--credaf-yellow);outline-offset:2px;}

/* Android VCF download toast */
#vcf-toast{
  position:fixed;bottom:-100px;left:50%;transform:translateX(-50%);
  max-width:340px;width:calc(100% - 32px);
  background:var(--navy-dark);color:#fff;
  font-size:13px;line-height:1.5;
  padding:14px 20px;border-radius:12px;
  text-align:center;
  box-shadow:0 8px 30px rgba(0,0,0,.35);
  border-left:4px solid var(--credaf-yellow);
  z-index:9999;
  opacity:0;
  transition:bottom .4s cubic-bezier(.2,.8,.2,1),opacity .4s ease;
  pointer-events:none;
}
#vcf-toast.show{
  bottom:24px;opacity:1;
}
