@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Malayalam:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#111318;--panel:#191c23;--line:#2b303b;--muted:#9299a8;--text:#f4f1eb;--gold:#e5b96a;--orange:#cb8950;--red:#ed5b5b;--amber:#e6ad4d;--accent:#e5b96a}
*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,"Noto Sans Malayalam",sans-serif}body{min-width:320px}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.42;cursor:not-allowed}.app-shell{min-height:100vh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% -30%,#28252a 0,transparent 52%),var(--bg)}.topbar{height:72px;padding:0 clamp(18px,5vw,76px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff12}.brand{display:flex;gap:11px;align-items:center;color:#f4f1eb;text-decoration:none;font-size:13px;letter-spacing:2px;font-weight:500}.brand b{color:var(--gold)}.brand-mark{color:var(--orange);font-size:24px}.top-actions{display:flex;gap:14px;align-items:center}.icon-btn{width:42px;height:42px;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:12px;font-size:20px}.header-menu-wrap{position:relative}.header-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:15;min-width:190px;padding:6px;background:#1b1e26;border:1px solid #3a404d;border-radius:11px;box-shadow:0 14px 36px #0009}.header-menu-item{display:block;width:100%;padding:11px 12px;text-align:left;border:0;border-radius:7px;background:transparent;color:var(--text);font-size:12px}.header-menu-item:hover:not(:disabled){background:#ffffff0d}.destructive-menu-item{color:#ff7777}.destructive-menu-item:disabled{opacity:.42;cursor:not-allowed}.shutdown-btn{background:#c83e43;color:#fff}.shutdown-btn:hover:not(:disabled){background:#e04a50}.shutdown-upload-note{padding:10px 12px;border-left:3px solid var(--amber);background:#e6ad4d12;color:#e9c987!important;border-radius:4px}.connection-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid var(--line);border-radius:99px;color:#b9bfca;font-size:11px;white-space:nowrap}.connection-badge i,.hint-dot{width:7px;height:7px;border-radius:50%;background:#717887;display:inline-block}.connection-badge.connected i{background:#62c58c;box-shadow:0 0 10px #62c58c77}.connection-badge.reconnecting i{background:var(--amber);animation:pulse 1s infinite}.connection-badge.offline i{background:#e36a6a}.landing{width:min(1050px,calc(100% - 40px));margin:clamp(55px,10vh,115px) auto 90px}.eyebrow{font-size:10px;letter-spacing:2.2px;color:var(--orange);font-weight:700}.landing h1{font-size:clamp(48px,8vw,86px);line-height:.98;letter-spacing:-4px;margin:20px 0 18px;font-weight:650}.landing h1 span{color:var(--gold)}.intro{font-size:15px;color:#a5aab5;max-width:440px;line-height:1.7}.landing-status{display:flex;align-items:center;gap:12px;margin:32px 0 22px}.state-text{font-size:12px;color:#b3b9c4}.scene-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:26px}.scene-card{position:relative;text-align:left;min-height:190px;padding:25px 26px;background:linear-gradient(135deg,#222630,#191c23);border:1px solid #363b47;border-radius:18px;color:var(--text);transition:.2s}.scene-card:not(:disabled):hover{transform:translateY(-3px);border-color:var(--orange)}.scene-index{display:block;color:var(--orange);font-size:11px;letter-spacing:2px}.scene-name{display:block;font-size:29px;font-weight:600;margin-top:25px}.scene-caption{display:block;color:#9299a8;font-size:12px;margin-top:7px}.scene-arrow{position:absolute;right:25px;top:24px;color:var(--gold);font-size:22px}.connect-hint{margin-top:24px;color:#aeb4c0;font-size:12px;display:flex;align-items:center;gap:9px}.text-btn,.back-link{border:0;background:none;color:var(--gold);padding:4px}.inline-error{margin-top:14px;padding:12px 14px;border-radius:10px;background:#642c2c44;border:1px solid #a84b4b66;color:#ffaaaa;font-size:12px;overflow-wrap:anywhere}.scene-page{width:min(1480px,calc(100% - 40px));margin:32px auto 120px;flex:1}.page-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:22px}.back-link{font-size:12px;color:#aeb4c0;padding:0 0 9px}.page-heading h1{font-size:34px;margin:0}.status-panel{position:relative;padding:18px 22px;background:linear-gradient(110deg,#222630,#191c23);border:1px solid var(--line);border-radius:15px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.status-main{display:flex;align-items:center;gap:13px}.status-indicator{width:10px;height:10px;border-radius:50%;background:#777f8c;display:inline-block;flex:none}.status-indicator.recording{background:var(--red);box-shadow:0 0 0 5px #ed5b5b20;animation:pulse 1.4s infinite}.status-indicator.error{background:var(--red)}.status-indicator.busy{background:var(--amber)}.status-kicker{font-size:9px;color:var(--muted);letter-spacing:1.7px}.status-value{font-size:17px;font-weight:650;margin-top:4px}.status-meta{display:flex;gap:20px;color:var(--muted);font-size:11px;flex-wrap:wrap}.status-meta b{color:#e7e9ee;font-weight:600;margin-left:4px}.progress{height:3px;position:absolute;bottom:0;left:18px;right:18px;background:#ffffff12;overflow:hidden}.progress span{display:block;height:100%;background:var(--amber);transition:width .3s}.alert-error,.scene-warning{margin-top:12px;padding:12px 15px;border-radius:10px;font-size:12px}.alert-error{background:#652b2b55;border:1px solid #b64b4b77;color:#ffb5b5}.scene-warning{display:flex;align-items:center;justify-content:space-between;background:#60491e44;border:1px solid #9c793d77;color:#f0d49d}.scene-warning button{background:#d7a34a;color:#241b0e;border:0;border-radius:8px;padding:8px 12px;font-size:11px;font-weight:700}.workspace{display:grid;grid-template-columns:minmax(340px,.9fr) minmax(0,1.1fr);gap:18px;margin-top:18px;align-items:start}.editor-column{display:grid;gap:18px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:15px;padding:21px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.panel-heading h2{font-size:19px;margin:5px 0 0}.field-count,.preview-tag{font-size:9px;letter-spacing:1px;color:#8e96a5;border:1px solid var(--line);border-radius:20px;padding:6px 9px}.fields{display:grid;gap:16px}.field{display:grid;gap:8px;min-width:0;margin-top:14px}.field>span{font-size:12px;color:#c8cbd2;font-weight:600}.field input,.field textarea{width:100%;border:1px solid #343a46;background:#11141a;color:#f4f1eb;border-radius:9px;padding:12px 13px;outline:none;font-size:14px;line-height:1.6;min-height:46px;resize:vertical}.field input:focus,.field textarea:focus{border-color:#c58b55;box-shadow:0 0 0 3px #c58b551c}.field input::placeholder,.field textarea::placeholder{color:#5e6572}.primary-btn,.secondary-btn{border:0;border-radius:9px;padding:12px 17px;font-size:12px;font-weight:700;min-height:44px}.primary-btn{background:var(--gold);color:#211b12}.secondary-btn{background:#2a2e38;color:#d9dce3;border:1px solid #414653}.update-btn{width:100%;margin-top:20px}.history-panel{padding-bottom:14px}.text-btn{font-size:11px}.history-list{display:grid}.history-item{display:flex;align-items:center;gap:8px;border-top:1px solid #ffffff0c;padding:11px 0}.history-load{flex:1;min-width:0;text-align:left;border:0;background:none;color:inherit;padding:0;display:grid;gap:4px}.history-time{font-size:10px;color:#858d9c}.history-load strong{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-load small{font-size:11px;color:#9da4b0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-btn{border:0;background:#292d36;color:#a9aebb;border-radius:7px;width:30px;height:30px;font-size:18px}.empty-history{padding:14px 0;color:#818998;font-size:12px;line-height:1.6}.preview-panel{overflow:hidden}.preview-frame{width:100%;aspect-ratio:16/9;background:#292c31;overflow:hidden;position:relative}.preview-stage{position:absolute;left:0;top:0;width:1920px;height:1080px;transform-origin:top left;overflow:hidden;background:transparent;color:white;font-family:"Noto Sans Malayalam","Noto Sans",sans-serif}.preview-gradient{position:absolute;z-index:0;left:0;bottom:0;width:1920px;height:300px;background:linear-gradient(to top,rgba(14,19,21,1) 0%,rgba(14,19,21,.99) 16%,rgba(14,19,21,.9) 38%,rgba(14,19,21,.72) 62%,rgba(14,19,21,.42) 82%,transparent 100%)}.overlay-pill{position:absolute;left:15px;width:265px;height:51px;box-sizing:border-box;padding:0 22.5px;display:flex;align-items:center;background:rgba(14,19,21,.88);border-left:4.5px solid #c98245;border-radius:6px;box-shadow:0 7.5px 27px #0003;font-size:25.5px;font-weight:700;letter-spacing:2.55px;white-space:nowrap}.overlay-pill.date{top:60px;gap:18px;color:#f2ece2;font:700 25.5px Inter,Arial,sans-serif}.overlay-pill.date i{width:10.5px;height:10.5px;border-radius:50%;background:#c98245;box-shadow:0 0 13px #c98245a6}.overlay-pill.jumua,.overlay-pill.banner{top:0;color:#f6c85f}.overlay-pill.jumua span,.overlay-pill.banner span{transform:scaleX(.765);transform-origin:left center}.preview-logo-card{position:absolute;top:0;right:0;width:225px;padding:18px 24px 30px;transform:scale(.7);transform-origin:top right}.preview-logo-card:before{content:"";position:absolute;z-index:-1;inset:-150px;border-radius:50%;transform:translate(70px,-70px);background:radial-gradient(ellipse,rgba(8,8,8,1) 0%,rgba(8,8,8,.75) 38%,rgba(8,8,8,.5) 53%,rgba(8,8,8,.25) 68%,transparent 100%);filter:blur(10px)}.preview-logo-card img{display:block;width:177px;max-height:157px;object-fit:contain;object-position:right top;filter:drop-shadow(0 4px 13px #0006);animation:breathe 6s ease-in-out infinite}.preview-lower{position:absolute;left:15px;bottom:45px;width:100%;padding-left:36px;border-left:6px solid #c98245;filter:drop-shadow(0 4px 12px #0006);z-index:1}.preview-speaker{margin:0;color:#f6c85f;font-size:82px;line-height:1.08;font-weight:400;letter-spacing:1px;text-shadow:0 3px 7px #000c,0 1px 24px #0006}.preview-title{margin:1px 0 2px;color:#fff4df;font-size:62px;line-height:1.28;font-weight:400;letter-spacing:.15px;text-shadow:0 3px 7px #000c,0 1px 18px #0006;white-space:nowrap}.preview-location{position:absolute;right:18px;bottom:10px;color:#f6c85f;font-size:22px;line-height:1.2;font-weight:500;white-space:nowrap;text-shadow:0 2px 6px #000c}.preview-note{color:#858d9a;font-size:10px;margin:12px 0 0}.record-bar{position:fixed;z-index:5;bottom:0;left:0;right:0;padding:12px max(20px,calc((100vw - 1480px)/2));padding-bottom:max(12px,env(safe-area-inset-bottom));background:#171a20f2;backdrop-filter:blur(16px);border-top:1px solid #353a45;display:flex;align-items:center;justify-content:space-between;gap:12px}.record-bar-state{font-size:11px;color:#b8bdc7}.record-actions{display:flex;gap:10px}.record-btn{border:0;border-radius:10px;padding:12px 18px;min-height:46px;font-size:12px;font-weight:750}.start-btn{background:#2f9b68;color:#fff}.stop-btn{background:#bd4646;color:#fff}.footer{margin-top:auto;border-top:1px solid #ffffff0c;padding:20px clamp(20px,5vw,76px);display:flex;justify-content:space-between;color:#646c7b;font-size:9px;letter-spacing:1.6px}.modal-backdrop{position:fixed;z-index:20;inset:0;background:#050609c9;display:flex;align-items:center;justify-content:center;padding:18px}.settings-modal,.confirm-modal{width:min(460px,100%);background:#1b1e26;border:1px solid #3a404d;border-radius:17px;padding:24px;box-shadow:0 24px 80px #0009}.modal-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:24px}.modal-head h2,.confirm-modal h2{margin:6px 0 0;font-size:23px}.settings-security{font-size:11px;color:#8f97a5;line-height:1.6;margin:18px 0}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.confirm-modal p{color:#b4bbc7;font-size:13px}.toast{position:fixed;z-index:30;bottom:92px;left:50%;transform:translateX(-50%);max-width:min(520px,calc(100% - 30px));padding:12px 17px;border-radius:10px;background:#26372f;border:1px solid #427858;color:#d8f4e3;font-size:12px;box-shadow:0 10px 35px #0008}.scene-tabs{display:flex;gap:6px;margin:20px 0 14px;border-bottom:1px solid var(--line)}.scene-tab{padding:11px 18px;color:var(--muted);font-size:12px;border-bottom:2px solid transparent}.scene-tab.active{color:var(--text);border-bottom-color:var(--accent);font-weight:700}.youtube-template-panel{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);align-items:start;gap:16px}.youtube-template-panel>.panel-heading{grid-column:1/-1}.youtube-template-panel>.youtube-editor-toolbar,.youtube-template-panel>.youtube-form,.youtube-template-panel>.youtube-template-text,.youtube-template-panel>.alert-error,.youtube-template-panel>.youtube-template-actions,.youtube-template-panel>.youtube-info-note{grid-column:1;min-width:0}.youtube-preview-panel{grid-column:2;grid-row:2/span 6;position:sticky;top:18px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.025)}.youtube-preview-panel .panel-heading{margin-bottom:14px}.youtube-preview-block{padding:13px 0;border-top:1px solid var(--line)}.preview-label{display:block;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.12em;margin-bottom:7px}.youtube-preview-title{font-size:17px;line-height:1.5;font-weight:700;overflow-wrap:anywhere}.preview-meta{display:block;color:var(--muted);font-size:11px;margin-top:7px}.youtube-preview-description{font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;max-height:440px;overflow:auto;color:var(--text)}.youtube-tags-heading{display:flex;align-items:center;justify-content:space-between}.youtube-preview-tags{display:flex;flex-wrap:wrap;gap:6px}.youtube-chip-dropped{color:#858995;background:#1b1e25;border-color:#343844;opacity:.65}.youtube-tag-limit-note{display:block;color:#858995;font-size:11px;margin-top:8px}@media(max-width:760px){.youtube-template-panel{grid-template-columns:minmax(0,1fr)}.youtube-template-panel>.panel-heading,.youtube-template-panel>.youtube-editor-toolbar,.youtube-template-panel>.youtube-form,.youtube-template-panel>.youtube-template-text,.youtube-template-panel>.alert-error,.youtube-template-panel>.youtube-template-actions,.youtube-template-panel>.youtube-info-note,.youtube-preview-panel{grid-column:1;grid-row:auto}.youtube-preview-panel{position:static}}.youtube-editor-toolbar{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:12px}.youtube-form{display:flex;flex-direction:column;gap:18px}.youtube-form .field{display:flex;flex-direction:column;gap:8px}.youtube-form input:not([type=checkbox]),.youtube-form textarea{width:100%;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:#101218;color:var(--text);font:13px/1.55 inherit}.youtube-form textarea{resize:vertical;white-space:pre-wrap}.youtube-title-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;align-items:start;margin:8px 0}.youtube-order{color:var(--muted);padding-top:10px}.youtube-row-actions{display:flex;gap:4px;align-items:center}.youtube-switch-row{display:flex;align-items:center;gap:9px;color:var(--text);font-size:13px}.youtube-switch-row input{accent-color:var(--accent)}.placeholder-buttons{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.placeholder-btn{padding:4px 7px;border:1px solid var(--line);border-radius:6px;color:var(--muted);font:11px ui-monospace,monospace}.placeholder-btn:hover{color:var(--text);border-color:var(--accent)}.youtube-chip-list{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}.youtube-chip{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;background:#252a35;border:1px solid var(--line);border-radius:16px;font-size:12px}.youtube-chip button{color:var(--muted);font-size:16px;line-height:1}.youtube-list-row{display:flex;gap:8px;margin:7px 0}.youtube-list-row input{flex:1}.field-error{display:block;color:#ff7777;font-size:11px;margin-top:4px}.danger-text{color:#ff7777}.youtube-form .field-error{grid-column:1/-1}@media(max-width:600px){.youtube-title-row{grid-template-columns:20px minmax(0,1fr)}.youtube-row-actions{grid-column:2}.youtube-list-row{align-items:center}}.youtube-template-text{width:100%;min-height:420px;resize:vertical;padding:15px;border:1px solid var(--line);border-radius:10px;background:#101218;color:var(--text);font:12px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre;tab-size:2}.youtube-template-actions{display:flex;flex-wrap:wrap;gap:10px}.youtube-info-note{padding-top:12px;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.6}@keyframes pulse{50%{opacity:.55}}@keyframes breathe{0%,65%,100%{opacity:1;transform:translateY(0) scale(1)}80%{opacity:.8;transform:translateY(-5px) scale(1.05)}90%{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:900px){.workspace{grid-template-columns:1fr}.preview-column{grid-row:2}.scene-page{margin-top:22px}.preview-panel{padding:16px}.record-bar{padding-left:18px;padding-right:18px}.status-meta{gap:12px}}
@media(max-width:560px){.topbar{height:62px;padding:0 16px}.landing{width:calc(100% - 36px);margin:60px auto}.landing h1{letter-spacing:-2.5px}.scene-grid{grid-template-columns:1fr;gap:11px}.scene-card{min-height:145px;padding:19px}.scene-name{margin-top:16px;font-size:25px}.scene-page{width:calc(100% - 28px);margin:22px auto 130px}.page-heading h1{font-size:29px}.page-heading>.connection-badge{font-size:0;padding:9px}.status-panel{padding:15px}.status-meta{width:100%;justify-content:space-between}.panel{padding:16px}.panel-heading h2{font-size:17px}.record-bar{align-items:stretch;flex-direction:column;gap:9px;padding-top:9px}.record-bar-state{display:none}.record-actions{display:grid;grid-template-columns:1fr 1fr}.record-btn{padding:11px 8px;font-size:11px;min-height:48px}.toast{bottom:120px}.footer{font-size:8px}.modal-actions>*{flex:1}.scene-warning{align-items:flex-start;gap:10px;flex-direction:column}}
.preview-iframe{position:absolute;left:0;top:0;width:1920px;height:1080px;border:0;transform-origin:top left;background:transparent;pointer-events:none}

/* Button reset: browsers draw default grey, bevelled buttons for these unless told otherwise. */
.scene-tab,.placeholder-btn,.youtube-chip button{background:none;border:0;font-family:inherit;cursor:pointer}
.scene-tab{border-bottom:2px solid transparent;margin-bottom:-1px;border-radius:0}
.scene-tab:hover{color:var(--text)}
.placeholder-btn{border:1px solid var(--line);background:#ffffff08}
.youtube-chip button{padding:0}
.youtube-chip button:hover{color:var(--text)}

/* Checkboxes: compact custom box with the label right beside it. */
.youtube-switch-row{display:inline-flex;justify-content:flex-start;align-items:center;gap:10px;width:auto;cursor:pointer;user-select:none}
.youtube-switch-row input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:18px;height:18px;min-height:0;margin:0;padding:0;border:1.5px solid #4a505d;border-radius:5px;background:#101218;display:grid;place-content:center;cursor:pointer;transition:background .15s,border-color .15s}
.youtube-switch-row input[type=checkbox]::after{content:"";width:5px;height:9px;border:solid #211b12;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg) scale(0);transition:transform .12s}
.youtube-switch-row input[type=checkbox]:checked{background:var(--accent);border-color:var(--accent)}
.youtube-switch-row input[type=checkbox]:checked::after{transform:translateY(-1px) rotate(45deg) scale(1)}
.youtube-switch-row input[type=checkbox]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.youtube-switch-row:hover input[type=checkbox]:not(:checked){border-color:var(--accent)}
