/* Rekvon AI — Studio app UI. Dark product surface: near-black, warm cream, red accent.
   Design SERVES the tool here: calm, legible, fast. Palette matches the landing. */
*,*::before,*::after{box-sizing:border-box;margin:0}
:root{
  /* surface hierarchy: sidebar (darkest) < content bg < panel < raised */
  --side:#080605; --bg:#0d0b09; --panel:#151110; --panel-2:#1c1613; --ink:#efe7d8; --ink-2:#9b958a; --muted:#6f685c;
  --red:#e8402c; --red-2:#ff5a44; --good:#3fb977; --bad:#ff6a52;
  --line:rgba(239,231,216,.10); --line-2:rgba(239,231,216,.17);
  --disp:"Gloock",Georgia,serif; --body:"Hanken Grotesk",system-ui,sans-serif; --mono:"JetBrains Mono",monospace;
}
html{-webkit-text-size-adjust:100%}
/* the hidden attribute must always win, even over display classes like .gate/.shell */
[hidden]{display:none !important}
body{color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;
  background:radial-gradient(90% 65% at 85% -20%, rgba(232,64,44,.08), transparent 60%),
             radial-gradient(70% 50% at 0% 110%, rgba(232,64,44,.04), transparent 60%), var(--bg)}
/* film grain, same material as the landing, dialed down for a working surface */
body::after{content:"";position:fixed;inset:0;z-index:2147483000;pointer-events:none;opacity:.02;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
svg{display:block}
input,select,textarea{font:inherit;color:inherit}
input[type=range],input[type=checkbox]{accent-color:var(--red)}
::selection{background:var(--red);color:#fff}
.brand{font-family:var(--disp);font-size:1.4rem;letter-spacing:-.01em}
.brand span{color:var(--red)}
.cost{color:var(--red);font-variant-numeric:tabular-nums}

/* buttons — tactile: gradient fill, machined highlight, real pressed state */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:10px;font-weight:600;font-size:.92rem;
  padding:.6em 1.1em;transition:transform .15s ease,filter .15s ease,background .15s,border-color .15s,color .15s;white-space:nowrap}
.btn-solid{background:linear-gradient(180deg,#f6533d,#e03a26);color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.45)}
.btn-solid:hover{filter:brightness(1.08)}
.btn-solid:active{filter:brightness(.92);transform:translateY(1px);box-shadow:inset 0 1px 2px rgba(0,0,0,.35)}
.btn-line{border:1px solid var(--line-2);color:var(--ink);background:linear-gradient(180deg,rgba(239,231,216,.04),transparent);
  box-shadow:inset 0 1px 0 rgba(239,231,216,.05)}
.btn-line:hover{border-color:rgba(232,64,44,.6);color:var(--red-2)}
.btn-line:active{transform:translateY(1px)}
:where(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--red);outline-offset:2px;border-radius:6px}
.btn-danger{color:var(--bad)}.btn-danger:hover{background:rgba(255,106,82,.12)}
.btn-sm{padding:.42em .8em;font-size:.82rem;border-radius:8px}
.btn-lg{padding:.75em 1.35em;font-size:1rem}
.full{width:100%}

/* toasts */
#toasts{position:fixed;top:1.1rem;right:1.1rem;z-index:200;display:flex;flex-direction:column;gap:.6rem}
.toast{background:linear-gradient(180deg,#211a15,#1a1512);border:1px solid var(--line-2);border-radius:12px;padding:.75rem 1.05rem;font-size:.9rem;
  box-shadow:inset 0 1px 0 rgba(239,231,216,.06), 0 18px 40px -18px rgba(0,0,0,.85);max-width:340px}
.toast.good{border-color:rgba(63,185,119,.5)}.toast.bad{border-color:rgba(255,106,82,.55)}

/* ===================== signed-out gate ===================== */
.gate{min-height:100vh;display:flex;flex-direction:column}
.gate-top{display:flex;align-items:center;justify-content:space-between;padding:1.5rem clamp(1.2rem,4vw,2.6rem)}
.ghost-link{color:var(--ink-2);font-size:.9rem}.ghost-link:hover{color:var(--ink)}
.gate-card{margin:auto;text-align:center;padding:2rem;max-width:520px}
.orb-mark{width:76px;height:76px;margin:0 auto 1.8rem;border-radius:50%;border:2px solid var(--red);display:grid;place-items:center;
  box-shadow:0 0 0 0 rgba(232,64,44,.35);animation:pulse 2.6s ease-in-out infinite}
.orb-mark span{width:20px;height:20px;border-radius:50%;background:var(--ink)}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(232,64,44,.3);transform:scale(1)}50%{box-shadow:0 0 0 14px rgba(232,64,44,0);transform:scale(1.05)}}
.gate-card h1{font-family:var(--disp);font-size:clamp(2rem,5vw,3rem);letter-spacing:-.01em;margin-bottom:.7rem}
.gate-card p{color:var(--ink-2);margin:0 auto 2rem;max-width:44ch}
.gate-actions{display:flex;gap:.8rem;justify-content:center;flex-wrap:wrap}

/* ===================== app shell ===================== */
.shell{display:grid;grid-template-columns:240px 1fr;min-height:100vh}
.side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:1.3rem;padding:1.2rem 1rem;
  border-right:1px solid var(--line);background:var(--side)}
.side-brand{padding:.2rem .4rem}
.side-nav{display:flex;flex-direction:column;gap:.25rem}
.side-nav button{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;padding:.65rem .75rem;border-radius:10px;
  color:var(--ink-2);font-weight:500;font-size:.95rem;transition:background .2s,color .2s}
.side-nav button svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.side-nav button:hover{background:rgba(239,231,216,.05);color:var(--ink)}
.side-nav button.active{background:linear-gradient(180deg,rgba(232,64,44,.17),rgba(232,64,44,.09));color:var(--red-2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:1rem}
.engine{display:flex;align-items:center;gap:.5rem;font-size:.8rem;color:var(--muted);cursor:default;min-width:0}
.engine .dot{width:7px;height:7px;border-radius:50%;background:var(--good);flex:none}
.engine b{color:var(--ink-2);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acct{display:flex;align-items:center;gap:.6rem;padding-top:1rem;border-top:1px solid var(--line)}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:700;font-size:.9rem;flex:none}
.acct-email{font-size:.82rem;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.logout{color:var(--muted);padding:.3rem}.logout:hover{color:var(--red)}
.logout svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.content{width:100%;max-width:1280px}
/* compact product topbar — view title + actions, no marketing greeting */
.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:1rem;
  height:54px;padding:0 1.6rem;border-bottom:1px solid var(--line);background:rgba(13,11,9,.85);backdrop-filter:blur(8px)}
.tb-title{font-weight:600;font-size:.98rem}
.tb-actions{display:flex;align-items:center;gap:.55rem}
.view-pad{padding:1.4rem 1.6rem 2.5rem}
/* dashboard grid + panel headers */
.dash-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:.9rem;margin-bottom:.9rem;align-items:start}
@media(max-width:900px){.dash-grid{grid-template-columns:1fr}}
.dash-side{display:flex;flex-direction:column;gap:.9rem}
.ph-sm{font-weight:600;font-size:.92rem}
.ph-meta{color:var(--muted);font-size:.8rem}
.ph-meta b{color:var(--ink);font-family:var(--mono);font-weight:500}
.btn-ghost-sm{color:var(--ink-2);font-size:.84rem;font-weight:500}.btn-ghost-sm:hover{color:var(--red)}
/* spark chart — single series, brand red (validated vs dark surface) */
.spark-bars{display:flex;align-items:flex-end;gap:3px;height:132px}
.sbar{flex:1;background:var(--red);border-radius:3px 3px 0 0;min-height:3px;position:relative;cursor:default}
.sbar.zero{background:rgba(239,231,216,.10)}
.sbar:hover{filter:brightness(1.2)}
.sbar .tip{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);background:var(--panel-2);
  border:1px solid var(--line-2);border-radius:8px;padding:.35rem .6rem;font-family:var(--mono);font-size:.7rem;color:var(--ink);
  white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:5}
.sbar:hover .tip{opacity:1}
.spark-axis{display:flex;justify-content:space-between;font-family:var(--mono);font-size:.68rem;color:var(--muted);
  border-top:1px solid var(--line);padding-top:.5rem;margin-top:.6rem}
/* engine card */
.engine-dot{width:8px;height:8px;border-radius:50%;background:var(--good);box-shadow:0 0 8px rgba(63,185,119,.6)}
.kv-list .kv{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;padding:.62rem 0;border-bottom:1px solid var(--line);font-size:.9rem}
.kv-list .kv:last-child{border-bottom:none;padding-bottom:0}
.kv-list .kv span{color:var(--ink-2)}
.kv-list .kv b{font-family:var(--mono);font-weight:500;font-size:.82rem;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}
/* stat tile context line */
.stat-sub{color:var(--muted);font-size:.78rem;margin-top:.3rem}
/* activity right cluster */
.act-right{display:flex;align-items:center;gap:.6rem;flex:none}
/* roles & membership */
.role-line:empty{display:none}
.role-chip{display:inline-flex;align-items:center;border:1px solid var(--line-2);border-radius:999px;padding:.28em .85em;
  color:var(--ink-2);font-weight:600;font-size:.7rem;letter-spacing:.06em;text-transform:uppercase}
.role-chip.admin{background:var(--red);border-color:var(--red);color:#fff}
.role-chip.exp{color:var(--bad);border-color:rgba(255,106,82,.5)}
.pcount{margin-left:auto;background:var(--red);color:#fff;border-radius:999px;font-size:.68rem;font-weight:700;padding:.12em .6em}
/* members panel — a real data table */
.tablewrap{background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:auto}
.mtable{width:100%;border-collapse:collapse;font-size:.88rem}
.mtable th{text-align:left;font-weight:500;color:var(--muted);font-size:.76rem;padding:.7rem 1rem;border-bottom:1px solid var(--line);white-space:nowrap}
.mtable td{padding:.7rem 1rem;border-bottom:1px solid var(--line);vertical-align:middle}
.mtable tr:last-child td{border-bottom:none}
.mtable tr:hover td{background:rgba(239,231,216,.02)}
.mtable tr.pending td{background:rgba(232,64,44,.045)}
.memail{font-weight:600;white-space:nowrap}
.mmeta{color:var(--muted);font-size:.8rem;white-space:nowrap}
.mnote{color:var(--ink-2);font-style:italic;max-width:42ch}
.mact{display:flex;align-items:center;gap:.45rem;justify-content:flex-end;white-space:nowrap}
.mcredits{display:flex;align-items:center;gap:.7rem;font-size:.8rem;color:var(--ink-2);white-space:nowrap}
.mcredits b{color:var(--ink);font-family:var(--mono);font-weight:500}
.creditbtn{font-size:.75rem;color:var(--gold-2);border:1px solid rgba(232,178,58,.35);border-radius:6px;padding:.15em .5em}
.creditbtn:hover{background:rgba(232,178,58,.12)}
.credit-in{display:flex;align-items:center;gap:1rem}
.credit-in input[type=number]{width:120px}
.credit-in input:disabled{opacity:.4}
.credit-in .toggle{margin:0;font-size:.85rem}
/* admin: pending requests panel on the dashboard */
.preq{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.65rem 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.preq:last-child{border-bottom:none;padding-bottom:0}
.preq .who b{font-weight:600}
.preq .who .note{color:var(--ink-2);font-size:.85rem;font-style:italic;margin-top:.1rem}
/* member: membership status card */
.mem-row{display:flex;justify-content:space-between;align-items:baseline;font-size:.88rem;margin-bottom:.55rem}
.mem-row span{color:var(--ink-2)}
.mem-row b{font-family:var(--mono);font-weight:500;font-size:.82rem}
.mem-track{height:6px;border-radius:999px;background:rgba(239,231,216,.1);overflow:hidden;margin:.35rem 0 .55rem}
.mem-fill{height:100%;border-radius:999px;background:var(--good);transition:width .3s}
.mem-fill.low{background:var(--bad)}
.mem-hint{color:var(--muted);font-size:.78rem}
/* pending view */
.pending-card{max-width:560px;margin:8vh auto 0;text-align:center;display:flex;flex-direction:column;gap:1.1rem;padding:2.3rem}
.pending-card h2{font-weight:600;font-size:1.3rem;letter-spacing:-.01em}
.pending-card p{color:var(--ink-2);font-size:.95rem}
.pending-card textarea{text-align:left}
/* expired banner */
.expire-banner{border:1px solid rgba(255,106,82,.45);background:rgba(255,106,82,.07);border-radius:16px;
  padding:1rem 1.2rem;margin-bottom:1.2rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.expire-banner b{color:var(--bad)}
.eb-form{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.eb-form input{min-width:280px;flex:1}
.view{animation:fade .16s ease both}   /* product motion: state change, not choreography */
@keyframes fade{from{opacity:0}to{opacity:1}}

/* panels — layered material: gradient surface, machined top highlight, grounded shadow */
.panel,.stat,.tablewrap,.voice,.hist{
  background:linear-gradient(180deg,#191411 0%,#141110 55%);
  box-shadow:inset 0 1px 0 rgba(239,231,216,.05), 0 1px 3px rgba(0,0,0,.35), 0 8px 24px -18px rgba(0,0,0,.8)}
.panel{border:1px solid var(--line);border-radius:12px;padding:1.15rem 1.3rem}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.9rem}
.panel-head.lg{margin-bottom:1.1rem}
.panel-head h2,.view>.panel-head h2{font-size:.98rem;font-weight:600}

/* dashboard stats */
.stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:.9rem;margin-bottom:.9rem}
.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:.9rem 1.1rem}
.stat-label{display:flex;align-items:center;gap:.5rem;color:var(--ink-2);font-size:.8rem;font-weight:500}
.stat-label svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.stat-val{font-family:var(--mono);font-size:1.5rem;margin-top:.35rem;letter-spacing:-.02em}
.stat-val small{font-family:var(--body);font-size:.82rem;color:var(--ink-2)}
.stat-cost .stat-val{color:var(--red)}

/* activity */
.act{display:flex;align-items:center;gap:.9rem;padding:.85rem 0;border-bottom:1px solid var(--line)}
.act:last-child{border-bottom:none}
.act-ic{width:34px;height:34px;border-radius:9px;background:var(--panel-2);display:grid;place-items:center;color:var(--red);flex:none}
.act-main{flex:1;min-width:0}
.act-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.act-meta{color:var(--muted);font-size:.82rem;text-transform:capitalize}

/* chips */
.chip{display:inline-flex;align-items:center;gap:.42em;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  padding:.28em .75em;border-radius:999px;border:1px solid var(--line-2);color:var(--ink-2);white-space:nowrap}
.chip::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
.chip-ready,.chip-done{color:var(--good);border-color:rgba(63,185,119,.45);background:rgba(63,185,119,.08)}
.chip-pending,.chip-running,.chip-queued{color:var(--red-2);border-color:rgba(255,90,68,.4);background:rgba(255,90,68,.08)}
.chip-error{color:var(--bad);border-color:rgba(255,106,82,.5);background:rgba(255,106,82,.1)}

/* lists (voices + history) */
.grid-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.1rem}
.voice{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:1.3rem}
.voice-top{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.voice-name{font-weight:600;font-size:1.08rem}
.voice-meta{color:var(--muted);font-size:.82rem;margin-top:.15rem}
.voice-actions{margin-top:1rem;display:flex;justify-content:flex-end}
.hist{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:1.2rem 1.3rem;display:grid;grid-template-columns:1fr auto;gap:.7rem 1rem;align-items:center}
.hist-main{min-width:0}
.hist-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist-meta{color:var(--muted);font-size:.82rem;margin-top:.15rem}
.hist-right{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}
.hist-player{grid-column:1/-1}

/* empty state */
.empty{text-align:center;padding:3rem 1rem;color:var(--ink-2)}
.empty h3{color:var(--ink);font-size:1.05rem;margin-bottom:.4rem;font-weight:600}
.empty-mark{display:inline-block;margin-bottom:1rem;opacity:.7}
.brand-mark{display:inline-flex;align-items:flex-end;gap:3px;height:22px}
.brand-mark i{width:3px;border-radius:2px;background:var(--red)}
.brand-mark i:nth-child(1){height:35%}.brand-mark i:nth-child(2){height:100%}.brand-mark i:nth-child(3){height:60%}.brand-mark i:nth-child(4){height:85%}.brand-mark i:nth-child(5){height:45%}
.brand-mark.lg{height:40px;gap:5px}.brand-mark.lg i{width:5px}

/* progress */
.prog{margin:.8rem 0 .2rem}
.prog-track{height:6px;border-radius:999px;background:rgba(239,231,216,.1);overflow:hidden}
.prog-fill{height:100%;background:linear-gradient(90deg,var(--red),var(--red-2));transform-origin:left;transition:transform .5s ease}
.prog-meta{display:flex;justify-content:space-between;font-size:.78rem;color:var(--ink-2);margin-top:.45rem}
.step-txt{color:var(--ink)}

/* studio */
.studio{display:grid;grid-template-columns:1fr 300px;gap:1.2rem;align-items:start}
.studio-main{display:flex;flex-direction:column;gap:1.1rem}
.fld{display:flex;flex-direction:column;gap:.4rem}
.fld>span{font-size:.85rem;color:var(--ink-2);font-weight:500}
.fld>span em{font-style:normal;color:var(--muted)}
.lang-hint{font-size:.84rem;color:var(--ink-2);background:rgba(232,64,44,.08);border:1px solid rgba(232,64,44,.22);border-radius:10px;padding:.65rem .85rem;margin-top:-.3rem}
.lang-hint b{color:var(--red);font-weight:600}
/* studio mode switch: red = clone (local), gold = professional (premium) */
:root{--gold:#e8b23a;--gold-2:#f4c95a}
.modeswitch{display:inline-flex;gap:.25rem;padding:.25rem;border:1px solid var(--line-2);border-radius:12px;background:rgba(0,0,0,.25);margin-bottom:.4rem}
.ms-opt{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem .95rem;border-radius:9px;font-weight:600;font-size:.9rem;color:var(--ink-2);transition:background .15s,color .15s}
.ms-opt:hover{color:var(--ink)}
.studio[data-mode="local"] .ms-opt[data-mode="local"]{background:linear-gradient(180deg,#f6533d,#e03a26);color:#fff}
.studio[data-mode="sarvam"] .ms-opt[data-mode="sarvam"]{background:linear-gradient(180deg,var(--gold-2),var(--gold));color:#1a1206}
.pro-badge{font-size:.6rem;font-weight:700;letter-spacing:.08em;padding:.15em .5em;border-radius:999px;background:rgba(232,178,58,.22);color:var(--gold-2);border:1px solid rgba(232,178,58,.4)}
.studio[data-mode="sarvam"] .ms-opt[data-mode="sarvam"] .pro-badge{background:rgba(26,18,6,.25);color:#1a1206;border-color:transparent}
/* show the right fields per mode */
.studio[data-mode="local"] .sarvam-only{display:none}
.studio[data-mode="sarvam"] .local-only{display:none}
/* professional mode paints the Generate button + estimate accents gold */
.studio[data-mode="sarvam"] #generate-btn{background:linear-gradient(180deg,var(--gold-2),var(--gold));color:#1a1206}
.studio[data-mode="sarvam"] .slider span b{color:var(--gold-2)}
select,textarea,input[type=email],input[type=password],input[type=text],input[type=number]{
  background:linear-gradient(180deg,#0c0a08,#0f0c0a);border:1px solid var(--line-2);border-radius:10px;
  padding:.7rem .85rem;font-size:.95rem;width:100%;transition:border-color .15s,box-shadow .15s;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.35)}
select{appearance:none;-webkit-appearance:none;padding-right:2.5rem;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239b958a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right .9rem center}
select:focus,textarea:focus,input:focus{outline:none;border-color:var(--red);box-shadow:inset 0 1px 2px rgba(0,0,0,.35), 0 0 0 3px rgba(232,64,44,.16)}
textarea{resize:vertical;line-height:1.5;font-family:var(--body)}
.est{display:flex;gap:1.6rem}
.est div{display:flex;flex-direction:column}
.est b{font-family:var(--mono);font-size:1.25rem}
.est small{color:var(--muted);font-size:.75rem}
.studio-side h3{font-weight:600;font-size:.95rem;margin-bottom:1rem}
.slider{display:block;margin-bottom:1.2rem}
.slider span{display:flex;justify-content:space-between;font-size:.85rem;color:var(--ink-2);margin-bottom:.5rem}
.slider span b{color:var(--red);font-family:var(--mono)}
.slider input[type=range]{width:100%}
.toggle{display:flex;align-items:center;gap:.6rem;font-size:.9rem;margin-top:.9rem;cursor:pointer}
.toggle input{width:auto}
.studio-job{margin:.2rem 0}
.studio-result{margin-top:.4rem}

/* waveform player (built by app.js) */
.wave-player{display:flex;align-items:center;gap:.8rem;margin-top:.9rem}
.wp-play{width:40px;height:40px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;flex:none;transition:transform .2s,background .2s}
.wp-play:hover{transform:scale(1.07);background:var(--red-2)}
.wp-play svg{width:18px;height:18px;fill:currentColor}
.wp-canvas{flex:1;height:44px;width:100%}
.wp-time{font-family:var(--mono);font-size:.76rem;color:var(--ink-2);flex:none;min-width:76px;text-align:right}

/* dialogs */
.dlg{border:none;background:transparent;padding:0;max-width:460px;width:calc(100% - 2rem);margin:auto;max-height:92vh}
.dlg[open]{display:block}
.dlg::backdrop{background:rgba(6,4,3,.72);backdrop-filter:blur(4px)}
.dlg form{background:linear-gradient(180deg,#1b1512,#141110);border:1px solid var(--line-2);border-radius:18px;padding:1.9rem;position:relative;color:var(--ink);
  box-shadow:inset 0 1px 0 rgba(239,231,216,.06), 0 24px 70px -20px rgba(0,0,0,.9);display:flex;flex-direction:column;gap:1rem}
.dlg h2{color:var(--ink)}
.dlg-x{position:absolute;top:1.1rem;right:1.2rem;color:var(--muted);font-size:1rem}.dlg-x:hover{color:var(--ink)}
.dlg h2{font-weight:600;font-size:1.2rem;letter-spacing:-.01em}
.dlg-sub{color:var(--ink-2);font-size:.92rem;margin-top:-.5rem}
.dlg-hint{color:var(--muted);font-size:.82rem}
.err{color:var(--bad);font-size:.88rem}
.drop{display:flex;flex-direction:column;align-items:center;gap:.7rem;border:1.5px dashed var(--line-2);border-radius:14px;
  padding:1.8rem 1.6rem;text-align:center;color:var(--ink-2);cursor:pointer;user-select:none;-webkit-user-select:none;
  transition:border-color .2s,background .2s}
.drop:hover,.drop.over{border-color:var(--red);background:rgba(232,64,44,.06)}
.drop-ic{width:28px;height:28px;stroke:var(--red);fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.drop u{color:var(--red);text-underline-offset:2px}
.drop.has-file{border-style:solid;border-color:var(--good);color:var(--ink)}
.drop.has-file .drop-ic{stroke:var(--good)}
#drop-text{margin:0;font-size:.92rem}

/* ---- premium material pass (shared with the landing's quality bar) ---- */
.topbar{background:linear-gradient(180deg,rgba(20,15,12,.92),rgba(13,11,9,.85))}
.voice,.hist{transition:transform .18s ease,border-color .18s ease}
.voice:hover,.hist:hover{transform:translateY(-2px);border-color:var(--line-2)}
.stat{transition:border-color .18s ease}
.stat:hover{border-color:var(--line-2)}
.v-avatar{width:38px;height:38px;border-radius:10px;flex:none;display:grid;place-items:center;font-weight:700;font-size:1rem;color:#fff;
  background:linear-gradient(145deg,#ff5a44,#b52716);box-shadow:inset 0 1px 0 rgba(255,255,255,.25)}
.voice-top{align-items:center}
.voice-id{display:flex;align-items:center;gap:.75rem;min-width:0}
.sbar{background:linear-gradient(180deg,var(--red-2),var(--red))}
.empty{padding:3.2rem 1rem}
.empty p{max-width:38ch;margin-inline:auto}
.wave-player{background:rgba(0,0,0,.25);border:1px solid var(--line);border-radius:10px;padding:.5rem .7rem;box-shadow:inset 0 1px 3px rgba(0,0,0,.35)}
.side-brand,.brand{user-select:none}
.gate-card{background:linear-gradient(180deg,rgba(25,20,17,.55),rgba(13,11,9,.3));border:1px solid var(--line);border-radius:20px;
  box-shadow:inset 0 1px 0 rgba(239,231,216,.05), 0 30px 80px -30px rgba(0,0,0,.9);padding:3rem 2.6rem;max-width:560px}

/* responsive */
@media(max-width:820px){
  .shell{grid-template-columns:1fr}
  .side{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:.8rem 1.2rem;border-right:none;border-bottom:1px solid var(--line)}
  .side-nav{flex-direction:row;flex-wrap:wrap;margin-left:auto}
  .side-foot{margin:0;flex-direction:row;align-items:center;gap:1rem;width:100%}
  .acct{border-top:none;padding-top:0}
  .studio{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.orb-mark{animation:none}.view{animation:none}}
