/* Tease Browser + Stream Studio, copied from the real code (r83-build):
   chrome — desktop/src/shared/browserChrome/chrome.css, rail.css; page — admin tokens.css, StudioCard/StudioHeader/StreamHub.
   The window is drawn at its real size 1400×900 and scaled to fit (studio.js sets --s). */
.tb{--s:.84;position:relative;margin:64px auto 0;max-width:1180px;aspect-ratio:1400/900;text-align:left;border-radius:12px;overflow:hidden;
  box-shadow:0 0 0 1px rgba(255,255,255,.08),0 40px 120px -30px rgba(0,0,0,.9),0 0 90px -40px rgba(255,69,88,.4)}
.tb svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tb-win{--bg:#30343a;--raised:#40454d;--line:#4c535d;--text:#f0f1f3;--dim:#bfc4cc;--accent:#c4b6fa;
  --pbg:hsl(240 14% 91%);--card:#fff;--fg:hsl(240 15% 11%);--mfg:hsl(240 7% 41%);--muted:hsl(240 20% 96.5%);--brd:hsl(240 10% 84%);
  --violet:hsl(250 100% 63%);--btn:hsl(249 13% 26%);
  position:absolute;left:0;top:0;width:1400px;height:900px;transform:scale(var(--s));transform-origin:0 0;
  display:flex;flex-direction:column;background:var(--bg);color:var(--text);
  font:13px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;-webkit-font-smoothing:antialiased}

/* top bar 36px: traffic lights, back/forward/reload, tabs, menu — no address bar */
.tb-bar{flex:0 0 36px;display:flex;align-items:flex-end;gap:4px;padding-right:8px}
.tb-traffic{flex:0 0 70px;align-self:center;display:flex;gap:8px;padding-left:16px}
.tb-traffic i{width:12px;height:12px;border-radius:50%;background:#ff5f57}.tb-traffic i+i{background:#febc2e}.tb-traffic i+i+i{background:#28c840}
.tb-navs{align-self:center;display:flex;gap:2px;margin-right:6px}
.tb-navs b,.tb-menu{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:var(--dim)}
.tb-navs svg,.tb-menu svg{width:15px;height:15px}
.tb-navs b+b{opacity:.45}.tb-navs b:last-child{opacity:1}
.tb-menu{align-self:center;margin-left:auto}
.tb-tabs{display:flex;align-items:flex-end;gap:6px;min-width:0}
.tb-tab{position:relative;display:flex;align-items:center;gap:7px;height:30px;max-width:220px;padding:0 6px 0 8px;border-radius:12px;color:var(--dim);font-size:13px;white-space:nowrap}
.tb-tab .tb-name{overflow:hidden;text-overflow:ellipsis}
.tb-tab:first-child{flex:none;margin-right:6px}
.tb-ico{flex:none;width:16px;height:16px;border-radius:4px;object-fit:cover}
.tb-ico--tool{display:grid;place-items:center;background:var(--raised);color:var(--text)}.tb-ico--tool svg{width:11px;height:11px}
.tb-air{flex:none;width:8px;height:8px;border-radius:50%;background:#e5484d}
.tb-x{display:grid;place-items:center;width:18px;height:18px;border-radius:5px;font-weight:400;font-size:15px;color:#5a5f6a}
/* active tab over a page wears the page's own colour (workspace.js:172 → theme.ts paintStatusBar = body background), rounded on top, one surface with the page */
.tb-tab.is-on{background:var(--pbg);color:#16161a;border-radius:12px 12px 0 0;padding-right:4px}
.tb-tab.is-on::before,.tb-tab.is-on::after{content:"";position:absolute;bottom:0;width:12px;height:12px;background:radial-gradient(circle at 0 0,transparent 11.5px,var(--pbg) 12px)}
.tb-tab.is-on::before{left:-12px;transform:scaleX(-1)}.tb-tab.is-on::after{right:-12px}
.tb-newtab{display:grid;place-items:center;width:28px;height:28px;margin-bottom:1px;border-radius:8px;color:var(--dim)}

.tb-body{flex:1;display:flex;min-height:0}
/* rail 56px: Tease mark, Chat Space, Studio (here), Search, then accounts */
.tb-rail{flex:0 0 56px;display:flex;flex-direction:column;align-items:center;background:var(--bg);border-right:1px solid var(--line);padding-top:4px}
.tb-row{position:relative;display:grid;place-items:center;width:56px;height:44px}
.tb-row--home{height:46px}
.tb-brand{width:26px!important;height:26px!important;fill:var(--text)!important;stroke:none!important}
.tb-tool{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--raised);color:var(--dim)}
.tb-row.is-here::before{content:"";position:absolute;left:0;top:50%;width:3px;height:20px;transform:translateY(-50%);border-radius:0 3px 3px 0;background:var(--accent)}
.tb-row.is-here .tb-tool{background:var(--accent);color:#191922}
.tb-accs{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;margin-top:6px;padding-top:10px;border-top:1px solid var(--line)}
.tb-accs hr{width:30px;margin:2px 0;border:0;border-top:1px solid var(--line)}
.tb-acc{position:relative;width:36px;height:36px;border-radius:50%}
.tb-acc img{width:100%;height:100%;border-radius:50%;object-fit:cover;opacity:.6}
.tb-acc.is-open img{opacity:1;box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--accent)}
.tb-acc i{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#7d848f;border:2px solid var(--bg)}
.tb-acc i.on{background:#3ecf8e}
.tb-acc b{position:absolute;top:-4px;right:-6px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--accent);color:#191922;font-size:10px;line-height:16px;text-align:center}
.tb-acc--add{display:grid;place-items:center;background:var(--raised);color:var(--dim)}

/* page — admin light theme */
.tb-page{flex:1;min-width:0;overflow:hidden;background:var(--pbg);color:var(--fg);padding:16px 24px 0}
.st-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;height:40px}
.st-chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--brd);background:var(--card);font-size:13px;font-weight:600;white-space:nowrap}
.st-chip i{width:8px;height:8px;border-radius:50%;background:currentColor}
.st-chip b{font-weight:600;font-variant-numeric:tabular-nums}
.st-chip--live{background:hsl(0 62% 54%);border-color:hsl(0 62% 54%);color:#fff}
.st-chip--plain{font-weight:400}
.st-chip--ok{height:28px;background:rgb(16 185 129/.1);border-color:transparent;color:#047857}
.st-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border-radius:10px;color:var(--btn);font-size:13px;font-weight:500;white-space:nowrap}
.st-btn--icon{width:32px;padding:0;justify-content:center}
.st-btn .rec{width:12px;height:12px;border-radius:50%;background:#e5484d}
.st-golive{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 18px;border-radius:999px;background:hsl(0 62% 54%);color:#fff;
  font:600 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase}
.st-golive i{width:11px;height:11px;border-radius:2px;background:#fff}

/* board: 12 columns, 20px rows, cards 8px apart */
.st-board{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:20px;margin:20px -4px 0}
.st-card{margin:4px;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--card);border:1px solid hsl(240 19% 94%);border-radius:16px;
  box-shadow:0 1px 2px hsl(240 30% 20%/.06),0 10px 24px -12px hsl(240 30% 20%/.18)}
.st-preview{grid-column:1/9;grid-row:1/span 26}
.st-chat{grid-column:9/13;grid-row:1/span 40}
.st-connect{grid-column:1/5;grid-row:27/span 3;background:hsl(240 20% 96.5%/.3)}
.st-plats{grid-column:5/9;grid-row:27/span 16}
.st-head{flex:0 0 auto;display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 6px 6px 12px;border-bottom:1px solid hsl(240 10% 84%/.6);font-size:14px;font-weight:600}
.st-head>svg{color:var(--violet)}
.st-tools{display:flex;align-items:center;gap:4px;margin-left:auto}
.st-connect .st-head{border-bottom:0}

.st-stage{flex:1;min-height:0;display:flex;justify-content:center;padding:8px}
.st-cam{position:relative;height:100%;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:#000;box-shadow:0 0 0 2px rgb(239 68 68/.7)}
.st-cam video{display:block;width:100%;height:100%;object-fit:cover}
.st-tags{position:absolute;left:8px;top:8px;display:flex;gap:4px}
.st-tags b{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border-radius:4px;background:rgb(0 0 0/.55);color:#fff;font-size:12px;font-weight:500}
.st-tags b.st-rx{background:rgb(2 132 199/.85);font-weight:600}.st-rx svg{width:14px;height:14px}
.st-onair{position:absolute;right:8px;top:8px;padding:2px 6px;border-radius:4px;background:#dc2626;color:#fff;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.025em}

.st-chatbar{display:flex;align-items:center;justify-content:space-between;padding:6px 8px;border-bottom:1px solid var(--brd)}
.st-hub{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;padding:8px}
.st-filters{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:8px;border-bottom:1px solid var(--brd)}
.st-f{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border-radius:999px;border:1px solid var(--brd);background:var(--muted);color:var(--mfg);font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
.st-f.is-on{border-color:hsl(250 100% 63%/.4);background:hsl(250 100% 63%/.1);color:var(--violet)}
.st-f--acc{padding:0 8px 0 4px}
.st-av,.st-pa{position:relative;flex:none;display:block}
.st-av{width:20px;height:20px}.st-av img{width:20px;height:20px;border-radius:50%;object-fit:cover}
.st-av img.mk{position:absolute;right:-3px;bottom:-3px;width:11px;height:11px;border-radius:0}
.st-cue{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #fcd34d;border-radius:8px;background:#fffbeb;animation:msg-in .4s both}
.st-cue>svg{color:#d97706}
.st-cue small{display:block;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#b45309}
.st-cue b{font-size:14px;font-weight:600}
.st-cue em{margin-left:auto;font-style:normal;font-size:13px;color:#b45309}
.st-feed{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:flex-end;gap:1px;margin:0;padding:0;list-style:none;overflow:hidden}
.st-feed li{display:flex;align-items:flex-start;gap:6px;padding:2px 8px;border-radius:6px;font-size:14px;line-height:1.375;animation:msg-in .45s cubic-bezier(.2,.7,.2,1) both}
.st-feed li>img{flex:none;width:14px;height:14px;margin-top:3px}
.st-feed b{font-weight:700}
.st-feed em{flex:none;margin-left:4px;padding:0 6px;border-radius:999px;background:rgb(16 185 129/.15);color:#047857;font-style:normal;font-weight:700;font-size:.78em;line-height:1.7}
.st-feed li.is-big{background:rgb(16 185 129/.08);box-shadow:inset 3px 0 0 #10b981}
.st-feed li.is-big em{background:#10b981;color:#fff}
.st-feed li.is-cue{background:rgb(245 158 11/.1);padding:4px 8px}.st-feed li.is-cue b{color:#b45309;font-weight:600}
.st-feed time{margin-left:auto;padding-left:6px;font-size:.78em;line-height:1.75;color:var(--mfg)}
.st-composer{display:flex;align-items:center;gap:6px;padding:4px 4px 4px 6px;border:1px solid hsl(240 10% 84%/.7);border-radius:10px;background:var(--card)}
.st-to{display:inline-flex;align-items:center;gap:2px;height:28px;padding:0 8px 0 10px;border-radius:999px;background:var(--muted);font-size:13px}.st-to svg{width:13px;height:13px}
.st-ph{flex:1;color:var(--mfg);font-size:14px}
.st-send{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--violet);color:#fff}

.st-plats ul{margin:0;padding:4px 16px;list-style:none}
.st-plats li{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid hsl(240 10% 84%/.6)}
.st-pa{width:36px;height:36px}.st-pa>img:first-child{width:36px;height:36px;border-radius:50%;object-fit:cover}
.st-pa img.mk{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px}
.st-pa i{position:absolute;left:-1px;bottom:0;width:10px;height:10px;border-radius:50%;background:#22c55e;border:2px solid #fff;animation:pulse-g 1.8s infinite}
.st-plats li b{flex:1;font-size:14px;font-weight:600}
.st-sw{position:relative;width:32px;height:20px;border-radius:10px;background:var(--violet)}
.st-sw::after{content:"";position:absolute;right:4px;top:4px;width:12px;height:12px;border-radius:50%;background:#fff}

@keyframes msg-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes pulse-g{0%{box-shadow:0 0 0 0 rgb(34 197 94/.5)}70%{box-shadow:0 0 0 6px rgb(34 197 94/0)}100%{box-shadow:0 0 0 0 rgb(34 197 94/0)}}

/* phone: no browser chrome — the picture and the shared chat, as in the Studio phone view */
@media (max-width:640px){
  .tb{aspect-ratio:auto;margin-top:24px;border-radius:16px;overflow:visible;box-shadow:none}
  .tb-win{position:static;width:auto;height:auto;transform:none;background:none}
  .tb-bar,.tb-rail,.st-actions,.st-connect,.st-plats,.st-preview .st-head,.st-chatbar{display:none}
  .tb-page{padding:0;background:none;overflow:visible}
  .st-board{display:flex;flex-direction:column;gap:8px;margin:0}
  .st-card{margin:0}
  .st-stage{padding:0}
  .st-cam{width:100%;height:auto;aspect-ratio:4/3;border-radius:14px;box-shadow:none}
  .st-cam video{object-position:50% 30%}
  .st-tags b:not(.st-rx){display:none}
  .st-chat .st-head{height:40px;padding:0 12px}
  .st-chat .st-tools{display:none}
  .st-hub{position:relative;padding:8px 6px 6px;gap:6px}
  .st-filters{flex-wrap:nowrap;overflow:hidden;padding:0 4px 8px}
  .st-cue{position:absolute;z-index:2;left:6px;right:6px;top:6px;box-shadow:0 6px 18px rgb(0 0 0/.12)}
  .st-cue .st-btn{display:none}
  .st-feed{flex:none;height:auto}
  .st-feed li{font-size:13.5px}
  .st-feed li:nth-last-child(n+5){display:none}
  .st-feed time{display:none}
  .st-composer{display:none}
}
@media (prefers-reduced-motion:reduce){.st-feed li,.st-cue{animation:none}.st-pa i{animation:none}}
