/* veratongue.css — main stylesheet, extracted from veratongue_app.html */
    /* === SCREEN-RING: Lighting Standardization (DISSOLVE TC1) === */
    #screenRingBorder {
      position: absolute; inset: 0;
      border: 18px solid #ffffff;
      box-shadow: inset 0 0 30px rgba(255,255,255,0.25), 0 0 0 1px rgba(212,175,55,0.4);
      border-radius: 13px;
      pointer-events: none;
      z-index: 8;
      opacity: 0;
      transition: opacity 0.4s ease;
    }
    #screenRingBorder.active { opacity: 1; }
    #screenRingLabel {
      position: absolute; bottom: 8px; right: 10px;
      font-size: 0.65rem; color: rgba(255,255,255,0.6);
      font-family: monospace; letter-spacing: 1px;
      z-index: 9; pointer-events: none;
    }

    /* === MEDICAL DISCLAIMER GATE (DISSOLVE DA#2) === */
    #disclaimerGate {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.95);
      z-index: 99999;
      /* Column + top-aligned + scrollable so a tall disclaimer is never clipped, and
         the accept button is always reachable. Generous safe-area-aware insets keep it
         clear of the Android status bar (top) and the 3-button nav bar (bottom) — the
         72px / 24px floors apply even when the WebView reports a 0 inset. */
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(72px, env(safe-area-inset-bottom, 24px)) 16px;
      font-family: 'Inter', sans-serif;
    }
    #disclaimerGate .dg-box { margin: auto 0; }
    #disclaimerGate .dg-box {
      max-width: 480px; width: 100%;
      background: #111;
      border: 1px solid rgba(212,175,55,0.4);
      border-radius: 16px;
      padding: 28px 24px;
      text-align: center;
    }
    #disclaimerGate .dg-icon { font-size: 2.8rem; margin-bottom: 12px; }
    #disclaimerGate .dg-title {
      font-size: 1.15rem; font-weight: 700;
      color: #d4af37; letter-spacing: 1px;
      margin-bottom: 16px;
    }
    #disclaimerGate .dg-body {
      font-size: 0.85rem; color: #bbb;
      line-height: 1.7; text-align: left;
      margin-bottom: 20px;
    }
    #disclaimerGate .dg-body strong { color: #fff; }
    #disclaimerGate .dg-body .dg-point {
      display: flex; gap: 10px;
      margin-bottom: 10px;
      align-items: flex-start;
    }
    #disclaimerGate .dg-body .dg-point .icon { flex-shrink: 0; margin-top: 2px; }
    #disclaimerGate .dg-checkbox-row {
      display: flex; gap: 10px;
      align-items: center;
      background: rgba(212,175,55,0.06);
      border: 1px solid rgba(212,175,55,0.2);
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 18px;
      text-align: left;
      cursor: pointer;
    }
    #disclaimerGate .dg-checkbox-row input { width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; accent-color: #d4af37; }
    #disclaimerGate .dg-checkbox-row label { font-size: 0.82rem; color: #ccc; cursor: pointer; line-height: 1.5; }
    #disclaimerAcceptBtn {
      width: 100%;
      padding: 14px;
      background: #333;
      color: #666;
      border: none;
      border-radius: 10px;
      font-size: 0.95rem;
      font-weight: 700;
      cursor: not-allowed;
      letter-spacing: 1px;
      transition: all 0.3s ease;
    }
    #disclaimerAcceptBtn.enabled {
      background: #d4af37;
      color: #000;
      cursor: pointer;
      box-shadow: 0 0 20px rgba(212,175,55,0.35);
    }
      /* Attestation Splash */
      #attestationSplash {
        position: fixed; inset: 0; background: #0a0a0a;
        z-index: 9999; display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 20px;
        font-family: 'Inter', system-ui, sans-serif;
      }
      #attestationSplash .attest-logo { font-size: 3rem; }
      #attestationSplash .attest-title { color: #d4af37; font-size: 1.4rem; font-weight: 300; letter-spacing: 4px; }
      #attestationSplash .attest-bar { width: 260px; height: 3px; background: #222; border-radius: 2px; overflow: hidden; }
      #attestationSplash .attest-bar-fill { height: 100%; width: 0%; background: #d4af37; transition: width 0.4s ease; }
      #attestationSplash .attest-status { color: #666; font-size: 0.8rem; letter-spacing: 2px; min-height: 1.2em; }
      #attestationSplash .attest-badge { display: none; border: 1px solid #d4af37; border-radius: 8px; padding: 8px 18px; color: #d4af37; font-size: 0.8rem; letter-spacing: 2px; }
      /* Quantum Encryption Banner */
      .quantum-banner {
        background: rgba(0, 216, 255, 0.1);
        border: 1px solid rgba(0, 216, 255, 0.4);
        color: #00D8FF;
        font-size: 0.75rem;
        padding: 5px 10px;
        border-radius: 4px;
        text-align: center;
        letter-spacing: 2px;
        margin-bottom: 15px;
      }
      :root {
        --dark: #0a0a0a;
        --gold: #d4af37;
        --text-light: #f5f5f5;
        --bg-image: url('./ohm-galaxy-bg.jpg');
      }
      body {
        font-family: "Inter", system-ui, sans-serif;
        background-color: var(--dark);
        background-image: linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.9)), var(--bg-image);
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        color: var(--text-light);
        margin: 0;
        padding: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 100vh;
      }
      .container {
        max-width: 600px;
        width: 100%;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(212, 175, 55, 0.2);
        border-radius: 20px;
        padding: 40px;
        text-align: center;
      }
      @media (max-width: 600px) {
        body {
          padding: 10px;
        }
        .container {
          padding: 15px;
          border-radius: 12px;
        }
      }
      h1 {
        color: var(--gold);
        font-weight: 300;
      }
      .archetype-result {
        margin: 30px 0;
        padding: 30px;
        background: rgba(212, 175, 55, 0.05);
        border-radius: 15px;
        border: 1px solid var(--gold);
        display: none;
        animation: fadeIn 1s ease-out;
      }
      .archetype-name {
        font-size: 2.5rem;
        color: var(--gold);
        margin-bottom: 10px;
      }
      .archetype-conf { margin: -4px 0 12px; }
      .archetype-conf-badge { display:inline-block; font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; border:1px solid; border-radius:8px; padding:2px 10px; opacity:0.95; }
      .btn {
        background: var(--gold);
        color: var(--dark);
        border: none;
        padding: 15px 40px;
        border-radius: 30px;
        font-size: 1.1rem;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-top: 20px;
        transition: all 0.3s;
      }
      .btn:hover {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
      }
      .radar-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-top: 30px;
        text-align: left;
      }
      .axis-bar {
        background: #222;
        height: 8px;
        border-radius: 4px;
        overflow: hidden;
        margin-top: 5px;
      }
      .axis-fill {
        height: 100%;
        background: var(--gold);
        width: 0%;
        transition: width 1.5s ease-out;
      }
      @keyframes fadeIn {
        from {
          opacity: 0;
          transform: translateY(10px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      @keyframes spin {
        100% { transform: rotate(360deg); }
      }
      .interactive-item {
        cursor: pointer;
        padding: 5px;
        transition: background 0.2s, color 0.2s;
        border-radius: 5px;
      }
      .interactive-item:hover {
        background: rgba(212, 175, 55, 0.2);
        color: #fff;
      }
      .interactive-item::after {
        content: ' 💬 (Tap to ask Oracle)';
        font-size: 0.7rem;
        color: var(--gold);
        opacity: 0;
        transition: opacity 0.2s;
      }
      .interactive-item:hover::after {
        opacity: 1;
      }
      .oracle-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.85);
        z-index: 1000;
        justify-content: center;
        align-items: center;
      }
      .oracle-modal-content {
        background: var(--bg-card, #111);
        border: 1px solid var(--gold);
        padding: 20px;
        border-radius: 15px;
        width: 90%;
        max-width: 400px;
        max-height: 80vh;
        overflow-y: auto;
      }
      .profile-selector {
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--gold);
        color: #fff;
        padding: 10px;
        border-radius: 10px;
        width: 100%;
        margin-bottom: 15px;
        font-family: inherit;
        font-size: 1rem;
      }
      .profile-selector option {
        background-color: #0a0a0a;
        color: #ffffff;
      }
      .shield-badge {
        margin-top: 40px;
        font-size: 0.8rem;
        color: #666;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
      }
      .top-right-bar {
        position: absolute;
        top: 20px;
        right: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 50;
      }
      .language-selector {
        background: rgba(10, 10, 10, 0.6);
        border: 1px solid var(--gold);
        color: var(--gold);
        padding: 5px 10px;
        border-radius: 5px;
        font-family: inherit;
        cursor: pointer;
      }
      .language-selector:focus {
        outline: none;
      }
      .language-selector option {
        background-color: #0a0a0a;
        color: #ffffff;
      }
      /* VeraVoice audio banner */
      .veravoice-banner {
        background: rgba(13, 107, 62, 0.12);
        border: 1px solid rgba(13, 107, 62, 0.4);
        color: #4dbe87;
        font-size: 0.78rem;
        padding: 6px 12px;
        border-radius: 6px;
        text-align: center;
        letter-spacing: 1px;
        margin-bottom: 12px;
        display: none;
      }
      /* Attestation status pill */
      .attest-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(212,175,55,0.08);
        border: 1px solid rgba(212,175,55,0.3);
        color: var(--gold);
        border-radius: 20px;
        padding: 3px 12px;
        font-size: 0.72rem;
        letter-spacing: 1px;
        margin-bottom: 12px;
      }
      /* ECHO live video */
      #echoLiveVideo {
        display: none;
        width: 100%;
        max-width: 400px;
        border-radius: 12px;
        border: 2px solid var(--gold);
        margin: 10px auto;
      }
      .echo-live-status {
        text-align: center;
        color: #4dbe87;
        font-size: 0.82rem;
        margin: 8px 0;
        display: none;
      }
      .navbar {
        display: flex;
        justify-content: flex-start;
        gap: 6px;
        margin-bottom: 22px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.3);
        padding-bottom: 10px;
        /* Mobile: scroll instead of overlapping/wrapping the 7 tabs */
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
        mask-image: linear-gradient(90deg, #000 92%, transparent);
      }
      .navbar::-webkit-scrollbar { display: none; }
      @media (min-width: 640px) { .navbar { justify-content: center; flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; } }
      .nav-btn {
        background: transparent;
        color: var(--text-light);
        border: none;
        font-size: 0.9rem;
        cursor: pointer;
        padding: 6px 10px;
        white-space: nowrap;
        flex: 0 0 auto;
        scroll-snap-align: start;
        border-radius: 8px;
        transition: color 0.3s, background 0.2s;
      }
      .nav-btn.active {
        color: var(--gold);
        font-weight: bold;
        border-bottom: 2px solid var(--gold);
        background: rgba(212,175,55,0.08);
      }
      .tab-content {
        display: none;
      }
      .tab-content.active {
        display: block;
        animation: fadeIn 0.5s;
      }
      .trend-bar {
        height: 10px;
        background: var(--gold);
        border-radius: 5px;
        margin-top: 5px;
      }
      .master-card {
        border: 1px solid rgba(212, 175, 55, 0.4);
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        text-align: left;
        background: rgba(0,0,0,0.4);
      }
      .action-plan {
        background: rgba(212, 175, 55, 0.1);
        border-left: 4px solid var(--gold);
        padding: 15px;
        margin-top: 20px;
        text-align: left;
        border-radius: 0 10px 10px 0;
      }
    /* === QR P2P SYNERGY MODAL (DISSOLVE TC5) === */
    #qrSynergyModal {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.92); z-index: 9998;
      align-items: center; justify-content: center;
      padding: 20px; font-family: 'Inter', sans-serif;
    }
    #qrSynergyModal .qr-box {
      background: #111; border: 1px solid rgba(212,175,55,0.4);
      border-radius: 16px; padding: 28px 24px;
      max-width: 400px; width: 100%; text-align: center;
    }
    #qrSynergyModal .qr-title {
      color: #d4af37; font-size: 1.1rem; font-weight: 700;
      letter-spacing: 1px; margin-bottom: 8px;
    }
    #qrSynergyModal .qr-sub {
      font-size: 0.8rem; color: #888; margin-bottom: 18px; line-height: 1.5;
    }
    #qrCanvas { margin: 0 auto 16px; display: block; }
    #qrScanSection {
      border-top: 1px solid #333; margin-top: 20px; padding-top: 18px;
    }
    #qrScanVideo {
      width: 100%; border-radius: 8px;
      border: 2px dashed rgba(212,175,55,0.4);
      display: none; max-height: 220px; object-fit: cover;
    }
    #qrScanStatus { font-size: 0.78rem; color: #888; margin-top: 8px; min-height: 20px; }

    /* ============================================================
       📱 RESPONSIVE MEDIA QUERIES — Diamond Standard DIM-3
       Breakpoints: 320px (iPhone SE) · 480px (phablet) · 768px (tablet)
       Mobile-first: all base styles are for ≤ 390px
    ============================================================ */

    /* Ultra-small (iPhone SE, 320px) */
    @media (max-width: 360px) {
      body { padding: 8px; font-size: 14px; }
      .nav-btn { font-size: 0.6rem; padding: 6px 4px; }
      .btn { padding: 12px 16px; font-size: 0.85rem; }
      h1 { font-size: 1.3rem; }
      #masterWaitlistForm > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    }

    /* Small phones (≤ 480px) */
    @media (max-width: 480px) {
      #masterWaitlistForm > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
      .master-card { padding: 12px; }
      #groupRadar { max-width: 260px; }
    }

    /* Phablet / large phone landscape (481-768px) */
    @media (min-width: 481px) and (max-width: 768px) {
      body { max-width: 600px; margin: 0 auto; }
    }

    /* Tablet and wider (≥ 769px) — constrain max width for readability */
    @media (min-width: 769px) {
      body { max-width: 680px; margin: 0 auto; padding: 24px; }
      .tab-content { padding-bottom: 40px; }
      #groupRadar { max-width: 340px; }
    }

    /* Touch target enforcement — all interactive elements ≥ 44px tall */
    @media (pointer: coarse) {
      .btn, .nav-btn, select, input[type="text"], input[type="email"],
      input[type="number"], input[type="search"], input[type="checkbox"] {
        min-height: 44px;
      }
      .nav-btn { min-height: 52px; } /* bottom nav extra safe */
    }

    /* Reduced motion — respect user preference */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }

    /* === SPRINT 4 SLICE 1: Archetype Reveal Animation (CPO: Slot-Machine Dopamine) === */
    @keyframes scoreReveal {
      0%   { transform: scale(0.85); opacity: 0; filter: hue-rotate(0deg); }
      40%  { transform: scale(1.05); opacity: 0.7; color: #e74c3c; }
      70%  { transform: scale(1.02); color: #f39c12; }
      100% { transform: scale(1);    opacity: 1;   color: var(--gold); filter: none; }
    }
    @keyframes barGrow {
      from { width: 0%; }
    }
    @keyframes streakPulse {
      0%, 100% { box-shadow: 0 0 8px rgba(212,175,55,0.4); }
      50%       { box-shadow: 0 0 18px rgba(212,175,55,0.9); }
    }
    .archetype-name.reveal-anim {
      animation: scoreReveal 1.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
    }
    .axis-fill.reveal-anim {
      animation: barGrow 1.2s ease-out forwards;
    }
    #streakBadge {
      display: inline-flex; align-items: center; gap: 6px;
      background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.4);
      border-radius: 20px; padding: 4px 12px; font-size: 0.82rem; color: var(--gold);
      animation: streakPulse 2s ease-in-out infinite;
      margin-bottom: 12px; cursor: default;
    }
    #nextStepCTA {
      display: none;
      width: 100%; padding: 16px; margin-top: 16px;
      background: linear-gradient(135deg, var(--gold) 0%, #b8860b 100%);
      color: #000; font-size: 1rem; font-weight: 700;
      border: none; border-radius: 12px; cursor: pointer;
      box-shadow: 0 4px 20px rgba(212,175,55,0.5);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      letter-spacing: 0.5px;
    }
    #nextStepCTA:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(212,175,55,0.7); }
    #whoContribBanner {
      display: none; margin-top: 10px; padding: 8px 14px;
      background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.25);
      border-radius: 8px; font-size: 0.78rem; color: #aaa; text-align: center;
      cursor: pointer; transition: background 0.2s;
    }
    #whoContribBanner:hover { background: rgba(212,175,55,0.15); }

    /* Interactive Organ Zone Analysis Styles */
    .interactive-image-wrapper {
      position: relative;
      width: 100%;
      margin: 16px 0;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.15);
      background: #000;
    }
    .interactive-image-wrapper img {
      width: 100%;
      display: block;
    }
    .interactive-zone {
      position: absolute;
      box-sizing: border-box;
      border: 2px dashed rgba(255, 255, 255, 0.4);
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 10;
    }
    .interactive-zone:hover {
      background: rgba(255, 255, 255, 0.1);
      border-style: solid;
    }
    .interactive-zone.active {
      border: 2px solid var(--gold) !important;
      background: rgba(212, 175, 55, 0.15) !important;
      box-shadow: 0 0 15px var(--gold);
    }
    /* Specific TCM Organ colors for hover states */
    .interactive-zone[data-zone="Heart"] { border-color: rgba(239, 68, 68, 0.6); }
    .interactive-zone[data-zone="Heart"]:hover { background: rgba(239, 68, 68, 0.15); }
    .interactive-zone[data-zone="Lung"] { border-color: rgba(245, 158, 11, 0.6); }
    .interactive-zone[data-zone="Lung"]:hover { background: rgba(245, 158, 11, 0.15); }
    .interactive-zone[data-zone="Liver"] { border-color: rgba(16, 185, 129, 0.6); }
    .interactive-zone[data-zone="Liver"]:hover { background: rgba(16, 185, 129, 0.15); }
    .interactive-zone[data-zone="GB"] { border-color: rgba(139, 92, 246, 0.6); }
    .interactive-zone[data-zone="GB"]:hover { background: rgba(139, 92, 246, 0.15); }
    .interactive-zone[data-zone="Spleen"] { border-color: rgba(212, 175, 55, 0.6); }
    .interactive-zone[data-zone="Spleen"]:hover { background: rgba(212, 175, 55, 0.15); }
    .interactive-zone[data-zone="Kidney"] { border-color: rgba(59, 130, 246, 0.6); }
    .interactive-zone[data-zone="Kidney"]:hover { background: rgba(59, 130, 246, 0.15); }

    #interactiveReportLockOverlay {
      position: absolute;
      top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 24px;
      box-sizing: border-box;
      z-index: 20;
    }
    .locked-blur {
      filter: blur(3.5px);
      pointer-events: none;
      user-select: none;
    }
    
    /* Premium Modal Styles */
    .premium-modal {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      padding: 16px;
      box-sizing: border-box;
    }
    .premium-modal-content {
      background: #111;
      border: 1px solid var(--gold);
      border-radius: 16px;
      padding: 24px;
      max-width: 440px;
      width: 100%;
      box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
      position: relative;
    }
    .premium-modal-close {
      position: absolute;
      top: 16px; right: 16px;
      background: none; border: none;
      color: #aaa; font-size: 1.5rem;
      cursor: pointer;
      line-height: 1;
    }
    .premium-modal-close:hover { color: #fff; }

    .payment-tab-container {
      display: flex;
      gap: 4px;
      margin-bottom: 20px;
      border: 1px solid #333;
      border-radius: 8px;
      padding: 2px;
      background: #181818;
    }
    .payment-tab {
      flex: 1;
      text-align: center;
      padding: 8px 4px;
      font-size: 0.78rem;
      border-radius: 6px;
      cursor: pointer;
      color: #aaa;
      transition: all 0.2s;
      border: none;
      background: transparent;
      font-weight: 500;
    }
    .payment-tab:hover {
      color: #fff;
    }
    .payment-tab.active {
      background: var(--gold);
      color: #000;
      font-weight: bold;
    }
    .payment-input-group {
      margin-bottom: 15px;
    }
    .payment-input-group label {
      display: block;
      font-size: 0.78rem;
      color: #aaa;
      margin-bottom: 6px;
    }
    .payment-input-group input {
      width: 100%;
      box-sizing: border-box;
      background: #222;
      border: 1px solid #444;
      border-radius: 6px;
      padding: 10px;
      color: #fff;
      font-size: 0.88rem;
    }

    
    /* --- FULLSCREEN CAMERA: letterboxed to the video aspect (WYSIWYG) ---
       width/height/top/left are set by JS (fitFullscreenWrapper) so the preview matches
       exactly what the coach analyses & captures. A full-viewport #fsBackdrop (z-index 9989)
       paints the black bars behind it. */
    #cameraWrapper.fullscreen {
      position: fixed !important;
      max-width: none !important;
      margin: 0 !important;
      border-radius: 0 !important;
      border: none !important;
      z-index: 9990 !important;
      background: #000 !important;
    }
    /* Fullscreen close (✕) — top-left corner, clear of the status bar. */
    #fsCloseBtn { display: none; }
    #cameraWrapper.fullscreen ~ #fsCloseBtn {
      display: flex; align-items: center; justify-content: center;
      position: fixed; z-index: 9996;
      top: max(14px, env(safe-area-inset-top, 0px));
      left: max(14px, env(safe-area-inset-left, 0px));
      width: 42px; height: 42px; border-radius: 50%;
      background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.35);
      color: #fff; font-size: 1.1rem; cursor: pointer;
    }
    #cameraControlsOverlay {
      display: none;
      position: fixed;
      /* Lift the shutter/Close above the Android 3-button nav bar. 80px floor clears
         the nav bar even when the WebView reports a 0 safe-area inset; on devices that
         do report one we add 48px of breathing room on top of it. */
      bottom: max(80px, calc(env(safe-area-inset-bottom, 0px) + 48px));
      left: 0;
      width: 100%;
      z-index: 9995;
      text-align: center;
      padding: 0 20px;
      box-sizing: border-box;
    }
    #cameraWrapper.fullscreen ~ #cameraControlsOverlay {
      display: block;
    }
    .zoom-slider-container {
      background: rgba(0,0,0,0.6);
      padding: 10px 20px;
      border-radius: 20px;
      margin-bottom: 20px;
      display: inline-block;
      width: 80%;
      max-width: 300px;
    }
    .zoom-slider-container input[type=range] {
      width: 100%;
      accent-color: #d4af37;
    }
    /* Hide regular scan button when fullscreen */
    #cameraWrapper.fullscreen ~ div > #scanBtn {
      display: none !important;
    }
    /* In fullscreen the overlay carries its own zoom + shutter, so hide the
       always-on mini zoom bar to keep the immersive view clean. */
    #cameraWrapper.fullscreen #zoomBarLive { display: none !important; }
    /* ── EDGE-TO-EDGE SAFE AREA (Android 15/16 + iOS notch) ──────────────────
       The app's WebView draws under the status bar (top) and 3-button/gesture
       nav bar (bottom). Android WebView frequently reports env(safe-area-inset-*)
       as 0, so we FLOOR the insets with real px that clear the bars. !important +
       last-in-file so this wins over every body padding rule (incl. the 8px
       narrow-width rule and the optimizer's standalone-only rule). Fixed overlays
       (camera, disclaimer) set their own insets and are unaffected. */
    body {
      padding-top: max(32px, env(safe-area-inset-top, 0px)) !important;
      padding-bottom: max(46px, env(safe-area-inset-bottom, 0px)) !important;
    }
