
    .pg-free-meter{display:flex;align-items:center;gap:12px;width:100%;max-width:430px;margin:0;padding:12px 15px;border-radius:14px;background:linear-gradient(135deg,#EAF2FD,#F4F8FE);border:1px solid #CFE0FA;box-shadow:0 3px 14px rgba(54,128,237,.12)}
    .pg-fm-ico{flex-shrink:0;width:38px;height:38px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#3680ED,#2060C0);color:#fff;font-size:16px;box-shadow:0 3px 8px rgba(54,128,237,.35)}
    .pg-fm-body{flex:1;min-width:0}
    .pg-fm-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
    .pg-fm-label{font-size:13px;font-weight:700;color:#2060C0;letter-spacing:.1px}
    .pg-fm-count{font-size:13px;font-weight:700;color:#2060C0;white-space:nowrap}
    .pg-fm-count strong{font-size:17px;font-weight:800;color:#2060C0}
    .pg-fm-sep{opacity:.45;margin:0 2px}
    .pg-fm-limit{opacity:.7}
    .pg-fm-track{height:7px;border-radius:6px;background:rgba(54,128,237,.14);overflow:hidden}
    .pg-fm-fill{height:100%;border-radius:6px;background:linear-gradient(90deg,#60A4F5,#2060C0);transition:width .45s ease}
    .pg-free-meter.low{background:linear-gradient(135deg,#EAF2FD,#F4F8FE);border-color:#CFE0FA;box-shadow:0 3px 14px rgba(54,128,237,.14)}
    .pg-free-meter.low .pg-fm-ico{background:linear-gradient(135deg,#3680ED,#2060C0);box-shadow:0 3px 8px rgba(54,128,237,.35)}
    .pg-free-meter.low .pg-fm-label,.pg-free-meter.low .pg-fm-count{color:#2060C0}
    .pg-free-meter.low .pg-fm-count strong{color:#2060C0}
    .pg-free-meter.low .pg-fm-track{background:rgba(54,128,237,.15)}
    .pg-free-meter.low .pg-fm-fill{background:linear-gradient(90deg,#3680ED,#2060C0)}
    .pg-free-meter.out{background:linear-gradient(135deg,#EAF2FD,#F4F8FE);border-color:#CFE0FA;box-shadow:0 3px 14px rgba(54,128,237,.14)}
    .pg-free-meter.out .pg-fm-ico{background:linear-gradient(135deg,#3680ED,#2060C0);box-shadow:0 3px 8px rgba(54,128,237,.35)}
    .pg-free-meter.out .pg-fm-label,.pg-free-meter.out .pg-fm-count{color:#2060C0}
    .pg-free-meter.out .pg-fm-count strong{color:#2060C0}
    .pg-free-meter.out .pg-fm-track{background:rgba(54,128,237,.15)}
    .pg-free-meter.out .pg-fm-fill{background:linear-gradient(90deg,#60A4F5,#2060C0)}
    .pg-cta-login{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:14px 16px;border-radius:14px;background:linear-gradient(120deg,#3680ED,#60A4F5 55%,#2060C0);color:#fff;box-shadow:0 8px 22px rgba(54,128,237,.28);position:relative;overflow:hidden}
    .pg-cta-login::after{content:'';position:absolute;top:-45%;right:-8%;width:190px;height:190px;background:radial-gradient(circle,rgba(255,255,255,.18),transparent 70%);pointer-events:none}
    .pg-cta-ic{flex-shrink:0;width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.18);color:#fff;font-size:18px;position:relative;z-index:1}
    .pg-cta-txt{flex:1;min-width:0;position:relative;z-index:1}
    .pg-cta-title{font-size:14.5px;font-weight:800;line-height:1.25}
    .pg-cta-sub{font-size:12.5px;font-weight:500;opacity:.92;margin-top:2px}
    .pg-cta-btn{flex-shrink:0;position:relative;z-index:1;display:inline-flex;align-items:center;gap:7px;background:var(--pg-white,#fff);color:#3680ED;border-radius:10px;padding:9px 17px;font-size:13.5px;font-weight:800;text-decoration:none;box-shadow:0 4px 12px rgba(15,23,42,.12);transition:transform var(--pg-trans),box-shadow var(--pg-trans)}
    .pg-cta-btn:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(0,0,0,.2);color:#2060C0}
    .pg-cta-btn i{font-size:12px;transition:transform var(--pg-trans)}
    .pg-cta-btn:hover i{transform:translateX(3px)}
    .pg-hist-hint{display:flex;align-items:center;gap:8px;margin:0 0 6px;padding:10px 14px;border-radius:11px;background:#EAF2FD;border:1px solid #CFE0FA;color:#2060C0;font-size:12.5px;font-weight:600}
    .pg-hist-hint i{color:#2060C0}
    @media (max-width:560px){.pg-cta-login{flex-wrap:wrap}.pg-cta-btn{width:100%;justify-content:center}}
    .pg-wall-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(3px);display:none;align-items:center;justify-content:center;z-index:99999;padding:18px}
    .pg-wall-overlay.show{display:flex}
    .pg-wall{position:relative;width:100%;max-width:420px;background:var(--pg-white,#fff);border-radius:18px;padding:30px 26px 26px;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.3);animation:pgWallIn .22s ease}
    @keyframes pgWallIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
    .pg-wall-x{position:absolute;top:10px;right:14px;border:0;background:transparent;font-size:26px;line-height:1;color:#999999;cursor:pointer}
    .pg-wall-ic{width:62px;height:62px;margin:0 auto 14px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#60A4F5,#2060C0);color:#fff;font-size:26px}
    .pg-wall h3{margin:0 0 8px;font-size:20px;font-weight:800;color:#111111}
    .pg-wall p{margin:0 0 4px;color:#555555;font-size:14px}
    .pg-wall .pg-wall-sub{margin:6px 0 0;color:#777777}
    .pg-wall-actions{display:flex;gap:10px;margin-top:20px}
    .pg-wall-btn{flex:1;border-radius:11px;padding:12px 14px;font-weight:700;font-size:14px;cursor:pointer;border:1px solid transparent}
    .pg-wall-btn.ghost{background:var(--pg-white,#fff);border-color:#ececec;color:#111111}
    .pg-wall-btn.ghost:hover{background:var(--pg-bg,#fafafa)}
    .pg-wall-btn.solid{background:linear-gradient(135deg,#60A4F5,#2060C0);color:#fff}
    .pg-wall-btn.solid:hover{filter:brightness(1.05)}

    /* ═════════════════════════════════════════════════════════════════
       DARK MODE — theme-toggle corrections (design.md §2.2 tokens)
       Grouped at the end for readability. Covers the six components
       still rendering incorrectly on body.theme-dark:
         · .ao-switch knob (advanced-options toggle rows)
         · .pg-wall-btn.ghost, .pg-wall h3/p/sub (guest paywall modal)
         · .pg-free-meter + labels (guest quota banner)
         · .pg-hist-hint (sign-in-to-save banner)
    ═════════════════════════════════════════════════════════════════ */
    /* Toggle-switch knob: bright handle on the dark rail so on/off state is visible */
    body.theme-dark .pg-root .ao-switch .ao-slider::before{background:#F5F5F6;box-shadow:0 1px 4px rgba(0,0,0,.5)}
    body.theme-dark .pg-root .ao-switch .ao-slider{background:rgba(255,255,255,.14)}
    body.theme-dark .pg-root .ao-switch input:checked + .ao-slider{background:#3680ED}
    /* Guest-paywall modal — surface, backdrop, title, body, ghost button */
    body.theme-dark .pg-wall-overlay{background:rgba(0,0,0,.72)}
    body.theme-dark .pg-root .pg-wall{background:#17171A;box-shadow:0 24px 60px rgba(0,0,0,.6)}
    body.theme-dark .pg-root .pg-wall h3{color:#F5F5F6}
    body.theme-dark .pg-root .pg-wall p{color:#DCDCDF}
    body.theme-dark .pg-root .pg-wall .pg-wall-sub{color:#A0A0A6}
    body.theme-dark .pg-root .pg-wall-x{color:#A0A0A6}
    body.theme-dark .pg-root .pg-wall-x:hover{color:#F5F5F6}
    body.theme-dark .pg-root .pg-wall-btn.ghost{background:#18181B;border-color:rgba(255,255,255,.14);color:#F5F5F6}
    body.theme-dark .pg-root .pg-wall-btn.ghost:hover{background:#1C1C1F}
    /* Free-generation meter — banner surface + track (light / normal / low / out) */
    body.theme-dark .pg-root .pg-free-meter,
    body.theme-dark .pg-root .pg-free-meter.low,
    body.theme-dark .pg-root .pg-free-meter.out{background:linear-gradient(135deg,rgba(54,128,237,.16),rgba(54,128,237,.10));border-color:rgba(96,164,245,.28);box-shadow:0 3px 14px rgba(0,0,0,.45)}
    body.theme-dark .pg-root .pg-fm-track,
    body.theme-dark .pg-root .pg-free-meter.low .pg-fm-track,
    body.theme-dark .pg-root .pg-free-meter.out .pg-fm-track{background:rgba(255,255,255,.08)}
    /* Free-meter labels + counts */
    body.theme-dark .pg-root .pg-fm-label,
    body.theme-dark .pg-root .pg-fm-count,
    body.theme-dark .pg-root .pg-free-meter.low .pg-fm-label,
    body.theme-dark .pg-root .pg-free-meter.low .pg-fm-count,
    body.theme-dark .pg-root .pg-free-meter.out .pg-fm-label,
    body.theme-dark .pg-root .pg-free-meter.out .pg-fm-count{color:#F5F5F6}
    body.theme-dark .pg-root .pg-fm-count strong,
    body.theme-dark .pg-root .pg-free-meter.low .pg-fm-count strong,
    body.theme-dark .pg-root .pg-free-meter.out .pg-fm-count strong{color:#60A4F5}
    /* "Sign in to save history" hint banner */
    body.theme-dark .pg-root .pg-hist-hint{background:rgba(54,128,237,.14);border-color:rgba(96,164,245,.28);color:#60A4F5}
    body.theme-dark .pg-root .pg-hist-hint i{color:#60A4F5}

    /* (Generate CTA dark mode moved to assets/css/ai-generate-btn.css — the old
       rule here inverted the button to a pale fill with #0F0F11 text on hover.) */

    /* ─── Range slider thumbs (all four selectors) — pure-white ring → dark canvas ring ─── */
    body.theme-dark .pg-root .ao-range::-webkit-slider-thumb,
    body.theme-dark .pg-root .pg-acc-body input[type=range]::-webkit-slider-thumb{border-color:#0F0F11;box-shadow:0 1px 5px rgba(0,0,0,.5)}
    body.theme-dark .pg-root .ao-range::-moz-range-thumb,
    body.theme-dark .pg-root .pg-acc-body input[type=range]::-moz-range-thumb{border-color:#0F0F11}

    /* ─── Blue text accents on dark (override the old salmon #ef9a9a) ─── */
    body.theme-dark .pg-root .pg-badge-new,
    body.theme-dark .pg-root .pg-kw-pill,
    body.theme-dark .pg-root .pg-hi-num,
    body.theme-dark .pg-root .pg-hist-count,
    body.theme-dark .pg-root .pg-hi-pill.model,
    body.theme-dark .pg-root .tb-tool,
    body.theme-dark .pg-root .pg-spoken{color:#60A4F5}

    /* ─── Blue accent borders on dark (override old dark-red #4a1f1f / #5a2222) ─── */
    body.theme-dark .pg-root .pg-hist-count,
    body.theme-dark .pg-root .pg-hi-pill.model,
    body.theme-dark .pg-root .pg-kw-pill,
    body.theme-dark .pg-root .pg-hist-item:hover,
    body.theme-dark .pg-root .pg-hi-del:hover,
    body.theme-dark .pg-root .pg-badge-free,
    body.theme-dark .pg-root .mi-limit.free{border-color:rgba(96,164,245,.28)}

    /* ─── Trust-strip icon chips (override old semantic-red rgba) ─── */
    body.theme-dark .pg-root .pg-trust-ic{border-color:rgba(96,164,245,.28);color:#60A4F5;background:transparent}
    body.theme-dark .pg-root .pg-trust-item:hover .pg-trust-ic{background:rgba(54,128,237,.16);border-color:#60A4F5;box-shadow:0 4px 10px -4px rgba(96,164,245,.35)}

    /* ─── Toast pill: needs a surface bump + ring to separate from dark canvas ─── */
    body.theme-dark .pg-toast{background:#1C1C1F;color:#F5F5F6;box-shadow:0 12px 30px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.09)}

    /* ─── Select chevron SVG — lighter stroke so the arrow reads on #202020 ─── */
    body.theme-dark .pg-root .pg-sel{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23DCDCDF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")}

    /* ─── Advanced-options select chevrons inherit the same dark stroke ─── */
    body.theme-dark .pg-root .pg-acc-body select{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23DCDCDF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");background-repeat:no-repeat;background-position:right 12px center;background-size:13px}
    