/* ============================================================
   PINK DIAMOND — additions on top of the ported Diamond system
   1. ad layout   (two vertical est. $445 rails, one est. $470 bottom unit,
                   dismissible grey pop-ups, rate card)
   2. unfiltered  (the paid 18+ add-on: pill, switch, card, modals)
   ============================================================ */

/* ============================================================
   1 · AD LAYOUT
   ============================================================ */

/* ---- black boxes: persistent, rotating inventory ---- */
.ad-box{position:relative;background:#000;border:1px solid var(--line);overflow:hidden;cursor:pointer}
.ad-box::before{content:'';position:absolute;inset:0;background:
  radial-gradient(120% 60% at 20% 0%,rgba(255,120,200,.12),transparent 60%);pointer-events:none}
.ad-box.ad-in{animation:ad-enter .55s cubic-bezier(.2,.7,.2,1)}
@keyframes ad-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ad-box:hover{border-color:var(--accent)}

.ad-kicker{display:block;font-family:'DM Mono',monospace;font-size:8px;letter-spacing:.3em;color:#8d7a86}
.ad-title{display:block;font-family:'Dhurjati','Manrope',sans-serif;font-size:26px;line-height:1.02;
  letter-spacing:-.02em;color:#fff;margin:10px 0 8px}
.ad-body{margin:0;font-size:11px;line-height:1.6;color:#b9a8b4}
.ad-cta{display:inline-flex;gap:10px;align-items:center;margin-top:14px;font-size:10px;letter-spacing:.08em;
  color:var(--electric);border-bottom:1px solid rgba(255,158,216,.35);padding-bottom:5px}
.ad-served{position:absolute;bottom:8px;left:0;right:0;text-align:center;font-family:'DM Mono',monospace;
  font-size:7px;letter-spacing:.2em;color:#5d4e58}

/* ---- the two vertical placements (est. $445/mo each) ---- */
.ad-rail{position:fixed;top:118px;z-index:11;width:172px;display:flex;flex-direction:column;gap:8px}
.ad-rail-left{left:14px}
.ad-rail-right{right:14px}
.ad-rail .ad-box{height:600px;padding:22px 18px}
.ad-rail-tag,.ad-leaderboard-tag{font-family:'DM Mono',monospace;font-size:7px;letter-spacing:.26em;
  color:var(--muted);opacity:.7}

/* ---- the one horizontal placement (est. $470/mo) ---- */
.ad-leaderboard{position:fixed;bottom:0;left:0;right:0;z-index:12;display:flex;flex-direction:column;
  align-items:center;gap:4px;padding:8px 14px 10px;
  background:linear-gradient(180deg,rgba(8,6,10,0),rgba(8,6,10,.92) 55%);backdrop-filter:blur(10px)}
html[data-theme="light"] .ad-leaderboard{background:linear-gradient(180deg,rgba(250,241,247,0),rgba(250,241,247,.94) 55%)}
.ad-leaderboard .ad-box{width:min(970px,100%);height:90px;padding:12px 24px;
  display:flex;align-items:center;gap:24px}
.ad-leaderboard .ad-kicker{flex:0 0 auto;writing-mode:horizontal-tb}
.ad-leaderboard .ad-title{font-size:22px;margin:0;flex:0 0 auto}
.ad-leaderboard .ad-body{flex:1 1 auto}
.ad-leaderboard .ad-cta{margin:0;flex:0 0 auto}
.ad-leaderboard .ad-served{display:none}
body{padding-bottom:116px}

/* keep the page clear of the rails */
@media (min-width:1280px){ .page-shell{max-width:min(1400px,calc(100vw - 400px))} }
@media (max-width:1279px){ .ad-rail{display:none} }

/* ---- grey boxes: dismissible pop-up ads ---- */
.ad-popup{position:fixed;right:22px;bottom:128px;z-index:50;width:320px;
  background:#2b2730;border:1px solid rgba(255,255,255,.14);border-radius:10px;
  box-shadow:0 26px 70px rgba(0,0,0,.55);opacity:0;transform:translateY(14px) scale(.97);
  transition:opacity .32s ease,transform .32s cubic-bezier(.2,.7,.2,1)}
.ad-popup.open{opacity:1;transform:none}
.ad-popup-inner{padding:22px 20px 26px;cursor:pointer;position:relative}
.ad-popup .ad-title{font-size:24px}
.ad-popup .ad-served{position:static;display:block;text-align:left;margin-top:14px;color:#7d7280}
.ad-popup-close{position:absolute;top:6px;right:8px;width:28px;height:28px;border-radius:50%;
  display:grid;place-items:center;font-size:18px;line-height:1;color:#cfc4cd;z-index:2;
  background:rgba(255,255,255,.06);transition:.2s}
.ad-popup-close:hover{background:var(--heat);color:#fff;transform:rotate(90deg)}
@media (max-width:620px){ .ad-popup{left:14px;right:14px;width:auto;bottom:118px}
  /* the leaderboard's text stack is tight on phones: drop the CTA link */
  .ad-leaderboard .ad-cta{display:none}
  .ad-leaderboard .ad-box{padding:10px 14px;gap:12px}
  .ad-leaderboard .ad-body{font-size:10px}
}

/* ---- rate card ---- */
.rate-card{display:flex;flex-direction:column;gap:2px;margin:0 0 26px;border-top:1px solid var(--line)}
.rate-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;
  padding:14px 0;border-bottom:1px solid var(--line)}
.rate-box{width:16px;height:22px;border:1px solid var(--line);display:block}
.rate-box.is-black{background:#000}
.rate-box.is-grey{background:#2b2730}
.rate-meta strong{display:block;font-size:13px;font-weight:600}
.rate-meta span{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.1em;color:var(--muted)}
.rate-price{font-family:'Dhurjati','Manrope',sans-serif;font-size:28px;letter-spacing:-.03em;color:var(--ink)}
.rate-price i{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.1em;color:var(--muted);font-style:normal}

.ad-legend{display:flex;flex-direction:column;gap:8px;margin-bottom:22px;
  font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.08em;color:var(--muted)}
.ad-legend span{display:flex;align-items:center;gap:10px}
.legend-box{width:12px;height:12px;border:1px solid var(--line);display:inline-block}
.legend-box.is-black{background:#000}
.legend-box.is-grey{background:#2b2730}

.ad-platforms{margin:26px 0 24px}
.ad-platforms-label{display:block;font-family:'DM Mono',monospace;font-size:8px;letter-spacing:.28em;
  color:var(--muted);margin-bottom:12px}
.platform-chips{display:flex;flex-wrap:wrap;gap:8px}
.platform-chips b{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.14em;font-weight:400;
  border:1px solid var(--glass-brd);border-radius:20px;padding:7px 13px;color:var(--soft)}
.platform-chips b:hover{border-color:var(--accent);color:var(--ink)}

/* ============================================================
   2 · UNFILTERED MODE (the paid 18+ add-on)
   ============================================================ */
.heat-tag{font-family:'DM Mono',monospace;font-size:8px;letter-spacing:.16em;vertical-align:middle;
  border:1px solid var(--heat);color:var(--heat);border-radius:20px;padding:3px 7px;margin-left:8px}

/* ---- header pill ---- */
.heat-pill{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--glass-brd);
  border-radius:20px;padding:7px 13px;font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.16em;
  color:var(--muted);transition:.25s}
.heat-pill:hover{border-color:var(--heat);color:var(--ink)}
.heat-dot{width:6px;height:6px;border-radius:50%;background:var(--muted);transition:.25s}
.heat-pill.on{border-color:var(--heat);color:var(--heat);background:var(--heat-soft)}
.heat-pill.on .heat-dot{background:var(--heat);box-shadow:0 0 0 4px var(--heat-soft);animation:heat-pulse 2s infinite}
@keyframes heat-pulse{50%{box-shadow:0 0 0 8px rgba(255,79,156,.05)}}
.nav-heat{color:var(--heat) !important;opacity:.85}
.nav-heat:hover{opacity:1}

/* ---- the section ---- */
.heat-section{padding-top:105px}
.heat-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:7vw;align-items:start}
.heat-copy h2{font-size:clamp(45px,5vw,70px);line-height:1.04;letter-spacing:-.05em;font-weight:600;
  margin:0 0 25px;font-family:'Dhurjati','Manrope',sans-serif}
.heat-copy h2 span{color:var(--heat)}
.heat-copy>p{color:var(--muted);font-size:15px;line-height:1.85;margin-bottom:28px}
.heat-copy>p strong{color:var(--ink)}
.heat-list{list-style:none;margin:0 0 30px;padding:0;display:flex;flex-direction:column;gap:14px}
.heat-list li{font-size:13px;line-height:1.7;color:var(--muted);padding-left:18px;position:relative}
.heat-list li::before{content:'◆';position:absolute;left:0;top:1px;font-size:8px;color:var(--heat)}
.heat-list b{color:var(--ink);font-weight:600}
.heat-actions{display:flex;align-items:center;gap:22px;flex-wrap:wrap;margin-bottom:20px}
.heat-price{font-family:'DM Mono',monospace;font-size:10px;letter-spacing:.1em;color:var(--heat)}
.heat-copy>p.heat-fine{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.06em;color:var(--muted);
  line-height:1.8;max-width:520px;margin:0}
.heat-button{border-color:rgba(255,79,156,.5) !important;background:var(--heat) !important;color:#fff !important}
.heat-button:hover{box-shadow:0 14px 40px rgba(255,79,156,.32)}

/* ---- the state card ---- */
.heat-card{border-radius:14px;padding:26px 24px}
.heat-card-top{display:flex;align-items:center;gap:10px;font-family:'DM Mono',monospace;font-size:8px;
  letter-spacing:.22em;color:var(--muted);padding-bottom:20px;border-bottom:1px solid var(--line)}
.heat-badge{margin-left:auto;border:1px solid var(--line);border-radius:20px;padding:4px 9px;color:var(--soft)}
html.heat-on .heat-badge{border-color:var(--heat);color:var(--heat);background:var(--heat-soft)}
.heat-switch-wrap{display:flex;align-items:center;gap:16px;padding:24px 0}
.heat-switch{width:62px;height:32px;border-radius:20px;border:1px solid var(--glass-brd);
  background:rgba(255,255,255,.05);position:relative;flex:0 0 auto;transition:.3s}
.heat-switch .heat-knob{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;
  background:var(--soft);transition:.3s cubic-bezier(.2,.7,.2,1)}
.heat-switch.on{background:var(--heat);border-color:var(--heat);box-shadow:0 0 22px rgba(255,79,156,.35)}
.heat-switch.on .heat-knob{left:35px;background:#fff}
.heat-switch-meta strong{display:block;font-size:16px}
.heat-switch-meta span{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.08em;color:var(--muted)}
.heat-rows{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.heat-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;
  border-bottom:1px solid var(--line);font-size:12px}
.heat-row span{color:var(--muted);font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.12em}
.heat-row b{font-weight:600;text-align:right}
html.heat-on .heat-row b{color:var(--heat)}
.heat-note{margin-top:20px;display:flex;align-items:center;gap:10px;font-family:'DM Mono',monospace;
  font-size:8px;letter-spacing:.2em;color:var(--muted)}
.heat-note .ad-dot{background:var(--heat);box-shadow:0 0 0 4px var(--heat-soft)}

/* ---- plans add-on strip ---- */
.addon-strip{margin-top:14px;border-radius:10px;display:flex;align-items:center;gap:18px;padding:20px 24px;
  border-color:rgba(255,79,156,.28)}
.addon-strip.active{background:linear-gradient(90deg,var(--heat-soft),transparent 70%)}
.addon-spark{font-size:15px;color:var(--heat)}
.addon-strip strong{font-size:15px;display:block}
.addon-strip p{margin:5px 0 0;font-size:12px;color:var(--muted);max-width:560px;line-height:1.7}
.addon-buy{margin-left:auto;display:flex;align-items:center;gap:18px;flex:0 0 auto}
.addon-buy b{font-family:'Dhurjati','Manrope',sans-serif;font-size:30px;letter-spacing:-.03em;color:var(--heat)}
.addon-buy b i{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.1em;color:var(--muted);font-style:normal}
.addon-buy button{border:1px solid rgba(255,79,156,.45);background:var(--heat);color:#fff;
  padding:12px 17px;border-radius:2px;font-size:11px;font-weight:700;letter-spacing:.03em;
  display:inline-flex;gap:14px;align-items:center;transition:.25s}
.addon-buy button:hover{box-shadow:0 14px 34px rgba(255,79,156,.3)}

/* ---- agent shell ---- */
.agent-heat{display:flex;align-items:center;gap:12px;width:100%;padding:12px 13px;margin-bottom:14px;
  border:1px solid var(--glass-brd);border-radius:8px;text-align:left;transition:.25s}
.agent-heat:hover{border-color:var(--heat)}
.agent-heat-switch{width:38px;height:21px;border-radius:14px;border:1px solid var(--glass-brd);
  background:rgba(255,255,255,.05);position:relative;flex:0 0 auto;transition:.3s}
.agent-heat-switch .heat-knob{position:absolute;top:2px;left:2px;width:15px;height:15px;border-radius:50%;
  background:var(--soft);transition:.3s cubic-bezier(.2,.7,.2,1)}
.agent-heat.on .agent-heat-switch{background:var(--heat);border-color:var(--heat)}
.agent-heat.on .agent-heat-switch .heat-knob{left:20px;background:#fff}
.agent-heat-text b{display:block;font-size:12px;font-weight:600}
.agent-heat-text small{font-family:'DM Mono',monospace;font-size:8px;letter-spacing:.1em;color:var(--muted)}
.agent-heat.on{border-color:var(--heat);background:var(--heat-soft)}
.agent-mode-tag{font-family:'DM Mono',monospace;font-size:7px;letter-spacing:.2em;border:1px solid var(--line);
  border-radius:20px;padding:3px 7px;color:var(--muted);margin-left:8px}
.agent-overlay.heat .agent-mode-tag{border-color:var(--heat);color:var(--heat);background:var(--heat-soft)}
.agent-overlay.heat .agent-shell{box-shadow:0 0 0 1px rgba(255,79,156,.28),0 40px 120px rgba(255,79,156,.14)}
.agent-overlay.heat .msg.ai{border-left:2px solid var(--heat)}

/* ---- settings row ---- */
.heat-setting strong{color:var(--ink)}
.heat-setting-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.revoke-link{font-family:'DM Mono',monospace;font-size:8px;letter-spacing:.14em;color:var(--muted);
  border-bottom:1px solid var(--line);padding-bottom:3px}
.revoke-link:hover{color:var(--heat);border-color:var(--heat)}
.pill-toggle.on{border-color:var(--heat);color:var(--heat);background:var(--heat-soft)}

/* ---- 18+ gate + add-on checkout ---- */
.heat-modal{border-color:rgba(255,79,156,.32)}
.heat-modal .modal-kicker span{color:var(--heat)}
.heat-terms{list-style:none;margin:22px 0;padding:0;display:flex;flex-direction:column;gap:12px}
.heat-terms li{font-size:12px;line-height:1.7;color:var(--muted);padding-left:18px;position:relative}
.heat-terms li::before{content:'·';position:absolute;left:4px;top:-2px;font-size:18px;color:var(--heat)}
.heat-check{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--ink);margin-bottom:22px;cursor:pointer}
.heat-check input{width:17px;height:17px;accent-color:var(--heat)}
.addon-lines{margin:24px 0 18px;border-top:1px solid var(--line)}
.addon-line{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;
  border-bottom:1px solid var(--line);font-size:12px}
.addon-line span{color:var(--muted);font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.12em}
.addon-line b{font-weight:600}
.addon-total b{font-family:'Dhurjati','Manrope',sans-serif;font-size:26px;letter-spacing:-.03em;color:var(--heat)}
.addon-note{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.06em;color:var(--muted);
  line-height:1.8;margin:0 0 22px}
.addon-cancel{display:block;width:100%;text-align:center;margin-top:14px;font-size:11px}

/* ---- catalog: uncensored rail ---- */
.catalog-heat{margin-top:20px}
.heat-title{color:var(--heat) !important}
.catalog-heat-note{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.06em;color:var(--muted);
  line-height:1.8;max-width:680px;margin:-6px 0 20px}
.catalog-heat-note a{color:var(--heat);border-bottom:1px solid rgba(255,79,156,.4)}
.heat-group{border-color:rgba(255,79,156,.24)}

/* ---- responsive ---- */
@media (max-width:1000px){
  /* the model menu is anchored to the (now drawer) sidebar; keep it on screen */
  .agent-sidebar.open .model-menu{left:12px;right:12px}
}
@media (max-width:900px){
  .heat-grid{grid-template-columns:1fr;gap:48px}
  .addon-strip{flex-direction:column;align-items:flex-start}
  .addon-buy{margin-left:0}
  .ad-leaderboard .ad-box{grid-template-columns:1fr;height:auto;padding:14px 18px;gap:6px}
  .ad-leaderboard .ad-title{font-size:18px}
  body{padding-bottom:150px}
}
@media (prefers-reduced-motion:reduce){
  .ad-box.ad-in{animation:none}
  .heat-pill.on .heat-dot{animation:none}
}

/* ---- ads never intrude on the agent workspace or a modal ---- */
html.agent-open .ad-popup,
html.agent-open .ad-rail,
html.agent-open .ad-leaderboard{opacity:0;pointer-events:none;transition:opacity .25s}

/* ---- the scroll diamond sits in the gutter beside the left rail ----
   It used to sit at left:58px, i.e. inside the rail's 14px..186px band and a
   stacking level below it, so the ad painted straight over it. Park it in the
   gap between the rail and the page shell instead: centred in that gutter on
   wide screens, but never allowed to slide back under the rail. */
@media (min-width:1280px){
  .scroll-diamond{
    --rail-edge:186px;                            /* .ad-rail-left = 14px + 172px */
    --shell-edge:max(200px,(100vw - 1400px)/2);   /* .page-shell's left edge */
    left:max(calc(var(--rail-edge) + 12px),calc((var(--rail-edge) + var(--shell-edge))/2 - 22px));
  }
}

/* ---- the pop-up demo card reads as a grey box in both themes ---- */
.ad-stage .ad-window{background:rgba(120,112,124,.18);border-color:rgba(160,150,165,.3)}
html[data-theme="light"] .ad-stage .ad-window{background:rgba(70,60,72,.1)}

/* ============================================================
   TEN FACETS — theme system (spec: 10 themes, saved per account)
   Default = Neon Rose (inherits :root). Each theme re-tints the
   surface palette; brand pink stays in the signature themes.
   ============================================================ */
html[data-theme="dark"]{--night:#0a0710;--panel:#160d14;--ink:#f6e9f2;--muted:#b093a5;--line:rgba(255,196,232,.16);--electric:#f78fd0;--accent:#ff9ed8}
html[data-theme="obsidian"]{--night:#050505;--panel:#101010;--ink:#f5eef2;--muted:#8f7d88;--line:rgba(255,255,255,.10);--glass-bg:rgba(18,18,20,.6);--glass-brd:rgba(255,143,214,.16);--electric:#ff8fd6;--accent:#ff8fd6;--ambient-filter:saturate(.6)}
html[data-theme="obsidian"] .marble-bg{opacity:.25;filter:saturate(.5) brightness(.7)}
html[data-theme="amethyst"]{--night:#0b0614;--panel:#171029;--ink:#f2e8fb;--muted:#a68fc2;--line:rgba(196,150,255,.18);--glass-bg:rgba(35,20,58,.55);--glass-brd:rgba(196,150,255,.24);--electric:#c48fff;--lilac:#d0a7ff;--ice:#e6d3ff;--accent:#b57bff}
html[data-theme="amethyst"] .marble-bg{filter:hue-rotate(252deg) saturate(1.1)}
html[data-theme="emerald"]{--night:#04100b;--panel:#0c1d15;--ink:#e8f5ee;--muted:#8fb8a2;--line:rgba(140,255,196,.16);--glass-bg:rgba(16,42,30,.5);--glass-brd:rgba(140,255,196,.2);--electric:#7fe8b6;--lilac:#a2f2d0;--ice:#c9ffe4;--accent:#4fd69a;--heat:#ff5fa8}
html[data-theme="emerald"] .marble-bg{filter:hue-rotate(155deg) saturate(1.05)}
html[data-theme="sapphire"]{--night:#050a14;--panel:#0c1526;--ink:#e8f0fb;--muted:#8fa6c8;--line:rgba(150,190,255,.18);--glass-bg:rgba(18,30,54,.55);--glass-brd:rgba(150,190,255,.24);--electric:#8fb8ff;--lilac:#a7c8ff;--ice:#d3e4ff;--accent:#5f8fdf;--heat:#ff6fae}
html[data-theme="sapphire"] .marble-bg{filter:hue-rotate(195deg) saturate(1.1)}
html[data-theme="uviolet"]{--night:#0d0418;--panel:#1b0c30;--ink:#f0e6fa;--muted:#a68fc8;--line:rgba(190,120,255,.2);--glass-bg:rgba(40,16,64,.55);--glass-brd:rgba(190,120,255,.26);--electric:#c06fff;--lilac:#a86bff;--ice:#e4c7ff;--accent:#9a4dff;--heat:#ff4fd8}
html[data-theme="uviolet"] .marble-bg{filter:hue-rotate(248deg) saturate(1.35) brightness(.9)}
html[data-theme="porcelain"]{--night:#fbf3f7;--panel:#ffffff;--ink:#241522;--muted:#83627a;--soft:#63415a;--line:rgba(110,45,85,.14);--glass-bg:rgba(255,255,255,.66);--glass-brd:rgba(222,130,190,.3);--glass-hi:rgba(255,255,255,.7);--electric:#d94fa8;--ice:#c04494;--accent:#c8348c;--card:rgba(255,255,255,.7);--btn-ink:#fff5fb;--btn-bg:#3a1830;--heat:#d81b76}
html[data-theme="porcelain"] .marble-bg{opacity:.10;filter:invert(1) hue-rotate(292deg) saturate(1.1)}
html[data-theme="candlelight"]{--night:#fdf6ee;--panel:#fffdf9;--ink:#2a201a;--muted:#93785f;--soft:#6b5443;--line:rgba(150,110,70,.18);--glass-bg:rgba(255,251,244,.66);--glass-brd:rgba(230,170,110,.32);--glass-hi:rgba(255,255,255,.75);--electric:#e08b4f;--lilac:#f0a868;--ice:#ffd9ae;--accent:#d97934;--card:rgba(255,255,255,.7);--btn-ink:#fff8f0;--btn-bg:#5a3a1f;--heat:#e0569f}
html[data-theme="candlelight"] .marble-bg{opacity:.12;filter:invert(1) hue-rotate(120deg) saturate(.7) brightness(1.1)}
html[data-theme="coral-dusk"]{--night:#fdf1ec;--panel:#fffaf7;--ink:#2a1d1a;--muted:#a1746a;--soft:#7a554d;--line:rgba(190,90,70,.16);--glass-bg:rgba(255,249,246,.66);--glass-brd:rgba(255,140,120,.3);--glass-hi:rgba(255,255,255,.75);--electric:#ff7a66;--lilac:#ff9e8a;--ice:#ffc9bc;--accent:#f2604a;--card:rgba(255,255,255,.7);--btn-ink:#fff5f2;--btn-bg:#5c2418;--heat:#d84f9c}
html[data-theme="coral-dusk"] .marble-bg{opacity:.12;filter:invert(1) hue-rotate(150deg) saturate(.85)}
html[data-theme="porcelain"] .ambient,html[data-theme="candlelight"] .ambient,html[data-theme="coral-dusk"] .ambient{opacity:.14}
html[data-theme="emerald"] .ambient{background:#2fbd85!important}
html[data-theme="sapphire"] .ambient{background:#4f7fdf!important}

/* ghost select for the theme picker */
.ghost-select{background:var(--glass-bg);color:var(--ink);border:1px solid var(--glass-brd);border-radius:10px;padding:8px 12px;font:inherit;max-width:220px}
.ghost-select option{background:var(--panel);color:var(--ink)}

/* notice bubble in the agent stream (low / zero balance) */
.msg.notice{align-self:center;background:linear-gradient(135deg,rgba(255,184,228,.16),rgba(255,143,214,.08));border:1px solid var(--glass-brd);border-radius:14px;padding:10px 16px;font-size:13px;color:var(--soft);max-width:min(520px,86%);text-align:center}

/* ============ STUDIO AUDIO BAR (reference: dashboard player) ============ */
.audio-bar{grid-column:1/-1;display:flex;align-items:center;gap:14px;border-radius:18px;padding:10px 18px;margin-top:10px}
.audio-art{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:radial-gradient(circle at 32% 30%,var(--ice),var(--accent) 45%,#5c1d44);color:var(--btn-ink);font-size:18px;box-shadow:0 0 18px rgba(255,158,220,.45);flex:none}
.audio-bar.playing .audio-art{animation:audio-pulse 1.1s ease-in-out infinite}
@keyframes audio-pulse{50%{transform:scale(1.12);box-shadow:0 0 30px rgba(255,158,220,.7)}}
.audio-meta{display:flex;flex-direction:column;min-width:150px}
.audio-meta b{font-size:14px}
.audio-meta small{color:var(--muted);font-size:11px;letter-spacing:.06em}
.audio-controls{display:flex;align-items:center;gap:6px}
.audio-ctrl{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--soft);border:1px solid transparent;transition:.2s}
.audio-ctrl:hover{color:var(--ink);border-color:var(--glass-brd);background:var(--glass-bg)}
.audio-play{width:42px;height:42px;background:var(--btn-bg);color:var(--btn-ink);box-shadow:0 0 16px rgba(255,158,220,.4)}
.audio-gen{width:auto;border-radius:20px;padding:0 14px;border:1px solid var(--glass-brd);font-size:12px;letter-spacing:.08em}
.audio-progress{display:flex;align-items:center;gap:10px;flex:1;min-width:160px}
.audio-time{font-family:'DM Mono',monospace;font-size:11px;color:var(--muted);white-space:nowrap}
.audio-progress input[type=range]{flex:1;accent-color:var(--electric);height:4px}
@media (max-width:900px){.audio-progress{display:none}.audio-gen{display:none}}
@media (prefers-reduced-motion:reduce){.audio-bar.playing .audio-art{animation:none!important}}

/* ============ VORTEX BACKGROUND CANVAS ============ */
.vortex-bg{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.8}
html[data-theme="porcelain"] .vortex-bg,html[data-theme="candlelight"] .vortex-bg,html[data-theme="coral-dusk"] .vortex-bg{opacity:.45}
@media (prefers-reduced-motion:reduce){.vortex-bg{display:none}}

/* ============================================================
   Update spec — agent chatbox glow, thinking diamond, model menu
   ============================================================ */

/* Chatbox: pink outline on hover; pink border + soft glow while focused.
   :focus-within drops the glow the moment the input loses focus. */
.agent-input-bar{--chat-ring:#ff6ec7;transition:border-color .2s ease,box-shadow .25s ease}
.agent-input-bar:hover{border-color:var(--chat-ring);box-shadow:0 0 0 1px var(--chat-ring),0 20px 60px rgba(0,0,0,.35)}
.agent-input-bar:focus-within{border-color:var(--chat-ring);
  box-shadow:0 0 0 1px var(--chat-ring),0 0 16px 2px rgba(255,110,199,.45),0 0 44px 8px rgba(255,110,199,.18)}

/* "thinking…" + the Pink Diamond gem pulsing to the right */
.msg.ai.typing{display:inline-flex;align-items:center;gap:10px}
.think-gem{width:14px;height:23px;flex:none;filter:brightness(1.35) drop-shadow(0 0 7px rgba(255,110,199,.9));
  animation:pd-think-pulse 1.15s ease-in-out infinite}
@keyframes pd-think-pulse{
  0%,100%{transform:translateX(0) scale(.82);opacity:.6}
  50%{transform:translateX(7px) scale(1.18);opacity:1}
}
@media (prefers-reduced-motion:reduce){
  .think-gem{animation:pd-think-fade 1.6s ease-in-out infinite}
  @keyframes pd-think-fade{0%,100%{opacity:.5}50%{opacity:1}}
}

/* Model picker (subscribers switch freely; everyone else sees locks) */
.agent-sidebar{position:relative}
.agent-model{cursor:pointer}
.agent-model[aria-expanded="true"]{color:var(--ink);border-bottom-color:var(--accent)}
.model-menu{position:absolute;top:44px;left:12px;right:-150px;z-index:30;border-radius:16px;padding:10px;
  background:var(--panel);   /* opaque: backdrop blur doesn't apply inside the glass shell */
  max-height:min(460px,70vh);display:flex;flex-direction:column;gap:8px}
.model-menu[hidden]{display:none}
.model-tabs{display:flex;gap:4px}
.model-tabs button{flex:1;padding:7px 0;border-radius:10px;font-family:'DM Mono',monospace;font-size:10px;letter-spacing:.08em;color:var(--muted)}
.model-tabs button.active{background:var(--heat-soft);color:var(--ink)}
.model-list{overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding-right:2px}
.model-opt{display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;padding:8px 10px;border-radius:10px;font-size:13px;color:var(--ink)}
.model-opt:hover:not(:disabled){background:rgba(255,110,199,.12)}
.model-opt.active{background:rgba(255,110,199,.16);box-shadow:inset 0 0 0 1px rgba(255,110,199,.45)}
.model-opt:disabled{color:var(--muted);cursor:not-allowed;opacity:.7}
.model-opt i{font-style:normal;font-size:11px;color:var(--accent)}
.model-opt .model-lock{font-family:'DM Mono',monospace;font-size:8px;letter-spacing:.12em;padding:2px 6px;border-radius:6px;border:1px solid var(--glass-brd);color:var(--muted)}
.model-sep{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.14em;color:var(--muted);padding:10px 10px 4px}
.model-upsell{padding:10px;border-radius:12px;background:var(--btn-bg);color:var(--btn-ink);font-size:12px;font-weight:600}

/* ============================================================
   Payment system — terms gate, checkout, Pink Credits
   ============================================================ */
.text-link{color:var(--accent);text-decoration:underline;text-underline-offset:2px;font:inherit;padding:0}
.terms-row{display:flex;gap:10px;align-items:flex-start;margin:4px 0 16px;font-size:11px;line-height:1.5;color:var(--soft);cursor:pointer}
.terms-row[hidden]{display:none}
.terms-row input{display:inline-block;width:17px;height:17px;padding:0;margin:1px 0 0;flex:none;accent-color:var(--accent)}
.terms-row input:disabled{opacity:.45}

.terms-card,.checkout-card{width:min(640px,100%);max-height:92vh;display:flex;flex-direction:column}
.terms-body{overflow-y:auto;max-height:46vh;padding:4px 14px 4px 2px;margin:6px 0 10px;font-size:12.5px;line-height:1.65;color:var(--soft);
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.terms-body h1{display:none}
.terms-body h2{font-size:16px;font-family:inherit;letter-spacing:0;margin:22px 0 6px;color:var(--accent)}
.terms-body h3{font-size:13px;margin:16px 0 4px;color:var(--ink)}
.terms-body .callout{border:1px solid var(--glass-brd);border-radius:10px;padding:10px 14px;margin:10px 0;background:var(--heat-soft)}
.terms-body .meta{font-size:11px;color:var(--muted)}
.terms-progress{font-family:'DM Mono',monospace;font-size:9px;letter-spacing:.1em;color:var(--muted);margin:0 0 12px}

.checkout-card{overflow-y:auto}
.checkout-interval{align-self:flex-start;margin:4px 0 14px}
.checkout-interval[hidden],#checkout-uncensored-row[hidden],#checkout-adult-row[hidden]{display:none}
.checkout-credits b{color:var(--accent)}
.checkout-disclosure{font-size:11.5px;line-height:1.6;color:var(--soft);border-left:2px solid var(--accent);padding:2px 0 2px 12px;margin:14px 0}
.checkout-mount{min-height:420px;border-radius:12px;overflow:hidden;background:#fff}
.checkout-mount[hidden]{display:none}
.checkout-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:420px;background:#fff;color:#4a3744;font-size:14px}
.checkout-spinner{width:22px;height:22px;border-radius:50%;border:3px solid rgba(99,91,255,.25);border-top-color:#635bff;animation:checkout-spin .8s linear infinite}
@keyframes checkout-spin{to{transform:rotate(360deg)}}
.checkout-fallback{min-height:420px;background:#fff;color:#23151e;padding:34px 30px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:16px}
.checkout-fallback p{margin:0;font-size:13px;line-height:1.65;color:#4a3744}
.checkout-fallback button{border:1px solid #635bff;background:#635bff;color:#fff;padding:12px 18px;border-radius:6px;font-weight:600;font-size:13px;cursor:pointer;transition:.2s}
.checkout-fallback button:hover{box-shadow:0 10px 24px rgba(99,91,255,.35)}
.checkout-fallback .checkout-back{background:none;border:0;color:#635bff;text-decoration:underline;font-weight:400;box-shadow:none!important}

.paygo-modal .usage-options{grid-template-columns:repeat(3,1fr)}
.paygo-custom{display:flex;gap:10px;align-items:flex-end;margin-top:14px}
.paygo-custom label{flex:1;margin:0}
.paygo-custom-hint{color:var(--muted);margin-left:6px}
.paygo-custom .ghost-button{white-space:nowrap;padding:13px 16px}

/* Pink Credits balance in the agent sidebar */
.agent-balance{display:flex;align-items:center;gap:8px;margin:0 2px 12px;padding:9px 12px;border-radius:12px;border:1px solid var(--glass-brd);
  font-size:12px;color:var(--soft);text-align:left;transition:border-color .2s}
.agent-balance:hover{border-color:var(--accent)}
.agent-balance b{color:var(--ink)}
.agent-balance small{margin-left:auto;font-family:'DM Mono',monospace;font-size:9px;color:var(--muted)}
.agent-balance-gem{color:var(--accent)}
.agent-balance.low{border-color:rgba(255,120,120,.5)}
.agent-balance.low b{color:#ff9a9a}
.modal-card .heat-check{display:flex;align-items:flex-start;gap:12px;font-family:inherit;font-size:12px;letter-spacing:0;line-height:1.5;color:var(--ink);margin-bottom:16px}
.modal-card .heat-check input{display:inline-block;width:17px;height:17px;margin:1px 0 0;padding:0;flex:none}
.primary-button:disabled{opacity:.42;cursor:not-allowed;transform:none}

/* Header: the logo keeps its size and nothing wraps into it, even when the
   ad rails narrow the header */
.site-header .brand{flex:none;margin-right:28px}
.main-nav{gap:clamp(14px,1.5vw,36px);margin-right:clamp(16px,2vw,44px)}
.main-nav a,.header-actions>*{white-space:nowrap}
/* Full nav only where it fits: no rails (1181-1279px) or wide screens (>1600px) */
@media (max-width:1180px),(min-width:1280px) and (max-width:1600px){
  .main-nav{display:none}
  .header-actions{margin-left:auto}
  .menu-button{display:block}
}
@media (max-width:560px){
  /* Unfiltered stays one tap away in the menu; the header keeps sign-in and launch */
  .header-actions .heat-pill{display:none}
  .header-actions{gap:10px}
  .menu-button{margin-left:6px}
  .site-header{padding:0 16px}
  .site-header .brand{margin-right:0}
}
@media (max-width:440px){
  .header-actions .theme-toggle{display:none}   /* themes stay in Settings */
}
/* The avatar only exists for signed-in users */
.avatar-button[hidden]{display:none}
