/* Shared frontend UI theme. Media canvas, subtitle styling and source colors remain independent. */
:root{color-scheme:dark;--ui-bg:#0e0e12;--ui-panel:#17171d;--ui-border:#33333d;--ui-text:#ececf1;--ui-muted:#a4a4b1;--ui-action:#6c5ce7}
body.front-theme{background:var(--ui-bg);color:var(--ui-text);font-family:system-ui,-apple-system,"PingFang TC",sans-serif}
.front-theme header{background:#14141af2;border-bottom:1px solid #33333d;box-shadow:0 8px 28px #0002;backdrop-filter:blur(7px);color:var(--ui-text)}
.front-theme header a,.front-theme a{color:#b4a8ff}.front-theme header span,.front-theme p,.front-theme small,.front-theme .hint{color:var(--ui-muted)}
.front-theme .knowledge-nav a{color:#a4a4b1}.front-theme .knowledge-nav a[aria-current]{background:#6c5ce725;color:#d5ccff;border-color:#6c5ce755}
.front-theme :is(input,select,textarea){color:#ececf1;background:#101015;border-color:#33333d;accent-color:#9b8cf0}
.front-theme ::placeholder{color:#8b8b99;opacity:1}.front-theme :is(button,a,input,select,textarea):focus-visible{outline:2px solid #b4a8ff;outline-offset:3px}
.front-theme button:disabled{opacity:1;background:#303039;color:#bdbdc9;cursor:not-allowed}
.front-theme :is(.market-start,.template-card,.master-card,.roles-panel,.fx-library,.template-session){background:#17171d;border-color:#33333d;color:#ececf1}
.front-theme .market{margin-top:44px}.front-theme .market-heading small{color:#b4a8ff;letter-spacing:1px}.front-theme .market-heading h1{font-size:38px;letter-spacing:-1px}
.front-theme .market-start{border-radius:12px;padding:24px}.front-theme .market-start textarea{background:#101015;color:#ececf1;border-color:#33333d}
.front-theme .market-start-modes,.front-theme .mode-nav [role=tablist],.front-theme .switch{background:#101015;border:1px solid #33333d;padding:5px;border-radius:10px}
.front-theme .market-start-modes button,.front-theme .mode-nav [role=tab],.front-theme .switch button{background:transparent;color:#aaa9b5;box-shadow:none}
.front-theme .market-start-modes button[aria-pressed=true],.front-theme .mode-nav [aria-selected=true],.front-theme .switch button.on{background:#6c5ce72e;color:#ded7ff;box-shadow:inset 0 0 0 1px #6c5ce766}
.front-theme :is(#startFromChant,.template-body>button:first-of-type,.primary,#createDraft,#nativeChantSave,.login-submit){background:#6c5ce7;color:#fff;border:1px solid #8273ee;border-radius:9px;padding:12px 18px}
.front-theme :is(.template-settings,.chant-manual-link){background:transparent;color:#b4a8ff}
.front-theme #marketStartStatus,.front-theme #chantStatus{color:#b4a8ff}.front-theme .market-label span{color:#a4a4b1}
.front-theme .template-body h2,.front-theme .chant-panel h1,.front-theme .master-name h3{color:#ececf1}.front-theme .template-card{border-radius:12px}.front-theme .template-body small{color:#a4a4b1}
.front-theme .draft-item{border-color:#33333d}.front-theme .draft-item a{background:#242033;color:#d5ccff}.front-theme .draft-item button{color:#b6aabb}
.front-theme dialog{background:#17171d;color:#ececf1;border-color:#33333d;box-shadow:0 24px 80px #0008}.front-theme dialog::backdrop{background:#060609b3;backdrop-filter:blur(4px)}
.front-theme dialog :is(input[type=text],textarea),.front-theme #draftName{background:#101015;color:#ececf1;border-color:#33333d}
.front-theme :is(#closeTemplate,.dialog-head button){color:#d2cbed;background:transparent}.front-theme #scriptStats{background:#242033;color:#d5ccff}.front-theme #draftError{color:#ff9daa}
.front-theme .chant-cards{border-color:#33333d}.front-theme .chant-card{background:#17171d;border-color:#33333d}.front-theme .chant-card,.front-theme .chant-card b{color:#ececf1}.front-theme .chant-card small,.front-theme .chant-card>span{color:#a4a4b1}
.front-theme .chant-card[aria-pressed=true]{background:#6c5ce722}.front-theme .chant-panel textarea,.front-theme .chant-scope select{background:#101015;color:#ececf1;border-color:#33333d}
.front-theme #chantCopy{background:#211c33;color:#d2c5ff;border-color:#6154db80;box-shadow:none}.front-theme #chantCopy:hover{background:#2c2545}.front-theme .chant-help{border-color:#33333d;color:#a4a4b1}.front-theme .chant-connection{background:#1c2031}
.front-theme :is(.masters-policy,.master-chunks button,.template-session button){background:#242033;color:#d8d1f1}.front-theme .master-version{background:#101015;color:#d8d1f1;border-color:#33333d}.front-theme .masters-badge{background:#262037;color:#c9bfff}
.front-theme .master-body details{border-color:#33333d}.front-theme .master-body :is(p,span),.front-theme .masters-heading p,.front-theme .masters-policy p{color:#a4a4b1}
.front-theme :is(.footage-control,.shake-panel,.music-control,.caption-effects,.title-control,.subtitle-position,.effect-controls){background:#17171d;border-color:#33333d;color:#ececf1}
.front-theme .preview>div:not(.phone){border-color:#33333d}.front-theme .previewFoot{color:#a4a4b1}
.front-theme :is(.fx-card,.vb-card-preview){background:#202028;border-color:#33333d;color:#ececf1}.front-theme .fx-card.fx-selected{background:#302846;border-color:#9b8cf0}.front-theme :is(.fx-tools button,.fx-tag){background:#2b2440;color:#d1c4ff;border-color:#6154db66}
.front-theme .timelineScroll{background:#141419;border-color:#33333d}.front-theme .stats{color:#d1c4ff}.front-theme .toolbar>button{background:#292338;color:#e4ddff}.front-theme .edit-info{background:#17171d;border-color:#33333d}
.front-theme.login{border:1px solid #33333d;border-radius:16px;background:#17171d;box-shadow:0 20px 80px #0004}.front-theme.login input{background:#101015;color:#ececf1;border-color:#33333d}.front-theme.login button{background:#6c5ce7;color:white}.front-theme.login #switchLogin{background:transparent;color:#c3b7ff}
.front-theme .account-links button{background:#272233;color:#d3c7ff;border:1px solid #454052;border-radius:7px}
@media(max-width:760px){.front-theme .market-heading h1{font-size:28px}.front-theme header{height:auto;min-height:58px;flex-wrap:wrap;gap:12px;padding:14px 16px}.front-theme .market-start-modes button{padding:10px 12px;font-size:13px}.front-theme.login{margin:8vh 16px}.front-theme .market{padding:0 18px}}
.front-theme .knowledge-nav a{background:#202028;color:#c3c1ce}.front-theme .knowledge-nav a[aria-current]{background:#6c5ce72e;color:#ded7ff}
.front-theme :is(.camera-control,.role-pair article,.role-option,.role-upload,.role-steps,.role-generation){background:#17171d;border-color:#33333d;color:#ececf1}
.front-theme :is(.role-dialog,.role-dialog-head){background:#17171d;color:#ececf1}.front-theme .role-option.active{background:#29213c;border-color:#9b8cf0}.front-theme .role-muted{color:#a4a4b1}
.front-theme header button{background:#6c5ce7;color:#fff;border:1px solid #8273ee}

/* Dark transcript rows need their own text + state pairs, outside the video. */
.front-theme .sentence{color:#ececf1;background:#17171d}.front-theme .sentence .num{color:#c6b8ff}.front-theme .sentence .times{color:#b3b3c1}.front-theme .sentence:hover{background:#25232f;color:#fff}.front-theme .sentence.active{background:#302841;color:#fff;border-color:#a99afa}.front-theme .sourceHeading{background:#242032;color:#e0d7ff}.front-theme .sourceHeading span{color:#c8bddf}.front-theme .stats strong{color:#d3c7ff}
