@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;1,400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: #fbfbfb;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    touch-action: none;
    font-family: 'IBM Plex Mono', monospace;
  }

  #erasure-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 1500px;  
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.3s ease;     
}

  #layer-wiki {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    padding: 2rem 1.5rem;
    overflow: hidden;
  }

  #layer-wiki-text {
    color: rgba(255,255,255,0.4);
    font-family: 'Courier Prime', monospace;
    font-size: 0.58rem;
    line-height: 2;
    letter-spacing: 0.04em;
    pointer-events: none;
  }

  #canvas-2 { position: absolute; inset: 0; z-index: 2; }
  #canvas-1 { position: absolute; inset: 0; z-index: 3; }

  #hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
    /* Uncomment to debug: */
     /* background: rgba(255,0,0,0.3);    */
  }

  #getty-watermark {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 5;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    color: rgba(0,0,0,0.25);
    pointer-events: none;
  }

  #quote-counter {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    color: rgba(0,0,0,0.2);
    pointer-events: none;
  }

  /* ── POPUP ── */
  #popup {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: flex-end; justify-content: center;
    background: rgba(0,0,0,0.55);
  }
  #popup.active { display: flex; }

  #popup-inner {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    padding: 1.8rem 1.5rem 2.2rem;
    border-top: 2px solid #000;
  }

  .popup-label        { font-size: 0.5rem; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 1rem; opacity: 0.35; }
  .popup-quote        { font-family: 'Courier Prime', monospace; font-size: 0.9rem; line-height: 1.75; margin-bottom: 0.4rem; font-style: italic; }
  .popup-attribution  { font-size: 0.55rem; letter-spacing: 0.08em; opacity: 0.4; margin-bottom: 1.8rem; line-height: 1.5; }
  .likert-label       { font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.8rem; opacity: 0.4; }

  .likert-options { display: flex; gap: 0.35rem; margin-bottom: 0.5rem; }

  .likert-btn {
    flex: 1; padding: 0.75rem 0.2rem; border: 1px solid #000;
    background: transparent; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem; cursor: pointer; text-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, color 0.1s;
  }
  .likert-btn.selected { background: #000; color: #fff; }

  .likert-ends { display: flex; justify-content: space-between; font-size: 0.5rem; letter-spacing: 0.08em; opacity: 0.35; margin-bottom: 1.6rem; }

  .dismiss-btn {
    width: 100%; padding: 0.85rem; border: 1.5px solid #000;
    background: transparent; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, color 0.1s; opacity: 0.3;
  }
  .dismiss-btn.ready { opacity: 1; }
  .dismiss-btn.ready:active { background: #000; color: #fff; }

  /* ── COMPLETION SCREEN ── */
  #completion {
    position: fixed; inset: 0; z-index: 200;
    display: none; align-items: center; justify-content: center;
    /* background: #000000bd; */
    background-color: rgba(0, 0, 0, 0.75);
  }
  #completion.active { display: flex; }

  #completion-inner {
    text-align: center; color: rgba(255,255,255,0.2);
    font-size: 0.55rem; letter-spacing: 0.35em; text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  }

  #scan-next-btn {
    width: 100%;
    padding: 1rem 2rem; border: 1px solid rgb(255, 255, 255);
    background: transparent; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: rgb(255, 255, 255); cursor: pointer;
    -webkit-tap-highlight-color: transparent; display: block;
  }
  #scan-next-btn:active { background: rgba(255,255,255,0.1); }

  #share-btn {
    width: 100%;
    padding: 1rem 2rem; border: 1px solid rgb(255, 255, 255);
    background: transparent; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: rgb(255, 255, 255); cursor: pointer;
    -webkit-tap-highlight-color: transparent; display: block;
  }
  #share-btn:active { background: rgba(255,255,255,0.1); }

  /* ── QR SCANNER OVERLAY ── */
  #qr-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 300;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }
  #qr-overlay.active { display: flex; }

  #qr-video {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px; height: 1px;
  }

  #qr-canvas {
    width: min(80vw, 300px);
    height: min(80vw, 300px);
    border: 1px solid rgba(255,255,255,0.25);
    display: block;
  }

  #qr-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    text-align: center;
    max-width: 260px;
    line-height: 2;
  }

  #qr-cancel {
    padding: 0.7rem 1.8rem;
    border: 1px solid rgba(255,255,255,0.25);
    background: transparent;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  #qr-cancel:active { background: rgba(255,255,255,0.08); }

  #camera-fail {
    display: none; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5rem; letter-spacing: 0.15em; color: rgb(255, 255, 255);
    text-align: center; line-height: 2; max-width: 260px;
  }
  #camera-fail.active { display: block; }