.speech-page{--sp-bg:#f6f7fa;--sp-panel:#fff;--sp-line:#e5e9ef;--sp-text:#263647;--sp-muted:#84909e;--sp-blue:#4279c3;--caption-size:32px;--caption-opacity:.65;background:var(--sp-bg);color:var(--sp-text);height:100dvh;overflow:hidden}
.speech-page[data-theme=dark]{--sp-bg:#15171a;--sp-panel:#202328;--sp-line:#30353d;--sp-text:#e0e6ed;--sp-muted:#9aa5b3;--sp-blue:#8abaff;color-scheme:dark}
.speech-page .site-header{height:76px;background:var(--sp-bg);border-color:var(--sp-line);padding:0 3%}.speech-page .brand{color:var(--sp-text)}.speech-page .header-right{gap:10px}.speech-shell{height:calc(100dvh - 76px);padding:26px 3% 12px;max-width:none;display:flex;flex-direction:column;gap:16px}.speech-intro{display:flex;align-items:center;justify-content:space-between;gap:20px}.speech-eyebrow{font-size:9px;letter-spacing:2px;color:var(--sp-muted)}.speech-intro h1{font-size:25px;font-weight:550;letter-spacing:-.8px;margin:7px 0 0}.speech-pill{font-size:11px;color:var(--sp-muted);padding:6px 10px;border:1px solid var(--sp-line);border-radius:20px;white-space:nowrap}.speech-stage{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:20px}.speech-captions{display:grid;grid-template-columns:1fr 1fr;gap:16px;height:100%;min-height:0}.speech-lane{background:var(--sp-panel);border:1px solid var(--sp-line);border-radius:20px;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.speech-lane-heading{padding:18px 24px;display:flex;justify-content:space-between;color:var(--sp-muted);font-size:10px;letter-spacing:1.4px;border-bottom:1px solid var(--sp-line)}.speech-text{flex:1;min-height:0;overflow:auto;padding:26px;font-size:var(--caption-size);line-height:1.65;letter-spacing:-.4px;overflow-wrap:anywhere;white-space:pre-wrap;scrollbar-width:thin;scrollbar-color:var(--sp-line) transparent}.speech-text p{margin:0 0 .8em}.speech-placeholder{color:var(--sp-muted);font-size:20px;opacity:.5}.speech-footer{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--sp-muted)}.speech-footer .text-button{color:var(--sp-blue)}.speech-button,.speech-icon{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--sp-line);border-radius:10px;background:var(--sp-panel);color:var(--sp-text);font-size:12px;min-height:40px;padding:9px 16px;cursor:pointer}.speech-icon{width:38px;min-height:38px;padding:0;font-size:22px}.speech-button.primary-action{background:var(--sp-blue);border-color:var(--sp-blue);color:#fff}.speech-page[data-theme=dark] .primary-action{color:#152139}.speech-controls{display:flex;justify-content:center;gap:10px;align-items:center}.speech-controls .primary-action{min-width:150px;border-radius:30px;min-height:46px}.speech-session{margin-right:auto;display:flex;align-items:center;gap:15px;font-size:11px;color:var(--sp-muted)}.speech-session a{color:var(--sp-blue);text-decoration:none}.speech-session time{font-variant-numeric:tabular-nums}.speech-dialog{background:var(--sp-panel);color:var(--sp-text);border-color:var(--sp-line);width:min(470px,calc(100vw - 24px));max-height:88dvh;overflow:auto;padding:24px}.speech-dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.speech-dialog-heading h2{font-size:18px}.speech-option-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.speech-option-grid label{display:flex;flex-direction:column;gap:8px;font-size:11px;color:var(--sp-muted)}.speech-option-grid select,.speech-dialog input:not([type=range]){background-color:var(--sp-panel);color:var(--sp-text);border:1px solid var(--sp-line);border-radius:8px;padding:10px;font-size:12px}.speech-option-grid select{padding-right:30px}.wide-option{grid-column:1/-1}.wide-option input[type=range]{width:100%;accent-color:var(--sp-blue)}.wide-option output{font-variant-numeric:tabular-nums;font-size:10px;text-align:right;margin-top:-5px}.speech-host-settings{border-top:1px solid var(--sp-line);margin-top:22px;padding-top:7px}.speech-host-settings h3{font-size:13px;margin:16px 0}.speech-help{font-size:11px!important;line-height:1.7!important;color:var(--sp-muted)}.speech-dialog input[type=file]{max-width:100%}.sharing-dialog{text-align:center}.sharing-dialog .speech-dialog-heading{text-align:left}.sharing-dialog img{max-width:100%;display:block;margin:14px auto;border-radius:12px;background:#fff;padding:6px}.sharing-dialog input{width:100%;min-width:0}.sharing-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:16px}.danger{color:#bb6970}.audience-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;color:var(--sp-muted)}.audience-tools label{display:flex;align-items:center;gap:12px;white-space:nowrap}.audience-tools select{width:150px;background-color:var(--sp-panel);color:var(--sp-text);border-color:var(--sp-line)}.viewer-only{display:none}.speech-page[data-role=viewer] .host-only{display:none!important}.speech-page[data-role=viewer] .viewer-only{display:flex}.speech-page[data-role=viewer] #audience-count{display:none}.speech-page[data-role=viewer] .speech-intro h1{font-size:20px}.speech-page[data-layout=rows] .speech-captions{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.speech-page[data-visible=translation] #source-lane,.speech-page[data-visible=source] #translation-lane{display:none}.speech-page:not([data-visible=both]) .speech-captions{grid-template-columns:1fr;grid-template-rows:1fr}
.speech-page[data-display=sentence] .speech-text{display:flex;align-items:center;justify-content:center;text-align:center;padding:30px}.speech-text .sentence-text{margin:0;width:100%;transition:opacity .5s ease,transform .5s ease}.sentence-text.faded{opacity:0;transform:translateY(-6px)}.sentence-text.pending{color:var(--sp-muted)}
#speech-video{width:100%;height:100%;object-fit:contain;background:#111;display:block}.speech-page[data-surface=video] .speech-stage{background:#111}.speech-page[data-surface=overlay] .speech-stage{background:repeating-conic-gradient(#e5e7eb 0% 25%,#f4f5f7 0% 50%) 50%/24px 24px}
.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater]) .speech-captions{position:absolute;inset:5% 4%;height:auto;display:flex;align-items:flex-end;justify-content:center;gap:16px;pointer-events:none}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater]) .speech-lane{max-height:45%;flex:1;background:rgb(0 0 0 / var(--caption-opacity));border:0;border-radius:10px;color:#fff;pointer-events:auto}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater]) .speech-lane-heading{display:none}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater]) .speech-text{padding:14px 24px;text-shadow:0 2px 5px #0009;line-height:1.5}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater])[data-layout=rows] .speech-captions{flex-direction:column;align-items:stretch;justify-content:flex-end}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater])[data-layout=rows] .speech-lane{flex:0 1 auto}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater])[data-position=top] .speech-captions{align-items:flex-start}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater])[data-position=center] .speech-captions{align-items:center}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater])[data-layout=rows][data-position=top] .speech-captions{justify-content:flex-start;align-items:stretch}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater])[data-layout=rows][data-position=center] .speech-captions{justify-content:center;align-items:stretch}
html:has(.speech-page[data-output=overlay]){background:transparent}.speech-page[data-output=overlay]{background:transparent!important}.speech-page[data-output=overlay] .site-header,.speech-page[data-output=overlay] .speech-intro,.speech-page[data-output=overlay] .audience-tools,.speech-page[data-output=overlay] .speech-footer,.speech-page[data-output=overlay] .speech-notice{display:none!important}.speech-page[data-output=overlay] .speech-shell{height:100dvh;padding:0;gap:0}.speech-page[data-output=overlay] .speech-stage{background:transparent;border:0;border-radius:0}.speech-page[data-output=overlay] .speech-placeholder{display:none}
@media(max-width:720px){.speech-page .site-header{height:64px;padding:0 14px}.speech-page .brand{font-size:15px;gap:8px}.speech-page .brand-logo{width:38px;height:28px}.speech-page .brand small{font-size:6px}.speech-page .header-right{gap:6px}.speech-page #audience-count{display:none}.speech-page #fullscreen-button{display:none}.speech-page #share-button{padding:7px 10px;font-size:10px}.speech-shell{height:calc(100dvh - 64px);padding:10px 8px max(10px,env(safe-area-inset-bottom));gap:10px}.speech-intro h1{font-size:18px}.speech-eyebrow{font-size:7px}.speech-captions{gap:8px}.speech-lane{border-radius:14px}.speech-lane-heading{padding:12px 10px;font-size:8px;letter-spacing:.5px;gap:5px;flex-wrap:wrap}.speech-text{padding:14px 12px;font-size:max(18px,calc(var(--caption-size)*.75))}.speech-page[data-display=sentence] .speech-text{padding:16px 12px}.speech-placeholder{font-size:14px}.speech-footer{font-size:8px;gap:8px}.speech-footer>span{max-width:65%}.speech-session{gap:7px;font-size:9px}.speech-controls .primary-action{min-width:100px;min-height:42px}.speech-controls{gap:7px}.speech-dialog{padding:20px}.audience-tools>span{font-size:9px}.speech-page[data-role=viewer] .speech-intro{display:none}.speech-page[data-role=viewer] .brand small{font-size:6px}.speech-page:is([data-surface=video],[data-surface=overlay],[data-surface=theater]) .speech-text{padding:10px 12px}}

.speech-page[data-surface=theater] .speech-stage{background:#101216}
.speech-stage:fullscreen{width:100vw;height:100dvh;border-radius:0;background:var(--sp-bg)}
.speech-stage:fullscreen .speech-captions{padding:0}
.speech-page[data-surface=theater] .speech-stage:fullscreen{background:#101216}
.speech-page:is([data-surface=video],[data-surface=theater],[data-surface=overlay]) .speech-placeholder{display:none}

/* The live action is Stop; idle/connecting retain the primary theme color. */
.speech-page .speech-button.primary-action.is-stop{background:#b83b49;border-color:#b83b49;color:#fff}
.speech-page .speech-button.primary-action.is-stop:hover:not(:disabled){background:#9e2f3c;border-color:#9e2f3c}
.speech-page[data-theme=dark] .speech-button.primary-action.is-stop{background:#ef9aa4;border-color:#ef9aa4;color:#351319}
.speech-page[data-theme=dark] .speech-button.primary-action.is-stop:hover:not(:disabled){background:#f5b0b8;border-color:#f5b0b8}
.speech-lane-heading #speech-inline-target{width:auto;max-width:55%;height:32px;min-height:32px;box-sizing:border-box;margin:0;padding:5px 28px 5px 10px;font-size:12px;border:1px solid var(--sp-line);border-radius:8px;background-color:var(--sp-panel);color:var(--sp-text)}
#speech-mic-status{font-size:12px;line-height:1.5;color:var(--sp-muted);align-self:center;overflow-wrap:anywhere}

/* Match the original language label and translation selector on both lanes. */
.speech-lane-heading{align-items:center;flex-wrap:nowrap;min-height:54px;box-sizing:border-box;padding:10px 24px;gap:8px}
#source-language-label,#translation-language-label{height:32px;box-sizing:border-box;align-items:center;font-size:12px;line-height:20px;letter-spacing:normal;white-space:nowrap}
#source-language-label{display:inline-flex}
@media(max-width:720px){.speech-lane-heading{min-height:50px;padding:8px 10px;flex-wrap:nowrap}}

.speech-footer{flex-wrap:wrap;gap:8px}.speech-footer>span{margin-right:auto}

.speech-dialog-heading .speech-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;padding:0;line-height:1}
.speech-dialog-heading .speech-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}

.speech-status-actions{display:flex;align-items:center;gap:8px;flex:none}
#speech-pip{width:32px;height:32px;min-height:32px;border-radius:9px;line-height:1}
#speech-pip svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6}
#speech-pip svg rect:last-child{fill:currentColor;stroke:none}
#speech-pip[aria-pressed=true]{color:var(--sp-blue);background:var(--sp-bg);border-color:var(--sp-blue)}
@media(max-width:720px){.speech-intro{flex-wrap:wrap;gap:10px}.speech-status-actions{margin-left:auto}}

/* Keep paired lecture controls within narrow mobile dialogs. */
.speech-host-settings .speech-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.speech-host-settings .speech-option-grid label,.speech-host-settings .speech-option-grid select{min-width:0}
.speech-host-settings .speech-option-grid select{width:100%}

#close-speech-sharing{border:0;background:transparent;transition:background-color .15s,color .15s}
#close-speech-sharing:hover{background:var(--sp-bg);color:var(--sp-blue)}
