/* Our desktop workspace. Measurements and navigation follow the supplied TH Live reference. */
:root,:root[data-brand] {
  --primary:#1c3a6e;--primary-ink:#16305c;--primary-soft:#e8eef8;
  --accent:#d12b21;--accent-soft:#fdecea;--danger:#c53028;--danger-soft:#fdecea;
  --bg:#f7f6f2;--card:#fff;--card-2:#f1f3f6;--ink:#0f1b33;--muted:#5a6272;--icon:#687386;
  --line:#dfe2e7;--line2:#cdd3dc;--success:#2f7d4f;--success-soft:#e8f5ee;
  --warn:#8a6300;--warn-soft:#fdf3e0;--log-bg:#f7f8fa;--radius:14px;
  --shadow:0 8px 28px rgb(15 27 51 / 5%);
}
:root[data-theme="dark"],:root[data-brand][data-theme="dark"] {
  --primary:#86aaf0;--primary-ink:#b4ccff;--primary-soft:#243652;
  --accent:#ed685b;--accent-soft:#432828;--danger:#dc5149;--danger-soft:#402724;
  --bg:#141923;--card:#1b2230;--card-2:#242e3e;--ink:#edf1f8;--muted:#a8b3c5;--icon:#a2afc3;
  --line:#323e50;--line2:#46536a;--success:#7bc898;--success-soft:#1d3a30;
  --warn:#eac36d;--warn-soft:#3d3422;--log-bg:#151c27;--shadow:0 8px 28px rgb(0 0 0 / 10%);
}
*{box-sizing:border-box}html,body{height:100%}body{overflow:hidden;font-size:14px;line-height:1.5;background:var(--bg)}
[hidden]{display:none!important}button,a,input,select,textarea{outline-offset:3px}button:focus-visible,a:focus-visible{outline:2px solid var(--primary)}
.app{height:100vh;min-height:0;grid-template-columns:240px minmax(0,1fr);overflow:hidden}
aside{height:100%;min-height:0;position:relative;padding:0;gap:0;overflow:hidden;background:var(--card);border-right:1px solid var(--line)}
.studio-brand{height:105px;flex:none;display:flex;align-items:flex-start;justify-content:center;flex-direction:column;gap:0;padding:12px 24px}
.studio-wordmark{display:flex;align-items:baseline;color:var(--primary-ink);font-size:32px;line-height:1.1;font-weight:800;letter-spacing:-1.3px}
.studio-wordmark>span:first-child{color:var(--accent)}.studio-wordmark .brand-ai{margin-left:6px;font-size:15px;letter-spacing:0;color:var(--accent)}
.studio-brand small{margin-top:7px;font-size:10px;font-weight:500;color:var(--muted);letter-spacing:.4px}
aside>nav{padding:8px 12px;overflow-y:auto;gap:4px}aside nav a{height:43px;gap:12px;padding:0 12px;font-size:13px;font-weight:600;border-radius:9px;color:var(--muted)}
aside nav a .ic{width:19px;height:19px;stroke-width:1.8}aside nav a.active{background:var(--primary-soft);color:var(--primary-ink)}aside nav a.active .ic{color:var(--primary-ink)}
.aside-foot{margin-top:auto;padding:12px;flex:none}.aside-foot nav{margin-top:8px}.studio-system{display:flex;gap:10px;align-items:center;background:var(--card-2);padding:11px 12px;border-radius:9px;color:var(--muted);font-size:11px;font-weight:600}
.studio-system i,.studio-live-count i{width:7px;height:7px;border-radius:50%;background:var(--warn);flex:none;box-shadow:0 0 0 3px var(--warn-soft)}
.studio-system[data-state="ready"]{background:var(--success-soft);color:var(--success)}.studio-system[data-state="ready"] i{background:var(--success);box-shadow:0 0 0 3px rgb(47 125 79 / 10%)}
.studio-system[data-state="lost"]{background:var(--danger-soft);color:var(--danger)}.studio-version{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;padding:15px 12px 3px;opacity:.8}
.body{height:100vh;min-height:0;overflow:hidden}.top{flex:none;height:72px}header.top{padding:0 28px;position:relative;background:var(--card);z-index:5}
.top-breadcrumb strong,.top-breadcrumb small{display:block}.top-breadcrumb strong{font-size:14px;font-weight:700}.top-breadcrumb small{font-size:11px;color:var(--muted);margin-top:2px}
.hdr-right{gap:12px}.hdr-right .user #meName{display:none}.hdr-right .user{border-left:1px solid var(--line);padding-left:8px}.hdr-right .credits{background:var(--card);border:1px solid var(--line);color:var(--ink);font-size:12px;padding:6px 10px}
.studio-live-count{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:99px;padding:7px 11px;font-size:11px;white-space:nowrap}.studio-live-count i{background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
#studioTheme{border:1px solid var(--line);background:var(--card);width:34px;height:34px;border-radius:9px;color:var(--ink)}
.lang-sel{max-width:112px;padding:6px 9px;font-size:12px;border-radius:8px}.workspace-scroll{min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding:28px;overscroll-behavior:contain}
.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:1500px;margin:0 auto 22px}.workspace-heading .crumb{display:block}.workspace-heading h1{font-size:26px;letter-spacing:-.5px;line-height:1.3}.workspace-heading p{margin:5px 0 0;font-size:12px}
.workspace-heading #hdrActions{flex-wrap:wrap;justify-content:flex-end}.back-link{display:flex;align-items:center;gap:4px;padding:0;margin-bottom:10px;font-size:12px;font-weight:600;cursor:pointer;color:var(--primary-ink)}.back-link .ic{width:15px;height:15px}
main{padding:0;max-width:1500px;margin:auto;width:100%}button,.btn{border-radius:8px;font-size:13px;font-weight:600;padding:9px 13px}button.primary,.btn.primary{background:#1c3a6e;color:#fff;border-color:#1c3a6e}button.danger,.btn.danger{background:#d12b21;border-color:#d12b21}
button:hover,.btn:hover{filter:none;background:var(--card-2)}button.primary:hover,.btn.primary:hover{background:#16305c}button.danger:hover{background:#b9231a}
input,select,textarea{border-radius:8px;padding:9px 11px;font-size:13px;line-height:1.5;background:var(--card);border-color:var(--line2)}textarea{resize:vertical}label{font-size:12px;font-weight:600}.card{padding:20px;margin-bottom:18px;box-shadow:var(--shadow);border:1px solid var(--line)}.card-head{margin-bottom:18px}.card-head h3{font-size:15px}.card-head .hint{font-size:12px;line-height:1.6}.form{gap:15px}.form-actions{margin-top:3px}
.studio-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.summary-cell{display:flex;align-items:center;gap:13px;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.summary-icon{width:42px;height:42px;display:grid;place-items:center;background:var(--primary-soft);border-radius:11px;color:var(--primary-ink);flex:none}.summary-icon.green{color:var(--success);background:var(--success-soft)}.summary-icon.red{color:var(--danger);background:var(--danger-soft)}.summary-icon.gold{color:var(--warn);background:var(--warn-soft)}.summary-cell small{color:var(--muted);font-size:11px}.summary-cell b{display:block;font-size:23px;line-height:1.2;margin-top:3px;font-weight:700}
.account-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--card);border:1px solid var(--line);padding:11px;border-radius:12px;margin-bottom:20px}.account-filters{display:flex;gap:5px;overflow:auto}.account-filters button{border-color:transparent;padding:7px 12px;font-size:12px;background:transparent;color:var(--muted)}.account-filters button.active{background:#1c3a6e;color:#fff}.account-filters span{font-size:10px;opacity:.8;margin-left:3px}.account-search{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:8px;padding-left:10px;min-width:220px;max-width:290px;color:var(--muted)}.account-search input{border:0;background:transparent;padding:7px;font-weight:400}.account-search .ic{width:17px;height:17px}
.cards{grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:18px}.cards.account-grid{grid-template-columns:repeat(auto-fill,minmax(285px,1fr))}
.card.chan{padding:0;overflow:hidden;box-shadow:0 4px 18px rgb(15 27 51 / 4%)}.card.chan.onair{border-color:var(--accent)}.account-head{display:flex;align-items:center;gap:12px;padding:19px 18px 15px}.account-avatar{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:50%;background:var(--primary-soft);color:var(--primary-ink);font-weight:700;font-size:19px;position:relative}.account-avatar:after{content:"";position:absolute;bottom:0;right:0;background:var(--card);width:13px;height:13px;border-radius:50%;border:3px solid var(--card);box-shadow:inset 0 0 0 4px var(--muted)}.onair .account-avatar:after{box-shadow:inset 0 0 0 4px var(--success)}
.account-name{min-width:0;flex:1}.account-name h3{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-name p{margin:3px 0 0;font-size:11px;color:var(--muted)}.platform-tag{display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;background:var(--card-2);border-radius:5px;padding:3px 7px;color:var(--ink)}
.account-body{padding:0 18px 18px}.account-status{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.account-state{font-size:11px;color:var(--muted);display:flex;gap:6px;align-items:center}.account-state i{width:6px;height:6px;background:var(--muted);border-radius:50%}.account-state.live{color:var(--success)}.account-state.live i{background:var(--success)}.account-config{border-radius:9px;border:1px solid var(--line);background:var(--bg);padding:12px;display:grid;gap:8px}.account-config-row{display:flex;align-items:center;gap:8px;font-size:11px;min-width:0}.account-config-row .ic{width:15px;height:15px;color:var(--muted)}.account-config-row span{color:var(--muted);flex:none;width:62px}.account-config-row strong{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.account-ready{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin-top:15px;color:var(--muted)}.account-ready b{color:var(--primary-ink);font-weight:600}.account-body .bar{margin:7px 0 0;height:4px;background:var(--line)}.account-body .bar i{background:#1c3a6e}.account-missing{font-size:10px;color:var(--warn);min-height:16px;margin:7px 0 0;line-height:1.6}
.account-footer{display:flex;align-items:center;gap:7px;padding:12px 18px;border-top:1px solid var(--line);background:var(--card)}.account-footer .account-open{flex:1}.account-footer .iconbtn{margin-left:auto;width:29px;height:29px}.account-footer button{font-size:11px;padding:8px 10px}.account-footer .ic{width:15px;height:15px}
.account-empty{grid-column:1/-1;display:flex;align-items:center;flex-direction:column;padding:55px 24px;border:1px dashed var(--line2);border-radius:14px;text-align:center;background:var(--card)}.account-empty>.ic{width:38px;height:38px;color:var(--primary);margin-bottom:16px}.account-empty h3{font-size:17px}.account-empty p{font-size:12px;color:var(--muted);max-width:440px;margin:8px 0 22px}
#liveSteps{margin-top:20px;background:var(--card);box-shadow:none}#liveSteps .steps{margin:8px 0 0}#liveSteps .steps li{font-size:11px;align-items:flex-start;line-height:1.7}#liveSteps .steps li b{border-radius:7px;background:var(--primary-soft)}
.channel-identity{display:flex;align-items:center;gap:12px;background:var(--card);padding:16px 20px;border:1px solid var(--line);border-radius:12px 12px 0 0}.channel-identity .account-avatar{width:38px;height:38px;font-size:16px}.channel-identity .identity-main{min-width:0;flex:1}.identity-main b{display:block;font-size:13px}.identity-main small{font-size:11px;color:var(--muted)}.identity-actions{display:flex;gap:8px;flex-wrap:wrap}.identity-actions button{font-size:11px;padding:7px 11px}
#chTabs{background:var(--card);border:1px solid var(--line);border-top:0;border-radius:0 0 12px 12px;margin-bottom:24px;padding:0 14px;gap:8px}#chTabs a{font-size:12px;padding:15px 12px;border-bottom-width:3px;margin-bottom:0}#chTabs a .ic{width:17px;height:17px}#chTabs a.active{color:var(--primary-ink);border-color:var(--primary)}
.section-symbol{display:grid;place-items:center;background:var(--primary-soft);color:var(--primary-ink);width:36px;height:36px;border-radius:9px}.room-title-field{grid-column:span 2}.studio-room-form .form{grid-template-columns:1fr 1fr 1fr}.studio-room-form .form-actions{justify-content:flex-end}
.identity-main .dirty-label{color:var(--warn);font-size:10px;margin-top:4px}
.stats{gap:14px}.stat{border-radius:12px;padding:17px;background:var(--card);border:1px solid var(--line);box-shadow:none}.stat .muted{font-size:11px}.stat b{font-size:24px;line-height:1.25;display:block;margin-top:5px}.stats .stat b.small{font-size:13px}.grid2{gap:20px}.checklist li{padding:11px 0}.checklist li small{line-height:1.6;font-size:11px}.checklist li b{font-size:12px}
table{font-size:12px}th{font-size:11px;background:var(--card-2);font-weight:600;padding:11px 13px}td{padding:13px}tr.empty td{padding:40px 16px}.pill{font-size:10px;border-radius:5px;padding:3px 7px}.tabs{gap:12px}.tabs a{font-size:13px}.notice{font-size:12px;line-height:1.65}.emptybox{background:var(--bg);font-size:12px;padding:32px 20px}
.console-grid{gap:20px}.console-left,.console-right{min-width:0}.console-left video{max-height:440px;background:#0d1524;object-fit:contain;border-radius:10px}.console .log{background:var(--log-bg);border:1px solid var(--line);border-radius:9px}.console .stats{grid-template-columns:repeat(6,minmax(0,1fr))}.console .stat{padding:12px}.console .stat b{font-size:20px}.sim{padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--bg)}
.tk-connect{padding:16px;background:var(--primary-soft);border:1px solid var(--line);border-radius:10px}.tk-row{flex-wrap:wrap}.tk-mode{max-width:360px}.tk-connect .hint{margin-bottom:0}.prodcard{border-radius:9px}.modal-back{z-index:70}.modal{max-height:88vh;overflow:auto}.toast{background:#1c3a6e;max-width:460px;font-size:12px;border-radius:9px}
.clip-preview-dialog{width:min(800px,90vw);border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);padding:20px}.clip-preview-dialog::backdrop{background:rgb(5 15 30 / 65%)}.clip-preview-dialog video{width:100%;max-height:65vh;background:#0d1524;border-radius:10px}.clip-preview-dialog .card-head{align-items:center}.clip-preview-dialog h3{overflow-wrap:anywhere}
.studio-stage{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;margin-bottom:4px}.studio-stage .card{min-width:0}.stage-screen{height:330px;background:#101a2b;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center}.stage-screen video{width:100%;height:100%;object-fit:contain}.stage-placeholder{display:flex;align-items:center;flex-direction:column;color:#a9b8d1;text-align:center;padding:24px;gap:12px}.stage-placeholder>.ic{width:38px;height:38px;stroke-width:1.5;color:#7193c8}.stage-placeholder strong{font-size:14px;color:#d2dded}.stage-placeholder span{font-size:11px}.stage-placeholder button{margin-top:6px;color:#d2dded;border-color:#43536e;background:#22314a}.stage-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:13px;font-size:11px;color:var(--muted)}.stage-meta>span{display:flex;align-items:center;gap:7px}.stage-meta .ic{width:15px;height:15px}.stage-basket{display:flex;flex-direction:column}.stage-product-list{min-height:250px;max-height:330px;overflow:auto;flex:1}.stage-product{display:flex;gap:10px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.stage-product:last-child{border:0}.basket-index{display:grid;place-items:center;width:30px;height:30px;flex:none;background:var(--primary-soft);border-radius:7px;color:var(--primary-ink);font-size:11px;font-weight:700}.stage-product>div{min-width:0;flex:1}.stage-product b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.stage-product small{display:block;font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stage-product>strong{font-size:12px;color:var(--accent)}.stage-products-empty{height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;color:var(--muted);padding:25px}.stage-products-empty>.ic{width:30px;height:30px}.stage-products-empty b{font-size:13px;color:var(--ink)}.stage-products-empty p{font-size:11px;max-width:260px;margin:0 0 5px}.stage-bottom{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);display:flex;align-items:center;gap:7px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--muted)}
.library-view-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.library-view-bar button{font-size:11px;padding:6px 11px}.clip-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px}.clip-tile{overflow:hidden;border:1px solid var(--line);border-radius:11px;background:var(--card)}.clip-cover{display:block;position:relative;width:100%;height:185px;overflow:hidden;border:0;border-radius:0;background:#152034;padding:0}.clip-cover:hover{background:#152034}.clip-cover video{width:100%;height:100%;object-fit:contain;pointer-events:none}.clip-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:rgb(255 255 255 / 90%);color:#1c3a6e;box-shadow:0 3px 15px rgb(0 0 0 / 15%)}.clip-cover>small{position:absolute;right:8px;bottom:8px;color:#fff;background:rgb(0 0 0 / 60%);padding:2px 6px;border-radius:4px;font-size:10px}.clip-caption{padding:13px}.clip-caption>b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.clip-caption>div{display:flex;justify-content:space-between;align-items:center;margin-top:10px;font-size:10px;color:var(--muted)}
.auth{height:100vh;overflow:auto}.auth-side h1{color:var(--primary-ink)}.auth-card{box-shadow:var(--shadow)}
@media(max-width:850px){.studio-stage{grid-template-columns:1fr}}
@media(min-width:1600px){.app{grid-template-columns:256px minmax(0,1fr)}.workspace-scroll{padding:30px 34px}.cards.account-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1180px){.app{grid-template-columns:210px minmax(0,1fr)}.workspace-scroll{padding:22px}.studio-summary{gap:10px}.summary-cell{padding:13px;gap:9px}.summary-icon{width:34px;height:34px}.account-toolbar{flex-wrap:wrap}.account-search{flex:1;max-width:none}.workspace-heading{align-items:flex-start}.workspace-heading h1{font-size:23px}.hdr-right{gap:8px}.console .stats{grid-template-columns:repeat(3,minmax(0,1fr))}.identity-actions{max-width:50%;justify-content:flex-end}.studio-summary small{font-size:10px}}
@media(max-width:850px){.app{grid-template-columns:72px minmax(0,1fr)}.studio-brand{padding:16px 11px;height:84px}.studio-wordmark{font-size:22px}.studio-wordmark .brand-ai,.studio-brand small{display:none}aside nav a{justify-content:center;padding:0}aside nav a span{display:none}aside>nav{padding:8px}.aside-foot{padding:8px}.studio-system{justify-content:center;padding:12px}.studio-system span,.studio-version{display:none}.workspace-scroll{padding:18px}header.top{padding:0 18px}.top-breadcrumb small,.studio-live-count{display:none}.studio-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-heading{flex-wrap:wrap}.workspace-heading #hdrActions{justify-content:flex-start}.grid2{grid-template-columns:1fr}.channel-identity{flex-wrap:wrap}.identity-actions{max-width:100%;width:100%;justify-content:flex-start}.studio-room-form .form{grid-template-columns:1fr 1fr}.room-title-field{grid-column:1/-1}.card{overflow-x:auto}.cards.account-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}}
@media(max-width:520px){.app{grid-template-columns:58px minmax(0,1fr)}.workspace-scroll{padding:12px}.top{height:60px}.top-breadcrumb strong{font-size:12px}.hdr-right .credits,.hdr-right .user{display:none}.studio-brand{padding:12px 7px}.studio-wordmark{font-size:20px}.workspace-heading h1{font-size:22px}.studio-summary{gap:8px}.summary-cell{padding:12px}.summary-icon{display:none}.summary-cell b{font-size:22px}.account-toolbar{padding:8px}.account-search{min-width:0;width:100%}.account-filters{max-width:100%}.account-filters button{font-size:11px;padding:7px}.cards.account-grid{grid-template-columns:1fr}.card{padding:15px}.account-head{padding:15px}.account-body{padding:0 15px 15px}.workspace-heading #hdrActions button{font-size:11px}.console .stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
