
  /* Cinematic Horror theme fonts — self-hosted (Jared 2026-07-11). Inter body +
     Bebas Neue movie-title headings. The animated CINEGORE logo keeps its
     own Bahnschrift + glitch (see .logo/.home-hero-title below) — untouched. */
  @font-face{font-family:"Inter";src:url("assets/fonts/Inter-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
  @font-face{font-family:"Inter";src:url("assets/fonts/Inter-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
  @font-face{font-family:"Inter";src:url("assets/fonts/Inter-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
  @font-face{font-family:"Inter";src:url("assets/fonts/Inter-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
  @font-face{font-family:"Bebas Neue";src:url("assets/fonts/BebasNeue-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
  @font-face{font-family:"Barlow Condensed";src:url("assets/fonts/BarlowCondensed-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
  /* Anton (2026-07-15): the titles were Bebas — a LIGHT condensed face — while the
     wordmark is built on Impact. Both are condensed caps so they read as siblings,
     but a full weight class apart; that mismatch is what looked "off" to Jared.
     Anton carries the wordmark's density, so titles read as the same family. */
  @font-face{font-family:"Anton";src:url("assets/fonts/Anton-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
  :root{
    --bg:#0a0b0a; --panel:rgba(21,18,19,.82); --field:#0f0c0d;
    --border:#271f22; --border-2:#3a242b; --text:#e4d6da; --muted:#8a7278;
    --acid:#d13049; --acid-dim:#8a1523; --ok:#57c46b; --blood:#c8202a;
    --radius:8px;
    /* --mono repointed to Inter so the whole UI flips to the readable body sans;
       real monospace still available as --code if ever needed. */
    --mono:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
    --code:"Courier New",ui-monospace,Consolas,monospace;
    /* Two display roles, deliberately. --display is the movie-title face (26-46px);
       --label is for the 10px uppercase micro-labels (.settings-section,
       .opt-picker-heading, Create's section summaries) where Anton's weight turns
       into an unreadable blob at that size. Bebas stays exactly as it was there. */
    --display:"Anton","Bebas Neue","Arial Narrow",Impact,sans-serif;
    --label:"Bebas Neue","Oswald","Arial Narrow",Impact,sans-serif;
  }
  /* Cinematic movie-title headings — Bebas Neue. (Logo excluded.
     Home card titles use --label (Bebas) below, same as mobile.) */
  .page-head h2, .settings-section, .create-section-card>summary,
  .opt-picker-heading, .gate-title, .sc-chat-panel h2{
    font-family:var(--display);
    letter-spacing:.05em;
    font-weight:400;
  }
  /* Micro-labels keep the lighter face — see --label above. Only font-family is
     overridden so each rule's own size/tracking/weight below still wins. */
  .settings-section, .create-section-card>summary, .opt-picker-heading{
    font-family:var(--label);
  }
  .page-head h2{font-size:clamp(26px,3.4vw,40px);letter-spacing:.06em}
  *{box-sizing:border-box}
  *{scrollbar-width:none}
  *::-webkit-scrollbar{width:0;height:0}
  html,body{margin:0;padding:0;width:100%;height:100%;min-height:100%;overflow:hidden}
  body{font-family:var(--mono);color:var(--text);background:#070807;min-height:100vh;overflow:hidden;display:flex;flex-direction:column}
  /* Native form controls don't inherit font-family — force the theme font everywhere (fixes ~79 buttons falling back to Arial). */
  button,input,select,textarea,optgroup{font-family:inherit}
  .bg{position:fixed;inset:0;z-index:-3;pointer-events:none;background:
      radial-gradient(900px 500px at 75% -10%, #1f0d12 0%, transparent 60%),
      radial-gradient(700px 600px at 10% 110%, #1a0d0d 0%, transparent 55%),
      linear-gradient(180deg,#0a0c09,#070807 70%);}
  .fog{position:fixed;inset:-50%;z-index:-2;opacity:.5;pointer-events:none;
      background:radial-gradient(closest-side, rgba(160,40,60,.10), transparent 70%);
      animation:drift 26s ease-in-out infinite alternate}
  @keyframes drift{0%{transform:translate(-8%,-4%) scale(1)}100%{transform:translate(10%,8%) scale(1.25)}}
  .grain{position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.06;mix-blend-mode:overlay;
      background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
      animation:grain .6s steps(3) infinite}
  @keyframes grain{0%{transform:translate(0,0)}33%{transform:translate(-4px,3px)}66%{transform:translate(3px,-2px)}100%{transform:translate(0,0)}}
  .scan{position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.35;
      background:repeating-linear-gradient(0deg,rgba(0,0,0,0) 0,rgba(0,0,0,0) 2px,rgba(0,0,0,.25) 3px,rgba(0,0,0,0) 4px)}
  .vig{position:fixed;inset:0;z-index:-1;pointer-events:none;box-shadow:inset 0 0 240px 60px rgba(0,0,0,.9)}

  header{padding:0;text-align:center;position:relative}
  .logo,.home-hero-title{
      font-family:"Bahnschrift Condensed","Agency FB","Arial Narrow",Impact,var(--mono);
      font-size:clamp(32px,6.4vw,64px);font-weight:900;letter-spacing:.08em;margin:0;
      padding:0 .12em;
      color:#f5ece8;text-transform:uppercase;line-height:.86;position:relative;display:inline-block;
      transform:skewX(-7deg) scaleY(1.12);filter:drop-shadow(0 0 12px rgba(209,48,73,.18));
      text-shadow:2px 0 0 #111, -2px 0 0 #111, 0 2px 0 #111, 0 0 24px rgba(209,48,73,.22);
      clip-path:polygon(0 6%,97% 0,100% 82%,96% 100%,2% 94%)}
  .logo .d2,.home-hero-title .d2{color:#d13049;text-shadow:0 0 8px rgba(209,48,73,.55),0 0 28px rgba(209,48,73,.22)}
  .logo::before,.logo::after,.home-hero-title::before,.home-hero-title::after{content:"CINEGORE";position:absolute;left:0;top:0;width:100%;text-transform:uppercase;pointer-events:none;mix-blend-mode:screen}
  .studio-word{font-size:.58em;letter-spacing:.16em;color:#ffd6dd;vertical-align:.14em;text-shadow:0 0 12px rgba(209,48,73,.35)}
  .logo::before,.home-hero-title::before{color:#d13049;opacity:.7;animation:gl1 3.2s infinite steps(2)}
  .logo::after,.home-hero-title::after{color:#27d8ff;opacity:.62;animation:gl2 4.4s infinite steps(2)}
  @keyframes gl1{0%,88%,100%{clip-path:inset(0 0 100% 0);transform:translate(0)}89%{clip-path:inset(6% 0 68% 0);transform:translate(-5px,-1px)}93%{clip-path:inset(55% 0 18% 0);transform:translate(4px,2px)}96%{clip-path:inset(32% 0 44% 0);transform:translate(-2px,0)}}
  @keyframes gl2{0%,86%,100%{clip-path:inset(0 0 100% 0);transform:translate(0)}87%{clip-path:inset(42% 0 38% 0);transform:translate(5px,0)}92%{clip-path:inset(12% 0 72% 0);transform:translate(-3px,2px)}98%{clip-path:inset(74% 0 5% 0);transform:translate(2px,-2px)}}
  /* Illustrated CINEGORE brand mark (assets/logo/, commit 76021af) wired into the
     site 2026-07-14 per Jared. Replaces the CSS text wordmark at the header, home
     hero and both gate pages — no glitch on it, by his call ("the glitch doesn't
     need to happen"). The .logo text rules above are LEFT INTACT so swapping the
     markup back (<h1 class="logo">CINE<span class="d2">GORE</span></h1>) restores
     the old animated wordmark with no CSS changes. Heights are set per context
     below; the art carries ~27% of its height in drips BELOW the letters, so the
     box is taller than the visible cap-height — size by eye, not by font math. */
  .logo-mark{display:inline-block;line-height:0;flex:0 0 auto;margin:0}
  .logo-mark img{display:block;width:auto;max-width:100%;height:var(--logo-h,40px);
      filter:drop-shadow(0 0 14px rgba(209,48,73,.20))}
  .app-header .logo-mark{--logo-h:clamp(30px,3.4vw,46px);cursor:pointer}
  .home-hero .logo-mark{--logo-h:clamp(64px,12vw,150px)}
  .gate-brand .logo-mark{--logo-h:clamp(56px,11vw,96px)}
  .warn-brand .logo-mark{--logo-h:clamp(56px,11vw,96px)}
  .tag{margin:10px 0 0;color:var(--muted);font-size:12px;letter-spacing:.4em;text-transform:uppercase}
  .tag b{color:var(--acid-dim)}
  .status{display:inline-block;margin-left:10px;font-size:10px;letter-spacing:.1em;padding:2px 8px;border-radius:3px;border:1px solid var(--border-2);color:var(--muted)}
  .status.ok{color:var(--ok);border-color:rgba(87,196,107,.5)}
  .status.bad{color:var(--blood);border-color:var(--blood)}
  /* Atlas key onboarding nudge — shown on Create/Video/Images to keyless visitors so
     they discover the fast cloud lane (their key = parallel Atlas generation, no
     queueing behind other people on the shared local GPU). Dismissible, remembered. */
  .atlas-nudge{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
    background:rgba(209,48,73,.06);border:1px solid var(--acid-dim);border-radius:var(--radius);
    padding:10px 14px;margin:0 0 14px;font-size:12.5px;line-height:1.5;color:var(--text)}
  .atlas-nudge b{color:var(--acid)}
  .atlas-nudge-go{flex:0 0 auto;background:var(--acid-dim);color:#0a0b0a;border:none;border-radius:6px;
    padding:7px 12px;font-size:11px;font-weight:700;letter-spacing:.04em;text-decoration:none;text-transform:uppercase;cursor:pointer}
  .atlas-nudge-go:hover{background:var(--acid)}
  .atlas-nudge-x{flex:0 0 auto;background:none;border:none;color:var(--muted);font-size:16px;line-height:1;
    cursor:pointer;margin-left:auto;
    width:32px;height:32px;padding:0;display:flex;align-items:center;justify-content:center}
  .atlas-nudge-x:hover{color:var(--text)}

  .wrap{max-width:1180px;margin:0 auto;padding:18px;display:grid;grid-template-columns:380px 1fr;gap:18px}
  @media(max-width:880px){.wrap{grid-template-columns:1fr}}
  .panel{background:linear-gradient(180deg,rgba(21,24,22,.82),rgba(9,11,10,.76));border:1px solid rgba(255,255,255,.075);border-radius:var(--radius);padding:16px;backdrop-filter:blur(14px);position:relative;box-shadow:0 14px 34px rgba(0,0,0,.22)}
  .corner{position:absolute;width:10px;height:10px;border:1px solid var(--acid-dim);opacity:0}
  .corner.tl{top:-1px;left:-1px;border-right:0;border-bottom:0}
  .corner.tr{top:-1px;right:-1px;border-left:0;border-bottom:0}
  .corner.bl{bottom:-1px;left:-1px;border-right:0;border-top:0}
  .corner.br{bottom:-1px;right:-1px;border-left:0;border-top:0}

  label{display:block;font-size:10px;color:var(--muted);margin:16px 0 6px;letter-spacing:.2em;text-transform:uppercase}
  label:first-of-type{margin-top:0}
  textarea,input,select{width:100%;background:var(--field);color:var(--text);border:1px solid var(--border-2);
      border-radius:var(--radius);padding:11px 12px;font-size:13px;font-family:var(--mono);outline:none;transition:.15s}
  /* Range inputs inherited the text-field padding above (border-box), which ate 12px off
     each side of every slider's content box - the native thumb/track never reaches the
     real edge (Jared flagged the gore/chaos sliders 2026-07-19, but it's every slider). */
  input[type=range]{padding:0;border:none;background:none}
  textarea:focus,input:focus,select:focus{border-color:var(--acid-dim);box-shadow:0 0 0 1px rgba(209,48,73,.15)}
  textarea{resize:vertical;min-height:88px;line-height:1.5}
  select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
      background-position:calc(100% - 18px) 17px,calc(100% - 13px) 17px;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
  option{color:var(--text);background:#0c0f0c}
  .row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}

  .btn{width:100%;margin-top:18px;padding:14px;border:1px solid var(--acid-dim);border-radius:var(--radius);
      font-size:14px;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:#0a0c08;cursor:pointer;
      background:linear-gradient(180deg,#d13049,#c8202a);font-family:var(--mono);transition:.12s}
  .btn:hover{filter:brightness(1.12);box-shadow:0 0 24px rgba(209,48,73,.3)}
  .btn:active{transform:translateY(1px)}
  .btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
  .genrow{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:10px;align-items:stretch}
  .genrow.prompt-gen{margin-bottom:18px}
  .genrow .btn{margin-top:0}
  .btn.cancel{display:none;padding:14px 18px;background:transparent;color:#ff6b6b;border-color:#a33;
    box-shadow:none;letter-spacing:.12em}
  .btn.cancel:hover{filter:none;background:rgba(255,80,80,.12);box-shadow:0 0 16px rgba(255,80,80,.2)}

  details{margin-top:16px;border-top:1px solid var(--border);padding-top:10px}
  summary{cursor:pointer;color:var(--muted);font-size:11px;letter-spacing:.15em;text-transform:uppercase;user-select:none}
  summary:hover{color:var(--acid-dim)}
  .seedrow{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
  .chk{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;margin-top:10px;cursor:pointer}
  .chk input{width:auto;accent-color:var(--acid)}
  .hint{font-size:10px;color:var(--muted);margin-top:8px;line-height:1.5;opacity:.9}
  .safety-note{margin-top:8px;padding:8px 10px;border:1px solid var(--border-2);border-radius:var(--radius);font-size:10px;line-height:1.45;color:var(--muted);background:rgba(0,0,0,.32)}
  .safety-note b{color:var(--acid);letter-spacing:.08em}
  .video-mode-banner{margin:10px 0 8px;padding:10px 12px;border-left:3px solid var(--acid);border-radius:var(--radius);font-size:12px;line-height:1.5;color:var(--text);background:rgba(0,0,0,.28)}
  .video-mode-banner b{display:block;margin-bottom:4px;font-size:13px;color:var(--acid);letter-spacing:.04em}
  .video-mode-banner ol{margin:6px 0 0 18px;padding:0;color:var(--muted)}
  .video-mode-banner li{margin:2px 0}

  .gal-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
  .gal-head .gal-tabs{flex:1 1 auto}
  .gal-head .gal-size,.gal-head .clear{flex:0 0 auto}
  .gal-head h2{margin:0;font-size:13px;letter-spacing:.3em;text-transform:uppercase;color:var(--muted)}
  .gal-head h2 b{color:var(--acid)}
  .gal-tabs{display:flex;gap:6px;flex-wrap:wrap}
  .gal-tab{background:var(--field);border:1px solid var(--border-2);color:var(--muted);border-radius:var(--radius);
    padding:6px 12px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;cursor:pointer;font-family:var(--mono)}
  .gal-tab:hover{color:var(--acid-dim);border-color:var(--acid-dim)}
  .gal-tab.active{color:var(--acid);border-color:var(--acid-dim);background:rgba(209,48,73,.08)}
  .gal-tab .cnt{opacity:.65;margin-left:4px}
  .clear{background:none;border:1px solid var(--border-2);color:var(--muted);border-radius:var(--radius);
      padding:6px 12px;font-size:10px;letter-spacing:.15em;text-transform:uppercase;cursor:pointer;font-family:var(--mono)}
  .clear:hover{color:var(--blood);border-color:var(--blood)}
  .clear.active,.clear.preset-active{color:var(--blood);border-color:var(--blood);background:rgba(140,20,20,0.12);box-shadow:0 0 12px rgba(140,20,20,0.2)}
  .gal-size{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-family:var(--mono)}
  .gal-size input[type=range]{width:88px;accent-color:var(--acid)}
  .gal-size output{min-width:34px;color:var(--acid-dim)}
  .gallery{--gal-cell:210px;--gal-gap:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--gal-cell),1fr));gap:var(--gal-gap)}
  .gallery.compact .badge,.gallery.compact .tools button{font-size:8px;padding:5px 4px;letter-spacing:.06em}
  /* cqw = % of the rendered card width (container-type:inline-size on .card,
     same trick as .card-del) so the pills track the Size slider, unlike the
     grid's nominal --gal-cell. Share pins bottom-RIGHT so the two pills can
     never collide at any card size. */
  .card-dl,.card-share{
    bottom:clamp(3px,2.9cqw,6px);
    font-size:clamp(6px,4.8cqw,10px);
    padding:clamp(2px,1.9cqw,4px) clamp(3px,3.8cqw,8px);
  }
  .card-dl{left:clamp(3px,2.9cqw,6px);display:flex;align-items:center;justify-content:center}
  .card-dl svg{width:1.2em;height:1.2em}
  .card-share{left:auto;right:clamp(3px,2.9cqw,6px)}
  .card{position:relative;background:#0c0f0c;border:1px solid var(--border-2);border-radius:var(--radius);
      overflow:hidden;aspect-ratio:var(--ar,9/16);display:flex;align-items:center;justify-content:center;container-type:inline-size}
  .card:not(.video-card):not(.audio-card){aspect-ratio:9/16}
  .card.video-card{aspect-ratio:var(--ar,16/9)}
  .card img{width:100%;height:100%;object-fit:cover;display:block;background:#0a0c0a;filter:contrast(1.04) saturate(.97)}
  .card video{width:100%;height:100%;object-fit:contain;display:block;background:#0a0c0a}
  .card .spinner{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--muted);font-size:10px;letter-spacing:.2em;text-transform:uppercase;text-align:center;padding:10px 10px 52px}
  .ring{width:30px;height:30px;border:2px solid var(--border-2);border-top-color:var(--acid);border-radius:50%;animation:spin 1s linear infinite;transition:opacity .3s}
  .spinner.downloading .ring,.spinner.near-done .ring{opacity:.2;animation-duration:2.4s}
  .prog-wrap{position:absolute;bottom:0;left:0;right:0;padding:10px 12px 12px;background:linear-gradient(transparent,rgba(0,0,0,.92))}
  .prog-bar{height:5px;background:rgba(20,24,18,.95);border-radius:3px;overflow:hidden;border:1px solid var(--border-2)}
  .prog-fill{height:100%;width:0%;background:linear-gradient(90deg,var(--blood),var(--acid));transition:width .35s ease;border-radius:2px;box-shadow:0 0 10px rgba(209,48,73,.25)}
  .prog-eta{font-size:9px;color:var(--acid-dim);margin-top:6px;letter-spacing:.14em;text-transform:uppercase}
  @keyframes spin{to{transform:rotate(360deg)}}
  .card .tools{position:absolute;bottom:0;left:0;right:0;display:flex;gap:6px;padding:8px;background:linear-gradient(transparent,rgba(0,0,0,.85));opacity:0;transition:.15s}
  .card:hover .tools{opacity:1}
  #gallery .card .tools{opacity:1}
  .tools{flex-wrap:wrap}
  .tools button{flex:1 1 42px;min-width:38px;background:rgba(209,48,73,.1);border:1px solid var(--acid-dim);color:var(--acid);
      border-radius:3px;padding:7px 4px;font-size:9px;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;font-family:var(--mono)}
  .tools button.share-ig{background:rgba(225,48,108,.12);border-color:#e1306c;color:#ff8ab5}
  .tools button.share-ig:hover{background:rgba(225,48,108,.28)}
  .tools button:hover{background:rgba(209,48,73,.22)}
  .tools button.del,.card-del{background:rgba(200,32,42,.15);border-color:#a33;color:#ff8a8a}
  .tools button.del:hover,.card-del:hover{background:rgba(200,32,42,.35)}
  .card-del{position:absolute;top:clamp(4px,3cqw,8px);right:clamp(4px,3cqw,8px);z-index:20;
    width:clamp(15px,13cqw,28px);height:clamp(15px,13cqw,28px);padding:0;border-radius:50%;
    border:1px solid #a33;cursor:pointer;font-size:clamp(9px,6.5cqw,14px);line-height:1;opacity:.85;transition:.15s;background:rgba(0,0,0,.75);
    pointer-events:auto;display:flex;align-items:center;justify-content:center}
  .card[data-src]:hover .card-del,.card[data-src]:focus-within .card-del{opacity:1}
  .gallery.select-mode .card{cursor:default}
  .gallery.select-mode .card[data-src]:hover .tools{opacity:0}
  .gallery.select-mode .card .gal-sel-cb{display:block}
  .gal-sel-cb{position:absolute;top:8px;left:8px;z-index:25;width:22px;height:22px;cursor:pointer;display:none;accent-color:var(--acid)}
  .card.gal-selected{outline:2px solid var(--acid);outline-offset:-2px}
  .gal-select-toggle.active{background:rgba(209,48,73,.12);border-color:var(--acid-dim);color:var(--acid)}
  .gal-bulk-del{color:#ff8a8a;border-color:#a33;background:rgba(200,32,42,.12)}
  .card-lazy .spinner .st{opacity:.35}
  .card-lazy-ready .spinner{display:none}
  .card-cancel{position:absolute;top:8px;right:8px;z-index:3;width:28px;height:28px;padding:0;border-radius:50%;
    border:1px solid #a33;background:rgba(0,0,0,.65);color:#ff6b6b;font-size:14px;line-height:1;cursor:pointer}
  .card-cancel:hover{background:rgba(255,80,80,.25)}
  .card .badge{position:absolute;top:6px;left:6px;font-size:9px;letter-spacing:.1em;background:rgba(0,0,0,.7);border:1px solid var(--border-2);color:var(--muted);padding:2px 6px;border-radius:3px;max-width:80%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .card.video-card .badge{color:var(--acid);border-color:var(--acid-dim)}
  .card.audio-card .badge{color:#8ad4ff;border-color:#3a6a8a}
  .card.audio-card audio{width:100%;padding:12px}
  .endframe-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
  .endframe-row button{flex:1;min-width:72px;padding:8px;font-size:9px}
  .endframe-pick{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px;max-height:72px;overflow-y:auto}
  .endframe-pick img{width:40px;height:40px;object-fit:cover;border:1px solid var(--border-2);border-radius:3px;cursor:pointer;opacity:.7}
  .endframe-pick img:hover,.endframe-pick img.sel{opacity:1;border-color:var(--acid-dim)}
  .nested-videos{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px;padding:8px;background:rgba(0,0,0,.45);border-top:1px solid var(--border-2)}
  .nested-videos .card{aspect-ratio:var(--ar,16/9);min-height:0}
  .nested-label{font-size:8px;letter-spacing:.12em;text-transform:uppercase;color:var(--acid-dim);padding:6px 8px 0;grid-column:1/-1}
  .layer-popup{margin-top:8px;padding:10px 12px;border:1px solid var(--border-2);border-radius:var(--radius);background:rgba(0,0,0,.35);display:flex;gap:12px;align-items:flex-start}
  .layer-popup .layer-swatch,.layer-popup img.layer-swatch{cursor:zoom-in}
  .layer-popup.hidden{display:none}
  .layer-swatch{width:56px;height:56px;border-radius:4px;border:1px solid var(--border-2);flex-shrink:0;object-fit:cover;background:#0a0c0a}
  .layer-popup .lp-title{font-size:11px;color:var(--acid);letter-spacing:.08em;margin:0 0 4px}
  .layer-popup .lp-desc{font-size:10px;color:var(--muted);line-height:1.45;margin:0}
  .layer-popup .lp-prompt{font-size:9px;color:var(--acid-dim);margin-top:6px;opacity:.85;line-height:1.4}
  .compare-tray,.layer-popup{display:none!important}
  .compare-tray.hidden{display:none}
  .compare-chip{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:4px;opacity:.75;transition:.12s}
  .compare-chip:hover,.compare-chip.active{opacity:1}
  .compare-chip .sw{width:52px;height:52px;border-radius:4px;border:2px solid transparent;object-fit:contain;background:#0a0c0a;display:block;cursor:zoom-in}
  .compare-chip span{cursor:pointer;padding:2px 4px;border-radius:3px}
  .compare-chip span:hover{color:var(--acid)}
  .compare-chip.active .sw{border-color:var(--acid);box-shadow:0 0 8px rgba(209,48,73,.25)}
  .compare-chip span{font-size:8px;color:var(--muted);letter-spacing:.06em;max-width:56px;text-align:center;line-height:1.2}
  .opt-select-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .opt-select-vault{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .opt-picker-block{margin:18px 0 20px}
  .opt-picker-heading{display:block;font-size:10px;color:var(--muted);margin:0 0 10px;letter-spacing:.2em;text-transform:uppercase}
  .opt-picker-host{min-height:0}
  .opt-picker-host .opt-picker{margin:0}
  .opt-picker-host-compact .opt-picker-hero{min-height:108px;max-height:128px}
  .cinema-details .opt-picker-tabs{margin-top:12px}
  .opt-picker{margin:4px 0 16px}
  .opt-picker-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
  .opt-picker-tabs button{
    flex:1;min-width:72px;padding:8px 10px;border:1px solid var(--border-2);border-radius:var(--radius);
    background:rgba(0,0,0,.35);color:var(--muted);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;transition:.12s}
  .opt-picker-tabs button:hover{color:var(--text);border-color:var(--acid-dim)}
  .opt-picker-tabs button.active{color:var(--acid);border-color:var(--acid);background:rgba(209,48,73,.08);box-shadow:0 0 10px rgba(209,48,73,.12)}
  .opt-picker-hero-wrap{display:flex;align-items:stretch;gap:6px}
  .opt-picker-nav{
    flex:0 0 36px;border:1px solid var(--border-2);border-radius:var(--radius);background:rgba(0,0,0,.45);
    color:var(--acid);font-size:22px;line-height:1;cursor:pointer;align-self:stretch;transition:.12s}
  .opt-picker-nav:hover{background:rgba(209,48,73,.12);border-color:var(--acid-dim)}
  .opt-picker-hero{
    flex:1;position:relative;aspect-ratio:16/9;max-height:230px;border:1px solid var(--border-2);border-radius:var(--radius);
    overflow:hidden;background:#0a0c0a;cursor:zoom-in}
  .opt-picker-hero .picker-visual,.opt-picker-hero img.picker-visual{width:100%;height:100%;object-fit:cover;display:block}
  .opt-picker-hero .picker-none{display:flex;align-items:center;justify-content:center;width:100%;height:100%;
    background:linear-gradient(135deg,#141814,#2a1c21);color:var(--muted);font-size:11px;letter-spacing:.12em;text-transform:uppercase}
  .opt-picker-counter{
    position:absolute;bottom:8px;right:8px;font-size:9px;letter-spacing:.08em;padding:3px 8px;border-radius:12px;
    background:rgba(0,0,0,.72);border:1px solid var(--border-2);color:var(--muted)}
  .opt-picker-meta{margin-top:8px;padding:0 2px}
  .opt-picker-title{margin:0 0 4px;font-size:12px;color:var(--acid);letter-spacing:.06em}
  .opt-picker-desc{margin:0;font-size:10px;color:var(--muted);line-height:1.45}
  /* Grid of 16:9 thumbnails - wraps into rows, no left/right scrolling */
  .opt-picker-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:8px;padding:10px 2px 4px;margin-top:6px;max-height:220px;overflow-y:auto;scrollbar-width:thin}
  .opt-picker-chip{
    display:flex;flex-direction:column;align-items:center;gap:5px;opacity:.72;cursor:pointer;transition:.12s}
  .opt-picker-chip:hover,.opt-picker-chip.active{opacity:1}
  .opt-picker-chip .picker-visual,.opt-picker-chip img.picker-visual{
    width:100%;aspect-ratio:16/9;border-radius:6px;border:2px solid transparent;object-fit:cover;background:#0a0c0a;display:block}
  .opt-picker-chip .picker-none{width:100%;aspect-ratio:16/9;border-radius:6px;border:2px solid transparent;
    display:flex;align-items:center;justify-content:center;font-size:8px;color:var(--muted);background:#141814;text-align:center}
.opt-picker-chip.active .picker-visual,.opt-picker-chip.active img.picker-visual,.opt-picker-chip.active .picker-none{
    border-color:var(--acid);box-shadow:0 0 10px rgba(209,48,73,.22)}
.prompt-brain{
  margin:12px 0 14px;
  padding:12px;
  border:1px solid rgba(209,48,73,.22);
  border-radius:8px;
  background:rgba(209,48,73,.035);
}
.prompt-brain summary{
  cursor:pointer;
  color:var(--acid);
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.prompt-brain textarea{
  min-height:64px;
}
.prompt-brain-actions{
  margin-top:10px;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
}
.neg-chips{
  display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px;
}
.neg-chips button{
  padding:5px 9px;border:1px solid var(--border-2);border-radius:var(--radius);
  background:var(--field);color:var(--muted);font-size:9px;letter-spacing:.04em;
  cursor:pointer;font-family:var(--mono);text-transform:uppercase;
}
.neg-chips button:hover{border-color:var(--acid-dim);color:var(--acid)}
.supercomputer-box .prompt-brain-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
.supercomputer-box .prompt-brain-actions .clear{
  min-height:0;
  padding:8px 6px;
  white-space:normal;
  line-height:1.15;
  font-size:9px;
  letter-spacing:.04em;
}
.supercomputer-box{
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(180,107,255,.28);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(180,107,255,.08),rgba(209,48,73,.025));
}
.supercomputer-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(150px,280px);
  gap:10px;
  align-items:center;
}
.supercomputer-provider-row{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.supercomputer-memory{
  margin-top:10px;
  font-size:10px;
  color:var(--muted);
}
.supercomputer-memory summary{
  cursor:pointer;
  color:#d9c5ff;
  font-family:var(--mono);
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:6px;
}
.supercomputer-memory label{
  display:block;
  margin:8px 0 4px;
  font-size:9px;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.supercomputer-memory textarea{
  width:100%;
  min-height:52px;
  font-size:11px;
}
.supercomputer-head b{
  display:block;
  color:#d9c5ff;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.supercomputer-head span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}
#brain-llm-output{
  margin-top:10px;
  min-height:120px;
  font-family:var(--mono);
  font-size:11px;
}
@media(max-width:720px){
  .supercomputer-head{grid-template-columns:1fr}
  .supercomputer-box .prompt-brain-actions{grid-template-columns:1fr}
}
.higgsfield-helper{
  margin:10px 0 14px;
  padding:12px;
  border:1px solid rgba(209,48,73,.26);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(209,48,73,.07),rgba(255,255,255,.025));
}
.higgsfield-helper-title{
  margin-bottom:6px;
  color:var(--acid);
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.higgsfield-helper input{margin-top:6px}
.model-picker-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(128px,1fr));
  gap:8px;
  margin:8px 0 10px;
  max-height:278px;
  overflow-y:auto;
  scrollbar-width:thin;
}
#model,#x-model{
  position:relative;
  width:100%;
  height:auto;
  opacity:1;
  pointer-events:auto;
}
.model-card{
  appearance:none;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(255,255,255,.035);
  color:var(--text);
  cursor:pointer;
  padding:0;
  overflow:hidden;
  text-align:left;
  transition:.12s;
}
.model-card:hover{
  border-color:var(--acid-dim);
  transform:translateY(-1px);
  background:rgba(209,48,73,.045);
}
.model-card.active{
  border-color:var(--acid);
  box-shadow:0 0 0 1px rgba(209,48,73,.25),0 0 18px rgba(209,48,73,.12);
}
.model-card:disabled{opacity:.45;cursor:not-allowed;transform:none}
.model-card-thumb{
  aspect-ratio:16/9;
  background:#0a0c0a;
  border-bottom:1px solid var(--border);
  overflow:hidden;
}
.model-card-img,.model-card-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.model-card-body{display:flex;flex-direction:column;gap:4px;padding:8px}
.model-card-title{
  color:var(--text);
  font-size:10px;
  line-height:1.25;
  font-weight:700;
}
.model-card-meta{
  color:var(--acid-dim);
  font-size:8px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.model-card-blurb{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:var(--muted);
  font-size:9px;
  line-height:1.35;
}
.model-picker-empty{
  border:1px dashed var(--border-2);
  border-radius:8px;
  color:var(--muted);
  padding:12px;
  font-size:10px;
  text-align:center;
}
.panel-x .model-card.active{
  border-color:#ff3b8d;
  box-shadow:0 0 0 1px rgba(255,59,141,.25),0 0 18px rgba(255,59,141,.13);
}
.panel-x .model-card:hover{
  border-color:rgba(255,59,141,.65);
  background:rgba(255,59,141,.06);
}
.panel-x .model-card-meta{color:#ff8fbd}
#page-x .create-split{
  grid-template-columns:minmax(420px,560px) minmax(0,1fr);
}
#page-x .panel-x{
  padding:14px;
}
#page-x .x-banner{
  margin-bottom:10px;
}
#page-x .opt-picker-block{
  margin:12px 0;
}
#page-x .prompt-stack{
  display:none;
}
  .opt-picker-chip span{font-size:9px;color:var(--muted);letter-spacing:.03em;max-width:100%;text-align:center;line-height:1.2}
  .opt-picker-compact .opt-picker-strip{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))}
  .opt-picker-compact .opt-picker-chip span{font-size:8px}
  .panel-x .opt-picker-tabs button.active{color:#ff8fc7;border-color:rgba(255,59,141,.55);background:rgba(255,59,141,.1);box-shadow:0 0 10px rgba(255,59,141,.15)}
  .panel-x .opt-picker-nav{color:#ff8fc7}
  .panel-x .opt-picker-nav:hover{background:rgba(255,59,141,.12);border-color:rgba(255,59,141,.4)}
  .panel-x .opt-picker-title{color:#ff8fc7}
  .panel-x .opt-picker-chip.active .picker-visual,.panel-x .opt-picker-chip.active img.picker-visual,.panel-x .opt-picker-chip.active .picker-none{
    border-color:rgba(255,59,141,.7);box-shadow:0 0 10px rgba(255,59,141,.2)}
  .prompt-stack{margin-top:10px;padding:10px;border:1px dashed var(--border-2);border-radius:var(--radius);font-size:9px;color:var(--muted);line-height:1.5}
  .prompt-stack b{color:var(--acid-dim);font-weight:600}
  .prompt-stack .tag{display:inline-block;margin:2px 4px 2px 0;padding:2px 6px;border:1px solid var(--border-2);border-radius:3px;background:rgba(0,0,0,.3)}
  .x-final-prompt{margin-top:10px}
  .x-final-prompt summary{color:#ff8fbd}
  .x-final-prompt textarea{
    min-height:150px;
    margin-top:8px;
    font-family:var(--mono);
    font-size:10px;
    line-height:1.55;
    color:#ffe2ee;
    background:rgba(0,0,0,.5);
    border-color:rgba(255,59,141,.28);
  }
  .err{color:var(--blood);font-size:10px;text-align:center;padding:14px;line-height:1.5}
  .empty{color:var(--muted);text-align:center;padding:70px 20px;font-size:12px;letter-spacing:.15em;text-transform:uppercase;opacity:.7;line-height:2}

  body.lb-open{overflow:hidden}
  .lb{position:fixed;inset:0;background:rgba(0,0,0,.94);display:none;align-items:center;justify-content:center;z-index:200;padding:24px}
  .lb.show{display:flex}
  .lb.studio{align-items:stretch;padding:16px;overflow-y:auto}
  .lb-inner{display:flex;flex-direction:column;max-width:1100px;width:100%;max-height:100%;margin:0 auto;gap:12px}
  .lb.show.zoom .lb-inner{flex-direction:row;align-items:stretch;gap:18px;max-width:min(1280px,96vw);display:grid;grid-template-columns:minmax(0,1fr) min(340px,38vw);grid-template-rows:minmax(0,1fr) auto;min-height:min(720px,calc(100vh - 48px))}
  .lb.show.zoom .lb-preview{grid-column:1;grid-row:1 / span 2}
  .lb.show.zoom .lb-meta{grid-column:2;grid-row:1;min-height:0;align-self:stretch}
  .lb-meta[hidden]{display:none!important}
  .lb.show.zoom .lb-meta:not([hidden]){display:flex}
  .lb.show.zoom .lb-actions{grid-column:2;grid-row:2;margin-top:0;padding-top:0;border-top:none}
  .lb.studio .lb-inner{
    display:grid;
    grid-template-columns:minmax(0,1fr) min(380px,42vw);
    grid-template-rows:minmax(0,1fr) auto;
    grid-template-areas:"preview panel" "actions actions";
    gap:12px 16px;
    max-width:min(1280px,98vw);
    max-height:calc(100vh - 32px);
    overflow-y:auto;
    width:100%;
  }
  .lb.studio .lb-preview{grid-area:preview;min-height:180px}
  .lb.studio .lb-meta{display:none!important}
  .lb.studio .lb-actions{grid-area:actions;flex:none;max-width:100%;width:100%;align-self:stretch;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.08)}
  .lb:not(.studio) .lb-panel{display:none!important}
  .lb.studio .lb-panel{display:flex!important;flex-direction:column;grid-area:panel}
  .lb-preview{flex:1;min-width:280px;display:flex;align-items:center;justify-content:center;position:relative;min-height:0;overflow:auto}
  .lb.show.zoom .lb-preview{flex:1 1 58%;min-width:0;align-items:center;justify-content:center;background:rgba(8,10,8,.45);border:1px solid var(--border-2);border-radius:12px;padding:12px}
  .lb-media-wrap{display:flex;align-items:center;justify-content:center;width:100%;min-height:0}
  .lb img,.lb video{max-width:min(100%,96vw);max-height:calc(100vh - 140px);width:auto;height:auto;border:1px solid var(--border-2);object-fit:contain;border-radius:6px}
  .lb.show.zoom .lb-preview img,.lb.show.zoom .lb-preview video{max-width:100%;max-height:calc(100vh - 72px);border:none;border-radius:8px}
  .lb.studio .lb-preview img,.lb.studio .lb-preview video{max-width:100%;max-height:calc(100vh - 180px);width:100%;height:auto;object-fit:contain}
  .lb.studio .lb-preview video{display:block;width:100%;min-height:220px;background:#0a0c0a}
  .lb.studio .lb-preview{align-items:stretch;flex-direction:column;justify-content:flex-start}
  .lb .x{position:absolute;top:16px;right:24px;font-size:30px;color:var(--acid);cursor:pointer;line-height:1;z-index:2;background:none;border:none;padding:0}
  .lb .cap{text-align:center;color:var(--muted);font-size:11px;padding:0 8px;line-height:1.4}
  .lb-meta{flex:0 0 340px;max-width:38vw;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 48px);overflow:hidden;background:var(--panel);border:1px solid var(--border-2);border-radius:12px;padding:14px 16px}
  .lb-meta-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .lb-meta-type{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--acid);font-family:var(--mono)}
  .lb-meta-date{font-size:10px;color:var(--muted);font-family:var(--mono);white-space:nowrap}
  .lb-meta-gen{font-size:12px;font-weight:600;color:#efdce2;line-height:1.35}
  .lb-meta-label{margin:4px 0 0;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--acid-dim);font-family:var(--mono)}
  .lb-meta-prompt{flex:1;min-height:72px;max-height:34vh;overflow-y:auto;color:#dec7cf;font-size:13px;line-height:1.55;white-space:pre-wrap;padding:10px 12px;background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.08);border-radius:10px;scrollbar-width:thin}
  .lb-meta-chips{display:flex;flex-wrap:wrap;gap:6px}
  .lb-meta-settings{flex:0 1 auto;max-height:22vh;overflow-y:auto;margin:0;padding:10px 12px;background:rgba(0,0,0,.32);border:1px solid rgba(255,255,255,.08);border-radius:10px;color:#c8aeb7;font:10px/1.45 var(--mono);white-space:pre-wrap;scrollbar-width:thin}
  .lb-chip{font-size:10px;line-height:1.35;padding:5px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:var(--muted)}
  .lb-chip b{color:var(--acid-dim);font-weight:600;margin-right:2px}
  .lb-panel{flex:0 0 320px;max-height:85vh;overflow-y:auto;background:var(--panel);border:1px solid var(--border-2);border-radius:var(--radius);padding:14px}
  .lb-panel h3{margin:0 0 12px;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--acid)}
  .lb-panel label{margin-top:12px}
  .lb-panel .btn{margin-top:14px}
  .studio-clips{margin-top:16px;border-top:1px solid var(--border-2);padding-top:12px}
  .studio-clips .clip-row{display:flex;gap:8px;overflow-x:auto;padding:4px 0}
  .studio-clips .clip-thumb{width:72px;height:72px;object-fit:contain;background:#0a0c0a;border:1px solid var(--border-2);border-radius:3px;cursor:pointer;flex-shrink:0}
  .studio-clips .clip-thumb:hover{border-color:var(--acid-dim)}
  .studio-clips .clip-thumb-pending{display:flex;align-items:center;justify-content:center;cursor:default}
  .studio-clips .none{font-size:10px;color:var(--muted)}
  .studio-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:0 0 12px}
  .studio-tab{flex:1;min-width:52px;background:var(--field);border:1px solid var(--border-2);color:var(--muted);border-radius:var(--radius);padding:7px 6px;font-size:9px;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;font-family:var(--mono)}
  .studio-tab:hover{color:var(--acid-dim);border-color:var(--acid-dim)}
  .studio-tab.active{color:var(--acid);border-color:var(--acid-dim);background:rgba(209,48,73,.08)}
  .studio-pane{display:none}
  .studio-pane.active{display:block}
  .studio-control-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}
  .studio-control-grid button{padding:8px 6px;font-size:10px}
  .studio-upload{border:1px dashed var(--border-2);border-radius:var(--radius);padding:12px;text-align:center;font-size:10px;color:var(--muted);cursor:pointer;margin:8px 0}
  .studio-upload:hover{border-color:var(--acid-dim);color:var(--acid-dim)}
  .studio-upload.has-file{color:var(--acid);border-color:var(--acid-dim)}
  .video-tools{margin:12px 0 8px}
  .gore-stack-chips{grid-template-columns:repeat(2,minmax(0,1fr));margin:6px 0}
  .gore-stack-chip.active{border-color:var(--acid);color:var(--acid);box-shadow:0 0 6px rgba(209,48,73,.2)}
  .gore-engine-panel summary{font-size:11px;letter-spacing:.04em}
  .tool-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .tool-grid-6{grid-template-columns:repeat(6,minmax(0,1fr))}
  .tool-grid .clear{margin:0;padding:9px 7px;font-size:9px}
  .video-generator-tools{margin:8px 0 10px}
  .video-generator-tools label{margin-top:0}
  @media(max-width:980px){.tool-grid-6{grid-template-columns:repeat(3,minmax(0,1fr))}}
  .video-source-preview{display:none;margin-top:8px;border:1px solid var(--border-2);border-radius:var(--radius);overflow:hidden;background:#0a0c0a;aspect-ratio:16/9}
  .video-source-preview.show{display:block}
  .video-source-preview img{width:100%;height:100%;object-fit:contain;display:block}
  .camera-recorder{margin:10px 0;padding:10px;border:1px solid var(--border-2);border-radius:var(--radius);background:rgba(0,0,0,.28)}
  .camera-recorder video{width:100%;aspect-ratio:16/9;object-fit:contain;background:#050605;border:1px solid var(--border-2);border-radius:var(--radius);display:block}
  .camera-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}
  .camera-actions .clear{margin:0;padding:9px 7px;font-size:9px}
  .lb.studio .lb-panel{flex:none;max-width:42vw;max-height:calc(100vh - 48px);min-height:240px}
  .btn.studio-go{margin-top:10px}
  .btn.studio-go:hover{filter:brightness(1.12);box-shadow:0 0 24px rgba(209,48,73,.3)}

  .lb-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:auto;padding-top:8px}
  .lb.show.zoom .lb-actions{background:var(--panel);border:1px solid var(--border-2);border-radius:12px;padding:12px}
  .lb-actions .clear,.lb-actions .btn{margin:0;width:100%;min-width:0}
  .lb-actions .share-ig{border-color:#e1306c;color:#ff8ab5}
  .lb-actions .share-ig:hover{color:#fff;border-color:#ff8ab5;background:rgba(225,48,108,.25)}
  .lb-actions .lb-action-lg{padding:11px 16px;font-size:12px}
  #lb-save.lb-action-lg{display:flex;align-items:center;justify-content:center}
  @media(max-width:900px){
    .lb.show.zoom .lb-inner{flex-direction:column;max-height:calc(100vh - 32px);overflow-y:auto;display:flex}
    .lb.show.zoom .lb-preview{grid-column:auto;grid-row:auto}
    .lb.show.zoom .lb-meta{flex:0 0 auto;max-width:none;max-height:none;grid-column:auto;grid-row:auto}
    .lb.show.zoom .lb-actions{grid-column:auto;grid-row:auto}
    .lb.show.zoom .lb-preview img,.lb.show.zoom .lb-preview video{max-height:52vh}
    .lb.studio .lb-inner{
      grid-template-columns:1fr;
      grid-template-areas:"preview" "panel" "actions";
      max-height:none;
    }
    .lb.studio .lb-panel{max-width:none;max-height:none;min-height:0}
    .lb.studio .lb-preview img,.lb.studio .lb-preview video{max-height:42vh}
  }

  .editor-overlay{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.96);display:none;flex-direction:column;padding:12px 16px 16px}
  .editor-overlay.show{display:flex}
  .editor-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap}
  .editor-head h2{margin:0;font-size:12px;letter-spacing:.25em;text-transform:uppercase;color:var(--acid)}
  .editor-status{flex:1;font-size:10px;color:var(--muted);letter-spacing:.06em}
  .editor-close{margin-left:auto;font-size:28px;color:var(--acid);cursor:pointer;line-height:1;background:none;border:none}
  .editor-body{flex:1;display:flex;gap:14px;min-height:0;flex-wrap:wrap}
  .editor-preview{flex:1;min-width:280px;min-height:200px;display:flex;align-items:center;justify-content:center;background:#080a08;border:1px solid var(--border-2);border-radius:var(--radius)}
  .editor-preview video{max-width:100%;max-height:62vh;border:1px solid var(--border-2)}
  .editor-side{flex:0 0 340px;max-width:100%;max-height:calc(100vh - 80px);overflow-y:auto;background:var(--panel);border:1px solid var(--border-2);border-radius:var(--radius);padding:12px}
  .editor-side h3{margin:14px 0 8px;font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--acid-dim)}
  .editor-side h3:first-child{margin-top:0}
  .editor-pool,.editor-timeline{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
  .editor-pool-btn,.editor-chip{background:var(--field);border:1px solid var(--border-2);color:var(--muted);border-radius:var(--radius);padding:6px 8px;font-size:9px;cursor:pointer;font-family:var(--mono)}
  .editor-chip.active,.editor-pool-btn:hover{border-color:var(--acid-dim);color:var(--acid)}
  .editor-trim-row{display:grid;gap:6px;font-size:10px;color:var(--muted);margin:8px 0}
  .editor-trim-row input[type=range]{width:100%}
  .editor-actions{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
  .editor-actions button{flex:1;min-width:64px}
  #edit-audio-preview{width:100%;margin:8px 0}

/* === App shell & navigation === */
.app-header{background:rgba(5,6,5,.86);border-bottom:1px solid rgba(255,255,255,.07);backdrop-filter:blur(18px);position:relative;z-index:40;flex:0 0 auto}
.app-header-inner{width:100%;padding:10px 16px;display:flex;align-items:center;gap:14px;flex-wrap:nowrap}
.app-header .logo{margin:0;font-size:clamp(20px,2.4vw,34px);flex:0 0 auto}
.app-status{margin:0;flex:0 0 auto;display:flex;align-items:center;gap:14px}
.app-status .status{margin:0;font-size:9px;letter-spacing:.1em;padding:3px 10px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}
.credit-pill{display:flex;align-items:center;gap:7px;flex:0 0 auto;border:1px solid rgba(209,48,73,.28);background:rgba(209,48,73,.08);border-radius:999px;padding:5px 10px;font-family:var(--mono);font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.credit-pill b{color:var(--acid);font-size:12px;letter-spacing:.04em}
/* Chip nav (from /connect): discrete bordered tabs, soft acid active — not a pill capsule. */
.dd-nav{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;justify-content:flex-start;background:transparent;border:0;border-radius:0;padding:3px 0;flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
.dd-nav::-webkit-scrollbar{display:none}
.dd-nav a{flex:0 0 auto;color:var(--muted);text-decoration:none;font-size:12px;letter-spacing:.08em;text-transform:uppercase;padding:7px 10px;border-radius:6px;font-family:var(--mono);font-weight:400;transition:.15s ease;border:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.16);white-space:nowrap;min-width:0;text-align:center;box-shadow:none}
.dd-nav a:hover,.dd-nav a.active{color:var(--text);border-color:rgba(209,48,73,.52);background:rgba(209,48,73,.12);box-shadow:none}
.dd-nav a.nav-x{color:#ff8fc7}
.dd-nav a.nav-x:hover,.dd-nav a.nav-x.active{color:#ffb0d8;background:rgba(255,59,141,.1);border-color:rgba(255,59,141,.35)}
.dd-nav a.nav-editor{color:var(--acid-dim)}
.dd-nav a.nav-editor.active{color:var(--acid)}
.dd-nav a.nav-perchance{color:#9bdcff}
.dd-nav a.nav-perchance:hover{background:rgba(70,180,255,.1);border-color:rgba(70,180,255,.25);color:#c7efff}
main{flex:1 1 auto;min-height:0;width:100%;overflow:hidden;padding:0}
.page-shell{width:100%;height:100%;min-height:0;padding:14px 16px 0}
  .dd-page{display:none}
  /* No fade on page switch — opacity animation made nav feel laggy ("doesn't go
     to the page right away") while gallery rewire also ran on the same click. */
  .dd-page.active{display:block;height:100%;min-height:0;overflow:auto;scrollbar-width:none}
  .dd-page.active::-webkit-scrollbar{display:none}
/* Clean, content-first page headers — big title + subtitle + a thin divider. No photo
   banners (they competed with the gallery imagery and ate vertical space). Jared 2026-07-12 */
.page-head{margin:0 0 20px;padding:0 0 14px;border-bottom:1px solid var(--border)}
.page-head h2{margin:0;font-family:var(--display);font-size:clamp(30px,3.6vw,46px);line-height:.95;letter-spacing:.05em;text-transform:uppercase;color:var(--text);font-weight:400}
.page-head h2 b{color:var(--acid)}
.page-head p{margin:7px 0 0;font-size:12px;color:var(--muted);line-height:1.5;max-width:48em}
.page-shell .wrap{padding:0;margin:0;max-width:none}
.wrap.single{grid-template-columns:1fr}
.wrap-narrow{max-width:800px}
.wrap-narrow .panel{width:100%}
/* Assistant two-column layout + starter cards (Jared 2026-07-11) */
.sc-layout{grid-template-columns:minmax(0,1fr) 320px;gap:16px;max-width:1200px;margin:0 auto;align-items:start}
@media(max-width:920px){.sc-layout{grid-template-columns:1fr}.sc-side{order:-1}}
.sc-side{display:flex;flex-direction:column;gap:10px;padding:18px;position:sticky;top:8px}
.sc-side-title{font-family:var(--display);font-size:26px;letter-spacing:.05em;color:var(--text);text-transform:uppercase;margin:0}
.sc-side-blurb{color:var(--muted);font-size:12.5px;line-height:1.55;margin:0 0 4px}
.sc-side-label{font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--acid-dim);margin-top:6px}
.sc-quicks{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sc-quick{text-align:left;background:var(--field);border:1px solid var(--border-2);color:var(--text);
  border-radius:7px;padding:7px 9px;font-size:11.5px;cursor:pointer;transition:.13s;line-height:1.25}
.sc-quick:hover{border-color:var(--acid);color:var(--acid);box-shadow:0 0 0 1px rgba(209,48,73,.14);transform:translateY(-1px)}
.sc-side-list{margin:4px 0 0;padding:0 0 0 16px;color:var(--muted);font-size:12px;line-height:1.7}
.sc-side-list li{margin:0}
/* Assistant model picker (local + cloud) */
.sc-model-row{display:flex;flex-direction:column;gap:4px}
.sc-model-select{width:100%;background:var(--field);border:1px solid var(--border-2);color:var(--text);
  border-radius:8px;padding:8px 10px;font-size:12.5px;cursor:pointer;transition:.13s}
.sc-model-select:hover{border-color:var(--acid)}
.sc-model-select:focus{border-color:var(--acid);outline:none;box-shadow:0 0 0 1px rgba(209,48,73,.14)}
/* Assistant Supercomputer skills */
.sc-skills-row{display:flex;flex-direction:column;gap:6px}
.sc-skills{display:flex;flex-wrap:wrap;gap:6px}
.sc-skills button{background:var(--field);border:1px solid var(--border-2);color:var(--text);
  border-radius:7px;padding:6px 10px;font-size:11px;letter-spacing:.04em;cursor:pointer;transition:.13s}
.sc-skills button:hover{border-color:var(--acid);color:var(--acid);box-shadow:0 0 0 1px rgba(209,48,73,.14)}
.sc-stage-chip{display:inline-block;align-self:flex-start;font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--acid);border:1px solid var(--acid-dim);border-radius:999px;padding:4px 10px;background:rgba(209,48,73,.08)}
.sc-stage-chip[hidden]{display:none!important}
/* Empty-chat welcome */
.sc-welcome{margin:auto;width:100%;max-width:520px;text-align:center;padding:8px}
.sc-welcome-title{font-family:var(--display);font-size:30px;letter-spacing:.05em;text-transform:uppercase;
  color:var(--text);margin:0 0 10px;line-height:1}
.sc-welcome-intro{color:var(--muted);font-size:14px;line-height:1.6;margin:0}
.sc-welcome-intro b{color:var(--acid)}
.sc-starters{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sc-starter{text-align:left;background:linear-gradient(180deg,rgba(21,24,22,.7),rgba(9,11,10,.6));
  border:1px solid var(--border-2);border-radius:10px;padding:13px 14px;cursor:pointer;transition:.14s}
.sc-starter:hover{border-color:var(--acid);box-shadow:0 6px 20px rgba(0,0,0,.4),0 0 0 1px rgba(209,48,73,.18);transform:translateY(-2px)}
.sc-starter .sct{font-family:var(--display);font-size:18px;letter-spacing:.04em;text-transform:uppercase;color:var(--text);display:block;line-height:1.05}
.sc-starter .scd{color:var(--muted);font-size:11.5px;line-height:1.4;margin-top:4px;display:block}
@media(max-width:520px){.sc-starters{grid-template-columns:1fr}}
.panel-gallery{max-width:none}
.settings-section{margin:0 0 4px;font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--acid);font-weight:600}
.realism-guide{margin:12px 0 18px;padding:12px;border:1px solid rgba(255,45,139,.28);background:rgba(255,45,139,.06)}
.realism-guide summary{cursor:pointer;color:var(--accent);font-family:var(--title);letter-spacing:.06em;text-transform:uppercase}
.settings-section:not(:first-child){margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}
.credit-box{border:1px solid rgba(209,48,73,.18);background:rgba(209,48,73,.045);padding:12px;margin:8px 0 18px}
.credit-box-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.credit-label{display:block;font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-family:var(--mono)}
#settings-credit-balance{display:block;color:var(--acid);font-size:22px;margin-top:2px}
.credit-pack-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.credit-pack{border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.22);padding:10px;border-radius:6px}
.credit-pack b{display:block;color:var(--text);font-size:12px;margin-bottom:4px}
.credit-pack span{display:block;color:var(--muted);font-size:10px}
.credit-ledger{margin-top:10px;display:grid;gap:6px;max-height:180px;overflow:auto}
.credit-tx{display:grid;grid-template-columns:80px 1fr auto;gap:8px;align-items:center;border:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.18);padding:7px 8px;border-radius:4px;font-size:10px;color:var(--muted)}
.credit-tx b{color:var(--text);font-weight:600}
.credit-tx .pos{color:var(--acid)}
.credit-tx .neg{color:#ff8f8f}
.settings-grid{gap:12px}
.gal-head{margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.gal-browse-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:-4px 0 12px;padding:8px 0 10px;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:20;background:linear-gradient(180deg,rgba(12,10,8,.97) 70%,rgba(12,10,8,.88));backdrop-filter:blur(6px)}
.gal-browse-bar .gal-search-wrap{flex:1 1 180px;min-width:140px;position:relative;display:flex;align-items:center}
.gal-browse-bar .gal-search{width:100%;max-width:320px;padding:7px 32px 7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--panel);color:var(--text);font:inherit}
.gal-browse-bar .gal-search-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:0;border-radius:3px;background:rgba(255,255,255,.08);color:var(--muted);font-size:16px;line-height:1;cursor:pointer}
.gal-browse-bar .gal-search-clear:hover{color:var(--text);background:rgba(255,255,255,.14)}
.gal-browse-bar .gal-sort-wrap{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.gal-browse-bar .gal-sort{padding:6px 8px;border:1px solid var(--border);border-radius:4px;background:var(--panel);color:var(--text);font:inherit}
/* The count used to be flex:1 1 auto and Load more had margin-left:auto, so the count
   stretched and shoved the button to the far right — a big dead gap between "Showing 96
   of 100" and the button (Jared 2026-07-15). Both now size to content so they sit
   together and the bar packs left. */
.gal-browse-bar .gal-showing-count{flex:0 0 auto;font-size:12px;color:var(--muted);letter-spacing:.04em;font-variant-numeric:tabular-nums}
.gal-browse-bar .gal-load-more{margin-left:0;white-space:nowrap}
.gal-browse-bar .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.gal-purge-images{color:#ffd0a0;border-color:rgba(214,156,101,.62);background:rgba(214,156,101,.1)}
.gal-purge-images:hover{background:rgba(214,156,101,.2);border-color:#d69c65;color:#ffe4c7}
.gal-purge-images[disabled]{opacity:.55;cursor:wait}
.card[data-src] .badge,
.card[data-src] .card-meta,
.card[data-src] .card-date-badge{display:none!important}
.card .card-meta{
  position:absolute;left:0;right:0;bottom:0;z-index:6;max-height:52%;
  overflow:auto;padding:28px 8px 42px;
  background:linear-gradient(transparent,rgba(0,0,0,.55) 18%,rgba(0,0,0,.94));
  pointer-events:none;font-size:10px;line-height:1.35;color:#dbc4cb;
  scrollbar-width:thin;
}
.card.audio-card .card-meta{position:relative;max-height:none;padding:8px 10px 10px;background:rgba(0,0,0,.72);pointer-events:auto}
.card-date-badge{
  position:absolute;top:6px;left:6px;z-index:8;max-width:calc(100% - 12px);
  padding:3px 6px;border-radius:3px;
  background:rgba(0,0,0,.78);border:1px solid rgba(255,255,255,.12);
  font:8px/1.25 var(--mono);letter-spacing:.04em;color:var(--acid-dim);
  text-transform:uppercase;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.card-meta-date{display:block;margin:0 0 4px;font:9px/1.3 var(--mono);letter-spacing:.06em;color:var(--acid-dim);text-transform:uppercase}
.card-meta-prompt,.card-meta-settings{
  margin:0 0 6px;white-space:pre-wrap;word-break:break-word;
  font:10px/1.4 var(--mono);color:#ebd7de;
}
.card-meta-settings{color:#c8aeb7;font-size:9px;opacity:.95}
.card.card-lazy .card-meta{opacity:.85}
.card.card-ready{cursor:zoom-in}
.card .badge{z-index:5}
.card .tools{z-index:15;pointer-events:none}
.card .tools button{pointer-events:auto;position:relative;z-index:16}
.card img,.card video{position:relative;z-index:1;cursor:zoom-in}
/* Settings: centered, constrained column so it reads as a focused, professional page
   instead of controls hugging the left of a full-width container. Jared 2026-07-12
   Viewport lock 2026-07-20: owner Pony list used to push this page past the screen
   with no visible scrollbar — keep the page shell in-flow, show a thin scrollbar,
   and cap the owner list so Settings stays usable. */
#page-settings.dd-page.active{
  scrollbar-width:thin;
  scrollbar-color:rgba(209,48,73,.45) transparent;
}
#page-settings.dd-page.active::-webkit-scrollbar{display:block;width:8px}
#page-settings.dd-page.active::-webkit-scrollbar-thumb{
  background:rgba(209,48,73,.4);
  border-radius:8px;
}
#page-settings .page-shell{
  max-width:720px;
  margin:0 auto;
  height:auto;
  min-height:100%;
  padding-bottom:40px;
  box-sizing:border-box;
}
#page-settings .wrap{margin:0 0 16px !important;max-width:none !important}
#page-settings .wrap:last-child{margin-bottom:0 !important}
#page-settings .panel{padding:20px !important;max-width:100%;box-sizing:border-box}
#page-settings .page-head h2{font-size:clamp(26px,3vw,38px)}
#page-settings .seedrow-keys{grid-template-columns:1fr auto auto}
#page-settings .owner-pony-list{
  max-height:min(240px,36vh);
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
  margin-top:4px;
  padding-right:4px;
  border:1px solid var(--border);
  border-radius:6px;
  background:rgba(0,0,0,.18);
}
#page-settings .owner-pony-list .owner-pony-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px 10px;
  padding:8px 10px;
  border-bottom:1px solid #271f22;
}
#page-settings .owner-pony-list .owner-pony-row>div:first-child{
  flex:1 1 140px;
}
#page-settings .owner-pony-list .owner-credits-input{
  min-width:0;
}
#page-settings .owner-pony-list .owner-pony-row:last-child{border-bottom:0}
#page-settings #owner-pony-details>summary{
  list-style:none;
  display:flex;
  align-items:center;
  gap:8px;
}
#page-settings #owner-pony-details>summary::-webkit-details-marker{display:none}
#page-settings #owner-pony-details>summary::after{
  content:"▸";
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
  transition:transform .15s;
}
#page-settings #owner-pony-details[open]>summary::after{transform:rotate(90deg)}
/* Range sliders (e.g. gore strength) — green accent, live value label. Jared 2026-07-12 */
.dd-slider{width:100%;accent-color:var(--acid);height:24px;cursor:pointer;margin:2px 0 0}
.range-val{color:var(--acid);font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.02em;white-space:nowrap}
/* Keep Intensity/Chaos value on the same line as the field name so the slider
   Y-position stays fixed when the label is "1-DEFAULT" (narrow columns especially). */
label:has(.range-val){white-space:nowrap}
/* Settings: Studio status panel (Jared 2026-07-12) */
.settings-status{margin-bottom:14px}
.status-grid{display:flex;flex-direction:column;gap:0;margin-top:6px}
.status-row{display:flex;align-items:center;gap:11px;padding:11px 2px;border-bottom:1px solid var(--border);font-size:13px}
.status-row:last-child{border-bottom:0}
.status-dot{width:9px;height:9px;border-radius:50%;background:#5a5a52;flex:0 0 auto;transition:.2s}
.status-dot.ok{background:var(--ok);box-shadow:0 0 9px rgba(87,196,107,.55)}
.status-dot.bad{background:#c0463a;box-shadow:0 0 9px rgba(192,70,58,.5)}
.status-dot.warn{background:#d69c65}
.status-name{color:var(--text);flex:1 1 auto}
.status-val{color:var(--muted);font-family:var(--mono);font-size:11px;letter-spacing:.03em;text-align:right;white-space:nowrap}
.status-val.ok{color:var(--acid-dim)}
.page-head a.dd-jump{color:var(--acid-dim);text-decoration:none;border-bottom:1px solid transparent}
.page-head a.dd-jump:hover{color:var(--acid);border-bottom-color:var(--acid-dim)}
/* === Two-column Create layout === */
.create-shell{padding:0;display:flex;flex-direction:column}
#page-video .page-shell,
#page-audio .page-shell,
#page-image .page-shell{
  display:flex;
  flex-direction:column;
}
.create-split{
  display:grid;
  grid-template-columns:minmax(340px,420px) minmax(0,1fr);
  gap:14px;
  padding:0 16px 12px;
  align-items:start;
  flex:1 1 auto;
  min-height:0;
  height:100%;
}
.video-split,
.audio-split{
  display:grid;
  grid-template-columns:minmax(340px,420px) minmax(0,1fr);
  gap:14px;
  padding:0 16px 12px;
  align-items:start;
  height:calc(100vh - 106px);
  min-height:0;
}
#page-video .video-split,
#page-audio .audio-split{
  flex:1 1 auto;
  height:auto;
}
.create-controls-col,.video-controls-col,.audio-controls-col{
  position:relative;
  top:auto;
  height:100%;
  max-height:none;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--acid) rgba(255,255,255,.06);
  padding-top:0;
  padding-right:6px;
  min-height:0;
}
#page-generate .create-controls-col{
  overflow-x:hidden;
  overflow-y:auto;
}
.create-controls-col::-webkit-scrollbar,.video-controls-col::-webkit-scrollbar,.audio-controls-col::-webkit-scrollbar{width:10px}
.create-controls-col::-webkit-scrollbar-track,.video-controls-col::-webkit-scrollbar-track,.audio-controls-col::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:6px}
.create-controls-col::-webkit-scrollbar-thumb,.video-controls-col::-webkit-scrollbar-thumb,.audio-controls-col::-webkit-scrollbar-thumb{background:rgba(209,48,73,.55);border-radius:6px}
.create-controls-col::-webkit-scrollbar-thumb:hover,.video-controls-col::-webkit-scrollbar-thumb:hover,.audio-controls-col::-webkit-scrollbar-thumb:hover{background:var(--acid)}
.create-results-col,.video-results-col,.audio-results-col{
  padding-top:0;
  min-height:400px;
  height:100%;
  min-width:0;
}
.create-results-col .panel-gallery,.video-results-col .panel-gallery,.audio-results-col .panel-gallery{
  height:100%;
  min-height:0;
  max-height:none;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
#create-gallery-slot,#x-gallery-slot,#gallery-slot,#video-gallery-slot,#audio-gallery-slot{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:var(--acid) rgba(255,255,255,.06);
  -webkit-overflow-scrolling:touch;
}
#create-gallery-slot::-webkit-scrollbar,#x-gallery-slot::-webkit-scrollbar,#gallery-slot::-webkit-scrollbar,
#video-gallery-slot::-webkit-scrollbar,#audio-gallery-slot::-webkit-scrollbar{width:10px}
#create-gallery-slot::-webkit-scrollbar-track,#x-gallery-slot::-webkit-scrollbar-track,#gallery-slot::-webkit-scrollbar-track,
#video-gallery-slot::-webkit-scrollbar-track,#audio-gallery-slot::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:6px}
#create-gallery-slot::-webkit-scrollbar-thumb,#x-gallery-slot::-webkit-scrollbar-thumb,#gallery-slot::-webkit-scrollbar-thumb,
#video-gallery-slot::-webkit-scrollbar-thumb,#audio-gallery-slot::-webkit-scrollbar-thumb{background:rgba(209,48,73,.55);border-radius:6px}
#create-gallery-slot::-webkit-scrollbar-thumb:hover,#x-gallery-slot::-webkit-scrollbar-thumb:hover,#gallery-slot::-webkit-scrollbar-thumb:hover,
#video-gallery-slot::-webkit-scrollbar-thumb:hover,#audio-gallery-slot::-webkit-scrollbar-thumb:hover{background:var(--acid)}
.create-result-head{
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
  flex-wrap:wrap;
  gap:8px;
  flex:0 0 auto;
  position:sticky;
  top:0;
  z-index:4;
  background:linear-gradient(180deg,rgba(12,15,12,.98),rgba(12,15,12,.92));
}
#page-gallery .gal-head{
  flex:0 0 auto;
  position:sticky;
  top:0;
  z-index:4;
  background:linear-gradient(180deg,rgba(12,15,12,.98),rgba(12,15,12,.92));
}
.character-details{
  margin:12px 0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(255,255,255,.025);
}
.character-details summary{
  cursor:pointer;
  color:var(--acid);
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.character-ref-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.character-upload{
  min-height:52px;
  padding:8px 6px;
  white-space:normal;
  text-align:center;
  font-size:10px;
  line-height:1.35;
  letter-spacing:.04em;
  overflow:hidden;
}
.character-upload.has-image{
  border-color:rgba(209,48,73,.45);
  color:var(--text);
  background:rgba(209,48,73,.08);
}
.character-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.character-actions .clear{
  white-space:normal;
  line-height:1.35;
  min-height:38px;
  padding:8px 6px;
  font-size:9px;
  letter-spacing:.08em;
  overflow:hidden;
}
.character-actions #char-save{border-color:rgba(209,48,73,.45);color:var(--acid)}
.character-actions #char-save:hover{border-color:var(--acid);color:var(--acid);background:rgba(209,48,73,.08)}
.char-facelock-row{
  display:flex;align-items:center;gap:8px;margin-top:10px;
  font-size:10px;color:var(--muted);cursor:pointer;
}
.char-facelock-row input{accent-color:var(--acid)}
.char-facelock-row[hidden]{display:none}
.char-active-chip{
  display:inline-block;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(209,48,73,.4);
  background:rgba(209,48,73,.1);
  color:var(--acid);
  font-size:9px;
  letter-spacing:.05em;
  vertical-align:middle;
  text-transform:none;
}
.character-preview{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(74px,1fr));
  gap:8px;
  margin-top:10px;
}
.character-preview.compact{
  grid-template-columns:repeat(auto-fill,minmax(56px,1fr));
}
.character-thumb{
  position:relative;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:8px;
  aspect-ratio:1;
  background:#070807;
}
.character-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.character-thumb span{
  position:absolute;
  left:4px;
  bottom:4px;
  padding:2px 4px;
  border-radius:4px;
  background:rgba(0,0,0,.62);
  color:var(--acid);
  font-family:var(--mono);
  font-size:8px;
  text-transform:uppercase;
}
.character-actions{margin-top:10px}
#create-gallery-slot,#video-gallery-slot,#audio-gallery-slot{flex:1;min-height:0}
#create-gallery-slot .empty,#video-gallery-slot .empty,#audio-gallery-slot .empty{padding:80px 20px}
#page-generate.active{
  overflow:hidden;
}
#page-generate .page-shell.create-shell{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding-bottom:12px;
}
#page-generate .create-split{
  flex:1;
  min-height:0;
  align-items:stretch;
}
#page-generate .create-controls-col,
#page-generate .create-results-col{
  height:100%;
  max-height:100%;
}
#page-generate .create-controls-col{
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--acid) rgba(255,255,255,.06);
  min-height:0;
}
#page-generate .create-panel-split{
  flex:0 0 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:visible;
  padding-bottom:4px;
  gap:4px;
}
#page-generate .create-options-scroll{
  flex:0 0 auto;
  min-height:0;
  overflow:visible;
  padding-right:0;
}
#page-gallery .page-shell{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding-bottom:12px;
}
#page-gallery .wrap.single{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#page-gallery .panel-gallery{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
@media(max-width:900px){
  .create-split,.video-split,.audio-split{grid-template-columns:1fr;padding:0 12px 24px}
  .create-controls-col,.video-controls-col,.audio-controls-col{position:relative;top:auto;max-height:none}
  .create-results-col .panel-gallery,.video-results-col .panel-gallery,.audio-results-col .panel-gallery{max-height:none}
}
.secret-x-entry{
  width:min(430px,100%);
  margin:-14px auto 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#8a5b70;
  font-family:var(--mono);
  font-size:9px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.62;
}
.secret-x-btn{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  text-decoration:none;
  border-radius:999px;
  border:1px solid rgba(255,59,141,.58);
  background:radial-gradient(circle at 35% 25%, rgba(255,180,220,.32), rgba(255,59,141,.16) 38%, rgba(28,8,20,.75) 100%);
  color:#ff8fc7;
  font-family:var(--mono);
  font-size:15px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  box-shadow:0 0 12px rgba(255,59,141,.12);
  transition:.15s;
}
.secret-x-btn:hover{
  color:#fff;
  border-color:#ff3b8d;
  background:radial-gradient(circle at 35% 25%, rgba(255,200,230,.46), rgba(255,59,141,.3) 42%, rgba(45,8,28,.9) 100%);
  box-shadow:0 0 18px rgba(255,59,141,.28);
}
.dd-nav a.launch-external{
  margin-left:auto;
  border-color:rgba(117,216,255,.28)!important;
  color:#75d8ff!important;
}
@media(max-width:960px){
  .create-split{grid-template-columns:1fr}
  .create-controls-col{position:static;max-height:none;overflow-y:visible;padding-top:20px}
  .create-results-col{padding-top:0}
}

/* === Audio cards - larger player === */
.card.audio-card{aspect-ratio:unset;min-height:132px;flex-direction:column;justify-content:flex-start;padding:0}
.card.audio-card audio{width:100%;min-height:66px;padding:16px 12px 12px}
.card.audio-card .badge{position:relative;top:auto;left:auto;display:block;padding:8px 10px;font-size:9px;border-radius:0;background:rgba(0,0,0,.6);border-bottom:1px solid var(--border);white-space:normal;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.audio-page .gallery{--gal-cell:360px}

/* === Drag-drop image to prompt === */
.prompt-drop-zone{
  border:2px dashed var(--border-2);border-radius:var(--radius);
  background:transparent;transition:.15s;position:relative;
}
.prompt-drop-zone.drag-over{
  border-color:var(--acid-dim);background:rgba(209,48,73,.06);
}
.prompt-drop-zone.has-image{
  border-color:rgba(209,48,73,.4);background:rgba(209,48,73,.04);
}
.prompt-img-thumb{
  display:flex;align-items:center;gap:8px;padding:6px 10px;
  background:rgba(0,0,0,.35);border-bottom:1px solid var(--border);
  border-radius:var(--radius) var(--radius) 0 0;
}
.prompt-img-thumb img{width:36px;height:36px;object-fit:cover;border-radius:3px;border:1px solid var(--border-2)}
.prompt-img-thumb span{font-size:9px;color:var(--muted);letter-spacing:.06em;flex:1}
.prompt-img-thumb button{background:none;border:none;color:#ff6b6b;cursor:pointer;font-size:14px;line-height:1;padding:2px}

/* === Start/End frame improved UI === */
.startend-panel{
  background:rgba(0,0,0,.35);border:1px solid var(--border);border-radius:var(--radius);
  padding:12px;margin:10px 0;
}
.startend-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.startend-header h4{margin:0;font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--acid-dim);white-space:nowrap}
.startend-frames{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.startend-frame{
  background:rgba(0,0,0,.4);border:1px dashed var(--border-2);border-radius:var(--radius);
  aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;
  cursor:pointer;position:relative;overflow:hidden;transition:.15s;
}
.startend-frame:hover{border-color:var(--acid-dim)}
.startend-frame.has-image{border:1px solid rgba(209,48,73,.4);border-style:solid}
.startend-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.startend-frame .frame-label{
  position:absolute;bottom:0;left:0;right:0;
  background:rgba(0,0,0,.7);text-align:center;font-size:8px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted);padding:4px;
}
.startend-frame .frame-clear{
  position:absolute;top:4px;right:4px;background:rgba(0,0,0,.7);border:1px solid #a33;
  color:#ff6b6b;border-radius:50%;width:20px;height:20px;display:none;align-items:center;
  justify-content:center;font-size:11px;cursor:pointer;z-index:5;
}
.startend-frame.has-image .frame-clear{display:flex}
.startend-frame .frame-add{font-size:9px;color:var(--muted);text-align:center;padding:8px}
/* Reference tray (video reference-to-video + image edit-with-references) — same
   .startend-frame box, just repeated N-up instead of the fixed 2-up Start/End grid. */
.ref-frames{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}
.ref-frames .startend-frame{aspect-ratio:1}
.ref-frames .startend-frame .frame-label{font-size:8px;letter-spacing:.06em}
.startend-frame.ref-add{border-style:dashed}
.startend-frame.ref-add:hover{border-color:var(--acid-dim)}
.startend-frame.ref-add .frame-add-plus{font-size:22px;color:var(--muted);line-height:1}

/* === Image page (gallery filtered to images) === */
.image-page-split{
  display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:14px;padding:0 16px 12px;
  flex:1 1 auto;min-height:0;height:auto;
  overflow:hidden;
}
.image-page-tools{
  position:relative;top:auto;height:100%;max-height:none;overflow-y:auto;overflow-x:hidden;overflow-anchor:none;scrollbar-width:none;padding-top:0;min-height:0;
}
.image-page-tools::-webkit-scrollbar{display:none}
.image-page-gallery{padding-top:0;min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--acid) rgba(255,255,255,.06)}
.image-page-gallery::-webkit-scrollbar{width:10px}
.image-page-gallery::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:6px}
.image-page-gallery::-webkit-scrollbar-thumb{background:rgba(209,48,73,.55);border-radius:6px}
.image-page-gallery::-webkit-scrollbar-thumb:hover{background:var(--acid)}
#page-image .gallery{--gal-cell:240px}
.image-page-tools .panel>h3.settings-section:first-of-type{margin-top:0;padding-top:0;border-top:0}
#image-page-gallery .card.img-page-sel{outline:2px solid var(--acid);outline-offset:2px;box-shadow:0 0 0 4px rgba(209,48,73,.13)}
.img-edit-preview{position:relative;margin-top:8px;min-height:96px;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--border-2);border-radius:10px;background:#0a0c0a;overflow:hidden}
.img-edit-preview img{display:block;max-width:100%;max-height:200px;object-fit:contain}
.img-edit-preview .hint{padding:14px;text-align:center}

/* === Home splash page === */
.app-header .logo{cursor:pointer}
.home-wrap{max-width:1500px;margin:0 auto;padding:18px 24px 56px}
.home-hero{text-align:center;padding:28px 16px 30px}
.home-hero-title{font-size:clamp(34px,7vw,84px)}
.home-hero-title .d2{color:var(--acid)}
.home-hero-sub{max-width:680px;margin:14px auto 0;color:var(--muted);font-size:clamp(13px,1.6vw,16px);line-height:1.5}
/* Home A2 markup exists in HTML but is MOBILE-ONLY — hide on PC. */
.home-continue{display:none!important}
.home-kicker{display:block;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--acid);margin-bottom:4px}
.home-primary{display:grid;grid-template-columns:1fr;gap:12px;min-height:0}
.home-splash{
  position:relative;display:block;border:1px solid var(--border-2);border-radius:16px;overflow:hidden;
  min-height:160px;text-decoration:none;color:#fff;background:#0a0809;
  cursor:pointer;-webkit-tap-highlight-color:transparent;z-index:1
}
.home-splash-img{
  position:absolute;inset:0;background-image:var(--img);background-size:cover;background-position:center;
  pointer-events:none
}
.home-splash::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(6,8,6,.05) 0%,rgba(6,8,6,.4) 50%,rgba(6,8,6,.94) 100%);
  pointer-events:none
}
.home-splash-body{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:16px 18px;pointer-events:none}
.home-splash-body h3{
  margin:0;font-family:"Barlow Condensed",var(--label);font-size:clamp(20px,2.2vw,28px);
  letter-spacing:.05em;text-transform:uppercase;text-shadow:0 1px 8px rgba(0,0,0,.9);font-weight:400
}
.home-yours-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px}
.home-yours-head .home-kicker{margin:0}
.home-yours-all{color:var(--muted);text-decoration:none;font-size:12px;letter-spacing:.04em}
.home-recent-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.home-recent-strip[hidden],.home-yours-empty[hidden]{display:none!important}
.home-recent-thumb{
  flex:0 0 auto;width:92px;height:92px;position:relative;border-radius:12px;overflow:hidden;
  border:1px solid var(--border);background:#100c0e;padding:0;cursor:pointer
}
.home-recent-thumb img,.home-recent-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.home-recent-thumb.is-video::after{
  content:"";position:absolute;left:50%;top:50%;width:0;height:0;margin:-6px 0 0 -4px;
  border-left:10px solid #fff;border-top:6px solid transparent;border-bottom:6px solid transparent;
  filter:drop-shadow(0 1px 4px rgba(0,0,0,.8));pointer-events:none
}
.home-yours-empty{
  border:1px dashed var(--border);border-radius:12px;padding:18px 14px;text-align:center;
  color:var(--muted);font-size:13px;background:rgba(255,255,255,.02)
}
.home-mini-tools{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.home-mini{
  position:relative;display:flex;align-items:flex-end;min-height:72px;border-radius:12px;overflow:hidden;
  border:1px solid var(--border);text-decoration:none;color:#fff;padding:8px 10px;
  font-family:"Barlow Condensed",var(--label);font-size:14px;letter-spacing:.05em;text-transform:uppercase;
  -webkit-tap-highlight-color:transparent;cursor:pointer;z-index:1
}
.home-mini-img{position:absolute;inset:0;background-image:var(--img);background-size:cover;background-position:center;opacity:.85;pointer-events:none}
.home-mini::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 20%,rgba(6,8,6,.88) 100%);pointer-events:none}
.home-mini>span:last-child{position:relative;z-index:1;text-shadow:0 1px 6px rgba(0,0,0,.9);pointer-events:none}
.more-shell{max-width:720px;margin:0 auto;padding:18px 20px 48px}
.more-page-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px}
.more-page-note{margin:0 0 14px;font-size:12px;color:var(--muted);line-height:1.45}
.more-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.more-tile{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;
  min-height:100px;padding:14px;border-radius:14px;overflow:hidden;border:1px solid var(--border-2);
  text-decoration:none;color:#fff;background:#0a0809;cursor:pointer;-webkit-tap-highlight-color:transparent
}
.more-tile-wide{grid-column:1/-1;min-height:72px}
.more-tile-img{position:absolute;inset:0;background-image:var(--img);background-size:cover;background-position:center;opacity:.85;pointer-events:none}
.more-tile::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 20%,rgba(0,0,0,.9));pointer-events:none}
.more-tile-label,.more-tile-sub{position:relative;z-index:1;pointer-events:none}
.more-tile-label{font-family:"Barlow Condensed",var(--label);font-size:18px;letter-spacing:.05em;text-transform:uppercase}
.more-tile-sub{font-size:11px;color:#c4adb5;margin-top:4px;display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:14px}
.home-card{position:relative;display:block;border:1px solid var(--border-2);border-radius:14px;overflow:hidden;
  min-height:200px;text-decoration:none;color:#fff;background:#0a0c0a;transition:transform .15s, border-color .15s, box-shadow .15s}
.home-card:hover{transform:translateY(-4px);border-color:var(--acid);box-shadow:0 14px 40px rgba(0,0,0,.55),0 0 0 1px rgba(209,48,73,.25)}
.home-card-img{position:absolute;inset:0;background-image:var(--img);background-size:cover;background-position:center;
  filter:saturate(1.05) contrast(1.02);transition:transform .35s, filter .15s}
.home-card:hover .home-card-img{transform:scale(1.06)}
.home-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,8,6,.05) 0%,rgba(6,8,6,.55) 55%,rgba(6,8,6,.92) 100%)}
.home-card-body{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:16px 16px 15px}
.home-card-kicker{display:inline-block;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--acid);
  background:rgba(0,0,0,.45);border:1px solid rgba(209,48,73,.3);border-radius:999px;padding:2px 8px;margin-bottom:8px}
/* Home card titles — Barlow Condensed semibold: firmer and more contemporary than
   Bebas without competing with the CINEGORE mark. Titles only (blurbs removed). */
.home-card-body h3{margin:0;font-family:"Barlow Condensed",var(--label);
  font-size:clamp(17px,1.55vw,22px);font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  display:inline-block;transform:none}
.home-feature .home-card-body h3{font-size:clamp(18px,1.7vw,24px)}
.home-card-body p{display:none}
.home-feature{grid-column:span 2;min-height:280px}
.home-card.nav-x-card .home-card-kicker{color:#ff8fc7;border-color:rgba(255,59,141,.4)}
.home-card.nav-x-card:hover{border-color:#ff3b8d;box-shadow:0 14px 40px rgba(0,0,0,.55),0 0 0 1px rgba(255,59,141,.3)}
.home-card.home-perchance-card{background-image:linear-gradient(135deg,#102b35,#3f2c32 45%,#2b2610)}
.home-card.home-perchance-card .home-card-img{
  background:
    radial-gradient(circle at 22% 20%,rgba(155,220,255,.45),transparent 22%),
    radial-gradient(circle at 78% 24%,rgba(209,48,73,.34),transparent 24%),
    linear-gradient(135deg,rgba(11,34,42,.95),rgba(58,40,46,.88) 48%,rgba(44,36,14,.9));
}
.home-card.home-perchance-card .home-card-kicker{color:#9bdcff;border-color:rgba(70,180,255,.45)}
.home-card.home-perchance-card:hover{border-color:#65cfff;box-shadow:0 14px 40px rgba(0,0,0,.55),0 0 0 1px rgba(70,180,255,.28)}
.home-forge-card{background-image:linear-gradient(135deg,#1f1008,#281608 35%,#0d1a12) !important}
.home-forge-card .home-card-img{background-image:var(--img,radial-gradient(ellipse 70% 60% at 50% 70%,rgba(255,140,20,.35) 0%,rgba(200,70,10,.25) 30%,transparent 70%),
  radial-gradient(ellipse 30% 40% at 20% 30%,rgba(255,200,60,.10) 0%,transparent 50%),
  radial-gradient(ellipse 25% 40% at 80% 20%,rgba(255,100,0,.08) 0%,transparent 50%),
  linear-gradient(180deg,#140c06 0%,#2a1a0e 40%,#0d1a12 100%)) !important;opacity:1}
.home-forge-card .home-card-kicker{color:#ff9f4a;border-color:rgba(255,160,40,.4)}
.home-forge-card:hover{border-color:#ff9f4a !important;box-shadow:0 14px 40px rgba(0,0,0,.55),0 0 0 1px rgba(255,160,40,.25) !important}
/* Cards with no splash image yet get a themed gradient so nothing looks broken */
.home-card{background-image:linear-gradient(135deg,#14181a,#241a2c)}
.home-card.nav-x-card{background-image:linear-gradient(135deg,#2a0e1c,#3a1430)}
@media(max-width:1100px){.home-grid{grid-template-columns:repeat(2,1fr)}.home-feature{grid-column:span 2}}
@media(max-width:560px){.home-grid{grid-template-columns:1fr}.home-feature{grid-column:span 1;min-height:220px}}

/* === Editor playhead === */
.tl-track-body{position:relative}
.tl-playhead{position:absolute;top:0;bottom:0;width:2px;background:var(--acid);pointer-events:none;z-index:20;box-shadow:0 0 6px rgba(209,48,73,.7)}
.tl-ruler-marks{position:relative;cursor:pointer}
.tl-track-body{cursor:text}

/* === Storyboard page === */
.storyboard-page{padding:0 24px 32px}
.storyboard-toolbar{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:12px 0;border-bottom:1px solid var(--border);margin-bottom:18px;
}
.storyboard-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;
}
.storyboard-card{
  background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;position:relative;cursor:pointer;
}
.storyboard-card .sb-thumb{
  width:100%;aspect-ratio:16/9;background:#0a0c0a;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.storyboard-card .sb-thumb img,.storyboard-card .sb-thumb video{width:100%;height:100%;object-fit:cover}
.storyboard-card .sb-thumb .sb-empty{font-size:11px;color:var(--muted);letter-spacing:.1em}
.storyboard-card .sb-num{
  position:absolute;top:6px;left:6px;background:rgba(0,0,0,.75);border:1px solid var(--border-2);
  color:var(--acid);font-size:9px;letter-spacing:.1em;padding:2px 7px;border-radius:3px;
}
.storyboard-card .sb-body{padding:10px}
.storyboard-card .sb-scene{font-size:10px;color:var(--text);letter-spacing:.06em;margin:0 0 6px;min-height:32px;line-height:1.5;outline:none;border-radius:3px}
.storyboard-card .sb-scene:focus{background:rgba(255,255,255,.04);padding:2px 4px}
.storyboard-card .sb-scene:empty::before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.storyboard-card .sb-actions{display:flex;gap:6px;flex-wrap:wrap}
.storyboard-card .sb-actions button{flex:1;min-width:52px}
.sb-add-panel{
  border:2px dashed var(--border-2);border-radius:var(--radius);aspect-ratio:16/9;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  cursor:pointer;background:transparent;transition:.15s;
}
.sb-add-panel:hover{border-color:var(--acid-dim);background:rgba(209,48,73,.04)}
.sb-add-panel span{font-size:11px;color:var(--muted);letter-spacing:.1em}

/* === Projects canvas === */
#page-projects .proj-shell{
  display:flex;flex-direction:column;height:calc(100vh - 88px);min-height:0;padding-bottom:12px;
}
.proj-page-head{flex:0 0 auto;padding:0 16px}
.proj-layout{
  flex:1 1 auto;min-height:0;display:grid;
  grid-template-columns:220px minmax(0,1fr) minmax(280px,340px);
  gap:12px;padding:0 16px 8px;align-items:stretch;
}
@media(max-width:1100px){
  .proj-layout{grid-template-columns:200px minmax(0,1fr)}
  .proj-detail{display:none}
  .proj-layout.proj-has-selection{grid-template-columns:200px minmax(0,1fr) minmax(260px,300px)}
  .proj-layout.proj-has-selection .proj-detail{display:flex}
}
@media(max-width:760px){
  .proj-layout,.proj-layout.proj-has-selection{grid-template-columns:1fr}
  .proj-sidebar{max-height:140px;overflow:hidden}
  .proj-list{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}
  .proj-list li{flex:0 0 auto;min-width:140px}
}
.proj-sidebar,.proj-detail,.proj-hero,.proj-concept{
  background:linear-gradient(180deg,rgba(21,24,22,.88),rgba(9,11,10,.82));
  border:1px solid rgba(255,255,255,.075);border-radius:var(--radius);
  backdrop-filter:blur(14px);box-shadow:0 10px 28px rgba(0,0,0,.2);
}
.proj-sidebar{display:flex;flex-direction:column;min-height:0;padding:12px}
.proj-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.proj-sidebar-label{font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.proj-new-btn{padding:5px 10px;font-size:10px;margin:0}
.proj-list{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1 1 auto;scrollbar-width:thin}
.proj-list li{margin-bottom:6px}
.proj-list-btn{
  width:100%;text-align:left;background:var(--field);border:1px solid var(--border);
  border-radius:var(--radius);padding:10px 11px;cursor:pointer;color:var(--text);
  font-family:var(--mono);font-size:11px;transition:.12s;
}
.proj-list-btn:hover{border-color:var(--acid-dim);color:var(--acid)}
.proj-list-btn.active{border-color:var(--acid-dim);background:rgba(209,48,73,.08);box-shadow:inset 0 0 0 1px rgba(209,48,73,.12)}
.proj-list-btn .pl-title{display:block;font-size:12px;color:var(--text);margin-bottom:4px;letter-spacing:.04em}
.proj-list-btn .pl-meta{font-size:9px;color:var(--muted);letter-spacing:.08em}
.proj-main{min-height:0;overflow-y:auto;scrollbar-width:thin;padding-right:2px}
.proj-hero{padding:14px 16px;margin-bottom:10px}
.proj-hero-top{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.proj-hero-titles{flex:1 1 240px;min-width:0}
.proj-title-input{
  width:100%;background:transparent;border:0;border-bottom:1px solid var(--border);
  padding:4px 0 8px;font-size:18px;font-weight:700;letter-spacing:.06em;
  color:var(--text);font-family:var(--mono);outline:none;
}
.proj-title-input:focus{border-bottom-color:var(--acid-dim)}
.proj-logline-input{
  width:100%;background:transparent;border:0;padding:6px 0 0;font-size:11px;
  color:var(--muted);font-family:var(--mono);outline:none;
}
.proj-logline-input:focus{color:var(--text)}
.proj-hero-actions{display:flex;gap:6px;flex-wrap:wrap}
.proj-chips{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 10px}
.proj-chip{
  font-size:9px;letter-spacing:.12em;text-transform:uppercase;padding:4px 9px;
  border-radius:999px;border:1px solid var(--border-2);color:var(--muted);background:rgba(0,0,0,.25);
}
.proj-chip.acid{color:var(--acid);border-color:var(--acid-dim);background:rgba(209,48,73,.06)}
.proj-chip.blood{color:#e88;border-color:rgba(200,32,42,.45);background:rgba(200,32,42,.08)}
.proj-progress{margin-top:4px}
.proj-progress-label{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted);letter-spacing:.08em;margin-bottom:6px}
.proj-progress-label b{color:var(--acid-dim);font-weight:700;font-variant-numeric:tabular-nums}
.proj-progress-bar{height:4px;border-radius:999px;background:rgba(255,255,255,.06);overflow:hidden}
.proj-progress-fill{height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,var(--acid-dim),var(--acid));transition:width .25s ease}
.proj-concept{padding:12px 14px;margin-bottom:10px}
.proj-concept summary{cursor:pointer;color:var(--muted);font-size:10px;letter-spacing:.16em;text-transform:uppercase;user-select:none;margin-bottom:0}
.proj-concept summary:hover{color:var(--acid-dim)}
.proj-concept-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.proj-concept-wide{grid-column:1/-1}
@media(max-width:640px){.proj-concept-grid{grid-template-columns:1fr}}
.proj-shots-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:4px 0 10px;padding:0 2px;
}
.proj-shots-head h3{margin:0;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted)}
.proj-shots-tools{display:flex;align-items:center;gap:10px}
.proj-shot-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px;padding-bottom:16px;
}
.proj-shot-card{
  position:relative;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;cursor:pointer;transition:border-color .12s,box-shadow .12s;
}
.proj-shot-card:hover{border-color:var(--acid-dim)}
.proj-shot-card.selected{border-color:var(--acid);box-shadow:0 0 0 1px rgba(209,48,73,.2),0 8px 24px rgba(0,0,0,.25)}
.proj-shot-thumb{
  aspect-ratio:9/16;background:#0a0c0a;display:flex;align-items:center;justify-content:center;
  overflow:hidden;position:relative;
}
.proj-shot-thumb img,.proj-shot-thumb video{width:100%;height:100%;object-fit:cover}
.proj-shot-thumb .ps-empty{font-size:9px;color:var(--muted);letter-spacing:.12em;text-transform:uppercase;padding:8px;text-align:center;line-height:1.4}
.proj-shot-num{
  position:absolute;top:6px;left:6px;z-index:2;background:rgba(0,0,0,.78);
  border:1px solid var(--border-2);color:var(--acid);font-size:9px;letter-spacing:.1em;
  padding:2px 7px;border-radius:3px;
}
.proj-shot-grade{
  position:absolute;top:6px;right:6px;z-index:2;font-size:9px;font-weight:700;
  width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--border-2);background:rgba(0,0,0,.78);
}
.proj-shot-grade.A{color:var(--acid);border-color:var(--acid-dim)}
.proj-shot-grade.B{color:#d4bcc4}
.proj-shot-grade.C{color:var(--blood);border-color:var(--blood)}
.proj-shot-body{padding:9px 10px 10px}
.proj-shot-label{font-size:10px;color:var(--text);letter-spacing:.06em;margin:0 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.proj-shot-meta{font-size:9px;color:var(--muted);letter-spacing:.06em;display:flex;justify-content:space-between;gap:6px}
.proj-status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:4px;vertical-align:middle}
.proj-status-dot.draft{background:var(--muted)}
.proj-status-dot.still{background:#7a9a6a}
.proj-status-dot.video{background:var(--acid)}
.proj-status-dot.edit{background:#c9a86c}
.proj-status-dot.final{background:#fff;box-shadow:0 0 6px rgba(255,255,255,.5)}
.proj-shot-add{
  border:2px dashed var(--border-2);border-radius:var(--radius);min-height:180px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  cursor:pointer;background:transparent;color:var(--muted);font-family:var(--mono);font-size:10px;letter-spacing:.12em;
  transition:.12s;
}
.proj-shot-add:hover{border-color:var(--acid-dim);color:var(--acid-dim);background:rgba(209,48,73,.04)}
.proj-detail{
  display:flex;flex-direction:column;min-height:0;padding:14px;overflow-y:auto;scrollbar-width:thin;
}
.proj-detail-empty{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:24px 12px;color:var(--muted);font-size:11px;line-height:1.55;
}
.proj-detail-icon{font-size:28px;color:var(--acid-dim);opacity:.5;margin-bottom:10px}
.proj-detail-body{display:flex;flex-direction:column;gap:0;min-height:0}
.proj-detail-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.proj-detail-num{
  flex:0 0 auto;font-size:11px;font-weight:700;color:var(--acid);letter-spacing:.12em;
  padding:4px 8px;border:1px solid var(--acid-dim);border-radius:var(--radius);background:rgba(209,48,73,.06);
}
.proj-detail-label{
  flex:1;background:var(--field);border:1px solid var(--border-2);border-radius:var(--radius);
  padding:8px 10px;font-size:12px;color:var(--text);font-family:var(--mono);
}
.proj-detail-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-bottom:4px}
.proj-detail-row input,.proj-detail-row select{font-size:11px;padding:8px 9px}
.proj-detail-thumb{
  margin:10px 0;border:1px solid var(--border);border-radius:var(--radius);
  aspect-ratio:9/16;max-height:200px;background:#0a0c0a;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
}
.proj-detail-thumb img{width:100%;height:100%;object-fit:cover}
.proj-thumb-empty{font-size:9px;color:var(--muted);letter-spacing:.1em;text-transform:uppercase}
.proj-detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}
.proj-detail-actions .proj-go-btn{width:100%;margin:0;padding:11px 10px;font-size:10px;letter-spacing:.14em}
.proj-detail-actions #proj-del-shot{grid-column:1/-1;color:var(--blood);border-color:rgba(200,32,42,.4)}
.proj-detail-actions #proj-del-shot:hover{background:rgba(200,32,42,.1)}

/* === Video Editor page === */
.editor-page-layout{
  display:grid;
  grid-template-rows:1fr auto;
  grid-template-columns:260px 1fr;
  height:calc(100vh - 140px);
  gap:10px;
  padding:0 24px 12px;
}
.editor-library{
  grid-row:1/3;
  background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);
  overflow-y:auto;scrollbar-width:thin;display:flex;flex-direction:column;
}
.editor-library-head{
  padding:10px 12px 8px;border-bottom:1px solid var(--border);
  font-size:9px;letter-spacing:.15em;text-transform:uppercase;color:var(--acid-dim);
  position:sticky;top:0;background:var(--panel);z-index:2;
}
.editor-library-section{padding:8px 12px 4px}
.editor-library-section h4{margin:0 0 6px;font-size:8px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.editor-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:5px;margin-bottom:8px}
.editor-lib-item{
  position:relative;background:#0a0c0a;border:1px solid var(--border-2);
  border-radius:4px;overflow:hidden;cursor:grab;transition:.12s;
}
.editor-lib-item:hover{border-color:var(--acid-dim)}
.editor-lib-item:active{cursor:grabbing;border-color:var(--acid);box-shadow:0 0 8px rgba(209,48,73,.2)}
.editor-lib-item.vid-item{aspect-ratio:16/9}
.editor-lib-item.img-item{aspect-ratio:16/9}
.editor-lib-item.aud-item{aspect-ratio:4/1;display:flex;align-items:center;justify-content:center;background:#0a1020}
.editor-lib-item img,.editor-lib-item video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.editor-lib-item .lib-dur{
  position:absolute;bottom:2px;right:3px;font-size:7px;color:#fff;letter-spacing:.04em;
  background:rgba(0,0,0,.7);padding:1px 3px;border-radius:2px;
}
.editor-lib-item .lib-type{
  position:absolute;top:2px;left:2px;font-size:7px;color:var(--acid);letter-spacing:.05em;
  background:rgba(0,0,0,.75);padding:1px 3px;border-radius:2px;
}
.editor-lib-item .lib-audio-icon{font-size:18px;color:#5a9aff}
.editor-lib-actions{
  position:absolute;left:3px;right:3px;bottom:3px;display:flex;gap:3px;
  opacity:0;transform:translateY(3px);transition:.12s;z-index:4;
}
.editor-lib-item:hover .editor-lib-actions{opacity:1;transform:translateY(0)}
.editor-lib-actions button{
  flex:1;min-width:0;border:1px solid rgba(209,48,73,.45);background:rgba(0,0,0,.82);
  color:var(--acid);border-radius:3px;font-family:var(--mono);font-size:7px;line-height:1;
  padding:4px 2px;cursor:pointer;
}
.editor-empty-bin{
  grid-column:1/-1;border:1px dashed var(--border-2);border-radius:4px;padding:10px;
  color:var(--muted);font-size:9px;line-height:1.35;
}
.editor-preview-area{
  background:#050605;border:1px solid var(--border);border-radius:var(--radius);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;padding:12px;
}
.editor-preview-area video,.editor-preview-area img{
  max-width:100%;max-height:38vh;border:1px solid var(--border-2);border-radius:var(--radius);
  object-fit:contain;
}
.editor-preview-empty{font-size:11px;color:var(--muted);letter-spacing:.12em;text-align:center;padding:20px}
.editor-transport{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center}
.editor-transport button{
  background:var(--field);border:1px solid var(--border-2);color:var(--text);
  border-radius:var(--radius);padding:7px 16px;cursor:pointer;font-family:var(--mono);font-size:10px;
  letter-spacing:.1em;text-transform:uppercase;transition:.12s;
}
.editor-transport button:hover{border-color:var(--acid-dim);color:var(--acid)}
.editor-transport .ed-play{font-size:16px;padding:8px 20px;color:var(--acid);border-color:var(--acid-dim)}
.editor-transport .ed-export{background:rgba(209,48,73,.12);border-color:var(--acid-dim);color:var(--acid)}
.editor-transport .ed-time{font-size:11px;color:var(--acid);min-width:80px;text-align:center;letter-spacing:.08em;background:none;border:none;cursor:default;pointer-events:none}
.editor-transport .ed-time:hover{border:none;color:var(--acid)}
.editor-inspector{
  width:min(760px,100%);border-top:1px solid var(--border);padding-top:8px;margin-top:2px;
}
.editor-inspector-title{
  color:var(--acid-dim);font-size:9px;letter-spacing:.12em;text-transform:uppercase;margin-bottom:6px;text-align:left;
}
.editor-inspector-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.editor-inspector-grid label{display:grid;gap:3px;color:var(--muted);font-size:8px;letter-spacing:.08em;text-transform:uppercase}
.editor-inspector-grid input,.editor-inspector-grid select{
  width:100%;background:var(--field);border:1px solid var(--border-2);border-radius:4px;color:var(--text);
  font-family:var(--mono);font-size:10px;padding:6px;
}
.editor-inspector-actions{display:flex;gap:6px;margin-top:7px}
.editor-inspector-actions button{flex:1;padding:7px;font-size:8px}
.editor-timeline{
  background:rgba(0,0,0,.85);border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;display:flex;flex-direction:column;
}
.tl-header{
  display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--border);
  font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);
}
.tl-header span{color:var(--acid-dim)}
.tl-zoom{display:flex;align-items:center;gap:6px;margin-left:auto}
.tl-zoom input{width:80px;accent-color:var(--acid)}
.tl-body{overflow-x:auto;overflow-y:visible;scrollbar-width:thin}
.tl-track{display:flex;min-height:44px;border-bottom:1px solid rgba(255,255,255,.05)}
.tl-track.vid{min-height:56px}
.tl-track.aud{min-height:40px;background:rgba(10,20,40,.5)}
.tl-label{
  flex:0 0 72px;padding:0 8px;font-size:8px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--muted);border-right:1px solid var(--border);display:flex;align-items:center;
  background:rgba(0,0,0,.6);position:sticky;left:0;z-index:5;
}
.tl-label.vid-lbl{color:var(--acid-dim)}
.tl-label.aud-lbl{color:#5a9aff}
.tl-track-body{flex:1;position:relative;min-width:var(--tl-width,1200px);height:100%}
.tl-track-body.drop-target{background:rgba(209,48,73,.04);outline:1px dashed rgba(209,48,73,.3)}
.tl-clip{
  position:absolute;top:4px;bottom:4px;border-radius:4px;overflow:hidden;
  cursor:grab;user-select:none;display:flex;align-items:center;padding:0 4px;font-size:8px;
  letter-spacing:.04em;transition:box-shadow .1s;
}
.tl-clip:active{cursor:grabbing}
.tl-clip.vid-clip{background:rgba(209,48,73,.18);border:1px solid rgba(209,48,73,.4);color:var(--acid)}
.tl-clip.aud-clip{background:rgba(90,154,255,.16);border:1px solid rgba(90,154,255,.38);color:#7ab8ff}
.tl-clip.selected{box-shadow:0 0 0 2px var(--acid)}
.tl-clip-thumb{width:28px;height:28px;object-fit:cover;border-radius:2px;margin-right:4px;flex-shrink:0}
.tl-clip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80px}
.tl-clip-resize{
  position:absolute;right:0;top:0;bottom:0;width:5px;
  cursor:ew-resize;background:rgba(255,255,255,.15);
}
.tl-playhead{
  position:absolute;top:0;bottom:0;width:2px;background:var(--acid);
  pointer-events:none;z-index:20;box-shadow:0 0 6px rgba(209,48,73,.5);
}
.tl-ruler{
  display:flex;border-bottom:1px solid var(--border);background:rgba(0,0,0,.7);overflow:hidden;
}
.tl-ruler-label{flex:0 0 72px;border-right:1px solid var(--border);background:rgba(0,0,0,.6)}
.tl-ruler-marks{flex:1;height:24px;position:relative;min-width:var(--tl-width,1200px)}
.tl-ruler-marks canvas{position:absolute;inset:0;width:100%;height:100%}

@media(max-width:640px){
  .dd-nav{width:100%;display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:3px 0;justify-content:flex-start}
  .dd-nav a{padding:7px 9px;text-align:center;font-size:11px}
  .editor-page-layout{grid-template-columns:1fr;grid-template-rows:auto 1fr auto;height:auto}
  .editor-library{grid-row:auto;max-height:200px}
  .image-page-split{grid-template-columns:1fr}
  .image-page-tools{position:static;max-height:none}
}

/* === Provider switcher === */
.prov-bar{display:flex;flex-wrap:wrap;gap:5px;margin:2px 0 9px}
.prov-bar .prov-chip{
  font:inherit;font-size:12px;font-weight:600;cursor:pointer;
  letter-spacing:.02em;
  background:var(--panel-2,rgba(255,255,255,.04));
  color:var(--muted,#9aa3b2);
  border:1px solid var(--border,rgba(255,255,255,.12));
  border-radius:7px;padding:5px 12px;transition:.12s;
}
.prov-bar .prov-chip:hover{color:var(--text,#e8edf2);border-color:var(--border-2,rgba(255,255,255,.25))}
.prov-bar .prov-chip.on{
  background:var(--acid,#d13049);color:#0a0a0a;border-color:var(--acid,#d13049);
}
/* provider accent per chip when active */
.prov-bar .prov-chip[data-prov="atlas"].on{background:#3aa0ff;border-color:#3aa0ff;color:#04121f}
.prov-bar .prov-chip[data-prov="higgsfield"].on{background:var(--acid);border-color:var(--acid);color:#0a0c08}

/* === Readability + navigation pass === */
:root{
  --panel:rgba(19,16,17,.96);
  --field:#161113;
  --border:#3d3136;
  --border-2:#5a424b;
  --text:#f7ecef;
  --muted:#c4adb5;
  --acid-dim:#d8455c;
}
body{
  color:var(--text);
  font-size:14px;
  text-rendering:geometricPrecision;
}
.fog{opacity:.22}
.scan{opacity:.16}
.grain{opacity:.035}
.vig{box-shadow:inset 0 0 160px 24px rgba(0,0,0,.72)}
.app-header{
  position:sticky;
  top:0;
  z-index:100;
  background:linear-gradient(180deg,rgba(7,9,7,.98),rgba(7,9,7,.88));
  border-bottom:1px solid rgba(216,69,92,.24);
  box-shadow:0 10px 28px rgba(0,0,0,.35);
  backdrop-filter:blur(16px);
}
.app-header-inner{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  width:100%;
  padding:10px 18px;
}
.app-header .logo{
  font-size:clamp(22px,2.8vw,34px);
  line-height:1;
  margin:0;
  white-space:nowrap;
}
.app-status{margin:0}
/* Keep chip nav after the readability pass — do not reintroduce the pill capsule. */
.dd-nav{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex-wrap:nowrap;
  background:transparent;
  border:0;
  padding:3px 0;
  overflow-x:auto;
  scrollbar-width:none;
}
.dd-nav::-webkit-scrollbar{display:none}
.dd-nav a{
  flex:0 0 auto;
  color:var(--muted);
  text-decoration:none;
  font-size:12px;
  font-weight:400;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:6px;
  background:rgba(0,0,0,.16);
  min-width:0;
  text-align:center;
  transition:.15s ease;
  box-shadow:none;
}
.dd-nav a:hover,
.dd-nav a.active{
  color:var(--text);
  background:rgba(209,48,73,.12);
  border-color:rgba(209,48,73,.52);
  box-shadow:none;
}
.status{
  color:#e8d3da;
  background:rgba(0,0,0,.38);
  border-color:rgba(196,170,178,.3);
}
.page-shell,
.home-wrap{
  width:100%;
  max-width:none;
  padding:18px clamp(14px,2.4vw,34px);
}
.panel,
.storyboard-card,
.editor-library,
.editor-preview-shell,
.editor-timeline{
  background:linear-gradient(180deg,rgba(18,22,19,.97),rgba(10,13,11,.96));
  border-color:rgba(196,170,178,.2);
  box-shadow:0 14px 34px rgba(0,0,0,.28);
}
.panel-gallery{
  background:linear-gradient(180deg,rgba(14,18,15,.98),rgba(8,10,9,.98));
}
label,
.opt-picker-heading,
.gal-head h2,
summary,
.tl-header,
.editor-library-section h4{
  color:#e1cbd2;
  font-size:11px;
  letter-spacing:.12em;
}
.hint,
.opt-picker-desc,
.home-hero-sub,
.home-card-body p,
.x-pipe-sub,
.char-grid label,
.empty,
.tl-label{
  color:var(--muted);
  opacity:1;
}
textarea,
input,
select,
.clear,
.gal-tab,
.prov-bar .prov-chip,
.editor-transport button{
  color:var(--text);
  background:#101610;
  border-color:rgba(196,170,178,.3);
  font-size:13px;
}
textarea::placeholder,
input::placeholder{
  color:#92757e;
  opacity:1;
}
textarea:focus,
input:focus,
select:focus{
  border-color:var(--acid);
  box-shadow:0 0 0 2px rgba(209,48,73,.16);
}
.clear,
.gal-tab,
.prov-bar .prov-chip,
.opt-picker-tabs button,
.tools button{
  font-weight:800;
}
.clear:hover,
.gal-tab:hover,
.opt-picker-tabs button:hover{
  color:#fff0f5;
  border-color:var(--acid);
  background:rgba(209,48,73,.08);
}
.gal-tab.active,
.opt-picker-tabs button.active{
  color:#071006;
  border-color:var(--acid);
  background:var(--acid);
  box-shadow:none;
}
.btn{
  font-size:14px;
  letter-spacing:.14em;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
}
.model-picker-grid,
.tool-grid,
.x-tool-grid,
.home-grid{
  gap:12px;
}
.model-card,
.opt-picker-chip,
.home-card,
.editor-lib-item{
  border-color:rgba(196,170,178,.26);
}
.model-card,
.opt-picker-chip span,
.compare-chip span,
.card .badge{
  color:#f0dde3;
}
.card{
  background:#090c09;
  border-color:rgba(196,170,178,.22);
}
.card .spinner{
  color:#dfc9d0;
  font-size:11px;
  letter-spacing:.12em;
}
.queue-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:-4px 0 12px;
  padding:9px 10px;
  border:1px solid rgba(209,48,73,.28);
  border-radius:9px;
  background:rgba(209,48,73,.07);
  color:#ffd6dd;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.queue-summary b{
  color:var(--acid);
}
.queue-summary span{
  padding:3px 7px;
  border-radius:999px;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(196,170,178,.18);
}
.card.queued-card{
  border-color:rgba(209,48,73,.42);
  box-shadow:inset 0 0 0 1px rgba(209,48,73,.12),0 0 18px rgba(209,48,73,.06);
}
.card.queued-card.video-card{
  border-color:rgba(90,154,255,.52);
  box-shadow:inset 0 0 0 1px rgba(90,154,255,.16),0 0 18px rgba(90,154,255,.08);
}
.card.stopped-card{
  border-color:rgba(196,170,178,.22);
  box-shadow:inset 0 0 0 1px rgba(196,170,178,.08);
  opacity:.82;
}
.card.stopped-card .ring{
  animation:none;
  opacity:.18;
}
.queue-type{
  position:absolute;
  top:10px;
  left:10px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(209,48,73,.4);
  background:rgba(0,0,0,.62);
  color:var(--acid);
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
}
.video-card .queue-type{
  border-color:rgba(90,154,255,.55);
  color:#9dccff;
}
.queue-prompt{
  max-width:88%;
  margin-top:-4px;
  color:#ead6dc;
  font-size:10px;
  line-height:1.35;
  letter-spacing:.02em;
  text-transform:none;
  opacity:.9;
}
.prog-eta{
  color:var(--acid);
}
.home-card::after{
  background:linear-gradient(180deg,rgba(4,6,4,.08) 0%,rgba(4,6,4,.48) 48%,rgba(4,6,4,.96) 100%);
}
.home-card-body h3{
  color:#fff;
  /* Soft shadow only — legibility over splash art (matches mobile). */
  text-shadow:0 1px 2px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.55);
}
.home-card-body p{
  color:#efdce2;
  text-shadow:0 2px 10px rgba(0,0,0,.8);
}
.startend-panel,
.prompt-brain,
.supercomputer-box,
.character-builder,
.x-pipeline{
  background:rgba(255,255,255,.045);
  border-color:rgba(196,170,178,.2);
}
.audio-page .gallery,
#page-image .gallery{
  --gal-cell:300px;
}
@media(max-width:980px){
  .app-header-inner{
    grid-template-columns:1fr;
    justify-items:center;
    gap:8px;
  }
  .dd-nav{
    width:100%;
    justify-content:center;
  }
}
@media(max-width:640px){
  .page-shell,
  .home-wrap{
    padding:12px;
  }
  .dd-nav a{
    font-size:11px;
    padding:7px 9px;
  }
}

/* === Sticky generation docks === */
.create-controls-col,
.video-controls-col,
.audio-controls-col,
.image-page-tools{
  align-self:start;
}
.create-controls-col > .panel,
.video-controls-col > .panel,
.audio-controls-col > .panel,
.image-page-tools{
  position:relative;
}
.genrow.prompt-gen,
#vimageclip,
#vclip,
#audio-gen{
  position:sticky;
  top:8px;
  z-index:60;
  border-radius:10px;
}
.create-generate-bar{
  flex:0 0 auto;
  position:relative;
  z-index:5;
}
.create-generate-bar .genrow.prompt-gen{
  margin:0;
  padding:6px 8px;
  grid-template-columns:minmax(160px,220px) auto;
  align-items:center;
  gap:8px;
}
.create-generate-bar .genrow.prompt-gen .btn,
.create-generate-bar .genrow.prompt-gen .cancel,
.create-generate-bar .genrow.prompt-gen .clear{
  padding:7px 9px;
  font-size:10px;
  letter-spacing:.08em;
  white-space:nowrap;
}
.create-generate-bar .create-option-rail{
  margin:4px 0 0;
  padding:3px 4px;
}
.create-output-compact{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px 8px;
}
.create-output-compact label{
  margin:0 0 3px;
}
.genrow.prompt-gen{
  padding:10px;
  margin:10px -10px 14px;
  background:linear-gradient(180deg,rgba(10,14,10,.98),rgba(10,14,10,.92));
  border:1px solid rgba(209,48,73,.24);
  box-shadow:0 12px 28px rgba(0,0,0,.38),0 0 0 1px rgba(209,48,73,.08);
  grid-template-columns:minmax(160px,220px) auto;
  align-items:center;
  gap:8px;
}
.create-mode-toggle{
  display:inline-grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  min-width:160px;
  height:100%;
  min-height:40px;
  border:1px solid rgba(209,48,73,.45);
  border-radius:8px;
  overflow:hidden;
  background:rgba(0,0,0,.35);
}
.create-mode-btn{
  appearance:none;
  border:0;
  margin:0;
  padding:8px 12px;
  font:inherit;
  font-size:11px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(255,240,245,.72);
  background:transparent;
  cursor:pointer;
  transition:background .12s,color .12s,box-shadow .12s;
}
.create-mode-btn + .create-mode-btn{
  border-left:1px solid rgba(209,48,73,.35);
}
.create-mode-btn:hover{
  color:#fff0f5;
  background:rgba(209,48,73,.12);
}
.create-mode-btn.active{
  color:#071006;
  background:linear-gradient(180deg,#d13049,#c8202a);
  box-shadow:inset 0 0 0 1px rgba(209,48,73,.85);
}
.create-mode-btn:focus-visible{
  outline:2px solid rgba(209,48,73,.8);
  outline-offset:-2px;
  z-index:1;
}
#create-output[hidden]{display:none!important}
#page-generate .generate-dock{
  position:relative;
  top:auto;
  z-index:auto;
  flex:0 0 auto;
  max-height:none;
  overflow:visible;
  margin:0;
  padding:4px 8px 6px;
  border:1px solid rgba(209,48,73,.18);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(8,12,8,.92),rgba(8,12,8,.82));
  box-shadow:0 4px 14px rgba(0,0,0,.28);
  backdrop-filter:blur(12px);
}
#page-generate .generate-dock::-webkit-scrollbar{width:8px}
#page-generate .generate-dock::-webkit-scrollbar-thumb{background:rgba(209,48,73,.45);border-radius:4px}
.generate-dock .create-model-row{
  margin:5px 0 0;
  padding:5px 7px;
  border:1px solid rgba(196,170,178,.14);
  border-radius:7px;
  background:rgba(0,0,0,.22);
}
.generate-dock .create-model-row label{margin-top:0}
.generate-dock .create-model-row select{
  padding:7px 10px;
  font-size:12px;
}
.generate-dock .create-model-row .hint{
  margin-top:4px;
  font-size:9px;
  line-height:1.35;
}
.generate-dock .higgsfield-helper{margin-top:6px}
.generate-dock .prompt-stack-compact{
  margin:4px 0 0;
  max-height:56px;
  padding:4px 7px;
  font-size:8px;
  line-height:1.35;
}
.generate-dock label{
  margin:0 0 3px;
  font-size:9px;
  letter-spacing:.16em;
}
.generate-dock .hint{
  margin-top:3px;
  font-size:9px;
  line-height:1.35;
}
.generate-dock .prompt-drop-zone textarea,
.generate-dock #prompt{
  min-height:48px;
  max-height:120px;
  padding:6px 8px;
  font-size:12px;
  line-height:1.4;
}
.generate-dock .genrow.prompt-gen,
.generate-dock .create-option-rail{
  position:relative;
  top:auto;
  z-index:auto;
}
.generate-dock .genrow.prompt-gen{
  margin:5px 0 4px;
  padding:5px 6px;
  gap:5px;
  grid-template-columns:minmax(150px,200px) auto;
  align-items:center;
  box-shadow:0 8px 18px rgba(0,0,0,.32);
}
.generate-dock .create-mode-toggle{
  min-width:150px;
  min-height:34px;
}
.generate-dock .create-mode-btn{
  padding:7px 8px;
  font-size:10px;
}
.generate-dock .genrow.prompt-gen .btn,
.generate-dock .genrow.prompt-gen .clear{
  padding:7px 9px;
  font-size:10px;
  letter-spacing:.1em;
  white-space:nowrap;
}
.generate-dock .create-option-rail{
  margin:0 0 4px;
  padding:5px 6px;
  gap:3px;
  box-shadow:none;
  position:relative;
  top:auto;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-radius:8px;
}
.generate-dock .create-option-rail button{
  min-height:24px;
  padding:2px 1px;
  font-size:8px;
  letter-spacing:.06em;
  border-radius:6px;
}
.create-options-stack{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:2px 2px 12px;
}
.create-section-card{
  margin:0;
  padding:7px 9px 9px;
  border:1px solid rgba(196,170,178,.2);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(12,16,10,.88),rgba(8,11,8,.72));
  box-shadow:0 6px 16px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04);
  scroll-margin-top:12px;
}
.create-section-card .row{
  gap:6px 8px;
}
.create-section-card label{
  margin:8px 0 3px;
  font-size:9px;
  letter-spacing:.16em;
}
.create-section-card label:first-of-type{
  margin-top:2px;
}
.create-section-card.create-section-priority{
  border-color:rgba(209,48,73,.34);
  background:linear-gradient(180deg,rgba(16,22,12,.94),rgba(10,14,8,.82));
  box-shadow:0 10px 26px rgba(0,0,0,.32),0 0 0 1px rgba(209,48,73,.06);
}
.create-section-card.gore-engine-panel{
  border-color:rgba(200,32,42,.38);
  background:linear-gradient(180deg,rgba(22,10,12,.92),rgba(10,8,8,.78));
}
/* Gore chips live in #create-unified-gore-row (unified UI); full panel stays pro-only */
.create-section-card.create-neg-section{
  border-color:rgba(200,32,42,.22);
}
.create-section-card>summary{
  display:flex;
  align-items:center;
  gap:8px;
  padding:3px 0 5px;
  font-size:13px;
  letter-spacing:.1em;
  line-height:1.3;
}
.create-section-num{
  flex:0 0 auto;
  min-width:20px;
  padding:1px 5px;
  border-radius:5px;
  border:1px solid rgba(209,48,73,.35);
  background:rgba(209,48,73,.1);
  color:var(--acid);
  font-size:10px;
  font-weight:900;
  text-align:center;
}
.gore-engine-panel .create-section-num{
  border-color:rgba(200,32,42,.45);
  background:rgba(200,32,42,.14);
  color:#ff6b72;
}
.create-section-card[open]>summary{
  border-bottom:1px solid rgba(196,170,178,.12);
  margin-bottom:6px;
  padding-bottom:6px;
}
.create-section-card[open]>summary::after{
  content:"▾";
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
}
.create-section-card:not([open])>summary::after{
  content:"▸";
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
}
.create-fast-toggle{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:6px 0 2px;
  padding:6px 8px;
  border:1px solid rgba(209,48,73,.22);
  border-radius:7px;
  background:rgba(209,48,73,.06);
  cursor:pointer;
  font-size:10px;
  line-height:1.4;
  color:var(--text);
}
.create-fast-toggle input{
  width:auto;
  margin-top:2px;
  accent-color:var(--acid);
  flex:0 0 auto;
}
.create-fast-toggle:has(input:checked){
  border-color:rgba(209,48,73,.5);
  background:rgba(209,48,73,.12);
  box-shadow:0 0 12px rgba(209,48,73,.08);
}
.create-fast-hint{margin-top:0;font-size:10px}
.create-option-rail{
  position:sticky;
  top:82px;
  z-index:58;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin:-6px -10px 14px;
  padding:9px 10px;
  border:1px solid rgba(196,170,178,.18);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(10,14,10,.96),rgba(10,14,10,.9));
  box-shadow:0 10px 24px rgba(0,0,0,.28);
}
.create-option-rail button{
  min-height:32px;
  padding:4px 2px;
  border:1px solid rgba(196,170,178,.28);
  border-radius:8px;
  background:rgba(255,255,255,.045);
  color:#ead6dc;
  font-family:var(--mono);
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
}
.create-option-rail button:hover{
  color:#071006;
  background:var(--acid);
  border-color:var(--acid);
}
.create-option-rail button.active{
  color:#071006;
  background:var(--acid);
  border-color:var(--acid);
}
.mode-hidden{display:none!important}
.create-image-options,
.create-video-options{
  min-height:0;
  scroll-margin-top:16px;
}
#page-generate .create-options-scroll .create-image-options,
#page-generate .create-options-scroll .create-video-options{
  padding-top:4px;
}
.prompt-brain.create-accordion{
  border-color:rgba(209,48,73,.32);
  background:linear-gradient(180deg,rgba(14,20,10,.92),rgba(8,12,8,.78));
}
.create-video-options{
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(90,154,255,.28);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(90,154,255,.075),rgba(255,255,255,.025));
}
.create-video-options label:first-child{
  margin-top:0;
}
.create-video-options textarea{
  min-height:58px;
}
.create-video-options .hint{
  color:#c5dcff;
}
.create-video-options .create-start-frame,
.create-video-options .create-end-frame{
  width:100%;
  min-height:150px;
  margin-top:6px;
}
#vimageclip,
#vclip,
#audio-gen{
  box-shadow:0 12px 28px rgba(0,0,0,.38),0 0 0 1px rgba(209,48,73,.12);
}
#vimageclip{
  top:8px;
}
#vclip{
  top:60px;
  background:#101610;
  border-color:rgba(209,48,73,.4);
  color:#ffd6dd;
}
#audio-gen{
  top:8px;
}
.create-controls-col .panel,
.video-controls-col .panel,
.audio-controls-col .panel{
  padding-bottom:28px;
}
.create-controls-col .panel::before,
.video-controls-col .panel::before,
.audio-controls-col .panel::before{
  content:"";
  position:sticky;
  top:0;
  display:block;
  height:0;
  z-index:59;
}
@media(max-width:900px){
  #page-generate .create-controls-col{
    overflow-y:visible;
    max-height:none;
  }
  #page-generate .create-panel-split{
    overflow:visible;
  }
  #page-generate .create-options-scroll{
    overflow:visible;
    flex:none;
  }
  #page-generate .generate-dock,
  .generate-dock{
    position:relative;
    top:auto;
    max-height:none;
    margin:0 0 12px;
  }
  .genrow.prompt-gen,
  #vimageclip,
  #vclip,
  #audio-gen{
    position:relative;
    top:auto;
  }
  .genrow.prompt-gen{
    margin:10px 0 14px;
    grid-template-columns:1fr;
  }
  .create-option-rail{
    position:relative;
    top:auto;
    margin:0 0 14px;
  }
}

/* === Zoom button on gallery cards (Images/Videos pages) === */
.zoom-btn{position:absolute;top:6px;right:6px;z-index:6;width:30px;height:30px;border-radius:8px;
  border:1px solid rgba(255,255,255,.25);background:rgba(8,10,8,.72);color:#dfe;font-size:14px;
  cursor:pointer;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(6px);opacity:.85}
.zoom-btn:hover{background:rgba(20,26,20,.95);border-color:var(--acid);opacity:1}
/* Full prompt + generator in the zoom view - readable, scrollable (legacy cap fallback) */
.lb .cap{text-align:left;color:#dec7cf;font-size:13px;line-height:1.5;white-space:pre-wrap;
  max-height:26vh;overflow-y:auto;padding:10px 14px;max-width:780px;margin:8px auto 0;
  background:rgba(8,10,8,.5);border:1px solid rgba(255,255,255,.08);border-radius:10px;scrollbar-width:thin}

/* === Embedded Perchance generator in Create settings === */
.perchance-embed-section>summary{font-weight:700;color:#d13049;cursor:pointer;letter-spacing:.02em}
.perchance-embed-wrap{margin-top:8px;border:1px solid var(--border-2);border-radius:10px;overflow:hidden;background:#0a0c0a}
.perchance-embed-wrap iframe{width:100%;height:560px;border:0;display:block}

/* === Art style section === */
.art-style-section>summary{font-weight:700;color:#d13049;cursor:pointer;letter-spacing:.02em}
.art-style-section select{width:100%}

/* === Create panel compact UX === */
.create-section-card.create-accordion{
  margin:0;
  padding:7px 9px 9px;
  border:inherit;
  background:inherit;
  box-shadow:inherit;
}
.create-accordion{
  margin:4px 0;
  padding:6px 8px;
  border:1px solid rgba(196,170,178,.16);
  border-radius:10px;
  background:rgba(8,12,8,.45);
}
.create-accordion>summary{
  cursor:pointer;
  font-weight:800;
  color:var(--acid-dim);
  letter-spacing:.1em;
  text-transform:uppercase;
  font-size:13px;
  padding:4px 0;
  list-style:none;
}
.create-accordion>summary::-webkit-details-marker{display:none}
.create-accordion[open]>summary{color:var(--acid);margin-bottom:8px}
.create-look-section{
  border-color:rgba(209,48,73,.22);
  background:linear-gradient(180deg,rgba(12,18,10,.92),rgba(8,12,8,.78));
}
.create-section-hint{
  margin:0 0 6px;
  font-size:10px;
  color:var(--muted);
  line-height:1.4;
}
.create-section-card .hint{
  margin-top:4px;
  font-size:9px;
  line-height:1.35;
}
.create-neg-section textarea{margin-top:4px}
.neg-chips-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
.neg-chips-grid button.active{
  color:#071006;
  border-color:var(--acid);
  background:rgba(209,48,73,.18);
}
.prompt-stack-compact{
  margin:4px 0 6px;
  padding:5px 7px;
  max-height:72px;
  overflow-y:auto;
}
.create-model-row{
  margin:8px 0 10px;
  padding:7px 8px;
  border:1px solid rgba(196,170,178,.16);
  border-radius:8px;
  background:rgba(8,12,8,.55);
}
.create-model-row label{margin-top:0}
.create-opt-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 8px;
}
#page-generate .opt-picker-strip,
.create-look-section .opt-picker-strip{
  max-height:140px;
  gap:6px;
  padding:6px 2px 2px;
  grid-template-columns:repeat(auto-fill,minmax(80px,1fr));
}
.create-look-section .opt-picker-hero{min-height:72px;max-height:84px}
.create-look-section .opt-picker-host-compact .opt-picker-hero{min-height:64px;max-height:76px}
.create-look-section .opt-picker-block{margin:0 0 8px}
.create-look-section .opt-picker-heading{margin-top:8px;margin-bottom:6px;font-size:9px}
.create-section-card.create-section-pulse{
  animation:createSectionPulse .85s ease;
}
@keyframes createSectionPulse{
  0%{box-shadow:0 0 0 0 rgba(209,48,73,.45)}
  100%{box-shadow:0 0 0 14px rgba(209,48,73,0)}
}
@media(max-width:520px){
  .neg-chips-grid,.create-opt-grid{grid-template-columns:1fr}
}

/* ===== Create unified layout ===== */
.create-mode-bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;
  margin:0;padding:6px 10px;
  border:1px solid rgba(209,48,73,.22);border-radius:8px;
  background:rgba(209,48,73,.04);
  flex:0 0 auto;
}
.create-mode-title{
  font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--acid);font-weight:700;
}
.create-mode-hint{font-size:10px;color:var(--muted);flex:1;min-width:180px}
.create-pro-only{display:none!important}
#create-option-rail [data-create-jump="gore"],
#create-option-rail [data-create-jump="look"]{display:none}
.create-simple-look{
  display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px;
}
.create-simple-look .simple-look-chip{
  border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.35);
  color:var(--muted);border-radius:999px;padding:5px 10px;font-size:10px;cursor:pointer;
}
.create-simple-look .simple-look-chip:hover{border-color:rgba(209,48,73,.35);color:var(--text)}
.create-simple-look .simple-look-chip.active{
  border-color:var(--acid);color:var(--acid);background:rgba(209,48,73,.1);
  box-shadow:0 0 6px rgba(209,48,73,.18);
}
body.create-ui-unified #prompt-literal-hint{font-size:10px;opacity:.85}
body.create-ui-unified #create-neg-section:not([open])>summary{color:var(--muted)}
body.create-ui-unified #more-options-section,
body.create-ui-unified #create-look-section,
body.create-ui-unified #gore-engine-section,
body.create-ui-unified #create-look-pickers{display:none!important}

body.create-ui-unified #create-neg-section .tool-grid,
body.create-ui-unified #create-neg-section .neg-chips,
body.create-ui-unified #create-neg-section #neg-effective-hint{display:none!important}
/* Retired legacy gore buttons/chips (2026-07-16): .tool-grid's own display:grid
   would beat the UA [hidden] rule in classic layout - enforce it explicitly,
   same pattern as .dd-login[hidden]. */
#create-neg-section .tool-grid[hidden],
#create-neg-section .gore-helper-grid[hidden]{display:none!important}
body.create-ui-unified #page-generate .generate-dock{
  max-height:none;
  flex:0 0 auto;
  overflow:visible;
  margin:0;
  padding:3px 8px 5px;
}
body.create-ui-unified #page-generate .create-panel-split{
  display:flex;
  flex-direction:column;
  overflow:visible;
  min-height:0;
  gap:3px;
}
body.create-ui-unified #page-generate .create-options-scroll{
  flex:0 0 auto;
  overflow:visible;
  min-height:0;
  padding-right:0;
}
body.create-ui-unified #page-generate .create-controls-col{
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:var(--acid) rgba(255,255,255,.06);
}
body.create-ui-unified .generate-dock #prompt,
body.create-ui-unified .generate-dock .prompt-drop-zone textarea,
body.create-ui-unified .create-resize-ta{
  min-height:64px;
  max-height:min(28vh,180px);
  resize:vertical;
  font-size:12px;
  line-height:1.4;
}
body.create-ui-unified #prompt-literal-hint{
  font-size:9px;
  opacity:.8;
  margin-top:2px;
  line-height:1.3;
}
#page-generate .create-resize-ta,
#page-generate .create-panel-split textarea{
  resize:vertical;
  min-height:72px;
  max-height:min(50vh,420px);
  line-height:1.45;
}
body.create-ui-unified .create-simple-preview{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 6px;
  padding:5px 6px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:8px;
  background:rgba(0,0,0,.28);
  min-height:48px;
}
body.create-ui-unified .create-simple-preview-thumb{
  flex:0 0 72px;
  width:72px;
  height:48px;
  border-radius:6px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:#070807;
}
body.create-ui-unified .create-simple-preview-thumb .picker-visual,
body.create-ui-unified .create-simple-preview-thumb img.picker-visual{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
body.create-ui-unified .create-simple-preview-thumb .picker-none{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-size:8px;
  color:var(--muted);
}
body.create-ui-unified .create-simple-preview-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
body.create-ui-unified .create-simple-preview-label{
  font-size:8px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--acid-dim);
}
body.create-ui-unified .create-simple-preview-title{
  font-size:11px;
  color:var(--text);
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.create-ui-unified .create-simple-dropdowns{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.create-unified-gore-row{
  display:none;
  margin:8px 0 2px;
  padding:8px 0 4px;
  border-top:1px solid rgba(200,32,42,.2);
}
body.create-ui-unified .create-unified-gore-row{
  display:block;
}
body.create-ui-unified .create-unified-gore-row[hidden]{
  display:none!important;
}
.create-unified-gore-label{
  display:block;
  font-size:9px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#ff6b72;
  font-weight:700;
  margin-bottom:6px;
}
body.create-ui-unified .create-unified-gore-row .gore-stack-chips{
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:0 0 4px;
}
body.create-ui-unified #create-unified-gore-hint{
  font-size:10px;
  margin:0;
  opacity:.9;
}
.settings-status-strip{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 14px;
  padding:8px 10px;
  border:1px solid rgba(209,48,73,.2);
  border-radius:8px;
  background:rgba(0,0,0,.25);
}
.settings-status-pill{
  font-size:10px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  color:var(--muted);
  white-space:nowrap;
}
.settings-status-pill.ok{
  border-color:rgba(209,48,73,.45);
  color:var(--acid);
  background:rgba(209,48,73,.08);
}
.settings-status-pill.warn{
  border-color:rgba(255,180,0,.4);
  color:#e8c060;
  background:rgba(255,180,0,.06);
}
.settings-status-pill.off{
  opacity:.65;
}
/* Settings readability pass (2026-07-15, Jared: "ugly, hard to read, confusing,
   a client would be daunted"): group the flat settings panel into separated
   cards and give each API key a scannable connected/not-connected pill instead
   of making people read a paragraph to find out if it worked. */
.settings-card{
  margin:0 0 22px;
  padding-bottom:20px;
  border-bottom:1px solid var(--border);
}
.settings-card:last-of-type{
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:none;
}
.settings-card>.settings-section{
  margin-top:0;
  padding-top:0;
  border-top:none;
}
.key-field-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:18px 0 6px;
  flex-wrap:wrap;
}
.key-field-head label{
  margin:0;
}
/* #gore-deepen-note carries the second-pass status now that the Vault (and its
   note) are retired — same callout treatment. 2026-07-16 */
#gore-vault-note,
#gore-deepen-note{
  margin-top:8px;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid rgba(155,230,0,.3);
  background:rgba(155,230,0,.07);
  color:var(--text);
  font-size:12px;
  line-height:1.45;
}
body.create-ui-unified .create-dd-row{
  display:grid;
  /* label column must fit "DIRECTOR" at 8px/.1em - 52px clipped into the thumb */
  grid-template-columns:minmax(44px,62px) 40px minmax(0,1fr);
  gap:5px;
  align-items:center;
}
body.create-ui-unified .create-dd-row label{
  margin:0;
  font-size:8px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--acid-dim);
  line-height:1.2;
}
body.create-ui-unified .create-dd-thumb{
  width:40px;
  height:28px;
  border-radius:5px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
  background:#070807;
  flex-shrink:0;
}
body.create-ui-unified .create-dd-thumb .picker-visual,
body.create-ui-unified .create-dd-thumb img.picker-visual{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
body.create-ui-unified .create-dd-thumb .picker-none{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-size:7px;
  color:var(--muted);
}
body.create-ui-unified .create-dd-select{
  width:100%;
  padding:5px 24px 5px 7px;
  font-size:11px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.12);
  background-color:rgba(0,0,0,.35);
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 14px) calc(50% - 2px),calc(100% - 9px) calc(50% - 2px);
  background-size:5px 5px,5px 5px;
  background-repeat:no-repeat;
  color:var(--text);
  appearance:auto;
  -webkit-appearance:menulist;
}
body.create-ui-unified .create-dd-select option,
body.create-ui-unified .create-dd-select optgroup{
  color:var(--text);
  background:#0c0f0c;
}
body.create-ui-unified .create-simple-flat,
body.create-ui-unified #create-output-section,
body.create-ui-unified #create-supercomputer-section,
body.create-ui-unified #create-simple-options,
body.create-ui-unified #art-style-section,
body.create-ui-unified #create-neg-section{
  border:1px solid rgba(209,48,73,.2);
  border-radius:8px;
  background:rgba(8,12,8,.55);
  padding:3px 8px 6px;
}
body.create-ui-unified #create-output-section>summary,
body.create-ui-unified #create-supercomputer-section>summary,
body.create-ui-unified #create-simple-options>summary,
body.create-ui-unified #gore-engine-section>summary,
body.create-ui-unified #art-style-section>summary,
body.create-ui-unified #create-neg-section>summary{
  cursor:pointer;
  pointer-events:auto;
  padding:5px 0 4px;
  font-size:13px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--acid);
}
/* Match Art style + Cinema options summary size to the rest of the section headers */
body.create-ui-unified #create-simple-options>summary,
body.create-ui-unified #art-style-section>summary{
  font-size:13px;
}
body.create-ui-unified #create-output-section>summary::after,
body.create-ui-unified #create-supercomputer-section>summary::after,
body.create-ui-unified #create-simple-options>summary::after,
body.create-ui-unified #gore-engine-section>summary::after,
body.create-ui-unified #art-style-section>summary::after,
body.create-ui-unified #create-neg-section>summary::after{display:inline}
body.create-ui-unified #create-output-section>summary{display:none}
body.create-ui-unified #create-output-section{padding-top:6px}
body.create-ui-unified .create-output-compact{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px 6px;
}
body.create-ui-unified .create-output-compact label{
  margin:0 0 2px;
  font-size:8px;
}
body.create-ui-unified .create-output-compact select{
  padding:5px 6px;
  font-size:11px;
}
body.create-ui-unified .create-output-hint{display:none}
body.create-ui-unified #create-supercomputer-section .supercomputer-box textarea{
  min-height:48px;
  max-height:min(22vh,140px);
}
body.create-ui-unified #create-supercomputer-section .hint{
  display:block;
  margin:6px 0 0;
  padding:5px 8px;
  font-size:9px;
  line-height:1.35;
  color:#c8b8e8;
  border-radius:4px;
  background:rgba(180,107,255,.08);
}
body.create-ui-unified #create-supercomputer-section .hint.is-error{
  color:#ffb4b4;
  background:rgba(255,80,80,.12);
  border:1px solid rgba(255,80,80,.22);
}
body.create-ui-unified #create-supercomputer-section .supercomputer-box .prompt-brain-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
  margin-top:8px;
}
body.create-ui-unified #create-supercomputer-section .supercomputer-box .prompt-brain-actions .clear{
  min-height:0;
  padding:7px 4px;
  font-size:8px;
  letter-spacing:.03em;
  line-height:1.2;
  position:relative;
  z-index:1;
  pointer-events:auto;
  cursor:pointer;
}
body.create-ui-unified #create-supercomputer-section .supercomputer-head{
  grid-template-columns:minmax(0,1fr) minmax(0,120px);
  gap:6px;
}
body.create-ui-unified #create-supercomputer-section #brain-llm-provider{
  padding:4px 5px;
  font-size:9px;
}
body.create-ui-unified #create-video-options{order:0}
body.create-ui-unified #create-output-section{order:1}
body.create-ui-unified #create-supercomputer-section{order:2}
body.create-ui-unified #create-simple-options{order:3}
body.create-ui-unified #gore-engine-section{order:4}
body.create-ui-unified #art-style-section{order:4}
body.create-ui-unified #create-neg-section{order:5}
body.create-ui-unified .create-model-row{
  margin-top:6px;
  padding-top:6px;
  border-top:1px solid rgba(255,255,255,.08);
}
body.create-ui-unified .create-model-row select{
  padding:6px 8px;
  font-size:11px;
}
body.create-ui-unified .create-options-stack{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding-bottom:4px;
}
body.create-ui-unified .create-generate-bar{
  flex:0 0 auto;
  position:relative;
  top:auto;
  bottom:auto;
  z-index:4;
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid rgba(209,48,73,.18);
  background:transparent;
  box-shadow:none;
}
body.create-ui-unified .create-generate-bar .genrow.prompt-gen{
  margin:0;
  padding:6px 8px;
  border:1px solid rgba(209,48,73,.35);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(10,14,10,.98),rgba(8,12,8,.94));
  box-shadow:0 4px 14px rgba(0,0,0,.28);
  grid-template-columns:minmax(150px,200px) auto;
}
body.create-ui-unified .create-generate-bar .create-mode-toggle{
  min-width:150px;
  min-height:32px;
}
body.create-ui-unified .create-generate-bar .create-mode-btn{
  padding:6px 7px;
  font-size:10px;
}
body.create-ui-unified .create-generate-bar .genrow.prompt-gen .btn,
body.create-ui-unified .create-generate-bar .genrow.prompt-gen .clear{
  padding:6px 8px;
  font-size:9px;
}
body.create-ui-unified .create-generate-bar .create-option-rail{
  margin:4px 0 0;
  padding:3px 4px;
  grid-template-columns:repeat(5,minmax(0,1fr));
}
body.create-ui-unified .create-section-card{
  padding:4px 8px 6px;
}
body.create-ui-unified .create-section-card .row{
  gap:4px 6px;
}
body.create-ui-unified .create-section-card label{
  margin:4px 0 2px;
}
body.create-ui-unified #create-option-rail [data-create-jump="options"]{display:inline-flex}
body.create-ui-unified #create-option-rail [data-create-jump="gore"],
body.create-ui-unified #create-option-rail [data-create-jump="look"]{display:none}

.create-stack-toggle{
  display:flex;align-items:center;gap:8px;margin:4px 0;padding:4px 0;
  font-size:10px;color:var(--muted);cursor:pointer;
  letter-spacing:0.04em;
}
/* width/padding/border reset: the global `textarea,input,select{width:100%}` rule
   otherwise stretches the checkbox to the full label width */
.create-stack-toggle input{
  margin:0;flex:0 0 auto;width:14px;height:14px;padding:0;border:0;
  background:none;accent-color:var(--acid);cursor:pointer;
}
.create-stack-toggle span{line-height:1.4;min-width:0}
.create-stack-hint{display:block;margin:0 0 6px;font-size:9px;line-height:1.35;opacity:.85}
body.create-ui-unified #create-simple-options{display:block!important}
body.create-ui-unified #create-neg-section{display:block!important}
body.create-ui-unified .create-dd-thumb{
  width:40px;height:40px;border-radius:6px;overflow:hidden;
  border:1px solid rgba(255,255,255,.12);flex-shrink:0;
}
body.create-ui-unified .create-dd-thumb .picker-visual{min-height:40px;font-size:8px}
#create-generate-bar .create-option-rail{display:none!important}

/* Curated local models (CURATED_DD_ENGINES in dd-app.js) */
body.curated-local-models #higgsfield-helper{display:none!important}
/* Legacy Flux Schnell local-only mode */
body.flux-schnell-only #model.flux-schnell-fixed{display:none}
body.flux-schnell-only #higgsfield-helper{display:none!important}
body.flux-schnell-only .prov-bar[data-provider-kind="img"]{display:none}
body.flux-schnell-only #create-output option[value="video"]{display:none}
body.flux-schnell-only #create-mode-video{display:none!important}

/* Multi-user login overlay */
body.dd-auth-pending main,
body.dd-auth-pending .app-header{filter:blur(6px);pointer-events:none;user-select:none}
.dd-login{
  position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;
  background:rgba(4,6,8,.82);backdrop-filter:blur(8px);padding:24px;
}
.dd-login[hidden]{display:none!important;pointer-events:none!important;visibility:hidden!important}
.dd-login-card{
  width:min(400px,100%);padding:28px 24px;border-radius:var(--radius);
  border:1px solid rgba(209,48,73,.22);background:linear-gradient(180deg,rgba(18,22,16,.98),rgba(8,10,8,.98));
  box-shadow:0 24px 80px rgba(0,0,0,.55),0 0 40px rgba(209,48,73,.08);
}
.dd-login-card h2{margin:0 0 6px;font-size:18px;letter-spacing:.12em;text-transform:uppercase}
.dd-login-card p{margin:0 0 16px;color:var(--muted);font-size:12px}
.dd-login-card label{display:block;margin-bottom:12px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.dd-login-card input{
  display:block;width:100%;margin-top:6px;padding:10px 12px;border-radius:var(--radius);
  border:1px solid var(--border-2);background:rgba(0,0,0,.45);color:var(--text);font-size:14px;
}
.dd-login-card button[type=submit]{
  width:100%;margin-top:8px;padding:12px;border:0;border-radius:var(--radius);cursor:pointer;
  background:linear-gradient(180deg,#ff6b81,#d31531);color:#0a0c08;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
}
.dd-login-error{color:#ff6b6b;font-size:12px;margin:0 0 8px}
.dd-login-user{
  font-size:10px;color:var(--muted);letter-spacing:.06em;white-space:nowrap;
  display:inline-flex;align-items:center;gap:9px;
}
.dd-login-user button{
  margin-left:0;padding:4px 10px;border:1px solid var(--border-2);border-radius:999px;
  background:transparent;color:var(--muted);cursor:pointer;font-size:9px;text-transform:uppercase;
}
.dd-nav-profile-link{
  display:inline-flex;align-items:center;gap:6px;color:inherit;text-decoration:none;font-size:13px;
}
.dd-nav-profile-link:hover{text-decoration:underline}
.dd-nav-avatar{
  width:36px;height:36px;border-radius:50%;object-fit:cover;flex-shrink:0;
  background:#1a1216;border:1px solid var(--border-2);
}
.dd-auth-link{
  margin-left:10px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--acid-dim);text-decoration:none;
}
.dd-auth-link:hover{color:var(--acid)}
.dd-auth-link + .dd-auth-link{margin-left:8px}
#dd-nav-cult-link{margin-left:0}

/* Keys explainer popup - what's free vs what your own keys unlock */
.dd-keys-modal{
  position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;
  background:rgba(4,6,8,.82);backdrop-filter:blur(8px);padding:24px;
}
/* hidden must never intercept taps — race with attribute toggle used to leave a dead full-screen sheet */
.dd-keys-modal[hidden]{display:none!important;pointer-events:none!important;visibility:hidden!important;opacity:0!important}
.lb:not(.show),.editor-overlay:not(.show){pointer-events:none!important}
.dd-keys-card{
  position:relative;width:min(680px,100%);max-height:88vh;overflow:auto;
  padding:26px 24px 22px;border-radius:var(--radius);
  border:1px solid rgba(209,48,73,.22);background:linear-gradient(180deg,rgba(18,22,16,.98),rgba(8,10,8,.98));
  box-shadow:0 24px 80px rgba(0,0,0,.55),0 0 40px rgba(209,48,73,.08);
}
.dd-keys-card h2{margin:0 0 14px;font-size:18px;letter-spacing:.12em;text-transform:uppercase}
.dd-keys-cols{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media(max-width:640px){.dd-keys-cols{grid-template-columns:1fr}}
.dd-keys-col h3{margin:0 0 8px;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--acid-dim)}
.dd-keys-col ul{margin:0;padding-left:16px;font-size:12px;line-height:1.7;color:var(--text)}
.dd-keys-note{margin:10px 0 0;font-size:10.5px;color:var(--muted);line-height:1.5}
.dd-keys-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.dd-keys-add{
  flex:1;min-width:200px;text-align:center;padding:12px;border-radius:var(--radius);
  background:linear-gradient(180deg,#ff6b81,#d31531);color:#0a0c08;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;text-decoration:none;font-size:11px;
}
.dd-keys-later{
  padding:12px 18px;border:1px solid var(--border-2);border-radius:var(--radius);
  background:transparent;color:var(--muted);cursor:pointer;font-size:10px;
  letter-spacing:.08em;text-transform:uppercase;
}
.dd-keys-x{position:absolute;top:10px;right:12px;border:0;background:transparent;color:var(--muted);font-size:20px;cursor:pointer;line-height:1}
.dd-keys-x:hover,.dd-keys-later:hover{color:var(--text)}
.atlas-nudge span a[data-keys-explainer-open]{color:var(--acid-dim)}

/* === Login gate (index.html) === */
body.gate-page{
  min-height:100vh;margin:0;overflow:auto;
  display:flex;align-items:center;justify-content:center;padding:24px 16px 40px;
}
.gate-wrap{
  position:relative;z-index:2;width:min(420px,100%);text-align:center;
}
.gate-brand{margin-bottom:28px}
.gate-brand .logo{font-size:clamp(22px,5vw,32px);margin:0 0 10px}
.gate-tag{
  margin:0;font-size:10px;letter-spacing:.28em;text-transform:uppercase;color:var(--muted);
}
.gate-card{
  text-align:left;padding:28px 24px 22px;border-radius:var(--radius);
  border:1px solid rgba(209,48,73,.22);
  background:linear-gradient(180deg,rgba(18,22,16,.98),rgba(8,10,8,.98));
  box-shadow:0 24px 80px rgba(0,0,0,.55),0 0 40px rgba(209,48,73,.08);
}
.gate-card h2{
  margin:0 0 6px;font-size:13px;letter-spacing:.22em;text-transform:uppercase;color:var(--acid);
}
.gate-hint{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.5}
.gate-form label{
  display:block;margin-bottom:12px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);
}
.gate-form input{
  display:block;width:100%;margin-top:6px;padding:11px 12px;border-radius:var(--radius);
  border:1px solid var(--border-2);background:rgba(0,0,0,.45);color:var(--text);font-size:14px;
  box-sizing:border-box;
}
.gate-form input:focus{
  outline:none;border-color:var(--acid-dim);box-shadow:0 0 0 2px rgba(209,48,73,.12);
}
.gate-form button[type=submit]{
  width:100%;margin-top:10px;padding:13px;border:0;border-radius:var(--radius);cursor:pointer;
  background:linear-gradient(180deg,#ff6b81,#d31531);color:#0a0c08;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;font-size:11px;
}
.gate-form button[type=submit]:disabled{opacity:.55;cursor:wait}
.gate-error{color:#ff6b6b;font-size:12px;margin:0 0 8px}
.gate-foot{margin:14px 0 0;font-size:11px;color:var(--muted);line-height:1.45}
.gate-foot.gate-muted{opacity:.75;font-size:10px;letter-spacing:.04em}
.gate-links{margin-top:22px;font-size:10px;letter-spacing:.14em;text-transform:uppercase}
.gate-links a{color:var(--acid-dim);text-decoration:none}
.gate-links a:hover{color:var(--acid)}

.gate-mode{
  display:flex;gap:8px;margin-bottom:18px;
}
.gate-mode-btn{
  flex:1;padding:10px 12px;border-radius:var(--radius);cursor:pointer;font:inherit;
  font-size:10px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;
  border:1px solid var(--border-2);background:rgba(0,0,0,.35);color:var(--muted);
  transition:border-color .12s,color .12s,background .12s;
}
.gate-mode-btn.active{
  border-color:var(--acid-dim);color:var(--acid);
  background:rgba(209,48,73,.08);
}
.gate-mode-btn:disabled{opacity:.45;cursor:not-allowed}
.gate-guest{
  display:block;text-align:center;margin-top:16px;padding:12px;border-radius:var(--radius);
  border:1px solid var(--border-2);color:var(--text);text-decoration:none;font-size:11px;
  letter-spacing:.1em;text-transform:uppercase;transition:border-color .12s,color .12s;
}
.gate-guest:hover{border-color:var(--acid-dim);color:var(--acid)}
.gate-sr{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* === Audio studio (unified three-card layout) === */
body.create-ui-unified .audio-studio-stack{
  display:flex;flex-direction:column;gap:10px;
}
body.create-ui-unified .audio-studio-card{
  border:1px solid rgba(209,48,73,.22);
  border-radius:8px;
  background:rgba(8,12,8,.58);
  padding:10px 12px 12px;
  flex-shrink:0;
}
body.create-ui-unified .audio-card-title{
  margin:0 0 2px;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--acid);
}
body.create-ui-unified .audio-card-desc{margin:0 0 8px;font-size:10px}
body.create-ui-unified .audio-prompt-ta{
  width:100%;
  min-height:72px;
  max-height:min(28vh,160px);
  resize:vertical;
  margin:0 0 8px;
  font-size:12px;
  line-height:1.4;
}
body.create-ui-unified .audio-lyrics-ta{min-height:56px;max-height:120px}
body.create-ui-unified .audio-engine-select{
  font-size:11px;
  border-color:rgba(209,48,73,.28);
}
body.create-ui-unified .audio-gen-btn{
  width:100%;
  margin-top:8px;
}
body.create-ui-unified .audio-inline-player{
  width:100%;
  margin-top:8px;
  min-height:40px;
}
body.create-ui-unified .audio-status{
  margin-top:6px;
  font-size:10px;
  line-height:1.35;
  color:var(--muted);
  min-height:14px;
}
body.create-ui-unified .audio-status.is-loading{color:#8ad4ff}
body.create-ui-unified .audio-status.is-error{
  color:#ffb4b4;
  padding:5px 8px;
  border-radius:4px;
  background:rgba(255,80,80,.1);
  border:1px solid rgba(255,80,80,.2);
}
body.create-ui-unified .audio-advanced{
  margin:6px 0;
  border:1px solid rgba(255,255,255,.08);
  border-radius:6px;
  padding:4px 8px 8px;
  background:rgba(0,0,0,.2);
}
body.create-ui-unified .audio-advanced-label{
  font-size:9px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  padding:4px 0;
  margin-bottom:2px;
}
body.create-ui-unified .voice-design-card{
  margin-top:10px;
  padding:8px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:6px;
  background:rgba(0,0,0,.16);
}
body.create-ui-unified .voice-design-card .row{margin-top:6px}
body.create-ui-unified .audio-sfx-presets{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:0 0 8px;
}
body.create-ui-unified .audio-preset-chip{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.35);
  color:var(--muted);
  border-radius:999px;
  padding:4px 9px;
  font-size:9px;
  cursor:pointer;
}
body.create-ui-unified .audio-preset-chip:hover{
  border-color:rgba(209,48,73,.35);
  color:var(--acid);
}
body.create-ui-unified .audio-dur-slider-wrap input[type=range]{
  width:100%;
  margin-top:4px;
  accent-color:var(--acid);
}
body.create-ui-unified .audio-recent-panel{
  margin-bottom:10px;
  padding:10px 12px;
  border:1px solid rgba(209,48,73,.18);
  border-radius:8px;
  background:rgba(8,12,8,.5);
}
body.create-ui-unified .audio-recent-list{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:8px;
  max-height:180px;
  overflow-y:auto;
}
body.create-ui-unified .audio-recent-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:8px;
  align-items:center;
  width:100%;
  text-align:left;
  padding:6px 8px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:6px;
  background:rgba(0,0,0,.28);
  color:var(--text);
  cursor:pointer;
  font-size:10px;
}
body.create-ui-unified .audio-recent-item:hover{
  border-color:rgba(209,48,73,.35);
  background:rgba(209,48,73,.06);
}
body.create-ui-unified .audio-recent-kind{
  color:var(--acid);
  font-size:8px;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}
body.create-ui-unified .audio-recent-prompt{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
}
body.create-ui-unified .audio-recent-engine{
  font-size:8px;
  color:#8ad4ff;
  white-space:nowrap;
}
body.create-ui-unified .audio-ref-upload input[type=file]{
  font-size:10px;
  margin-top:4px;
  max-width:100%;
}
@media(max-width:980px){
  body.create-ui-unified .audio-results-col .audio-recent-panel{max-height:none}
}

/* Audio studio: signal-rack polish */
body.create-ui-unified #page-audio .page-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:10px 18px;
  border-bottom:1px solid rgba(209,48,73,.16);
}
body.create-ui-unified #page-audio .page-head h2,
body.create-ui-unified #page-audio .page-head p{grid-column:1}
body.create-ui-unified .audio-readiness{
  grid-column:2;
  grid-row:1 / span 2;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  max-width:420px;
}
body.create-ui-unified .audio-ready-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:28px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:7px;
  background:linear-gradient(180deg,rgba(19,24,24,.92),rgba(7,9,9,.92));
  color:#d8c0c8;
  font:10px/1 var(--mono);
  letter-spacing:.04em;
  white-space:nowrap;
}
body.create-ui-unified .audio-ready-chip::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#d7b743;
  box-shadow:0 0 9px rgba(215,183,67,.72);
}
body.create-ui-unified .audio-ready-chip.is-ready{
  border-color:rgba(209,48,73,.34);
  color:#f8e7ed;
}
body.create-ui-unified .audio-ready-chip.is-ready::before{
  background:#d13049;
  box-shadow:0 0 10px rgba(209,48,73,.78);
}
body.create-ui-unified .audio-ready-chip.is-offline{
  border-color:rgba(218,88,74,.34);
  color:#ffcdc7;
}
body.create-ui-unified .audio-ready-chip.is-offline::before{
  background:#da584a;
  box-shadow:0 0 10px rgba(218,88,74,.72);
}
body.create-ui-unified #page-audio .audio-split{
  grid-template-columns:minmax(390px,500px) minmax(0,1fr);
  gap:18px;
}
body.create-ui-unified #page-audio .audio-studio-stack{gap:12px}
body.create-ui-unified #page-audio .audio-studio-card{
  position:relative;
  overflow:hidden;
  padding:14px;
  border-color:rgba(202,176,185,.18);
  background:
    linear-gradient(90deg,rgba(209,48,73,.12),transparent 34%) 0 0/100% 1px no-repeat,
    linear-gradient(180deg,rgba(21,26,23,.92),rgba(7,10,10,.86));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 14px 36px rgba(0,0,0,.22);
}
body.create-ui-unified #page-audio .audio-studio-card::after{
  content:"";
  position:absolute;
  inset:auto 12px 0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(104,170,255,.34),transparent);
  opacity:.8;
}
body.create-ui-unified #page-audio .audio-card-title{
  color:#f0f4e9;
  font-size:12px;
}
body.create-ui-unified #page-audio .audio-card-desc{
  color:#a0838c;
  margin-bottom:10px;
}
body.create-ui-unified #page-audio .audio-prompt-ta{
  min-height:86px;
  border-color:rgba(255,255,255,.12);
  background:rgba(0,0,0,.34);
}
body.create-ui-unified #page-audio .audio-prompt-ta:focus,
body.create-ui-unified #page-audio select:focus,
body.create-ui-unified #page-audio input:focus{
  border-color:rgba(104,170,255,.55);
  box-shadow:0 0 0 2px rgba(104,170,255,.12);
}
body.create-ui-unified #page-audio .audio-gen-btn{
  min-height:0;
  padding:11px 16px;
  border:1px solid rgba(209,48,73,.55);
  border-radius:9px;
  background:linear-gradient(180deg,#c22740,#9c1826);
  color:#fbeef0;
  font-family:var(--label);
  font-weight:400;
  font-size:17px !important;
  letter-spacing:.14em;
  text-transform:uppercase;
  text-shadow:0 1px 2px rgba(0,0,0,.4);
  box-shadow:0 6px 18px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.08);
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
}
body.create-ui-unified #page-audio .audio-gen-btn:hover{
  filter:brightness(1.08);
  transform:translateY(-1px);
  box-shadow:0 10px 26px rgba(200,32,42,.32),inset 0 1px 0 rgba(255,255,255,.12);
}
body.create-ui-unified #page-audio .audio-gen-btn:active{transform:translateY(0);filter:brightness(.96)}
body.create-ui-unified #page-audio .audio-inline-player{
  border:1px solid rgba(255,255,255,.12);
  border-radius:7px;
  background:#050707;
}
body.create-ui-unified #page-audio .audio-status:not(:empty){
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:7px;
  background:rgba(0,0,0,.28);
}
body.create-ui-unified #page-audio .audio-sfx-presets{gap:6px}
body.create-ui-unified #page-audio .audio-preset-chip{
  border-radius:999px;
  border-color:rgba(202,176,185,.22);
  background:rgba(20,14,16,.6);
  color:#c4adb5;
  padding:5px 11px;
  letter-spacing:.02em;
  transition:border-color .14s ease,color .14s ease,background .14s ease,transform .14s ease;
}
body.create-ui-unified #page-audio .audio-preset-chip:hover{
  border-color:rgba(209,48,73,.55);
  color:#f7ecef;
  background:rgba(209,48,73,.1);
  transform:translateY(-1px);
}
body.create-ui-unified #page-audio .audio-recent-panel,
body.create-ui-unified #page-audio #audio-gallery-host{
  border-color:rgba(202,176,185,.16);
  background:linear-gradient(180deg,rgba(17,22,20,.9),rgba(7,9,9,.86));
}
body.create-ui-unified #page-audio .audio-recent-item{
  min-height:38px;
  border-radius:7px;
  border-color:rgba(255,255,255,.1);
}
body.create-ui-unified #page-audio .audio-recent-kind{color:#d13049}
body.create-ui-unified #page-audio .audio-recent-engine{color:#68aaff}
@media(max-width:980px){
  body.create-ui-unified #page-audio .page-head{grid-template-columns:1fr}
  body.create-ui-unified .audio-readiness{
    grid-column:1;
    grid-row:auto;
    justify-content:flex-start;
    max-width:none;
  }
  body.create-ui-unified #page-audio .audio-split{grid-template-columns:1fr}
}

/* ============================================================
   Audio Studio — transport player + studio chrome (2026-07-19)
   The createDDAudioPlayer JS shipped without its CSS, so players
   rendered as raw browser controls. This is the missing styling
   plus a pro pass on the console. Scoped to #page-audio (+ the
   player class, which also appears in the Voice Design panel).
   Palette: three muted, cohesive accents — blood (voice), ember
   (music), steel (sfx). One bold element: the filled round play
   button + tinted waveform. Everything else is quiet ghost chrome.
   Additive & reversible: delete this block to revert.
   ============================================================ */
.dd-audio-player{
  --dap-accent:var(--acid);
  --dap-wave-bg:rgba(228,214,218,.14);
  margin-top:12px;padding:11px 13px;
  border:1px solid var(--border-2);border-radius:11px;
  background:linear-gradient(180deg,rgba(24,18,20,.9),rgba(8,6,7,.92));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.dd-audio-player.kind-voice{--dap-accent:#d13049}
.dd-audio-player.kind-music{--dap-accent:#c68a3a}
.dd-audio-player.kind-sfx{--dap-accent:#7d94a4}
.dd-audio-player .dap-head{display:flex;align-items:baseline;gap:10px;justify-content:space-between;margin-bottom:8px}
.dd-audio-player .dap-title{font-size:12px;color:var(--text);letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}
.dd-audio-player .dap-title:empty{display:none}
.dd-audio-player .dap-meta{font-size:9px;color:var(--muted);letter-spacing:.12em;text-transform:uppercase;white-space:nowrap;font-family:var(--mono)}
.dd-audio-player .dap-wave{display:block;width:100%;height:46px;cursor:pointer;border-radius:6px;background:var(--dap-wave-bg)}
.dd-audio-player .dap-seek{
  -webkit-appearance:none;appearance:none;width:100%;height:4px;margin:9px 0 3px;
  border-radius:999px;background:rgba(255,255,255,.12);cursor:pointer;
}
.dd-audio-player .dap-seek::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:13px;height:13px;border-radius:50%;
  background:var(--dap-accent);border:2px solid #0b0708;box-shadow:0 0 8px var(--dap-accent);cursor:pointer;
}
.dd-audio-player .dap-seek::-moz-range-thumb{width:13px;height:13px;border:2px solid #0b0708;border-radius:50%;background:var(--dap-accent);box-shadow:0 0 8px var(--dap-accent);cursor:pointer}
.dd-audio-player .dap-row{display:flex;align-items:center;gap:11px;margin-top:6px}
.dd-audio-player .dap-btn{
  background:rgba(255,255,255,.03);border:1px solid var(--border-2);color:var(--text);
  border-radius:8px;padding:6px 10px;font-size:12px;line-height:1;cursor:pointer;
  transition:border-color .13s ease,color .13s ease,background .13s ease;
}
.dd-audio-player .dap-btn:hover{border-color:var(--dap-accent);color:#fff;background:rgba(255,255,255,.06)}
.dd-audio-player .dap-play{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;padding:0;border-radius:50%;font-size:13px;
  background:radial-gradient(circle at 50% 35%,var(--dap-accent),color-mix(in srgb,var(--dap-accent) 62%,#000));
  border:1px solid color-mix(in srgb,var(--dap-accent) 70%,#000);color:#fff;
  box-shadow:0 4px 14px color-mix(in srgb,var(--dap-accent) 40%,transparent);
}
.dd-audio-player .dap-play:hover{filter:brightness(1.12);color:#fff;background:radial-gradient(circle at 50% 35%,var(--dap-accent),color-mix(in srgb,var(--dap-accent) 62%,#000))}
.dd-audio-player .dap-stop{width:32px;height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:8px}
.dd-audio-player .dap-dl{margin-left:auto;font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-family:var(--label);padding:7px 11px}
.dd-audio-player .dap-time{font-size:10px;color:var(--muted);font-family:var(--mono);white-space:nowrap;letter-spacing:.03em}
.dd-audio-player .dap-vol{
  -webkit-appearance:none;appearance:none;width:74px;height:4px;border-radius:999px;
  background:rgba(255,255,255,.12);cursor:pointer;
}
.dd-audio-player .dap-vol::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:11px;height:11px;border-radius:50%;background:var(--dap-accent);border:2px solid #0b0708;cursor:pointer}
.dd-audio-player .dap-vol::-moz-range-thumb{width:11px;height:11px;border:2px solid #0b0708;border-radius:50%;background:var(--dap-accent);cursor:pointer}
.dd-audio-player .dap-err{margin-top:8px;font-size:10px;color:var(--acid);line-height:1.45}

/* Session-output rail cards: left accent bar keyed to the output type */
body.create-ui-unified #page-audio .audio-output-card{
  --aoc-accent:var(--acid);
  border:1px solid var(--border-2);border-left:3px solid var(--aoc-accent);
  border-radius:10px;background:linear-gradient(180deg,rgba(24,18,20,.55),rgba(8,6,7,.4));
  padding:11px 13px;margin-bottom:12px;
}
body.create-ui-unified #page-audio .audio-output-card.kind-voice{--aoc-accent:#d13049}
body.create-ui-unified #page-audio .audio-output-card.kind-music{--aoc-accent:#c68a3a}
body.create-ui-unified #page-audio .audio-output-card.kind-sfx{--aoc-accent:#7d94a4}
body.create-ui-unified #page-audio .audio-output-card .aoc-head{display:flex;align-items:center;gap:9px;margin-bottom:3px}
body.create-ui-unified #page-audio .audio-output-card .aoc-badge{
  font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--aoc-accent);
  border:1px solid var(--border-2);border-radius:5px;padding:3px 7px;white-space:nowrap;font-family:var(--label);
}
body.create-ui-unified #page-audio .audio-output-card .aoc-label{font-size:12px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}
body.create-ui-unified #page-audio .audio-output-card .dd-audio-player{border:none;background:none;padding:4px 0 0;box-shadow:none;margin-top:6px}
body.create-ui-unified #page-audio .audio-output-card .aoc-acts{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
body.create-ui-unified #page-audio .audio-output-card .aoc-acts .clear{font-size:9px;padding:5px 10px;border-radius:7px;letter-spacing:.06em}
body.create-ui-unified #page-audio .audio-output-card .aoc-del:hover{border-color:var(--blood);color:var(--blood)}

/* Voice Design panel: preview cards read as an audition sheet */
body.create-ui-unified #page-audio .voice-design-card{
  margin-top:12px;padding:11px 13px;
  border:1px solid var(--border-2);border-left:3px solid #d13049;border-radius:10px;
  background:linear-gradient(180deg,rgba(24,18,20,.5),rgba(8,6,7,.4));
}
body.create-ui-unified #page-audio .voice-design-card .row{margin-top:9px;gap:8px}
body.create-ui-unified #page-audio .voice-design-card input{border-radius:7px}
body.create-ui-unified #page-audio .voice-assign-row{
  margin-top:10px;padding-top:10px;border-top:1px solid var(--border);
}
body.create-ui-unified #page-audio #voice-persona-row{margin-bottom:2px}
/* .row { display:grid } beats the UA [hidden]{display:none} rule — keep
   hidden persona / engine wraps truly out of layout (mobile overlap bug). */
body.create-ui-unified #page-audio [hidden]{display:none!important}

/* Mode rail: segmented Voice | Music | SFX */
body.create-ui-unified #page-audio .audio-subtabs{
  display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-bottom:16px;
  border:1px solid var(--border-2);border-radius:11px;overflow:hidden;background:rgba(15,11,12,.9);
  /* The controls column is a height:0 flex column on desktop; without this the
     Voice/Music/SFX bar (flex-shrink:1 by default) gets squeezed to ~1px and
     clipped by overflow:hidden, so it vanished on PC while mobile was fine. The
     .audio-studio-card siblings already carry flex-shrink:0 for the same reason. */
  flex-shrink:0;
}
body.create-ui-unified #page-audio .audio-subtab{
  border:0;border-right:1px solid var(--border);background:transparent;color:var(--muted);
  padding:12px 10px;font-family:var(--label);letter-spacing:.12em;text-transform:uppercase;
  font-size:16px;cursor:pointer;transition:color .16s ease,background .16s ease;position:relative;border-radius:0;
}
body.create-ui-unified #page-audio .audio-subtab:last-child{border-right:0}
body.create-ui-unified #page-audio .audio-subtab:hover{color:var(--text);background:rgba(209,48,73,.06)}
body.create-ui-unified #page-audio .audio-subtab.active{color:#fff;background:linear-gradient(180deg,rgba(209,48,73,.18),rgba(209,48,73,.04))}
body.create-ui-unified #page-audio .audio-subtab.active::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--blood);box-shadow:0 0 12px var(--blood)}

/* Secondary actions (Save to gallery / Download) — quiet ghost, not blocky */
body.create-ui-unified #page-audio .endframe-row{gap:8px;margin-top:10px}
body.create-ui-unified #page-audio .endframe-row .clear{
  border-radius:8px;padding:8px 12px;font-size:10px;letter-spacing:.08em;
  border-color:var(--border-2);transition:border-color .13s ease,color .13s ease,background .13s ease;
}
body.create-ui-unified #page-audio .endframe-row .clear:hover:not(:disabled){border-color:var(--acid);color:var(--text);background:rgba(209,48,73,.06)}

@media (max-width:640px){
  .dd-audio-player .dap-row{flex-wrap:wrap;gap:9px}
  .dd-audio-player .dap-dl{margin-left:0}
}

/* ============================================================
   Audio Studio — QUIET PASS (Jared 2026-07-19: "too big and noisy").
   Design thesis: a calm studio console. Flat surfaces, hairline
   borders, one accent reserved for the active tab + play button +
   generate action. Everything else recedes. This block deliberately
   OVERRIDES the louder earlier audio rules above (kept for history /
   easy revert: delete this block to restore the previous look).
   Scoped to #page-audio so nothing else on the site shifts.
   ============================================================ */
/* 1. Kill decoration: corner brackets, the red top-line + blue bottom-line
   glow, and the heavy floating drop shadow. A panel is a panel. */
body.create-ui-unified #page-audio .audio-studio-card .corner{display:none}
body.create-ui-unified #page-audio .audio-studio-card{
  padding:16px 16px 14px;
  border:1px solid rgba(202,176,185,.12);
  border-radius:10px;
  background:rgba(16,13,14,.72);
  box-shadow:none;
}
body.create-ui-unified #page-audio .audio-studio-card::after{display:none}
/* 2. Calm every field label: the single biggest noise source was ~15
   uppercase, wide-tracked labels all shouting. Sentence case, small,
   quiet grey. (!important to beat the global `label{...!important}`.) */
body.create-ui-unified #page-audio label{
  text-transform:none!important;
  letter-spacing:.005em!important;
  font-size:11px!important;
  font-weight:500;
  color:var(--muted);
  margin:0 0 5px!important;
}
body.create-ui-unified #page-audio .chk{font-size:11px!important;color:var(--muted)}
/* 3. Card heading + helper text: quieter, tighter. */
body.create-ui-unified #page-audio .audio-card-title{
  font-size:11px;letter-spacing:.1em;color:var(--text);opacity:.92;
}
body.create-ui-unified #page-audio .audio-card-desc{
  font-size:11px;color:var(--muted);margin:2px 0 12px;line-height:1.45;
}
/* The "ElevenLabs · cloud · your key" tag — recede it to a whisper. */
body.create-ui-unified #page-audio .audio-engine-tag{
  font-size:9px;letter-spacing:.08em;color:var(--muted);opacity:.65;
  border:none;background:none;padding:0;text-transform:uppercase;
}
/* 4. Sub-tab bar: smaller, flatter, no glow. Accent = a thin underline only. */
body.create-ui-unified #page-audio .audio-subtabs{
  border-radius:9px;background:rgba(12,9,10,.7);
}
body.create-ui-unified #page-audio .audio-subtab{
  padding:9px 8px;font-size:13px;letter-spacing:.08em;
}
body.create-ui-unified #page-audio .audio-subtab.active{background:rgba(209,48,73,.09)}
body.create-ui-unified #page-audio .audio-subtab.active::after{height:2px;box-shadow:none}
/* 5. Inputs / selects / textareas: hairline, tighter, uniform. */
body.create-ui-unified #page-audio select,
body.create-ui-unified #page-audio input,
body.create-ui-unified #page-audio .audio-prompt-ta{
  border:1px solid rgba(255,255,255,.09);
  background:rgba(0,0,0,.28);
  border-radius:7px;
  font-size:12px;
}
body.create-ui-unified #page-audio select,
body.create-ui-unified #page-audio input{padding:8px 10px}
body.create-ui-unified #page-audio .audio-prompt-ta{min-height:64px}
body.create-ui-unified #page-audio .row{gap:10px}
/* 6. Mix controls: a quiet grouped block, not a loud bordered box. */
body.create-ui-unified #page-audio .audio-advanced{
  border:none;background:none;padding:0;margin:12px 0 0;
  border-top:1px solid rgba(255,255,255,.07);padding-top:12px;
}
body.create-ui-unified #page-audio .audio-advanced-label{
  font-size:9px;letter-spacing:.12em;color:var(--muted);opacity:.7;margin:0 0 8px;
}
/* 7. Generate: still the one bold action, but sized down from the 17px block. */
body.create-ui-unified #page-audio .audio-gen-btn{
  font-size:14px!important;padding:10px 16px;border-radius:8px;
  letter-spacing:.12em;box-shadow:0 2px 10px rgba(0,0,0,.25);
}
body.create-ui-unified #page-audio .audio-gen-btn:hover{
  transform:none;box-shadow:0 4px 16px rgba(200,32,42,.24);
}
/* 8. Voice Design / assign panels: flatten to match. */
body.create-ui-unified #page-audio .audio-advanced#voice-design-panel{
  border-top:1px solid rgba(255,255,255,.07);
}
body.create-ui-unified #page-audio .voice-design-card{
  border-color:rgba(255,255,255,.08);border-left-width:2px;
  background:rgba(0,0,0,.2);
}
/* 9. Player: lose the inset sheen + soften, it sat too heavy in the card. */
body.create-ui-unified #page-audio .dd-audio-player{
  border-color:rgba(255,255,255,.08);
  background:rgba(0,0,0,.24);
  box-shadow:none;
}
/* 10. Results column: flatten both panels + kill their corner brackets. */
body.create-ui-unified #page-audio .audio-recent-panel,
body.create-ui-unified #page-audio #audio-gallery-host{
  border:1px solid rgba(202,176,185,.1);
  background:rgba(16,13,14,.7);
  box-shadow:none;
}
body.create-ui-unified #page-audio .audio-recent-panel .corner,
body.create-ui-unified #page-audio #audio-gallery-host .corner{display:none}
body.create-ui-unified #page-audio .audio-results-col .settings-section{
  font-size:11px;letter-spacing:.1em;color:var(--text);opacity:.9;
}
/* 11. THE "big white blocky thing": audio gallery cards were tall 9:16 portrait
   boxes with a white native <audio> bar floating in the middle. Make them a clean
   dark LIST of short full-width rows, one per clip, and dark-tint the native player
   so it stops reading as a white block on the horror theme. */
body.create-ui-unified #page-audio #audio-gallery-host .gallery{
  --gal-cell:100%;grid-template-columns:1fr;gap:8px;
}
body.create-ui-unified #page-audio #audio-gallery-host .card{
  aspect-ratio:auto!important;min-height:0;height:auto;
  display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:10px;
  padding:8px 10px;border-radius:8px;
  background:rgba(0,0,0,.3);border:1px solid rgba(255,255,255,.08);
}
/* The unconditional display:flex!important above beat applyGalleryTabFor()'s
   inline style.display="none" (JS's type filter, e.g. hiding image/video cards
   on this audio-only list) - hidden cards rendered anyway since the stylesheet
   won the specificity fight. One extra class selector outranks it. */
body.create-ui-unified #page-audio #audio-gallery-host .card.gal-type-hidden{
  display:none!important;
}
body.create-ui-unified #page-audio #audio-gallery-host .card::before{
  content:"";flex:0 0 3px;align-self:stretch;border-radius:2px;background:var(--acid);opacity:.55;
}
body.create-ui-unified #page-audio #audio-gallery-host .card.audio-voice::before{background:#d13049}
body.create-ui-unified #page-audio #audio-gallery-host .card.audio-music::before{background:#c68a3a}
body.create-ui-unified #page-audio #audio-gallery-host .card.audio-sfx::before{background:#7d94a4}
body.create-ui-unified #page-audio #audio-gallery-host .card{min-height:0!important}
body.create-ui-unified #page-audio #audio-gallery-host .card audio{width:100%;height:40px!important;margin:0}
body.create-ui-unified #page-audio #audio-gallery-host .card audio::-webkit-media-controls-enclosure{background:#171214;border-radius:8px}
body.create-ui-unified #page-audio #audio-gallery-host .card audio::-webkit-media-controls-panel{background:#171214}
body.create-ui-unified #page-audio #audio-gallery-host .gallery-audio-player-slot{flex:1 1 auto;min-width:0}
body.create-ui-unified #page-audio #audio-gallery-host .gallery-audio-player-slot .dd-audio-player{width:100%;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
/* the per-clip kind tag we stamp on in JS */
body.create-ui-unified #page-audio #audio-gallery-host .card .audio-card-kind{
  flex:0 0 auto;font-size:9px;letter-spacing:.08em;text-transform:uppercase;
  font-family:var(--label);color:var(--muted);min-width:34px;
}
/* 12. Voice chips: sleeker, less blocky. Delivery chips are multi-select toggles
   (broad emotions, not horror-only); the inline-beat chips are quieter. */
body.create-ui-unified #page-audio .audio-chip-bank{
  display:flex;flex-wrap:wrap;gap:5px;margin:2px 0 12px;
}
body.create-ui-unified #page-audio .audio-tag-chip{
  border:1px solid rgba(255,255,255,.1);
  background:rgba(0,0,0,.22);
  color:var(--muted);
  border-radius:6px;
  padding:4px 9px;
  font-size:11px;line-height:1.2;
  cursor:pointer;
  transition:border-color .12s ease,color .12s ease,background .12s ease;
}
body.create-ui-unified #page-audio .audio-tag-chip:hover{
  border-color:rgba(209,48,73,.45);color:var(--text);
}
body.create-ui-unified #page-audio .audio-tag-chip.on{
  border-color:var(--acid);color:#fff;
  background:linear-gradient(180deg,rgba(209,48,73,.85),rgba(140,24,38,.85));
}
body.create-ui-unified #page-audio .audio-tag-chip.subtle{
  font-size:10px;padding:3px 8px;opacity:.9;
}
/* Voice picker + Preview button on one line */
body.create-ui-unified #page-audio .voice-pick-row{display:flex;gap:6px;align-items:stretch}
body.create-ui-unified #page-audio .voice-pick-row select{flex:1 1 auto;min-width:0}
body.create-ui-unified #page-audio .voice-preview-btn{
  flex:0 0 auto;font-size:10px;letter-spacing:.04em;padding:0 12px;border-radius:7px;white-space:nowrap;
  border-color:var(--border-2);
}
body.create-ui-unified #page-audio .voice-preview-btn:hover:not(:disabled){border-color:var(--acid);color:var(--text);background:rgba(209,48,73,.08)}
/* Separation filter chips above the results */
body.create-ui-unified #page-audio .audio-filter-row{
  display:flex;gap:6px;margin:0 0 10px;flex-wrap:wrap;
}
body.create-ui-unified #page-audio .audio-filter-chip{
  border:1px solid rgba(255,255,255,.1);background:rgba(0,0,0,.24);
  color:var(--muted);border-radius:999px;padding:5px 12px;font-size:11px;cursor:pointer;
  transition:border-color .13s ease,color .13s ease,background .13s ease;
}
body.create-ui-unified #page-audio .audio-filter-chip:hover{border-color:rgba(209,48,73,.4);color:var(--text)}
body.create-ui-unified #page-audio .audio-filter-chip.active{
  border-color:var(--acid);color:#fff;background:rgba(209,48,73,.14);
}

/* ===== 2026-07 design pass: status light, generate dominance, curated chrome ===== */
/* Section step numbers: statically wrong (dup 03) + skip when sections hide — retired */
.create-section-num{display:none}

/* Status pill -> traffic-light chip */
.status{display:inline-flex;align-items:center;gap:7px;text-transform:uppercase;letter-spacing:.12em;font-size:11px;cursor:pointer}
.status::before{content:"";width:8px;height:8px;border-radius:50%;background:#d7b743;box-shadow:0 0 8px #d7b743;animation:dd-status-pulse 1.6s ease-in-out infinite}
.status.ok::before{background:var(--ok);box-shadow:0 0 8px rgba(87,196,107,.8);animation:none}
.status.bad::before{background:#ff4444;box-shadow:0 0 8px #ff4444;animation:none}
@keyframes dd-status-pulse{0%,100%{opacity:1}50%{opacity:.35}}

/* Generate sits under the prompt — full-width, impossible to miss after typing */
#page-generate #go,
body.create-ui-unified #page-generate #go{
  display:block !important;
  width:100% !important;
  margin:10px 0 12px !important;
  padding:16px 20px !important;
  font-size:17px !important;
  font-weight:800 !important;
  letter-spacing:.12em !important;
  text-transform:uppercase !important;
  border-radius:10px !important;
  opacity:1 !important;
  cursor:pointer !important;
  pointer-events:auto !important;
  position:relative !important;
  z-index:80 !important;
  box-shadow:0 0 22px rgba(209,48,73,.4), inset 0 0 0 1px rgba(209,48,73,.7) !important;
}
#page-generate #go:disabled,
body.create-ui-unified #page-generate #go:disabled{
  opacity:1 !important;
  cursor:pointer !important;
  filter:none !important;
}
.create-generate-bar .genrow.prompt-gen{
  grid-template-columns:minmax(160px,220px) auto !important;
}

/* Gore stack chips: give the signature feature some blood */
.gore-stack-chip{position:relative;border-left:3px solid rgba(209,48,73,.35);transition:border-color .15s, box-shadow .15s}
.gore-stack-chip:hover{box-shadow:0 0 12px rgba(209,48,73,.25)}
.gore-stack-chip[data-gore-stack="practical_fx"],
.gore-stack-chip[data-gore-stack="body_horror"]{border-left-color:rgba(255,68,68,.55)}
.gore-stack-chip.active{border-left-color:var(--acid);box-shadow:0 0 14px rgba(209,48,73,.3)}
.gore-stack-chip[data-gore-stack="body_horror"].active,
.gore-stack-chip[data-gore-stack="practical_fx"].active{border-left-color:#ff4444;box-shadow:0 0 14px rgba(255,68,68,.35)}

/* Empty state -> showcase wall */
.empty{display:flex;flex-direction:column;align-items:center;gap:18px;padding:34px 18px}
.dd-showcase-head{letter-spacing:.18em;text-transform:uppercase;font-size:12px;opacity:.75}
.dd-showcase{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;width:100%;max-width:960px}
.dd-showcase-card{position:relative;border:1px solid rgba(209,48,73,.25);border-radius:8px;overflow:hidden;cursor:pointer;
  aspect-ratio:16/10;background-size:cover;background-position:center;transition:border-color .15s, box-shadow .15s, transform .12s;text-align:left}
.dd-showcase-card:hover{border-color:rgba(209,48,73,.8);box-shadow:0 0 22px rgba(209,48,73,.25);transform:translateY(-2px)}
.dd-showcase-card .sc-veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.05) 30%,rgba(0,0,0,.88) 100%)}
.dd-showcase-card .sc-label{position:absolute;left:12px;bottom:30px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#fff0f5;text-shadow:0 1px 6px #000}
.dd-showcase-card .sc-use{position:absolute;left:12px;bottom:10px;font-size:11px;letter-spacing:.1em;color:var(--acid);opacity:.9}
.dd-showcase-hint{font-size:11px;opacity:.55;letter-spacing:.08em}

/* Gate showcase strip */
.gate-showcase{width:100%;max-width:560px;margin:22px auto 0;text-align:center}
.gate-showcase-head{font-size:10px;letter-spacing:.25em;opacity:.6;margin-bottom:10px}
.gate-showcase-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.gate-showcase-img{aspect-ratio:1/1;background-size:cover;background-position:center;border:1px solid rgba(209,48,73,.22);border-radius:6px;filter:saturate(.9);transition:filter .2s,border-color .2s}
.gate-showcase-img:hover{filter:saturate(1.15);border-color:rgba(209,48,73,.7)}
.gate-showcase-sub{font-size:11px;letter-spacing:.06em;opacity:.55;margin-top:10px}

/* ===== Canvas mode: haunted-CRT create page ===== */
.cv-toggle{margin-left:10px;font-size:10px;letter-spacing:.1em;padding:4px 10px;opacity:.8}
body.dd-canvas #page-generate .create-split{display:none}
#cv-root{display:none}
body.dd-canvas #cv-root{display:grid;grid-template-rows:auto minmax(340px,58vh) auto auto auto;gap:14px;max-width:1500px;margin:0 auto;padding:10px 18px 26px}

/* Rails: film-language strips */
#cv-rails{display:grid;gap:8px}
#cv-rails .opt-picker-block{margin:0}
#cv-rails .opt-picker-heading{font-size:10px;letter-spacing:.22em;opacity:.6}
#cv-rails .opt-picker-host{display:flex;gap:8px;overflow-x:auto;padding:6px 2px;scrollbar-width:thin}
#cv-rails .opt-picker-host>*{flex:0 0 auto}

/* The CRT stage */
.cv-stage{position:relative;display:flex;flex-direction:column;min-height:0}
.cv-screen{position:relative;flex:1;min-height:0;border:1px solid rgba(209,48,73,.35);border-radius:10px;background:#020302;overflow:hidden;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 80px rgba(0,0,0,.9), 0 0 30px rgba(209,48,73,.08)}
.cv-media{max-width:100%;max-height:100%;object-fit:contain;position:relative;z-index:2}
.cv-scan{position:absolute;inset:0;z-index:3;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(0,0,0,.16) 0 1px,transparent 1px 3px);mix-blend-mode:multiply}
.cv-static{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none;background:repeating-conic-gradient(#111 0% .0001%, #2a2a2a .0002% .0003%, #050505 .0004% .0005%);background-size:171px 133px}
.cv-screen.tuning .cv-static{opacity:.5;animation:cv-static-jump .18s steps(2) infinite}
@keyframes cv-static-jump{0%{background-position:0 0}50%{background-position:-83px 47px}100%{background-position:61px -29px}}
@media (prefers-reduced-motion: reduce){.cv-screen.tuning .cv-static{animation:none;opacity:.3}}
.cv-stage-meta{padding:8px 4px 0;font-size:11px;letter-spacing:.08em;opacity:.65;min-height:20px;text-align:center}

/* Reel: results as a filmstrip */
#cv-reel .create-results-col{margin:0}
#cv-reel .panel-gallery{padding-top:8px}
#cv-reel .gallery{display:flex!important;gap:10px;overflow-x:auto;padding:6px 2px;scrollbar-width:thin}
#cv-reel .gallery .card{flex:0 0 auto;width:150px!important;max-width:150px}
#cv-reel .empty{padding:12px}
#cv-reel .dd-showcase{grid-template-columns:repeat(4,minmax(150px,1fr))}
#cv-reel .dd-showcase-card{aspect-ratio:16/9}

/* Dock: the control desk */
#cv-dock{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start;border:1px solid rgba(209,48,73,.25);border-radius:10px;padding:12px;background:rgba(13,18,12,.7)}
#cv-dock .prompt-drop-zone{grid-column:1;grid-row:1}
#cv-dock #create-generate-bar{grid-column:2;grid-row:1;display:flex;align-items:stretch}
#cv-dock .genrow{display:flex;gap:8px;align-items:stretch}
#cv-dock #prompt{min-height:64px}

.cv-advanced-btn{justify-self:center;font-size:10px;letter-spacing:.18em;padding:8px 22px;opacity:.75}
.cv-advanced-btn:hover{opacity:1}
.cv-drawer{border:1px solid rgba(209,48,73,.2);border-radius:10px;padding:10px}
.cv-drawer .create-controls-col{max-width:none}

@media(max-width:900px){
  body.dd-canvas #cv-root{grid-template-rows:auto minmax(240px,44vh) auto auto auto;padding:8px 8px 20px}
  #cv-dock{grid-template-columns:1fr}
  #cv-dock #create-generate-bar{grid-column:1;grid-row:2}
}

/* Canvas mode refinements: compact rails, full-height desk, stage empty statement */
body.dd-canvas #cv-root{grid-template-rows:auto minmax(0,1fr) auto auto auto;height:calc(100dvh - 76px);padding:8px 18px 12px;gap:10px}
#cv-rails .opt-picker-hero-wrap,#cv-rails .opt-picker-hero,#cv-rails .opt-picker-meta,#cv-rails .opt-picker-desc,#cv-rails .opt-picker-counter{display:none!important}
#cv-rails .opt-picker-strip{display:flex!important;grid-template-columns:none!important;gap:8px;overflow-x:auto;overflow-y:hidden;padding:4px 2px;max-height:118px;scrollbar-width:thin}
#cv-rails .opt-picker-strip>*{flex:0 0 132px}
#cv-rails .opt-picker-tabs{display:flex;gap:6px;flex-wrap:wrap}
#cv-rails .opt-picker-tabs button{font-size:10px;letter-spacing:.14em;padding:5px 14px}
#cv-rails #create-look-pickers{display:grid;gap:6px;margin:0}
#cv-rails .hint{display:none}
.cv-screen:not(.tuning):not(:has(.cv-media))::before{content:"LOAD A NIGHTMARE";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:clamp(18px,3vw,34px);letter-spacing:.4em;opacity:.25;z-index:2}
.cv-screen.tuning::before{content:"RECEIVING TRANSMISSION";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:clamp(14px,2vw,22px);letter-spacing:.35em;color:var(--acid);opacity:.7;z-index:4;animation:cv-static-jump 1.2s steps(3) infinite}
#cv-reel .panel-gallery{max-height:190px;overflow:hidden}

/* Canvas: force rails visible, compact reel to pure filmstrip */
body.dd-canvas #cv-rails #create-look-pickers{display:grid!important}
body.dd-canvas #cv-rails [hidden]{display:none}
#cv-reel .gal-head .gal-size,#cv-reel .gal-head .gal-select-toggle,#cv-reel .gal-search-row,#cv-reel .gal-sort,#cv-reel input[type="search"],#cv-reel #gal-search{display:none!important}
#cv-reel .panel-gallery{max-height:230px;display:flex;flex-direction:column}
#cv-reel #create-gallery-slot{flex:1;min-height:0;overflow:hidden}
body.dd-canvas #cv-root{grid-template-rows:auto minmax(300px,1fr) auto auto auto auto;height:calc(100vh - 76px)}

/* Canvas polish: tab sizing, scrollbars, centering, tighter strips */
#cv-rails .opt-picker-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
#cv-rails .opt-picker-tabs button{flex:0 0 auto;min-width:110px;max-width:180px}
#cv-rails .opt-picker-strip{max-height:104px}
#cv-rails .opt-picker-strip>*{flex:0 0 118px}
#cv-rails .opt-picker-strip::-webkit-scrollbar,#cv-reel .gallery::-webkit-scrollbar{height:6px}
#cv-rails .opt-picker-strip::-webkit-scrollbar-thumb,#cv-reel .gallery::-webkit-scrollbar-thumb{background:rgba(209,48,73,.35);border-radius:3px}
#cv-rails .opt-picker-strip::-webkit-scrollbar-track,#cv-reel .gallery::-webkit-scrollbar-track{background:rgba(255,255,255,.04)}
.cv-screen:not(.tuning):not(:has(.cv-media))::before{text-indent:.4em;text-align:center}
#cv-reel .gal-head{padding:4px 8px}
#cv-reel .gal-head~*:not(#create-gallery-slot){display:none}

/* Mobile nav: one swipeable row instead of a stacked pill blob */
@media(max-width:640px){
  .dd-nav{display:flex!important;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:6px;padding:4px 2px}
  .dd-nav::-webkit-scrollbar{display:none}
  .dd-nav>*{flex:0 0 auto}
}

/* Member/Friend badge + Go Member CTA in header */
.dd-plan-tag{margin-left:8px;font-size:9px;letter-spacing:.14em;padding:2px 7px;border-radius:3px;background:rgba(209,48,73,.16);color:var(--acid);border:1px solid rgba(209,48,73,.4)}
.dd-go-member{margin-left:8px;font-size:10px;letter-spacing:.06em;padding:4px 12px;border-radius:4px;background:var(--acid);color:#0a0a0a;font-weight:700;border:none;cursor:pointer;box-shadow:0 0 12px rgba(209,48,73,.4)}
.dd-go-member:hover{box-shadow:0 0 20px rgba(209,48,73,.7)}

/* ===== Readability lift (2026-07): bump the text people actually read =====
   Monospace + letter-spacing reads small; nudge functional text up ~2px. */
label{font-size:11.5px!important;letter-spacing:.14em}
.hint,.create-section-hint,.create-mode-hint{font-size:12px!important;line-height:1.55;opacity:.95}
.opt-picker-desc{font-size:11.5px!important;line-height:1.5}
.opt-picker-title{font-size:13px!important}
.opt-picker-heading{font-size:11px!important}
.btn,.clear,button.clear,.gore-stack-chip{font-size:12px!important}
#prompt,#create-vprompt,textarea.create-resize-ta,.prompt-drop-zone textarea{font-size:14px!important;line-height:1.5}
select,input[type="text"],input[type="email"],input[type="password"],input[type="number"]{font-size:13px!important}
.dd-nav>*{font-size:12px!important}
.gal-tab,.gal-tab .cnt{font-size:12px!important}
.gate-hint{font-size:13px!important}
.gate-tag{font-size:12.5px!important}
.gate-form label{font-size:12px!important}
.gate-form input{font-size:14px!important}
#gate-submit,.gate-mode-btn{font-size:13px!important}
.model-row .hint,#modelinfo{font-size:11.5px!important}
@media(max-width:640px){
  .hint,.create-section-hint{font-size:12.5px!important}
  label{font-size:12px!important}
}

/* === Home: fill the viewport — no dead band under the cards (2026-07-13).
   Desktop only; mobile keeps its natural scrolling layout. Rows stretch to
   share the leftover height, so the card thumbnails simply show more image. */
@media(min-width:1101px){
  #page-home .home-wrap{
    min-height:calc(100vh - 68px);
    display:flex;
    flex-direction:column;
  }
  #page-home .home-grid{
    flex:1;
    grid-auto-rows:minmax(200px,1fr);
  }
}

/* ── READY pill retired 2026-07-14 ─────────────────────────────────────────────
   Jared: "if you can log into the site, it's ready." HIDDEN, not deleted —
   dd-app.js writes st.textContent/st.className UNGUARDED in connect() (~7337 and
   ~7357), so removing #status from the markup makes $("status") return null,
   connect() throws, its catch throws again on the same null, and
   $("go").disabled=false never runs — Generate would stay dead forever. Hiding
   lets every write land harmlessly on a hidden node.
   MUST live at the end of the file: `.app-status .status` is also set at line
   ~686 with display:inline-block at the SAME specificity (0,2,0), so an earlier
   copy of this rule loses on source order. Position is doing the work here, not
   !important. Scoped to .app-status so the Settings status grid
   (.status-row/.status-dot) is untouched.
   Trade-off: also hides the click-to-reconnect target (dd-app.js ~18163);
   ComfyUI-offline still shows via #modelinfo + a disabled Generate button.
   Revert = delete this block. */
.app-status .status{display:none}

/* Local-only controls dimmed while a deliberate CLOUD engine is picked (2026-07-17):
   cloud APIs take prompt text only — no LoRA socket — so Gore intensity / Second
   pass / Character can't apply. Toggled by syncCloudOnlyDim() in dd-app.js.
   Revert = delete this block + the syncCloudOnlyDim calls. */
.cloud-na{opacity:.45;pointer-events:none}

/* === HOME DIRECTION A (poster wall) — approved 2026-07-23. Images lifted, overlay only in the
   caption zone, bone titles + red tick, descriptors back. Additive override block scoped to
   #page-home; revert = delete this block + the <p> descriptor lines in digital-decay.html. === */
#page-home .home-card-img{filter:saturate(1.05) contrast(1.02) brightness(1.05)}
#page-home .home-card:hover .home-card-img{filter:saturate(1.1) contrast(1.02) brightness(1.14);transform:scale(1.06)}
#page-home .home-card::after{background:linear-gradient(180deg,rgba(6,8,6,0) 0%,rgba(6,8,6,0) 46%,rgba(6,8,6,.38) 68%,rgba(6,8,6,.9) 100%)}
#page-home .home-card-body h3{color:#eae4d8;text-shadow:0 1px 3px rgba(0,0,0,.9)}
#page-home .home-card-body h3::before{content:"";display:inline-block;width:3px;height:.78em;background:var(--acid);margin-right:10px}
#page-home .home-card:hover .home-card-body h3{color:#fff}
#page-home .home-card-body p{display:block;margin:2px 0 0 13px;font-size:12px;letter-spacing:.02em;color:#b7aaae;text-shadow:0 1px 4px rgba(0,0,0,.9)}
#page-home .home-splash-img{filter:brightness(1.05) saturate(1.05)}
#page-home .home-splash::after{background:linear-gradient(180deg,rgba(6,8,6,0) 0%,rgba(6,8,6,0) 44%,rgba(6,8,6,.4) 68%,rgba(6,8,6,.9) 100%)}
#page-home .home-splash-body h3{color:#eae4d8;text-shadow:0 1px 3px rgba(0,0,0,.9)}
#page-home .home-splash-body h3::before{content:"";display:inline-block;width:3px;height:.78em;background:var(--acid);margin-right:9px}
#page-home .home-splash-body p{margin:1px 0 0 12px;font-size:11.5px;color:#b7aaae;text-shadow:0 1px 4px rgba(0,0,0,.9)}
#page-home .home-mini-img{opacity:1;filter:brightness(1.05) saturate(1.05)}
#page-home .home-mini::after{background:linear-gradient(180deg,transparent 42%,rgba(6,8,6,.86) 100%)}
#page-home .home-mini>span:last-child{color:#eae4d8;text-shadow:0 1px 3px rgba(0,0,0,.9)}
#page-home .home-mini>span:last-child::before{content:"";display:inline-block;width:3px;height:.72em;background:var(--acid);margin-right:8px}

/* === MOBILE PAGE TITLES — More-page kicker style, approved 2026-07-23 (Jared: Create and
   Assistant pages had no title on phone; unify every mobile page title with the More page
   look). Mobile-only via body.dd-mobile — PC pages unchanged. html prefix beats
   dd-mobile.css !important rules by specificity. Revert = delete this block. === */
html body.dd-mobile .page-head h2{
  font-family:inherit !important;
  font-size:11px !important;
  font-weight:600 !important;
  letter-spacing:.12em !important;
  text-transform:uppercase !important;
  color:var(--acid) !important;
  margin:0 0 4px !important;
}
html body.dd-mobile #page-supercomputer .page-head{display:block !important;padding:0 0 2px !important;order:-1}
html body.dd-mobile #page-supercomputer .page-head p{display:none !important}
html body.dd-mobile #page-generate .create-shell::before{
  content:"Create";display:block;font-size:11px;font-weight:600;letter-spacing:.12em;
  text-transform:uppercase;color:var(--acid);margin:2px 0 6px;
}

/* ============================================================================
   PC VIEWPORT LOCK — Jared 2026-07-25
   "Every page contained on one screen; the red scrollbar only for images, chat,
   gallery, videos and audio." Desktop only: gated at min-width:933px so it can
   never reach dd-mobile.css's territory (which tops out at 932px).
   Revert = delete this whole block.
   ========================================================================== */
@media (min-width:933px){

  /* --- Compact page headers ---------------------------------------------
     The big display title + subtitle + divider cost ~90px of every page's
     vertical budget. Same information, ~45px. */
  .dd-page .page-shell>.page-head{
    margin:0 0 10px;
    padding:0 0 8px;
  }
  .dd-page .page-shell>.page-head h2{font-size:clamp(20px,2.05vw,28px);line-height:1}
  .dd-page .page-shell>.page-head p{margin:3px 0 0;font-size:11.5px;line-height:1.4;max-width:70em}

  /* --- SETTINGS: two-column card layout, whole page on one screen --------- */
  #page-settings.dd-page.active{overflow:hidden}
  #page-settings .page-shell{
    max-width:1180px;
    height:100%;
    min-height:0;
    padding:12px 16px 10px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  /* `.wrap{display:grid}` was beating the global [hidden] rule, so the logged-out
     account bar still ate 169px of the page. */
  #page-settings [hidden]{display:none !important}
  /* Account + Plan bars sat stacked (123px). One row on PC. */
  #page-settings #settings-account-bar{display:flex !important;gap:10px;align-items:stretch}
  #page-settings #settings-account-bar>.panel{flex:1 1 0;min-width:0;padding:9px 14px !important}
  #page-settings #settings-plan-bar{margin-top:0 !important}
  #page-settings .page-head{margin:0 0 10px;padding:0 0 8px}
  #page-settings .page-head h2{font-size:clamp(22px,2.1vw,30px)}
  #page-settings .page-head p{margin:4px 0 0;font-size:11.5px}
  #page-settings .wrap.single{margin:0 0 10px !important;flex:0 0 auto}
  #page-settings .wrap.single:last-child{
    flex:1 1 auto;min-height:0;margin-bottom:0 !important;display:flex;
  }
  /* CSS columns rather than grid: hidden owner-only cards collapse cleanly and
     the two columns re-balance themselves when a <details> opens. */
  #page-settings .panel.settings-grid{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    columns:2;
    column-gap:20px;
    padding:16px 18px !important;
    scrollbar-width:thin;
    scrollbar-color:rgba(209,48,73,.45) transparent;
  }
  #page-settings .settings-card{
    break-inside:avoid;
    -webkit-column-break-inside:avoid;
    display:inline-block;
    width:100%;
    margin:0 0 9px;
  }
  #page-settings .settings-card:last-child{margin-bottom:0}
  #page-settings .settings-section:not(:first-child){margin-top:0;padding-top:0;border-top:0}
  #page-settings .settings-card .settings-section{margin:0 0 6px}
  #page-settings .settings-card .hint{line-height:1.5;font-size:11px}
  #page-settings .settings-card label{margin-top:8px}
  #page-settings .owner-pony-list{max-height:min(200px,26vh)}

  /* --- ASSISTANT: chat column fills the screen instead of overrunning it ---
     .sc-chat-log had min-height:360px + max-height:62vh, so on a laptop the
     panel was taller than the page and the whole page scrolled. Let the log be
     the flexible element like every other page's main pane. */
  #page-supercomputer.dd-page.active{overflow:hidden}
  #page-supercomputer .page-shell{height:100%;min-height:0;overflow:hidden;padding-bottom:12px}
  #page-supercomputer .wrap.sc-layout{flex:1 1 auto;min-height:0;align-items:stretch}
  #page-supercomputer .sc-chat-panel{height:100%;min-height:0;overflow:hidden}
  #page-supercomputer .sc-chat-log{
    flex:1 1 auto;
    min-height:0 !important;
    max-height:none !important;
  }
  #page-supercomputer .sc-side{max-height:100%;overflow-y:auto;scrollbar-width:thin}

  /* --- IMAGES: "Selected image" box locked to the screen ----------------- */
  /* Fixed chrome + one flexible element (the preview) that absorbs whatever
     height is left, so the box fits exactly at any window height. */
  .image-page-split{grid-template-columns:minmax(300px,368px) minmax(0,1fr)}
  .image-page-tools{overflow:hidden}
  .image-page-tools>.panel{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding:14px 16px;
    box-sizing:border-box;
  }
  .image-page-tools>.panel>*{flex:0 0 auto}
  .image-page-tools #img-edit-upload{margin-bottom:8px !important;padding:8px !important}
  .image-page-tools .img-edit-preview{
    flex:1 1 auto;
    min-height:84px;
    margin-top:6px;
  }
  .image-page-tools .img-edit-preview img{max-height:100%}
  .image-page-tools .settings-section{margin:10px 0 2px !important}
  .image-page-tools label{margin-top:6px}
  .image-page-tools #i2i-prompt{min-height:42px !important;height:42px}
  .image-page-tools #img-edit-engine-hint{max-height:2.9em;overflow:hidden}
  .image-page-tools #img-page-tools-hint{max-height:1.5em;overflow:hidden}
  .image-page-tools .hint{font-size:10.5px;line-height:1.4;margin-top:4px !important}
  .image-page-tools #img-edit-quality-row{margin-top:6px !important}
  .image-page-tools #i2i-go{margin-top:8px !important;padding:10px}
  /* Enhance + Open in Studio were two full-width stacked buttons. */
  .image-page-tools .img-tools-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}
  .image-page-tools .img-tools-row>button{width:100% !important;margin-top:0 !important;padding:8px 6px !important}
  .image-page-tools #img-page-tools-hint{margin-top:6px !important}

  /* --- AUDIO: left column fits, no red scrollbar ------------------------- */
  /* The column is 390-500px wide but stacked everything in one narrow run.
     Two columns for the secondary controls; the script/prompt and the action
     row stay full width. `html body.create-ui-unified` to beat the existing
     audio restyle block's specificity. */
  html body.create-ui-unified #page-audio .audio-controls-col{overflow:hidden}
  html body.create-ui-unified #page-audio .audio-studio-stack{
    display:flex;flex-direction:column;min-height:0;height:100%;gap:8px;
  }
  html body.create-ui-unified #page-audio .audio-subtabs{flex:0 0 auto}
  html body.create-ui-unified #page-audio .audio-studio-card{
    flex:1 1 auto;
    min-height:0;
    display:grid;
    grid-template-columns:1fr 1fr;
    align-content:start;
    gap:5px 10px;
    padding:9px 12px 10px;
    box-sizing:border-box;
    overflow:hidden;
  }
  /* Everything is full width by default — narrow cells make the chip banks and
     the voice list wrap TALLER, which is the opposite of the point. Only the
     two collapsed disclosures below get paired. */
  html body.create-ui-unified #page-audio .audio-studio-card>*{grid-column:1 / -1;min-width:0}
  html body.create-ui-unified #page-audio .audio-studio-card>#voice-design-panel,
  html body.create-ui-unified #page-audio .audio-studio-card>#voice-settings-details{
    grid-column:auto;
  }
  html body.create-ui-unified #page-audio .audio-prompt-ta{min-height:54px;resize:vertical}
  html body.create-ui-unified #page-audio .audio-gen-btn{min-height:36px}
  /* Long tip line ran 3 lines; full text stays available as the tooltip. */
  html body.create-ui-unified #page-audio .audio-card-desc{
    font-size:10.5px;line-height:1.35;margin:0;
    max-height:1.4em;overflow:hidden;
  }
  /* Sub-hints inside the voice picker were a 3-line paragraph each. */
  html body.create-ui-unified #page-audio #voice-eleven-wrap .hint{
    max-height:1.4em;overflow:hidden;
  }
  html body.create-ui-unified #page-audio #voice-preview-text,
  html body.create-ui-unified #page-audio #music-final-prompt{
    max-height:1.4em;overflow:hidden;
  }
  /* Audio page shell was 6px taller than the viewport. */
  html body.create-ui-unified #page-audio.dd-page.active{overflow:hidden}
  html body.create-ui-unified #page-audio .page-shell{
    height:100%;min-height:0;display:flex;flex-direction:column;
    overflow:hidden;padding-bottom:10px;
  }
  html body.create-ui-unified #page-audio .audio-split{flex:1 1 auto;min-height:0;padding-bottom:0}
  /* Belt-and-braces against stills/clips flashing into the audio results while
     the JS filter is still catching up. Needs the extra .card class to outrank
     the audio list's own `display:flex!important`. */
  html body.create-ui-unified #page-audio #audio-gallery-host .card.card[data-type="image"],
  html body.create-ui-unified #page-audio #audio-gallery-host .card.card[data-type="video"]{display:none !important}

  /* --- VIDEO: whole control column on one screen ------------------------- */
  #page-video .video-controls-col{overflow:hidden}
  /* Narrower than the 480 first pass — the gallery wants the room and the
     controls don't need it once the prompt stops ballooning. */
  #page-video .video-split{grid-template-columns:minmax(370px,420px) minmax(0,1fr)}
  #page-video .video-controls-col>.panel{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:11px 13px;
    box-sizing:border-box;
    /* Fits with Shot settings collapsed (the default). Expanding it is a
       deliberate act, so scroll rather than clip the controls away. */
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
    scrollbar-color:rgba(209,48,73,.45) transparent;
  }
  /* The prompt used to absorb ALL leftover height (283px on a tall window),
     which shoved the engine picker, shot settings and reference trays down past
     the fold — "I can't even go down to the other options". Fixed, modest box;
     the slack now stays at the bottom of the panel where it belongs. */
  #page-video .video-controls-col>.panel>#vprompt{
    flex:0 0 auto;
    height:76px !important;
    min-height:76px !important;
    max-height:76px;
    resize:vertical;
  }
  #page-video .video-controls-col>.panel{justify-content:flex-start}
  #page-video .video-controls-col>.panel>*{flex:0 0 auto;margin-top:0}
  /* Order: frames -> prompt -> Generate -> reference -> everything else.
     dd-mobile.js already hoists the frame pair/prompt/Generate on PC; this only
     pulls the reference tray up so it sits with them instead of further down. */
  #page-video .video-controls-col>.panel>*{order:5}
  #page-video .video-controls-col>.panel>.m-frame-pair{order:1}
  #page-video .video-controls-col>.panel>label[for="vprompt"]{order:2}
  #page-video .video-controls-col>.panel>#vprompt{order:3}
  #page-video .video-controls-col>.panel>#vimageclip{order:4}
  /* All the reference inputs group with the frames under Generate — the audio
     and motion-video trays used to fall to the very bottom, under Shot
     settings, so "reference video" was the hardest thing on the page to find. */
  #page-video .video-controls-col>.panel>#vref-wrap,
  #page-video .video-controls-col>.panel>#vaudio-wrap,
  #page-video .video-controls-col>.panel>#vmotionvid-wrap{order:4}
  /* Long explanatory hints were 3-5 lines each; clamp them, keep full text on hover. */
  #page-video #videohint,
  #page-video #video-safety-note,
  #page-video #video-premium-note{
    max-height:2.9em;overflow:hidden;font-size:10.5px;line-height:1.4;margin:0;
  }
  #page-video #vdurationhint{max-height:1.5em;overflow:hidden}
  #page-video #video-premium-note,
  #page-video #video-safety-note{max-height:1.5em}
  #page-video #videohint{max-height:1.5em}
  #page-video .video-controls-col label[for="vcam"]{
    max-height:1.5em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  }
  /* Length / Resolution / Aspect / Motion was a 3-wide grid holding 4 cells, so
     it wrapped to two rows. Four across, one row. */
  #page-video .video-shot-settings>.row{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:6px !important}
  #page-video .video-shot-settings>.row label{font-size:9.5px}
  #page-video .vmode-bar{gap:4px;padding:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  #page-video .vmode-bar::-webkit-scrollbar{display:none}
  #page-video .vmode-bar button{padding:5px 7px;font-size:9px;white-space:nowrap;flex:0 0 auto}
  /* "Also using:" attachment chips sit with Generate, not adrift at the bottom
     of the ordered control stack — this bar is the thing that makes a stale end
     frame / reference visible before it silently lands in a render. */
  #page-video .video-controls-col>.panel>#vattach-bar{order:4}
  #page-video #vattach-bar{margin:6px 0 0 !important}

  /* --- VIDEO (PC): fit the control stack, smaller controls ----------------
     Jared 2026-07-25: "make the buttons a little smaller... easier to deal
     with". Measured before this block at 1440x900: the controls pane held 734px
     of content in 668px, so the last ~68px (Generate button included) sat below
     an internal scroll. Trimming the oversized rows brings it inside the pane.
     Nothing is hidden — only tightened. */
  #page-video .video-controls-col select,
  #page-video .video-controls-col input[type="text"]{
    min-height:30px;height:auto;padding:4px 8px;font-size:11px;
  }
  #page-video #video-shot-settings{padding:7px 9px}
  #page-video #video-shot-settings>summary{font-size:10px;margin-bottom:4px}
  #page-video #video-shot-settings>.row{gap:5px !important}
  #page-video #video-shot-settings>.row label{font-size:9px;gap:2px}
  #page-video #video-shot-settings>label{font-size:9.5px;margin:6px 0 2px}
  #page-video #vcam{min-height:30px}
  #page-video #create-stack-toggle{margin:5px 0 0;font-size:10px}
  #page-video #vprompt{min-height:58px}
  /* The recent-images strips under Start/End frame are a convenience, not the
     primary input — cap them so they can't push Generate off the pane. */
  #page-video .endframe-pick{max-height:46px;overflow-y:auto;scrollbar-width:thin}
  #page-video #vimageclip{min-height:32px;padding:7px 12px;font-size:11.5px}
  #page-video .video-controls-col>.panel>*{margin-top:6px}

  /* --- GALLERY: page locked to the screen, only the grid scrolls -----------
     Jared 2026-07-25: "I also want the gallery page to be locked to the page as
     well. Not have to scroll all the way down." The page-head + tab row are
     fixed chrome; the thumbnail grid is the one flexible element that absorbs
     the remaining height and owns the red scrollbar. Same shape as the Settings
     and Assistant locks above. */
  #page-gallery.dd-page.active{overflow:hidden}
  #page-gallery .page-shell{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    padding-bottom:12px;
  }
  #page-gallery .wrap.single{
    flex:1 1 auto;
    min-height:0;
    margin-bottom:0 !important;
    display:flex;
  }
  #page-gallery .panel-gallery{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #page-gallery .gal-head,
  #page-gallery .gal-browse-bar{flex:0 0 auto}
  /* The grid is the ONLY scroller. #gallery-slot is the host that exists in the
     markup; the .gallery grid is injected into it at runtime (measured 2026-07-25
     — the slot is what actually scrolls), so style both or the red scrollbar
     lands on an element that isn't the scroller. */
  #page-gallery #gallery-slot,
  #page-gallery .gallery{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    align-content:start;
    scrollbar-width:thin;
    scrollbar-color:rgba(209,48,73,.45) transparent;
  }
  #page-gallery #gallery-slot::-webkit-scrollbar,
  #page-gallery .gallery::-webkit-scrollbar{width:9px}
  #page-gallery #gallery-slot::-webkit-scrollbar-thumb,
  #page-gallery .gallery::-webkit-scrollbar-thumb{
    background:rgba(209,48,73,.45);border-radius:6px;
  }
  #page-gallery #gallery-slot::-webkit-scrollbar-track,
  #page-gallery .gallery::-webkit-scrollbar-track{background:transparent}
  /* Start / End / Reference drop boxes: one tight row instead of tall stacked
     panels. Header collapses to a single line, frame boxes are shorter. */
  #page-video .m-frame-pair{gap:8px}
  #page-video .m-frame-pair .startend-panel{margin:0;padding:7px 8px}
  #page-video .startend-header{margin:0 0 4px;display:flex;align-items:baseline;gap:6px}
  #page-video .startend-header h4{margin:0;font-size:10px}
  #page-video .startend-header .hint{
    max-height:1.3em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
    font-size:9px;min-width:0;
  }
  #page-video .startend-frames{min-height:0}
  #page-video .startend-frame{height:72px;min-height:0;max-height:72px}
  /* Reference trays (image refs, motion-reference video, S2V audio) sit right
     under Generate with the frames — make them read as one compact group
     instead of three loose stacked panels. */
  #page-video #vref-wrap .startend-panel{padding:7px 8px}
  #page-video #vref-wrap .startend-frame{height:60px;max-height:60px}
  #page-video #vref-wrap .ref-frames{display:flex;flex-wrap:wrap;gap:6px}
  #page-video #vaudio-wrap,
  #page-video #vmotionvid-wrap{
    border:1px solid var(--border-2);border-radius:8px;
    padding:7px 9px;background:rgba(255,255,255,.02);
  }
  #page-video #vaudio-wrap label,
  #page-video #vmotionvid-wrap label{font-size:9.5px;margin:0 0 4px}
  #page-video .studio-upload{padding:8px 10px;font-size:10px;min-height:0}
  #page-video #vaudio-hint,
  #page-video #motion-camera-hint{max-height:2.9em;overflow:hidden;font-size:10px}
  #page-video .camera-recorder{margin-top:6px}
  /* <video> defaults to a 300x150 intrinsic box even with no stream. */
  #page-video .camera-recorder video{height:96px !important;max-height:96px;width:100%;object-fit:cover}
  #page-video .camera-actions{gap:5px}
  #page-video .camera-actions button{padding:5px 7px;font-size:9px}
  #page-video #vmotionvid-wrap select{font-size:11px;padding:5px 6px}

  /* Start-frame recent-images strip (#vsource-pick), mirrors the end-frame one. */
  #page-video .startend-panel .endframe-pick{
    max-height:44px;gap:4px;margin-top:5px;
  }
  #page-video .startend-panel .endframe-pick img{width:34px;height:34px}
  #page-video .startend-panel .endframe-pick:empty{display:none}
  #page-video #vimageclip{margin-top:0 !important;padding:10px}

  /* --- CREATE: de-bunch the image + cinema options ----------------------- */
  /* More width (the results gallery still gets ~800px), so the option rows
     stop being a narrow crammed stack. */
  /* Jared 2026-07-26: "go back to the side panel, just give more space to the
     gallery." Same two-column page, narrower control rail - the gallery gains
     ~120px. Revert = restore minmax(420px,520px). */
  #page-generate .create-split{grid-template-columns:minmax(376px,400px) minmax(0,1fr)}
  /* `html body.create-ui-unified` — the unified-UI block sets overflow:visible /
     flex:0 0 auto on these and outranks a plain #page-generate selector. */
  html body.create-ui-unified #page-generate .create-panel-split{
    flex:1 1 auto;min-height:0;overflow:hidden;
    display:flex;flex-direction:column;
  }
  html body.create-ui-unified #page-generate .generate-dock{flex:0 0 auto;min-height:0}
  /* Options are the flexible area: the column itself never scrolls, the option
     list does, and only when a section is expanded past the space available. */
  html body.create-ui-unified #page-generate .create-controls-col{overflow:hidden}
  html body.create-ui-unified #page-generate .create-options-scroll{
    flex:1 1 auto;min-height:0;
    overflow-y:auto;overflow-x:hidden;
    scrollbar-width:thin;scrollbar-color:rgba(209,48,73,.45) transparent;
    padding-right:4px;
  }
  #page-generate .create-options-stack{flex:1 1 auto;min-height:0}

  /* Sections were rendering 01 -> 07 -> 02 -> 03. Put them in their numbered
     order so the panel reads the way it's labelled. */
  #page-generate #create-image-options{display:flex;flex-direction:column;gap:3px}
  #page-generate #create-output-section{order:1}
  #page-generate #create-simple-options{order:2}
  #page-generate #create-gore-section{order:3}
  #page-generate #create-look-section{order:4}
  #page-generate #create-character-section{order:5}
  #page-generate #art-style-section{order:6}
  #page-generate #create-neg-section{order:7}
  #page-generate #more-options-section{order:8}

  /* Cinema options: nine label/thumb/select rows stacked in one narrow run was
     the "bunched up" part. Two across, tighter rows. */
  #page-generate #create-simple-dropdowns{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px 10px;
    align-content:start;
  }
  #page-generate .create-dd-row{min-width:0;min-height:0}
  #page-generate .create-dd-row .create-dd-thumb{width:24px;height:24px}
  #page-generate .create-dd-row label{font-size:9.5px;letter-spacing:.06em}
  #page-generate .create-dd-row select{font-size:11px;padding:3px 6px}
  #page-generate .create-simple-preview{margin-bottom:4px !important}

  /* Section chrome: quieter, shorter summaries so four collapsed headers don't
     eat the panel. */
  #page-generate .create-section-card{margin:0 !important}
  #page-generate .create-section-card>summary{
    padding:5px 8px;font-size:10px;letter-spacing:.1em;margin-bottom:0 !important;
  }
  #page-generate .create-section-card[open]>summary{margin-bottom:6px !important}

  /* Hints in the generator row were 3-5 lines each. */
  #page-generate #modelinfo,
  #page-generate #create-render-style-hint,
  #page-generate #gore-look-hint,
  #page-generate #chaos-hint{
    max-height:2.9em;overflow:hidden;font-size:10.5px;line-height:1.4;
  }
  #page-generate .create-model-row{margin-top:6px}
  #page-generate .create-render-style-row{margin-top:6px !important}
  #page-generate .create-mode-bar{padding:2px 0}
  #page-generate .create-mode-hint{font-size:10.5px}
  /* rows="3" gave the prompt a 73px intrinsic height regardless of min-height. */
  #page-generate #prompt{height:52px;min-height:44px}
  #page-generate #go{margin-top:6px !important;padding:9px 14px}
  /* Generator + Render style side by side instead of two stacked label/select
     pairs with a paragraph under each. */
  #page-generate .create-model-row{
    display:grid;grid-template-columns:1fr 1fr;gap:2px 10px;align-items:start;
  }
  #page-generate .create-model-row>label[for="model"]{grid-column:1;grid-row:1}
  #page-generate .create-model-row>#model{grid-column:1;grid-row:2}
  #page-generate .create-model-row>#modelinfo{grid-column:1;grid-row:3;max-height:2.9em;overflow:hidden}
  #page-generate .create-render-style-row{
    grid-column:2;grid-row:1 / span 3;margin-top:0 !important;min-width:0;
  }
  #page-generate #create-imgref-wrap{grid-column:1 / -1}
  #page-generate .create-model-row>select{min-width:0}
  #page-generate #create-refiner>summary{padding:5px 8px;font-size:10px}
  #page-generate .create-stack-toggle{font-size:10.5px}
  /* Render-style hint was a 3-line paragraph under a select. */
  #page-generate #create-render-style-hint{max-height:1.5em}
  /* Nine dropdown rows: shorter so two columns of five clear the panel. */
  #page-generate .create-dd-row{min-height:0}
  #page-generate .create-simple-preview{max-height:26px;overflow:hidden}
  /* 01 Output hides its own summary (it used to be permanently expanded). Now
     that only one section is open at a time it needs a visible, clickable
     header like the rest, or collapsing it strands the aspect/size controls. */
  #page-generate #create-output-section>summary{display:block}
  /* Uniform summary height — they were rendering 14 / 36 / 37px. */
  #page-generate .create-section-card>summary{min-height:0;line-height:1.4}
  #page-generate #create-neg-section>summary,
  #page-generate #create-gore-section>summary{padding:5px 8px !important;margin:0 !important}

  /* --- GALLERY CARDS: uniform video box, compact audio ------------------- */
  /* Every clip sits in the same 9:16 box whatever it was generated at, so the
     grid stops going ragged. object-fit:contain already letterboxes rather than
     cropping, so a 16:9 clip is still shown whole. */
  .card.video-card{aspect-ratio:9/16 !important}
  .card.video-card video{object-fit:contain;background:#0a0c0a}

  /* Audio cards were 132px tall with a 46px waveform — far more room than an
     audio clip needs next to the stills. */
  .card.audio-card{min-height:0}
  .card.audio-card audio{min-height:0;padding:8px 10px}
  .card.audio-card .badge{padding:5px 9px}
  .card.audio-card .card-meta{padding:6px 9px 8px}
  .card.audio-card .dd-audio-player .dap-wave{height:22px}
  .card.audio-card .dd-audio-player .dap-head{margin-bottom:4px}
  .card.audio-card .dd-audio-player .dap-row{margin-top:4px;gap:8px}
  .card.audio-card .dd-audio-player .dap-play{width:30px;height:30px}
  .card.audio-card .dd-audio-player .dap-stop{width:26px;height:26px}
  /* The standalone players (Audio page, lightbox) come down too, just less. */
  .dd-audio-player .dap-wave{height:32px}

  /* Collapsible shot settings (desktop only — see #video-shot-settings in JS) */
  #page-video .video-shot-settings{
    border:1px solid var(--border-2);border-radius:8px;
    padding:6px 9px;background:rgba(255,255,255,.02);
  }
  #page-video .video-shot-settings>summary{
    cursor:pointer;font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;
    text-transform:uppercase;color:var(--acid-dim);list-style:none;
  }
  #page-video .video-shot-settings>summary::-webkit-details-marker{display:none}
  #page-video .video-shot-settings>summary::after{content:" ▸";color:var(--muted)}
  #page-video .video-shot-settings[open]>summary::after{content:" ▾"}
  #page-video .video-shot-settings[open]{padding-bottom:9px}
  #page-video .motion-camera-details>summary{
    cursor:pointer;font-family:var(--mono);font-size:9px;letter-spacing:.08em;
    text-transform:uppercase;color:var(--acid-dim);list-style:none;padding:4px 0;
  }
  #page-video .motion-camera-details>summary::-webkit-details-marker{display:none}
  #page-video .motion-camera-details>summary::after{content:" ▸";color:var(--muted)}
  #page-video .motion-camera-details[open]>summary::after{content:" ▾"}

  /* These five had been orphaned outside the media query by an earlier edit,
     which leaked them onto phones. Back inside the PC-only block. */
  html body.create-ui-unified #page-audio .audio-studio-card .hint{font-size:10.5px;line-height:1.35}
  html body.create-ui-unified #page-audio .audio-studio-card label{margin:0}
  html body.create-ui-unified #page-audio .audio-studio-card .audio-status:empty{display:none}
  html body.create-ui-unified #page-audio .audio-studio-card summary{padding:4px 8px;font-size:10.5px}
  html body.create-ui-unified #page-audio .audio-studio-card .endframe-row button{padding:6px;font-size:9px}

}

/* The Shot settings group ships `open` so phones keep the flat layout they had
   before it existed — hide only its summary row there. */
@media (max-width:932px){
  #page-video .video-shot-settings>summary,
  #page-video .motion-camera-details>summary{display:none}
  #page-video .video-shot-settings{border:0;padding:0;background:none}
  /* The start-frame recent-images strip is a PC ask (2026-07-25) — keep phones
     exactly as they were. Delete this line to turn it on for mobile too. */
  #page-video #vsource-pick{display:none}
}

/* ---- Cult in the main nav, red (Jared 2026-07-26) ---------------------------
   One deletable block. Cult is a destination, not a sixth utility, so it reads
   in the acid red the account row already used for it. */
.dd-nav a.dd-nav-cult{color:var(--acid);font-weight:600}
.dd-nav a.dd-nav-cult:hover,
.dd-nav a.dd-nav-cult:focus-visible{color:#f0546b}
/* ---- end Cult nav block ---------------------------------------------------- */

/* ==== CREATE ELEMENTS PANEL ===============================================
   Twin of the CREATE ELEMENTS PANEL block at the end of dd-app.js.
   Desktop only. ONE deletable block.                                      */
@media (min-width:933px){
  #page-generate #create-elements-panel{
    margin:10px 0 4px; padding:9px 10px 10px;
    border:1px solid var(--border); border-radius:var(--radius,4px);
    background:rgba(0,0,0,.22);
  }
  #page-generate #create-elements-panel .ce-title{
    margin:0; font-size:11px; font-weight:700; letter-spacing:.18em;
    text-transform:uppercase; color:var(--acid);
  }
  #page-generate #create-elements-panel .ce-sub{
    margin:2px 0 8px; font-size:10.5px; line-height:1.35; color:var(--muted);
  }
  #page-generate #create-elements-body{min-height:0}
  /* the tray labels itself via the panel heading now */
  #page-generate #create-elements-body .create-vupload-label{display:none}
  #page-generate #create-elements-body .hint{display:none}
  #page-generate #create-elements-body .ref-frames{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:6px !important;
  }
  #page-generate #create-elements-body.ce-off{display:none}

  /* The rail is 400px now, and the base 2-across cinema grid overlaps its own
     labels below ~470px. One row per category at this width. */
  #page-generate #create-simple-dropdowns{
    grid-template-columns:minmax(0,1fr) !important;
  }
  #page-generate .create-dd-row{min-width:0}
  #page-generate .create-dd-select{min-width:0;width:100%}
  #page-generate #create-elements-panel .ce-note{
    margin:6px 0 0; font-size:10.5px; line-height:1.4; color:var(--muted);
  }
}
/* ==== end CREATE ELEMENTS PANEL ========================================= */

/* ==== CREATE RAIL =========================================================
   Jared 2026-07-26: "aspect, resolution, and generations front and centre and
   not under an accordion", "Cinema Options easier to get to", "all on one
   screen, no scrolling". Desktop only. ONE deletable block (JS twin at the end
   of dd-app.js). Two-column page is unchanged - this only changes what the
   left rail contains.                                                      */
@media (min-width:933px){
  #page-generate #create-rail-top{display:flex;flex-direction:column;gap:7px}

  /* Output promoted out of its accordion: real section, summary hidden. */
  #page-generate .cr-promoted{
    border:1px solid var(--border-2) !important; border-radius:var(--radius,4px);
    background:rgba(0,0,0,.22); padding:8px 10px !important; margin:0 !important;
  }
  #page-generate .cr-promoted > summary{display:none !important}
  #page-generate .cr-promoted .row{gap:8px}

  /* One tap to the sheet, thumbnail on the face - the mobile pattern. */
  #page-generate .cr-box{
    display:flex; align-items:center; gap:9px; text-align:left; cursor:pointer;
    background:var(--field); border:1px solid var(--border); border-radius:var(--radius,4px);
    padding:7px 10px; min-width:0; color:var(--text); font:inherit;
  }
  #page-generate .cr-box:hover{border-color:var(--border-2);background:#1b1517}
  #page-generate .cr-box:focus-visible{outline:2px solid var(--acid);outline-offset:1px}
  #page-generate .cr-box-hero{background:#1a1214;border-color:var(--border-2)}
  #page-generate .cr-box-hero .cr-k{color:var(--acid)}
  #page-generate .cr-box-thumb{padding:6px 10px}
  #page-generate .cr-img{
    flex:0 0 auto;width:40px;height:40px;border-radius:3px;overflow:hidden;
    background:#0f0c0d;border:1px solid var(--border);
  }
  #page-generate .cr-img > *{width:100%;height:100%;object-fit:cover;display:block}
  #page-generate .cr-txt{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
  #page-generate .cr-k{
    font-size:9px;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);line-height:1.3;
  }
  #page-generate .cr-v{font-size:12px;font-weight:600;line-height:1.25;overflow-wrap:anywhere}
  #page-generate #create-setup-boxes{display:flex;flex-direction:column;gap:6px}
  /* the whole point: with the stack gone the rail fits, so it must not scroll */
  html body.create-railed #page-generate #create-options-scroll{overflow:visible}
}

/* popup */
#page-generate .cr-tucked,
.cr-tucked{display:none !important}
.cr-veil{
  position:fixed;inset:0;z-index:9000;display:none;align-items:center;justify-content:center;
  background:rgba(5,4,4,.72);backdrop-filter:blur(2px);
}
.cr-veil.on{display:flex}
.cr-sheet{
  width:min(880px,92vw);max-height:84vh;background:var(--panel);
  border:1px solid var(--border-2);border-radius:var(--radius,4px);
  display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.8);
}
.cr-head{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:9px 13px;border-bottom:1px solid var(--border)}
.cr-head .cr-title{margin:0;font-size:15px;letter-spacing:.12em;text-transform:uppercase}
.cr-head .cr-sp{flex:1}
.cr-x{
  background:none;border:1px solid var(--border);color:var(--muted);
  width:26px;height:26px;border-radius:var(--radius,4px);cursor:pointer;font:inherit;line-height:1;
}
.cr-x:hover{color:var(--text);border-color:var(--border-2)}
.cr-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:12px 13px}
.cr-body .cr-hosted{border:0;background:none;padding:0;margin:0;max-height:none;display:block !important}
.cr-body .cr-hosted > summary{display:none}
/* The sheet is OUTSIDE #page-generate, so every `#page-generate #x` base rule
   stops matching once a section is moved in. Restate what it needs. */
.cr-body #create-simple-dropdowns{
  display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px 14px !important;
}
.cr-body .create-dd-row{min-width:0}
.cr-body .create-dd-select{min-width:0;width:100%}
.cr-body .create-model-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.cr-foot{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:8px 13px;border-top:1px solid var(--border)}
.cr-foot .cr-hint{flex:1;font-size:11px;color:var(--muted)}
.cr-foot .cr-done{width:auto;flex:0 0 auto;padding:6px 18px;font-size:12px}
/* ==== end CREATE RAIL ==================================================== */


/* ==== Render style retired from public view - Jared 2026-07-26 ===========
   The generator row was a 2-up grid (Generator | Render style): on PC via the
   min-width:933px block, and again inside the Create-bench popup (.cr-body,
   which sits OUTSIDE #page-generate so it needs its own rule). With the render
   style column hidden, both go back to a single column so the generator select
   isn't left sitting in half a row. Delete this block if the picker comes back.
   ====================================================================== */
@media (min-width:933px){
  #page-generate .create-model-row{grid-template-columns:1fr}
}
.cr-body .create-model-row{grid-template-columns:1fr}

/* ==== Cinema tile + inline dropdowns - Jared 2026-07-26 =================
   "Instead of displaying the cinema options as a small thumbnail, do a
   bigger thumbnail and have the drop down menus come from the thumbnail."
   The Cinema box becomes a large preview tile (the Shot option's visual)
   with its label and current picks overlaid, and clicking it expands the
   REAL #create-simple-options in a slot underneath instead of opening the
   sheet. Cinema only - Gore/Look/Negative/Scene keep box + sheet.
   Why the inline panel scrolls itself: the railed rail is deliberately
   overflow:visible (it must not scroll), and at 400px the cinema grid is
   forced to ONE column (2-across overlaps its own labels below ~470px), so
   nine rows would otherwise be clipped by .create-controls-col.
   JS twin lives in the CREATE RAIL block at the end of dd-app.js.
   ===================================================================== */
@media (min-width:933px){
  #page-generate .cr-box-tile{
    position:relative; flex-direction:column; justify-content:flex-end;
    align-items:stretch; gap:0; padding:0; overflow:hidden; min-height:124px;
  }
  #page-generate .cr-box-tile .cr-img{
    position:absolute; inset:0; width:100%; height:100%;
    border:0; border-radius:0; background:#0f0c0d;
  }
  #page-generate .cr-box-tile .cr-txt{
    position:relative; z-index:1; flex-direction:row; align-items:baseline;
    gap:7px; padding:18px 10px 7px;
    background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.86) 62%);
  }
  /* .cr-txt carries flex:1 in the base box rule - left alone it fills the
     whole tile and the caption floats in the middle of the picture. */
  #page-generate .cr-box-tile .cr-txt{flex:0 0 auto}
  #page-generate .cr-box-tile .cr-k{flex:0 0 auto}
  #page-generate .cr-box-tile .cr-v{flex:1 1 auto;min-width:0}
  #page-generate .cr-box.cr-open{border-color:var(--acid)}
  /* Open = the tile hands its height to the dropdowns and becomes a slim
     header again (the panel's own first row shows the same shot thumb). */
  #page-generate .cr-box-tile.cr-open{
    min-height:0; flex-direction:row; align-items:center; gap:9px; padding:6px 10px;
  }
  #page-generate .cr-box-tile.cr-open .cr-img{
    position:relative; inset:auto; width:40px; height:40px;
    border:1px solid var(--border); border-radius:3px; flex:0 0 auto;
  }
  #page-generate .cr-box-tile.cr-open .cr-txt{
    flex:1 1 auto; flex-direction:column; align-items:flex-start;
    gap:1px; padding:0; background:none;
  }
  #page-generate .cr-inlined{
    border:1px solid var(--border-2) !important; border-radius:var(--radius,4px);
    background:rgba(0,0,0,.22); padding:8px 10px !important; margin:0 !important;
    max-height:min(38vh,300px); overflow-y:auto; scrollbar-width:thin;
    scrollbar-color:rgba(209,48,73,.45) transparent;
  }
  #page-generate .cr-inlined > summary{display:none !important}
}

/* ==== Rail locked to the column - Jared 2026-07-26 ======================
   "Make sure it all fits on the screen... gore kinda sticks down a little
   too far. And negative. Make sure it is all perfectly locked."
   MEASURED before this block (1440x900): the rail ran 61px past the bottom
   of .create-controls-col with everything closed, and 354px past it with
   Cinema open - .create-controls-col is overflow:hidden, so those boxes were
   half-cut, not merely low. Three things fix it:
     1. the railed scroller was overflow:visible (from the original 'the rail
        fits so it must not scroll' rule) - content past the bottom simply
        spilled. It is now a flex column that scrolls itself, so nothing can
        ever hang past the panel on any viewport height;
     2. the four text boxes go two-across, and the tile loses 20px, which is
        what actually buys the closed rail its ~100px back so no scrolling is
        needed in the normal case;
     3. the generator hint is capped at one line inside the deck.
   Revert = delete this block (the rail spills again, it does not break).
   ===================================================================== */
@media (min-width:933px){
  html body.create-railed #page-generate #create-options-scroll{
    display:flex; flex-direction:column; min-height:0;
    overflow-y:auto; overflow-x:hidden;
    scrollbar-width:thin; scrollbar-color:rgba(209,48,73,.45) transparent;
  }
  /* Every rail child keeps its natural height. Without this the new flex
     column SHRINKS them to fit: opening Cinema squashed the whole
     Aspect/Resolution/Batch row down to 18px, and it also poisoned
     fitInline() - it measured a rail that was already being crushed. */
  html body.create-railed #page-generate #create-options-scroll > *,
  #page-generate #create-rail-top,
  #page-generate #create-rail-top > *{flex:0 0 auto}
  /* Two-across; Cinema (tile or not) and its inline panel span the row. */
  #page-generate #create-setup-boxes{
    display:grid; grid-template-columns:1fr 1fr; gap:6px; align-content:start;
  }
  #page-generate #create-setup-boxes > [data-box="create-simple-options"],
  #page-generate #cr-inline-slot{grid-column:1 / -1}
  #page-generate .cr-box-tile{min-height:104px}
  #page-generate #create-model-live #modelinfo{max-height:1.45em;overflow:hidden}
}

/* ==== Cinema visual option browser - Jared 2026-07-26 ===================
   "I want a better way to see the thumbnails." Category chips + a grid of
   ~110px tiles replace the nine 24px-thumb dropdown rows while the Cinema
   panel is open. The rows are HIDDEN, not removed - the selects are still
   the source of truth. JS twin: buildVisual() in the CREATE RAIL block.
   ===================================================================== */
@media (min-width:933px){
  #page-generate .cr-inlined.cr-visual-on #create-simple-dropdowns,
  #page-generate .cr-inlined.cr-visual-on .create-simple-preview,
  #page-generate .cr-inlined.cr-visual-on .create-section-hint{display:none !important}
  #page-generate #cr-visual{
    display:flex; flex-direction:column; gap:6px; min-height:0; height:100%;
  }
  #page-generate .cr-chips{
    display:flex; gap:4px; flex:0 0 auto; overflow-x:auto; overflow-y:hidden;
    padding-bottom:2px; scrollbar-width:none;
  }
  #page-generate .cr-chips::-webkit-scrollbar{display:none}
  #page-generate .cr-chip{
    flex:0 0 auto; display:flex; align-items:center; gap:5px; cursor:pointer;
    background:var(--field); border:1px solid var(--border); border-radius:999px;
    padding:3px 9px; font:inherit; font-size:9px; letter-spacing:.1em;
    text-transform:uppercase; color:var(--muted); line-height:1.6;
  }
  #page-generate .cr-chip i{
    font-style:normal; text-transform:none; letter-spacing:0; font-size:10.5px;
    color:var(--text); max-width:84px; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap;
  }
  #page-generate .cr-chip.on{border-color:var(--acid); color:var(--acid)}
  #page-generate .cr-tiles{
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px;
    flex:1 1 auto; min-height:0; overflow-y:auto; align-content:start;
    scrollbar-width:thin; scrollbar-color:rgba(209,48,73,.45) transparent;
  }
  #page-generate .cr-tile{
    display:flex; flex-direction:column; padding:0; cursor:pointer; min-width:0;
    background:var(--field); border:1px solid var(--border); border-radius:4px;
    overflow:hidden; color:var(--text); font:inherit; text-align:left;
  }
  #page-generate .cr-tile:hover{border-color:var(--border-2)}
  #page-generate .cr-tile.on{border-color:var(--acid)}
  #page-generate .cr-tile-img{
    display:block; aspect-ratio:1/1; background:#0f0c0d; overflow:hidden;
  }
  #page-generate .cr-tile-img > *{
    width:100%; height:100%; object-fit:cover; display:block;
  }
  /* the 'None' option renders as a text placeholder, not a picture */
  #page-generate .cr-tile-img .picker-none{
    display:flex !important; align-items:center; justify-content:center;
    width:100%; height:100%; font-size:10px; color:var(--muted);
  }
  /* the placeholder already says None; the tile label says it again */
  #page-generate .cr-tile-img .picker-none span{display:none}
  #page-generate .cr-tile-lab{
    font-size:9.5px; line-height:1.25; padding:3px 4px 4px; color:var(--muted);
    overflow:hidden; overflow-wrap:anywhere;
  }
}

/* ==== Cult back in the MOBILE header - Jared 2026-07-27 =================
   "Bring back CULT link to mobile menu." The account-row link is created
   again in ddSyncSessionUi; this is the half that keeps PC honest - PC
   already has Cult last-and-red in `.dd-nav`, so the account-row copy is
   hidden there and shown only under body.dd-mobile, the exact condition
   under which dd-mobile.css hides `.dd-nav`. Red to match the nav entry.
   ===================================================================== */
#dd-nav-cult-link{display:none}
body.dd-mobile #dd-nav-cult-link{display:inline;color:var(--acid);font-weight:600}
body.dd-mobile #dd-nav-cult-link:hover{color:#f0546b}

/* ==== Account-row order - Jared 2026-07-27 =============================
   "Switch LOG OUT with SETTINGS, put CULT after LOG OUT" (mobile), then
   "for the PC version also make it SUBSCRIBE, ACCOUNT, SETTINGS, LOGOUT".
   Both surfaces want the SAME sequence, so the flex `order` overrides that
   used to live here are DELETED: ddSyncSessionUi builds the row in that
   order and the DOM is the single source of truth. Cult is still last and
   still shows only under body.dd-mobile (PC has it in `.dd-nav`).
   The #dd-nav-account-btn / -settings-btn / -logout-btn ids stay as handles.
   ===================================================================== */

/* ==== Cinema opens in the SHEET - Jared 2026-07-28 ======================
   "Make the cinema settings on the PC version pop up just like the other
   settings. It's very difficult to see them."
   Cinema was the one box that did NOT open .cr-veil - it expanded an inline
   slot under its tile, and fitInline() handed that panel whatever the rail
   had left over (floor 180px). Inside a 400px rail at 3 columns that is about
   three half-rows of 110px thumbnails, which is exactly the complaint.
   It now goes through openBox() like Gore/Look/Negative/Scene, and the tile
   browser is built INSIDE the sheet.
   The sheet is appended to <body>, i.e. OUTSIDE #page-generate, so every
   `#page-generate #cr-visual` rule in the block above stops matching once the
   section is hosted here - they are restated against .cr-body.
   Then: "make it so there doesn't have to be a scroll bar. make it fit in
   there." The grid no longer carries a size at all - fitTiles() in dd-app.js
   solves for the tile width and column count that make N options cover the
   sheet exactly, and feeds them in as --cr-cols / --cr-tw / --cr-lab / --cr-fs.
   Nothing here may reintroduce a scroller: .cr-body is overflow:hidden in wide
   mode and the grid uses a FIXED column width (repeat(cols, TW)) - switch that
   to 1fr and the floor'd column count widens the real column past TW, the rows
   grow, and the overflow comes straight back.
   JS twin: openBox()/closeBox()/fitTiles() in the CREATE RAIL block.
   Revert = delete this block and restore the toggleInline() branch.
   ===================================================================== */
.cr-veil.cr-wide .cr-sheet{width:min(1280px,95vw);height:92vh}
.cr-veil.cr-wide .cr-body{overflow:hidden}
/* the nine 24px-thumb rows are the thing the grid replaces - hide them while
   the browser is up, exactly as the inline version did */
.cr-body .cr-hosted.cr-visual-on #create-simple-dropdowns,
.cr-body .cr-hosted.cr-visual-on .create-simple-preview,
.cr-body .cr-hosted.cr-visual-on .create-section-hint{display:none !important}
.cr-body #cr-visual{display:block}
.cr-body .cr-chips{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 8px}
.cr-body .cr-chip{
  display:flex;align-items:center;gap:6px;cursor:pointer;
  background:var(--field);border:1px solid var(--border);border-radius:999px;
  padding:4px 11px;font:inherit;font-size:10px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted);line-height:1.6;
}
.cr-body .cr-chip i{
  font-style:normal;text-transform:none;letter-spacing:0;font-size:11.5px;
  color:var(--text);max-width:130px;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;
}
.cr-body .cr-chip.on{border-color:var(--acid);color:var(--acid)}
/* fixed column width, centred - see the header note on why not 1fr */
.cr-body .cr-tiles{
  display:grid;grid-template-columns:repeat(var(--cr-cols,7),var(--cr-tw,136px));
  gap:8px;align-content:start;justify-content:center;overflow:hidden;
}
.cr-body .cr-tile{
  display:flex;flex-direction:column;padding:0;cursor:pointer;min-width:0;
  background:var(--field);border:1px solid var(--border);border-radius:4px;
  overflow:hidden;color:var(--text);font:inherit;text-align:left;
}
.cr-body .cr-tile:hover{border-color:var(--border-2)}
.cr-body .cr-tile.on{border-color:var(--acid);box-shadow:0 0 0 1px var(--acid) inset}
.cr-body .cr-tile-img{display:block;aspect-ratio:1/1;background:#0f0c0d;overflow:hidden}
.cr-body .cr-tile-img > *{width:100%;height:100%;object-fit:cover;display:block}
/* the "None" option renders a text placeholder, not a picture */
.cr-body .cr-tile-img .picker-none{
  display:flex !important;align-items:center;justify-content:center;
  width:100%;height:100%;font-size:10px;color:var(--muted);
}
.cr-body .cr-tile-img .picker-none span{display:none}
/* the label box is part of the height fitTiles() solved for, so it is a HARD
   height, clamped to the line count that height allows */
.cr-body .cr-tile-lab{
  height:var(--cr-lab,26px);font-size:var(--cr-fs,10px);line-height:1.2;
  padding:3px 5px;color:var(--muted);overflow:hidden;overflow-wrap:anywhere;
  display:-webkit-box;-webkit-box-orient:vertical;
  -webkit-line-clamp:var(--cr-lines,2);
}

/* ── Moodboard picker (Create § 09) ────────────────────────────────────────
   Additive only. Boards read as thumbnails so you can see what a board is
   made of before applying it. */
.mb-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:10px;
  margin:8px 0 4px;
}
.mb-card{
  display:flex; flex-direction:column; gap:6px;
  padding:8px; text-align:left; cursor:pointer;
  background:var(--field); color:var(--text);
  border:1px solid var(--border); border-radius:var(--radius);
  transition:border-color .12s ease, background .12s ease;
}
.mb-card:hover{ border-color:var(--accent); }
.mb-card.is-active{ border-color:var(--accent); background:var(--panel); }
.mb-strip{ display:grid; grid-template-columns:repeat(4,1fr); gap:3px; }
.mb-strip img{
  width:100%; aspect-ratio:1/1; object-fit:cover;
  border-radius:3px; display:block; background:var(--bg);
}
.mb-name{
  font-size:.86rem; font-weight:600; line-height:1.2;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.mb-meta{ font-size:.72rem; color:var(--muted); }
.mb-meta.mb-warn{ color:var(--accent); }
.mb-toggle{
  display:flex; align-items:flex-start; gap:8px;
  margin-top:8px; font-size:.82rem; cursor:pointer;
}
.mb-toggle input{ margin-top:3px; flex:0 0 auto; }

/* ==== ELEMENTS BIN - Jared 2026-07-28 ==================================
   "reference images need to be easily able to add together." A named,
   persistent library above the reference tray: fill it once, click an
   element to drop it into the current shot. Chips are square thumbnails so
   a full bin reads as a contact sheet, not a list.
   Sits INSIDE #create-elements-panel, which lives in the 400px rail - so
   everything here is sized for that width, not for a page column.
   JS twin: the ELEMENTS BIN block at the end of dd-app.js.
   Revert = delete this block + that one.
   ===================================================================== */
@media (min-width:933px){
  #ce-bin{margin:0 0 8px}
  #ce-bin .ce-els{
    display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));
    gap:5px;align-content:start;
  }
  #ce-bin .ce-el{
    position:relative;display:block;padding:0;cursor:pointer;min-width:0;
    aspect-ratio:1/1;background:var(--field);border:1px solid var(--border);
    border-radius:4px;overflow:hidden;color:var(--text);font:inherit;
  }
  #ce-bin .ce-el img{width:100%;height:100%;object-fit:cover;display:block}
  #ce-bin .ce-el:hover{border-color:var(--border-2)}
  /* in this shot */
  #ce-bin .ce-el.on{border-color:var(--acid);box-shadow:0 0 0 1px var(--acid) inset}
  /* the tray is full, so this one cannot be added - say so quietly */
  #ce-bin .ce-el.full{opacity:.45}
  #ce-bin .ce-el-n{
    position:absolute;left:0;right:0;bottom:0;padding:6px 3px 2px;
    font-size:8.5px;line-height:1.25;color:#fff;text-align:left;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.88) 55%);
  }
  #ce-bin .ce-el.on .ce-el-n{color:var(--acid)}
  #ce-bin .ce-el-x{
    position:absolute;top:2px;right:2px;width:15px;height:15px;line-height:14px;
    text-align:center;font-size:13px;border-radius:3px;color:#fff;
    background:rgba(0,0,0,.62);opacity:0;transition:opacity .12s;
  }
  #ce-bin .ce-el:hover .ce-el-x{opacity:1}
  #ce-bin .ce-el-x:hover{background:var(--acid)}
  #ce-bin .ce-add{
    display:flex;align-items:center;justify-content:center;
    font-size:19px;color:var(--muted);border-style:dashed;
  }
  #ce-bin .ce-add:hover{color:var(--acid);border-color:var(--acid)}
  /* naming row - appears under the grid while an image waits for a name */
  #ce-bin .ce-name{
    display:flex;align-items:center;gap:6px;margin-top:6px;padding:5px;
    background:var(--field);border:1px solid var(--border-2);border-radius:4px;
  }
  #ce-bin .ce-name img{
    width:30px;height:30px;object-fit:cover;border-radius:3px;flex:0 0 auto;
  }
  #ce-bin .ce-name input{
    flex:1 1 auto;min-width:0;background:var(--panel);color:var(--text);
    border:1px solid var(--border);border-radius:3px;padding:4px 7px;
    font:inherit;font-size:11px;
  }
  #ce-bin .ce-name .ce-save{
    width:auto;flex:0 0 auto;padding:4px 11px;font-size:10px;
  }
  #ce-bin .ce-cancel{
    flex:0 0 auto;background:none;border:0;color:var(--muted);cursor:pointer;
    font:inherit;font-size:10px;padding:2px 4px;
  }
  #ce-bin .ce-cancel:hover{color:var(--text)}
  #ce-bin .ce-binnote{
    margin:6px 0 0;font-size:10px;line-height:1.35;color:var(--muted);
  }
  /* only shown when the picked generator ignores references */
  #ce-bin .ce-fix{
    display:block;width:100%;margin:6px 0 0;padding:5px 9px;cursor:pointer;
    background:none;border:1px solid var(--acid);border-radius:3px;
    color:var(--acid);font:inherit;font-size:10px;letter-spacing:.09em;
    text-transform:uppercase;
  }
  #ce-bin .ce-fix:hover{background:var(--acid);color:#fff}

  /* ---- rail fit tiers - Jared 2026-07-28 ------------------------------
     "get all the options on the screen so you don't have to use a scroll
     bar." fitRail() adds these one at a time, cheapest first, ONLY while
     #create-options-scroll still overflows - and clears them all first on
     every pass, so the rail relaxes again the moment content shrinks.
     Nothing here is a permanent look change: on a tall window no tier is on.
     Order matters - prose first, then picture sizes, then chrome padding. */

  /* T1: the panel's own prose. The bin note already says what the subtitle
     said, so it is the first thing that should go. */
  body.cr-tight1 #create-elements-panel .ce-sub{display:none}
  body.cr-tight1 #ce-bin{margin-bottom:5px}
  body.cr-tight1 #ce-bin .ce-binnote,
  body.cr-tight1 #create-elements-note{margin-top:4px;line-height:1.28}

  /* T2: the two grids of pictures - the bin chips and the reference tray
     below it. Both shrink; neither disappears. */
  body.cr-tight2 #ce-bin .ce-els{grid-template-columns:repeat(auto-fill,minmax(46px,1fr))}
  body.cr-tight2 #create-elements-panel .ref-frames{
    grid-template-columns:repeat(auto-fill,minmax(56px,1fr)) !important;
  }
  body.cr-tight2 #ce-bin .ce-el-n{font-size:7.5px;padding-top:5px}

  /* T3: chrome padding. Last because it is the least visible saving and the
     most likely to look cramped. GENERATE is deliberately NOT touched. */
  body.cr-tight3 #page-generate .generate-dock{gap:7px}
  body.cr-tight3 #create-refiner{padding-top:5px;padding-bottom:5px}
  body.cr-tight3 #create-elements-panel{padding-top:7px;padding-bottom:7px}

  /* T4/T5 reach INSIDE the scroller. T1-T3 only shrink the dock, which raises
     the scroller's height but never lowers what it has to hold - so on a short
     window the last of the overflow can only come from here. */

  /* T4: the generator hint is advisory prose ("Auto picks the best generator
     for your prompt...") sitting under a select that already says the answer. */
  body.cr-tight4 #page-generate #create-model-live #modelinfo{display:none}
  body.cr-tight4 #page-generate #create-setup-boxes{gap:5px}
  body.cr-tight4 #page-generate .cr-box{padding-top:5px;padding-bottom:5px}

  /* T5: the reference tray, ONLY while it is a literal repeat of the bin above
     it (.ce-dupe, set from JS - it is a data question, not a CSS one). ~76px,
     the single biggest saving here, and nothing is lost: the bin shows the same
     images with their @names and an acid border for what is in the shot, and
     its "+" uploads too. Drag an image straight into the tray and .ce-dupe
     drops, so the tray comes back. */
  body.cr-tight5 #create-elements-panel.ce-dupe #create-elements-body{display:none}
  body.cr-tight5 #create-elements-panel.ce-dupe #create-elements-note{display:none}

  /* T6: the promoted Aspect / Resolution / Batch row. Last resort - this is the
     row Jared asked to be front and centre, so it shrinks, never hides. */
  body.cr-tight6 #page-generate #create-output-live .cr-promoted{padding:4px 0 0}
  body.cr-tight6 #page-generate #create-output-live label{font-size:9px}
  body.cr-tight6 #page-generate #create-output-live select,
  body.cr-tight6 #page-generate #create-output-live input{padding-top:4px;padding-bottom:4px}

  /* T7: only reachable when the tray CANNOT be hidden because it holds an image
     that is not in the bin - so T5 saved nothing and the last ~21px has to come
     from the two grids themselves plus the bin's helper line. */
  body.cr-tight7 #ce-bin .ce-binnote{display:none}
  body.cr-tight7 #create-elements-panel .ref-frames{
    grid-template-columns:repeat(auto-fill,minmax(44px,1fr)) !important;
  }
  body.cr-tight7 #ce-bin .ce-els{grid-template-columns:repeat(auto-fill,minmax(42px,1fr))}

  /* T8/T9 are only reachable on a genuinely short window - at 1366x768 the
     control column is 659px, against 791px at 1440x900, and everything above
     has already been spent. */

  /* T8: the "CREATE - type a prompt and hit Generate" hint bar. Pure
     instruction prose, and the prompt box below it says the same thing in its
     own placeholder. 24px. */
  body.cr-tight8 #page-generate #create-mode-bar{display:none}

  /* T9: GENERATE loses a little padding - NOT its width, colour or type size.
     Deliberately dead last: the slab is load-bearing for the page's look, so
     it is only ever touched when the alternative is the scrollbar Jared asked
     to get rid of, on a window too short for anything else to be left. */
  body.cr-tight9 #page-generate #go{padding-top:12px;padding-bottom:12px}
}

/* ==== Moodboard framing toggle - bugfix, Jared 2026-07-28 ================
   PRE-EXISTING, found while giving #moodboard-section a value box. The app's
   global `textarea, input, select{width:100%}` outranks `.mb-toggle input`,
   which only sets `flex:0 0 auto` and never a width - so the framing checkbox
   stretches to the whole flex row (MEASURED 837px inside the 880px popup) and
   pushes its own label outside the box, where it renders as a one-letter-wide
   vertical column. Equally wrong in the rail, just narrower and less obvious.
   Unscoped on purpose: it should be right everywhere, mobile included.
   ===================================================================== */
.mb-toggle input[type="checkbox"]{width:auto;flex:0 0 auto}
.mb-toggle > span{flex:1 1 auto;min-width:0}
