:root{
    --void:#0a0908;
    --char:#141210;
    --char-2:#1c1815;
    --bone:#e8e0d0;
    --bone-dim:#9a917f;
    --ember:#8c2f2f;
    --ember-bright:#c1503f;
    --gold:#a9822f;
    --line: rgba(232,224,208,0.09);
  }

  *{
    box-sizing:border-box;
    /* Prevent double-tap zoom globally on touch devices */
    touch-action: manipulation;
  }

  button, .stage{
    -webkit-user-select:none;
    -moz-user-select:none;
    user-select:none;
    -webkit-tap-highlight-color: transparent;
  }

  button{
    touch-action: manipulation;
  }

  html,body{
    margin:0;
    padding:0;
    background:var(--void);
    color:var(--bone);
    min-height:100vh;
    font-family:'IBM Plex Mono', monospace;
    overflow-x:hidden;
  }

  body{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    padding: 48px 20px 140px;
    position:relative;
  }

  /* ambient vignette + flicker */
  body::before{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    background:
      radial-gradient(ellipse 60% 40% at 50% 20%, rgba(140,47,47,0.10), transparent 60%),
      radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0,0,0,0.6), transparent 70%);
    z-index:0;
    animation: flicker 7s ease-in-out infinite;
  }

  @keyframes flicker{
    0%,100%{ opacity:1; }
    42%{ opacity:0.94; }
    46%{ opacity:1; }
    58%{ opacity:0.97; }
  }

  .noise{
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:0.035;
    z-index:0;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .stage{
    position:relative;
    z-index:1;
    width:100%;
    max-width:480px;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  .eyebrow{
    font-size:11px;
    letter-spacing:0.35em;
    text-transform:uppercase;
    color:var(--bone-dim);
    margin-bottom:28px;
  }

  .eyebrow span{ color:var(--ember-bright); }

  .amount-row{
    display:flex;
    align-items:baseline;
    gap:2px;
    margin-bottom:18px;
  }

  .amount{
    font-family:'Cinzel', serif;
    font-weight:800;
    font-size:clamp(52px, 14vw, 84px);
    line-height:1;
    letter-spacing:0.01em;
    color:var(--bone);
    text-shadow: 0 0 40px rgba(193,80,63,0.25);
    font-variant-numeric: tabular-nums;
  }

  .amount .sym{
    font-size:0.55em;
    color:var(--gold);
    margin-right:4px;
    vertical-align: 0.12em;
  }

  .amount.bump{
    animation: bump 0.22s ease-out;
  }
  @keyframes bump{
    0%{ transform: scale(1); }
    35%{ transform: scale(1.06); text-shadow: 0 0 60px rgba(193,80,63,0.5); }
    100%{ transform: scale(1); }
  }

  .currency-toggle{
    display:inline-flex;
    border:1px solid var(--line);
    border-radius:999px;
    padding:3px;
    margin-bottom:46px;
    background: rgba(255,255,255,0.015);
  }

  .currency-toggle button{
    all:unset;
    cursor:pointer;
    font-family:'IBM Plex Mono', monospace;
    font-size:12px;
    letter-spacing:0.12em;
    padding:7px 18px;
    border-radius:999px;
    color:var(--bone-dim);
    transition: color 0.2s ease, background 0.2s ease;
  }

  .currency-toggle button.active{
    color:var(--void);
    background:var(--bone);
  }

  .currency-toggle button:focus-visible{
    outline:2px solid var(--gold);
    outline-offset:2px;
  }

  /* The seal / press button */
  .seal-wrap{
    position:relative;
    width:220px;
    height:220px;
    margin-bottom:22px;
  }

  .ring{
    position:absolute;
    inset:0;
    border-radius:50%;
    border:1px solid rgba(169,130,47,0.35);
    pointer-events:none;
  }
  .ring.r2{ inset:-14px; border-color:rgba(169,130,47,0.14); }

  .pulse{
    position:absolute;
    inset:0;
    border-radius:50%;
    border:1px solid var(--ember-bright);
    opacity:0;
    pointer-events:none;
  }
  .pulse.go{
    animation: pulseOut 0.6s ease-out;
  }
  @keyframes pulseOut{
    0%{ opacity:0.55; transform:scale(0.9); }
    100%{ opacity:0; transform:scale(1.35); }
  }

  .seal{
    all:unset;
    position:absolute;
    inset:18px;
    border-radius:50%;
    cursor:pointer;
    background:
      radial-gradient(circle at 50% 38%, #241d18 0%, #171310 55%, #100d0b 100%);
    border:1px solid rgba(232,224,208,0.12);
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:
      0 0 0 1px rgba(0,0,0,0.4),
      0 18px 40px -12px rgba(0,0,0,0.8),
      inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.08s ease, box-shadow 0.15s ease;
  }

  .seal:active{
    transform: scale(0.96);
    box-shadow:
      0 0 0 1px rgba(0,0,0,0.4),
      0 8px 20px -10px rgba(0,0,0,0.8),
      inset 0 2px 10px rgba(0,0,0,0.5);
  }

  .seal:focus-visible{
    outline:2px solid var(--gold);
    outline-offset:6px;
  }

  .seal-glyph{
    font-family:'Cinzel', serif;
    font-size:13px;
    letter-spacing:0.3em;
    color:var(--bone-dim);
    text-transform:uppercase;
  }

  .seal-glyph .press-word{ color:var(--bone); }

  .tally{
    font-size:11px;
    letter-spacing:0.1em;
    color:var(--bone-dim);
    margin-bottom:50px;
  }
  .tally b{ color:var(--ember-bright); font-weight:600; }

  .divider{
    width:100%;
    height:1px;
    background:var(--line);
    margin-bottom:34px;
  }

  .pay-note{
    font-size:11.5px;
    line-height:1.7;
    color:var(--bone-dim);
    max-width:340px;
    margin-bottom:20px;
  }
  .pay-note b{ color:var(--bone); font-weight:600; }

  .pay-btn{
    all:unset;
    cursor:pointer;
    font-family:'IBM Plex Mono', monospace;
    font-size:13px;
    letter-spacing:0.2em;
    text-transform:uppercase;
    color:var(--bone);
    background: linear-gradient(180deg, #3a1414, #2a0e0e);
    border:1px solid rgba(193,80,63,0.5);
    padding:16px 46px;
    border-radius:4px;
    box-shadow: 0 10px 30px -10px rgba(140,47,47,0.5);
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
  }

  .pay-btn:hover{ background: linear-gradient(180deg, #4a1a1a, #340f0f); }
  .pay-btn:active{ transform: translateY(1px); }
  .pay-btn:focus-visible{ outline:2px solid var(--gold); outline-offset:4px; }

  .pay-btn:disabled{
    opacity:0.35;
    cursor:not-allowed;
    box-shadow:none;
  }

  .min-note{
    font-size:10.5px;
    color:var(--bone-dim);
    margin-top:14px;
    opacity:0.7;
  }

  footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:2;
    background: rgba(10,9,8,0.88);
    backdrop-filter: blur(6px);
    border-top:1px solid var(--line);
    padding:14px 20px 18px;
    text-align:center;
  }

  .footer-label{
    font-size:9.5px;
    letter-spacing:0.25em;
    text-transform:uppercase;
    color:var(--bone-dim);
    margin-bottom:5px;
  }

  .footer-total{
    font-family:'Cinzel', serif;
    font-size:22px;
    font-weight:600;
    color:var(--gold);
    font-variant-numeric: tabular-nums;
  }

  .footer-plus{
    font-size:14px;
    color:var(--bone-dim);
    margin:0 10px;
    font-weight:400;
  }

  .footer-fine{
    font-size:9px;
    color:var(--bone-dim);
    opacity:0.55;
    margin-top:5px;
    letter-spacing:0.02em;
  }

  @media (prefers-reduced-motion: reduce){
    *{ animation: none !important; transition: none !important; }
  }

  /* ---- Payment modal ---- */
  .modal-backdrop{
    position:fixed;
    inset:0;
    background:rgba(6,5,4,0.82);
    backdrop-filter: blur(3px);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:50;
    padding:20px;
  }
  .modal-backdrop.open{ display:flex; }

  .modal{
    width:100%;
    max-width:420px;
    max-height:88vh;
    overflow-y:auto;
    background: linear-gradient(180deg, #17130f, #100d0b);
    border:1px solid rgba(169,130,47,0.25);
    border-radius:8px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.4);
    padding:26px 24px 24px;
    position:relative;
  }

  .modal-close{
    all:unset;
    position:absolute;
    top:14px;
    right:16px;
    cursor:pointer;
    color:var(--bone-dim);
    font-size:18px;
    line-height:1;
    padding:4px 6px;
  }
  .modal-close:hover{ color:var(--bone); }
  .modal-close:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

  .modal-eyebrow{
    font-size:10px;
    letter-spacing:0.25em;
    text-transform:uppercase;
    color:var(--bone-dim);
    margin-bottom:8px;
  }

  .modal-amount{
    font-family:'Cinzel', serif;
    font-weight:800;
    font-size:36px;
    color:var(--bone);
    margin-bottom:20px;
  }

  #payment-element{
    margin-bottom:18px;
  }

  .modal-pay-btn{
    all:unset;
    width:100%;
    text-align:center;
    cursor:pointer;
    font-family:'IBM Plex Mono', monospace;
    font-size:12.5px;
    letter-spacing:0.18em;
    text-transform:uppercase;
    color:var(--bone);
    background: linear-gradient(180deg, #3a1414, #2a0e0e);
    border:1px solid rgba(193,80,63,0.5);
    padding:14px;
    border-radius:4px;
    box-sizing:border-box;
  }
  .modal-pay-btn:disabled{ opacity:0.4; cursor:not-allowed; }
  .modal-pay-btn:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }

  .modal-status{
    font-size:11px;
    color:var(--bone-dim);
    margin-top:12px;
    min-height:14px;
    text-align:center;
  }
  .modal-status.error{ color:var(--ember-bright); }
  .modal-status.success{ color:var(--gold); }

  .modal-loading{
    font-size:12px;
    color:var(--bone-dim);
    text-align:center;
    padding:30px 0;
  }
