/* =========================================================
   Glow system — flowing pink light + living borders
   ========================================================= */
@property --ang{syntax:'<angle>';inherits:false;initial-value:0deg}
@keyframes spin{to{--ang:360deg}}
@keyframes breathe{0%,100%{opacity:.55}50%{opacity:1}}

/* soft pink aurora at the top of every page */
body::before{content:"";position:fixed;left:50%;top:-260px;width:1100px;height:520px;transform:translateX(-50%);pointer-events:none;z-index:0;
  background:radial-gradient(50% 50% at 50% 50%,rgba(255,45,135,.22),rgba(255,45,135,.06) 45%,transparent 70%);filter:blur(10px);animation:breathe 7s ease-in-out infinite}
.shell{position:relative;z-index:1}

/* light beams flowing through the hero */
.beams{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden;mix-blend-mode:screen}
.beams i{position:absolute;width:60%;height:220px;border-radius:50%;filter:blur(60px);opacity:.55;animation:flow 16s ease-in-out infinite}
.beams i:nth-child(1){left:-20%;top:18%;background:radial-gradient(closest-side,rgba(255,45,135,.85),transparent)}
.beams i:nth-child(2){right:-25%;top:40%;background:radial-gradient(closest-side,rgba(168,85,247,.7),transparent);animation-delay:-5s;animation-duration:19s}
.beams i:nth-child(3){left:20%;bottom:-5%;background:radial-gradient(closest-side,rgba(255,105,180,.7),transparent);animation-delay:-9s;animation-duration:22s}
.beams i:nth-child(4){left:35%;top:-10%;width:30%;height:120px;background:radial-gradient(closest-side,rgba(220,255,31,.35),transparent);animation-delay:-3s;animation-duration:25s}
@keyframes flow{0%{transform:translate(0,0) scale(1)}33%{transform:translate(28%,-12%) scale(1.15)}66%{transform:translate(-12%,14%) scale(.9)}100%{transform:translate(0,0) scale(1)}}

/* composer: pink under-glow */
.composer{position:relative;box-shadow:var(--hi),0 30px 70px -24px rgba(0,0,0,.9),0 0 0 1px rgba(255,45,135,.14),0 0 70px -14px rgba(255,45,135,.45)}
.composer::after{content:"";position:absolute;left:12%;right:12%;bottom:-18px;height:40px;border-radius:50%;background:rgba(255,45,135,.55);filter:blur(30px);z-index:-1;animation:breathe 4s ease-in-out infinite}
.composer-dock{position:relative;z-index:1}

/* living border: a pink → lime comet runs around the box */
.glow-box{position:relative}
.glow-box::before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1.5px;pointer-events:none;z-index:2;
  background:conic-gradient(from var(--ang),transparent 0deg,transparent 200deg,rgba(255,45,135,.15) 240deg,#ff2d87 290deg,#ffc2df 318deg,var(--accent) 334deg,transparent 360deg);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  animation:none}
.prompt-box.glow-box{box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.22),0 0 26px -6px rgba(255,45,135,.5),inset 0 0 40px -20px rgba(255,45,135,.4);transition:box-shadow .3s}
.prompt-box.glow-box:focus-within{box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.5),0 0 40px -4px rgba(255,45,135,.7),inset 0 0 50px -18px rgba(255,45,135,.55)}
.prompt-box.glow-box:focus-within::before{animation:spin 3s linear infinite}

/* generate button: lime aura */
.generate{animation:gpulse 2.8s ease-in-out infinite}
@keyframes gpulse{0%,100%{box-shadow:0 5px 0 var(--accent-deep),0 14px 30px -8px rgba(220,255,31,.45),inset 0 1px 0 rgba(255,255,255,.7),inset 0 -2px 0 rgba(0,0,0,.08)}
  50%{box-shadow:0 5px 0 var(--accent-deep),0 14px 44px -2px rgba(220,255,31,.7),0 0 0 4px rgba(220,255,31,.08),inset 0 1px 0 rgba(255,255,255,.7),inset 0 -2px 0 rgba(0,0,0,.08)}}
.generate:active{animation:none}

/* chips + nav get a pink hint when set / active */
.dchip.set{box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.35),0 0 18px -6px rgba(255,45,135,.6)}
.nav-item.active{box-shadow:var(--hi),0 0 22px -8px rgba(255,45,135,.6)}
.nav-item.active i{box-shadow:0 0 14px rgba(255,255,255,.35)}
.tabbar a.active{box-shadow:0 0 18px -4px rgba(255,45,135,.6);color:#fff}
.tile.on .tile-media{box-shadow:0 0 0 2px var(--accent),0 0 26px -2px rgba(220,255,31,.55),0 0 60px -10px rgba(255,45,135,.45)}
.wpill.cur{box-shadow:0 0 0 2px #fff,0 0 0 6px rgba(0,0,0,.65),0 0 0 7px rgba(255,45,135,.25),0 0 40px -6px rgba(255,45,135,.55),0 18px 40px -10px rgba(0,0,0,.9),inset 0 1px 0 rgba(255,255,255,.12)}
.gcard{transition:transform .25s var(--ease),box-shadow .25s}
.gcard:hover{transform:translateY(-3px);box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.3),0 20px 50px -18px rgba(255,45,135,.55)}
.g-media[data-edit]{cursor:pointer}
.g-media .open-hint{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.9);opacity:0;z-index:2;display:flex;align-items:center;gap:6px;height:34px;padding:0 14px;border-radius:999px;font-size:12.5px;font-weight:700;background:rgba(20,20,24,.7);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 0 0 1px rgba(255,45,135,.4),0 0 24px rgba(255,45,135,.45);transition:.2s}
.g-media .open-hint svg{width:14px;height:14px}
.gcard:hover .open-hint{opacity:1;transform:translate(-50%,-50%) scale(1)}
@media (hover:none){.g-media .open-hint{opacity:1;transform:translate(-50%,-50%) scale(1);top:auto;bottom:10px;transform:translateX(-50%)}}

/* =========================================================
   Clip editor
   ========================================================= */
.editor{position:fixed;inset:0;z-index:65;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;background:#070708;color:var(--fg);opacity:0;transform:scale(.985);transition:opacity .25s,transform .25s var(--ease)}
.editor.on{opacity:1;transform:none}
.editor[hidden]{display:none}
.editor::before{content:"";position:absolute;left:50%;top:18%;width:70vw;height:50vh;transform:translateX(-50%);border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,rgba(255,45,135,.16),transparent);filter:blur(40px);animation:breathe 6s ease-in-out infinite}
.editor>*{position:relative}
.editor kbd{font:600 11px var(--mono);padding:1px 5px;border-radius:5px;background:var(--bg-3);color:var(--fg)}
.ed-top{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line);min-width:0}
.ed-title{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.ed-title b{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}
.ed-chip{flex:none;font:500 11px var(--mono);padding:3px 8px;border-radius:7px;background:var(--bg-2);color:var(--fg-2);box-shadow:var(--hi)}
.ed-actions{display:flex;align-items:center;gap:6px;flex:none}
.ed-thumb{width:28px;height:36px;object-fit:cover;border-radius:6px;box-shadow:0 0 0 1px var(--line-2)}
.ed-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:10px;font-size:12.5px;font-weight:700;color:var(--fg);background:var(--bg-1);box-shadow:var(--hi),0 0 0 1px var(--line);white-space:nowrap;transition:background .15s,box-shadow .15s}
.ed-btn:hover{background:var(--bg-3);box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.35),0 0 18px -6px rgba(255,45,135,.6)}
.ed-btn svg{width:14px;height:14px}
.ed-btn.sm{height:28px;padding:0 10px}
.ed-btn.white{background:#fff;color:#111;box-shadow:0 2px 0 #8a8a90}
.ed-btn.white:hover{background:#eee}
.ed-btn.busy{pointer-events:none;opacity:.6}
.ed-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:var(--fg-2);transition:.15s}
.ed-icon:hover{color:var(--fg);background:var(--bg-2)}
.ed-icon svg{width:16px;height:16px}
.ed-icon.sm{width:28px;height:28px}
.ed-icon.box{background:var(--bg-3);box-shadow:var(--hi)}
.ed-icon.liked{color:var(--pink)}

.ed-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;padding:18px;overflow:hidden}
.ed-center{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:100%;max-height:100%;min-height:0}
.ed-player{position:relative;flex:none;height:min(52vh,560px);aspect-ratio:9/16;max-width:100%;border-radius:12px;overflow:hidden;background:#000;
  box-shadow:0 0 0 1px rgba(255,255,255,.08),0 30px 80px -20px rgba(0,0,0,.9),0 0 90px -20px rgba(255,45,135,.45)}
.ed-player.r169{aspect-ratio:16/9;height:auto;width:min(62vw,980px);max-height:52vh}
.ed-player.r11{aspect-ratio:1}
.ed-player video{width:100%;height:100%;object-fit:cover;background:#000}
.ed-wm{display:none!important}
.ed-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(0,0,0,.55) center/cover;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);font-size:13px;font-weight:600;text-align:center;padding:16px}
.ed-overlay .ring{width:54px;height:54px}
.ed-overlay .ring circle{fill:none;stroke-width:3.5}
.ed-overlay .ring .bg{stroke:rgba(255,255,255,.12)}
.ed-overlay .ring .fg{stroke:var(--pink);stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%;filter:drop-shadow(0 0 6px var(--pink));transition:stroke-dashoffset .3s}
.ed-overlay small{font:400 11.5px var(--mono);color:var(--fg-2)}
.ed-controls{display:flex;align-items:center;gap:4px;padding:5px 8px;border-radius:14px;flex:none}
.ec{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:var(--fg-2);transition:.15s}
.ec:hover{color:var(--fg);background:rgba(255,255,255,.07)}
.ec svg{width:16px;height:16px}
.ec.play{width:40px;border-radius:999px;background:#e9e9ec;color:#111;box-shadow:0 2px 0 #8a8a90}
.ec.play:hover{background:#fff}
.ec.on{color:var(--accent)}
.ec-time{font-size:11.5px;color:var(--fg-2);min-width:64px;text-align:center}
.ec-sep{width:1px;height:18px;background:var(--line-2);margin:0 4px}

.ed-details{position:absolute;right:18px;top:50%;transform:translateY(-50%);width:156px;padding:10px;border-radius:16px;background:rgba(14,15,17,.85);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:var(--hi),0 0 0 1px var(--line),0 20px 50px -20px #000;transition:opacity .2s,transform .25s var(--ease)}
.ed-details.off{opacity:0;pointer-events:none;transform:translateY(-50%) translateX(20px)}
.edd-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:700;margin-bottom:8px}
.edd-head span{display:flex;align-items:center;gap:8px}
.edd-head small{font:400 10.5px var(--mono);color:var(--fg-3)}
.edd-media{display:block;width:100%;border-radius:10px;overflow:hidden;aspect-ratio:16/10;background:#000;box-shadow:0 0 0 2px rgba(255,255,255,.85)}
.edd-media img{width:100%;height:100%;object-fit:cover}
.edd-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.edd-grid div{padding:7px 8px;border-radius:10px;background:var(--bg-2);box-shadow:var(--hi);min-width:0}
.edd-grid small{display:block;font-size:10px;color:var(--fg-3)}
.edd-grid b{display:block;font-size:11.5px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.edd-prompt{margin-top:8px;font-size:11px;color:var(--fg-3);line-height:1.4;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}

.ed-toasts{position:absolute;top:12px;right:14px;display:flex;flex-direction:column;gap:8px;width:min(340px,calc(100% - 28px));z-index:3;pointer-events:none}
.ed-toast{pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:12px;font-size:12.5px;font-weight:600;line-height:1.4;background:rgba(14,15,17,.92);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:var(--hi),0 0 0 1px var(--line-2),0 16px 40px -14px #000;animation:tin .25s var(--ease)}
.ed-toast .dot{width:8px;height:8px;border-radius:50%;margin-top:5px;flex:none;background:var(--fg-3)}
.ed-toast.ok .dot{background:var(--accent);box-shadow:0 0 10px var(--accent)}
.ed-toast.err{box-shadow:var(--hi),0 0 0 1px rgba(255,77,109,.45),0 0 24px -8px rgba(255,77,109,.6)}
.ed-toast.err .dot{background:#ff4d6d;box-shadow:0 0 10px #ff4d6d}
.ed-toast.info .dot{background:var(--pink);box-shadow:0 0 10px var(--pink)}
.ed-toast span{flex:1}
.ed-toast button{flex:none;height:24px;padding:0 9px;border-radius:7px;font-size:11.5px;font-weight:700;background:#fff;color:#111}
.ed-toast a{flex:none;height:24px;padding:0 9px;border-radius:7px;font-size:11.5px;font-weight:700;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center}

.ed-timeline{border-top:1px solid var(--line);background:rgba(10,10,12,.9);padding:8px 14px 10px}
.ed-tl-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.ed-hint{font-size:11.5px;color:var(--fg-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ed-hint b{color:var(--fg)}
.ed-tl-head .grow{flex:1}
.ed-tl{position:relative;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:4px}
.ed-tl-inner{position:relative;height:86px;min-width:100%}
.ed-ruler{position:absolute;left:0;right:0;top:0;height:20px;cursor:pointer;touch-action:none}
.ed-ruler span{position:absolute;top:3px;font:400 9.5px var(--mono);color:var(--fg-4);transform:translateX(-50%)}
.ed-ruler i{position:absolute;bottom:0;width:1px;height:4px;background:rgba(255,255,255,.14)}
.ed-track{position:absolute;left:0;right:0;top:26px;height:52px;cursor:pointer;touch-action:none}
.ed-overlay[hidden]{display:none}
.ed-clip{position:absolute;top:2px;height:48px;border-radius:9px;overflow:hidden;background-color:#111;background-image:var(--strip);background-size:var(--sw);background-position:var(--sx) center;background-repeat:no-repeat;
  box-shadow:0 0 0 1.5px rgba(255,255,255,.25),0 8px 18px -8px #000;transition:box-shadow .15s}
.ed-clip:hover{box-shadow:0 0 0 1.5px rgba(255,255,255,.6),0 8px 18px -8px #000}
.ed-clip.sel{box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(255,45,135,.45),0 0 26px -4px rgba(255,45,135,.7)}
.ed-clip .tag{position:absolute;left:5px;bottom:4px;font:700 10px var(--mono);padding:1px 6px;border-radius:6px;background:rgba(0,0,0,.65);color:#fff}
.ed-clip.rendering{background:repeating-linear-gradient(-45deg,rgba(255,45,135,.22) 0 10px,rgba(255,45,135,.08) 10px 20px),#170a12;background-size:28px 28px;animation:stripes .8s linear infinite;box-shadow:0 0 0 1.5px rgba(255,45,135,.55),0 0 22px -6px rgba(255,45,135,.7)}
@keyframes stripes{to{background-position:28px 0}}
.ed-clip .prog{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,rgba(255,45,135,.35),rgba(255,45,135,.6));box-shadow:4px 0 14px rgba(255,45,135,.7);transition:width .3s}
.ed-clip .state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:6px;font:600 10.5px var(--mono);color:#fff;text-shadow:0 1px 4px #000}
.ed-clip.failed{background:#1c0c10;box-shadow:0 0 0 1.5px rgba(255,77,109,.6)}
.ed-clip.failed .state{color:#ffb3c1}
.ed-add{position:absolute;top:13px;width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:#fff;color:#111;box-shadow:0 2px 0 #8a8a90,0 0 18px rgba(255,255,255,.25)}
.ed-add svg{width:15px;height:15px}
.ed-add:hover{box-shadow:0 2px 0 #8a8a90,0 0 22px rgba(255,45,135,.8)}
.ed-playhead{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:#fff;pointer-events:none;box-shadow:0 0 10px rgba(255,45,135,.9);z-index:3}
.ed-playhead::before{content:"";position:absolute;top:0;left:50%;width:12px;height:12px;border-radius:50%;transform:translateX(-50%);background:#fff;box-shadow:0 0 0 3px rgba(255,45,135,.35)}

.ed-composer-wrap{display:flex;justify-content:center;padding:10px 14px calc(12px + var(--safe-b));background:rgba(10,10,12,.9)}
.ed-composer{width:min(560px,100%);border-radius:16px;padding:8px;background:var(--bg-1);box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.2),0 0 40px -10px rgba(255,45,135,.5)}
.ed-composer:focus-within{box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.5),0 0 50px -6px rgba(255,45,135,.7)}
.ed-tabs{display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:none}
.ed-tabs::-webkit-scrollbar{display:none}
.ed-tab{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:8px;font-size:12px;font-weight:700;color:var(--fg-3);white-space:nowrap;flex:none;transition:.15s}
.ed-tab svg{width:13px;height:13px}
.ed-tab:hover{color:var(--fg)}
.ed-tab.on{color:var(--fg);background:var(--bg-3);box-shadow:var(--hi),0 0 0 1px rgba(255,255,255,.2)}
.ed-tab.ghost.on{background:transparent;box-shadow:0 0 0 1px var(--line-2)}
.ed-tab.ghost{box-shadow:0 0 0 1px var(--line)}
.ed-composer textarea{display:block;width:100%;resize:none;background:transparent;border:0;outline:0;padding:10px 6px 6px;font-size:14px;min-height:40px;max-height:120px}
.ed-composer textarea::placeholder{color:var(--fg-4)}
.ed-row{display:flex;align-items:center;gap:6px}
.ed-row .grow{flex:1}
.ed-pill{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:9px;font-size:12.5px;font-weight:700;background:var(--bg-3);box-shadow:var(--hi);white-space:nowrap}
.ed-pill:hover{background:var(--bg-4)}
.ed-pill small{font:400 11px var(--mono);color:var(--fg-3)}
.ed-pill svg{width:13px;height:13px;color:var(--fg-3)}
.ed-send{width:32px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--accent);color:var(--accent-ink);box-shadow:0 2px 0 var(--accent-deep),0 0 18px -4px rgba(220,255,31,.6)}
.ed-send svg{width:15px;height:15px}
.ed-send:active{transform:translateY(2px);box-shadow:0 0 0 var(--accent-deep)}
.ed-shake{animation:shake .3s}
@keyframes shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

/* ---------- editor: tablet ---------- */
@media (max-width:1100px){
  .ed-actions .ed-btn span{display:none}
  .ed-actions .ed-btn.white span,.ed-actions .ed-btn[data-ed=done]{font-size:12.5px}
  .ed-actions .ed-btn{padding:0 9px}
  .ed-actions .ed-btn[data-ed=done]{padding:0 12px}
  .ed-player.r169{width:min(70vw,900px)}
}
/* ---------- editor: phone ---------- */
@media (max-width:767px){
  body::before{width:600px;top:-300px}
  .beams i{filter:blur(40px);height:160px}
  .editor{grid-template-rows:auto 1fr auto auto}
  .ed-top{flex-wrap:wrap;gap:8px;padding:8px 10px}
  .ed-btn[data-ed=back] span{display:none}
  .ed-btn[data-ed=back]{width:34px;padding:0;justify-content:center}
  .ed-title{order:0}
  .ed-title b{max-width:46vw;font-size:13.5px}
  .ed-actions{order:2;width:100%;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  .ed-actions::-webkit-scrollbar{display:none}
  .ed-actions>*{flex:none}
  .ed-actions .ed-btn span{display:inline}
  .ed-thumb{display:none}
  .hide-sm{display:inline-flex}
  .ed-stage{flex-direction:column;justify-content:flex-start;padding:10px;gap:10px;overflow-y:auto}
  .ed-center{width:100%}
  .ed-player{height:auto;width:min(100%,calc((100dvh - 420px) * 9 / 16));min-width:160px}
  .ed-player.r169{width:100%;max-height:none}
  .ed-controls{width:100%;justify-content:space-between;padding:4px 6px}
  .ec{width:30px;height:30px}
  .ec-time{min-width:0;font-size:10.5px}
  .ec-sep{display:none}
  .ed-details{position:static;transform:none;width:100%;display:grid;grid-template-columns:96px 1fr;gap:10px;align-items:start}
  .ed-details.off{display:none}
  .ed-details .edd-head{grid-column:1/-1;margin:0}
  .edd-media{aspect-ratio:9/12}
  .edd-grid{margin:0}
  .ed-toasts{position:fixed;top:96px;left:10px;right:10px;width:auto}
  .ed-timeline{padding:6px 10px 8px}
  .ed-hint{display:none}
  .ed-tl-inner{height:80px}
  .ed-composer-wrap{padding:8px 10px calc(10px + var(--safe-b))}
  .ed-composer textarea{font-size:16px}
}
@media (prefers-reduced-motion:reduce){.glow-box::before,.beams i,body::before,.generate{animation:none!important}}

/* real model logos */
.mdot.logo{background:#0d0e10;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);overflow:hidden}
.mdot.logo img{width:100%;height:100%;object-fit:contain;padding:12%}
.mdot.icon{background:var(--bg-5);color:var(--fg-2)}
.mdot.icon svg{width:60%;height:60%}
.mdot.sm{width:20px;height:20px;border-radius:6px;font-size:9px}
.tpill .mdot{width:22px;height:22px;border-radius:7px}
.opt .mdot{width:22px;height:22px;border-radius:7px}
.ver b .mdot{margin-right:2px}
.c-name{display:flex;align-items:center;gap:10px}

/* ---------- hero background: fades fully before the composer ends ---------- */
.hero{padding-bottom:20px;min-height:480px}
.hero-bg{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 48%,transparent 86%);mask-image:linear-gradient(180deg,#000 0%,#000 48%,transparent 86%)}
.hero-bg .wall{z-index:0}
.hero-bg .beams{z-index:1}
.hero-bg .hero-fade{z-index:2;background:linear-gradient(180deg,rgba(14,15,17,.5) 0%,rgba(14,15,17,.3) 30%,rgba(14,15,17,.75) 62%),radial-gradient(60% 50% at 50% 60%,rgba(14,15,17,.55),transparent)}
.hero+.block{margin-top:28px}

/* ---------- sidebar toggle ---------- */
.side-toggle{flex:none;margin-left:-6px;color:var(--fg-3)}
.side-toggle:hover{color:var(--fg);box-shadow:0 0 16px -4px rgba(255,45,135,.6)}
.sidebar{transition:width .25s var(--ease)}
.nav-item>span,.brand-name{transition:opacity .2s}
/* desktop: collapse to the icon rail */
@media (min-width:1200px){
  body.side-collapsed{--side:76px}
  body.side-collapsed .sidebar{align-items:center;padding:14px 10px}
  body.side-collapsed .brand{padding:4px 0 18px}
  body.side-collapsed .brand-name,body.side-collapsed .nav-item>span,body.side-collapsed .nav-section,body.side-collapsed .wallet,body.side-collapsed .pill-off,body.side-collapsed .nav-count{display:none}
  body.side-collapsed .nav-item{width:50px;height:46px;justify-content:center;padding:0}
  body.side-collapsed .nav-item[data-tip]:hover::after{content:attr(data-tip);position:absolute;left:58px;top:50%;transform:translateY(-50%);padding:5px 9px;border-radius:8px;background:var(--fg);color:var(--bg);font-size:12px;font-weight:600;white-space:nowrap;z-index:5}
}
/* tablet: rail by default, expand to the full sidebar on demand */
@media (min-width:768px) and (max-width:1199px){
  body.side-open{--side:236px}
  body.side-open .sidebar{align-items:stretch;padding:14px 10px}
  body.side-open .brand{padding:4px 8px 16px}
  body.side-open .brand-name,body.side-open .nav-section{display:block}
  body.side-open .nav-item>span{display:inline}
  body.side-open .wallet{display:block}
  body.side-open .pill-off,body.side-open .nav-count{display:inline-block}
  body.side-open .nav-item{width:auto;height:38px;justify-content:flex-start;padding:0 10px}
  body.side-open .nav-item[data-tip]:hover::after{display:none}
}
@media (max-width:767px){.side-toggle{display:none}}

/* =========================================================
   Editor v2 — no timeline scrollbar, richer scene composer
   ========================================================= */
.ed-tl{scrollbar-width:none;padding-bottom:0}
.ed-tl::-webkit-scrollbar{display:none}
.ed-tl-inner{height:80px}
.ed-timeline{padding-bottom:6px}

.ed-composer-wrap{padding:10px 14px calc(12px + var(--safe-b))}
.ed-composer{width:min(840px,100%);padding:8px;border-radius:20px;display:flex;flex-direction:column;gap:8px}
.ed-tabs{display:flex;align-items:center;gap:8px;overflow:visible;padding:0;flex-wrap:nowrap}
.ed-seg{display:inline-flex;padding:3px;border-radius:11px;background:var(--bg-3);box-shadow:var(--hi);flex:none}
.ed-seg .ed-tab{height:30px;padding:0 12px;border-radius:8px;box-shadow:none}
.ed-seg .ed-tab.on{background:#fff;color:#111;box-shadow:0 1px 0 #8a8a90}
.ed-cont{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 10px;border-radius:9px;font-size:12px;font-weight:700;color:var(--fg-3);white-space:nowrap;flex:none}
.ed-cont:hover{background:var(--bg-3)}
.ed-cont .sw{width:28px;height:16px;border-radius:999px;background:var(--bg-5);position:relative;transition:background .2s,box-shadow .2s;flex:none}
.ed-cont .sw::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left .2s var(--ease)}
.ed-cont.on{color:var(--fg)}
.ed-cont.on .sw{background:var(--pink);box-shadow:0 0 10px rgba(255,45,135,.65)}
.ed-cont.on .sw::after{left:14px}
.ed-link{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:9px;font-size:12px;font-weight:700;color:var(--fg-2);flex:none}
.ed-link:hover{background:var(--bg-3);color:var(--fg)}
.ed-link svg{width:14px;height:14px}

.ed-scene{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.sc{display:flex;align-items:center;gap:8px;height:48px;padding:0 8px 0 6px;border-radius:12px;background:var(--bg-3);box-shadow:var(--hi);text-align:left;min-width:0;transition:background .15s,box-shadow .2s}
.sc:hover{background:var(--bg-4)}
.sc.set{box-shadow:var(--hi),0 0 0 1px rgba(255,45,135,.45),0 0 18px -6px rgba(255,45,135,.75)}
.sc-th{width:34px;height:34px;border-radius:9px;flex:none;background:#111 center/cover no-repeat;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.sc-th.gear{background-size:84%;background-color:#121316}
.sc-tx{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.sc-tx small{font:400 10px var(--mono);color:var(--fg-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-tx b{font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.ed-input{border-radius:14px;background:var(--bg-3);box-shadow:var(--hi);padding:2px 6px 6px}
.ed-input textarea{display:block;width:100%;resize:none;background:transparent;border:0;outline:0;padding:9px 6px 6px;font-size:14px;line-height:1.45;min-height:46px;max-height:120px;color:var(--fg)}
.ed-input textarea::placeholder{color:var(--fg-4)}
.ed-input .ed-icon.box{width:34px;height:34px;background:var(--bg-4)}
.ed-row .ed-pill{height:34px;background:var(--bg-4);gap:6px}
.ed-row .ed-pill svg{width:13px;height:13px}
.ed-row .ed-pill .mdot{width:18px;height:18px;border-radius:5px}
.ed-row .ed-pill span{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-go{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;height:36px;padding:0 5px 0 14px;border-radius:11px;font-weight:800;font-size:13px;text-transform:uppercase;letter-spacing:.02em;color:var(--accent-ink);
  background:linear-gradient(180deg,#efff70,var(--accent) 45%,var(--accent-2));box-shadow:0 3px 0 var(--accent-deep),0 0 22px -4px rgba(220,255,31,.55),inset 0 1px 0 rgba(255,255,255,.6);transition:transform .1s,box-shadow .1s;margin-bottom:3px;flex:none}
.ed-go b{display:inline-flex;align-items:center;gap:3px;height:26px;padding:0 8px;border-radius:8px;background:rgba(0,0,0,.1);font-size:12.5px;text-transform:none}
.ed-go b svg{width:12px;height:12px}
.ed-go b em{font-style:normal}
.ed-go:hover{filter:brightness(1.04)}
.ed-go:active{transform:translateY(3px);box-shadow:0 0 0 var(--accent-deep)}
.ed-more{display:none}
.edd-look{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.edd-look span{font:500 10px var(--mono);padding:2px 6px;border-radius:6px;background:rgba(255,45,135,.12);color:#ffb3d4}

/* short laptop screens: keep the player big */
@media (min-width:768px) and (max-height:760px){
  .ed-stage{padding:10px 14px}
  .ed-player{height:min(44vh,520px)}
  .ed-tl-head{margin-bottom:2px}
  .ed-tl-inner{height:72px}
  .ed-track{top:22px}
  .ed-composer{gap:6px;padding:6px}
  .sc{height:40px}
  .sc-th{width:28px;height:28px}
  .sc-tx small{display:none}
  .ed-input textarea{min-height:36px;padding:7px 6px 4px}
}
@media (min-width:768px) and (max-width:900px){
  .sc-tx small{display:none}
}

/* phones: compact bar that expands when you start writing */
@media (max-width:767px){
  .ed-composer-wrap{padding:6px 8px calc(8px + var(--safe-b))}
  .ed-composer{padding:6px;gap:6px;border-radius:18px}
  .ed-tabs{flex-wrap:wrap;gap:6px}
  .ed-seg{flex:1;display:grid;grid-template-columns:1fr 1fr}
  .ed-seg .ed-tab{justify-content:center;height:34px}
  .ed-cont{height:32px;padding:0 6px;font-size:11.5px}
  .ed-link span{display:none}
  .ed-link{height:32px;width:34px;justify-content:center;padding:0}
  .ed-scene{gap:4px}
  .sc{flex-direction:column;justify-content:center;height:auto;padding:6px 2px 5px;gap:4px;text-align:center}
  .sc-th{width:30px;height:30px;border-radius:8px}
  .sc-tx{align-items:center;width:100%}
  .sc-tx small{font-size:0}
  .sc-tx small::after{content:attr(data-s);font-size:9px}
  .sc-tx b{font-size:11px;max-width:100%}
  .ed-input{padding:2px 4px 4px}
  .ed-input textarea{font-size:16px;min-height:42px;padding:8px 6px 4px}
  .ed-row{flex-wrap:wrap;gap:5px}
  .ed-row .grow{display:none}
  .ed-row .ed-pill[data-ed=model]{flex:1;min-width:0}
  .ed-row .ed-pill span{max-width:none;flex:1;text-align:left}
  .ed-go{width:100%;height:44px;order:9;padding:0 6px 0 16px;font-size:14px}
  .ed-go b{height:32px}
  .ed-more{display:grid}
  /* collapsed: just the prompt, model and generate */
  .ed-composer:not(.open) .ed-tabs,.ed-composer:not(.open) .ed-scene,
  .ed-composer:not(.open) .ed-row .ed-icon:not(.ed-more),.ed-composer:not(.open) .ed-row [data-ed=dur]{display:none}
  .ed-composer:not(.open) .ed-input textarea{min-height:40px;height:40px}
  .ed-composer:not(.open) .ed-go{width:auto;order:0;height:34px;padding:0 5px 0 12px;font-size:12.5px}
  .ed-composer:not(.open) .ed-go b{height:26px}
  .ed-composer.open .ed-more svg{transform:rotate(180deg)}
  .ed-player{width:min(100%,calc((100dvh - 470px) * 9 / 16))}
}

/* player fills whatever height the stage has (any screen height) */
@media (min-width:768px){
  .ed-center{height:100%;justify-content:center}
  .ed-player{flex:1 1 0;min-height:120px;height:auto;max-height:640px;width:auto}
  .ed-player.r169{flex:none;width:min(62vw,980px);height:auto;max-height:calc(100% - 56px)}
  .ed-details{max-height:calc(100% - 24px);overflow:auto;scrollbar-width:none}
  .ed-details::-webkit-scrollbar{display:none}
}
@media (min-width:768px) and (max-height:760px){
  .ed-hint{display:none}
  .ed-player{min-height:100px}
}

/* compact composer on short screens (laptops with small height); expands on focus */
.ed-composer.compact .ed-more{display:grid}
.ed-composer.compact:not(.open) .ed-tabs,.ed-composer.compact:not(.open) .ed-scene{display:none}
.ed-composer.compact:not(.open) .ed-input textarea{min-height:38px;height:38px}
.ed-composer.compact.open .ed-more svg{transform:rotate(180deg)}
.ed-more svg{transition:transform .2s}
