/* Font display optimization */
@font-face { font-display: swap; }

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

  :root {
    --navy:        #f6f8fc;
    --gold:        #1a73e8;
    --gold2:       #1557b0;
    --gold-dim:    rgba(26,115,232,0.08);
    --gold-border: rgba(26,115,232,0.22);
    --slate:       #5f6368;
    --slate2:      #80868b;
    --slate3:      #bdc1c6;
    --text:        #202124;
    --text2:       #444746;
    --card-bg:     #ffffff;
    --card-br:     #dadce0;
    --green:       #188038;
    --purple:      #9334e6;
  }

  html { scroll-behavior: smooth; }

  body {
    min-height: 100vh;
    background: #f6f8fc;
    background-image: none;
    font-family: 'Roboto', 'Google Sans', Arial, sans-serif;
    color: var(--text);
    padding: 0 16px 80px;
  }

  body::before { display:none; }

  .wrap { position:relative; z-index:1; max-width:880px; margin:0 auto; }

  /* ─── HERO ─── */
  .hero { text-align:center; padding:44px 0 10px; }

  .badge {
    display:inline-flex; align-items:center; gap:7px;
    background:var(--gold-dim); border:1px solid var(--gold-border);
    border-radius:100px; padding:5px 18px; margin-bottom:22px;
    font-size:11px; font-weight:500; color:var(--gold);
    letter-spacing:.04em; text-transform:uppercase;
  }

  h1 {
    font-family:'Google Sans','Roboto',sans-serif;
    font-size:clamp(24px,4vw,36px);
    font-weight:400; line-height:1.2; letter-spacing:-.01em;
    color:#202124;
    margin-bottom:12px;
  }

  .subtitle { color:#5f6368; font-size:14px; line-height:1.7; max-width:540px; margin:0 auto 24px; }

  .api-input {
    flex:1; background:#fff; border:1px solid #dadce0;
    border-radius:4px; padding:11px 14px; color:var(--text);
    font-family:monospace; font-size:13px; outline:none; transition:border .2s, box-shadow .2s;
  }
  .api-input:focus { border-color:var(--gold); box-shadow:0 0 0 2px rgba(26,115,232,.15); }
  .api-input::placeholder { color:#bdc1c6; }
  .api-status { font-size:12px; }
  .api-status.ok  { color:var(--green); }
  .api-status.bad { color:#d93025; }


  /* ─── STEPPER ─── */
  .stepper { display:flex; align-items:flex-start; justify-content:center; margin:28px 0 22px; }
  .step-item { display:flex; flex-direction:column; align-items:center; }
  .step-row  { display:flex; align-items:center; }
  .step-dot {
    width:36px; height:36px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:13px; font-weight:500; transition:all .35s;
  }
  .step-dot.pending { background:#f1f3f4; border:2px solid #dadce0; color:#80868b; }
  .step-dot.active  { background:#e8f0fe; border:2px solid var(--gold); color:var(--gold); box-shadow:0 0 0 4px rgba(26,115,232,.12); }
  .step-dot.done    { background:var(--gold); border:2px solid var(--gold); color:#fff; }
  .step-line { width:56px; height:2px; background:#dadce0; transition:background .4s; }
  .step-line.done { background:var(--gold); }
  .step-lbl { font-size:10px; margin-top:6px; color:#80868b; letter-spacing:.04em; text-transform:uppercase; }
  .step-lbl.active { color:var(--gold); }

  /* ─── CARDS ─── */
  .card { background:#fff; border:1px solid #dadce0; border-radius:8px; padding:24px; margin-bottom:14px; box-shadow:0 1px 3px rgba(0,0,0,.08); }
  .fade-up { animation:fadeUp .4s ease forwards; }

  /* ─── TEXT ─── */
  .sec-title { font-family:'Google Sans','Roboto',sans-serif; font-size:18px; font-weight:500; margin-bottom:5px; color:#202124; }
  .sec-desc  { font-size:12px; color:#5f6368; margin-bottom:18px; }
  .field-lbl { font-size:11px; font-weight:500; color:#444746; letter-spacing:.04em; text-transform:uppercase; display:block; margin-bottom:8px; }

  /* ─── INPUTS ─── */
  .textarea {
    width:100%; background:#fff; border:1px solid #dadce0;
    border-radius:4px; padding:14px 16px; color:#202124; font-family:inherit;
    font-size:13px; outline:none; transition:border .2s,box-shadow .2s; resize:vertical; line-height:1.7;
  }
  .textarea:focus { border-color:var(--gold); box-shadow:0 0 0 2px rgba(26,115,232,.15); }
  .textarea::placeholder { color:#bdc1c6; }
  .wc { font-size:11px; color:#5f6368; margin-top:7px; }

  /* ─── BUTTONS ─── */
  .btn-gold {
    background:var(--gold); color:#fff;
    border:none; padding:10px 24px; border-radius:4px;
    font-weight:500; font-size:14px; cursor:pointer; font-family:inherit;
    transition:background .2s, box-shadow .2s; letter-spacing:.01em;
  }
  .btn-gold:hover:not(:disabled) { background:#1557b0; box-shadow:0 1px 4px rgba(0,0,0,.25); }
  .btn-gold:disabled { opacity:.5; cursor:not-allowed; }

  .btn-ghost {
    background:transparent; border:1px solid #dadce0;
    color:#444746; padding:9px 18px; border-radius:4px;
    cursor:pointer; font-family:inherit; font-size:13px; font-weight:500;
    transition:background .2s, border-color .2s;
  }
  .btn-ghost:hover { background:#f1f3f4; border-color:#c5c7c9; }

  .btn-row { display:flex; justify-content:space-between; align-items:center; margin-top:20px; flex-wrap:wrap; gap:10px; }
  .btn-r   { display:flex; justify-content:flex-end; margin-top:20px; }
  .btn-grp { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

  /* ─── ERR / INFO ─── */
  .err { padding:12px 16px; background:#fce8e6; border:1px solid #f5c6c4; border-radius:4px; color:#c5221f; font-size:13px; margin-top:14px; display:none; }
  .info-box { background:#e8f0fe; border:1px solid #c5d4f6; border-radius:8px; padding:14px 16px; margin-top:16px; }
  .info-box-title { font-size:11px; font-weight:500; color:var(--gold); margin-bottom:9px; text-transform:uppercase; letter-spacing:.04em; }
  .info-row { font-size:12px; color:#444746; display:flex; gap:8px; margin-bottom:5px; }
  .info-num { color:var(--gold); flex-shrink:0; }

  /* ─── GENERATING ─── */
  .gen-icon {
    width:76px; height:76px; border-radius:50%;
    background:#e8f0fe; border:2px solid #c5d4f6;
    display:flex; align-items:center; justify-content:center;
    margin:0 auto 26px; font-size:32px; animation:spin 3s linear infinite;
  }
  .log-row {
    display:flex; align-items:center; gap:12px;
    padding:11px 15px; border-radius:4px; margin-bottom:8px;
    border:1px solid #f1f3f4; background:#f8f9fa;
    font-size:12px; color:#bdc1c6; transition:all .4s;
  }
  .log-row.on { background:#e8f0fe; border-color:#c5d4f6; color:#202124; }
  .log-dot { width:20px; height:20px; border-radius:50%; background:#dadce0; flex-shrink:0; }
  .spin-sm {
    width:20px; height:20px; border:2px solid #dadce0;
    border-top-color:var(--gold); border-radius:50%;
    animation:spin .8s linear infinite; flex-shrink:0;
  }

  .tabs { display:flex; gap:0; margin-bottom:16px; border-bottom:2px solid #dadce0; }
  .tab {
    padding:10px 20px; border-radius:0; cursor:pointer; font-family:inherit;
    font-size:13px; font-weight:500; border:none; border-bottom:3px solid transparent;
    color:#5f6368; background:transparent; transition:all .2s; margin-bottom:-2px;
  }
  .tab.on { border-bottom-color:var(--gold); color:var(--gold); background:transparent; }
  .tab:not(.on):hover { color:#202124; background:#f1f3f4; }

  /* ─── RESUME DOC ─── */
  .resume-shell { background:#f1f5f9; border-radius:14px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.5); }
  #resume-doc {
    background:#fff; color:#18181b; font-family:'Calibri',Georgia,serif;
    font-size:9.5pt; line-height:1.55; padding:32px 36px; max-width:740px; margin:0 auto;
    text-align:left;
  }
  .r-head { background:#1a3558; color:#fff; padding:18px 22px; margin-bottom:16px; }
  .r-name { font-size:20pt; font-weight:700; letter-spacing:.02em; margin-bottom:4px; }
  .r-sub  { font-size:9pt; color:#93c5fd; margin-bottom:10px; }
  .r-con  { font-size:8.5pt; color:#bfdbfe; display:flex; flex-wrap:wrap; gap:12px 20px; }
  .r-sec  { font-size:9pt; font-weight:700; color:#1a3558; text-transform:uppercase; letter-spacing:.09em; border-bottom:1.5px solid #1a3558; padding-bottom:3px; margin:14px 0 8px; }
  .r-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:3px 6px; }
  .r-cell { background:#f0f4f8; padding:4px 8px; font-size:8.5pt; color:#334155; border-radius:2px; }
  .r-eh   { display:flex; justify-content:space-between; align-items:baseline; }
  .r-et   { font-weight:700; color:#1a3558; font-size:9.5pt; }
  .r-em   { color:#64748b; font-size:8pt; white-space:nowrap; margin-left:8px; }
  .r-ul   { margin:4px 0 0; padding:0; list-style:none; }
  .r-li   { position:relative; padding-left:12px; margin-bottom:3px; color:#374151; font-size:8.5pt; }
  .r-li::before { content:'•'; position:absolute; left:0; color:#1a3558; }
  .r-sk   { display:flex; margin-bottom:3px; font-size:8.5pt; }
  .r-sk-k { font-weight:700; color:#1a3558; width:155px; flex-shrink:0; }
  .r-cg   { display:grid; grid-template-columns:1fr 1fr; gap:2px 20px; font-size:8.5pt; }
  .r-foot { margin-top:14px; text-align:left; font-size:8pt; color:#94a3b8; border-top:1px solid #e2e8f0; padding-top:8px; }
  .r-ital { font-size:8.5pt; font-style:italic; color:#64748b; margin:0; }

  /* ─── COVER LETTER DOC ─── */
  #cover-doc {
    background:#fff; color:#18181b; font-family:'Calibri',Georgia,serif;
    font-size:9.5pt; line-height:1.7; padding:40px 44px; max-width:740px; margin:0 auto;
    text-align:left;
  }
  .cl-meta   { font-size:8.5pt; color:#64748b; margin-bottom:6px; text-align:left; }
  .cl-date   { font-size:8.5pt; color:#374151; margin-bottom:20px; text-align:left; }
  .cl-addr   { font-size:8.5pt; color:#374151; margin-bottom:20px; line-height:1.6; text-align:left; }
  .cl-sub    { font-weight:700; color:#1a3558; font-size:9.5pt; margin-bottom:18px; text-align:left; }
  .cl-body   { font-size:9pt; color:#374151; margin-bottom:12px; line-height:1.75; text-align:left; }
  .cl-sign   { margin-top:28px; font-size:9pt; color:#374151; text-align:left; }
  .cl-kw     { background:rgba(251,191,36,.18); border-radius:2px; padding:0 2px; }
  .cl-gen-wrap { text-align:center; padding:40px 20px; }

  /* ─── WATERMARK ─── */
  .watermark-wrap { position:relative; }
  .watermark-wrap::after { display:none; } /* replaced by canvas overlay */
  .watermark-wrap.unlocked .wm-canvas-overlay { display:none !important; }

  .wm-canvas-overlay {
    position:absolute; inset:0; z-index:20;
    pointer-events:none; border-radius:inherit;
    overflow:hidden;
  }
  .wm-canvas-overlay canvas {
    position:absolute; top:0; left:0;
    width:100%; height:100%;
    border-radius:inherit;
  }

  /* ─── BOTTOM-HALF BLUR OVERLAY (locked state) ─── */
  .resume-blur-bottom {
    display:none;
    position:absolute; left:0; right:0; bottom:0;
    height:50%; z-index:19;
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    background:rgba(246,248,252,0.55);
    border-radius:0 0 8px 8px;
    pointer-events:none;
  }
  .watermark-wrap:not(.unlocked) .resume-blur-bottom { display:block; }

  /* ─── SCREENSHOT PREVENTION ─── */

  /* ─── SCREENSHOT PREVENTION ─── */
  .no-screenshot {
    -webkit-user-select:none; -moz-user-select:none; user-select:none;
    -webkit-touch-callout:none;
  }

  .paywall-banner-resume, .paywall-banner-cover {
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
    padding:16px 20px; border-radius:8px; margin-bottom:16px;
  }
  .paywall-banner-resume {
    background:#e8f0fe; border:1px solid #c5d4f6;
  }
  .paywall-banner-cover {
    background:#f3e8fd; border:1px solid #d7aefb;
  }
  .paywall-left { display:flex; flex-direction:column; gap:4px; }
  .paywall-title { font-size:14px; font-weight:500; }
  .paywall-title-resume { color:#1a73e8; }
  .paywall-title-cover  { color:#9334e6; }
  .paywall-sub   { font-size:12px; color:#5f6368; }
  .btn-pay-resume {
    background:#1a73e8; color:#fff;
    border:none; padding:10px 24px; border-radius:4px;
    font-weight:500; font-size:14px; cursor:pointer; font-family:inherit;
    transition:background .2s; display:flex; align-items:center; gap:8px; white-space:nowrap;
  }
  .btn-pay-resume:hover { background:#1557b0; }
  .btn-pay-cover {
    background:#9334e6; color:#fff;
    border:none; padding:10px 24px; border-radius:4px;
    font-weight:500; font-size:14px; cursor:pointer; font-family:inherit;
    transition:background .2s; display:flex; align-items:center; gap:8px; white-space:nowrap;
  }
  .btn-pay-cover:hover { background:#7627c0; }

  .doc-lock-overlay {
    position:absolute; bottom:0; left:0; right:0; height:120px;
    background:linear-gradient(to bottom, transparent 0%, rgba(246,248,252,0.92) 100%);
    border-radius:0 0 8px 8px; pointer-events:none; z-index:5;
    display:flex; align-items:flex-end; justify-content:center; padding-bottom:18px;
  }
  .doc-lock-msg {
    font-size:12px; font-weight:500; color:#1a73e8;
    letter-spacing:.04em; text-transform:uppercase; opacity:.85;
  }
  .cl-gen-btn {
    background:#9334e6; color:#fff;
    border:none; padding:10px 28px; border-radius:4px;
    font-weight:500; font-size:14px; cursor:pointer; font-family:inherit;
    transition:background .2s; display:inline-flex; align-items:center; gap:8px;
  }
  .cl-gen-btn:hover:not(:disabled) { background:#7627c0; }
  .cl-gen-btn:disabled { opacity:.4; cursor:not-allowed; }
  .cl-score-row { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
  .cl-score-pill {
    padding:5px 14px; border-radius:20px; font-size:11px; font-weight:700;
    letter-spacing:.04em; text-transform:uppercase;
  }
  .cl-kw-bar { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }

  /* ─── ANALYSIS ─── */
  .scores-row { display:flex; justify-content:space-around; padding:8px 0; flex-wrap:wrap; gap:16px; }
  .ring-wrap  { text-align:center; }
  .ring-lbl   { font-size:10px; color:#5f6368; margin-top:4px; letter-spacing:.04em; text-transform:uppercase; }
  .chip { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:500; margin:3px; }
  .ch-g { background:#e6f4ea; border:1px solid #ceead6; color:#188038; }
  .ch-a { background:#e8f0fe; border:1px solid #c5d4f6; color:#1a73e8; }
  .ch-r { background:#fce8e6; border:1px solid #f5c6c4; color:#c5221f; }
  .a-list { margin:0; padding:0; list-style:none; }
  .a-item { display:flex; gap:8px; margin-bottom:8px; font-size:12px; color:#444746; }
  .hint-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:8px 20px; }
  .hint-item { font-size:12px; color:#444746; display:flex; gap:8px; }
  .hint-arr  { color:#1a73e8; flex-shrink:0; }
  .role-meta { margin-top:10px; padding:9px 14px; background:#f8f9fa; border-radius:4px; font-size:12px; }

  /* ─── TEMPLATE PICKER ─── */
  .tpl-section { margin-bottom:20px; }
  .tpl-section-title { font-size:13px; font-weight:500; color:#202124; margin-bottom:4px; }
  .tpl-section-sub { font-size:11px; color:#5f6368; margin-bottom:14px; }
  .tpl-scroll-wrap {
    overflow-x:auto; padding-bottom:10px;
    scrollbar-width:thin; scrollbar-color:#c5d4f6 #f1f3f4;
  }
  .tpl-scroll-wrap::-webkit-scrollbar { height:6px; }
  .tpl-scroll-wrap::-webkit-scrollbar-track { background:#f1f3f4; border-radius:3px; }
  .tpl-scroll-wrap::-webkit-scrollbar-thumb { background:#c5d4f6; border-radius:3px; }
  .tpl-grid {
    display:grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 148px;
    gap:10px;
    width:max-content;
  }
  .tpl-card {
    border:2px solid #dadce0; border-radius:8px; cursor:pointer;
    overflow:hidden; transition:border-color .2s, box-shadow .2s;
    background:#fff; position:relative; width:148px;
  }
  .tpl-card:hover { border-color:#1a73e8; box-shadow:0 2px 8px rgba(26,115,232,.15); }
  .tpl-card.selected { border-color:#1a73e8; box-shadow:0 0 0 3px rgba(26,115,232,.18); }
  .tpl-card.selected::after {
    content:'✓'; position:absolute; top:6px; right:8px;
    font-size:13px; font-weight:700; color:#1a73e8;
  }
  .tpl-preview {
    height:90px; overflow:hidden; background:#f8f9fa;
    display:flex; align-items:flex-start; justify-content:center;
    padding:6px; font-size:3.5px; line-height:1.3; color:#444;
    pointer-events:none;
  }
  .tpl-meta { padding:7px 9px; border-top:1px solid #f1f3f4; }
  .tpl-name { font-size:11px; font-weight:600; color:#202124; }
  .tpl-tag  { font-size:9.5px; color:#5f6368; margin-top:1px; }
  .tpl-badge {
    display:inline-block; font-size:8.5px; font-weight:600;
    padding:1px 6px; border-radius:10px; margin-top:3px;
    text-transform:uppercase; letter-spacing:.04em;
  }
  .badge-ats  { background:#e6f4ea; color:#188038; border:1px solid #ceead6; }
  .badge-exec { background:#e8f0fe; color:#1a73e8; border:1px solid #c5d4f6; }
  .badge-tech { background:#f3e8fd; color:#9334e6; border:1px solid #d7aefb; }
  .badge-intl { background:#fef0e0; color:#b06000; border:1px solid #f5d5a0; }
  .tpl-eye-btn {
    display:block; width:100%;
    background:linear-gradient(135deg,#1a73e8,#1557b0);
    border:none; border-top:1px solid #1557b0;
    padding:6px 0; font-size:10.5px; font-weight:600;
    color:#fff; cursor:pointer; font-family:inherit;
    letter-spacing:.03em;
    transition:background .15s, box-shadow .15s;
    border-radius:0 0 6px 6px;
  }
  .tpl-eye-btn:hover {
    background:linear-gradient(135deg,#1557b0,#0d47a1);
    box-shadow:0 2px 6px rgba(26,115,232,.35);
  }

  /* ─── SAMPLE MODAL ─── */
  .sample-modal-overlay {
    position:fixed; inset:0; background:rgba(0,0,0,.6); backdrop-filter:blur(3px);
    z-index:9500; display:none; align-items:center; justify-content:center; padding:20px;
  }
  .sample-modal-overlay.open { display:flex; }
  .sample-modal {
    background:#fff; border-radius:12px; max-width:760px; width:100%;
    max-height:90vh; overflow:hidden; display:flex; flex-direction:column;
    box-shadow:0 20px 60px rgba(0,0,0,.4);
  }
  .sample-modal-head {
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 20px; border-bottom:1px solid #dadce0; flex-shrink:0;
  }
  .sample-modal-title { font-size:14px; font-weight:600; color:#202124; }
  .sample-modal-close {
    background:none; border:none; font-size:20px; cursor:pointer; color:#5f6368;
    padding:0 4px; line-height:1;
  }
  .sample-modal-body { overflow-y:auto; flex:1; padding:0; }
  .sample-modal-foot {
    padding:12px 20px; border-top:1px solid #dadce0; display:flex; gap:10px;
    justify-content:flex-end; flex-shrink:0; background:#f8f9fa;
  }

  /* ─── ANIMATIONS ─── */
  @keyframes spin   { to { transform:rotate(360deg); } }
  @keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

  /* ─── PRINT ─── */
  @media print {
    .no-print { display:none!important; }
    body { background:#fff!important; padding:0!important; }
    body::before { display:none; }
    .resume-shell { box-shadow:none!important; border-radius:0!important; }
    /* Show watermark canvas in print */
    .watermark-wrap:not(.unlocked) .wm-canvas-overlay { display:block!important; }
    /* Block printing of lock-protected content — blur and hide */
    .no-screenshot:not(.unlocked) { filter: blur(6px); }
  }

  @media (max-width:600px) {
    .step-line { width:32px; }
    .r-grid { grid-template-columns:1fr 1fr; }
    .r-cg   { grid-template-columns:1fr; }
  }

  /* ─── POWERED-BY BAR ─── */
  .powered-bar {
    display:flex; align-items:center; justify-content:center; gap:12px;
    padding:9px 18px; background:#e6f4ea;
    border:1px solid #ceead6; border-radius:8px; margin-bottom:6px;
    font-size:11px; color:#444746; flex-wrap:wrap;
  }
  .powered-pill {
    background:#ceead6; border:1px solid #a8d5b5;
    border-radius:4px; padding:2px 10px; font-size:10px; font-weight:500;
    color:#188038; letter-spacing:.04em; text-transform:uppercase;
  }

  .btn-locked-placeholder {
    display:inline-flex; align-items:center; gap:6px;
    background:#f1f3f4; border:1px solid #dadce0;
    color:#80868b; padding:9px 16px; border-radius:4px;
    font-size:12px; font-weight:500; cursor:not-allowed; font-family:inherit;
  }

  /* ─── PAY SUCCESS TOAST ─── */
  .pay-toast {
    position:fixed; bottom:28px; left:50%; transform:translateX(-50%) translateY(80px);
    background:#188038; color:#fff;
    padding:14px 28px; border-radius:8px; font-size:14px; font-weight:500;
    box-shadow:0 4px 12px rgba(0,0,0,.2); z-index:9999;
    transition:transform .4s cubic-bezier(.34,1.56,.64,1), opacity .4s;
    opacity:0; display:flex; align-items:center; gap:10px;
  }
  .pay-toast.show { transform:translateX(-50%) translateY(0); opacity:1; }

  /* ─── ADMIN GEAR TRIGGER ─── */
  .admin-trigger {
    position:fixed; bottom:16px; right:16px; z-index:8000;
    width:32px; height:32px; border-radius:50%;
    background:#f1f3f4; border:1px solid #dadce0;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; font-size:14px; opacity:.35; transition:opacity .25s;
  }
  .admin-trigger:hover { opacity:.8; }

  /* ─── ADMIN MODAL ─── */
  .modal-overlay {
    position:fixed; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(4px);
    z-index:9000; display:none; align-items:center; justify-content:center; padding:20px;
  }
  .modal-overlay.open { display:flex; }
  .admin-modal {
    background:#fff; border:1px solid #dadce0;
    border-radius:8px; width:100%; max-width:580px; max-height:90vh;
    overflow-y:auto; padding:32px; position:relative;
    box-shadow:0 8px 24px rgba(0,0,0,.15);
  }
  .modal-close {
    position:absolute; top:16px; right:16px;
    background:#f1f3f4; border:1px solid #dadce0;
    color:#5f6368; width:32px; height:32px; border-radius:50%;
    font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center;
    font-family:inherit;
  }
  .modal-close:hover { background:#fce8e6; color:#c5221f; }
  .modal-title { font-family:'Google Sans','Roboto',sans-serif; font-size:20px; font-weight:500; margin-bottom:4px; color:#202124; }
  .modal-sub   { font-size:12px; color:#5f6368; margin-bottom:24px; }
  .admin-section { margin-bottom:24px; }
  .admin-section-title {
    font-size:11px; font-weight:500; color:#1a73e8; letter-spacing:.06em;
    text-transform:uppercase; margin-bottom:12px; display:flex; align-items:center; gap:6px;
  }
  .admin-field { margin-bottom:14px; }
  .admin-label { font-size:11px; font-weight:500; color:#444746; display:block; margin-bottom:6px; }
  .admin-input {
    width:100%; background:#fff; border:1px solid #dadce0;
    border-radius:4px; padding:11px 14px; color:#202124; font-family:monospace;
    font-size:13px; outline:none; transition:border .2s;
  }
  .admin-input:focus { border-color:#1a73e8; box-shadow:0 0 0 2px rgba(26,115,232,.15); }
  .admin-input::placeholder { color:#bdc1c6; font-family:'Roboto',sans-serif; }
  .admin-hint { font-size:11px; color:#5f6368; margin-top:5px; line-height:1.55; }
  .admin-hint a { color:#1a73e8; text-decoration:none; }
  .admin-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; background:#f8f9fa; border:1px solid #dadce0; border-radius:4px; }
  .admin-toggle-info { display:flex; flex-direction:column; gap:3px; }
  .admin-toggle-name { font-size:13px; font-weight:500; color:#202124; }
  .admin-toggle-desc { font-size:11px; color:#5f6368; }
  .toggle-switch { position:relative; width:44px; height:24px; flex-shrink:0; }
  .toggle-switch input { opacity:0; width:0; height:0; }
  .toggle-slider {
    position:absolute; inset:0; background:#dadce0;
    border-radius:24px; cursor:pointer; transition:background .25s;
  }
  .toggle-slider::before {
    content:''; position:absolute; height:18px; width:18px; left:3px; top:3px;
    background:#fff; border-radius:50%; transition:transform .25s; box-shadow:0 1px 3px rgba(0,0,0,.2);
  }
  .toggle-switch input:checked + .toggle-slider { background:#188038; }
  .toggle-switch input:checked + .toggle-slider::before { transform:translateX(20px); }
  .admin-save-btn {
    width:100%; background:#1a73e8;
    color:#fff; border:none; padding:12px; border-radius:4px;
    font-weight:500; font-size:14px; cursor:pointer; font-family:inherit;
    transition:background .2s; margin-top:8px;
  }
  .admin-save-btn:hover { background:#1557b0; }
  .admin-divider { border:none; border-top:1px solid #dadce0; margin:24px 0; }
  .admin-login-box { text-align:center; padding:8px 0 16px; }
  .admin-badge { display:inline-flex; align-items:center; gap:6px; background:#fce8e6; border:1px solid #f5c6c4; border-radius:4px; padding:6px 14px; font-size:12px; color:#c5221f; margin-bottom:20px; }
  .admin-logout-btn { background:#fce8e6; border:1px solid #f5c6c4; color:#c5221f; padding:8px 18px; border-radius:4px; font-size:12px; cursor:pointer; font-family:inherit; transition:background .2s; }
  .admin-logout-btn:hover { background:#fad2cf; }
  .admin-stat-row { display:flex; gap:12px; flex-wrap:wrap; margin-top:10px; }
  .admin-stat { background:#f8f9fa; border:1px solid #dadce0; border-radius:8px; padding:10px 16px; text-align:center; flex:1; min-width:80px; }
  .admin-stat-val { font-size:18px; font-weight:500; color:#202124; }
  .admin-stat-lbl { font-size:10px; color:#5f6368; text-transform:uppercase; letter-spacing:.06em; margin-top:2px; }
  .stripe-guide { background:#e8f0fe; border:1px solid #c5d4f6; border-radius:8px; padding:12px 14px; margin-top:10px; font-size:11px; color:#5f6368; line-height:1.7; }
  .stripe-guide strong { color:#202124; }
  .stripe-guide code { background:#f1f3f4; padding:1px 5px; border-radius:4px; font-family:monospace; color:#1a73e8; font-size:10px; }
#rieTestRunner{
  position:fixed;top:0;left:0;right:0;bottom:0;z-index:99999;
  background:rgba(6,14,28,.97);overflow-y:auto;display:none;
  font-family:'DM Sans',monospace;
}
.rtr-inner{max-width:740px;margin:0 auto;padding:32px 20px 60px;}
.rtr-title{font-family:'Google Sans','Roboto',sans-serif;font-size:22px;font-weight:500;color:#1a73e8;margin-bottom:4px;}
.rtr-sub{font-size:12px;color:#64748b;margin-bottom:24px;}
.rtr-close{float:right;background:rgba(239,68,68,.15);border:1px solid rgba(239,68,68,.25);
  color:#c5221f;padding:6px 16px;border-radius:4px;cursor:pointer;font-size:12px;font-family:inherit;}
.rtr-section{font-size:11px;font-weight:700;color:#5f6368;text-transform:uppercase;
  letter-spacing:.08em;margin:20px 0 8px;}
.rtr-row{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:8px;
  margin-bottom:5px;font-size:12px;border:1px solid transparent;}
.rtr-pass{background:#e6f4ea;border-color:#ceead6;color:#188038;}
.rtr-fail{background:#fce8e6;border-color:#f5c6c4;color:#c5221f;}
.rtr-warn{background:#fef7e0;border-color:#fdd663;color:#b06000;}
.rtr-skip{background:#f1f3f4;border-color:#dadce0;color:#80868b;}
.rtr-icon{font-size:14px;flex-shrink:0;margin-top:1px;}
.rtr-name{font-weight:600;flex:1;}
.rtr-detail{font-size:11px;color:#64748b;margin-top:2px;}
.rtr-summary{margin-top:24px;padding:16px 20px;border-radius:12px;
  background:#fff;border:1px solid #dadce0;}
.rtr-run-btn{width:100%;background:#1a73e8;
  color:#fff;border:none;padding:10px 20px;border-radius:4px;font-weight:500;
  font-size:14px;cursor:pointer;font-family:inherit;margin-top:16px;}
